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