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