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