Update a rather poor Changelog entry, to give better information.
[pspp-builds.git] / src / ChangeLog
1 Wed Feb 11 20:33:18 2004  Ben Pfaff  <blp@gnu.org>
2
3         * flip.c: Fixed crash from FLIP when a numeric variable is
4           specified on NEWNAMES and a large value is used, and a couple of
5           other minor bugs besides.
6           (struct varname) Make name a 9-character fixed-size array
7           instead of a 1-character variable size array.
8           (make_new_var) Allow digits in variable names.
9           (flip_stream_write) Limit numeric values to 8 characters and
10           format system missing and very large and small values more
11           appropriately.
12
13 Thu Feb  5 13:19:06 WAST 2004 John Darrington <john@darrington.wattle.id.au>
14
15         * command.c: Fixed test on command return status for the correct 
16           value,  which had been causing a crash under certain invalid input.
17
18 Wed Feb  4 15:34:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
19
20         * t-test.q: Added calculations for the one sample variant of the T-TEST
21
22 Tue Feb  3 20:09:54 2004  Ben Pfaff  <blp@gnu.org>
23
24         * tab.c: (render_strip) Fix bug that sometimes caused joined text
25           in joined cells to be rendered outside box boundaries.
26
27 Tue Feb  3 18:56:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
28
29         * random.c (rng_create): Fixed seeding so that it gets reseeded after
30         SET seed=xx has been called.
31
32 Mon Jan 19 14:08:09 2004  Ben Pfaff  <blp@gnu.org> 
33
34         * random.c (rng_get_double): Fix always-returning-zero bug in my
35         preferred way, and at the same time make sure rounding doesn't
36         bite us.
37
38 Thu Jan  1 23:16:41 2004  Ben Pfaff  <blp@gnu.org>
39
40         * html.c: (change_attributes) Dead code, removed.
41         (escape_string) Eliminate code to call change_attributes() that
42         never actually called it.
43         (output_tab_table) Get rid of dependence on tab_hit
44         and struct tab_joined_cell's hit member, which are abominations.
45
46         * tab.c: (tab_output_text) Don't call
47         d->class->text_set_font_by_name if it's a null pointer.
48         (macro UNROLL_LOOP) Eliminate.
49         (macro UNROLL_3_LOOPS) Eliminate.
50         (tabi_render) Rewrite not to use the above macros.
51
52 Thu Jan  1 23:09:07 2004  Ben Pfaff  <blp@gnu.org>
53
54         Start working on a new output driver system, one that doesn't suck
55         so much, by adding a "device-independent" output driver.  The idea
56         is to write out only a single output stream, then use separate
57         processes to translate them into whatever formats we want.  This
58         is similar to how "groff" works with its various output drivers
59         (grops, grotty, grodvi, ...).
60         
61         * Makefile.am: (pspp_SOURCES) Add devind.c, devind.h.
62
63         * list.q: (write_all_headers) Stub out devind class.
64         (clean_up) Ditto.
65         (determine_layout) Ditto.
66         (list_cases) Ditto.
67
68         * output.c: (outp_init) Add devind class.
69
70         * devind.c: New file.
71
72         * devind.h: New file.
73
74 Thu Jan  1 23:08:14 2004  Ben Pfaff  <blp@gnu.org>
75
76         * frequencies.q: (hash_value_alpha) Fixed up the previous change
77         to use the proper string length.
78
79 Wed Dec 31 16:27:33 WAST 2003 John Darrington <john@darrington.wattle.id.au>
80
81         * Fixed bug where FREQ would crash on alpha values
82
83 Tue Dec 30 22:42:57 2003  Ben Pfaff  <blp@gnu.org>
84
85         * Removed bletcherous alloca() workarounds for AIX from top of
86         many files.  AIX can use the alternative alloca() implementation
87         instead.
88
89 Tue Dec 30 22:35:16 2003  Ben Pfaff  <blp@gnu.org>
90
91         * ascii.c: (ascii_option) Fix implementation of headers option.
92
93 Tue Dec 30 22:32:53 2003  Ben Pfaff  <blp@gnu.org>
94
95         * ascii.c: Add a "squeeze" option to the ASCII driver to squeeze
96         multiple blank lines into one.
97         (struct ascii_driver_ext) Add squeeze_blank_lines option.
98         (ascii_preopen_driver) Initialize squeeze_blank_lines.
99         (static var option_tab) Add squeeze entry.
100         (ascii_option) Set squeeze_blank_lines.
101         (output_lines) Implement squeezing blank lines.
102
103 Wed Dec 31 07:19:46 WST 2003 John Darrington <john@darrington.wattle.id.au>
104
105         * Removed redundant code from output.h
106
107 Sat Dec 27 22:17:52 2003  Ben Pfaff  <blp@gnu.org>
108
109         Dictionary classes: each variable is "ordinary", "system", or
110         "scratch".
111
112         * var.h: (enum dict_class) New enum.
113
114         * vars-prs.c: (dict_class_from_id) New function.
115         (dict_class_to_name) New function.
116
117 Sat Dec 27 22:16:06 2003  Ben Pfaff  <blp@gnu.org>
118
119         * var.h: (struct freq_tab_set) Removed (not used).
120
121 Sat Dec 27 22:15:21 2003  Ben Pfaff  <blp@gnu.org>
122
123         * value-labels.c: (val_labs_destroy) vls needs to be freed too.
124
125 Sat Dec 27 22:10:49 2003  Ben Pfaff  <blp@gnu.org>
126
127         * stats.c: (hypercube) Rename pow4().  All references updated.
128
129 Sat Dec 27 22:05:49 2003  Ben Pfaff  <blp@gnu.org>
130
131         * rename-vars.c: (cmd_rename_variables) Rewritten.
132         (compare_name) Removed.
133
134 Sat Dec 27 22:03:51 2003  Ben Pfaff  <blp@gnu.org>
135
136         var_set feature, and code taking advantage of it.
137         
138         * crosstabs.q: (static var var_dict) Removed.
139         (static var variables) New variable.
140         (static var variables_cnt) New variable.
141         (cmd_crosstabs) Free variables instead of var_dict.
142         (internal_cmd_crosstabs) Initialize and use variables,
143         variables_cnt instead of var_dict.
144         (free_var_dict) Removed.
145         (crs_custom_tables) Use var_set instead of a copied dictionary.
146         (crs_custom_variables) Set up variables, variables_cnt instead of
147         var_dict.
148         [DEBUGGING] (debug_print) Ditto.
149
150         * means.q: (mns_custom_tables) Use var_set instead of a copied
151         dictionary.
152
153         * vars-prs.c: (parse_vs_variable) New function.
154         (parse_dict_variable) Rewritten.
155         (parse_variable) Rewritten.
156         (parse_variables) Renamed parse_var_set_vars(), rewritten.
157         (parse_variables) New function in terms of parse_var_set_vars().
158         Now requires its first argument to be non-null.  All references
159         that passed a null pointer updated to pass default_dict instead.
160         (macro id_dict) Removed.
161         (parse_DATA_LIST_vars) Add assertions.
162         (parse_mixed_vars) Ditto.
163         (struct var_set) New structure.
164         (var_set_get_cnt) New function.
165         (var_set_get_var) New function.
166         (var_set_lookup_var) New function.
167         (var_set_destroy) New function.
168         (dict_var_set_get_cnt) New function.
169         (dict_var_set_get_var) New function.
170         (dict_var_set_lookup_var) New function.
171         (dict_var_set_destroy) New function.
172         (var_set_create_from_dict) New function.
173         (struct array_var_set) New structure.
174         (array_var_set_get_cnt) New function.
175         (array_var_set_get_var) New function.
176         (array_var_set_lookup_var) New function.
177         (array_var_set_destroy) New function.
178         (var_set_create_from_array) New function.
179
180         * q2c.c: (dump_parser) Use parse_variables(default_dict, ...)
181         instead of parse_variables(NULL, ...) in output code.
182
183 Sat Dec 27 21:38:53 2003  Ben Pfaff  <blp@gnu.org>
184
185         Change inp_init from a 2-bit vector to an ordinary array.
186         Initialize it all in cmd_end_input_program() instead of in
187         create_variable().
188
189         * inpt-pgm.c: (enum value_init_type) New enum.
190         (global var inp_init) Change to `enum value_init_type *', make
191         static.
192         (inp_init_size) Removed.
193         (inp_nval) Change to `size_t', make static.
194         (cmd_input_program) Don't initialize inp_init or inp_init_size.
195         (cmd_end_input_program) Initialize inp_init, inp_nval.
196         (init_case) Rewrite.
197         (clear_case) Rewrite.
198
199         * inpt-pgm.h: Removed.
200
201 Sat Dec 27 21:36:38 2003  Ben Pfaff  <blp@gnu.org>
202
203         * hash.c: (hsh_hash_bytes) Use Fowler-Noll-Vo hash instead of
204         Colin Plumb hash.  It is simpler and should better resist
205         collisions.
206         (hsh_hash_string) Ditto.
207
208 Sat Dec 27 21:34:57 2003  Ben Pfaff  <blp@gnu.org>
209
210         * get.c: (export_write_case_func) Remove debug printing code.
211
212 Sat Dec 27 21:11:09 2003  Ben Pfaff  <blp@gnu.org>
213
214         * get.c: (cmd_save_internal) Rename parameter.  Use &t->h instead
215         of cast.
216         (save_write_case_func) Use &trns->h instead of cast.
217         (cmd_export) Use &t->h instead of cast.
218
219 Sat Dec 27 20:57:42 2003  Ben Pfaff  <blp@gnu.org>
220
221         Moved vectors into the dictionary.
222
223         * var.h: (struct vector) Moved here from vector.h.  `index' member
224         renamed `idx', `v' renamed `var', `nv' renamed `cnt'.  All
225         references updated.
226         
227         * vector.h: Removed.
228
229         * vector.c: (global var vec) Removed.
230         (global var nvec) Removed.
231         (cmd_vector) Rewritten.
232         (find_vector) Removed.
233
234         * dictionary.c: (dict_create_vector) New function.
235         (dict_get_vector) New function, replaces reading global vec[]
236         array.
237         (dict_get_vector_cnt) New function, replaces reading global nvec
238         variable.
239         (dict_lookup_vector) New function, replaces find_vector().
240         (dict_clear_vectors) New function.
241
242 Sat Dec 27 20:54:01 2003  Ben Pfaff  <blp@gnu.org>
243
244         Start to move away from `struct variable' p `union' member to void
245         * aux member.
246
247         * var.h: (struct variable) Add `aux' member.
248
249 Sat Dec 27 20:36:25 2003  Ben Pfaff  <blp@gnu.org>
250
251         Get rid of struct variable `foo' member.
252
253         * frequencies.q: (internal_cmd_frequencies) Use p.frq.used instead
254         of foo.
255         (frq_custom_variables) Ditto.
256         (frq_custom_grouped) Ditto.
257
258         * get.c: (struct save_trns) Change `var' member from `int *' to
259         `struct variable **'.
260         (cmd_save_internal) Use aux instead of foo.
261         (save_trns_proc) Use revised `var' member.
262         (static var mtf_seq_no) Renamed mtf_seq_num.
263         (static var mtf_seq_nums) New static var.
264         (cmd_match_files) Initialize mtf_seq_nums.
265         (mtf_free) Free mtf_seq_nums.
266         (mtf_processing) Use mtf_seq_nums instead of foo.
267         (mtf_merge_dictionary) No need to initialize mv->foo.
268         (cmd_export) Use aux instead of foo.  Use revised `var' member.
269         (mns_custom_tables) Don't use foo to check for duplicates, that's
270         what PV_NO_DUPLICATE is for.
271
272         * var.h: (struct variable) Remove `foo' member.
273         (struct frequencies_proc) New member.
274         
275 Sat Dec 27 19:46:13 2003  Ben Pfaff  <blp@gnu.org>
276
277         Clean up COMPUTE and IF.
278
279         * compute.c: More or less rewrite the darn thing.
280         (struct compute_trns) Rename and reorder and add and delete
281         members.
282         (cmd_compute) Rewrite.
283         (compute_num) Make conditional on test expression.  Now used for
284         both COMPUTE and IF.
285         (compute_num_vec) Ditto.
286         (compute_str) Ditto.
287         (compute_str_vec) Ditto.
288         (cmd_if) Rewrite.
289         (if_num) Removed.
290         (if_num_vec) Removed.
291         (if_str) Removed.
292         (if_str_vec) Removed.
293         (parse_target_expression) Renamed parse_rvalue_expression(),
294         rewritten.
295         (new_trns) Renamed compute_trns_create(), rewritten.
296         (delete_trns) Removed.
297         (free_trns) Renamed compute_trns_free(), rewritten.
298         (struct lvalue) New structure.
299         (parse_var_or_vec) Renamed lvalue_parse(), rewritten.
300         (lvalue_get_type) New function.
301         (lvalue_is_vector) New function.
302         (lvalue_finalize) New function.
303         (lvalue_destroy) New function.
304         
305 Sat Dec 27 19:44:14 2003  Ben Pfaff  <blp@gnu.org>
306
307         * command.def: Disallow MODIFY VARS in input mode, so that
308         variables can't get dropped and confuse cmd_end_input_program()'s
309         attempt to fill inp_init[].
310         
311         * modify-vars.c: (static var forward_positional_ordering) New
312         variable.
313         (struct var_modification) Entirely changed.
314         (rearrange_dict) Interface changed, rewritten.
315         (cmd_modify_vars) Deal with modified struct var_modification, much
316         rewritten.
317         (struct var_renaming) New structure.
318         (compare_var_renaming_by_new_name) New function.
319         (validate_var_modification) New function.
320
321         * var.h: (struct modify_vars_proc) Removed.
322         (struct variable) Removed member p.mfv.
323
324 Sat Dec 27 19:40:26 2003  Ben Pfaff  <blp@gnu.org>
325
326         Make EVALUATE a valid command whether we're debugging or not, so
327         that `make check' can succeed regardless of whether debugging is
328         turned on.
329         
330         * command.def: [GLOBAL_DEBUGGING] Drop the #if.
331
332         * compute.c: [GLOBAL_DEBUGGING] (cmd_evaluate) Drop the #if.
333
334 Sat Dec 27 19:34:40 2003  Ben Pfaff  <blp@gnu.org>
335
336         * apply-dict.c: (cmd_apply_dictionary) Replace a ghastly switch
337         statement by a simple if test.
338
339         * dfm.c: (dfm_get_record) Add assertion.
340
341 Sat Dec 27 17:51:26 2003  Ben Pfaff  <blp@gnu.org>
342
343         For each file x.c, move #include "x.h" to the very top of the
344         include list, to catch x.h failing to include the proper headers.
345
346 Sat Dec 27 17:50:19 2003  Ben Pfaff  <blp@gnu.org>
347
348         * algorithm.c: (find) New function.
349         (remove_equal) New function.
350         (set_difference) New function.
351         (adjacent_find_equal) New function.
352         [TEST_UNIQUE] Removed test case.
353         (copy_if) Find end test.
354
355 Sat Dec 27 17:42:45 2003  Ben Pfaff  <blp@gnu.org>
356
357         * dictionary.c: (dict_get_case_weight) New convenience function.
358
359         * aggregate.c: (accumulate_aggregate_info) Use
360         dict_get_case_weight().
361
362         * frequencies.q: (calc_general) Ditto.
363         (calc_integer) Ditto.
364         (calc) Ditto.
365
366         * t-test.q: (groups_calc) Ditto.
367         (z_calc) Ditto.
368
369 Sat Dec 27 17:29:45 2003  Ben Pfaff  <blp@gnu.org>
370
371         * glob.c: (global var default_dict) Change from `struct
372         dictionary' to `struct dictionary *'.  All references changed.
373         (init_glob) Initialize default_dict with dict_create().
374
375 Sat Dec 27 17:06:06 2003  Ben Pfaff  <blp@gnu.org>
376
377         struct dictionary now made opaque.  All related functions:
378
379         * get.c: (rename_variables) Removed.
380         (dict_delete_run) Removed.
381         
382         * temporary.c: (copy_variable) Removed.
383         (new_dictionary) Removed.
384         (save_dictionary) Removed.
385         (restore_dictionary) Removed.
386         (free_dictionary) Removed.
387
388         * vars-atr.c: (clear_default_dict) Removed.
389         (find_variable) Removed.
390         (find_dict_variable) Removed.
391         (create_variable) Removed.
392         (delete_variable) Removed.
393         (common_init_stuff) Removed.
394         (init_variable) Removed.  Updating of inp_init moved into
395         cmd_end_input_program().
396         (replace_variable) Removed.
397         (rename_variable) Removed.
398         (clear_variable) Removed.
399         (dup_variable) Removed.
400
401         * vars-prs.c: (is_varname) Removed.
402         (is_dict_varname) Removed.
403         (fill_all_vars) Removed.
404
405         * vector.c: (find_vector) Removed.
406
407         * weight.c: (stop_weighting) Removed.
408
409         * dictionary.c: New file.
410         (dict_create) New, replaces new_dictionary().
411         (dict_clone) New, replaces save_dictionary() and
412         restore_dictionary().
413         (dict_clear) New, replaces clear_default_dict().
414         (dict_destroy) New, replaces free_dictionary().
415         (dict_get_var_cnt) New function, replaces references to
416         dict->nvar.
417         (dict_get_var) New function, replaces references to dict->var[i].
418         (dict_get_vars) New function, replaces fill_all_vars().
419         (dict_create_var) New, replaces create_variable().  Interface
420         drops `type' parameter, using a zero `width' to designate numeric.
421         (dict_clone_var) New, replaces dup_variable().
422         (dict_rename_var) New, replaces rename_variable().
423         (dict_lookup_var) New, replaces find_variable(),
424         find_dict_variable(), is_varname().
425         (dict_contains_var) New function.
426         (compare_variable_dblptrs) New function.
427         (dict_delete_var) New function, replaces clear_variable().
428         (dict_delete_vars) New function, replaces dict_delete_run().
429         (dict_reorder_vars) New function.
430         (dict_rename_vars) New function, replaces rename_variables().
431         (dict_get_weight) New function, replaces reading dict->weight_var.
432         (dict_set_weight) New function, replaces writing dict->weight_var
433         or calling stop_weight(dict).
434         (dict_get_filter) New function, replaces reading dict->filter_var.
435         (dict_set_filter) New function, replaces writing dict->filter_var.
436         (dict_get_case_limit) New function, replaces reading dict->N.
437         (dict_set_case_limit) New function, replaces writing dict->N.
438         (dict_get_value_cnt) New function, replaces reading dict->nval.
439         (dict_compact_values) New function, replaces a loop that was
440         replicated in several places.
441         (dict_get_split_vars) New function, replaces reading dict->splits.
442         (dict_get_split_cnt) New function, replaces reading
443         dict->n_splits.
444         (dict_set_split_vars) New function, replaces writing dict->splits.
445         (dict_get_label) New function, replaces reading dict->label.
446         (dict_set_label) New function, replaces writing dict->label.
447         (dict_get_documents) New function, replaces reading
448         dict->documents.
449         (dict_set_documents) New function, replaces writing
450         dict->documents.
451         
452         All references to above functions updated.
453         
454         * aggregate.c: (cmd_aggregate) Copy file label and documents from
455         old dictionary to new by hand, because dict_create() can't do it
456         itself.  Use dict_set_documents(), dict_set_split_vars().
457
458         * temporary.c: (cancel_temporary) Also set temp_dict to NULL after
459         calling dict_destroy().
460
461         * data-list.c: (dls_var_spec) Remove `type' member, replace by
462         `width'.
463         (fixed_parse_compatible) Some slightly nontrivial changes for
464         dict_create_var().
465         (dump_fmt_list) Ditto.
466         (parse_free) Ditto.
467
468         * file-type.c: (create_col_var) Ditto.
469
470         * get.c: (cmd_get) Use dict_compact_values() instead of a loop.
471         (trim_dictionary) Use dict_delete_vars(), dict_reorder_vars().
472         (rename_variables) Use dict_rename_vars().
473         (mtf_merge_dictionary) Use dict_get_documents(),
474         dict_set_documents(), dict_compact_values().
475
476         * pfm-read.c: (read_variables) Deal with changes to weighting.
477
478         * q2c.c: (dump_parser) Use dict_lookup_var() instead of
479         is_varname() in output code.
480
481         * sfm-read.c: (read_header) Use dict_create(), dict_set_label(),
482         other dictionary functions.
483
484         * title.c: (add_document_line) Use dict_get_documents(),
485         dict_set_documents().
486
487         * vars-atr.c: (discard_variables) Use dict_clear(default_dict),
488         reset default_handle by hand.  dict_clear() will clear vectors so
489         there's no need for that by hand.
490
491         * vfm.c: (close_active_file) Move call to finish_compaction()
492         earlier, so that we can do the compaction as a single step using
493         dict_compact_values().  Use dict_clear_vectors().
494         (finish_compaction) Use dict_delete_var(), dict_compact_values().
495                 
496         Some functions don't have replacements:
497
498         * vars-atr.c: (force_create_variable) Removed.  All references
499         updated to dict_create_var() followed by an assertion.
500         (force_dup_variable) Removed.  All references updated to
501         dict_clone_var() followed by an assertion.
502         
503         * weight.c: (update_weighting) Removed.  No longer necessary, so
504         all references removed.
505
506 Sat Dec 27 16:43:01 2003  Ben Pfaff  <blp@gnu.org>
507
508         Clean up AGGREGATE.
509         
510         * aggregate.c: Eliminate separation of weighted and unweighted
511         case.  It made the code too obscure and I doubt it was actually
512         faster.  Instead, all code uses the "weighted" code, because
513         that's a generalization of the "unweighted" code.
514         (FWEIGHT) Removed.
515         (FOPTIONS) Ditto.
516         (parse_aggregate_functions) No need to set FWEIGHT.
517         (accumulate_aggregate_info) Get rid of FWEIGHT cases.
518         (dump_aggregate_info) Ditto.
519         (initialize_aggregate_info) No need for special plain_function
520         that gets rid of FWEIGHT option.
521
522         * aggregate.c: Get rid of approximations.
523         (accumulate_aggregate_info) Don't use approx_gt(), approx_lt(),
524         approx_in_range().
525         (aggregate_single_case) Don't use approx_ne().
526
527 Sat Dec 27 16:19:36 2003  Ben Pfaff  <blp@gnu.org>
528
529         * ascii.c (ascii_line_width): Dead code, removed.
530
531         * postscript.c (ps_line_width): Ditto.
532
533         * q2c.c (xrealloc): Ditto.
534
535         * count.c (internal_cmd_count): Ditto.
536
537         * means.q (validate_dependent_endpoint): Ditto.
538
539         * set.q: (cmd_gset) Ditto.
540
541         * weight.c: [0] (weight_trns_proc) Ditto.
542
543 Sat Dec 27 16:18:16 2003  Ben Pfaff  <blp@gnu.org>
544
545         Make the code -Wmissing-prototypes clean.
546
547         * Makefile.am (version.c): Add #include "version.h".
548         
549         * ascii.c: (ascii_open_global) Make static.
550         (ascii_close_page) Ditto.
551         (ascii_font_sizes) Ditto.
552         (ascii_postopen_driver) Ditto.
553         (ascii_close_driver) Ditto.
554         (ascii_option) Ditto.
555         (ascii_open_page) Ditto.
556         (ascii_line_horz) Ditto.
557         (ascii_line_vert) Ditto.
558         (ascii_line_intersection) Ditto.
559         (ascii_box) Ditto.
560         (ascii_polyline_begin) Ditto.
561         (ascii_polyline_point) Ditto.
562         (ascii_polyline_end) Ditto.
563         (ascii_text_set_font_by_name) Ditto.
564         (ascii_text_set_font_by_position) Ditto.
565         (ascii_text_set_font_by_family) Ditto.
566         (ascii_text_get_font_name) Ditto.
567         (ascii_text_get_font_family) Ditto.
568         (ascii_text_set_size) Ditto.
569         (ascii_text_get_size) Ditto.
570         (ascii_text_metrics) Ditto.
571         (ascii_text_draw) Ditto.
572         (ascii_close_page) Ditto.
573
574         * cmdline.h: New header for parse_command_line().  Used where
575         needed.
576
577         * command.c: Move prototypes for cmd_*() functions to command.h.
578
579         * command.h: Prototypes for cmd_*() functions moved here from
580         command.c.
581
582         * crosstabs.q: (gamma_int) Ditto.
583
584         * file-handle.h: Add fh_init_files() prototype.
585         
586         * getline.c: (welcome) Ditto.
587
588         * glob.h: New header for init_glob().  Used where appropriate.
589
590         * hash.c: (comparison_helper) Ditto.
591
592         * html.c: (html_open_global) Ditto.
593         (html_close_global) Ditto.
594         (html_preopen_driver) Ditto.
595         (html_postopen_driver) Ditto.
596         (html_close_driver) Ditto.
597         (html_option) Ditto.
598         (html_open_page) Ditto.
599         (html_close_page) Ditto.
600         (html_submit) Ditto.
601
602         * inpt-pgm.c: (input_program_source_read) Ditto.
603
604         * output.c: (find_defn_value) Ditto.
605         (destroy_list) Ditto.
606
607         * pfm-read.c: (read_int) Ditto.
608
609         * postscript.c: (ps_open_global) Ditto.
610         (ps_close_global) Ditto.
611         (ps_font_sizes) Ditto.
612         (ps_preopen_driver) Ditto.
613         (ps_postopen_driver) Ditto.
614         (ps_close_driver) Ditto.
615         (ps_option) Ditto.
616         (ps_open_page) Ditto.
617         (ps_close_page) Ditto.
618         (ps_line_horz) Ditto.
619         (ps_line_vert) Ditto.
620         (ps_line_intersection) Ditto.
621         (ps_box) Ditto.
622         (ps_polyline_begin) Ditto.
623         (ps_polyline_point) Ditto.
624         (ps_polyline_end) Ditto.
625         (ps_text_set_font_by_name) Ditto.
626         (ps_text_set_font_by_position) Ditto.
627         (ps_text_set_font_family) Ditto.
628         (ps_text_get_font_name) Ditto.
629         (ps_text_get_font_family) Ditto.
630         (ps_text_set_size) Ditto.
631         (ps_text_get_size) Ditto.
632         (ps_text_metrics) Ditto.
633         (ps_text_draw) Ditto.
634
635         * q2c.c: (finish_up) Ditto.
636         (xmalloc) Ditto.
637         (xstrdup) Ditto.
638         (get_buffer) Ditto.
639         (st_lower) Ditto.
640         (st_upper) Ditto.
641         (skip_ws) Ditto.
642         (get_line) Ditto.
643         (add_symbol) Ditto.
644         (find_symbol) Ditto.
645         (lex_get) Ditto.
646         (force_id) Ditto.
647         (force_string) Ditto.
648         (match_id) Ditto.
649         (match_token) Ditto.
650         (skip_token) Ditto.
651         (parse) Ditto.
652         (parse_setting) Ditto.
653         (parse_specifier) Ditto.
654         (parse_specifiers) Ditto.
655         (parse_subcommand) Ditto.
656         (dump_specifier_vars) Ditto.
657         (is_keyword) Ditto.
658         (make_identifier) Ditto.
659         (dump_declarations) Ditto.
660         (dump_specifier_init) Ditto.
661         (dump_vars_init) Ditto.
662         (make_match) Ditto.
663         (dump_specifier_parse) Ditto.
664         (dump_subcommand) Ditto.
665         (dump_parser) Ditto.
666         (dump_header) Ditto.
667         (dump_free) Ditto.
668         (recognize_directive) Ditto.
669
670         * recode.c: (string_to_long) Ditto.
671
672         * repeat.c: (find_DO_REPEAT_substitution) Ditto.
673
674         * repeat.h: New header for perform_DO_REPEAT_substitutions, used
675         where appropriate.
676
677         * sort.c: (sort_stream_read) Ditto.
678         (sort_stream_mode) Ditto.
679         
680 Fri Dec 19 23:35:04 2003  Ben Pfaff  <blp@gnu.org>
681
682         * algorithm.c (binary_search): Fix comparison.
683
684 Fri Dec 19 23:27:45 2003  Ben Pfaff  <blp@gnu.org>
685
686         * algorithm.c: (binary_search) Fix assertion.
687
688 Fri Dec 19 21:31:48 2003  Ben Pfaff  <blp@gnu.org>
689
690         * sysfile-info.c: (compare_vectors_by_name) Rewrite.
691
692 Fri Dec 19 21:30:24 2003  Ben Pfaff  <blp@gnu.org>
693
694         * sort.c: (compare_case_lists) Rewrite.
695
696 Fri Dec 19 16:44:22 2003  Ben Pfaff  <blp@gnu.org>
697
698         * quicksort.c: Removed (not used).
699
700         * quicksort.h: Removed (not used).
701
702         * sort.c: Removed blp_quicksort() prototype.
703
704 Fri Dec 19 16:42:13 2003  Ben Pfaff  <blp@gnu.org>
705
706         * postscript.c: (int_2_compare) Rewrite.
707         (compare_line) Rewrite.
708
709 Fri Dec 19 16:38:35 2003  Ben Pfaff  <blp@gnu.org>
710
711         * matrix-data.c (compare_factors) Use lexicographical_compare()
712         algorithm.
713         (compare_doubles) New function.
714         
715         * algorithm.c: (lexicographical_compare) New algorithm.
716
717 Fri Dec 19 16:23:45 2003  Ben Pfaff  <blp@gnu.org>
718
719         * matrix-data.c (compare_variables_by_mxd_vartype): Rewrite.
720
721 Fri Dec 19 15:54:45 2003  Ben Pfaff  <blp@gnu.org>
722
723         * expr-prs.c: (cmp_func) Removed.
724         (parse_function) Use binary_search() algorithm.
725         (compare_functions) New function.
726         (init_func_tab) Use sort() algorithm.
727
728         * algorithm.c: (binary_search) New algorithm.
729
730 Fri Dec 19 15:50:45 2003  Ben Pfaff  <blp@gnu.org>
731
732         * descript.q: (display) Use sort() algorithm instead of qsort().
733         (compare_func) Removed.
734         (descriptives_compare_variables) New function.
735
736 Fri Dec 19 15:08:38 2003  Ben Pfaff  <blp@gnu.org>
737
738         Get rid of AVL trees.  Hashes are more appropriate for everything
739         PSPP does.
740
741         * Makefile.am: (pspp_SOURCES) Remove avl.c, avl.h.
742         
743         * avl.c: Removed.
744
745         * avl.h: Removed.
746
747 Fri Dec 19 14:33:31 2003  Ben Pfaff  <blp@gnu.org>
748
749         Much code can be clarified by using C++ STL-like algorithms.  Not
750         all uses of these algorithms are listed below, only the ones where
751         the change to an algorithm was the only change of interest.
752         
753         * Makefile.am: (pspp_SOURCES) Add algorithm.c, algorithm.h.
754         
755         * algorithm.c: New file.
756
757         * algorithm.h: New file.
758
759         * modify-vars.c: (static var forward) Removed.
760         (static var positional) Removed.
761         (compare_variables) Removed.
762         (struct ordering) New.
763         (cmd_modify_vars) Use sort() algorithm.
764         (compare_variables_given_ordering) New function.
765         (rearrange_dict) Use sort() algorithm.
766
767         * sysfile-info.c: (cmd_display) Use sort() algorithm.
768         (cmp_var_by_name) Removed.
769
770 Fri Dec 19 14:26:17 2003  Ben Pfaff  <blp@gnu.org>
771
772         Make file handles use a hash table.
773         
774         * file-handle.q: (files) Change to hash table, make static.
775         (cmd_file_handle) Use hash table functions.
776         (fh_get_handle_by_filename) Ditto.
777         (fh_get_handle_by_name) Ditto.
778         (hash_file_handle) New function.
779         (cmp_file_handle) Rewrite.
780         (fh_init_files) Use hash table functions.
781
782 Fri Dec 19 14:24:38 2003  Ben Pfaff  <blp@gnu.org>
783
784         Clean up FREQUENCIES.
785         
786         * Makefile.am: (pspp_SOURCES) Remove frequencies.g.
787
788         * frequencies.q: Remove a lot of old #if'd out code at the end.
789         (internal_cmd_frequencies) Use calc() instead of calc_no_weight()
790         or calc_weight().  Initialize percentile_values.
791         (calc) New function based on calc_weight() from frequencies.g.
792         (precalc) Use hash functions.
793         (static var comparison_func) Removed.
794         (static var comparison_param) Removed.
795         (comparison_helper) Removed.
796         (get_freq_comparator) New function.
797         (not_missing) New function.
798         (add_freq) Removed.
799         (postprocess_freq_tab) Use hash table functions, algorithms,
800         get_freq_comparator().  Rewrite.
801         (cleanup_freq_tab) Rephrase.
802         (add_percentile) Clean up spacing.
803         (hash_value_numeric) New function.
804         (hash_value_alpha) New function.
805         (compare_value_numeric_a) Rewrite.
806         (compare_value_alpha_a) Rewrite.
807         (compare_value_numeric_d) Rewrite.
808         (compare_value_alpha_d) Rewrite.
809         (compare_freq_numeric_a) Rewrite.
810         (compare_freq_alpha_a) Rewrite.
811         (compare_freq_numeric_d) Rewrite.
812         (compare_freq_alpha_d) Rewrite.
813         (calc_stats) Clean up mode, percentiles, max.
814         (dump_statistics) Clean up spacing.
815         
816         * frequencies.g: Removed.
817
818         * var.h: (struct freq_tab) Change `data' to hash table.
819
820 Fri Dec 19 14:15:46 2003  Ben Pfaff  <blp@gnu.org>
821
822         * file-handle.h: Remove declaration of global variable `files',
823         which wasn't used anywhere.
824
825         * postscript.c: (add_encoding) Remove superfluous cast.
826         (line) Ditto.
827
828         * sfm-read.c: [linux] (bswap_int32) Drop ntohl() non-portable
829         version.
830
831         * temporary.c: [0] (display_tree) Removed.
832
833 Fri Dec 19 14:13:04 2003  Ben Pfaff  <blp@gnu.org>
834
835         Implement a new random number generator based on the alleged RC4
836         algorithm.
837
838         * expr-evl.c: (expr_evaluate) Use rng_get_double_normal() instead
839         of rand_normal().
840
841         * random.c: [!HAVE_GOOD_RANDOM] (real_rand) Removed.
842         [!HAVE_GOOD_RANDOM] (real_srand) Removed.
843         (macro k) Removed.
844         (static var V[]) Removed.
845         (static var Y) Removed.
846         (static var X2) Removed.
847         (setup_randomize) Removed.
848         (shuffle) Removed.
849         (rand_uniform) Removed.
850         (rand_normal) Removed.
851         (struct rng) New structure.
852         (rng_create) New function.
853         (rng_destroy) New function.
854         (swap_byte) New static function.
855         (rng_seed) New function.
856         (rng_get_bytes) New function.
857         (rng_get_int) New function.
858         (rng_get_unsigned) New function.
859         (rng_get_double) New function.
860         (rng_get_double_normal) New function.
861         (pspp_rng) New function.
862
863         * random.h: Sync up to random.c.
864
865         * sample.c: (struct sample_trns) Make `frac' unsigned and a
866         fraction of UINT_MAX, not 65536.
867         (cmd_sample) Use rng_get_unsigned(), rng_get_double(), UINT_MAX
868         fraction.
869
870         * vfm.c: (open_active_file) No need to call setup_randomize() any
871         longer.
872
873 Fri Dec 19 12:05:56 2003  Ben Pfaff  <blp@gnu.org>
874
875         Change dictionary name indexes to use hash tables instead of AVL
876         trees.
877
878         * crosstabs.q: (free_var_dict) Use hash tables.
879         (crs_custom_tables) Ditto.
880         (calc_general) Ditto.
881         (compare_table_entry) Rewrite.
882         (enum_var_values) Reorder parameters.  All references updated.
883         Rewrite.
884
885         * get.c: (rename_variable) Use hash tables.
886         (mtf_merge_dictionary) Ditto.
887
888         * glob.c: (init_glob) Use hash tables.
889         (cmp_variable) Removed.
890
891         * means.q: (mns_custom_tables) Use hash tables.
892
893         * modify-vars.c: (rearrange_dict) Use hash tables.
894
895         * rename-vars.c: (cmd_rename_variables) Use hash tables.
896
897         * sfm-read.c: (read_header) Use hash tables.
898         (read_variables) Ditto.
899
900         * temporary.c: (new_dictionary) Use hash tables.
901         (save_dictionary) Ditto.
902         (restore_dictionary) Ditto.
903
904         * var.h: (struct dictionary) Change AVL tree `var_by_name' into
905         hash table `name_tab'.
906
907         * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed.
908         [DEBUGGING] (dump_var_tree) Removed.
909         (find_variable) Use hash tables.
910         (find_dict_variable) Ditto.
911         (common_init_stuff) Ditto.
912         (rename_variable) Ditto.
913         (clear_variable) Ditto.  Also, remove debug code.
914         (dup_variable) Use hash tables.
915
916         * vars-prs.c: (fill_all_vars) Use hash tables.
917         (is_dict_varname) Ditto.
918         (parse_dict_variable) Ditto.
919         
920 Fri Dec 19 11:46:23 2003  Ben Pfaff  <blp@gnu.org>
921
922         Change value labels to use hash tables instead of AVL trees, and
923         change value labels into an ADT.
924
925         * Makefile.am: (pspp_SOURCES) Add value-labels.c, value-labels.h.
926         
927         * value-labels.c: New file.
928
929         * value-labels.h: New file.
930
931         * apply-dict.c: (cmd_apply_dictionary) Use value label ADT.
932         Get rid of a stupid use of goto.
933
934         * autorecode.c: (compare_alpha_value) Rewrite.
935         (hash_alpha_value) Ditto.
936         (compare_numeric_value) Rewrite.
937         (hash_numeric_value) Ditto.
938
939         * frequencies.q: (dump_full) Use value label ADT.
940
941         * pfm-read.c: (read_value_label) Use value label ADT.
942
943         * pfm-write.c: (write_value_labels) Use value label ADT.
944
945         * sfm-read.c: (read_variables) Use value label ADT.
946         (read_value_labels) Rewrite.
947
948         * sfm-write.c: (write_value_labels) Rewrite.
949
950         * sysfile-info.c: (cmd_sysfile_info) Use value label ADT.
951         (display_variables) Ditto.
952         (describe_variable) Ditto.
953
954         * t-test.q: (print_t_groups) Use value label ADT.
955
956         * temporary.c: (copy_variable) Use value label ADT.
957         (free_dictionary) Ditto.
958
959         * val-labs.c: (verify_val_labs) Use value label ADT.
960         (get_label) Ditto.
961         (debug_print) Ditto.
962         (val_lab_cmp) Removed.
963         (inc_ref_count) Removed.
964         (copy_value_labels) Removed.
965
966         * var.h: (struct value_label) Removed.
967         (struct variable) Change AVL tree `val_lab' into hash table
968         `val_labs'.
969
970         * vars-atr.c: (init_variable) Use value label ADT.
971         (clear_variable) Ditto.
972         (free_value_label) Removed.
973         (free_val_lab) Removed.
974         (get_val_lab) Removed.
975         (compare_variables) New function.
976         (hash_variable) New function.
977
978         * vfm.c: (dump_splits) Use value label ADT.
979
980 Fri Dec 19 11:18:11 2003  Ben Pfaff  <blp@gnu.org>
981
982         Add to the hash table interface.
983
984         * hash.c: (hsh_hash_bytes) Add assertion.
985         (hsh_hash_string) Ditto.
986         (hsh_clear) Ditto.
987         (hsh_rehash) Ditto.
988         (hsh_probe) Ditto.
989         (hsh_create) Ditto.  Also make minimum `size'.
990         (hsh_destroy) Rephrase.
991         (sort_nulls_last) Removed.
992         (not_null) New function.
993         (hsh_data) Ditto.
994         (comparison_helper) Ditto.
995         (hsh_sort) Rewritten.
996         (hsh_data_copy) New function.
997         (hsh_sort_copy) Ditto.
998         (hsh_insert) Ditto.
999         (hsh_replace) Ditto.
1000         (hsh_hash_double) Ditto.
1001         (hsh_delete) Fix stupid bug.
1002         
1003 Thu Dec 18 12:27:03 WAST 2003 John Darrington <john@darrington.wattle.id.au>
1004         * added a calculation of the mode to FREQUENCIES
1005
1006 Wed Dec 17 12:53:01 WAST 2003 John Darrington <john@darrington.wattle.id.au>
1007
1008         * moved (un)defs of DEBUGGING to config.h
1009
1010 Mon Dec 15 21:35:59 2003  Ben Pfaff  <blp@gnu.org>
1011
1012         * groff-font.c: (add_kern) Fix indentation.
1013         (add_kern) Use & instead of % to take power-of-2 modulus.
1014         (font_get_kern_adjust) Likewise.
1015
1016 Fri Dec 12 23:54:37 2003  Ben Pfaff  <blp@gnu.org>
1017
1018         * autorecode.c: (recode) Replace stupid use of memcpy() by
1019         memberwise copy.
1020         (hash_alpha_value) Use hsh_hash_bytes().  Get rid of nasty casts.
1021         (hash_numeric_value) Ditto.
1022         (autorecode_proc_func) pool_strdup() was wrong here because the
1023         source string was not null-terminated.  Use new pool_strndup()
1024         instead.
1025
1026         * crosstabs.q: (enum_var_values) Remove superfluous and bizarre
1027         use of hsh_iterator_init().
1028
1029         * data-in.c: (parse_N) Initialize i->v->f.
1030
1031         * flip.c: (cmd_flip) Use memmove(), not memcpy(), to copy
1032         overlapping arrays.
1033
1034         * groff-font.c: Use power-of-2 hash table sizes, not prime.
1035         (groff_read_font) Don't call hsh_next_prime().  Don't call
1036         fclose(NULL).
1037         (static var hash) Remove `size_p', `max_used' members.
1038         (font_char_name_to_index) Don't call hsh_next_prime().  Use
1039         hsh_hash_string() instead of hashpjw(), & instead of %.
1040         (default_font) Don't call hsh_next_prime().
1041
1042         * pool.c: (pool_strndup) New function.
1043         (pool_strdup) Reimplement in terms of pool_strndup.
1044
1045         * postscript.c: (hash_font_entry) Use hsh_hash_string().  Get rid
1046         of nasty casts.
1047         (hash_ps_encoding) Use hsh_hash_string().
1048         (hash_ps_combo) Use hsh_hash_string(), hsh_hash_int().
1049         (hash_filename2font) Use hsh_hash_string().
1050
1051         * som.c: Add #include <stdlib.h>.
1052
1053         * tab.c: (tab_destroy) Don't set t->container after freeing `t'
1054         (by destroying its pool).
1055         
1056 Fri Dec 12 23:18:59 2003  Ben Pfaff  <blp@gnu.org>
1057
1058         Miscellaneous hash table code cleanup:
1059         
1060         * hash.h: (struct hsh_table) Moved into hash.c.
1061         (hsh_count) Ditto, and transformed into function.
1062         (hsh_compare_func) New typedef, used for defining otherwise-long
1063         function types here and in hash.c
1064         (hsh_hash_func) Ditto.
1065         (hsh_free_func) Ditto.
1066         
1067         * hash.c: (struct hsh_table) Renamed `n' to `used', `m' to `size',
1068         `table' to `entries'.  Removed `mp'.  All references updated.
1069         (hsh_clear) Don't shrink entries array; if the hash was this big
1070         once, it probably will be again.
1071         (hsh_rehash) Made static.
1072         (force_hsh_insert) Renamed hsh_force_insert.
1073         (force_hsh_find) Renamed hsh_force_find.
1074
1075         Made hash table sizes powers of 2, because that's fine with any
1076         reasonable hash function and because taking a power-of-2 modulus
1077         is faster than any other:
1078         
1079         (hsh_prime_tab) Removed;
1080         (hsh_next_prime) Ditto.
1081         (next_power_of_2) New function.
1082         (hsh_create) Use next_power_of_2.
1083         (hsh_rehash) Use & instead of %.
1084
1085         Cleaned up hsh_sort:
1086         
1087         (internal_comparison_fn) Removed.
1088         (sort_nulls_last) New function.
1089         (hsh_sort) Removed second parameter, switched to using the new
1090         quicksort() function from quicksort.h to avoid using nasty need
1091         for static variables with qsort().  All references updated.
1092
1093         Changed the hash functions offered, because there are better hash
1094         functions than the ones we had, and cleaned up the names to boot:
1095         
1096         * hash.c: (hashpjw_d) Removed.
1097         (hashpjw) Ditto.
1098         (hsh_hash_bytes) New function.
1099         (hsh_hash_string) New function.
1100         (hsh_hash_int) New function.
1101
1102         Improved the hash table iteration interface:
1103         
1104         * hash.h: (hsh_iterator_init) Removed.
1105         (struct hsh_iterator) Removed `init' member, change `next' to
1106         size_t.
1107
1108         * hash.c: (hsh_foreach) Removed.  All references updated to use
1109         hsh_first/hsh_next instead.
1110         (hsh_first) New function.  Notably, unlike hsh_foreach() it does
1111         not treat a null pointer as an empty hash table.
1112         (hsh_next) New function.
1113
1114         Made deletion possible, though slow:
1115
1116         * hash.c: (locate_matching_entry) New function.
1117         (hsh_find) Use locate_matching_entry().
1118         (hsh_delete) New function also using locate_matching_entry().
1119         (hsh_force_delete) New function.
1120
1121 Fri Dec 12 23:16:10 2003  Ben Pfaff  <blp@gnu.org>
1122
1123         * quicksort.c: New file implementing a sort routine with a
1124         interface better than qsort() because it passes a user-provided
1125         parameter to the sort routine.
1126
1127         * Makefile.am: Add quicksort.c, quicksort.h.
1128
1129 Fri Dec 12 13:31:58 2003  Ben Pfaff  <blp@gnu.org>
1130
1131         * All source files: Get rid of nasty special cases for Checker,
1132         which is pretty obsolete now.
1133
1134 Thu Dec 11 21:38:24 WST 2003 John Darrington <john@darrington.wattle.id.au>
1135
1136         * Fixed a bug apparent when using the FREQUENCIES command with the
1137         html driver.  The html driver was incorrectly trying to display 
1138         empty cells.
1139
1140 Sun Jan  2 21:40:13 2000  Ben Pfaff  <blp@gnu.org>
1141
1142         * Makefile.am: Reorganized.  Put locale dir in version.c instead
1143         of passing it to each compile command.  Only put local gmp libs in
1144         LD_ADD if not installed on system.  Remove `boast' target.
1145
1146         * All source files: struct and union typedefs eliminated.
1147         `sizeof type' replaced by `sizeof object' where practical.  Moved
1148         `unused' qualifiers from start to end of declarations for gcc
1149         2.7.2 compatibility.  Change `while (1)' to `for (;;)'.  Made
1150         assertions on pointers strictly compliant.  Removed _ prefixes on
1151         some function parameter names.
1152
1153         * alloc.c: New source file, containing these external linkage
1154         functions removed from common.c: xmalloc, xcalloc, xrealloc,
1155         xstrdup.
1156
1157         * arena.c: Removed.
1158         
1159         * arena.h: Removed.
1160
1161         * ascii.c: Migrated from arenas to pools.
1162         (struct ascii_driver_ext) ops[], box[], fonts[] changed from
1163         c_string to len_string.  All references changed.
1164         (ascii_option) Signature changed to comply to new output.c
1165         interface.
1166         (count_fancy_chars) Removed.
1167         (delineate) Removed support for rich text.
1168         (ascii_text_metrics) Ditto.
1169         (text_draw) Ditto.
1170         (output_shorts) Change `box', `off', `on' from c_string to
1171         len_string.  Change `remaining' from int to size_t.
1172         (ascii_close_page) Make page numbering less haphazard.
1173
1174         * autorecode.c: Migrate from arenas to pools.
1175
1176         * avl.c: Migrate from arenas to pools.  Synch from libavl 1.4.0.
1177
1178         * bitvector.h: New file containing these macros from misc.h:
1179         SET_BIT, CLEAR_BIT, SET_BIT_TO, TEST_BIT, BIT_INDEX.
1180
1181         * command.c: (struct command) cmd1, cmd2, cmd3 members changed to
1182         word[3].  ncmd removed.
1183         (var empty_string) Removed.
1184         (var cmd_table) Declaration updated.
1185         (var cmdtab) Removed.
1186         (cmp_command) Removed.
1187         (split_words) Rewritten to use strtok_r().
1188         (init_cmd_parser) Renamed cmd_init().  Rewritten.
1189         (find_command) Removed.
1190         (FILE_TYPE_okay) Rewritten.
1191         (cmd_parse) Rewritten.  Semantics of the return value of command
1192         handlers has changed: they must now return one of the new CMD_*
1193         enumerals, rather than a magic value.  This meant that all
1194         commands had to be modified, and they were.
1195         (figure_out_command) New function.
1196
1197         * command.def: Add CORRELATIONS, PEARSON CORRELATIONS.  Add
1198         #defines for INIT, INPU, etc.
1199
1200         * command.h: New CMD_* enum series.
1201         (cur_proc) Make const char *, not char *.
1202         (cmd_init) Prototype.
1203         (cmd_parse) Ditto.
1204
1205         * common.c: Removed.
1206
1207         * common.h: Removed.
1208
1209         * correlations.q: New file.
1210
1211         * crosstabs.q: Migrate from arenas to pools.  Migrate to new-style
1212         q2c.
1213         (custom_tables) Renamed crs_custom_tables().
1214         (custom_variables) Renamed crs_custom_variables().
1215         (calc_integer) Add in some `const' qualifiers.
1216         (table_value_missing) Change from a_string to len_string.
1217         (float_M_suffix) Change from a_string to len_string.
1218
1219         * data-in.c: Rewritten.  All references to
1220         parse_string_as_format() changed to data_in().
1221
1222         * data-in.h: New file.
1223
1224         * data-list.c: Change DLS_* from #define's to enums.  Move from
1225         rpd_msg() to tmsg().
1226         (RPD_ERR) New #define.
1227         (do_reading) Change dfm_push_cust() to dfm_push(), pop_cust() to
1228         dfm_pop().
1229         (read_from_data_list_fixed) Change from old
1230         parse_string_as_format() to new data_in().
1231         (read_from_data_list_free) Ditto.
1232         (read_from_data_list_list) Ditto.
1233         (cmd_repeating_data) Modify approach to checking for end of
1234         command.
1235         (rpd_msg) Removed.
1236         (rpd_parse_record) Change from old parse_string_as_format() to new
1237         data_in().  Change from old convert_format_to_string() to new
1238         data_out().
1239         (read_one_set_of_repetitions) Change dfm_push_cust() to
1240         dfm_push(), pop_cust() to dfm_pop().
1241
1242         * data-out.c: Rewritten.  All references to
1243         convert_format_to_string() changed to data_out().
1244
1245         * descript.q: Migrate to new q2c.
1246         (cmd_descriptives) Removed.
1247         (internal_cmd_descriptives) Renamed cmd_descriptives ().
1248         (custom_variables) Renamed dsc_custom_variables().
1249
1250         * dfm.c: (struct dfm_fhuser_ext) `ln' removed.  All references
1251         removed.
1252         (open_file_r) Initialize h->where.line_number.  Migrate to new
1253         struct string.
1254         (open_file_w) Initialize h->where.line_number.
1255         (read_record) Change from ext->ln to h->where.line_number.
1256         Migrate to struct string.
1257         (dfm_put_record) Rephrased.
1258         (dfm_push_cust) Renamed dfm_push(), rewritten.
1259         (dfm_pop) New function.
1260
1261         * error.c: All references updated.
1262         (glob var error_count) Renamed err_err_count.
1263         (glob var warning_count) Renamed err_warning_count.
1264         (glob var error_already_flagged) Renamed err_already_flagged.
1265         (glob var verbosity) Renamed err_verbosity.
1266         (glob var cust_fn) Removed.
1267         (glob var cust_ln) Removed.
1268         (static var file_loc) New.
1269         (static var nfile_loc) New.
1270         (static var mfile_loc) New.
1271         (tmsg) New function.
1272         (push_cust) Removed.
1273         (pop_cust) Removed.
1274         (msg) Rewritten.
1275         (static var terminating) Removed.
1276         (failure) Renamed err_failure().
1277         (hcf) Renamed err_hcf().
1278         (err_push_file_locator) New function.
1279         (err_pop_file_locator) New function.
1280         (err_location) New function.
1281         (check_error_count) Renamed err_check_count().
1282         (vmsg) Renamed err_vmsg().  Interface changed.
1283         (verbose_msg) Removed.
1284         (err_cond_fail) New function.
1285         (error_break) Renamed err_break().
1286
1287         * error.h: All references updated.
1288         (enum MSG_CLASS_COUNT) Renamed ERR_CLASS_COUNT.
1289         (enum ERR_CLASS_MASK, ERR_VERBOSITY_SHIFT, ERR_VERBOSITY_MASK)
1290         New.
1291         (struct file_locator) New.
1292         (struct error) New.
1293         (macro verbose_msg) Removed.
1294         (macro cond_fail) Removed.
1295
1296         * expr-opt.c: (evaluate_tree) sizeof(char) == 1.
1297
1298         * expr-prs.c: Reorganized.  All references updated.
1299         (exprtypename) Renamed expr_type_name().
1300         (typename) Renamed type_name().
1301         (free_expression) Renamed expr_free().
1302         (parse_expression) Renamed expr_parse().  Uses new type_check()
1303         function.
1304         (init_functab) Renamed init_func_tab().
1305         (type_check) New function.
1306         (parse_or) Rewritten to use new allocate_nonterminal() and
1307         append_nonterminal_arg() functions.
1308         (parse_and) Ditto.
1309         (parse_not) Ditto.
1310         (parse_rel) Ditto.  Also simplified logic.
1311         (parse_add) Ditto.
1312         (parse_mul) Ditto.
1313         (parse_neg) Ditto.
1314         (parse_exp) Ditto.
1315         (SYSMIS_func) Ditto.
1316         (VALUE_func) Rephrased.
1317         (CONCAT_func) Fix memory leak by replacing free by free_node on
1318         lossage.
1319         (generic_str_func) Ditto.
1320         (parse_function) Ditto.  Also rephrasings.  Uses bsearch() to find
1321         function.
1322         (allocate_nonterminal) New function.
1323         (append_nonterminal_arg) New function.
1324         (static func_tab[]) Now at file level.
1325         (cmp_func) Moved.
1326         (init_func_tab) Moved.  Now just uses qsort() to sort func_tab[].
1327
1328         * expr.h: (enum series OP_*) Moved to exprP.h.
1329         (OP_* defines) Ditto.
1330         (struct op_desc) Ditto.
1331         (global ops[]) Ditto.
1332         (struct num_con_node) Ditto.
1333         (struct str_con_node) Ditto.
1334         (struct var_node) Ditto.
1335         (struct lag_node) Ditto.
1336         (struct casenum_node) Ditto.
1337         (struct nonterm_node) Ditto.
1338         (union any_node) Members renamed.
1339         (struct sys_node) Removed.
1340         (struct val_node) Removed.
1341         (operator typedef) Removed.
1342         (typedef exprtype) Removed.
1343         (enum series EX_*) Moved to exprP.h.
1344         (struct expression) Ditto.  Also renamed a lot of the members.
1345         (PXP_* defines) Changed to enums.
1346         (free_node prototype) Moved to exprP.h.
1347
1348         * file-handle.h: (struct file_handle) New member `where'.
1349
1350         * file-handle.q: Migrated to new q2c format.
1351         (prepend_current_directory) Removed (dead code).
1352         (cmd_file_handle) Incorporated all of internal_cmd_file_handle().
1353         (fh_get_handle_by_filename) Removed dead code.
1354         Set new `where' member.
1355
1356         * file-type.c: (file_type_source_read) References to
1357         parse_string_as_format() changed to data_in().
1358         dfm_push_cust()/pop_cust() changed to dfm_push()/dfm_pop().
1359
1360         * filename.c: All references updated.
1361         (init_filename) Renamed fn_init().
1362         (expand_line) Removed.
1363         (macro EXPAND_LINE) Removed.
1364         (interp_vars) Renamed fn_interp_vars().  Now uses st_*() instead
1365         of custom functions.
1366         (gnu_getcwd) Renamed fn_get_cwd(), rewritten.
1367         (tilde_expand) Renamed fn_tilde_expand(), uses ds_*().
1368         (normalize_filename) Renamed fn_normalize().
1369         (search_path) Renamed fn_search_path(), rewritten.
1370         (prepend_dir) Renamed fn_prepend_dir().
1371         (blp_getenv) Renamed fn_getenv().
1372         (blp_dirname) Renamed fn_dirname().
1373         (fn_basename) New function, not used.
1374         (absolute_filename_p) Renamed fn_absolute_p().
1375         (is_special_filename) Renamed fn_special_p().
1376         (file_exists) Renamed fn_exists_p().
1377         (readlink_malloc) Renamed fn_readlink().
1378         (getenv_default) Renamed fn_getenv_default().
1379         (open_file) Renamed fn_open().
1380         (close_file) Renamed fn_close().
1381         (open_file_ext) Renamed fn_open_ext().
1382         (close_file_ext) Renamed fn_close_ext().
1383
1384         * font.h: Migrate from arenas to pools.
1385
1386         * format.c: (parse_format_specifier_name) Deal with ds_* strings.
1387
1388         * frequencies.g: Migrate from arenas to pools.
1389
1390         * frequencies.q: Migrate to new q2c version.  Migrate from arenas
1391         to pools.
1392
1393         * getline.c: All references updated.
1394         (global getl_buf) Changed from char * to struct string.
1395         (static getl_include_path) Ditto.
1396         (global getl_buf_len) Removed.
1397         (global getl_buf_size) Removed.
1398         (getl_include_path) Deal with new getl_buf, getl_include_path.
1399         (getl_uninitialize) New function.
1400         (getl_get_current_directory) Rewritten.
1401         (getl_clear_include_path) Rewritten.
1402         (getl_add_include_dir) Rewritten.
1403         (getl_add_file) Assertion fixed.
1404         (getl_add_virtual_file) Change initial value of `remaining_loops'
1405         from 2 to 1.
1406         (welcome) Rewritten.
1407         (handle_line_buffer) Make static.  Change logic to make
1408         getl_add_virtual_file() change sensible.  Use ds_*() strings.
1409         (getl_read_line) Use ds_*() strings.  Implement SET ECHO.
1410         (getl_close_file) Moved.
1411         (getl_location) New function.
1412
1413         * getline.h: All references updated.
1414         (macro curln) Removed.
1415         (macro curfn) Removed.
1416         (macro am_interactive) Renamed getl_am_interactive.
1417         (macro am_reading_script) Renamed getl_reading_script.
1418
1419         * glob.c: (global fmt_parse_ignore_error) Removed.
1420         (init_glob) Use locale_dir not LOCALEDIR.  Use feholdexcept() on
1421         systems that support it (C99).  Turn off SET ECHO by default.  No
1422         necessary julcal initialization anymore.
1423
1424         * groff-font.c: Migrate from arenas to pools.
1425         (groff_read_font) Use err_push_file_locator().
1426         (groff_read_DESC) Ditto.
1427         (font_msg) Use tmsg().
1428
1429         * hash.c: (hsh_sort) Fix debug code.
1430         [GLOBAL_DEBUGGING] Include stdio.h.
1431
1432         * hash.h: (macro force_hsh_insert) Rephrase.
1433
1434         * heap.c: Rewritten.
1435         
1436         * heap.h: Rewritten.
1437
1438         * html.c: (html_option) Change from outp_value to struct string.
1439         (postopen) Change from curfn to getl_location().
1440         (escape_string) Remove rich-text code.  Signature changed.
1441         (output_tab_table) Switch from a_string to struct len_string.
1442         Remove rich text support.
1443
1444         * lexer.c: All references updated.  Largely rewritten.  Major
1445         changes listed below.  Removed tagged quote support.  Adapted to
1446         struct string tokstr.
1447         (global tokstr) Changed to struct string.
1448         (global tokstr_size) Removed.
1449         (global tokstr_len) Removed.
1450         (global tokid) New.
1451         (global tokint) Removed.
1452         (global toklongstr) Removed.
1453         (C* defines) Removed.
1454         (static tbl[]) Removed.
1455         (static id[]) Removed.
1456         (static une[]) Removed.
1457         (discard_line) Renamed lex_discard_line().
1458         (get_entire_line) Renamed lex_entire_line().
1459         (get_rest_of_line) Renamed lex_rest_of_line().
1460         (get_dotted_rest_of_line) Merged into lex_rest_of_line().
1461         (make_hexit) Removed.
1462         (syntax_error) Renamed lex_error().  Return value removed.
1463         (get_token_representation) Renamed lex_token_representation().
1464         (putback) Renamed lex_put_back().
1465         (putfwd) Renamed lex_put_forward().
1466         (convert_negative_to_dash) Renamed lex_negative_to_dash().
1467         (set_prog) Renamed lex_set_prog().
1468         (init_lex) Renamed lex_init().
1469         (reset_eof) Renamed lex_reset_eof().
1470         (lookahead) Renamed lex_look_ahead().
1471         (check_id) Rewritten.
1472         (yylex) Renamed lex_get(), rewritten.
1473         (lex_end_of_command) New function.  Many commands were rephrased
1474         using this.
1475         (lex_integer_p) New function.  Replaces compare of tokint against
1476         NOT_LONG.
1477         (lex_integer) New function.  Replaces tokint.
1478         (match_tok) Renamed lex_match().
1479         (match_id) Renamed lex_match_id().
1480         (match_int) Renamed lex_match_int().
1481         (force_match_id) Renamed lex_force_match_id(), added return value.
1482         (force_match) Renamed lex_force_match(), added return value.
1483         (force_string) Renamed lex_force_string(), added return value.
1484         (force_int) Renamed lex_force_int(), added return value.
1485         (lex_id_match_len) New function.
1486         (id_match) Renamed lex_id_match(), rewritten.
1487         (get_line) Renamed lex_get_line().
1488         (preprocess_line) Renamed lex_preprocess_line().
1489         (tokname) Renamed lex_token_name().
1490         (bin_value_func) Removed.
1491         (oct_value_func) Removed.
1492         (hex_value_func) Removed.
1493         (unexpected_eof) New function.
1494         (convert_numeric_string_to_char_string) New function.
1495         (parse_string) Rewritten, signature changed.
1496         (add_tokstr_char) Removed.
1497         (add_tokstr_unsigned) Removed.
1498         (add_tokstr_string) Removed.
1499         (parse_tagged_quote) Removed.
1500         (skip_comment) Renamed lex_skip_comment().
1501
1502         * lexer.h: All references updated.
1503         (macro is_id1) Renamed CHAR_IS_ID1.
1504         (macro is_idn) Renamed CHAR_IS_IDN.
1505         (token names ID, NUM, STRING, STOP, ... WITH, EXP) Renamed with
1506         prefix T_: T_ID, T_NUM, T_STRING, T_STOP, ... T_WITH, T_EXP.
1507         (macro get_token) Removed.
1508         (macro id_match) Removed.
1509         (macro force_match_id) Removed.
1510         (macro force_match) Removed.
1511         (macro force_string) Removed.
1512         (macro force_int) Removed.
1513         (macro force_num) Removed.
1514         (macro force_id) Removed.
1515
1516         * lexerP.h: Removed.
1517
1518         * list.q: Migrated to new q2c format.
1519         (write_line) Deal with struct len_string.
1520         (write_varname) Ditto.
1521         (write_fallback_headers) Ditto.
1522
1523         * magic.c: New file, incorporating the following global variables
1524         previously in other files: endian, second_lowest_value.  And both
1525         of those are conditional on #define's.
1526
1527         * magic.h: New file, incorporating the following global variable
1528         declarations: endian, second_lowest_value, and the following macro
1529         declarations: NOT_DOUBLE, NOT_LONG, NOT_INT.
1530
1531         * main.c: Added declarations of pgmname, finished, curdate,
1532         start_interactive.
1533         (main) Call new parse_script() function.
1534         (parse_script) New function.
1535         (execute_command) New function.
1536         (dump_token) Removed.
1537         (handle_error) New function.
1538
1539         * matrix.c: New file.
1540
1541         * matrix.h: New file.
1542
1543         * matrix-data.c: Migrated from arenas to pools.
1544         (mget_token) Change from parse_string_as_format() to data_in().
1545
1546         * means.q: Migrate to new q2c.
1547         (custom_tables) Renamed mns_custom_tables().
1548         (custom_crossbreak) Renamed mns_custom_crossbreak().
1549         (custom_variables) Renamed mns_custom_variables().
1550
1551         * mis-val.c: (static var width) Changed from `int' to `size_t'.
1552         (parse_varnames) Prototype.
1553         (parse_numeric) Rephrasings.
1554         (parse_alpha) Adapt to new struct string tokstr.
1555
1556         * misc.c: (intlog10) Rewritten.
1557         (spacing) Removed.
1558         (ansi_rand) Renamed real_rand(), moved into random.c.
1559         (ansi_srand) Renamed real_srand(), moved into random.c.
1560         (setup_randomize) Moved to random.c.
1561         (rand_uniform) Ditto.
1562         (rand_normal) Ditto.
1563         (rand_simple) Ditto.
1564         (get_config_line) Removed.
1565         (reverse) Removed (dead code).
1566
1567         * misc.h: (macro SET_BIT) Moved to bitvector.h.
1568         (macro CLEAR_BIT) Ditto.
1569         (macro TEST_BIT) Ditto.
1570         (macro SET_BIT_TO) Ditto.
1571         (macro BIT_INDEX) Ditto.
1572
1573         * output.c: (outp_read_devices) Move to err_push_file_locator()
1574         from push_cust().  Use struct string.
1575         (expand_op_tokstr) Removed.
1576         (static var op_tokstr) Changed to struct string.
1577         (static var op_tokstr_size) Removed.
1578         (tokener) Rephrasings.  Use struct string.
1579         (parse_options) Use struct string.
1580         (destroy_driver) Fix assertion.
1581         (outp_get_paper_size) Move to err_push_file_locator().
1582         [0] Removed dead code.
1583         (outp_string_width) Move to len_string.
1584
1585         * output.h: Comment fixes.
1586         (TAG_* enum series) Removed.
1587         (struct outp_value) Removed.
1588         (enum OUTP_T_FANCY) Removed.
1589         (struct outp_text) `s' changed from a_string to len_string.
1590         (struct outp_class) `option' change arg 3 from outp_value to
1591         struct string.
1592
1593         * pfm-read.c: (corrupt_msg) Rewritten.
1594
1595         * pfm-write.c: (bufwrite) Fix assertion.
1596
1597         * pool.c: New file, reference version.
1598
1599         * pool.h: New file, reference version.
1600
1601         * postscript.c: (ps_font_sizes) Fix assertion.
1602         (ps_option) Change arg 3 from outp_value to struct string.
1603         Adapt to struct string.
1604         (macro output_line) Removed.
1605         (macro add_string) Removed.
1606         (output_encodings) Adapted to struct string.  Moved to
1607         err_push_file_locator().
1608         (find_encoding_file) Fix assertion.
1609         (read_ps_encodings) Move to err_push_file_locator().
1610         (postopen) Use getl_location() instead of curfn.
1611         (out_text_plain) Move to len_string.
1612         (text) Ditto.  Remove rich text support.
1613
1614         * print.c: (cmd_print) Remove now-unneeded resource cleanup code.
1615         (cmd_print_eject) Ditto.
1616         (cmd_write) Ditto.
1617         (internal_cmd_print) Now cleans up after itself.  Uses
1618         fh_parse_file_handle() now.
1619         (cmd_print_space) Use PXP_NUMERIC to type-check.
1620
1621         * q2c.c: Overhauled.  Removed _("") i18n support.  All references
1622         updated.  All output functions updated to handle structures rather
1623         than local or static variables.  Adapt to new PSPP lex_*()
1624         functions.
1625         (macro _) Removed.
1626         (macro N_) Removed.
1627         (macro MAX_N_SBC) Removed.
1628         (global bare) Removed.
1629         (enum STRING) Renamed T_STRING.
1630         (enum ID) Renamed T_ID.
1631         (get_buffer) Buffer size increased.
1632         (strlower) Renamed st_lower(), rephrased.
1633         (strupper) Renamed st_upper(), rephrased.
1634         (skip_ws) New function.
1635         (get_line) Don't special-case any types of lines (like those
1636         beginning with ! or $, for instance).
1637         (get_token) Renamed lex_get().  Rephrased.
1638         (static var `prefix') New.
1639         (parse) New function.
1640         (parse_setting) Minor rephrasing.
1641         (dump_specifier_vars) Ditto.
1642         (make_identifier) Put null terminator on identifier, duh.
1643         (dump_vars) Renamed dump_declarations().  Never indent.  Never
1644         static.  Output changed entirely.
1645         (dump_specifier_init) Rephrase.
1646         (dump_vars_init) No index variable needed.  Other modifications.
1647         (dump_parser) Don't parse command name.  Do dump functions instead
1648         of just code fragments.
1649         (dump_free) Dump function instead of code fragment.
1650         (recognize_directive) New function.
1651         (main) Use recognize_directive().  Don't rely on magic $ line
1652         beginning: instead, parse comments.  Update list of headers.
1653
1654         * random.c: New file, containing the following functions:
1655         real_rand(), real_srand(), setup_randomize, shuffle, rand_uniform,
1656         rand_normal, rand_simple.
1657
1658         * random.h: New file.
1659
1660         * recode.c: (cmd_recode) Merge internal_cmd_recode() into this
1661         function.  `max_src_width', `max_dst_width' changed to size_t.
1662         (internal_cmd_recode) Removed.
1663         (parse_dest_spec) Merge similar cases.
1664         (parse_src_spec) Add assertion.
1665
1666         * repeat.c: (recognize_keyword) New function.
1667         (internal_cmd_do_repeat) Parse and handle PRINT keyword on END
1668         REPEAT.  Improve recognition of END REPEAT (use
1669         recognize_keyword()).  Move from curfn to getl_location().  Use
1670         struct string.
1671                 
1672         (perform_DO_REPEAT_substitutions) Adapt to struct string.
1673
1674         * set.q: Adapt to new q2c.
1675         (cmd_set) Range-check some values better.
1676         (custom_blanks) Renamed stc_custom_blanks().
1677         (custom_length) Renamed stc_custom_length().
1678         (custom_results) Renamed stc_custom_results().
1679         (custom_seed) Renamed stc_custom_seed().
1680         (custom_width) Renamed stc_custom_width().
1681         (custom_format) Renamed stc_custom_format().
1682         (custom_journal) Renamed stc_custom_journal().
1683         (custom_color) Renamed stc_custom_color().
1684         (custom_listing) Renamed stc_custom_listing().
1685         (custom_disk) Renamed stc_custom_disk().
1686         (custom_log) Renamed stc_custom_log().
1687         (custom_rcolor) Renamed stc_custom_rcolor().
1688         (custom_viewlength) Renamed stc_custom_viewlength().
1689         (custom_workdev) Renamed stc_custom_workdev().
1690
1691         * settings.h: Not necessary to include format.h any longer.
1692
1693         * sfm-read.h: (macro bswap_int32) Moved here from sfmP.h.
1694         (corrupt_msg) Rewritten.
1695
1696         * sort.c: Adapt to rewritten heap ADT.
1697
1698         * str.c: (aa_strcpy) Removed.
1699         (ab_strcpy) Removed.
1700         (ac_strcpy) Removed.
1701         (ba_strcpy) Removed.
1702         (bb_strcpy) Removed.
1703         (ca_strcpy) Removed.
1704         (aa_strdup) Removed.
1705         (aa_strdupcpy) Removed.
1706         (ba_strdup) Removed.
1707         (sa_strdup) Removed.
1708         (memrev) Renamed mm_reverse().
1709         (memrmem) Renamed mm_find_reverse().
1710         (cmp_str) Renamed st_compare_pad().
1711         (strmaxcpy) Removed.
1712         (strbarepadcpy) Renamed st_bare_pad_copy(), signature changed.
1713         (strbarepadlencpy) Renamed st_bare_pad_len_copy(), signature
1714         changed.
1715         (strpadcpy) Renamed st_pad_copy(), signature changed.
1716         (blpstrset) Removed.
1717         (ds_create) New function.
1718         (ds_init) New function.
1719         (ds_replace) New function.
1720         (ds_destroy) New function.
1721         (ds_clear) New function.
1722         (ds_extend) New function.
1723         (ds_shrink) New function.
1724         (ds_truncate) New function.
1725         (ds_length) New function.
1726         (ds_size) New function.
1727         (ds_value) New function.
1728         (ds_end) New function.
1729         (ds_concat) New function.
1730         (ds_concat_buffer) New function.
1731         (ds_printf) New function.
1732         (ds_putchar) New function.
1733         (ds_getline) New function.
1734         (ds_get_config_line) New function derived from the old
1735         misc.c:get_config_line().
1736         (ls_create) New function.
1737         (ls_create_buffer) New function.
1738         (ls_init) New function.
1739         (ls_shallow_copy) New function.
1740         (ls_destroy) New function.
1741         (ls_null) New function.
1742         (ls_null_p) New function.
1743         (ls_empty_p) New function.
1744         (ls_length) New function.
1745         (ls_value) New function.
1746         (ls_end) New function.
1747
1748         * str.h: Reformatted.
1749         (struct a_string) Removed.
1750         (struct b_string) Removed.
1751         (struct c_string) Removed.
1752         (struct len_string) New.
1753         (struct string) New.
1754         (macro as_streq) Removed.
1755         (macro bs_streq) Removed.
1756         (macro cs_streq) Removed.
1757         (macro sa_streq) Removed.
1758         (macro sb_streq) Removed.
1759         [__GNUC__] (inline function ds_putchar) New function.
1760         [__GNUC__] (inline function ds_length) New function.
1761         [__GNUC__] (inline function ds_value) New function.
1762         [__GNUC__] (inline function ds_end) New function.
1763
1764         * sysfile-info.c: (cmd_sysfile_info) Rephrased.
1765         (display_vectors) Fix missing i18n.
1766
1767         * t-test.q: Migrate to new q2c.
1768
1769         * tab.c: Migrate from arenas to pools.
1770         (tab_create) Use struct len_string.
1771         (tab_realloc) Ditto.
1772         (text_format) Ditto.
1773         (tab_joint_text) Ditto.
1774         (tab_natural_width) Remove rich text support.
1775         (tab_natural_height) Ditto.
1776         (tab_output_text) Handle TAT_FIX.
1777         (tab_raw) Change arg from a_string to len_string.
1778         (tabi_driver) Fix assertion.  Use struct len_string.
1779         (render_strip) Use struct len_string.  Remove rich text support.
1780         Add `const' qualifiers.
1781
1782         * tab.h: (enum TAB_RICH) Remove.
1783         (enums TAB_COL_NONE, TAB_COL_DONE) New.  Where appropriate,
1784         SOM_COL_* updated to read TAB_COL_*.
1785         (struct tab_table) Change arena to pool.  Change a_string to
1786         len_string.
1787
1788         * temporary.c: (restore_dictionary) Rewrite Checker code.
1789
1790         * var.h: (macros MAX_SHORT_STRING, MIN_LONG_STRING, SYSMIS,
1791         LOWEST, HIGHEST) Moved here from common.h.
1792         (typedef any_trns) Removed.  All references changed to `struct
1793         trns_header'.
1794
1795         * vars-atr.c: (force_create_variable) Fix assertion.
1796         (force_dup_variable) Fix assertion.
1797         
1798 Thu Jun  3 18:40:42 1999  Ben Pfaff  <blp@gnu.org>
1799
1800         Using alphanumeric variables in functions under AGGREGATE
1801         segfaulted.  Fixed.  Thanks to Dr. Dirk Melcher
1802         <BZN-mdksh@t-online.de> for reporting this bug.
1803         
1804         * aggregate.c: (parse_aggregate_functions) When setting the
1805         FSTRING bit, also allocate memory for the `string' member of
1806         agr_next.
1807         (free_aggregate_functions) Free iter->string.  Don't use the
1808         non-function bits when indexing the array of functions.
1809         [DEBUGGING] (debug_print) Don't use the non-function bits when
1810         indexing the array of functions.        
1811
1812 Sun May 30 00:00:54 1999  Ben Pfaff  <blp@gnu.org>
1813
1814         Under certain circumstances, the final case would be omitted from
1815         the results of an AGGREGATE operation.  Fixed.  Thanks to Dr. Dirk
1816         Melcher <BZN-mdksh@t-online.de> for reporting this bug.
1817         
1818         * aggregate.c (agr_00x_end_func): Increment number of cases in
1819         sink before writing case.  For streams that keep track of how many
1820         cases there are based on this value, this means that the last case
1821         will be read in on the next stream read.
1822
1823 Sat May 29 22:03:31 1999  Ben Pfaff  <blp@gnu.org>
1824
1825         Undefined behavior was invoked by referencing a freed pointer.
1826         
1827         * vfm.c (memory_stream_write): Free pointer *after* checking for
1828         non-null status.
1829
1830 Sat May 29 22:02:22 1999  Ben Pfaff  <blp@gnu.org>
1831
1832         A wrong record size was displayed when paging the active file to
1833         disk.
1834         
1835         * vfm.c: (memory_stream_write) Fix off-by-one error.
1836
1837 Sat May 29 21:50:26 1999  Ben Pfaff  <blp@gnu.org>
1838
1839         Not having enough temporary space for sorting caused a core dump.
1840         Fixed.
1841         
1842         * sort.c: (allocate_cases) Initialize i.
1843
1844 Sat May 29 21:40:54 1999  Ben Pfaff  <blp@gnu.org>
1845
1846         Syntax errors in function descriptions on AGGREGATE caused core
1847         dumps.  Fixed.
1848         
1849         * aggregate.c (cmd_aggregate): Don't free agr_dict after calling
1850         free_aggregate_functions(), since that function already frees
1851         agr_dict.
1852         
1853 Sat May 29 21:06:10 1999  Ben Pfaff  <blp@gnu.org>
1854
1855         A null pointer was dereferenced, causing a core dump, when
1856         PERCENTILES was specified on FREQUENCIES.  This fixes the problem,
1857         but PSPP still doesn't calculate percentiles.  Thanks to Regnor
1858         Jernsletten <rjernsle@eunet.no> for reporting this problem.
1859         
1860         * arena.c: (arena_malloc) If the arena hasn't been initialized
1861         already, initialize it.
1862
1863 Sat May 29 20:47:29 1999  Ben Pfaff  <blp@gnu.org>
1864
1865         * Makefile.cygwin: New file supplied by Hankin <hankin@dunno.com>
1866         for compilation with Cygnus Windows B20.  Not used by other
1867         systems.
1868
1869 Sat May 29 20:36:04 1999  Ben Pfaff  <blp@gnu.org>
1870
1871         SORT always sorted in ascending order.  Fixed.  Thanks to Dr. Dirk
1872         Melcher <BZN-mdksh@t-online.de> for reporting this bug.
1873
1874         * sort.c: (compare_case_lists) Reverse sense of comparison if
1875         sorting in descending order.
1876         (compare_record) Ditto.
1877
1878 Tue Mar  9 13:18:54 1999  Ben Pfaff  <blp@gnu.org>
1879
1880         SPLIT FILE with a string variable caused a core dump.  Fixed.
1881
1882         * vfm.c: If the variable is a string then make a temporary value
1883         struct pointing to it.  The underlying problem is a lot bigger
1884         than this (see TODO) but this is a stopgap for the simple case at
1885         least.
1886         
1887 Tue Mar  9 13:15:53 1999  Ben Pfaff  <blp@gnu.org>
1888
1889         Nested INCLUDEs didn't work.  Fixed.
1890
1891         * getline.c: (getl_include) Set first_line to NULL in allocated
1892         structure.
1893
1894 Tue Mar  9 13:13:46 1999  Ben Pfaff  <blp@gnu.org>
1895
1896         The MATCH FILES procedure set the values of variables not present
1897         to 0.  It should have been SYSMIS.  This is now fixed.
1898
1899         * get.c: (mtf_delete_file_in_place) Replace 0.0 by SYSMIS.
1900
1901 Tue Mar  9 12:52:23 1999  Ben Pfaff  <blp@gnu.org>
1902
1903         The REMARK command was too aggressive about skipping lines.  It
1904         didn't like being the last command in a file.
1905
1906         * command.c: (cmd_remark) Call get_entire_line() instead of
1907         get_line().
1908
1909 Tue Mar  9 12:48:05 1999  Ben Pfaff  <blp@gnu.org>
1910
1911         Comment parsing wasn't consistent with the rest of the code in its
1912         idea of where one command ends and another starts.  This meant
1913         that sometimes commands would be mysteriously ignored.  Thanks to
1914         Dr. Dirk Melcher <BZN-mdksh@t-online.de> for reporting this bug.
1915          
1916         * command.c: (parse_cmd) Hand off comment parsing to new function
1917         skip_comment() in lexer.c.
1918         * lexer.c: (skip_comment) New function.
1919
1920 Wed Jan 20 20:22:07 1999  Ben Pfaff  <blp@gnu.org>
1921
1922         The TABLE subcommand on MATCH FILES worked only erratically at
1923         best.  This fixes it.  Thanks to Dr. Dirk Melcher
1924         <BZN-mdksh@t-online.de> for reporting this bug.
1925
1926         * get.c: (mtf_compare_BY_values) When comparing string values, a
1927         difference of 1 is still a difference :-)
1928         (mtf_processing) Inverted TABLE reading logic fixed.  Also don't
1929         advance TABLE files automatically when matched.  Comment fixes.
1930
1931 Tue Jan 19 22:32:31 1999  Ben Pfaff  <blp@gnu.org>
1932
1933         VARIABLE LABELS rejected a slash before the first variable
1934         specification, contradicting the documentation.  Thanks to Walter
1935         M. Gray <graywm@northernc.on.ca> for reporting this bug.
1936
1937         * var-labs.c: (cmd_variable_labels) Ignore a leading slash in
1938         command specification.
1939
1940 Tue Jan 19 22:29:54 1999  Ben Pfaff  <blp@gnu.org>
1941
1942         Because of an incorrect optimization in memory allocation,
1943         CROSSTABS sometimes segfaulted when asked to output multiple
1944         tables.  Thanks to Walter M. Gray <graywm@northernc.on.ca> for
1945         reporting this bug.
1946
1947         * crosstabs.q: (postcalc) New variables maxcols, maxcells, which
1948         are passed to output_pivot_table() for its use.
1949         (output_pivot_table) Instead of assuming the number of columns is
1950         constant, keep track with maxcols.  In general mode, use maxcells
1951         to determine whether more matrix cells need to be allocated.    
1952
1953 Tue Jan 19 22:27:46 1999  Ben Pfaff  <blp@gnu.org>
1954
1955         CROSSTABS didn't display value labels for column and row
1956         variables.  Thanks to Walter M. Gray <graywm@northernc.on.ca> for
1957         reporting this bug.
1958
1959         * crosstabs.q: (table_value_missing) If the specified value has a
1960         value label for this variable, then show it instead of the raw
1961         value.
1962         (display_dimensions) Delegate display of value_labels to
1963         table_value_missing.
1964
1965 Mon Jan 18 20:04:06 1999  Ben Pfaff  <blp@gnu.org>
1966
1967         WRITE didn't write line ends.  Fixed.  Thanks to Dr. Dirk Melcher
1968         <BZN-mdksh@t-online.de> for reporting this bug.
1969
1970         * print.c: (print_trns_proc) Write (CR/)LF if PRINT is used _or_
1971         if the file isn't declared as binary.
1972
1973 Mon Jan 18 19:56:45 1999  Ben Pfaff  <blp@gnu.org>
1974
1975         MATCH FILES corrupted memory and dumped core on some syntax
1976         errors.  Fixed.
1977
1978         * get.c: (cmd_match_files) Set file->handle to NULL before
1979         jumping to lossage.
1980         (mtf_free_file) Don't free a null dictionary.   
1981
1982 Mon Jan 18 19:27:57 1999  Ben Pfaff  <blp@gnu.org>
1983
1984         MATCH FILES should set numeric values not available to the
1985         system-missing value, not to 0.  Thanks to Dr. Dirk Melcher
1986         <BZN-mdksh@t-online.de> for reporting this bug.
1987
1988         * get.c: (mtf_processing) Set unused records to system-missing,
1989         not 0.
1990
1991 Mon Jan 18 15:06:46 1999  Ben Pfaff  <blp@gnu.org>
1992
1993         KEEP didn't work properly on the SAVE procedure.  Fixed.  Thanks
1994         to Ralf Geschke <ralf@kuerbis.org> for reporting this bug.
1995
1996         * temporary.c: (save_dictionary) Initialize var_by_name AVL tree
1997         in newly created dictionary, and add each copied variable to the
1998         tree.
1999  
2000 Mon Jan 18 15:04:48 1999  Ben Pfaff  <blp@gnu.org>
2001
2002         Memory leak fix.
2003         
2004         * get.c: (trim_dictionary) Free variable list for KEEP after
2005         finishing with it.
2006
2007 Mon Jan 18 12:57:36 1999  Ben Pfaff  <blp@gnu.org>
2008
2009         Some systems didn't like the way open_file was coded.  Thanks to
2010         Hankin <hankin@rogue.consultco.com> for pointing this out.
2011
2012         * filename.c: (open_file) Don't try to store stdin, stdout,
2013         stderr as part of an array, because that doesn't always work.
2014
2015 Mon Jan 18 12:53:27 1999  Ben Pfaff  <blp@gnu.org>
2016
2017         The SAVE procedure didn't save long string variables properly.
2018         Fixed by this patch.  Thanks to Hankin
2019         <hankin@rogue.consultco.com> for this patch.
2020         
2021         * sfm-write.c: (write_variable) Fix off-by-one error in writing
2022         out variable pad records.
2023
2024 Tue Jan  5 14:29:27 1999  Ben Pfaff  <blp@gnu.org>
2025
2026         Previously, if PRINT SPACE were given a negative argument, it
2027         would report an error, then spin in an (almost) infinite loop.
2028         This fixes that behavior.
2029
2030         * print.c: (print_space_trns_proc) After reporting a negative
2031         argument, set number of lines to print to 1.
2032
2033 Tue Jan  5 13:59:55 1999  Ben Pfaff  <blp@gnu.org>
2034
2035         SPSS 8.0 outputs some new record types in its system files, and it
2036         allows longer value labels.  Accept these system files.
2037
2038         * sfm-read.c: (sfm_read_dictionary) Ignore record type 7 subtype
2039         11 emitted by SPSS 8.0.
2040         
2041 Tue Jan  5 13:55:50 1999  Ben Pfaff  <blp@gnu.org>
2042
2043         The LIST procedure was too conservative in allocating space for
2044         buffers, which caused a bug that only showed up with very long
2045         output variables.  Thanks to Hankin <hankin@dunno.com> for this
2046         bug report.
2047
2048         * list.q: (determine_layout) Allocate 1022 bytes instead of 256.
2049
2050 Tue Jan  5 13:34:34 1999  Ben Pfaff  <blp@gnu.org>
2051
2052         Typo meant string format specifiers weren't checked properly.  I
2053         think that Hankin <hankin@dunno.com> sent me this report, but I'm
2054         willing to be corrected on this point.
2055  
2056         * format.c: (check_string_specifier) Fix obvious typo.  
2057
2058 Tue Jan  5 12:50:42 1999  Ben Pfaff  <blp@gnu.org>
2059
2060         Using $CASENUM in an expression didn't work.  Here's a fix.
2061         Thanks to Dirk Melcher <BZN-mdksh@t-online.de> for reporting this
2062         bug.
2063          
2064         * expr-evl.c: (evaluate_expression) Add OP_CASENUM case.
2065
2066         * expr-opt.c: (dump_node) OP_CASENUM is acceptable.
2067
2068 Tue Jan  5 12:47:48 1999  Ben Pfaff  <blp@gnu.org>
2069
2070         The changes in 0.2.1 to fix DATA LIST FREE parsing broke some
2071         other behavior, *sigh*.  This patch hopefully fixes that.  This
2072         time I've actually tested it.
2073
2074         Thanks to Hankin <hankin@dunno.com> for reporting this bug.
2075
2076         * data-list.c: (read_from_data_list_free,
2077         read_from_data_list_list) Call parse_string_as_format() directly
2078         without mucking around with the field width.
2079
2080 Tue Jan  5 12:31:19 1999  Ben Pfaff  <blp@gnu.org>
2081
2082         Occasionally, you may encounter a script that wants to be
2083         interpreted in interactive mode.  Make -i emulate this behavior to
2084         allow such scripts to be executed with PSPP.
2085
2086         Thanks to Hankin <hankin@dunno.com> for reporting this behavior.
2087
2088         * cmdline.c: (pre_syntax_message[]) Update -i description.
2089
2090         * lexer.c: (preprocess_line) When getl_interactive is 2 (i.e.,
2091         when -i is given on the command line) don't treat unindented lines
2092         as starting a new command.
2093
2094 Tue Jan  5 12:30:10 1999  Ben Pfaff  <blp@gnu.org>
2095
2096         In conjunction with egcs 1.1.1, Checker emits some bogus warnings,
2097         mostly caused by local initialized aggregates.  After egcs is
2098         fixed upstream these can be removed, but for now they're not a big
2099         deal.
2100         
2101         * ascii.c: (ascii_postopen_driver) Checker chokes on local
2102         initialized arrays.  Avoid this.
2103
2104         * sfm-write.c: (sfm_write_dictionary) Don't use a local
2105         initialized struct.
2106
2107 Tue Jan  5 12:07:24 1999  Ben Pfaff  <blp@gnu.org>
2108
2109         egcs 1.1.1 has some new warnings relative to gcc 2.8.1, which the
2110         following changes avoid.  Currently I compile sources with egcs
2111         1.1.1 and gcc 2.7.2.3 before sending them out.
2112
2113         * apply-dict.c: (apply_dict) Use new avl_traverser_init() macro.
2114         
2115         * ascii.c: (option_tab[]) Initialize all struct members.
2116
2117         * avl.h: (avl_traverser_init) New macro.
2118         
2119         * command.c: (DEFCMD, UNIMPL macros, cmd_table[]) Initialize all
2120         struct members.
2121
2122         * crosstabs.q: (enum_var_values) Use new hsh_iterator_init()
2123         macro.
2124
2125         * hash.c: Comment fix.
2126
2127         * hash.h: (hsh_iterator_init) New macro.
2128
2129         * html.c: (option_tab[]) Initialize all struct members.
2130
2131         * pfm-write.c: (write_value_labels) Use new avl_traverser_init()
2132         macro.
2133
2134         * postscript.c: (option_tab[]) Initialize all struct members.
2135         (output_encodings, preclose, dump_lines) Use new
2136         hsh_iterator_init() macro.
2137
2138         * sfm-write.c: (write_value_labels) Use new avl_traverser_init()
2139         macro.
2140
2141         * sysfile-info.c: (describe_variable) Use new avl_traverser_init()
2142         macro.
2143
2144 Thu Nov 19 12:32:45 1998  Ben Pfaff  <blp@gnu.org>
2145
2146         * data-in.c: Examined each of the parsing functions to make sure
2147         that they wouldn't dump core if they were passed a string of the
2148         wrong length, since now the DATA LIST FREE/LIST routines don't
2149         check for field width before passing it to the data parser.
2150         (parse_RBHEX, parse_AHEX) Reject odd length input.
2151         (parse_string_as_format) Reject input that's too short or too
2152         long.
2153
2154         * data-list.c: Before, the DATA LIST FREE/LIST routines would pad
2155         a field to its entire declared output width then pass it to the
2156         data-in parsing routines.  This contradicted the documented
2157         behavior.  This is fixed in these changes.  Thanks to Mark H. Wood
2158         <mwood@IUPUI.Edu>.  In addition, this fixes a few more details of
2159         free-format parsing that differed from SPSS.
2160         (cut_field) Commas and spaces are treated identically.  Returns
2161         the proper column instead of a fixed 1 value.
2162         (parse_field) Removed.
2163         (read_from_data_list_free, read_from_data_list_list) Call
2164         parse_string_as_format directly instead of parse_field.
2165
2166         * heap.c: (heap_delete) Stylistic fixes.
2167
2168 Sun Aug  9 11:12:13 1998  Ben Pfaff  <blp@gnu.org>
2169
2170         * loop.c: (loop_2_trns_proc) Formatting fix.
2171
2172         * sel-if.c: (cmd_filter) Set FILTER_before_TEMPORARY.
2173
2174         * var.h: (glob var FILTER_before_TEMPORARY) New global var.
2175
2176         * vfm.c: (macro FILTERED) New.
2177         (static var filter_var) New.
2178         (process_active_file_write_case) Use FILTERED.
2179         (setup_filter) Set filter_var.
2180         (close_active_file) Delete the filter if not
2181         FILTER_before_TEMPORARY.
2182         (procedure_write_case) Use FILTERED.
2183
2184 Sat Aug  8 00:20:14 1998  Ben Pfaff  <blp@gnu.org>
2185
2186         * crosstabs.q: Changed /PIVOT={ON,OFF} to /FORMAT={PIVOT,NOPIVOT}.
2187
2188         * data-in.c: (parse_day_count) Message fix.
2189         (parse_month) Style fix.
2190
2191         * data-list.c: (struct data_list_pgm) New member eof.
2192         (cmd_data_list) Init eof to 0.
2193         (do_reading) Implement the /END subcommand and read-past-eof
2194         checking.
2195
2196         * do-if.c: Include stdio.h when debugging.
2197         (cmd_else_if) Make sure the command is .-terminated.
2198
2199         * glob.c: (init_glob) Capitalize the command prompt.
2200
2201         * inpt-pgm.c: (end_case_trns_proc) Debugging message.
2202         (end_file_trns_proc) Debugging message.
2203
2204         * loop.c: (internal_cmd_loop) Make it work when there's no loop
2205         index!
2206         (loop_2_trns_proc) Enable MXLOOPS (why was this disabled?)
2207
2208         * main.c: (dump_token) Make kwtab[] const.
2209
2210         * set.q: Spelling, comment fixes.
2211
2212         * sysfile-info.c: (cmd_display) DISPLAY VECTORS not DISPLAY
2213         VECTOR.
2214
2215         * vars-prs.c: (fill_all_vars) Style fix.
2216
2217         * vfm.c: (index_to_varname) Return const.
2218
2219 Tue Aug  4 23:49:23 1998  Ben Pfaff  <blp@gnu.org>
2220
2221         * Changes in many source files for partial -ansi -pedantic and
2222         no-debugging compliance: Remove trailing common in enum
2223         declarations; add `unused' attributes; insert some appropriate
2224         casts.
2225
2226         * cmdline.c: (parse_command_line) Add new --testing-mode flag.
2227
2228         * command.c: (shell) Make static.
2229         (run_command) Make static.
2230
2231         * data-list.c: (dump_fixed_table) Remove use of local_strdup().
2232
2233         * dfm.c: (cmd_begin_data) I18n fix.
2234
2235         * error.c: (verbose_msg) Define if __STRICT_ANSI__.
2236
2237         * error.h: (macro verbose_msg) Define if __STRICT_ANSI__.
2238
2239         * expr-opt.c: (evaluate_tree) Don't initialize local arrays if
2240         __STRICT_ANSI__.
2241
2242         * file-handle.q: Don't prepend the source file directory name to
2243         the data file name.  (Ongoing issue.)
2244         (prepend_current_directory) Comment out.
2245         (internal_cmd_file_handle) Don't call prepend_current_directory().
2246         (fh_get_handle_by_filename) Ditto.
2247
2248         * filename.c: Append zero byte to readlink() return value.
2249
2250         * getline.c: (getl_read_line) I18n fix.
2251
2252         * lexer.h: Don't use gcc features if __STRICT_ANSI__.
2253
2254         * misc.h: Don't use gcc features if __STRICT_ANSI__.
2255
2256         * pfm-write.c: (bufwrite) Don't try to increment a void * pointer
2257         directly.
2258
2259         * postscript.c: (output_encodings) Don't use local_strdup().
2260         (postopen) Ditto.
2261
2262         * print.c: Don't use gcc features if __STRICT_ANSI__.
2263
2264         * q2c.c: (dump_vars) Don't put a , at the end of the last enum.
2265
2266         * recode.c: (parse_src_spec) Fully brace nested if's.
2267
2268         * set.q: (global var set_testing_mode) New var.
2269
2270 Wed Jul 29 22:01:44 1998  Ben Pfaff  <blp@gnu.org>
2271
2272         * ascii.c: Add some more `unused' attributes that only come into
2273         play when NDEBUG is defined.
2274         (ascii_close_page) Set s_len when reallocating s.
2275         
2276         * crosstabs.q: (delete_missing) New function.
2277         (output_pivot_table) Call delete_missing() if /MISSING=REPORT.
2278         (make_summary_table) Create summary table reallocable.
2279
2280         * postscript.c: Add more `unused' attributes as above.
2281
2282         * tab.c: (tab_create) [GLOBAL_DEBUGGING] Set reallocable member.
2283         (tab_realloc) [GLOBAL_DEBUGGING] Assert that table is reallocable.
2284          
2285         * tab.h: (struct tab_table) [GLOBAL_DEBUGGING] New `reallocable'
2286         member.
2287
2288         * var.h: (macro force_dup_variable) [!GLOBAL_DEBUGGING] Remove
2289         gratuitous space between parameter definition.
2290
2291         * vars-atr.c: Changed some assert(0)'s to abort()'s to prevent
2292         complaints about running off the end of functions with NDEBUG
2293         enabled.
2294
2295 Sun Jul  5 00:17:25 1998  Ben Pfaff  <blp@gnu.org>
2296
2297         * Several source files: Removed some PORTME notes when reflection
2298         revealed that ANSI forbids that sort of breakage.  Also, added
2299         lots of `unused' qualifiers here and there.
2300
2301         * aggregate.c: (accumulate_aggregate_info) Remove local var
2302         weighting that turned out not to be used.
2303
2304         * avl.c: Update to version 1.1.0.  Add unused specifier.
2305         (avl_destroy) Initialize ab to 0.  Comment fixes.  Cast return
2306         value to void *.
2307         (avl_probe) Replace some instances of 1 with +1 where appropriate.
2308         (avl_find) Cast return value to void *.
2309         (avl_delete) q doesn't need to be initialized at the beginning of
2310         the function.  Replace some instances of 1 with +1.
2311         (force_avl_delete) Renamed avl_force_delete, all references changed.
2312         (compare_ints) `param' marked unused.
2313         (print_int) `param' marked unused.
2314         (recurse_tree) Replace some instances of 1 with +1.
2315
2316         * avl.h: Update to version 1.1.0.  Only declares avl function
2317         types if not already declared.
2318         (AVL_MAX_HEIGHT) Only define if not already defined.
2319         (struct avl_node) New unused member char pad[2].
2320         [GLOBAL_DEBUGGING] Change conditionalization to NDEBUG instead.
2321         (force_avl_insert) Renamed avl_force_insert.
2322         (force_avl_delete) Renamed avl_force_delete.
2323
2324         * crosstabs.q: (struct table_entry) Put `freq' into a union with
2325         new member `data'.
2326         (struct crosstab) Add new member `ofs'.
2327         (glob var int_tab) Removed.
2328         (custom_tables) In integer mode, assign v[i] properly through the
2329         indirect var_dict.
2330         (custom_variables) Now p.crs.max == max + 1.
2331         [DEBUGGING] (debug_print) p.crs.min and p.crs.max are now ints.
2332         (precalc) Implement integer mode.
2333         (calc_integer) Implement integer mode.
2334         (compare_table_entry) Remove unused local variable `comparing'.
2335         (make_summary_table) Implement integer mode.
2336         (macro ns_rows) Implemented as static variable now.
2337         (several variables) Made static, from global.
2338         (output_pivot_table) Use table_value_missing() for column heads.
2339         Remove several unused local variables.  Implement integer mode
2340         table summing.  Count up ns_rows.
2341         (crosstabs_dim) Make columns wider when /MISSING=REPORT requested.
2342         (find_pivot_extent) Moved into find_pivot_extent_general; now just
2343         calls that function or find_pivot_extent_integer.
2344         (find_pivot_extent_integer) New function.
2345         (enum_var_values) Implemented for integer mode.
2346         (table_value_missing) New function.
2347         (display_dimensions) Call table_value_missing() for heads.
2348         (float_M_suffix) New function.
2349         (display_crosstabulation) Call table_value_missing() for row
2350         heads.  Handle missing values in /MISSING=REPORT mode.
2351         (calc_fisher) Remove unused var N.
2352         (calc_r) Remove unused var fact.
2353
2354         * data-list.c: (dump_fixed_table) Fix table dimensioning.
2355         (read_one_set_of_repetitions) Remove unused vars var_spec, column.
2356
2357         * data-out.c: (insert_commas) Remove unused var cp.
2358         (convert_CCx) Remove unused vars save_set_decimal,
2359         save_set_grouping.
2360
2361         * descript.q: (dump_z_table) Fix table dimensioning.
2362         (pre_calc) Remove unused var j.
2363         (display) Remove unused vars title, s.  Fix table dimensioning.
2364
2365         * expr-evl.c: Comment fixes.
2366
2367         * frequencies.q: (full_dim) New function.
2368         (dump_full) Fix table dimensioning.
2369         (condensed_dim) New function.
2370         (dump_condensed) Fix table dimensioning.
2371
2372         * get.c: (cmd_match_files) Remove unused var n_val.  Remove unused
2373         label winnage.
2374
2375         * html.c: (html_close_drive) Remove unused var i.
2376         (postopen) Remove unused vars title, curfn_len, cp.
2377         (preclose) Remove unused vars this, x.
2378
2379         * lexer.c: Comment fixes.
2380
2381         * matrix-data.c: (cmd_matrix_data) Remove unused var index.
2382
2383         * means.q: (custom_tables) Remove unused var m_dim.
2384
2385         * mis-val.c: Format fix.
2386
2387         * modify-vars.c: (cmd_modify_vars) Remove unused var new_dict.
2388
2389         * output.c: (outp_get_paper_size) Remove unused var cp.
2390
2391         * pfm-read.c: (read_float) Remove unused var save, unused label
2392         underflow.
2393         (read_variables) Remove unused vars cp, j.
2394         (read_value_label) Remove unused var j.
2395
2396         * pfm-write.c: (bufwrite) Remove unused var i.
2397
2398         * postscript.c: (ps_postopen_drive) Remove unused vars dev_info,
2399         fn.
2400         (output_encodings) Remove unused vars char_cp, n_output.
2401         (read_ps_encodings) Remove unused var ep.
2402         (postopen) Remove unused var title.
2403         (preclose) Remove unused var fp.
2404         (ps_open_page) Remove unused vars true, false, orientation,
2405         mirror_horz, mirror_vert, width, length.
2406         (ps_text_metrics) Remove unused var x.
2407
2408         * q2c.c: (find_symbol) Remove unused var y.
2409         (parse_setting) Remove unused parameter sbc, all references
2410         changed.
2411         (dump_parser) Remove unused var cp.
2412         (dump_free) Remove unused var i.
2413
2414         * set.q: (static vars args, n) Removed.
2415         (internal_cmd_gset) Removed.
2416
2417         * sfm-read.c: (sfm_read_dictionary) Removed unused var i.
2418         (read_machine_flt64_info) Removed unused var file_endian.
2419         (read_documents) Removed unused var i.
2420         (read_compressed_data) Removed unused parameter dict, all
2421         references changed.
2422
2423         * sfm-write.c: (bufwrite) Removed unused var i.
2424         (sfm_write_case) Removed unused var i.
2425
2426         * sort.c: (merge_once) Remove unused var t.
2427         (write_separate) #if 0 out as dead code.
2428
2429         * split-file.c: (cmd_split_file) Remove unused var i.
2430
2431         * sysfile-info.c: (sysfile_info_dim) New function.
2432         (cmd_sysfile_info) Fix table dimensioning.
2433         (variables_dim) New function.
2434         (display_variables) Fix table dimensioning.
2435         (describe_variable) Remove unused var prev_r.
2436
2437         * t-test.q: (z_postcalc) Removed.
2438         (pairs_calc) Remove unused var bad_weight.
2439         (postcalc) Remove unused vars dfn, dfd.
2440
2441         * tab.c: (tab_create) Set t->dim to NULL.
2442         (tab_dim) Make sure t->dim is NULL first.
2443         (tab_natural_width) Remove parameter `clamp'.
2444         (tab_value) Remove duplicate assertion for table.
2445         (tab_raw) New function.
2446         (nowrap_dim) New function.
2447         (wrap_dim) New function.
2448         (tab_output_text) Fix table dimensioning.
2449
2450         * tab.h: (tab_raw) New macro.
2451
2452         * val-labs.c: (get_label) Remove unused var type.
2453         (copy_value_labels) Remove unused var trav.
2454
2455         * var.h: (struct crosstab_proc) Completely changed.
2456
2457         * vars-prs.c: (parse_dict_variable) Remove unused var v.
2458
2459         * vfm.c: (open_active_file) Remove unused vars i, lp.
2460
2461         * weight.c: (weight_trns_proc) #if 0 out as dead code.
2462         
2463 Tue Jun  2 23:37:21 1998  Ben Pfaff  <blp@gnu.org>
2464
2465         * Makefile.am: Add apply-dict.c, flip.c.
2466
2467         * apply-dict.c: New file.
2468         
2469         * command.c: (struct command) Make cmd[] larger for CLEAR
2470         TRANSFORMATIONS command name.
2471         (parse_cmd) Make sure we're in a valid state before using it as an
2472         index.  Discard variables and reset state on invalid transitions.
2473         (cmd_clear_transformations) New function.
2474
2475         * command.def: Add APPLY DICTIONARY, CLEAR TRANSFORMATIONS, FLIP.
2476         Add unimplemented PRESERVE, RESTORE.
2477
2478         * file-handle.h: Include stddef.h.
2479
2480         * flip.c: New file.
2481         
2482         * pfm-read.c: (parse_value) Pad value label values with spaces,
2483         not nulls.
2484
2485         * sfm-read.c: (struct sfm_fhuser_ext) Add reference count.
2486         (sfm_close) Decrement reference count, make sure it's zero.
2487         (sfm_maybe_close) New function.
2488         (sfm_read_dictionary) Handle reference counts.
2489
2490         * vars-atr.c: (clear_default_dict) New function.
2491         (discard_variables) Use clear_default_dict().
2492
2493 Sun May 31 00:58:05 1998  Ben Pfaff  <blp@gnu.org>
2494
2495         * Makefile.am: Add pfm-write.c.
2496         (LDADD) Add the libgmp2 libraries.
2497
2498         * command.def: Define EXPORT.
2499
2500         * get.c: (cmd_export) New function.
2501         (export_write_case_func) New function.
2502
2503         * pfm-read.c: (static spss2ascii[]) Make it const.
2504
2505         * pfm-write.c: New file.
2506
2507         * sfm-write.c: Formatting, comment fixes.
2508
2509         * var.h: Comment fix.
2510
2511 Fri May 29 21:44:12 1998  Ben Pfaff  <blp@gnu.org>
2512
2513         * Makefile.am: Add pfm.h, pfm-read.c.
2514
2515         * command.def: IMPORT is now implemented.
2516
2517         * format.c: (glob var translate_fmt[]) New var.
2518
2519         * get.c: (enum GTSV_NONE) Renamed GTSV_OPT_NONE.
2520         (cmd_import) New function.
2521         (import_source_read) New function.
2522         (glob var import_source) New var.
2523
2524         * pfm-read.c: New file.
2525
2526         * pfm.h: New file.
2527         
2528         * sfm-read.c: (parse_format_spec) Local variable translate_fmt[]
2529         moved in format.c.
2530         (dump_dictionary) Disabled printing a couple of items.
2531
2532 Mon May 25 12:42:37 1998  Ben Pfaff  <blp@gnu.org>
2533
2534         * crosstabs.q: (postcalc) Call make_summary_table().
2535         (make_summary_table) New function.
2536         (insert_summary) New function.
2537         (display_dimensions) Remove some unnecessary arguments, all
2538         references changed.
2539         (output_pivot_table) Fix lots of problems with the risk table
2540         setup.
2541         (submit) Don't display an empty table.
2542         (display_risk) Fix order of arguments to calc_risk().
2543
2544         * glob.c: Always include assert.h and stdlib.h.
2545
2546         * output.h: (enum OUTP_T_JUST_FULL) Removed, all references
2547         removed.
2548
2549         * tab.c: (tab_create) Cosmetic changes.
2550
2551         * tab.h: (enum TAB_JUSTIFY) Removed, all references removed.
2552
2553 Sun May 24 22:39:23 1998  Ben Pfaff  <blp@gnu.org>
2554
2555         * tab.def: Removed.
2556
2557         * crosstabs.q: (output_pivot_table) Headers drawing and submission
2558         code simplified, moved into new function submit().
2559         (submit) New function.
2560         (crosstabs_dim) New function.
2561         (display_directional) Substitute variable names for %s where
2562         appropriate.
2563         (somers_d_v[], somers_d_ase[], somers_d_t[]) New static vars.
2564         (calc_symmetric) Initialize parameters only if non-NULL.
2565         Calculate Somers' d.
2566         (calc_directional) Calculate Somers' d (or copy it, really).
2567         Calculate eta.
2568
2569         * output.c: (outp_string_width) New function.
2570
2571         * postscript.c: (postopen) Calculate font widths based on the
2572         width of the zero '0' character, not the width of the space
2573         character.  Set paper-width and paper-length based on points, not
2574         device units.
2575         (ps_open_page) Fix page setup string for landscape mode.
2576
2577         * som.h: (struct som_dimension) Removed.
2578         (struct som_table_class) height, width members take int * not
2579         som_dimesion * now.
2580
2581         * tab.c: Many functions now have added parameter validation.
2582         (tab_height, tab_width) These functions were removed and merged
2583         into a single function tab_resize(), and all references changed.
2584         (tab_dim) Rewritten since the interface changed; reduced from
2585         hundreds of lines to two.  All callers were changed.  Currently
2586         most of them just use tab_natural_dimensions as their callback and
2587         await detailed translation of functionality.
2588         (tab_natural_width) New function.
2589         (tab_natural_height) New function.
2590         (tab_natural_dimensions) New function.  This is a callback
2591         function, not something that you'd want to call directly.
2592         (tab_nat_dim) Removed.
2593         (tabi_table) Allocates t->w and t->h.
2594         (tabi_driver) Inlined sum_columns()'s functionality.  Calls the
2595         dimensions callback.
2596         (evaluate_dimensions) Removed.
2597         (sum_columns) Removed.
2598
2599         * tab.h: (enum TAL_1THIN) Removed.
2600         (enum series t_*) Removed.
2601         (struct tab_table) Members trh, trv changed to unsigned char *
2602         from int *.  Member dim changed to a function pointer from a
2603         unsigned char *.  Member max_stack_height removed.  New members
2604         hr_tot, vr_tot.
2605         (macros tab_l, tab_r, tab_t, tab_b) New.
2606
2607 Sat May 23 23:22:13 1998  Ben Pfaff  <blp@gnu.org>
2608
2609         * ascii.c: (delineate) Assign last_space_nchars before skipping
2610         spaces, to fix right justification.
2611
2612         * crosstabs.q: (static vars risk, direct) New vars.
2613         (static var pearson_r) Removed.
2614         (glob var chisq_fisher) Made static.
2615         (static vars row_tot[], col_tot[]) Don't include grand total
2616         anymore.
2617         (static var grand_total) Renamed W, all references changed.
2618         (output_pivot_table) Only make `table' if num_cells != 0.  Make
2619         risk and directional tables.  Deal with grand total no longer part
2620         of col_tot[].  Free rows and cols after we're done with them.
2621         (display_risk) New function.
2622         (display_directional) New function.
2623         (clac_r) Rewritten so that it stores all its results into its
2624         arguments, so it can be used for Spearman's correlation too.
2625         (calc_symmetric) Added a t[] argument, all references changed.
2626         Calculates ASEs for tau-b, tau-c, gamma.  Calculates Spearman's r,
2627         Pearson's r, Cohen's kappa.
2628         (calc_risk) New function.
2629         (calc_directional) New function.
2630
2631         * som.c: (som_submit) Improved debugging code.
2632
2633         * stats.c: (hypercube) New function.
2634         (cube) New function.
2635         (sqr) New function.
2636         (normal_sig) Went back to old implementation, which actually
2637         worked.
2638
2639         * stats.h: (macros square, cube, hypercube) Removed.  The
2640         equivalent functions in stats.c are inlined here; all references
2641         to square changed to sqr.
2642
2643 Fri May 22 00:03:41 1998  Ben Pfaff  <blp@gnu.org>
2644
2645         * crosstabs.q: (N_SYMMETRIC) New define.
2646         (postcalc) Disable debug printing.
2647         (static vars chisq_fisher, pearson_r) New.
2648         (output_pivot_table) Add support for symmetric measures.  Add
2649         chi-square output of exact sigs.
2650         (display_chisq) Rewritten.
2651         (display_symmetric) New function.
2652         (gamma_int) New function.
2653         (Pr) New function.
2654         (swap) New function.
2655         (calc_fisher) New function.
2656         (calc_chisq) Check boundary conditions better. Calculate Yates,
2657         Fisher, Mantel-Haenszel tests.
2658         (calc_r) New function.
2659         (calc_symmetric) New function.
2660
2661         * stats.c: (normal_sig) Rewritten with new algorithm.  Renamed
2662         from calc_normal.
2663         (chisq_sig) Better boundary conditions.  Renamed from
2664         calc_significance.
2665
2666         * tab.h: (struct tab_table) New member cf.
2667
2668         * tab.c: (tab_create) Set cf.
2669         (tab_width) New function.
2670         (tab_realloc) Handle cf.
2671         (tab_vline) Handle cf.
2672         (tab_hline) Handle cf.
2673         (tab_box) Handle cf.
2674         (tab_value) Handle cf.
2675         (tab_float) Handle cf.
2676         (tab_text) Handle cf.
2677         (tab_joint_text) Handle cf.
2678         (tab_offset) Handle cf.
2679         (tab_next_row) Handle cf.
2680         (evaluate_dimensions) Handle cf.
2681         (render_strip) Handle cf.
2682
2683 Wed May 20 00:03:59 1998  Ben Pfaff  <blp@gnu.org>
2684
2685         * crosstabs.q: (postcalc) New vars row_tot, col_tot, pass them to
2686         output_pivot_table().
2687         (output_pivot_table) Moved lots of local variables outside and
2688         made them static.  Add beginnings of chi-square statistic
2689         support.  Now column and row totals aren't in the main matrix.
2690         Always zero out any leftover rows & columns after we're done with
2691         the table entries.  Move all output stuff into
2692         display_dimensions(), display_crosstabs(), display_chisq().
2693         (display_dimensions) New function.
2694         (display_crosstabulation) New function.
2695         (display_chisq) New function.
2696         (calc_chisq) Implemented Pearson and likelihood-ratio chisquares.
2697
2698         * frequencies.q: (dump_full, dump_condensed) Remove tab_null()
2699         references, simplify logic.
2700
2701         * postscript.c: Remove scale, translate-x, translate-y,
2702         mirror-horz, mirror-vert, rotate-180 options.
2703         (struct ps_driver_ext) Remove scale, translate_x, translate_y.
2704         All references deleted.
2705         (macro YT) New macro.
2706         (array option_tab[]) Removed options.
2707         (ps_option) Removed options.
2708         (ps_open_page) Write page setup explicitly to output file, without
2709         using now-deleted BP function.
2710         (macro dump_line) Use YT().
2711         (macro dump_thick_line) Use YT().
2712         (draw_headers) Use YT().
2713         (switch_font) Reorder arguments to SF function.
2714         (write_text) Use YT().
2715
2716         * sfm-read.c: (sfm_read_case) Don't attempt to read variables that
2717         have get.fv == -1.
2718
2719         * sysfile-info.c: (describe_variables) Don't use tab_nulls().
2720
2721         * tab.c: (tab_create) Initialize t->ct to zeros.  Remove
2722         null-debugging code.
2723         (tab_realloc) Remove null-debugging code.  Initialize new regions
2724         of t->ct to zeros.
2725         (tab_vline) Support offsets.
2726         (tab_hline) Support offsets.
2727         (tab_box) Support offsets.
2728         (tab_null) Removed.
2729         (tab_nulls) Removed.
2730         (tab_row) Removed.
2731         (tab_col) Removed.
2732         (evaluate_dimensions) Remove null-debugging code.  Understand
2733         TAB_EMPTY attribute.  Assert that text.s.s is always non-NULL if
2734         TAB_EMPTY not present.
2735
2736         * tab.h: New cell attribute TAB_EMPTY.
2737         (macros tab_nr, tab_nc, tab_row, tab_col) New.
2738
2739         * vars-atr.c: (init_variable) Set get.fv to -1 so that GET doesn't
2740         try to read them from system files.
2741
2742         * vfm.c: (dump_splits) Don't call tab_null().   
2743
2744 Sat May 16 19:36:55 1998  Ben Pfaff  <blp@gnu.org>
2745
2746         * crosstabs.q: (struct crosstab) Added `missing' member.
2747         (custom_tables) Init missing.
2748         (calc_general) Handle missing values.
2749         (calc_chisq) New function.
2750         (output_pivot_table) Start work on chi-square output.  Update for
2751         new tab offset support functions.  Shorten statistic names.
2752
2753         * Several files: add in more `const's to placate gcc's warnings.
2754
2755         * tab.h: (struct tab_table) Add col_ofs, row_ofs members.  Comment
2756         fixes.
2757
2758         * tab.c: (tab_height, tab_realloc, tab_vline, tab_hline, tab_box,
2759         tab_null, tab_nulls, tab_value, tab_float, tab_text,
2760         tab_joint_text) Add col_ofs and row_ofs support.
2761         (tab_offset) New function.
2762         (tab_next_row) New function.
2763         (tab_row) New function.
2764         (tab_col) New function.
2765         (tabi_table) Add col_ofs and row_ofs support.
2766
2767         * vars-atr.c: (is_system_missing) New function.
2768
2769 Tue May 12 16:14:30 1998  Ben Pfaff  <blp@gnu.org>
2770
2771         * crosstabs.q: Expanded subcommand names RESID --> RESIDUAL, etc.
2772         (static var no_cells) Removed.
2773         (static var num_cells) New.
2774         (static var expected) New.
2775         (static var cells[]) New.
2776         (internal_cmd_crosstabs) Deal with new variables.
2777         (postcalc) Removed most of the meat and put it in new function
2778         output_pivot_table().
2779         (output_pivot_table) Calculates and outputs an entire pivot table.
2780
2781         * postscript.c: (postopen) Fix problems with free()ing addresses
2782         not obtained from malloc().
2783
2784         * som.c: (som_submit) Add assertion.
2785
2786         * sysfile-info.c: (describe_variable) Use new tab_nulls()
2787         function.
2788
2789         * tab.c: (static var tab_names[]) New.
2790         (tab_realloc) -1 for nc or nr indicates no change.
2791         (tab_nulls) New function.
2792         (tab_dim) Use tab_names[].
2793         (tabi_cumulate) Don't include bottom or right headers.  Furrfu.
2794         (evaluate_dimensions) Don't terminate on uninited cells, just put
2795         an X in them and emit a notice.  Use tab_names[].
2796
2797         * tab.h: Move bits into tab.def.
2798
2799         * tab.def: New.  Don't try to declare tab_table_class because then
2800         som.h has to be included.       
2801         
2802 Thu May  7 22:55:04 1998  Ben Pfaff  <blp@gnu.org>
2803
2804         * command.def: New file, contains all the command definitions
2805         previously included bodily in command.c.
2806
2807         * format.def: New file, contains all of the format definitions
2808         previously split across format.h, format.c, and sfm-write.c.
2809
2810         * lexer.h: Renamed from tokens.h in order to match corresponding
2811         .c file name.
2812
2813         * lexerP.h: Moved some rarely used functions exported by lexer.c
2814         into here.
2815
2816         * Makefile.am: Commemorate renamed files.
2817         (EXTRA_DIST) Add command.def, format.def.
2818
2819         * command.c: [0] (walk_cmdtable_func) Removed.
2820
2821         * crosstabs.q: (postcalc) Made it work and print out matrices
2822         proving it.
2823         (enum_column_values) Renamed enum_var_values, generalized for any
2824         variable.
2825
2826         * format.h: (struct fmt_desc) New member `spss'.
2827
2828         * q2c.c: (main) Generated code includes lexer.h instead of
2829         tokens.h.
2830
2831         * sfm-write.c: (write_format_spec) Use new spss member of fmt_spec
2832         instead of an independent translation table.
2833
2834 Tue May  5 13:19:03 1998  Ben Pfaff  <blp@gnu.org>
2835
2836         * Lots of source files: Added const to declarations.
2837
2838         * aggregate.c: (parse_aggregate_function) Rename inner i to j.
2839         
2840         * arena.c: (arena_clear) Set prev pointer to null when done.
2841
2842         * ascii.c: (ascii_option) Rename index as indx.
2843
2844         * avl.c: This is now a separate library called libavl.
2845         (xmalloc) Make static.
2846         (avl_probe) Step A7 can use the cache instead of an explicit
2847         compare.
2848         (avl_delete) Don't maintain a q pointer because it's always
2849         available in the pointer stack.  Comment fix.
2850
2851         * avl.h: This is now a separate library called libavl.
2852
2853         * command.c: (cmd_table[]) Remove spurious trailing "".
2854
2855         * common.h: Only include random() fix if this system needs it.
2856
2857         * crosstabs.q: Include alloca headers.
2858         (n_sorted_tab) New global var.
2859         (postcalc) Mostly rewritten.
2860         (find_pivot_extent) Rewritten.
2861         (enum_column_values) Rewritten.
2862
2863         * data-out.c: (convert_F) Rename inner n as n_spaces.
2864
2865         * error.c: (dump_message) Don't have an outer var i.
2866
2867         * file-handle.q: (static var f) Removed.  All references removed.
2868         (internal_cmd_file_handle) Uses a local variable instead of f.
2869
2870         * get.c: (trim_dictionary) Change scope of i, i1, i2.
2871         (cmd_match_files) Don't strcpy tokstr into sbc (why was this ever
2872         done?)
2873
2874         * getline.h: Declare getl_history as extern.  Reported by
2875         palme@uni-wuppertal.de (Hubert Palme).
2876
2877         * postscript.c: (postopen) Some large mods for constness.
2878
2879         * recode.c: Remove spurious copyrights since PSPP is owned by FSF
2880         anyway.
2881
2882 Fri Apr 24 12:52:47 1998  Ben Pfaff  <blp@gnu.org>
2883
2884         * Makefile.am: Rename BUILT_SOURCES to q_sources, all references
2885         changed.  Add avl.c, avl.h to pspp_SOURCES.  Remove avllib from
2886         LDADD.
2887
2888         * avl.c, avl.h: New files.  These form a clean-room
2889         reimplementation of avllib.  Iterative algorithms are used in
2890         place of recursive ones, so there is no resemblance in the code.
2891
2892         * Lots of headers: Don't include other headers by default.
2893
2894         * Lots of source files: Explicitly include all needed headers.
2895
2896         * arena.c: (arena_clear) New function.
2897
2898         * crosstabs.q: (ROW_VAR, COL_VAR) New enums.
2899         (static var ar) Removed.
2900         (staitc vars ar_tc, ar_col) New.
2901         (cmd_crosstabs) Destroy the arenas.
2902         (internal_cmd_crosstabs) Create the arenas.
2903         (precalc) Don't need a free function for the hash.
2904         (calc_general) Make sure to zero out the trailer on the key data
2905         before inserting.
2906         (print_table_entries) Updated.
2907         (postcalc) Worked on actually implementing.
2908         (find_pivot_extent) New function.
2909         (compare_value) New function.
2910         (enum_column_values) New function.
2911
2912         * data-in.c: (parse_month) Make local array `static const'.
2913         
2914         * data-out.c: (convert_date) Make local array `static const'.
2915         (convert_WKDAY) Same.
2916         (convert_MONTH) Same.
2917
2918         * frequencies.q: (postprocess_freq_tab) avl_walk_inorder() has
2919         been renamed to avl_walk().
2920         
2921         * hash.c: Rewritten more efficiently.
2922
2923         * hash.h: Add attribute const to hsh_next_prime declaration.
2924
2925         * lexer.c: (id_match) Make arguments const.
2926
2927         * postscript.c: (ps_postopen_driver) Make default fonts the
2928         Helvetica family.
2929
2930         * q2c.c: (main) Generated code needs stdlib.h.
2931
2932         * sfm-write.c: (write_value_labels) An avl_traverser needs to be
2933         initialized to 0 now, not to NULL.  All other references to
2934         avl_traverser were updated in the same way.
2935
2936         * tokens.h: Macro version of id_match updated to use const
2937         properly.
2938
2939         * val-labs.c: (inc_ref_count) New function.
2940         (copy_value_labels) Simply through use of new avl_copy() function.
2941
2942 Wed Apr 15 13:01:58 1998  Ben Pfaff  <blp@gnu.org>
2943
2944         * crosstabs.q: Probably doesn't compile.  New PIVOT subcommand.
2945         (postcalc) Worked on this.
2946
2947         * postscript.c: (OPO_DOUBLE_LINE) New enum.
2948         (struct ps_driver_ext) New line_width_thick member.
2949         (ps_preopen_drive) Init line_width_thick.
2950         (option_tab[]) Add line-* options.
2951         (ps_option) Parse line-* options.
2952         (postopen) Add line_width_thick support.  Strip leading spaces on
2953         prologue output lines.
2954         (ps_open_page) Include line_width_thick in output.
2955         (macro dump_thick_line) New.
2956         (dump_fancy_line) Support thick lines as well as double lines.
2957
2958 Tue Apr 14 00:50:08 1998  Ben Pfaff  <blp@gnu.org>
2959
2960         * Makefile.am: Add crosstabs.c to BUILT_SOURCES.  Add crosstabs.q
2961         to pspp_SOURCES.  Add crosstabs.q to EXTRA_DIST.
2962
2963         * Many source files: Rename `options' to `pv_opts' as appropriate.
2964
2965         * command.c: (static var cmd_table[]) Add CROSSTABS command.
2966
2967         * common.c: (xcalloc) New function.
2968
2969         * crosstabs.q: New file.  Not finished yet, though.
2970                 
2971         * data-list.c: Comment fix.
2972
2973         * error.c: Remove some old Checker cruft.
2974
2975         * frequencies.q: (dump_full) Cumulate valid percent instead of
2976         regular percent.
2977
2978         * getline.c: Comment fix.
2979
2980         * hash.c: Comment fixes.
2981
2982         * hash.h: (struct hsh_table) Make hash functions return unsigned
2983         instead of int to avoid problems with taking the modulo of
2984         negative return values.  All references changed.
2985
2986         * misc.c: (intlog10) Make its table static const instead of auto.
2987
2988         * sfm-read.c: (read_header) Make `prefix' static const instead of
2989         auto.
2990
2991         * var.h: (union value) Add member `hash'.
2992         (struct variable) Rename prv_index as `foo'--all references
2993         changed.  Reorder.
2994         (typedef pv_opts) Removed.  All references changed.
2995
2996         * vars-prs.c: (parse_variables) Message fixes.
2997         
2998 Mon Mar  9 15:35:08 1998  Ben Pfaff  <blp@gnu.org>
2999
3000         * get.c: (cmd_match_files) Don't reverse the order of FILEs as
3001         they are being inserted.  Don't check for BY variables of
3002         different types.  Discard variables if the active file isn't
3003         included in the merge.
3004         (mtf_processing) Essentially rewritten.
3005         (mtf_merge_dictionary) Check for master/slave variables of
3006         different types/widths.
3007
3008         * vfm.c: (static var not_canceled) New var.
3009         (process_active_file) Don't call vfm_source->read() if
3010         there's no vfm-source.  Initialize not_canceled.
3011         (process_active_file_write_case) Honor and update not_canceled.
3012         (prepare_for_writing) Rollback changes from yesterday, they were
3013         wrong.
3014         (close_active_file) Don't destroy vfm_source unless it exists.
3015         
3016 Mon Mar  9 00:56:16 1998  Ben Pfaff  <blp@gnu.org>
3017
3018         * Lots of source files: Added { } around nested if/else constructs
3019         to avoid new gcc 2.8 warnings.
3020
3021         * data-in.c: (parse_Z) Declare `int' type explicitly.
3022         (convert_Z) Ditto.
3023
3024         * get.c: (struct mtf_file) Add prev, next_min, by, input members.
3025         (cmd_match_files) Initialize mtf_by_values.  Manage by, input,
3026         prev members.  Put TABLEs at the end of the chain and FILEs at the
3027         beginning.  Don't allow the active file in STATE_INIT.  Use proper
3028         `seen' value for the active file.  Fill out the by members and
3029         make sure they're of consistent type.  Do the actual merge
3030         operation.
3031         (mtf_processing_finish) New function.
3032         (var_type_description) New function.
3033         (mtf_free_file) New function.
3034         (mtf_free) Rewritten.
3035         (mtf_delete_file_in_place) New function.
3036         (mtf_read_nonactive_records) New function.
3037         (mtf_compare_BY_values) New function.
3038         (static var mtf_seq_no) New var.
3039         (mtf_processing) New function.
3040         (mtf_merge_dictionary) Assign nval members for the system file
3041         dictionary.  Assign fv values for its variables.  Point each slave
3042         variable to the corresponding master variable.
3043
3044         * hash.c: Include str.h.
3045
3046         * mis-val.c: (copy_missing_values) src arg is const.
3047
3048         * misc.c: (spacing) Make `max' var explicitly int.
3049
3050         * sfm-read.c: (dump_dictionary) Message reformatting.
3051         (sfm_read_case) Add assertion.
3052
3053         * sort.c: Esthetic fixes.
3054
3055         * var.h: (struct match_files_proc) New struct.
3056         (struct variable) Add private data match_files_proc.
3057
3058         * vars-atr.c: (delete_variable) Implement.  Add argument for the
3059         dictionary that owning the variable.
3060         (dup_variable) Add assertion.
3061
3062         * vfm.c: Comment fixes, hopefully the comments are correct now.
3063         (process_active_file) New function.
3064         (process_active_file_write_case) New function.
3065         (process_active_file_output_case) New function.
3066         (prepare_for_writing) Use temp_dict->nval for vfm_info, not
3067         default_dict.nval.
3068         (write_case) Renamed procedure_write_case().  Now write_case is a
3069         pointer to a function.  Style fixes.
3070         
3071 1998-03-05  Ben Pfaff  <blp@gnu.org>
3072
3073         * Makefile.am: (q2c) Link with libmisc.
3074         (version.c) Define default_config_path, include_path,
3075         groff_font_path.
3076
3077         * ascii.c: (ascii_postopen_driver) When the default newline string
3078         is requested, open file in text mode.  Suggested by
3079         palme@uni-wuppertal.de (Hubert Palme).
3080         (static vars line_buf, line_p) Change from char * to unsigned char
3081         *.
3082         (ascii_close_page) char * to unsigned char *.
3083
3084         * cmdline.c: (parse_command_line) Implement -r option by
3085         prepending ~/.pspp/rc to the list of files to process.
3086
3087         * command.c: (cmd_remark) Reset getl_prompt to the standard prompt
3088         before pulling in a final line.
3089         (null_func, null_int_func) Removed (dead code).
3090
3091         * descript.q: (display) Calculate width of variable name column
3092         properly.  Calculate number of valid cases properly.  Reported by
3093         palme@uni-wuppertal.de (Hubert Palme).
3094
3095         * filename.c: (init_filename) Use default_config_path instead of
3096         now obsolete CONFIG_PATH.
3097
3098         * getline.c: (getl_initialize) Use include_path instead of now
3099         obsolete INCLUDE_PATH.
3100         (getl_add_file) New argument `where'.  All references changed.
3101
3102         * groff.c: (find_font_file) Use groff_font_path instead of now
3103         obsolete GROFF_FONT_PATH.
3104         
3105         * postscript.c: (find_ps_file) Use groff_font_path instead of now
3106         obsolete GROFF_FONT_PATH.  Copy through temporary variable to
3107         avoid problems with constness.
3108
3109         * str.h: (macro cs_streq) New macro.
3110
3111         * version.h: (glob var default_config_path, include_path,
3112         groff_font_path) New vars.
3113         
3114 1998-02-23  Ben Pfaff  <blp@gnu.org>
3115
3116         * Many source files: Change verbose_msg() priority levels and
3117         messages.
3118
3119         * aggregate.c: Include debug-print.h.
3120
3121         * cmdline.c: (parse_command_line) Add --safer/-s and --command/-c
3122         options.
3123         (static var pre_syntax_message) Document --safer/-s and
3124         --command/-c.
3125
3126         * command.c: (cmd_erase, cmd_host) Disable if set_safer is set.
3127
3128         * dfm.c: (open_inline_file) [__CHECKER__] Zero out ext->file,
3129         because it's not used but it's still copied.
3130         (open_file_r) Remove gratuitous debug message.
3131
3132         * filename.c: (safety_violation) New function.
3133         (open_file) Remove gratuitous debug messages.  Don't allow pipe
3134         files if set_safer is set.
3135
3136         * get.c: Turn off debugging.
3137
3138         * getline.c: (getl_add_virtual_file) New function.
3139         (getl_read_line) Add verbose_msg() call for opening new syntax
3140         file.
3141         (getl_perform_delayed_reset) Add a return value describing whether
3142         any action was taken.  Call reset_eof().
3143
3144         * getline.h: Comment fix.
3145
3146         * groff-font.c: (groff_read_font) Use `goto next_iteration' in
3147         place of incorrect `continue'.  Use strtok_r() instead of
3148         strtok().  Always check strtok_r() return value.
3149         (groff_read_DESC) Use strtok_r() instead of strtok().
3150
3151         * lexer.c: (reset_eof) New function.
3152
3153         * main.c: (parse) Get a token after performing a delayed reset
3154         action; allow empty syntax files.
3155
3156         * postscript.c: (output_encodings) Use strtok_r() instead of
3157         strtok().
3158
3159         * q2c.c: (dump_parser) Use strtok_r() instead of strtok().
3160
3161         * set.q: Comment fixes.
3162         (glob var set_safer) New var.
3163         (internal_cmd_set) Support SAFER.
3164
3165         * str.h: [!HAVE_STRTOK_R] Declare strtok_r() prototype.
3166
3167         * temporary.c: (free_dictionary) Set d->splits to NULL after
3168         freeing.
3169
3170         * vars-atr.c: (clear_variable) Decrement dict->n_splits if
3171         variable deleted, not if it *isn't* deleted.
3172
3173 1998-02-16  Ben Pfaff  <blp@gnu.org>
3174
3175         * command.c: (array cmd_table[]) Add MATCH FILES.
3176
3177         * common.c: Comment fixes.
3178
3179         * data-list.c, dfm.c, error.c, filename.c, list.q, matrix-data.c,
3180         modify-vars.c, postscript.c, sfm-read.c, sfm-write.c, tab.c:
3181         Include alloca.h.  Problem reported by palme@uni-wuppertal.de
3182         (Hubert Palme).
3183
3184         * expr-opt.c: Include str.h.  Problem reported by
3185         palme@uni-wuppertal.de (Hubert Palme).
3186
3187         * get.c: (cmd_get) [DEBUGGING] Update v->p.get to v->get.
3188         (static var mtf_by) Change from char ** to variable **.
3189         (static var mtf_master) New var.
3190         (mtf_merge_dictionary) New function.
3191         (cmd_match_files) Init mtf_master.  Parse mtf_by according to new
3192         var type.  Reorder tests properly.  Initialize file->dict.  Detect
3193         TABLE= without BY=.  Read file dictionaries and merge them.  Give
3194         subcommand name with IN, LAST, FIRST error messages.  Create IN,
3195         LAST, FIRST variables.  Comment fixes.
3196         (mtf_free) Don't free default_dict.  Free mtf_master.
3197
3198         * getline.c: Define getl_mode.  Change getl_buf_size to size_t
3199         from int.
3200         (handle_line_buffer) Cast int to size_t in comparison to avoid
3201         warning.
3202
3203         * getline.h: Declare getl_mode extern.
3204
3205         * groff-font.c: (groff_read_font) Type-fix calls to getline.
3206         (groff_read_DESC) Make line_size a size_t.
3207         (match_tok) Parenthesize name to avoid macro expansion.
3208
3209         * mis-val.c: (copy_missing_values) New function.
3210
3211         * postscript.c: (postopen) Make buf_size a size_t.
3212
3213         * sfm-read.c: (dump_dictionary) Make global from static.  Print
3214         variable info in parts for easier debugging with Checker.
3215
3216         * temporary.c: (copy_variable) Use copy_value_labels().
3217         (new_dictionary) New arg: whether to copy file label, documents.
3218
3219         * val-labs.c: (copy_value_labels) New function.
3220
3221         * var.h: (enums MISSING_*) Add MISSING_COUNT.
3222
3223         * vars-atr.c: [GLOBAL_DEBUGGING] (force_dup_variable) New
3224         function.
3225         (dup_variable) Set prv_index, get.fv, get.nv.
3226
3227 Fri Feb 13 15:38:36 1998  Ben Pfaff  <blp@gnu.org>
3228
3229         * Makefile.am: (pspp_SOURCE) Add htmlP.h.
3230
3231         * Many source files: For ANSI-compliance, add empty statement
3232         after label.  Reported by palme@uni-wuppertal.de (Hubert Palme)
3233         and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
3234
3235         * data-in.c: (parse_numeric) Some header files break on
3236         -DBL_MIN_10_EXP because they get a --; add () for safety.
3237         Reported by palme@uni-wuppertal.de (Hubert Palme).
3238
3239         * dfm.c: Idea by Dr Eberhard W Lisse <el@linux.lisse.na>.
3240         (struct dfm_fhuser_ext) Change `file' from FILE * to file_ext.
3241         (dfm_close) Use close_file_ext.
3242         (open_inline_file) Set file.file to NULL, not file.
3243         (open_file_r, open_file_w) Initialize file.file; fill in file_ext
3244         struct and use open_file_ext().
3245         (read_record) Use file.file.
3246
3247         * file-handle.q: (prepend_current_directory) Pass through special
3248         filenames.
3249
3250         * filename.c: Only include unistd.h if HAVE_UNISTD_H.
3251         (normalize_filename) Pass through special filenames.
3252         (open_file, close_file) Accept pipe| and |pipe syntaxes as
3253         equivalent.
3254         (dirname) Rename blp_dirname() because of name conflict on some
3255         OS.  All references changed.  Reported by palme@uni-wuppertal.de
3256         (Hubert Palme).
3257         (is_special_filename) New function.
3258
3259         * get.c: (GTSV_OPT*) Add GTSV_OPT_MATCH_FILES.
3260         (trim_dictionary) Conditionalize some of the options on whether
3261         GTSV_OPT_MATCH_FILES is in *options.
3262         (rename_variables) Don't allow variables to be renamed as scratch
3263         variables.
3264         (MTF_*) New enum series.
3265         (struct mtf_file) New struct.
3266         (static vars mtf_head, mtf_tail, mtf_by, mtf_n_by, mtf_free) New
3267         vars.
3268         (cmd_match_files, mtf_free) New functions.
3269
3270         * lexer.c: (match_int) Needed parentheses around name to escape
3271         macro expansion.  Reported by Micah Altman
3272         <maltman@www-vdc.fas.harvard.edu>.
3273
3274         * print.c: Needed to include alloca.h.  Reported by Micah Altman
3275         <maltman@www-vdc.fas.harvard.edu>.
3276
3277         * recode.c: (convert_to_double) Parenthesize -DBL_MIN_10_EXP to
3278         -(DBL_MIN_10_EXP).  Reported by palme@uni-wuppertal.de (Hubert
3279         Palme).
3280         
3281         * str.h: Include stdarg.h.  Reported by palme@uni-wuppertal.de
3282         (Hubert Palme) and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
3283
3284 Thu Feb  5 00:18:21 1998  Ben Pfaff  <blp@gnu.org>
3285
3286         * html.c: (struct html_driver_ext) Move into htmlP.h.
3287         (html_preopen_driver) Initialize cp_x, cp_y.
3288         (html_submit) Implement as call to output_tab_table().
3289         (change_attributes) New function.
3290         (escape_string) New function.
3291         (output_tab_table) New function.
3292
3293         * list.q: (write_all_headers) Add code for writing headers for the
3294         html driver.
3295         (clean_up) Write out the html close-table tag.
3296         (determine_layout) Ignore html driver.
3297         (list_cases) Write html data.
3298
3299         * som.c: (som_submit) Move more of the code into output_table().
3300
3301         * tab.c: (static var hit) Make a global var and rename tab_hit.
3302         (static var tab_table_class) Make a global var.
3303
3304         * htmlP.h: New file.
3305
3306 Tue Feb  3 16:12:18 1998  Ben Pfaff  <blp@gnu.org>
3307
3308         * dump-sysfile.c: Removed.
3309
3310         * html.c: (preclose) Change comment in emitted code.
3311
3312         * matrix-data.c: Debugging off by default.  Comment fixes.
3313         (static var container) New var.
3314         (cmd_matrix_data) Create and destroy container.  Initialize
3315         is_per_factor[] to 0s.  Move code into new function
3316         string_to_content_type().  Require split values to be present in
3317         the data when ROWTYPE_ is explicit.  Call specific function, not
3318         general read_matrices().
3319         (string_to_content_type) New function.
3320         (context) Exclude all whitespace, not just spaces.
3321         (mget_token) A dot is a number.  Add assertion.
3322         (static var data) Renamed nr_data.
3323         (static var factor_values) Renamed nr_factor_values.
3324         (read_matrices) Renamed read_matrices_without_rowtype().  Handle
3325         only specific case.  Close data_file before exit.
3326         (fill_matrix) New function.
3327         (read_data_lines) Renamed nr_read_data_lines().  Remove debug
3328         printing.  Style fixes.  Message fixes.  Move code into
3329         fill_matrix().
3330         (read_matrices_without_rowtype) Rename
3331         matrix_data_read_without_rowtype().  Fix off-by-one error on
3332         loops.  Allocate nr_data[] memory from arena.
3333         (read_matrices_with_rowtype) Removed.
3334         (read_splits) Renamed nr_read_splits().  Style fixes.
3335         (read_factors) Renamed nr_read_factors().
3336         (dump_cell_content) Comment fixes.  Arguments changed.  Change
3337         debug printing.  All references changed.
3338         (output_data) Renamed nr_output_data().
3339         (static var wr_content) New var.
3340         (struct factor_data) New struct.
3341         (static var wr_data) New var.
3342         (static var wr_current) New var.
3343         (matrix_data_source_destroy_source) Removed.
3344         (read_matrices_with_rowtype) New function.
3345         (matrix_data_read_with_rowtype) New function.
3346         (wr_read_splits) New function.
3347         (compare_factors) New function.
3348         (wr_output_data) New function.
3349         (wr_read_rowtype) New function.
3350         (wr_read_factors) New function.
3351         (wr_read_indeps) New function.
3352         (glob var matrix_data_source) Make destroy_source member NULL as
3353         well.
3354
3355 Fri Jan 23 00:09:08 1998  Ben Pfaff  <blp@gnu.org>
3356
3357         * lexer.c: (syntax_error) Give better error message when at end of
3358         file.
3359
3360         * matrix-data.c: (var content_names[]) Fix PROX spelling.  Change
3361         N_SCALAR to output as plain N.
3362         (mdump_token) Change output format.
3363         (context) Fix message output interaction with spaces in input.
3364         (another_token) New function.
3365         (force_eol) Improved error message.
3366         (static var max_cell_index) New var.
3367         (read_matrices) Init `cells'.  factor_values is now per-cell.
3368         Init max_cell_index.
3369         (read_data_lines) Replace `compare' local with new `compare' arg.
3370         Debugging messages changed.  Only read factors if per_factor.
3371         Propagate error return from read_factors(), force_eol().
3372         Copy N_SCALAR values across the N vector.
3373         (read_matrices_without_rowtype) Don't init `cells'.  Don't need to
3374         check parentheses manually since we now have is_per_factor[].
3375         Call read_data_lines() with new args.  Check for end of data after
3376         looping, using another_token().
3377         (read_factors) Arguments changed.  Use max_cell_index to determine
3378         whether to read or compare factors.  Message fixes.
3379         (dump_cell_content) New function.
3380         (output_data) Completely rewritten because content types were
3381         supported to be nested inside factor values, not vice versa.
3382         
3383 Thu Jan 22 00:26:38 1998  Ben Pfaff  <blp@gnu.org>
3384
3385         * lexer.c: (syntax_error) Support formatted varargs messages.
3386
3387         * matrix-data.c: Turn debugging on by default.
3388         (static content_type[]) New array.
3389         (static content_names[]) New array.
3390         (static rowtype_, varname_) New vars.
3391         (static is_per_factor[]) New array.
3392         (static split_values) Moved declaration.
3393         (static n_continuous, first_continuous) New var.
3394         (cmd_matrix_data) Don't init split_values.  Assign ROWTYPE_ to
3395         rowtype_.  Simplify SPLIT code.  Init is_per_factor[].  Assign
3396         VARNAME_ to varname_.  Initialize first_continuous, n_continuous.
3397         Check for continuous variables.
3398         [DEBUGGING] (debug_print) Remove content_names[].
3399         (mdump_token) New macro.
3400         (mget_token_dump) New function.
3401         (mdump_token) New function.
3402         (context) New function.
3403         (mget_token) Fix messages.
3404         (static var data, split_values, factor_values) New vars.
3405         (read_matrices) Manage split_values, factor_values.
3406         (read_data_lines) New function.
3407         (read_matrices_without_rowtype) Implemented.
3408         (read_splits) Message fixes.  Uses `just_read'.
3409         (read_factors) New function.
3410         (output_data) New function.
3411         (matrix_data_source_destroy_source) Close the file handle.
3412         (glob var matrix_source) Change name from "DATA LIST" to "MATRIX
3413         DATA".
3414
3415         * str.c: (strpadcmp) Removed.
3416
3417         * vfm.c: (dump_splits) Initialize i; fix test for end of splits.
3418
3419 Sun Jan 18 00:30:59 1998  Ben Pfaff  <blp@gnu.org>
3420
3421         * Lots of source files: Add cast to unsigned character to calls to
3422         tolower() and toupper().
3423
3424         * aggregate.c: Set default_dict.splits to NULL.
3425
3426         * command.c: (static variable tab[]) Add MATRIX DATA.
3427
3428         * data-in.c: Add debugging defines.  Formatting fixes.
3429
3430         * expr-opt.c: Formatting fixes.
3431
3432         * lexer.c: (syntax_error) Message fixes.
3433
3434         * matrix-data.c: New enum series.
3435         (static vars fmt, section, diag, explicit_rowtype, signle_split,
3436         split_values, n_factors, factors, cells, pop_n, contents,
3437         n_contents) New vars.
3438         (cmd_matrix_data) Finished implementation.
3439         (compare_variables_by_mxd_vartype) New function.
3440         [DEBUGGING] (debug_print) New function.
3441         (static vars mtoken, mtokstr, mtoklen, mtokval) New vars.
3442         (read_matrices) New function.
3443         (read_matrices_without_rowtype) New function.
3444         (read_matrices_with_rowtype) New function.
3445         (read_splits) New function.
3446         (mget_token) New function.
3447         (force_eol) New function.
3448         [0] (test_tokenizer) New function.
3449         (matrix_data_source_destroy_source) New function.
3450         (glob var matrix_data_source) New var.
3451
3452         * misc.h: Include ieeefp.h if present.
3453
3454         * split-file.h: (cmd_split_file) Changes corresponding to struct
3455         dictionary changes.
3456
3457         * str.h: Fix memmem prototype.
3458
3459         * temporary.c: (save_dictionary, restore_dictionary,
3460         free_dictionary) Changes corresponding to struct dictionary
3461         changes.
3462
3463         * var.h: (MXD_* enums) New enum series.
3464         (struct matrix_data_proc) New struct.
3465         (struct split) Removed.
3466         (struct dictionary) Changed `splits' member from `split *' to
3467         `variable **'.
3468         (macro force_create_variable) New macro.  Replaced lots of
3469         create_variable()/assert() calls with calls to this macro.
3470
3471         * vars-atr.c: (discard_variables) Changed assertion.
3472         [GLOBAL_DEBUGGING] (force_create_variable) New function
3473         called by the macro of the same name.
3474         (clear_variable) Changes to delete splits from the dictionary
3475         corresponding to struct dictionary changes.
3476
3477         * vars-prs.c: (parse_variables) [GLOBAL_DEBUGGING] Check for
3478         corrupted variable `index' values in the dictionary passed in
3479         every time this function is called.
3480
3481         * vfm.c: (dump_splits, SPLIT_FILE_procfunc) Changes corresponding
3482         to struct dictionary changes.
3483
3484 Tue Jan 13 23:45:02 1998  Ben Pfaff  <blp@gnu.org>
3485
3486         * Makefile.am: (pspp_SOURCES) Add matrix-data.c.
3487
3488         * command.c: New includes.
3489         (static array cmd_table[]) Add ERASE, HOST, NEW FILE.
3490         (cmd_erase) New function.
3491         [unix] (shell) New function.
3492         (run_command) New function.
3493         (cmd_host) New function.
3494         (cmd_new_file) New function.
3495
3496         * expr-prs.c: (parse_primary) Message fix.
3497
3498         * inpt-pgm.c: Formatting fix.
3499         (cmd_reread) Implement the FILE subcommand.
3500
3501         * matrix-data.c: New file.
3502
3503         * q2c.c: (dump_header) Change output commenting style.
3504
3505         * weight.c: Comment fix.
3506
3507 Tue Jan 13 00:53:39 1998  Ben Pfaff  <blp@gnu.org>
3508
3509         * aggregate.c: (buf64_10x) Renamed buf64_1xx, all references
3510         changed.
3511         (buf_10x) Renamed buf_1xx, all references changed.
3512         (cmd_aggregate) Implemented cases 010, 011, 110, and 111 (all
3513         cases now implemented).
3514         (create_sysfile) New function.
3515         (agr_11x_func) New function.
3516
3517         * data-in.c: (parse_numeric) Work properly if there's an
3518         explicitly coded decimal point in the data and decimal places are
3519         specified on DATA LIST.  Bug reported by Dr Eberhard W Lisse
3520         <el@linux.lisse.na>.
3521
3522         * get.c: (cmd_get, cmd_save_internal) Allow extraneous slash
3523         before file specification on GET, SAVE, XSAVE.  Bug reported by Dr
3524         Eberhard W Lisse <el@linux.lisse.na>.
3525
3526         * q2c.c: [!HAVE_STRERROR] Include misc/strerror.c, not
3527         strerror.c.  Bug reported by Alexandre Oliva
3528         <oliva@dcc.unicamp.br>.
3529
3530         * sort.c: Include sort.h.  Comment fixes.  A few esthetic fixes.
3531         (static var separate_case_tab) New var.
3532         (cmd_sort_cases) Cancel temporary transformations here.  Free
3533         v_sort before return.
3534         (sort_cases) Run an EXECUTE procedure if SEPARATE is nonzero and
3535         we're reading from a sort stream.  Don't cancel temporary
3536         transformations.  Offload internal sorting to do_internal_sort().
3537         (do_internal_sort) New function.  Handles internal sorting even
3538         when SEPARATE is nonzero.  Doesn't free v_sort.
3539         (do_external_sort) Take new arg SEPARATE.  Only destroy `x' if
3540         it's non-NULL.
3541         (write_initial_runs) Take new arg SEPARATE.  Only destroy the old
3542         sink if SEPARATE is zero.
3543         (read_output_cases) Renamed read_sort_output(), all references
3544         changed.  Now uses separate_case_tab when it exists.
3545         (write_separate) New function.
3546
3547         * vfm.c: (page_to_disk) Destroy memory_source_cases, not
3548         memory_sink_cases.  Don't redundantly call
3549         vfm_source->destroy_source().
3550         (memory_stream_mode) After switching over, set memory_sink_cases
3551         to NULL.
3552
3553 Sat Jan 10 23:35:51 1998  Ben Pfaff  <blp@gnu.org>
3554
3555         * aggregate.c: (struct agr_var) Expand dbl[] array from 2 to 3
3556         elements.
3557         (static var prev_case) New, moved out of aggregate_single_case()
3558         local scope.
3559         (static var buf64_10x, buf_10x) New.
3560         (cmd_aggregate) Initialize prev_case.  Comment fixes.  Implement
3561         the 000, 001, 100, and 101 cases.  Free prev_case.
3562         (parse_aggregate_functions) Disallow scratch variables.
3563         (free_aggregate_functions) Only free agr_dict if non-null.  Use
3564         iter->function to determine numeric/string type, not
3565         iter->src->type.
3566         (aggregate_single_case) Don't manage prev_case.  Initialize
3567         aggregate info after dumping it.
3568         (accumulate_aggregate_info) Fix sum, weighted sum, mean, weighted
3569         mean, stddev, weighted stddev definitions.
3570         (dump_aggregate_info) Implemented.
3571         (initialize_aggregate_info) Renamed from
3572         initialize_aggregate_functions().  Initializes dbl[2].
3573         (agr_00x_trns_proc, agr_00x_end_func, write_case_to_sfm,
3574         agr_10x_trns_proc, agr_10x_trns_free, agr_10x_end_func) New.
3575
3576         * cases.c: (alloc_val) Removed.
3577
3578         * get.c: (cmd_save_internal) Initialize new `dict' member.
3579
3580         * sfm-write.c: (sfm_write_dictionary, write_header,
3581         write_variable, write_value_labels, write_documents) Reorganize,
3582         simplify for new parameter structure.
3583         (write_variable) Only one variable * argument now.
3584
3585         * sfm.h: (struct sfm_write_info) Removed `pri', `sec', and
3586         replaced by new `dict' member.
3587
3588         * temporary.c: (new_dictionary) Initialize n_documents.
3589
3590         * vars-atr.c: (dup_variable) Allocate `value's from dict into
3591         v->fv manually.
3592         (init_variable, replace_variable) Eliminate usage of alloc_val().
3593
3594         * vars-prs.c: (parse_DATA_LIST_vars) Accept PV_NO_SCRATCH option.
3595
3596         * vfm.c: (arrange_compaction) Allow `temporary' value of 2 to
3597         signal that AGGREGATE is to be used for forming final cases.
3598         (close_active_file) Call end_func before stopping lagging.  Cancel
3599         temporary after finishing compaction.
3600         (write_case) Comment fixes.  Cleaned up.
3601         (compact_case) Let AGGREGATE handle compaction when `temporary' is
3602         2.
3603
3604 Sat Jan 10 02:10:47 1998  Ben Pfaff  <blp@gnu.org>
3605
3606         * Makefile.am: (BUILT_SOURCES) Add means.c.
3607         (pspp_SOURCES) Add means.c.
3608         (EXTRA_DIST) Add means.q.
3609
3610         * command.c: (array cmd_table[]) Add MEANS.
3611
3612         * common.h: Esthetic fixes.  Comment fixes.  Test for
3613         MAX_SHORT_STRING greater than 8.
3614         (macros LOWEST, HIGHEST) New.
3615
3616         * data-in.c, data-list.c, recode.c: Comment fixes.
3617
3618         * means.q: New file, base version.
3619
3620         * mis-val.c: (parse_num_or_range, parse_numeric) Replace -DBL_MAX
3621         with LOWEST, DBL_MAX with HIGHEST.
3622
3623         * q2c.c: (dump_vars) Add an enum to array types giving the number
3624         of values for the enum.
3625
3626         * sfm-read.c: (sfm_read_dictionary, read_machine_flt64_info)
3627         Replace second_lowest_value with second_lowest_flt64.
3628
3629         * sfm-write.c: (write_variable, write_rec_7_34) Replace
3630         second_lowest_value with second_lowest_flt64.
3631
3632         * t-test.q: Comment fix.
3633
3634         * temporary.c: (restore_dictionary) Esthetic fix.
3635
3636         * tokens.h: (force_match_id, force_match, force_string, force_int,
3637         force_num, force_id) Replace msg() with syntax_error().
3638
3639         * var.h: (struct means_proc) New.
3640         (struct variable) Add mns member to `p' union.
3641
3642         * vars-prs.c: (parse_variable, parse_dict_variable,
3643         parse_variables, parse_DATA_LIST_vars) Replace msg() with
3644         syntax_error().
3645
3646 Thu Jan  8 22:28:41 1998  Ben Pfaff  <blp@gnu.org>
3647
3648         * Makefile.am: (pspp_SOURCES) Add tab.h.
3649
3650         * Most source files: Added a cast to unsigned char in usages of
3651         the ctype is*() functions.  Replaced `end of command expected'
3652         calls to msg() with calls to syntax_error().
3653
3654         * frequencies.q: (dump_condensed) Fix tab_dim() column reference.
3655
3656         * lexer.c: (hex_val) Removed (was dead code).
3657         (idmatch) Parenthesize function name to avoid macro expansion.
3658
3659         * postscript.c: Comment fixes.
3660         (ps_preopen_driver) Change default font size to 10pt.
3661
3662         * sfm-read.c: (read_variables) Byteswap sv.print, sv.write as
3663         int32s.
3664         (parse_format_spec) Change system-file format spec argument type
3665         to int32.  Parse the format spec with bitwise operators.
3666
3667         * sfmP.h: (struct sysfile_format) Removed.
3668         (struct sysfile_variable) Changed print, write members from
3669         sysfile_format to int32.
3670
3671         * tokens.h: Esthetic fixes.
3672         [__GNUC__] (macro id_match) New macro to hopefully speed up
3673         identifier matching.
3674         (macros match_id, match_tok, match_int) Implemented in
3675         compiler-independent manner; no longer GNU C only.
3676
3677         * vfm.h: Include time.h.
3678
3679 Mon Jan  5 11:06:15 1998  Ben Pfaff  <blp@gnu.org>
3680
3681         * data-list.c: (dump_fixed_table) Change tab_dim().
3682
3683         * dump-sysfile.c: (open_sysfile) Fix mmap() call.
3684
3685         * error.c: Include command.h.
3686
3687         * frequencies.g: Formatting fixes.
3688
3689         * frequencies.q: Add tab_dim() calls.  Make the total cell a
3690         joined cell.
3691
3692         * glob.c: Include command.h.
3693
3694         * sfm-read.c: (struct sfm_fhuser_ext) New members sysmis, highest,
3695         lowest.
3696         (sfm_read_dictionary) Initialize sysmis, highest, lowest.
3697         (sfm_read_machine_flt64_info) Update sysmis, highest, lowest.
3698         (read_variables) Byteswap sv.type; byteswap sv.print, sv.write as
3699         the other elements (is this right?).
3700         (read_variables) Use lowest, highest members.
3701         (parse_format_spec) New arg `vv' for more stringent checking.
3702         (dump_dictionary) Byteswaps nonexplicit data.
3703         (sfm_read_case) Byteswap numeric data.
3704
3705         * som.c: Initialize table_num to 1.
3706         (render_segments) Remember to increment y_index after each table
3707         segment.
3708
3709         * sysfile-info.c: (cmd_sysfile_info) Change tab_dim().  Don't call
3710         avl_count() on a NULL tree.  No title for the second table.
3711         (cmd_display) Handle DISPLAY VECTORS by calling display_vectors().
3712         Handle AS_SCRATCH as AS_NAMES.  Warn if no variables.  Re-enable;
3713         fix call to display_variables().
3714         (display_variables) Default to 4 columns, not 3.  Set up headers.
3715         Column title is Variable, not Name.  Fix index column.
3716         Add joint text.  Add tab_dim().  Handle value labels properly.
3717         Handle DISPLAY LABELS properly.  Draw boxes correctly.
3718         (describe_variable) Value labels don't need titles.  Don't clear
3719         nonexistent index column.
3720         (compare_vectors_by_name) New function.
3721         (display_vectors) New function.
3722
3723         * tab.c: (tab_height) Add assertion.
3724         (tab_null) Add debug code.
3725         (evaluate_dimensions) Add debug code.
3726
3727         * var.h: (struct variable) get_proc data is sometimes used
3728         simultaneously with other per-procedure info, therefore it was
3729         removed from the union.  All references changed.        
3730
3731 Sun Jan  4 18:13:33 1998  Ben Pfaff  <blp@gnu.org>
3732
3733         * ascii.c: (ascii_close_page) Put title on second line of headers
3734         if there is no subtitle.
3735
3736         * command.c: (glob var cur_proc) Move definition here, from
3737         common.c.
3738         (cmd_remark) Emit blank line before remarks.
3739
3740         * command.h: (glob var cur_proc) Move declaration here, from
3741         common.h.
3742
3743         * data-list.c: (dump_fixed_table) Fix messages.
3744         (dump_free_table) Call tab_nat_dim().
3745
3746         * descript.q: (dump_z_table) Modify tab_dim() call.
3747
3748         * frequencies.q: (dump_condensed, dump_statistics) Add tab_dim()
3749         call.
3750         (dump_statistics) Don't output header.
3751
3752         * groff-font.c: Minor format fix.
3753
3754         * html.c: Comment fix.
3755
3756         * list.q: (write_varname) Indent after advancing page.
3757
3758         * output.h: Minor reordering.
3759
3760         * postscript.c: Comment fixes.  Many places, '\n' was replaced by
3761         a reference to eol[].
3762         (struct ps_driver_ext) New member eol[].
3763         (ps_preopen_driver) Initialize eol[].
3764         (ps_postopen_driver) Fix sense of text for text_opt, line_opt
3765         defaults.  Handle headers.  Fix test for minimum page length.
3766         (static var option_tab[]) Add `line-ends'.
3767         (ps_option) Handle line-ends to change eol[].
3768         (postopen) Scale prop_em_width and fixed_width properly.  Set the
3769         prologue title to outp_title if applicable.  Replace the prologue
3770         line ends with eol[].  Call draw_headers() if headers are enabled.
3771         (text_width) New function.
3772         (out_text_plain) New function.
3773         (draw_headers) New function.
3774
3775         * print.c: (dump_table) Call tab_nat_dim().
3776
3777         * som.c: (som_blank_line) Only advance a line if not at the top of
3778         a page.
3779         (som_submit) Move several informational table calls here.
3780         Increment subtable_num if SOMF_NO_TITLE not set.
3781         (output_table) Advance a line if SOMF_NO_SPACING not set.
3782         (render_columns, render_segments, render_simple) Handle spacing
3783         between tables.  Handle table titles.  Remove debug output.
3784
3785         * som.h: (SOMF_*) New enum series.
3786         (struct som_table_class) New member `flags'.
3787
3788         * sysfile-info.c: (cmd_sysfile_info) Calls tab_nat_dim().  No
3789         headers or spacing.
3790         (display_variables) Calls tab_nat_dim().
3791         (describe_variable) Remove restriction on number of value labels.
3792         Make value labels separated by thin lines.
3793
3794         * tab.c: (tab_create) Default `flags' to none.
3795         (tab_float) New arg `w'.  All references changed.
3796         (tab_nat_dim) New function.
3797         (tab_output_text) No title or spacing.
3798         (tab_flags) New function.
3799         (tabi_flags) New function.
3800         (tabi_title) New function.
3801         (strip_height) Removed.
3802         (tabi_render) Skip title when necessary.
3803         (static var tab_tab_class) Add tabi_flags, tabi_title.
3804         (evaluate_dimensions) Disable display of column, row size.
3805         (sum_columns) Add title height to top header.
3806         (render_strip) Moved within file.
3807
3808         * tab.h: (struct tab_table) New member `flags'.
3809
3810         * vfm.c: (dump_splits) Calls tab_nat_dim().  No title.
3811
3812 Sat Jan  3 16:55:44 1998  Ben Pfaff  <blp@gnu.org>
3813
3814         * Most source files: Add `const' attribute in all appropriate
3815         places.
3816         
3817         * sysfile-info.c: (cmd_sysfile_info) Add tab_dim() call, add a
3818         column to the variables table for use by describe_variable().
3819         (cmd_display) Disable for the present.
3820         (display_documents) Don't wrap documents.
3821         (display_variables) Table has four columns now.
3822         (describe_variable) Table has four columns now.  Don't use a
3823         subtable, use joined cells instead.
3824
3825         * tab.c: (tab_create) Don't set `join'.
3826         (tab_realloc) ct array is not made up of a_string's.
3827         Reallocate trh, hrh, h arrays, initialize trh array.  Initialize
3828         cell contents on GLOBAL_DEBUGGING, not DEBUGGING.
3829         (text_format) New function.
3830         (tab_title) Rewritten, uses text_format().
3831         (tab_text) Rewritten, uses text_format().
3832         (tab_joint_text) New function.
3833         (tab_join) Removed.
3834         (static var hit) New variable.
3835         (render_strip) New args r1, r2.  Implement joined cells that fit
3836         on a single page.
3837         (tabi_render) Increment hit.  Pass new args to render_strip().
3838         (evaluate_dimensions) [GLOBAL_DEBUGGING] Check for uninitialized
3839         cells.  For t_naw and t_nah, ignore joined cells and null cells in
3840         calculations.
3841         
3842         * tab.h: (struct tab_join_rect) Removed.
3843         (struct tab_table) Removed `join'.
3844         (TAB_JOIN_MAIN) Removed.
3845         (struct tab_joined_cell) New struct.
3846         (TAT_NOWRAP) New enum.
3847
3848 Fri Jan  2 01:39:58 1998  Ben Pfaff  <blp@gnu.org>
3849
3850         * ascii.c: (ascii_postopen) Replace ASCII_* macros with their
3851         expansions.
3852         (ascii_postopen_driver) Fix initialization of *_spacing so that
3853         the TAL_0 bit doesn't count.
3854
3855         * data-list.c: (dump_fixed_table) Use natural width for Format
3856         column.
3857
3858         * glob.c: (rerange) Removed.
3859         (get_date) Formatting fixes.  Internationalization fix.
3860
3861         * html.c: (html_postopen_driver) Replace HTML_DEFAULT_OUTPUT_FILE
3862         with "pspp.html".
3863
3864         * postscript.c: (ps_postopen_driver) Replace
3865         PS_DEFAULT_OUTPUT_FILE with "pspp.ps".
3866
3867         * som.c: (som_submit) Don't eject page before every table.
3868         (output_table) Fix order of arguments on call to area().
3869         (render_columns) Fix calculation of max_len.
3870         
3871         * tab.c: (tabi_cumulate) Minor change to increase elegance.
3872         (render_strip) New function.
3873         (strip_height) New function.
3874         (tabi_render) Rewrite as calls to render_strip().
3875
3876         * tab.h: (TAT_* enums) Removed TAT_RICH, all references removed.
3877         Renumbered TAT_PRINTF, TAT_TITLE, TAT_FIX to correspond better
3878         with the TAB_* and OUTP_T_* constants.
3879         
3880 Thu Jan  1 11:53:52 1998  Ben Pfaff  <blp@gnu.org>
3881
3882         * Makefile.am: Formatting fixes.
3883
3884         * ascii.c: (ascii_postopen_driver) Initialize *_line_spacing[],
3885         *_line_width[].
3886
3887         * data-list.c: (dump_fixed_table) Add tab_dim() call.
3888
3889         * descript.q: (dump_z_table, display) Add tab_dim() calls.
3890
3891         * dump-sysfile.c: (glob var length) Make type off_t.
3892         (usage) Fix arguments.
3893         (main) Return 0.
3894
3895         * output.h: (OUTP_T_*) Change constants' value to match tab.h.
3896         Now right-justification is the default so many references had to
3897         change.
3898         (struct outp_class) Removed line_width, all references changed.
3899         (OUTP_DEV_*) Add OUTP_DEV_DISABLED.
3900         (struct outp_driver) Add elements horiz_line_width,
3901         vert_line_width, horiz_line_spacing, vert_line_spacing.  Remove
3902         som element.
3903
3904         * postscript.c: (outp_encodings) Formatting fixes.  Fix garbage
3905         collection.
3906         (postopen) Initialize all the informational members of
3907         outp_driver.
3908
3909         * som.c: (som_blank_line) New function, renamed from blank_line(),
3910         all references changed.
3911         (som_submit) Disables drivers whose pages can't be opened.
3912         (render_columns, render_simple, render_segments) Add debug output.
3913         (render_columns) Fix loop range.
3914         (render_simple) Don't try to render the headers, they're taken
3915         care of automatically.  Advance cp_y past the table when done.
3916         (render_segments) Fix loop ranges.
3917
3918         * tab.c: Initialize new members of tab_table.
3919         (tab_vline) Handle trv[]; don't set style for spacing-only lines.
3920         (tab_hline) Handle trh[]; don't set style for spacing-only lines.
3921         (tab_box) Handle trh[], trv[]; don't set style for spacing-only
3922         lines.
3923         (set_expr) Removed.
3924         (tab_dim) New function.
3925         (tab_col_width) Removed.
3926         (tab_row_height) Removed.
3927         (tab_output_text) Call tab_dim().
3928         (tabi_driver) Call evaluate_dimensions(), sum_columns().
3929         (tabi_area) Implemented.
3930         (tabi_cumulate) Implemented.
3931         (tabi_render) Partially implemented, but broken.
3932         (var tab_table_class) Made static.
3933         (evaluate_dimensions) New function.
3934         (sum_columns) New function.
3935
3936         * tab.h: (enum t_*) Now start at t_end.  New: t_ptw, t_nr, t_nc,
3937         t_nah, t_naw, t_neg, t_xch, t_dup, t_lbl, t_jnz, t_sac, t_sar,
3938         t_scr, t_srr, t_sentinel.  Removed: t_nat.
3939         (struct tab_table) New: wl, wr, ht, hb, trh, hrh, trv, wrv, dim,
3940         max_stack_height, w, h.  Removed: ce, re.
3941         (macro blank_line) Removed.
3942         (glob var zero_length) Removed.
3943
3944 Fri Dec 26 15:44:31 1997  Ben Pfaff  <blp@gnu.org>
3945
3946         * Most source files: include some of the new include files broken
3947         out of var.h.
3948         
3949         * Makefile.am: (pspp_SOURCES) Add all the new source files to the
3950         list.
3951
3952         * aggregate.c: (glob var outfile) Make static.
3953
3954         * command.c: (glob var pgm_state) Move here.
3955
3956         * common.c: (glob vars endian, second_lowest_value, pgmname,
3957         finished, curdate, cur_proc, start_interactive, history_file) Move
3958         here.
3959
3960         * descript.q: (structs dsc_z_score, descriptives_trns) Move here.
3961
3962         * file-handle.q: (glob vars files, inline_file) Move here.
3963
3964         * glob.c: Lost lots of glob vars, detailed in individual file
3965         entries.
3966         (init_glob) set_printer, set_screen were obsolete, deleted.
3967         set_cprompt has fewer spaces because pspp has fewer letters than
3968         fiasco.
3969
3970         * inpt-pgm.c: (glob vars inp_init, inp_init_size) Move here.
3971         (inp_nval) Made static.
3972
3973         * lexer.c: (glob vars token, tokval, tokstr, tokstr_size,
3974         tokstr_len, toklongstr, tokint) Move here.
3975
3976         * misc.c: Lost several vars and functions.
3977
3978         * set.q: (all the set_* variables) Move here.
3979
3980         * str.c: (strmaxcpy, strbarepadcpy, strbarepadlencpy, strpadcpy,
3981         blpstrset, strpadcmp, memrev, memrmem, cmp_str) Move here from
3982         misc.c.
3983
3984         * tab.c: (set_expr, tab_col_width, tab_row_height) New functions.
3985
3986         * tab.h: (enum series t_*) New enums.
3987         (struct tab_table) Use arena struct tag.  New members ce, re.
3988
3989         * tokens.h: Comment fixes.
3990
3991         * var.h: Move lots of enums and variables and functions and
3992         structures to other files.  Use and declare a lot more union and
3993         struct tags.  Comment fixes.  
3994
3995         * vector.c: (glob vars vec, nvec) Move here.
3996
3997         * vfm.c: (glob vars reinit_sysmis, reinit_blanks, init_zero,
3998         init_blanks, last_vfm_invocation) Move here.
3999
4000         * cases.h: New file.
4001         (struct long_vec) Move here.
4002         (vec_init, vec_clear, vec_insert, vec_delete, devector, envector)
4003         Move here.
4004
4005         * command.h: New file.
4006         (STATE_* enums) Move here.
4007         (glob var pgm_state) Move here.
4008
4009         * format.c: New file.
4010         (glob var formats) Move here.
4011         (parse_format_specifier_name, fmt_to_string,
4012         check_input_specifier, check_output_specifier,
4013         check_string_specifier, convert_fmt_ItoO, parse_format_specifier)
4014         Move here.
4015
4016         * format.h: New file.  Move functions now in format.c here.
4017         (FMT_* enums) Move here.
4018         (struct fmt_desc) Move here.
4019         (FCAT_* enums) Move here.
4020         (struct fmt_spec) Move here.
4021         (glob vars formats, fmt_parse_ignore_error) Move here.
4022
4023         * inpt-pgm.h: New file.
4024         (INP_* enums) Move here, make #defines into enums.
4025         (glob vars inp_init, inp_init_size) Move here.
4026
4027         * sort.h: New file.
4028         (glob vars v_sort, nv_sort) Move here.
4029         (sort_cases, read_sort_output) Move here.
4030
4031         * vector.h: New file.
4032         (struct vector) Move here, add struct tag.
4033         (glob vars vec, nvec) Move here.
4034         (find_vector) Move here.
4035
4036         * New file.
4037         (glob vars last_vfm_invocation, temp_case, reinit_sysmis,
4038         reinit_blanks, init_zero, init_blanks) Move here.
4039         (struct case_stream) Move here.
4040         (glob vars vfm_source, vfm_sink, vfm_memory_stream,
4041         vfm_disk_stream, sort_stream, data_list_source,
4042         input_program_source, file_type_source, get_source, n_lag) Move
4043         here.
4044         (procedure, write_case, lagged_case, compact_case, page_to_disk)
4045         Move here.
4046                 
4047 Wed Dec 24 22:40:42 1997  Ben Pfaff  <blp@gnu.org>
4048
4049         * Makefile.am: (pspp_SOURCES) Added html.c, som.c, som.h.
4050         (LDADD) Add libdcdflib.
4051
4052         * ascii.c: Comment and formatting fixes.  Almost every external
4053         function had an assert added, checking driver_open and page_open.
4054         (ascii_init_driver) Broken into ascii_preopen_driver,
4055         ascii_postopen_driver, ascii_close_driver.  Manages driver_open.
4056         (ascii_open_page) Sets page_open.
4057         (ascii_close_page) Clears page_open.
4058
4059         * html.c: Comment and formatting fixes.  Almost every external
4060         function had an assert added, checking driver_open and page_open.
4061         (html_init_driver) Broken into html_preopen_driver,
4062         html_postopen_driver, html_close_driver.  Manages driver_open.
4063         (html_open_page) Sets page_open.
4064         (html_close_page) Clears page_open.
4065         (html_submit) Disabled.
4066
4067         * lexer.c: (parse_string) Remove debugging printf.
4068
4069         * list.q: (determine_layout) Open a page if one is not yet open.
4070
4071         * output.c: Comment fixes.
4072         (add_class) Set the class member of the new list element.
4073         (parse_options) Don't handle device type.
4074         (colon_tokenize) New function.
4075         (configure_driver) New four-field format with a field for device
4076         type.  Now initialize driver_open, page_open, next, and prev
4077         fields.  Use new colon_tokenize() function.  Don't do a memory
4078         copy to replace a driver, it doesn't work; instead delete the old
4079         driver and insert a new one.
4080         (destroy_driver) Don't call som_destroy_driver().  Close the page
4081         if it's open.  Find the class in the list of classes and decrement
4082         that reference count.  Remove the driver from the global driver
4083         list.
4084         (outp_iterate_enabled_drivers) Renamed outp_drivers().  All
4085         references changed.  Rewritten.  Don't return a driver that's not
4086         enabled.
4087         (outp_eject_page) All references to som_internal_eject_page()
4088         changed to use this.  Sets cp_x to 0 as well as cp_y.
4089
4090         * output.h: (OUTP_I_* enums) Removed.
4091         (struct som_submission_form) Removed.
4092         (struct outp_class) init_driver broken into preopen_driver,
4093         postopen_driver, and close_driver.  submit changed to take a
4094         som_table argument.
4095
4096         * postscript.c: Comment and formatting fixes.  Almost every
4097         external function had an assert added, checking driver_open and
4098         page_open.
4099         (ps_init_driver) Broken into ps_preopen_driver,
4100         ps_postopen_driver, ps_close_driver.  Manages driver_open.
4101         (ps_open_page) Sets page_open.
4102         (ps_close_page) Clears page_open.
4103
4104         * som.c: New file, base implementation.
4105         
4106         * som.h: (struct som_table) Add struct tag.
4107         (enum SOM_COL_ACROSS) Removed.
4108         (SOM_ROWS, SOM_COLUMNS) New enums.
4109         (struct som_table_class) Add member `cumulate'.  Remove `segment';
4110         change `render' arguments.
4111         (struct som_point, struct som_rect) Removed.
4112         (som_submit_table) Fixed typo, should have been som_submit.
4113
4114         * sysfile-info: (describe_variable) Don't try to insert a
4115         subtable; just destroy it for now.
4116
4117         * t-test.q: Include dcdflib/cdflib.h instead of cdflib.h.  Fix
4118         references to value labels.
4119
4120         * tab.c: (tab_destroy) New function.
4121         (tab_columns) Change argument.
4122         [0] (tab_submit) Remove dead code.
4123         (tab_title) Allocate string from the table's arena.
4124         (tab_output_text) Only free the buffer if we allocated it.
4125         (tab_submit) New function.
4126         (static vars t, d) New static vars.
4127         (tabi_table, tabi_driver, tabi_count, tabi_area, tabi_columns,
4128         tabi_headers, tabi_cumulate, tabi_render) New functions.
4129         (glob var tab_table_class) New global var.
4130
4131         * tab.h: (struct tab_join_rect) Don't use a som_rect; directly
4132         encapsulate the rectangle.  All references changed.
4133         
4134 Sun Dec 21 16:18:58 1997  Ben Pfaff  <blp@gnu.org>
4135
4136         * All header files updated to use struct tags in addition to
4137         typedefs for all structures.  Don't use word `struct' in struct
4138         tags.
4139         
4140         * Makefile.am: (pspp_SOURCES) Remove html.c.
4141         (INCLUDES) Replace the lib/* includes with a single lib/ include;
4142         all references updated.
4143
4144         * command.c: (parse_cmd) Remove call to som_check_workspace.
4145         (output_line) Update to new som.
4146
4147         * data-in.c: (parse_numeric) A single dot is not an error; it is
4148         the system-missing value.
4149
4150         * data-list.c: (dump_fixed_table, dump_free_table) Update to new
4151         som.
4152
4153         * data-out.c: Added `const' as appropriate to many prototypes.
4154         (convert_E, convert_F, convert_CCx) Take double argument instead
4155         of value * argument.
4156         (convert_format_to_string) Call changed functions appropriately.
4157         Instead of modifying the caller's value for FCAT_SHIFT_DECIMAL,
4158         make a local copy of the value.
4159
4160         * descript.q: Remove custom_variables() prototype now provided by
4161         q2c.  
4162         (custom_variables) Don't increment sbc_variables, the caller does
4163         this.
4164         (dump_z_table, display) Update to new som.
4165
4166         * error.c: (vmsg) Add const to prototype.  Remove code to handle
4167         `too many errors' condition.
4168         (check_error_count) New function.
4169         (msg) Add const to prototype.
4170
4171         * filename.c: (open_file) Rewrite for elegance.
4172
4173         * frequencies.q: Remove custom_*() prototypes now provided by q2c.
4174         (dump_full, dump_condensed, dump_statistics) Update for new som.
4175
4176         * list.q: Don't include somP.h.  Change all references to
4177         som_driver_ext to refer to the new members of som_driver.  Change
4178         som_internal_eject_page() references to outp_eject_page().
4179
4180         * main.c: (parse) Rewrite for elegance.  Add call to
4181         check_error_count().
4182
4183         * output.c: (add_class, outp_list_classes, outp_configure_driver)
4184         Rewrite or revise for new outp_driver_class_list structure.
4185         (outp_iterate_enabled_drivers) Fix comparison between disabled
4186         devices and current device type.
4187         (outp_eject_page) New function.
4188
4189         * output.h: Comment fixes.
4190         (struct outp_driver) New members driver_open, page_open, cp_x,
4191         cp_y, font_height, prop_em_width, fixed_width.  Deleted members
4192         ref_count, next.
4193         (struct outp_driver_class_list) New struct.
4194         (outp_class_list) Changed to type outp_driver_class_list; all
4195         references updated.
4196
4197         * print.c: (dump_table, print_trns_proc) Updated for new som.
4198
4199         * q2c.c: (dump_vars) Simplify array subcommand code.  Declare
4200         prototypes for custom subcommands.
4201         (dump_subcommand) Always include the `else'.
4202         (dump_parser) Fix comments in output code.
4203
4204         * set.q: Reordered functions.
4205
4206         * som-frnt.c, som-high.c, som-low.c, somP.h: Removed.
4207         
4208         * som.h: Rewritten from scratch.
4209
4210         * str.h: Remove dead code.
4211
4212         * tab.c, tab.h: New files, base implementation.
4213
4214         * sysfile-info.c: (cmd_sysfile_info, describe_variable) Update to
4215         new som.
4216
4217         * t-test.q: New code from John Williams
4218         <johnr.williams@stonebow.otago.ac.nz>.  Include math.h, cdflib.h.
4219         Many many new static vars and defines.
4220         (precalc, postcalc, g_postcalc, z_postcalc, t_pairs, t_groups,
4221         groups_calc, pairs_calc, z_dev_calc, z_calc) New functions.
4222         (struct value_list) New struct.
4223         (variance, covariance, pooled_variance, oneway, pearson_r, f_sig,
4224         t_crt, t_sig, print_t_groups) New functions.
4225         (cmd_t_test) Implemented.
4226
4227         * temporary.c: (cancel_temporary) Only free the temp_dict if it's
4228         non-NULL.
4229
4230         * vfm.c: (dump_splits) Update to new som.
4231
4232 Thu Dec  4 23:02:22 1997  Ben Pfaff  <blp@gnu.org>
4233
4234         * Makefile.am: (fiasco_SOURCES) Add html.c.
4235
4236         * aggregate.c: Base source.
4237
4238         * ascii.c: (postopen, preclose) Reformat.
4239
4240         * data-out.c, expr-evl.c: Comment fixes.
4241         
4242         * filename.c: (open_file) When opening a file for writing, use
4243         line buffering instead of full buffering for better interactive
4244         performance.  Suggested by Valerio Aimale
4245         <valerio@svpop.com.dist.unige.it>.  Also, recognize special file
4246         names `stdin', `stdout', `stderr'.
4247
4248         * groff-font.c: Comment fixes.
4249
4250         * html.c: New file; base version.
4251
4252         * list.q: (write_all_headers, clean_up, determine_layout,
4253         list_cases) Ignore `special' devices for now.  Needs to be fixed
4254         later.
4255
4256         * output.c: (outp_init) Add html driver to list; reverse list
4257         order.
4258
4259         * output.h: (struct outp_class_struct) New members `special',
4260         `submit'; comment fixes.  All references changed.
4261
4262         * postscript.c: (ps_init_driver) Make defaults for text_opt,
4263         line_opt depend on whether the OUTP_DEV_SCREEN bit is set on the
4264         device.
4265         (postopen) Comment fix.
4266         (preclose) Comment fixes, formatting fixes.  Change x->file.file
4267         references to more proper f->file.
4268
4269         * som-high.c: (som_submit_table) Special classes use their own
4270         renderers.
4271
4272         * som.h: Comment fixes.
4273
4274         * temporary.c: (new_dictionary) Don't try to xstrdup() a NULL
4275         string.
4276         
4277 Tue Dec  2 14:36:07 1997  Ben Pfaff  <blp@gnu.org>
4278
4279         * Makefile.am: (fiasco_SOURCES) Add aggregate.c back in.
4280
4281         * aggregate.c: Still working on this.
4282
4283         * command.c: (cmd_table[]) Add AGGREGATE back in.
4284         (split_words) Make '-' a legal word separator as well as ' '.
4285
4286         * main.c: Comment fixes.
4287
4288         * q2c.c: (dump_parser) Don't require the procedure's full name to
4289         be present, in the generated source.
4290
4291         * t-test.q: Change name to `t-test' from `t test'.  Let PAIRS be
4292         multiply specified and let it be default; let MISSING, CRITERIA,
4293         FORMAT be multiply specified.
4294         (cmd_t_test) Parse command name.  [DEBUGGING] Call debug_print().
4295         (custom_groups) Fix defaults.
4296         (custom_pairs) Check whether this is a PAIRS subcommand before
4297         attempting to parse.  Better garbage collection.  Proper storage
4298         allocation.
4299         [DEBUGGING] (debug_print) New function.
4300
4301         * temporary.c: Comment fixes.
4302         (copy_variable) Don't copy variable name and index.
4303         (save_dictionary) Copy variable name and index by hand.
4304
4305         * vars-atr.c: Comment fixes.
4306         (create_variable) New dictionary argument.  All references
4307         changed.
4308         (common_init_stuff) New dictionary argument.  All references
4309         changed.
4310         (init_variable) New dictionary argument.  All references changed.
4311         (dup_variable) New function.
4312
4313         * vars-prs.c: (parse_variables) If there are any errors, we always
4314         return 0.  Previously, it was possible for some types of errors to
4315         be ignored.
4316         
4317 Sat Nov 22 01:20:59 1997  Ben Pfaff  <blp@gnu.org>
4318
4319         * Makefile.am: (fiasco_SOURCES) For 0.1.5 release, remove
4320         aggregate.c.
4321
4322         * command.c: (cmd_table[]) Comment out AGGREGATE; add T TEST.
4323
4324         * list.q, t-test.q: Remove ALL option from VARLIST declaration in
4325         grammar rules.
4326
4327         * q2c.c: Comment fixes.
4328         (SBC_* enums) Remove SBC_VARLIST_ALL; all references removed.
4329         
4330         * t-test.q: (cmd_list) Rename cmd_t_test.
4331
4332         * temporary.c: (new_dictionary) Don't declare as static.
4333         
4334 Fri Nov 21 00:03:06 1997  Ben Pfaff  <blp@gnu.org>
4335
4336         * aggregate.c: Changes, still not finished.
4337
4338         * file-handle.q, frequencies.q, list.q, set.q: Comment fixes.
4339
4340         * q2c.c: Comment fixes.  Now its output is internationalized.
4341         (get_token) Fix parsing of escapes within literal strings.
4342         (main) Fix bad #line directives in output.
4343
4344         * t-test.q: Base implementation.
4345
4346         * temporary.c: (new_dictionary) New function.
4347         (restore_dictionary) [__CHECKER__] Change fill character to *
4348         (from @).
4349         
4350 Sun Nov 16 01:29:57 1997  Ben Pfaff  <blp@gnu.org>
4351
4352         * Makefile.am: (BUILT_SOURCES, fiasco_SOURCES) Add t-test.c
4353
4354         * aggregate.c: Changes, still not finished.
4355
4356         * descript.q, list.q: Comment fixes.
4357
4358         * q2c.c: Almost completely rewritten.
4359
4360         * t-test.q: New file, not complete.
4361
4362 Fri Nov 14 00:14:48 1997  Ben Pfaff  <blp@gnu.org>
4363
4364         * aggregate.c: Changes, still not finished.
4365
4366         * sort.c: (sort_cases) Call cancel_temporary() instead of doing it
4367         by hand.
4368
4369         * temporary.c: (cancel_temporary) New function.
4370
4371         * vars-atr.c: (discard_variables) Call cancel_temporary() instead
4372         of doing it by hand.
4373
4374         * vfm.c: (close_active_file) After restoring a TEMPORARY
4375         dictionary, set temp_dict to NULL.  Cancel TEMPORARY through
4376         cancel_temporary().
4377         (SPLIT_FILE_procfunc) Comment fix.
4378
4379 Tue Oct 28 16:08:45 1997  Ben Pfaff  <blp@gnu.org>
4380
4381         * Makefile.am: (fiasco_SOURCES) Add aggregate.c.
4382
4383         * aggregate.c: New file, not finished yet.
4384
4385         * command.c: (cmd_table) Add AGGREGATE.
4386
4387         * common.h: (pgm_state) Move declaration to var.h.
4388
4389         * lexer.c: (bin_value_func, oct_value_func, hex_value_func) i18n
4390         fixes.
4391         (parse_string) Message fix.
4392
4393         * recode.c: Comment fix.
4394
4395         * sfm-read.c: (read_variables) Code esthetic fixes.
4396         (write_header) Default date is `Jan', not `JAN'.
4397
4398         * sfmP.h: (bswap_int32) [!__linux__] Fix off-by-one errors.
4399
4400         * sort.c: (cmd_sort_cases) Farm the work out to new function
4401         parse_sort_variables().
4402         (parse_sort_variables) New function.
4403         (sort_cases) New function.  Cancels temporary transformations,
4404         which sorting didn't do previously.
4405         (cmd_sort_cases) Better garbage collection on error.  Uses
4406         do_external_sort().
4407         (write_initial_runs, merge_once) Improved code esthetics.
4408         (sort_stream_read) Reduced to one call to read_output_cases().
4409         (read_output_cases) New function.
4410
4411         * var-labs.c: (cmd_variable_labels) Re-enabled truncation of
4412         variable labels to 120 characters.
4413
4414         * var.h: Comment fixes.
4415         (glob var pgm_state) From common.h.
4416
4417         * vars-atr.c: (discard_variables) Set pgm_state to STATE_INIT.
4418
4419         * vars-prs.c: (parse_DATA_LIST_vars) Support PV_SINGLE in
4420         options.  Set *names to NULL on error.
4421
4422         * vfm.c: (memory_stream_init) Assert compaction_nval != 0.
4423
4424 Thu Oct  9 09:59:49 1997  Ben Pfaff  <blp@gnu.org>
4425
4426         * sfm-write.c, vfm.c: [HAVE_UNISTD] #include <unistd.h>, needed by
4427         SunOS4.  From Alexandre Oliva <oliva@dcc.unicamp.br>.
4428
4429 Wed Oct  8 18:55:24 1997  Ben Pfaff  <blp@gnu.org>
4430
4431         * vfm.c: (page_to_disk) Added missing local variables.
4432
4433 Tue Oct  7 20:23:17 1997  Ben Pfaff  <blp@gnu.org>
4434
4435         * get.c: Comment fix.
4436
4437         * sort.c: (cmd_sort_cases) Attempt to perform internal sort if the
4438         source is anything other than a disk stream, not just if it's in a
4439         memory stream.  Call page_to_disk() before external sort.
4440         (allocate_cases) Message fix.
4441
4442         * vfm.c: (prepare_for_writing) Warn user when paging workspace to
4443         disk.
4444         (page_to_disk) New function.
4445
4446 Sun Oct  5 15:56:14 1997  Ben Pfaff  <blp@gnu.org>
4447
4448         * Makefile.am: (INCLUDES) Include .. instead of $(top_srcdir).
4449
4450         * common.h: (macro strerror) Remove.  From Alexandre Oliva
4451         <oliva@dcc.unicamp.br>.
4452
4453         * get.c: (dict_delete_run) The number of variables to delete is
4454         not necessarily the number of variables that need to be shifted
4455         up.
4456         (trim_dictionary) Don't set *options to 0.  Fix bug that caused
4457         too many variables to be deleted.
4458
4459         * postscript.c: Comment fix.
4460
4461         * q2c.c: Include strerror.c.  From Alexandre Oliva
4462         <oliva@dcc.unicamp.br>.
4463
4464         * set.q: #undef ON and OFF.  From Alexandre Oliva
4465         <oliva@dcc.unicamp.br>.
4466
4467         * sfm-read.c: (sfm_read_dictionary) Don't set the file class too
4468         early, otherwise errors cause a bad free().
4469
4470         * str.h: (macro nvsprintf) s/FORMATS/FORMAT/ typo.  From Alexandre
4471         Oliva <oliva@dcc.unicamp.br>.
4472
4473         * temporary.c: (save_dictionary) Don't allocate memory if
4474         n_documents is 0.
4475
4476         * vfm.c: (memory_stream_write) Message fix.
4477
4478 Sat Oct  4 16:20:43 1997  Ben Pfaff  <blp@gnu.org>
4479
4480         * command.c: (static var cmd_table[]) Define REPEATING DATA
4481         command.
4482
4483         * common.h: Added support for broken systems that are missing
4484         EXIT_SUCCESS, EXIT_FAILURE, RAND_MAX, and/or strerror().
4485
4486         * Many source files: Replace syntax error messages via msg() with
4487         call to syntax_error().
4488
4489         * data-list.c: (dump_fixed_table) Add support for dumping table
4490         for REPEATING DATA as well as DATA LIST FIXED.
4491         (cmd_repeating_data) Allows and requires `/' between subcommands.
4492         Does proper thing with allowing rpd.starts_end to stay 0.  Allows
4493         CONTINUED specifications to be omitted.  Forces CONTINUED to be
4494         specified if ID is.  Calculates starts_end, cont_end from logical
4495         record length as reported by fhp.  Calls dump_fixed_table() if
4496         requested.  Fixed length of record copied by memcpy.
4497         (parse_num_or_var) Sets `num' to 0, not NOT_INT, for variables.
4498         Message fix.
4499         (realize_value) Returns sensible value for out-of-range variable
4500         values.
4501         (rpd_parse_record) New argument `ofs'.  Fixed confusion between
4502         length of occurrences and length of line.  Added warning for
4503         fields that exceed the line length.  Fixed infinite loop.
4504         (read_one_set_of_repetitions) Numerous minor changes for more
4505         complete SPSS compliance.  Message fixes.
4506
4507         * dfm.c: (dfm_close) If the file being closed is the inline file,
4508         read all the remaining data before closing it.
4509         (dfm_get_record) Don't close the file on lossage, as either it
4510         has been closed already or it doesn't belong to us.
4511
4512         * error.c: (puts_stdout) New function.
4513         (vmsg) Use puts_stdout instead of puts.
4514
4515         * file-handle.q: (fh_record_width) New function.
4516
4517         * inpt-pgm.c: (init_case) Fixed buffer overrun when inp_nval % 4
4518         == 0.
4519         (clear_case) Ditto.
4520         (input_program_source_read) Made an old kluge an approved method.
4521
4522         * lexer.c: (syntax_error) New function.
4523
4524         * misc.c: [BROKEN_RAND] (ansi_rand, ansi_srand; static var next)
4525         New.
4526
4527         * output.c: (oupt_get_paper_size) Message fix.
4528
4529         * q2c.c: Numerous fixes to formatting of generated code made to
4530         conform to GNU coding standards.  Uses syntax_error() in generated
4531         code.  Other miscellaneous generated message fixes.  Added support
4532         for broken systems that are missing EXIT_SUCCESS, EXIT_FAILURE,
4533         RAND_MAX, and/or strerror().
4534
4535 Sat Oct  4 02:09:56 1997  Ben Pfaff  <blp@gnu.org>
4536
4537         * data-in.c: Comment fixes.
4538
4539         * data-list.c: (struct repeating_data_trns) New member `id_spec'.
4540         (find_variable_input_spec) New function.
4541         (cmd_repeating_data) Initializes id_spec.
4542         (rpd_parse_record) Implemented.
4543         (read_one_set_of_repetitions) Returns -3 by default in order to
4544         kluge out some potential bugs.
4545
4546         * data-out.c: Comment fixes.
4547
4548         * file-type.c: (internal_cmd_record_type) Message fix.
4549
4550         * inpt-pgm.c: (input_program_source_read) Special temporary kluge
4551         for handling -3 return value.
4552
4553 Sat Sep 20 23:58:15 1997  Ben Pfaff  <blp@gnu.org>
4554
4555         * data-list.c: Comment fixes.
4556         (struct dls_var_spec) Reordered members.
4557         (read_from_data_list_fixed) Restructured.
4558         (struct repeating_data_trns) Reordered members.  Renamed `starts'
4559         as `starts_beg', `ends' as `starts_end'.
4560         (cmd_repeating_data) Calculates length of repeated data if
4561         necessary and possible.
4562         (parse_num_or_var) Don't allow string variables.
4563         (realize_value) New function.
4564         (rpd_msg) New function.
4565         (rpd_parse_record) New function.  Currently stubbed out.
4566         (read_one_set_of_repetitions) Implemented.
4567
4568         * inpt-pgm.c: (input_program_source_read) Comment fix.
4569
4570 Thu Sep 18 21:34:57 1997  Ben Pfaff  <blp@gnu.org>
4571
4572         * command.c: (cmd_end_repeat_p) Removed.
4573         (init_cmd_parser) Doesn't set cmd_end_repeat_p.
4574         (parse_cmd_name) Removed.
4575
4576         * data-list.c: Comment fixes.
4577         (data_list_pgm) Removed `eof' member.
4578         (static var first) New var.
4579         (cmd_data_list) Sets `first'.  Ensures that DATA LIST uses the
4580         FILE TYPE file inside FILE TYPE structures.
4581         (append_var_spec) Appends to *first, not dls.spec.
4582         (parse_fixed) Message fixes.
4583         (struct rpd_num_or_var) New.
4584         (struct repeating_data_trns) New.
4585         (static var rpd) New.
4586         (cmd_repeating_data) New function.
4587         (parse_num_or_var) New function.
4588         (parse_repeating_data) New function.
4589         (read_one_set_of_repetitions) New function.
4590
4591         * file-type.c: (cmd_file_type) Message fixes.  Always
4592         default_handle to FILE TYPE file handle.
4593         (internal_cmd_record_type) Message fixes.
4594
4595 Wed Aug 20 14:22:03 1997  Ben Pfaff  <blp@gnu.org>
4596
4597         * repeat.c: Comment fix.  Disable debugging.
4598
4599         * temporary.c: (restore_dictionary) Sets splits to NULL and
4600         n_splits to 0 before destroying the variables because now doing
4601         this tries to remove split variables.
4602
4603         * vars-atr.c: (discard_variables) Asserts that n_splits is 0 after
4604         destroying the dictionary.
4605         (clear_variable) Removes a variable from splits after destroying
4606         it.
4607
4608 Mon Aug 18 18:06:55 1997  Ben Pfaff  <blp@gnu.org>
4609
4610         * cmdline.c: (set_compat) Removed.
4611         (pick_compat) Removed.
4612         (parse_command_line) Removed -c option.
4613         (pre_syntax_message) Removed -c option.
4614         (usage) Remove compatibility code.
4615
4616         * common.h: (macros VER_PC, VER_WND, VER_X) Removed.
4617         (glob var compat) Removed.
4618
4619         * compute.c: (type_check) Fixed messages about type mismatches.
4620
4621         * data-list.c: (cmd_data_list) Removed compatibility code.
4622         (fixed_parse_compatible) Calls convert_negative_to_dash().
4623         Fixed bug where it only set the variable in fx.spec if it created
4624         the variable itself.
4625         (dump_fmt_list) Spelling fix.
4626         (cut_field) Removed compatibility code.
4627
4628         * dfm.c: (cmd_begin_data) Don't require a command terminator on
4629         BEGIN DATA command.
4630
4631         * expr-evl.c: (evaluate_expression) Implement LAG.
4632
4633         * expr-prs.c: (parse_add) Calls convert_negative_to_dash().
4634         (parse_neg) Calls convert_negative_to_dash().
4635         (LAG_func) Increases n_lag to the lag requested.  Fixed assignment
4636         bug.
4637
4638         * expr.h: (struct expression_struct) Removed member max_lag.
4639
4640         * file-type.c: (parse_col_spec) Calls convert_negative_to_dash().
4641         (internal_cmd_record_type) Removed special handling to produce
4642         negative numbers from dash tokens.
4643
4644         * getline.c: (static var DO_REPEAT_level) New var.
4645         (getl_add_DO_REPEAT_file) Increments DO_REPEAT_level.
4646         (handle_line_buffer) Copies the line into getl_buf; doesn't call
4647         copy_with_DO_REPEAT_substitutions().
4648         (getl_read_line) Maintains value of getl_mode.  Calls
4649         perform_DO_REPEAT_substitutions() whenever DO_REPEAT_level is
4650         positive.
4651         (getl_close_file) Decrements DO_REPEAT_level when appropriate.
4652
4653         * getline.h: (getl_mode) New glob var.
4654
4655         * glob.c: Comment fixes.
4656         (init_glob) Restructured.  Sets set_seed.
4657         (init_compat_dependent) Removed.  All references removed.
4658         (get_date) Format changed from MM/DD/YY to DD MMM YYYY.
4659         (__htonl, __htons) Removed.  (What were these for?)
4660
4661         * lexer.c: (static var tbl) Dash set to class CNUM.
4662         (make_hexit) New function from data-out.c.
4663         (get_token_representation) Rewritten.
4664         (convert_negative_to_dash) New function.
4665         (lex_init_compat_dependent) Removed.
4666         (yylex) A dash is parsed as part of a number if it is followed by
4667         a digit.  The ASCII representation of a number is copied to
4668         tokstr.  String parsing farmed out to parse_string().  Comment
4669         fixes.
4670         (bin_value_func, oct_value_func, hex_value_func, parse_string) New
4671         functions.
4672         (preprocess_line) Line processing depends on interactive/batch
4673         mode, not on compatibility mode.  Removed PC+ compatibility code.
4674
4675         * loop.c: (loop_3_trns_proc) Comment fix.
4676
4677         * main.c: Remove dead code.
4678         (main) Remove call to init_compat_dependent().
4679
4680         * misc.c: (convert_fmt_ItoO) Make E format conversion more
4681         conformant.
4682
4683         * print.c: (parse_string_argument) Calls
4684         convert_negative_to_dash().
4685         (fixed_parse_compatible) Calls convert_negative_to_dash().
4686
4687         * repeat.c: (RPT_* defines) Removed.
4688         (struct rpt_numeric) Removed.
4689         (struct repeat_entry) New member type, changed `replacement' from
4690         char * to char **.
4691         (clean_up) Deallocation adapted to new repeat_entry.
4692         (internal_cmd_do_repeat) `type' defaults to 0.  Remove lookahead()
4693         usage.  Creates vars for `type' of 1.
4694         (parse_ids) Sets type of 1.  Adapted to new repeat_entry.
4695         (store_numeric) Rewritten, new interface.
4696         (parse_numbers) Rewritten.
4697         (parse_strings) Rewritten.
4698         (find_DO_REPEAT_substitution) New function.
4699         (perform_DO_REPEAT_substitutions) New function.
4700         (copy_with_DO_REPEAT_substitutions) Removed.
4701         (debug_print) Rewritten.
4702
4703         * set.q: Comment fix.
4704         (custom_results) Removed compatibility code.
4705         (internal_cmd_set) Removed SET EMULATION subcommand.  Removed
4706         compatibility code.
4707
4708         * sysfile-info.c: (cmd_display) Removed compatibility code.
4709
4710         * tokens.h: Comment fixes.
4711         (token types enum) Removed `toktype' typedef name for this int
4712         type.  Removed SUBST.  Restructured.
4713
4714         * vars-atr.c: (discard_variables) Sets n_lag to 0.
4715
4716         * vars-prs.c: Comment fix.
4717
4718         * vfm.c: Comment fixes.
4719         (glob var n_lag) New var.
4720         (static vars lag_count, lag_head, lag_queue) New vars.
4721         (procedure) Removed argument nlag.
4722         (setup_lag) New function.
4723         (close_active_file) Discards lagging state.
4724         (lag_case) New function.
4725         (lagged_case) New function.
4726         (write_case) Lags a case if lagging.
4727
4728         * weight.c: (cmd_weight) Removed compatibility code.
4729         
4730 Sun Aug 17 22:34:40 1997  Ben Pfaff  <blp@gnu.org>
4731
4732         * getline.h: (struct getl_script) New members loop_index, macros.
4733
4734         * getline.c: (getl_add_file) Sets first_line field to NULL.
4735         (getl_add_DO_REPEAT_file) New function.
4736         (handle_line_buffer) When the current line's length is negative,
4737         set the filename and line number.  Increment line number after
4738         reading line.  Pass the line to
4739         copy_with_DO_REPEAT_substitutions() for processing.
4740         (getl_close_file) Free DO REPEAT lines before freeing the
4741         filename, and just set the filename to NULL when doing this,
4742         because otherwise the filename gets freed twice.
4743
4744         * glob.c: (glob var queuing) Removed.  All references removed.
4745
4746         * lexer.c: Comment fixes.
4747         (get_token_representation) New function.
4748
4749         * repeat.c: Comment fixes.
4750         (struct repeat_entry) Replaced type and v union members with a
4751         simple string.
4752         (append_record) New function.
4753         (internal_cmd_do_repeat) Started reforming it for the new
4754         repeat_entry struct.  Properly records filename changes in the
4755         getl_line_buf.  Fixed improper use of = for ==.  Fixed sense of
4756         strncasecmp() result usage.  Uses append_record() to simplify.
4757         Properly discards END REPEAT line.  Calls getl_add_DO_REPEAT_file
4758         to add in the file.
4759
4760         (copy_with_DO_REPEAT_substitutions) Started coding.
4761
4762         [DEBUGGING] (debug_print_lines) New function.
4763
4764         * set.q: (custom_results, internal_cmd_set) s/VER_PCP40/VER_PC/;
4765
4766         * tokens.h: (macro is_id1, is_idn) New macros.
4767
4768 Sat Aug 16 10:57:41 1997  Ben Pfaff  <blp@gnu.org>
4769
4770         * cmdline.c: (static var pre_syntax_message) Changed `win'
4771         compatibility mode to `wnd'.
4772
4773         * data-list.c: (fixed_parse_spss) Renamed
4774         fixed_parse_compatible().
4775
4776         * glob.c: (init_glob) Excise unused code for
4777         program_invocation_short_name.
4778
4779         * lexer.c: (preprocess_line) Leading indentors are ignored in Wnd
4780         as well as in X.
4781
4782         * print.c: (fixed_parse_spss) Renamed fixed_parse_compatible().
4783
4784         * set.q: `win' compatibility renamed `wnd'.
4785
4786 Thu Aug 14 22:11:12 1997  Ben Pfaff  <blp@gnu.org>
4787
4788         * filename.c: [__WIN32__] Change the included Windows header files
4789         (again).
4790         (absolute_filename_p) [__MSDOS__] A filename with a colon as the
4791         second character is absolute.
4792         (dirname) Fix logic error.  Don't printf() the results.
4793         (prepend_dir) Don't printf() the results.
4794
4795         * getline.c: (handle_line_buffer) New function.
4796         (getl_read_line) Reads line with handle_line_buffer() when
4797         appropriate.
4798         (getl_close_file) Discard line buffer data.
4799
4800         * getline.h: Comment fixes.
4801         (struct getl_line_list) New struct.
4802         (getl_script_struct) Added line buffer members.  These are hooks
4803         for use by DO REPEAT to allow it to insert virtual source code
4804         into the program.
4805
4806         * glob.c: (init_glob) [__DJGPP__ || (__WIN32__ && __BORLANDC__)]
4807         Override Borland C++ stupidity that claims Windows has a console
4808         window size of 0x3.
4809
4810         * repeat.c: This is in the process of being restructured from
4811         using a token-buffering approach to the DO REPEAT facility to
4812         using the more flexible approach of a line-buffering approach in
4813         conjunction with the getline module.  Comment fixes.
4814         (struct tok_struct) Removed.
4815         (static vars queue_index, queue_head, queue) Removed.
4816         (static vars line_buf_head, line_buf_tail) New vars.
4817         (internal_cmd_do_repeat) Instead of queuing tokens, queue lines.
4818         Not complete.
4819         (pull_queue, destroy_queue) Removed.
4820         [DEBUGGING] (debug_print_tokens) Removed.
4821
4822 Tue Aug  5 13:57:58 1997  Ben Pfaff  <blp@gnu.org>
4823
4824         * file-handle.q: (prepend_current_directory) New function.
4825         (internal_cmd_file_handle, fh_get_handle_by_filename) Prepends
4826         current directory before normalizing filename.
4827
4828         * filename.c: (gnu_getcwd) New function.
4829         (absolute_filename_p) New function.
4830         (search_path) New argument, PREPEND.  All references changed to
4831         pass NULL except those explicitly mentioned.  Uses
4832         absolute_filename_p().  Prepends PREPEND before trying the
4833         filename.
4834         (dirname, prepend_dir) New functions.
4835
4836         * getline.c: (getl_get_current_directory) New function.
4837         (getl_include) Passes getl_get_current_directory() as PREPEND arg
4838         to search_path().
4839                 
4840 Sun Aug  3 11:42:36 1997  Ben Pfaff  <blp@gnu.org>
4841
4842         * In several source files, the term `script' was replaced with
4843         `syntax file' inside error messages.  Usage of the term `script'
4844         in the sense of a syntax file is now deprecated.
4845
4846         * cmdline.c: (static vars pre_syntax_message, post_syntax_message)
4847         Updated messages.
4848
4849         * dump-sysfile.c: (usage) Update message.
4850
4851         * getline.c: (getl_read_line) Ignore lines beginning with `#!'.
4852
4853         * getline.h: (glob var getl_include_path) Declare extern.
4854
4855         * list.q: Define EXTERN as extern before #including somP.h.
4856
4857         * var.h: Remove declaration of `disptype' variable.
4858
4859         * vfm.c: (close_active_file) After switching the data sink to a
4860         data source, set vfm_sink to NULL, because it doesn't exist any
4861         more.
4862
4863 Thu Jul 17 21:41:44 1997  Ben Pfaff  <blp@gnu.org>
4864
4865         * glob.c: [__BORLANDC__] Include math.h.  Define _matherr() and
4866         _matherrl() to ignore all math errors.
4867
4868         * sfm-read.c: (read_value_labels) When reading the labels from
4869         disk, read the little parts separately instead of as a struct;
4870         this avoids alignment problems.
4871
4872         * sfm-write.c: (struct sfm_fhuser_ext) New member `elem_type'.
4873         (sfm_write_dictionary) Sets elem_type and frees it on lossage.
4874         (write_header) Allocates and initializes elem_type.
4875         (sfm_write_case) Uses elem_type to determine how to handle each
4876         flt64 element.
4877         (sfm_close) Frees elem_type.
4878
4879         * sfmP.h: Comment fix.
4880         [__BORLANDC__] Uses #pragma -a to adjust structure member
4881         alignment.
4882         
4883 Thu Jul 17 01:55:12 1997  Ben Pfaff  <blp@gnu.org>
4884
4885         * Makefile.am: (fiasco_SOURCES) Remove display.c.
4886
4887         * common.c: Fix typo.
4888
4889         * dfm.c: (read_record) Remove strncasecmp() emulation and fix the
4890         sense of the condition.
4891
4892         * expr-evl.c: (macro ALLOC_STRING_SPACE) [!PAGED_STACK] Add
4893         line-continuation backslash.
4894
4895         * filename.c: [__WIN32__] Include <windef.h> before <winbase.h>.
4896
4897         * frequencies.q: (custom_grouped, add_percentile) Don't use a
4898         non-constant expression as an argument to sizeof.
4899
4900         * glob.c: [__WIN32__ && __BORLANDC__] When including <conio.h>,
4901         undefine gettext macro because that's a conio function.
4902
4903         * hash.h: (hsh_prime_tab declaration) Remove.
4904
4905         * list.q: (write_fallback_headers) Move `leader' allocation out of
4906         main loop.  Change to local_alloc() allocation.
4907
4908         * output.h: Formatting fixes.  Put __attribute__ in right place on
4909         function prototypes.
4910
4911         * sfm-read.c: (read_machine_flt64_info, read_variables) Change
4912         incorrect `SECOND_LOWEST_VALUE' references to proper
4913         `second_lowest_value'.
4914
4915         * som-frnt.c: (EXTERN macro) Define as `extern' instead of null
4916         value.  This way 2 out of 3 of the som files define the vars
4917         extern, the correct way, that actually works under BC++.
4918         (som_set_float) Don't use nonconstant initializers for a struct.
4919
4920         * som-high.c: Add the standard alloca() header.
4921         (replicate_table) Add prototype.
4922
4923         Merged DISPLAY routine.
4924         * sysfile-info.c: (AS_*) New enum series.
4925         (cmd_sysfile_info) Gutted.  Calls describe_variable() to do the
4926         dirty work.
4927         (cmd_display, display_macros, display_documents,
4928         display_variables) Stolen from defunct display.c.
4929         (describe_variable) New function.
4930
4931         * temporary.c: [0] (display_tree) New debug function.
4932         (copy_variable) Performs shallow copy of value labels instead of
4933         deep copy; i.e., just copys the AVL tree and increments the
4934         reference counts.
4935
4936         * val-labs.c: Comment fixes.
4937         (do_value_labels) Optionally skip leading forward slash.
4938         (get_label) Creates only a single value label instead of many
4939         copies of one, and sets the reference count.
4940
4941         * display.c: Removed.
4942
4943         * dump-sysfile.c: New file, not yet complete.
4944
4945 Fri Jul 11 23:02:18 1997  Ben Pfaff  <blp@gnu.org>
4946
4947         For lots of source files I added more verbose_msg's.  These aren't
4948         listed below as they have tested as being benign.  In some cases
4949         these replaced debug_printf() calls.
4950
4951         * output.c: (outp_read_devices) Message fix.
4952
4953         * postscript.c: (output_encodings) Message fix.  Reports errors on
4954         fclose().
4955         (postopen) Message fix.
4956         
4957 Fri Jul 11 14:09:40 1997  Ben Pfaff  <blp@gnu.org>
4958
4959         * dfm.c: (dfm_close) Don't call fclose() for a NULL FILE.
4960
4961         * filename.c: (close_file_ext) Set f->file to NULL *after* closing
4962         it.
4963
4964         * main.c: Remove <malloc.h> #include.
4965
4966         * mis-val.c: (parse_numeric) Set .f member for each missing[]
4967         instead of trying to just set the missing[] itself, which is a
4968         gcc-specific idiom.
4969
4970         * sfm-read.c: (read_variables) Same.
4971
4972         * str.h: Add memmem() prototype.
4973
4974         * val-labs.c, var-labs.c: Replace <malloc.h> with <stdlib.h>.
4975
4976 Thu Jul 10 22:13:53 1997  Ben Pfaff  <blp@gnu.org>
4977
4978         * Makefile.am: (q2c) Don't include any libraries in the link.
4979
4980         * dfm.c: (force_line_buffer_extension) New macro.
4981         (count_tabs) New function.
4982         (tabs_To_spaces) New function.
4983         (read_record) Calls tabs_to_spaces() on the line being processed.
4984
4985         * q2c.c: Disabled i18n for this proglet so that libintl.a doesn't
4986         have to be compiled twice (once for CC, once for LOCAL_CC).
4987  
4988 Sun Jul  6 19:14:33 1997  Ben Pfaff  <blp@gnu.org>
4989
4990         * Makefile.am: (INCLUDES) Add intl directory; fix directories.
4991         (LDADD) Add @INTLLIBS@.
4992         (q2c) Add LIBS, @INTLLIBS@ to link step.
4993
4994         * inpt-pgm.c: Turn off debugging.
4995
4996         * postscript.c: (postopen) Format fix.  local_free() blocks
4997         returned by local_alloc(); don't free() them.
4998
4999 Sat Jul  5 23:44:51 1997  Ben Pfaff  <blp@gnu.org>
5000
5001         * data-in.c: (parse_string_as_format) Comment fix.  Fix check for
5002         string length.
5003
5004         * data-list.c: (read_from_data_list_fixed) Pass proper value for
5005         LEN arg, not simply the full string length.
5006
5007         * sort.c: (allocate_file_handles) Check SPSS compatible temp file
5008         directories before generic temp file directories.
5009
5010         * vfm.c: Disable debugging.
5011
5012 Fri Jul  4 13:26:41 1997  Ben Pfaff  <blp@gnu.org>
5013
5014         * get.c: Comment fix.
5015         (cmd_save_internal) Always passes GTSV_OPT_SAVE option.
5016
5017 Wed Jun 25 22:52:28 1997  Ben Pfaff  <blp@gnu.org>
5018
5019         * expr-prs.c: (debug_print_postfix) Conditionally included on
5020         GLOBAL_DEBUGGING.  Removed out_header() reference.
5021
5022         * exprP.h: Removed #undef GLOBAL_DEBUGGING.
5023
5024 Sun Jun 22 22:00:28 1997  Ben Pfaff  <blp@gnu.org>
5025
5026         * ascii.c: Removed obsolete ascii_close_page() prototype.
5027
5028         * command.c: (output_line) Comment fix.
5029
5030         * data-in.c: Formatting fix.
5031         (parse_string_as_format) Now the `fc' argument is used only for
5032         the purpose of error messages; it is not an index into the string
5033         passed.  All references changed.
5034
5035         * data-list.c: Comment fix.
5036         (cut_field) Comment fix.  Now returns the column number of the
5037         position of the field cut out on success.
5038         (parse_field) Added `column' argument.  Puts the column numbers in
5039         the error message.
5040         (read_from_data_list_free, read_from_data_list_list) Record the
5041         column number returned by cut_field(), pass it to parse_field().
5042
5043         * dfm.c: Comment fix.
5044
5045         * do-ifP.h: Comment fix.
5046
5047         * expr-prs.c: (SYSMIS_func) Implemented string-type arguments for
5048         the SYSMIS function.
5049
5050         * expr.h, exprP.h: Comment fix.
5051
5052         * glob.c: (init_glob) Only calls setlocale() and family if
5053         ENABLE_NLS set.
5054
5055         * hash.h: Comment fix.
5056
5057         * include.c: Comment fix.
5058
5059         * output.c: Comment fix.
5060
5061         * postscript.c: (ps_line_intersection) Simplified assertion.
5062
5063         * repeat.c: Comment fix.
5064
5065         * vars-atr.c: Comment fix.
5066
5067         * vars-prs.c: Comment fix.
5068
5069         * vfm.c: (vector_initialization) [DEBUGGING] Fixed undefined
5070         behavior with usage of postincrement.
5071         (memory_stream_read) Discards cases as it goes. 
5072
5073 Sun Jun 15 16:45:17 1997  Ben Pfaff  <blp@gnu.org>
5074
5075         * Makefile.am: Cleans q2c, not just distcleans it.  Distcleans
5076         foo.
5077
5078         * Most source files: Includes debug-print.h, related comment
5079         fixes.
5080
5081         * cases.c: (alloc_val) Removed complex allocation code.  Merely
5082         increments default_dict.nval and returns the former value.
5083         (envector, devector) Removed references to lv member of struct
5084         variable.
5085
5086         * common.h: (macro VME) Replaced complex definition with simple
5087         one.
5088
5089         * data-list.c: (cmd_data_list) Sets vfm_source instead of
5090         read_active_file and cancel_input_pgm.
5091         (read_from_data_list, cancel_data_list) Removed.
5092         (data_list_source_read, data_list_source_destroy_source) New
5093         functions.
5094         (glob var data_list_source) New var.
5095
5096         * dfm.c: (open_file_r, open_file_w) Simplified debug output.
5097         (cmd_begin_data) Improved criteria for an input program accessing
5098         the inline file.  Still not perfect.
5099
5100         * do-if.c: (do_if_trns_proc) Simplified debug output.
5101
5102         * expr-prs.c: Comment fixes.
5103         [DEBUGGING] (debug_print_postfix) Simplified debug output.
5104
5105         * file-handle.q: (fh_close_handle) Simplified debug output.
5106
5107         * file-type.c: Comment fixes.
5108         (cmd_file_type) Sets vfm_source instead of read_active_file and
5109         cancel_input_pgm.
5110         (cmd_end_file_type) On failure, discards variables in place of
5111         just canceling the input program.
5112         (read_from_file_type) Renamed file_type_source_read.
5113         (cancel_file_type) Renamed file_type_source_destroy_source.
5114         (glob var file_type_source) New var.
5115
5116         * get.c: (GTSV_* enum series) New enums GTSV_OPT_SAVE, GTSV_NONE.
5117         (cmd_get) Initializes options to GTSV_NONE before passing to
5118         trim_dictionary().  Removed `lv' reference.  Sets vfm_source
5119         instead of read_active_file and cancel_input_pgm.
5120         (cmd_save_internal) Initializes options before passing to
5121         trim_dictionary().  Local var `nval' removed.
5122         (dict_delete_run) Comment fixes.
5123         (trim_dictionary) Comment fixes.  Disallows scratch variables if
5124         GTSV_OPT_SAVE set in options.
5125         (read_from_get) Renamed get_source_read.
5126         (cancel_get) Renamed get_source_destroy_source.
5127         (glob var get_source) New var.
5128
5129         * inpt-pgm.c: (cmd_input_program) Sets vfm_source instead of
5130         read_active_file and cancel_input_pgm.
5131         (read_from_input_program) Renamed input_program_source_read.
5132         Simplified debug output.
5133         (cancel_input_program) Renamed
5134         input_program_source_destroy_source.
5135         (glob var input_program_source) New var.
5136
5137         * loop.c: (loop_1_trns_proc) Simplified debug output.
5138
5139         * main.c: (dump_token) Made eof output more explicit.
5140
5141         * sfm-read.c: (read_variables, dump_dictionary) Removed `lv'
5142         references.
5143
5144         * sort.c: (cmd_sort_cases) Disallows scratch variables.  Removed
5145         code for always-memory or always-disk cases.  malloc's case-list
5146         based on vfm_source_info.ncases.  Explicit support for
5147         memory_stream via memory_source_cases.
5148         (do_external_sort) Sets vfm_source instead of read_active_file and
5149         cancel_input_pgm.
5150         (allocate_file_handles) The temporary directory permissions are
5151         set to 0700 instead of 0777.
5152         (allocate_cases) Formatting fixes.  Simplified debug output.
5153         (output_record) Compacts the case if necessary before writing it
5154         out.
5155         (close_handle, open_handle_w) Simplified debug output.
5156         (write_initial_runs) Destroys vfm_sink, then sets it to
5157         sort_stream.  Writes records to memory based on
5158         vfm_sink_info.case_size.
5159         (write_to_sort_cases) Renamed sort_stream_write().
5160         (merge) Simplified error handling.  Simplified debug output.
5161         Formatting fixes.
5162         (read_from_external_sort) Renamed sort_stream_read().
5163         Reads records based on vfm_source_info.case_size.
5164         (sort_stream_write) Writes records to memory based on
5165         vfm_sink_info.case_size.
5166         (sort_stream_mode) New function.
5167         (glob var sort_stream) New variable.
5168
5169         * temporary.c: (cmd_temporary) Simplified debug output.
5170         (copy_variable) Removed references to `lv'.
5171
5172         * title.c: (get_title) Simplified debug output.
5173
5174         * var.h: Comment fixes.
5175         (struct get_proc) Removed member `lv'.
5176         (struct variable) Removed member `lv'.  Comment fixes.
5177         (glob vars read_active_file, write_active_file, cancel_input_pgm)
5178         Removed.
5179         (struct case_stream) New.
5180
5181         * vars-atr.c: (discard_variables) Changed cancel_input_pgm,
5182         read_active_file references to use vfm_source.
5183         (init_variable, replace_variable) Removed references to `lv'.
5184
5185         * vfm.c: Comment fixes.
5186         (glob var vfm_source, vfm_sink, vfm_source_info, vfm_sink_info)
5187         New variables.
5188         (static var queue, qh, qt, n_lag) Removed.  All references
5189         removed.
5190         (glob var compaction_necessary, compaction_nval, compaction_case,
5191         paging) New variables.
5192         (record_case) Removed.
5193         (procedure) Comment fixes.  Calls vfm_source->read() instead of
5194         read_active_file().
5195         (lag) Removed.
5196         (prepare_for_writing, arrange_compaction, make_temp_case,
5197         vector_initialization, setup_filter) New function.
5198         (open_active_file) Most of the code moved into the abovementioned
5199         new functions.  Now sets temp_dict to &default_dict if there is no
5200         temporary dictionary, for convenience.  New debug output.
5201         (close_active_file) Deals with changing the sink to the source.
5202         Calls finish_compaction().  Frees compaction_case.  Mostly
5203         rewritten.
5204         (glob vars disk_source_file, disk_sink_file) New vars.
5205         (destroy_active_file, read_from_memory) Removed.
5206         (disk_stream_init, disk_stream_read, disk_stream_write,
5207         disk_stream_mode, disk_stream_destroy_source,
5208         disk_stream_destroy_sink) New functions.
5209         (glob var vfm_disk_stream) New var.
5210         (glob vars memory_source_cases, memory_sink_cases,
5211         memory_sink_iter, memory_sink_max_cases) New vars.
5212         (memory_stream_init, memory_stream_read, memory_stream_write,
5213         memory_stream_mode, memory_stream_destroy_source,
5214         memory_stream_destroy_sink) New functions.
5215         (glob var vfm_memory_stream) New var.
5216         (write_case) Local var `i' renamed `cur_trns'; local var `retval'
5217         named `more_cases'.  Simplified debug output.  Otherwise mostly
5218         rewritten.
5219         (record_case) Moved into the stream drivers.  Removed.
5220         (transform) Removed (was dead code).
5221         (SPLIT_FILE_procfunc) s/vfm_replacement/vfm_sink_info/.  In the
5222         common case that the splits don't change, we don't need to copy
5223         the case into prev_case again--pointless.
5224         (compact_case) New function.
5225         (finish_compaction) New function.
5226
5227         * vfmP.h: Comment fixes.
5228         (DEV_* enum series) Removed. 
5229         (struct storage) Renamed `stream_info'.  Removed variant record.
5230         Removed `device' member.
5231
5232         * debug-print.h: New file.
5233         
5234 Sun Jun  8 01:12:38 1997  Ben Pfaff  <blp@gnu.org>
5235
5236         * autorecode.c: Turned off debugging.
5237
5238         * data-list.c: (destroy_dls) Closes the associated file handle.
5239
5240         * descript.q: (custom_variables) Added PV_NO_SCRATCH to
5241         parse_variables() options.
5242
5243         * dfm.c: (open_file_r) Removed gratuituous argument to msg() call.
5244
5245         * display.c: (display_variables) Really fixed null cell bug.
5246
5247         * file-handle.q: (fh_close_handle) Changed debugging message.
5248
5249         * frequencies.q: (custom_variables) Added PV_NO_SCRATCH to
5250         parse_variables() options.
5251
5252         * list.q: Added PV_NO_SCRATCH in q2c varlist options.
5253         (cmd_list) Fails if no variables specified.
5254         (determine_layout) Writes blank lines manually.
5255
5256         * loop.c: (loop_1_trns_proc) Made debugging code only print
5257         messages if debugging.
5258
5259         * q2c.c: (dump_subcommand) Appends sbc->message to SBC_VARLIST
5260         parse_variables() arguments.
5261         (main) Parses optional parenthesized options to varlist
5262         subcommands into sbc->message.
5263
5264         * sfm-read.c: Format fix.
5265
5266         * var.h: (FV_*) New enum series.
5267         (PV_*) New enum PV_NO_SCRATCH.
5268
5269         * vars-prs.c: (find_var) Removed.
5270         (fill_all_vars) Takes FV_* enum instead of boolean third
5271         argument.  Rewritten to deal with scratch as well as system
5272         variables.
5273         (parse_variables) Error message on scratch variable if
5274         PV_NO_SCRATCH set.
5275
5276         * vfm.c: (static var virt_begin_func) New var.
5277         (procedure) Sets up virt_begin_func.
5278         (SPLIT_FILE_procfunc) For the first case, calls virt_begin_func()
5279         after dump_splits().  For succeeding groups changes, calls
5280         virt_begin_func() instead of begin_func().      
5281
5282 Fri Jun  6 22:42:23 1997  Ben Pfaff  <blp@gnu.org>
5283
5284         * count.c, data-out.c, file-handle.q, list.q, loop.c: Turned off
5285         debugging.
5286
5287         * dfm.c: Added some debugging messages, disabled by default.
5288         (open_file_r) Fixed error message.
5289         (read_record) On eof on inline_file, instead of calling
5290         fh_close_handle(), simply jump to eof label like a normal file.
5291         Message fixes.
5292
5293         * display.c: Thin lines between rows for certain kinds of
5294         listing.  Fixed `null cell' bug.
5295
5296         * error.c: (failure) Flush stdout, stderr before failing.
5297
5298         * file-handle.q: (fh_close_handle) Added debugging message.
5299
5300         * frequencies.q: (dump_full) Bottom line extends across entire
5301         table width.  Changed title formatting.
5302         (dump_condensed) Changed title formatting.
5303         (dump_statistics) Fixed title formatting.
5304
5305         * glob.c: (init_glob) Moved initialization of cur_proc out of #if.
5306         Sets default value of set_format.
5307
5308         * list.q: (cmd_list) Calls blank_line() before determine_layout().
5309         Passes write_all_headers() to procedure() as pre-group func.
5310         (write_all_headers) New function.
5311         (determine_layout) Removed calls to write_header().
5312         Calls blank_line() before and after write_fallback_headers().
5313
5314         * recode.c: (recode_trns_free) Only attempts to free head->map if
5315         non-NULL.
5316
5317         * sfm-read.c: (read_variables) Allows `#' at beginning of system
5318         file variable names but gives a warning.  Sets `left' based on
5319         first character being/not being `#'.  On lossage frees dict->var.
5320
5321         * som-high.c: (som_draw_title) Simplified title formatting.
5322
5323         * vfm.c: (dump_splits) Fixed and changed splits formatting.
5324
5325 Thu Jun  5 22:51:15 1997  Ben Pfaff  <blp@gnu.org>
5326
5327         * autorecode.c: (cmd_autorecode) Sets h_trans to NULL at
5328         beginning.  Frees v_src, v_dest on successful exit.  Frees
5329         h_trans[*], h_trans on lossage.
5330         (recode) Frees h_trans[*], h_trans.
5331
5332         * dfm.c: (dfm_close) Formatting change.
5333         (open_inline_file) Now passed a dfm_fhuser_ext to initialize; no
5334         longer allocates its own in inline_file.
5335         (open_file_r) Passes the local dfm_fhuser_ext to
5336         open_inline_file().
5337         (open_file_w) Message fix. 
5338         (read_record) Buffer reallocation strategy changed.  Frees
5339         ext->line even in inline_file to prevent leaks.
5340         (dfm_put_record) Fixed bug where `ext' was cached before the file
5341         was opened and thus it would be NULL when the file really was
5342         open.
5343         (cmd_begin_data) Sets up inline_file basics itself, then calls
5344         open_inline_file() for the dfm_fhuser_ext.  Formatting fix.
5345
5346         * list.q: (write_line) Formatting fix.
5347         (clean_up) Minor strategy change.  Sets proportional font after
5348         finishing cleanup.
5349         (determine_layout) Sets fixed font before writing regular headers,
5350         or after writing fallback headers.
5351
5352         * modify-vars.c: (cmd_modify_vars) Frees variable lists for DROP
5353         and KEEP vars after using them.
5354
5355         * postscript.c: (ps_init_driver) Frees x->family.
5356         (postopen) When loading fonts, free the temporary font name buffer
5357         after using it.
5358         (ps_text_set_font_by_position) Free temporary font name buffer
5359         after using it.
5360         (text) Fixed code that calculated `lig' so that `lig' always gets
5361         initialized.  Formatting fix.
5362
5363         * som-low.c: (get_cell_size, som_get_table_size) `prop_height' ->
5364         `font_height'.
5365         [GLOBAL_DEBUGGIGN] (check_table) Use arena_alloc() to allocate
5366         cells, not xmalloc(), so that the cells will get destroyed
5367         automatically.
5368
5369         * sysfile-info.c: (cmd_sysfile_info) Frees the dictionary after
5370         using it.
5371
5372 Tue Jun  3 23:33:22 1997  Ben Pfaff  <blp@gnu.org>
5373
5374         * ascii.c: (ascii_text_draw) Always sets metrics for strings that
5375         are drawn.
5376
5377         * dfm.c: Comment fix.
5378
5379         * list.q: Comment fixes.  Include somP.h.  Removed static vars
5380         table, n_columns, n_rows, part.  New struct list_ext.  New static
5381         var line_buf.
5382         (n_lines_remaining, n_chars_width, write_line) New functions.
5383         (cmd_list, list_cases) Rewritten.
5384         (begin_row, end_row, flush_table) Removed.
5385         (write_header, clean_up, write_varname, write_fallback_headers,
5386         determine_layout) New functions.
5387
5388         * output.c: (outp_iterate_enabled_drivers) Minor reformat.
5389
5390         * output.h: Comment fix.
5391
5392         * postscript.c: Comment fix.
5393         (struct ps_driver_ext) Removed prop_size, fixed_size members;
5394         added font_size.  All references changed.
5395         (ps_init_driver) Initializes font_size.  Simplified space checking
5396         code.
5397         (static var option_tab[]) Removed prop-size, fixed-size; added
5398         font-size.
5399         (ps_option) Handles font_size.
5400
5401         * som-high.c: Moved prototypes into somP.h.
5402         (som_init_driver) New function.
5403         (som_submit_table) Moved some code into new function
5404         som_init_driver().
5405         (build_target) Moved some code into new function
5406         som_internal_eject_page().
5407         (som_eject_page) Uses som_internal_eject_page().
5408         (som_internal_eject_page) New function.
5409
5410         * som-low.c: Moved prototypes into somP.h.
5411
5412         * som.h: Formatting fixes.
5413
5414         * somP.h: (struct som_driver_ext) Removed em_width;
5415         added prop_em_width, fixed_width.
5416
5417 Mon Jun  2 14:25:25 1997  Ben Pfaff  <blp@gnu.org>
5418
5419         * Makefile.am: Added `localedir' definition.  Added
5420         -DLOCALEDIR="..." to DEFS.  Added -I. to INCLUDES.
5421
5422         * ascii.c: (macro draw_line) Fixed capitalization.
5423
5424         * ascii.c, autorecode.c, cases.c, cmdline.c, command.c, common.c,
5425         compute.c, count.c, data-in.c, data-list.c, data-out.c,
5426         descript.q, dfm.c, display.c, do-if.c, error.c, expr-evl.c,
5427         expr-opt.c, expr-prs.c, file-handle.q, file-type.c, filename.c,
5428         formats.c, frequencies.q, get.c, getline.c, glob.c, groff-font.c,
5429         hash.c, heap.c, include.c, inpt-pgm.c, lexer.c, list.q, loop.c,
5430         main.c, mis-val.c, misc.c, modify-vars.c, numeric.c, output.c,
5431         postscript.c, print.c, q2c.c, recode.c, rename-vars.c, repeat.c,
5432         sample.c, sel-if.c, sfm-read.c, sfm-write.c, sfmP.h, som-frnt.c,
5433         som-high.c, som-low.c, sort.c, split-file.c, sysfile-info.c,
5434         temporary.c, title.c, tokens.h, val-labs.c, var-labs.c,
5435         vars-atr.c, vars-prs.c, vector.c, vfm.c, weight.c: Marked strings
5436         for internationlization.
5437
5438         * glob.c: [HAVE_LOCALE_H] Includes locale.h.
5439
5440 Sun Jun  1 23:31:18 1997  Ben Pfaff  <blp@gnu.org>
5441
5442         * do-if.c, sort.c, val-labs.c: Comment fixes.
5443
5444         * glob.c: (init_glob) Uncommented, updated i18n support.
5445         
5446         * arena.c, ascii.c, data-in.c, descript.q, error.c, expr-evl.c,
5447         expr-opt.c, expr-prs.c, filename.c, frequencies.q, groff-font.c,
5448         output.c, postscript.c, sfm-read.c, som-high.c, vars-prs.c: Made
5449         the declarations of macros taking arguments a lot nicer.
5450
5451 Sun Jun  1 17:22:04 1997  Ben Pfaff  <blp@gnu.org>
5452
5453         * error.h: Removed CE, CW aliases for SE, SW.
5454
5455         * q2c.c: Removed explicit streq() definition since it's duplicated
5456         in str.h.
5457         
5458         * approx.h, error.h, font.h, hash.h, misc.h, output.h, somP.h,
5459         stats.h, str.h, tokens.h: Made the declarations of macros taking
5460         arguments a lot nicer-looking of <pinard@iro.umontreal.ca>.
5461         Comment fixes.
5462
5463 Sun Jun  1 12:02:06 1997  Ben Pfaff  <blp@gnu.org>
5464
5465         * cmdline.c: Comment fixes.
5466         (pick_compat) Changed return type to int.  Now, instead of setting
5467         glob var `compat' to the emulation, returns the emulation.  All
5468         references changed.
5469         (parse_command_line) Added terminating null to end of
5470         `long_options' array definition.
5471         (pre_syntax_message) Fixes.
5472         (usage) Shows the default emulation in the syntax message by
5473         calling pick_compat().
5474
5475         * getline.c: (getl_add_include_dir) Separates paths with
5476         PATH_DELIMITER, not DIR_SEPARATOR.
5477
5478         * glob.c: (init_glob) Fixed references to DEFAULT_VER_PCP40,
5479         DEFAULT_VER_WIN61, DEFAULT_VER_X40.
5480
5481         * output.c: (outp_configure_macro) Make earlier definitions for a
5482         particular key override later ones for the same key.
5483         
5484 Fri May 30 19:40:49 1997  Ben Pfaff  <blp@gnu.org>
5485
5486         * ascii.c: Comment fixes.
5487
5488         * output.c: (outp_get_paper_size)
5489         s/STAT_OUTPUT_INIT_FILE/STAT_OUTPUT_PAPERSIZE_FILE/.
5490         
5491 Sun May 25 22:34:07 1997  Ben Pfaff  <blp@gnu.org>
5492
5493         * ascii.c, postscript.c, sfm-read.c, sfm-write.c, sort.c: Include
5494         <errno.h>.  GNU libc 2 enforces this!
5495
5496         * command.c: (parse_cmd) Fixed problem with `else' clause being
5497         paired with wrong `if'.  Comment fix.
5498
5499 Fri May  9 16:53:52 1997  Ben Pfaff  <blp@gnu.org>
5500
5501         * getline.c: [!HAVE_LIBREADLINE] (read_console) Changed
5502         blp_getline() to getline().
5503
5504         * output.c: (outp_eval_dimension) Changed the fix from last time;
5505         there was no variable `a'.
5506
5507         * q2c.c: (get_line) Fixed boundary condition overrun bug.
5508
5509 Mon May  5 21:58:22 1997  Ben Pfaff  <blp@gnu.org>
5510
5511         * output.c: (outp_evaluate_dimension) Fixed handling of negative
5512         numbers having fractional parts.  Added case of a fraction without
5513         a whole-number part.
5514
5515 Fri May  2 22:08:05 1997  Ben Pfaff  <blp@gnu.org>
5516
5517         * ascii.c: (ascii_text_get_font_position) Removed.
5518
5519         * expr.h, exprP.h: Disabled debugging.
5520
5521         * groff-font.c, postscript.c: Changed `groff' to `Groff' in
5522         several places.
5523
5524         * output.h: (struct outp_class_struct) Removed
5525         text_get_font_position method.  All references deleted.
5526
5527         * postscript.c: Big change here.  Fontmaps were completely
5528         eliminated because of a change in philosophy.  Comment fixes.
5529         (struct ps_fontmap, ps2dit_map, font_family, dit2family_map)
5530         Removed.
5531         (struct ps_driver_ext) `position', `fontmap', `prop_name',
5532         `fixed_name' members removed.  New members `prop_family',
5533         `fixed_family'.  `family' member changed to type char *.
5534         (static var ps_fontmaps) Removed.
5535         () Removed.
5536         (ps_init_driver) Removed obsolete references, updated.
5537         Initializes `translate_x', `translate_y', `scale'.  Doesn't read
5538         fontmap, of course.  Refers to font names through internal_name
5539         rather than subversive means.  Frees proper items.
5540         (static var option_tab[]) Removed `fontmap-file' option; renamed
5541         `fixed-font', `prop-font'.
5542         (ps_option) Corresponds to option_tab[].
5543         (read_fontmap, release_fontmap, ps_to_dit, compare_ps2dit,
5544         hash_ps2dit, compare_dit2family, hash_dit2family, compare_family,
5545         hash_family) Removed.
5546         (postopen) Generates font names from family names.  Gets
5547         PostScript font name properly.  New prologue file comment `!!!'
5548         style.
5549         (ps_open_page) Adds translate_x, translate_y to BP prologue
5550         function; gives SF argument floating-point format.
5551         (ps_text_set_font_by_name) Doesn't try to map PostScript->Groff
5552         font name.  Doesn't change font family.
5553         (ps_text_set_font_by_position) Generates Groff font name from font
5554         family name instead of through table lookup.
5555         (ps_text_set_font_by_family) Renamed `ps_text_set_font_family',
5556         all references changed.  Reduced to simple string assignment.
5557         (ps_get_font_name) Removed.
5558         (ps_get_font_family) Reduced to string return.
5559         (text) Doesn't save `position' since it no longer exists.  Ugly
5560         kluge to save font family--fix soon?
5561         (load_font) Removed PostScript name argument.
5562         
5563 Thu May  1 14:58:59 1997  Ben Pfaff  <blp@gnu.org>
5564
5565         * postscript.c: Comment fix.
5566         (ps_open_page) Puts scale factor in PostScript output.
5567         
5568 Sat Apr 26 11:49:32 1997  Ben Pfaff  <blp@gnu.org>
5569
5570         * Makefile.am: Distcleans q2c.
5571
5572 Wed Apr 23 21:33:48 1997  Ben Pfaff  <blp@gnu.org>
5573
5574         * ascii.c: (delineate) Sets text size even if width is zero.
5575
5576         * command.c: Comment fix.
5577         (static var cmd_table[]) Re-enabled EVALUATE command.
5578         (parse_cmd) Lotsa comment fixes.  Fixed infinite loop in parsing
5579         of comments in script files.  Now more liberal on criteria for
5580         performing a state transition--if *anything* happened correctly,
5581         not just if *everything* happened correctly.
5582
5583         * data-out.c: (convert_F) Comment fix.  Why in the fsck does
5584         Checker segfault on formatting large numbers and why in the fsck
5585         hadn't I noticed this before?
5586
5587         * expr.h, exprP.h: No longer turn off GLOBAL_DEBUGGING.
5588
5589         * list.q: (cmd_list) Commented out the actual output routine
5590         because of various problems.  Probably will abandon the idea of
5591         using the general `crushed tables' for the LIST procedure.
5592
5593         * temporary.c: (restore_dictionary) Sets var_by_name to NULL after
5594         clearing it.  Allocates a new var_by_name dictionary before trying
5595         to add members to it.
5596
5597         * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed argument
5598         `sib'.  Changed type of `node' argument.
5599         [DEBUGGING] (dump_var_tree) Replaced avlwalk() with
5600         avl_walk_inorder().
5601         (clear_variable) Only dumps the var tree if var_by_name non-NULL.
5602         [DEBUGGING] Only deletes the variable from var_by_name if that var
5603         non-NULL.
5604
5605 Fri Apr 18 16:48:41 1997  Ben Pfaff  <blp@gnu.org>
5606
5607         * Makefile.am: Added include files to SOURCES.  Added
5608         frequencies.q to EXTRA_DIST.  Removed include/ from INCLUDES.  Now
5609         includes rules for q2c.  Added `boast' target.
5610
5611 Fri Apr 18 15:42:22 1997  Ben Pfaff  <blp@gnu.org>
5612
5613         * Makefile.am: Maintainer-clean Makefile.in.
5614         
5615         * Makefile.am: Fixed redundant EXTRA_DIST line.
5616
5617         * ascii.c: Comment fixes.
5618         (ascii_line_vert) Fixed overly aggressive range check.
5619
5620         * display.c: Removed dead code.
5621
5622         * list.q: Turn debugging on.
5623         (flush_table) New debug code.
5624
5625         * sfm-read.c: (read_value_labels) malloc's the structure before
5626         trying to assign to its members.
5627
5628         * sfm-write.c: Comment fix.
5629
5630         * som-high.c: (som_submit_table) Sets som.t and som.d on each call
5631         to output_table().
5632         (output_table) No arguments anymore--gets them through `som'
5633         global.  New debug code.  In crushed tables, now sets `htv' as
5634         well as `hv' to avoid bad confusion later.
5635         (dump_crush_page) New debug code.
5636
5637         * som-low.c: (som_dump_crush_page) New debug code.
5638
5639 Thu Mar 27 01:11:29 1997  Ben Pfaff  <blp@gnu.org>
5640
5641         All source files: Broke long lines into multiple lines.
5642         
5643         * ascii.c: (ascii_close_page) Uses host_system var in place of
5644         HOST_SYSTEM constant.
5645
5646         * cmdline.c: (var syntax_message[]) Broke into
5647         pre_syntax_message[] and post_syntax_message[].
5648         (usage) Outputs both parts, separated by driver list.
5649
5650         * error.h: Fixed broken formatting.
5651
5652         * expr-opt.c: (str_search, str_rsearch) New functions.
5653
5654         * misc.c: (blp_getdelim) Removed.  All references changed to
5655         `getdelim'.
5656         (str_search, str_rsearch) Removed.
5657         (memrmem) New function.
5658
5659         * misc.h: (blp_getline) Removed.  All reference changed to
5660         `getline'.
5661
5662         * stat.h: New file.
5663
5664         * filename.c: Includes "stat.h", not <sys/stat.h>.
5665         (blp_getenv) Uses host_system var instead of HOST_SYSTEM constant.
5666
5667         * output.c: (outp_list_classes) Changed output formatting.
5668
5669         * sfm-write.c: (write_header) Uses host_system var instead of
5670         HOST_SYSTEM constant.
5671         (write_rec_7_34) Extracts version numbers from the version string.
5672         Untested.
5673
5674         * sort.c: Includes "stat.h", not <sys/stat.h>.
5675
5676         * str.c: (strcasecmp) Removed.
5677
5678         * title.c: (cmd_document) Uses host_system var instead of
5679         HOST_SYSTEM constant.
5680
5681         * version.c: Generated on-the-fly by the Makefile instead of being
5682         static.
5683
5684         * str.h: Comment fixes.  Doesn't substitute for missing memmove or
5685         memcpy.
5686         [!HAVE_STRNCASECMP] Declares strncasecmp().
5687
5688         * version.h: Removed stray character.  Comment fixes.
5689         (vars host_system, build_system) New vars.
5690
5691 Mon Mar 24 21:47:31 1997  Ben Pfaff  <blp@gnu.org>
5692
5693         * Most source files: Changed formatting of copyright notice; fixed
5694         FSF address; reformatted to better conform to GNU standards;
5695         comment fixes.  Added markups to prevent GNU indent from messing
5696         up my beautiful formatting :-).
5697         
5698         * q2c.c: (get_line) Ignores lines that begin with `/* *INDENT' so
5699         that GNU indent markups can be passed through without problems.
5700
5701 Wed Feb 19 21:30:31 1997  Ben Pfaff  <blp@gnu.org>
5702
5703         * get.c: Turned off debugging.
5704
5705         * glob.c: (init_glob) Turned on save-file compression by default.
5706
5707         * sfm-write.c: (sfm_write_case) Fixed bug which resulted in less
5708         compression than was possible in save files.
5709
5710 Sun Feb 16 20:57:20 1997  Ben Pfaff  <blp@gnu.org>
5711
5712         * data-out.c: (convert_F) Comment fixes.  Debug message fixes.
5713
5714         * frequencies.q: Removed Fiasco extensions.  Updated calculation
5715         algorithms.  Polished output format. 
5716         (struct frq_info_struct) Removed members `max_degree', `min_n',
5717         all references removed.
5718         (macro frq_extensions) Removed.
5719         (static vars min_n, max_degree) Removed, all references removed.
5720         (internal_cmd_frequencies) Doesn't handle extensions.  Doesn't
5721         calculate `min_n', `max_degree'.
5722         (postcalc) Passes new arg to dump_statistics().
5723         (dump_full) Honor NOLABEL option.  Buggy?  Adds variable name
5724         title.
5725         (dump_condensed) Adds variable name title.
5726         (sum_freqs) Removed.
5727         (calc_stats) Updated calculation algorithm.
5728         (dump_statistics) Removed warning for too-few observations.
5729         Changed table formatting.  Adds variable name title if passed new
5730         arg is nonzero.
5731
5732         * output.h: Comment fix.
5733
5734         * recode.c, sample.c, sort.c: Disabled debug code.
5735
5736         * som-frnt.c: (som_set_value, som_set_float, som_set_text)
5737         Improved debug code.
5738
5739         * var.h: (enum series frq_*) Removed Fiasco extensions.
5740
5741 Sat Feb 15 21:26:53 1997  Ben Pfaff  <blp@gnu.org>
5742
5743         * command.c: Added PROCESS IF to command table.
5744
5745         * Lots & lots of places, removed checks for NULLs preceding calls
5746         to free_expression(), which itself checks.
5747
5748         * descript.q: Removed Fiasco extensions.  Removed optimizations
5749         for non-weighted active files.  Implemented some options.
5750         Finished polishing output format.  Comment fixes.  Merged
5751         `descript.g'.
5752         (static vars n_glob_miss_list, n_glob_valid, n_glob_missing,
5753         max_degree, min_n) Removed.
5754         (macro dsc_extensions) Removed.
5755         (struct dsc_info_struct) Removed `min_n' member, all references
5756         fixed.
5757         (internal_cmd_descriptives) Removed calculation of min_n,
5758         max_degree.  Only deals with one `calc' routine instead of two
5759         flavors.
5760         (precalc) Eliminated redundancy.  Updated for changes to
5761         descriptives_proc structure.
5762         (calc) Moved here from `descript.g'.  Rewritten to calculate
5763         statistics via `moments about the mean' rather than by summing,
5764         summing squares, summing cubes, and so on.
5765         (postcalc) Rewritten for new-style statistical calculation.
5766         (display) Removed support for displaying variables across rows.
5767         No longer crushes the descriptives table.  Removed ancient code.
5768         Added display of N, by variable and listwise.
5769
5770         * descript.g: Removed; merged into `descript.q'.
5771
5772         * expr-evl.c: (evaluate_expression) Now returns a double.  For
5773         numeric results, it returns the result as well as storing it in
5774         the passed `value' structure if non-NULL.  For string results it
5775         just returns 0.0 and it must be passed non-NULL.  Many references
5776         to this function were optimized by use of this change, especially
5777         but not exclusively in `compute.c'.
5778
5779         * frequencies.g: Comment fix.
5780
5781         * glob.c: (glob var process_if_expr) New global var.
5782
5783         * postscript.c: (static var option_tab[]) Corrected entry for
5784         `fixed_size'.
5785         (postopen) Sets x->size to x->prop_size.
5786         (ps_text_set_font_by_name) Sets font size as well as typeface for
5787         PROP and FIXED fonts.
5788         
5789         * sel-if.c: (cmd_process_if) New function.
5790
5791         * sfm-write.c: (struct sfm_fhuser_ext) New member `n_cases'.
5792         (sfm_write_dictionary) Sets `n_cases' to 0.
5793         (sfm_write_case) Increments `n_cases'.
5794         (sfm_close) Attempts to seek the system file back to the header
5795         and write the number of cases in its proper slot.
5796
5797         * som-frnt.c: (som_insert_table) Masks off expansion options since
5798         only SOPT_X_NORM seems to work sensibly.
5799
5800         * som-low.c: (get_cell_size) Fixed bug when a table cell was sized
5801         with a `fixed' value of 2.
5802
5803         * sort.c: (cmd_sort_cases) Cancels PROCESS IF.
5804
5805         * sysfile-info.c: (cmd_sysfile_info) Doesn't display more than 10
5806         value labels; uses SOPT_NONE instead of SOPT_X_BOTH.
5807
5808         * var.h: (enum series dsc_*) Removed Fiasco extensions.
5809         (struct descriptives_proc) Removed `miss_noweight'; new members
5810         `X_bar', `M2', `M3', `M4', `min', `max'.
5811
5812         * vars-atr.c: (discard_variables) Cancels PROCESS IF.
5813
5814         * vfm.c: (close_active_file) Cancels PROCESS IF.
5815         (write_case) Doesn't process cases unselected by PROCESS IF.
5816
5817 Fri Feb 14 23:32:58 1997  Ben Pfaff  <blp@gnu.org>
5818
5819         * glob.c: (glob var err) Removed.
5820
5821         * sysfile-info.c: (cmd_sysfile_info) When adjusting table size,
5822         doesn't have to take into account number of value labels since
5823         they're in a subtable anyway.  Also, doesn't display more than 10
5824         value labels since we can't yet break pages in subtables.
5825
5826 Tue Feb  4 15:15:50 1997  Ben Pfaff  <blp@gnu.org>
5827
5828         * som-frnt.c: (som_change_table_size) Simple change for elegance
5829         that shouldn't change behavior.
5830         (som_set_value) Comment fix.
5831
5832         * som-high.c: (som_submit_table) Message fix.
5833
5834 Wed Jan 22 21:54:00 1997  Ben Pfaff  <blp@gnu.org>
5835
5836         * command.c: Added SYSFILE INFO to command table.
5837
5838         * file-handle.q: (fh_handle_filename) New function.
5839
5840         * get.c: (save_trns_proc) Fixed a bug in padding of output data
5841         with spaces.
5842
5843         * main.c: (parse) New return value for command functions, -3.
5844
5845         * misc.h: Comment fix.
5846
5847         * output.h: Comment fixes.
5848         (macro COMPONENTS) Removed.
5849
5850         * postscript.c: (write_text) Modified literal_chars[] so that `('
5851         and ')' are not written to the output in strings as literals.
5852
5853         * sfm-read.c: (sfm_read_dictionary) New argument.
5854         (read_header) New argument.  Sets the information structure's
5855         values from the header information.  
5856         (read_variables) [__CHECKER__] Redefines isalnum()--some sort of
5857         bizarre Checker problem, I guess.
5858         (read_variables) Proper cleanup on lossage.
5859
5860         * sfm.h: (struct sfm_read_info) New struct for use by
5861         sfm_read_dictionary().
5862
5863         * som-frnt.c: (som_create_table) New argument CREATE_FLAGS,
5864         currently used just for tables that can be dynamically resized and
5865         thus have to be allocated with arena_malloc() instead of
5866         arena_alloc().  All references changed.
5867         (som_change_table_size) New function.
5868         (som_insert_table) Bugfix: now inserts `cell', not `c'!
5869
5870         * som-high.c: [GLOBAL_DEBUGGING] (check_table) Moved to som-low.c.
5871         (som_submit_table) [GLOBAL_DEBUGGING] Doesn't call check_table()
5872         any more.
5873
5874         * som-low.c: (draw_cell) Calls draw_table_cell() for SCON_TABLE
5875         cells.
5876         (draw_intersection) Now takes an argument specifying the table in
5877         question.  All references changed.
5878         (draw_table_cell) New function.
5879         (som_get_table_size) [GLOBAL_DEBUGGING] Calls check_table().
5880         (som_get_table_size) Many nice new explanatory comments.
5881         [GLOBAL_DEBUGGING] (check_table) Moved here from som-high.c.
5882
5883         * som.h: New enum series SOM_CREATE_* for use as create flags with
5884         som_create_table().
5885
5886         * str.h: Moved a comment here from TODO.
5887
5888         * sysfile-info.c: New file.  Reference implementation.
5889
5890 Sun Jan 19 14:22:11 1997  Ben Pfaff  <blp@gnu.org>
5891
5892         * command.c: Added RENAME VARIABLES to table of commands.
5893
5894         * data-in.c: (dls_error) Sets `cust_field'.
5895         (parse_N) Message fix.
5896         (parse_day_count) New function.
5897         (to_roman) Never outputs VX as a `short form' of V.
5898         (parse_month) Fixed parsing of Roman numerals.
5899         (parse_trailer) Message fix.
5900         (parse_DATE, parse_ADATE, parse_EDATE, parse_SDATE, parse_JDATE,
5901         parse_QYR, parse_MOYR, parse_WKYR, parse_DTIME) Issue a message if
5902         the date is invalid.
5903         (parse_SDATE) Fixed swapped day, year.
5904         (parse_JDATE) Fixed bug for dates in 1582.
5905         (parse_DTIME) Allows days not between 1 and 31.
5906         (parse_numeric) Makes local copy of f.type for easier usage.
5907         FMT_DOLLAR fixed.
5908
5909         * data-out.c: (convert_F) When outputting as scientific, properly
5910         sets f.type as fp->type.
5911         (insert_commas) Fixed operator precedence problem with setting of
5912         nitems.  Changed strcpy to memcpy (no null terminator). 
5913         (convert_date) Fixed FMT_JDATE: added 1900 to year.
5914         (convert_CCx) Essentially rewritten, but now it works.
5915
5916         * display.c: (cmd_display) Added DISPLAY FILE LABEL (undocumented
5917         feature of Fiasco).
5918         (display_documents) Implemented.
5919
5920         * error.c: (glob var cust_field) New var.
5921         (vmsg) Displays cust_field as part of message classes DE and DW.
5922
5923         * formats.c: (debug_print) Fixed to compile under updated
5924         dictionary format.
5925
5926         * get.c: (cmd_get, cmd_save_internal) Close file handle on
5927         failure.
5928
5929         * misc.c: (parse_format_specifier) Formatting fix.
5930
5931         * modify-vars.c: (struct var_modification) Renamed `n_reorder' as
5932         `n_rename' for clarity.
5933         (cmd_modify_vars) Initializes `forward' and `positional' at
5934         appropriate times.  Frees lists of vars to rename on failure.
5935         Comment fix.  Frees memory on success.  
5936         (rearrange_dict) Simplified `for' loop condition.
5937
5938         * rename-vars.c: New file (reference implementation).
5939         
5940         * set.q: (internal_cmd_set) Fixed `emu' test condition.
5941
5942         * sfm-read.c: (read_header) File label is created only if file
5943         label in file is not blank.
5944         (read_variables) Initializes `dict' local variable.
5945         (read_documents) Proper behavior on lossage.
5946
5947         * sfm-write.c: (write_header) Doesn't blank out the file label
5948         (why was this here to begin with?!)
5949
5950         * temporary.c: (save_dictionary) File label is copied only if
5951         non-NULL.  Doesn't try to xstrdup() dictionary documents.
5952         Adapted so as to not irritate Checker.
5953         (free_dictionary) Only destroys var_by_name if non-NULL.
5954
5955         * title.c: (cmd_file_label) Doesn't skip FILE, LABEL tokens.
5956         (cmd_document) Doesn't skip DOCUMENT token.  Adds some header
5957         lines to the document, indents the document.  Also, it works now.
5958         (add_document_line) New function.
5959
5960         * var.h: (struct dictionary) Reordering.
5961
5962         * vars-prs.c: (parse_variables) On lossage, only local_free()'s
5963         bits if it was allocated to begin with.
5964
5965 Thu Jan 16 13:08:57 1997  Ben Pfaff  <blp@gnu.org>
5966
5967         * command.c: Added MODIFY VARS to list of commands.
5968
5969         * configure.in: Updated custom macros for autoconf 2.12.  Removed
5970         mmap reference; fixed termcap library reference.
5971
5972         * display.c: (display_variables) Fixed a few bugs although it's
5973         still not well written.
5974
5975         * error.c: [!__CHECKER__] (chkr_disp_call_chain) New function.
5976         (induce_segfault) Calls chkr_disp_call_chain() instead of
5977         inducing an actual SIGSEGV.
5978
5979         * expr-opt.c: (evaluate_tree) Swapped order of arguments to
5980         str_search() and str_rsearch().  Fixed tests for matches on
5981         OP_INDEX and OP_RINDEX.
5982
5983         * filename.c: (good_getcwd) Removed as the new libc for Checker
5984         doesn't contain this bug, apparently.
5985
5986         * misc.c: (str_search, str_rsearch) Changed order of arguments for
5987         consistency with GNU memmem.
5988         (blp_getdelim) Changed `len' from `int' to `size_t'.
5989
5990         * modify-vars.c: Reference implementation.
5991
5992         * som-frnt.c: (zero_length) New global var.
5993         (som_create_table) Message fix.
5994
5995         * som.h: Added gcc attributions to som_set_text(),
5996         som_output_text() prototypes.  blank_line() refers to
5997         zero_length[] instead of a literal null string to suppress gcc
5998         warnings.
5999
6000         * sort.c: (do_external_sort) Fixed fencepost error on lossage.
6001         (allocate_cases) Decrements x_max so the last element of x[] can
6002         be used by the algorithm.
6003
6004         * var.h: Changed minor details of `variable' declaration.  
6005         (struct modify_vars_proc) New struct.
6006         (struct variable) Added field p.mfv.
6007
6008         * vars-atr.c: Comment fix.
6009
6010         * vars-prs.c: (fill_all_vars) More optimal implementation.
6011
6012         * vfm.c: (dump_splits) Sets the last byte of temp_buf to a null
6013         character, which it shouldn't have to do but printf() seems to
6014         read the null byte even though I supply a maximum length...
6015
6016 Fri Jan 10 20:22:08 1997  Ben Pfaff  <blp@gnu.org>
6017
6018         * command.c: Removed command alias X for QUIT.
6019         (parse_cmd) Fixed comment parsing.
6020
6021         * dfm.c: (struct dfm_fhuser_ext) Fields `len', `size' are now of
6022         type size_t.
6023         (read_record) Fixed references to len, size.
6024         (dfm_get_record) Restructured.
6025
6026         * file-handle.h: (struct file_handle) Field `lrecl' now of type
6027         size_t.
6028
6029         * file-handle.q: (internal_cmd_file_handle) Checks for nonpositive
6030         record length.
6031
6032         * modify-vars.c: New file.  Not complete.
6033         
6034         * set.q: (set_ccx) Fixed operator precedence problem regarding ^
6035         and ==.
6036
6037         * sfm-read.c: (bswap_flt64, read_header, write_variable) Fixed
6038         problems caused by int/size_t differences.
6039
6040         * sort.c: (output_record, merge_once) Cast `size_t's to `int's in
6041         appropriate spots.
6042
6043         * str.c: (strcasecmp) Fixed bug that cropped up when the strings
6044         being compared were of equal length.
6045
6046 Thu Jan  2 19:08:23 1997  Ben Pfaff  <blp@gnu.org>
6047
6048         * command.c: Added DOCUMENT, DROP DOCUMENTS, FILE LABEL.
6049
6050         * lexer.c: (get_dotted_rest_of_line) New function.
6051
6052         * sel-if.c: (cmd_filter) Cannot choose string or scratch variables
6053         as filters.
6054
6055         * sfm-read.c: (sfm_read_dictionary) Calls read_documents() to read
6056         type 6 records.  Frees the dictionary properly.
6057         (read_header) Initializes the dictionary instead of letting
6058         read_variables() do it.  Sets the dictionary file label from the
6059         system file.
6060         (read_documents) New function.
6061
6062         * sfm-write.c: (sfm_write_dictionary) Calls write_documents() to
6063         write type 6 record if appropriate.
6064         (write_header) Writes file label from dictionary.
6065         (write_documents) New function.
6066
6067         * temporary.c: (save_dictionary, restore_dictionary,
6068         free_dictionary) Properly handle new fields in dictionary struct.
6069
6070         * title.c: (get_title) Returns after failure().
6071         (cmd_file_label, cmd_document, cmd_drop_documents) New functions
6072         for new commands FILE LABEL, DOCUMENT, DROP DOCUMENTS.  Untested.
6073
6074         * var.h: (struct dictionary) New fields `label', `n_documents',
6075         `documents'.
6076
6077 Wed Jan  1 22:08:10 1997  Ben Pfaff  <blp@gnu.org>
6078
6079         * command.c: Added FILTER to list of commands.
6080
6081         * frequencies.g: [WEIGHTING] Removed test for weighting!=-1 since
6082         it's always true.
6083
6084         * get.c: (cmd_save_internal) Removed weighting code since it's now
6085         handled by sfm-write.c.  Properly commented out debug code.
6086
6087         * glob.c: (glob var weighting) Removed.
6088
6089         * sel-if.c: Comment fixes.
6090         (cmd_filter) New function.
6091
6092         * sfm-read.c: (struct sfm_fhuser_ext) New field `weight_index'.
6093         (sfm_read_dictionary) Sets weighting variable direct in the
6094         created dictionary now.  (Apparently we previously didn't support
6095         weighting on GET?)
6096         (read_header) Sets weight_index field in sfm_fhuser_ext from
6097         header read from disk.
6098
6099         * sfm-write.c: (sfm_write_dictionary) Comment fix.
6100         (write_header) Now sets the weighting in the header from the
6101         passed primary dictionary instead of from the sfm_write_info.
6102
6103         * sfm.h: (struct sfm_write_info) Removed field `weight'.
6104
6105         * som-high.c: (dump_crush_table) Fixed a couple of assertions that
6106         broke on boundary conditions.
6107
6108         * var.h: (struct dictionary) New fields `weight_var',
6109         `weight_index', and `filter_var'.
6110         (glob var weighting) Removed.  This is now part of struct
6111         dictionary.  All references changed; the less mechanical changes
6112         are described above.
6113
6114         * vars-atr.c: (find_dict_variable) New function.
6115
6116         * vfm.c: (static var filter_index) New variable.
6117         (open_active_file) Initializes filter_index from default_dict.
6118         (write_case) Calls proc_func() only if the filter variable is
6119         nonzero; this implements FILTER behavior.
6120
6121         * weight.c: (static var weight_varname) Removed.
6122         (cmd_weight) Modified default_dict instead of glob vars.
6123         (update_weighting) Changed the signature to modify a dictionary
6124         instead of glob vars.  Now returns the weighting variable.
6125         (get_weighting_variable) Removed; its function is absorbed by
6126         update_weighting().
6127         (stop_weighting) Operates on a dictionary now.
6128
6129 Wed Jan  1 17:00:59 1997  Ben Pfaff  <blp@gnu.org>
6130
6131         * sort.c: Removed debugging info from messages.
6132         (do_external_sort) Cleans up after itself by deleting the
6133         temporary directory on failure.  (On success it is deleted by the
6134         input program.)
6135         (allocate_cases) Removed debug code.  Added clean up code.
6136         (output_record) Removed debug code.
6137         (merge) Added code to close all the input files that are currently
6138         open.  This is a likely location for bugs, because I'm not sure
6139         about boundary conditions.  Removed an unnecesary heap_delete().
6140         (merge_once) Removed input file "optimization" that in fact
6141         screwed up the rest of the code.  Message and comment fixes.
6142
6143 Sun Dec 29 21:36:48 1996  Ben Pfaff  <blp@gnu.org>
6144
6145         * error.c: [__CHECKER__] (induce_segfault) Flushes output streams.
6146
6147         * heap.c: (heap_delete) New argument.
6148
6149         * sort.c: Finished implementation of external sort.
6150
6151         * vfm.c: (read_from_disk) Returns after a disk error.
6152
6153 Sun Dec 22 23:10:39 1996  Ben Pfaff  <blp@gnu.org>
6154
6155         * sort.c: (static var state) Removed.
6156         (static vars max_handles, tmp_basename, tmp_extname,
6157         huffman_queue) New variables.
6158         (do_external_sort) Moved most code to new functions.
6159         Creates huffman_queue.
6160         (allocate_file_handles, allocate_cases) New functions.
6161         (static vars run_no, run_length, file_index, case_count) New
6162         variables. 
6163         (output_record) Returns success.  Now really writes to the output
6164         file.
6165         (begin_run, end_run) New functions.
6166         (write_initial_runs) Returns success.  Initializes run_no to -1.
6167         Calls begin_run(), end_run() at appropriate times.  Outputs debug
6168         messages.
6169         (write_to_sort_cases) Calls begin_run(), end_run() at appropriate
6170         times.
6171         (merge) New function.
6172
6173         * heap.c, heap.h: New files.  Hopefully in near-final form.
6174
6175 Sat Dec 21 21:51:04 1996  Ben Pfaff  <blp@gnu.org>
6176
6177         * glob.c: Added write_active_file to global vars.
6178
6179         * sort.c: Several new miscellaneous static variables.
6180         (cmd_sort_cases) Big comment fix.
6181         (perform_case_2) Renamed `do_external_sort' and completely
6182         rewritten.
6183         (case_2_proc_func) Removed.
6184         (output_record, write_initial_runs, write_to_sort_cases,
6185         compare_record) New functions.
6186
6187         * vfm.c: [DEBUGGING] (index_to_varname) Excised bit rot.
6188
6189 Tue Dec 17 18:57:59 1996  Ben Pfaff  <blp@gnu.org>
6190
6191         * sort.c: (perform_case_2) Changed the method for allocation of
6192         lots of memory--now allocates one case at a time in hopes that
6193         more cases can be allocated with heavily fragmented memory.
6194
6195         * var.h: (write_active_file) New global var.
6196
6197         * vfm.c: (procedure, close_active_file, write_case,
6198         SPLIT_FILE_procfunc) Now allow beginfunc, procfunc, and endfunc
6199         arguments to procedure() to be NULL.  All references to
6200         procedure() that made use of dummy functions were changed to NULL
6201         functions.
6202         (open_active_file) If write_active_file is non-NULL, the output
6203         device becomes DEV_PGM (a new enum).
6204         (close_active_file) Sets write_active_file to NULL.
6205         (read_from_memory) Comment fix.
6206         (record_case) Calls write_active_file() when the output device is
6207         DEV_PGM.
6208
6209 Sun Dec 15 15:32:16 1996  Ben Pfaff  <blp@gnu.org>
6210
6211         * sort.c: New file.
6212
6213         * autorecode.c: (cmd_autorecode) Fixed parsing of options.
6214         Fixed checking for duplicate varnames.
6215         (recode) xmalloc()'s the transformation instead of arena_alloc()'ing
6216         it.
6217         (autorecode_trns_free) Destroys hash tables for each recoding
6218         specification.
6219         (autorecode_proc_func) Compares NULL to *vpp instead of vpp.
6220
6221         * command.c: Added SORT CASES to cmd_table.
6222         (null_func, null_int_func) Prototyped.
6223
6224         * descript.g: (calc_weight, calc_noweight) Computes own case
6225         number now.
6226         
6227         * frequencies.q: (dump_statistics) Fixed problem with
6228         too-few-cases warning message.
6229
6230         * get.c: (cmd_save_internal) Handles weighting properly.
6231
6232         * hash.c: (hsh_dump) Output format changed.
6233         (force_hsh_insert) Actually works now, prototype changed.
6234
6235         * list.q: (static var case_num) New variable.
6236         (cmd_list) Initializes case_num.
6237         (list_cases) Increments case_num.
6238
6239         * var.h: Added definitions for SORT CASES.  Comment fixes.
6240
6241         * vfm.c: Some definitions moved to new file vfmP.h.  Comment
6242         fixes.  `active' renamed vfm_active, `rep' renamed
6243         vfm_replacement, all references changed.
6244         (procedure) The procfunc no longer receives a case number.  All
6245         references changed.
6246         (write_case) Subtle reordering.
6247         (SPLIT_FILE_procfunc) Counts cases differently.  Slightly less
6248         redundant.
6249
6250         * weight.c: (get_weighting_variable) New function.
6251
6252         * vfmP.h: New file with definitions from vfm.c.
6253
6254 Sat Dec 14 10:35:30 1996  Ben Pfaff  <blp@gnu.org>
6255
6256         * command.c: (FILE_TYPE_okay) Commented out some tests because
6257         they're clumsy and not yet needed.
6258
6259         * var.h: Most *_trns structures moved to their respective source
6260         files.  Some were moved into a new file, do-ifP.h.  Comment fixes.
6261         (union any_trns) Changed to a typedef for trns_header.
6262         (struct input_program_pgm) Removed.
6263
6264         * vars-prs.c: (parse_variables) Only local_free()'s bits if it
6265         was allocated in the first place.
6266
6267 Fri Dec 13 21:30:53 1996  Ben Pfaff  <blp@gnu.org>
6268
6269         * autorecode.c: New file.
6270         
6271         * command.c: Added AUTORECODE to command table; re-enabled SET.
6272
6273         * data-out.c: (convert_F) Handles infinities and NaNs properly.
6274
6275         * error.c: (vmsg) Comment fixes.
6276
6277         * hash.c: Comment fix.
6278         (hashpjw_d) New function.
6279         (hashpjw) Reimplemented as call to more general function
6280         hashpjw_d().
6281         (internal_comparison_fn) Initializes pointers properly.
6282         (hsh_sort) [GLOBAL_DEBUGGING] New debugging code.
6283         (force_hsh_insert, force_hsh_find) New debugging wrapper
6284         functions.
6285
6286         * main.c: (main) Message fix.
6287
6288         * output.c: (outp_read_devices) Message fix.
6289
6290         * set.q: Comment fixes.
6291         (custom_results) Implemented Wnd/X form of subcommand.
6292         (set_routing) New function.
6293         (internal_cmd_set) Implemented ERRORS, MESSAGES.
6294
6295         * settings.h: (SET_ROUTE_*) New enum series.
6296         (set_results) Renamed set_results_file, all references changed.
6297         (set_messages) Removed.
6298         (glob vars set_errors, set_messages, set_results) New vars.
6299
6300         * title.c: (get_title) Remembers to xstrdup() the result of
6301         get_rest_of_line().
6302
6303         * var.h: (arc_item, arc_spec, autorecode_trns) New structures for
6304         use by AUTORECODE.
6305         (union any_trns) New element `arc'.
6306
6307 Fri Dec  6 23:53:47 1996  Ben Pfaff  <blp@gnu.org>
6308
6309         * command.c: (output_line) Removed references to set_screen.
6310
6311         * error.c: (static var terminating) New var.
6312         (hcf) Sets terminating to 1.
6313         (vmsg) If terminating is nonzero, does not attempt to call hcf().
6314         This prevents an infinite loop if an error occurs within hcf().
6315
6316         * expr-evl.c: (evaluate_expression) [__CHECKER__] Replaced case
6317         statement circumlocution with `case 42000' trick.
6318         (evaluate_expression) New support for OP_STR_MIS.
6319
6320         * expr-opt.c: (evaluate_expression) [__CHECKER__] Replaced case
6321         statement circumlocution with `case 42000' trick.
6322         (dump_node) Handles OP_STR_MIS.
6323
6324         * expr-prs.c: (MISSING_func, SYSMIS_func) Rewrote to handle string
6325         variables exceptions.
6326         (parse_function) Message fix.
6327         (ops[]) Added OP_STR_MIS.
6328
6329         * expr.h: Added OP_STR_MIS to OP_* enum.  Comment fixes.
6330
6331         * exprP.h: [__CHECKER__] Removed case statement circumlocution.
6332
6333         * glob.c: Removed set_scrnfile glob var.
6334         (init_glob) set_errorbreak set to 0 by default.
6335
6336         * groff-font.c: Changed included files.
6337         (groff_read_font) Initializes font_arena local var correctly.
6338         (default_font) New function.
6339
6340         * output.c: Comment fixes.
6341         (glob var disabled_devices) New variable.
6342         [GLOBAL_DEBUGGING] (static var iterating_driver_list) New
6343         variable.
6344         [GLOBAL_DEBUGGING] (reentrancy) New function.
6345         [GLOBAL_DEBUGGING] (outp_read_devices, outp_done, find_driver,
6346         outp_iterate_enabled_drivers) Calls to reentrancy().
6347         (destroy_list) New function.
6348         (outp_done) Moved code to destroy_list().
6349         (parse_options) Parses `listing', `screen', `printer' options
6350         internally.
6351         (configure_driver) Sets new `device' member of driver.
6352         (outp_iterate_enabled_drivers, outp_enable_device) New functions.
6353
6354         * output.h: Comment fixes.  New enum series OUTP_DEV_*.
6355         (struct outp_driver_struct) New member `device'.
6356
6357         * postscript.c: (find_encoding_file) Doesn't display its own error
6358         messages.
6359         (default_encoding) New function.
6360         (switch_font) Calls default_encoding() if no encoding can be
6361         found.
6362         (text) Makes up a character metric if none exists for the desired
6363         character.
6364         (load_font) Properly copies a fallback filename.  Calls
6365         default_font() for a font if none at all are known.
6366
6367         * set.q: Comment fixes.  Removed OUTPUT subcommand.
6368         (custom_listing) Calls outp_enable_device() to enable/disable
6369         listing device.
6370         (turn_screen_on) Removed.
6371         (internal_cmd_set) Calls outp_enable_device() to enable/disable
6372         screen, printer devices.
6373
6374         * settings.h: Comment fixes.
6375         (glob vars set_output, set_printer, set_screen, set_scrnfile)
6376         Removed.
6377
6378         * som-high.c: (som_submit_table, som_eject_page) Use
6379         outp_iterate_enabled_drivers() instead of iterating
6380         outp_driver_list directly.
6381
6382 Wed Dec  4 21:34:17 1996  Ben Pfaff  <blp@gnu.org>
6383
6384         * data-in.c: (parse_EDATE, parse_SDATE) New functions.
6385         (parse_string_as_format) Handles new formats.
6386         (parse_numeric) Now handles DOT and PCT formats.
6387
6388         * data-out.c: (convert_E, convert_F, insert_commas) Handle DOT
6389         format now.
6390         (convert_date) Handle EDATE and SDATE formats.
6391         (convert_CCx) Now if there's not room for the currency characters,
6392         converts it as F format if it's positive instead of giving up
6393         quickly.  Also fixed save-and-restore bug with decimal point
6394         characters.  
6395         (convert_format_to_string) Handles new formats.
6396
6397         * misc.c: (formats[]) Added new formats.
6398         (convert_fmt_ItoO) Supports new formats.
6399
6400         * sfm-read.c: (parse_format_spec) Supports new formats.  Better
6401         data checking.  New argument, all references changed.
6402
6403         * sfm-write.c: (write_format_spec) Supports new formats.
6404
6405         * var.h: New formats FMT_DOT, FMT_PCT, FMT_EDATE, FMT_SDATE.
6406         Comment fixes.
6407
6408 Sun Dec  1 17:19:00 1996  Ben Pfaff  <blp@gnu.org>
6409
6410         * cmdline.c: Comment fixes.
6411         (parse_command_line) Changed return type to void.
6412
6413         * data-in.c: (parse_string_as_format) Added FMT_CCA...FMT_CCE to
6414         switch.
6415         (parse_numeric) Handles international numbers (comma as decimal
6416         point).  Some reformatting.
6417
6418         * data-list.c: (parse_free) Default output format is now
6419         set_format instead of hard-coded F8.2.
6420         (read_from_data_list_list) Emits error message on undefined data
6421         only if set_undefined is nonzero.
6422
6423         * data-out.c: (convert_E) Changes decimal point from period to
6424         comma if appropriate.  Restructured.  Better comments.
6425         (convert_F) Changes decimal point from period to comma if
6426         appropriate.
6427         (insert_commas) Major bug with handling of negative values fixed.
6428         Also, inserts periods instead of commas if appropriate.
6429         (convert_CCx) New function.
6430         (convert_format_to_string) Added FMT_CCA...FMT_CCE to switch.
6431         (num_to_string) Changed `.' to set_decimal.
6432
6433         * dfm.c: Comment fixes.
6434         (dfm_close) Frees ext->line even in inline_file.
6435         (open_inline_file) New function.
6436         (open_file_r) When opening the inline file: now properly
6437         recognizes `BEGIN DATA.' line, and calls open_inline_file() to
6438         finish up.
6439         (read_record) Calls fh_close_handle() instead of dfm_close() to
6440         close the inline file.  Makes a copy of the line getl_buf to avoid
6441         interlock problems.
6442         (dfm_get_record) Restructured.  Now checks the return value of
6443         open_file_r().
6444         (cmd_begin_data) Moved open code into open_inline_file().  Relaxed
6445         checking for use of inline file.  No longer tries to close inline
6446         file.
6447
6448         * error.c: (glob var error_already_flagged) New var.
6449         (vmsg) Message change.  Now checks max number of errors/warnings,
6450         acts on it.
6451
6452         * file-handle.q: (fh_handle_name) Now allows closing of
6453         inline_file.
6454         (fh_init_files) Reformatted.
6455
6456         * get.c: (trim_dictionary) Checks SCOMP option instead of COMP.
6457
6458         * getline.c: (getl_include) Fixed bug that popped up when called
6459         when file queue was empty.
6460         (read_console) Resets error_count, warning_count,
6461         error_already_flagged to zero.
6462
6463         * glob.c: Many changes to update list of variables.
6464         (init_compat_dependent) Now this function is called whenever
6465         `compat' changes.  It now sets set_seed only if it hasn't
6466         previously been referenced.  It now calls
6467         lex_init_compat_dependent().
6468
6469         * include.c: (cmd_include_at) Frees temporary buffer instead of
6470         line buffer.  
6471         (cmd_include) Doesn't make copy of include file name.
6472
6473         * lexer.c: Comment fixes.
6474         (init_lex) Moved some code into new function
6475         lex_init_compat_dependent().
6476         (lex_init_compat_dependent) New function.
6477         (hex_val) Simplified.
6478         (preprocess_line) Uses set_endcmd instead of hardcoding `.'.
6479
6480         * main.c: Comment fixes.
6481         (main) Reformatted.
6482
6483         * misc.c: (formats[]) Added FMT_CCA...FMT_CCE.
6484         (check_input_specifier) Disallows FMT_CCA...FMT_CCE.
6485         (convert_fmt_ItoO) Detects FMT_CCA...FMT_CCE.
6486         (setup_randomize) Sets set_seed_used.
6487
6488         * set.q: Comment fixes.
6489         (custom_results) Conditionalizes on `compat'.
6490         (custom_log) Calls custom_journal().
6491         (set_ccx) New function.
6492         (cmd_set) Calls init_compat_dependent() when `compat' changes.
6493         Calls set_ccx() to handle CCA...CCE.  Sets set_grouping
6494         when set_decimal changes.  Range-checks values for MITERATE,
6495         MNEST.  Message fixes.
6496
6497         * settings.h: Comment fixes.
6498         (struct set_cust_currency) New struct.
6499         (set_cc[], set_grouping, set_seed_used) New global vars.
6500
6501         * var.h: (FMT_CCA...FMT_CCE) New output formats.
6502         (FCAT_OUTPUT_ONLY) New FCAT_* constant.
6503
6504 Thu Nov 28 23:14:07 1996  Ben Pfaff  <blp@gnu.org>
6505
6506         * glob.c: Revised variables to correspond to settings.h.
6507         (init_glob) Initializes variables from settings.h properly.
6508
6509         * set.q: Began long-overdue major revision to correspond to new
6510         philosophy.  Most code changed. 
6511
6512         * settings.h: Mostly changed; reorganized, reordered, large new
6513         comment.
6514
6515 Thu Nov 28 19:46:10 1996  Ben Pfaff  <blp@gnu.org>
6516
6517         * get.c: (cmd_save_internal) No longer forces compression off.
6518
6519         * sfm-read.c: (read_compressed_data) If eof is reached when
6520         reading a new instruction octet, only signal error if we're in the
6521         middle of a case.
6522
6523         * sfm-write.c: (COMPRESSION_BIAS) New #define.
6524         (struct sfm_fhuser_ext) New member `end'.
6525         (write_header) Refers to COMPRESSION_BIAS instead of magic 100.0.
6526         (ensure_buf_space) New function.
6527         (sfm_write_case) Reimplemented in order to support compression.
6528         (sfm_close) Writes out the remaining contents of the compression
6529         buffer if any.
6530
6531 Wed Nov 27 23:18:35 1996  Ben Pfaff  <blp@gnu.org>
6532
6533         * command.c: Defined SAVE and XSAVE commands in command table.
6534
6535         * common.h: second_lowest_value is of type flt64, not double.
6536
6537         * file-handle.h: Comment fix.
6538
6539         * get.c: Comment fixes.
6540         (static var `trns') New.
6541         (save_write_case_func, save_trns_proc, save_trns_free, null_func,
6542         cmd_save_internal, cmd_save, cmd_xsave) New functions.
6543         (dict_delete_run) Clears the variables and frees them now.
6544         (trim_dictionary) Sets default for compression.
6545         On KEEP subcommand, frees deleted variables as well as clearing
6546         them.  Finally got the sense of the test for deleting all
6547         variables correct.
6548         [DEBUGGING] (dump_dict_variables) Message fix.
6549
6550         * glob.c: (init_glob) set_compression set to 1 by default.
6551
6552         * list.q: Properly #includes config.h.
6553
6554         * misc.h: New macro REM_RND_UP.
6555
6556         * settings.h: Comment fix.
6557
6558         * sfm-read.c: (structs sysfile_header, sysfile_format,
6559         sysfile_variable; inline function bswap_int32) Moved to new file
6560         sfmP.h.
6561         (corrupt_msg) [__CHECKER__] No longer induces segfault.
6562         (sfm_read_dictionary) Fixed bug caused by failing to initialize
6563         var_by_index.
6564         (read_machine_flt64_info) Fixed some problems caused by confusion
6565         between flt64 and double types.
6566         (read_header) Message fix.
6567         (read_variables) Fixed set of cases in which we byte-swap sv.print
6568         and sv.write.  Fixed confusion of flt64 and double.
6569
6570         * sfm.h: (struct sfm_write_info) New.
6571
6572         * som-high.c: (som_draw_title) Properly frees `s'.
6573
6574         * temporary.c: (save_dictionary) Comment fix.
6575
6576         * var.h: Comment fixes.  New FMT_* enum, FMT_NUMBER_OF_FORMATS.
6577         (struct trns_header) Formatting fix.
6578         (struct save_trns) New.
6579
6580         * vars-atr.c: (discard_variables) Comment fix.
6581
6582         * sfm-write.c: New file, baseline release.
6583
6584         * sfmP.h: New file, baseline release.
6585
6586 Sun Nov 24 14:53:53 1996  Ben Pfaff  <blp@gnu.org>
6587
6588         * cmdline.c: (parse_command_line) `--version' output updated.
6589         (glob var syntax_message[]) Added my e-mail address.
6590
6591         * file-handle.q, lexer.c, vfm.c: Changed many instances of
6592         `illegal' to `invalid'.
6593
6594         * sfm-read.c: (struct sfm_fhuser_ext) New fields used as
6595         uncompression buffer.
6596         (sfm_close) Frees decompression buffer.
6597         (sfm_read_dictionary) Initializes decompression buffer.
6598         (buffer_input, read_compressed_data) New functions.
6599         (sfm_read_case) Restructured; now calls read_compressed_data() to
6600         handle compressed system file data.
6601
6602         * var.h: Comment fix.
6603
6604 Mon Nov 11 15:34:09 1996  Ben Pfaff  <blp@gnu.org>
6605
6606         * dfm.c: (dfm_close) Does not set h->{ext,class} because the
6607         caller handles it.
6608          
6609         * get.c: New comments.  New static var `get_file'.
6610         (cmd_get) Now fully implemented.  Calls discard_variables();
6611         initializes fv and lv for all variables; new debug code; sets
6612         up the dictionary; sets up the input program.
6613         (read_from_get, cancel_get) New functions.
6614
6615         * sfm-read.c: Comment fixes.
6616         (sfm_close) New static function.
6617         (sfm_read_dictionary) Properly sets up the class of the
6618         file_handle.  No longer cares what size the data is in records of
6619         type 7.  Also, on failure, properly cleans up the file_handle and
6620         free()s some stuff.
6621         (read_variables) No longer thinks it knows `nval' of the
6622         dictionary.  Now sets p.get.fv, etc., instead of speculatively
6623         setting fv itself.
6624         (read_value_labels) Fixed off-by-one error in indexing of
6625         var_by_index[].
6626         (sfm_read_case) New function.
6627         (sfm_r_class) New static var.
6628
6629         * var.h: (get_proc) New struct.
6630         (struct variable) New member p.get.
6631
6632 Thu Nov  7 20:52:28 1996  Ben Pfaff  <blp@gnu.org>
6633
6634         * get.c: Removed GTSV_OPT_MAP because of a misinterpretation of
6635         the manual's meaning.
6636         (rename_variables) New function.
6637         (trim_variables) Doesn't try to parse MAP any more.  Removed debug
6638         code.  Now properly reorders the dictionary on the KEEP keyword.
6639
6640         * sfm-read.c: (read_value_labels) Fixed some bugs regarding
6641         garbage collection.
6642
6643         * vars-atr.c: (clear_variable) New argument `dictionary *'.
6644         (rename_variable) New function.
6645         (free_val_lab) Reformatted.
6646
6647 Thu Nov  7 17:29:16 1996  Ben Pfaff  <blp@gnu.org>
6648
6649         * var.h: Reindented entire file.  Comment fixes.
6650         (glob vars var, var_by_name, nvar, N, nval, n_splits, splits)
6651         Removed.
6652         (glob var default_dict) New.
6653         (struct indirect_dictionary) Removed.
6654
6655         * Many other source files were changed to add `default_dict.'
6656         before all references to the dictionary of the active file.
6657         
6658         * vars-atr.c: (make_indirect_dictionary) Removed.
6659
6660         * glob.c: Reindented all variable declarations.  Updated for
6661         changed var.h.  Comment fixes.
6662
6663         * temporary.c: (restore_dictionary, save_dictionary) Simplified
6664         because now we can mainly copy dictionary structs.
6665
6666         * vars-prs.c: (is_dict_varname, parse_dict_variable,
6667         parse_variables) Takes dictionary instead of indirect_dictionary
6668         first argument.
6669         (parse_variables) Instead of calling make_indirect_dictionary,
6670         just sets DICT to &default_dict if DICT is NULL.  Of course, lots
6671         of `*dict.' references had to be changed to `dict->'.  Removed
6672         debug code.
6673
6674 Thu Nov  7 15:48:52 1996  Ben Pfaff  <blp@gnu.org>
6675
6676         * get.c: Added GTSV_OPT_* series of enums.
6677         (trim_dictionary, dict_delete_run) New functions.
6678         [DEBUGGING] (dump_dict_variables) New function.
6679         (cmd_get) Calls trim_dictionary() to get dictionary fully set-up.
6680         [DEBUGGING] Calls dump_dict_variables() to display results.
6681
6682         * glob.c: (cmp_variable) Now a public function declared in var.h.
6683
6684         * sfm-read.c: Turned off debug code.  Comment fixes.
6685         (read_machine_int32_info, read_machine_flt64_info) New functions
6686         to parse type 7 records.
6687         (sfm_read_dictionary) Properly byteswaps several fields now.
6688         Calls read_machine_*_info() to parse type 7 subtypes 3 and 4
6689         records.  [DEBUGGING] Dumps dictionary.
6690         (read_variables) Sets `index' field of variables created properly.
6691         Constructs avl tree of variables in dictionary.  [DEBUGGING] No
6692         longer dumps dictionary.
6693         (read_value_labels) Properly byteswaps fields.  [DEBUGGING] New
6694         debug code.
6695         [DEBUGGING] (dump_dictionary) No longer stubbed out.
6696
6697         * temporary.c: (restore_dictionary) Destroys `var_by_name' glob
6698         var before destroying any variables just to save a little time.
6699
6700         * var.h: (struct variable) Reordered in order to make name[] the
6701         first member; this makes pointers to `variable' pointers to the
6702         variable name, simplifying avl trees, etc.
6703         (struct indirect_dictionary) New struct.
6704
6705         * vars-atr.c: (find_variable) Rewritten for efficiency.
6706         (make_indirect_dictionary, is_dict_varname, parse_dict_variable)
6707         New functions.
6708         (is_varname) Rewritten for efficiency.
6709         (parse_variables) New argument, which is a `dictionary *'.  All
6710         references changed.  This function now reads variable names from
6711         the dictionary passed, or from the default dictionary if NULL.
6712
6713 Tue Nov  5 18:34:59 1996  Ben Pfaff  <blp@gnu.org>
6714
6715         * misc.h: Added new macro DIV_RND_UP to perform integer division,
6716         rounding up.  Changed many references to ROUND_UP to use this
6717         instead.
6718
6719         * sfm-read.c: Includes avl.h.
6720         (corrupt_msg) Induces a segfault under Checker.
6721         (macro assertive_bufread) New.  Many references to bufread() now
6722         use this instead.
6723         (sfm_read_dictionary) Split up into several functions.  Added code
6724         to read dictionary records following the the type 2 records.  Not
6725         quite complete.  New variable `var_by_index'.
6726         (read_header, read_variables) New functions extracted from
6727         sfm_read_dictionary().
6728         (read_value_labels) New function.
6729         (bufread) Checks ferror() if fread() doesn't return the expected
6730         value; if ferror() is zero it's just EOF.
6731         (dump_dictionary) Stubbed out.
6732
6733         * BTW: The source code now exceeds 50000 lines!
6734         
6735 Mon Nov  4 22:03:28 1996  Ben Pfaff  <blp@gnu.org>
6736
6737         * command.c: Added GET to cmd_table[].
6738
6739         * list.q: Removed reference to alloca headers.
6740         (cmd_list) Gave prototype.
6741
6742         * sfm-read.c: Added DEBUGGING comments.
6743         (sfm_read_dictionary) Checks bias correctly.  Sets
6744         dict->var_by_name to NULL.  Calculates long_string_count
6745         correctly.  realloc's dict->var[] array to minimum size.
6746         [DEBUGGING] Calls dump_dictionary.
6747         [DEBUGGING] (dump_dictionary) New function.
6748
6749         * temporary.c: (save_dictionary) Sets var_by_name to NULL.
6750         (restore_dictionary) If the dictionary contains a non-NULL
6751         var_by_name, uses that instead of generating one.
6752         (free_dictionary) Destroys var_by_name.
6753
6754         * var.h: (struct dictionary) Added field `var_by_name'.
6755
6756         * get.c: New file, not complete.
6757
6758 Sun Nov  3 12:24:36 1996  Ben Pfaff  <blp@gnu.org>
6759
6760         * mis-val.c: New enums MV_NOR_*.  New struct num_or_range.
6761         (parse_num_or_range) New function.
6762         (parse_numeric) Reimplemented in order to support LOW THRU <n> and
6763         <n> THRU HIGH missing values.
6764
6765         * output.h: [__GNUC__>1 && __OPTIMIZE__] (width, height) Made
6766         __attribute__((const)).
6767
6768         * q2c.c: (get_token) Merged isdigit || isalpha into isalnum.
6769
6770         * sfm-read.c: Finished reference implementation.
6771
6772         * sfm.h: Includes var.h.
6773
6774         * var.h: Comment fixes.
6775         (struct `variable') Reordered some fields.
6776
6777         * vars-atr.c: (is_num_user_missing) Added support for MISSING_*
6778         constants added previously.
6779
6780 Wed Oct 30 17:13:08 1996  Ben Pfaff  <blp@gnu.org>
6781
6782         * common.h: Comment fixes.  Added declaration of
6783         `second_lowest_value' as variable or macro.  Made `compat_type',
6784         `pgm_state_type' into anonymous enums.
6785
6786         * display.c: Comment fix.
6787
6788         * glob.c: [ENDIAN==UNKNOWN] Added definition for `endian' global
6789         var.
6790         [!defined SECOND_LOWEST_VALUE] Added definition for
6791         `second_lowest_value' global var.
6792         (compat, pgm_state global vars) Changed types to `int'.
6793         (init_glob) Initializes `second_lowest_value'.
6794
6795         * sfm-read.c: Continued work, not complete.
6796
6797         * var.h: Added new MISSING_* constants to handle LOWEST and
6798         HIGHEST.
6799
6800 Sat Oct 26 23:06:06 1996  Ben Pfaff  <blp@gnu.org>
6801
6802         * sfm-read.c: New file, not complete.
6803
6804         * cases.c: (vec_insert) Changed vector expansion algorithm.
6805         (vec_delete) Fixed bug that screwed up deletion sometimes, it was
6806         mucking up the RECODE transformation in particular.
6807         (envector) Harmless change in notation.
6808
6809         dfm is now fairly well tested again.  
6810         * dfm.c: (dfm_get_record) Only returns ext->ptr if ext is
6811         non-NULL--duh.
6812         (cmd_begin_data) if(ext->line) replaced by if(ext && ext->line).
6813
6814         * recode.c: Comment fix.
6815
6816         * sfm.h: Interface should be fairly final now, or at least for a
6817         day or so...
6818
6819         * vfm.c: [DEBUGGING] (index_to_varname) New function.
6820         (open_active_file) [DEBUGGING] Translates ccase indices into
6821         variable names now to make it easier to understand what's really
6822         going on.
6823
6824 Sat Oct 26 20:46:31 1996  Ben Pfaff  <blp@gnu.org>
6825
6826         * data-in.c: Comment fix.
6827
6828         * data-list.c: Includes dfm.h.
6829         (do_reading) Uses new function dfm_push_cust().
6830
6831         * data-out.c: (convert_time, convert_WKDAY, convert_MONTH) Added
6832         `return 1;' at end.
6833
6834         * file-handle.h: Completely changed.  Some parts split off into
6835         new file dfm.h.  Implemented in file-handle.q.
6836         (enum FH_*) Removed.
6837         (struct fh_ext_class) New struct.
6838         (struct file_handle) Retained only these fields: name, norm_fn,
6839         fn, recform, lrecl, mode.  New fields class, ext.
6840         (get_handle_by_name, get_handle_by_filename, parse_file_handle,
6841         close_handle, handle_name) Added `fh_' prefix to name, all
6842         references changed.
6843
6844         * dfm.h: New file, implemented in dfm.c.
6845         (get_record, put_record, fwd_record, bkwd_record, set_record,
6846         get_cur_col) Functions moved from file-handle.h, now prefixed with
6847         `dfm_'.
6848         (dfm_push_cust) New function.
6849
6850         * sfm.h: New file.  Incomplete.
6851
6852         * dfm.c: All functions adjusted/rewritten for new dfm/fhp
6853         interface.  Functions reordered, comments changed.  Not well
6854         tested, probably full of bugs.
6855         (struct dfm_fhuser_ext) New struct.
6856         (dfm_close) New function.
6857         (open_file_r) Pickier about finding `BEGIN DATA.' line.
6858         (open_file_w) User messages changed.
6859         (get_record) Comment fixed.
6860         (read_record) Increments ext->ln even for inline_file.  Calls
6861         dfm_close() for inline_file when `END DATA.' encountered.
6862         (dfm_get_record) Experimental restructuring.
6863         (dfm_push_cust) New function.
6864         (cmd_begin_data) Detects whether the inline file was fully read by
6865         checking whether it is still open; detects whether it was read at
6866         all by checking whether the line number is greater than zero.
6867
6868         * file-handle.q: All functions adjust/rewritten for new dfm/fhp
6869         interface.  Functions reordered, comments changed.  Not well
6870         tested, probably full of bugs.
6871         (init_file_handle) Removed initializers for obsolete fields, added
6872         new fields.
6873         (fh_close_handle) Much simpler, now mainly calls the class
6874         function.
6875         (fh_init_files) Renamed inline file internal filename.
6876
6877         * file-type.c: Includes dfm.h.
6878         (read_from_file_type) Doesn't use dfm internal state anymore.
6879
6880         * inpt-pgm.c, print.c: Include dfm.h.
6881
6882         * recode.c: (internal_cmd_recode) Casts strlen() return value to
6883         int in comparison with other int.
6884
6885         * som-high.c: (build_target) Fixed operator precedence problem in
6886         if statement (& versus ==).
6887
6888 Sat Oct 26 10:39:25 1996  Ben Pfaff  <blp@gnu.org>
6889
6890         * dfm.c: (read_record) Can now read fixed-length records; not
6891         tested.
6892         (put_record) Can now write fixed-length records; not tested.
6893
6894         * file-handle.h: FH_* defines changed to enums.  New enum series
6895         FH_RF_*, FH_MD_*.
6896         (struct file_handle) New members recform, lrecl, mode.
6897
6898         * file-handle.q: Parser changed.
6899         (internal_cmd_file_handle) Added support for new /RECFORM, /MODE,
6900         /LRECL subcommands.  These are compatible with Windows.
6901         (init_file_handle) Initializes recform, mode fields.
6902
6903         * q2c.c: (get_line) When outputting `!' comment lines, now
6904         increments the output file line number so that `#line' directives
6905         are correct.
6906         (make_identifier) New function that converts an arbitrary string
6907         into a valid C identifier.
6908         (dump_vars) Calls make_identifier() in two places in order to
6909         suppress some errors for bad identifiers.
6910         (make_match) Allows TRUE as synonym for YES and FALSE as synonym
6911         for NO.  Allows numbers to be prefixed by underscores to make them
6912         acceptable C identifiers but still to be parsed as numbers by the
6913         Fiasco lexer.
6914
6915 Thu Oct 24 20:13:42 1996  Ben Pfaff  <blp@gnu.org>
6916
6917         * command.c: Re-enabled RECODE, SAMPLE, SELECT IF.
6918         
6919         * dfm.c: Comment fixes. (get_record) Gives error if file handle
6920         was opened for writing.
6921         (open_file_w) New function.
6922         (read_record) Uses strncasecmp if available.  Improved error
6923         messages, comments.
6924         (put_record) New function.
6925
6926         * file-handle.h: Moved function comments into dfm.c and
6927         file-handle.q.  Comment fixes.  Removed declarations of
6928         tilde_expand() and normalize_filename().
6929         (struct file_handle) Changed `open' from boolean to enumerated
6930         field to allow for three states--closed, open for reading, open
6931         for writing--all references changed.
6932
6933         * file-handle.q: Includes filename.h.
6934
6935         * print.c: (CMD_* enums) Renamed PRT_* and moved into var.h; all
6936         references changed.
6937         (alloc_line) Makes allowance for line terminator characters in
6938         calculations.
6939         (print_trns_proc) Now handles OUTFILE, WRITE differences.
6940         (print_space_trns_proc) Handles OUTFILE differences.
6941
6942         * recode.c, sample.c: Comment fixes.
6943
6944         * var.h: (struct print_trns) Changed boolean field `eject' to
6945         bitmapped field `options'; all references changed.  New enums
6946         PRT_* for use with this field.
6947
6948         * exception.h, test-exception.c: Removed.
6949
6950 Thu Oct 24 17:47:14 1996  Ben Pfaff  <blp@gnu.org>
6951
6952         * ascii.c: (delineate) Turned off debug output.
6953
6954         * common.c: [Checker and Linux] (__assert_fail, __eprintf) Moved
6955         to error.c.
6956
6957         * data-in.c: (parse_string_as_format) Sets the entire string value
6958         to spaces, not just the short string part of it.  Is this correct
6959         now? 
6960
6961         * data-out.c: (convert_date) Fixed DATETIME format problems with
6962         decimal places, removed debug code.
6963
6964         * dfm.c: (open_file_r) Fixed bug where an error would occur in the
6965         middle of parsing BEGIN DATA that would cause the lexer to read
6966         from a wild pointer `prog'; now calls new function
6967         preprocess_line() in lexer.c.
6968
6969         * error.c: [__CHECKER__] (hcf) Calls induce_segfault() on improper
6970         termination.
6971         [Checker and Linux] (__assert_fail, _eprintf) Moved from common.c.
6972         Now call induce_segfault() to induce the segfault.
6973         (induce_segfault) New function.
6974
6975         * expr-opt.c: Comment fix.
6976         (parse_sysvar) New function.
6977         (parse_primary) Added system variable support--calls
6978         parse_sysvar().
6979         (global var ops) Added OP_CASENUM operator.
6980
6981         * expr.h: Comment fixes.
6982         (OP_* enum) added OP_CASENUM operator.
6983         (struct casenum_node) New struct.
6984         (union any_union_union) New member `cas' of type `casenum_node'.
6985
6986         * glob.c: (global var last_vfm_invocation) New var.
6987         (init_glob) Initializes last_vfm_invocation.
6988
6989         * lexer.c: (lookahead) Fixed reversed condition on if statement.
6990
6991         * getline.c: (get_line) Split into get_line() and preprocess_line().
6992         (preprocess_line) New function.
6993
6994         * var.h: Declares last_vfm_invocation.
6995
6996         * vfm.c: (procedure) Sets last_vfm_invocation.
6997
6998 Wed Oct 23 21:53:43 1996  Ben Pfaff  <blp@gnu.org>
6999
7000         * command.c: (parse_cmd) Fixed bad assertion related to
7001         lookahead().
7002
7003         * data-in.c: (parse_month) Implemented to parse months according
7004         to full interpretation of standard.
7005         (to_roman) New function.
7006         (parse_wk_delimiter) Bug fix (forgot to skip `WK' in string).
7007         (parse_weekday) Bug fix (forgot to skip all the day name).
7008
7009         * data-list.c: (read_from_data_list_fixed) Fixed bug that screwed
7010         up parsing of multirecord data items.  Also fixed user message.
7011
7012         * data-out.c: Comment fix.
7013         (year2, year4, convert_date, convert_time, convert_WKDAY,
7014         convert_MONTH) New functions to support time & date output.
7015         (convert_format_to_string) Calls new time & date output routines.
7016
7017         * expr-prs.c: (nary_num_func) Found a bug, but didn't fix it yet.
7018
7019         * lexer.c: (lookahead) Noted a previously unnoticed caveat in
7020         comment.
7021
7022         * main.c: [DEBUGGING] (dump_token) Updated to handle getline.h.
7023
7024         * misc.c: (global var formats) Fixed declarations of DATETIME,
7025         TIME, DTIME.
7026
7027         * postscript.c: (text) Fixed a pair of bugs in the reallocation of
7028         the output_char buffer.
7029
7030         * vars-prs.c: (parse_DATA_LIST_vars) Fixed a failure to free
7031         memory bug.  Fixed user messages.
7032
7033 Tue Oct 22 17:27:04 1996  Ben Pfaff  <blp@gnu.org>
7034
7035         * Removed #pragma argsused from lots of places.
7036         
7037         * data-in.c: Implemented zoned decimal and time-date formats.
7038         Untested.  This is a huge chunk of code--maybe 1000 lines and 50
7039         new functions.
7040
7041         * data-out.c: Implemented zoned decimal format.
7042
7043         * expr.h: Moved yrmoda() declaration here from exprP.h.
7044
7045         * misc.c: (global var formats) Minor fixes--added
7046         FCAT_SHIFT_DECIMAL to formats N and Z.
7047         (convert_fmt_ItoO) Added support for format Z.
7048
7049         * som-frnt.c: (som_set_value) Fixed bug regarding string values.
7050
7051 Mon Oct 21 20:39:59 1996  Ben Pfaff  <blp@gnu.org>
7052
7053         * command.c: (parse_cmd) [GLOBAL_DEBUGGING] Inserted call to
7054         som_check_workspace() that is activated between commands.
7055
7056         * data-list.c: (dump_fixed_table, dump_free_table) Finished these
7057         for good, I hope.
7058
7059         * list.q: (begin_row) Changed title expansion style from
7060         SOPT_X_VERT to SOPT_X_SHSP.
7061
7062         * som-frnt.c: Now includes `somP.h'.
7063         (som_push_workspace, som_pop_workspace) New functions that, taken
7064         together, form a solution to the recursive table building problem
7065         mentioned yesterday.  Surrounded every table output routine
7066         throughout the program with calls to these functions.
7067         [GLOBAL_DEBUGGING] (som_check_workspace) New function.
7068         (som_create_table) Checks that there's an active workspace.
7069         (som_destroy_all_tables, som_crush) Removed.
7070
7071         * som-high.c: (global var som_preserve_tables) Removed, all
7072         references deleted.
7073         (som_submit_table) Checks that there's an active workspace.
7074         (dump_columnated_table) Doesn't columnate tables that would have
7075         just one row per column.
7076         (dump_crush_page, som_dump_crush_page) Removed debugging code.
7077         (som_dump_crush_page) Moved row number labels from left side of
7078         tables to right side.
7079         (som_get_table_size) Added support for SOPT_X_SHSP.
7080
7081         * som.h: New cell expansion type SOPT_X_SHSP.
7082
7083         * somP.h: (global vars arena_stack, n_arena_stack, m_arena_stack)
7084         New vars.
7085         (global var curtab_arena) Moved from som-frnt.c.
7086
7087 Sun Oct 20 13:45:28 1996  Ben Pfaff  <blp@gnu.org>
7088
7089         * ascii.c: [GLOBAL_DEBUGGING] (SUPPRESS_WARNINGS) New debug option
7090         that causes bad location warnings to be suppressed.
7091         (delineate) Saves current font when calling draw_text(); fixed
7092         handling of NULLs when backing up.  Also fixed line-wrapping bug.
7093
7094         * command.c: Re-enabled `LEAVE', `NUMERIC', `PRINT', `PRINT EJECT',
7095         `PRINT FORMATS', `PRINT SPACE', `STRING', `TITLE', `WRITE'.
7096
7097         * common.c: Added code to cause assertion failure to dump core
7098         when run under Checker.
7099
7100         * data-list.c: (dump_fixed_table) Fixed some inconsistencies, but
7101         there are still bugs.
7102
7103         * glob.c: (__eprintf) Removed.
7104
7105         * list.q: Inserted som_preserve_tables kluge that prevents tables
7106         from being thrown away due to recursive table building through
7107         som_output_line being called from a transformation during the LIST
7108         procedure invocation.  This is a general problem that must be
7109         solved in a better way since it applies to all procedures in
7110         general.
7111         (begin_row) Changed title options to SOM_X_VERT from SOM_X_BOTH.
7112         (flush_table) Removed SOM_TOPT_PRESERVE from submission options.
7113
7114         * numeric.c: Fixed several errors in the form of msg() calls.
7115
7116         * print.c: Updated for use of som.
7117         (dump_table) Reimplemented.
7118         (print_trns_proc) Calls som_eject_page() instead of eject_page().
7119         Calls som_output_text() instead of outs_line().
7120
7121         * som-frnt.c: (som_destroy_all_tables) Sets som_preserve_tables to
7122         0.
7123         (som_output_text) Function moved from som-low.c.  Interface
7124         changed.
7125
7126         * som-high.c: (som_preserve_tables) New global public variable
7127         declared in som.h.
7128         (som_submit_table) Destroys the tables only if som_preserve_tables
7129         is 0.
7130         (paginate_horizontally) Bugfix: sets som.mpw even if there's only
7131         one subrow per row.  Now labels subrows if there's more than one
7132         subrow per row.
7133         (dump_crush_table) Added wishlist comment.
7134         (som_eject_page) New public function declared in som.h.
7135
7136         * som-low.c: (som_dump_crush_page) Draws row labels if there's
7137         more than one subrow per row.
7138         (som_output_text) Moved to som-frnt.c.
7139
7140         * som.h: (SOM_TOPT_PRESERVE) Removed.
7141
7142         * title.c: (get_title) Changed interface.
7143         (cmd_title) Changed `title' to `outp_title'.
7144         (cmd_subtitle) Changed `subtitle' to `outp_subtitle'.
7145
7146 Sun Oct 20 09:04:15 1996  Ben Pfaff  <blp@gnu.org>
7147
7148         * list.q: (flush_table) Conforms to new partial options in
7149         som_submission_form.
7150
7151         * som-high.c: (paginate_horizontally) Changed form of subrow
7152         number labels.
7153         (build_target) Omits spacing before table if
7154         SOM_TOPT_PARTIAL_OMIT_TOP is selected.
7155         (dump_crush_page) Changed interface.  Only trims bottom rule if
7156         SOM_TOPT_PARTIAL_OMIT_BTM is not selected.
7157         (dump_crush_table) Handles partial tables.
7158         (output_row_label) New function.
7159         (som_dump_crush_page) Emits subrow number labels.  Draws vertical
7160         rule on the right edge of narrow subrows.
7161
7162         * som.h: Changed SOM_SUB_PARTIAL_* series of submission type
7163         constants to a series of SOM_TOPT_PARTIAL_* submission options.
7164         All references updated.
7165
7166 Fri Oct 18 19:46:49 1996  Ben Pfaff  <blp@gnu.org>
7167
7168         * misc.c: Comment fix.
7169
7170         * som-high.c: (examine_table) Treats crushed tables separates for
7171         purpose of determining header size.
7172         (paginate_horizontally) Allots space for line numbers in crushed
7173         tables with lots of subrows per row.  Calculates the `maximum page
7174         width', the width of the widest horizontal page.
7175         (build_target) Removed trim argument; all references changed.
7176         Stricter assertions.  (dump_crush_page) New function.
7177         (dump_crush_table) Reimplemented.
7178
7179         * som-low.c: (som_dump_page) Uses new RULE_ROW &c. constants.
7180         (som_dump_crush_page) Reimplemented, interface changed.
7181
7182         * somP.h: Many many new helper macros for use with crushed tables.
7183         (global var som) Removed `tv', `cum_y' members; all references
7184         removed.  New members `mpw', `digit_space'.
7185
7186 Sun Sep 29 19:37:03 1996  Ben Pfaff  <blp@gnu.org>
7187
7188         * arena.c: (arena_alloc) [!DISCRETE_BLOCKS] Removed `size'
7189         variable, changed to constant 1024.
7190         (arena_ca_strdup) Changed `sizeof(a_string)' to
7191         `sizeof(c_string)'.
7192         (arena_ca_strdup) [!DISCRETE_BLOCKS] Changed bad cast from
7193         `(c_string *)' to `(char *)'; this fixed some offset problems.
7194
7195         * filename.c: (readlink_malloc) Changed initial allocation from
7196         100 bytes to 128.
7197         (good_getcwd) Changed from xmalloc() to local_alloc(); removed
7198         comment.
7199
7200         * postscript.c: (read_fontmap) Fixed leak by changing &owner to
7201         &fm->owner in several places.
7202
7203         * som-high.c: (output_table) Changed interface to rest of world.
7204         (examine_crush_table) Removed.  Crushed tables are re-broken now,
7205         in preparation for rewrite.
7206
7207         * som.h: Comment fix.
7208
7209 Sat Sep 28 21:28:07 1996  Ben Pfaff  <blp@gnu.org>
7210
7211         * ascii.c: (ascii_init_driver) Disposes of x->file.filename and x
7212         itself in the cleanup stage.
7213
7214         * descript.q: (display) At least temporarily, changed the table
7215         format to a crushed table.
7216
7217         * list.q: (begin_row) At least temporarily, added horizontal lines
7218         between cases.
7219
7220         * som-high.c: (examine_crush_table) Sets som.hh to the width of
7221         the horizontal "headers," that is, to the width of the far left
7222         and far right rules.
7223         (justify_pagination) Sets som.th to the width of the widest row
7224         in the crushed table.  Fixed inner loop off-by-one error.
7225
7226         * som-low.c: (som_dump_crush_page) Added code to draw horizontal
7227         rules.
7228
7229         * somP.h: Comment fix.
7230
7231 Fri Sep 27 20:08:39 1996  Ben Pfaff  <blp@gnu.org>
7232
7233         * filename.c: (open_file_ext) Now, doesn't set f->file to NULL
7234         before closing it; also, opens the constructed filename `s'
7235         instead of f->filename.
7236
7237         * postscript.c: Moved initialization of x->loaded, x->prop,
7238         x->fixed, x->current, also the add_encoding() calls, into
7239         postopen().
7240         (preclose) Destroys x->combos; sets x->loaded, x->combos to NULL;
7241         sets x->last_font to NULL; sets x->next_combo to zero.
7242
7243         * som-high.c: (crushed_row_height) Moved definition farther up.
7244         (som_submit_table) Doesn't calculate line width, font size until
7245         after calling open_page(), to accomodate changes to PostScript
7246         driver.
7247         (vert_headers) Removed; equivalent functionality moved to
7248         examine_table(), examine_crush_table().
7249         (justify_pagination) Replaced with different algorithm.
7250         (dump_crush_table) Bugfix that caused tables to fail to be clipped
7251         at the bottom of the page.
7252
7253 Thu Sep 26 22:20:26 1996  Ben Pfaff  <blp@gnu.org>
7254
7255         * command.c: Added cmd_list back into cmd_table.
7256
7257         * freq.c, frequencies.q, repeat.c, list.q, vars-atr.c, vfm.c:
7258         Comment fix: `#define DEBUGGING' --> `#define DEBUGGING 1'.
7259
7260         * list.q: (flush_table) Updated to new som_submission_form format.
7261
7262         * som-frnt.c: Comment fix.
7263
7264         * som-high.c: Changed `#endif' to `#undef EXTERN'.
7265         (output_table) Calls som_get_table_size() directly; handles
7266         crushed tables.
7267         (examine_crush_table) New function; calls vert_headers().
7268         (examine_table) Moved some code into new function, vert_headers().
7269         (justify_pagination) New function.
7270         (dump_plain_table) Removed `static' from `cy'.
7271         (dump_crush_table) New function.
7272
7273         * som-low.c: (som_dump_crush_page) New function.
7274
7275         * som.h: Comment fixes.
7276         (enum SOM_TOPT_CRUSH) New.
7277         (SOM_SUB_PARTIAL_BEG, SOM_SUB_PARTIAL_MID, SOM_SUB_PARTIAL_END)
7278         Temporarily set to zero to make do with LIST procedure.
7279
7280         * somP.h: Re-ordering.
7281
7282 Wed Sep 25 19:36:11 1996  Ben Pfaff  <blp@gnu.org>
7283
7284         * som.c: Split into som-frnt.c, som-high.c, som-low.c.
7285
7286         * somP.h: New file for use by som-high.c, som-low.c.
7287
7288         * q2c.c: Added definition for VME.
7289         (get_line) Now dumps `!' comment lines to the output file
7290         verbatim.
7291
7292         * crosstabs.q, descript.q, file-handle.q, frequencies.q, list.q,
7293         set.q: Changed format of `!' comment lines.
7294
7295 Tue Sep 24 18:39:09 1996  Ben Pfaff  <blp@gnu.org>
7296
7297         * All source files: Added copyright notice.
7298
7299         * common.c: (xmalloc, xrealloc, xstrdup) Cast size_t's to unsigned
7300         longs in msg() calls.
7301
7302         * con32s.c: (xmalloc, xrealloc) Updated from common.c.
7303
7304         * q2c.c: (xmalloc, xrealloc, xstrdup) Updated from common.c.
7305
7306 Sat Sep 21 23:16:31 1996  Ben Pfaff  <blp@gnu.org>
7307
7308         * output.c: (outp_read_devices) Changed criteria for
7309         distinguishing different types of lines.
7310
7311 Fri Sep 20 22:52:28 1996  Ben Pfaff  <blp@gnu.org>
7312
7313         * cmdline.c: Changed syntax message.
7314
7315         * filename.c: (good_getcwd) Bug fix (?).
7316         (normalize_filename) [__BORLANDC__] Uses _fullpath() library
7317         function.
7318         (search_path) Appends DIR_SEPARATOR to directory name only if it
7319         does not already end with one.
7320
7321         * glob.c: Checks STAT_PAGER envvar before PAGER.
7322
7323         * output.c: Checks environment variables instead of just local
7324         macros.
7325
7326 Tue Sep 10 21:39:00 1996  Ben Pfaff  <blp@gnu.org>
7327
7328         * arena.c: (arena_destroy) Swatted a subtle bug that cropped up
7329         when the pointer passed to the function was within the arena
7330         itself, so that it couldn't properly be set to NULL _after the
7331         arena was freed_.
7332
7333         * command.c: Re-enabled DISPLAY.
7334
7335         * display.c: Rewritten to handle tables.  Untested.
7336
7337         * filename.c: (search_path) Fixed memory leak.
7338
7339         * frequencies.q: (cmd_frequencies) Frees v_variables.
7340         (postcalc) Calls cleanup_freq_tab() after displaying statistics.
7341         (cleanup_freq_tab) New function to garbage collect.
7342         (dump_full) Elegantized.
7343
7344         * main.c: New comment.
7345
7346         * output.h: New tag for tagged quotes: TAG_NEWLINE.
7347
7348         * postscript.c: Comment fix.
7349         (release_fontmap, free_font_entry) New functions.
7350         (ps_init_driver) Sets free_font_entry() as the freefunc for
7351         hashtable `loaded'.  Calls release_fontmap() when destroying a
7352         driver; also frees the output filename; also frees the
7353         ps_driver_ext block.
7354         (free_ps_encoding) Frees the filename as well as the encoding
7355         block.
7356         (output_encodings) Frees the line buffer and pops the msg-filename
7357         stack.
7358         (read_fontmap) Frees the fontmap filename and the line buffer.
7359         (postopen, preclose) Misc. garbage collection fixes.
7360         (ps_open_page) Destroys the `combos' hash table; sets `last_font'
7361         to NULL; this fixes some output problems.
7362         (text) Handles TAG_NEWLINE.  Untested.
7363
7364         * som.c: (cell_byte_size) Merged SCON_VALUE and SCON_TEXT cases.
7365         (som_set_string) Removed.  All references changed to
7366         `som_set_text'.
7367         (som_set_text) Rewritten.  New interface.  More general.
7368
7369         * som.h: Minor format changes.
7370         (struct som_value_cell) Removed; all references changed to
7371         `som_text_cell'.
7372         (enums SOT_*) Changed.
7373
7374 Mon Sep  9 21:43:13 1996  Ben Pfaff  <blp@gnu.org>
7375
7376         * command.c: Re-enabled SPLIT FILE.
7377
7378         * postscript.c: Comment fix.
7379
7380         * som.h: Added `SOT_NONE'.
7381
7382         * split-file.h: (cmd_split_file) Removed superfluous parenthesis.
7383
7384         * vfm.c: (dump_splits) Reimplemented.
7385
7386 Sat Sep  7 22:35:12 1996  Ben Pfaff  <blp@gnu.org>
7387
7388         * Compiled the project under gcc 2.7.2, which gave some new
7389         warnings.  This led to many additions of casts from unsigned to
7390         int sprinkled throughout the code.
7391         
7392         * arena.c: Many uses of `unsigned' changed to `size_t'.
7393
7394         * command.c: Added END FILE, END REPEAT to command table.
7395         (var cmd_end_repeat) Renamed cmd_end_repeat_p.
7396         (find_command, FILE_TYPE_okay) Not commented out anymore.
7397         (parse_cmd) Calls FILE_TYPE_okay again.
7398         (output_line) Added calls to som_output_text() to put the line
7399         in the output files.
7400
7401         * common.c: (macro VME) Format changes.
7402         (xstrdup) Asserts that its argument is not NULL.
7403         
7404         * data-list.c: Implemented dump_fixed_table().
7405         
7406         * inpt-pgm.c: Formatting changes.  Comment changes.
7407         (end_case_proc) Renamed end_case_trns_proc.
7408         (cmd_end_file, end_file_trns_proc) New functions.
7409
7410         * misc.c: Many uses of `int' and `unsigned' changed to `size_t'.
7411
7412         * misc.h: (local_strdup) New macro corresponding to strdup() but
7413         allocating its data through local_alloc() if possible--that is, if
7414         GNU C is in use.
7415
7416         * postscript.c: Comment changes.
7417         (quote_ps_name, quote_ps_string, output_encodings) New functions.
7418         (output_line, add_string) New macros supporting
7419         output_encodings().
7420         (postopen) Fixed contents of ${fixed-font} and ${prop-font}
7421         substitution vars.  Calls output_encodings() when a line
7422         consisting of `!encodings' is encountered.
7423         (preclose) Some code moved into quote_ps_string().
7424         (dump_line) Changed into macro supporting dump_fancy_line().
7425         (switch_font) Now outputs DSC "%%IncludeResource: font (...)"
7426         command when appropriate.
7427         (write_text) Fixed `literal_char' array (I think it's fixed, at
7428         least.)
7429         (text) Fixed bug when width was zero.  Now exits immediately on
7430         zero height_left.  Now, when executing `goto restart;', checks
7431         that cp<end, so that we don't read beyond end-of-string.  Also,
7432         outputs the correct code to the output file by outputting the code
7433         from the metric instead of the internal metric index.
7434
7435         * repeat.c: (cmd_end_repeat) New function.
7436
7437         * som.c: (var som) `headers' renamed `options' and semantics
7438         changed.  All references changed.
7439         (draw_title) `if(px!=-1 || px!=-1)' --> `if(px!=-1 || py!=-1)'.
7440         (build_target) Only inserts spacing if SOM_TOPT_SPACING not
7441         selected.
7442         (som_text_table) Removed.
7443         (som_output_text) New function.
7444
7445         * som.h: (struct som_submission_form) Removed `header', `reuse',
7446         replaced with bitmapped field `options'.
7447         (SOM_TOPT_*) New enum set for som_submission_form.options.
7448         (SOT_*) New enum set for som_output_text().
7449
7450         * temporary.c: (copy_variable) When copying the var label, only
7451         calls xstrdup() if it's non-NULL.
7452
7453         * var.h: (enum type `vartype') Removed; all references changed to
7454         `int'.
7455
7456         * vars-atr.c: (init_variable) Changed local var `nbytes' from
7457         `int' to `size_t'.
7458
7459 Thu Sep  5 22:05:56 1996  Ben Pfaff  <blp@gnu.org>
7460
7461         * font.h: Comment changes.
7462
7463         * groff-font.c: (groff_read_font) Initializes `name' field to
7464         NULL.  Handles `encoding' field.
7465
7466         * hash.c: (hsh_dump) [GLOBAL_DEBUGGING] Output formatting changes.
7467
7468         * postscript.c: (struct font_entry) Removed `position' field.
7469         (struct ps_font_combo) New struct.
7470         (struct ps_driver_ext) Removed field `next_position'.  New fields
7471         `combos', `next_combo'.  `last_font' field changed from
7472         `font_entry *' to `ps_font_combo *'.
7473         (ps_init_driver) Reformatted; handles new fields.  When
7474         OPO_AUTO_ENCODE is set, adds the two default fonts' encodings to
7475         the encoding list.
7476         (get_encoding, find_encoding_file) New functions.
7477         (add_encoding) Some code moved out into find_encoding_file().
7478         (postopen) Changed value for ${title}.
7479         (preclose) Sets `loaded' field to NULL after destroying the hash
7480         table.
7481         (ps_open_page) Added comment.  Inits the `combos' and `next_combo'
7482         fields.
7483         (ps_text_set_font_by_position) Figures out the current family if
7484         not known.
7485         (compare_ps_combo, hash_ps_combo, free_ps_combo) New functions.
7486         (switch_font) Implemented.
7487         (write_text) Calls switch_font() more often.  Format changes.
7488         #undefs its macros after they're no longer useful.
7489         (text) Changed `continue' at one point to a jump to the top of the
7490         loop because we don't want `separate' reset to 0 at that point.
7491         (load_font) No longer sets `position' in the font_entry created.
7492
7493 Wed Sep  4 21:45:35 1996  Ben Pfaff  <blp@gnu.org>
7494
7495         * font.h: (struct font_desc) New member `encoding', which is not
7496         properly handled yet.
7497
7498         * glob.c: (init_glob) Some new i18n code, which is probably
7499         screwed up.
7500
7501         * output.c: (outp_read_devices, outp_get_paper_size) Changed
7502         `size' local from `int' to `size_t'.
7503
7504         * postscript.c: New driver configuration parameter `auto-encode'.
7505         New enums OPO_AUTO_ENCODE, ODA_COUNT.
7506         (struct font_entry) New member `position'.
7507         (struct ps_driver_ext) Reordered.  New hash table member
7508         `encodings'; new members `next_position', `next_encoding',
7509         `last_font'.  Members `current', `prop', `fixed' changed from type
7510         `font_desc *' to `font_entry *'; all references changed.
7511         (struct ps_encoding) New struct.
7512         (read_ps_encodings, compare_ps_encoding, hash_ps_encoding,
7513         free_ps_encoding, add_encoding) New functions.
7514         (ps_init_driver) Added OPO_AUTO_ENCODE to default
7515         x->output_options.  Initializes new members of ps_driver_ext.
7516         Changed default value for prologue_fn, encoding_fn.  Calls
7517         read_ps_encodings after loading default fonts.
7518         (option_tab[], ps_option) Handle new configuration parameter.
7519         (switch_font) New function.
7520         (struct output_char) `font' member changed from `font_desc *' to
7521         `font_entry *'.  New member `separate'.
7522         (read_fontmap) Changed `size' from `int' to `size_t'.
7523         (output_line, put_number) New macros for write_text().
7524         (write_text) Optimizes text output by consolidating multiple
7525         calls to PostScript `show' operator.
7526         (text) Keeps track of when text arguments can't be consolidated by
7527         write_text(), and marks those spots in the output stream.
7528         (load_font) Sets `position' of the allocated font_entry to -1, cuz
7529         the font hasn't been switched to by switch_font(), which is where
7530         the position is important--the PostScript is what cares about the
7531         position.
7532
7533 Sat Aug 31 23:52:38 1996  Ben Pfaff  <blp@gnu.org>
7534
7535         * hash.c: (hsh_destroy) Ignores NULL argument.  Doesn't try to
7536         call a NULL free_func.
7537         (hsh_rehash) Elegantized.
7538         (hsh_probe) Fix bug that manifested when the table was expanded
7539         and thus had to change location in memory.  Good thing
7540         too--otherwise could have been much more subtle.
7541         (hsh_find) [GLOBAL_DEBUGGING] Not stubbed out anymore.
7542         (hsh_foreach) New function for hash table iteration.
7543
7544         * hash.h: (struct hsh_iterator) New.
7545
7546         * lexer.c: (parse_tagged_quote) Font and family name strings in
7547         tags are now null-terminated.
7548
7549         * output.c: (outp_evaluate_dimension) Fixed over-aggressive unit
7550         parsing.
7551         (internal_get_paper_size, outp_get_paper_size) Fixed; now work as
7552         documented.  (Never before tested?)
7553
7554         * output.h: Comment changes.
7555
7556         * postscript.c: New driver options `optimize-text-size',
7557         `optimize-line-size', `max-fonts-simult'.  New enum set for
7558         specing cached line types.  Comment fixes.
7559         (struct line_form) New struct.
7560         (struct ps_driver_struct) New members `text_opt', `line_opt',
7561         `max_fonts', `lines'.
7562         (ps_init_driver) Initializes new members of ps_driver_struct.
7563         (user option type enum set) New member `nonneg_int_arg'.
7564         (static var option_tab[]) Supports new options.
7565         (ps_option) Handles new options.
7566         (find_ps_file) Made static.  No longer calls hsh_dump().
7567         (ps_get_var) Made static.
7568         (preclose) Dumps out proper DSC trailer.
7569         (ps_open_page) Elegantized.
7570         (ps_close_page) Calls dump_lines() if appropriate.
7571         (ps_line_horz, ps_line_vert, ps_line_intersection) Reduced to
7572         wrappers around line().
7573         (int_2_compare, compare_line, dump_line, dump_fancy_line,
7574         dump_lines, hash_line, free_line, line) New functions for support
7575         of line caching.
7576         (write_text, text) Made static.
7577         (text) Added to font support, not finished.
7578
7579 Thu Aug 29 21:36:41 1996  Ben Pfaff  <blp@gnu.org>
7580
7581         * font.h: (struct font_desc) New members ascent, descent.
7582
7583         * groff-font.c: (groff_read_font) Calculates font ascent and
7584         descent from the ascent and descent of the `d' and `p' characters,
7585         respectively, as per a suggestion on comp.fonts.
7586
7587         * postscript.c: (ps_open_page, ps_close_page, ps_line_horz,
7588         ps_line_vert, ps_line_intersection) Rewritten to deal with changed
7589         prologue.
7590         (write_text) Handles text right-justification and centering (not
7591         full justification).  Still very inefficient.  (One output line
7592         per character?!)
7593         (struct output_char) Added fields for font and font size.
7594         (text) Many bugfixes.
7595
7596 Sat Aug 24 23:26:00 1996  Ben Pfaff  <blp@gnu.org>
7597
7598         * cmdline.c: (usage) Calls outp_list_classes().
7599
7600         * font.h: Comment fix.
7601
7602         * groff-font.c: New exported global var `space_index'.
7603         (groff_init) New function to initialize `space_index'.
7604         (hash_kern) Casts result to unsigned.
7605         (font_name_to_index) Renamed font_char_name_to_index.  All
7606         references changed.  Also, now returns the value of `space_index'
7607         when passed an ASCII space character as an argument.  Fixed
7608         handling of nulls.
7609         (font_get_kern_adjust) Changed i from `int' to `unsigned'.
7610         Handles passed NULL pointers properly.
7611
7612         * lexer.c: (parse_tagged_quote) Comment fix.  Better range
7613         checking.
7614
7615         * output.c: (outp_list_drivers) Removed.  Removed all references.
7616         
7617         * output.h: Comment fixes.
7618
7619         * postscript.c: (ps_open_global) Calls groff_init().
7620         (output_char) New structure.
7621         (write_text) New function.
7622         (text) No longer stubbed out!  Now the output is correct--with a
7623         few exceptions, one of them being that the page has to be held
7624         upside down into a mirror.
7625
7626 Sun Aug 11 21:31:22 1996  Ben Pfaff  <blp@gnu.org>
7627
7628         * font.h: Comment fix.
7629         
7630         * font.c: (name_to_index) Renamed font_name_to_index, made extern.
7631         All callers changed.
7632         (number_to_index) Renamed font_number_to_index, made extern.  All
7633         callers changed.
7634         (font_get_kern_adjust, font_get_char_metrics) New functions.
7635
7636         * output.h: New constant OUTP_T_INTERNAL_DRAW.
7637
7638         * postscript.c: Changed default line width back to 1/2 point.
7639         (ps_line_horz, ps_line_vert, ps_line_intersection) Now lines are
7640         in the center of the space allotted for them, not just a fixed
7641         offset from the edge of the space; this fixes some bugs.
7642         (ps_line_intersection) Now supports all command line styles.
7643         (ps_text_get_size) Bug fix in computation of em width.
7644         (text) New function, the meat behind ps_text_metrics and
7645         ps_text_draw.  Not complete.
7646         (ps_text_metrics, ps_text_draw) Removed the stub taken from
7647         ascii.c; call text().
7648
7649 Sat Aug 10 23:28:17 1996  Ben Pfaff  <blp@gnu.org>
7650
7651         * arena.c: (arena_free) Assert that the argument is non-NULL.
7652         
7653         * groff-font.c: (add_kern) Calls arena_free() for old_kern if and
7654         only if old_kern is non-NULL.
7655
7656         * postscript.c: (ps_init_driver) Changed default line width to 1
7657         point.
7658         (postopen) New prologue variables.
7659         (ps_line_horz, ps_line_vert, ps_line_intersection) Implements some
7660         more of the common line styles properly, but not all.
7661         (ps_text_metrics) Fixed problem with this stubbed out version that
7662         kept it from taking font sizes into account.
7663
7664 Thu Aug  8 22:31:11 1996  Ben Pfaff  <blp@gnu.org>
7665
7666         * arena.c: (arena_malloc) Bug fix.
7667         (arena_dump) [GLOBAL_DEBUGGING] New function.
7668
7669         * ascii.c: Comment fix.
7670         (count_fancy_chars, delineate) Now static functions.
7671         
7672         * filename.c: (interp_vars) Bug fixes.
7673
7674         * font.h: Comment fixes.
7675
7676         * glob.c: (init_glob) Sets set_viewwidth, set_viewlength at
7677         beginning in case we have an error message to display before
7678         initializing the display.
7679
7680         * groff-font.c: Comment fix.  Changed rehash threshold from 2/3
7681         full to 1/2 full.
7682         (groff_read_font) Bug fixes.
7683         (name_to_index) Increments hash.used.  Sets `name' field of hash
7684         entry properly.
7685         (add_kern) Sets kern_max_used after rehashing.  Other bug fixes.
7686
7687         * hash.c: Return type changed.
7688
7689         * postscript.c: Continued development.  Now marks lines on the
7690         paper, but very buggy.
7691
7692 Sat Aug  3 20:50:35 1996  Ben Pfaff  <blp@gnu.org>
7693
7694         * Changed comments in many source files from `/* xxx /* yyy */' to
7695         `/* xxx */ /* yyy */' for cleanliness.
7696
7697         * arena.c: (arena_sd_strdup) New function.
7698         
7699         * ascii.c: (struct ascii_driver_ext) New member `file'.
7700         (ascii_init_driver) Fills out member `file' for initing; uses
7701         close_file_ext for closing drivers.
7702         (ascii_option) Changed %.*s back to %s because the a_string's are
7703         always null-terminated.
7704         (postopen, preclose) New functions.
7705         (ascii_open_page) Uses new style of open_file_ext.
7706         (ascii_option, commit_line_buf, output_lines) Use ext->file.file
7707         instead of this->output.
7708         (__assert_fail) Removed.
7709
7710         * cmdline.c: Changed syntax_message[].
7711
7712         * error.c: #include's <readline/history.h> only if the history
7713         library is available, not if just the readline library is
7714         available.
7715
7716         * filename.c: (expand_line) Removed alloca() support.
7717         (interp_vars) No longer tilde-expands argument.  Limit on output
7718         length removed.
7719         (tilde_expand) Now treats argument as path rather than filename.
7720         [!unix] Now is a no-op function.
7721         (search_path) Better verbose message formatting.
7722         (open_file, close_file) Comment fixes.
7723         (close_file) [!unix] Doesn't bother with pipes.
7724         (open_file_ext) Completely rewritten, interface revamped.
7725         (close_file_ext) New function.
7726
7727         * font.h: Comment changes.
7728
7729         * frequencies.q: Removed AIX alloca support since it doesn't use
7730         alloca.
7731
7732         * hash.c: Comment changes & additions.
7733         (hsh_create) Initializes entire table instead of first M entries.
7734         (hsh_probe) Stupid bug fixed.  Now it works.
7735         (hsh_dump) [GLOBAL_DEBUGGING] New function.
7736
7737         * main.c: (parse) Detects EOF properly in token-eating loop.
7738         Should the STOP token have its value changed to 0?
7739
7740         * misc.c: (blp_getdelim) [HAVE_GETDELIM] Now it's a macro.
7741         (blp_getline) Now it's a macro.
7742
7743         * output.h: (struct outp_driver) Removed members output, filename.
7744         
7745         * output.c: (outp_init) [!NO_POSTSCRIPT] Installs PostScript
7746         drivers in driver table.
7747         (outp_read_devices) Frees buf.  Warns if there are no active
7748         output drivers.
7749         (outp_configure_clear) Sets outp_configure_vec to NULL after
7750         deleting its elements.
7751         (configure_driver, destroy_driver) Removed references to output,
7752         filename members of outp_driver.
7753         (outp_evaluate_dimension, internal_get_paper_size,
7754         outp_get_paper_size) New functions.
7755
7756         * postscript.c: Continued development.  Now links but doesn't make
7757         any marks on the page.  Lotsa bugs I suppose.
7758
7759         * str.c: (strcasecmp) [!HAVE_STRCASECMP] New function.
7760
7761         * str.h: Comment changes.
7762
7763 Sat Jul 27 22:32:38 1996  Ben Pfaff  <blp@gnu.org>
7764
7765         * Removed dependencies on non-nested comments in several files.
7766         Also removed references to (unix || __unix__) in #if's since
7767         prefh.orig makes those two equivalent.
7768         
7769         * ascii.c: (ascii_open_global) Creates ascii_arena.
7770         (ascii_close_global) Destroys ascii_arena.
7771         (ascii_init_driver) Doesn't create ascii_arena.
7772         (ascii_copy_driver) Removed.
7773         (ascii_option) Possible bugfix regarding %s vs. %.*s with a_string's.
7774         (outp_class ascii_class) Removed ascii_copy_driver reference.
7775
7776         * frequencies.q: Now can display all statistics except median.
7777         Still not finished.
7778
7779         * output.c: Handles outp_class.ref_count so output class
7780         destructors are called properly.
7781         (add_class) Sets ref_count to 0.
7782         (configure_driver) Initializes class if ref_count++ is 0.
7783         (destroy_driver) Destructs class if --ref_count is 0.  Frees the
7784         class output file name.
7785         
7786         * output.h: (struct outp_class) Removed copy_driver, inited.
7787         Added ref_count.
7788
7789         * postscript.c: Completely replaced but not finished.
7790         
7791 Tue Jul 23 21:48:36 1996  Ben Pfaff  <blp@gnu.org>
7792
7793         * approx.h: #includes <float.h>.
7794
7795         * arena.h, arena.c: Many functions changed to take an arena **
7796         instead of an arena *, for consistency.  All callers changed.
7797         (arena_alloc) Now creates a new arena if passed *A that is NULL.
7798         (arena_destroy) Sets *A to NULL.
7799         
7800         * ascii.c: (delineate) Implements OUTP_T_VERT correctly.  Removed
7801         assertion that `width' be positive.
7802
7803         * command.c: Removed #if's from cmd_table.
7804         (walk_cmdtable_func) [0] New function (debug code).
7805         (init_cmd_parser) [0] Dumps out cmd_table (debug code).
7806         (parse_cmd) Doesn't return failure for unimplemented commands.
7807
7808         * common.h: (SYSMIS) Changed from DBL_MAX to -DBL_MAX.
7809         (SYSCODE) New constant macro.
7810
7811         * descript.q: Checks for positive n_variables before performing
7812         analysis.
7813
7814         * file-handle.q: (get_handle_by_filename) Bug fix: passes &f to
7815         avl_find instead of &fp as arg 2.
7816
7817         * frequencies.g, frequencies.q: Continued updating; now compiles &
7818         works again, but not complete.
7819
7820         * main.c: Changes to user messages.
7821
7822         * misc.c: (reverse) [0] New function.
7823
7824         * settings.h: Comment removed.  #includes "common.h".
7825
7826         * som.c: (som_set_null) New function.
7827         (som_set_value, som_set_string, som_set_text) More detailing
7828         assertions.
7829         (som_set_float) Implemented function.
7830         (dump_columnated_table) Bug fix regarding page breaks.
7831         (draw_cell) Bug fix regarding text that spilled out of a cell.
7832         (draw_intersection, draw_horz_rule, draw_vert_rule) No longer draw
7833         null lines.
7834         (get_cell_size) Support SCON_EMPTY cells.
7835         (get_table_size) When calculating rules' widths and heights, mask
7836         out SLIN_SPACING bit.  Added SOPT_X_HLTL support.
7837         
7838         * som.h: (som_any_cell) New option SOPT_X_HTLT.  Removed
7839         SOPT_X_SHADE.
7840         (struct som_submission_form) New member `header'; all users
7841         changed.
7842
7843         * val-labs.c: (get_label) User messages changed.
7844
7845         * var.h: Changed FREQUENCIES structures.
7846
7847         * vars-atr.c: (is_num_user_missing, is_str_user_missing) Made
7848         inline.
7849         
7850 Fri Jul 19 19:11:13 1996  Ben Pfaff  <blp@gnu.org>
7851
7852         * approx.h: Definition of EPSILON now depends on system's
7853         DBL_EPSILON.  Removed GNU C specific code.
7854         (cmpapx) Renamed approx_compare.
7855
7856         * frequencies.g, frequencies.q: Continued updating; still doesn't
7857         compile.
7858
7859         * groff-font.c: (name_to_index) Fix bug that kept it from
7860         compiling.
7861
7862         * hash.c, hash.h: Completed work.
7863
7864         * var.h: Changes to freq_tab, frequencies_proc.
7865         
7866 Wed Jul 17 21:23:36 1996  Ben Pfaff  <blp@gnu.org>
7867
7868         New hashing code.
7869         * hash.c, hash.h: New files.  Not completed.
7870         * Makefile.am: Added hash.c to source file list.
7871         * font.h: (struct font_desc) New member kern_size_p.
7872         * groff-font.c: Uses hash.h.
7873         (hashpjw) Moved to hash.c.
7874         (next_prime_power) Rewrote, renamed hsh_next_prime, moved to
7875         hash.c.
7876         (static var hash) New member size_p.
7877         * var.h: Includes hash.h.
7878         (struct freq_tab) Changed AVL_TREE to hash_tab.
7879
7880         * vars-prs.c: Comment, formatting fixes.
7881
7882         * frequencies.g, frequencies.q: Continued updating.  Not yet
7883         working.
7884
7885         * formats.c: Bug fix.
7886
7887 Tue Jul 16 22:10:04 1996  Ben Pfaff  <blp@gnu.org>
7888
7889         Increasing parallelism between DESCRIPTIVES and FREQUENCIES.
7890         * descript.g: Comment fixes.
7891         * descript.q: Comment fixes.  Moved some declarations into var.h.
7892         Made dsc_info a static table.  Updated FIXMEs.
7893         (internal_cmd_descriptives) Beautified.
7894         
7895         * frequencies.q: Started updating into working order.
7896         * frequencies.g: New file analogous to descript.g.
7897         * var.h: Comment fixes.  Added structures for FREQUENCIES.
7898         
7899         * som.c: Removed vestiges of crushing and partial table support.
7900
7901 Sun Jul 14 15:45:31 1996  Ben Pfaff  <blp@gnu.org>
7902
7903         * Many more changes to som.c especially, but these will not be
7904         documented as I have resolved to remove them.  This patchlevel is
7905         being released solely so that I can fall back to it if I decide
7906         that removing the changes is not a good idea.
7907
7908 Sat Jul 13 09:58:44 1996  Ben Pfaff  <blp@gnu.org>
7909
7910         * som.c: (global var som) New member `cum_y'.
7911         (build_target) Properly handles titles for partial tables.
7912         (dump_partial_beg, dump_partial_mid, dump_partial_end)
7913         Merged into single new function dump_partial().  Fixed problem
7914         with titles on partial tables.
7915         (dump_table) Calls dump_partial() for all parts of partial tables.
7916         (dump_page) Criteria for drawing title changed.
7917         
7918 Fri Jul 12 22:03:36 1996  Ben Pfaff  <blp@gnu.org>
7919
7920         * command.c: (cmd_table) Added LIST, WEIGHT.
7921
7922         * command.c: (cmd_remark) No longer frees `s' since it's not
7923         dynamically allocated.
7924         
7925         * data-out.c: (convert_f) Now correctly handles the case where
7926         abs(v->f)<1 but v->f rounds to a value of 1.00 given the specified
7927         number of decimals.
7928         (som_destroy_all_tables) Removed argument.  All callers changed.
7929         (som_vline, som_hline) Argument validity checking corrected.
7930         (som_set_value) Implemented half-heartedly.
7931         (replicate_table) Copies tables piece-by-piece when using Checker.
7932
7933         * som.h: New line style SLIN_1THIN, currently equivalent to
7934         SLIN_0.  New enum set SOM_SUB_*.
7935         (struct som_submission_form) Removed `seq_no'.  Added `type'.
7936         
7937         * list.q: Newly working file; uses partial tables.
7938         
7939         * som.c: (som_reduce_table) Renamed som_set_table_height().
7940         (som_crush) Removed argument `group'.
7941         (global var som) Removed `nt', `seq_no'.  Added `type'.
7942         (som_submit_table) Arguments changed.
7943         (output_table) Removed partial table code.
7944         (build_target) New arg; partial table support added.  All callers
7945         changed.
7946         (dump_plain_table) Removed partial table code.
7947         (dump_partial_beg, dump_partial_mid, dump_partial_end) New functions.
7948         (dump_table) Supports partial tables.
7949         (dump_page) New argument to allow not drawing top and/or bottom
7950         headers.  All callers changed.  Supports partial tables.
7951
7952 Sat Jul  6 22:22:25 1996  Ben Pfaff  <blp@gnu.org>
7953
7954         * data-out.c: Changed `#include <approx.h>' to `#include
7955         "approx.h".
7956         (convert_F) Comment fix.  Now won't print `-.000', etc.
7957
7958         * descript.q: Now Z-scores work, although there appears to
7959         be a bug (which might actually be in data-out.c:convert_F()).
7960         (descriptives_trns_proc, descriptives_trns_free) New functions.
7961         (run_z_pass) Implemented.
7962         
7963         * var.h: Comment fixes.
7964         (dsc_z_score, descriptives_trns) New structs.
7965         (descriptives_trns) Added to any_trns as `dsc'.
7966
7967         * error.c, error.h: New error class, IS (Installation Script
7968         error), used in those instances where the error is in the
7969         installation, but there is a script file or installation file that
7970         can be usefully referred to.
7971         
7972         * output.c: Change many IE classes to IS classes.
7973
7974         * cases.c, command.c, common.c, crosstabs.q, expr-evl.c,
7975         frequencies.q, list.q, vars-prs.c, vfm.c: Removed reference to
7976         HAVE_MALLOC_H because Borland C++ alloca() is broken, so why
7977         include the corresponding header?
7978         
7979         * glob.c: (init_glob) Don't malloc term_buffer under Checker.
7980         Don't bail out if termcap can't be read.
7981
7982         * som.c: (som_destroy_table) Removed.
7983         (som_reduce_table, som_destroy_all_tables) New functions.
7984         (som_crush) New function, not implemented.
7985         
7986         * som.h: New table option STAB_CRUSH.  Comment fix.  New struct
7987         som_submission_form.  Function prototypes revised.
7988
7989         Outputting huge tables (1000s of rows) a few rows at a time
7990         is supported, though untested.  May even break everything.
7991         Actually, the code doesn't even compile right now.
7992         * som.c: (struct som) New fields htv, nt, seq_no.
7993         (som_submit_table) Multiple arguments changed to a single
7994         pointer to struct submission_form.  Only increments subtable_num
7995         if seq_no is zero.  Only destroys table if it's not going to
7996         be reused.
7997         (replicate_table) New function.
7998         (output_table) Comment fix.
7999         (examine_table) Changed inline code to code calling
8000         replicate_table().  Calculates htv.  Supports partial tables.
8001         (draw_title) Removed comment.
8002         (build_target) Only allows for title on first part of partial
8003         tables.
8004         (dump_plain_table) Only resets table chunk number on first part
8005         of partial tables; FIXME: doesn't work quite right.  Supports
8006         partial tables.
8007         (dump_page) Titles only on first part of partial tables.
8008
8009 Fri Jul  5 20:16:19 1996  Ben Pfaff  <blp@gnu.org>
8010
8011         * Thanks to an unreliable IDE hard drive, I have spent the last
8012         day reconstructing my Debian GNU/Linux installation and redoing
8013         the previous day's changes--somehow I managed to save every file
8014         except for output.c and output.h.  So the following changes could
8015         really be considered independent of the output.c, output.h changes
8016         from Jul 4.
8017
8018         * output.h, output.c: Moved the outp_configure_vec global var,
8019         outp_names struct, and enum set OUTP_S_* from output.h to output.c.
8020         outp_configure_vec is now static.
8021         
8022 Thu Jul  4 20:20:24 1996  Ben Pfaff  <blp@gnu.org>
8023
8024         * The entire philosophy behind configuration of the output drivers
8025         changed.  Now there is a termcap-type configuration where drivers
8026         to be read are determined beforehand, rather than parsing the
8027         entire output init file and storing it in memory & deciding what
8028         to actually use later.  Faster & more memory-efficient at the same
8029         time, cool.
8030         
8031         * output.c: Comment fix.  Removed outp_init_drivers global var.
8032         Removed all references to synonyms.  New structure outp_defn.  New
8033         global vars outp_macros, outp_configure_vec.
8034         (search_name, delete_name, add_name, check_configure_vec,
8035         expand_name, find_defn_value) New static functions.
8036         (outp_configure_clear, outp_configure_add, outp_configure_macro,
8037         outp_read_devices) New extern functions.
8038         (outp_init) Much functionality moved into outp_read_devices.
8039         (outp_read_devices) Format of output init file changed; name of
8040         file is `devices' rather than `output' to avoid Makefile
8041         conflicts.
8042         (outp_clear) Renamed outp_done.
8043         (outp_list_classes) Bug fix, cleaned up.
8044         (outp_list_drivers) Not implemented anymore.
8045         (outp_configure_driver) Now a static function; simplified; now
8046         interpolates macros; supports new structure.
8047         (outp_enable_driver, match_synonym) Removed; all references
8048         removed.
8049         (find_driver) First argument removed.
8050         
8051         * output.h: Global var outp_init_drivers removed; new structure
8052         outp_names; new enum set OUTP_S_*; new global var
8053         outp_configure_vec; function prototypes for output.c exports
8054         updated.
8055         
8056         * main.c: (main) Calls outp_read_devices() after parsing the
8057         command line.
8058         
8059         * cmdline.c: (parse_command_line) New option -v --verbose;
8060         --version changed to -V.  --device option changed syntax to just
8061         take a single device name.  Accepts key=value declaration of
8062         output init file macros.  Syntax message updated.
8063
8064         * filename.c: (expand_line) New function.
8065         (interp_environ_vars) Renamed interp_vars; no longer uses
8066         fixed-size buffer.
8067         (blp_getenv) Allows $ARCH and $VER pseudo-environment-vars to be
8068         overridden by real environment vars.
8069         (search_path) Uses verbose_msg() instead of #ifdef'd printf().
8070         * filename.h: interp_environ_vars() renamed interp_vars().
8071         
8072         * error.c, error.h: Added extern variable `verbosity', message
8073         class MM.
8074         
8075         * error.c: (vmsg) Support message class MM.
8076         (verbose_msg) New function.
8077
8078         * descript.q: (generate_z_varname) Bug fix in generation of
8079         Z-score varnames.
8080         (dump_z_table) Bug fix in column headers.
8081         
8082         * ascii.c: (ascii_init_driver) Changed minimum number of lines per
8083         page from 29 to 15.  Don't set a default for ops[OPS_INIT,
8084         OPS_DONE].  Writes the uninit string when the driver is closed.
8085         (ascii_open_page) Write the init string before the first page.
8086         (output_shorts) Form of main loop changed from `while' to `for'.
8087         Bug fix with overstrikes: the character is printed *after* the
8088         backspace.  Eliminated a lot of `& 0xff' modifiers.
8089         (advance_to_left_margin) New function.
8090         (return_carriage, output_lines) Handle left margin.
8091
8092 Thu Jul  4 00:35:59 1996  Ben Pfaff  <blp@gnu.org>
8093
8094         * ascii.c: New option `carriage-return-style'.
8095
8096         * ascii.c: (count_fancy_chars) New function.
8097         (delineate, text_metrics) Use new function; bug fixes regarding
8098         rich text strings.
8099         (text_draw) Bug fix with rich text.
8100         (output_string, output_shorts) Reordered.
8101         (output_shorts) Now handles boxchars and some overstrike font
8102         changes.
8103         (output_char, return_carriage) New functions.
8104         (output_lines) Now handles overstriking and font changes properly;
8105         some code moved to output_shorts.
8106
8107 Tue Jul  2 22:13:23 1996  Ben Pfaff  <blp@gnu.org>
8108
8109         [GLOBAL_DEBUGGING]
8110         * ascii.c: New member `debug' in ascii_driver_ext.
8111         (ascii_init_driver, delineate) Uses new member.
8112
8113         Now you can set a vertical height on writing text.
8114         * ascii.c: (delineate) Keeps track of vertical position.
8115         (text_draw) No longer considers fully justified text an internal
8116         error.
8117         
8118         * output.h: New flag OUTP_T_VERT; other OUTP_T_ values changed.
8119
8120         Tables' titles are drawn; they can have variable height.
8121         * som.c: `som' struct has new member, title_height.
8122         (draw_title) New argument.  Moved within file.  All caller
8123         changed.
8124         (build_target) New argument, amount of space needed for first row.
8125         Calculates height of title, takes that into account.  All callers
8126         changed.
8127         (dump_plain_table, dump_columnated_table) Took calculation of y1,
8128         y2 out of loop.
8129         (dump_columnated_table) [GLOBAL_DEBUGGING] Debugging code
8130         improved.
8131         (dump_columnated_table) Organized for readability.
8132         (dump_page) Makes use of som.title_height.
8133
8134         * som.c: Many comment bug fixes.
8135
8136         * descript.q: (try_name, generate_z_name) Bug fix regarding
8137         generation of Z-score variable names.
8138         * var.h: Removed num from descriptives_proc; all referents removed.
8139
8140 Mon Jul  1 22:13:39 1996  Ben Pfaff  <blp@gnu.org>
8141
8142         * ascii.c: (ascii_line_horz, ascii_line_vert,
8143         ascii_line_intersection) Added debugging code.
8144
8145         Added a descriptive line above each table to describe it.
8146         * command.c: (parse_cmd) Calls som_new_series.
8147         
8148         * som.c: New static vars table_num, subtable_num.  New `som'
8149         member `title'.
8150         (dump_page) New arguments.
8151         (som_submit_table) Handle new variables.
8152         
8153         * som.c, som.h: (som_submit_table) New arguments.  All callers
8154         changed.
8155         (som_new_series) New function.
8156         (build_target) Makes room for extra line.
8157         (draw_title) New function.
8158         (dump_page) Calls draw_title.  Bug fix: doesn't always set
8159         som.ext->cp to 0.
8160         
8161         Columnation of tables support.
8162         * som.h: Deleted fr, lr, ri from som_table.  Reorganized.
8163         
8164         * som.c: Deleted references to fr, lr, ri.
8165         (som_columnate) Bux fix: sets group member of table.
8166         (som_add_options) Function removed.
8167         (dump_table) Split into three functions; extensively reworked.
8168         
8169         * descript.q: (dump_z_table) Better output table formatting; added
8170         title support to correspond to som.h changes.
8171         (display) Title support.
8172
8173         * output.h: Added OUTP_T_NONE.
8174         
8175 Mon Jul  1 13:00:00 1996  Ben Pfaff  <blp@gnu.org>
8176
8177         * descript.q: Improved handling of Z scores; still not perfect.
8178         
8179         * output.h, ascii.c: Added hook for getting em width of current
8180         font.
8181         
8182         * som.c: Uses new em-width hook.  Added debugging code to
8183         several functions.
8184         (som_columnate) New argument.
8185         (som_add_options) Removed.
8186
8187 Jun 29 17:40:47 1996  Ben Pfaff  <blp@gnu.org>
8188
8189         * som.h, som.c, output.c, output.h, ascii.c: Updated to work with
8190         rules as a property of the table instead of as a property of the
8191         cells.
8192         
8193         * ascii.c: Added `header' to table of options.
8194         
8195         * descript.q: Added even shorter statistic names; modified to work
8196         with new som interface.
8197         
8198         * misc.c (blp_getdelim): Bug fix.
8199         
8200         * version.c: includes 'conf.h'.
8201         
8202 ----------------------------------------------------------------------
8203 Local Variables:
8204 mode: change-log
8205 version-control: never
8206 End: