Fix PR 13054.
[pspp-builds.git] / src / ChangeLog
1 Tue May 10 19:56:35 2005  Ben Pfaff  <blp@gnu.org>
2
3         Fix PR 13054.
4
5         * format.c: (check_input_specifier) Improve error message.
6         (check_input_specifier) Check F, COMMA, and DOLLAR formats for
7         valid decimal places.
8         (check_output_specifier) Ditto (but different criteria).
9         (convert_fmt_ItoO) Assert valid input and output specifiers.
10         Also, if input specifier has *any* decimal places, make the output
11         specifier 1 place wider.
12
13 Mon May  9 07:14:29 WST 2005 John Darrington <john@darrington.wattle.id.au>
14
15         * sysfile-info.c: Fixed bug [# 13024 ]
16
17 Sun May  8 13:52:12 2005  Ben Pfaff  <blp@gnu.org>
18
19         "Fix" PR 13021 by disabling FILE TYPE.  Eventually, we should
20         actually implement it.
21
22         * command.c: (FILE_TYPE_okay) Always return 1.
23
24         * command.def: Change FILE TYPE, END FILE TYPE into UNIMPL.
25
26         * file-type.c: Add prototypes to get rid of warnings.
27
28 Sun May  8 08:08:07 WST 2005 John Darrington <john@darrington.wattle.id.au>
29
30         * barchart.c box-whisker.c cartesian.c piechart.c plot-hist.c: Fixed 
31         more ISO/IEC 9899:1990 conformance issues.
32
33 Wed May  4 23:54:02 2005  Ben Pfaff  <blp@gnu.org>
34
35         Fix PR 12948.  See also new test in
36         tests/bugs/match-file-scratch.sh.
37         
38         * get.c: (mtf_merge_dictionary) Don't compact dictionary because
39         that deletes scratch variables that someone else might be using,
40         and because we can't reassign our sources' value indexes.
41         Instead, simply don't copy scratch variables into the master
42         dictionary.
43
44         * dictionary.c: (dict_compact_values) Delete variables from the
45         dictionary passed in, not from default_dict (!).
46
47 Tue May  3 22:25:17 2005  Ben Pfaff  <blp@gnu.org>
48
49         Improve hash.c comments, error-checking.
50         
51         * hash.c: (struct hsh_table) [NDEBUG] Add hash_ordered member.
52         (hsh_create) size == 0 should *not* return NULL!  Set
53         hash_ordered.
54         (hsh_clear) Set hash_ordered.
55         (locate_matching_entry) Check hash_ordered.
56         (hsh_rehash) Rename rehash().  Add assertion.  Set hash_ordered.
57         (hsh_data) Set hash_ordered.  Add const-ness to return value and
58         update all callers.
59         (hsh_sort) Ditto.       
60
61 Wed May  4 08:50:11 WST 2005 John Darrington <john@darrington.wattle.id.au>
62
63         * casefile.c: Removed unnecessary #include <valgrind/valgrind.h>
64
65 Tue May  3 19:14:48 WST 2005 John Darrington <john@darrington.wattle.id.au>
66
67         * copyleft.c: Updated copyright date.
68
69         * Makefile.am: Removed erroneous explicit "-lplot"
70
71         * examine.q oneway.q: Made these files conform to ISO/IEC 9899:1990
72
73 Tue May  3 16:20:31 WST 2005 John Darrington <john@darrington.wattle.id.au>
74
75         * command.c command.def: Added description string for unimplemented commands.
76
77         * oneway.q: Sorted the hash tables before shipping out the results. Closes 
78         bug [#12931].
79
80 Mon May  2 23:45:01 2005  Ben Pfaff  <blp@gnu.org>
81
82         Code improvements.
83         
84         * data-list.c:  (parse_fixed) Use lex_end_of_command().
85         (parse_free) Ditto.
86         (cmd_repeating_data) Set cont_end.num in right situations.
87         (parse_repeating_data) Remove redundant test.
88
89 Mon May  2 23:37:19 2005  Ben Pfaff  <blp@gnu.org>
90
91         Partial fix for PR 12859.
92         
93         * data-list.c: (cmd_data_list) Add transformation properly in
94         vfm_source == NULL case.
95
96 Mon May  2 23:27:28 2005  Ben Pfaff  <blp@gnu.org>
97
98         * lexer.c: (lex_error) Improve error messages.
99
100 Mon May  2 22:28:17 2005  Ben Pfaff  <blp@gnu.org>
101
102         * get.c: (cmd_match_files) Check token type before trying to match
103         tokid.  Fixes PR 12923.
104
105 Mon May  2 22:16:51 2005  Ben Pfaff  <blp@gnu.org>
106
107         * flip.c: [HAVE_SYS_TYPES_H] Include <sys/types.h>.  Fixes PR
108         12789.
109
110 Mon May  2 22:02:52 2005  Ben Pfaff  <blp@gnu.org>
111
112         * expressions/generate.pl: (get_token) Make use of /g
113         backward-compatible with Perl 5.6.1.
114
115 Sun May  1 23:00:19 2005  Ben Pfaff  <blp@gnu.org>
116
117         * var-display.c: (cmd_variable_alignment) Fix memory leak.
118         (cmd_variable_level) Ditto.
119
120 Sun May  1 22:49:04 2005  Ben Pfaff  <blp@gnu.org>
121
122         Hash table had buggy deletion function.  The fix required changing
123         other functions to do probing in the required order.
124
125         * hash.c: (locate_matching_entry) Rewrite and change interface.
126         (hsh_rehash) Rewrite to use locate_matching_entry().
127         (hsh_probe) Ditto.
128         (hsh_find) Ditto.
129         (hsh_delete) Ditto.  Also, fix stupid bugs.
130
131 Sun May  1 22:24:58 2005  Ben Pfaff  <blp@gnu.org>
132
133         * dictionary.c: (dict_clone) Properly copy vectors.
134
135 Sun May  1 22:07:58 2005  Ben Pfaff  <blp@gnu.org>
136
137         New implementation of long variable names.  Each variable has a
138         "normal" name, which may be up to 64 bytes long and which is used
139         for all normal operations.  Variables may have a "short" name,
140         which is limited to 8 bytes and used only for system and portable
141         file input and output.
142         
143         Make tokid case-preserving.  Update most uses of tokid to treat it
144         case-insensitively.
145
146         Update many commands to deal with long variable names.
147
148         * autorecode.c: (cmd_autorecode) Use strcasecmp() instead of strcmp().
149
150         * command.c: (cmd_parse) Ditto.
151         (match_strings) Use toupper() before comparing characters.
152         (conflicting_3char_prefixes) Use mm_case_compare() instead of
153         memcmp().
154         (cmd_match_words) Ditto.
155
156         * compute.c: (lvalue_parse) Use st_trim_copy() instead of
157         strncpy().
158
159         * count.c: (struct cnt_var_info) Change n[] to fit long var name.
160         Use st_trim_copy() instead of strcpy().
161
162         * data-in.c: (parse_enum) Use mm_case_compare() instead of
163         memcmp().
164
165         * data-list.c: (struct dls_var_spec) Change name[] to fit long var
166         name.
167         (parse_free) Use st_trim_copy() instead of strcpy().
168
169         * descript.c: (struct dsc_var) Change z_name[] to fit long var
170         name.
171         (try_name) Use strcasecmp() instead of strcmp().
172         (generate_z_varname) Use st_trim_copy() instead of strcpy().
173         (descriptives_compare_dsc_vars) Use strcasecmp() instead of
174         strcmp().
175
176         * dictionary.c: (struct dictionary) Removed `long_name_tab'
177         member.
178         (compare_long_names) Removed.
179         (hash_long_name) Removed.
180         (dict_create) Don't initialize `long_name_tab' member.
181         (dict_clone) Copy short names into new dictionary. 
182         (dict_clear) Don't clear `long_name_tab' member.
183         (dict_get_varname_block) Removed.
184         (dict_add_longvar_entry) Removed.
185         (free_nte) Removed.
186         (dict_destroy) Don't destroy `long_name_tab' member.
187         (dict_create_var_from_short) Removed.
188         (dict_create_var_x) Removed.
189         (dict_create_var) Get rid of longname handling.
190         Clear short name.
191         (dict_clone_var) Get rid of longname parameter and longname
192         handling.
193         (dict_lookup_var) Get rid of longname handling.
194         (dict_reorder_var) New function.
195         (dict_rename_var) Clear short name.
196         (dict_rename_vars) Get rid of longname handling.  Clear short
197         names.
198         (dict_create_vector) Support long vector names.
199         (dict_lookup_vector) Use strcasecmp() instead of strcmp().
200         (quasi_base27) Removed.
201         (make_short_name) Removed.
202         (compare_strings) New function.
203         (hash_string) New function.
204         (dict_assign_short_names) New function.
205
206         * file-handle.q: (get_handle_with_name) Use strcasecmp() instead
207         of strcmp().
208         (get_handle_for_filename) Support long handle names.
209
210         * file-type.c: (struct col_spec) Make `name' fit long var names.
211         (cmd_file_type) Use strcasecmp() instead of strcmp().
212
213         * flip.c: (make_new_var) Rewrite.
214         (flip_sink_write) Use st_trim_copy() instead of strncpy().
215
216         * format.c: (parse_format_specifier_name) Use mm_case_compare()
217         instead of memcmp().
218
219         * get.c: (cmd_save_internal) Rephrase.
220         (rename_variables) Drop test for identical variable name.
221         (struct mtf_proc) Change `first', `last' to fit long var name.
222
223         * hash.c: (hsh_hash_case_string) New function for case-insensitive
224         string hashing.
225
226         * lexer.c: (restore_token) Use st_trim_copy() instead of
227         strncpy().
228         (lex_get) Don't uppercase string when copying into tokid.
229         (lex_put_back_id) Use st_trim_copy() instead of
230         strncpy().
231
232         * list.q: (determine_layout) Consider length of variable names in
233         choosing vertical layout.
234
235         * matrix-data.c: (cmd_matrix_data) Use strcasecmp() instead of
236         strcmp().
237         (string_to_content_type) Ditto.
238
239         * modify-vars.c: (compare_variables_given_ordering) Ditto.
240         (struct var_renaming) Change `new_name' to fit long var name.
241         (compare_var_renaming_by_new_name) Use strcasecmp() instead of
242         strcmp().
243
244         * pfm-read.c: (read_variables) Disallow system variables in system
245         files.
246         (write_variables) Call dict_assign_short_names() and use
247         short_name[] members.
248
249         * repeat.c: (internal_cmd_do_repeat) Use strcasecmp() instead of
250         strcmp().
251
252         * sfm-read.c: (sfm_open_reader) Rewrite code for long variable
253         map.  Reorder variables into same order as long variable map.
254         (read_variables) Set short name.
255
256         * sfm-write.c: (sfm_open_writer) Call dict_assign_short_names().
257         (write_variable) Use st_bare_pad_copy().
258         (write_longvar_table) Rewrite.
259
260         * str.c: (mm_case_compare) New function.
261
262         * sysfile-info.c: (compare_vectors_by_name) Use strcasecmp()
263         instead of strcmp().
264
265         * t-test.q: (tts_custom_groups) Remove redundant test.
266         (tts_custom_pairs) Ditto.
267
268         * var.h: (struct variable) Change `name' to fit long var names.
269         Remove `longname'.  Add `short_name' member.  Reorder some
270         variables.
271         (struct name_table_entry) Removed.
272         (struct vector) Change `name' to fit long vector names.
273
274         * vars-atr.c: (var_is_valid_name) Allow long var names.
275         (compare_var_names) Use strcasecmp() instead of strcmp().
276         (compare_var_ptr_names) Ditto.
277         (hash_var_name) Use hsh_hash_case_string().
278         (hash_var_ptr_name) Ditto.
279         (var_set_short_name) New function.
280         (var_clear_short_name) New function.
281         (var_set_short_name_suffix) New function.
282
283         * vars-prs.c: (parse_DATA_LIST_vars) Support long names.
284         Use strcasecmp() instead of strcmp().
285         (struct array_var_set) Removed `longname_tab'.
286         (array_var_set_lookup_var_idx) Drop longname_tab support.
287         (array_var_set_destroy) Don't destroy `longname_tab'.
288         (var_set_create_from_array) Don't create `longname_tab'.
289
290         * vector.c: (cmd_vector) Use strcasecmp() instead of strcmp().
291         Support long names.
292
293         * expressions/parse.c: (word_matches) Use mm_case_compare()
294         instead of memcmp().
295         (compare_strings) New function.
296         (lookup_function) Use compare_strings() instead of strcmp().
297         
298 Sun May  1 22:07:43 2005  Ben Pfaff  <blp@gnu.org>
299
300         * algorithm.c: (move_element) New function.
301
302 Sun May  1 22:05:35 2005  Ben Pfaff  <blp@gnu.org>
303
304         * aggregate.c: (parse_aggregate_functions) Always initialize
305         destvar.
306
307 Sun May  1 22:03:47 2005  Ben Pfaff  <blp@gnu.org>
308
309         * aggregate.c: (cmd_aggregate) Use dict_clone_var_assert().
310
311         * dictionary.c: (dict_clone) Ditto.
312         (dict_clone_var_assert) New function.
313
314         * get.c: (mtf_merge_dictionary) Use dict_clone_var_assert().
315
316 Sun May  1 15:05:54 WST 2005 John Darrington <john@darrington.wattle.id.au>
317
318         * error.c: Added a string for the compiler version to the
319         request_bug_report_and_abort function.
320
321         * groff_font.c, font.c: Removed manpage(1) style references from 
322         comments, because RMS frowns upon them.
323
324 Thu Apr 28 18:52:06 2005  Ben Pfaff  <blp@gnu.org>
325
326         * expressions/parse.c: Improve previous fix for PR 12858 (LAG).
327
328 Fri Apr 29 09:28:00 WST 2005 John Darrington <john@darrington.wattle.id.au>
329
330         * expressions/parse.c: Added handler for OP_LAG_Vn and OP_LAG_Vs.  
331         Fixed bug [#12858] .
332
333 Wed Apr 27 12:42:34 WST 2005 John Darrington <john@darrington.wattle.id.au>
334
335         * loop.c recode.c repeat.c: Fixed a couple of instances of SHORT_NAME_LEN 
336         which should be LONG_NAME_LEN
337
338 Wed Apr 27 07:43:50 WST 2005 John Darrington <john@darrington.wattle.id.au>
339
340         * command.def echo.c:  Added the ECHO command.
341
342 Mon Apr 25 22:55:59 2005  Ben Pfaff  <blp@gnu.org>
343
344         Finish fixing MATCH FILES (PR 11677).
345
346         * get.c: (trim_dictionary) Rewrite in terms of drop_variables(),
347         keep_variables(), rename_variables().
348         (drop_variables) New function.
349         (keep_variables) New function.
350         (struct mtf_file) Rename `in' to `in_name'.  Add `in_var'.
351         (cmd_match_files) Deal with in_var.  Use drop_variables(),
352         keep_variables().  When IN is specified, require BY.  Set master
353         variables after master dictionary is complete.  Add IN variables
354         after master dictionary is complete.
355         (mtf_free_file) Free `in_name'.
356         (mtf_delete_file_in_place) Set in_var value to 0.
357         (mtf_read_nonactive_records)  Rephrase.
358         (mtf_processing) Support IN.  Rephrase.  Fix bugs.
359         (mtf_merge_dictionary) Don't set master variables; we do that
360         later now.
361         (get_master) Don't insist that there's a master variable.
362         
363 Mon Apr 25 22:55:22 2005  Ben Pfaff  <blp@gnu.org>
364
365         Kluge to make some variable renaming sort of work.
366         Needs real fix.
367
368         * dictionary.c: (dict_rename_var) Call dict_add_longvar_entry().
369
370 Mon Apr 25 22:52:28 2005  Ben Pfaff  <blp@gnu.org>
371
372         Add functions for comparing sets of variables between cases.
373         Use the functions.
374
375         * case.c: (case_compare) New function.
376         (case_compare_2dict) New function.
377         
378         * aggregate.c: (struct agr_proc) Remove `prev_break' member.  Add
379         `break_case'.
380         (cmd_aggregate) Nullify break_case.  Don't call
381         initialize_aggregate_info().
382         (agr_destroy) Destroy break_case.
383         (aggregate_single_case) Rewrite.  Use case_compare().
384         (dump_aggregate_info) Copy from break_case into output.
385         (initialize_aggregate_info) Copy break_case from input.
386
387         * get.c: (mtf_compare_BY_values) Use case_compare_2dict().
388
389         * vfm.c: (equal_splits) Use case_compare().
390
391 Sat Apr 23 17:01:04 WST 2005 John Darrington <john@darrington.wattle.id.au>
392
393         * dictionary.c vars-prs.c sfm-write.c: Fixed some memory leaks
394
395 Sun Apr 17 23:08:15 2005  Ben Pfaff  <blp@gnu.org>
396
397         Start work on fixing MATCH FILES.
398
399         * get.c: (enum operation) Remove OP_MATCH.
400         (trim_dictionary) Change return value to bool.  Don't support
401         OP_MATCH.
402         (struct mtf_file) Remove `first', `last' members.
403         (struct mtf_proc) Add `first', `last' members.  Change mtf_case
404         from `struct ccase *' to `struct ccase'.  Remove `by' member.
405         (cmd_match_files) Essentially rewrite.
406         (mtf_free) Don't free `by' member.  Destroy `mtf_case' member.
407         (mtf_read_nonactive_records) mtf_ parameter is not unused.
408         (mtf_processing) Ditto.  Also rephrase some code.
409         (mtf_merge_dictionary) Rewrite for easy comprehension.  
410
411 Sun Apr 17 23:06:00 2005  Ben Pfaff  <blp@gnu.org>
412
413         * matrix-data.c: (wr_output_data) [DEBUGGING] Fix compilation
414         error.
415
416         * q2c.c: (dump_token) [DEBUGGING] Fix compilation error.
417         
418 Thu Apr 14 2005 John Darrington
419
420         * var-display.c: New file.
421
422         * format.h var.h sfm-read.c sfm-write.c dictionary.c :  Added 
423           display_width, measure and alignment parameters to variables.
424
425         * aggregate.c command.def compute.c count.c data-list.c descript.c
426           dictionary.c dictionary.h expr-prs.c file-type.c flip.c get.c 
427           lexer.c lexer.h loop.c modify-vars.c pfm-read.c recode.c repeat.c 
428           sfm-read.c sfm-write.c sfm-write.h sfmP.h val-labs.c val.h var.h 
429           vars-prs.c vector.c :  
430               - Replaced literal constants representing maximum variable name 
431                 length with macro definitions. 
432               - Added support for long variable names.
433               - Changed lexer such that it no longer makes tokens upper
434                 case, but relies upon case insensitive behaviour of commands.
435
436 Mon Apr  4 22:27:34 2005  Ben Pfaff  <blp@gnu.org>
437
438         * aggregate.c: (parse_aggregate_functions) If dict_create_var()
439         fails, don't dereference the resulting null pointer (PR 12427).
440         Also, fix double free error.
441
442 Sat Mar 19 23:06:02 2005  Ben Pfaff  <blp@gnu.org>
443
444         * aggregate.c: (parse_aggregate_functions) Fix N_NO_VARS format.
445         (accumulate_aggregate_info) Set int1 to 1 for SUM.
446         (dump_aggregate_info) Only make SUM non-missing if there was at
447         least one variate.
448
449 Sat Mar 19 14:48:19 2005  Ben Pfaff  <blp@gnu.org>
450
451         * aggregate.c: (dump_aggregate_info) Properly test whether the
452         destination variable is numeric, when making the result
453         system-missing for columnwise missing values.
454
455 Mon Mar 14 21:52:34 2005  Ben Pfaff  <blp@gnu.org>
456
457         * misc.h: Remove GCC specializations.
458
459 Mon Mar 14 21:07:23 2005  Ben Pfaff  <blp@gnu.org>
460
461         Make sort stable (PR 12313).
462         
463         * sort.c: Don't need to include some headers anymore.
464         (static var min_buffers) New variable.
465         (static var max_buffers) New variable.
466         (static var allow_internal_sort) New variable.
467         (cmd_sort_cases) Add test mode.
468         (sort_execute) Rephrase.
469         (do_internal_sort) Don't try internal sorting if
470         allow_internal_sort is set.
471         (struct external_sort) Renamed `initial_runs' to `runs' and
472         updated all references.
473         (macro MIN_BUFFER_TOTAL_SIZE_RECS) Removed.
474         (macro MIN_BUFFER_SIZE_BYTES) Removed.
475         (macro MIN_BUFFER_SIZE_RECS) Removed.
476         (compare_initial_runs) Removed.
477         (struct record_run) Add member `idx'.
478         (write_initial_runs) Pass increasing values to process_case() as
479         index.
480         (process_case) Add `idx' parameter and use it to initialize new
481         `idx' member.
482         (allocate_cases) Limit allocated buffers to max_buffers.
483         (compare_record_run) Use new `idx' member for last resort
484         comparison, for stability.
485         (end_run) Call casefile_sleep() on irs->casefile, to prevent
486         running out of file descriptors.
487         (struct merge_state) Removed.
488         (merge) Don't need to allocate cases.  Always use MAX_MERGE_ORDER
489         unless we have fewer runs left.  Always merge consecutive runs,
490         for stability.  Return the final run.
491         (mod) Removed.
492         (choose_merge) New function.
493         (merge_once) Rewritten.
494
495 Mon Mar 14 21:05:42 2005  Ben Pfaff  <blp@gnu.org>
496
497         * cmdline.c: (static var testing_mode) Move into
498         parse_command_line().
499         
500 Mon Mar 14 21:05:13 2005  Ben Pfaff  <blp@gnu.org>
501
502         * algorithm.c: (remove_range) New function.
503         (remove_element) New function.
504
505         * dictionary.c: (dict_delete_var) Use remove_element().
506
507         * flip.c: (cmd_flip) Ditto.
508
509 Sun Mar 13 22:52:05 2005  Ben Pfaff  <blp@gnu.org>
510
511         * file-handle.q: (struct file_handle) `open_mode' should not be
512         const.
513         
514 Sun Mar 13 22:40:54 2005  Ben Pfaff  <blp@gnu.org>
515
516         First phase of making SORT CASES stable (PR 12313).
517
518         * sort.c: (struct indexed_case) New structure.
519         (do_internal_sort) Rewrite to make internal sorting stable.
520         (compare_case_dblptrs) Removed.
521         (compare_indexed_cases) New function.
522
523 Sun Mar 13 22:38:40 2005  Ben Pfaff  <blp@gnu.org>
524
525         Clean-ups.
526
527         * casefile.c: (casereader_read_xfer_assert) New function.
528
529         * dictionary.c: (dict_compact_case) New function.
530
531         * flip.c: (struct flip_pgm) New member idx_to_fv.
532         (cmd_flip) Initialize idx_to_fv member.
533         (destroy_flip_pgm) Free idx_to_fv member.
534         (flip_sink_write) Use struct flip_pgm member instead of case_sink
535         member.
536         (flip_sink_write) Ditto.
537
538         * vfm.c: (write_case) Use dict_compact_case() instead of
539         compact_case().
540         (compact_case) Removed.
541         (storage_source_create) Removed `dict' parameter.  All references
542         updated.
543
544         * vfm.h: (struct case_source) Removed `value_cnt' member.  All
545         references removed.
546         (struct case_sink) Removed `dict', `idx_to_fv' members.  All
547         references removed.
548
549 Sun Mar 13 22:35:55 2005  Ben Pfaff  <blp@gnu.org>
550
551         More AGGREGATE fixes.
552
553         * aggregate.c: (accumulate_aggregate_info) Implement NMISS and
554         NUMISS for strings.  Fix FOUT, POUT, FGT, FLT, FIN, FOUT for
555         strings.
556         (initialize_aggregate_info) Fix initialization for MIN, MAX for
557         strings.
558
559 Sat Mar 12 23:26:21 2005  Ben Pfaff  <blp@gnu.org>
560
561         Start work on testing and debugging AGGREGATE.
562
563         * aggregate.c: (cmd_aggregate) Use discrete bool variables instead
564         of a bit-map.  Require proper subcommand ordering.  Make OUTFILE
565         subcommand mandatory.
566         (parse_aggregate_functions) Check that PIN, POUT, FIN, FOUT
567         functions' arguments are in the correct order and swap them if
568         not.
569         (accumulate_aggregate_info) Make SUM include weights.  Add various
570         string functions.
571         (dump_aggregate_info) Add various string functions.
572         (initialize_aggregate_info) Initialize int1 for MIN, MAX.
573
574         * sort.c: (sort_parse_criteria) Add parameter for returning
575         whether any directions were specified.  All callers updated.
576
577 Sun Mar 13 14:54:27 WST 2005 John Darrington <john@darrington.wattle.id.au>
578
579         * t-test.q: Fixed erroneous logic in compare_group_binary.
580
581 Sat Mar 12 13:29:21 2005  Ben Pfaff  <blp@gnu.org>
582
583         * split-file.c: (cmd_split_file) Ignore LAYERED and SEPARATE
584         keywords (PR 11628).
585
586 Sat Mar 12 13:17:12 2005  Ben Pfaff  <blp@gnu.org>
587
588         * vfm.c: (procedure_with_splits) Fix PR 11492: end_func() must be
589         called *before* close_active_file().
590
591 Sat Mar 12 12:20:57 2005  Ben Pfaff  <blp@gnu.org>
592
593         * file-handle.q: (struct file_handle) Change open_mode from
594         character pointer to 3-char array, for safety.  Updated all
595         references.
596
597 Sat Mar 12 12:15:49 2005  Ben Pfaff  <blp@gnu.org>
598
599         Thanks to Ben Kujala <bkujala@oregonchildcare.org> for reporting
600         these bugs.
601         
602         * pfm-read.c: (read_header) Improve error message for many cases
603         in which the input is not actually a portable file.
604
605         * file-handle.q: (fh_open) When we give an error message, actually
606         return NULL.
607
608 Fri Mar 11 11:50:30 2005  Ben Pfaff  <blp@gnu.org>
609
610         * format.c: (check_common_specifier) New function for checks
611         common to check_input_specifier() and check_output_specifier().
612         (check_input_specifier) Use check_common_specifier().
613         (check_output_specifier) Use check_common_specifier().
614         (check_string_specifier) Removed.
615         (check_specifier_type) New function.
616         (check_specifier_width) New function.
617         (get_format_var_width) Fix bug.
618
619         * formats.c: (internal_cmd_formats) Only accept numeric variables.
620
621         * lexer.c: (check_id) Rename lex_id_to_token(), make public,
622         update all references.  Make case-insensitive.
623
624         * pfm-read.c: Essentially rewrite the whole file.  Now much
625         cleaner.
626
627         * print.c: (check_string_width) New function.
628         (fixed_parse_compatible) Use check_string_width(),
629         check_specifier_type().
630         (dump_fmt_list) Ditto.
631
632         * str.c: (st_trim_copy) New function.
633         (st_uppercase) New function.
634
635         * vars-atr.c: (var_is_valid_name) New function.
636         
637         * expressions/parse.c: (type_coercion_core) Use
638         check_specifier_type().
639         
640 Fri Mar 11 11:31:24 2005  Ben Pfaff  <blp@gnu.org>
641
642         * expressions/evaluate.c: (cmd_debug_evaluate) Fix memory leaks.
643
644         * expressions/parse.c: (no_match) Ditto.
645
646 Wed Mar  9 09:54:27 2005  Ben Pfaff  <blp@gnu.org>
647
648         * Makefile.am: (pspp_LDADD) Add libgsl-extras.a.
649
650         * expressions/helpers.c: (struct func_params) Removed.
651         (generalized_idf) Removed.
652         (cdf_beta) Removed.
653         (idf_beta) Removed.
654         (idf_fdist) Use gslextras_cdf_beta_Pinv() instead of idf_beta().
655
656         * expressions/operations.def: Implement IDF.BETA, CDF.BINOM,
657         CDF.GEOM, CDF.HYPER, CDF.NEGBIN, CDF.POISSON using gsl-extras.
658         Implement SIG.F, which I had overlooked previously.
659
660 Tue Mar  8 12:47:53 WST 2005 John Darrington <john@darrington.wattle.id.au>
661
662         * command.c command.def glob.[ch] cmdline.c: Made DEBUG cmds
663         available only in testing mode.
664
665 Sun Mar  6 23:25:40 2005  Ben Pfaff  <blp@gnu.org>
666
667         * data-in.c: Use `bool' throughout, where relevant.
668
669 Sun Mar  6 19:52:22 2005  Ben Pfaff  <blp@gnu.org>
670
671         DATA LIST with free-field formats should not have implied decimal
672         places (PR 12035).  Also clean up data-in.c a bit.
673
674         * data-in.h: (enum) Add DI_IMPLIED_DECIMALS.
675
676         * data-in.c: (apply_implied_decimals) New function.
677         (parse_numeric) Don't adjust exponent if DI_IMPLIED_DECIMALS not
678         set.  Also, get rid of gotos.
679         (parse_Z) Use apply_implied_decimals() if the field doesn't
680         contain a decimal point.
681         (parse_N) Use apply_implied_decimals().
682         (parse_IB) Ditto.
683         (parse_PIB) Ditto.
684         (parse_P) Ditto.
685         (parse_PK) Ditto.
686         (to_roman) Removed.
687         (parse_enum) New function.
688         (macro CHAR_IS_ROMAN) Removed.
689         (macro ROMAN_VALUE) Removed.
690         (parse_month) Use parse_enum().
691         (parse_weekday) Use parse_enum().
692         (parse_DATETIME) Use long for weekday.
693
694         * data-list.c: (read_from_data_list_fixed) Use
695         DI_IMPLIED_DECIMALS.
696
697 Sun Mar  6 17:07:20 2005  Ben Pfaff  <blp@gnu.org>
698
699         When the lexer sees something like `-5' in the input, it has to
700         decide whether it's a negative numeric constant token or a '-'
701         token followed by a positive numeric constant token.  It always
702         decides on the former, and then the parser can call
703         lex_negative_to_dash() if it wants the latter.  However, this
704         doesn't work for the case of `-0', because negative zero is
705         (portably) indistinguishable from positive zero.  So now we divide
706         T_NUM into two tokens, T_POS_NUM and T_NEG_NUM, to make the
707         distinction clear.  This requires a little bit of extra effort,
708         because there were several references to T_NUM in the code base.
709         
710         * lexer.c: (lex_get) Use T_NEG_NUM and T_POS_NUM to distinguish
711         positive and negative numeric constants.
712         (lex_double_p) Renamed lex_is_number().  Changed return type to
713         bool.  Updated all relevant references to T_NUM to instead use
714         this function.
715         (lex_double) Renamed lex_number().  All references updated.
716         (lex_integer_p) Renamed lex_is_integer().  Changed return type to
717         bool.  All references updated.
718         (lex_token_representation) Understand T_NEG_NUM and T_POS_NUM.
719         (lex_negative_to_dash) Ditto.
720         (dump_token) Ditto.
721         
722         * lexer.h: (enum) Add T_POS_NUM, T_NEG_NUM.  Remove T_NUM.
723
724 Sun Mar  6 22:09:20 2005  Ben Pfaff  <blp@gnu.org>
725
726         * expressions/operations.def: (NUMBER) Use DI_IMPLIED_DECIMALS.
727
728 Sun Mar  6 19:33:24 2005  Ben Pfaff  <blp@gnu.org>
729
730         * expressions/operations.def: (VEC_ELEM_NUM) Treat user-missing
731         values as system-missing.
732
733         * expressions/parse.c: (parse_vector_element) Fix order of
734         arguments in call to expr_allocate_binary().
735
736 Sun Mar  6 17:51:05 2005  Ben Pfaff  <blp@gnu.org>
737
738         * expressions/optimize.c: (optimize_tree) Fix optimization bug for
739         x**2.
740
741         * expressions/parse.c: (type_coercion_core) Set *node to NULL on
742         failure, as indicated by function comment.
743         (parse_binary_operators) Always return NULL on type_coercion()
744         failure.  Should have been doing this anyway, but bug in
745         type_coercion_core() filtered through.
746         (parse_add) Fix typo in user message.
747         (parse_primary) Understand T_NEG_NUM and T_POS_NUM.
748
749 Sun Mar  6 10:47:13 2005  Ben Pfaff  <blp@gnu.org>
750
751         * expressions/operations.def: Add VALUE function.
752
753         * expressions/parse.c: (parse_function) Need an unary composite
754         node for variables in A TO B, not a variable node.  Use
755         allocate_unary_variable().
756         (parse_primary) Use allocate_unary_variable().
757         (allocate_unary_variable) New function.
758
759 Thu Mar  3 23:53:32 2005  Ben Pfaff  <blp@gnu.org>
760
761         * expressions/PSPP_expressions.pm: Renamed it back to generate.pl
762         but fixed the real problem that was preventing the build from a
763         separate directory.  I liked it my way better ;-)
764         
765 Thu Mar  3 23:17:51 2005  Ben Pfaff  <blp@gnu.org>
766
767         * expressions/parse.c: (expr_parse) Fix parameter type.  Thanks to
768         John Darrington <john@darrington.wattle.id.au> for reporting this
769         bug.
770
771 Thu Mar  3 22:10:25 WST 2005 John Darrington <john@darrington.wattle.id.au>
772
773         * expressions/Makefile.am expressions/evaluate.h.pl
774           expressions/evaluate.inc.pl expressions/operations.h.pl
775           expressions/optimize.inc.pl expressions/parse.inc.p:
776
777           Renamed generate.pl to PSPP_expressions.pm and adjusted *.pl
778           to suit. 
779
780           Fixed everything so that it can be built from an arbitrary
781           directory.
782         
783 Thu Mar  3 22:08:35 WST 2005 John Darrington <john@darrington.wattle.id.au>
784
785         * Makefile.am : Fixed up CLEANFILES target.
786
787 Mon Feb 28 23:49:56 2005  Ben Pfaff  <blp@gnu.org>
788
789         * str.h: Changed `struct len_string' to `struct fixed_string', a
790         more accurate name.  Updated all references.
791
792 Mon Feb 28 23:35:30 2005  Ben Pfaff  <blp@gnu.org>
793
794         Redo calendar support.  Should now be bug-for-bug compatible.
795         
796         * calendar.c: New file.
797
798         * calendar.h: New file.
799
800         * data-in.c: Use new calendar functions.
801         (parse_sign) Change sense of return value.
802         (calendar_error) New function.
803         (ymd_to_ofs) New function.
804         (ymd_to_date) New function.
805         (parse_DATE) Use new function.
806         (parse_ADATE) Ditto.
807         (parse_EDATE) Ditto.
808         (parse_SDATE) Ditto.
809         (parse_JDATE) Ditto.
810         (parse_QYR) Ditto.
811         (parse_MOYR) Ditto.
812         (parse_WKYR) Ditto.
813         (parse_TIME) Ditto.
814         (parse_DTIME) Ditto.
815         (parse_DATETIME) Ditto.
816
817         * data-out.c: (convert_date) Use new calendar functions.
818
819         * error.c: (err_vmsg) Changed interface to be more sensible.
820         Updated all callers.
821         (dump_message) Don't double new-lines (why did we do this
822         anyway?).
823
824 Mon Feb 28 23:30:25 2005  Ben Pfaff  <blp@gnu.org>
825
826         * sfmP.h: (macro flt64) Moved here from pref.h.orig.
827         (macro FLT64_MAX) Moved here from pref.h.orig.
828
829 Mon Feb 28 23:28:01 2005  Ben Pfaff  <blp@gnu.org>
830
831         * set.q: Support SET EPOCH.
832         (static var set_epoch) New var.
833         (aux_stc_custom_epoch) New function.
834         (stc_custom_epoch) New function.
835         (get_epoch) New function.
836         (stc_custom_pager) [USE_INTERNAL_PAGER] Fix bug.
837
838         * format.c: Make it possible just to check whether a specifier is
839         valid without emitting an error message.
840         (parse_format_specifier_name) Change interface, update all
841         callers.
842         (check_input_specifier) Ditto.
843         (check_output_specifier) Ditto.
844         (parse_format_specifier) Ditto.
845
846 Mon Feb 28 23:24:08 2005  Ben Pfaff  <blp@gnu.org>
847
848         * command.def: Add DEBUG POOL.
849
850         * pool.c: (pool_destroy) Fix bug in deleting this pool from its
851         parent.
852         (pool_clear) Properly account for size of pool gizmo.
853         (pool_realloc) Ditto.
854         (pool_clone) New function.
855
856         * pool.h: Mark our allocation functions MALLOC_LIKE.
857
858 Mon Feb 28 23:21:26 2005  Ben Pfaff  <blp@gnu.org>
859
860         * Makefile.am: Move many definitions into new top-level
861         Make.build.  Add expressions to SUBDIRS.  Add calendar.c,
862         calendar.h.  Remove expr-evl.c, expr-opt.c expr-prs.c, expr.h,
863         exprP.h, expr.def.
864
865         * case.c: (case_resize) New function.
866         (case_swap) New function.
867
868         * casefile.c: Include mkfile.h.
869
870 Fri Feb 25 21:11:35 WST 2005 John Darrington <john@darrington.wattle.id.au>
871
872         * sfm-read.c: Fixed a buglet which caused a crash when trying
873         to read a non-existent file.
874
875 Sun Feb 13 16:11:13 2005  Ben Pfaff  <blp@gnu.org>
876
877         Fix PR 11955.
878
879         * aggregate.c: (parse_aggregate_functions) Code cleanup.
880         Important part: get rid of spurious copying of function->format to
881         destvar->print and destvar->write.
882
883 Fri Feb 11 00:08:36 2005  Ben Pfaff  <blp@gnu.org>
884
885         Fix PR 11916, which was confusing a variable's `index' member
886         with the variable's position in a var_set.  Although these are
887         usually the same, they are not for array `var_set's.
888         
889         Took advantage of this bug as an opportunity to clean up and
890         rewrite parse_var_set_vars().
891
892         * vars-prs.c: (parse_vs_variable_idx) New function.
893         (parse_vs_variable) Reimplement in terms of
894         parse_vs_variable_idx().
895         (parse_var_idx_class) New function.
896         (add_variable) New function.
897         (add_variables) New function.
898         (parse_var_set_vars) Rewritten.
899         (struct var_set) Change `lookup_var' member that returns a
900         variable into `lookup_var_idx' member that returns an int.
901         Updated the var set implementations in obvious corresponding ways.
902         Used compare_var_ptr_names(), hash_var_ptr_name() just added.
903         
904 Fri Feb 11 00:06:03 2005  Ben Pfaff  <blp@gnu.org>
905
906         Use our global variable compare & hash functions and give them
907         better names.  Add similar functions for dealing with double
908         pointers to variables.
909         
910         * vars-atr.c: (compare_variables) Renamed compare_var_names().
911         (hash_variable) Renamed hash_var_name().
912         (compare_var_ptr_names) New function.
913         (hash_var_ptr_name) New function.
914         
915         * t-test.q: (cmd_t_test) Use global compare_var_names(),
916         hash_var_name().
917         (compare_var_name) Removed.
918         (hash_var_name) Removed.
919
920 Fri Feb 11 00:04:39 2005  Ben Pfaff  <blp@gnu.org>
921
922         Fix dictionary bug.
923         
924         * dictionary.c: (compare_variable_dblptrs) Rename
925         compare_var_ptrs() and fix it to properly dereference the double
926         pointers.
927
928 Mon Feb  7 09:58:15 WST 2005 John Darrington <john@darrington.wattle.id.au>
929
930         crosstabs.q examine.q oneway.q q2c.c:  Added a q2c feature to 
931         declare subcommands as mandatory.  Closed bug #11843
932
933 Sat Feb  5 20:35:10 WST 2005 John Darrington <john@darrington.wattle.id.au>
934         
935         * getline.c command.[ch] command.def:  Added (very rudimentary)
936         support for line  completion when in interactive mode.  Partially 
937         addresses bug #11693
938         
939 Mon Jan 31 09:52:51 WST 2005 John Darrington <john@darrington.wattle.id.au>
940
941         * examine.q factor_stats.c oneway.q output.c pfm-read.c: Fixed some
942         problems revealed by valgrind.
943
944
945 Wed Jan 26 11:44:11 WST 2005 John Darrington <john@darrington.wattle.id.au>
946
947         * set.q: Affixed a fix to the previous fix such that we'll be OK now
948         whether or not PAGER is set.
949
950 Wed Jan 26 09:25:54 WST 2005 John Darrington <john@darrington.wattle.id.au>
951
952         * set.q: Copied the string produced by getenv("PAGER") thus avoiding
953         "invalid free" errors.  Hopefully fixes bug #11722
954
955         * compute.c expr-prs.c: Check that lvalues are populated before 
956         attempting to destroy them.  Closes bug #11676
957
958 Tue Jan 25 21:01:43 WST 2005 John Darrington <john@darrington.wattle.id.au>
959
960         * aggregate.c: Initialised the complete agr_proc structure.
961         Closes bug #11675
962
963
964 Sun Jan 23 23:02:21 2005  Ben Pfaff  <blp@gnu.org>
965
966         * print.c: (print_trns_free) Close the dfm writer if there is one,
967         fixing a memory leak.
968
969 Mon Jan 24 12:24:36 WST 2005 John Darrington <john@darrington.wattle.id.au>
970
971         * glob.c oneway.q q2c.c t-test.q vfm.c: Still *more* memory leaks 
972         fixed.
973
974
975 Fri Jan 21 19:54:14 WST 2005 John Darrington <john@darrington.wattle.id.au>
976
977         * linked-list.[ch] Added
978
979         * examine.q file-handle.[hq] font.h glob.c groff-font.c postscript.c 
980           set.q:    Yet more memory leaks
981
982 Tue Jan 18 23:12:40 WST 2005 John Darrington <john@darrington.wattle.id.au>
983
984         * t-test.q examine.q : More memory leaks fixed.
985
986 Tue Jan 18 19:26:59 WST 2005 John Darrington <john@darrington.wattle.id.au>
987
988         * examine.q  factor_stats.[ch] get.c pfm-read.c: Plugged numerous
989         memory leaks.
990
991 Mon Jan 10 14:43:45 WST 2005 John Darrington <john@darrington.wattle.id.au>
992
993         * ascii.c cartesian.c casefile.c chart.h devind.c 
994           examine.q frequencies.q
995           html.c output.h piechart.c plot-chart.c plot-hist.c
996
997           Integrated the chart rendering into the output stream
998           (currently only works for html).
999           
1000           Removed gratuitous use of ifndef NO_CHARTS, and replaced with
1001           dummy-chart.c for compiling without charts.
1002
1003         * mkfile.[ch] Created.  
1004
1005         * som.[ch] tab.[ch]: Changed name of som_table to som_entity
1006         Added type element so we can tell if it's a chart or a table.
1007
1008         * chart.h examine.q piechart.c plot-chart.c plot-hist.c: changed the 
1009         API of charts to be more like that of tables.
1010
1011 Thu Jan 13 21:00:02 WST 2005 John Darrington <john@darrington.wattle.id.au>
1012
1013         * casefile.c main.c: Moved the SIGINT handler from casefile.c to
1014         main.c. Removed the handler for SIGQUIT.
1015
1016 Mon Jan 10 14:43:45 WST 2005 John Darrington <john@darrington.wattle.id.au>
1017
1018         * casefile.c: Added a signal handler to delete temp files on 
1019         SIGINT and SIGQUIT
1020
1021         * permissions.c Inhibited the PERMISSIONS command when SAFER is on.
1022
1023         * command.def Added a lot more unimplemented commands.
1024
1025         * copyleft.[ch] cmdline.c Moved legal information to copyleft.c
1026
1027 Sat Jan  8 23:58:34 2005  Ben Pfaff  <blp@gnu.org>
1028
1029         * sort.c: (compare_initial_runs) Needed additional level of
1030         dereferencing.
1031         (merge_once) Fix plenty of stupid mistakes.
1032
1033 Sat Jan  8 23:55:27 2005  Ben Pfaff  <blp@gnu.org>
1034
1035         * casefile.c: (casefile_sleep) Need to flush_buffer() after
1036         calling casefile_to_disk() or we will lose the last block in the
1037         file if the casefile started out as disk-based.
1038         (casefile_get_reader) Initialize reader->destructive to 0.
1039         (cmd_debug_casefile) Add new test pattern.
1040         (test_casefile) Define new test pattern to make sure
1041         casefile_sleep() works properly.
1042
1043 Fri Jan  7 08:00:05 WST 2005 John Darrington <john@darrington.wattle.id.au>
1044
1045         * Makefile.am chart.[ch]  histogram.[ch] piechart.c (Modified);
1046           plot-hist.c plot-chart.c (Added) Reorganised these files in an
1047           attempt to seperate the creation and processing of charts from their
1048           actuall renedering.
1049
1050         * examine.q frequencies.q generated charts conditional upon the NO_CHARTS
1051           macro.
1052
1053 Thu Jan  6 18:48:58 WST 2005 John Darrington <john@darrington.wattle.id.au>
1054
1055         * main.c Added a signal handler for SIGFPE
1056
1057         * sort.c Somewhat more robust fix to the previous entry.
1058
1059 Wed Jan  5 21:23:31 2005  Ben Pfaff  <blp@gnu.org>
1060
1061         * sort.c: (merge) Fix assertion for proper Huffman merge pattern:
1062         0 == 1 modulo 1.  See Knuth 5.4.9 (vol. 3, 2nd ed.,
1063         pp. 361).  Thanks to John Darrington <john@cellform.com.au> for
1064         reporting the bug.
1065
1066 Wed Jan  5 22:42:26 WST 2005 John Darrington <john@darrington.wattle.id.au>
1067
1068         * case.h Fixed bug # 11307
1069         
1070 Wed Jan  5 08:30:48 WST 2005 John Darrington <john@darrington.wattle.id.au>
1071
1072         * val-labs.c Fixed bug which caused a crash if VALUE LABELS had
1073         a trailing slash.
1074
1075 Mon Jan  3 17:44:37 2005  Ben Pfaff  <blp@gnu.org>
1076
1077         * pfm-read.c: (read_variables) Remove direct manipulation of
1078         v->aux, which is no longer needed.  Fixes PR 11483.
1079
1080 Sat Jan  1 19:01:16 WST 2005 John Darrington <john@darrington.wattle.id.au>
1081
1082         * data-list.c Fixed a bug in parsing delimiters.
1083
1084         * group.c vars-atr.c Fixed buglet in hash/compare functions for alpha
1085         values.
1086
1087         * percentiles.c Properly handled calculation of Tukey hinges where
1088         the number of data is small.
1089
1090         * oneway.q Used the generic value_to_string function for independent
1091         variable instead of trying to do it ourselves.
1092
1093         * box-whisker.c Fixed a buglet which caused a crash if the number of
1094         data was zero
1095
1096
1097 Fri Dec 31 16:47:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1098
1099         * examine.q box-whisker.c chart.h Implemented boxplots in EXAMINE
1100
1101         * percentiles.c Fixed some bugs when calculating percentiles when
1102         there's a small number of cases.
1103
1104 Wed Dec 29 08:18:08 WST 2004 John Darrington <john@darrington.wattle.id.au>
1105
1106         * percentiles.[ch] Added. Calculates percentiles and Tukey hinges
1107
1108         * examine.q factor_stats.[ch]  Added calculation of percentiles
1109
1110 Fri Dec 24 15:09:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
1111
1112         * t-test.q Fixed bug #11227 Made t-test work when the independent
1113         variable is alpha
1114
1115 Sat Dec 11 11:43:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1116
1117         * factor_stats.c Fixed calculation of trimmed mean under various
1118         special conditions.
1119
1120 Sat Dec  4 17:14:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1121
1122         * histogram.c chart.[ch] factor_stats.c frequencies.q
1123
1124         Added code to calculate sensible histogram ranges and limits.
1125
1126 Thu Dec  2 13:37:43 WST 2004 John Darrington <john@darrington.wattle.id.au>
1127
1128         * chart.h Updated to reflect many API changes.
1129
1130         * cartesian.c chart.c Moved the definitions of chart_write_{xy}scale from 
1131         cartesian.c and into chart.c
1132
1133         * factorstats.[ch] Added the histogram calculations
1134
1135         * casefile.c Removed an unused variable.
1136
1137         * frequencies.q examine.q histogram.c  Reworked the API for 
1138         histograms.
1139
1140         * piechart.c  Revised the API for piecharts.
1141
1142         * var.h  Moved the definitions of freq_tab and freq out of var.h
1143         and into frequencies.q where they belong.
1144         
1145 Tue Nov 30 21:10:20 2004  Ben Pfaff  <blp@gnu.org>
1146
1147         * flip.c: (flip_file) Check for off_t separately from fseeko(),
1148         using AC_TYPE_OFF_T.
1149
1150 Tue Nov 30 08:47:41 2004  Ben Pfaff  <blp@gnu.org>
1151
1152         * flip.c: (flip_file) If fseeko() is not available, use long int
1153         for off_t.  Thanks to "Marshall DeBerry" <mdb@radix.net> for
1154         reporting the problem.
1155
1156 Mon Nov 29 12:20:59 WST 2004 John Darrington <john@darrington.wattle.id.au>
1157
1158         * examine.q factor_stats.[ch] Changed stderr to se_mean to avoid
1159         conflict with stdio.
1160
1161 Sun Nov 21 10:32:41 WST 2004 John Darrington <john@darrington.wattle.id.au>
1162
1163         * var-labs.c (var_to_string) Now returns null if the variable is null
1164
1165         * value-labels.c (value_to_string) Made it return null if either the 
1166         value or the variable is null.
1167
1168         * hash.c (hsh_clear) Fixed a buglet.
1169
1170         * examine.q  factor_stats.[ch] Largely  rewrote, because I'd started 
1171         with  the wrong model.
1172
1173         * casefile.[ch] Added a function to return the casereader.case_idx 
1174         member
1175
1176         * examine.q  Implemented the extreme values results.
1177
1178 John Darrington <john@darrington.wattle.id.au>
1179
1180         * settings.h set.c glob.[ch] frequencies.q q2c.c error.c lexer.[ch] 
1181           output.[ch] getline.c 
1182
1183           Plugged some memory leaks
1184
1185 Mon Nov 15 23:47:40 2004  Ben Pfaff  <blp@gnu.org>
1186
1187         Adopt GSL random number generators, paving the way for providing
1188         the complete suite of random number generators on expressions.
1189         
1190         * Makefile.am: Remove random.c, random.h.
1191
1192         * random.c: Removed.
1193
1194         * random.h: Removed.
1195
1196         * algorithm.c: (algo_default_random) Use GSL functions.
1197
1198         * casefile.c: (test_casefile) Use GSL RNG functions.
1199
1200         * expr-evl.c: (expr_evaluate) Use GSL RNG functions for OP_NORMAL,
1201         OP_UNIFORM.
1202
1203         * sample.c: (cmd_sample) Use GSL RNG functions.
1204         (sample_trns_proc) Ditto.
1205
1206         * set.q: (static var set_seed) Removed.
1207         (static var seed_flag) Removed.
1208         (static var rng) New variable.
1209         (aux_stc_custom_seed) No seed value anymore, don't print anything.
1210         (stc_custom_seed) Use new seed functions.
1211         (seed_is_set) Removed.
1212         (get_rng) New function that composes the entire external
1213         interface.
1214         (set_rng) New function.
1215         (random_seed) New function.
1216
1217 Mon Nov 15 22:08:25 2004  Ben Pfaff  <blp@gnu.org>
1218
1219         * expr-evl.c: (expr_evaluate) Fix XDATE.JDAY formula.  Thanks to
1220         John Darrington <john@darrington.wattle.id.au> for reporting this
1221         bug.
1222
1223 Tue Nov 16 13:19:18 WST 2004 John Darrington <john@darrington.wattle.id.au>
1224
1225         * permissions.c command.def Added the PERMISSIONS command
1226
1227 Mon Nov 15 01:33:32 2004  Ben Pfaff  <blp@gnu.org>
1228
1229         * q2c.c: (dump_header) Don't try to emit #includes at very top of
1230         output file because that will precede #include <config.h>, which
1231         is bad.
1232         (main) Add needed headers to /* (header) */ code.
1233
1234 Mon Nov 15 01:21:36 2004  Ben Pfaff  <blp@gnu.org>
1235
1236         Instead of making system or portable file readers responsible for
1237         dropping and reordering variables, make them read full cases and
1238         let the caller take care of any changes.
1239
1240         * get.c: New "case map" structure to handle this.  Use for GET,
1241         IMPORT, MATCH FILES.  Essentially rewrite the whole file.
1242
1243         * pfm-read.c: (pfm_read_case) Read into provided case.  Signature
1244         changed appropriately.
1245
1246         * sfm-read.c: (sfm_read_case) Ditto.
1247
1248 Mon Nov 15 00:47:45 2004  Ben Pfaff  <blp@gnu.org>
1249
1250         Decided that case_serialize() and case_unserialize() were too
1251         abstract.  Also we need a couple more functions to avoid excessive
1252         copying for data in/out fast paths.
1253
1254         * case.c: (case_serial_size) Removed.
1255         (case_serialize) Rename case_to_values() and make its argument
1256         explicitly an array of union values.
1257         (case_unserialize) Rename case_from_values() and make its argument
1258         explicitly an array of union values.
1259         (case_data_all) New function.
1260         (case_data_all_rw) New function.
1261
1262         * casefile.c: (struct casefile) Change buffer from array of
1263         unsigned char to array of union value for better accuracy.
1264         Redefine buffer_used and buffer_size in terms of values, not
1265         bytes.  Remove case_size because it is now redundant with
1266         value_cnt.  Fix up all references to these members.
1267
1268 Mon Nov 15 00:45:46 2004  Ben Pfaff  <blp@gnu.org>
1269
1270         * barchart.c: (struct subcat) Make `label' member const to silence
1271         GCC warning with -Wwrite-strings.
1272
1273         * cartesian.c: (struct dataset) Ditto.
1274
1275         * case.c: Don't re-define NDEBUG if already defined.
1276         Add lots of comments.
1277
1278         * str.c: Fix includes.
1279
1280         * crosstabs.q: Fix includes.
1281
1282         * examine.q: Fix includes.  Fix GCC warning about unused
1283         variables.
1284         
1285         * frequencies.q: (stat macro) Removed and replaced where used by
1286         its expansion.
1287
1288         * list.q: Fix includes.
1289
1290         * oneway.q: Fix includes.
1291
1292         * piechart.c: Fix includes.  Only define M_PI if not already
1293         defined.
1294
1295         * sfm-read.c: (bswap) New function.
1296         (bswap_int32) Write in terms of bswap.
1297         (bswap_flt64) Ditto.
1298
1299         * str.c: (ds_data) Add external definition here, needed because
1300         str.h has only an `extern inline' version.
1301
1302         * value-labels.c: Fix includes.
1303
1304 Mon Nov 15 00:40:55 2004  Ben Pfaff  <blp@gnu.org>
1305
1306         Instead of providing a system or portable file writer with a raw
1307         case in the format needed for output, provide it with a regular
1308         case.  The writer takes care of any needed translation.
1309
1310         * aggregate.c: Adopt new scheme for AGGREGATE.
1311         (struct agr_proc) sfm_agr_case member removed.
1312         (write_case_to_sfm) Removed because the new interface is easier to
1313         use.
1314
1315         * get.c: Adopt new scheme for SAVE, XSAVE, EXPORT.
1316
1317         * pfm-write.c: Implement new scheme.
1318
1319         * sfm-write.c: Ditto.
1320
1321 Mon Nov 15 00:32:24 2004  Ben Pfaff  <blp@gnu.org>
1322
1323         Instead of treating `struct file_handle' as a class to subclass
1324         into data files, system files, and portable files, instead use it
1325         as a helper that coordinates access.  Now it is opaque, too.
1326
1327         This means that most references to a struct file_handle are now
1328         changed into references to one of struct dfm_reader, struct
1329         dfm_writer, struct sfm_reader, struct sfm_writer, struct
1330         pfm_reader, or struct pfm_writer, according to what's being read
1331         or written.
1332
1333         Most related changes are only worth summarizing briefly.
1334
1335         * dictionary.c: (dict_clear) Destroy aux data in deleted
1336         variables.
1337         (dict_clear_aux) New function.
1338         (dict_create_var) Initialize aux, aux_dtor.
1339         (dict_delete_var) Destroy aux data in deleted variable.
1340
1341         * file-handle.h: (struct fh_ext_class) Removed.
1342         (struct file_handle) Removed.
1343         (fh_init_files) Removed.
1344
1345         * file-handle.q: Changed references to a handle's `private' member
1346         to direct references.
1347         (struct private_file_handle) Renamed file_handle.
1348         Add next, open_cnt, type, open_mode, aux members.
1349         (struct file_handle_list) Removed.
1350         (extern var inline_file) Removed.
1351         (static var file_handles) Changed from file_handle_list * to
1352         file_handle *.
1353         (create_file_handle) Initialize new members.
1354         (fh_close_handle) Removed.
1355         (mode_name) New function.
1356         (fh_open) New function.
1357         (fh_close) New function.
1358         (fh_parse_file_handle) Renamed fh_parse().
1359
1360         * glob.c: (init_glob) Remove fh_init_files() call.
1361         
1362         * aggregate.c: use sfm_writer.
1363         (create_sysfile) Removed because the new interface is simpler.
1364         
1365         * apply-dict.c: Use sfm_reader.
1366
1367         * data-list.c: Use dfm_reader.
1368
1369         * file-type.c: Use dfm_reader.
1370
1371         * get.c: Use sfm_reader, sfm_writer, pfm_reader, pfm_writer.
1372
1373         * inpt-pgm.c: Use dfm_reader.
1374
1375         * print.c: Use dfm_writer.
1376
1377         * sysfile-info: Use sfm_reader.
1378
1379         * dfm-read.c: Adopt new file handle infrastructure.
1380
1381         * dfm-write.c: Ditto.
1382
1383         * pfm-read.c: Ditto.
1384         
1385         * pfm-write.c: Ditto.
1386
1387         * sfm-read.c: Ditto.
1388
1389         * sfm-write.c: Ditto.
1390         
1391 Mon Nov 15 00:31:44 2004  Ben Pfaff  <blp@gnu.org>
1392
1393         Break dictionary functions into separate header file.
1394
1395         * dictionary.h: New file.
1396
1397         * var.h: Moved dict_*() functions to dictionary.h.
1398
1399 Mon Nov 15 00:30:33 2004  Ben Pfaff  <blp@gnu.org>
1400
1401         Get rid of procedure-specific union in struct variable, using
1402         instead a void * pointer and a destructor function.
1403
1404         Most related changes are only worth brief summaries.
1405
1406         * crosstabs.q: Fix includes.  Use new struct var_range in lieu of
1407         old p.crs member in struct variable.
1408         
1409         * frequencies.q: Fix includes.  Use new struct var_freqs in lieu
1410         of old p.frq member in struct variable.
1411
1412         * histogram.c: (draw_histogram) Takes new freq_tab arg because
1413         it's no longer possible to grab this from var->p.frq.
1414
1415         * piechart.c: (draw_piechart) Ditto.
1416
1417         * group.c: (group_proc_get) New function.
1418
1419         * levene.c: Use group_proc_get() in lieu of old p.grp_data member
1420         in struct variable.
1421
1422         * oneway.q: Ditto.
1423
1424         * t-test.q: Ditto.
1425
1426         * main.c: (execute_command) Clear aux data in default_dict after
1427         each command.  (It's debatable whether this should be done.)
1428
1429         * matrix-data.c: Use new struct mxd_var in lieu of old p.mxd
1430         member in struct variable.
1431
1432         * means.q: Get rid of integer mode, which is not included in
1433         recent SPSS and was the only code that wanted per-variable private
1434         data.
1435
1436         * var.h: (struct crosstab_proc) Removed.
1437         (struct frequencies_proc) Removed.
1438         (struct list_proc) Removed.
1439         (struct get_proc) Removed.
1440         (struct means_proc) Removed.
1441         (struct matrix_data_proc) Removed.
1442         (struct match_files_proc) Removed.
1443         (lots of enums) Removed.
1444         (struct variable) Removed members `p', `get'.  Add member
1445         `aux_dtor'.
1446
1447         * vars-atr.c: (var_attach_aux) New function.
1448         (var_detach_aux) New function.
1449         (var_clear_aux) New function.
1450         (var_dtor_free) New function.
1451         (discard_variables) Use NULL instead of inline_file.
1452
1453 Fri Nov 12 10:07:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
1454
1455         * value-labs.c  Fixed the implmentation of value_to_string, so 
1456         that it properly handles alpha values.
1457
1458         * oneway.q  Changed instances where labels were being probed manually, 
1459         to use the canonical {var,value}_to_string functions
1460
1461 Thu Nov 11 21:01:31 WST 2004 John Darrington <john@darrington.wattle.id.au>
1462
1463         * examine.q cartesian.c chart.[ch]   Added normal and detrended normal
1464         plots.  Changed the API of the cartesian plot to be a much lower level
1465         thing.
1466
1467 Sun Nov  7 17:25:04 WST 2004 John Darrington <john@darrington.wattle.id.au>
1468
1469         * examine.q Added some of the parametric calculations
1470
1471         * factor_stats.[ch]  Created
1472         
1473 Sat Nov  6 21:24:31 WST 2004 John Darrington <john@darrington.wattle.id.au>
1474
1475         * examine.q  Changed the definition of factors to be a composite, and
1476         dealt with the consequences.
1477
1478 Sat Nov  6 20:40:38 WST 2004 John Darrington <john@darrington.wattle.id.au>
1479
1480         * examine.q Fixed problem where examine wasn't dealing properly with 
1481         splits
1482
1483 Sat Nov  6 14:49:47 WST 2004 John Darrington <john@darrington.wattle.id.au>
1484
1485         * oneway.q Fixed problem where oneway wasn't dealing properly with 
1486         splits
1487
1488 Thu Nov  4 11:09:01 WST 2004 John Darrington <john@darrington.wattle.id.au>
1489
1490         * q2c.c examine.q  Fixed a bug (feature?) whereby arrays in the
1491         command which had settings didn't get the appropriate code
1492         generated.
1493
1494         * val.h value-labels.[ch] var-labs.c Added v*to_string functions
1495         to convert variables/values to strings.
1496
1497         * examine.q  Added framework for the EXAMINE command.
1498
1499 Mon Nov  1 12:46:17 WST 2004 John Darrington <john@darrington.wattle.id.au>
1500
1501         * q2c.c frequencies.q set.q t-test.q  Fixed the q2c parsing of DBL 
1502         subcommand types.  Changed frequencies.q to use it rather then the 
1503         custom parser.  Dealt with the consequences.  Added a test for NTILES
1504         subcommand of frequencies.
1505
1506 Sat Oct 30 09:16:29 WST 2004 John Darrington <john@darrington.wattle.id.au>
1507
1508         * oneway.q   Fixed up the behaviour when given missing values
1509
1510         * levene.c oneway.q Fixed a buglet with the levene statistic and
1511         incorporated the levene test into the oneway command.
1512
1513         * group.h  t-test.q  Moved the CMP_EQ and CMP_LE symbols out of 
1514         global scope, since they're only relevant to T-TEST
1515
1516 Fri Oct 29 17:39:03 WST 2004 John Darrington <john@darrington.wattle.id.au>
1517
1518         * group.c group.h group_proc.h levene.c oneway.q t-test.q
1519
1520         Made the t-test more consistent
1521         with the way it handles groups.  That is, it now uses a hash instead
1522         of an array of 2.  Also, made the levene.c file independent of the 
1523         implementation of the t-test.  So now levene should be fine for both
1524         t-test and anova.
1525
1526         * Added an oneway.q file for one way anova
1527
1528 Wed Jun  2 22:08:02 2004  Ben Pfaff  <blp@gnu.org>
1529
1530         * descript.c: (cmd_descriptives) Remove harmless but bogus test in
1531         STATISTICS parsing.
1532
1533 Mon May 31 20:45:24 2004  Ben Pfaff  <blp@gnu.org>
1534
1535         Fix memory leaks.
1536
1537         * data-list.c: (cmd_data_list) Free dls->delims on lossage.
1538         (data_list_trns_free) Free dls->delims.
1539
1540         * t-test.q: (tts_custom_pairs) Free vars.
1541         (ssbox_one_sample_init) Fix tab_vline() argument.
1542         (ssbox_independent_samples_init) Ditto.
1543         (trbox_paired_init) Ditto.
1544         (trbox_one_sample_init) Ditto.
1545
1546 Mon May 31 17:19:27 2004  Ben Pfaff  <blp@gnu.org>
1547
1548         Generalize casefiles to the extent that we can use them for
1549         sorting and other kinds of data transformations.  Change cases to
1550         be copy-on-write to improve memory efficiency in common cases.
1551         Every access to a member of a `struct ccase' was changed to be a
1552         call to a case_*() function, especially case_data(), case_num(),
1553         case_str(), or case_data_rw().  Many instances of a local variable
1554         named "case_num" were changed to "case_idx" as a consequence.
1555         Many `struct ccase *' were changed to actual `struct ccase'
1556         because of copying semantics of cases.  In several places there
1557         was a choice between updating debug code to work with the new ADTs
1558         or just deleting it because it was useless; I chose to delete it.
1559  
1560         * Makefile.am: (pspp_SOURCES) Add case.c, case.h.
1561
1562         * case.c: New file.
1563
1564         * case.h: New file.
1565
1566         * aggregate.c: (struct agr_proc) Change type of `sort' to
1567         sort_criteria *.  Add `break_vars', `break_var_cnt' members.
1568         Rename `vars' to `agr_vars', all references updated.  Change
1569         `agr_case' to type `struct ccase'.
1570         (cmd_aggregate) Deal with new members.  Use case_create(),
1571         sort_active_file_in_place(), sort_active_file_to_casefile().
1572         (agr_destroy) Deal with new members.
1573         (aggregate_single_case) Ditto.
1574         (dump_aggregate_info) Ditto.
1575         (initialize_aggregate_info) Ditto.
1576         (agr_to_active_file) Ditto.
1577         (presorted_agr_to_sysfile) Ditto.
1578         (sort_agr_to_sysfile) Removed.
1579
1580         * alloc.c: (out_of_memory) Make non-static.
1581
1582         * alloc.h: Prototype out_of_memory().
1583
1584         * casefile.c: Switched from a linked list in-memory representation
1585         to a two-level array-style representation.  The linked list was
1586         appropriate when we could stick a header onto cases, but that's no
1587         longer the case.  Also, the two-level array will allow for random
1588         in-memory access in case that's ever wanted.  Also added the
1589         concept of a `destructive casereader', one that destroys cases in
1590         the underlying casefile as they are read out.
1591         (macro CASES_PER_BLOCK) New macro.
1592         (struct casefile) New members `value_cnt', `case_list_size',
1593         `case_acct_size', `being_destroyed', `cases'.  Removed `head',
1594         `tail'.
1595         (struct casereader) Removed `cur'.  Added `destructive', `c'.
1596         (global var casefiles) Made static.
1597         (static var case_bytes) New var.
1598         (casefile_create) Takes a value count, not a case size in bytes,
1599         to conform to the case interface.  All callers updated.  Deal with
1600         new and removed members.
1601         (casefile_destroy) Deal with new and removed members.
1602         (casefile_sleep) New function.
1603         (casefile_get_case_size) Removed.
1604         (casefile_get_value_cnt) New function.
1605         (casefile_append) Rewritten to deal with new and removed members.
1606         (casefile_append_xfer) New function.
1607         (write_case_to_disk) Use case_serialize().
1608         (call_posix_fadvise) Removed because posix_fadvise64 segfaults.
1609         Couldn't figure out why.
1610         (casefile_to_disk) Don't call call_posix_fadvise.  Rewritten to
1611         deal with new and removed members.
1612         (merge) Removed.
1613         (merge_sort) Removed.
1614         (casefile_sort) Removed.
1615         (casefile_get_reader) Deal with new and removed members.
1616         (casefile_get_destructive_reader) New function.
1617         (reader_open_file) Make code more readable.  Create case for
1618         reader.
1619         (casereader_get_casefile) New function.
1620         (casereader_read) Deal with new and removed members.  Now returns
1621         a copy of the case, so that the caller is responsible for
1622         destroying the returned case.
1623         (casereader_read_xfer) New function.
1624         (casereader_destroy) Destroy reader's case.
1625         (test_casefile) Second arg is now a value count, all callers
1626         updated.  Now tests destructive readers too.
1627         (get_random_case) Deal with new case ADT.
1628         (write_random_case) Ditto.
1629         (read_and_verify_random_case) Ditto.
1630
1631         * crosstabs.q: Remove debug code.
1632
1633         * descript.q: (calc_descriptives) Deal with new case, casefile
1634         ADTs.
1635
1636         * dfm.c: (cmd_begin_data) There's no storage_source_class anymore.
1637
1638         * do-if.c: Remove unneeded header inclusion.
1639
1640         * expr-prs.c: Remove debug code.
1641
1642         * exprP.h: Remove debug code.
1643
1644         * flip.c: (flip_file) Use fseeko() if available.
1645
1646         * formats.c: Remove debug code.
1647
1648         * get.c: Remove debug code.
1649         (struct mtf_file) Change `input' from `union value *' to `struct
1650         ccase', all references updated.
1651
1652         * levene.c: (levene) Deal with new case, casefile ADTs.
1653
1654         * list.q: Remove debug code.
1655
1656         * loop.c: Remove debug code.
1657         
1658         * matrix-data.c: Remove debug code.
1659
1660         * means.q: Remove debug code.
1661
1662         * mis-val.c: Remove debug code.
1663
1664         * pfm-read.c: Remove debug code.
1665         (pfm_read_code) Change second arg from `union value *' to `struct
1666         ccase *', all references updated.
1667
1668         * recode.c: (string_to_long) Make first arg const.
1669         (convert_to_double) Ditto.
1670
1671         * repeat.c: Remove debug code.
1672
1673         * sample.c: Remove debug code.
1674
1675         * sfm-read.c: Remove debug code.
1676         (sfm_read_case) Change second arg from `union value *' to `struct
1677         ccase *'.
1678
1679         * sort.c: Redone in terms of casefiles.
1680         (enum sort_direction) Moved here from sort.h.
1681         (struct sort_criterion) New structure.
1682         (struct sort_criteria) New structure.
1683         (cmd_sort_cases) Rewritten.
1684         (prepare_to_sort_active_file) New function.
1685         (sort_active_file_in_place) New function.
1686         (sort_active_file_to_casefile) New function.
1687         (parse_sort) Renamed sort_parse_criteria(), rewritten & interface
1688         changed, all callers updated.
1689         (destroy_sort_cases_pgm) Renamed sort_destroy_criteria(),
1690         rewritten & interface changed, all callers updated.
1691         (sort_cases) Renamed sort_execute(), rewritten & interface
1692         changed, all callers updated.
1693         (struct internal_sort) Removed.
1694         (do_internal_sort) Rewritten, interface changed.
1695         (destroy_internal_sort) Removed.
1696         (compare_case_dblptrs) Use sort_criteria instead of sort_case_pgm.
1697         (struct initial_run) Removed; an initial run is now just a
1698         casefile.
1699         (compare_initial_runs) Rewritten.
1700         (struct external_sort) Changed almost completely.
1701         (do_external_sort) Rewritten, interface changed.
1702         (destroy_external_sort) Rewritten.
1703         [HAVE_MKDTEMP] (make_temp_dir) Removed.
1704         [!HAVE_MKDTEMP] (do_mkdir) Removed.
1705         [!HAVE_MKDTEMP] (make_temp_dir) Removed.
1706         (init_external_sort) Removed.
1707         (simulate_error) Removed.
1708         (rmdir_temp_dir) Removed.
1709         (get_temp_file_name) Removed.
1710         (open_temp_file) Removed.
1711         (close_temp_file) Removed.
1712         (remove_temp_file) Removed.
1713         (write_temp_file) Removed.
1714         (read_temp_file) Removed.
1715         (struct record_run) Change `record' from `struct case_lit *' to
1716         `struct ccase'.
1717         (struct initial_run_state) Remove `idx_to_fv', `free_list',
1718         `file_idx', `output_file'.  Add `run', casefile'.  Change
1719         `last_output' from `struct case_list *' to `struct ccase'.
1720         (write_initial_runs) Change interface, rewrite.
1721         (sort_sink_write) Renamed process_case(), changed interfaced,
1722         rewrote.
1723         (destroy_initial_run_state) Rewritten.
1724         (allocate_cases) Rewritten.
1725         (compare_record) Interface changed, rewritten.
1726         (start_run) Rewritten.
1727         (end_run) Rewritten.
1728         (output_record) Rewritten.
1729         (grab_case) Removed.
1730         (release_case) Removed.
1731         (struct merge_case) Change `cases' from double pointer to single
1732         pointer.
1733         (merge) Deal with new case and casefile ADTs.
1734         (struct run) Removed.
1735         (merge_once) Rewritten, interface changed.
1736         (fill_run_buffer) Removed.
1737         (sort_sink_make_source) Removed.
1738         (sort_sink_class) Removed.
1739         (struct sort_source_aux) Removed.
1740         (sort_source_read_helper) Removed.
1741         (sort_source_read) Removed.
1742         (read_sort_output) Removed.
1743         (read_internal_sort_output) Removed.
1744         (read_external_sort_output) Removed.
1745         (sort_source_destroy) Removed.
1746         (sort_source_class) Removed.
1747
1748         * sort.h: (struct sort_cases_pgm) Removed.
1749         (enum sort_direction) Moved to sort.c.
1750
1751         * t-test.q: (calculate) Deal with new case, casefile ADTs.
1752
1753         * tab.c: Remove debug code.
1754
1755         * var-labs.c: Remove debug code.
1756
1757         * var.h: (struct ccase) Removed.
1758         (struct case_list) Removed.
1759
1760         * vars-atr.c: (discard_variables) Use free_case_source().
1761
1762         * vars-prs.c: (parse_vs_variable) Make arg const.
1763         (parse_dict_variable) Ditto.
1764         (parse_variables) Make struct dictionary * arg const.
1765         (parse_var_set_vars) Make struct var_set * arg const.
1766         (struct var_set) Add const to some of the function pointers' args.
1767         (var_set_get_cnt) Make arg const.
1768         (var_set_get_var) Make first arg const.
1769         (var_set_lookup_var) Make first arg const.
1770         (dict_var_set_get_cnt) Make arg const.
1771         (dict_var_set_get_var) Make first arg const.
1772         (dict_var_set_lookup_var) Make first arg const.
1773         (var_set_create_from_dict) Make arg const.  Add cast to aux
1774         assignment.
1775         (struct array_var_set) Add const to var member.
1776         (array_var_set_get_cnt) Make arg const.
1777         (array_var_set_get_var) Make first arg const.
1778         (array_var_set_lookup_var) Make first arg const.
1779         (var_set_create_from_array) Make first arg const.  Insert cast.
1780
1781         * vfm.c: (struct write_case_data) Change trns_case, sink_case
1782         members from `struct ccase *' to `struct ccase'.
1783         (static var lag_queue) Change from double to single pointer.
1784         (procedure) Optimize trivial case.
1785         (internal_procedure) Deal with changed case, case_source ADTs.
1786         (create_trns_case) Changed interface, rewrote.
1787         (open_active_interface) Initialize modified lag queue.
1788         (write_case) Deal with changed case ADT.
1789         (lag_case) Deal with modified lag queue.
1790         (close_active_file) Destroy modified lag queue.
1791         Deal with changed case_source, case_sink ADTs.
1792         (destroy_storage_stream_info) Make null arg into no-op.
1793         (storage_sink_make_source) Set aux in created source.
1794         (storage_source_read) Deal with changed case, casefile ADTs.
1795         (storage_source_create) New function.
1796         (lagged_case) Rewrite.
1797         (free_case_source) New function.
1798         (free_case_sink) Rewrite.
1799         (struct split_aux_data) Changed prev_case from `struct ccase *' to
1800         `struct ccase'.
1801         (procedure_with_splits) Deal with changed prev_case.
1802         (procedure_with_splits_callback) Ditto.
1803         (multipass_split_aux_data) Changed prev_case from `struct ccase *' to
1804         `struct ccase'.
1805         (multipass_procedure_with_splits) Deal with changed prev_case.
1806         (multipass_split_callback) Ditto.
1807         
1808         
1809 Mon May 31 17:19:06 2004  Ben Pfaff  <blp@gnu.org>
1810
1811         The workspace idea didn't work out.
1812
1813         * Makefile.am: (pspp_SOURCES) Remove workspace.c, workspace.h.
1814         
1815         * workspace.c: Removed.
1816
1817         * workspace.h: Removed.
1818
1819 Sun May 30 18:35:19 2004  Ben Pfaff  <blp@gnu.org>
1820
1821         Fully implement arbitrary delimiters on DATA LIST, extending the
1822         half implementation that was already there.
1823
1824         * data-list.c: (struct data_list_pgm) Remove `delim', add
1825         `delims', `delim_cnt'.
1826         (cmd_data_list) Initialize new members.  Parse delimiters and
1827         clean up code a bit.
1828         (cut_field) Extract fields with arbitrary delimiters.  Also, fix
1829         handling of leading commas.
1830         (read_from_data_list_fixed) Expand tabs.  Adapt to new DFM
1831         interfaces.
1832         (read_from_data_list_free) Adapt to new DFM interfaces.
1833         (read_from_data_list_list) Ditto.
1834         (repeating_data_trns_proc) Ditto.
1835
1836         * dfm.c: Split up reader and writer into separate code, because
1837         they do different things.  Use struct string instead of explicit
1838         allocation code, for clarity.
1839         (enum dfm_reader_flags) New enum.
1840         (struct dfm_fhuser_ext) Removed.
1841         (struct dfm_reader_ext) New.
1842         (get_reader) New function, used by just about all the reader
1843         functions.
1844         (dfm_close) Removed.
1845         (close_reader) New function.
1846         (dfm_open_for_reading) Rewrite initialization of dfm_fhuser_ext.
1847         (dfm_open_for_writing) Ditto.
1848         (macro force_line_buffer_expansion) Removed.
1849         (count_tabs) Removed.
1850         (tabs_to_spaces) Removed.
1851         (read_record) Deal with new dfm_reader_ext.  Use struct string
1852         functions.  Don't convert tabs to spaces.
1853         (dfm_eof) New function.
1854         (dfm_get_record) Changed interface, rewrote.
1855         (dfm_expand_tabs) New function.
1856         (dfm_fwd_record) Renamed dfm_forward_record(), updated to new
1857         dfm_reader_ext, rewritten.
1858         (dfm_bkwd_record) Renamed dfm_reread_record(), updated to new
1859         dfm_reader_ext, rewritten.
1860         (dfm_set_record) Removed in favor of dfm_forward_columns().
1861         (dfm_forward_columns) New function.
1862         (dfm_get_cur_col) Renamed dfm_column_start, updated to new
1863         dfm_reader_ext, rewritten.
1864         (static var dfm_r_class) Use close_reader for the destructor.
1865         (struct dfm_writer_ext) New.
1866         (dfm_put_record) Updated to new dfm_writer_ext, rewritten.  Uses
1867         bounce buffer now instead of local allocation.
1868         (close_writer) New function.
1869         (static var dfm_writer_ext) Use close_writer for destructor.
1870         (cmd_begin_data) Adapt to new dfm_reader_ext.
1871
1872         * file-handle.q: Add support for per-file tab width.
1873         (struct private_file_handle) Add tab_width member.
1874         (q2c specifications) Add tabwidth subcommand.
1875         (cmd_file_handle) Put parsed tab width into private_file_handle.
1876         (create_file_handle) Set default tab width.
1877         (handle_get_tab_width) New function.
1878
1879         * file-type.c: (file_type_source_read) Adapt to new DFM interface.
1880
1881         * inpt-pgm.c: (reread_trns_proc) Ditto.
1882
1883         * matrix-data.c: (context) Ditto.
1884         (another_token) Ditto.
1885         (mget_token) Ditto.
1886         (force_eol) Ditto.
1887
1888 Sun May 30 18:33:59 2004  Ben Pfaff  <blp@gnu.org>
1889
1890         * casefile.c: (casefile_destroy) Fix memory leak by freeing
1891         cf->filename.
1892         (casereader_destroy) Don't close file descriptor -1.
1893
1894         * recode.c: (cmd_recode) Fix memory leak.
1895
1896         * set.q: (q2c specifications) Fix typo in user message.
1897
1898         * str.c: (st_bare_pad_len_copy) Change memcpy to memmove to avoid
1899         undefined behavior for overlapping arguments.
1900
1901 Sun May 30 18:31:48 2004  Ben Pfaff  <blp@gnu.org>
1902
1903         * casefile.c: valgrind doesn't implement posix_fadvise() yet, so
1904         don't call it when we're running under valgrind.
1905         (call_posix_fadvise) New function.
1906         (casefile_to_disk) Use call_posix_fadvise().
1907         (reader_open_file) Ditto.
1908         
1909 Sun May 30 18:20:12 2004  Ben Pfaff  <blp@gnu.org>
1910
1911         Update our string ADTs, struct string and struct len_string.  Get
1912         rid of pool support, which was largely unused.  Rename lots of
1913         functions to have more obvious or consistent names.
1914         
1915         * ascii.c: Get rid of ascii_pool.  It was only used for string
1916         allocations.
1917         (ascii_open_global) Don't create ascii_pool.
1918         (ascii_close_driver) Don't destroy ascii_pool.
1919         (ascii_postopen_driver) Don't use pool.
1920         (ascii_close_driver) Destroy strings manually.
1921
1922         * str.c: (ds_create) Remove pool argument, all references updated.
1923         (ds_init) Ditto.
1924         (ds_replace) Remove pool support, make more efficient when we
1925         don't need to reallocate.
1926         (ds_destroy) Remove pool support.
1927         (ds_rpad) New function.
1928         (ds_size) Renamed ds_capacity(), all references updated.
1929         (ds_value) Renamed ds_c_str(), all references updated.
1930         (ds_concat) Renamed ds_puts(), all references updated.
1931         (ds_concat_buffer) Renamed ds_concat(), all references updated.
1932         (ds_putchar) Renamed ds_putc(), all references updated.
1933         (ds_getline) Renamed ds_gets(), all references updated.
1934         (ls_create) Remove pool argument, all references updated.
1935         (ls_create_buffer) Ditto.
1936         (ls_destroy) Removed pool support.
1937         (ls_value) Renamed ls_c_str(), all references updated.
1938
1939         * str.h: (ls_length) [__GNUC__] Add inline version.
1940         (ls_c_str) [__GNUC__] Add inline version.
1941         (ls_end) [__GNUC__] Add inline version.
1942         (struct string) Remove pool member.  Rename `size' to `capacity',
1943         all references updated.
1944
1945         * tab.c: (text_format) Instead of using pool argument to
1946         ls_create_buffer(), call pool_register() on allocated data.
1947
1948 Mon Apr 26 22:40:07 2004  Ben Pfaff  <blp@gnu.org>
1949
1950         We're abusing the current ASCII driver by telling it to allocate a
1951         9999-line, 9999-character page in the tests.  This causes some
1952         systems to curl up and die because it allocates 20 MB of
1953         contiguous RAM.  This change alleviates at least part of the
1954         problem.  It is mostly a stop-gap until the new output system is
1955         ready.
1956         
1957         * ascii.c: (struct line) New structure.
1958         (struct ascii_driver_ext) Remove `page', `page_size', `line_len',
1959         `line_len_size', `n_output' members.  Add `lines', `lines_cap'.
1960         (ascii_preopen_driver) Initialize new members, not old ones.
1961         (ascii_close_driver) Destroy new members, not old ones.
1962         (ascii_open_page) Allocate new members, not old ones.
1963         (expand_line) Allocate room in line.
1964         (draw_line) Use new members.
1965         (ascii_line_horz) Ditto.
1966         (ascii_line_vert) Ditto.
1967         (ascii_line_intersection) Ditto.
1968         (text_draw) Ditto.
1969         (output_lines) Ditto.
1970         (ascii_close_page) Ditto.
1971
1972 Sun Apr 25 23:40:15 2004  Ben Pfaff  <blp@gnu.org>
1973
1974         * matrix.c: Dead code.  Removed.
1975
1976         * matrix.h: Dead code.  Removed.
1977
1978 Fri Apr 16 23:59:51 2004  Ben Pfaff  <blp@gnu.org>
1979
1980         Contrary to what I'd always understood, there is an efficient
1981         algorithm for deletion from a hash table populated via linear
1982         probing.  This change implements it.
1983         
1984         * hash.c: (hsh_rehash) Probe in increasing order.
1985         (hsh_probe) Ditto.
1986         (locate_matching_entry) Ditto.
1987         (hsh_delete) Use Knuth's Algorithm 6.4R for deletion.
1988
1989 Tue Apr 13 19:24:15 2004  Ben Pfaff  <blp@gnu.org>
1990
1991         * moments.c (calc_moments): Adjust calculation of kurtosis to
1992         avoid subtracting huge numbers from huge numbers, on Michael
1993         Kiefte's advice.
1994
1995 Sun Apr 11 14:22:12 2004  Ben Pfaff  <blp@gnu.org>
1996
1997         Rework moments routines for improved numerical stability based on
1998         Michael Kiefte's advice.  Any bugs or remaining numerical problems
1999         are still mine though.
2000
2001         There is now a struct moments1 for use with one-pass moments.  It
2002         uses a provisional means algorithm as an attempt to improve
2003         accuracy of higher moments.  The older struct moments now only
2004         handles two-pass moments.
2005         
2006         * aggregate.c: Use moments1 instead moments.
2007
2008         * descript.c: Revert previous change, which is no longer needed
2009         due to the moments revision.
2010
2011         * moments.c: (calc_moments) New function for calculating variance,
2012         skewness, kurtosis.
2013         (moments_pass_one) Only accumulate weights bigger than zero.
2014         (moments_calculate) Allow calculating the mean on pass one, others
2015         require pass two.  Implement in terms of calc_moments().
2016         (struct moments1) New structure.
2017         (init_moments1) New function.
2018         (moments1_clear) Ditto.
2019         (moments1_create) Ditto.
2020         (moments1_add) Ditto.
2021         (moments1_calculate) Ditto.
2022         (moments1_destroy) Ditto.
2023         (cmd_debug_moments) Deal with `struct moments' or `struct
2024         moments1' as requested by user.
2025
2026 Sun Apr 11 14:21:55 2004  Ben Pfaff  <blp@gnu.org>
2027
2028         * Makefile.am (pspp_SOURCES): Remove debug.c.
2029
2030         * debug.c: Removed.  It was empty anyway.
2031
2032 Fri Apr  9 20:04:49 2004  Ben Pfaff  <blp@gnu.org>
2033
2034         * descript.c (calc_descriptives): Fix assert failure when only
2035         MOMENT_MEAN is needed.
2036
2037 2004-04-09  Michael Kiefte  <mkiefte@dal.ca>
2038
2039         * descript.c: 
2040
2041         fixed problem with parsing in match_statistic() causing
2042         "DESCRIPTIVE STAT=MEAN." to barf.
2043
2044         "MEAN" is now default if "SORT" given without specification.
2045
2046         Fixed infinite loop with "DESCRIPT GIBBERISH=ALL."  Parsing is
2047         generally less forgiving of syntax errors: better to have it do
2048         nothing and type it in again then to not know what it actually did
2049         instead.  
2050
2051         z-score transformation now checks score for user-missing values
2052         and checks std_dev for SYSMIS.
2053
2054 2004-04-06  Michael Kiefte  <mkiefte@dal.ca>
2055
2056         * aggregate.c, crosstabs.q, descript.c, dictionary.c, frequencies.q, levene.c, t-test.q, var.h: 
2057         Changed dict_get_case_weight() to accept an additional int * flag
2058         to complain about system-missing, user-missing, zero, or negative
2059         weights and updated existing functions to pass int * to
2060         dict_get_case_weight().
2061
2062 2004-04-05  jmd  <jmd@gnu.org>
2063
2064         * main.c: Fixed configuration problems with gsl
2065
2066         * t-test.q: Fixed some problems encountered when compiling under Cygwin
2067
2068 2004-04-03  blp  <blp@gnu.org>
2069
2070         * lexer.c, ChangeLog:
2071         Fix infinite loop on comment at end of file, add test.
2072
2073 2004-04-03  jmd  <jmd@gnu.org>
2074
2075         * settings.h, var.h, ChangeLog, Makefile.am, cmdline.c, command.c, command.h, error.h, filename.c, frequencies.q, lexer.h, main.c, q2c.c, set.q:
2076         Fixed the calculation of percentiles and added --syntax and --algorithm options
2077
2078 Sat Apr  3 11:43:37 2004  Ben Pfaff  <blp@gnu.org>
2079
2080         * lexer.c: (lex_skip_comment) Handle end-of-file correctly (I
2081         hope).
2082
2083 Sat Apr  3 15:00:18 WST 2004 John Darrington <john@darrington.wattle.id.au>
2084
2085         * frequencies.q:  Fixed the calculation of percentiles
2086
2087         * Makefile.am:  Added the --ansi flag and dealt with the
2088         consequences.  Added some entries to PSPP_sources so that
2089         make distcheck would pass
2090
2091         * cmdline.c:   Added the --syntax and --algorithm options
2092
2093         * q2c.c:  Added an implicit /ALGORITHM subcommand to everything.
2094
2095 Fri Apr  2 11:25:22 WAST 2004 John Darrington <john@darrington.wattle.id.au>
2096
2097         * t-test.q, levene.c, levene.h  Converted t-test (incl levene) to 
2098         use the new multipass_split_... mechanism.
2099
2100 Wed Mar 31 22:36:22 2004  Ben Pfaff  <blp@gnu.org>
2101
2102         * frequencies.q: (calc_stats) Use moments data structure and
2103         calc_seskew(), calc_sekurt() functions.
2104
2105         * set.q main.c settings.h Added support for --syntax and --algorithm 
2106         options
2107
2108 Tue Mar 30 22:04:19 2004  Ben Pfaff  <blp@gnu.org>
2109
2110         * vfm.c: Had to get last call to multipass_split_output() inside
2111         open_active_file()/close_active_file() pairing, so introduce new
2112         function.
2113         (internal_procedure) Move procedure() code here, except for calls
2114         to open_active_file() and close_active_file().
2115         (procedure) Wrap open_active_file() and close_active_file() around
2116         internal_procedure().
2117         (multipass_procedure_with_splits) Wrap open_active_file() and
2118         close_active_file() around internal_procedure().
2119
2120 Tue Mar 30 22:01:57 2004  Ben Pfaff  <blp@gnu.org>
2121
2122         * descript.c: (cmd_descriptives) Free `vars' to avoid memory leak.
2123
2124 Mon Mar 29 16:26:40 2004  Ben Pfaff  <blp@gnu.org>
2125
2126         * debug.c: Removed.  Moved cmd_debug_evaluate() into expr-evl.c.
2127
2128         * expr-evl.c: (cmd_debug_evaluate) Moved here from debug.c.
2129
2130 Mon Mar 29 16:03:08 2004  Ben Pfaff  <blp@gnu.org>
2131
2132         * algorithm.c: By default turn off some of the more expensive
2133         assertions.
2134         (expensive_assert) New macro which expands to assert if
2135         EXTRA_CHECKS is defined, to nothing otherwise.
2136         (unique) Use expensive_assert().
2137         (binary_search) Ditto.
2138         (push_heap) Ditto.
2139         (pop_heap) Ditto.
2140         (make_heap) Ditto.
2141         (sort_heap) Ditto.
2142
2143         * command.c: (conflicting_3char_prefixes) Words that are the same
2144         don't cause conflicts when they are abbreviated to the first three
2145         letters.
2146
2147         * expr-evl.c: (CONCAT_func) Fix memory leak by incrementing struct
2148         nonterm_node's n earlier.
2149         (generic_str_func) Ditto.
2150         
2151 Mon Mar 29 15:32:17 2004  Ben Pfaff  <blp@gnu.org>
2152
2153         Add support for multipass procedures.  Rewrite DESCRIPTIVES to
2154         test multipass support, take advantage of new moments
2155         calculation, and to not be such crappy code.  Get rid of q2c
2156         processing for DESCRIPTIVES.
2157
2158         * vfm.c: (struct multipass_split_aux_data) New structure.
2159         (multipass_procedure_with_splits) New function.
2160         (multipass_split_callback) New function.
2161         (multipass_split_output) New function.
2162         * descript.q: Removed.
2163
2164         * descript.c: New file.
2165
2166         * var.h: Removed descriptives enums.
2167         (struct descriptives_proc) Removed.
2168         (struct variable) Removed p.dsc.
2169
2170         * Makefile.am: (q_sources_c) Remove descript.c.
2171         (q_sources_q) Removed descript.q.
2172         
2173 Mon Mar 29 15:31:55 2004  Ben Pfaff  <blp@gnu.org>
2174
2175         New manager for keeping track of used workspace.
2176         
2177         * workspace.c: New file.
2178
2179         * workspace.h: New file.
2180
2181         * Makefile.am: (pspp_SOURCES) Add workspace.c, workspace.h.
2182
2183         * sort.c: (do_internal_sort) Use workspace_malloc().
2184         (destroy_internal_sort) Use workspace_free().
2185
2186 Mon Mar 29 15:31:08 2004  Ben Pfaff  <blp@gnu.org>
2187
2188         New `struct casefile' for managing sets of cases.
2189
2190         * casefile.c: New file.
2191
2192         * casefile.h: New file.
2193
2194         * command.def: Add DEBUG CASEFILE command.
2195
2196         * Makefile.am: (pspp_SOURCES) Add casefile.c, casefile.h.
2197
2198         * sort.c: (sort_cases) Move logic for sending storage file to disk
2199         into do_external_sort().
2200         (struct internal_sort) Use an array of ccase pointers instead of a
2201         case_list.
2202         (do_internal_sort) Rewrite to handle casefiles.
2203         (compare_case_list) Removed.
2204         (compare_cases) New function.
2205         (compare_case_dblptrs) New function.
2206         (read_internal_sort_output) Deal with new struct internal_sort.
2207
2208         * vfm.c: (static var workspace_overflow) Removed.
2209         (struct storage_stream_info) Removed all the members.  Added
2210         struct casefile * member.
2211         (storage_sink_open) Use casefile.
2212         (open_storage_file) Removed.
2213         (write_storage_file) Removed.
2214         (storage_to_disk) Removed.
2215         (destroy_storage_stream_info) Use casefile.
2216         (storage_sink_write) Use casefile.
2217         (storage_sink_make_source) Use casefile.
2218         (storage_source_count) Use casefile.
2219         (storage_source_read) Use casefile.
2220         (storage_source_on_disk) Removed.
2221         (storage_source_get_cases) Removed.
2222         (storage_source_set_cases) Removed.
2223         (storage_source_get_casefile) New function.
2224         
2225 Mon Mar 29 15:30:09 2004  Ben Pfaff  <blp@gnu.org>
2226
2227         New `struct moments' for calculating moments.
2228
2229         * stats.c: Removed.
2230
2231         * stats.h: Removed.
2232
2233         * moments.c: New file.
2234
2235         * moments.h: New file.
2236
2237         * command.def: Add DEBUG MOMENTS command.
2238
2239         * Makefile.am: (pspp_SOURCES) Add moments.c, moments.h.  Remove
2240         stats.c, stats.h.
2241
2242         * aggregate.c: Modify AGGREGATE to use the new moments
2243         calculation, even if not in such a great way.
2244         (struct agr_var) Add `moments' member.
2245         (parse_aggregate_functions) Set `moments' member to null.
2246         (agr_destroy) Destroy `moments' member.
2247         (accumulate_aggregate_info) Use `moments' for standard deviation.
2248         (dump_aggregate_info) Ditto.
2249         (initialize_aggregate_info) Create or clear `moments'.
2250
2251         * misc.h: Add pow2(), pow3(), pow4() functions in place of sqr(),
2252         cube(), pow4() that were in stats.h.  All references updated.
2253
2254         * crosstabs.q: stats.h had chi-square significance functions.  Use
2255         GSL instead.
2256         (display_chisq) Use gsl_cdf_chisq_Q() instead of chisq_sig().
2257
2258         * expr-evl.c: (expr_evaluate) Use moments_of_values() for
2259         OP_CFVAR, OP_MEAN, OP_SD, OP_VARIANCE.
2260                 
2261 Fri Mar 26 14:21:23 2004  Ben Pfaff  <blp@gnu.org>
2262
2263         * dictionary.c: (dict_compact_values) Compacted values need to
2264         start off from 0.
2265
2266 Fri Mar 26 00:54:57 2004  Ben Pfaff  <blp@gnu.org>
2267
2268         * var-labs.c: (cmd_variable_labels) For compatibility, don't allow
2269         `/' at start.  Check return value of parse_variables() for error
2270         return.
2271
2272 Fri Mar 26 00:19:27 2004  Ben Pfaff  <blp@gnu.org>
2273
2274         Revamp expressions: make the code a little nicer, and fix bugs
2275         found in testing.
2276         
2277         * expr-evl.c: (expr_evaluate) Make expression argument const.
2278         Support OP_ADD, OP_SUB, OP_MUL, OP_DIV instead of OP_PLUS, OP_MUL.
2279         OP_POW is missing for arg 2 <= 0.  OP_LOG is natural log, not
2280         base-10 log.  Fix OP_ANY, OP_ANY_STRING, OP_RANGE, OP_RANGE_STRING
2281         off-by-ones.  Add OP_MAX_STRING, OP_MIN_STRING.  Fix OP_TIME_HMS,
2282         OP_DATE_WKYR boundary conditions.  Add OP_CTIME_DAYS,
2283         OP_CTIME_HOURS, OP_CTIME_MINUTES, OP_CTIME_DAYS, OP_CTIME_SECONDS.
2284         Support OP_INDEX_2, OP_INDEX_3, OP_RINDEX_2, OP_RINDEX_3 instead
2285         of OP_INDEX, OP_INDEX_OPT, OP_RINDEX, OP_RINDEX_OPT.  Merge
2286         OP_LPAD_OPT into OP_LPAD, OP_RPAD_OPT into OP_RPAD, OP_LTRIM_OPT
2287         into OP_LTRIM, OP_RTRIM_OPT into OP_RTRIM, OP_NUMBER_OPT into
2288         OP_NUMBER.  Fix OP_RTRIM fragility.  Support OP_SUBSTR_2,
2289         OP_SUBSTR_3 instead of OP_SUBSTR, OP_SUBSTR_OPT.  Remove OP_INV.
2290         Simplify OP_SYSMIS.  Remove OP_STR_MIS.
2291
2292         * expr-opt.c: (optimize_expression) Rewrite.
2293         (macro n0) Removed.
2294         (macro n1) Removed.
2295         (macro n2) Removed.
2296         (macro s0) Removed.
2297         (macro s0l) Removed.
2298         (macro s1) Removed.
2299         (macro s1l) Removed.
2300         (macro s2) Removed.
2301         (macro s2l) Removed.
2302         (macro s) Removed.
2303         (macro sl) Removed.
2304         (eq_num_con) New function.
2305         (optimize_tree) New function.
2306         (macro rnc) Removed.
2307         (macro frnc) Removed.
2308         (str_search) Add const to string params.
2309         (str_rsearch) Ditto.
2310         (evaluate_tree_no_missing) Renamed from evaluate_tree.  Add num[],
2311         str[], str_len[] locals to substitute for most of removed macros.
2312         Support OP_ADD, OP_SUB, OP_MUL, OP_DIV instead of OP_PLUS, OP_MUL.
2313         Removed support for missing values because we're never called with
2314         missing values.  Use set_number() or set_number_errno() instead of
2315         rnc or frnc.  Removed any stuff that caused trouble in testing.
2316         We can re-add it later if it really slows anything.  Fix some
2317         random problems.
2318         (evaluate_tree_with_missing) Not yet supported.  To be added later
2319         if it's important.
2320         (repl_num_con) Removed.
2321         (collapse_node) New function.
2322         (force_repl_num_con) Removed.
2323         (set_number) New function.
2324         (set_number_errno) New function.
2325         (repl_str_con) Removed.
2326         (set_string) New function.
2327         (yrmoda) Tighten boundary conditions.  Adopt 2030 cut-off for
2328         2-digit years.
2329         (dump_node) No special case for OP_AND, OP_OR.
2330
2331         * expr-prs.c: (expr_prs) Honor EXPR_NO_OPTIMIZE bit.  Rewrite.
2332         (expr_get_type) New function.
2333         (type_check) Rewrite.
2334         (type_coercion) New function.
2335         (struct operator) New structure.
2336         (match_operator New function.
2337         (parse_binary_operators) New function.
2338         (parse_inverting_unary_operator) New function.
2339         (parse_or) Rewritten.
2340         (parse_and) Rewritten.
2341         (parse_not) Rewritten.
2342         (parse_rel) Rewritten.
2343         (parse_add) Rewritten.
2344         (parse_mul) Rewritten.
2345         (parse_neg) Rewritten.
2346         (parse_exp) Rewritten.
2347         (parse_sysvar) Add $TRUE, $FALSE system variables.
2348         Get $LENGTH, $WIDTH from get_viewlength(), get_viewwidth().
2349         (parse_primary) Use allocate_var_node(), allocate_num_con(),
2350         allocate_str_con().
2351         (struct function) Remove desc, change `func' prototype.
2352         (unary_func) Remove special cases.
2353         (MISSING_func) Reduce to unary_func() that just returns a boolean.
2354         (SYSMIS_func) Handle SYSMIS((x)) like SYSMIS(x).
2355         (VALUE_func) Use allocate_var_node().
2356         (nary_num_func) Allow MIN and MAX for strings.
2357         Use allocate_var_node().  Properly clean up.
2358         Fix return type.
2359         (generic_str_func) Use local table instead of removed `desc'
2360         member.  Mostly rewrite.
2361         (get_num_args) Revise error message.
2362         (parse_function) Return EXPR_ERROR, not 0 on error.
2363         (macro op) Removed.
2364         (macro varies) Removed.
2365         (ops[]) Use expr.def.
2366         (free_node) Do nothing if node is null.
2367         (allocate_num_con) New function.
2368         (allocate_str_con) New function.
2369         (allocate_var_node) New function.
2370         (allocate_binary_nonterminal) New function.
2371         (append_nonterminal_arg) Removed.
2372         (static var func_tab[]) Revised.
2373         (expr_debug_print_postfix) Make parameter const.
2374         Use printf() instead of debug_printf().
2375
2376         * expr.def: New file.
2377         
2378         * expr.h: Change PXP_* to EXPR_*, all references updated.  Also
2379         use named enum instead of unnamed, all references updated.  Add
2380         EXPR_ANY, EXPR_NO_OPTIMIZE.
2381
2382         * exprP.h: Remove EX_*.  Add DEFINE_OPERATOR.  Use expr.def
2383         instead of defining OP_* directly.
2384         (macro IS_TERMINAL) New macro.
2385         (macro IS_NONTERMINAL) New macro.
2386         (enum OP_NO_FLAGS) New.
2387         
2388 Fri Mar 26 00:18:01 2004  Ben Pfaff  <blp@gnu.org>
2389
2390         * error.c: (err_assert_fail) msg variable needs to be non-const.
2391
2392 Fri Mar 26 00:17:24 2004  Ben Pfaff  <blp@gnu.org>
2393
2394         * debug.c: (cmd_debug_evaluate) Rewrite.
2395
2396 Fri Mar 26 00:15:13 2004  Ben Pfaff  <blp@gnu.org>
2397
2398         Fix some CROSSTABS bit rot stupidity.
2399
2400         * crosstabs.q: Reorder the CELLS subcommands for compatibility.
2401         (internal_cmd_crosstabs) Initializes cells[] correctly.
2402         (float_M_suffix) Rename format_cell_entry(), change prototype,
2403         rewrite.
2404         (display_crosstabulation) Fix cell formatting.
2405
2406 Fri Mar 26 00:14:09 2004  Ben Pfaff  <blp@gnu.org>
2407
2408         Make lex_rest_of_line(), lex_entire_end() not discard lines.  Have
2409         to call lex_discard_line() to do that.
2410
2411         * command.c: (run_command) Call lex_discard_line() after
2412         lex_rest_of_line().
2413
2414         * lexer.c: (lex_entire_end) Change behavior.
2415         (lex_rest_of_line) Change behavior.  Return const char *.
2416         (lex_discard_line) Don't clear getl_buf, don't emit message.
2417
2418         * main.c: (handle_error) Emit message here.
2419
2420         * repeat.c: (internal_cmd_do_repeat) Use lex_discard_line()
2421         instead of lex_entire_line().
2422
2423         * str.c: (mm_find_reverse) Make length params size_t.  Rewrite.
2424
2425         * title.c: (get_title) Call lex_discard_line() after
2426         lex_rest_of_line().
2427         (cmd_file_label) Ditto.
2428         (cmd_document) Deal with const char * return value.
2429
2430 Fri Mar 26 00:10:16 2004  Ben Pfaff  <blp@gnu.org>
2431
2432         Removed REMARK command.
2433
2434         * command.c: (extract_prefix) Removed.
2435         (output_line) Removed.
2436         (cmd_remark) Removed.
2437
2438         * command.def: Remove REMARK.
2439
2440 Fri Mar 26 00:08:38 2004  Ben Pfaff  <blp@gnu.org>
2441
2442         Added abort() after lots of assert(0) invocations to avoid some
2443         compiler warnings.  We really need a NOT_REACHED macro.
2444
2445 Tue Mar 23 08:00:42 WAST 2004 John Darrington <john@darrington.wattle.id.au>
2446
2447         * sort.c: Added missing call to temp_file_close.  Changed error 
2448         messages to warnings.
2449
2450         * set.q: Improved setting of set_view{length,width} to be more tolerant
2451         of buggy OSes.
2452
2453 Sun Mar 21 10:11:14 WST 2004 John Darrington <john@darrington.wattle.id.au>
2454
2455         * val-labs.c: Fixed a bug where PSPP would crash, if VALUE LABELS was
2456         used with incorrect syntax.
2457
2458         * error.c, error.h et al:  Overridden definition of assert for a
2459         custom one.
2460
2461         * test-q.c: Fixed a buglet where it would crash if no /VARIABLES
2462         subcommand was given when it ought to have been.
2463
2464 Sat Mar 20 22:19:08 2004  Ben Pfaff  <blp@gnu.org>
2465
2466         * tab.c: (tab_vline) Fix assertions to respect row_ofs and
2467         col_ofs.
2468         (tab_hline) Ditto.
2469         (tab_box) Ditto.
2470         (tab_joint_text) Ditto.
2471
2472 Sat Mar 20 17:57:23 2004  Ben Pfaff  <blp@gnu.org>
2473
2474         * levene.c: Add #include.
2475
2476         * set.q: (set_viewport) Add `int' argument to make its prototype
2477         correct for signal().
2478
2479 Sat Mar 20 15:35:17 2004  Ben Pfaff  <blp@gnu.org>
2480
2481         * expr-evl.c: (expr_evaluate) Assert that `c' is nonzero before
2482         using it.
2483
2484 Sat Mar 20 15:18:16 2004  Ben Pfaff  <blp@gnu.org>
2485
2486         Changed DFM from open-at-first-access to explicit-open.  Before,
2487         calling dfm_get_record() or dfm_put_record() would automatically
2488         open the file.  Now, you have to call dfm_open_for_reading() or
2489         dfm_open_for_writing() explicitly.  This makes it possible to
2490         check permissions, file existence, etc. earlier.
2491
2492         Also made struct file_handle more opaque, and clean up in general.
2493
2494         * data-list.c: (cmd_data_list) Open handle for reading.
2495
2496         * dfm.c: (struct dfm_fhuser_ext) Add `where', `saw_begin_data'
2497         members.
2498         (open_file_r) Renamed dfm_open_for_reading(), rewrote.
2499         (open_file_w) Renamed dfm_open_for_writing(), rewrote.
2500         (open_inline_file) Removed.
2501         (read_record) For inline_file, if we haven't seen BEGIN DATA, read
2502         it.  Deal with line_number in extension record instead of file
2503         handle.
2504         (dfm_get_record) Rewrote.
2505         (dfm_put_record) Rewrote.
2506         (dfm_push) Assert file is open and one of ours.  Deal with
2507         line_number in extension record instead of file handle.
2508         (dfm_pop) Assert file is open and one of ours.  Deal with
2509         line_number in extension record instead of file handle.
2510         (cmd_begin_data) Use dfm_open_for_reading().  Mark that we saw
2511         BEGIN DATA.     
2512
2513         * file-handle.h: (enum constants RH_RF_*) Removed.
2514         (enum constants FH_MD_*) Removed.
2515         (struct file_handle) Removed `name', `norm_fn', `fn', `where',
2516         `recform', `lrecl', `mode' members.  Public references to
2517         `recform' changed to use handle_get_mode(), references to `lrecl'
2518         changed to use handle_get_record_width().  Added `private' member.
2519         (enum file_handle_mode) New.
2520
2521         * file-handle.q: (struct private_file_handle) New structure.
2522         (struct file_handle_list) New structure.
2523         (static var files) New.
2524         (static var file_handles) Removed.
2525         (init_file_handle) Removed.
2526         (create_file_handle) Removed.
2527         (get_handle_with_name) New function.
2528         (get_handle_for_filename) New function.
2529         (cmd_file_handle) Rewritten.
2530         (hash_file_handle) Removed.
2531         (cmp_file_handle) Removed.
2532         (fh_init_files) Rewritten.
2533         (fh_parse_file_handle) Rewritten.  Allows identifiers as
2534         filenames.
2535         (fh_get_handle_by_name) Renamed handle_get_name(), all references
2536         updated.  Rewritten.
2537         (fh_get_handle_by_filename) Renamed handle_get_filename(), all
2538         references updated.  Rewritten.
2539         (fh_record_width) Renamed handle_get_record_width(), all
2540         references updated.  Rewritten.
2541         (handle_get_mode) New function.
2542
2543         * file-type.c: (cmd_file_type) Open handle for reading.
2544
2545         * filename.c: [unix] (struct file_identity) New structure.
2546         [unix] (fn_get_identity) New function.
2547         [unix] (fn_free_identity) New function.
2548         [unix] (fn_compare_file_identities) New function.
2549         [!unix] (struct file_identity) New structure.
2550         [!unix] (fn_get_identity) New function.
2551         [!unix] (fn_free_identity) New function.
2552         [!unix] (fn_compare_file_identities) New function.
2553
2554         * lexer.c: (static var put) Renamed put_token, all references
2555         updated.
2556         (static var put_tokstr) New.
2557         (static var put_tokval) New.
2558         (lex_init) Initialize put_tokstr().
2559         (restore_token) New function.
2560         (save_token) New function.
2561         (lex_get) Use restore_token().
2562         (lex_put_back) Use save_token().
2563         (lex_put_back_id) New function.
2564         (lex_put_forward) Removed.
2565         (lex_preprocess_line) Set put_token instead of using
2566         lex_put_forward().
2567         (lex_negative_to_dash) Use save_token(), set put_token directly.
2568         (dump_token) Use stderr instead of stdout.
2569
2570         * main.c: (main) Remove call to cmd_init().
2571         
2572         * matrix-data.c: (cmd_matrix_data) Open file for reading.
2573
2574         * pfm-read.c: Use handle_get_filename() instead of trying to use
2575         h->fn directly, all over.
2576
2577         * pfm-write.c: Ditto.
2578
2579         * print.c: (internal_cmd_print) Open handle for writing.
2580         (dump_table) Use handle_get_filename().
2581         (print_trns_proc) Use handle_get_mode().
2582         (cmd_print_space) Use fh_parse_file_handle().
2583         Open handle for writing.
2584         [0] (debug_print) Removed.
2585
2586         * sfm-read.c: Use handle_get_filename() instead of trying to use
2587         h->fn directly, all over.
2588
2589         * sfm-write.c: Ditto.
2590
2591 Sat Mar 20 14:35:48 2004  Ben Pfaff  <blp@gnu.org>
2592
2593         Fix memory leaks.
2594         
2595         * autorecode.c: (arc_free) Free arc->src_values.
2596
2597         * error.c: (msg) Free buf.
2598
2599         * val-labs.c: (do_value_labels) Always free vars.
2600
2601         * vfm.c: (close_active_file) If sink has no make_source then call
2602         its destroy function.
2603
2604 Sat Mar 20 14:00:24 2004  Ben Pfaff  <blp@gnu.org>
2605
2606         Fixed cmd_parse() so that it always skips past a full command
2607         name.  A few special commands for which this would be bad get
2608         special treatment.  This lets us drop code for skipping past the
2609         end of a command name in most cmd_*() functions.  It's not worth
2610         listing all the commands affected.
2611
2612         * command.c: (struct command) Remove `cmd' member, replace by
2613         `name' member, all references updated.  Remove `word', `next',
2614         `skip_entire_name' members.
2615         (macro DEFCMD) Deal with revised `struct command'.
2616         (macro UNIMPL) Ditto.
2617         (macro SPCCMD) New macro for commands whose last word shouldn't be
2618         skipped.
2619         (static array cmd_table[]) Make const, rename `commands', remove
2620         sentinel element.
2621         (macro COMMAND_CNT) New macro.
2622         (split_words) Removed.
2623         (cmd_init) Removed.
2624         (FILE_TYPE_okay) Make parameter const.
2625         (cmd_parse) Improve error messages.
2626         (match_strings) New function.
2627         (next_word) New function.
2628         (enum command_match) New enum.
2629         (conflicting_3char_prefixes) New function.
2630         (conflicting_3char_prefix_command) New function.
2631         (cmd_match_words) New function.
2632         (count_matching_commands) New function.
2633         (get_command_name) New function.
2634         (free_words) New function.
2635         (unknown_command_error) New function.
2636         (figure_out_command) Renamed parse_command_name(), rewritten.
2637
2638         * command.def: Removed @ command.  Marked BEGIN DATA, DOCUMENT,
2639         FILE LABEL, REMARK, SUBTITLE, TITLE as special.  Renamed EVALUATE
2640         to DEBUG EVALUATE.  Added N alias for N OF CASES, SORT alias for
2641         SORT CASES.
2642
2643         * command.h: (macro SPCCMD) New.
2644
2645         * include.c: (cmd_include_at) Removed.
2646         (cmd_include) Allow identifier to be used as filename.
2647
2648         * inpt-pgm.c: (cmd_reread) Use fh_parse_file_handle().
2649
2650         * t-test.q: (cmd_t_test) Command name is now parsed for us.
2651         
2652
2653 Sat Mar 20 13:56:00 2004  Ben Pfaff  <blp@gnu.org>
2654
2655         Start work on better test framework.
2656         
2657         * Makefile.am: (pspp_sources) Add debug.c.
2658         
2659         * debug.c: New file.
2660
2661         * compute.c: (cmd_evaluate) Moved to debug.c, renamed
2662         cmd_debug_evaluate().
2663
2664         * expr-prs.c: (expr_parse) Remove PXP_DUMP support.
2665
2666         * expr.h: (enum constant PXP_DUMP) Removed.
2667
2668 Sat Mar 20 00:05:42 WST 2004 John Darrington <john@darrington.wattle.id.au>
2669
2670         * set.q:  Implemented the SHOW command, and synced it to the existing 
2671         SET cmd.
2672
2673         Added a handler for SIGWINCH so that viewlength and viewwidth follow
2674         changes as the window size is changed.
2675
2676         Added fallback to set viewlength and viewwidth from LINES and COLUMS
2677         environment variables if other methods are not available.
2678
2679         glob.c: Removed a lot of global variables from glob.c and encapsulated 
2680         them in set.q
2681
2682         random.c: Tidied up the way the random seed is set.
2683
2684         str.c: Added a ds_vprintf function.
2685
2686         error.c: Extended dump_message so that messages are always broken at
2687         '\n' characters.
2688         
2689 Thu Mar 18 11:07:14 2004  Ben Pfaff  <blp@gnu.org>
2690
2691         * pfm-write.c: (bufwrite) Write out the correct element for string
2692         variables.  From Andreas Streichardt <streichardt@globalpark.de>.
2693
2694 Mon Mar 15 20:48:03 2004  Ben Pfaff  <blp@gnu.org>
2695
2696         Get rid of static and global (!) vars in matrix-data.c.
2697
2698         * matrix-data.c: (static var nr_data) Removed.
2699         (static var nr_factor_values) Removed.
2700         (static var max_cell_index) Removed.
2701         (static var split_values) Removed.
2702         (struct nr_aux_data) New structure.
2703         (read_matrices_without_rowtype) Use a local struct nr_aux_data in
2704         place of static vars, pass to create_case_source() and procedure()
2705         as aux data.
2706         (nr_read_data_lines) Use struct nr_aux_data * parameter instead of
2707         struct matrix_data_pgm *.
2708         (nr_read_splits) Ditto.
2709         (nr_read_factors) Ditto.
2710         (nr_output_data) Ditto.
2711         (static var wr_content) Removed.
2712         (global var wr_data) Removed.
2713         (global var wr_current) Removed.
2714         (struct wr_aux_data) New structure.
2715         (read_matrices_with_rowtype) Use a local struct wr_aux_data in
2716         place of static vars, pass to create_case_source() and procedure()
2717         as aux data.
2718         (matrix_data_read_with_rowtype) Use struct wr_aux_data * parameter
2719         instead of matrix_data_pgm *.
2720         (wr_read_splits) Ditto.
2721         (wr_output_data) Ditto.
2722         (wr_read_rowtype) Ditto.
2723         (wr_read_factors) Ditto.
2724         (wr_read_indeps) Ditto.
2725         
2726 Mon Mar 15 20:07:29 2004  Ben Pfaff  <blp@gnu.org>
2727
2728         Get rid of static vars in autorecode.c.
2729
2730         * autorecode.c: (struct autorecode_trns) Rename `arc' to `specs',
2731         `n_arc' to `spec_cnt'.  All references updated.
2732         (static var v_src) Removed.
2733         (static var v_dest) Removed.
2734         (static var h_trns) Removed.
2735         (static var nv_src) Removed.
2736         (static var descend) Removed.
2737         (static var print) Removed.
2738         (enum direction) New enum.
2739         (struct autorecode_pgm) New structure.
2740         (cmd_autorecode) Use struct autorecode_pgm instead of static vars.
2741         Move n_dest local var into struct autorecode_pgm for ease of
2742         clean-up.  Use arc_free().
2743         (arc_free) New function.
2744         (recode) Modify to take struct autorecode_pgm * parameter instead
2745         of using statics.  Let the caller clean up.
2746         (autorecode_proc_func) Use struct autorecode_pgm * auxiliary data
2747         instead of statics.  Rearrange code a little.
2748
2749 Mon Mar 15 00:25:02 2004  Ben Pfaff  <blp@gnu.org>
2750
2751         Get rid of static, global vars in recode.c.  Remove debug code.
2752
2753         * recode.c: (static var head) Removed.
2754         (global var v) Removed.
2755         (global var nv) Removed.
2756         (cmd_recode) New local variables head, v, nv.  Initialize and free
2757         v.  Don't call debug_print().
2758         [DEBUGGING] (dump_dest) Removed.
2759         [DEBUGGING] (debug_print) Removed.
2760
2761 Mon Mar 15 00:14:49 2004  Ben Pfaff  <blp@gnu.org>
2762
2763         Get rid of static vars in expr-opt.c.
2764
2765         * expr-opt.c: (static var e) Removed.
2766         (static var nop) Removed.
2767         (static var mop) Removed.
2768         (static var ndbl) Removed.
2769         (static var mdbl) Removed.
2770         (static var nstr) Removed.
2771         (static var mstr) Removed.
2772         (static var nvars) Removed.
2773         (static var mvars) Removed.
2774         (struct expr_dump_state) New structure.
2775         (dump_expression) Use new struct expr_dump_state instead of static
2776         vars and pass to functions we call.
2777         (dump_node) Use struct expr_dump_state * parameter.
2778         (emit) Ditto.
2779         (emit_num_con) Ditto.
2780         (emit_str_con) Ditto.
2781         (emit_var) Ditto.
2782         
2783 Mon Mar 15 00:03:51 2004  Ben Pfaff  <blp@gnu.org>
2784
2785         Get rid of static var in COUNT.
2786
2787         * count.c: (static var head) Move into cmd_count().
2788         (cmd_count) [DEBUGGING] Don't call debug_print.
2789         [DEBUGGING] (debug_print) Removed.
2790
2791 Sun Mar 14 23:56:09 2004  Ben Pfaff  <blp@gnu.org>
2792
2793         Get rid of static vars in VALUE LABELS, ADD VALUE LABELS.
2794
2795         * val-labs.c: (static var v) Removed.
2796         (static var nv) Removed.
2797         [DEBUGGING] (debug_print) Removed.
2798         (verify_val_labs) Add struct variable **, int parameters.
2799         (get_label) Ditto.  Improve error messages, streamline.
2800         (erase_labels) New function for erasing value labels, taking over
2801         part of verify_val_labs()'s function.
2802         (init) Removed.
2803         (done) Removed.
2804         (cmd_value_labels) No need to call init() or done() anymore.
2805         (cmd_add_value_labels) Ditto.
2806         (do_value_labels) Add vars, var_cnt local variables.  Clean up
2807         after them internally.  Call erase_labels() if we should.  Don't
2808         call debug_print().
2809
2810 Sun Mar 14 23:33:53 2004  Ben Pfaff  <blp@gnu.org>
2811
2812         Get rid of static vars in MATCH FILES.
2813         
2814         * get.c: (static var mtf_head) Removed.
2815         (static var mtf_tail) Removed.
2816         (static var mtf_by) Removed.
2817         (static var mtf_n_by) Removed.
2818         (static var mtf_master) Removed.
2819         (static var mtf_seq_num) Removed.
2820         (static var mtf_seq_nums) Removed.
2821         (static var mtf_sink) Removed.
2822         (static var mtf_case) Removed.
2823         (struct mtf_proc) New structure.
2824         (cmd_match_files) Use struct mtf_proc instead of static vars.
2825         (mtf_processing_finish) Ditto.
2826         (mtf_free) Ditto.
2827         (mtf_delete_file_in_place) Ditto.
2828         (mtf_read_nonactive_records) Ditto.
2829         (mtf_compare_BY_values) Ditto.
2830         (mtf_processing) Ditto.
2831         (mtf_merge_dictionary) Ditto.
2832
2833 Sun Mar 14 22:48:12 2004  Ben Pfaff  <blp@gnu.org>
2834
2835         * command.def: Add CASESTOVARS, VARSTOCASES unimplemented commands.
2836
2837         * dictionary.c: (dict_rename_var) Add assertion.
2838         (dict_contains_var) Check by index instead of name.
2839
2840 Sun Mar 14 22:01:02 2004  Ben Pfaff  <blp@gnu.org>
2841
2842         Get rid of compaction_necessary, compaction_nval, compaction_case.
2843         Redo VFM interface.  Replace disk_sink and memory_sink by
2844         storage_sink, disk_source and memory_source by storage_source.
2845
2846         * vfm.h: (struct case_sink) Add `dict', `idx_to_fv', `value_cnt'
2847         members.
2848
2849         * vfm.c: 
2850         (struct write_case_data) Remove `begin_func', `end_func',
2851         `func_aux' members.  Add `aux', `trns_case', `sink_case',
2852         `cases_written', `cases_analyzed' members.
2853         (global var compaction_necessary) Make static.
2854         (global var compaction_nval) Removed.
2855         (global var compaction_case) Removed.
2856         (static var case_count) Removed.
2857         (struct procedure_aux_data) Removed.
2858         (struct split_aux_data) Removed.
2859         (procedure) Remove begin_func, end_func parameters.  Rewrite.
2860         (static var not_canceled) Removed.
2861         (process_active_file) Removed.
2862         (process_active_file_write_case) Removed.
2863         (process_active_file_output_case) Removed.
2864         (prepare_for_writing) Moved into open_active_file().
2865         (arrange_compaction) Ditto.
2866         (setup_lag) Ditto.
2867         (open_active_file) Rewrote.
2868         (write_case) New function.
2869         [DEBUGGING] (index_to_varname) Removed.
2870         (execute_transformations) New function.
2871         (exclude_this_case) Renamed filter_case(), changed interface.
2872         (clear_case) Added struct ccase * parameter to interface.
2873         (close_active_file) Added struct write_case_data * parameter,
2874         rewrote.
2875         (disk_sink_create) Removed.
2876         (disk_sink_destroy) Removed.
2877         (disk_sink_make_source) Removed.
2878         (disk_sink_write) Removed.
2879         (disk_source_count) Removed.
2880         (disk_source_destroy) Removed.
2881         (disk_source_read) Removed.
2882         (global var disk_sink_class) Removed.
2883         (global var disk_source_class) Removed.
2884         (global var memory_sink_class) Removed.
2885         (global var memory_source_class) Removed.
2886         (memory_sink_create) Removed.
2887         (memory_sink_destroy) Removed.
2888         (memory_sink_make_source) Removed.
2889         (memory_sink_write) Removed.
2890         (memory_source_count) Removed.
2891         (memory_source_destroy) Removed.
2892         (memory_source_get_cases) Removed.
2893         (memory_source_read) Removed.
2894         (memory_source_set_cases) Removed.
2895         (struct disk_stream_info) Removed.
2896         (struct memory_sink_info) Removed.
2897         (struct memory_source_info) Removed.
2898         (write_active_file_to_disk) Removed.
2899         (destroy_storage_stream_info) New function.
2900         (global var null_sink_class) New var.
2901         (global var storage_sink_class) New var.
2902         (global var storage_source_class) New var.
2903         (open_storage_file) New function.
2904         (storage_sink_destroy) New function.
2905         (storage_sink_make_source) New function.
2906         (storage_sink_open) New function.
2907         (storage_sink_write) New function.
2908         (storage_source_count) New function.
2909         (storage_source_destroy) New function.
2910         (storage_source_get_cases) New function.
2911         (storage_source_on_disk) New function.
2912         (storage_source_read) New function.
2913         (storage_source_set_cases) New function.
2914         (storage_source_to_disk) New function.
2915         (storage_to_disk) New function.
2916         (struct storage_stream_info) New structure.
2917         (write_storage_file) New function.
2918         (procedure_write_case) Removed.
2919         (create_case_source) Add `struct dictionary *' parameter, all
2920         references updated.
2921         (create_case_sink) Ditto.
2922         (free_case_sink) New function.
2923         (struct split_aux_data) New structure.
2924         (procedure_with_splits) New function implementing what procedure()
2925         used to.
2926         (SPLIT_FILE_proc_func) Removed.
2927         (procedure_with_splits_callback) New function.
2928         (equal_splits) New function.
2929         
2930         * aggregate.c: Pass around a struct instead of using statics.
2931         (static var outfile) Remove.
2932         (enum type) Give it tag `missing_treatment'.
2933         (static var missing) Remove.
2934         (static var sort) Remove.
2935         (static var agr_first) Remove.
2936         (static var agr_next) Remove.
2937         (static var case_count) Remove.
2938         (static var prev_case) Remove.
2939         (static var buf64_1xx) Remove.
2940         (static var buf_1xx) Remove.
2941         (struct agr_proc) New structure incorporating the above.
2942         (cmd_aggregate) Use new struct.  Clean up error handling using
2943         agr_destroy().  Completely rewrite actual implementation of
2944         aggregation.
2945         (create_sysfile) Add struct agr_proc * parameter, modify
2946         accordingly.
2947         (parse_aggregate_functions) Ditto.
2948         (free_aggregate_functions) Ditto.  Rename agr_destroy().
2949         (aggregate_single_case) Add struct agr_proc * parameter, modify
2950         accordingly.
2951         (accumulate_aggregate_info) Ditto.
2952         (dump_aggregate_info) Ditto.
2953         (initialize_aggregate_info) Ditto.
2954         (agr_00x_trns_proc) Removed.
2955         (agr_00x_end_func) Removed.
2956         (agr_10x_trns_proc) Removed.
2957         (agr_10x_trns_free) Removed.
2958         (agr_10x_end_func) Removed.
2959         (agr_11x_read) Removed.
2960         (agr_11x_finish) Removed.
2961         [DEBUGGING] (debug_print) Removed.
2962         (write_case_to_sfm) Add struct agr_proc * parameter, modify
2963         accordingly.
2964         (agr_to_active_file) New function.
2965         (presorted_agr_to_sysfile) New function.
2966         (sort_agr_to_sysfile) New function.
2967
2968         * autorecode.c: (cmd_autorecode) Use procedure_with_splits().
2969
2970         * crosstabs.q: (internal_cmd_crosstabs) Ditto.
2971
2972         * descript.q: (cmd_descriptives) Ditto.
2973
2974         * dfm.c: (cmd_begin_data) Check for storage_source_class.  Adapt
2975         to new procedure() interface.
2976
2977         * command.c: (cmd_execute) Adapt to new procedure() interface.
2978
2979         * dictionary.c: (dict_compact_values) Also delete scratch
2980         variables.
2981         (dict_get_compacted_value_cnt) New function.
2982         (dict_get_compacted_idx_to_fv) New function.
2983
2984         * flip.c: (cmd_flip) Warn about and cancel TEMPORARY.
2985         (cmd_flip) Adapt to new procedure() interface.
2986         (flip_sink_write) Use sink->idx_to_fv.
2987
2988         * frequencies.q: (internal_cmd_frequencies) Use
2989         procedure_with_splits().
2990
2991         * get.c: (cmd_save_internal) Adapt to new procedure() interface.
2992         (static var mtf_sink) New static var.
2993         (static var mtf_case) New static var.
2994         (cmd_match_files) Warn about and cancel TEMPORARY.  Redo the way
2995         we actually implement the matching.
2996         (mtf_delete_file_in_place) Use mtf_case.
2997         (mtf_processing) Use mtf_case and mtf_sink.
2998         (cmd_export) Adapt to new procedure() interface.
2999
3000         * levene.c: (levene) Use procedure_with_splits().
3001
3002         * list.q: (cmd_list) Use procedure_with_splits().
3003
3004         * matrix-data.c: (read_matrices_without_rowtype) Adapt to new
3005         procedure() interface.
3006         (read_matrices_with_rowtype) Ditto.
3007
3008         * modify-vars.c; (cmd_modify_vars) Warn about and cancel
3009         TEMPORARY.  Adapt to new procedure() interface.
3010
3011         * rename-vars.c: Warn about and cancel TEMPORARY.
3012
3013         * sort.c: (cmd_sort_cases) Warn about TEMPORARY.
3014         (sort_cases) Use dict_get_compacted_value_cnt() instead of
3015         compaction_nval.  Adapt to new procedure() interface.  Use
3016         storage_source_to_disk().
3017         (do_internal_sort) Don't try to dump the cases to memory.
3018         (compare_case_lists) Pass null idx_to_fv.
3019         (struct initial_run_state) Add `idx_to_fv' member.  Remove
3020         `case_size' member.
3021         (write_initial_runs) Don't initialize irs->case_size.  Adapt to
3022         new procedure() interface.  Reset irs->idx_to_fv after calling
3023         procedure().
3024         (sort_sink_write) Set irs->idx_to_fv.  Use case_size from struct
3025         sort_cases_pgm.  Pass irs, not struct sort_cases_pgm to
3026         push_heap().
3027         (destroy_initial_run_state) Don't dereference irs after freeing
3028         it.
3029         (allocate_cases) Don't calculate case_size locally.
3030         (compare_record) Add idx_to_fv parameter.
3031         (compare_record_run) Change parameter from struct sort_cases_pgm *
3032         to struct initial_run_state *.  Pass irs->idx_to_fv to
3033         compare_record().
3034         (compare_record_run) Third parameter now a struct
3035         initial_run_state *.
3036         (output_record) No need for out_case anymore.  Pass irs, not
3037         struct sort_cases_pgm to pop_heap().  Use case_size from struct
3038         sort_cases_pgm.
3039         (merge) Use case_size from struct sort_cases_pgm.
3040         (merge_once) Use case_size from struct sort_cases_pgm.
3041         Pass null pointer to compare_record() as idx_to_fv.
3042         (global var sort_sink_class) Make static.
3043
3044         * t-test.q: (cmd_t_test) Use procedure_with_splits().
3045
3046         * temporary.c: Remove debugging crap.
3047
3048 Sat Mar 13 14:19:52 WST 2004 John Darrington <john@darrington.wattle.id.au>
3049
3050         * t-test.q, levene.c: Fixed up the handling of MISSING values
3051         int the T-TEST
3052
3053 Fri Mar 12 16:23:35 WST 2004 John Darrington <john@darrington.wattle.id.au>
3054
3055         * t-test.q, levene.c: Added support for T-TEST /GROUP where only 
3056         one value is given.
3057
3058 Wed Mar 10 23:25:13 2004  Ben Pfaff  <blp@gnu.org>
3059
3060         Change explicit variable name checks into use of
3061         dict_class_from_id().
3062
3063         * dictionary.c: (dict_create_var)  Change explicit variable name
3064         check into use of dict_class_from_id().
3065
3066         * get.c: (trim_dictionary) Ditto.
3067
3068         * sel-if.c: (cmd_filter) Ditto.
3069
3070         * sysfile-info.c: (cmd_display) Ditto.
3071
3072         * vars-prs.c: (parse_DATA_LIST_vars) Ditto.
3073
3074         * vfm.c: (arrange_compaction) Ditto.
3075
3076         * weight.c: (cmd_weight) Ditto.
3077
3078 Wed Mar 10 21:16:34 2004  Ben Pfaff  <blp@gnu.org>
3079
3080         * temporary.c: (cmd_temporary) When TEMPORARY was the first
3081         transformation following the input program, if any, for some
3082         reason we special-cased f_trns.  That's just wrong.  It should
3083         always be set to n_trns.
3084
3085 Tue Mar  9 23:44:40 2004  Ben Pfaff  <blp@gnu.org>
3086
3087         * format.c: (parse_format_specifier_name) Fix brown-bag bug
3088         introduced in last check-in.
3089
3090 Tue Mar  9 23:10:41 2004  Ben Pfaff  <blp@gnu.org>
3091
3092         * format.c: (global array translate_fmt[]) Removed.
3093         (translate_fmt) New function as replacement.
3094         (parse_format_specifier_name) Rewrite.
3095
3096         * pfm-read.c: (convert_format) Use translate_fmt() instead of
3097         translate_fmt[].
3098
3099         * sfm-read.c: (parse_format_spec) Ditto.
3100
3101         * postscript.c: (text) Fix handling of fonts with missing
3102         ligatures.
3103
3104         * sort.c: (struct external_sort) Add temp_name member.
3105         (destroy_external_sort) Free temp_dir, temp_name members.
3106         (init_external_sort) Allocate temp_name.
3107         (get_temp_file_name) Change prototype.
3108         (open_temp_file) Deal with change to get_temp_file_name().
3109         (close_temp_file) Ditto.
3110         (remove_temp_file) Ditto.
3111         (write_temp_file) Ditto.
3112         (read_temp_file) Ditto.
3113         (sort_sink_destroy) Removed.
3114         (sort_sink_class) Change destroy member to null.
3115
3116 Tue Mar  9 22:36:34 2004  Ben Pfaff  <blp@gnu.org>
3117
3118         Eliminate temp_case.
3119
3120         * aggregate.c: (cmd_aggregate) No need to save/restore temp_case
3121         anymore.  Use agr_11x_finish().
3122         (aggregate_single_case) Make first param const.
3123         (accumulate_aggregate_info) Ditto.
3124         (agr_00x_end_func) Use compaction_case, not temp_case.
3125         (agr_11x_func) Break into agr_11x_read(), agr_11x_finish().
3126
3127         * data-list.c: (struct data_list_pgm) Add `case_size' member.
3128         (cmd_data_list) Initialize case_size.
3129         (read_from_data_list_fixed) Add struct ccase * param, use instead
3130         of temp_case.
3131         (read_from_data_list_free) Ditto.
3132         (read_from_data_list_list) Ditto.
3133         (read_one_case) Rename data_list_trns_proc(), all references
3134         updated.  Add argument in calling above functions.  Use c
3135         argument instead of temp_case.
3136         (destroy_dls) Rename data_list_trns_free(), all references
3137         updated.
3138
3139         * expr-evl.c: (expr_evaluate) Make second parameter const.
3140
3141         * file-type.c: (struct file_type_pgm) Add `case_size' member.
3142         (cmd_end_file_type) Initialize `case_size'.
3143         (file_type_source_read) Add struct ccase * parameter.  Use instead
3144         of temp_case.
3145
3146         * flip.c: Rewritten.
3147
3148         * get.c: (struct get_pgm) New structure to keep track of
3149         case_size.
3150         (cmd_get) Initialize case_size.
3151         (cmd_import) Ditto.
3152         (get_source) Deal with struct get_pgm.
3153         (get_source_read) Add struct ccase * parameter, use instead of
3154         temp_case.
3155         (import_source_read) Ditto.
3156
3157         * get.c: Use a null pointer instead of temp_case to represent the
3158         "current case" in a struct mtf_file's input member.
3159         (mtf_processing_finish) Pass null to mtf_processing(), not
3160         temp_case.
3161         (mtf_read_nonactive_records) Don't set iter->input to temp_case.
3162         (mtf_compare_BY_values) Add extra arg, use instead of null input
3163         members.
3164         (mtf_processing) Use c parameter instead of temp_case.  Pass
3165         compaction_case to process_active_file_output_case().
3166         
3167         * glob.c: (global variable temp_case) Removed.
3168
3169         * inpt-pgm.c: (struct input_program_pgm) Add `case_size' member.
3170         (cmd_input_program) Initialize case_size.  Set
3171         vfm_source->value_cnt.
3172         (init_case) Add struct ccase * parameter, use instead of
3173         temp_case.
3174         (clear_case) Ditto.
3175         (input_program_source_read) Ditto.
3176
3177         * matrix-data.c: (matrix_data_read_without_rowtype) Ditto.
3178         (dump_cell_content) Ditto.
3179         (nr_output_data) Ditto.
3180         (read_matrices_without_rowtype) Ditto.
3181         (matrix_data_read_with_rowtype) Ditto.
3182         (wr_read_splits) Ditto.
3183         (wr_output_data) Ditto.
3184
3185         * sort.h: (struct sort_cases_pgm) New member `case_size'.
3186         
3187         * sort.c: (sort_cases) Initialize scp->case_size.
3188         (struct external_sort) Remove `case_size' member.
3189         (write_initial_runs) Only call vfm_sink->class_destroy if
3190         non-null.
3191         (struct sort_source_aux) New structure.
3192         (sort_source_read_helper) New function.
3193         (sort_source_read) Use sort_source_read_helper().
3194         (read_sort_output) Change interface to be more reasonable.
3195         (read_internal_sort_output) Ditto.
3196         (read_external_sort_output) Ditto.
3197
3198         * vars-prs.c: (dict_class_to_name) Pass return value through
3199         gettext.
3200
3201         * vfm.c: (struct procedure_aux_data) Add `trns_case' member.
3202         (procedure) Initialize trns_case.
3203         (procedure) Pass trns_case to vfm_source->class->read().
3204         Free trns_case.
3205         (process_active_file) Start using struct procedure_aux_data.
3206         (process_active_file_write_case) Pass trns_case to
3207         transformations, lag_case(), clear_case().
3208         (process_active_file_output_case) Add struct ccase * parameter.
3209         (create_trns_case) New function.
3210         (make_temp_case) Removed.
3211         (vector_initialization) Removed.
3212         (close_active_file) Only call make_source if non-null, otherwise
3213         set vfm_source to null pointer.  Don't free temp_case.
3214         (disk_source_read) Add struct ccase * parameter, use instead of
3215         temp_case.
3216         (memory_source_read) Ditto.
3217         (lag_case) Add const struct ccase * member.
3218         (procedure_write_case) Use trns_case instead of temp_case.
3219         (clear_case) Add struct ccase * member, use instead of temp_case.
3220         (exclude_this_case) Ditto.
3221         (create_case_source) Add struct dictionary * parameter, use to
3222         initialize source->value_cnt.
3223
3224         * vfm.h: (struct case_source) Add `value_cnt' member.
3225         (struct case_source_class) Add struct ccase * parameter to `read'
3226         member function pointer.
3227         (struct case_sink_class) Make struct ccase * parameter const in
3228         `write' member function pointer.
3229         
3230 Wed Mar  3 20:44:37 2004  Ben Pfaff  <blp@gnu.org>
3231
3232         Fix a lot of "possibly uninitialized variable" warnings.  Some of
3233         them are even real bugs.  A few of them make me wonder how the
3234         code ever worked.
3235
3236         * aggregate.c: (parse_aggregate_functions) Initialize `function.
3237
3238         * ascii.c: (output_lines) Add default case to switch.
3239
3240         * crosstabs.q: Remove static variable `expected' and all
3241         references to it.
3242         (display_crosstabulation) Always calculate expected value.
3243         (calc_chisq) Ditto.
3244         (output_pivot_table) Initialize `cmp'.
3245         (display_crosstabulation) New variable `last_row', which is
3246         initialized.
3247
3248         * data-in.c: (parse_numeric) Always initialize sign.  How did this
3249         work at all?!
3250
3251         * data-list.c: (repeating_data_trns_proc) Always initialize code.
3252         Always set info.ofs.  (How did this work?!)
3253
3254         * expr-opt.c: (optimize_tree) Always initialize `m'.
3255         (evaluate_tree) Always initialize `c'.  (How did this work?)
3256
3257         * frequencies.q: (frq_custom_variables) Always initialize min,
3258         max.
3259         (frq_custom_grouped) Always initialize `dl'.
3260
3261         * groff-font.c: (groff_read_font) Always initialize char_set.
3262
3263         * matrix-data.c: (nr_output_data) Initialize `split'.
3264         (wr_read_splits) Remove shadowing split_cnt declaration.
3265         (wr_output_data) Initialize `split'.
3266
3267         * output.c: (tokener) Skip add character on syntax error.
3268
3269         * pool.c: (pool_strndup) Always set `copy'.  (How did this work?!)
3270
3271         * postscript.c: (read_ps_encodings) Use line.string instead of
3272         uninitialized `bp'.
3273         (write_text) Add default case to switch.
3274         (text) Always initialize multiple variables.  Fix bug with
3275         ligatures.
3276
3277         * print.c: (fixed_parse_fortran) Initialize head.
3278         (alloc_line) Add default case to switch.
3279
3280         * recode.c: (parse_dest_spec) Handle case where nothing matches.
3281         (recode_trns_proc) Move variable declaration inward.  Add default
3282         case to switch.
3283
3284         * sfm-read.c: (read_header) Initialize skip_amt.
3285
3286         * sysfile-info.c: (display_variables) Always initialize pc.
3287
3288         * vars-prs.c: Initialized `included'.
3289
3290 Wed Mar  3 09:30:09 2004  Ben Pfaff  <blp@gnu.org>
3291
3292         * main.c: (main) sigaction()'s sa_flags member was uninitialized.
3293         Just use signal() instead.
3294
3295 Wed Mar  3 09:26:30 2004  Ben Pfaff  <blp@gnu.org>
3296
3297         Get rid of vfm_sink_info and vfm_source_info.
3298         
3299         * aggregate.c: (agr_00x_end_func) Don't increment
3300         sfm_sink_info.ncases.
3301
3302         * sort.c: (do_internal_sort) Get case count from
3303         vfm_source->class->count().
3304         (struct external_sort) Add `case_size' member.
3305         (do_external_sort) Initialize case_size.
3306         (struct initial_run_state) Add `case_size' member.
3307         (write_initial_runs) Initialize case_size.
3308         (sort_sink_write) Use case_size.
3309         (read_external_sort_output) Use case_size.  Get case_cnt from
3310         initial_runs.
3311
3312         * vfm.c: (struct write_case_data) Add underscores to existing arg
3313         names, all references updated.  Renamed `aux' as `func_aux', all
3314         references updated.  Added new `aux' member.
3315         (global var vfm_source_info) Removed.
3316         (global var vfm_sink_info) Removed.
3317         (struct procedure_aux_data) New.
3318         (struct split_aux_data) New.
3319         (procedure) Use `aux' fields for procedure_aux_data,
3320         split_aux_data.
3321         (process_active_file_write_case) Pass case_count + 1 to
3322         transformation procedures, exclude_this_case().
3323         (process_active_file_output_case) Don't increment
3324         vfm_sink_info.ncases.
3325         (prepare_for_writing) Don't initialize vfm_sink_info.  Don't try
3326         to send data to disk early.
3327         (make_temp_case) Don't use vfm_sink_info.case_size.
3328         (close_active_file) Don't initialize vfm_source_info.
3329         (struct disk_stream_info) New, to allow for case_cnt and case_size fields.
3330         (disk_sink_create) Initialize and/or update disk_stream_info.
3331         (disk_sink_write) Ditto.
3332         (disk_sink_destroy) Ditto.
3333         (disk_sink_make_source) Ditto.
3334         (disk_source_read) Ditto.
3335         (disk_source_destroy) Ditto.
3336         (global var disk_source_class) Add disk_source_count().
3337         (disk_source_count) New function.
3338         (struct memory_sink_info) Add `case_cnt', `case_size' members.
3339         (struct memory_source_info) Ditto.
3340         (memory_sink_create) Deal with case_cnt, case_size.
3341         (memory_sink_write) Ditto.
3342         (memory_sink_make_source) Ditto.
3343         (memory_source_read) Ditto.
3344         (memory_source_count) New function.
3345         (memory_source_class) Add memory_source_count().
3346         (procedure_write_case) Don't use vfm_sink_info.ncases.  Do use
3347         proc_aux->cases_written, and pass it to transformation procedures
3348         and exclude_this_case ().
3349         (exclude_this_case) Add case_num parameter.  Pass it to
3350         expr_evaluate().
3351         (SPLIT_FILE_procfunc) Use split_aux->prev_case instead of static
3352         variable.
3353
3354         * vfm.h: (struct case_source_class) Add `count' member.
3355
3356         * vfmP.h: (struct stream_info) Removed.
3357         (global variable vfm_source_info) Removed.
3358         (global variable vfm_sink_info) Removed.
3359         
3360 Tue Mar  2 23:38:17 2004  Ben Pfaff  <blp@gnu.org>
3361
3362         * var.h: (typedef trns_proc_func) New typedef.
3363         (trns_free_func) New typedef.
3364         (struct trns_header) Change `proc' to type trns_proc_func, `free'
3365         to type trns_free_func.  This only changes the actual type of
3366         trns_proc_func, adding a `case_num' parameter.  Updated all
3367         implementations to use the typedefs instead.
3368
3369         * compute.c: (compute_num) Pass case_num to expr_evaluate().
3370         (compute_num_vec) Ditto.
3371         (compute_str) Ditto.
3372         (compute_str_vec) Ditto.
3373
3374         * do-if.c: (do_if_trns_proc) Ditto.
3375
3376         * expr-evl.c: (expr_evaluate) Add new case_num parameter, use for
3377         OP_CASENUM.
3378
3379         * inpt-pgm.c: (input_program_source_read) Maintain case count,
3380         pass to transformation functions.
3381         (reread_trns_proc) Pass case_num arg to expr_evaluate().
3382
3383         * loop.c: (loop_1_trns_proc) Ditto.
3384         (loop_2_trns_proc) Ditto.
3385         (loop_3_trns_proc) Ditto.
3386
3387         * print.c: (print_space_trns_proc) Ditto.
3388
3389         * sel-if.c: (select_if_proc) Ditto.
3390
3391 Tue Mar  2 11:36:52 2004  Ben Pfaff  <blp@gnu.org>
3392
3393         * frequencies.q: (cleanup_freq_tab) Avoid memory leak by
3394         destroying hash table.
3395
3396         * glob.c: (read_active_file) Variable not referenced, removed.
3397         (cancel_input_pgm) Ditto.
3398
3399         * levene.c: Add #include <stdlib.h> needed to call free().
3400
3401         * aggregate.c: (parse_aggregate_functions) Make `function'
3402         variable const.
3403
3404 Tue Mar  2 11:30:56 2004  Ben Pfaff  <blp@gnu.org>
3405
3406         Start working to eliminate VFM dependence on static variables.
3407
3408         * command.c: (cmd_parse) Use case_source_is_class().
3409
3410         * data-list.c: Rewrite to eliminate use of static variables.
3411
3412         * dfm.c: (cmd_begin_data) Use case_source_is_class().
3413
3414         * file-handle.q: (fh_handle_name) Make parameter const.
3415
3416         * file-type.c: Rewrite to eliminate use of static variables.
3417
3418         * flip.c: Rewrite to eliminate use of static variables.
3419
3420         * format.c: (get_format_var_width) New function.
3421
3422         * get.c: Eliminate use of static variables.
3423
3424         * inpt-pgm.c: Eliminate use of static variables.
3425
3426         * matrix-data.c: Eliminate use of static variables.
3427
3428         * set.q: (set_max_workspace) New variable.
3429         (cmd_set) Use SET WORKSPACE to modify set_max_workspace.
3430
3431         * var.h: (struct case_list) Move here from vfmP.h.
3432
3433         * vars-atr.c: (discard_variables) Handle new vfm_source type.
3434
3435         * vfm.c: (vfm_source) Change type from struct case_stream to
3436         struct case_source.
3437         (vfm_sink) Change type from struct case_stream to struct
3438         case_sink.
3439         (static var paging) Rename workspace_overflow, all references
3440         updated.
3441         (procedure) Use new class structures.
3442         (process_active_file) Ditto.
3443         (process_active_file_write_case) Ditto.
3444         (prepare_for_writing) Use set_max_workspace.  Use new class
3445         structures.
3446         (close_active_file) Use new class structures.  Free old sink.
3447         (global var disk_source_file) Removed.
3448         (global var disk_sink_file) Removed.
3449         (disk_stream_init) Removed.
3450         (disk_stream_read) Removed.
3451         (disk_stream_write) Removed.
3452         (disk_stream_mode) Removed.
3453         (disk_stream_destroy_source) Removed.
3454         (disk_stream_destroy_sink) Removed.
3455         (global var vfm_disk_stream) Removed.
3456         (disk_sink_create) New function.
3457         (disk_sink_write) New function.
3458         (disk_sink_destroy) New function.
3459         (disk_sink_make_source) New function.
3460         (disk_sink_class) New static var.
3461         (disk_source_read) New function.
3462         (disk_source_destroy) New function.
3463         (global var vfm_source_class) New var.
3464         (global var memory_source_cases) Removed.
3465         (global var memory_sink_cases) Removed.
3466         (global var memory_sink_max_cases) Removed.
3467         (struct memory_sink_info) New struct.
3468         (memory_stream_init) Removed.
3469         (memory_stream_read) Removed.
3470         (memory_stream_write) Removed.
3471         (memory_stream_mode) Removed.
3472         (memory_stream_destroy_source) Removed.
3473         (memory_stream_destroy_sink) Removed.
3474         (global var vfm_memory_stream) Removed.
3475         (page_to_disk) Renamed write_active_file_to_disk().
3476         (memory_sink_create) New function.
3477         (memory_sink_write) New function.
3478         (memory_sink_destroy) New function.
3479         (memory_sink_make_source) New function.
3480         (memory_sink_class) New static var.
3481         (memory_source_read) New function.
3482         (memory_source_destroy) New function.
3483         (memory_source_get_cases) New function.
3484         (memory_source_set_cases) New function.
3485         (global var vfm_source_class) New var.
3486         (procedure_write_case) Use new class structures.
3487         (create_case_source) New function.
3488         (case_source_is_complex) New function.
3489         (case_source_is_class) New function.
3490         (create_case_sink) New function.
3491
3492         * vfm.h: (global variable reinit_sysmis) Not used, removed.
3493         (global variable reinit_blanks) Not used, removed.
3494         (global variable init_zero) Not used, removed.
3495         (global variable init_blanks) Not used, removed.
3496         (struct case_source) New struct.
3497         (struct case_source_class) New struct.
3498         (struct case_sink) New struct.
3499         (struct case_sink_class) New struct.
3500         (struct case_stream) Removed.
3501
3502         * vfmP.h: (struct case_list) Moved to var.h.
3503
3504 Tue Mar  2 11:28:30 2004  Ben Pfaff  <blp@gnu.org>
3505
3506         * algorithm.c: (count_equal) New function.
3507         (count_if) New function.
3508         (unique) Add assertions.
3509         (partition) Add assertions.
3510         (is_partitioned) New function.
3511         (copy_if) Add assertions.
3512         (remove_equal) Add assertions.
3513         (lexicographical_compare) Rename lexicographical_compare_3way.
3514         (sort) Add assertions.  Rephrase some code.
3515         (is_sorted) New function.
3516
3517 Sun Feb 29 23:24:57 2004  Ben Pfaff  <blp@gnu.org>
3518
3519         Rewrite SORT CASES.
3520
3521         * sort.c: Completely rewrite.
3522
3523         * sort.h: Expose interface via struct sort_cases_pgm, not via
3524         global variables.
3525
3526         * aggregate.c: (sort) New static var.
3527         (cmd_aggregate) Use sort.
3528         (create_sysfile) Ditto.
3529         (aggregate_single_case) Ditto.
3530         (dump_aggregate_info) Ditto.
3531         (agr_00x_end_func) Ditto.
3532         (debug_print) Ditto.
3533
3534         * var.h: (enum SRT_ASCEND) Removed.
3535         (enum SRT_DESCEND) Removed.
3536         (struct sort_cases_proc) Removed.
3537         (struct variable) Remove p.srt member.
3538
3539 Sun Feb 29 23:22:45 2004  Ben Pfaff  <blp@gnu.org>
3540
3541         Get rid of the old, crappy heap structure and replace it by a new,
3542         shiny, C++ STL-like heap structure.
3543         
3544         * Makefile.am: (pspp_SOURCES) Remove heap.c, heap.h.
3545
3546         * algorithm.c: (push_heap) New function.
3547         (heapify) Ditto.
3548         (pop_heap) Ditto.
3549         (make_heap) Ditto.
3550         (sort_heap) Ditto.
3551         (is_heap) Ditto.
3552         
3553         * heap.c: Removed.
3554
3555         * heap.h: Removed.
3556
3557 Sun Feb 29 23:21:53 2004  Ben Pfaff  <blp@gnu.org>
3558
3559         Increase warning level.
3560         
3561         * Makefile.am: (AM_CFLAGS) Remove -Wnouninitialized.
3562
3563 Sat Feb 21 17:38:58 WST 2004 John Darrington <john@darrington.wattle.id.au>
3564
3565         * main.c: Added a signal handler for SIGSEGV requesting a bug report.
3566          
3567 Fri Feb 20 23:22:14 2004  Ben Pfaff  <blp@gnu.org>
3568
3569         * dictionary.c: (dict_create_var) Fix root cause of bug worked
3570         around by previous change log entry.
3571         
3572         * compute.c: (lvalue_finalize) Remove workaround from previous
3573         change log entry.
3574
3575 Fri Feb 20 14:37:41 WAST 2004 John Darrington <john@darrington.wattle.id.au>
3576
3577         * compute.c: Fixed a bug where the Format was not getting set for 
3578           computed variables (thus causing a crash when SAVEing).
3579
3580         * Added a test to stop this bug ever coming back
3581
3582 Wed Feb 18 22:21:35 2004  Ben Pfaff  <blp@gnu.org>
3583
3584         Got rid of approx.h.  In general, replaced all references to
3585         approx_eq() by ==, approx_lt() by <, etc.  Other types of changes
3586         noted below.
3587
3588         * Makefile.am: (pspp_SOURCES) Removed approx.h.
3589
3590         * data-out.c: (try_F) Replaced test for approx_eq(number, 0.0) by
3591         test for mag < EPSILON.
3592
3593         * misc.h: Add definition of EPSILON.
3594
3595 Wed Feb 18 21:32:44 2004  Ben Pfaff  <blp@gnu.org>
3596
3597         * vfm.c: (procedure) Add check to prevent recursive call.
3598
3599 Wed Feb 18 21:48:54 WST 2004 John Darrington <john@darrington.wattle.id.au>
3600
3601         * Moved the declarations relating to values to their own header file
3602           (val.h)
3603
3604         * Added levene.c and levene.h
3605
3606         * vars-atr.c: Changed the signature of compare_values to 
3607         take const * arguments.
3608                 
3609         * t-test.q: Changed the structure of struct t_test_proc 
3610        variables now contain their own group statistics information.
3611        Eventually, t_test_proc might get renamed, because it'd be 
3612        applicable to other commands too.
3613
3614 Mon Feb 16 23:15:51 2004  Ben Pfaff  <blp@gnu.org>
3615
3616         * data-out.c: Clean up.  Changed interface of convert_*() to take
3617         either a `double' or a `const char *' instead of a `const union
3618         value *'.  Update all implementations of those interfaces.
3619         (data_out) Use switch statements instead of a table.
3620         (convert_AHEX) Rewrite.
3621
3622         * format.h: Update comment.
3623
3624 Mon Feb 16 22:14:36 2004  Ben Pfaff  <blp@gnu.org>
3625
3626         * q2c.c: (dump_header) Add an Emacs header line to output files
3627         that makes generated .c files read-only by default, to make it
3628         difficult to accidentally change generated files.
3629
3630 Mon Feb 16 22:12:07 2004  Ben Pfaff  <blp@gnu.org>
3631
3632         * frequencies.q: (compare_freq_numeric_a) Compare by frequency,
3633         not bogus a->v.c <=> b->v.c pointer compare.
3634         (compare_freq_alpha_a) Ditto.
3635         (compare_freq_numeric_d) Ditto.
3636         (compare_freq_alpha_d) Ditto.
3637         
3638 Mon Feb 16 22:00:53 2004  Ben Pfaff  <blp@gnu.org>
3639
3640         Changed data_out() to store string data directly into a `union
3641         value''s s member, not indirectly into c.
3642
3643         * crosstabs.q: (output_pivot_table) Use format_short() instead of
3644         data_out().
3645         (table_value_missing) Ditto.
3646         (float_M_suffix) Ditto.
3647         (format_short) New function.
3648
3649         * data-in.h: (data_in_finite_line) Remove inline definition.
3650
3651         * data-list.c: (destroy_dls_var_spec) New function.
3652         (destroy_dls) Rewrite in terms of destroy_dls_var_spec().
3653         (data_list_source_destroy_source) Avoid cast.
3654         (struct repeating_data_trns) New field `id_value'.  Update
3655         comments.
3656         (cmd_repeating_data) Initialize id_value.  Use new
3657         repeating_data_trns_free() for freeing REPEATING DATA
3658         transformations.
3659         (rpd_parse_record) Rewrite support for record ID to be less bogus.
3660         (repeating_data_trns_free) New function.
3661
3662         * data-out.c: (data_out) Change return type to `void' by replacing
3663         error returns by writing a message into the output buffer.
3664         (convert_A) Read from v->s instead of v->c.
3665         (convert_AHEX) Ditto.
3666
3667         * expr-evl.c: Update comment.
3668         (expr_evaluate) Add assertion in OP_STRING case.
3669
3670         * format.h: (macro MAX_FORMATTED_LEN) New macro.
3671
3672         * list.q: (list_cases) Update for new data_out() semantics.
3673
3674         * print.c: (print_trns_proc) Ditto.
3675
3676         * tab.c: (tab_value) Ditto.
3677         (tab_float) Avoid stupid cast.
3678
3679         * var.h: Update comments.
3680         (macro MAX_STRING) New macro.
3681         (macro MAX_ELEMS_PER_VALUE) New macro.
3682
3683         * vars-atr.c: (compare_values) New function.
3684
3685         * vfm.c: (dump_splits) Update for new data_out() semantics.
3686
3687 Mon Feb 16 21:45:47 2004  Ben Pfaff  <blp@gnu.org>
3688
3689         * crosstabs.q: (struct table_entry) Rename v[] to values[].  All
3690         references updated.
3691         (struct crosstab) Rename v[] to vars[].  All references updated.
3692         (hash_table_entry) Replace the hash algorithm and fix a bug at the
3693         same time, which caused the hash value to depend only on a single
3694         value, not all of the variables' values.
3695         
3696 Mon Feb 16 12:49:53 2004  Ben Pfaff  <blp@gnu.org>
3697
3698         Clean up struct dictionary's value_cnt usage.
3699
3700         * dictionary.c: Add a function comment to each function.
3701         (struct dictionary) Rename value_cnt to next_value_idx, which more
3702         accurately reflects its meaning.  All references updated.
3703         (dict_rename_vars) Add assertion.
3704         (dict_get_value_cnt) Rename dict_get_next_value_idx().  All
3705         references updated.
3706         (dict_get_case_size) New function.
3707
3708         * aggregate.c: (create_sysfile) Use dict_get_case_size().
3709
3710         * get.c: (mtf_read_nonactive_records) Ditto.
3711
3712         * sort.c: (allocate_cases) Ditto.
3713         (write_initial_runs) Ditto.
3714         (merge) Ditto.
3715         (merge_once) Ditto.
3716
3717         * vfm.c: (prepare_for_writing) Ditto.
3718         (setup_lag) Ditto.
3719         (lag_case) Ditto.
3720
3721 Mon Feb 16 00:17:55 2004  Ben Pfaff  <blp@gnu.org>
3722
3723         Make vfm.c slightly less grotesque.
3724
3725         * vfm.c: (filter_var) Removed.
3726         (filter_index) Removed.
3727         (FILTERED macro) Removed.
3728         (exclude_this_case) New function.
3729         (process_active_file_write_case) Use exclude_this_case() instead
3730         of FILTERED and inline tests.
3731         (procedure_write_case) Ditto.
3732         (setup_filter) Removed.
3733         (open_active_file) Don't call setup_filter().
3734         (close_active_file) Call dict_get_filter() instead of checking
3735         filter_var.
3736
3737 Mon Feb 16 00:01:53 2004  Ben Pfaff  <blp@gnu.org>
3738
3739         * var.h: (struct variable) Update comments.
3740
3741 Sun Feb 15 23:14:59 2004  Ben Pfaff  <blp@gnu.org>
3742
3743         New functions dict_create_var_assert(), dict_lookup_var_assert().
3744         Converted several dict_*_var()/assert pairs into a single
3745         dict_*_var_assert().
3746
3747         * dictionary.c: (dict_create_var_assert) New function.
3748         (dict_lookup_var_assert) New function.
3749
3750 Sun Feb 15 23:06:08 2004  Ben Pfaff  <blp@gnu.org>
3751
3752         Got rid of "struct long_vec", envector(), devector(), etc.  Added
3753         two members `init', `reinit' to struct variable as a substitute.
3754         
3755         * Makefile.am: (pspp_SOURCES) Removed cases.c, cases.h.
3756         
3757         * cases.c: Removed.
3758
3759         * cases.h: Removed.
3760
3761         * aggregate.c: (parse_aggregate_functions) destvar doesn't need
3762         init.
3763
3764         * autorecode.c: (cmd_autorecode) destvars don't need init.
3765
3766         * compute.c: (lvalue_finalize) Set reinit.
3767
3768         * data-list.c: (fixed_parse_compatible) Don't need init usually.
3769         (dump_fmt_list) Ditto.
3770         (parse_free) Ditto.
3771
3772         * descript.q: (run_z_pass) Don't need init for z-scores.
3773
3774         * dictionary.c: (dict_create_var) Initialize `init', `reinit'
3775         members.
3776         (dict_clone_var) Copy `reinit' member, initialize `init' member.
3777
3778         * glob.c: (init_glob) Remove vec_init() calls.
3779
3780         * inpt-pgm.c: (cmd_end_input_program) Use `reinit', not `left'.
3781         
3782         * loop.c: (internal_cmd_loop) Don't need to call envector().
3783
3784         * numeric.c: (cmd_numeric) Ditto.
3785         (cmd_string) Ditto.
3786         (cmd_leave) Ditto.  Set `init', `reinit' members.
3787
3788         * recode.c: (cmd_recode) Don't need to call envector().
3789
3790         * repeat.c: (internal_cmd_do_repeat) Ditto.
3791
3792         * var.h: (struct variable) Remove `left'.  Add `init', `reinit'.
3793         (force_create_variable) Removed prototype.
3794         (force_dup_variable) Ditto.
3795
3796         * vector.c: (cmd_vector) Don't need to call envector().
3797
3798         * vfm.c: (reinit_sysmis) Removed.
3799         (reinit_blanks) Removed.
3800         (init_zero) Removed.
3801         (init_blanks) Removed.
3802         (process_active_file_write_case) No need to deal with vectors.
3803         Call clear_temp_case().
3804         (vector_initialization) Rewrite to use `init', `reinit'.
3805         (close_active_file) No need to call vec_clear().
3806         (procedure_write_case) Call clear_temp_case().
3807         (clear_temp_case) New function.
3808
3809 Sun Feb 15 20:50:36 2004  Ben Pfaff  <blp@gnu.org>
3810
3811         * pfm-write.c: (bufwrite) Get rid of nasty cast that also invoked
3812         undefined behavior.
3813
3814 Thu Feb 12 23:35:15 2004  Ben Pfaff  <blp@gnu.org>
3815
3816         Add auxiliary argument to procedure() interface.  Associated small
3817         clean-ups of vfm interface.
3818         
3819         * Updated every caller of procedure() and process_active_file() to
3820         reflect modified interface.  Simple, ordinary changes not listed
3821         otherwise below.
3822
3823         * Updated every function that implements struct case_stream's
3824         `read' function to take a write_case_func and a write_case_data.
3825         Also updated every caller of write_case() to instead call them
3826         through these arguments.  In some cases this meant that the extra
3827         args had to be threaded through a couple of extra levels.  This
3828         wasn't difficult or interesting so the details won't be given.
3829
3830         * data-list.c: (struct repeating_data_trns) Add members
3831         `write_case', `wc_data' as kluge.
3832         (read_one_set_of_repetitions) Rename repeating_data_trns_proc and
3833         make non-static.
3834         (repeating_data_set_write_case) New function.
3835
3836         * data-list.h: New file to declare repeating_data_trns_proc() and
3837         repeating_data_set_write_case().
3838
3839         * inpt-pgm.c: (input_program_source_read) Call
3840         repeating_data_set_write_case() for all the REPEATING DATA
3841         transformations, so that they know where to send their cases.
3842         It's a big kluge.  Also kluge in END CASE.
3843         (end_case_trns_proc) Never called anymore, but we still need it,
3844         so just assert(0).
3845
3846         * sort.c: (read_sort_output) Update to match struct case_stream
3847         `read' member.
3848
3849         * vfm.c: (struct write_case_data) New structure.
3850         (proc_func) Removed.
3851         (virt_proc_func) Removed.
3852         (begin_func) Removed.
3853         (virt_begin_func) Removed.
3854         (end_func) Removed.
3855         (write_case) Removed.
3856         (procedure) Added an auxiliary parameter to each function pointer
3857         argument's prototype.  Added an auxiliary data parameter.
3858         Rewrote.
3859         (process_active_file) Ditto.
3860         (process_active_file_write_case) Pass aux data along.
3861         (close_active_file) Ditto.
3862         (procedure_write_case) Ditto.
3863         (SPLIT_FILE_procfunc) Ditto.
3864
3865         * vfm.h: (typedef write_case_data) New.
3866         (typedef write_case_func) New.
3867         (struct case_stream) Add parameters to `read' member prototype.
3868         
3869 Thu Feb 12 19:24:53 WST 2004 John Darrington <john@darrington.wattle.id.au>
3870
3871         * t-test.q:  Added calculations for independent samples. (But no Levene
3872         test yet!)
3873
3874         * Makefile.am: Moved q_sources_c into own variable 
3875
3876 Wed Feb 11 23:56:51 2004  Ben Pfaff  <blp@gnu.org>
3877
3878         Miscellaneous cleanups.
3879         
3880         * Change unused to UNUSED in many source files to reflect modified
3881         pref.h.  Change use of __WIN32__, __MSDOS, __DJGPP__,
3882         __CYGWIN32__, __unix__, and unix not to assume that they're
3883         defined to a nonzero value.  Change use of __attribute__ to use
3884         NO_RETURN or PRINTF_FORMAT instead.
3885         
3886         * alloc.h: Move definitions for local_alloc(), local_free() here
3887         from ../pref.h.orig and simplify.
3888
3889         * expr-evl.c: Instead of working differently based on PAGED_STACK,
3890         use a pool allocator unconditionally.
3891         (CHECK_STRING_SPACE) Removed.
3892         (ALLOC_STRING_SPACE) Removed.
3893         (expr_evaluate) Use e->pool instead of CHECK_STRING_SPACE and
3894         ALLOC_STRING_SPACE.
3895
3896         * expr-opt.c: (dump_expression) Allocate string pool.
3897
3898         * expr-prs.c: (expr_free) Free string pool.
3899
3900         * pool.c: (pool_destroy) This pool must be removed from its
3901         parent's list of gizmos, not from its own.  Use free_all_gizmos().
3902         (pool_clear) New function.
3903         (free_all_gizmos) New function.
3904         (pool_alloc) Use space in empty block after this one if any.
3905         (pool_release) Only empty out blocks, don't actually free() them.
3906
3907         * print.c: Get rid of PAGED_STACK special case by always
3908         dynamically allocating line buffers.
3909         (struct print_trns) Always include the `line' member.
3910         (internal_cmd_print) Always initialize the `line' member.
3911         (alloc_line) Always allocate memory for `line'.
3912         (print_trns_proc) Always initialize buf from `line' member.
3913         (print_trns_free) Always free `line' memory.
3914
3915         * sort.c: (allocate_file_handles) Special-case MS-DOS for mkdir()
3916         call.
3917         
3918 Wed Feb 11 20:33:18 2004  Ben Pfaff  <blp@gnu.org>
3919
3920         * flip.c: Fixed crash from FLIP when a numeric variable is
3921           specified on NEWNAMES and a large value is used, and a couple of
3922           other minor bugs besides.
3923           (struct varname) Make name a 9-character fixed-size array
3924           instead of a 1-character variable size array.
3925           (make_new_var) Allow digits in variable names.
3926           (flip_stream_write) Limit numeric values to 8 characters and
3927           format system missing and very large and small values more
3928           appropriately.
3929
3930 Thu Feb  5 13:19:06 WAST 2004 John Darrington <john@darrington.wattle.id.au>
3931
3932         * command.c: Fixed test on command return status for the correct 
3933           value,  which had been causing a crash under certain invalid input.
3934
3935 Wed Feb  4 15:34:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
3936
3937         * t-test.q: Added calculations for the one sample variant of the T-TEST
3938
3939 Tue Feb  3 20:09:54 2004  Ben Pfaff  <blp@gnu.org>
3940
3941         * tab.c: (render_strip) Fix bug that sometimes caused joined text
3942           in joined cells to be rendered outside box boundaries.
3943
3944 Tue Feb  3 18:56:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
3945
3946         * random.c (rng_create): Fixed seeding so that it gets reseeded after
3947         SET seed=xx has been called.
3948
3949 Mon Jan 19 14:08:09 2004  Ben Pfaff  <blp@gnu.org> 
3950
3951         * random.c (rng_get_double): Fix always-returning-zero bug in my
3952         preferred way, and at the same time make sure rounding doesn't
3953         bite us.
3954
3955 Thu Jan  1 23:16:41 2004  Ben Pfaff  <blp@gnu.org>
3956
3957         * html.c: (change_attributes) Dead code, removed.
3958         (escape_string) Eliminate code to call change_attributes() that
3959         never actually called it.
3960         (output_tab_table) Get rid of dependence on tab_hit
3961         and struct tab_joined_cell's hit member, which are abominations.
3962
3963         * tab.c: (tab_output_text) Don't call
3964         d->class->text_set_font_by_name if it's a null pointer.
3965         (macro UNROLL_LOOP) Eliminate.
3966         (macro UNROLL_3_LOOPS) Eliminate.
3967         (tabi_render) Rewrite not to use the above macros.
3968
3969 Thu Jan  1 23:09:07 2004  Ben Pfaff  <blp@gnu.org>
3970
3971         Start working on a new output driver system, one that doesn't suck
3972         so much, by adding a "device-independent" output driver.  The idea
3973         is to write out only a single output stream, then use separate
3974         processes to translate them into whatever formats we want.  This
3975         is similar to how "groff" works with its various output drivers
3976         (grops, grotty, grodvi, ...).
3977         
3978         * Makefile.am: (pspp_SOURCES) Add devind.c, devind.h.
3979
3980         * list.q: (write_all_headers) Stub out devind class.
3981         (clean_up) Ditto.
3982         (determine_layout) Ditto.
3983         (list_cases) Ditto.
3984
3985         * output.c: (outp_init) Add devind class.
3986
3987         * devind.c: New file.
3988
3989         * devind.h: New file.
3990
3991 Thu Jan  1 23:08:14 2004  Ben Pfaff  <blp@gnu.org>
3992
3993         * frequencies.q: (hash_value_alpha) Fixed up the previous change
3994         to use the proper string length.
3995
3996 Wed Dec 31 16:27:33 WAST 2003 John Darrington <john@darrington.wattle.id.au>
3997
3998         * Fixed bug where FREQ would crash on alpha values
3999
4000 Tue Dec 30 22:42:57 2003  Ben Pfaff  <blp@gnu.org>
4001
4002         * Removed bletcherous alloca() workarounds for AIX from top of
4003         many files.  AIX can use the alternative alloca() implementation
4004         instead.
4005
4006 Tue Dec 30 22:35:16 2003  Ben Pfaff  <blp@gnu.org>
4007
4008         * ascii.c: (ascii_option) Fix implementation of headers option.
4009
4010 Tue Dec 30 22:32:53 2003  Ben Pfaff  <blp@gnu.org>
4011
4012         * ascii.c: Add a "squeeze" option to the ASCII driver to squeeze
4013         multiple blank lines into one.
4014         (struct ascii_driver_ext) Add squeeze_blank_lines option.
4015         (ascii_preopen_driver) Initialize squeeze_blank_lines.
4016         (static var option_tab) Add squeeze entry.
4017         (ascii_option) Set squeeze_blank_lines.
4018         (output_lines) Implement squeezing blank lines.
4019
4020 Wed Dec 31 07:19:46 WST 2003 John Darrington <john@darrington.wattle.id.au>
4021
4022         * Removed redundant code from output.h
4023
4024 Sat Dec 27 22:17:52 2003  Ben Pfaff  <blp@gnu.org>
4025
4026         Dictionary classes: each variable is "ordinary", "system", or
4027         "scratch".
4028
4029         * var.h: (enum dict_class) New enum.
4030
4031         * vars-prs.c: (dict_class_from_id) New function.
4032         (dict_class_to_name) New function.
4033
4034 Sat Dec 27 22:16:06 2003  Ben Pfaff  <blp@gnu.org>
4035
4036         * var.h: (struct freq_tab_set) Removed (not used).
4037
4038 Sat Dec 27 22:15:21 2003  Ben Pfaff  <blp@gnu.org>
4039
4040         * value-labels.c: (val_labs_destroy) vls needs to be freed too.
4041
4042 Sat Dec 27 22:10:49 2003  Ben Pfaff  <blp@gnu.org>
4043
4044         * stats.c: (hypercube) Rename pow4().  All references updated.
4045
4046 Sat Dec 27 22:05:49 2003  Ben Pfaff  <blp@gnu.org>
4047
4048         * rename-vars.c: (cmd_rename_variables) Rewritten.
4049         (compare_name) Removed.
4050
4051 Sat Dec 27 22:03:51 2003  Ben Pfaff  <blp@gnu.org>
4052
4053         var_set feature, and code taking advantage of it.
4054         
4055         * crosstabs.q: (static var var_dict) Removed.
4056         (static var variables) New variable.
4057         (static var variables_cnt) New variable.
4058         (cmd_crosstabs) Free variables instead of var_dict.
4059         (internal_cmd_crosstabs) Initialize and use variables,
4060         variables_cnt instead of var_dict.
4061         (free_var_dict) Removed.
4062         (crs_custom_tables) Use var_set instead of a copied dictionary.
4063         (crs_custom_variables) Set up variables, variables_cnt instead of
4064         var_dict.
4065         [DEBUGGING] (debug_print) Ditto.
4066
4067         * means.q: (mns_custom_tables) Use var_set instead of a copied
4068         dictionary.
4069
4070         * vars-prs.c: (parse_vs_variable) New function.
4071         (parse_dict_variable) Rewritten.
4072         (parse_variable) Rewritten.
4073         (parse_variables) Renamed parse_var_set_vars(), rewritten.
4074         (parse_variables) New function in terms of parse_var_set_vars().
4075         Now requires its first argument to be non-null.  All references
4076         that passed a null pointer updated to pass default_dict instead.
4077         (macro id_dict) Removed.
4078         (parse_DATA_LIST_vars) Add assertions.
4079         (parse_mixed_vars) Ditto.
4080         (struct var_set) New structure.
4081         (var_set_get_cnt) New function.
4082         (var_set_get_var) New function.
4083         (var_set_lookup_var) New function.
4084         (var_set_destroy) New function.
4085         (dict_var_set_get_cnt) New function.
4086         (dict_var_set_get_var) New function.
4087         (dict_var_set_lookup_var) New function.
4088         (dict_var_set_destroy) New function.
4089         (var_set_create_from_dict) New function.
4090         (struct array_var_set) New structure.
4091         (array_var_set_get_cnt) New function.
4092         (array_var_set_get_var) New function.
4093         (array_var_set_lookup_var) New function.
4094         (array_var_set_destroy) New function.
4095         (var_set_create_from_array) New function.
4096
4097         * q2c.c: (dump_parser) Use parse_variables(default_dict, ...)
4098         instead of parse_variables(NULL, ...) in output code.
4099
4100 Sat Dec 27 21:38:53 2003  Ben Pfaff  <blp@gnu.org>
4101
4102         Change inp_init from a 2-bit vector to an ordinary array.
4103         Initialize it all in cmd_end_input_program() instead of in
4104         create_variable().
4105
4106         * inpt-pgm.c: (enum value_init_type) New enum.
4107         (global var inp_init) Change to `enum value_init_type *', make
4108         static.
4109         (inp_init_size) Removed.
4110         (inp_nval) Change to `size_t', make static.
4111         (cmd_input_program) Don't initialize inp_init or inp_init_size.
4112         (cmd_end_input_program) Initialize inp_init, inp_nval.
4113         (init_case) Rewrite.
4114         (clear_case) Rewrite.
4115
4116         * inpt-pgm.h: Removed.
4117
4118 Sat Dec 27 21:36:38 2003  Ben Pfaff  <blp@gnu.org>
4119
4120         * hash.c: (hsh_hash_bytes) Use Fowler-Noll-Vo hash instead of
4121         Colin Plumb hash.  It is simpler and should better resist
4122         collisions.
4123         (hsh_hash_string) Ditto.
4124
4125 Sat Dec 27 21:34:57 2003  Ben Pfaff  <blp@gnu.org>
4126
4127         * get.c: (export_write_case_func) Remove debug printing code.
4128
4129 Sat Dec 27 21:11:09 2003  Ben Pfaff  <blp@gnu.org>
4130
4131         * get.c: (cmd_save_internal) Rename parameter.  Use &t->h instead
4132         of cast.
4133         (save_write_case_func) Use &trns->h instead of cast.
4134         (cmd_export) Use &t->h instead of cast.
4135
4136 Sat Dec 27 20:57:42 2003  Ben Pfaff  <blp@gnu.org>
4137
4138         Moved vectors into the dictionary.
4139
4140         * var.h: (struct vector) Moved here from vector.h.  `index' member
4141         renamed `idx', `v' renamed `var', `nv' renamed `cnt'.  All
4142         references updated.
4143         
4144         * vector.h: Removed.
4145
4146         * vector.c: (global var vec) Removed.
4147         (global var nvec) Removed.
4148         (cmd_vector) Rewritten.
4149         (find_vector) Removed.
4150
4151         * dictionary.c: (dict_create_vector) New function.
4152         (dict_get_vector) New function, replaces reading global vec[]
4153         array.
4154         (dict_get_vector_cnt) New function, replaces reading global nvec
4155         variable.
4156         (dict_lookup_vector) New function, replaces find_vector().
4157         (dict_clear_vectors) New function.
4158
4159 Sat Dec 27 20:54:01 2003  Ben Pfaff  <blp@gnu.org>
4160
4161         Start to move away from `struct variable' p `union' member to void
4162         * aux member.
4163
4164         * var.h: (struct variable) Add `aux' member.
4165
4166 Sat Dec 27 20:36:25 2003  Ben Pfaff  <blp@gnu.org>
4167
4168         Get rid of struct variable `foo' member.
4169
4170         * frequencies.q: (internal_cmd_frequencies) Use p.frq.used instead
4171         of foo.
4172         (frq_custom_variables) Ditto.
4173         (frq_custom_grouped) Ditto.
4174
4175         * get.c: (struct save_trns) Change `var' member from `int *' to
4176         `struct variable **'.
4177         (cmd_save_internal) Use aux instead of foo.
4178         (save_trns_proc) Use revised `var' member.
4179         (static var mtf_seq_no) Renamed mtf_seq_num.
4180         (static var mtf_seq_nums) New static var.
4181         (cmd_match_files) Initialize mtf_seq_nums.
4182         (mtf_free) Free mtf_seq_nums.
4183         (mtf_processing) Use mtf_seq_nums instead of foo.
4184         (mtf_merge_dictionary) No need to initialize mv->foo.
4185         (cmd_export) Use aux instead of foo.  Use revised `var' member.
4186         (mns_custom_tables) Don't use foo to check for duplicates, that's
4187         what PV_NO_DUPLICATE is for.
4188
4189         * var.h: (struct variable) Remove `foo' member.
4190         (struct frequencies_proc) New member.
4191         
4192 Sat Dec 27 19:46:13 2003  Ben Pfaff  <blp@gnu.org>
4193
4194         Clean up COMPUTE and IF.
4195
4196         * compute.c: More or less rewrite the darn thing.
4197         (struct compute_trns) Rename and reorder and add and delete
4198         members.
4199         (cmd_compute) Rewrite.
4200         (compute_num) Make conditional on test expression.  Now used for
4201         both COMPUTE and IF.
4202         (compute_num_vec) Ditto.
4203         (compute_str) Ditto.
4204         (compute_str_vec) Ditto.
4205         (cmd_if) Rewrite.
4206         (if_num) Removed.
4207         (if_num_vec) Removed.
4208         (if_str) Removed.
4209         (if_str_vec) Removed.
4210         (parse_target_expression) Renamed parse_rvalue_expression(),
4211         rewritten.
4212         (new_trns) Renamed compute_trns_create(), rewritten.
4213         (delete_trns) Removed.
4214         (free_trns) Renamed compute_trns_free(), rewritten.
4215         (struct lvalue) New structure.
4216         (parse_var_or_vec) Renamed lvalue_parse(), rewritten.
4217         (lvalue_get_type) New function.
4218         (lvalue_is_vector) New function.
4219         (lvalue_finalize) New function.
4220         (lvalue_destroy) New function.
4221         
4222 Sat Dec 27 19:44:14 2003  Ben Pfaff  <blp@gnu.org>
4223
4224         * command.def: Disallow MODIFY VARS in input mode, so that
4225         variables can't get dropped and confuse cmd_end_input_program()'s
4226         attempt to fill inp_init[].
4227         
4228         * modify-vars.c: (static var forward_positional_ordering) New
4229         variable.
4230         (struct var_modification) Entirely changed.
4231         (rearrange_dict) Interface changed, rewritten.
4232         (cmd_modify_vars) Deal with modified struct var_modification, much
4233         rewritten.
4234         (struct var_renaming) New structure.
4235         (compare_var_renaming_by_new_name) New function.
4236         (validate_var_modification) New function.
4237
4238         * var.h: (struct modify_vars_proc) Removed.
4239         (struct variable) Removed member p.mfv.
4240
4241 Sat Dec 27 19:40:26 2003  Ben Pfaff  <blp@gnu.org>
4242
4243         Make EVALUATE a valid command whether we're debugging or not, so
4244         that `make check' can succeed regardless of whether debugging is
4245         turned on.
4246         
4247         * command.def: [GLOBAL_DEBUGGING] Drop the #if.
4248
4249         * compute.c: [GLOBAL_DEBUGGING] (cmd_evaluate) Drop the #if.
4250
4251 Sat Dec 27 19:34:40 2003  Ben Pfaff  <blp@gnu.org>
4252
4253         * apply-dict.c: (cmd_apply_dictionary) Replace a ghastly switch
4254         statement by a simple if test.
4255
4256         * dfm.c: (dfm_get_record) Add assertion.
4257
4258 Sat Dec 27 17:51:26 2003  Ben Pfaff  <blp@gnu.org>
4259
4260         For each file x.c, move #include "x.h" to the very top of the
4261         include list, to catch x.h failing to include the proper headers.
4262
4263 Sat Dec 27 17:50:19 2003  Ben Pfaff  <blp@gnu.org>
4264
4265         * algorithm.c: (find) New function.
4266         (remove_equal) New function.
4267         (set_difference) New function.
4268         (adjacent_find_equal) New function.
4269         [TEST_UNIQUE] Removed test case.
4270         (copy_if) Find end test.
4271
4272 Sat Dec 27 17:42:45 2003  Ben Pfaff  <blp@gnu.org>
4273
4274         * dictionary.c: (dict_get_case_weight) New convenience function.
4275
4276         * aggregate.c: (accumulate_aggregate_info) Use
4277         dict_get_case_weight().
4278
4279         * frequencies.q: (calc_general) Ditto.
4280         (calc_integer) Ditto.
4281         (calc) Ditto.
4282
4283         * t-test.q: (groups_calc) Ditto.
4284         (z_calc) Ditto.
4285
4286 Sat Dec 27 17:29:45 2003  Ben Pfaff  <blp@gnu.org>
4287
4288         * glob.c: (global var default_dict) Change from `struct
4289         dictionary' to `struct dictionary *'.  All references changed.
4290         (init_glob) Initialize default_dict with dict_create().
4291
4292 Sat Dec 27 17:06:06 2003  Ben Pfaff  <blp@gnu.org>
4293
4294         struct dictionary now made opaque.  All related functions:
4295
4296         * get.c: (rename_variables) Removed.
4297         (dict_delete_run) Removed.
4298         
4299         * temporary.c: (copy_variable) Removed.
4300         (new_dictionary) Removed.
4301         (save_dictionary) Removed.
4302         (restore_dictionary) Removed.
4303         (free_dictionary) Removed.
4304
4305         * vars-atr.c: (clear_default_dict) Removed.
4306         (find_variable) Removed.
4307         (find_dict_variable) Removed.
4308         (create_variable) Removed.
4309         (delete_variable) Removed.
4310         (common_init_stuff) Removed.
4311         (init_variable) Removed.  Updating of inp_init moved into
4312         cmd_end_input_program().
4313         (replace_variable) Removed.
4314         (rename_variable) Removed.
4315         (clear_variable) Removed.
4316         (dup_variable) Removed.
4317
4318         * vars-prs.c: (is_varname) Removed.
4319         (is_dict_varname) Removed.
4320         (fill_all_vars) Removed.
4321
4322         * vector.c: (find_vector) Removed.
4323
4324         * weight.c: (stop_weighting) Removed.
4325
4326         * dictionary.c: New file.
4327         (dict_create) New, replaces new_dictionary().
4328         (dict_clone) New, replaces save_dictionary() and
4329         restore_dictionary().
4330         (dict_clear) New, replaces clear_default_dict().
4331         (dict_destroy) New, replaces free_dictionary().
4332         (dict_get_var_cnt) New function, replaces references to
4333         dict->nvar.
4334         (dict_get_var) New function, replaces references to dict->var[i].
4335         (dict_get_vars) New function, replaces fill_all_vars().
4336         (dict_create_var) New, replaces create_variable().  Interface
4337         drops `type' parameter, using a zero `width' to designate numeric.
4338         (dict_clone_var) New, replaces dup_variable().
4339         (dict_rename_var) New, replaces rename_variable().
4340         (dict_lookup_var) New, replaces find_variable(),
4341         find_dict_variable(), is_varname().
4342         (dict_contains_var) New function.
4343         (compare_variable_dblptrs) New function.
4344         (dict_delete_var) New function, replaces clear_variable().
4345         (dict_delete_vars) New function, replaces dict_delete_run().
4346         (dict_reorder_vars) New function.
4347         (dict_rename_vars) New function, replaces rename_variables().
4348         (dict_get_weight) New function, replaces reading dict->weight_var.
4349         (dict_set_weight) New function, replaces writing dict->weight_var
4350         or calling stop_weight(dict).
4351         (dict_get_filter) New function, replaces reading dict->filter_var.
4352         (dict_set_filter) New function, replaces writing dict->filter_var.
4353         (dict_get_case_limit) New function, replaces reading dict->N.
4354         (dict_set_case_limit) New function, replaces writing dict->N.
4355         (dict_get_value_cnt) New function, replaces reading dict->nval.
4356         (dict_compact_values) New function, replaces a loop that was
4357         replicated in several places.
4358         (dict_get_split_vars) New function, replaces reading dict->splits.
4359         (dict_get_split_cnt) New function, replaces reading
4360         dict->n_splits.
4361         (dict_set_split_vars) New function, replaces writing dict->splits.
4362         (dict_get_label) New function, replaces reading dict->label.
4363         (dict_set_label) New function, replaces writing dict->label.
4364         (dict_get_documents) New function, replaces reading
4365         dict->documents.
4366         (dict_set_documents) New function, replaces writing
4367         dict->documents.
4368         
4369         All references to above functions updated.
4370         
4371         * aggregate.c: (cmd_aggregate) Copy file label and documents from
4372         old dictionary to new by hand, because dict_create() can't do it
4373         itself.  Use dict_set_documents(), dict_set_split_vars().
4374
4375         * temporary.c: (cancel_temporary) Also set temp_dict to NULL after
4376         calling dict_destroy().
4377
4378         * data-list.c: (dls_var_spec) Remove `type' member, replace by
4379         `width'.
4380         (fixed_parse_compatible) Some slightly nontrivial changes for
4381         dict_create_var().
4382         (dump_fmt_list) Ditto.
4383         (parse_free) Ditto.
4384
4385         * file-type.c: (create_col_var) Ditto.
4386
4387         * get.c: (cmd_get) Use dict_compact_values() instead of a loop.
4388         (trim_dictionary) Use dict_delete_vars(), dict_reorder_vars().
4389         (rename_variables) Use dict_rename_vars().
4390         (mtf_merge_dictionary) Use dict_get_documents(),
4391         dict_set_documents(), dict_compact_values().
4392
4393         * pfm-read.c: (read_variables) Deal with changes to weighting.
4394
4395         * q2c.c: (dump_parser) Use dict_lookup_var() instead of
4396         is_varname() in output code.
4397
4398         * sfm-read.c: (read_header) Use dict_create(), dict_set_label(),
4399         other dictionary functions.
4400
4401         * title.c: (add_document_line) Use dict_get_documents(),
4402         dict_set_documents().
4403
4404         * vars-atr.c: (discard_variables) Use dict_clear(default_dict),
4405         reset default_handle by hand.  dict_clear() will clear vectors so
4406         there's no need for that by hand.
4407
4408         * vfm.c: (close_active_file) Move call to finish_compaction()
4409         earlier, so that we can do the compaction as a single step using
4410         dict_compact_values().  Use dict_clear_vectors().
4411         (finish_compaction) Use dict_delete_var(), dict_compact_values().
4412                 
4413         Some functions don't have replacements:
4414
4415         * vars-atr.c: (force_create_variable) Removed.  All references
4416         updated to dict_create_var() followed by an assertion.
4417         (force_dup_variable) Removed.  All references updated to
4418         dict_clone_var() followed by an assertion.
4419         
4420         * weight.c: (update_weighting) Removed.  No longer necessary, so
4421         all references removed.
4422
4423 Sat Dec 27 16:43:01 2003  Ben Pfaff  <blp@gnu.org>
4424
4425         Clean up AGGREGATE.
4426         
4427         * aggregate.c: Eliminate separation of weighted and unweighted
4428         case.  It made the code too obscure and I doubt it was actually
4429         faster.  Instead, all code uses the "weighted" code, because
4430         that's a generalization of the "unweighted" code.
4431         (FWEIGHT) Removed.
4432         (FOPTIONS) Ditto.
4433         (parse_aggregate_functions) No need to set FWEIGHT.
4434         (accumulate_aggregate_info) Get rid of FWEIGHT cases.
4435         (dump_aggregate_info) Ditto.
4436         (initialize_aggregate_info) No need for special plain_function
4437         that gets rid of FWEIGHT option.
4438
4439         * aggregate.c: Get rid of approximations.
4440         (accumulate_aggregate_info) Don't use approx_gt(), approx_lt(),
4441         approx_in_range().
4442         (aggregate_single_case) Don't use approx_ne().
4443
4444 Sat Dec 27 16:19:36 2003  Ben Pfaff  <blp@gnu.org>
4445
4446         * ascii.c (ascii_line_width): Dead code, removed.
4447
4448         * postscript.c (ps_line_width): Ditto.
4449
4450         * q2c.c (xrealloc): Ditto.
4451
4452         * count.c (internal_cmd_count): Ditto.
4453
4454         * means.q (validate_dependent_endpoint): Ditto.
4455
4456         * set.q: (cmd_gset) Ditto.
4457
4458         * weight.c: [0] (weight_trns_proc) Ditto.
4459
4460 Sat Dec 27 16:18:16 2003  Ben Pfaff  <blp@gnu.org>
4461
4462         Make the code -Wmissing-prototypes clean.
4463
4464         * Makefile.am (version.c): Add #include "version.h".
4465         
4466         * ascii.c: (ascii_open_global) Make static.
4467         (ascii_close_page) Ditto.
4468         (ascii_font_sizes) Ditto.
4469         (ascii_postopen_driver) Ditto.
4470         (ascii_close_driver) Ditto.
4471         (ascii_option) Ditto.
4472         (ascii_open_page) Ditto.
4473         (ascii_line_horz) Ditto.
4474         (ascii_line_vert) Ditto.
4475         (ascii_line_intersection) Ditto.
4476         (ascii_box) Ditto.
4477         (ascii_polyline_begin) Ditto.
4478         (ascii_polyline_point) Ditto.
4479         (ascii_polyline_end) Ditto.
4480         (ascii_text_set_font_by_name) Ditto.
4481         (ascii_text_set_font_by_position) Ditto.
4482         (ascii_text_set_font_by_family) Ditto.
4483         (ascii_text_get_font_name) Ditto.
4484         (ascii_text_get_font_family) Ditto.
4485         (ascii_text_set_size) Ditto.
4486         (ascii_text_get_size) Ditto.
4487         (ascii_text_metrics) Ditto.
4488         (ascii_text_draw) Ditto.
4489         (ascii_close_page) Ditto.
4490
4491         * cmdline.h: New header for parse_command_line().  Used where
4492         needed.
4493
4494         * command.c: Move prototypes for cmd_*() functions to command.h.
4495
4496         * command.h: Prototypes for cmd_*() functions moved here from
4497         command.c.
4498
4499         * crosstabs.q: (gamma_int) Ditto.
4500
4501         * file-handle.h: Add fh_init_files() prototype.
4502         
4503         * getline.c: (welcome) Ditto.
4504
4505         * glob.h: New header for init_glob().  Used where appropriate.
4506
4507         * hash.c: (comparison_helper) Ditto.
4508
4509         * html.c: (html_open_global) Ditto.
4510         (html_close_global) Ditto.
4511         (html_preopen_driver) Ditto.
4512         (html_postopen_driver) Ditto.
4513         (html_close_driver) Ditto.
4514         (html_option) Ditto.
4515         (html_open_page) Ditto.
4516         (html_close_page) Ditto.
4517         (html_submit) Ditto.
4518
4519         * inpt-pgm.c: (input_program_source_read) Ditto.
4520
4521         * output.c: (find_defn_value) Ditto.
4522         (destroy_list) Ditto.
4523
4524         * pfm-read.c: (read_int) Ditto.
4525
4526         * postscript.c: (ps_open_global) Ditto.
4527         (ps_close_global) Ditto.
4528         (ps_font_sizes) Ditto.
4529         (ps_preopen_driver) Ditto.
4530         (ps_postopen_driver) Ditto.
4531         (ps_close_driver) Ditto.
4532         (ps_option) Ditto.
4533         (ps_open_page) Ditto.
4534         (ps_close_page) Ditto.
4535         (ps_line_horz) Ditto.
4536         (ps_line_vert) Ditto.
4537         (ps_line_intersection) Ditto.
4538         (ps_box) Ditto.
4539         (ps_polyline_begin) Ditto.
4540         (ps_polyline_point) Ditto.
4541         (ps_polyline_end) Ditto.
4542         (ps_text_set_font_by_name) Ditto.
4543         (ps_text_set_font_by_position) Ditto.
4544         (ps_text_set_font_family) Ditto.
4545         (ps_text_get_font_name) Ditto.
4546         (ps_text_get_font_family) Ditto.
4547         (ps_text_set_size) Ditto.
4548         (ps_text_get_size) Ditto.
4549         (ps_text_metrics) Ditto.
4550         (ps_text_draw) Ditto.
4551
4552         * q2c.c: (finish_up) Ditto.
4553         (xmalloc) Ditto.
4554         (xstrdup) Ditto.
4555         (get_buffer) Ditto.
4556         (st_lower) Ditto.
4557         (st_upper) Ditto.
4558         (skip_ws) Ditto.
4559         (get_line) Ditto.
4560         (add_symbol) Ditto.
4561         (find_symbol) Ditto.
4562         (lex_get) Ditto.
4563         (force_id) Ditto.
4564         (force_string) Ditto.
4565         (match_id) Ditto.
4566         (match_token) Ditto.
4567         (skip_token) Ditto.
4568         (parse) Ditto.
4569         (parse_setting) Ditto.
4570         (parse_specifier) Ditto.
4571         (parse_specifiers) Ditto.
4572         (parse_subcommand) Ditto.
4573         (dump_specifier_vars) Ditto.
4574         (is_keyword) Ditto.
4575         (make_identifier) Ditto.
4576         (dump_declarations) Ditto.
4577         (dump_specifier_init) Ditto.
4578         (dump_vars_init) Ditto.
4579         (make_match) Ditto.
4580         (dump_specifier_parse) Ditto.
4581         (dump_subcommand) Ditto.
4582         (dump_parser) Ditto.
4583         (dump_header) Ditto.
4584         (dump_free) Ditto.
4585         (recognize_directive) Ditto.
4586
4587         * recode.c: (string_to_long) Ditto.
4588
4589         * repeat.c: (find_DO_REPEAT_substitution) Ditto.
4590
4591         * repeat.h: New header for perform_DO_REPEAT_substitutions, used
4592         where appropriate.
4593
4594         * sort.c: (sort_stream_read) Ditto.
4595         (sort_stream_mode) Ditto.
4596         
4597 Fri Dec 19 23:35:04 2003  Ben Pfaff  <blp@gnu.org>
4598
4599         * algorithm.c (binary_search): Fix comparison.
4600
4601 Fri Dec 19 23:27:45 2003  Ben Pfaff  <blp@gnu.org>
4602
4603         * algorithm.c: (binary_search) Fix assertion.
4604
4605 Fri Dec 19 21:31:48 2003  Ben Pfaff  <blp@gnu.org>
4606
4607         * sysfile-info.c: (compare_vectors_by_name) Rewrite.
4608
4609 Fri Dec 19 21:30:24 2003  Ben Pfaff  <blp@gnu.org>
4610
4611         * sort.c: (compare_case_lists) Rewrite.
4612
4613 Fri Dec 19 16:44:22 2003  Ben Pfaff  <blp@gnu.org>
4614
4615         * quicksort.c: Removed (not used).
4616
4617         * quicksort.h: Removed (not used).
4618
4619         * sort.c: Removed blp_quicksort() prototype.
4620
4621 Fri Dec 19 16:42:13 2003  Ben Pfaff  <blp@gnu.org>
4622
4623         * postscript.c: (int_2_compare) Rewrite.
4624         (compare_line) Rewrite.
4625
4626 Fri Dec 19 16:38:35 2003  Ben Pfaff  <blp@gnu.org>
4627
4628         * matrix-data.c (compare_factors) Use lexicographical_compare()
4629         algorithm.
4630         (compare_doubles) New function.
4631         
4632         * algorithm.c: (lexicographical_compare) New algorithm.
4633
4634 Fri Dec 19 16:23:45 2003  Ben Pfaff  <blp@gnu.org>
4635
4636         * matrix-data.c (compare_variables_by_mxd_vartype): Rewrite.
4637
4638 Fri Dec 19 15:54:45 2003  Ben Pfaff  <blp@gnu.org>
4639
4640         * expr-prs.c: (cmp_func) Removed.
4641         (parse_function) Use binary_search() algorithm.
4642         (compare_functions) New function.
4643         (init_func_tab) Use sort() algorithm.
4644
4645         * algorithm.c: (binary_search) New algorithm.
4646
4647 Fri Dec 19 15:50:45 2003  Ben Pfaff  <blp@gnu.org>
4648
4649         * descript.q: (display) Use sort() algorithm instead of qsort().
4650         (compare_func) Removed.
4651         (descriptives_compare_variables) New function.
4652
4653 Fri Dec 19 15:08:38 2003  Ben Pfaff  <blp@gnu.org>
4654
4655         Get rid of AVL trees.  Hashes are more appropriate for everything
4656         PSPP does.
4657
4658         * Makefile.am: (pspp_SOURCES) Remove avl.c, avl.h.
4659         
4660         * avl.c: Removed.
4661
4662         * avl.h: Removed.
4663
4664 Fri Dec 19 14:33:31 2003  Ben Pfaff  <blp@gnu.org>
4665
4666         Much code can be clarified by using C++ STL-like algorithms.  Not
4667         all uses of these algorithms are listed below, only the ones where
4668         the change to an algorithm was the only change of interest.
4669         
4670         * Makefile.am: (pspp_SOURCES) Add algorithm.c, algorithm.h.
4671         
4672         * algorithm.c: New file.
4673
4674         * algorithm.h: New file.
4675
4676         * modify-vars.c: (static var forward) Removed.
4677         (static var positional) Removed.
4678         (compare_variables) Removed.
4679         (struct ordering) New.
4680         (cmd_modify_vars) Use sort() algorithm.
4681         (compare_variables_given_ordering) New function.
4682         (rearrange_dict) Use sort() algorithm.
4683
4684         * sysfile-info.c: (cmd_display) Use sort() algorithm.
4685         (cmp_var_by_name) Removed.
4686
4687 Fri Dec 19 14:26:17 2003  Ben Pfaff  <blp@gnu.org>
4688
4689         Make file handles use a hash table.
4690         
4691         * file-handle.q: (files) Change to hash table, make static.
4692         (cmd_file_handle) Use hash table functions.
4693         (fh_get_handle_by_filename) Ditto.
4694         (fh_get_handle_by_name) Ditto.
4695         (hash_file_handle) New function.
4696         (cmp_file_handle) Rewrite.
4697         (fh_init_files) Use hash table functions.
4698
4699 Fri Dec 19 14:24:38 2003  Ben Pfaff  <blp@gnu.org>
4700
4701         Clean up FREQUENCIES.
4702         
4703         * Makefile.am: (pspp_SOURCES) Remove frequencies.g.
4704
4705         * frequencies.q: Remove a lot of old #if'd out code at the end.
4706         (internal_cmd_frequencies) Use calc() instead of calc_no_weight()
4707         or calc_weight().  Initialize percentile_values.
4708         (calc) New function based on calc_weight() from frequencies.g.
4709         (precalc) Use hash functions.
4710         (static var comparison_func) Removed.
4711         (static var comparison_param) Removed.
4712         (comparison_helper) Removed.
4713         (get_freq_comparator) New function.
4714         (not_missing) New function.
4715         (add_freq) Removed.
4716         (postprocess_freq_tab) Use hash table functions, algorithms,
4717         get_freq_comparator().  Rewrite.
4718         (cleanup_freq_tab) Rephrase.
4719         (add_percentile) Clean up spacing.
4720         (hash_value_numeric) New function.
4721         (hash_value_alpha) New function.
4722         (compare_value_numeric_a) Rewrite.
4723         (compare_value_alpha_a) Rewrite.
4724         (compare_value_numeric_d) Rewrite.
4725         (compare_value_alpha_d) Rewrite.
4726         (compare_freq_numeric_a) Rewrite.
4727         (compare_freq_alpha_a) Rewrite.
4728         (compare_freq_numeric_d) Rewrite.
4729         (compare_freq_alpha_d) Rewrite.
4730         (calc_stats) Clean up mode, percentiles, max.
4731         (dump_statistics) Clean up spacing.
4732         
4733         * frequencies.g: Removed.
4734
4735         * var.h: (struct freq_tab) Change `data' to hash table.
4736
4737 Fri Dec 19 14:15:46 2003  Ben Pfaff  <blp@gnu.org>
4738
4739         * file-handle.h: Remove declaration of global variable `files',
4740         which wasn't used anywhere.
4741
4742         * postscript.c: (add_encoding) Remove superfluous cast.
4743         (line) Ditto.
4744
4745         * sfm-read.c: [linux] (bswap_int32) Drop ntohl() non-portable
4746         version.
4747
4748         * temporary.c: [0] (display_tree) Removed.
4749
4750 Fri Dec 19 14:13:04 2003  Ben Pfaff  <blp@gnu.org>
4751
4752         Implement a new random number generator based on the alleged RC4
4753         algorithm.
4754
4755         * expr-evl.c: (expr_evaluate) Use rng_get_double_normal() instead
4756         of rand_normal().
4757
4758         * random.c: [!HAVE_GOOD_RANDOM] (real_rand) Removed.
4759         [!HAVE_GOOD_RANDOM] (real_srand) Removed.
4760         (macro k) Removed.
4761         (static var V[]) Removed.
4762         (static var Y) Removed.
4763         (static var X2) Removed.
4764         (setup_randomize) Removed.
4765         (shuffle) Removed.
4766         (rand_uniform) Removed.
4767         (rand_normal) Removed.
4768         (struct rng) New structure.
4769         (rng_create) New function.
4770         (rng_destroy) New function.
4771         (swap_byte) New static function.
4772         (rng_seed) New function.
4773         (rng_get_bytes) New function.
4774         (rng_get_int) New function.
4775         (rng_get_unsigned) New function.
4776         (rng_get_double) New function.
4777         (rng_get_double_normal) New function.
4778         (pspp_rng) New function.
4779
4780         * random.h: Sync up to random.c.
4781
4782         * sample.c: (struct sample_trns) Make `frac' unsigned and a
4783         fraction of UINT_MAX, not 65536.
4784         (cmd_sample) Use rng_get_unsigned(), rng_get_double(), UINT_MAX
4785         fraction.
4786
4787         * vfm.c: (open_active_file) No need to call setup_randomize() any
4788         longer.
4789
4790 Fri Dec 19 12:05:56 2003  Ben Pfaff  <blp@gnu.org>
4791
4792         Change dictionary name indexes to use hash tables instead of AVL
4793         trees.
4794
4795         * crosstabs.q: (free_var_dict) Use hash tables.
4796         (crs_custom_tables) Ditto.
4797         (calc_general) Ditto.
4798         (compare_table_entry) Rewrite.
4799         (enum_var_values) Reorder parameters.  All references updated.
4800         Rewrite.
4801
4802         * get.c: (rename_variable) Use hash tables.
4803         (mtf_merge_dictionary) Ditto.
4804
4805         * glob.c: (init_glob) Use hash tables.
4806         (cmp_variable) Removed.
4807
4808         * means.q: (mns_custom_tables) Use hash tables.
4809
4810         * modify-vars.c: (rearrange_dict) Use hash tables.
4811
4812         * rename-vars.c: (cmd_rename_variables) Use hash tables.
4813
4814         * sfm-read.c: (read_header) Use hash tables.
4815         (read_variables) Ditto.
4816
4817         * temporary.c: (new_dictionary) Use hash tables.
4818         (save_dictionary) Ditto.
4819         (restore_dictionary) Ditto.
4820
4821         * var.h: (struct dictionary) Change AVL tree `var_by_name' into
4822         hash table `name_tab'.
4823
4824         * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed.
4825         [DEBUGGING] (dump_var_tree) Removed.
4826         (find_variable) Use hash tables.
4827         (find_dict_variable) Ditto.
4828         (common_init_stuff) Ditto.
4829         (rename_variable) Ditto.
4830         (clear_variable) Ditto.  Also, remove debug code.
4831         (dup_variable) Use hash tables.
4832
4833         * vars-prs.c: (fill_all_vars) Use hash tables.
4834         (is_dict_varname) Ditto.
4835         (parse_dict_variable) Ditto.
4836         
4837 Fri Dec 19 11:46:23 2003  Ben Pfaff  <blp@gnu.org>
4838
4839         Change value labels to use hash tables instead of AVL trees, and
4840         change value labels into an ADT.
4841
4842         * Makefile.am: (pspp_SOURCES) Add value-labels.c, value-labels.h.
4843         
4844         * value-labels.c: New file.
4845
4846         * value-labels.h: New file.
4847
4848         * apply-dict.c: (cmd_apply_dictionary) Use value label ADT.
4849         Get rid of a stupid use of goto.
4850
4851         * autorecode.c: (compare_alpha_value) Rewrite.
4852         (hash_alpha_value) Ditto.
4853         (compare_numeric_value) Rewrite.
4854         (hash_numeric_value) Ditto.
4855
4856         * frequencies.q: (dump_full) Use value label ADT.
4857
4858         * pfm-read.c: (read_value_label) Use value label ADT.
4859
4860         * pfm-write.c: (write_value_labels) Use value label ADT.
4861
4862         * sfm-read.c: (read_variables) Use value label ADT.
4863         (read_value_labels) Rewrite.
4864
4865         * sfm-write.c: (write_value_labels) Rewrite.
4866
4867         * sysfile-info.c: (cmd_sysfile_info) Use value label ADT.
4868         (display_variables) Ditto.
4869         (describe_variable) Ditto.
4870
4871         * t-test.q: (print_t_groups) Use value label ADT.
4872
4873         * temporary.c: (copy_variable) Use value label ADT.
4874         (free_dictionary) Ditto.
4875
4876         * val-labs.c: (verify_val_labs) Use value label ADT.
4877         (get_label) Ditto.
4878         (debug_print) Ditto.
4879         (val_lab_cmp) Removed.
4880         (inc_ref_count) Removed.
4881         (copy_value_labels) Removed.
4882
4883         * var.h: (struct value_label) Removed.
4884         (struct variable) Change AVL tree `val_lab' into hash table
4885         `val_labs'.
4886
4887         * vars-atr.c: (init_variable) Use value label ADT.
4888         (clear_variable) Ditto.
4889         (free_value_label) Removed.
4890         (free_val_lab) Removed.
4891         (get_val_lab) Removed.
4892         (compare_variables) New function.
4893         (hash_variable) New function.
4894
4895         * vfm.c: (dump_splits) Use value label ADT.
4896
4897 Fri Dec 19 11:18:11 2003  Ben Pfaff  <blp@gnu.org>
4898
4899         Add to the hash table interface.
4900
4901         * hash.c: (hsh_hash_bytes) Add assertion.
4902         (hsh_hash_string) Ditto.
4903         (hsh_clear) Ditto.
4904         (hsh_rehash) Ditto.
4905         (hsh_probe) Ditto.
4906         (hsh_create) Ditto.  Also make minimum `size'.
4907         (hsh_destroy) Rephrase.
4908         (sort_nulls_last) Removed.
4909         (not_null) New function.
4910         (hsh_data) Ditto.
4911         (comparison_helper) Ditto.
4912         (hsh_sort) Rewritten.
4913         (hsh_data_copy) New function.
4914         (hsh_sort_copy) Ditto.
4915         (hsh_insert) Ditto.
4916         (hsh_replace) Ditto.
4917         (hsh_hash_double) Ditto.
4918         (hsh_delete) Fix stupid bug.
4919         
4920 Thu Dec 18 12:27:03 WAST 2003 John Darrington <john@darrington.wattle.id.au>
4921         * added a calculation of the mode to FREQUENCIES
4922
4923 Wed Dec 17 12:53:01 WAST 2003 John Darrington <john@darrington.wattle.id.au>
4924
4925         * moved (un)defs of DEBUGGING to config.h
4926
4927 Mon Dec 15 21:35:59 2003  Ben Pfaff  <blp@gnu.org>
4928
4929         * groff-font.c: (add_kern) Fix indentation.
4930         (add_kern) Use & instead of % to take power-of-2 modulus.
4931         (font_get_kern_adjust) Likewise.
4932
4933 Fri Dec 12 23:54:37 2003  Ben Pfaff  <blp@gnu.org>
4934
4935         * autorecode.c: (recode) Replace stupid use of memcpy() by
4936         memberwise copy.
4937         (hash_alpha_value) Use hsh_hash_bytes().  Get rid of nasty casts.
4938         (hash_numeric_value) Ditto.
4939         (autorecode_proc_func) pool_strdup() was wrong here because the
4940         source string was not null-terminated.  Use new pool_strndup()
4941         instead.
4942
4943         * crosstabs.q: (enum_var_values) Remove superfluous and bizarre
4944         use of hsh_iterator_init().
4945
4946         * data-in.c: (parse_N) Initialize i->v->f.
4947
4948         * flip.c: (cmd_flip) Use memmove(), not memcpy(), to copy
4949         overlapping arrays.
4950
4951         * groff-font.c: Use power-of-2 hash table sizes, not prime.
4952         (groff_read_font) Don't call hsh_next_prime().  Don't call
4953         fclose(NULL).
4954         (static var hash) Remove `size_p', `max_used' members.
4955         (font_char_name_to_index) Don't call hsh_next_prime().  Use
4956         hsh_hash_string() instead of hashpjw(), & instead of %.
4957         (default_font) Don't call hsh_next_prime().
4958
4959         * pool.c: (pool_strndup) New function.
4960         (pool_strdup) Reimplement in terms of pool_strndup.
4961
4962         * postscript.c: (hash_font_entry) Use hsh_hash_string().  Get rid
4963         of nasty casts.
4964         (hash_ps_encoding) Use hsh_hash_string().
4965         (hash_ps_combo) Use hsh_hash_string(), hsh_hash_int().
4966         (hash_filename2font) Use hsh_hash_string().
4967
4968         * som.c: Add #include <stdlib.h>.
4969
4970         * tab.c: (tab_destroy) Don't set t->container after freeing `t'
4971         (by destroying its pool).
4972         
4973 Fri Dec 12 23:18:59 2003  Ben Pfaff  <blp@gnu.org>
4974
4975         Miscellaneous hash table code cleanup:
4976         
4977         * hash.h: (struct hsh_table) Moved into hash.c.
4978         (hsh_count) Ditto, and transformed into function.
4979         (hsh_compare_func) New typedef, used for defining otherwise-long
4980         function types here and in hash.c
4981         (hsh_hash_func) Ditto.
4982         (hsh_free_func) Ditto.
4983         
4984         * hash.c: (struct hsh_table) Renamed `n' to `used', `m' to `size',
4985         `table' to `entries'.  Removed `mp'.  All references updated.
4986         (hsh_clear) Don't shrink entries array; if the hash was this big
4987         once, it probably will be again.
4988         (hsh_rehash) Made static.
4989         (force_hsh_insert) Renamed hsh_force_insert.
4990         (force_hsh_find) Renamed hsh_force_find.
4991
4992         Made hash table sizes powers of 2, because that's fine with any
4993         reasonable hash function and because taking a power-of-2 modulus
4994         is faster than any other:
4995         
4996         (hsh_prime_tab) Removed;
4997         (hsh_next_prime) Ditto.
4998         (next_power_of_2) New function.
4999         (hsh_create) Use next_power_of_2.
5000         (hsh_rehash) Use & instead of %.
5001
5002         Cleaned up hsh_sort:
5003         
5004         (internal_comparison_fn) Removed.
5005         (sort_nulls_last) New function.
5006         (hsh_sort) Removed second parameter, switched to using the new
5007         quicksort() function from quicksort.h to avoid using nasty need
5008         for static variables with qsort().  All references updated.
5009
5010         Changed the hash functions offered, because there are better hash
5011         functions than the ones we had, and cleaned up the names to boot:
5012         
5013         * hash.c: (hashpjw_d) Removed.
5014         (hashpjw) Ditto.
5015         (hsh_hash_bytes) New function.
5016         (hsh_hash_string) New function.
5017         (hsh_hash_int) New function.
5018
5019         Improved the hash table iteration interface:
5020         
5021         * hash.h: (hsh_iterator_init) Removed.
5022         (struct hsh_iterator) Removed `init' member, change `next' to
5023         size_t.
5024
5025         * hash.c: (hsh_foreach) Removed.  All references updated to use
5026         hsh_first/hsh_next instead.
5027         (hsh_first) New function.  Notably, unlike hsh_foreach() it does
5028         not treat a null pointer as an empty hash table.
5029         (hsh_next) New function.
5030
5031         Made deletion possible, though slow:
5032
5033         * hash.c: (locate_matching_entry) New function.
5034         (hsh_find) Use locate_matching_entry().
5035         (hsh_delete) New function also using locate_matching_entry().
5036         (hsh_force_delete) New function.
5037
5038 Fri Dec 12 23:16:10 2003  Ben Pfaff  <blp@gnu.org>
5039
5040         * quicksort.c: New file implementing a sort routine with a
5041         interface better than qsort() because it passes a user-provided
5042         parameter to the sort routine.
5043
5044         * Makefile.am: Add quicksort.c, quicksort.h.
5045
5046 Fri Dec 12 13:31:58 2003  Ben Pfaff  <blp@gnu.org>
5047
5048         * All source files: Get rid of nasty special cases for Checker,
5049         which is pretty obsolete now.
5050
5051 Thu Dec 11 21:38:24 WST 2003 John Darrington <john@darrington.wattle.id.au>
5052
5053         * Fixed a bug apparent when using the FREQUENCIES command with the
5054         html driver.  The html driver was incorrectly trying to display 
5055         empty cells.
5056
5057 Sun Jan  2 21:40:13 2000  Ben Pfaff  <blp@gnu.org>
5058
5059         * Makefile.am: Reorganized.  Put locale dir in version.c instead
5060         of passing it to each compile command.  Only put local gmp libs in
5061         LD_ADD if not installed on system.  Remove `boast' target.
5062
5063         * All source files: struct and union typedefs eliminated.
5064         `sizeof type' replaced by `sizeof object' where practical.  Moved
5065         `unused' qualifiers from start to end of declarations for gcc
5066         2.7.2 compatibility.  Change `while (1)' to `for (;;)'.  Made
5067         assertions on pointers strictly compliant.  Removed _ prefixes on
5068         some function parameter names.
5069
5070         * alloc.c: New source file, containing these external linkage
5071         functions removed from common.c: xmalloc, xcalloc, xrealloc,
5072         xstrdup.
5073
5074         * arena.c: Removed.
5075         
5076         * arena.h: Removed.
5077
5078         * ascii.c: Migrated from arenas to pools.
5079         (struct ascii_driver_ext) ops[], box[], fonts[] changed from
5080         c_string to len_string.  All references changed.
5081         (ascii_option) Signature changed to comply to new output.c
5082         interface.
5083         (count_fancy_chars) Removed.
5084         (delineate) Removed support for rich text.
5085         (ascii_text_metrics) Ditto.
5086         (text_draw) Ditto.
5087         (output_shorts) Change `box', `off', `on' from c_string to
5088         len_string.  Change `remaining' from int to size_t.
5089         (ascii_close_page) Make page numbering less haphazard.
5090
5091         * autorecode.c: Migrate from arenas to pools.
5092
5093         * avl.c: Migrate from arenas to pools.  Synch from libavl 1.4.0.
5094
5095         * bitvector.h: New file containing these macros from misc.h:
5096         SET_BIT, CLEAR_BIT, SET_BIT_TO, TEST_BIT, BIT_INDEX.
5097
5098         * command.c: (struct command) cmd1, cmd2, cmd3 members changed to
5099         word[3].  ncmd removed.
5100         (var empty_string) Removed.
5101         (var cmd_table) Declaration updated.
5102         (var cmdtab) Removed.
5103         (cmp_command) Removed.
5104         (split_words) Rewritten to use strtok_r().
5105         (init_cmd_parser) Renamed cmd_init().  Rewritten.
5106         (find_command) Removed.
5107         (FILE_TYPE_okay) Rewritten.
5108         (cmd_parse) Rewritten.  Semantics of the return value of command
5109         handlers has changed: they must now return one of the new CMD_*
5110         enumerals, rather than a magic value.  This meant that all
5111         commands had to be modified, and they were.
5112         (figure_out_command) New function.
5113
5114         * command.def: Add CORRELATIONS, PEARSON CORRELATIONS.  Add
5115         #defines for INIT, INPU, etc.
5116
5117         * command.h: New CMD_* enum series.
5118         (cur_proc) Make const char *, not char *.
5119         (cmd_init) Prototype.
5120         (cmd_parse) Ditto.
5121
5122         * common.c: Removed.
5123
5124         * common.h: Removed.
5125
5126         * correlations.q: New file.
5127
5128         * crosstabs.q: Migrate from arenas to pools.  Migrate to new-style
5129         q2c.
5130         (custom_tables) Renamed crs_custom_tables().
5131         (custom_variables) Renamed crs_custom_variables().
5132         (calc_integer) Add in some `const' qualifiers.
5133         (table_value_missing) Change from a_string to len_string.
5134         (float_M_suffix) Change from a_string to len_string.
5135
5136         * data-in.c: Rewritten.  All references to
5137         parse_string_as_format() changed to data_in().
5138
5139         * data-in.h: New file.
5140
5141         * data-list.c: Change DLS_* from #define's to enums.  Move from
5142         rpd_msg() to tmsg().
5143         (RPD_ERR) New #define.
5144         (do_reading) Change dfm_push_cust() to dfm_push(), pop_cust() to
5145         dfm_pop().
5146         (read_from_data_list_fixed) Change from old
5147         parse_string_as_format() to new data_in().
5148         (read_from_data_list_free) Ditto.
5149         (read_from_data_list_list) Ditto.
5150         (cmd_repeating_data) Modify approach to checking for end of
5151         command.
5152         (rpd_msg) Removed.
5153         (rpd_parse_record) Change from old parse_string_as_format() to new
5154         data_in().  Change from old convert_format_to_string() to new
5155         data_out().
5156         (read_one_set_of_repetitions) Change dfm_push_cust() to
5157         dfm_push(), pop_cust() to dfm_pop().
5158
5159         * data-out.c: Rewritten.  All references to
5160         convert_format_to_string() changed to data_out().
5161
5162         * descript.q: Migrate to new q2c.
5163         (cmd_descriptives) Removed.
5164         (internal_cmd_descriptives) Renamed cmd_descriptives ().
5165         (custom_variables) Renamed dsc_custom_variables().
5166
5167         * dfm.c: (struct dfm_fhuser_ext) `ln' removed.  All references
5168         removed.
5169         (open_file_r) Initialize h->where.line_number.  Migrate to new
5170         struct string.
5171         (open_file_w) Initialize h->where.line_number.
5172         (read_record) Change from ext->ln to h->where.line_number.
5173         Migrate to struct string.
5174         (dfm_put_record) Rephrased.
5175         (dfm_push_cust) Renamed dfm_push(), rewritten.
5176         (dfm_pop) New function.
5177
5178         * error.c: All references updated.
5179         (glob var error_count) Renamed err_err_count.
5180         (glob var warning_count) Renamed err_warning_count.
5181         (glob var error_already_flagged) Renamed err_already_flagged.
5182         (glob var verbosity) Renamed err_verbosity.
5183         (glob var cust_fn) Removed.
5184         (glob var cust_ln) Removed.
5185         (static var file_loc) New.
5186         (static var nfile_loc) New.
5187         (static var mfile_loc) New.
5188         (tmsg) New function.
5189         (push_cust) Removed.
5190         (pop_cust) Removed.
5191         (msg) Rewritten.
5192         (static var terminating) Removed.
5193         (failure) Renamed err_failure().
5194         (hcf) Renamed err_hcf().
5195         (err_push_file_locator) New function.
5196         (err_pop_file_locator) New function.
5197         (err_location) New function.
5198         (check_error_count) Renamed err_check_count().
5199         (vmsg) Renamed err_vmsg().  Interface changed.
5200         (verbose_msg) Removed.
5201         (err_cond_fail) New function.
5202         (error_break) Renamed err_break().
5203
5204         * error.h: All references updated.
5205         (enum MSG_CLASS_COUNT) Renamed ERR_CLASS_COUNT.
5206         (enum ERR_CLASS_MASK, ERR_VERBOSITY_SHIFT, ERR_VERBOSITY_MASK)
5207         New.
5208         (struct file_locator) New.
5209         (struct error) New.
5210         (macro verbose_msg) Removed.
5211         (macro cond_fail) Removed.
5212
5213         * expr-opt.c: (evaluate_tree) sizeof(char) == 1.
5214
5215         * expr-prs.c: Reorganized.  All references updated.
5216         (exprtypename) Renamed expr_type_name().
5217         (typename) Renamed type_name().
5218         (free_expression) Renamed expr_free().
5219         (parse_expression) Renamed expr_parse().  Uses new type_check()
5220         function.
5221         (init_functab) Renamed init_func_tab().
5222         (type_check) New function.
5223         (parse_or) Rewritten to use new allocate_nonterminal() and
5224         append_nonterminal_arg() functions.
5225         (parse_and) Ditto.
5226         (parse_not) Ditto.
5227         (parse_rel) Ditto.  Also simplified logic.
5228         (parse_add) Ditto.
5229         (parse_mul) Ditto.
5230         (parse_neg) Ditto.
5231         (parse_exp) Ditto.
5232         (SYSMIS_func) Ditto.
5233         (VALUE_func) Rephrased.
5234         (CONCAT_func) Fix memory leak by replacing free by free_node on
5235         lossage.
5236         (generic_str_func) Ditto.
5237         (parse_function) Ditto.  Also rephrasings.  Uses bsearch() to find
5238         function.
5239         (allocate_nonterminal) New function.
5240         (append_nonterminal_arg) New function.
5241         (static func_tab[]) Now at file level.
5242         (cmp_func) Moved.
5243         (init_func_tab) Moved.  Now just uses qsort() to sort func_tab[].
5244
5245         * expr.h: (enum series OP_*) Moved to exprP.h.
5246         (OP_* defines) Ditto.
5247         (struct op_desc) Ditto.
5248         (global ops[]) Ditto.
5249         (struct num_con_node) Ditto.
5250         (struct str_con_node) Ditto.
5251         (struct var_node) Ditto.
5252         (struct lag_node) Ditto.
5253         (struct casenum_node) Ditto.
5254         (struct nonterm_node) Ditto.
5255         (union any_node) Members renamed.
5256         (struct sys_node) Removed.
5257         (struct val_node) Removed.
5258         (operator typedef) Removed.
5259         (typedef exprtype) Removed.
5260         (enum series EX_*) Moved to exprP.h.
5261         (struct expression) Ditto.  Also renamed a lot of the members.
5262         (PXP_* defines) Changed to enums.
5263         (free_node prototype) Moved to exprP.h.
5264
5265         * file-handle.h: (struct file_handle) New member `where'.
5266
5267         * file-handle.q: Migrated to new q2c format.
5268         (prepend_current_directory) Removed (dead code).
5269         (cmd_file_handle) Incorporated all of internal_cmd_file_handle().
5270         (fh_get_handle_by_filename) Removed dead code.
5271         Set new `where' member.
5272
5273         * file-type.c: (file_type_source_read) References to
5274         parse_string_as_format() changed to data_in().
5275         dfm_push_cust()/pop_cust() changed to dfm_push()/dfm_pop().
5276
5277         * filename.c: All references updated.
5278         (init_filename) Renamed fn_init().
5279         (expand_line) Removed.
5280         (macro EXPAND_LINE) Removed.
5281         (interp_vars) Renamed fn_interp_vars().  Now uses st_*() instead
5282         of custom functions.
5283         (gnu_getcwd) Renamed fn_get_cwd(), rewritten.
5284         (tilde_expand) Renamed fn_tilde_expand(), uses ds_*().
5285         (normalize_filename) Renamed fn_normalize().
5286         (search_path) Renamed fn_search_path(), rewritten.
5287         (prepend_dir) Renamed fn_prepend_dir().
5288         (blp_getenv) Renamed fn_getenv().
5289         (blp_dirname) Renamed fn_dirname().
5290         (fn_basename) New function, not used.
5291         (absolute_filename_p) Renamed fn_absolute_p().
5292         (is_special_filename) Renamed fn_special_p().
5293         (file_exists) Renamed fn_exists_p().
5294         (readlink_malloc) Renamed fn_readlink().
5295         (getenv_default) Renamed fn_getenv_default().
5296         (open_file) Renamed fn_open().
5297         (close_file) Renamed fn_close().
5298         (open_file_ext) Renamed fn_open_ext().
5299         (close_file_ext) Renamed fn_close_ext().
5300
5301         * font.h: Migrate from arenas to pools.
5302
5303         * format.c: (parse_format_specifier_name) Deal with ds_* strings.
5304
5305         * frequencies.g: Migrate from arenas to pools.
5306
5307         * frequencies.q: Migrate to new q2c version.  Migrate from arenas
5308         to pools.
5309
5310         * getline.c: All references updated.
5311         (global getl_buf) Changed from char * to struct string.
5312         (static getl_include_path) Ditto.
5313         (global getl_buf_len) Removed.
5314         (global getl_buf_size) Removed.
5315         (getl_include_path) Deal with new getl_buf, getl_include_path.
5316         (getl_uninitialize) New function.
5317         (getl_get_current_directory) Rewritten.
5318         (getl_clear_include_path) Rewritten.
5319         (getl_add_include_dir) Rewritten.
5320         (getl_add_file) Assertion fixed.
5321         (getl_add_virtual_file) Change initial value of `remaining_loops'
5322         from 2 to 1.
5323         (welcome) Rewritten.
5324         (handle_line_buffer) Make static.  Change logic to make
5325         getl_add_virtual_file() change sensible.  Use ds_*() strings.
5326         (getl_read_line) Use ds_*() strings.  Implement SET ECHO.
5327         (getl_close_file) Moved.
5328         (getl_location) New function.
5329
5330         * getline.h: All references updated.
5331         (macro curln) Removed.
5332         (macro curfn) Removed.
5333         (macro am_interactive) Renamed getl_am_interactive.
5334         (macro am_reading_script) Renamed getl_reading_script.
5335
5336         * glob.c: (global fmt_parse_ignore_error) Removed.
5337         (init_glob) Use locale_dir not LOCALEDIR.  Use feholdexcept() on
5338         systems that support it (C99).  Turn off SET ECHO by default.  No
5339         necessary julcal initialization anymore.
5340
5341         * groff-font.c: Migrate from arenas to pools.
5342         (groff_read_font) Use err_push_file_locator().
5343         (groff_read_DESC) Ditto.
5344         (font_msg) Use tmsg().
5345
5346         * hash.c: (hsh_sort) Fix debug code.
5347         [GLOBAL_DEBUGGING] Include stdio.h.
5348
5349         * hash.h: (macro force_hsh_insert) Rephrase.
5350
5351         * heap.c: Rewritten.
5352         
5353         * heap.h: Rewritten.
5354
5355         * html.c: (html_option) Change from outp_value to struct string.
5356         (postopen) Change from curfn to getl_location().
5357         (escape_string) Remove rich-text code.  Signature changed.
5358         (output_tab_table) Switch from a_string to struct len_string.
5359         Remove rich text support.
5360
5361         * lexer.c: All references updated.  Largely rewritten.  Major
5362         changes listed below.  Removed tagged quote support.  Adapted to
5363         struct string tokstr.
5364         (global tokstr) Changed to struct string.
5365         (global tokstr_size) Removed.
5366         (global tokstr_len) Removed.
5367         (global tokid) New.
5368         (global tokint) Removed.
5369         (global toklongstr) Removed.
5370         (C* defines) Removed.
5371         (static tbl[]) Removed.
5372         (static id[]) Removed.
5373         (static une[]) Removed.
5374         (discard_line) Renamed lex_discard_line().
5375         (get_entire_line) Renamed lex_entire_line().
5376         (get_rest_of_line) Renamed lex_rest_of_line().
5377         (get_dotted_rest_of_line) Merged into lex_rest_of_line().
5378         (make_hexit) Removed.
5379         (syntax_error) Renamed lex_error().  Return value removed.
5380         (get_token_representation) Renamed lex_token_representation().
5381         (putback) Renamed lex_put_back().
5382         (putfwd) Renamed lex_put_forward().
5383         (convert_negative_to_dash) Renamed lex_negative_to_dash().
5384         (set_prog) Renamed lex_set_prog().
5385         (init_lex) Renamed lex_init().
5386         (reset_eof) Renamed lex_reset_eof().
5387         (lookahead) Renamed lex_look_ahead().
5388         (check_id) Rewritten.
5389         (yylex) Renamed lex_get(), rewritten.
5390         (lex_end_of_command) New function.  Many commands were rephrased
5391         using this.
5392         (lex_integer_p) New function.  Replaces compare of tokint against
5393         NOT_LONG.
5394         (lex_integer) New function.  Replaces tokint.
5395         (match_tok) Renamed lex_match().
5396         (match_id) Renamed lex_match_id().
5397         (match_int) Renamed lex_match_int().
5398         (force_match_id) Renamed lex_force_match_id(), added return value.
5399         (force_match) Renamed lex_force_match(), added return value.
5400         (force_string) Renamed lex_force_string(), added return value.
5401         (force_int) Renamed lex_force_int(), added return value.
5402         (lex_id_match_len) New function.
5403         (id_match) Renamed lex_id_match(), rewritten.
5404         (get_line) Renamed lex_get_line().
5405         (preprocess_line) Renamed lex_preprocess_line().
5406         (tokname) Renamed lex_token_name().
5407         (bin_value_func) Removed.
5408         (oct_value_func) Removed.
5409         (hex_value_func) Removed.
5410         (unexpected_eof) New function.
5411         (convert_numeric_string_to_char_string) New function.
5412         (parse_string) Rewritten, signature changed.
5413         (add_tokstr_char) Removed.
5414         (add_tokstr_unsigned) Removed.
5415         (add_tokstr_string) Removed.
5416         (parse_tagged_quote) Removed.
5417         (skip_comment) Renamed lex_skip_comment().
5418
5419         * lexer.h: All references updated.
5420         (macro is_id1) Renamed CHAR_IS_ID1.
5421         (macro is_idn) Renamed CHAR_IS_IDN.
5422         (token names ID, NUM, STRING, STOP, ... WITH, EXP) Renamed with
5423         prefix T_: T_ID, T_NUM, T_STRING, T_STOP, ... T_WITH, T_EXP.
5424         (macro get_token) Removed.
5425         (macro id_match) Removed.
5426         (macro force_match_id) Removed.
5427         (macro force_match) Removed.
5428         (macro force_string) Removed.
5429         (macro force_int) Removed.
5430         (macro force_num) Removed.
5431         (macro force_id) Removed.
5432
5433         * lexerP.h: Removed.
5434
5435         * list.q: Migrated to new q2c format.
5436         (write_line) Deal with struct len_string.
5437         (write_varname) Ditto.
5438         (write_fallback_headers) Ditto.
5439
5440         * magic.c: New file, incorporating the following global variables
5441         previously in other files: endian, second_lowest_value.  And both
5442         of those are conditional on #define's.
5443
5444         * magic.h: New file, incorporating the following global variable
5445         declarations: endian, second_lowest_value, and the following macro
5446         declarations: NOT_DOUBLE, NOT_LONG, NOT_INT.
5447
5448         * main.c: Added declarations of pgmname, finished, curdate,
5449         start_interactive.
5450         (main) Call new parse_script() function.
5451         (parse_script) New function.
5452         (execute_command) New function.
5453         (dump_token) Removed.
5454         (handle_error) New function.
5455
5456         * matrix.c: New file.
5457
5458         * matrix.h: New file.
5459
5460         * matrix-data.c: Migrated from arenas to pools.
5461         (mget_token) Change from parse_string_as_format() to data_in().
5462
5463         * means.q: Migrate to new q2c.
5464         (custom_tables) Renamed mns_custom_tables().
5465         (custom_crossbreak) Renamed mns_custom_crossbreak().
5466         (custom_variables) Renamed mns_custom_variables().
5467
5468         * mis-val.c: (static var width) Changed from `int' to `size_t'.
5469         (parse_varnames) Prototype.
5470         (parse_numeric) Rephrasings.
5471         (parse_alpha) Adapt to new struct string tokstr.
5472
5473         * misc.c: (intlog10) Rewritten.
5474         (spacing) Removed.
5475         (ansi_rand) Renamed real_rand(), moved into random.c.
5476         (ansi_srand) Renamed real_srand(), moved into random.c.
5477         (setup_randomize) Moved to random.c.
5478         (rand_uniform) Ditto.
5479         (rand_normal) Ditto.
5480         (rand_simple) Ditto.
5481         (get_config_line) Removed.
5482         (reverse) Removed (dead code).
5483
5484         * misc.h: (macro SET_BIT) Moved to bitvector.h.
5485         (macro CLEAR_BIT) Ditto.
5486         (macro TEST_BIT) Ditto.
5487         (macro SET_BIT_TO) Ditto.
5488         (macro BIT_INDEX) Ditto.
5489
5490         * output.c: (outp_read_devices) Move to err_push_file_locator()
5491         from push_cust().  Use struct string.
5492         (expand_op_tokstr) Removed.
5493         (static var op_tokstr) Changed to struct string.
5494         (static var op_tokstr_size) Removed.
5495         (tokener) Rephrasings.  Use struct string.
5496         (parse_options) Use struct string.
5497         (destroy_driver) Fix assertion.
5498         (outp_get_paper_size) Move to err_push_file_locator().
5499         [0] Removed dead code.
5500         (outp_string_width) Move to len_string.
5501
5502         * output.h: Comment fixes.
5503         (TAG_* enum series) Removed.
5504         (struct outp_value) Removed.
5505         (enum OUTP_T_FANCY) Removed.
5506         (struct outp_text) `s' changed from a_string to len_string.
5507         (struct outp_class) `option' change arg 3 from outp_value to
5508         struct string.
5509
5510         * pfm-read.c: (corrupt_msg) Rewritten.
5511
5512         * pfm-write.c: (bufwrite) Fix assertion.
5513
5514         * pool.c: New file, reference version.
5515
5516         * pool.h: New file, reference version.
5517
5518         * postscript.c: (ps_font_sizes) Fix assertion.
5519         (ps_option) Change arg 3 from outp_value to struct string.
5520         Adapt to struct string.
5521         (macro output_line) Removed.
5522         (macro add_string) Removed.
5523         (output_encodings) Adapted to struct string.  Moved to
5524         err_push_file_locator().
5525         (find_encoding_file) Fix assertion.
5526         (read_ps_encodings) Move to err_push_file_locator().
5527         (postopen) Use getl_location() instead of curfn.
5528         (out_text_plain) Move to len_string.
5529         (text) Ditto.  Remove rich text support.
5530
5531         * print.c: (cmd_print) Remove now-unneeded resource cleanup code.
5532         (cmd_print_eject) Ditto.
5533         (cmd_write) Ditto.
5534         (internal_cmd_print) Now cleans up after itself.  Uses
5535         fh_parse_file_handle() now.
5536         (cmd_print_space) Use PXP_NUMERIC to type-check.
5537
5538         * q2c.c: Overhauled.  Removed _("") i18n support.  All references
5539         updated.  All output functions updated to handle structures rather
5540         than local or static variables.  Adapt to new PSPP lex_*()
5541         functions.
5542         (macro _) Removed.
5543         (macro N_) Removed.
5544         (macro MAX_N_SBC) Removed.
5545         (global bare) Removed.
5546         (enum STRING) Renamed T_STRING.
5547         (enum ID) Renamed T_ID.
5548         (get_buffer) Buffer size increased.
5549         (strlower) Renamed st_lower(), rephrased.
5550         (strupper) Renamed st_upper(), rephrased.
5551         (skip_ws) New function.
5552         (get_line) Don't special-case any types of lines (like those
5553         beginning with ! or $, for instance).
5554         (get_token) Renamed lex_get().  Rephrased.
5555         (static var `prefix') New.
5556         (parse) New function.
5557         (parse_setting) Minor rephrasing.
5558         (dump_specifier_vars) Ditto.
5559         (make_identifier) Put null terminator on identifier, duh.
5560         (dump_vars) Renamed dump_declarations().  Never indent.  Never
5561         static.  Output changed entirely.
5562         (dump_specifier_init) Rephrase.
5563         (dump_vars_init) No index variable needed.  Other modifications.
5564         (dump_parser) Don't parse command name.  Do dump functions instead
5565         of just code fragments.
5566         (dump_free) Dump function instead of code fragment.
5567         (recognize_directive) New function.
5568         (main) Use recognize_directive().  Don't rely on magic $ line
5569         beginning: instead, parse comments.  Update list of headers.
5570
5571         * random.c: New file, containing the following functions:
5572         real_rand(), real_srand(), setup_randomize, shuffle, rand_uniform,
5573         rand_normal, rand_simple.
5574
5575         * random.h: New file.
5576
5577         * recode.c: (cmd_recode) Merge internal_cmd_recode() into this
5578         function.  `max_src_width', `max_dst_width' changed to size_t.
5579         (internal_cmd_recode) Removed.
5580         (parse_dest_spec) Merge similar cases.
5581         (parse_src_spec) Add assertion.
5582
5583         * repeat.c: (recognize_keyword) New function.
5584         (internal_cmd_do_repeat) Parse and handle PRINT keyword on END
5585         REPEAT.  Improve recognition of END REPEAT (use
5586         recognize_keyword()).  Move from curfn to getl_location().  Use
5587         struct string.
5588                 
5589         (perform_DO_REPEAT_substitutions) Adapt to struct string.
5590
5591         * set.q: Adapt to new q2c.
5592         (cmd_set) Range-check some values better.
5593         (custom_blanks) Renamed stc_custom_blanks().
5594         (custom_length) Renamed stc_custom_length().
5595         (custom_results) Renamed stc_custom_results().
5596         (custom_seed) Renamed stc_custom_seed().
5597         (custom_width) Renamed stc_custom_width().
5598         (custom_format) Renamed stc_custom_format().
5599         (custom_journal) Renamed stc_custom_journal().
5600         (custom_color) Renamed stc_custom_color().
5601         (custom_listing) Renamed stc_custom_listing().
5602         (custom_disk) Renamed stc_custom_disk().
5603         (custom_log) Renamed stc_custom_log().
5604         (custom_rcolor) Renamed stc_custom_rcolor().
5605         (custom_viewlength) Renamed stc_custom_viewlength().
5606         (custom_workdev) Renamed stc_custom_workdev().
5607
5608         * settings.h: Not necessary to include format.h any longer.
5609
5610         * sfm-read.h: (macro bswap_int32) Moved here from sfmP.h.
5611         (corrupt_msg) Rewritten.
5612
5613         * sort.c: Adapt to rewritten heap ADT.
5614
5615         * str.c: (aa_strcpy) Removed.
5616         (ab_strcpy) Removed.
5617         (ac_strcpy) Removed.
5618         (ba_strcpy) Removed.
5619         (bb_strcpy) Removed.
5620         (ca_strcpy) Removed.
5621         (aa_strdup) Removed.
5622         (aa_strdupcpy) Removed.
5623         (ba_strdup) Removed.
5624         (sa_strdup) Removed.
5625         (memrev) Renamed mm_reverse().
5626         (memrmem) Renamed mm_find_reverse().
5627         (cmp_str) Renamed st_compare_pad().
5628         (strmaxcpy) Removed.
5629         (strbarepadcpy) Renamed st_bare_pad_copy(), signature changed.
5630         (strbarepadlencpy) Renamed st_bare_pad_len_copy(), signature
5631         changed.
5632         (strpadcpy) Renamed st_pad_copy(), signature changed.
5633         (blpstrset) Removed.
5634         (ds_create) New function.
5635         (ds_init) New function.
5636         (ds_replace) New function.
5637         (ds_destroy) New function.
5638         (ds_clear) New function.
5639         (ds_extend) New function.
5640         (ds_shrink) New function.
5641         (ds_truncate) New function.
5642         (ds_length) New function.
5643         (ds_size) New function.
5644         (ds_value) New function.
5645         (ds_end) New function.
5646         (ds_concat) New function.
5647         (ds_concat_buffer) New function.
5648         (ds_printf) New function.
5649         (ds_putchar) New function.
5650         (ds_getline) New function.
5651         (ds_get_config_line) New function derived from the old
5652         misc.c:get_config_line().
5653         (ls_create) New function.
5654         (ls_create_buffer) New function.
5655         (ls_init) New function.
5656         (ls_shallow_copy) New function.
5657         (ls_destroy) New function.
5658         (ls_null) New function.
5659         (ls_null_p) New function.
5660         (ls_empty_p) New function.
5661         (ls_length) New function.
5662         (ls_value) New function.
5663         (ls_end) New function.
5664
5665         * str.h: Reformatted.
5666         (struct a_string) Removed.
5667         (struct b_string) Removed.
5668         (struct c_string) Removed.
5669         (struct len_string) New.
5670         (struct string) New.
5671         (macro as_streq) Removed.
5672         (macro bs_streq) Removed.
5673         (macro cs_streq) Removed.
5674         (macro sa_streq) Removed.
5675         (macro sb_streq) Removed.
5676         [__GNUC__] (inline function ds_putchar) New function.
5677         [__GNUC__] (inline function ds_length) New function.
5678         [__GNUC__] (inline function ds_value) New function.
5679         [__GNUC__] (inline function ds_end) New function.
5680
5681         * sysfile-info.c: (cmd_sysfile_info) Rephrased.
5682         (display_vectors) Fix missing i18n.
5683
5684         * t-test.q: Migrate to new q2c.
5685
5686         * tab.c: Migrate from arenas to pools.
5687         (tab_create) Use struct len_string.
5688         (tab_realloc) Ditto.
5689         (text_format) Ditto.
5690         (tab_joint_text) Ditto.
5691         (tab_natural_width) Remove rich text support.
5692         (tab_natural_height) Ditto.
5693         (tab_output_text) Handle TAT_FIX.
5694         (tab_raw) Change arg from a_string to len_string.
5695         (tabi_driver) Fix assertion.  Use struct len_string.
5696         (render_strip) Use struct len_string.  Remove rich text support.
5697         Add `const' qualifiers.
5698
5699         * tab.h: (enum TAB_RICH) Remove.
5700         (enums TAB_COL_NONE, TAB_COL_DONE) New.  Where appropriate,
5701         SOM_COL_* updated to read TAB_COL_*.
5702         (struct tab_table) Change arena to pool.  Change a_string to
5703         len_string.
5704
5705         * temporary.c: (restore_dictionary) Rewrite Checker code.
5706
5707         * var.h: (macros MAX_SHORT_STRING, MIN_LONG_STRING, SYSMIS,
5708         LOWEST, HIGHEST) Moved here from common.h.
5709         (typedef any_trns) Removed.  All references changed to `struct
5710         trns_header'.
5711
5712         * vars-atr.c: (force_create_variable) Fix assertion.
5713         (force_dup_variable) Fix assertion.
5714         
5715 Thu Jun  3 18:40:42 1999  Ben Pfaff  <blp@gnu.org>
5716
5717         Using alphanumeric variables in functions under AGGREGATE
5718         segfaulted.  Fixed.  Thanks to Dr. Dirk Melcher
5719         <BZN-mdksh@t-online.de> for reporting this bug.
5720         
5721         * aggregate.c: (parse_aggregate_functions) When setting the
5722         FSTRING bit, also allocate memory for the `string' member of
5723         agr_next.
5724         (free_aggregate_functions) Free iter->string.  Don't use the
5725         non-function bits when indexing the array of functions.
5726         [DEBUGGING] (debug_print) Don't use the non-function bits when
5727         indexing the array of functions.        
5728
5729 Sun May 30 00:00:54 1999  Ben Pfaff  <blp@gnu.org>
5730
5731         Under certain circumstances, the final case would be omitted from
5732         the results of an AGGREGATE operation.  Fixed.  Thanks to Dr. Dirk
5733         Melcher <BZN-mdksh@t-online.de> for reporting this bug.
5734         
5735         * aggregate.c (agr_00x_end_func): Increment number of cases in
5736         sink before writing case.  For streams that keep track of how many
5737         cases there are based on this value, this means that the last case
5738         will be read in on the next stream read.
5739
5740 Sat May 29 22:03:31 1999  Ben Pfaff  <blp@gnu.org>
5741
5742         Undefined behavior was invoked by referencing a freed pointer.
5743         
5744         * vfm.c (memory_stream_write): Free pointer *after* checking for
5745         non-null status.
5746
5747 Sat May 29 22:02:22 1999  Ben Pfaff  <blp@gnu.org>
5748
5749         A wrong record size was displayed when paging the active file to
5750         disk.
5751         
5752         * vfm.c: (memory_stream_write) Fix off-by-one error.
5753
5754 Sat May 29 21:50:26 1999  Ben Pfaff  <blp@gnu.org>
5755
5756         Not having enough temporary space for sorting caused a core dump.
5757         Fixed.
5758         
5759         * sort.c: (allocate_cases) Initialize i.
5760
5761 Sat May 29 21:40:54 1999  Ben Pfaff  <blp@gnu.org>
5762
5763         Syntax errors in function descriptions on AGGREGATE caused core
5764         dumps.  Fixed.
5765         
5766         * aggregate.c (cmd_aggregate): Don't free agr_dict after calling
5767         free_aggregate_functions(), since that function already frees
5768         agr_dict.
5769         
5770 Sat May 29 21:06:10 1999  Ben Pfaff  <blp@gnu.org>
5771
5772         A null pointer was dereferenced, causing a core dump, when
5773         PERCENTILES was specified on FREQUENCIES.  This fixes the problem,
5774         but PSPP still doesn't calculate percentiles.  Thanks to Regnor
5775         Jernsletten <rjernsle@eunet.no> for reporting this problem.
5776         
5777         * arena.c: (arena_malloc) If the arena hasn't been initialized
5778         already, initialize it.
5779
5780 Sat May 29 20:47:29 1999  Ben Pfaff  <blp@gnu.org>
5781
5782         * Makefile.cygwin: New file supplied by Hankin <hankin@dunno.com>
5783         for compilation with Cygnus Windows B20.  Not used by other
5784         systems.
5785
5786 Sat May 29 20:36:04 1999  Ben Pfaff  <blp@gnu.org>
5787
5788         SORT always sorted in ascending order.  Fixed.  Thanks to Dr. Dirk
5789         Melcher <BZN-mdksh@t-online.de> for reporting this bug.
5790
5791         * sort.c: (compare_case_lists) Reverse sense of comparison if
5792         sorting in descending order.
5793         (compare_record) Ditto.
5794
5795 Tue Mar  9 13:18:54 1999  Ben Pfaff  <blp@gnu.org>
5796
5797         SPLIT FILE with a string variable caused a core dump.  Fixed.
5798
5799         * vfm.c: If the variable is a string then make a temporary value
5800         struct pointing to it.  The underlying problem is a lot bigger
5801         than this (see TODO) but this is a stopgap for the simple case at
5802         least.
5803         
5804 Tue Mar  9 13:15:53 1999  Ben Pfaff  <blp@gnu.org>
5805
5806         Nested INCLUDEs didn't work.  Fixed.
5807
5808         * getline.c: (getl_include) Set first_line to NULL in allocated
5809         structure.
5810
5811 Tue Mar  9 13:13:46 1999  Ben Pfaff  <blp@gnu.org>
5812
5813         The MATCH FILES procedure set the values of variables not present
5814         to 0.  It should have been SYSMIS.  This is now fixed.
5815
5816         * get.c: (mtf_delete_file_in_place) Replace 0.0 by SYSMIS.
5817
5818 Tue Mar  9 12:52:23 1999  Ben Pfaff  <blp@gnu.org>
5819
5820         The REMARK command was too aggressive about skipping lines.  It
5821         didn't like being the last command in a file.
5822
5823         * command.c: (cmd_remark) Call get_entire_line() instead of
5824         get_line().
5825
5826 Tue Mar  9 12:48:05 1999  Ben Pfaff  <blp@gnu.org>
5827
5828         Comment parsing wasn't consistent with the rest of the code in its
5829         idea of where one command ends and another starts.  This meant
5830         that sometimes commands would be mysteriously ignored.  Thanks to
5831         Dr. Dirk Melcher <BZN-mdksh@t-online.de> for reporting this bug.
5832          
5833         * command.c: (parse_cmd) Hand off comment parsing to new function
5834         skip_comment() in lexer.c.
5835         * lexer.c: (skip_comment) New function.
5836
5837 Wed Jan 20 20:22:07 1999  Ben Pfaff  <blp@gnu.org>
5838
5839         The TABLE subcommand on MATCH FILES worked only erratically at
5840         best.  This fixes it.  Thanks to Dr. Dirk Melcher
5841         <BZN-mdksh@t-online.de> for reporting this bug.
5842
5843         * get.c: (mtf_compare_BY_values) When comparing string values, a
5844         difference of 1 is still a difference :-)
5845         (mtf_processing) Inverted TABLE reading logic fixed.  Also don't
5846         advance TABLE files automatically when matched.  Comment fixes.
5847
5848 Tue Jan 19 22:32:31 1999  Ben Pfaff  <blp@gnu.org>
5849
5850         VARIABLE LABELS rejected a slash before the first variable
5851         specification, contradicting the documentation.  Thanks to Walter
5852         M. Gray <graywm@northernc.on.ca> for reporting this bug.
5853
5854         * var-labs.c: (cmd_variable_labels) Ignore a leading slash in
5855         command specification.
5856
5857 Tue Jan 19 22:29:54 1999  Ben Pfaff  <blp@gnu.org>
5858
5859         Because of an incorrect optimization in memory allocation,
5860         CROSSTABS sometimes segfaulted when asked to output multiple
5861         tables.  Thanks to Walter M. Gray <graywm@northernc.on.ca> for
5862         reporting this bug.
5863
5864         * crosstabs.q: (postcalc) New variables maxcols, maxcells, which
5865         are passed to output_pivot_table() for its use.
5866         (output_pivot_table) Instead of assuming the number of columns is
5867         constant, keep track with maxcols.  In general mode, use maxcells
5868         to determine whether more matrix cells need to be allocated.    
5869
5870 Tue Jan 19 22:27:46 1999  Ben Pfaff  <blp@gnu.org>
5871
5872         CROSSTABS didn't display value labels for column and row
5873         variables.  Thanks to Walter M. Gray <graywm@northernc.on.ca> for
5874         reporting this bug.
5875
5876         * crosstabs.q: (table_value_missing) If the specified value has a
5877         value label for this variable, then show it instead of the raw
5878         value.
5879         (display_dimensions) Delegate display of value_labels to
5880         table_value_missing.
5881
5882 Mon Jan 18 20:04:06 1999  Ben Pfaff  <blp@gnu.org>
5883
5884         WRITE didn't write line ends.  Fixed.  Thanks to Dr. Dirk Melcher
5885         <BZN-mdksh@t-online.de> for reporting this bug.
5886
5887         * print.c: (print_trns_proc) Write (CR/)LF if PRINT is used _or_
5888         if the file isn't declared as binary.
5889
5890 Mon Jan 18 19:56:45 1999  Ben Pfaff  <blp@gnu.org>
5891
5892         MATCH FILES corrupted memory and dumped core on some syntax
5893         errors.  Fixed.
5894
5895         * get.c: (cmd_match_files) Set file->handle to NULL before
5896         jumping to lossage.
5897         (mtf_free_file) Don't free a null dictionary.   
5898
5899 Mon Jan 18 19:27:57 1999  Ben Pfaff  <blp@gnu.org>
5900
5901         MATCH FILES should set numeric values not available to the
5902         system-missing value, not to 0.  Thanks to Dr. Dirk Melcher
5903         <BZN-mdksh@t-online.de> for reporting this bug.
5904
5905         * get.c: (mtf_processing) Set unused records to system-missing,
5906         not 0.
5907
5908 Mon Jan 18 15:06:46 1999  Ben Pfaff  <blp@gnu.org>
5909
5910         KEEP didn't work properly on the SAVE procedure.  Fixed.  Thanks
5911         to Ralf Geschke <ralf@kuerbis.org> for reporting this bug.
5912
5913         * temporary.c: (save_dictionary) Initialize var_by_name AVL tree
5914         in newly created dictionary, and add each copied variable to the
5915         tree.
5916  
5917 Mon Jan 18 15:04:48 1999  Ben Pfaff  <blp@gnu.org>
5918
5919         Memory leak fix.
5920         
5921         * get.c: (trim_dictionary) Free variable list for KEEP after
5922         finishing with it.
5923
5924 Mon Jan 18 12:57:36 1999  Ben Pfaff  <blp@gnu.org>
5925
5926         Some systems didn't like the way open_file was coded.  Thanks to
5927         Hankin <hankin@rogue.consultco.com> for pointing this out.
5928
5929         * filename.c: (open_file) Don't try to store stdin, stdout,
5930         stderr as part of an array, because that doesn't always work.
5931
5932 Mon Jan 18 12:53:27 1999  Ben Pfaff  <blp@gnu.org>
5933
5934         The SAVE procedure didn't save long string variables properly.
5935         Fixed by this patch.  Thanks to Hankin
5936         <hankin@rogue.consultco.com> for this patch.
5937         
5938         * sfm-write.c: (write_variable) Fix off-by-one error in writing
5939         out variable pad records.
5940
5941 Tue Jan  5 14:29:27 1999  Ben Pfaff  <blp@gnu.org>
5942
5943         Previously, if PRINT SPACE were given a negative argument, it
5944         would report an error, then spin in an (almost) infinite loop.
5945         This fixes that behavior.
5946
5947         * print.c: (print_space_trns_proc) After reporting a negative
5948         argument, set number of lines to print to 1.
5949
5950 Tue Jan  5 13:59:55 1999  Ben Pfaff  <blp@gnu.org>
5951
5952         SPSS 8.0 outputs some new record types in its system files, and it
5953         allows longer value labels.  Accept these system files.
5954
5955         * sfm-read.c: (sfm_read_dictionary) Ignore record type 7 subtype
5956         11 emitted by SPSS 8.0.
5957         
5958 Tue Jan  5 13:55:50 1999  Ben Pfaff  <blp@gnu.org>
5959
5960         The LIST procedure was too conservative in allocating space for
5961         buffers, which caused a bug that only showed up with very long
5962         output variables.  Thanks to Hankin <hankin@dunno.com> for this
5963         bug report.
5964
5965         * list.q: (determine_layout) Allocate 1022 bytes instead of 256.
5966
5967 Tue Jan  5 13:34:34 1999  Ben Pfaff  <blp@gnu.org>
5968
5969         Typo meant string format specifiers weren't checked properly.  I
5970         think that Hankin <hankin@dunno.com> sent me this report, but I'm
5971         willing to be corrected on this point.
5972  
5973         * format.c: (check_string_specifier) Fix obvious typo.  
5974
5975 Tue Jan  5 12:50:42 1999  Ben Pfaff  <blp@gnu.org>
5976
5977         Using $CASENUM in an expression didn't work.  Here's a fix.
5978         Thanks to Dirk Melcher <BZN-mdksh@t-online.de> for reporting this
5979         bug.
5980          
5981         * expr-evl.c: (evaluate_expression) Add OP_CASENUM case.
5982
5983         * expr-opt.c: (dump_node) OP_CASENUM is acceptable.
5984
5985 Tue Jan  5 12:47:48 1999  Ben Pfaff  <blp@gnu.org>
5986
5987         The changes in 0.2.1 to fix DATA LIST FREE parsing broke some
5988         other behavior, *sigh*.  This patch hopefully fixes that.  This
5989         time I've actually tested it.
5990
5991         Thanks to Hankin <hankin@dunno.com> for reporting this bug.
5992
5993         * data-list.c: (read_from_data_list_free,
5994         read_from_data_list_list) Call parse_string_as_format() directly
5995         without mucking around with the field width.
5996
5997 Tue Jan  5 12:31:19 1999  Ben Pfaff  <blp@gnu.org>
5998
5999         Occasionally, you may encounter a script that wants to be
6000         interpreted in interactive mode.  Make -i emulate this behavior to
6001         allow such scripts to be executed with PSPP.
6002
6003         Thanks to Hankin <hankin@dunno.com> for reporting this behavior.
6004
6005         * cmdline.c: (pre_syntax_message[]) Update -i description.
6006
6007         * lexer.c: (preprocess_line) When getl_interactive is 2 (i.e.,
6008         when -i is given on the command line) don't treat unindented lines
6009         as starting a new command.
6010
6011 Tue Jan  5 12:30:10 1999  Ben Pfaff  <blp@gnu.org>
6012
6013         In conjunction with egcs 1.1.1, Checker emits some bogus warnings,
6014         mostly caused by local initialized aggregates.  After egcs is
6015         fixed upstream these can be removed, but for now they're not a big
6016         deal.
6017         
6018         * ascii.c: (ascii_postopen_driver) Checker chokes on local
6019         initialized arrays.  Avoid this.
6020
6021         * sfm-write.c: (sfm_write_dictionary) Don't use a local
6022         initialized struct.
6023
6024 Tue Jan  5 12:07:24 1999  Ben Pfaff  <blp@gnu.org>
6025
6026         egcs 1.1.1 has some new warnings relative to gcc 2.8.1, which the
6027         following changes avoid.  Currently I compile sources with egcs
6028         1.1.1 and gcc 2.7.2.3 before sending them out.
6029
6030         * apply-dict.c: (apply_dict) Use new avl_traverser_init() macro.
6031         
6032         * ascii.c: (option_tab[]) Initialize all struct members.
6033
6034         * avl.h: (avl_traverser_init) New macro.
6035         
6036         * command.c: (DEFCMD, UNIMPL macros, cmd_table[]) Initialize all
6037         struct members.
6038
6039         * crosstabs.q: (enum_var_values) Use new hsh_iterator_init()
6040         macro.
6041
6042         * hash.c: Comment fix.
6043
6044         * hash.h: (hsh_iterator_init) New macro.
6045
6046         * html.c: (option_tab[]) Initialize all struct members.
6047
6048         * pfm-write.c: (write_value_labels) Use new avl_traverser_init()
6049         macro.
6050
6051         * postscript.c: (option_tab[]) Initialize all struct members.
6052         (output_encodings, preclose, dump_lines) Use new
6053         hsh_iterator_init() macro.
6054
6055         * sfm-write.c: (write_value_labels) Use new avl_traverser_init()
6056         macro.
6057
6058         * sysfile-info.c: (describe_variable) Use new avl_traverser_init()
6059         macro.
6060
6061 Thu Nov 19 12:32:45 1998  Ben Pfaff  <blp@gnu.org>
6062
6063         * data-in.c: Examined each of the parsing functions to make sure
6064         that they wouldn't dump core if they were passed a string of the
6065         wrong length, since now the DATA LIST FREE/LIST routines don't
6066         check for field width before passing it to the data parser.
6067         (parse_RBHEX, parse_AHEX) Reject odd length input.
6068         (parse_string_as_format) Reject input that's too short or too
6069         long.
6070
6071         * data-list.c: Before, the DATA LIST FREE/LIST routines would pad
6072         a field to its entire declared output width then pass it to the
6073         data-in parsing routines.  This contradicted the documented
6074         behavior.  This is fixed in these changes.  Thanks to Mark H. Wood
6075         <mwood@IUPUI.Edu>.  In addition, this fixes a few more details of
6076         free-format parsing that differed from SPSS.
6077         (cut_field) Commas and spaces are treated identically.  Returns
6078         the proper column instead of a fixed 1 value.
6079         (parse_field) Removed.
6080         (read_from_data_list_free, read_from_data_list_list) Call
6081         parse_string_as_format directly instead of parse_field.
6082
6083         * heap.c: (heap_delete) Stylistic fixes.
6084
6085 Sun Aug  9 11:12:13 1998  Ben Pfaff  <blp@gnu.org>
6086
6087         * loop.c: (loop_2_trns_proc) Formatting fix.
6088
6089         * sel-if.c: (cmd_filter) Set FILTER_before_TEMPORARY.
6090
6091         * var.h: (glob var FILTER_before_TEMPORARY) New global var.
6092
6093         * vfm.c: (macro FILTERED) New.
6094         (static var filter_var) New.
6095         (process_active_file_write_case) Use FILTERED.
6096         (setup_filter) Set filter_var.
6097         (close_active_file) Delete the filter if not
6098         FILTER_before_TEMPORARY.
6099         (procedure_write_case) Use FILTERED.
6100
6101 Sat Aug  8 00:20:14 1998  Ben Pfaff  <blp@gnu.org>
6102
6103         * crosstabs.q: Changed /PIVOT={ON,OFF} to /FORMAT={PIVOT,NOPIVOT}.
6104
6105         * data-in.c: (parse_day_count) Message fix.
6106         (parse_month) Style fix.
6107
6108         * data-list.c: (struct data_list_pgm) New member eof.
6109         (cmd_data_list) Init eof to 0.
6110         (do_reading) Implement the /END subcommand and read-past-eof
6111         checking.
6112
6113         * do-if.c: Include stdio.h when debugging.
6114         (cmd_else_if) Make sure the command is .-terminated.
6115
6116         * glob.c: (init_glob) Capitalize the command prompt.
6117
6118         * inpt-pgm.c: (end_case_trns_proc) Debugging message.
6119         (end_file_trns_proc) Debugging message.
6120
6121         * loop.c: (internal_cmd_loop) Make it work when there's no loop
6122         index!
6123         (loop_2_trns_proc) Enable MXLOOPS (why was this disabled?)
6124
6125         * main.c: (dump_token) Make kwtab[] const.
6126
6127         * set.q: Spelling, comment fixes.
6128
6129         * sysfile-info.c: (cmd_display) DISPLAY VECTORS not DISPLAY
6130         VECTOR.
6131
6132         * vars-prs.c: (fill_all_vars) Style fix.
6133
6134         * vfm.c: (index_to_varname) Return const.
6135
6136 Tue Aug  4 23:49:23 1998  Ben Pfaff  <blp@gnu.org>
6137
6138         * Changes in many source files for partial -ansi -pedantic and
6139         no-debugging compliance: Remove trailing common in enum
6140         declarations; add `unused' attributes; insert some appropriate
6141         casts.
6142
6143         * cmdline.c: (parse_command_line) Add new --testing-mode flag.
6144
6145         * command.c: (shell) Make static.
6146         (run_command) Make static.
6147
6148         * data-list.c: (dump_fixed_table) Remove use of local_strdup().
6149
6150         * dfm.c: (cmd_begin_data) I18n fix.
6151
6152         * error.c: (verbose_msg) Define if __STRICT_ANSI__.
6153
6154         * error.h: (macro verbose_msg) Define if __STRICT_ANSI__.
6155
6156         * expr-opt.c: (evaluate_tree) Don't initialize local arrays if
6157         __STRICT_ANSI__.
6158
6159         * file-handle.q: Don't prepend the source file directory name to
6160         the data file name.  (Ongoing issue.)
6161         (prepend_current_directory) Comment out.
6162         (internal_cmd_file_handle) Don't call prepend_current_directory().
6163         (fh_get_handle_by_filename) Ditto.
6164
6165         * filename.c: Append zero byte to readlink() return value.
6166
6167         * getline.c: (getl_read_line) I18n fix.
6168
6169         * lexer.h: Don't use gcc features if __STRICT_ANSI__.
6170
6171         * misc.h: Don't use gcc features if __STRICT_ANSI__.
6172
6173         * pfm-write.c: (bufwrite) Don't try to increment a void * pointer
6174         directly.
6175
6176         * postscript.c: (output_encodings) Don't use local_strdup().
6177         (postopen) Ditto.
6178
6179         * print.c: Don't use gcc features if __STRICT_ANSI__.
6180
6181         * q2c.c: (dump_vars) Don't put a , at the end of the last enum.
6182
6183         * recode.c: (parse_src_spec) Fully brace nested if's.
6184
6185         * set.q: (global var set_testing_mode) New var.
6186
6187 Wed Jul 29 22:01:44 1998  Ben Pfaff  <blp@gnu.org>
6188
6189         * ascii.c: Add some more `unused' attributes that only come into
6190         play when NDEBUG is defined.
6191         (ascii_close_page) Set s_len when reallocating s.
6192         
6193         * crosstabs.q: (delete_missing) New function.
6194         (output_pivot_table) Call delete_missing() if /MISSING=REPORT.
6195         (make_summary_table) Create summary table reallocable.
6196
6197         * postscript.c: Add more `unused' attributes as above.
6198
6199         * tab.c: (tab_create) [GLOBAL_DEBUGGING] Set reallocable member.
6200         (tab_realloc) [GLOBAL_DEBUGGING] Assert that table is reallocable.
6201          
6202         * tab.h: (struct tab_table) [GLOBAL_DEBUGGING] New `reallocable'
6203         member.
6204
6205         * var.h: (macro force_dup_variable) [!GLOBAL_DEBUGGING] Remove
6206         gratuitous space between parameter definition.
6207
6208         * vars-atr.c: Changed some assert(0)'s to abort()'s to prevent
6209         complaints about running off the end of functions with NDEBUG
6210         enabled.
6211
6212 Sun Jul  5 00:17:25 1998  Ben Pfaff  <blp@gnu.org>
6213
6214         * Several source files: Removed some PORTME notes when reflection
6215         revealed that ANSI forbids that sort of breakage.  Also, added
6216         lots of `unused' qualifiers here and there.
6217
6218         * aggregate.c: (accumulate_aggregate_info) Remove local var
6219         weighting that turned out not to be used.
6220
6221         * avl.c: Update to version 1.1.0.  Add unused specifier.
6222         (avl_destroy) Initialize ab to 0.  Comment fixes.  Cast return
6223         value to void *.
6224         (avl_probe) Replace some instances of 1 with +1 where appropriate.
6225         (avl_find) Cast return value to void *.
6226         (avl_delete) q doesn't need to be initialized at the beginning of
6227         the function.  Replace some instances of 1 with +1.
6228         (force_avl_delete) Renamed avl_force_delete, all references changed.
6229         (compare_ints) `param' marked unused.
6230         (print_int) `param' marked unused.
6231         (recurse_tree) Replace some instances of 1 with +1.
6232
6233         * avl.h: Update to version 1.1.0.  Only declares avl function
6234         types if not already declared.
6235         (AVL_MAX_HEIGHT) Only define if not already defined.
6236         (struct avl_node) New unused member char pad[2].
6237         [GLOBAL_DEBUGGING] Change conditionalization to NDEBUG instead.
6238         (force_avl_insert) Renamed avl_force_insert.
6239         (force_avl_delete) Renamed avl_force_delete.
6240
6241         * crosstabs.q: (struct table_entry) Put `freq' into a union with
6242         new member `data'.
6243         (struct crosstab) Add new member `ofs'.
6244         (glob var int_tab) Removed.
6245         (custom_tables) In integer mode, assign v[i] properly through the
6246         indirect var_dict.
6247         (custom_variables) Now p.crs.max == max + 1.
6248         [DEBUGGING] (debug_print) p.crs.min and p.crs.max are now ints.
6249         (precalc) Implement integer mode.
6250         (calc_integer) Implement integer mode.
6251         (compare_table_entry) Remove unused local variable `comparing'.
6252         (make_summary_table) Implement integer mode.
6253         (macro ns_rows) Implemented as static variable now.
6254         (several variables) Made static, from global.
6255         (output_pivot_table) Use table_value_missing() for column heads.
6256         Remove several unused local variables.  Implement integer mode
6257         table summing.  Count up ns_rows.
6258         (crosstabs_dim) Make columns wider when /MISSING=REPORT requested.
6259         (find_pivot_extent) Moved into find_pivot_extent_general; now just
6260         calls that function or find_pivot_extent_integer.
6261         (find_pivot_extent_integer) New function.
6262         (enum_var_values) Implemented for integer mode.
6263         (table_value_missing) New function.
6264         (display_dimensions) Call table_value_missing() for heads.
6265         (float_M_suffix) New function.
6266         (display_crosstabulation) Call table_value_missing() for row
6267         heads.  Handle missing values in /MISSING=REPORT mode.
6268         (calc_fisher) Remove unused var N.
6269         (calc_r) Remove unused var fact.
6270
6271         * data-list.c: (dump_fixed_table) Fix table dimensioning.
6272         (read_one_set_of_repetitions) Remove unused vars var_spec, column.
6273
6274         * data-out.c: (insert_commas) Remove unused var cp.
6275         (convert_CCx) Remove unused vars save_set_decimal,
6276         save_set_grouping.
6277
6278         * descript.q: (dump_z_table) Fix table dimensioning.
6279         (pre_calc) Remove unused var j.
6280         (display) Remove unused vars title, s.  Fix table dimensioning.
6281
6282         * expr-evl.c: Comment fixes.
6283
6284         * frequencies.q: (full_dim) New function.
6285         (dump_full) Fix table dimensioning.
6286         (condensed_dim) New function.
6287         (dump_condensed) Fix table dimensioning.
6288
6289         * get.c: (cmd_match_files) Remove unused var n_val.  Remove unused
6290         label winnage.
6291
6292         * html.c: (html_close_drive) Remove unused var i.
6293         (postopen) Remove unused vars title, curfn_len, cp.
6294         (preclose) Remove unused vars this, x.
6295
6296         * lexer.c: Comment fixes.
6297
6298         * matrix-data.c: (cmd_matrix_data) Remove unused var index.
6299
6300         * means.q: (custom_tables) Remove unused var m_dim.
6301
6302         * mis-val.c: Format fix.
6303
6304         * modify-vars.c: (cmd_modify_vars) Remove unused var new_dict.
6305
6306         * output.c: (outp_get_paper_size) Remove unused var cp.
6307
6308         * pfm-read.c: (read_float) Remove unused var save, unused label
6309         underflow.
6310         (read_variables) Remove unused vars cp, j.
6311         (read_value_label) Remove unused var j.
6312
6313         * pfm-write.c: (bufwrite) Remove unused var i.
6314
6315         * postscript.c: (ps_postopen_drive) Remove unused vars dev_info,
6316         fn.
6317         (output_encodings) Remove unused vars char_cp, n_output.
6318         (read_ps_encodings) Remove unused var ep.
6319         (postopen) Remove unused var title.
6320         (preclose) Remove unused var fp.
6321         (ps_open_page) Remove unused vars true, false, orientation,
6322         mirror_horz, mirror_vert, width, length.
6323         (ps_text_metrics) Remove unused var x.
6324
6325         * q2c.c: (find_symbol) Remove unused var y.
6326         (parse_setting) Remove unused parameter sbc, all references
6327         changed.
6328         (dump_parser) Remove unused var cp.
6329         (dump_free) Remove unused var i.
6330
6331         * set.q: (static vars args, n) Removed.
6332         (internal_cmd_gset) Removed.
6333
6334         * sfm-read.c: (sfm_read_dictionary) Removed unused var i.
6335         (read_machine_flt64_info) Removed unused var file_endian.
6336         (read_documents) Removed unused var i.
6337         (read_compressed_data) Removed unused parameter dict, all
6338         references changed.
6339
6340         * sfm-write.c: (bufwrite) Removed unused var i.
6341         (sfm_write_case) Removed unused var i.
6342
6343         * sort.c: (merge_once) Remove unused var t.
6344         (write_separate) #if 0 out as dead code.
6345
6346         * split-file.c: (cmd_split_file) Remove unused var i.
6347
6348         * sysfile-info.c: (sysfile_info_dim) New function.
6349         (cmd_sysfile_info) Fix table dimensioning.
6350         (variables_dim) New function.
6351         (display_variables) Fix table dimensioning.
6352         (describe_variable) Remove unused var prev_r.
6353
6354         * t-test.q: (z_postcalc) Removed.
6355         (pairs_calc) Remove unused var bad_weight.
6356         (postcalc) Remove unused vars dfn, dfd.
6357
6358         * tab.c: (tab_create) Set t->dim to NULL.
6359         (tab_dim) Make sure t->dim is NULL first.
6360         (tab_natural_width) Remove parameter `clamp'.
6361         (tab_value) Remove duplicate assertion for table.
6362         (tab_raw) New function.
6363         (nowrap_dim) New function.
6364         (wrap_dim) New function.
6365         (tab_output_text) Fix table dimensioning.
6366
6367         * tab.h: (tab_raw) New macro.
6368
6369         * val-labs.c: (get_label) Remove unused var type.
6370         (copy_value_labels) Remove unused var trav.
6371
6372         * var.h: (struct crosstab_proc) Completely changed.
6373
6374         * vars-prs.c: (parse_dict_variable) Remove unused var v.
6375
6376         * vfm.c: (open_active_file) Remove unused vars i, lp.
6377
6378         * weight.c: (weight_trns_proc) #if 0 out as dead code.
6379         
6380 Tue Jun  2 23:37:21 1998  Ben Pfaff  <blp@gnu.org>
6381
6382         * Makefile.am: Add apply-dict.c, flip.c.
6383
6384         * apply-dict.c: New file.
6385         
6386         * command.c: (struct command) Make cmd[] larger for CLEAR
6387         TRANSFORMATIONS command name.
6388         (parse_cmd) Make sure we're in a valid state before using it as an
6389         index.  Discard variables and reset state on invalid transitions.
6390         (cmd_clear_transformations) New function.
6391
6392         * command.def: Add APPLY DICTIONARY, CLEAR TRANSFORMATIONS, FLIP.
6393         Add unimplemented PRESERVE, RESTORE.
6394
6395         * file-handle.h: Include stddef.h.
6396
6397         * flip.c: New file.
6398         
6399         * pfm-read.c: (parse_value) Pad value label values with spaces,
6400         not nulls.
6401
6402         * sfm-read.c: (struct sfm_fhuser_ext) Add reference count.
6403         (sfm_close) Decrement reference count, make sure it's zero.
6404         (sfm_maybe_close) New function.
6405         (sfm_read_dictionary) Handle reference counts.
6406
6407         * vars-atr.c: (clear_default_dict) New function.
6408         (discard_variables) Use clear_default_dict().
6409
6410 Sun May 31 00:58:05 1998  Ben Pfaff  <blp@gnu.org>
6411
6412         * Makefile.am: Add pfm-write.c.
6413         (LDADD) Add the libgmp2 libraries.
6414
6415         * command.def: Define EXPORT.
6416
6417         * get.c: (cmd_export) New function.
6418         (export_write_case_func) New function.
6419
6420         * pfm-read.c: (static spss2ascii[]) Make it const.
6421
6422         * pfm-write.c: New file.
6423
6424         * sfm-write.c: Formatting, comment fixes.
6425
6426         * var.h: Comment fix.
6427
6428 Fri May 29 21:44:12 1998  Ben Pfaff  <blp@gnu.org>
6429
6430         * Makefile.am: Add pfm.h, pfm-read.c.
6431
6432         * command.def: IMPORT is now implemented.
6433
6434         * format.c: (glob var translate_fmt[]) New var.
6435
6436         * get.c: (enum GTSV_NONE) Renamed GTSV_OPT_NONE.
6437         (cmd_import) New function.
6438         (import_source_read) New function.
6439         (glob var import_source) New var.
6440
6441         * pfm-read.c: New file.
6442
6443         * pfm.h: New file.
6444         
6445         * sfm-read.c: (parse_format_spec) Local variable translate_fmt[]
6446         moved in format.c.
6447         (dump_dictionary) Disabled printing a couple of items.
6448
6449 Mon May 25 12:42:37 1998  Ben Pfaff  <blp@gnu.org>
6450
6451         * crosstabs.q: (postcalc) Call make_summary_table().
6452         (make_summary_table) New function.
6453         (insert_summary) New function.
6454         (display_dimensions) Remove some unnecessary arguments, all
6455         references changed.
6456         (output_pivot_table) Fix lots of problems with the risk table
6457         setup.
6458         (submit) Don't display an empty table.
6459         (display_risk) Fix order of arguments to calc_risk().
6460
6461         * glob.c: Always include assert.h and stdlib.h.
6462
6463         * output.h: (enum OUTP_T_JUST_FULL) Removed, all references
6464         removed.
6465
6466         * tab.c: (tab_create) Cosmetic changes.
6467
6468         * tab.h: (enum TAB_JUSTIFY) Removed, all references removed.
6469
6470 Sun May 24 22:39:23 1998  Ben Pfaff  <blp@gnu.org>
6471
6472         * tab.def: Removed.
6473
6474         * crosstabs.q: (output_pivot_table) Headers drawing and submission
6475         code simplified, moved into new function submit().
6476         (submit) New function.
6477         (crosstabs_dim) New function.
6478         (display_directional) Substitute variable names for %s where
6479         appropriate.
6480         (somers_d_v[], somers_d_ase[], somers_d_t[]) New static vars.
6481         (calc_symmetric) Initialize parameters only if non-NULL.
6482         Calculate Somers' d.
6483         (calc_directional) Calculate Somers' d (or copy it, really).
6484         Calculate eta.
6485
6486         * output.c: (outp_string_width) New function.
6487
6488         * postscript.c: (postopen) Calculate font widths based on the
6489         width of the zero '0' character, not the width of the space
6490         character.  Set paper-width and paper-length based on points, not
6491         device units.
6492         (ps_open_page) Fix page setup string for landscape mode.
6493
6494         * som.h: (struct som_dimension) Removed.
6495         (struct som_table_class) height, width members take int * not
6496         som_dimesion * now.
6497
6498         * tab.c: Many functions now have added parameter validation.
6499         (tab_height, tab_width) These functions were removed and merged
6500         into a single function tab_resize(), and all references changed.
6501         (tab_dim) Rewritten since the interface changed; reduced from
6502         hundreds of lines to two.  All callers were changed.  Currently
6503         most of them just use tab_natural_dimensions as their callback and
6504         await detailed translation of functionality.
6505         (tab_natural_width) New function.
6506         (tab_natural_height) New function.
6507         (tab_natural_dimensions) New function.  This is a callback
6508         function, not something that you'd want to call directly.
6509         (tab_nat_dim) Removed.
6510         (tabi_table) Allocates t->w and t->h.
6511         (tabi_driver) Inlined sum_columns()'s functionality.  Calls the
6512         dimensions callback.
6513         (evaluate_dimensions) Removed.
6514         (sum_columns) Removed.
6515
6516         * tab.h: (enum TAL_1THIN) Removed.
6517         (enum series t_*) Removed.
6518         (struct tab_table) Members trh, trv changed to unsigned char *
6519         from int *.  Member dim changed to a function pointer from a
6520         unsigned char *.  Member max_stack_height removed.  New members
6521         hr_tot, vr_tot.
6522         (macros tab_l, tab_r, tab_t, tab_b) New.
6523
6524 Sat May 23 23:22:13 1998  Ben Pfaff  <blp@gnu.org>
6525
6526         * ascii.c: (delineate) Assign last_space_nchars before skipping
6527         spaces, to fix right justification.
6528
6529         * crosstabs.q: (static vars risk, direct) New vars.
6530         (static var pearson_r) Removed.
6531         (glob var chisq_fisher) Made static.
6532         (static vars row_tot[], col_tot[]) Don't include grand total
6533         anymore.
6534         (static var grand_total) Renamed W, all references changed.
6535         (output_pivot_table) Only make `table' if num_cells != 0.  Make
6536         risk and directional tables.  Deal with grand total no longer part
6537         of col_tot[].  Free rows and cols after we're done with them.
6538         (display_risk) New function.
6539         (display_directional) New function.
6540         (clac_r) Rewritten so that it stores all its results into its
6541         arguments, so it can be used for Spearman's correlation too.
6542         (calc_symmetric) Added a t[] argument, all references changed.
6543         Calculates ASEs for tau-b, tau-c, gamma.  Calculates Spearman's r,
6544         Pearson's r, Cohen's kappa.
6545         (calc_risk) New function.
6546         (calc_directional) New function.
6547
6548         * som.c: (som_submit) Improved debugging code.
6549
6550         * stats.c: (hypercube) New function.
6551         (cube) New function.
6552         (sqr) New function.
6553         (normal_sig) Went back to old implementation, which actually
6554         worked.
6555
6556         * stats.h: (macros square, cube, hypercube) Removed.  The
6557         equivalent functions in stats.c are inlined here; all references
6558         to square changed to sqr.
6559
6560 Fri May 22 00:03:41 1998  Ben Pfaff  <blp@gnu.org>
6561
6562         * crosstabs.q: (N_SYMMETRIC) New define.
6563         (postcalc) Disable debug printing.
6564         (static vars chisq_fisher, pearson_r) New.
6565         (output_pivot_table) Add support for symmetric measures.  Add
6566         chi-square output of exact sigs.
6567         (display_chisq) Rewritten.
6568         (display_symmetric) New function.
6569         (gamma_int) New function.
6570         (Pr) New function.
6571         (swap) New function.
6572         (calc_fisher) New function.
6573         (calc_chisq) Check boundary conditions better. Calculate Yates,
6574         Fisher, Mantel-Haenszel tests.
6575         (calc_r) New function.
6576         (calc_symmetric) New function.
6577
6578         * stats.c: (normal_sig) Rewritten with new algorithm.  Renamed
6579         from calc_normal.
6580         (chisq_sig) Better boundary conditions.  Renamed from
6581         calc_significance.
6582
6583         * tab.h: (struct tab_table) New member cf.
6584
6585         * tab.c: (tab_create) Set cf.
6586         (tab_width) New function.
6587         (tab_realloc) Handle cf.
6588         (tab_vline) Handle cf.
6589         (tab_hline) Handle cf.
6590         (tab_box) Handle cf.
6591         (tab_value) Handle cf.
6592         (tab_float) Handle cf.
6593         (tab_text) Handle cf.
6594         (tab_joint_text) Handle cf.
6595         (tab_offset) Handle cf.
6596         (tab_next_row) Handle cf.
6597         (evaluate_dimensions) Handle cf.
6598         (render_strip) Handle cf.
6599
6600 Wed May 20 00:03:59 1998  Ben Pfaff  <blp@gnu.org>
6601
6602         * crosstabs.q: (postcalc) New vars row_tot, col_tot, pass them to
6603         output_pivot_table().
6604         (output_pivot_table) Moved lots of local variables outside and
6605         made them static.  Add beginnings of chi-square statistic
6606         support.  Now column and row totals aren't in the main matrix.
6607         Always zero out any leftover rows & columns after we're done with
6608         the table entries.  Move all output stuff into
6609         display_dimensions(), display_crosstabs(), display_chisq().
6610         (display_dimensions) New function.
6611         (display_crosstabulation) New function.
6612         (display_chisq) New function.
6613         (calc_chisq) Implemented Pearson and likelihood-ratio chisquares.
6614
6615         * frequencies.q: (dump_full, dump_condensed) Remove tab_null()
6616         references, simplify logic.
6617
6618         * postscript.c: Remove scale, translate-x, translate-y,
6619         mirror-horz, mirror-vert, rotate-180 options.
6620         (struct ps_driver_ext) Remove scale, translate_x, translate_y.
6621         All references deleted.
6622         (macro YT) New macro.
6623         (array option_tab[]) Removed options.
6624         (ps_option) Removed options.
6625         (ps_open_page) Write page setup explicitly to output file, without
6626         using now-deleted BP function.
6627         (macro dump_line) Use YT().
6628         (macro dump_thick_line) Use YT().
6629         (draw_headers) Use YT().
6630         (switch_font) Reorder arguments to SF function.
6631         (write_text) Use YT().
6632
6633         * sfm-read.c: (sfm_read_case) Don't attempt to read variables that
6634         have get.fv == -1.
6635
6636         * sysfile-info.c: (describe_variables) Don't use tab_nulls().
6637
6638         * tab.c: (tab_create) Initialize t->ct to zeros.  Remove
6639         null-debugging code.
6640         (tab_realloc) Remove null-debugging code.  Initialize new regions
6641         of t->ct to zeros.
6642         (tab_vline) Support offsets.
6643         (tab_hline) Support offsets.
6644         (tab_box) Support offsets.
6645         (tab_null) Removed.
6646         (tab_nulls) Removed.
6647         (tab_row) Removed.
6648         (tab_col) Removed.
6649         (evaluate_dimensions) Remove null-debugging code.  Understand
6650         TAB_EMPTY attribute.  Assert that text.s.s is always non-NULL if
6651         TAB_EMPTY not present.
6652
6653         * tab.h: New cell attribute TAB_EMPTY.
6654         (macros tab_nr, tab_nc, tab_row, tab_col) New.
6655
6656         * vars-atr.c: (init_variable) Set get.fv to -1 so that GET doesn't
6657         try to read them from system files.
6658
6659         * vfm.c: (dump_splits) Don't call tab_null().   
6660
6661 Sat May 16 19:36:55 1998  Ben Pfaff  <blp@gnu.org>
6662
6663         * crosstabs.q: (struct crosstab) Added `missing' member.
6664         (custom_tables) Init missing.
6665         (calc_general) Handle missing values.
6666         (calc_chisq) New function.
6667         (output_pivot_table) Start work on chi-square output.  Update for
6668         new tab offset support functions.  Shorten statistic names.
6669
6670         * Several files: add in more `const's to placate gcc's warnings.
6671
6672         * tab.h: (struct tab_table) Add col_ofs, row_ofs members.  Comment
6673         fixes.
6674
6675         * tab.c: (tab_height, tab_realloc, tab_vline, tab_hline, tab_box,
6676         tab_null, tab_nulls, tab_value, tab_float, tab_text,
6677         tab_joint_text) Add col_ofs and row_ofs support.
6678         (tab_offset) New function.
6679         (tab_next_row) New function.
6680         (tab_row) New function.
6681         (tab_col) New function.
6682         (tabi_table) Add col_ofs and row_ofs support.
6683
6684         * vars-atr.c: (is_system_missing) New function.
6685
6686 Tue May 12 16:14:30 1998  Ben Pfaff  <blp@gnu.org>
6687
6688         * crosstabs.q: Expanded subcommand names RESID --> RESIDUAL, etc.
6689         (static var no_cells) Removed.
6690         (static var num_cells) New.
6691         (static var expected) New.
6692         (static var cells[]) New.
6693         (internal_cmd_crosstabs) Deal with new variables.
6694         (postcalc) Removed most of the meat and put it in new function
6695         output_pivot_table().
6696         (output_pivot_table) Calculates and outputs an entire pivot table.
6697
6698         * postscript.c: (postopen) Fix problems with free()ing addresses
6699         not obtained from malloc().
6700
6701         * som.c: (som_submit) Add assertion.
6702
6703         * sysfile-info.c: (describe_variable) Use new tab_nulls()
6704         function.
6705
6706         * tab.c: (static var tab_names[]) New.
6707         (tab_realloc) -1 for nc or nr indicates no change.
6708         (tab_nulls) New function.
6709         (tab_dim) Use tab_names[].
6710         (tabi_cumulate) Don't include bottom or right headers.  Furrfu.
6711         (evaluate_dimensions) Don't terminate on uninited cells, just put
6712         an X in them and emit a notice.  Use tab_names[].
6713
6714         * tab.h: Move bits into tab.def.
6715
6716         * tab.def: New.  Don't try to declare tab_table_class because then
6717         som.h has to be included.       
6718         
6719 Thu May  7 22:55:04 1998  Ben Pfaff  <blp@gnu.org>
6720
6721         * command.def: New file, contains all the command definitions
6722         previously included bodily in command.c.
6723
6724         * format.def: New file, contains all of the format definitions
6725         previously split across format.h, format.c, and sfm-write.c.
6726
6727         * lexer.h: Renamed from tokens.h in order to match corresponding
6728         .c file name.
6729
6730         * lexerP.h: Moved some rarely used functions exported by lexer.c
6731         into here.
6732
6733         * Makefile.am: Commemorate renamed files.
6734         (EXTRA_DIST) Add command.def, format.def.
6735
6736         * command.c: [0] (walk_cmdtable_func) Removed.
6737
6738         * crosstabs.q: (postcalc) Made it work and print out matrices
6739         proving it.
6740         (enum_column_values) Renamed enum_var_values, generalized for any
6741         variable.
6742
6743         * format.h: (struct fmt_desc) New member `spss'.
6744
6745         * q2c.c: (main) Generated code includes lexer.h instead of
6746         tokens.h.
6747
6748         * sfm-write.c: (write_format_spec) Use new spss member of fmt_spec
6749         instead of an independent translation table.
6750
6751 Tue May  5 13:19:03 1998  Ben Pfaff  <blp@gnu.org>
6752
6753         * Lots of source files: Added const to declarations.
6754
6755         * aggregate.c: (parse_aggregate_function) Rename inner i to j.
6756         
6757         * arena.c: (arena_clear) Set prev pointer to null when done.
6758
6759         * ascii.c: (ascii_option) Rename index as indx.
6760
6761         * avl.c: This is now a separate library called libavl.
6762         (xmalloc) Make static.
6763         (avl_probe) Step A7 can use the cache instead of an explicit
6764         compare.
6765         (avl_delete) Don't maintain a q pointer because it's always
6766         available in the pointer stack.  Comment fix.
6767
6768         * avl.h: This is now a separate library called libavl.
6769
6770         * command.c: (cmd_table[]) Remove spurious trailing "".
6771
6772         * common.h: Only include random() fix if this system needs it.
6773
6774         * crosstabs.q: Include alloca headers.
6775         (n_sorted_tab) New global var.
6776         (postcalc) Mostly rewritten.
6777         (find_pivot_extent) Rewritten.
6778         (enum_column_values) Rewritten.
6779
6780         * data-out.c: (convert_F) Rename inner n as n_spaces.
6781
6782         * error.c: (dump_message) Don't have an outer var i.
6783
6784         * file-handle.q: (static var f) Removed.  All references removed.
6785         (internal_cmd_file_handle) Uses a local variable instead of f.
6786
6787         * get.c: (trim_dictionary) Change scope of i, i1, i2.
6788         (cmd_match_files) Don't strcpy tokstr into sbc (why was this ever
6789         done?)
6790
6791         * getline.h: Declare getl_history as extern.  Reported by
6792         palme@uni-wuppertal.de (Hubert Palme).
6793
6794         * postscript.c: (postopen) Some large mods for constness.
6795
6796         * recode.c: Remove spurious copyrights since PSPP is owned by FSF
6797         anyway.
6798
6799 Fri Apr 24 12:52:47 1998  Ben Pfaff  <blp@gnu.org>
6800
6801         * Makefile.am: Rename BUILT_SOURCES to q_sources, all references
6802         changed.  Add avl.c, avl.h to pspp_SOURCES.  Remove avllib from
6803         LDADD.
6804
6805         * avl.c, avl.h: New files.  These form a clean-room
6806         reimplementation of avllib.  Iterative algorithms are used in
6807         place of recursive ones, so there is no resemblance in the code.
6808
6809         * Lots of headers: Don't include other headers by default.
6810
6811         * Lots of source files: Explicitly include all needed headers.
6812
6813         * arena.c: (arena_clear) New function.
6814
6815         * crosstabs.q: (ROW_VAR, COL_VAR) New enums.
6816         (static var ar) Removed.
6817         (staitc vars ar_tc, ar_col) New.
6818         (cmd_crosstabs) Destroy the arenas.
6819         (internal_cmd_crosstabs) Create the arenas.
6820         (precalc) Don't need a free function for the hash.
6821         (calc_general) Make sure to zero out the trailer on the key data
6822         before inserting.
6823         (print_table_entries) Updated.
6824         (postcalc) Worked on actually implementing.
6825         (find_pivot_extent) New function.
6826         (compare_value) New function.
6827         (enum_column_values) New function.
6828
6829         * data-in.c: (parse_month) Make local array `static const'.
6830         
6831         * data-out.c: (convert_date) Make local array `static const'.
6832         (convert_WKDAY) Same.
6833         (convert_MONTH) Same.
6834
6835         * frequencies.q: (postprocess_freq_tab) avl_walk_inorder() has
6836         been renamed to avl_walk().
6837         
6838         * hash.c: Rewritten more efficiently.
6839
6840         * hash.h: Add attribute const to hsh_next_prime declaration.
6841
6842         * lexer.c: (id_match) Make arguments const.
6843
6844         * postscript.c: (ps_postopen_driver) Make default fonts the
6845         Helvetica family.
6846
6847         * q2c.c: (main) Generated code needs stdlib.h.
6848
6849         * sfm-write.c: (write_value_labels) An avl_traverser needs to be
6850         initialized to 0 now, not to NULL.  All other references to
6851         avl_traverser were updated in the same way.
6852
6853         * tokens.h: Macro version of id_match updated to use const
6854         properly.
6855
6856         * val-labs.c: (inc_ref_count) New function.
6857         (copy_value_labels) Simply through use of new avl_copy() function.
6858
6859 Wed Apr 15 13:01:58 1998  Ben Pfaff  <blp@gnu.org>
6860
6861         * crosstabs.q: Probably doesn't compile.  New PIVOT subcommand.
6862         (postcalc) Worked on this.
6863
6864         * postscript.c: (OPO_DOUBLE_LINE) New enum.
6865         (struct ps_driver_ext) New line_width_thick member.
6866         (ps_preopen_drive) Init line_width_thick.
6867         (option_tab[]) Add line-* options.
6868         (ps_option) Parse line-* options.
6869         (postopen) Add line_width_thick support.  Strip leading spaces on
6870         prologue output lines.
6871         (ps_open_page) Include line_width_thick in output.
6872         (macro dump_thick_line) New.
6873         (dump_fancy_line) Support thick lines as well as double lines.
6874
6875 Tue Apr 14 00:50:08 1998  Ben Pfaff  <blp@gnu.org>
6876
6877         * Makefile.am: Add crosstabs.c to BUILT_SOURCES.  Add crosstabs.q
6878         to pspp_SOURCES.  Add crosstabs.q to EXTRA_DIST.
6879
6880         * Many source files: Rename `options' to `pv_opts' as appropriate.
6881
6882         * command.c: (static var cmd_table[]) Add CROSSTABS command.
6883
6884         * common.c: (xcalloc) New function.
6885
6886         * crosstabs.q: New file.  Not finished yet, though.
6887                 
6888         * data-list.c: Comment fix.
6889
6890         * error.c: Remove some old Checker cruft.
6891
6892         * frequencies.q: (dump_full) Cumulate valid percent instead of
6893         regular percent.
6894
6895         * getline.c: Comment fix.
6896
6897         * hash.c: Comment fixes.
6898
6899         * hash.h: (struct hsh_table) Make hash functions return unsigned
6900         instead of int to avoid problems with taking the modulo of
6901         negative return values.  All references changed.
6902
6903         * misc.c: (intlog10) Make its table static const instead of auto.
6904
6905         * sfm-read.c: (read_header) Make `prefix' static const instead of
6906         auto.
6907
6908         * var.h: (union value) Add member `hash'.
6909         (struct variable) Rename prv_index as `foo'--all references
6910         changed.  Reorder.
6911         (typedef pv_opts) Removed.  All references changed.
6912
6913         * vars-prs.c: (parse_variables) Message fixes.
6914         
6915 Mon Mar  9 15:35:08 1998  Ben Pfaff  <blp@gnu.org>
6916
6917         * get.c: (cmd_match_files) Don't reverse the order of FILEs as
6918         they are being inserted.  Don't check for BY variables of
6919         different types.  Discard variables if the active file isn't
6920         included in the merge.
6921         (mtf_processing) Essentially rewritten.
6922         (mtf_merge_dictionary) Check for master/slave variables of
6923         different types/widths.
6924
6925         * vfm.c: (static var not_canceled) New var.
6926         (process_active_file) Don't call vfm_source->read() if
6927         there's no vfm-source.  Initialize not_canceled.
6928         (process_active_file_write_case) Honor and update not_canceled.
6929         (prepare_for_writing) Rollback changes from yesterday, they were
6930         wrong.
6931         (close_active_file) Don't destroy vfm_source unless it exists.
6932         
6933 Mon Mar  9 00:56:16 1998  Ben Pfaff  <blp@gnu.org>
6934
6935         * Lots of source files: Added { } around nested if/else constructs
6936         to avoid new gcc 2.8 warnings.
6937
6938         * data-in.c: (parse_Z) Declare `int' type explicitly.
6939         (convert_Z) Ditto.
6940
6941         * get.c: (struct mtf_file) Add prev, next_min, by, input members.
6942         (cmd_match_files) Initialize mtf_by_values.  Manage by, input,
6943         prev members.  Put TABLEs at the end of the chain and FILEs at the
6944         beginning.  Don't allow the active file in STATE_INIT.  Use proper
6945         `seen' value for the active file.  Fill out the by members and
6946         make sure they're of consistent type.  Do the actual merge
6947         operation.
6948         (mtf_processing_finish) New function.
6949         (var_type_description) New function.
6950         (mtf_free_file) New function.
6951         (mtf_free) Rewritten.
6952         (mtf_delete_file_in_place) New function.
6953         (mtf_read_nonactive_records) New function.
6954         (mtf_compare_BY_values) New function.
6955         (static var mtf_seq_no) New var.
6956         (mtf_processing) New function.
6957         (mtf_merge_dictionary) Assign nval members for the system file
6958         dictionary.  Assign fv values for its variables.  Point each slave
6959         variable to the corresponding master variable.
6960
6961         * hash.c: Include str.h.
6962
6963         * mis-val.c: (copy_missing_values) src arg is const.
6964
6965         * misc.c: (spacing) Make `max' var explicitly int.
6966
6967         * sfm-read.c: (dump_dictionary) Message reformatting.
6968         (sfm_read_case) Add assertion.
6969
6970         * sort.c: Esthetic fixes.
6971
6972         * var.h: (struct match_files_proc) New struct.
6973         (struct variable) Add private data match_files_proc.
6974
6975         * vars-atr.c: (delete_variable) Implement.  Add argument for the
6976         dictionary that owning the variable.
6977         (dup_variable) Add assertion.
6978
6979         * vfm.c: Comment fixes, hopefully the comments are correct now.
6980         (process_active_file) New function.
6981         (process_active_file_write_case) New function.
6982         (process_active_file_output_case) New function.
6983         (prepare_for_writing) Use temp_dict->nval for vfm_info, not
6984         default_dict.nval.
6985         (write_case) Renamed procedure_write_case().  Now write_case is a
6986         pointer to a function.  Style fixes.
6987         
6988 1998-03-05  Ben Pfaff  <blp@gnu.org>
6989
6990         * Makefile.am: (q2c) Link with libmisc.
6991         (version.c) Define default_config_path, include_path,
6992         groff_font_path.
6993
6994         * ascii.c: (ascii_postopen_driver) When the default newline string
6995         is requested, open file in text mode.  Suggested by
6996         palme@uni-wuppertal.de (Hubert Palme).
6997         (static vars line_buf, line_p) Change from char * to unsigned char
6998         *.
6999         (ascii_close_page) char * to unsigned char *.
7000
7001         * cmdline.c: (parse_command_line) Implement -r option by
7002         prepending ~/.pspp/rc to the list of files to process.
7003
7004         * command.c: (cmd_remark) Reset getl_prompt to the standard prompt
7005         before pulling in a final line.
7006         (null_func, null_int_func) Removed (dead code).
7007
7008         * descript.q: (display) Calculate width of variable name column
7009         properly.  Calculate number of valid cases properly.  Reported by
7010         palme@uni-wuppertal.de (Hubert Palme).
7011
7012         * filename.c: (init_filename) Use default_config_path instead of
7013         now obsolete CONFIG_PATH.
7014
7015         * getline.c: (getl_initialize) Use include_path instead of now
7016         obsolete INCLUDE_PATH.
7017         (getl_add_file) New argument `where'.  All references changed.
7018
7019         * groff.c: (find_font_file) Use groff_font_path instead of now
7020         obsolete GROFF_FONT_PATH.
7021         
7022         * postscript.c: (find_ps_file) Use groff_font_path instead of now
7023         obsolete GROFF_FONT_PATH.  Copy through temporary variable to
7024         avoid problems with constness.
7025
7026         * str.h: (macro cs_streq) New macro.
7027
7028         * version.h: (glob var default_config_path, include_path,
7029         groff_font_path) New vars.
7030         
7031 1998-02-23  Ben Pfaff  <blp@gnu.org>
7032
7033         * Many source files: Change verbose_msg() priority levels and
7034         messages.
7035
7036         * aggregate.c: Include debug-print.h.
7037
7038         * cmdline.c: (parse_command_line) Add --safer/-s and --command/-c
7039         options.
7040         (static var pre_syntax_message) Document --safer/-s and
7041         --command/-c.
7042
7043         * command.c: (cmd_erase, cmd_host) Disable if set_safer is set.
7044
7045         * dfm.c: (open_inline_file) [__CHECKER__] Zero out ext->file,
7046         because it's not used but it's still copied.
7047         (open_file_r) Remove gratuitous debug message.
7048
7049         * filename.c: (safety_violation) New function.
7050         (open_file) Remove gratuitous debug messages.  Don't allow pipe
7051         files if set_safer is set.
7052
7053         * get.c: Turn off debugging.
7054
7055         * getline.c: (getl_add_virtual_file) New function.
7056         (getl_read_line) Add verbose_msg() call for opening new syntax
7057         file.
7058         (getl_perform_delayed_reset) Add a return value describing whether
7059         any action was taken.  Call reset_eof().
7060
7061         * getline.h: Comment fix.
7062
7063         * groff-font.c: (groff_read_font) Use `goto next_iteration' in
7064         place of incorrect `continue'.  Use strtok_r() instead of
7065         strtok().  Always check strtok_r() return value.
7066         (groff_read_DESC) Use strtok_r() instead of strtok().
7067
7068         * lexer.c: (reset_eof) New function.
7069
7070         * main.c: (parse) Get a token after performing a delayed reset
7071         action; allow empty syntax files.
7072
7073         * postscript.c: (output_encodings) Use strtok_r() instead of
7074         strtok().
7075
7076         * q2c.c: (dump_parser) Use strtok_r() instead of strtok().
7077
7078         * set.q: Comment fixes.
7079         (glob var set_safer) New var.
7080         (internal_cmd_set) Support SAFER.
7081
7082         * str.h: [!HAVE_STRTOK_R] Declare strtok_r() prototype.
7083
7084         * temporary.c: (free_dictionary) Set d->splits to NULL after
7085         freeing.
7086
7087         * vars-atr.c: (clear_variable) Decrement dict->n_splits if
7088         variable deleted, not if it *isn't* deleted.
7089
7090 1998-02-16  Ben Pfaff  <blp@gnu.org>
7091
7092         * command.c: (array cmd_table[]) Add MATCH FILES.
7093
7094         * common.c: Comment fixes.
7095
7096         * data-list.c, dfm.c, error.c, filename.c, list.q, matrix-data.c,
7097         modify-vars.c, postscript.c, sfm-read.c, sfm-write.c, tab.c:
7098         Include alloca.h.  Problem reported by palme@uni-wuppertal.de
7099         (Hubert Palme).
7100
7101         * expr-opt.c: Include str.h.  Problem reported by
7102         palme@uni-wuppertal.de (Hubert Palme).
7103
7104         * get.c: (cmd_get) [DEBUGGING] Update v->p.get to v->get.
7105         (static var mtf_by) Change from char ** to variable **.
7106         (static var mtf_master) New var.
7107         (mtf_merge_dictionary) New function.
7108         (cmd_match_files) Init mtf_master.  Parse mtf_by according to new
7109         var type.  Reorder tests properly.  Initialize file->dict.  Detect
7110         TABLE= without BY=.  Read file dictionaries and merge them.  Give
7111         subcommand name with IN, LAST, FIRST error messages.  Create IN,
7112         LAST, FIRST variables.  Comment fixes.
7113         (mtf_free) Don't free default_dict.  Free mtf_master.
7114
7115         * getline.c: Define getl_mode.  Change getl_buf_size to size_t
7116         from int.
7117         (handle_line_buffer) Cast int to size_t in comparison to avoid
7118         warning.
7119
7120         * getline.h: Declare getl_mode extern.
7121
7122         * groff-font.c: (groff_read_font) Type-fix calls to getline.
7123         (groff_read_DESC) Make line_size a size_t.
7124         (match_tok) Parenthesize name to avoid macro expansion.
7125
7126         * mis-val.c: (copy_missing_values) New function.
7127
7128         * postscript.c: (postopen) Make buf_size a size_t.
7129
7130         * sfm-read.c: (dump_dictionary) Make global from static.  Print
7131         variable info in parts for easier debugging with Checker.
7132
7133         * temporary.c: (copy_variable) Use copy_value_labels().
7134         (new_dictionary) New arg: whether to copy file label, documents.
7135
7136         * val-labs.c: (copy_value_labels) New function.
7137
7138         * var.h: (enums MISSING_*) Add MISSING_COUNT.
7139
7140         * vars-atr.c: [GLOBAL_DEBUGGING] (force_dup_variable) New
7141         function.
7142         (dup_variable) Set prv_index, get.fv, get.nv.
7143
7144 Fri Feb 13 15:38:36 1998  Ben Pfaff  <blp@gnu.org>
7145
7146         * Makefile.am: (pspp_SOURCE) Add htmlP.h.
7147
7148         * Many source files: For ANSI-compliance, add empty statement
7149         after label.  Reported by palme@uni-wuppertal.de (Hubert Palme)
7150         and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
7151
7152         * data-in.c: (parse_numeric) Some header files break on
7153         -DBL_MIN_10_EXP because they get a --; add () for safety.
7154         Reported by palme@uni-wuppertal.de (Hubert Palme).
7155
7156         * dfm.c: Idea by Dr Eberhard W Lisse <el@linux.lisse.na>.
7157         (struct dfm_fhuser_ext) Change `file' from FILE * to file_ext.
7158         (dfm_close) Use close_file_ext.
7159         (open_inline_file) Set file.file to NULL, not file.
7160         (open_file_r, open_file_w) Initialize file.file; fill in file_ext
7161         struct and use open_file_ext().
7162         (read_record) Use file.file.
7163
7164         * file-handle.q: (prepend_current_directory) Pass through special
7165         filenames.
7166
7167         * filename.c: Only include unistd.h if HAVE_UNISTD_H.
7168         (normalize_filename) Pass through special filenames.
7169         (open_file, close_file) Accept pipe| and |pipe syntaxes as
7170         equivalent.
7171         (dirname) Rename blp_dirname() because of name conflict on some
7172         OS.  All references changed.  Reported by palme@uni-wuppertal.de
7173         (Hubert Palme).
7174         (is_special_filename) New function.
7175
7176         * get.c: (GTSV_OPT*) Add GTSV_OPT_MATCH_FILES.
7177         (trim_dictionary) Conditionalize some of the options on whether
7178         GTSV_OPT_MATCH_FILES is in *options.
7179         (rename_variables) Don't allow variables to be renamed as scratch
7180         variables.
7181         (MTF_*) New enum series.
7182         (struct mtf_file) New struct.
7183         (static vars mtf_head, mtf_tail, mtf_by, mtf_n_by, mtf_free) New
7184         vars.
7185         (cmd_match_files, mtf_free) New functions.
7186
7187         * lexer.c: (match_int) Needed parentheses around name to escape
7188         macro expansion.  Reported by Micah Altman
7189         <maltman@www-vdc.fas.harvard.edu>.
7190
7191         * print.c: Needed to include alloca.h.  Reported by Micah Altman
7192         <maltman@www-vdc.fas.harvard.edu>.
7193
7194         * recode.c: (convert_to_double) Parenthesize -DBL_MIN_10_EXP to
7195         -(DBL_MIN_10_EXP).  Reported by palme@uni-wuppertal.de (Hubert
7196         Palme).
7197         
7198         * str.h: Include stdarg.h.  Reported by palme@uni-wuppertal.de
7199         (Hubert Palme) and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
7200
7201 Thu Feb  5 00:18:21 1998  Ben Pfaff  <blp@gnu.org>
7202
7203         * html.c: (struct html_driver_ext) Move into htmlP.h.
7204         (html_preopen_driver) Initialize cp_x, cp_y.
7205         (html_submit) Implement as call to output_tab_table().
7206         (change_attributes) New function.
7207         (escape_string) New function.
7208         (output_tab_table) New function.
7209
7210         * list.q: (write_all_headers) Add code for writing headers for the
7211         html driver.
7212         (clean_up) Write out the html close-table tag.
7213         (determine_layout) Ignore html driver.
7214         (list_cases) Write html data.
7215
7216         * som.c: (som_submit) Move more of the code into output_table().
7217
7218         * tab.c: (static var hit) Make a global var and rename tab_hit.
7219         (static var tab_table_class) Make a global var.
7220
7221         * htmlP.h: New file.
7222
7223 Tue Feb  3 16:12:18 1998  Ben Pfaff  <blp@gnu.org>
7224
7225         * dump-sysfile.c: Removed.
7226
7227         * html.c: (preclose) Change comment in emitted code.
7228
7229         * matrix-data.c: Debugging off by default.  Comment fixes.
7230         (static var container) New var.
7231         (cmd_matrix_data) Create and destroy container.  Initialize
7232         is_per_factor[] to 0s.  Move code into new function
7233         string_to_content_type().  Require split values to be present in
7234         the data when ROWTYPE_ is explicit.  Call specific function, not
7235         general read_matrices().
7236         (string_to_content_type) New function.
7237         (context) Exclude all whitespace, not just spaces.
7238         (mget_token) A dot is a number.  Add assertion.
7239         (static var data) Renamed nr_data.
7240         (static var factor_values) Renamed nr_factor_values.
7241         (read_matrices) Renamed read_matrices_without_rowtype().  Handle
7242         only specific case.  Close data_file before exit.
7243         (fill_matrix) New function.
7244         (read_data_lines) Renamed nr_read_data_lines().  Remove debug
7245         printing.  Style fixes.  Message fixes.  Move code into
7246         fill_matrix().
7247         (read_matrices_without_rowtype) Rename
7248         matrix_data_read_without_rowtype().  Fix off-by-one error on
7249         loops.  Allocate nr_data[] memory from arena.
7250         (read_matrices_with_rowtype) Removed.
7251         (read_splits) Renamed nr_read_splits().  Style fixes.
7252         (read_factors) Renamed nr_read_factors().
7253         (dump_cell_content) Comment fixes.  Arguments changed.  Change
7254         debug printing.  All references changed.
7255         (output_data) Renamed nr_output_data().
7256         (static var wr_content) New var.
7257         (struct factor_data) New struct.
7258         (static var wr_data) New var.
7259         (static var wr_current) New var.
7260         (matrix_data_source_destroy_source) Removed.
7261         (read_matrices_with_rowtype) New function.
7262         (matrix_data_read_with_rowtype) New function.
7263         (wr_read_splits) New function.
7264         (compare_factors) New function.
7265         (wr_output_data) New function.
7266         (wr_read_rowtype) New function.
7267         (wr_read_factors) New function.
7268         (wr_read_indeps) New function.
7269         (glob var matrix_data_source) Make destroy_source member NULL as
7270         well.
7271
7272 Fri Jan 23 00:09:08 1998  Ben Pfaff  <blp@gnu.org>
7273
7274         * lexer.c: (syntax_error) Give better error message when at end of
7275         file.
7276
7277         * matrix-data.c: (var content_names[]) Fix PROX spelling.  Change
7278         N_SCALAR to output as plain N.
7279         (mdump_token) Change output format.
7280         (context) Fix message output interaction with spaces in input.
7281         (another_token) New function.
7282         (force_eol) Improved error message.
7283         (static var max_cell_index) New var.
7284         (read_matrices) Init `cells'.  factor_values is now per-cell.
7285         Init max_cell_index.
7286         (read_data_lines) Replace `compare' local with new `compare' arg.
7287         Debugging messages changed.  Only read factors if per_factor.
7288         Propagate error return from read_factors(), force_eol().
7289         Copy N_SCALAR values across the N vector.
7290         (read_matrices_without_rowtype) Don't init `cells'.  Don't need to
7291         check parentheses manually since we now have is_per_factor[].
7292         Call read_data_lines() with new args.  Check for end of data after
7293         looping, using another_token().
7294         (read_factors) Arguments changed.  Use max_cell_index to determine
7295         whether to read or compare factors.  Message fixes.
7296         (dump_cell_content) New function.
7297         (output_data) Completely rewritten because content types were
7298         supported to be nested inside factor values, not vice versa.
7299         
7300 Thu Jan 22 00:26:38 1998  Ben Pfaff  <blp@gnu.org>
7301
7302         * lexer.c: (syntax_error) Support formatted varargs messages.
7303
7304         * matrix-data.c: Turn debugging on by default.
7305         (static content_type[]) New array.
7306         (static content_names[]) New array.
7307         (static rowtype_, varname_) New vars.
7308         (static is_per_factor[]) New array.
7309         (static split_values) Moved declaration.
7310         (static n_continuous, first_continuous) New var.
7311         (cmd_matrix_data) Don't init split_values.  Assign ROWTYPE_ to
7312         rowtype_.  Simplify SPLIT code.  Init is_per_factor[].  Assign
7313         VARNAME_ to varname_.  Initialize first_continuous, n_continuous.
7314         Check for continuous variables.
7315         [DEBUGGING] (debug_print) Remove content_names[].
7316         (mdump_token) New macro.
7317         (mget_token_dump) New function.
7318         (mdump_token) New function.
7319         (context) New function.
7320         (mget_token) Fix messages.
7321         (static var data, split_values, factor_values) New vars.
7322         (read_matrices) Manage split_values, factor_values.
7323         (read_data_lines) New function.
7324         (read_matrices_without_rowtype) Implemented.
7325         (read_splits) Message fixes.  Uses `just_read'.
7326         (read_factors) New function.
7327         (output_data) New function.
7328         (matrix_data_source_destroy_source) Close the file handle.
7329         (glob var matrix_source) Change name from "DATA LIST" to "MATRIX
7330         DATA".
7331
7332         * str.c: (strpadcmp) Removed.
7333
7334         * vfm.c: (dump_splits) Initialize i; fix test for end of splits.
7335
7336 Sun Jan 18 00:30:59 1998  Ben Pfaff  <blp@gnu.org>
7337
7338         * Lots of source files: Add cast to unsigned character to calls to
7339         tolower() and toupper().
7340
7341         * aggregate.c: Set default_dict.splits to NULL.
7342
7343         * command.c: (static variable tab[]) Add MATRIX DATA.
7344
7345         * data-in.c: Add debugging defines.  Formatting fixes.
7346
7347         * expr-opt.c: Formatting fixes.
7348
7349         * lexer.c: (syntax_error) Message fixes.
7350
7351         * matrix-data.c: New enum series.
7352         (static vars fmt, section, diag, explicit_rowtype, signle_split,
7353         split_values, n_factors, factors, cells, pop_n, contents,
7354         n_contents) New vars.
7355         (cmd_matrix_data) Finished implementation.
7356         (compare_variables_by_mxd_vartype) New function.
7357         [DEBUGGING] (debug_print) New function.
7358         (static vars mtoken, mtokstr, mtoklen, mtokval) New vars.
7359         (read_matrices) New function.
7360         (read_matrices_without_rowtype) New function.
7361         (read_matrices_with_rowtype) New function.
7362         (read_splits) New function.
7363         (mget_token) New function.
7364         (force_eol) New function.
7365         [0] (test_tokenizer) New function.
7366         (matrix_data_source_destroy_source) New function.
7367         (glob var matrix_data_source) New var.
7368
7369         * misc.h: Include ieeefp.h if present.
7370
7371         * split-file.h: (cmd_split_file) Changes corresponding to struct
7372         dictionary changes.
7373
7374         * str.h: Fix memmem prototype.
7375
7376         * temporary.c: (save_dictionary, restore_dictionary,
7377         free_dictionary) Changes corresponding to struct dictionary
7378         changes.
7379
7380         * var.h: (MXD_* enums) New enum series.
7381         (struct matrix_data_proc) New struct.
7382         (struct split) Removed.
7383         (struct dictionary) Changed `splits' member from `split *' to
7384         `variable **'.
7385         (macro force_create_variable) New macro.  Replaced lots of
7386         create_variable()/assert() calls with calls to this macro.
7387
7388         * vars-atr.c: (discard_variables) Changed assertion.
7389         [GLOBAL_DEBUGGING] (force_create_variable) New function
7390         called by the macro of the same name.
7391         (clear_variable) Changes to delete splits from the dictionary
7392         corresponding to struct dictionary changes.
7393
7394         * vars-prs.c: (parse_variables) [GLOBAL_DEBUGGING] Check for
7395         corrupted variable `index' values in the dictionary passed in
7396         every time this function is called.
7397
7398         * vfm.c: (dump_splits, SPLIT_FILE_procfunc) Changes corresponding
7399         to struct dictionary changes.
7400
7401 Tue Jan 13 23:45:02 1998  Ben Pfaff  <blp@gnu.org>
7402
7403         * Makefile.am: (pspp_SOURCES) Add matrix-data.c.
7404
7405         * command.c: New includes.
7406         (static array cmd_table[]) Add ERASE, HOST, NEW FILE.
7407         (cmd_erase) New function.
7408         [unix] (shell) New function.
7409         (run_command) New function.
7410         (cmd_host) New function.
7411         (cmd_new_file) New function.
7412
7413         * expr-prs.c: (parse_primary) Message fix.
7414
7415         * inpt-pgm.c: Formatting fix.
7416         (cmd_reread) Implement the FILE subcommand.
7417
7418         * matrix-data.c: New file.
7419
7420         * q2c.c: (dump_header) Change output commenting style.
7421
7422         * weight.c: Comment fix.
7423
7424 Tue Jan 13 00:53:39 1998  Ben Pfaff  <blp@gnu.org>
7425
7426         * aggregate.c: (buf64_10x) Renamed buf64_1xx, all references
7427         changed.
7428         (buf_10x) Renamed buf_1xx, all references changed.
7429         (cmd_aggregate) Implemented cases 010, 011, 110, and 111 (all
7430         cases now implemented).
7431         (create_sysfile) New function.
7432         (agr_11x_func) New function.
7433
7434         * data-in.c: (parse_numeric) Work properly if there's an
7435         explicitly coded decimal point in the data and decimal places are
7436         specified on DATA LIST.  Bug reported by Dr Eberhard W Lisse
7437         <el@linux.lisse.na>.
7438
7439         * get.c: (cmd_get, cmd_save_internal) Allow extraneous slash
7440         before file specification on GET, SAVE, XSAVE.  Bug reported by Dr
7441         Eberhard W Lisse <el@linux.lisse.na>.
7442
7443         * q2c.c: [!HAVE_STRERROR] Include misc/strerror.c, not
7444         strerror.c.  Bug reported by Alexandre Oliva
7445         <oliva@dcc.unicamp.br>.
7446
7447         * sort.c: Include sort.h.  Comment fixes.  A few esthetic fixes.
7448         (static var separate_case_tab) New var.
7449         (cmd_sort_cases) Cancel temporary transformations here.  Free
7450         v_sort before return.
7451         (sort_cases) Run an EXECUTE procedure if SEPARATE is nonzero and
7452         we're reading from a sort stream.  Don't cancel temporary
7453         transformations.  Offload internal sorting to do_internal_sort().
7454         (do_internal_sort) New function.  Handles internal sorting even
7455         when SEPARATE is nonzero.  Doesn't free v_sort.
7456         (do_external_sort) Take new arg SEPARATE.  Only destroy `x' if
7457         it's non-NULL.
7458         (write_initial_runs) Take new arg SEPARATE.  Only destroy the old
7459         sink if SEPARATE is zero.
7460         (read_output_cases) Renamed read_sort_output(), all references
7461         changed.  Now uses separate_case_tab when it exists.
7462         (write_separate) New function.
7463
7464         * vfm.c: (page_to_disk) Destroy memory_source_cases, not
7465         memory_sink_cases.  Don't redundantly call
7466         vfm_source->destroy_source().
7467         (memory_stream_mode) After switching over, set memory_sink_cases
7468         to NULL.
7469
7470 Sat Jan 10 23:35:51 1998  Ben Pfaff  <blp@gnu.org>
7471
7472         * aggregate.c: (struct agr_var) Expand dbl[] array from 2 to 3
7473         elements.
7474         (static var prev_case) New, moved out of aggregate_single_case()
7475         local scope.
7476         (static var buf64_10x, buf_10x) New.
7477         (cmd_aggregate) Initialize prev_case.  Comment fixes.  Implement
7478         the 000, 001, 100, and 101 cases.  Free prev_case.
7479         (parse_aggregate_functions) Disallow scratch variables.
7480         (free_aggregate_functions) Only free agr_dict if non-null.  Use
7481         iter->function to determine numeric/string type, not
7482         iter->src->type.
7483         (aggregate_single_case) Don't manage prev_case.  Initialize
7484         aggregate info after dumping it.
7485         (accumulate_aggregate_info) Fix sum, weighted sum, mean, weighted
7486         mean, stddev, weighted stddev definitions.
7487         (dump_aggregate_info) Implemented.
7488         (initialize_aggregate_info) Renamed from
7489         initialize_aggregate_functions().  Initializes dbl[2].
7490         (agr_00x_trns_proc, agr_00x_end_func, write_case_to_sfm,
7491         agr_10x_trns_proc, agr_10x_trns_free, agr_10x_end_func) New.
7492
7493         * cases.c: (alloc_val) Removed.
7494
7495         * get.c: (cmd_save_internal) Initialize new `dict' member.
7496
7497         * sfm-write.c: (sfm_write_dictionary, write_header,
7498         write_variable, write_value_labels, write_documents) Reorganize,
7499         simplify for new parameter structure.
7500         (write_variable) Only one variable * argument now.
7501
7502         * sfm.h: (struct sfm_write_info) Removed `pri', `sec', and
7503         replaced by new `dict' member.
7504
7505         * temporary.c: (new_dictionary) Initialize n_documents.
7506
7507         * vars-atr.c: (dup_variable) Allocate `value's from dict into
7508         v->fv manually.
7509         (init_variable, replace_variable) Eliminate usage of alloc_val().
7510
7511         * vars-prs.c: (parse_DATA_LIST_vars) Accept PV_NO_SCRATCH option.
7512
7513         * vfm.c: (arrange_compaction) Allow `temporary' value of 2 to
7514         signal that AGGREGATE is to be used for forming final cases.
7515         (close_active_file) Call end_func before stopping lagging.  Cancel
7516         temporary after finishing compaction.
7517         (write_case) Comment fixes.  Cleaned up.
7518         (compact_case) Let AGGREGATE handle compaction when `temporary' is
7519         2.
7520
7521 Sat Jan 10 02:10:47 1998  Ben Pfaff  <blp@gnu.org>
7522
7523         * Makefile.am: (BUILT_SOURCES) Add means.c.
7524         (pspp_SOURCES) Add means.c.
7525         (EXTRA_DIST) Add means.q.
7526
7527         * command.c: (array cmd_table[]) Add MEANS.
7528
7529         * common.h: Esthetic fixes.  Comment fixes.  Test for
7530         MAX_SHORT_STRING greater than 8.
7531         (macros LOWEST, HIGHEST) New.
7532
7533         * data-in.c, data-list.c, recode.c: Comment fixes.
7534
7535         * means.q: New file, base version.
7536
7537         * mis-val.c: (parse_num_or_range, parse_numeric) Replace -DBL_MAX
7538         with LOWEST, DBL_MAX with HIGHEST.
7539
7540         * q2c.c: (dump_vars) Add an enum to array types giving the number
7541         of values for the enum.
7542
7543         * sfm-read.c: (sfm_read_dictionary, read_machine_flt64_info)
7544         Replace second_lowest_value with second_lowest_flt64.
7545
7546         * sfm-write.c: (write_variable, write_rec_7_34) Replace
7547         second_lowest_value with second_lowest_flt64.
7548
7549         * t-test.q: Comment fix.
7550
7551         * temporary.c: (restore_dictionary) Esthetic fix.
7552
7553         * tokens.h: (force_match_id, force_match, force_string, force_int,
7554         force_num, force_id) Replace msg() with syntax_error().
7555
7556         * var.h: (struct means_proc) New.
7557         (struct variable) Add mns member to `p' union.
7558
7559         * vars-prs.c: (parse_variable, parse_dict_variable,
7560         parse_variables, parse_DATA_LIST_vars) Replace msg() with
7561         syntax_error().
7562
7563 Thu Jan  8 22:28:41 1998  Ben Pfaff  <blp@gnu.org>
7564
7565         * Makefile.am: (pspp_SOURCES) Add tab.h.
7566
7567         * Most source files: Added a cast to unsigned char in usages of
7568         the ctype is*() functions.  Replaced `end of command expected'
7569         calls to msg() with calls to syntax_error().
7570
7571         * frequencies.q: (dump_condensed) Fix tab_dim() column reference.
7572
7573         * lexer.c: (hex_val) Removed (was dead code).
7574         (idmatch) Parenthesize function name to avoid macro expansion.
7575
7576         * postscript.c: Comment fixes.
7577         (ps_preopen_driver) Change default font size to 10pt.
7578
7579         * sfm-read.c: (read_variables) Byteswap sv.print, sv.write as
7580         int32s.
7581         (parse_format_spec) Change system-file format spec argument type
7582         to int32.  Parse the format spec with bitwise operators.
7583
7584         * sfmP.h: (struct sysfile_format) Removed.
7585         (struct sysfile_variable) Changed print, write members from
7586         sysfile_format to int32.
7587
7588         * tokens.h: Esthetic fixes.
7589         [__GNUC__] (macro id_match) New macro to hopefully speed up
7590         identifier matching.
7591         (macros match_id, match_tok, match_int) Implemented in
7592         compiler-independent manner; no longer GNU C only.
7593
7594         * vfm.h: Include time.h.
7595
7596 Mon Jan  5 11:06:15 1998  Ben Pfaff  <blp@gnu.org>
7597
7598         * data-list.c: (dump_fixed_table) Change tab_dim().
7599
7600         * dump-sysfile.c: (open_sysfile) Fix mmap() call.
7601
7602         * error.c: Include command.h.
7603
7604         * frequencies.g: Formatting fixes.
7605
7606         * frequencies.q: Add tab_dim() calls.  Make the total cell a
7607         joined cell.
7608
7609         * glob.c: Include command.h.
7610
7611         * sfm-read.c: (struct sfm_fhuser_ext) New members sysmis, highest,
7612         lowest.
7613         (sfm_read_dictionary) Initialize sysmis, highest, lowest.
7614         (sfm_read_machine_flt64_info) Update sysmis, highest, lowest.
7615         (read_variables) Byteswap sv.type; byteswap sv.print, sv.write as
7616         the other elements (is this right?).
7617         (read_variables) Use lowest, highest members.
7618         (parse_format_spec) New arg `vv' for more stringent checking.
7619         (dump_dictionary) Byteswaps nonexplicit data.
7620         (sfm_read_case) Byteswap numeric data.
7621
7622         * som.c: Initialize table_num to 1.
7623         (render_segments) Remember to increment y_index after each table
7624         segment.
7625
7626         * sysfile-info.c: (cmd_sysfile_info) Change tab_dim().  Don't call
7627         avl_count() on a NULL tree.  No title for the second table.
7628         (cmd_display) Handle DISPLAY VECTORS by calling display_vectors().
7629         Handle AS_SCRATCH as AS_NAMES.  Warn if no variables.  Re-enable;
7630         fix call to display_variables().
7631         (display_variables) Default to 4 columns, not 3.  Set up headers.
7632         Column title is Variable, not Name.  Fix index column.
7633         Add joint text.  Add tab_dim().  Handle value labels properly.
7634         Handle DISPLAY LABELS properly.  Draw boxes correctly.
7635         (describe_variable) Value labels don't need titles.  Don't clear
7636         nonexistent index column.
7637         (compare_vectors_by_name) New function.
7638         (display_vectors) New function.
7639
7640         * tab.c: (tab_height) Add assertion.
7641         (tab_null) Add debug code.
7642         (evaluate_dimensions) Add debug code.
7643
7644         * var.h: (struct variable) get_proc data is sometimes used
7645         simultaneously with other per-procedure info, therefore it was
7646         removed from the union.  All references changed.        
7647
7648 Sun Jan  4 18:13:33 1998  Ben Pfaff  <blp@gnu.org>
7649
7650         * ascii.c: (ascii_close_page) Put title on second line of headers
7651         if there is no subtitle.
7652
7653         * command.c: (glob var cur_proc) Move definition here, from
7654         common.c.
7655         (cmd_remark) Emit blank line before remarks.
7656
7657         * command.h: (glob var cur_proc) Move declaration here, from
7658         common.h.
7659
7660         * data-list.c: (dump_fixed_table) Fix messages.
7661         (dump_free_table) Call tab_nat_dim().
7662
7663         * descript.q: (dump_z_table) Modify tab_dim() call.
7664
7665         * frequencies.q: (dump_condensed, dump_statistics) Add tab_dim()
7666         call.
7667         (dump_statistics) Don't output header.
7668
7669         * groff-font.c: Minor format fix.
7670
7671         * html.c: Comment fix.
7672
7673         * list.q: (write_varname) Indent after advancing page.
7674
7675         * output.h: Minor reordering.
7676
7677         * postscript.c: Comment fixes.  Many places, '\n' was replaced by
7678         a reference to eol[].
7679         (struct ps_driver_ext) New member eol[].
7680         (ps_preopen_driver) Initialize eol[].
7681         (ps_postopen_driver) Fix sense of text for text_opt, line_opt
7682         defaults.  Handle headers.  Fix test for minimum page length.
7683         (static var option_tab[]) Add `line-ends'.
7684         (ps_option) Handle line-ends to change eol[].
7685         (postopen) Scale prop_em_width and fixed_width properly.  Set the
7686         prologue title to outp_title if applicable.  Replace the prologue
7687         line ends with eol[].  Call draw_headers() if headers are enabled.
7688         (text_width) New function.
7689         (out_text_plain) New function.
7690         (draw_headers) New function.
7691
7692         * print.c: (dump_table) Call tab_nat_dim().
7693
7694         * som.c: (som_blank_line) Only advance a line if not at the top of
7695         a page.
7696         (som_submit) Move several informational table calls here.
7697         Increment subtable_num if SOMF_NO_TITLE not set.
7698         (output_table) Advance a line if SOMF_NO_SPACING not set.
7699         (render_columns, render_segments, render_simple) Handle spacing
7700         between tables.  Handle table titles.  Remove debug output.
7701
7702         * som.h: (SOMF_*) New enum series.
7703         (struct som_table_class) New member `flags'.
7704
7705         * sysfile-info.c: (cmd_sysfile_info) Calls tab_nat_dim().  No
7706         headers or spacing.
7707         (display_variables) Calls tab_nat_dim().
7708         (describe_variable) Remove restriction on number of value labels.
7709         Make value labels separated by thin lines.
7710
7711         * tab.c: (tab_create) Default `flags' to none.
7712         (tab_float) New arg `w'.  All references changed.
7713         (tab_nat_dim) New function.
7714         (tab_output_text) No title or spacing.
7715         (tab_flags) New function.
7716         (tabi_flags) New function.
7717         (tabi_title) New function.
7718         (strip_height) Removed.
7719         (tabi_render) Skip title when necessary.
7720         (static var tab_tab_class) Add tabi_flags, tabi_title.
7721         (evaluate_dimensions) Disable display of column, row size.
7722         (sum_columns) Add title height to top header.
7723         (render_strip) Moved within file.
7724
7725         * tab.h: (struct tab_table) New member `flags'.
7726
7727         * vfm.c: (dump_splits) Calls tab_nat_dim().  No title.
7728
7729 Sat Jan  3 16:55:44 1998  Ben Pfaff  <blp@gnu.org>
7730
7731         * Most source files: Add `const' attribute in all appropriate
7732         places.
7733         
7734         * sysfile-info.c: (cmd_sysfile_info) Add tab_dim() call, add a
7735         column to the variables table for use by describe_variable().
7736         (cmd_display) Disable for the present.
7737         (display_documents) Don't wrap documents.
7738         (display_variables) Table has four columns now.
7739         (describe_variable) Table has four columns now.  Don't use a
7740         subtable, use joined cells instead.
7741
7742         * tab.c: (tab_create) Don't set `join'.
7743         (tab_realloc) ct array is not made up of a_string's.
7744         Reallocate trh, hrh, h arrays, initialize trh array.  Initialize
7745         cell contents on GLOBAL_DEBUGGING, not DEBUGGING.
7746         (text_format) New function.
7747         (tab_title) Rewritten, uses text_format().
7748         (tab_text) Rewritten, uses text_format().
7749         (tab_joint_text) New function.
7750         (tab_join) Removed.
7751         (static var hit) New variable.
7752         (render_strip) New args r1, r2.  Implement joined cells that fit
7753         on a single page.
7754         (tabi_render) Increment hit.  Pass new args to render_strip().
7755         (evaluate_dimensions) [GLOBAL_DEBUGGING] Check for uninitialized
7756         cells.  For t_naw and t_nah, ignore joined cells and null cells in
7757         calculations.
7758         
7759         * tab.h: (struct tab_join_rect) Removed.
7760         (struct tab_table) Removed `join'.
7761         (TAB_JOIN_MAIN) Removed.
7762         (struct tab_joined_cell) New struct.
7763         (TAT_NOWRAP) New enum.
7764
7765 Fri Jan  2 01:39:58 1998  Ben Pfaff  <blp@gnu.org>
7766
7767         * ascii.c: (ascii_postopen) Replace ASCII_* macros with their
7768         expansions.
7769         (ascii_postopen_driver) Fix initialization of *_spacing so that
7770         the TAL_0 bit doesn't count.
7771
7772         * data-list.c: (dump_fixed_table) Use natural width for Format
7773         column.
7774
7775         * glob.c: (rerange) Removed.
7776         (get_date) Formatting fixes.  Internationalization fix.
7777
7778         * html.c: (html_postopen_driver) Replace HTML_DEFAULT_OUTPUT_FILE
7779         with "pspp.html".
7780
7781         * postscript.c: (ps_postopen_driver) Replace
7782         PS_DEFAULT_OUTPUT_FILE with "pspp.ps".
7783
7784         * som.c: (som_submit) Don't eject page before every table.
7785         (output_table) Fix order of arguments on call to area().
7786         (render_columns) Fix calculation of max_len.
7787         
7788         * tab.c: (tabi_cumulate) Minor change to increase elegance.
7789         (render_strip) New function.
7790         (strip_height) New function.
7791         (tabi_render) Rewrite as calls to render_strip().
7792
7793         * tab.h: (TAT_* enums) Removed TAT_RICH, all references removed.
7794         Renumbered TAT_PRINTF, TAT_TITLE, TAT_FIX to correspond better
7795         with the TAB_* and OUTP_T_* constants.
7796         
7797 Thu Jan  1 11:53:52 1998  Ben Pfaff  <blp@gnu.org>
7798
7799         * Makefile.am: Formatting fixes.
7800
7801         * ascii.c: (ascii_postopen_driver) Initialize *_line_spacing[],
7802         *_line_width[].
7803
7804         * data-list.c: (dump_fixed_table) Add tab_dim() call.
7805
7806         * descript.q: (dump_z_table, display) Add tab_dim() calls.
7807
7808         * dump-sysfile.c: (glob var length) Make type off_t.
7809         (usage) Fix arguments.
7810         (main) Return 0.
7811
7812         * output.h: (OUTP_T_*) Change constants' value to match tab.h.
7813         Now right-justification is the default so many references had to
7814         change.
7815         (struct outp_class) Removed line_width, all references changed.
7816         (OUTP_DEV_*) Add OUTP_DEV_DISABLED.
7817         (struct outp_driver) Add elements horiz_line_width,
7818         vert_line_width, horiz_line_spacing, vert_line_spacing.  Remove
7819         som element.
7820
7821         * postscript.c: (outp_encodings) Formatting fixes.  Fix garbage
7822         collection.
7823         (postopen) Initialize all the informational members of
7824         outp_driver.
7825
7826         * som.c: (som_blank_line) New function, renamed from blank_line(),
7827         all references changed.
7828         (som_submit) Disables drivers whose pages can't be opened.
7829         (render_columns, render_simple, render_segments) Add debug output.
7830         (render_columns) Fix loop range.
7831         (render_simple) Don't try to render the headers, they're taken
7832         care of automatically.  Advance cp_y past the table when done.
7833         (render_segments) Fix loop ranges.
7834
7835         * tab.c: Initialize new members of tab_table.
7836         (tab_vline) Handle trv[]; don't set style for spacing-only lines.
7837         (tab_hline) Handle trh[]; don't set style for spacing-only lines.
7838         (tab_box) Handle trh[], trv[]; don't set style for spacing-only
7839         lines.
7840         (set_expr) Removed.
7841         (tab_dim) New function.
7842         (tab_col_width) Removed.
7843         (tab_row_height) Removed.
7844         (tab_output_text) Call tab_dim().
7845         (tabi_driver) Call evaluate_dimensions(), sum_columns().
7846         (tabi_area) Implemented.
7847         (tabi_cumulate) Implemented.
7848         (tabi_render) Partially implemented, but broken.
7849         (var tab_table_class) Made static.
7850         (evaluate_dimensions) New function.
7851         (sum_columns) New function.
7852
7853         * tab.h: (enum t_*) Now start at t_end.  New: t_ptw, t_nr, t_nc,
7854         t_nah, t_naw, t_neg, t_xch, t_dup, t_lbl, t_jnz, t_sac, t_sar,
7855         t_scr, t_srr, t_sentinel.  Removed: t_nat.
7856         (struct tab_table) New: wl, wr, ht, hb, trh, hrh, trv, wrv, dim,
7857         max_stack_height, w, h.  Removed: ce, re.
7858         (macro blank_line) Removed.
7859         (glob var zero_length) Removed.
7860
7861 Fri Dec 26 15:44:31 1997  Ben Pfaff  <blp@gnu.org>
7862
7863         * Most source files: include some of the new include files broken
7864         out of var.h.
7865         
7866         * Makefile.am: (pspp_SOURCES) Add all the new source files to the
7867         list.
7868
7869         * aggregate.c: (glob var outfile) Make static.
7870
7871         * command.c: (glob var pgm_state) Move here.
7872
7873         * common.c: (glob vars endian, second_lowest_value, pgmname,
7874         finished, curdate, cur_proc, start_interactive, history_file) Move
7875         here.
7876
7877         * descript.q: (structs dsc_z_score, descriptives_trns) Move here.
7878
7879         * file-handle.q: (glob vars files, inline_file) Move here.
7880
7881         * glob.c: Lost lots of glob vars, detailed in individual file
7882         entries.
7883         (init_glob) set_printer, set_screen were obsolete, deleted.
7884         set_cprompt has fewer spaces because pspp has fewer letters than
7885         fiasco.
7886
7887         * inpt-pgm.c: (glob vars inp_init, inp_init_size) Move here.
7888         (inp_nval) Made static.
7889
7890         * lexer.c: (glob vars token, tokval, tokstr, tokstr_size,
7891         tokstr_len, toklongstr, tokint) Move here.
7892
7893         * misc.c: Lost several vars and functions.
7894
7895         * set.q: (all the set_* variables) Move here.
7896
7897         * str.c: (strmaxcpy, strbarepadcpy, strbarepadlencpy, strpadcpy,
7898         blpstrset, strpadcmp, memrev, memrmem, cmp_str) Move here from
7899         misc.c.
7900
7901         * tab.c: (set_expr, tab_col_width, tab_row_height) New functions.
7902
7903         * tab.h: (enum series t_*) New enums.
7904         (struct tab_table) Use arena struct tag.  New members ce, re.
7905
7906         * tokens.h: Comment fixes.
7907
7908         * var.h: Move lots of enums and variables and functions and
7909         structures to other files.  Use and declare a lot more union and
7910         struct tags.  Comment fixes.  
7911
7912         * vector.c: (glob vars vec, nvec) Move here.
7913
7914         * vfm.c: (glob vars reinit_sysmis, reinit_blanks, init_zero,
7915         init_blanks, last_vfm_invocation) Move here.
7916
7917         * cases.h: New file.
7918         (struct long_vec) Move here.
7919         (vec_init, vec_clear, vec_insert, vec_delete, devector, envector)
7920         Move here.
7921
7922         * command.h: New file.
7923         (STATE_* enums) Move here.
7924         (glob var pgm_state) Move here.
7925
7926         * format.c: New file.
7927         (glob var formats) Move here.
7928         (parse_format_specifier_name, fmt_to_string,
7929         check_input_specifier, check_output_specifier,
7930         check_string_specifier, convert_fmt_ItoO, parse_format_specifier)
7931         Move here.
7932
7933         * format.h: New file.  Move functions now in format.c here.
7934         (FMT_* enums) Move here.
7935         (struct fmt_desc) Move here.
7936         (FCAT_* enums) Move here.
7937         (struct fmt_spec) Move here.
7938         (glob vars formats, fmt_parse_ignore_error) Move here.
7939
7940         * inpt-pgm.h: New file.
7941         (INP_* enums) Move here, make #defines into enums.
7942         (glob vars inp_init, inp_init_size) Move here.
7943
7944         * sort.h: New file.
7945         (glob vars v_sort, nv_sort) Move here.
7946         (sort_cases, read_sort_output) Move here.
7947
7948         * vector.h: New file.
7949         (struct vector) Move here, add struct tag.
7950         (glob vars vec, nvec) Move here.
7951         (find_vector) Move here.
7952
7953         * New file.
7954         (glob vars last_vfm_invocation, temp_case, reinit_sysmis,
7955         reinit_blanks, init_zero, init_blanks) Move here.
7956         (struct case_stream) Move here.
7957         (glob vars vfm_source, vfm_sink, vfm_memory_stream,
7958         vfm_disk_stream, sort_stream, data_list_source,
7959         input_program_source, file_type_source, get_source, n_lag) Move
7960         here.
7961         (procedure, write_case, lagged_case, compact_case, page_to_disk)
7962         Move here.
7963                 
7964 Wed Dec 24 22:40:42 1997  Ben Pfaff  <blp@gnu.org>
7965
7966         * Makefile.am: (pspp_SOURCES) Added html.c, som.c, som.h.
7967         (LDADD) Add libdcdflib.
7968
7969         * ascii.c: Comment and formatting fixes.  Almost every external
7970         function had an assert added, checking driver_open and page_open.
7971         (ascii_init_driver) Broken into ascii_preopen_driver,
7972         ascii_postopen_driver, ascii_close_driver.  Manages driver_open.
7973         (ascii_open_page) Sets page_open.
7974         (ascii_close_page) Clears page_open.
7975
7976         * html.c: Comment and formatting fixes.  Almost every external
7977         function had an assert added, checking driver_open and page_open.
7978         (html_init_driver) Broken into html_preopen_driver,
7979         html_postopen_driver, html_close_driver.  Manages driver_open.
7980         (html_open_page) Sets page_open.
7981         (html_close_page) Clears page_open.
7982         (html_submit) Disabled.
7983
7984         * lexer.c: (parse_string) Remove debugging printf.
7985
7986         * list.q: (determine_layout) Open a page if one is not yet open.
7987
7988         * output.c: Comment fixes.
7989         (add_class) Set the class member of the new list element.
7990         (parse_options) Don't handle device type.
7991         (colon_tokenize) New function.
7992         (configure_driver) New four-field format with a field for device
7993         type.  Now initialize driver_open, page_open, next, and prev
7994         fields.  Use new colon_tokenize() function.  Don't do a memory
7995         copy to replace a driver, it doesn't work; instead delete the old
7996         driver and insert a new one.
7997         (destroy_driver) Don't call som_destroy_driver().  Close the page
7998         if it's open.  Find the class in the list of classes and decrement
7999         that reference count.  Remove the driver from the global driver
8000         list.
8001         (outp_iterate_enabled_drivers) Renamed outp_drivers().  All
8002         references changed.  Rewritten.  Don't return a driver that's not
8003         enabled.
8004         (outp_eject_page) All references to som_internal_eject_page()
8005         changed to use this.  Sets cp_x to 0 as well as cp_y.
8006
8007         * output.h: (OUTP_I_* enums) Removed.
8008         (struct som_submission_form) Removed.
8009         (struct outp_class) init_driver broken into preopen_driver,
8010         postopen_driver, and close_driver.  submit changed to take a
8011         som_table argument.
8012
8013         * postscript.c: Comment and formatting fixes.  Almost every
8014         external function had an assert added, checking driver_open and
8015         page_open.
8016         (ps_init_driver) Broken into ps_preopen_driver,
8017         ps_postopen_driver, ps_close_driver.  Manages driver_open.
8018         (ps_open_page) Sets page_open.
8019         (ps_close_page) Clears page_open.
8020
8021         * som.c: New file, base implementation.
8022         
8023         * som.h: (struct som_table) Add struct tag.
8024         (enum SOM_COL_ACROSS) Removed.
8025         (SOM_ROWS, SOM_COLUMNS) New enums.
8026         (struct som_table_class) Add member `cumulate'.  Remove `segment';
8027         change `render' arguments.
8028         (struct som_point, struct som_rect) Removed.
8029         (som_submit_table) Fixed typo, should have been som_submit.
8030
8031         * sysfile-info: (describe_variable) Don't try to insert a
8032         subtable; just destroy it for now.
8033
8034         * t-test.q: Include dcdflib/cdflib.h instead of cdflib.h.  Fix
8035         references to value labels.
8036
8037         * tab.c: (tab_destroy) New function.
8038         (tab_columns) Change argument.
8039         [0] (tab_submit) Remove dead code.
8040         (tab_title) Allocate string from the table's arena.
8041         (tab_output_text) Only free the buffer if we allocated it.
8042         (tab_submit) New function.
8043         (static vars t, d) New static vars.
8044         (tabi_table, tabi_driver, tabi_count, tabi_area, tabi_columns,
8045         tabi_headers, tabi_cumulate, tabi_render) New functions.
8046         (glob var tab_table_class) New global var.
8047
8048         * tab.h: (struct tab_join_rect) Don't use a som_rect; directly
8049         encapsulate the rectangle.  All references changed.
8050         
8051 Sun Dec 21 16:18:58 1997  Ben Pfaff  <blp@gnu.org>
8052
8053         * All header files updated to use struct tags in addition to
8054         typedefs for all structures.  Don't use word `struct' in struct
8055         tags.
8056         
8057         * Makefile.am: (pspp_SOURCES) Remove html.c.
8058         (INCLUDES) Replace the lib/* includes with a single lib/ include;
8059         all references updated.
8060
8061         * command.c: (parse_cmd) Remove call to som_check_workspace.
8062         (output_line) Update to new som.
8063
8064         * data-in.c: (parse_numeric) A single dot is not an error; it is
8065         the system-missing value.
8066
8067         * data-list.c: (dump_fixed_table, dump_free_table) Update to new
8068         som.
8069
8070         * data-out.c: Added `const' as appropriate to many prototypes.
8071         (convert_E, convert_F, convert_CCx) Take double argument instead
8072         of value * argument.
8073         (convert_format_to_string) Call changed functions appropriately.
8074         Instead of modifying the caller's value for FCAT_SHIFT_DECIMAL,
8075         make a local copy of the value.
8076
8077         * descript.q: Remove custom_variables() prototype now provided by
8078         q2c.  
8079         (custom_variables) Don't increment sbc_variables, the caller does
8080         this.
8081         (dump_z_table, display) Update to new som.
8082
8083         * error.c: (vmsg) Add const to prototype.  Remove code to handle
8084         `too many errors' condition.
8085         (check_error_count) New function.
8086         (msg) Add const to prototype.
8087
8088         * filename.c: (open_file) Rewrite for elegance.
8089
8090         * frequencies.q: Remove custom_*() prototypes now provided by q2c.
8091         (dump_full, dump_condensed, dump_statistics) Update for new som.
8092
8093         * list.q: Don't include somP.h.  Change all references to
8094         som_driver_ext to refer to the new members of som_driver.  Change
8095         som_internal_eject_page() references to outp_eject_page().
8096
8097         * main.c: (parse) Rewrite for elegance.  Add call to
8098         check_error_count().
8099
8100         * output.c: (add_class, outp_list_classes, outp_configure_driver)
8101         Rewrite or revise for new outp_driver_class_list structure.
8102         (outp_iterate_enabled_drivers) Fix comparison between disabled
8103         devices and current device type.
8104         (outp_eject_page) New function.
8105
8106         * output.h: Comment fixes.
8107         (struct outp_driver) New members driver_open, page_open, cp_x,
8108         cp_y, font_height, prop_em_width, fixed_width.  Deleted members
8109         ref_count, next.
8110         (struct outp_driver_class_list) New struct.
8111         (outp_class_list) Changed to type outp_driver_class_list; all
8112         references updated.
8113
8114         * print.c: (dump_table, print_trns_proc) Updated for new som.
8115
8116         * q2c.c: (dump_vars) Simplify array subcommand code.  Declare
8117         prototypes for custom subcommands.
8118         (dump_subcommand) Always include the `else'.
8119         (dump_parser) Fix comments in output code.
8120
8121         * set.q: Reordered functions.
8122
8123         * som-frnt.c, som-high.c, som-low.c, somP.h: Removed.
8124         
8125         * som.h: Rewritten from scratch.
8126
8127         * str.h: Remove dead code.
8128
8129         * tab.c, tab.h: New files, base implementation.
8130
8131         * sysfile-info.c: (cmd_sysfile_info, describe_variable) Update to
8132         new som.
8133
8134         * t-test.q: New code from John Williams
8135         <johnr.williams@stonebow.otago.ac.nz>.  Include math.h, cdflib.h.
8136         Many many new static vars and defines.
8137         (precalc, postcalc, g_postcalc, z_postcalc, t_pairs, t_groups,
8138         groups_calc, pairs_calc, z_dev_calc, z_calc) New functions.
8139         (struct value_list) New struct.
8140         (variance, covariance, pooled_variance, oneway, pearson_r, f_sig,
8141         t_crt, t_sig, print_t_groups) New functions.
8142         (cmd_t_test) Implemented.
8143
8144         * temporary.c: (cancel_temporary) Only free the temp_dict if it's
8145         non-NULL.
8146
8147         * vfm.c: (dump_splits) Update to new som.
8148
8149 Thu Dec  4 23:02:22 1997  Ben Pfaff  <blp@gnu.org>
8150
8151         * Makefile.am: (fiasco_SOURCES) Add html.c.
8152
8153         * aggregate.c: Base source.
8154
8155         * ascii.c: (postopen, preclose) Reformat.
8156
8157         * data-out.c, expr-evl.c: Comment fixes.
8158         
8159         * filename.c: (open_file) When opening a file for writing, use
8160         line buffering instead of full buffering for better interactive
8161         performance.  Suggested by Valerio Aimale
8162         <valerio@svpop.com.dist.unige.it>.  Also, recognize special file
8163         names `stdin', `stdout', `stderr'.
8164
8165         * groff-font.c: Comment fixes.
8166
8167         * html.c: New file; base version.
8168
8169         * list.q: (write_all_headers, clean_up, determine_layout,
8170         list_cases) Ignore `special' devices for now.  Needs to be fixed
8171         later.
8172
8173         * output.c: (outp_init) Add html driver to list; reverse list
8174         order.
8175
8176         * output.h: (struct outp_class_struct) New members `special',
8177         `submit'; comment fixes.  All references changed.
8178
8179         * postscript.c: (ps_init_driver) Make defaults for text_opt,
8180         line_opt depend on whether the OUTP_DEV_SCREEN bit is set on the
8181         device.
8182         (postopen) Comment fix.
8183         (preclose) Comment fixes, formatting fixes.  Change x->file.file
8184         references to more proper f->file.
8185
8186         * som-high.c: (som_submit_table) Special classes use their own
8187         renderers.
8188
8189         * som.h: Comment fixes.
8190
8191         * temporary.c: (new_dictionary) Don't try to xstrdup() a NULL
8192         string.
8193         
8194 Tue Dec  2 14:36:07 1997  Ben Pfaff  <blp@gnu.org>
8195
8196         * Makefile.am: (fiasco_SOURCES) Add aggregate.c back in.
8197
8198         * aggregate.c: Still working on this.
8199
8200         * command.c: (cmd_table[]) Add AGGREGATE back in.
8201         (split_words) Make '-' a legal word separator as well as ' '.
8202
8203         * main.c: Comment fixes.
8204
8205         * q2c.c: (dump_parser) Don't require the procedure's full name to
8206         be present, in the generated source.
8207
8208         * t-test.q: Change name to `t-test' from `t test'.  Let PAIRS be
8209         multiply specified and let it be default; let MISSING, CRITERIA,
8210         FORMAT be multiply specified.
8211         (cmd_t_test) Parse command name.  [DEBUGGING] Call debug_print().
8212         (custom_groups) Fix defaults.
8213         (custom_pairs) Check whether this is a PAIRS subcommand before
8214         attempting to parse.  Better garbage collection.  Proper storage
8215         allocation.
8216         [DEBUGGING] (debug_print) New function.
8217
8218         * temporary.c: Comment fixes.
8219         (copy_variable) Don't copy variable name and index.
8220         (save_dictionary) Copy variable name and index by hand.
8221
8222         * vars-atr.c: Comment fixes.
8223         (create_variable) New dictionary argument.  All references
8224         changed.
8225         (common_init_stuff) New dictionary argument.  All references
8226         changed.
8227         (init_variable) New dictionary argument.  All references changed.
8228         (dup_variable) New function.
8229
8230         * vars-prs.c: (parse_variables) If there are any errors, we always
8231         return 0.  Previously, it was possible for some types of errors to
8232         be ignored.
8233         
8234 Sat Nov 22 01:20:59 1997  Ben Pfaff  <blp@gnu.org>
8235
8236         * Makefile.am: (fiasco_SOURCES) For 0.1.5 release, remove
8237         aggregate.c.
8238
8239         * command.c: (cmd_table[]) Comment out AGGREGATE; add T TEST.
8240
8241         * list.q, t-test.q: Remove ALL option from VARLIST declaration in
8242         grammar rules.
8243
8244         * q2c.c: Comment fixes.
8245         (SBC_* enums) Remove SBC_VARLIST_ALL; all references removed.
8246         
8247         * t-test.q: (cmd_list) Rename cmd_t_test.
8248
8249         * temporary.c: (new_dictionary) Don't declare as static.
8250         
8251 Fri Nov 21 00:03:06 1997  Ben Pfaff  <blp@gnu.org>
8252
8253         * aggregate.c: Changes, still not finished.
8254
8255         * file-handle.q, frequencies.q, list.q, set.q: Comment fixes.
8256
8257         * q2c.c: Comment fixes.  Now its output is internationalized.
8258         (get_token) Fix parsing of escapes within literal strings.
8259         (main) Fix bad #line directives in output.
8260
8261         * t-test.q: Base implementation.
8262
8263         * temporary.c: (new_dictionary) New function.
8264         (restore_dictionary) [__CHECKER__] Change fill character to *
8265         (from @).
8266         
8267 Sun Nov 16 01:29:57 1997  Ben Pfaff  <blp@gnu.org>
8268
8269         * Makefile.am: (BUILT_SOURCES, fiasco_SOURCES) Add t-test.c
8270
8271         * aggregate.c: Changes, still not finished.
8272
8273         * descript.q, list.q: Comment fixes.
8274
8275         * q2c.c: Almost completely rewritten.
8276
8277         * t-test.q: New file, not complete.
8278
8279 Fri Nov 14 00:14:48 1997  Ben Pfaff  <blp@gnu.org>
8280
8281         * aggregate.c: Changes, still not finished.
8282
8283         * sort.c: (sort_cases) Call cancel_temporary() instead of doing it
8284         by hand.
8285
8286         * temporary.c: (cancel_temporary) New function.
8287
8288         * vars-atr.c: (discard_variables) Call cancel_temporary() instead
8289         of doing it by hand.
8290
8291         * vfm.c: (close_active_file) After restoring a TEMPORARY
8292         dictionary, set temp_dict to NULL.  Cancel TEMPORARY through
8293         cancel_temporary().
8294         (SPLIT_FILE_procfunc) Comment fix.
8295
8296 Tue Oct 28 16:08:45 1997  Ben Pfaff  <blp@gnu.org>
8297
8298         * Makefile.am: (fiasco_SOURCES) Add aggregate.c.
8299
8300         * aggregate.c: New file, not finished yet.
8301
8302         * command.c: (cmd_table) Add AGGREGATE.
8303
8304         * common.h: (pgm_state) Move declaration to var.h.
8305
8306         * lexer.c: (bin_value_func, oct_value_func, hex_value_func) i18n
8307         fixes.
8308         (parse_string) Message fix.
8309
8310         * recode.c: Comment fix.
8311
8312         * sfm-read.c: (read_variables) Code esthetic fixes.
8313         (write_header) Default date is `Jan', not `JAN'.
8314
8315         * sfmP.h: (bswap_int32) [!__linux__] Fix off-by-one errors.
8316
8317         * sort.c: (cmd_sort_cases) Farm the work out to new function
8318         parse_sort_variables().
8319         (parse_sort_variables) New function.
8320         (sort_cases) New function.  Cancels temporary transformations,
8321         which sorting didn't do previously.
8322         (cmd_sort_cases) Better garbage collection on error.  Uses
8323         do_external_sort().
8324         (write_initial_runs, merge_once) Improved code esthetics.
8325         (sort_stream_read) Reduced to one call to read_output_cases().
8326         (read_output_cases) New function.
8327
8328         * var-labs.c: (cmd_variable_labels) Re-enabled truncation of
8329         variable labels to 120 characters.
8330
8331         * var.h: Comment fixes.
8332         (glob var pgm_state) From common.h.
8333
8334         * vars-atr.c: (discard_variables) Set pgm_state to STATE_INIT.
8335
8336         * vars-prs.c: (parse_DATA_LIST_vars) Support PV_SINGLE in
8337         options.  Set *names to NULL on error.
8338
8339         * vfm.c: (memory_stream_init) Assert compaction_nval != 0.
8340
8341 Thu Oct  9 09:59:49 1997  Ben Pfaff  <blp@gnu.org>
8342
8343         * sfm-write.c, vfm.c: [HAVE_UNISTD] #include <unistd.h>, needed by
8344         SunOS4.  From Alexandre Oliva <oliva@dcc.unicamp.br>.
8345
8346 Wed Oct  8 18:55:24 1997  Ben Pfaff  <blp@gnu.org>
8347
8348         * vfm.c: (page_to_disk) Added missing local variables.
8349
8350 Tue Oct  7 20:23:17 1997  Ben Pfaff  <blp@gnu.org>
8351
8352         * get.c: Comment fix.
8353
8354         * sort.c: (cmd_sort_cases) Attempt to perform internal sort if the
8355         source is anything other than a disk stream, not just if it's in a
8356         memory stream.  Call page_to_disk() before external sort.
8357         (allocate_cases) Message fix.
8358
8359         * vfm.c: (prepare_for_writing) Warn user when paging workspace to
8360         disk.
8361         (page_to_disk) New function.
8362
8363 Sun Oct  5 15:56:14 1997  Ben Pfaff  <blp@gnu.org>
8364
8365         * Makefile.am: (INCLUDES) Include .. instead of $(top_srcdir).
8366
8367         * common.h: (macro strerror) Remove.  From Alexandre Oliva
8368         <oliva@dcc.unicamp.br>.
8369
8370         * get.c: (dict_delete_run) The number of variables to delete is
8371         not necessarily the number of variables that need to be shifted
8372         up.
8373         (trim_dictionary) Don't set *options to 0.  Fix bug that caused
8374         too many variables to be deleted.
8375
8376         * postscript.c: Comment fix.
8377
8378         * q2c.c: Include strerror.c.  From Alexandre Oliva
8379         <oliva@dcc.unicamp.br>.
8380
8381         * set.q: #undef ON and OFF.  From Alexandre Oliva
8382         <oliva@dcc.unicamp.br>.
8383
8384         * sfm-read.c: (sfm_read_dictionary) Don't set the file class too
8385         early, otherwise errors cause a bad free().
8386
8387         * str.h: (macro nvsprintf) s/FORMATS/FORMAT/ typo.  From Alexandre
8388         Oliva <oliva@dcc.unicamp.br>.
8389
8390         * temporary.c: (save_dictionary) Don't allocate memory if
8391         n_documents is 0.
8392
8393         * vfm.c: (memory_stream_write) Message fix.
8394
8395 Sat Oct  4 16:20:43 1997  Ben Pfaff  <blp@gnu.org>
8396
8397         * command.c: (static var cmd_table[]) Define REPEATING DATA
8398         command.
8399
8400         * common.h: Added support for broken systems that are missing
8401         EXIT_SUCCESS, EXIT_FAILURE, RAND_MAX, and/or strerror().
8402
8403         * Many source files: Replace syntax error messages via msg() with
8404         call to syntax_error().
8405
8406         * data-list.c: (dump_fixed_table) Add support for dumping table
8407         for REPEATING DATA as well as DATA LIST FIXED.
8408         (cmd_repeating_data) Allows and requires `/' between subcommands.
8409         Does proper thing with allowing rpd.starts_end to stay 0.  Allows
8410         CONTINUED specifications to be omitted.  Forces CONTINUED to be
8411         specified if ID is.  Calculates starts_end, cont_end from logical
8412         record length as reported by fhp.  Calls dump_fixed_table() if
8413         requested.  Fixed length of record copied by memcpy.
8414         (parse_num_or_var) Sets `num' to 0, not NOT_INT, for variables.
8415         Message fix.
8416         (realize_value) Returns sensible value for out-of-range variable
8417         values.
8418         (rpd_parse_record) New argument `ofs'.  Fixed confusion between
8419         length of occurrences and length of line.  Added warning for
8420         fields that exceed the line length.  Fixed infinite loop.
8421         (read_one_set_of_repetitions) Numerous minor changes for more
8422         complete SPSS compliance.  Message fixes.
8423
8424         * dfm.c: (dfm_close) If the file being closed is the inline file,
8425         read all the remaining data before closing it.
8426         (dfm_get_record) Don't close the file on lossage, as either it
8427         has been closed already or it doesn't belong to us.
8428
8429         * error.c: (puts_stdout) New function.
8430         (vmsg) Use puts_stdout instead of puts.
8431
8432         * file-handle.q: (fh_record_width) New function.
8433
8434         * inpt-pgm.c: (init_case) Fixed buffer overrun when inp_nval % 4
8435         == 0.
8436         (clear_case) Ditto.
8437         (input_program_source_read) Made an old kluge an approved method.
8438
8439         * lexer.c: (syntax_error) New function.
8440
8441         * misc.c: [BROKEN_RAND] (ansi_rand, ansi_srand; static var next)
8442         New.
8443
8444         * output.c: (oupt_get_paper_size) Message fix.
8445
8446         * q2c.c: Numerous fixes to formatting of generated code made to
8447         conform to GNU coding standards.  Uses syntax_error() in generated
8448         code.  Other miscellaneous generated message fixes.  Added support
8449         for broken systems that are missing EXIT_SUCCESS, EXIT_FAILURE,
8450         RAND_MAX, and/or strerror().
8451
8452 Sat Oct  4 02:09:56 1997  Ben Pfaff  <blp@gnu.org>
8453
8454         * data-in.c: Comment fixes.
8455
8456         * data-list.c: (struct repeating_data_trns) New member `id_spec'.
8457         (find_variable_input_spec) New function.
8458         (cmd_repeating_data) Initializes id_spec.
8459         (rpd_parse_record) Implemented.
8460         (read_one_set_of_repetitions) Returns -3 by default in order to
8461         kluge out some potential bugs.
8462
8463         * data-out.c: Comment fixes.
8464
8465         * file-type.c: (internal_cmd_record_type) Message fix.
8466
8467         * inpt-pgm.c: (input_program_source_read) Special temporary kluge
8468         for handling -3 return value.
8469
8470 Sat Sep 20 23:58:15 1997  Ben Pfaff  <blp@gnu.org>
8471
8472         * data-list.c: Comment fixes.
8473         (struct dls_var_spec) Reordered members.
8474         (read_from_data_list_fixed) Restructured.
8475         (struct repeating_data_trns) Reordered members.  Renamed `starts'
8476         as `starts_beg', `ends' as `starts_end'.
8477         (cmd_repeating_data) Calculates length of repeated data if
8478         necessary and possible.
8479         (parse_num_or_var) Don't allow string variables.
8480         (realize_value) New function.
8481         (rpd_msg) New function.
8482         (rpd_parse_record) New function.  Currently stubbed out.
8483         (read_one_set_of_repetitions) Implemented.
8484
8485         * inpt-pgm.c: (input_program_source_read) Comment fix.
8486
8487 Thu Sep 18 21:34:57 1997  Ben Pfaff  <blp@gnu.org>
8488
8489         * command.c: (cmd_end_repeat_p) Removed.
8490         (init_cmd_parser) Doesn't set cmd_end_repeat_p.
8491         (parse_cmd_name) Removed.
8492
8493         * data-list.c: Comment fixes.
8494         (data_list_pgm) Removed `eof' member.
8495         (static var first) New var.
8496         (cmd_data_list) Sets `first'.  Ensures that DATA LIST uses the
8497         FILE TYPE file inside FILE TYPE structures.
8498         (append_var_spec) Appends to *first, not dls.spec.
8499         (parse_fixed) Message fixes.
8500         (struct rpd_num_or_var) New.
8501         (struct repeating_data_trns) New.
8502         (static var rpd) New.
8503         (cmd_repeating_data) New function.
8504         (parse_num_or_var) New function.
8505         (parse_repeating_data) New function.
8506         (read_one_set_of_repetitions) New function.
8507
8508         * file-type.c: (cmd_file_type) Message fixes.  Always
8509         default_handle to FILE TYPE file handle.
8510         (internal_cmd_record_type) Message fixes.
8511
8512 Wed Aug 20 14:22:03 1997  Ben Pfaff  <blp@gnu.org>
8513
8514         * repeat.c: Comment fix.  Disable debugging.
8515
8516         * temporary.c: (restore_dictionary) Sets splits to NULL and
8517         n_splits to 0 before destroying the variables because now doing
8518         this tries to remove split variables.
8519
8520         * vars-atr.c: (discard_variables) Asserts that n_splits is 0 after
8521         destroying the dictionary.
8522         (clear_variable) Removes a variable from splits after destroying
8523         it.
8524
8525 Mon Aug 18 18:06:55 1997  Ben Pfaff  <blp@gnu.org>
8526
8527         * cmdline.c: (set_compat) Removed.
8528         (pick_compat) Removed.
8529         (parse_command_line) Removed -c option.
8530         (pre_syntax_message) Removed -c option.
8531         (usage) Remove compatibility code.
8532
8533         * common.h: (macros VER_PC, VER_WND, VER_X) Removed.
8534         (glob var compat) Removed.
8535
8536         * compute.c: (type_check) Fixed messages about type mismatches.
8537
8538         * data-list.c: (cmd_data_list) Removed compatibility code.
8539         (fixed_parse_compatible) Calls convert_negative_to_dash().
8540         Fixed bug where it only set the variable in fx.spec if it created
8541         the variable itself.
8542         (dump_fmt_list) Spelling fix.
8543         (cut_field) Removed compatibility code.
8544
8545         * dfm.c: (cmd_begin_data) Don't require a command terminator on
8546         BEGIN DATA command.
8547
8548         * expr-evl.c: (evaluate_expression) Implement LAG.
8549
8550         * expr-prs.c: (parse_add) Calls convert_negative_to_dash().
8551         (parse_neg) Calls convert_negative_to_dash().
8552         (LAG_func) Increases n_lag to the lag requested.  Fixed assignment
8553         bug.
8554
8555         * expr.h: (struct expression_struct) Removed member max_lag.
8556
8557         * file-type.c: (parse_col_spec) Calls convert_negative_to_dash().
8558         (internal_cmd_record_type) Removed special handling to produce
8559         negative numbers from dash tokens.
8560
8561         * getline.c: (static var DO_REPEAT_level) New var.
8562         (getl_add_DO_REPEAT_file) Increments DO_REPEAT_level.
8563         (handle_line_buffer) Copies the line into getl_buf; doesn't call
8564         copy_with_DO_REPEAT_substitutions().
8565         (getl_read_line) Maintains value of getl_mode.  Calls
8566         perform_DO_REPEAT_substitutions() whenever DO_REPEAT_level is
8567         positive.
8568         (getl_close_file) Decrements DO_REPEAT_level when appropriate.
8569
8570         * getline.h: (getl_mode) New glob var.
8571
8572         * glob.c: Comment fixes.
8573         (init_glob) Restructured.  Sets set_seed.
8574         (init_compat_dependent) Removed.  All references removed.
8575         (get_date) Format changed from MM/DD/YY to DD MMM YYYY.
8576         (__htonl, __htons) Removed.  (What were these for?)
8577
8578         * lexer.c: (static var tbl) Dash set to class CNUM.
8579         (make_hexit) New function from data-out.c.
8580         (get_token_representation) Rewritten.
8581         (convert_negative_to_dash) New function.
8582         (lex_init_compat_dependent) Removed.
8583         (yylex) A dash is parsed as part of a number if it is followed by
8584         a digit.  The ASCII representation of a number is copied to
8585         tokstr.  String parsing farmed out to parse_string().  Comment
8586         fixes.
8587         (bin_value_func, oct_value_func, hex_value_func, parse_string) New
8588         functions.
8589         (preprocess_line) Line processing depends on interactive/batch
8590         mode, not on compatibility mode.  Removed PC+ compatibility code.
8591
8592         * loop.c: (loop_3_trns_proc) Comment fix.
8593
8594         * main.c: Remove dead code.
8595         (main) Remove call to init_compat_dependent().
8596
8597         * misc.c: (convert_fmt_ItoO) Make E format conversion more
8598         conformant.
8599
8600         * print.c: (parse_string_argument) Calls
8601         convert_negative_to_dash().
8602         (fixed_parse_compatible) Calls convert_negative_to_dash().
8603
8604         * repeat.c: (RPT_* defines) Removed.
8605         (struct rpt_numeric) Removed.
8606         (struct repeat_entry) New member type, changed `replacement' from
8607         char * to char **.
8608         (clean_up) Deallocation adapted to new repeat_entry.
8609         (internal_cmd_do_repeat) `type' defaults to 0.  Remove lookahead()
8610         usage.  Creates vars for `type' of 1.
8611         (parse_ids) Sets type of 1.  Adapted to new repeat_entry.
8612         (store_numeric) Rewritten, new interface.
8613         (parse_numbers) Rewritten.
8614         (parse_strings) Rewritten.
8615         (find_DO_REPEAT_substitution) New function.
8616         (perform_DO_REPEAT_substitutions) New function.
8617         (copy_with_DO_REPEAT_substitutions) Removed.
8618         (debug_print) Rewritten.
8619
8620         * set.q: Comment fix.
8621         (custom_results) Removed compatibility code.
8622         (internal_cmd_set) Removed SET EMULATION subcommand.  Removed
8623         compatibility code.
8624
8625         * sysfile-info.c: (cmd_display) Removed compatibility code.
8626
8627         * tokens.h: Comment fixes.
8628         (token types enum) Removed `toktype' typedef name for this int
8629         type.  Removed SUBST.  Restructured.
8630
8631         * vars-atr.c: (discard_variables) Sets n_lag to 0.
8632
8633         * vars-prs.c: Comment fix.
8634
8635         * vfm.c: Comment fixes.
8636         (glob var n_lag) New var.
8637         (static vars lag_count, lag_head, lag_queue) New vars.
8638         (procedure) Removed argument nlag.
8639         (setup_lag) New function.
8640         (close_active_file) Discards lagging state.
8641         (lag_case) New function.
8642         (lagged_case) New function.
8643         (write_case) Lags a case if lagging.
8644
8645         * weight.c: (cmd_weight) Removed compatibility code.
8646         
8647 Sun Aug 17 22:34:40 1997  Ben Pfaff  <blp@gnu.org>
8648
8649         * getline.h: (struct getl_script) New members loop_index, macros.
8650
8651         * getline.c: (getl_add_file) Sets first_line field to NULL.
8652         (getl_add_DO_REPEAT_file) New function.
8653         (handle_line_buffer) When the current line's length is negative,
8654         set the filename and line number.  Increment line number after
8655         reading line.  Pass the line to
8656         copy_with_DO_REPEAT_substitutions() for processing.
8657         (getl_close_file) Free DO REPEAT lines before freeing the
8658         filename, and just set the filename to NULL when doing this,
8659         because otherwise the filename gets freed twice.
8660
8661         * glob.c: (glob var queuing) Removed.  All references removed.
8662
8663         * lexer.c: Comment fixes.
8664         (get_token_representation) New function.
8665
8666         * repeat.c: Comment fixes.
8667         (struct repeat_entry) Replaced type and v union members with a
8668         simple string.
8669         (append_record) New function.
8670         (internal_cmd_do_repeat) Started reforming it for the new
8671         repeat_entry struct.  Properly records filename changes in the
8672         getl_line_buf.  Fixed improper use of = for ==.  Fixed sense of
8673         strncasecmp() result usage.  Uses append_record() to simplify.
8674         Properly discards END REPEAT line.  Calls getl_add_DO_REPEAT_file
8675         to add in the file.
8676
8677         (copy_with_DO_REPEAT_substitutions) Started coding.
8678
8679         [DEBUGGING] (debug_print_lines) New function.
8680
8681         * set.q: (custom_results, internal_cmd_set) s/VER_PCP40/VER_PC/;
8682
8683         * tokens.h: (macro is_id1, is_idn) New macros.
8684
8685 Sat Aug 16 10:57:41 1997  Ben Pfaff  <blp@gnu.org>
8686
8687         * cmdline.c: (static var pre_syntax_message) Changed `win'
8688         compatibility mode to `wnd'.
8689
8690         * data-list.c: (fixed_parse_spss) Renamed
8691         fixed_parse_compatible().
8692
8693         * glob.c: (init_glob) Excise unused code for
8694         program_invocation_short_name.
8695
8696         * lexer.c: (preprocess_line) Leading indentors are ignored in Wnd
8697         as well as in X.
8698
8699         * print.c: (fixed_parse_spss) Renamed fixed_parse_compatible().
8700
8701         * set.q: `win' compatibility renamed `wnd'.
8702
8703 Thu Aug 14 22:11:12 1997  Ben Pfaff  <blp@gnu.org>
8704
8705         * filename.c: [__WIN32__] Change the included Windows header files
8706         (again).
8707         (absolute_filename_p) [__MSDOS__] A filename with a colon as the
8708         second character is absolute.
8709         (dirname) Fix logic error.  Don't printf() the results.
8710         (prepend_dir) Don't printf() the results.
8711
8712         * getline.c: (handle_line_buffer) New function.
8713         (getl_read_line) Reads line with handle_line_buffer() when
8714         appropriate.
8715         (getl_close_file) Discard line buffer data.
8716
8717         * getline.h: Comment fixes.
8718         (struct getl_line_list) New struct.
8719         (getl_script_struct) Added line buffer members.  These are hooks
8720         for use by DO REPEAT to allow it to insert virtual source code
8721         into the program.
8722
8723         * glob.c: (init_glob) [__DJGPP__ || (__WIN32__ && __BORLANDC__)]
8724         Override Borland C++ stupidity that claims Windows has a console
8725         window size of 0x3.
8726
8727         * repeat.c: This is in the process of being restructured from
8728         using a token-buffering approach to the DO REPEAT facility to
8729         using the more flexible approach of a line-buffering approach in
8730         conjunction with the getline module.  Comment fixes.
8731         (struct tok_struct) Removed.
8732         (static vars queue_index, queue_head, queue) Removed.
8733         (static vars line_buf_head, line_buf_tail) New vars.
8734         (internal_cmd_do_repeat) Instead of queuing tokens, queue lines.
8735         Not complete.
8736         (pull_queue, destroy_queue) Removed.
8737         [DEBUGGING] (debug_print_tokens) Removed.
8738
8739 Tue Aug  5 13:57:58 1997  Ben Pfaff  <blp@gnu.org>
8740
8741         * file-handle.q: (prepend_current_directory) New function.
8742         (internal_cmd_file_handle, fh_get_handle_by_filename) Prepends
8743         current directory before normalizing filename.
8744
8745         * filename.c: (gnu_getcwd) New function.
8746         (absolute_filename_p) New function.
8747         (search_path) New argument, PREPEND.  All references changed to
8748         pass NULL except those explicitly mentioned.  Uses
8749         absolute_filename_p().  Prepends PREPEND before trying the
8750         filename.
8751         (dirname, prepend_dir) New functions.
8752
8753         * getline.c: (getl_get_current_directory) New function.
8754         (getl_include) Passes getl_get_current_directory() as PREPEND arg
8755         to search_path().
8756                 
8757 Sun Aug  3 11:42:36 1997  Ben Pfaff  <blp@gnu.org>
8758
8759         * In several source files, the term `script' was replaced with
8760         `syntax file' inside error messages.  Usage of the term `script'
8761         in the sense of a syntax file is now deprecated.
8762
8763         * cmdline.c: (static vars pre_syntax_message, post_syntax_message)
8764         Updated messages.
8765
8766         * dump-sysfile.c: (usage) Update message.
8767
8768         * getline.c: (getl_read_line) Ignore lines beginning with `#!'.
8769
8770         * getline.h: (glob var getl_include_path) Declare extern.
8771
8772         * list.q: Define EXTERN as extern before #including somP.h.
8773
8774         * var.h: Remove declaration of `disptype' variable.
8775
8776         * vfm.c: (close_active_file) After switching the data sink to a
8777         data source, set vfm_sink to NULL, because it doesn't exist any
8778         more.
8779
8780 Thu Jul 17 21:41:44 1997  Ben Pfaff  <blp@gnu.org>
8781
8782         * glob.c: [__BORLANDC__] Include math.h.  Define _matherr() and
8783         _matherrl() to ignore all math errors.
8784
8785         * sfm-read.c: (read_value_labels) When reading the labels from
8786         disk, read the little parts separately instead of as a struct;
8787         this avoids alignment problems.
8788
8789         * sfm-write.c: (struct sfm_fhuser_ext) New member `elem_type'.
8790         (sfm_write_dictionary) Sets elem_type and frees it on lossage.
8791         (write_header) Allocates and initializes elem_type.
8792         (sfm_write_case) Uses elem_type to determine how to handle each
8793         flt64 element.
8794         (sfm_close) Frees elem_type.
8795
8796         * sfmP.h: Comment fix.
8797         [__BORLANDC__] Uses #pragma -a to adjust structure member
8798         alignment.
8799         
8800 Thu Jul 17 01:55:12 1997  Ben Pfaff  <blp@gnu.org>
8801
8802         * Makefile.am: (fiasco_SOURCES) Remove display.c.
8803
8804         * common.c: Fix typo.
8805
8806         * dfm.c: (read_record) Remove strncasecmp() emulation and fix the
8807         sense of the condition.
8808
8809         * expr-evl.c: (macro ALLOC_STRING_SPACE) [!PAGED_STACK] Add
8810         line-continuation backslash.
8811
8812         * filename.c: [__WIN32__] Include <windef.h> before <winbase.h>.
8813
8814         * frequencies.q: (custom_grouped, add_percentile) Don't use a
8815         non-constant expression as an argument to sizeof.
8816
8817         * glob.c: [__WIN32__ && __BORLANDC__] When including <conio.h>,
8818         undefine gettext macro because that's a conio function.
8819
8820         * hash.h: (hsh_prime_tab declaration) Remove.
8821
8822         * list.q: (write_fallback_headers) Move `leader' allocation out of
8823         main loop.  Change to local_alloc() allocation.
8824
8825         * output.h: Formatting fixes.  Put __attribute__ in right place on
8826         function prototypes.
8827
8828         * sfm-read.c: (read_machine_flt64_info, read_variables) Change
8829         incorrect `SECOND_LOWEST_VALUE' references to proper
8830         `second_lowest_value'.
8831
8832         * som-frnt.c: (EXTERN macro) Define as `extern' instead of null
8833         value.  This way 2 out of 3 of the som files define the vars
8834         extern, the correct way, that actually works under BC++.
8835         (som_set_float) Don't use nonconstant initializers for a struct.
8836
8837         * som-high.c: Add the standard alloca() header.
8838         (replicate_table) Add prototype.
8839
8840         Merged DISPLAY routine.
8841         * sysfile-info.c: (AS_*) New enum series.
8842         (cmd_sysfile_info) Gutted.  Calls describe_variable() to do the
8843         dirty work.
8844         (cmd_display, display_macros, display_documents,
8845         display_variables) Stolen from defunct display.c.
8846         (describe_variable) New function.
8847
8848         * temporary.c: [0] (display_tree) New debug function.
8849         (copy_variable) Performs shallow copy of value labels instead of
8850         deep copy; i.e., just copys the AVL tree and increments the
8851         reference counts.
8852
8853         * val-labs.c: Comment fixes.
8854         (do_value_labels) Optionally skip leading forward slash.
8855         (get_label) Creates only a single value label instead of many
8856         copies of one, and sets the reference count.
8857
8858         * display.c: Removed.
8859
8860         * dump-sysfile.c: New file, not yet complete.
8861
8862 Fri Jul 11 23:02:18 1997  Ben Pfaff  <blp@gnu.org>
8863
8864         For lots of source files I added more verbose_msg's.  These aren't
8865         listed below as they have tested as being benign.  In some cases
8866         these replaced debug_printf() calls.
8867
8868         * output.c: (outp_read_devices) Message fix.
8869
8870         * postscript.c: (output_encodings) Message fix.  Reports errors on
8871         fclose().
8872         (postopen) Message fix.
8873         
8874 Fri Jul 11 14:09:40 1997  Ben Pfaff  <blp@gnu.org>
8875
8876         * dfm.c: (dfm_close) Don't call fclose() for a NULL FILE.
8877
8878         * filename.c: (close_file_ext) Set f->file to NULL *after* closing
8879         it.
8880
8881         * main.c: Remove <malloc.h> #include.
8882
8883         * mis-val.c: (parse_numeric) Set .f member for each missing[]
8884         instead of trying to just set the missing[] itself, which is a
8885         gcc-specific idiom.
8886
8887         * sfm-read.c: (read_variables) Same.
8888
8889         * str.h: Add memmem() prototype.
8890
8891         * val-labs.c, var-labs.c: Replace <malloc.h> with <stdlib.h>.
8892
8893 Thu Jul 10 22:13:53 1997  Ben Pfaff  <blp@gnu.org>
8894
8895         * Makefile.am: (q2c) Don't include any libraries in the link.
8896
8897         * dfm.c: (force_line_buffer_extension) New macro.
8898         (count_tabs) New function.
8899         (tabs_To_spaces) New function.
8900         (read_record) Calls tabs_to_spaces() on the line being processed.
8901
8902         * q2c.c: Disabled i18n for this proglet so that libintl.a doesn't
8903         have to be compiled twice (once for CC, once for LOCAL_CC).
8904  
8905 Sun Jul  6 19:14:33 1997  Ben Pfaff  <blp@gnu.org>
8906
8907         * Makefile.am: (INCLUDES) Add intl directory; fix directories.
8908         (LDADD) Add @INTLLIBS@.
8909         (q2c) Add LIBS, @INTLLIBS@ to link step.
8910
8911         * inpt-pgm.c: Turn off debugging.
8912
8913         * postscript.c: (postopen) Format fix.  local_free() blocks
8914         returned by local_alloc(); don't free() them.
8915
8916 Sat Jul  5 23:44:51 1997  Ben Pfaff  <blp@gnu.org>
8917
8918         * data-in.c: (parse_string_as_format) Comment fix.  Fix check for
8919         string length.
8920
8921         * data-list.c: (read_from_data_list_fixed) Pass proper value for
8922         LEN arg, not simply the full string length.
8923
8924         * sort.c: (allocate_file_handles) Check SPSS compatible temp file
8925         directories before generic temp file directories.
8926
8927         * vfm.c: Disable debugging.
8928
8929 Fri Jul  4 13:26:41 1997  Ben Pfaff  <blp@gnu.org>
8930
8931         * get.c: Comment fix.
8932         (cmd_save_internal) Always passes GTSV_OPT_SAVE option.
8933
8934 Wed Jun 25 22:52:28 1997  Ben Pfaff  <blp@gnu.org>
8935
8936         * expr-prs.c: (debug_print_postfix) Conditionally included on
8937         GLOBAL_DEBUGGING.  Removed out_header() reference.
8938
8939         * exprP.h: Removed #undef GLOBAL_DEBUGGING.
8940
8941 Sun Jun 22 22:00:28 1997  Ben Pfaff  <blp@gnu.org>
8942
8943         * ascii.c: Removed obsolete ascii_close_page() prototype.
8944
8945         * command.c: (output_line) Comment fix.
8946
8947         * data-in.c: Formatting fix.
8948         (parse_string_as_format) Now the `fc' argument is used only for
8949         the purpose of error messages; it is not an index into the string
8950         passed.  All references changed.
8951
8952         * data-list.c: Comment fix.
8953         (cut_field) Comment fix.  Now returns the column number of the
8954         position of the field cut out on success.
8955         (parse_field) Added `column' argument.  Puts the column numbers in
8956         the error message.
8957         (read_from_data_list_free, read_from_data_list_list) Record the
8958         column number returned by cut_field(), pass it to parse_field().
8959
8960         * dfm.c: Comment fix.
8961
8962         * do-ifP.h: Comment fix.
8963
8964         * expr-prs.c: (SYSMIS_func) Implemented string-type arguments for
8965         the SYSMIS function.
8966
8967         * expr.h, exprP.h: Comment fix.
8968
8969         * glob.c: (init_glob) Only calls setlocale() and family if
8970         ENABLE_NLS set.
8971
8972         * hash.h: Comment fix.
8973
8974         * include.c: Comment fix.
8975
8976         * output.c: Comment fix.
8977
8978         * postscript.c: (ps_line_intersection) Simplified assertion.
8979
8980         * repeat.c: Comment fix.
8981
8982         * vars-atr.c: Comment fix.
8983
8984         * vars-prs.c: Comment fix.
8985
8986         * vfm.c: (vector_initialization) [DEBUGGING] Fixed undefined
8987         behavior with usage of postincrement.
8988         (memory_stream_read) Discards cases as it goes. 
8989
8990 Sun Jun 15 16:45:17 1997  Ben Pfaff  <blp@gnu.org>
8991
8992         * Makefile.am: Cleans q2c, not just distcleans it.  Distcleans
8993         foo.
8994
8995         * Most source files: Includes debug-print.h, related comment
8996         fixes.
8997
8998         * cases.c: (alloc_val) Removed complex allocation code.  Merely
8999         increments default_dict.nval and returns the former value.
9000         (envector, devector) Removed references to lv member of struct
9001         variable.
9002
9003         * common.h: (macro VME) Replaced complex definition with simple
9004         one.
9005
9006         * data-list.c: (cmd_data_list) Sets vfm_source instead of
9007         read_active_file and cancel_input_pgm.
9008         (read_from_data_list, cancel_data_list) Removed.
9009         (data_list_source_read, data_list_source_destroy_source) New
9010         functions.
9011         (glob var data_list_source) New var.
9012
9013         * dfm.c: (open_file_r, open_file_w) Simplified debug output.
9014         (cmd_begin_data) Improved criteria for an input program accessing
9015         the inline file.  Still not perfect.
9016
9017         * do-if.c: (do_if_trns_proc) Simplified debug output.
9018
9019         * expr-prs.c: Comment fixes.
9020         [DEBUGGING] (debug_print_postfix) Simplified debug output.
9021
9022         * file-handle.q: (fh_close_handle) Simplified debug output.
9023
9024         * file-type.c: Comment fixes.
9025         (cmd_file_type) Sets vfm_source instead of read_active_file and
9026         cancel_input_pgm.
9027         (cmd_end_file_type) On failure, discards variables in place of
9028         just canceling the input program.
9029         (read_from_file_type) Renamed file_type_source_read.
9030         (cancel_file_type) Renamed file_type_source_destroy_source.
9031         (glob var file_type_source) New var.
9032
9033         * get.c: (GTSV_* enum series) New enums GTSV_OPT_SAVE, GTSV_NONE.
9034         (cmd_get) Initializes options to GTSV_NONE before passing to
9035         trim_dictionary().  Removed `lv' reference.  Sets vfm_source
9036         instead of read_active_file and cancel_input_pgm.
9037         (cmd_save_internal) Initializes options before passing to
9038         trim_dictionary().  Local var `nval' removed.
9039         (dict_delete_run) Comment fixes.
9040         (trim_dictionary) Comment fixes.  Disallows scratch variables if
9041         GTSV_OPT_SAVE set in options.
9042         (read_from_get) Renamed get_source_read.
9043         (cancel_get) Renamed get_source_destroy_source.
9044         (glob var get_source) New var.
9045
9046         * inpt-pgm.c: (cmd_input_program) Sets vfm_source instead of
9047         read_active_file and cancel_input_pgm.
9048         (read_from_input_program) Renamed input_program_source_read.
9049         Simplified debug output.
9050         (cancel_input_program) Renamed
9051         input_program_source_destroy_source.
9052         (glob var input_program_source) New var.
9053
9054         * loop.c: (loop_1_trns_proc) Simplified debug output.
9055
9056         * main.c: (dump_token) Made eof output more explicit.
9057
9058         * sfm-read.c: (read_variables, dump_dictionary) Removed `lv'
9059         references.
9060
9061         * sort.c: (cmd_sort_cases) Disallows scratch variables.  Removed
9062         code for always-memory or always-disk cases.  malloc's case-list
9063         based on vfm_source_info.ncases.  Explicit support for
9064         memory_stream via memory_source_cases.
9065         (do_external_sort) Sets vfm_source instead of read_active_file and
9066         cancel_input_pgm.
9067         (allocate_file_handles) The temporary directory permissions are
9068         set to 0700 instead of 0777.
9069         (allocate_cases) Formatting fixes.  Simplified debug output.
9070         (output_record) Compacts the case if necessary before writing it
9071         out.
9072         (close_handle, open_handle_w) Simplified debug output.
9073         (write_initial_runs) Destroys vfm_sink, then sets it to
9074         sort_stream.  Writes records to memory based on
9075         vfm_sink_info.case_size.
9076         (write_to_sort_cases) Renamed sort_stream_write().
9077         (merge) Simplified error handling.  Simplified debug output.
9078         Formatting fixes.
9079         (read_from_external_sort) Renamed sort_stream_read().
9080         Reads records based on vfm_source_info.case_size.
9081         (sort_stream_write) Writes records to memory based on
9082         vfm_sink_info.case_size.
9083         (sort_stream_mode) New function.
9084         (glob var sort_stream) New variable.
9085
9086         * temporary.c: (cmd_temporary) Simplified debug output.
9087         (copy_variable) Removed references to `lv'.
9088
9089         * title.c: (get_title) Simplified debug output.
9090
9091         * var.h: Comment fixes.
9092         (struct get_proc) Removed member `lv'.
9093         (struct variable) Removed member `lv'.  Comment fixes.
9094         (glob vars read_active_file, write_active_file, cancel_input_pgm)
9095         Removed.
9096         (struct case_stream) New.
9097
9098         * vars-atr.c: (discard_variables) Changed cancel_input_pgm,
9099         read_active_file references to use vfm_source.
9100         (init_variable, replace_variable) Removed references to `lv'.
9101
9102         * vfm.c: Comment fixes.
9103         (glob var vfm_source, vfm_sink, vfm_source_info, vfm_sink_info)
9104         New variables.
9105         (static var queue, qh, qt, n_lag) Removed.  All references
9106         removed.
9107         (glob var compaction_necessary, compaction_nval, compaction_case,
9108         paging) New variables.
9109         (record_case) Removed.
9110         (procedure) Comment fixes.  Calls vfm_source->read() instead of
9111         read_active_file().
9112         (lag) Removed.
9113         (prepare_for_writing, arrange_compaction, make_temp_case,
9114         vector_initialization, setup_filter) New function.
9115         (open_active_file) Most of the code moved into the abovementioned
9116         new functions.  Now sets temp_dict to &default_dict if there is no
9117         temporary dictionary, for convenience.  New debug output.
9118         (close_active_file) Deals with changing the sink to the source.
9119         Calls finish_compaction().  Frees compaction_case.  Mostly
9120         rewritten.
9121         (glob vars disk_source_file, disk_sink_file) New vars.
9122         (destroy_active_file, read_from_memory) Removed.
9123         (disk_stream_init, disk_stream_read, disk_stream_write,
9124         disk_stream_mode, disk_stream_destroy_source,
9125         disk_stream_destroy_sink) New functions.
9126         (glob var vfm_disk_stream) New var.
9127         (glob vars memory_source_cases, memory_sink_cases,
9128         memory_sink_iter, memory_sink_max_cases) New vars.
9129         (memory_stream_init, memory_stream_read, memory_stream_write,
9130         memory_stream_mode, memory_stream_destroy_source,
9131         memory_stream_destroy_sink) New functions.
9132         (glob var vfm_memory_stream) New var.
9133         (write_case) Local var `i' renamed `cur_trns'; local var `retval'
9134         named `more_cases'.  Simplified debug output.  Otherwise mostly
9135         rewritten.
9136         (record_case) Moved into the stream drivers.  Removed.
9137         (transform) Removed (was dead code).
9138         (SPLIT_FILE_procfunc) s/vfm_replacement/vfm_sink_info/.  In the
9139         common case that the splits don't change, we don't need to copy
9140         the case into prev_case again--pointless.
9141         (compact_case) New function.
9142         (finish_compaction) New function.
9143
9144         * vfmP.h: Comment fixes.
9145         (DEV_* enum series) Removed. 
9146         (struct storage) Renamed `stream_info'.  Removed variant record.
9147         Removed `device' member.
9148
9149         * debug-print.h: New file.
9150         
9151 Sun Jun  8 01:12:38 1997  Ben Pfaff  <blp@gnu.org>
9152
9153         * autorecode.c: Turned off debugging.
9154
9155         * data-list.c: (destroy_dls) Closes the associated file handle.
9156
9157         * descript.q: (custom_variables) Added PV_NO_SCRATCH to
9158         parse_variables() options.
9159
9160         * dfm.c: (open_file_r) Removed gratuituous argument to msg() call.
9161
9162         * display.c: (display_variables) Really fixed null cell bug.
9163
9164         * file-handle.q: (fh_close_handle) Changed debugging message.
9165
9166         * frequencies.q: (custom_variables) Added PV_NO_SCRATCH to
9167         parse_variables() options.
9168
9169         * list.q: Added PV_NO_SCRATCH in q2c varlist options.
9170         (cmd_list) Fails if no variables specified.
9171         (determine_layout) Writes blank lines manually.
9172
9173         * loop.c: (loop_1_trns_proc) Made debugging code only print
9174         messages if debugging.
9175
9176         * q2c.c: (dump_subcommand) Appends sbc->message to SBC_VARLIST
9177         parse_variables() arguments.
9178         (main) Parses optional parenthesized options to varlist
9179         subcommands into sbc->message.
9180
9181         * sfm-read.c: Format fix.
9182
9183         * var.h: (FV_*) New enum series.
9184         (PV_*) New enum PV_NO_SCRATCH.
9185
9186         * vars-prs.c: (find_var) Removed.
9187         (fill_all_vars) Takes FV_* enum instead of boolean third
9188         argument.  Rewritten to deal with scratch as well as system
9189         variables.
9190         (parse_variables) Error message on scratch variable if
9191         PV_NO_SCRATCH set.
9192
9193         * vfm.c: (static var virt_begin_func) New var.
9194         (procedure) Sets up virt_begin_func.
9195         (SPLIT_FILE_procfunc) For the first case, calls virt_begin_func()
9196         after dump_splits().  For succeeding groups changes, calls
9197         virt_begin_func() instead of begin_func().      
9198
9199 Fri Jun  6 22:42:23 1997  Ben Pfaff  <blp@gnu.org>
9200
9201         * count.c, data-out.c, file-handle.q, list.q, loop.c: Turned off
9202         debugging.
9203
9204         * dfm.c: Added some debugging messages, disabled by default.
9205         (open_file_r) Fixed error message.
9206         (read_record) On eof on inline_file, instead of calling
9207         fh_close_handle(), simply jump to eof label like a normal file.
9208         Message fixes.
9209
9210         * display.c: Thin lines between rows for certain kinds of
9211         listing.  Fixed `null cell' bug.
9212
9213         * error.c: (failure) Flush stdout, stderr before failing.
9214
9215         * file-handle.q: (fh_close_handle) Added debugging message.
9216
9217         * frequencies.q: (dump_full) Bottom line extends across entire
9218         table width.  Changed title formatting.
9219         (dump_condensed) Changed title formatting.
9220         (dump_statistics) Fixed title formatting.
9221
9222         * glob.c: (init_glob) Moved initialization of cur_proc out of #if.
9223         Sets default value of set_format.
9224
9225         * list.q: (cmd_list) Calls blank_line() before determine_layout().
9226         Passes write_all_headers() to procedure() as pre-group func.
9227         (write_all_headers) New function.
9228         (determine_layout) Removed calls to write_header().
9229         Calls blank_line() before and after write_fallback_headers().
9230
9231         * recode.c: (recode_trns_free) Only attempts to free head->map if
9232         non-NULL.
9233
9234         * sfm-read.c: (read_variables) Allows `#' at beginning of system
9235         file variable names but gives a warning.  Sets `left' based on
9236         first character being/not being `#'.  On lossage frees dict->var.
9237
9238         * som-high.c: (som_draw_title) Simplified title formatting.
9239
9240         * vfm.c: (dump_splits) Fixed and changed splits formatting.
9241
9242 Thu Jun  5 22:51:15 1997  Ben Pfaff  <blp@gnu.org>
9243
9244         * autorecode.c: (cmd_autorecode) Sets h_trans to NULL at
9245         beginning.  Frees v_src, v_dest on successful exit.  Frees
9246         h_trans[*], h_trans on lossage.
9247         (recode) Frees h_trans[*], h_trans.
9248
9249         * dfm.c: (dfm_close) Formatting change.
9250         (open_inline_file) Now passed a dfm_fhuser_ext to initialize; no
9251         longer allocates its own in inline_file.
9252         (open_file_r) Passes the local dfm_fhuser_ext to
9253         open_inline_file().
9254         (open_file_w) Message fix. 
9255         (read_record) Buffer reallocation strategy changed.  Frees
9256         ext->line even in inline_file to prevent leaks.
9257         (dfm_put_record) Fixed bug where `ext' was cached before the file
9258         was opened and thus it would be NULL when the file really was
9259         open.
9260         (cmd_begin_data) Sets up inline_file basics itself, then calls
9261         open_inline_file() for the dfm_fhuser_ext.  Formatting fix.
9262
9263         * list.q: (write_line) Formatting fix.
9264         (clean_up) Minor strategy change.  Sets proportional font after
9265         finishing cleanup.
9266         (determine_layout) Sets fixed font before writing regular headers,
9267         or after writing fallback headers.
9268
9269         * modify-vars.c: (cmd_modify_vars) Frees variable lists for DROP
9270         and KEEP vars after using them.
9271
9272         * postscript.c: (ps_init_driver) Frees x->family.
9273         (postopen) When loading fonts, free the temporary font name buffer
9274         after using it.
9275         (ps_text_set_font_by_position) Free temporary font name buffer
9276         after using it.
9277         (text) Fixed code that calculated `lig' so that `lig' always gets
9278         initialized.  Formatting fix.
9279
9280         * som-low.c: (get_cell_size, som_get_table_size) `prop_height' ->
9281         `font_height'.
9282         [GLOBAL_DEBUGGIGN] (check_table) Use arena_alloc() to allocate
9283         cells, not xmalloc(), so that the cells will get destroyed
9284         automatically.
9285
9286         * sysfile-info.c: (cmd_sysfile_info) Frees the dictionary after
9287         using it.
9288
9289 Tue Jun  3 23:33:22 1997  Ben Pfaff  <blp@gnu.org>
9290
9291         * ascii.c: (ascii_text_draw) Always sets metrics for strings that
9292         are drawn.
9293
9294         * dfm.c: Comment fix.
9295
9296         * list.q: Comment fixes.  Include somP.h.  Removed static vars
9297         table, n_columns, n_rows, part.  New struct list_ext.  New static
9298         var line_buf.
9299         (n_lines_remaining, n_chars_width, write_line) New functions.
9300         (cmd_list, list_cases) Rewritten.
9301         (begin_row, end_row, flush_table) Removed.
9302         (write_header, clean_up, write_varname, write_fallback_headers,
9303         determine_layout) New functions.
9304
9305         * output.c: (outp_iterate_enabled_drivers) Minor reformat.
9306
9307         * output.h: Comment fix.
9308
9309         * postscript.c: Comment fix.
9310         (struct ps_driver_ext) Removed prop_size, fixed_size members;
9311         added font_size.  All references changed.
9312         (ps_init_driver) Initializes font_size.  Simplified space checking
9313         code.
9314         (static var option_tab[]) Removed prop-size, fixed-size; added
9315         font-size.
9316         (ps_option) Handles font_size.
9317
9318         * som-high.c: Moved prototypes into somP.h.
9319         (som_init_driver) New function.
9320         (som_submit_table) Moved some code into new function
9321         som_init_driver().
9322         (build_target) Moved some code into new function
9323         som_internal_eject_page().
9324         (som_eject_page) Uses som_internal_eject_page().
9325         (som_internal_eject_page) New function.
9326
9327         * som-low.c: Moved prototypes into somP.h.
9328
9329         * som.h: Formatting fixes.
9330
9331         * somP.h: (struct som_driver_ext) Removed em_width;
9332         added prop_em_width, fixed_width.
9333
9334 Mon Jun  2 14:25:25 1997  Ben Pfaff  <blp@gnu.org>
9335
9336         * Makefile.am: Added `localedir' definition.  Added
9337         -DLOCALEDIR="..." to DEFS.  Added -I. to INCLUDES.
9338
9339         * ascii.c: (macro draw_line) Fixed capitalization.
9340
9341         * ascii.c, autorecode.c, cases.c, cmdline.c, command.c, common.c,
9342         compute.c, count.c, data-in.c, data-list.c, data-out.c,
9343         descript.q, dfm.c, display.c, do-if.c, error.c, expr-evl.c,
9344         expr-opt.c, expr-prs.c, file-handle.q, file-type.c, filename.c,
9345         formats.c, frequencies.q, get.c, getline.c, glob.c, groff-font.c,
9346         hash.c, heap.c, include.c, inpt-pgm.c, lexer.c, list.q, loop.c,
9347         main.c, mis-val.c, misc.c, modify-vars.c, numeric.c, output.c,
9348         postscript.c, print.c, q2c.c, recode.c, rename-vars.c, repeat.c,
9349         sample.c, sel-if.c, sfm-read.c, sfm-write.c, sfmP.h, som-frnt.c,
9350         som-high.c, som-low.c, sort.c, split-file.c, sysfile-info.c,
9351         temporary.c, title.c, tokens.h, val-labs.c, var-labs.c,
9352         vars-atr.c, vars-prs.c, vector.c, vfm.c, weight.c: Marked strings
9353         for internationlization.
9354
9355         * glob.c: [HAVE_LOCALE_H] Includes locale.h.
9356
9357 Sun Jun  1 23:31:18 1997  Ben Pfaff  <blp@gnu.org>
9358
9359         * do-if.c, sort.c, val-labs.c: Comment fixes.
9360
9361         * glob.c: (init_glob) Uncommented, updated i18n support.
9362         
9363         * arena.c, ascii.c, data-in.c, descript.q, error.c, expr-evl.c,
9364         expr-opt.c, expr-prs.c, filename.c, frequencies.q, groff-font.c,
9365         output.c, postscript.c, sfm-read.c, som-high.c, vars-prs.c: Made
9366         the declarations of macros taking arguments a lot nicer.
9367
9368 Sun Jun  1 17:22:04 1997  Ben Pfaff  <blp@gnu.org>
9369
9370         * error.h: Removed CE, CW aliases for SE, SW.
9371
9372         * q2c.c: Removed explicit streq() definition since it's duplicated
9373         in str.h.
9374         
9375         * approx.h, error.h, font.h, hash.h, misc.h, output.h, somP.h,
9376         stats.h, str.h, tokens.h: Made the declarations of macros taking
9377         arguments a lot nicer-looking of <pinard@iro.umontreal.ca>.
9378         Comment fixes.
9379
9380 Sun Jun  1 12:02:06 1997  Ben Pfaff  <blp@gnu.org>
9381
9382         * cmdline.c: Comment fixes.
9383         (pick_compat) Changed return type to int.  Now, instead of setting
9384         glob var `compat' to the emulation, returns the emulation.  All
9385         references changed.
9386         (parse_command_line) Added terminating null to end of
9387         `long_options' array definition.
9388         (pre_syntax_message) Fixes.
9389         (usage) Shows the default emulation in the syntax message by
9390         calling pick_compat().
9391
9392         * getline.c: (getl_add_include_dir) Separates paths with
9393         PATH_DELIMITER, not DIR_SEPARATOR.
9394
9395         * glob.c: (init_glob) Fixed references to DEFAULT_VER_PCP40,
9396         DEFAULT_VER_WIN61, DEFAULT_VER_X40.
9397
9398         * output.c: (outp_configure_macro) Make earlier definitions for a
9399         particular key override later ones for the same key.
9400         
9401 Fri May 30 19:40:49 1997  Ben Pfaff  <blp@gnu.org>
9402
9403         * ascii.c: Comment fixes.
9404
9405         * output.c: (outp_get_paper_size)
9406         s/STAT_OUTPUT_INIT_FILE/STAT_OUTPUT_PAPERSIZE_FILE/.
9407         
9408 Sun May 25 22:34:07 1997  Ben Pfaff  <blp@gnu.org>
9409
9410         * ascii.c, postscript.c, sfm-read.c, sfm-write.c, sort.c: Include
9411         <errno.h>.  GNU libc 2 enforces this!
9412
9413         * command.c: (parse_cmd) Fixed problem with `else' clause being
9414         paired with wrong `if'.  Comment fix.
9415
9416 Fri May  9 16:53:52 1997  Ben Pfaff  <blp@gnu.org>
9417
9418         * getline.c: [!HAVE_LIBREADLINE] (read_console) Changed
9419         blp_getline() to getline().
9420
9421         * output.c: (outp_eval_dimension) Changed the fix from last time;
9422         there was no variable `a'.
9423
9424         * q2c.c: (get_line) Fixed boundary condition overrun bug.
9425
9426 Mon May  5 21:58:22 1997  Ben Pfaff  <blp@gnu.org>
9427
9428         * output.c: (outp_evaluate_dimension) Fixed handling of negative
9429         numbers having fractional parts.  Added case of a fraction without
9430         a whole-number part.
9431
9432 Fri May  2 22:08:05 1997  Ben Pfaff  <blp@gnu.org>
9433
9434         * ascii.c: (ascii_text_get_font_position) Removed.
9435
9436         * expr.h, exprP.h: Disabled debugging.
9437
9438         * groff-font.c, postscript.c: Changed `groff' to `Groff' in
9439         several places.
9440
9441         * output.h: (struct outp_class_struct) Removed
9442         text_get_font_position method.  All references deleted.
9443
9444         * postscript.c: Big change here.  Fontmaps were completely
9445         eliminated because of a change in philosophy.  Comment fixes.
9446         (struct ps_fontmap, ps2dit_map, font_family, dit2family_map)
9447         Removed.
9448         (struct ps_driver_ext) `position', `fontmap', `prop_name',
9449         `fixed_name' members removed.  New members `prop_family',
9450         `fixed_family'.  `family' member changed to type char *.
9451         (static var ps_fontmaps) Removed.
9452         () Removed.
9453         (ps_init_driver) Removed obsolete references, updated.
9454         Initializes `translate_x', `translate_y', `scale'.  Doesn't read
9455         fontmap, of course.  Refers to font names through internal_name
9456         rather than subversive means.  Frees proper items.
9457         (static var option_tab[]) Removed `fontmap-file' option; renamed
9458         `fixed-font', `prop-font'.
9459         (ps_option) Corresponds to option_tab[].
9460         (read_fontmap, release_fontmap, ps_to_dit, compare_ps2dit,
9461         hash_ps2dit, compare_dit2family, hash_dit2family, compare_family,
9462         hash_family) Removed.
9463         (postopen) Generates font names from family names.  Gets
9464         PostScript font name properly.  New prologue file comment `!!!'
9465         style.
9466         (ps_open_page) Adds translate_x, translate_y to BP prologue
9467         function; gives SF argument floating-point format.
9468         (ps_text_set_font_by_name) Doesn't try to map PostScript->Groff
9469         font name.  Doesn't change font family.
9470         (ps_text_set_font_by_position) Generates Groff font name from font
9471         family name instead of through table lookup.
9472         (ps_text_set_font_by_family) Renamed `ps_text_set_font_family',
9473         all references changed.  Reduced to simple string assignment.
9474         (ps_get_font_name) Removed.
9475         (ps_get_font_family) Reduced to string return.
9476         (text) Doesn't save `position' since it no longer exists.  Ugly
9477         kluge to save font family--fix soon?
9478         (load_font) Removed PostScript name argument.
9479         
9480 Thu May  1 14:58:59 1997  Ben Pfaff  <blp@gnu.org>
9481
9482         * postscript.c: Comment fix.
9483         (ps_open_page) Puts scale factor in PostScript output.
9484         
9485 Sat Apr 26 11:49:32 1997  Ben Pfaff  <blp@gnu.org>
9486
9487         * Makefile.am: Distcleans q2c.
9488
9489 Wed Apr 23 21:33:48 1997  Ben Pfaff  <blp@gnu.org>
9490
9491         * ascii.c: (delineate) Sets text size even if width is zero.
9492
9493         * command.c: Comment fix.
9494         (static var cmd_table[]) Re-enabled EVALUATE command.
9495         (parse_cmd) Lotsa comment fixes.  Fixed infinite loop in parsing
9496         of comments in script files.  Now more liberal on criteria for
9497         performing a state transition--if *anything* happened correctly,
9498         not just if *everything* happened correctly.
9499
9500         * data-out.c: (convert_F) Comment fix.  Why in the fsck does
9501         Checker segfault on formatting large numbers and why in the fsck
9502         hadn't I noticed this before?
9503
9504         * expr.h, exprP.h: No longer turn off GLOBAL_DEBUGGING.
9505
9506         * list.q: (cmd_list) Commented out the actual output routine
9507         because of various problems.  Probably will abandon the idea of
9508         using the general `crushed tables' for the LIST procedure.
9509
9510         * temporary.c: (restore_dictionary) Sets var_by_name to NULL after
9511         clearing it.  Allocates a new var_by_name dictionary before trying
9512         to add members to it.
9513
9514         * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed argument
9515         `sib'.  Changed type of `node' argument.
9516         [DEBUGGING] (dump_var_tree) Replaced avlwalk() with
9517         avl_walk_inorder().
9518         (clear_variable) Only dumps the var tree if var_by_name non-NULL.
9519         [DEBUGGING] Only deletes the variable from var_by_name if that var
9520         non-NULL.
9521
9522 Fri Apr 18 16:48:41 1997  Ben Pfaff  <blp@gnu.org>
9523
9524         * Makefile.am: Added include files to SOURCES.  Added
9525         frequencies.q to EXTRA_DIST.  Removed include/ from INCLUDES.  Now
9526         includes rules for q2c.  Added `boast' target.
9527
9528 Fri Apr 18 15:42:22 1997  Ben Pfaff  <blp@gnu.org>
9529
9530         * Makefile.am: Maintainer-clean Makefile.in.
9531         
9532         * Makefile.am: Fixed redundant EXTRA_DIST line.
9533
9534         * ascii.c: Comment fixes.
9535         (ascii_line_vert) Fixed overly aggressive range check.
9536
9537         * display.c: Removed dead code.
9538
9539         * list.q: Turn debugging on.
9540         (flush_table) New debug code.
9541
9542         * sfm-read.c: (read_value_labels) malloc's the structure before
9543         trying to assign to its members.
9544
9545         * sfm-write.c: Comment fix.
9546
9547         * som-high.c: (som_submit_table) Sets som.t and som.d on each call
9548         to output_table().
9549         (output_table) No arguments anymore--gets them through `som'
9550         global.  New debug code.  In crushed tables, now sets `htv' as
9551         well as `hv' to avoid bad confusion later.
9552         (dump_crush_page) New debug code.
9553
9554         * som-low.c: (som_dump_crush_page) New debug code.
9555
9556 Thu Mar 27 01:11:29 1997  Ben Pfaff  <blp@gnu.org>
9557
9558         All source files: Broke long lines into multiple lines.
9559         
9560         * ascii.c: (ascii_close_page) Uses host_system var in place of
9561         HOST_SYSTEM constant.
9562
9563         * cmdline.c: (var syntax_message[]) Broke into
9564         pre_syntax_message[] and post_syntax_message[].
9565         (usage) Outputs both parts, separated by driver list.
9566
9567         * error.h: Fixed broken formatting.
9568
9569         * expr-opt.c: (str_search, str_rsearch) New functions.
9570
9571         * misc.c: (blp_getdelim) Removed.  All references changed to
9572         `getdelim'.
9573         (str_search, str_rsearch) Removed.
9574         (memrmem) New function.
9575
9576         * misc.h: (blp_getline) Removed.  All reference changed to
9577         `getline'.
9578
9579         * stat.h: New file.
9580
9581         * filename.c: Includes "stat.h", not <sys/stat.h>.
9582         (blp_getenv) Uses host_system var instead of HOST_SYSTEM constant.
9583
9584         * output.c: (outp_list_classes) Changed output formatting.
9585
9586         * sfm-write.c: (write_header) Uses host_system var instead of
9587         HOST_SYSTEM constant.
9588         (write_rec_7_34) Extracts version numbers from the version string.
9589         Untested.
9590
9591         * sort.c: Includes "stat.h", not <sys/stat.h>.
9592
9593         * str.c: (strcasecmp) Removed.
9594
9595         * title.c: (cmd_document) Uses host_system var instead of
9596         HOST_SYSTEM constant.
9597
9598         * version.c: Generated on-the-fly by the Makefile instead of being
9599         static.
9600
9601         * str.h: Comment fixes.  Doesn't substitute for missing memmove or
9602         memcpy.
9603         [!HAVE_STRNCASECMP] Declares strncasecmp().
9604
9605         * version.h: Removed stray character.  Comment fixes.
9606         (vars host_system, build_system) New vars.
9607
9608 Mon Mar 24 21:47:31 1997  Ben Pfaff  <blp@gnu.org>
9609
9610         * Most source files: Changed formatting of copyright notice; fixed
9611         FSF address; reformatted to better conform to GNU standards;
9612         comment fixes.  Added markups to prevent GNU indent from messing
9613         up my beautiful formatting :-).
9614         
9615         * q2c.c: (get_line) Ignores lines that begin with `/* *INDENT' so
9616         that GNU indent markups can be passed through without problems.
9617
9618 Wed Feb 19 21:30:31 1997  Ben Pfaff  <blp@gnu.org>
9619
9620         * get.c: Turned off debugging.
9621
9622         * glob.c: (init_glob) Turned on save-file compression by default.
9623
9624         * sfm-write.c: (sfm_write_case) Fixed bug which resulted in less
9625         compression than was possible in save files.
9626
9627 Sun Feb 16 20:57:20 1997  Ben Pfaff  <blp@gnu.org>
9628
9629         * data-out.c: (convert_F) Comment fixes.  Debug message fixes.
9630
9631         * frequencies.q: Removed Fiasco extensions.  Updated calculation
9632         algorithms.  Polished output format. 
9633         (struct frq_info_struct) Removed members `max_degree', `min_n',
9634         all references removed.
9635         (macro frq_extensions) Removed.
9636         (static vars min_n, max_degree) Removed, all references removed.
9637         (internal_cmd_frequencies) Doesn't handle extensions.  Doesn't
9638         calculate `min_n', `max_degree'.
9639         (postcalc) Passes new arg to dump_statistics().
9640         (dump_full) Honor NOLABEL option.  Buggy?  Adds variable name
9641         title.
9642         (dump_condensed) Adds variable name title.
9643         (sum_freqs) Removed.
9644         (calc_stats) Updated calculation algorithm.
9645         (dump_statistics) Removed warning for too-few observations.
9646         Changed table formatting.  Adds variable name title if passed new
9647         arg is nonzero.
9648
9649         * output.h: Comment fix.
9650
9651         * recode.c, sample.c, sort.c: Disabled debug code.
9652
9653         * som-frnt.c: (som_set_value, som_set_float, som_set_text)
9654         Improved debug code.
9655
9656         * var.h: (enum series frq_*) Removed Fiasco extensions.
9657
9658 Sat Feb 15 21:26:53 1997  Ben Pfaff  <blp@gnu.org>
9659
9660         * command.c: Added PROCESS IF to command table.
9661
9662         * Lots & lots of places, removed checks for NULLs preceding calls
9663         to free_expression(), which itself checks.
9664
9665         * descript.q: Removed Fiasco extensions.  Removed optimizations
9666         for non-weighted active files.  Implemented some options.
9667         Finished polishing output format.  Comment fixes.  Merged
9668         `descript.g'.
9669         (static vars n_glob_miss_list, n_glob_valid, n_glob_missing,
9670         max_degree, min_n) Removed.
9671         (macro dsc_extensions) Removed.
9672         (struct dsc_info_struct) Removed `min_n' member, all references
9673         fixed.
9674         (internal_cmd_descriptives) Removed calculation of min_n,
9675         max_degree.  Only deals with one `calc' routine instead of two
9676         flavors.
9677         (precalc) Eliminated redundancy.  Updated for changes to
9678         descriptives_proc structure.
9679         (calc) Moved here from `descript.g'.  Rewritten to calculate
9680         statistics via `moments about the mean' rather than by summing,
9681         summing squares, summing cubes, and so on.
9682         (postcalc) Rewritten for new-style statistical calculation.
9683         (display) Removed support for displaying variables across rows.
9684         No longer crushes the descriptives table.  Removed ancient code.
9685         Added display of N, by variable and listwise.
9686
9687         * descript.g: Removed; merged into `descript.q'.
9688
9689         * expr-evl.c: (evaluate_expression) Now returns a double.  For
9690         numeric results, it returns the result as well as storing it in
9691         the passed `value' structure if non-NULL.  For string results it
9692         just returns 0.0 and it must be passed non-NULL.  Many references
9693         to this function were optimized by use of this change, especially
9694         but not exclusively in `compute.c'.
9695
9696         * frequencies.g: Comment fix.
9697
9698         * glob.c: (glob var process_if_expr) New global var.
9699
9700         * postscript.c: (static var option_tab[]) Corrected entry for
9701         `fixed_size'.
9702         (postopen) Sets x->size to x->prop_size.
9703         (ps_text_set_font_by_name) Sets font size as well as typeface for
9704         PROP and FIXED fonts.
9705         
9706         * sel-if.c: (cmd_process_if) New function.
9707
9708         * sfm-write.c: (struct sfm_fhuser_ext) New member `n_cases'.
9709         (sfm_write_dictionary) Sets `n_cases' to 0.
9710         (sfm_write_case) Increments `n_cases'.
9711         (sfm_close) Attempts to seek the system file back to the header
9712         and write the number of cases in its proper slot.
9713
9714         * som-frnt.c: (som_insert_table) Masks off expansion options since
9715         only SOPT_X_NORM seems to work sensibly.
9716
9717         * som-low.c: (get_cell_size) Fixed bug when a table cell was sized
9718         with a `fixed' value of 2.
9719
9720         * sort.c: (cmd_sort_cases) Cancels PROCESS IF.
9721
9722         * sysfile-info.c: (cmd_sysfile_info) Doesn't display more than 10
9723         value labels; uses SOPT_NONE instead of SOPT_X_BOTH.
9724
9725         * var.h: (enum series dsc_*) Removed Fiasco extensions.
9726         (struct descriptives_proc) Removed `miss_noweight'; new members
9727         `X_bar', `M2', `M3', `M4', `min', `max'.
9728
9729         * vars-atr.c: (discard_variables) Cancels PROCESS IF.
9730
9731         * vfm.c: (close_active_file) Cancels PROCESS IF.
9732         (write_case) Doesn't process cases unselected by PROCESS IF.
9733
9734 Fri Feb 14 23:32:58 1997  Ben Pfaff  <blp@gnu.org>
9735
9736         * glob.c: (glob var err) Removed.
9737
9738         * sysfile-info.c: (cmd_sysfile_info) When adjusting table size,
9739         doesn't have to take into account number of value labels since
9740         they're in a subtable anyway.  Also, doesn't display more than 10
9741         value labels since we can't yet break pages in subtables.
9742
9743 Tue Feb  4 15:15:50 1997  Ben Pfaff  <blp@gnu.org>
9744
9745         * som-frnt.c: (som_change_table_size) Simple change for elegance
9746         that shouldn't change behavior.
9747         (som_set_value) Comment fix.
9748
9749         * som-high.c: (som_submit_table) Message fix.
9750
9751 Wed Jan 22 21:54:00 1997  Ben Pfaff  <blp@gnu.org>
9752
9753         * command.c: Added SYSFILE INFO to command table.
9754
9755         * file-handle.q: (fh_handle_filename) New function.
9756
9757         * get.c: (save_trns_proc) Fixed a bug in padding of output data
9758         with spaces.
9759
9760         * main.c: (parse) New return value for command functions, -3.
9761
9762         * misc.h: Comment fix.
9763
9764         * output.h: Comment fixes.
9765         (macro COMPONENTS) Removed.
9766
9767         * postscript.c: (write_text) Modified literal_chars[] so that `('
9768         and ')' are not written to the output in strings as literals.
9769
9770         * sfm-read.c: (sfm_read_dictionary) New argument.
9771         (read_header) New argument.  Sets the information structure's
9772         values from the header information.  
9773         (read_variables) [__CHECKER__] Redefines isalnum()--some sort of
9774         bizarre Checker problem, I guess.
9775         (read_variables) Proper cleanup on lossage.
9776
9777         * sfm.h: (struct sfm_read_info) New struct for use by
9778         sfm_read_dictionary().
9779
9780         * som-frnt.c: (som_create_table) New argument CREATE_FLAGS,
9781         currently used just for tables that can be dynamically resized and
9782         thus have to be allocated with arena_malloc() instead of
9783         arena_alloc().  All references changed.
9784         (som_change_table_size) New function.
9785         (som_insert_table) Bugfix: now inserts `cell', not `c'!
9786
9787         * som-high.c: [GLOBAL_DEBUGGING] (check_table) Moved to som-low.c.
9788         (som_submit_table) [GLOBAL_DEBUGGING] Doesn't call check_table()
9789         any more.
9790
9791         * som-low.c: (draw_cell) Calls draw_table_cell() for SCON_TABLE
9792         cells.
9793         (draw_intersection) Now takes an argument specifying the table in
9794         question.  All references changed.
9795         (draw_table_cell) New function.
9796         (som_get_table_size) [GLOBAL_DEBUGGING] Calls check_table().
9797         (som_get_table_size) Many nice new explanatory comments.
9798         [GLOBAL_DEBUGGING] (check_table) Moved here from som-high.c.
9799
9800         * som.h: New enum series SOM_CREATE_* for use as create flags with
9801         som_create_table().
9802
9803         * str.h: Moved a comment here from TODO.
9804
9805         * sysfile-info.c: New file.  Reference implementation.
9806
9807 Sun Jan 19 14:22:11 1997  Ben Pfaff  <blp@gnu.org>
9808
9809         * command.c: Added RENAME VARIABLES to table of commands.
9810
9811         * data-in.c: (dls_error) Sets `cust_field'.
9812         (parse_N) Message fix.
9813         (parse_day_count) New function.
9814         (to_roman) Never outputs VX as a `short form' of V.
9815         (parse_month) Fixed parsing of Roman numerals.
9816         (parse_trailer) Message fix.
9817         (parse_DATE, parse_ADATE, parse_EDATE, parse_SDATE, parse_JDATE,
9818         parse_QYR, parse_MOYR, parse_WKYR, parse_DTIME) Issue a message if
9819         the date is invalid.
9820         (parse_SDATE) Fixed swapped day, year.
9821         (parse_JDATE) Fixed bug for dates in 1582.
9822         (parse_DTIME) Allows days not between 1 and 31.
9823         (parse_numeric) Makes local copy of f.type for easier usage.
9824         FMT_DOLLAR fixed.
9825
9826         * data-out.c: (convert_F) When outputting as scientific, properly
9827         sets f.type as fp->type.
9828         (insert_commas) Fixed operator precedence problem with setting of
9829         nitems.  Changed strcpy to memcpy (no null terminator). 
9830         (convert_date) Fixed FMT_JDATE: added 1900 to year.
9831         (convert_CCx) Essentially rewritten, but now it works.
9832
9833         * display.c: (cmd_display) Added DISPLAY FILE LABEL (undocumented
9834         feature of Fiasco).
9835         (display_documents) Implemented.
9836
9837         * error.c: (glob var cust_field) New var.
9838         (vmsg) Displays cust_field as part of message classes DE and DW.
9839
9840         * formats.c: (debug_print) Fixed to compile under updated
9841         dictionary format.
9842
9843         * get.c: (cmd_get, cmd_save_internal) Close file handle on
9844         failure.
9845
9846         * misc.c: (parse_format_specifier) Formatting fix.
9847
9848         * modify-vars.c: (struct var_modification) Renamed `n_reorder' as
9849         `n_rename' for clarity.
9850         (cmd_modify_vars) Initializes `forward' and `positional' at
9851         appropriate times.  Frees lists of vars to rename on failure.
9852         Comment fix.  Frees memory on success.  
9853         (rearrange_dict) Simplified `for' loop condition.
9854
9855         * rename-vars.c: New file (reference implementation).
9856         
9857         * set.q: (internal_cmd_set) Fixed `emu' test condition.
9858
9859         * sfm-read.c: (read_header) File label is created only if file
9860         label in file is not blank.
9861         (read_variables) Initializes `dict' local variable.
9862         (read_documents) Proper behavior on lossage.
9863
9864         * sfm-write.c: (write_header) Doesn't blank out the file label
9865         (why was this here to begin with?!)
9866
9867         * temporary.c: (save_dictionary) File label is copied only if
9868         non-NULL.  Doesn't try to xstrdup() dictionary documents.
9869         Adapted so as to not irritate Checker.
9870         (free_dictionary) Only destroys var_by_name if non-NULL.
9871
9872         * title.c: (cmd_file_label) Doesn't skip FILE, LABEL tokens.
9873         (cmd_document) Doesn't skip DOCUMENT token.  Adds some header
9874         lines to the document, indents the document.  Also, it works now.
9875         (add_document_line) New function.
9876
9877         * var.h: (struct dictionary) Reordering.
9878
9879         * vars-prs.c: (parse_variables) On lossage, only local_free()'s
9880         bits if it was allocated to begin with.
9881
9882 Thu Jan 16 13:08:57 1997  Ben Pfaff  <blp@gnu.org>
9883
9884         * command.c: Added MODIFY VARS to list of commands.
9885
9886         * configure.in: Updated custom macros for autoconf 2.12.  Removed
9887         mmap reference; fixed termcap library reference.
9888
9889         * display.c: (display_variables) Fixed a few bugs although it's
9890         still not well written.
9891
9892         * error.c: [!__CHECKER__] (chkr_disp_call_chain) New function.
9893         (induce_segfault) Calls chkr_disp_call_chain() instead of
9894         inducing an actual SIGSEGV.
9895
9896         * expr-opt.c: (evaluate_tree) Swapped order of arguments to
9897         str_search() and str_rsearch().  Fixed tests for matches on
9898         OP_INDEX and OP_RINDEX.
9899
9900         * filename.c: (good_getcwd) Removed as the new libc for Checker
9901         doesn't contain this bug, apparently.
9902
9903         * misc.c: (str_search, str_rsearch) Changed order of arguments for
9904         consistency with GNU memmem.
9905         (blp_getdelim) Changed `len' from `int' to `size_t'.
9906
9907         * modify-vars.c: Reference implementation.
9908
9909         * som-frnt.c: (zero_length) New global var.
9910         (som_create_table) Message fix.
9911
9912         * som.h: Added gcc attributions to som_set_text(),
9913         som_output_text() prototypes.  blank_line() refers to
9914         zero_length[] instead of a literal null string to suppress gcc
9915         warnings.
9916
9917         * sort.c: (do_external_sort) Fixed fencepost error on lossage.
9918         (allocate_cases) Decrements x_max so the last element of x[] can
9919         be used by the algorithm.
9920
9921         * var.h: Changed minor details of `variable' declaration.  
9922         (struct modify_vars_proc) New struct.
9923         (struct variable) Added field p.mfv.
9924
9925         * vars-atr.c: Comment fix.
9926
9927         * vars-prs.c: (fill_all_vars) More optimal implementation.
9928
9929         * vfm.c: (dump_splits) Sets the last byte of temp_buf to a null
9930         character, which it shouldn't have to do but printf() seems to
9931         read the null byte even though I supply a maximum length...
9932
9933 Fri Jan 10 20:22:08 1997  Ben Pfaff  <blp@gnu.org>
9934
9935         * command.c: Removed command alias X for QUIT.
9936         (parse_cmd) Fixed comment parsing.
9937
9938         * dfm.c: (struct dfm_fhuser_ext) Fields `len', `size' are now of
9939         type size_t.
9940         (read_record) Fixed references to len, size.
9941         (dfm_get_record) Restructured.
9942
9943         * file-handle.h: (struct file_handle) Field `lrecl' now of type
9944         size_t.
9945
9946         * file-handle.q: (internal_cmd_file_handle) Checks for nonpositive
9947         record length.
9948
9949         * modify-vars.c: New file.  Not complete.
9950         
9951         * set.q: (set_ccx) Fixed operator precedence problem regarding ^
9952         and ==.
9953
9954         * sfm-read.c: (bswap_flt64, read_header, write_variable) Fixed
9955         problems caused by int/size_t differences.
9956
9957         * sort.c: (output_record, merge_once) Cast `size_t's to `int's in
9958         appropriate spots.
9959
9960         * str.c: (strcasecmp) Fixed bug that cropped up when the strings
9961         being compared were of equal length.
9962
9963 Thu Jan  2 19:08:23 1997  Ben Pfaff  <blp@gnu.org>
9964
9965         * command.c: Added DOCUMENT, DROP DOCUMENTS, FILE LABEL.
9966
9967         * lexer.c: (get_dotted_rest_of_line) New function.
9968
9969         * sel-if.c: (cmd_filter) Cannot choose string or scratch variables
9970         as filters.
9971
9972         * sfm-read.c: (sfm_read_dictionary) Calls read_documents() to read
9973         type 6 records.  Frees the dictionary properly.
9974         (read_header) Initializes the dictionary instead of letting
9975         read_variables() do it.  Sets the dictionary file label from the
9976         system file.
9977         (read_documents) New function.
9978
9979         * sfm-write.c: (sfm_write_dictionary) Calls write_documents() to
9980         write type 6 record if appropriate.
9981         (write_header) Writes file label from dictionary.
9982         (write_documents) New function.
9983
9984         * temporary.c: (save_dictionary, restore_dictionary,
9985         free_dictionary) Properly handle new fields in dictionary struct.
9986
9987         * title.c: (get_title) Returns after failure().
9988         (cmd_file_label, cmd_document, cmd_drop_documents) New functions
9989         for new commands FILE LABEL, DOCUMENT, DROP DOCUMENTS.  Untested.
9990
9991         * var.h: (struct dictionary) New fields `label', `n_documents',
9992         `documents'.
9993
9994 Wed Jan  1 22:08:10 1997  Ben Pfaff  <blp@gnu.org>
9995
9996         * command.c: Added FILTER to list of commands.
9997
9998         * frequencies.g: [WEIGHTING] Removed test for weighting!=-1 since
9999         it's always true.
10000
10001         * get.c: (cmd_save_internal) Removed weighting code since it's now
10002         handled by sfm-write.c.  Properly commented out debug code.
10003
10004         * glob.c: (glob var weighting) Removed.
10005
10006         * sel-if.c: Comment fixes.
10007         (cmd_filter) New function.
10008
10009         * sfm-read.c: (struct sfm_fhuser_ext) New field `weight_index'.
10010         (sfm_read_dictionary) Sets weighting variable direct in the
10011         created dictionary now.  (Apparently we previously didn't support
10012         weighting on GET?)
10013         (read_header) Sets weight_index field in sfm_fhuser_ext from
10014         header read from disk.
10015
10016         * sfm-write.c: (sfm_write_dictionary) Comment fix.
10017         (write_header) Now sets the weighting in the header from the
10018         passed primary dictionary instead of from the sfm_write_info.
10019
10020         * sfm.h: (struct sfm_write_info) Removed field `weight'.
10021
10022         * som-high.c: (dump_crush_table) Fixed a couple of assertions that
10023         broke on boundary conditions.
10024
10025         * var.h: (struct dictionary) New fields `weight_var',
10026         `weight_index', and `filter_var'.
10027         (glob var weighting) Removed.  This is now part of struct
10028         dictionary.  All references changed; the less mechanical changes
10029         are described above.
10030
10031         * vars-atr.c: (find_dict_variable) New function.
10032
10033         * vfm.c: (static var filter_index) New variable.
10034         (open_active_file) Initializes filter_index from default_dict.
10035         (write_case) Calls proc_func() only if the filter variable is
10036         nonzero; this implements FILTER behavior.
10037
10038         * weight.c: (static var weight_varname) Removed.
10039         (cmd_weight) Modified default_dict instead of glob vars.
10040         (update_weighting) Changed the signature to modify a dictionary
10041         instead of glob vars.  Now returns the weighting variable.
10042         (get_weighting_variable) Removed; its function is absorbed by
10043         update_weighting().
10044         (stop_weighting) Operates on a dictionary now.
10045
10046 Wed Jan  1 17:00:59 1997  Ben Pfaff  <blp@gnu.org>
10047
10048         * sort.c: Removed debugging info from messages.
10049         (do_external_sort) Cleans up after itself by deleting the
10050         temporary directory on failure.  (On success it is deleted by the
10051         input program.)
10052         (allocate_cases) Removed debug code.  Added clean up code.
10053         (output_record) Removed debug code.
10054         (merge) Added code to close all the input files that are currently
10055         open.  This is a likely location for bugs, because I'm not sure
10056         about boundary conditions.  Removed an unnecesary heap_delete().
10057         (merge_once) Removed input file "optimization" that in fact
10058         screwed up the rest of the code.  Message and comment fixes.
10059
10060 Sun Dec 29 21:36:48 1996  Ben Pfaff  <blp@gnu.org>
10061
10062         * error.c: [__CHECKER__] (induce_segfault) Flushes output streams.
10063
10064         * heap.c: (heap_delete) New argument.
10065
10066         * sort.c: Finished implementation of external sort.
10067
10068         * vfm.c: (read_from_disk) Returns after a disk error.
10069
10070 Sun Dec 22 23:10:39 1996  Ben Pfaff  <blp@gnu.org>
10071
10072         * sort.c: (static var state) Removed.
10073         (static vars max_handles, tmp_basename, tmp_extname,
10074         huffman_queue) New variables.
10075         (do_external_sort) Moved most code to new functions.
10076         Creates huffman_queue.
10077         (allocate_file_handles, allocate_cases) New functions.
10078         (static vars run_no, run_length, file_index, case_count) New
10079         variables. 
10080         (output_record) Returns success.  Now really writes to the output
10081         file.
10082         (begin_run, end_run) New functions.
10083         (write_initial_runs) Returns success.  Initializes run_no to -1.
10084         Calls begin_run(), end_run() at appropriate times.  Outputs debug
10085         messages.
10086         (write_to_sort_cases) Calls begin_run(), end_run() at appropriate
10087         times.
10088         (merge) New function.
10089
10090         * heap.c, heap.h: New files.  Hopefully in near-final form.
10091
10092 Sat Dec 21 21:51:04 1996  Ben Pfaff  <blp@gnu.org>
10093
10094         * glob.c: Added write_active_file to global vars.
10095
10096         * sort.c: Several new miscellaneous static variables.
10097         (cmd_sort_cases) Big comment fix.
10098         (perform_case_2) Renamed `do_external_sort' and completely
10099         rewritten.
10100         (case_2_proc_func) Removed.
10101         (output_record, write_initial_runs, write_to_sort_cases,
10102         compare_record) New functions.
10103
10104         * vfm.c: [DEBUGGING] (index_to_varname) Excised bit rot.
10105
10106 Tue Dec 17 18:57:59 1996  Ben Pfaff  <blp@gnu.org>
10107
10108         * sort.c: (perform_case_2) Changed the method for allocation of
10109         lots of memory--now allocates one case at a time in hopes that
10110         more cases can be allocated with heavily fragmented memory.
10111
10112         * var.h: (write_active_file) New global var.
10113
10114         * vfm.c: (procedure, close_active_file, write_case,
10115         SPLIT_FILE_procfunc) Now allow beginfunc, procfunc, and endfunc
10116         arguments to procedure() to be NULL.  All references to
10117         procedure() that made use of dummy functions were changed to NULL
10118         functions.
10119         (open_active_file) If write_active_file is non-NULL, the output
10120         device becomes DEV_PGM (a new enum).
10121         (close_active_file) Sets write_active_file to NULL.
10122         (read_from_memory) Comment fix.
10123         (record_case) Calls write_active_file() when the output device is
10124         DEV_PGM.
10125
10126 Sun Dec 15 15:32:16 1996  Ben Pfaff  <blp@gnu.org>
10127
10128         * sort.c: New file.
10129
10130         * autorecode.c: (cmd_autorecode) Fixed parsing of options.
10131         Fixed checking for duplicate varnames.
10132         (recode) xmalloc()'s the transformation instead of arena_alloc()'ing
10133         it.
10134         (autorecode_trns_free) Destroys hash tables for each recoding
10135         specification.
10136         (autorecode_proc_func) Compares NULL to *vpp instead of vpp.
10137
10138         * command.c: Added SORT CASES to cmd_table.
10139         (null_func, null_int_func) Prototyped.
10140
10141         * descript.g: (calc_weight, calc_noweight) Computes own case
10142         number now.
10143         
10144         * frequencies.q: (dump_statistics) Fixed problem with
10145         too-few-cases warning message.
10146
10147         * get.c: (cmd_save_internal) Handles weighting properly.
10148
10149         * hash.c: (hsh_dump) Output format changed.
10150         (force_hsh_insert) Actually works now, prototype changed.
10151
10152         * list.q: (static var case_num) New variable.
10153         (cmd_list) Initializes case_num.
10154         (list_cases) Increments case_num.
10155
10156         * var.h: Added definitions for SORT CASES.  Comment fixes.
10157
10158         * vfm.c: Some definitions moved to new file vfmP.h.  Comment
10159         fixes.  `active' renamed vfm_active, `rep' renamed
10160         vfm_replacement, all references changed.
10161         (procedure) The procfunc no longer receives a case number.  All
10162         references changed.
10163         (write_case) Subtle reordering.
10164         (SPLIT_FILE_procfunc) Counts cases differently.  Slightly less
10165         redundant.
10166
10167         * weight.c: (get_weighting_variable) New function.
10168
10169         * vfmP.h: New file with definitions from vfm.c.
10170
10171 Sat Dec 14 10:35:30 1996  Ben Pfaff  <blp@gnu.org>
10172
10173         * command.c: (FILE_TYPE_okay) Commented out some tests because
10174         they're clumsy and not yet needed.
10175
10176         * var.h: Most *_trns structures moved to their respective source
10177         files.  Some were moved into a new file, do-ifP.h.  Comment fixes.
10178         (union any_trns) Changed to a typedef for trns_header.
10179         (struct input_program_pgm) Removed.
10180
10181         * vars-prs.c: (parse_variables) Only local_free()'s bits if it
10182         was allocated in the first place.
10183
10184 Fri Dec 13 21:30:53 1996  Ben Pfaff  <blp@gnu.org>
10185
10186         * autorecode.c: New file.
10187         
10188         * command.c: Added AUTORECODE to command table; re-enabled SET.
10189
10190         * data-out.c: (convert_F) Handles infinities and NaNs properly.
10191
10192         * error.c: (vmsg) Comment fixes.
10193
10194         * hash.c: Comment fix.
10195         (hashpjw_d) New function.
10196         (hashpjw) Reimplemented as call to more general function
10197         hashpjw_d().
10198         (internal_comparison_fn) Initializes pointers properly.
10199         (hsh_sort) [GLOBAL_DEBUGGING] New debugging code.
10200         (force_hsh_insert, force_hsh_find) New debugging wrapper
10201         functions.
10202
10203         * main.c: (main) Message fix.
10204
10205         * output.c: (outp_read_devices) Message fix.
10206
10207         * set.q: Comment fixes.
10208         (custom_results) Implemented Wnd/X form of subcommand.
10209         (set_routing) New function.
10210         (internal_cmd_set) Implemented ERRORS, MESSAGES.
10211
10212         * settings.h: (SET_ROUTE_*) New enum series.
10213         (set_results) Renamed set_results_file, all references changed.
10214         (set_messages) Removed.
10215         (glob vars set_errors, set_messages, set_results) New vars.
10216
10217         * title.c: (get_title) Remembers to xstrdup() the result of
10218         get_rest_of_line().
10219
10220         * var.h: (arc_item, arc_spec, autorecode_trns) New structures for
10221         use by AUTORECODE.
10222         (union any_trns) New element `arc'.
10223
10224 Fri Dec  6 23:53:47 1996  Ben Pfaff  <blp@gnu.org>
10225
10226         * command.c: (output_line) Removed references to set_screen.
10227
10228         * error.c: (static var terminating) New var.
10229         (hcf) Sets terminating to 1.
10230         (vmsg) If terminating is nonzero, does not attempt to call hcf().
10231         This prevents an infinite loop if an error occurs within hcf().
10232
10233         * expr-evl.c: (evaluate_expression) [__CHECKER__] Replaced case
10234         statement circumlocution with `case 42000' trick.
10235         (evaluate_expression) New support for OP_STR_MIS.
10236
10237         * expr-opt.c: (evaluate_expression) [__CHECKER__] Replaced case
10238         statement circumlocution with `case 42000' trick.
10239         (dump_node) Handles OP_STR_MIS.
10240
10241         * expr-prs.c: (MISSING_func, SYSMIS_func) Rewrote to handle string
10242         variables exceptions.
10243         (parse_function) Message fix.
10244         (ops[]) Added OP_STR_MIS.
10245
10246         * expr.h: Added OP_STR_MIS to OP_* enum.  Comment fixes.
10247
10248         * exprP.h: [__CHECKER__] Removed case statement circumlocution.
10249
10250         * glob.c: Removed set_scrnfile glob var.
10251         (init_glob) set_errorbreak set to 0 by default.
10252
10253         * groff-font.c: Changed included files.
10254         (groff_read_font) Initializes font_arena local var correctly.
10255         (default_font) New function.
10256
10257         * output.c: Comment fixes.
10258         (glob var disabled_devices) New variable.
10259         [GLOBAL_DEBUGGING] (static var iterating_driver_list) New
10260         variable.
10261         [GLOBAL_DEBUGGING] (reentrancy) New function.
10262         [GLOBAL_DEBUGGING] (outp_read_devices, outp_done, find_driver,
10263         outp_iterate_enabled_drivers) Calls to reentrancy().
10264         (destroy_list) New function.
10265         (outp_done) Moved code to destroy_list().
10266         (parse_options) Parses `listing', `screen', `printer' options
10267         internally.
10268         (configure_driver) Sets new `device' member of driver.
10269         (outp_iterate_enabled_drivers, outp_enable_device) New functions.
10270
10271         * output.h: Comment fixes.  New enum series OUTP_DEV_*.
10272         (struct outp_driver_struct) New member `device'.
10273
10274         * postscript.c: (find_encoding_file) Doesn't display its own error
10275         messages.
10276         (default_encoding) New function.
10277         (switch_font) Calls default_encoding() if no encoding can be
10278         found.
10279         (text) Makes up a character metric if none exists for the desired
10280         character.
10281         (load_font) Properly copies a fallback filename.  Calls
10282         default_font() for a font if none at all are known.
10283
10284         * set.q: Comment fixes.  Removed OUTPUT subcommand.
10285         (custom_listing) Calls outp_enable_device() to enable/disable
10286         listing device.
10287         (turn_screen_on) Removed.
10288         (internal_cmd_set) Calls outp_enable_device() to enable/disable
10289         screen, printer devices.
10290
10291         * settings.h: Comment fixes.
10292         (glob vars set_output, set_printer, set_screen, set_scrnfile)
10293         Removed.
10294
10295         * som-high.c: (som_submit_table, som_eject_page) Use
10296         outp_iterate_enabled_drivers() instead of iterating
10297         outp_driver_list directly.
10298
10299 Wed Dec  4 21:34:17 1996  Ben Pfaff  <blp@gnu.org>
10300
10301         * data-in.c: (parse_EDATE, parse_SDATE) New functions.
10302         (parse_string_as_format) Handles new formats.
10303         (parse_numeric) Now handles DOT and PCT formats.
10304
10305         * data-out.c: (convert_E, convert_F, insert_commas) Handle DOT
10306         format now.
10307         (convert_date) Handle EDATE and SDATE formats.
10308         (convert_CCx) Now if there's not room for the currency characters,
10309         converts it as F format if it's positive instead of giving up
10310         quickly.  Also fixed save-and-restore bug with decimal point
10311         characters.  
10312         (convert_format_to_string) Handles new formats.
10313
10314         * misc.c: (formats[]) Added new formats.
10315         (convert_fmt_ItoO) Supports new formats.
10316
10317         * sfm-read.c: (parse_format_spec) Supports new formats.  Better
10318         data checking.  New argument, all references changed.
10319
10320         * sfm-write.c: (write_format_spec) Supports new formats.
10321
10322         * var.h: New formats FMT_DOT, FMT_PCT, FMT_EDATE, FMT_SDATE.
10323         Comment fixes.
10324
10325 Sun Dec  1 17:19:00 1996  Ben Pfaff  <blp@gnu.org>
10326
10327         * cmdline.c: Comment fixes.
10328         (parse_command_line) Changed return type to void.
10329
10330         * data-in.c: (parse_string_as_format) Added FMT_CCA...FMT_CCE to
10331         switch.
10332         (parse_numeric) Handles international numbers (comma as decimal
10333         point).  Some reformatting.
10334
10335         * data-list.c: (parse_free) Default output format is now
10336         set_format instead of hard-coded F8.2.
10337         (read_from_data_list_list) Emits error message on undefined data
10338         only if set_undefined is nonzero.
10339
10340         * data-out.c: (convert_E) Changes decimal point from period to
10341         comma if appropriate.  Restructured.  Better comments.
10342         (convert_F) Changes decimal point from period to comma if
10343         appropriate.
10344         (insert_commas) Major bug with handling of negative values fixed.
10345         Also, inserts periods instead of commas if appropriate.
10346         (convert_CCx) New function.
10347         (convert_format_to_string) Added FMT_CCA...FMT_CCE to switch.
10348         (num_to_string) Changed `.' to set_decimal.
10349
10350         * dfm.c: Comment fixes.
10351         (dfm_close) Frees ext->line even in inline_file.
10352         (open_inline_file) New function.
10353         (open_file_r) When opening the inline file: now properly
10354         recognizes `BEGIN DATA.' line, and calls open_inline_file() to
10355         finish up.
10356         (read_record) Calls fh_close_handle() instead of dfm_close() to
10357         close the inline file.  Makes a copy of the line getl_buf to avoid
10358         interlock problems.
10359         (dfm_get_record) Restructured.  Now checks the return value of
10360         open_file_r().
10361         (cmd_begin_data) Moved open code into open_inline_file().  Relaxed
10362         checking for use of inline file.  No longer tries to close inline
10363         file.
10364
10365         * error.c: (glob var error_already_flagged) New var.
10366         (vmsg) Message change.  Now checks max number of errors/warnings,
10367         acts on it.
10368
10369         * file-handle.q: (fh_handle_name) Now allows closing of
10370         inline_file.
10371         (fh_init_files) Reformatted.
10372
10373         * get.c: (trim_dictionary) Checks SCOMP option instead of COMP.
10374
10375         * getline.c: (getl_include) Fixed bug that popped up when called
10376         when file queue was empty.
10377         (read_console) Resets error_count, warning_count,
10378         error_already_flagged to zero.
10379
10380         * glob.c: Many changes to update list of variables.
10381         (init_compat_dependent) Now this function is called whenever
10382         `compat' changes.  It now sets set_seed only if it hasn't
10383         previously been referenced.  It now calls
10384         lex_init_compat_dependent().
10385
10386         * include.c: (cmd_include_at) Frees temporary buffer instead of
10387         line buffer.  
10388         (cmd_include) Doesn't make copy of include file name.
10389
10390         * lexer.c: Comment fixes.
10391         (init_lex) Moved some code into new function
10392         lex_init_compat_dependent().
10393         (lex_init_compat_dependent) New function.
10394         (hex_val) Simplified.
10395         (preprocess_line) Uses set_endcmd instead of hardcoding `.'.
10396
10397         * main.c: Comment fixes.
10398         (main) Reformatted.
10399
10400         * misc.c: (formats[]) Added FMT_CCA...FMT_CCE.
10401         (check_input_specifier) Disallows FMT_CCA...FMT_CCE.
10402         (convert_fmt_ItoO) Detects FMT_CCA...FMT_CCE.
10403         (setup_randomize) Sets set_seed_used.
10404
10405         * set.q: Comment fixes.
10406         (custom_results) Conditionalizes on `compat'.
10407         (custom_log) Calls custom_journal().
10408         (set_ccx) New function.
10409         (cmd_set) Calls init_compat_dependent() when `compat' changes.
10410         Calls set_ccx() to handle CCA...CCE.  Sets set_grouping
10411         when set_decimal changes.  Range-checks values for MITERATE,
10412         MNEST.  Message fixes.
10413
10414         * settings.h: Comment fixes.
10415         (struct set_cust_currency) New struct.
10416         (set_cc[], set_grouping, set_seed_used) New global vars.
10417
10418         * var.h: (FMT_CCA...FMT_CCE) New output formats.
10419         (FCAT_OUTPUT_ONLY) New FCAT_* constant.
10420
10421 Thu Nov 28 23:14:07 1996  Ben Pfaff  <blp@gnu.org>
10422
10423         * glob.c: Revised variables to correspond to settings.h.
10424         (init_glob) Initializes variables from settings.h properly.
10425
10426         * set.q: Began long-overdue major revision to correspond to new
10427         philosophy.  Most code changed. 
10428
10429         * settings.h: Mostly changed; reorganized, reordered, large new
10430         comment.
10431
10432 Thu Nov 28 19:46:10 1996  Ben Pfaff  <blp@gnu.org>
10433
10434         * get.c: (cmd_save_internal) No longer forces compression off.
10435
10436         * sfm-read.c: (read_compressed_data) If eof is reached when
10437         reading a new instruction octet, only signal error if we're in the
10438         middle of a case.
10439
10440         * sfm-write.c: (COMPRESSION_BIAS) New #define.
10441         (struct sfm_fhuser_ext) New member `end'.
10442         (write_header) Refers to COMPRESSION_BIAS instead of magic 100.0.
10443         (ensure_buf_space) New function.
10444         (sfm_write_case) Reimplemented in order to support compression.
10445         (sfm_close) Writes out the remaining contents of the compression
10446         buffer if any.
10447
10448 Wed Nov 27 23:18:35 1996  Ben Pfaff  <blp@gnu.org>
10449
10450         * command.c: Defined SAVE and XSAVE commands in command table.
10451
10452         * common.h: second_lowest_value is of type flt64, not double.
10453
10454         * file-handle.h: Comment fix.
10455
10456         * get.c: Comment fixes.
10457         (static var `trns') New.
10458         (save_write_case_func, save_trns_proc, save_trns_free, null_func,
10459         cmd_save_internal, cmd_save, cmd_xsave) New functions.
10460         (dict_delete_run) Clears the variables and frees them now.
10461         (trim_dictionary) Sets default for compression.
10462         On KEEP subcommand, frees deleted variables as well as clearing
10463         them.  Finally got the sense of the test for deleting all
10464         variables correct.
10465         [DEBUGGING] (dump_dict_variables) Message fix.
10466
10467         * glob.c: (init_glob) set_compression set to 1 by default.
10468
10469         * list.q: Properly #includes config.h.
10470
10471         * misc.h: New macro REM_RND_UP.
10472
10473         * settings.h: Comment fix.
10474
10475         * sfm-read.c: (structs sysfile_header, sysfile_format,
10476         sysfile_variable; inline function bswap_int32) Moved to new file
10477         sfmP.h.
10478         (corrupt_msg) [__CHECKER__] No longer induces segfault.
10479         (sfm_read_dictionary) Fixed bug caused by failing to initialize
10480         var_by_index.
10481         (read_machine_flt64_info) Fixed some problems caused by confusion
10482         between flt64 and double types.
10483         (read_header) Message fix.
10484         (read_variables) Fixed set of cases in which we byte-swap sv.print
10485         and sv.write.  Fixed confusion of flt64 and double.
10486
10487         * sfm.h: (struct sfm_write_info) New.
10488
10489         * som-high.c: (som_draw_title) Properly frees `s'.
10490
10491         * temporary.c: (save_dictionary) Comment fix.
10492
10493         * var.h: Comment fixes.  New FMT_* enum, FMT_NUMBER_OF_FORMATS.
10494         (struct trns_header) Formatting fix.
10495         (struct save_trns) New.
10496
10497         * vars-atr.c: (discard_variables) Comment fix.
10498
10499         * sfm-write.c: New file, baseline release.
10500
10501         * sfmP.h: New file, baseline release.
10502
10503 Sun Nov 24 14:53:53 1996  Ben Pfaff  <blp@gnu.org>
10504
10505         * cmdline.c: (parse_command_line) `--version' output updated.
10506         (glob var syntax_message[]) Added my e-mail address.
10507
10508         * file-handle.q, lexer.c, vfm.c: Changed many instances of
10509         `illegal' to `invalid'.
10510
10511         * sfm-read.c: (struct sfm_fhuser_ext) New fields used as
10512         uncompression buffer.
10513         (sfm_close) Frees decompression buffer.
10514         (sfm_read_dictionary) Initializes decompression buffer.
10515         (buffer_input, read_compressed_data) New functions.
10516         (sfm_read_case) Restructured; now calls read_compressed_data() to
10517         handle compressed system file data.
10518
10519         * var.h: Comment fix.
10520
10521 Mon Nov 11 15:34:09 1996  Ben Pfaff  <blp@gnu.org>
10522
10523         * dfm.c: (dfm_close) Does not set h->{ext,class} because the
10524         caller handles it.
10525          
10526         * get.c: New comments.  New static var `get_file'.
10527         (cmd_get) Now fully implemented.  Calls discard_variables();
10528         initializes fv and lv for all variables; new debug code; sets
10529         up the dictionary; sets up the input program.
10530         (read_from_get, cancel_get) New functions.
10531
10532         * sfm-read.c: Comment fixes.
10533         (sfm_close) New static function.
10534         (sfm_read_dictionary) Properly sets up the class of the
10535         file_handle.  No longer cares what size the data is in records of
10536         type 7.  Also, on failure, properly cleans up the file_handle and
10537         free()s some stuff.
10538         (read_variables) No longer thinks it knows `nval' of the
10539         dictionary.  Now sets p.get.fv, etc., instead of speculatively
10540         setting fv itself.
10541         (read_value_labels) Fixed off-by-one error in indexing of
10542         var_by_index[].
10543         (sfm_read_case) New function.
10544         (sfm_r_class) New static var.
10545
10546         * var.h: (get_proc) New struct.
10547         (struct variable) New member p.get.
10548
10549 Thu Nov  7 20:52:28 1996  Ben Pfaff  <blp@gnu.org>
10550
10551         * get.c: Removed GTSV_OPT_MAP because of a misinterpretation of
10552         the manual's meaning.
10553         (rename_variables) New function.
10554         (trim_variables) Doesn't try to parse MAP any more.  Removed debug
10555         code.  Now properly reorders the dictionary on the KEEP keyword.
10556
10557         * sfm-read.c: (read_value_labels) Fixed some bugs regarding
10558         garbage collection.
10559
10560         * vars-atr.c: (clear_variable) New argument `dictionary *'.
10561         (rename_variable) New function.
10562         (free_val_lab) Reformatted.
10563
10564 Thu Nov  7 17:29:16 1996  Ben Pfaff  <blp@gnu.org>
10565
10566         * var.h: Reindented entire file.  Comment fixes.
10567         (glob vars var, var_by_name, nvar, N, nval, n_splits, splits)
10568         Removed.
10569         (glob var default_dict) New.
10570         (struct indirect_dictionary) Removed.
10571
10572         * Many other source files were changed to add `default_dict.'
10573         before all references to the dictionary of the active file.
10574         
10575         * vars-atr.c: (make_indirect_dictionary) Removed.
10576
10577         * glob.c: Reindented all variable declarations.  Updated for
10578         changed var.h.  Comment fixes.
10579
10580         * temporary.c: (restore_dictionary, save_dictionary) Simplified
10581         because now we can mainly copy dictionary structs.
10582
10583         * vars-prs.c: (is_dict_varname, parse_dict_variable,
10584         parse_variables) Takes dictionary instead of indirect_dictionary
10585         first argument.
10586         (parse_variables) Instead of calling make_indirect_dictionary,
10587         just sets DICT to &default_dict if DICT is NULL.  Of course, lots
10588         of `*dict.' references had to be changed to `dict->'.  Removed
10589         debug code.
10590
10591 Thu Nov  7 15:48:52 1996  Ben Pfaff  <blp@gnu.org>
10592
10593         * get.c: Added GTSV_OPT_* series of enums.
10594         (trim_dictionary, dict_delete_run) New functions.
10595         [DEBUGGING] (dump_dict_variables) New function.
10596         (cmd_get) Calls trim_dictionary() to get dictionary fully set-up.
10597         [DEBUGGING] Calls dump_dict_variables() to display results.
10598
10599         * glob.c: (cmp_variable) Now a public function declared in var.h.
10600
10601         * sfm-read.c: Turned off debug code.  Comment fixes.
10602         (read_machine_int32_info, read_machine_flt64_info) New functions
10603         to parse type 7 records.
10604         (sfm_read_dictionary) Properly byteswaps several fields now.
10605         Calls read_machine_*_info() to parse type 7 subtypes 3 and 4
10606         records.  [DEBUGGING] Dumps dictionary.
10607         (read_variables) Sets `index' field of variables created properly.
10608         Constructs avl tree of variables in dictionary.  [DEBUGGING] No
10609         longer dumps dictionary.
10610         (read_value_labels) Properly byteswaps fields.  [DEBUGGING] New
10611         debug code.
10612         [DEBUGGING] (dump_dictionary) No longer stubbed out.
10613
10614         * temporary.c: (restore_dictionary) Destroys `var_by_name' glob
10615         var before destroying any variables just to save a little time.
10616
10617         * var.h: (struct variable) Reordered in order to make name[] the
10618         first member; this makes pointers to `variable' pointers to the
10619         variable name, simplifying avl trees, etc.
10620         (struct indirect_dictionary) New struct.
10621
10622         * vars-atr.c: (find_variable) Rewritten for efficiency.
10623         (make_indirect_dictionary, is_dict_varname, parse_dict_variable)
10624         New functions.
10625         (is_varname) Rewritten for efficiency.
10626         (parse_variables) New argument, which is a `dictionary *'.  All
10627         references changed.  This function now reads variable names from
10628         the dictionary passed, or from the default dictionary if NULL.
10629
10630 Tue Nov  5 18:34:59 1996  Ben Pfaff  <blp@gnu.org>
10631
10632         * misc.h: Added new macro DIV_RND_UP to perform integer division,
10633         rounding up.  Changed many references to ROUND_UP to use this
10634         instead.
10635
10636         * sfm-read.c: Includes avl.h.
10637         (corrupt_msg) Induces a segfault under Checker.
10638         (macro assertive_bufread) New.  Many references to bufread() now
10639         use this instead.
10640         (sfm_read_dictionary) Split up into several functions.  Added code
10641         to read dictionary records following the the type 2 records.  Not
10642         quite complete.  New variable `var_by_index'.
10643         (read_header, read_variables) New functions extracted from
10644         sfm_read_dictionary().
10645         (read_value_labels) New function.
10646         (bufread) Checks ferror() if fread() doesn't return the expected
10647         value; if ferror() is zero it's just EOF.
10648         (dump_dictionary) Stubbed out.
10649
10650         * BTW: The source code now exceeds 50000 lines!
10651         
10652 Mon Nov  4 22:03:28 1996  Ben Pfaff  <blp@gnu.org>
10653
10654         * command.c: Added GET to cmd_table[].
10655
10656         * list.q: Removed reference to alloca headers.
10657         (cmd_list) Gave prototype.
10658
10659         * sfm-read.c: Added DEBUGGING comments.
10660         (sfm_read_dictionary) Checks bias correctly.  Sets
10661         dict->var_by_name to NULL.  Calculates long_string_count
10662         correctly.  realloc's dict->var[] array to minimum size.
10663         [DEBUGGING] Calls dump_dictionary.
10664         [DEBUGGING] (dump_dictionary) New function.
10665
10666         * temporary.c: (save_dictionary) Sets var_by_name to NULL.
10667         (restore_dictionary) If the dictionary contains a non-NULL
10668         var_by_name, uses that instead of generating one.
10669         (free_dictionary) Destroys var_by_name.
10670
10671         * var.h: (struct dictionary) Added field `var_by_name'.
10672
10673         * get.c: New file, not complete.
10674
10675 Sun Nov  3 12:24:36 1996  Ben Pfaff  <blp@gnu.org>
10676
10677         * mis-val.c: New enums MV_NOR_*.  New struct num_or_range.
10678         (parse_num_or_range) New function.
10679         (parse_numeric) Reimplemented in order to support LOW THRU <n> and
10680         <n> THRU HIGH missing values.
10681
10682         * output.h: [__GNUC__>1 && __OPTIMIZE__] (width, height) Made
10683         __attribute__((const)).
10684
10685         * q2c.c: (get_token) Merged isdigit || isalpha into isalnum.
10686
10687         * sfm-read.c: Finished reference implementation.
10688
10689         * sfm.h: Includes var.h.
10690
10691         * var.h: Comment fixes.
10692         (struct `variable') Reordered some fields.
10693
10694         * vars-atr.c: (is_num_user_missing) Added support for MISSING_*
10695         constants added previously.
10696
10697 Wed Oct 30 17:13:08 1996  Ben Pfaff  <blp@gnu.org>
10698
10699         * common.h: Comment fixes.  Added declaration of
10700         `second_lowest_value' as variable or macro.  Made `compat_type',
10701         `pgm_state_type' into anonymous enums.
10702
10703         * display.c: Comment fix.
10704
10705         * glob.c: [ENDIAN==UNKNOWN] Added definition for `endian' global
10706         var.
10707         [!defined SECOND_LOWEST_VALUE] Added definition for
10708         `second_lowest_value' global var.
10709         (compat, pgm_state global vars) Changed types to `int'.
10710         (init_glob) Initializes `second_lowest_value'.
10711
10712         * sfm-read.c: Continued work, not complete.
10713
10714         * var.h: Added new MISSING_* constants to handle LOWEST and
10715         HIGHEST.
10716
10717 Sat Oct 26 23:06:06 1996  Ben Pfaff  <blp@gnu.org>
10718
10719         * sfm-read.c: New file, not complete.
10720
10721         * cases.c: (vec_insert) Changed vector expansion algorithm.
10722         (vec_delete) Fixed bug that screwed up deletion sometimes, it was
10723         mucking up the RECODE transformation in particular.
10724         (envector) Harmless change in notation.
10725
10726         dfm is now fairly well tested again.  
10727         * dfm.c: (dfm_get_record) Only returns ext->ptr if ext is
10728         non-NULL--duh.
10729         (cmd_begin_data) if(ext->line) replaced by if(ext && ext->line).
10730
10731         * recode.c: Comment fix.
10732
10733         * sfm.h: Interface should be fairly final now, or at least for a
10734         day or so...
10735
10736         * vfm.c: [DEBUGGING] (index_to_varname) New function.
10737         (open_active_file) [DEBUGGING] Translates ccase indices into
10738         variable names now to make it easier to understand what's really
10739         going on.
10740
10741 Sat Oct 26 20:46:31 1996  Ben Pfaff  <blp@gnu.org>
10742
10743         * data-in.c: Comment fix.
10744
10745         * data-list.c: Includes dfm.h.
10746         (do_reading) Uses new function dfm_push_cust().
10747
10748         * data-out.c: (convert_time, convert_WKDAY, convert_MONTH) Added
10749         `return 1;' at end.
10750
10751         * file-handle.h: Completely changed.  Some parts split off into
10752         new file dfm.h.  Implemented in file-handle.q.
10753         (enum FH_*) Removed.
10754         (struct fh_ext_class) New struct.
10755         (struct file_handle) Retained only these fields: name, norm_fn,
10756         fn, recform, lrecl, mode.  New fields class, ext.
10757         (get_handle_by_name, get_handle_by_filename, parse_file_handle,
10758         close_handle, handle_name) Added `fh_' prefix to name, all
10759         references changed.
10760
10761         * dfm.h: New file, implemented in dfm.c.
10762         (get_record, put_record, fwd_record, bkwd_record, set_record,
10763         get_cur_col) Functions moved from file-handle.h, now prefixed with
10764         `dfm_'.
10765         (dfm_push_cust) New function.
10766
10767         * sfm.h: New file.  Incomplete.
10768
10769         * dfm.c: All functions adjusted/rewritten for new dfm/fhp
10770         interface.  Functions reordered, comments changed.  Not well
10771         tested, probably full of bugs.
10772         (struct dfm_fhuser_ext) New struct.
10773         (dfm_close) New function.
10774         (open_file_r) Pickier about finding `BEGIN DATA.' line.
10775         (open_file_w) User messages changed.
10776         (get_record) Comment fixed.
10777         (read_record) Increments ext->ln even for inline_file.  Calls
10778         dfm_close() for inline_file when `END DATA.' encountered.
10779         (dfm_get_record) Experimental restructuring.
10780         (dfm_push_cust) New function.
10781         (cmd_begin_data) Detects whether the inline file was fully read by
10782         checking whether it is still open; detects whether it was read at
10783         all by checking whether the line number is greater than zero.
10784
10785         * file-handle.q: All functions adjust/rewritten for new dfm/fhp
10786         interface.  Functions reordered, comments changed.  Not well
10787         tested, probably full of bugs.
10788         (init_file_handle) Removed initializers for obsolete fields, added
10789         new fields.
10790         (fh_close_handle) Much simpler, now mainly calls the class
10791         function.
10792         (fh_init_files) Renamed inline file internal filename.
10793
10794         * file-type.c: Includes dfm.h.
10795         (read_from_file_type) Doesn't use dfm internal state anymore.
10796
10797         * inpt-pgm.c, print.c: Include dfm.h.
10798
10799         * recode.c: (internal_cmd_recode) Casts strlen() return value to
10800         int in comparison with other int.
10801
10802         * som-high.c: (build_target) Fixed operator precedence problem in
10803         if statement (& versus ==).
10804
10805 Sat Oct 26 10:39:25 1996  Ben Pfaff  <blp@gnu.org>
10806
10807         * dfm.c: (read_record) Can now read fixed-length records; not
10808         tested.
10809         (put_record) Can now write fixed-length records; not tested.
10810
10811         * file-handle.h: FH_* defines changed to enums.  New enum series
10812         FH_RF_*, FH_MD_*.
10813         (struct file_handle) New members recform, lrecl, mode.
10814
10815         * file-handle.q: Parser changed.
10816         (internal_cmd_file_handle) Added support for new /RECFORM, /MODE,
10817         /LRECL subcommands.  These are compatible with Windows.
10818         (init_file_handle) Initializes recform, mode fields.
10819
10820         * q2c.c: (get_line) When outputting `!' comment lines, now
10821         increments the output file line number so that `#line' directives
10822         are correct.
10823         (make_identifier) New function that converts an arbitrary string
10824         into a valid C identifier.
10825         (dump_vars) Calls make_identifier() in two places in order to
10826         suppress some errors for bad identifiers.
10827         (make_match) Allows TRUE as synonym for YES and FALSE as synonym
10828         for NO.  Allows numbers to be prefixed by underscores to make them
10829         acceptable C identifiers but still to be parsed as numbers by the
10830         Fiasco lexer.
10831
10832 Thu Oct 24 20:13:42 1996  Ben Pfaff  <blp@gnu.org>
10833
10834         * command.c: Re-enabled RECODE, SAMPLE, SELECT IF.
10835         
10836         * dfm.c: Comment fixes. (get_record) Gives error if file handle
10837         was opened for writing.
10838         (open_file_w) New function.
10839         (read_record) Uses strncasecmp if available.  Improved error
10840         messages, comments.
10841         (put_record) New function.
10842
10843         * file-handle.h: Moved function comments into dfm.c and
10844         file-handle.q.  Comment fixes.  Removed declarations of
10845         tilde_expand() and normalize_filename().
10846         (struct file_handle) Changed `open' from boolean to enumerated
10847         field to allow for three states--closed, open for reading, open
10848         for writing--all references changed.
10849
10850         * file-handle.q: Includes filename.h.
10851
10852         * print.c: (CMD_* enums) Renamed PRT_* and moved into var.h; all
10853         references changed.
10854         (alloc_line) Makes allowance for line terminator characters in
10855         calculations.
10856         (print_trns_proc) Now handles OUTFILE, WRITE differences.
10857         (print_space_trns_proc) Handles OUTFILE differences.
10858
10859         * recode.c, sample.c: Comment fixes.
10860
10861         * var.h: (struct print_trns) Changed boolean field `eject' to
10862         bitmapped field `options'; all references changed.  New enums
10863         PRT_* for use with this field.
10864
10865         * exception.h, test-exception.c: Removed.
10866
10867 Thu Oct 24 17:47:14 1996  Ben Pfaff  <blp@gnu.org>
10868
10869         * ascii.c: (delineate) Turned off debug output.
10870
10871         * common.c: [Checker and Linux] (__assert_fail, __eprintf) Moved
10872         to error.c.
10873
10874         * data-in.c: (parse_string_as_format) Sets the entire string value
10875         to spaces, not just the short string part of it.  Is this correct
10876         now? 
10877
10878         * data-out.c: (convert_date) Fixed DATETIME format problems with
10879         decimal places, removed debug code.
10880
10881         * dfm.c: (open_file_r) Fixed bug where an error would occur in the
10882         middle of parsing BEGIN DATA that would cause the lexer to read
10883         from a wild pointer `prog'; now calls new function
10884         preprocess_line() in lexer.c.
10885
10886         * error.c: [__CHECKER__] (hcf) Calls induce_segfault() on improper
10887         termination.
10888         [Checker and Linux] (__assert_fail, _eprintf) Moved from common.c.
10889         Now call induce_segfault() to induce the segfault.
10890         (induce_segfault) New function.
10891
10892         * expr-opt.c: Comment fix.
10893         (parse_sysvar) New function.
10894         (parse_primary) Added system variable support--calls
10895         parse_sysvar().
10896         (global var ops) Added OP_CASENUM operator.
10897
10898         * expr.h: Comment fixes.
10899         (OP_* enum) added OP_CASENUM operator.
10900         (struct casenum_node) New struct.
10901         (union any_union_union) New member `cas' of type `casenum_node'.
10902
10903         * glob.c: (global var last_vfm_invocation) New var.
10904         (init_glob) Initializes last_vfm_invocation.
10905
10906         * lexer.c: (lookahead) Fixed reversed condition on if statement.
10907
10908         * getline.c: (get_line) Split into get_line() and preprocess_line().
10909         (preprocess_line) New function.
10910
10911         * var.h: Declares last_vfm_invocation.
10912
10913         * vfm.c: (procedure) Sets last_vfm_invocation.
10914
10915 Wed Oct 23 21:53:43 1996  Ben Pfaff  <blp@gnu.org>
10916
10917         * command.c: (parse_cmd) Fixed bad assertion related to
10918         lookahead().
10919
10920         * data-in.c: (parse_month) Implemented to parse months according
10921         to full interpretation of standard.
10922         (to_roman) New function.
10923         (parse_wk_delimiter) Bug fix (forgot to skip `WK' in string).
10924         (parse_weekday) Bug fix (forgot to skip all the day name).
10925
10926         * data-list.c: (read_from_data_list_fixed) Fixed bug that screwed
10927         up parsing of multirecord data items.  Also fixed user message.
10928
10929         * data-out.c: Comment fix.
10930         (year2, year4, convert_date, convert_time, convert_WKDAY,
10931         convert_MONTH) New functions to support time & date output.
10932         (convert_format_to_string) Calls new time & date output routines.
10933
10934         * expr-prs.c: (nary_num_func) Found a bug, but didn't fix it yet.
10935
10936         * lexer.c: (lookahead) Noted a previously unnoticed caveat in
10937         comment.
10938
10939         * main.c: [DEBUGGING] (dump_token) Updated to handle getline.h.
10940
10941         * misc.c: (global var formats) Fixed declarations of DATETIME,
10942         TIME, DTIME.
10943
10944         * postscript.c: (text) Fixed a pair of bugs in the reallocation of
10945         the output_char buffer.
10946
10947         * vars-prs.c: (parse_DATA_LIST_vars) Fixed a failure to free
10948         memory bug.  Fixed user messages.
10949
10950 Tue Oct 22 17:27:04 1996  Ben Pfaff  <blp@gnu.org>
10951
10952         * Removed #pragma argsused from lots of places.
10953         
10954         * data-in.c: Implemented zoned decimal and time-date formats.
10955         Untested.  This is a huge chunk of code--maybe 1000 lines and 50
10956         new functions.
10957
10958         * data-out.c: Implemented zoned decimal format.
10959
10960         * expr.h: Moved yrmoda() declaration here from exprP.h.
10961
10962         * misc.c: (global var formats) Minor fixes--added
10963         FCAT_SHIFT_DECIMAL to formats N and Z.
10964         (convert_fmt_ItoO) Added support for format Z.
10965
10966         * som-frnt.c: (som_set_value) Fixed bug regarding string values.
10967
10968 Mon Oct 21 20:39:59 1996  Ben Pfaff  <blp@gnu.org>
10969
10970         * command.c: (parse_cmd) [GLOBAL_DEBUGGING] Inserted call to
10971         som_check_workspace() that is activated between commands.
10972
10973         * data-list.c: (dump_fixed_table, dump_free_table) Finished these
10974         for good, I hope.
10975
10976         * list.q: (begin_row) Changed title expansion style from
10977         SOPT_X_VERT to SOPT_X_SHSP.
10978
10979         * som-frnt.c: Now includes `somP.h'.
10980         (som_push_workspace, som_pop_workspace) New functions that, taken
10981         together, form a solution to the recursive table building problem
10982         mentioned yesterday.  Surrounded every table output routine
10983         throughout the program with calls to these functions.
10984         [GLOBAL_DEBUGGING] (som_check_workspace) New function.
10985         (som_create_table) Checks that there's an active workspace.
10986         (som_destroy_all_tables, som_crush) Removed.
10987
10988         * som-high.c: (global var som_preserve_tables) Removed, all
10989         references deleted.
10990         (som_submit_table) Checks that there's an active workspace.
10991         (dump_columnated_table) Doesn't columnate tables that would have
10992         just one row per column.
10993         (dump_crush_page, som_dump_crush_page) Removed debugging code.
10994         (som_dump_crush_page) Moved row number labels from left side of
10995         tables to right side.
10996         (som_get_table_size) Added support for SOPT_X_SHSP.
10997
10998         * som.h: New cell expansion type SOPT_X_SHSP.
10999
11000         * somP.h: (global vars arena_stack, n_arena_stack, m_arena_stack)
11001         New vars.
11002         (global var curtab_arena) Moved from som-frnt.c.
11003
11004 Sun Oct 20 13:45:28 1996  Ben Pfaff  <blp@gnu.org>
11005
11006         * ascii.c: [GLOBAL_DEBUGGING] (SUPPRESS_WARNINGS) New debug option
11007         that causes bad location warnings to be suppressed.
11008         (delineate) Saves current font when calling draw_text(); fixed
11009         handling of NULLs when backing up.  Also fixed line-wrapping bug.
11010
11011         * command.c: Re-enabled `LEAVE', `NUMERIC', `PRINT', `PRINT EJECT',
11012         `PRINT FORMATS', `PRINT SPACE', `STRING', `TITLE', `WRITE'.
11013
11014         * common.c: Added code to cause assertion failure to dump core
11015         when run under Checker.
11016
11017         * data-list.c: (dump_fixed_table) Fixed some inconsistencies, but
11018         there are still bugs.
11019
11020         * glob.c: (__eprintf) Removed.
11021
11022         * list.q: Inserted som_preserve_tables kluge that prevents tables
11023         from being thrown away due to recursive table building through
11024         som_output_line being called from a transformation during the LIST
11025         procedure invocation.  This is a general problem that must be
11026         solved in a better way since it applies to all procedures in
11027         general.
11028         (begin_row) Changed title options to SOM_X_VERT from SOM_X_BOTH.
11029         (flush_table) Removed SOM_TOPT_PRESERVE from submission options.
11030
11031         * numeric.c: Fixed several errors in the form of msg() calls.
11032
11033         * print.c: Updated for use of som.
11034         (dump_table) Reimplemented.
11035         (print_trns_proc) Calls som_eject_page() instead of eject_page().
11036         Calls som_output_text() instead of outs_line().
11037
11038         * som-frnt.c: (som_destroy_all_tables) Sets som_preserve_tables to
11039         0.
11040         (som_output_text) Function moved from som-low.c.  Interface
11041         changed.
11042
11043         * som-high.c: (som_preserve_tables) New global public variable
11044         declared in som.h.
11045         (som_submit_table) Destroys the tables only if som_preserve_tables
11046         is 0.
11047         (paginate_horizontally) Bugfix: sets som.mpw even if there's only
11048         one subrow per row.  Now labels subrows if there's more than one
11049         subrow per row.
11050         (dump_crush_table) Added wishlist comment.
11051         (som_eject_page) New public function declared in som.h.
11052
11053         * som-low.c: (som_dump_crush_page) Draws row labels if there's
11054         more than one subrow per row.
11055         (som_output_text) Moved to som-frnt.c.
11056
11057         * som.h: (SOM_TOPT_PRESERVE) Removed.
11058
11059         * title.c: (get_title) Changed interface.
11060         (cmd_title) Changed `title' to `outp_title'.
11061         (cmd_subtitle) Changed `subtitle' to `outp_subtitle'.
11062
11063 Sun Oct 20 09:04:15 1996  Ben Pfaff  <blp@gnu.org>
11064
11065         * list.q: (flush_table) Conforms to new partial options in
11066         som_submission_form.
11067
11068         * som-high.c: (paginate_horizontally) Changed form of subrow
11069         number labels.
11070         (build_target) Omits spacing before table if
11071         SOM_TOPT_PARTIAL_OMIT_TOP is selected.
11072         (dump_crush_page) Changed interface.  Only trims bottom rule if
11073         SOM_TOPT_PARTIAL_OMIT_BTM is not selected.
11074         (dump_crush_table) Handles partial tables.
11075         (output_row_label) New function.
11076         (som_dump_crush_page) Emits subrow number labels.  Draws vertical
11077         rule on the right edge of narrow subrows.
11078
11079         * som.h: Changed SOM_SUB_PARTIAL_* series of submission type
11080         constants to a series of SOM_TOPT_PARTIAL_* submission options.
11081         All references updated.
11082
11083 Fri Oct 18 19:46:49 1996  Ben Pfaff  <blp@gnu.org>
11084
11085         * misc.c: Comment fix.
11086
11087         * som-high.c: (examine_table) Treats crushed tables separates for
11088         purpose of determining header size.
11089         (paginate_horizontally) Allots space for line numbers in crushed
11090         tables with lots of subrows per row.  Calculates the `maximum page
11091         width', the width of the widest horizontal page.
11092         (build_target) Removed trim argument; all references changed.
11093         Stricter assertions.  (dump_crush_page) New function.
11094         (dump_crush_table) Reimplemented.
11095
11096         * som-low.c: (som_dump_page) Uses new RULE_ROW &c. constants.
11097         (som_dump_crush_page) Reimplemented, interface changed.
11098
11099         * somP.h: Many many new helper macros for use with crushed tables.
11100         (global var som) Removed `tv', `cum_y' members; all references
11101         removed.  New members `mpw', `digit_space'.
11102
11103 Sun Sep 29 19:37:03 1996  Ben Pfaff  <blp@gnu.org>
11104
11105         * arena.c: (arena_alloc) [!DISCRETE_BLOCKS] Removed `size'
11106         variable, changed to constant 1024.
11107         (arena_ca_strdup) Changed `sizeof(a_string)' to
11108         `sizeof(c_string)'.
11109         (arena_ca_strdup) [!DISCRETE_BLOCKS] Changed bad cast from
11110         `(c_string *)' to `(char *)'; this fixed some offset problems.
11111
11112         * filename.c: (readlink_malloc) Changed initial allocation from
11113         100 bytes to 128.
11114         (good_getcwd) Changed from xmalloc() to local_alloc(); removed
11115         comment.
11116
11117         * postscript.c: (read_fontmap) Fixed leak by changing &owner to
11118         &fm->owner in several places.
11119
11120         * som-high.c: (output_table) Changed interface to rest of world.
11121         (examine_crush_table) Removed.  Crushed tables are re-broken now,
11122         in preparation for rewrite.
11123
11124         * som.h: Comment fix.
11125
11126 Sat Sep 28 21:28:07 1996  Ben Pfaff  <blp@gnu.org>
11127
11128         * ascii.c: (ascii_init_driver) Disposes of x->file.filename and x
11129         itself in the cleanup stage.
11130
11131         * descript.q: (display) At least temporarily, changed the table
11132         format to a crushed table.
11133
11134         * list.q: (begin_row) At least temporarily, added horizontal lines
11135         between cases.
11136
11137         * som-high.c: (examine_crush_table) Sets som.hh to the width of
11138         the horizontal "headers," that is, to the width of the far left
11139         and far right rules.
11140         (justify_pagination) Sets som.th to the width of the widest row
11141         in the crushed table.  Fixed inner loop off-by-one error.
11142
11143         * som-low.c: (som_dump_crush_page) Added code to draw horizontal
11144         rules.
11145
11146         * somP.h: Comment fix.
11147
11148 Fri Sep 27 20:08:39 1996  Ben Pfaff  <blp@gnu.org>
11149
11150         * filename.c: (open_file_ext) Now, doesn't set f->file to NULL
11151         before closing it; also, opens the constructed filename `s'
11152         instead of f->filename.
11153
11154         * postscript.c: Moved initialization of x->loaded, x->prop,
11155         x->fixed, x->current, also the add_encoding() calls, into
11156         postopen().
11157         (preclose) Destroys x->combos; sets x->loaded, x->combos to NULL;
11158         sets x->last_font to NULL; sets x->next_combo to zero.
11159
11160         * som-high.c: (crushed_row_height) Moved definition farther up.
11161         (som_submit_table) Doesn't calculate line width, font size until
11162         after calling open_page(), to accomodate changes to PostScript
11163         driver.
11164         (vert_headers) Removed; equivalent functionality moved to
11165         examine_table(), examine_crush_table().
11166         (justify_pagination) Replaced with different algorithm.
11167         (dump_crush_table) Bugfix that caused tables to fail to be clipped
11168         at the bottom of the page.
11169
11170 Thu Sep 26 22:20:26 1996  Ben Pfaff  <blp@gnu.org>
11171
11172         * command.c: Added cmd_list back into cmd_table.
11173
11174         * freq.c, frequencies.q, repeat.c, list.q, vars-atr.c, vfm.c:
11175         Comment fix: `#define DEBUGGING' --> `#define DEBUGGING 1'.
11176
11177         * list.q: (flush_table) Updated to new som_submission_form format.
11178
11179         * som-frnt.c: Comment fix.
11180
11181         * som-high.c: Changed `#endif' to `#undef EXTERN'.
11182         (output_table) Calls som_get_table_size() directly; handles
11183         crushed tables.
11184         (examine_crush_table) New function; calls vert_headers().
11185         (examine_table) Moved some code into new function, vert_headers().
11186         (justify_pagination) New function.
11187         (dump_plain_table) Removed `static' from `cy'.
11188         (dump_crush_table) New function.
11189
11190         * som-low.c: (som_dump_crush_page) New function.
11191
11192         * som.h: Comment fixes.
11193         (enum SOM_TOPT_CRUSH) New.
11194         (SOM_SUB_PARTIAL_BEG, SOM_SUB_PARTIAL_MID, SOM_SUB_PARTIAL_END)
11195         Temporarily set to zero to make do with LIST procedure.
11196
11197         * somP.h: Re-ordering.
11198
11199 Wed Sep 25 19:36:11 1996  Ben Pfaff  <blp@gnu.org>
11200
11201         * som.c: Split into som-frnt.c, som-high.c, som-low.c.
11202
11203         * somP.h: New file for use by som-high.c, som-low.c.
11204
11205         * q2c.c: Added definition for VME.
11206         (get_line) Now dumps `!' comment lines to the output file
11207         verbatim.
11208
11209         * crosstabs.q, descript.q, file-handle.q, frequencies.q, list.q,
11210         set.q: Changed format of `!' comment lines.
11211
11212 Tue Sep 24 18:39:09 1996  Ben Pfaff  <blp@gnu.org>
11213
11214         * All source files: Added copyright notice.
11215
11216         * common.c: (xmalloc, xrealloc, xstrdup) Cast size_t's to unsigned
11217         longs in msg() calls.
11218
11219         * con32s.c: (xmalloc, xrealloc) Updated from common.c.
11220
11221         * q2c.c: (xmalloc, xrealloc, xstrdup) Updated from common.c.
11222
11223 Sat Sep 21 23:16:31 1996  Ben Pfaff  <blp@gnu.org>
11224
11225         * output.c: (outp_read_devices) Changed criteria for
11226         distinguishing different types of lines.
11227
11228 Fri Sep 20 22:52:28 1996  Ben Pfaff  <blp@gnu.org>
11229
11230         * cmdline.c: Changed syntax message.
11231
11232         * filename.c: (good_getcwd) Bug fix (?).
11233         (normalize_filename) [__BORLANDC__] Uses _fullpath() library
11234         function.
11235         (search_path) Appends DIR_SEPARATOR to directory name only if it
11236         does not already end with one.
11237
11238         * glob.c: Checks STAT_PAGER envvar before PAGER.
11239
11240         * output.c: Checks environment variables instead of just local
11241         macros.
11242
11243 Tue Sep 10 21:39:00 1996  Ben Pfaff  <blp@gnu.org>
11244
11245         * arena.c: (arena_destroy) Swatted a subtle bug that cropped up
11246         when the pointer passed to the function was within the arena
11247         itself, so that it couldn't properly be set to NULL _after the
11248         arena was freed_.
11249
11250         * command.c: Re-enabled DISPLAY.
11251
11252         * display.c: Rewritten to handle tables.  Untested.
11253
11254         * filename.c: (search_path) Fixed memory leak.
11255
11256         * frequencies.q: (cmd_frequencies) Frees v_variables.
11257         (postcalc) Calls cleanup_freq_tab() after displaying statistics.
11258         (cleanup_freq_tab) New function to garbage collect.
11259         (dump_full) Elegantized.
11260
11261         * main.c: New comment.
11262
11263         * output.h: New tag for tagged quotes: TAG_NEWLINE.
11264
11265         * postscript.c: Comment fix.
11266         (release_fontmap, free_font_entry) New functions.
11267         (ps_init_driver) Sets free_font_entry() as the freefunc for
11268         hashtable `loaded'.  Calls release_fontmap() when destroying a
11269         driver; also frees the output filename; also frees the
11270         ps_driver_ext block.
11271         (free_ps_encoding) Frees the filename as well as the encoding
11272         block.
11273         (output_encodings) Frees the line buffer and pops the msg-filename
11274         stack.
11275         (read_fontmap) Frees the fontmap filename and the line buffer.
11276         (postopen, preclose) Misc. garbage collection fixes.
11277         (ps_open_page) Destroys the `combos' hash table; sets `last_font'
11278         to NULL; this fixes some output problems.
11279         (text) Handles TAG_NEWLINE.  Untested.
11280
11281         * som.c: (cell_byte_size) Merged SCON_VALUE and SCON_TEXT cases.
11282         (som_set_string) Removed.  All references changed to
11283         `som_set_text'.
11284         (som_set_text) Rewritten.  New interface.  More general.
11285
11286         * som.h: Minor format changes.
11287         (struct som_value_cell) Removed; all references changed to
11288         `som_text_cell'.
11289         (enums SOT_*) Changed.
11290
11291 Mon Sep  9 21:43:13 1996  Ben Pfaff  <blp@gnu.org>
11292
11293         * command.c: Re-enabled SPLIT FILE.
11294
11295         * postscript.c: Comment fix.
11296
11297         * som.h: Added `SOT_NONE'.
11298
11299         * split-file.h: (cmd_split_file) Removed superfluous parenthesis.
11300
11301         * vfm.c: (dump_splits) Reimplemented.
11302
11303 Sat Sep  7 22:35:12 1996  Ben Pfaff  <blp@gnu.org>
11304
11305         * Compiled the project under gcc 2.7.2, which gave some new
11306         warnings.  This led to many additions of casts from unsigned to
11307         int sprinkled throughout the code.
11308         
11309         * arena.c: Many uses of `unsigned' changed to `size_t'.
11310
11311         * command.c: Added END FILE, END REPEAT to command table.
11312         (var cmd_end_repeat) Renamed cmd_end_repeat_p.
11313         (find_command, FILE_TYPE_okay) Not commented out anymore.
11314         (parse_cmd) Calls FILE_TYPE_okay again.
11315         (output_line) Added calls to som_output_text() to put the line
11316         in the output files.
11317
11318         * common.c: (macro VME) Format changes.
11319         (xstrdup) Asserts that its argument is not NULL.
11320         
11321         * data-list.c: Implemented dump_fixed_table().
11322         
11323         * inpt-pgm.c: Formatting changes.  Comment changes.
11324         (end_case_proc) Renamed end_case_trns_proc.
11325         (cmd_end_file, end_file_trns_proc) New functions.
11326
11327         * misc.c: Many uses of `int' and `unsigned' changed to `size_t'.
11328
11329         * misc.h: (local_strdup) New macro corresponding to strdup() but
11330         allocating its data through local_alloc() if possible--that is, if
11331         GNU C is in use.
11332
11333         * postscript.c: Comment changes.
11334         (quote_ps_name, quote_ps_string, output_encodings) New functions.
11335         (output_line, add_string) New macros supporting
11336         output_encodings().
11337         (postopen) Fixed contents of ${fixed-font} and ${prop-font}
11338         substitution vars.  Calls output_encodings() when a line
11339         consisting of `!encodings' is encountered.
11340         (preclose) Some code moved into quote_ps_string().
11341         (dump_line) Changed into macro supporting dump_fancy_line().
11342         (switch_font) Now outputs DSC "%%IncludeResource: font (...)"
11343         command when appropriate.
11344         (write_text) Fixed `literal_char' array (I think it's fixed, at
11345         least.)
11346         (text) Fixed bug when width was zero.  Now exits immediately on
11347         zero height_left.  Now, when executing `goto restart;', checks
11348         that cp<end, so that we don't read beyond end-of-string.  Also,
11349         outputs the correct code to the output file by outputting the code
11350         from the metric instead of the internal metric index.
11351
11352         * repeat.c: (cmd_end_repeat) New function.
11353
11354         * som.c: (var som) `headers' renamed `options' and semantics
11355         changed.  All references changed.
11356         (draw_title) `if(px!=-1 || px!=-1)' --> `if(px!=-1 || py!=-1)'.
11357         (build_target) Only inserts spacing if SOM_TOPT_SPACING not
11358         selected.
11359         (som_text_table) Removed.
11360         (som_output_text) New function.
11361
11362         * som.h: (struct som_submission_form) Removed `header', `reuse',
11363         replaced with bitmapped field `options'.
11364         (SOM_TOPT_*) New enum set for som_submission_form.options.
11365         (SOT_*) New enum set for som_output_text().
11366
11367         * temporary.c: (copy_variable) When copying the var label, only
11368         calls xstrdup() if it's non-NULL.
11369
11370         * var.h: (enum type `vartype') Removed; all references changed to
11371         `int'.
11372
11373         * vars-atr.c: (init_variable) Changed local var `nbytes' from
11374         `int' to `size_t'.
11375
11376 Thu Sep  5 22:05:56 1996  Ben Pfaff  <blp@gnu.org>
11377
11378         * font.h: Comment changes.
11379
11380         * groff-font.c: (groff_read_font) Initializes `name' field to
11381         NULL.  Handles `encoding' field.
11382
11383         * hash.c: (hsh_dump) [GLOBAL_DEBUGGING] Output formatting changes.
11384
11385         * postscript.c: (struct font_entry) Removed `position' field.
11386         (struct ps_font_combo) New struct.
11387         (struct ps_driver_ext) Removed field `next_position'.  New fields
11388         `combos', `next_combo'.  `last_font' field changed from
11389         `font_entry *' to `ps_font_combo *'.
11390         (ps_init_driver) Reformatted; handles new fields.  When
11391         OPO_AUTO_ENCODE is set, adds the two default fonts' encodings to
11392         the encoding list.
11393         (get_encoding, find_encoding_file) New functions.
11394         (add_encoding) Some code moved out into find_encoding_file().
11395         (postopen) Changed value for ${title}.
11396         (preclose) Sets `loaded' field to NULL after destroying the hash
11397         table.
11398         (ps_open_page) Added comment.  Inits the `combos' and `next_combo'
11399         fields.
11400         (ps_text_set_font_by_position) Figures out the current family if
11401         not known.
11402         (compare_ps_combo, hash_ps_combo, free_ps_combo) New functions.
11403         (switch_font) Implemented.
11404         (write_text) Calls switch_font() more often.  Format changes.
11405         #undefs its macros after they're no longer useful.
11406         (text) Changed `continue' at one point to a jump to the top of the
11407         loop because we don't want `separate' reset to 0 at that point.
11408         (load_font) No longer sets `position' in the font_entry created.
11409
11410 Wed Sep  4 21:45:35 1996  Ben Pfaff  <blp@gnu.org>
11411
11412         * font.h: (struct font_desc) New member `encoding', which is not
11413         properly handled yet.
11414
11415         * glob.c: (init_glob) Some new i18n code, which is probably
11416         screwed up.
11417
11418         * output.c: (outp_read_devices, outp_get_paper_size) Changed
11419         `size' local from `int' to `size_t'.
11420
11421         * postscript.c: New driver configuration parameter `auto-encode'.
11422         New enums OPO_AUTO_ENCODE, ODA_COUNT.
11423         (struct font_entry) New member `position'.
11424         (struct ps_driver_ext) Reordered.  New hash table member
11425         `encodings'; new members `next_position', `next_encoding',
11426         `last_font'.  Members `current', `prop', `fixed' changed from type
11427         `font_desc *' to `font_entry *'; all references changed.
11428         (struct ps_encoding) New struct.
11429         (read_ps_encodings, compare_ps_encoding, hash_ps_encoding,
11430         free_ps_encoding, add_encoding) New functions.
11431         (ps_init_driver) Added OPO_AUTO_ENCODE to default
11432         x->output_options.  Initializes new members of ps_driver_ext.
11433         Changed default value for prologue_fn, encoding_fn.  Calls
11434         read_ps_encodings after loading default fonts.
11435         (option_tab[], ps_option) Handle new configuration parameter.
11436         (switch_font) New function.
11437         (struct output_char) `font' member changed from `font_desc *' to
11438         `font_entry *'.  New member `separate'.
11439         (read_fontmap) Changed `size' from `int' to `size_t'.
11440         (output_line, put_number) New macros for write_text().
11441         (write_text) Optimizes text output by consolidating multiple
11442         calls to PostScript `show' operator.
11443         (text) Keeps track of when text arguments can't be consolidated by
11444         write_text(), and marks those spots in the output stream.
11445         (load_font) Sets `position' of the allocated font_entry to -1, cuz
11446         the font hasn't been switched to by switch_font(), which is where
11447         the position is important--the PostScript is what cares about the
11448         position.
11449
11450 Sat Aug 31 23:52:38 1996  Ben Pfaff  <blp@gnu.org>
11451
11452         * hash.c: (hsh_destroy) Ignores NULL argument.  Doesn't try to
11453         call a NULL free_func.
11454         (hsh_rehash) Elegantized.
11455         (hsh_probe) Fix bug that manifested when the table was expanded
11456         and thus had to change location in memory.  Good thing
11457         too--otherwise could have been much more subtle.
11458         (hsh_find) [GLOBAL_DEBUGGING] Not stubbed out anymore.
11459         (hsh_foreach) New function for hash table iteration.
11460
11461         * hash.h: (struct hsh_iterator) New.
11462
11463         * lexer.c: (parse_tagged_quote) Font and family name strings in
11464         tags are now null-terminated.
11465
11466         * output.c: (outp_evaluate_dimension) Fixed over-aggressive unit
11467         parsing.
11468         (internal_get_paper_size, outp_get_paper_size) Fixed; now work as
11469         documented.  (Never before tested?)
11470
11471         * output.h: Comment changes.
11472
11473         * postscript.c: New driver options `optimize-text-size',
11474         `optimize-line-size', `max-fonts-simult'.  New enum set for
11475         specing cached line types.  Comment fixes.
11476         (struct line_form) New struct.
11477         (struct ps_driver_struct) New members `text_opt', `line_opt',
11478         `max_fonts', `lines'.
11479         (ps_init_driver) Initializes new members of ps_driver_struct.
11480         (user option type enum set) New member `nonneg_int_arg'.
11481         (static var option_tab[]) Supports new options.
11482         (ps_option) Handles new options.
11483         (find_ps_file) Made static.  No longer calls hsh_dump().
11484         (ps_get_var) Made static.
11485         (preclose) Dumps out proper DSC trailer.
11486         (ps_open_page) Elegantized.
11487         (ps_close_page) Calls dump_lines() if appropriate.
11488         (ps_line_horz, ps_line_vert, ps_line_intersection) Reduced to
11489         wrappers around line().
11490         (int_2_compare, compare_line, dump_line, dump_fancy_line,
11491         dump_lines, hash_line, free_line, line) New functions for support
11492         of line caching.
11493         (write_text, text) Made static.
11494         (text) Added to font support, not finished.
11495
11496 Thu Aug 29 21:36:41 1996  Ben Pfaff  <blp@gnu.org>
11497
11498         * font.h: (struct font_desc) New members ascent, descent.
11499
11500         * groff-font.c: (groff_read_font) Calculates font ascent and
11501         descent from the ascent and descent of the `d' and `p' characters,
11502         respectively, as per a suggestion on comp.fonts.
11503
11504         * postscript.c: (ps_open_page, ps_close_page, ps_line_horz,
11505         ps_line_vert, ps_line_intersection) Rewritten to deal with changed
11506         prologue.
11507         (write_text) Handles text right-justification and centering (not
11508         full justification).  Still very inefficient.  (One output line
11509         per character?!)
11510         (struct output_char) Added fields for font and font size.
11511         (text) Many bugfixes.
11512
11513 Sat Aug 24 23:26:00 1996  Ben Pfaff  <blp@gnu.org>
11514
11515         * cmdline.c: (usage) Calls outp_list_classes().
11516
11517         * font.h: Comment fix.
11518
11519         * groff-font.c: New exported global var `space_index'.
11520         (groff_init) New function to initialize `space_index'.
11521         (hash_kern) Casts result to unsigned.
11522         (font_name_to_index) Renamed font_char_name_to_index.  All
11523         references changed.  Also, now returns the value of `space_index'
11524         when passed an ASCII space character as an argument.  Fixed
11525         handling of nulls.
11526         (font_get_kern_adjust) Changed i from `int' to `unsigned'.
11527         Handles passed NULL pointers properly.
11528
11529         * lexer.c: (parse_tagged_quote) Comment fix.  Better range
11530         checking.
11531
11532         * output.c: (outp_list_drivers) Removed.  Removed all references.
11533         
11534         * output.h: Comment fixes.
11535
11536         * postscript.c: (ps_open_global) Calls groff_init().
11537         (output_char) New structure.
11538         (write_text) New function.
11539         (text) No longer stubbed out!  Now the output is correct--with a
11540         few exceptions, one of them being that the page has to be held
11541         upside down into a mirror.
11542
11543 Sun Aug 11 21:31:22 1996  Ben Pfaff  <blp@gnu.org>
11544
11545         * font.h: Comment fix.
11546         
11547         * font.c: (name_to_index) Renamed font_name_to_index, made extern.
11548         All callers changed.
11549         (number_to_index) Renamed font_number_to_index, made extern.  All
11550         callers changed.
11551         (font_get_kern_adjust, font_get_char_metrics) New functions.
11552
11553         * output.h: New constant OUTP_T_INTERNAL_DRAW.
11554
11555         * postscript.c: Changed default line width back to 1/2 point.
11556         (ps_line_horz, ps_line_vert, ps_line_intersection) Now lines are
11557         in the center of the space allotted for them, not just a fixed
11558         offset from the edge of the space; this fixes some bugs.
11559         (ps_line_intersection) Now supports all command line styles.
11560         (ps_text_get_size) Bug fix in computation of em width.
11561         (text) New function, the meat behind ps_text_metrics and
11562         ps_text_draw.  Not complete.
11563         (ps_text_metrics, ps_text_draw) Removed the stub taken from
11564         ascii.c; call text().
11565
11566 Sat Aug 10 23:28:17 1996  Ben Pfaff  <blp@gnu.org>
11567
11568         * arena.c: (arena_free) Assert that the argument is non-NULL.
11569         
11570         * groff-font.c: (add_kern) Calls arena_free() for old_kern if and
11571         only if old_kern is non-NULL.
11572
11573         * postscript.c: (ps_init_driver) Changed default line width to 1
11574         point.
11575         (postopen) New prologue variables.
11576         (ps_line_horz, ps_line_vert, ps_line_intersection) Implements some
11577         more of the common line styles properly, but not all.
11578         (ps_text_metrics) Fixed problem with this stubbed out version that
11579         kept it from taking font sizes into account.
11580
11581 Thu Aug  8 22:31:11 1996  Ben Pfaff  <blp@gnu.org>
11582
11583         * arena.c: (arena_malloc) Bug fix.
11584         (arena_dump) [GLOBAL_DEBUGGING] New function.
11585
11586         * ascii.c: Comment fix.
11587         (count_fancy_chars, delineate) Now static functions.
11588         
11589         * filename.c: (interp_vars) Bug fixes.
11590
11591         * font.h: Comment fixes.
11592
11593         * glob.c: (init_glob) Sets set_viewwidth, set_viewlength at
11594         beginning in case we have an error message to display before
11595         initializing the display.
11596
11597         * groff-font.c: Comment fix.  Changed rehash threshold from 2/3
11598         full to 1/2 full.
11599         (groff_read_font) Bug fixes.
11600         (name_to_index) Increments hash.used.  Sets `name' field of hash
11601         entry properly.
11602         (add_kern) Sets kern_max_used after rehashing.  Other bug fixes.
11603
11604         * hash.c: Return type changed.
11605
11606         * postscript.c: Continued development.  Now marks lines on the
11607         paper, but very buggy.
11608
11609 Sat Aug  3 20:50:35 1996  Ben Pfaff  <blp@gnu.org>
11610
11611         * Changed comments in many source files from `/* xxx /* yyy */' to
11612         `/* xxx */ /* yyy */' for cleanliness.
11613
11614         * arena.c: (arena_sd_strdup) New function.
11615         
11616         * ascii.c: (struct ascii_driver_ext) New member `file'.
11617         (ascii_init_driver) Fills out member `file' for initing; uses
11618         close_file_ext for closing drivers.
11619         (ascii_option) Changed %.*s back to %s because the a_string's are
11620         always null-terminated.
11621         (postopen, preclose) New functions.
11622         (ascii_open_page) Uses new style of open_file_ext.
11623         (ascii_option, commit_line_buf, output_lines) Use ext->file.file
11624         instead of this->output.
11625         (__assert_fail) Removed.
11626
11627         * cmdline.c: Changed syntax_message[].
11628
11629         * error.c: #include's <readline/history.h> only if the history
11630         library is available, not if just the readline library is
11631         available.
11632
11633         * filename.c: (expand_line) Removed alloca() support.
11634         (interp_vars) No longer tilde-expands argument.  Limit on output
11635         length removed.
11636         (tilde_expand) Now treats argument as path rather than filename.
11637         [!unix] Now is a no-op function.
11638         (search_path) Better verbose message formatting.
11639         (open_file, close_file) Comment fixes.
11640         (close_file) [!unix] Doesn't bother with pipes.
11641         (open_file_ext) Completely rewritten, interface revamped.
11642         (close_file_ext) New function.
11643
11644         * font.h: Comment changes.
11645
11646         * frequencies.q: Removed AIX alloca support since it doesn't use
11647         alloca.
11648
11649         * hash.c: Comment changes & additions.
11650         (hsh_create) Initializes entire table instead of first M entries.
11651         (hsh_probe) Stupid bug fixed.  Now it works.
11652         (hsh_dump) [GLOBAL_DEBUGGING] New function.
11653
11654         * main.c: (parse) Detects EOF properly in token-eating loop.
11655         Should the STOP token have its value changed to 0?
11656
11657         * misc.c: (blp_getdelim) [HAVE_GETDELIM] Now it's a macro.
11658         (blp_getline) Now it's a macro.
11659
11660         * output.h: (struct outp_driver) Removed members output, filename.
11661         
11662         * output.c: (outp_init) [!NO_POSTSCRIPT] Installs PostScript
11663         drivers in driver table.
11664         (outp_read_devices) Frees buf.  Warns if there are no active
11665         output drivers.
11666         (outp_configure_clear) Sets outp_configure_vec to NULL after
11667         deleting its elements.
11668         (configure_driver, destroy_driver) Removed references to output,
11669         filename members of outp_driver.
11670         (outp_evaluate_dimension, internal_get_paper_size,
11671         outp_get_paper_size) New functions.
11672
11673         * postscript.c: Continued development.  Now links but doesn't make
11674         any marks on the page.  Lotsa bugs I suppose.
11675
11676         * str.c: (strcasecmp) [!HAVE_STRCASECMP] New function.
11677
11678         * str.h: Comment changes.
11679
11680 Sat Jul 27 22:32:38 1996  Ben Pfaff  <blp@gnu.org>
11681
11682         * Removed dependencies on non-nested comments in several files.
11683         Also removed references to (unix || __unix__) in #if's since
11684         prefh.orig makes those two equivalent.
11685         
11686         * ascii.c: (ascii_open_global) Creates ascii_arena.
11687         (ascii_close_global) Destroys ascii_arena.
11688         (ascii_init_driver) Doesn't create ascii_arena.
11689         (ascii_copy_driver) Removed.
11690         (ascii_option) Possible bugfix regarding %s vs. %.*s with a_string's.
11691         (outp_class ascii_class) Removed ascii_copy_driver reference.
11692
11693         * frequencies.q: Now can display all statistics except median.
11694         Still not finished.
11695
11696         * output.c: Handles outp_class.ref_count so output class
11697         destructors are called properly.
11698         (add_class) Sets ref_count to 0.
11699         (configure_driver) Initializes class if ref_count++ is 0.
11700         (destroy_driver) Destructs class if --ref_count is 0.  Frees the
11701         class output file name.
11702         
11703         * output.h: (struct outp_class) Removed copy_driver, inited.
11704         Added ref_count.
11705
11706         * postscript.c: Completely replaced but not finished.
11707         
11708 Tue Jul 23 21:48:36 1996  Ben Pfaff  <blp@gnu.org>
11709
11710         * approx.h: #includes <float.h>.
11711
11712         * arena.h, arena.c: Many functions changed to take an arena **
11713         instead of an arena *, for consistency.  All callers changed.
11714         (arena_alloc) Now creates a new arena if passed *A that is NULL.
11715         (arena_destroy) Sets *A to NULL.
11716         
11717         * ascii.c: (delineate) Implements OUTP_T_VERT correctly.  Removed
11718         assertion that `width' be positive.
11719
11720         * command.c: Removed #if's from cmd_table.
11721         (walk_cmdtable_func) [0] New function (debug code).
11722         (init_cmd_parser) [0] Dumps out cmd_table (debug code).
11723         (parse_cmd) Doesn't return failure for unimplemented commands.
11724
11725         * common.h: (SYSMIS) Changed from DBL_MAX to -DBL_MAX.
11726         (SYSCODE) New constant macro.
11727
11728         * descript.q: Checks for positive n_variables before performing
11729         analysis.
11730
11731         * file-handle.q: (get_handle_by_filename) Bug fix: passes &f to
11732         avl_find instead of &fp as arg 2.
11733
11734         * frequencies.g, frequencies.q: Continued updating; now compiles &
11735         works again, but not complete.
11736
11737         * main.c: Changes to user messages.
11738
11739         * misc.c: (reverse) [0] New function.
11740
11741         * settings.h: Comment removed.  #includes "common.h".
11742
11743         * som.c: (som_set_null) New function.
11744         (som_set_value, som_set_string, som_set_text) More detailing
11745         assertions.
11746         (som_set_float) Implemented function.
11747         (dump_columnated_table) Bug fix regarding page breaks.
11748         (draw_cell) Bug fix regarding text that spilled out of a cell.
11749         (draw_intersection, draw_horz_rule, draw_vert_rule) No longer draw
11750         null lines.
11751         (get_cell_size) Support SCON_EMPTY cells.
11752         (get_table_size) When calculating rules' widths and heights, mask
11753         out SLIN_SPACING bit.  Added SOPT_X_HLTL support.
11754         
11755         * som.h: (som_any_cell) New option SOPT_X_HTLT.  Removed
11756         SOPT_X_SHADE.
11757         (struct som_submission_form) New member `header'; all users
11758         changed.
11759
11760         * val-labs.c: (get_label) User messages changed.
11761
11762         * var.h: Changed FREQUENCIES structures.
11763
11764         * vars-atr.c: (is_num_user_missing, is_str_user_missing) Made
11765         inline.
11766         
11767 Fri Jul 19 19:11:13 1996  Ben Pfaff  <blp@gnu.org>
11768
11769         * approx.h: Definition of EPSILON now depends on system's
11770         DBL_EPSILON.  Removed GNU C specific code.
11771         (cmpapx) Renamed approx_compare.
11772
11773         * frequencies.g, frequencies.q: Continued updating; still doesn't
11774         compile.
11775
11776         * groff-font.c: (name_to_index) Fix bug that kept it from
11777         compiling.
11778
11779         * hash.c, hash.h: Completed work.
11780
11781         * var.h: Changes to freq_tab, frequencies_proc.
11782         
11783 Wed Jul 17 21:23:36 1996  Ben Pfaff  <blp@gnu.org>
11784
11785         New hashing code.
11786         * hash.c, hash.h: New files.  Not completed.
11787         * Makefile.am: Added hash.c to source file list.
11788         * font.h: (struct font_desc) New member kern_size_p.
11789         * groff-font.c: Uses hash.h.
11790         (hashpjw) Moved to hash.c.
11791         (next_prime_power) Rewrote, renamed hsh_next_prime, moved to
11792         hash.c.
11793         (static var hash) New member size_p.
11794         * var.h: Includes hash.h.
11795         (struct freq_tab) Changed AVL_TREE to hash_tab.
11796
11797         * vars-prs.c: Comment, formatting fixes.
11798
11799         * frequencies.g, frequencies.q: Continued updating.  Not yet
11800         working.
11801
11802         * formats.c: Bug fix.
11803
11804 Tue Jul 16 22:10:04 1996  Ben Pfaff  <blp@gnu.org>
11805
11806         Increasing parallelism between DESCRIPTIVES and FREQUENCIES.
11807         * descript.g: Comment fixes.
11808         * descript.q: Comment fixes.  Moved some declarations into var.h.
11809         Made dsc_info a static table.  Updated FIXMEs.
11810         (internal_cmd_descriptives) Beautified.
11811         
11812         * frequencies.q: Started updating into working order.
11813         * frequencies.g: New file analogous to descript.g.
11814         * var.h: Comment fixes.  Added structures for FREQUENCIES.
11815         
11816         * som.c: Removed vestiges of crushing and partial table support.
11817
11818 Sun Jul 14 15:45:31 1996  Ben Pfaff  <blp@gnu.org>
11819
11820         * Many more changes to som.c especially, but these will not be
11821         documented as I have resolved to remove them.  This patchlevel is
11822         being released solely so that I can fall back to it if I decide
11823         that removing the changes is not a good idea.
11824
11825 Sat Jul 13 09:58:44 1996  Ben Pfaff  <blp@gnu.org>
11826
11827         * som.c: (global var som) New member `cum_y'.
11828         (build_target) Properly handles titles for partial tables.
11829         (dump_partial_beg, dump_partial_mid, dump_partial_end)
11830         Merged into single new function dump_partial().  Fixed problem
11831         with titles on partial tables.
11832         (dump_table) Calls dump_partial() for all parts of partial tables.
11833         (dump_page) Criteria for drawing title changed.
11834         
11835 Fri Jul 12 22:03:36 1996  Ben Pfaff  <blp@gnu.org>
11836
11837         * command.c: (cmd_table) Added LIST, WEIGHT.
11838
11839         * command.c: (cmd_remark) No longer frees `s' since it's not
11840         dynamically allocated.
11841         
11842         * data-out.c: (convert_f) Now correctly handles the case where
11843         abs(v->f)<1 but v->f rounds to a value of 1.00 given the specified
11844         number of decimals.
11845         (som_destroy_all_tables) Removed argument.  All callers changed.
11846         (som_vline, som_hline) Argument validity checking corrected.
11847         (som_set_value) Implemented half-heartedly.
11848         (replicate_table) Copies tables piece-by-piece when using Checker.
11849
11850         * som.h: New line style SLIN_1THIN, currently equivalent to
11851         SLIN_0.  New enum set SOM_SUB_*.
11852         (struct som_submission_form) Removed `seq_no'.  Added `type'.
11853         
11854         * list.q: Newly working file; uses partial tables.
11855         
11856         * som.c: (som_reduce_table) Renamed som_set_table_height().
11857         (som_crush) Removed argument `group'.
11858         (global var som) Removed `nt', `seq_no'.  Added `type'.
11859         (som_submit_table) Arguments changed.
11860         (output_table) Removed partial table code.
11861         (build_target) New arg; partial table support added.  All callers
11862         changed.
11863         (dump_plain_table) Removed partial table code.
11864         (dump_partial_beg, dump_partial_mid, dump_partial_end) New functions.
11865         (dump_table) Supports partial tables.
11866         (dump_page) New argument to allow not drawing top and/or bottom
11867         headers.  All callers changed.  Supports partial tables.
11868
11869 Sat Jul  6 22:22:25 1996  Ben Pfaff  <blp@gnu.org>
11870
11871         * data-out.c: Changed `#include <approx.h>' to `#include
11872         "approx.h".
11873         (convert_F) Comment fix.  Now won't print `-.000', etc.
11874
11875         * descript.q: Now Z-scores work, although there appears to
11876         be a bug (which might actually be in data-out.c:convert_F()).
11877         (descriptives_trns_proc, descriptives_trns_free) New functions.
11878         (run_z_pass) Implemented.
11879         
11880         * var.h: Comment fixes.
11881         (dsc_z_score, descriptives_trns) New structs.
11882         (descriptives_trns) Added to any_trns as `dsc'.
11883
11884         * error.c, error.h: New error class, IS (Installation Script
11885         error), used in those instances where the error is in the
11886         installation, but there is a script file or installation file that
11887         can be usefully referred to.
11888         
11889         * output.c: Change many IE classes to IS classes.
11890
11891         * cases.c, command.c, common.c, crosstabs.q, expr-evl.c,
11892         frequencies.q, list.q, vars-prs.c, vfm.c: Removed reference to
11893         HAVE_MALLOC_H because Borland C++ alloca() is broken, so why
11894         include the corresponding header?
11895         
11896         * glob.c: (init_glob) Don't malloc term_buffer under Checker.
11897         Don't bail out if termcap can't be read.
11898
11899         * som.c: (som_destroy_table) Removed.
11900         (som_reduce_table, som_destroy_all_tables) New functions.
11901         (som_crush) New function, not implemented.
11902         
11903         * som.h: New table option STAB_CRUSH.  Comment fix.  New struct
11904         som_submission_form.  Function prototypes revised.
11905
11906         Outputting huge tables (1000s of rows) a few rows at a time
11907         is supported, though untested.  May even break everything.
11908         Actually, the code doesn't even compile right now.
11909         * som.c: (struct som) New fields htv, nt, seq_no.
11910         (som_submit_table) Multiple arguments changed to a single
11911         pointer to struct submission_form.  Only increments subtable_num
11912         if seq_no is zero.  Only destroys table if it's not going to
11913         be reused.
11914         (replicate_table) New function.
11915         (output_table) Comment fix.
11916         (examine_table) Changed inline code to code calling
11917         replicate_table().  Calculates htv.  Supports partial tables.
11918         (draw_title) Removed comment.
11919         (build_target) Only allows for title on first part of partial
11920         tables.
11921         (dump_plain_table) Only resets table chunk number on first part
11922         of partial tables; FIXME: doesn't work quite right.  Supports
11923         partial tables.
11924         (dump_page) Titles only on first part of partial tables.
11925
11926 Fri Jul  5 20:16:19 1996  Ben Pfaff  <blp@gnu.org>
11927
11928         * Thanks to an unreliable IDE hard drive, I have spent the last
11929         day reconstructing my Debian GNU/Linux installation and redoing
11930         the previous day's changes--somehow I managed to save every file
11931         except for output.c and output.h.  So the following changes could
11932         really be considered independent of the output.c, output.h changes
11933         from Jul 4.
11934
11935         * output.h, output.c: Moved the outp_configure_vec global var,
11936         outp_names struct, and enum set OUTP_S_* from output.h to output.c.
11937         outp_configure_vec is now static.
11938         
11939 Thu Jul  4 20:20:24 1996  Ben Pfaff  <blp@gnu.org>
11940
11941         * The entire philosophy behind configuration of the output drivers
11942         changed.  Now there is a termcap-type configuration where drivers
11943         to be read are determined beforehand, rather than parsing the
11944         entire output init file and storing it in memory & deciding what
11945         to actually use later.  Faster & more memory-efficient at the same
11946         time, cool.
11947         
11948         * output.c: Comment fix.  Removed outp_init_drivers global var.
11949         Removed all references to synonyms.  New structure outp_defn.  New
11950         global vars outp_macros, outp_configure_vec.
11951         (search_name, delete_name, add_name, check_configure_vec,
11952         expand_name, find_defn_value) New static functions.
11953         (outp_configure_clear, outp_configure_add, outp_configure_macro,
11954         outp_read_devices) New extern functions.
11955         (outp_init) Much functionality moved into outp_read_devices.
11956         (outp_read_devices) Format of output init file changed; name of
11957         file is `devices' rather than `output' to avoid Makefile
11958         conflicts.
11959         (outp_clear) Renamed outp_done.
11960         (outp_list_classes) Bug fix, cleaned up.
11961         (outp_list_drivers) Not implemented anymore.
11962         (outp_configure_driver) Now a static function; simplified; now
11963         interpolates macros; supports new structure.
11964         (outp_enable_driver, match_synonym) Removed; all references
11965         removed.
11966         (find_driver) First argument removed.
11967         
11968         * output.h: Global var outp_init_drivers removed; new structure
11969         outp_names; new enum set OUTP_S_*; new global var
11970         outp_configure_vec; function prototypes for output.c exports
11971         updated.
11972         
11973         * main.c: (main) Calls outp_read_devices() after parsing the
11974         command line.
11975         
11976         * cmdline.c: (parse_command_line) New option -v --verbose;
11977         --version changed to -V.  --device option changed syntax to just
11978         take a single device name.  Accepts key=value declaration of
11979         output init file macros.  Syntax message updated.
11980
11981         * filename.c: (expand_line) New function.
11982         (interp_environ_vars) Renamed interp_vars; no longer uses
11983         fixed-size buffer.
11984         (blp_getenv) Allows $ARCH and $VER pseudo-environment-vars to be
11985         overridden by real environment vars.
11986         (search_path) Uses verbose_msg() instead of #ifdef'd printf().
11987         * filename.h: interp_environ_vars() renamed interp_vars().
11988         
11989         * error.c, error.h: Added extern variable `verbosity', message
11990         class MM.
11991         
11992         * error.c: (vmsg) Support message class MM.
11993         (verbose_msg) New function.
11994
11995         * descript.q: (generate_z_varname) Bug fix in generation of
11996         Z-score varnames.
11997         (dump_z_table) Bug fix in column headers.
11998         
11999         * ascii.c: (ascii_init_driver) Changed minimum number of lines per
12000         page from 29 to 15.  Don't set a default for ops[OPS_INIT,
12001         OPS_DONE].  Writes the uninit string when the driver is closed.
12002         (ascii_open_page) Write the init string before the first page.
12003         (output_shorts) Form of main loop changed from `while' to `for'.
12004         Bug fix with overstrikes: the character is printed *after* the
12005         backspace.  Eliminated a lot of `& 0xff' modifiers.
12006         (advance_to_left_margin) New function.
12007         (return_carriage, output_lines) Handle left margin.
12008
12009 Thu Jul  4 00:35:59 1996  Ben Pfaff  <blp@gnu.org>
12010
12011         * ascii.c: New option `carriage-return-style'.
12012
12013         * ascii.c: (count_fancy_chars) New function.
12014         (delineate, text_metrics) Use new function; bug fixes regarding
12015         rich text strings.
12016         (text_draw) Bug fix with rich text.
12017         (output_string, output_shorts) Reordered.
12018         (output_shorts) Now handles boxchars and some overstrike font
12019         changes.
12020         (output_char, return_carriage) New functions.
12021         (output_lines) Now handles overstriking and font changes properly;
12022         some code moved to output_shorts.
12023
12024 Tue Jul  2 22:13:23 1996  Ben Pfaff  <blp@gnu.org>
12025
12026         [GLOBAL_DEBUGGING]
12027         * ascii.c: New member `debug' in ascii_driver_ext.
12028         (ascii_init_driver, delineate) Uses new member.
12029
12030         Now you can set a vertical height on writing text.
12031         * ascii.c: (delineate) Keeps track of vertical position.
12032         (text_draw) No longer considers fully justified text an internal
12033         error.
12034         
12035         * output.h: New flag OUTP_T_VERT; other OUTP_T_ values changed.
12036
12037         Tables' titles are drawn; they can have variable height.
12038         * som.c: `som' struct has new member, title_height.
12039         (draw_title) New argument.  Moved within file.  All caller
12040         changed.
12041         (build_target) New argument, amount of space needed for first row.
12042         Calculates height of title, takes that into account.  All callers
12043         changed.
12044         (dump_plain_table, dump_columnated_table) Took calculation of y1,
12045         y2 out of loop.
12046         (dump_columnated_table) [GLOBAL_DEBUGGING] Debugging code
12047         improved.
12048         (dump_columnated_table) Organized for readability.
12049         (dump_page) Makes use of som.title_height.
12050
12051         * som.c: Many comment bug fixes.
12052
12053         * descript.q: (try_name, generate_z_name) Bug fix regarding
12054         generation of Z-score variable names.
12055         * var.h: Removed num from descriptives_proc; all referents removed.
12056
12057 Mon Jul  1 22:13:39 1996  Ben Pfaff  <blp@gnu.org>
12058
12059         * ascii.c: (ascii_line_horz, ascii_line_vert,
12060         ascii_line_intersection) Added debugging code.
12061
12062         Added a descriptive line above each table to describe it.
12063         * command.c: (parse_cmd) Calls som_new_series.
12064         
12065         * som.c: New static vars table_num, subtable_num.  New `som'
12066         member `title'.
12067         (dump_page) New arguments.
12068         (som_submit_table) Handle new variables.
12069         
12070         * som.c, som.h: (som_submit_table) New arguments.  All callers
12071         changed.
12072         (som_new_series) New function.
12073         (build_target) Makes room for extra line.
12074         (draw_title) New function.
12075         (dump_page) Calls draw_title.  Bug fix: doesn't always set
12076         som.ext->cp to 0.
12077         
12078         Columnation of tables support.
12079         * som.h: Deleted fr, lr, ri from som_table.  Reorganized.
12080         
12081         * som.c: Deleted references to fr, lr, ri.
12082         (som_columnate) Bux fix: sets group member of table.
12083         (som_add_options) Function removed.
12084         (dump_table) Split into three functions; extensively reworked.
12085         
12086         * descript.q: (dump_z_table) Better output table formatting; added
12087         title support to correspond to som.h changes.
12088         (display) Title support.
12089
12090         * output.h: Added OUTP_T_NONE.
12091         
12092 Mon Jul  1 13:00:00 1996  Ben Pfaff  <blp@gnu.org>
12093
12094         * descript.q: Improved handling of Z scores; still not perfect.
12095         
12096         * output.h, ascii.c: Added hook for getting em width of current
12097         font.
12098         
12099         * som.c: Uses new em-width hook.  Added debugging code to
12100         several functions.
12101         (som_columnate) New argument.
12102         (som_add_options) Removed.
12103
12104 Jun 29 17:40:47 1996  Ben Pfaff  <blp@gnu.org>
12105
12106         * som.h, som.c, output.c, output.h, ascii.c: Updated to work with
12107         rules as a property of the table instead of as a property of the
12108         cells.
12109         
12110         * ascii.c: Added `header' to table of options.
12111         
12112         * descript.q: Added even shorter statistic names; modified to work
12113         with new som interface.
12114         
12115         * misc.c (blp_getdelim): Bug fix.
12116         
12117         * version.c: includes 'conf.h'.
12118         
12119 ----------------------------------------------------------------------
12120 Local Variables:
12121 mode: change-log
12122 version-control: never
12123 End: