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