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