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