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