Remove >>> conflict markers.
[pspp-builds.git] / src / ChangeLog
1 Sun May  1 23:00:19 2005  Ben Pfaff  <blp@gnu.org>
2
3         * var-display.c: (cmd_variable_alignment) Fix memory leak.
4         (cmd_variable_level) Ditto.
5
6 Sun May  1 22:49:04 2005  Ben Pfaff  <blp@gnu.org>
7
8         Hash table had buggy deletion function.  The fix required changing
9         other functions to do probing in the required order.
10
11         * hash.c: (locate_matching_entry) Rewrite and change interface.
12         (hsh_rehash) Rewrite to use locate_matching_entry().
13         (hsh_probe) Ditto.
14         (hsh_find) Ditto.
15         (hsh_delete) Ditto.  Also, fix stupid bugs.
16
17 Sun May  1 22:24:58 2005  Ben Pfaff  <blp@gnu.org>
18
19         * dictionary.c: (dict_clone) Properly copy vectors.
20
21 Sun May  1 22:07:58 2005  Ben Pfaff  <blp@gnu.org>
22
23         New implementation of long variable names.  Each variable has a
24         "normal" name, which may be up to 64 bytes long and which is used
25         for all normal operations.  Variables may have a "short" name,
26         which is limited to 8 bytes and used only for system and portable
27         file input and output.
28         
29         Make tokid case-preserving.  Update most uses of tokid to treat it
30         case-insensitively.
31
32         Update many commands to deal with long variable names.
33
34         * autorecode.c: (cmd_autorecode) Use strcasecmp() instead of strcmp().
35
36         * command.c: (cmd_parse) Ditto.
37         (match_strings) Use toupper() before comparing characters.
38         (conflicting_3char_prefixes) Use mm_case_compare() instead of
39         memcmp().
40         (cmd_match_words) Ditto.
41
42         * compute.c: (lvalue_parse) Use st_trim_copy() instead of
43         strncpy().
44
45         * count.c: (struct cnt_var_info) Change n[] to fit long var name.
46         Use st_trim_copy() instead of strcpy().
47
48         * data-in.c: (parse_enum) Use mm_case_compare() instead of
49         memcmp().
50
51         * data-list.c: (struct dls_var_spec) Change name[] to fit long var
52         name.
53         (parse_free) Use st_trim_copy() instead of strcpy().
54
55         * descript.c: (struct dsc_var) Change z_name[] to fit long var
56         name.
57         (try_name) Use strcasecmp() instead of strcmp().
58         (generate_z_varname) Use st_trim_copy() instead of strcpy().
59         (descriptives_compare_dsc_vars) Use strcasecmp() instead of
60         strcmp().
61
62         * dictionary.c: (struct dictionary) Removed `long_name_tab'
63         member.
64         (compare_long_names) Removed.
65         (hash_long_name) Removed.
66         (dict_create) Don't initialize `long_name_tab' member.
67         (dict_clone) Copy short names into new dictionary. 
68         (dict_clear) Don't clear `long_name_tab' member.
69         (dict_get_varname_block) Removed.
70         (dict_add_longvar_entry) Removed.
71         (free_nte) Removed.
72         (dict_destroy) Don't destroy `long_name_tab' member.
73         (dict_create_var_from_short) Removed.
74         (dict_create_var_x) Removed.
75         (dict_create_var) Get rid of longname handling.
76         Clear short name.
77         (dict_clone_var) Get rid of longname parameter and longname
78         handling.
79         (dict_lookup_var) Get rid of longname handling.
80         (dict_reorder_var) New function.
81         (dict_rename_var) Clear short name.
82         (dict_rename_vars) Get rid of longname handling.  Clear short
83         names.
84         (dict_create_vector) Support long vector names.
85         (dict_lookup_vector) Use strcasecmp() instead of strcmp().
86         (quasi_base27) Removed.
87         (make_short_name) Removed.
88         (compare_strings) New function.
89         (hash_string) New function.
90         (dict_assign_short_names) New function.
91
92         * file-handle.q: (get_handle_with_name) Use strcasecmp() instead
93         of strcmp().
94         (get_handle_for_filename) Support long handle names.
95
96         * file-type.c: (struct col_spec) Make `name' fit long var names.
97         (cmd_file_type) Use strcasecmp() instead of strcmp().
98
99         * flip.c: (make_new_var) Rewrite.
100         (flip_sink_write) Use st_trim_copy() instead of strncpy().
101
102         * format.c: (parse_format_specifier_name) Use mm_case_compare()
103         instead of memcmp().
104
105         * get.c: (cmd_save_internal) Rephrase.
106         (rename_variables) Drop test for identical variable name.
107         (struct mtf_proc) Change `first', `last' to fit long var name.
108
109         * hash.c: (hsh_hash_case_string) New function for case-insensitive
110         string hashing.
111
112         * lexer.c: (restore_token) Use st_trim_copy() instead of
113         strncpy().
114         (lex_get) Don't uppercase string when copying into tokid.
115         (lex_put_back_id) Use st_trim_copy() instead of
116         strncpy().
117
118         * list.q: (determine_layout) Consider length of variable names in
119         choosing vertical layout.
120
121         * matrix-data.c: (cmd_matrix_data) Use strcasecmp() instead of
122         strcmp().
123         (string_to_content_type) Ditto.
124
125         * modify-vars.c: (compare_variables_given_ordering) Ditto.
126         (struct var_renaming) Change `new_name' to fit long var name.
127         (compare_var_renaming_by_new_name) Use strcasecmp() instead of
128         strcmp().
129
130         * pfm-read.c: (read_variables) Disallow system variables in system
131         files.
132         (write_variables) Call dict_assign_short_names() and use
133         short_name[] members.
134
135         * repeat.c: (internal_cmd_do_repeat) Use strcasecmp() instead of
136         strcmp().
137
138         * sfm-read.c: (sfm_open_reader) Rewrite code for long variable
139         map.  Reorder variables into same order as long variable map.
140         (read_variables) Set short name.
141
142         * sfm-write.c: (sfm_open_writer) Call dict_assign_short_names().
143         (write_variable) Use st_bare_pad_copy().
144         (write_longvar_table) Rewrite.
145
146         * str.c: (mm_case_compare) New function.
147
148         * sysfile-info.c: (compare_vectors_by_name) Use strcasecmp()
149         instead of strcmp().
150
151         * t-test.q: (tts_custom_groups) Remove redundant test.
152         (tts_custom_pairs) Ditto.
153
154         * var.h: (struct variable) Change `name' to fit long var names.
155         Remove `longname'.  Add `short_name' member.  Reorder some
156         variables.
157         (struct name_table_entry) Removed.
158         (struct vector) Change `name' to fit long vector names.
159
160         * vars-atr.c: (var_is_valid_name) Allow long var names.
161         (compare_var_names) Use strcasecmp() instead of strcmp().
162         (compare_var_ptr_names) Ditto.
163         (hash_var_name) Use hsh_hash_case_string().
164         (hash_var_ptr_name) Ditto.
165         (var_set_short_name) New function.
166         (var_clear_short_name) New function.
167         (var_set_short_name_suffix) New function.
168
169         * vars-prs.c: (parse_DATA_LIST_vars) Support long names.
170         Use strcasecmp() instead of strcmp().
171         (struct array_var_set) Removed `longname_tab'.
172         (array_var_set_lookup_var_idx) Drop longname_tab support.
173         (array_var_set_destroy) Don't destroy `longname_tab'.
174         (var_set_create_from_array) Don't create `longname_tab'.
175
176         * vector.c: (cmd_vector) Use strcasecmp() instead of strcmp().
177         Support long names.
178
179         * expressions/parse.c: (word_matches) Use mm_case_compare()
180         instead of memcmp().
181         (compare_strings) New function.
182         (lookup_function) Use compare_strings() instead of strcmp().
183         
184 Sun May  1 22:07:43 2005  Ben Pfaff  <blp@gnu.org>
185
186         * algorithm.c: (move_element) New function.
187
188 Sun May  1 22:05:35 2005  Ben Pfaff  <blp@gnu.org>
189
190         * aggregate.c: (parse_aggregate_functions) Always initialize
191         destvar.
192
193 Sun May  1 22:03:47 2005  Ben Pfaff  <blp@gnu.org>
194
195         * aggregate.c: (cmd_aggregate) Use dict_clone_var_assert().
196
197         * dictionary.c: (dict_clone) Ditto.
198         (dict_clone_var_assert) New function.
199
200         * get.c: (mtf_merge_dictionary) Use dict_clone_var_assert().
201
202 Sun May  1 15:05:54 WST 2005 John Darrington <john@darrington.wattle.id.au>
203
204         * error.c: Added a string for the compiler version to the
205         request_bug_report_and_abort function.
206
207         * groff_font.c, font.c: Removed manpage(1) style references from 
208         comments, because RMS frowns upon them.
209
210 Thu Apr 28 18:52:06 2005  Ben Pfaff  <blp@gnu.org>
211
212         * expressions/parse.c: Improve previous fix for PR 12858 (LAG).
213
214 Fri Apr 29 09:28:00 WST 2005 John Darrington <john@darrington.wattle.id.au>
215
216         * expressions/parse.c: Added handler for OP_LAG_Vn and OP_LAG_Vs.  
217         Fixed bug [#12858] .
218
219 Wed Apr 27 12:42:34 WST 2005 John Darrington <john@darrington.wattle.id.au>
220
221         * loop.c recode.c repeat.c: Fixed a couple of instances of SHORT_NAME_LEN 
222         which should be LONG_NAME_LEN
223
224 Wed Apr 27 07:43:50 WST 2005 John Darrington <john@darrington.wattle.id.au>
225
226         * command.def echo.c:  Added the ECHO command.
227
228 Mon Apr 25 22:55:59 2005  Ben Pfaff  <blp@gnu.org>
229
230         Finish fixing MATCH FILES (PR 11677).
231
232         * get.c: (trim_dictionary) Rewrite in terms of drop_variables(),
233         keep_variables(), rename_variables().
234         (drop_variables) New function.
235         (keep_variables) New function.
236         (struct mtf_file) Rename `in' to `in_name'.  Add `in_var'.
237         (cmd_match_files) Deal with in_var.  Use drop_variables(),
238         keep_variables().  When IN is specified, require BY.  Set master
239         variables after master dictionary is complete.  Add IN variables
240         after master dictionary is complete.
241         (mtf_free_file) Free `in_name'.
242         (mtf_delete_file_in_place) Set in_var value to 0.
243         (mtf_read_nonactive_records)  Rephrase.
244         (mtf_processing) Support IN.  Rephrase.  Fix bugs.
245         (mtf_merge_dictionary) Don't set master variables; we do that
246         later now.
247         (get_master) Don't insist that there's a master variable.
248         
249 Mon Apr 25 22:55:22 2005  Ben Pfaff  <blp@gnu.org>
250
251         Kluge to make some variable renaming sort of work.
252         Needs real fix.
253
254         * dictionary.c: (dict_rename_var) Call dict_add_longvar_entry().
255
256 Mon Apr 25 22:52:28 2005  Ben Pfaff  <blp@gnu.org>
257
258         Add functions for comparing sets of variables between cases.
259         Use the functions.
260
261         * case.c: (case_compare) New function.
262         (case_compare_2dict) New function.
263         
264         * aggregate.c: (struct agr_proc) Remove `prev_break' member.  Add
265         `break_case'.
266         (cmd_aggregate) Nullify break_case.  Don't call
267         initialize_aggregate_info().
268         (agr_destroy) Destroy break_case.
269         (aggregate_single_case) Rewrite.  Use case_compare().
270         (dump_aggregate_info) Copy from break_case into output.
271         (initialize_aggregate_info) Copy break_case from input.
272
273         * get.c: (mtf_compare_BY_values) Use case_compare_2dict().
274
275         * vfm.c: (equal_splits) Use case_compare().
276
277 Sat Apr 23 17:01:04 WST 2005 John Darrington <john@darrington.wattle.id.au>
278
279         * dictionary.c vars-prs.c sfm-write.c: Fixed some memory leaks
280
281 Sun Apr 17 23:08:15 2005  Ben Pfaff  <blp@gnu.org>
282
283         Start work on fixing MATCH FILES.
284
285         * get.c: (enum operation) Remove OP_MATCH.
286         (trim_dictionary) Change return value to bool.  Don't support
287         OP_MATCH.
288         (struct mtf_file) Remove `first', `last' members.
289         (struct mtf_proc) Add `first', `last' members.  Change mtf_case
290         from `struct ccase *' to `struct ccase'.  Remove `by' member.
291         (cmd_match_files) Essentially rewrite.
292         (mtf_free) Don't free `by' member.  Destroy `mtf_case' member.
293         (mtf_read_nonactive_records) mtf_ parameter is not unused.
294         (mtf_processing) Ditto.  Also rephrase some code.
295         (mtf_merge_dictionary) Rewrite for easy comprehension.  
296
297 Sun Apr 17 23:06:00 2005  Ben Pfaff  <blp@gnu.org>
298
299         * matrix-data.c: (wr_output_data) [DEBUGGING] Fix compilation
300         error.
301
302         * q2c.c: (dump_token) [DEBUGGING] Fix compilation error.
303         
304 Thu Apr 14 2005 John Darrington
305
306         * var-display.c: New file.
307
308         * format.h var.h sfm-read.c sfm-write.c dictionary.c :  Added 
309           display_width, measure and alignment parameters to variables.
310
311         * aggregate.c command.def compute.c count.c data-list.c descript.c
312           dictionary.c dictionary.h expr-prs.c file-type.c flip.c get.c 
313           lexer.c lexer.h loop.c modify-vars.c pfm-read.c recode.c repeat.c 
314           sfm-read.c sfm-write.c sfm-write.h sfmP.h val-labs.c val.h var.h 
315           vars-prs.c vector.c :  
316               - Replaced literal constants representing maximum variable name 
317                 length with macro definitions. 
318               - Added support for long variable names.
319               - Changed lexer such that it no longer makes tokens upper
320                 case, but relies upon case insensitive behaviour of commands.
321
322 Mon Apr  4 22:27:34 2005  Ben Pfaff  <blp@gnu.org>
323
324         * aggregate.c: (parse_aggregate_functions) If dict_create_var()
325         fails, don't dereference the resulting null pointer (PR 12427).
326         Also, fix double free error.
327
328 Sat Mar 19 23:06:02 2005  Ben Pfaff  <blp@gnu.org>
329
330         * aggregate.c: (parse_aggregate_functions) Fix N_NO_VARS format.
331         (accumulate_aggregate_info) Set int1 to 1 for SUM.
332         (dump_aggregate_info) Only make SUM non-missing if there was at
333         least one variate.
334
335 Sat Mar 19 14:48:19 2005  Ben Pfaff  <blp@gnu.org>
336
337         * aggregate.c: (dump_aggregate_info) Properly test whether the
338         destination variable is numeric, when making the result
339         system-missing for columnwise missing values.
340
341 Mon Mar 14 21:52:34 2005  Ben Pfaff  <blp@gnu.org>
342
343         * misc.h: Remove GCC specializations.
344
345 Mon Mar 14 21:07:23 2005  Ben Pfaff  <blp@gnu.org>
346
347         Make sort stable (PR 12313).
348         
349         * sort.c: Don't need to include some headers anymore.
350         (static var min_buffers) New variable.
351         (static var max_buffers) New variable.
352         (static var allow_internal_sort) New variable.
353         (cmd_sort_cases) Add test mode.
354         (sort_execute) Rephrase.
355         (do_internal_sort) Don't try internal sorting if
356         allow_internal_sort is set.
357         (struct external_sort) Renamed `initial_runs' to `runs' and
358         updated all references.
359         (macro MIN_BUFFER_TOTAL_SIZE_RECS) Removed.
360         (macro MIN_BUFFER_SIZE_BYTES) Removed.
361         (macro MIN_BUFFER_SIZE_RECS) Removed.
362         (compare_initial_runs) Removed.
363         (struct record_run) Add member `idx'.
364         (write_initial_runs) Pass increasing values to process_case() as
365         index.
366         (process_case) Add `idx' parameter and use it to initialize new
367         `idx' member.
368         (allocate_cases) Limit allocated buffers to max_buffers.
369         (compare_record_run) Use new `idx' member for last resort
370         comparison, for stability.
371         (end_run) Call casefile_sleep() on irs->casefile, to prevent
372         running out of file descriptors.
373         (struct merge_state) Removed.
374         (merge) Don't need to allocate cases.  Always use MAX_MERGE_ORDER
375         unless we have fewer runs left.  Always merge consecutive runs,
376         for stability.  Return the final run.
377         (mod) Removed.
378         (choose_merge) New function.
379         (merge_once) Rewritten.
380
381 Mon Mar 14 21:05:42 2005  Ben Pfaff  <blp@gnu.org>
382
383         * cmdline.c: (static var testing_mode) Move into
384         parse_command_line().
385         
386 Mon Mar 14 21:05:13 2005  Ben Pfaff  <blp@gnu.org>
387
388         * algorithm.c: (remove_range) New function.
389         (remove_element) New function.
390
391         * dictionary.c: (dict_delete_var) Use remove_element().
392
393         * flip.c: (cmd_flip) Ditto.
394
395 Sun Mar 13 22:52:05 2005  Ben Pfaff  <blp@gnu.org>
396
397         * file-handle.q: (struct file_handle) `open_mode' should not be
398         const.
399         
400 Sun Mar 13 22:40:54 2005  Ben Pfaff  <blp@gnu.org>
401
402         First phase of making SORT CASES stable (PR 12313).
403
404         * sort.c: (struct indexed_case) New structure.
405         (do_internal_sort) Rewrite to make internal sorting stable.
406         (compare_case_dblptrs) Removed.
407         (compare_indexed_cases) New function.
408
409 Sun Mar 13 22:38:40 2005  Ben Pfaff  <blp@gnu.org>
410
411         Clean-ups.
412
413         * casefile.c: (casereader_read_xfer_assert) New function.
414
415         * dictionary.c: (dict_compact_case) New function.
416
417         * flip.c: (struct flip_pgm) New member idx_to_fv.
418         (cmd_flip) Initialize idx_to_fv member.
419         (destroy_flip_pgm) Free idx_to_fv member.
420         (flip_sink_write) Use struct flip_pgm member instead of case_sink
421         member.
422         (flip_sink_write) Ditto.
423
424         * vfm.c: (write_case) Use dict_compact_case() instead of
425         compact_case().
426         (compact_case) Removed.
427         (storage_source_create) Removed `dict' parameter.  All references
428         updated.
429
430         * vfm.h: (struct case_source) Removed `value_cnt' member.  All
431         references removed.
432         (struct case_sink) Removed `dict', `idx_to_fv' members.  All
433         references removed.
434
435 Sun Mar 13 22:35:55 2005  Ben Pfaff  <blp@gnu.org>
436
437         More AGGREGATE fixes.
438
439         * aggregate.c: (accumulate_aggregate_info) Implement NMISS and
440         NUMISS for strings.  Fix FOUT, POUT, FGT, FLT, FIN, FOUT for
441         strings.
442         (initialize_aggregate_info) Fix initialization for MIN, MAX for
443         strings.
444
445 Sat Mar 12 23:26:21 2005  Ben Pfaff  <blp@gnu.org>
446
447         Start work on testing and debugging AGGREGATE.
448
449         * aggregate.c: (cmd_aggregate) Use discrete bool variables instead
450         of a bit-map.  Require proper subcommand ordering.  Make OUTFILE
451         subcommand mandatory.
452         (parse_aggregate_functions) Check that PIN, POUT, FIN, FOUT
453         functions' arguments are in the correct order and swap them if
454         not.
455         (accumulate_aggregate_info) Make SUM include weights.  Add various
456         string functions.
457         (dump_aggregate_info) Add various string functions.
458         (initialize_aggregate_info) Initialize int1 for MIN, MAX.
459
460         * sort.c: (sort_parse_criteria) Add parameter for returning
461         whether any directions were specified.  All callers updated.
462
463 Sun Mar 13 14:54:27 WST 2005 John Darrington <john@darrington.wattle.id.au>
464
465         * t-test.q: Fixed erroneous logic in compare_group_binary.
466
467 Sat Mar 12 13:29:21 2005  Ben Pfaff  <blp@gnu.org>
468
469         * split-file.c: (cmd_split_file) Ignore LAYERED and SEPARATE
470         keywords (PR 11628).
471
472 Sat Mar 12 13:17:12 2005  Ben Pfaff  <blp@gnu.org>
473
474         * vfm.c: (procedure_with_splits) Fix PR 11492: end_func() must be
475         called *before* close_active_file().
476
477 Sat Mar 12 12:20:57 2005  Ben Pfaff  <blp@gnu.org>
478
479         * file-handle.q: (struct file_handle) Change open_mode from
480         character pointer to 3-char array, for safety.  Updated all
481         references.
482
483 Sat Mar 12 12:15:49 2005  Ben Pfaff  <blp@gnu.org>
484
485         Thanks to Ben Kujala <bkujala@oregonchildcare.org> for reporting
486         these bugs.
487         
488         * pfm-read.c: (read_header) Improve error message for many cases
489         in which the input is not actually a portable file.
490
491         * file-handle.q: (fh_open) When we give an error message, actually
492         return NULL.
493
494 Fri Mar 11 11:50:30 2005  Ben Pfaff  <blp@gnu.org>
495
496         * format.c: (check_common_specifier) New function for checks
497         common to check_input_specifier() and check_output_specifier().
498         (check_input_specifier) Use check_common_specifier().
499         (check_output_specifier) Use check_common_specifier().
500         (check_string_specifier) Removed.
501         (check_specifier_type) New function.
502         (check_specifier_width) New function.
503         (get_format_var_width) Fix bug.
504
505         * formats.c: (internal_cmd_formats) Only accept numeric variables.
506
507         * lexer.c: (check_id) Rename lex_id_to_token(), make public,
508         update all references.  Make case-insensitive.
509
510         * pfm-read.c: Essentially rewrite the whole file.  Now much
511         cleaner.
512
513         * print.c: (check_string_width) New function.
514         (fixed_parse_compatible) Use check_string_width(),
515         check_specifier_type().
516         (dump_fmt_list) Ditto.
517
518         * str.c: (st_trim_copy) New function.
519         (st_uppercase) New function.
520
521         * vars-atr.c: (var_is_valid_name) New function.
522         
523         * expressions/parse.c: (type_coercion_core) Use
524         check_specifier_type().
525         
526 Fri Mar 11 11:31:24 2005  Ben Pfaff  <blp@gnu.org>
527
528         * expressions/evaluate.c: (cmd_debug_evaluate) Fix memory leaks.
529
530         * expressions/parse.c: (no_match) Ditto.
531
532 Wed Mar  9 09:54:27 2005  Ben Pfaff  <blp@gnu.org>
533
534         * Makefile.am: (pspp_LDADD) Add libgsl-extras.a.
535
536         * expressions/helpers.c: (struct func_params) Removed.
537         (generalized_idf) Removed.
538         (cdf_beta) Removed.
539         (idf_beta) Removed.
540         (idf_fdist) Use gslextras_cdf_beta_Pinv() instead of idf_beta().
541
542         * expressions/operations.def: Implement IDF.BETA, CDF.BINOM,
543         CDF.GEOM, CDF.HYPER, CDF.NEGBIN, CDF.POISSON using gsl-extras.
544         Implement SIG.F, which I had overlooked previously.
545
546 Tue Mar  8 12:47:53 WST 2005 John Darrington <john@darrington.wattle.id.au>
547
548         * command.c command.def glob.[ch] cmdline.c: Made DEBUG cmds
549         available only in testing mode.
550
551 Sun Mar  6 23:25:40 2005  Ben Pfaff  <blp@gnu.org>
552
553         * data-in.c: Use `bool' throughout, where relevant.
554
555 Sun Mar  6 19:52:22 2005  Ben Pfaff  <blp@gnu.org>
556
557         DATA LIST with free-field formats should not have implied decimal
558         places (PR 12035).  Also clean up data-in.c a bit.
559
560         * data-in.h: (enum) Add DI_IMPLIED_DECIMALS.
561
562         * data-in.c: (apply_implied_decimals) New function.
563         (parse_numeric) Don't adjust exponent if DI_IMPLIED_DECIMALS not
564         set.  Also, get rid of gotos.
565         (parse_Z) Use apply_implied_decimals() if the field doesn't
566         contain a decimal point.
567         (parse_N) Use apply_implied_decimals().
568         (parse_IB) Ditto.
569         (parse_PIB) Ditto.
570         (parse_P) Ditto.
571         (parse_PK) Ditto.
572         (to_roman) Removed.
573         (parse_enum) New function.
574         (macro CHAR_IS_ROMAN) Removed.
575         (macro ROMAN_VALUE) Removed.
576         (parse_month) Use parse_enum().
577         (parse_weekday) Use parse_enum().
578         (parse_DATETIME) Use long for weekday.
579
580         * data-list.c: (read_from_data_list_fixed) Use
581         DI_IMPLIED_DECIMALS.
582
583 Sun Mar  6 17:07:20 2005  Ben Pfaff  <blp@gnu.org>
584
585         When the lexer sees something like `-5' in the input, it has to
586         decide whether it's a negative numeric constant token or a '-'
587         token followed by a positive numeric constant token.  It always
588         decides on the former, and then the parser can call
589         lex_negative_to_dash() if it wants the latter.  However, this
590         doesn't work for the case of `-0', because negative zero is
591         (portably) indistinguishable from positive zero.  So now we divide
592         T_NUM into two tokens, T_POS_NUM and T_NEG_NUM, to make the
593         distinction clear.  This requires a little bit of extra effort,
594         because there were several references to T_NUM in the code base.
595         
596         * lexer.c: (lex_get) Use T_NEG_NUM and T_POS_NUM to distinguish
597         positive and negative numeric constants.
598         (lex_double_p) Renamed lex_is_number().  Changed return type to
599         bool.  Updated all relevant references to T_NUM to instead use
600         this function.
601         (lex_double) Renamed lex_number().  All references updated.
602         (lex_integer_p) Renamed lex_is_integer().  Changed return type to
603         bool.  All references updated.
604         (lex_token_representation) Understand T_NEG_NUM and T_POS_NUM.
605         (lex_negative_to_dash) Ditto.
606         (dump_token) Ditto.
607         
608         * lexer.h: (enum) Add T_POS_NUM, T_NEG_NUM.  Remove T_NUM.
609
610 Sun Mar  6 22:09:20 2005  Ben Pfaff  <blp@gnu.org>
611
612         * expressions/operations.def: (NUMBER) Use DI_IMPLIED_DECIMALS.
613
614 Sun Mar  6 19:33:24 2005  Ben Pfaff  <blp@gnu.org>
615
616         * expressions/operations.def: (VEC_ELEM_NUM) Treat user-missing
617         values as system-missing.
618
619         * expressions/parse.c: (parse_vector_element) Fix order of
620         arguments in call to expr_allocate_binary().
621
622 Sun Mar  6 17:51:05 2005  Ben Pfaff  <blp@gnu.org>
623
624         * expressions/optimize.c: (optimize_tree) Fix optimization bug for
625         x**2.
626
627         * expressions/parse.c: (type_coercion_core) Set *node to NULL on
628         failure, as indicated by function comment.
629         (parse_binary_operators) Always return NULL on type_coercion()
630         failure.  Should have been doing this anyway, but bug in
631         type_coercion_core() filtered through.
632         (parse_add) Fix typo in user message.
633         (parse_primary) Understand T_NEG_NUM and T_POS_NUM.
634
635 Sun Mar  6 10:47:13 2005  Ben Pfaff  <blp@gnu.org>
636
637         * expressions/operations.def: Add VALUE function.
638
639         * expressions/parse.c: (parse_function) Need an unary composite
640         node for variables in A TO B, not a variable node.  Use
641         allocate_unary_variable().
642         (parse_primary) Use allocate_unary_variable().
643         (allocate_unary_variable) New function.
644
645 Thu Mar  3 23:53:32 2005  Ben Pfaff  <blp@gnu.org>
646
647         * expressions/PSPP_expressions.pm: Renamed it back to generate.pl
648         but fixed the real problem that was preventing the build from a
649         separate directory.  I liked it my way better ;-)
650         
651 Thu Mar  3 23:17:51 2005  Ben Pfaff  <blp@gnu.org>
652
653         * expressions/parse.c: (expr_parse) Fix parameter type.  Thanks to
654         John Darrington <john@darrington.wattle.id.au> for reporting this
655         bug.
656
657 Thu Mar  3 22:10:25 WST 2005 John Darrington <john@darrington.wattle.id.au>
658
659         * expressions/Makefile.am expressions/evaluate.h.pl
660           expressions/evaluate.inc.pl expressions/operations.h.pl
661           expressions/optimize.inc.pl expressions/parse.inc.p:
662
663           Renamed generate.pl to PSPP_expressions.pm and adjusted *.pl
664           to suit. 
665
666           Fixed everything so that it can be built from an arbitrary
667           directory.
668         
669 Thu Mar  3 22:08:35 WST 2005 John Darrington <john@darrington.wattle.id.au>
670
671         * Makefile.am : Fixed up CLEANFILES target.
672
673 Mon Feb 28 23:49:56 2005  Ben Pfaff  <blp@gnu.org>
674
675         * str.h: Changed `struct len_string' to `struct fixed_string', a
676         more accurate name.  Updated all references.
677
678 Mon Feb 28 23:35:30 2005  Ben Pfaff  <blp@gnu.org>
679
680         Redo calendar support.  Should now be bug-for-bug compatible.
681         
682         * calendar.c: New file.
683
684         * calendar.h: New file.
685
686         * data-in.c: Use new calendar functions.
687         (parse_sign) Change sense of return value.
688         (calendar_error) New function.
689         (ymd_to_ofs) New function.
690         (ymd_to_date) New function.
691         (parse_DATE) Use new function.
692         (parse_ADATE) Ditto.
693         (parse_EDATE) Ditto.
694         (parse_SDATE) Ditto.
695         (parse_JDATE) Ditto.
696         (parse_QYR) Ditto.
697         (parse_MOYR) Ditto.
698         (parse_WKYR) Ditto.
699         (parse_TIME) Ditto.
700         (parse_DTIME) Ditto.
701         (parse_DATETIME) Ditto.
702
703         * data-out.c: (convert_date) Use new calendar functions.
704
705         * error.c: (err_vmsg) Changed interface to be more sensible.
706         Updated all callers.
707         (dump_message) Don't double new-lines (why did we do this
708         anyway?).
709
710 Mon Feb 28 23:30:25 2005  Ben Pfaff  <blp@gnu.org>
711
712         * sfmP.h: (macro flt64) Moved here from pref.h.orig.
713         (macro FLT64_MAX) Moved here from pref.h.orig.
714
715 Mon Feb 28 23:28:01 2005  Ben Pfaff  <blp@gnu.org>
716
717         * set.q: Support SET EPOCH.
718         (static var set_epoch) New var.
719         (aux_stc_custom_epoch) New function.
720         (stc_custom_epoch) New function.
721         (get_epoch) New function.
722         (stc_custom_pager) [USE_INTERNAL_PAGER] Fix bug.
723
724         * format.c: Make it possible just to check whether a specifier is
725         valid without emitting an error message.
726         (parse_format_specifier_name) Change interface, update all
727         callers.
728         (check_input_specifier) Ditto.
729         (check_output_specifier) Ditto.
730         (parse_format_specifier) Ditto.
731
732 Mon Feb 28 23:24:08 2005  Ben Pfaff  <blp@gnu.org>
733
734         * command.def: Add DEBUG POOL.
735
736         * pool.c: (pool_destroy) Fix bug in deleting this pool from its
737         parent.
738         (pool_clear) Properly account for size of pool gizmo.
739         (pool_realloc) Ditto.
740         (pool_clone) New function.
741
742         * pool.h: Mark our allocation functions MALLOC_LIKE.
743
744 Mon Feb 28 23:21:26 2005  Ben Pfaff  <blp@gnu.org>
745
746         * Makefile.am: Move many definitions into new top-level
747         Make.build.  Add expressions to SUBDIRS.  Add calendar.c,
748         calendar.h.  Remove expr-evl.c, expr-opt.c expr-prs.c, expr.h,
749         exprP.h, expr.def.
750
751         * case.c: (case_resize) New function.
752         (case_swap) New function.
753
754         * casefile.c: Include mkfile.h.
755
756 Fri Feb 25 21:11:35 WST 2005 John Darrington <john@darrington.wattle.id.au>
757
758         * sfm-read.c: Fixed a buglet which caused a crash when trying
759         to read a non-existent file.
760
761 Sun Feb 13 16:11:13 2005  Ben Pfaff  <blp@gnu.org>
762
763         Fix PR 11955.
764
765         * aggregate.c: (parse_aggregate_functions) Code cleanup.
766         Important part: get rid of spurious copying of function->format to
767         destvar->print and destvar->write.
768
769 Fri Feb 11 00:08:36 2005  Ben Pfaff  <blp@gnu.org>
770
771         Fix PR 11916, which was confusing a variable's `index' member
772         with the variable's position in a var_set.  Although these are
773         usually the same, they are not for array `var_set's.
774         
775         Took advantage of this bug as an opportunity to clean up and
776         rewrite parse_var_set_vars().
777
778         * vars-prs.c: (parse_vs_variable_idx) New function.
779         (parse_vs_variable) Reimplement in terms of
780         parse_vs_variable_idx().
781         (parse_var_idx_class) New function.
782         (add_variable) New function.
783         (add_variables) New function.
784         (parse_var_set_vars) Rewritten.
785         (struct var_set) Change `lookup_var' member that returns a
786         variable into `lookup_var_idx' member that returns an int.
787         Updated the var set implementations in obvious corresponding ways.
788         Used compare_var_ptr_names(), hash_var_ptr_name() just added.
789         
790 Fri Feb 11 00:06:03 2005  Ben Pfaff  <blp@gnu.org>
791
792         Use our global variable compare & hash functions and give them
793         better names.  Add similar functions for dealing with double
794         pointers to variables.
795         
796         * vars-atr.c: (compare_variables) Renamed compare_var_names().
797         (hash_variable) Renamed hash_var_name().
798         (compare_var_ptr_names) New function.
799         (hash_var_ptr_name) New function.
800         
801         * t-test.q: (cmd_t_test) Use global compare_var_names(),
802         hash_var_name().
803         (compare_var_name) Removed.
804         (hash_var_name) Removed.
805
806 Fri Feb 11 00:04:39 2005  Ben Pfaff  <blp@gnu.org>
807
808         Fix dictionary bug.
809         
810         * dictionary.c: (compare_variable_dblptrs) Rename
811         compare_var_ptrs() and fix it to properly dereference the double
812         pointers.
813
814 Mon Feb  7 09:58:15 WST 2005 John Darrington <john@darrington.wattle.id.au>
815
816         crosstabs.q examine.q oneway.q q2c.c:  Added a q2c feature to 
817         declare subcommands as mandatory.  Closed bug #11843
818
819 Sat Feb  5 20:35:10 WST 2005 John Darrington <john@darrington.wattle.id.au>
820         
821         * getline.c command.[ch] command.def:  Added (very rudimentary)
822         support for line  completion when in interactive mode.  Partially 
823         addresses bug #11693
824         
825 Mon Jan 31 09:52:51 WST 2005 John Darrington <john@darrington.wattle.id.au>
826
827         * examine.q factor_stats.c oneway.q output.c pfm-read.c: Fixed some
828         problems revealed by valgrind.
829
830
831 Wed Jan 26 11:44:11 WST 2005 John Darrington <john@darrington.wattle.id.au>
832
833         * set.q: Affixed a fix to the previous fix such that we'll be OK now
834         whether or not PAGER is set.
835
836 Wed Jan 26 09:25:54 WST 2005 John Darrington <john@darrington.wattle.id.au>
837
838         * set.q: Copied the string produced by getenv("PAGER") thus avoiding
839         "invalid free" errors.  Hopefully fixes bug #11722
840
841         * compute.c expr-prs.c: Check that lvalues are populated before 
842         attempting to destroy them.  Closes bug #11676
843
844 Tue Jan 25 21:01:43 WST 2005 John Darrington <john@darrington.wattle.id.au>
845
846         * aggregate.c: Initialised the complete agr_proc structure.
847         Closes bug #11675
848
849
850 Sun Jan 23 23:02:21 2005  Ben Pfaff  <blp@gnu.org>
851
852         * print.c: (print_trns_free) Close the dfm writer if there is one,
853         fixing a memory leak.
854
855 Mon Jan 24 12:24:36 WST 2005 John Darrington <john@darrington.wattle.id.au>
856
857         * glob.c oneway.q q2c.c t-test.q vfm.c: Still *more* memory leaks 
858         fixed.
859
860
861 Fri Jan 21 19:54:14 WST 2005 John Darrington <john@darrington.wattle.id.au>
862
863         * linked-list.[ch] Added
864
865         * examine.q file-handle.[hq] font.h glob.c groff-font.c postscript.c 
866           set.q:    Yet more memory leaks
867
868 Tue Jan 18 23:12:40 WST 2005 John Darrington <john@darrington.wattle.id.au>
869
870         * t-test.q examine.q : More memory leaks fixed.
871
872 Tue Jan 18 19:26:59 WST 2005 John Darrington <john@darrington.wattle.id.au>
873
874         * examine.q  factor_stats.[ch] get.c pfm-read.c: Plugged numerous
875         memory leaks.
876
877 Mon Jan 10 14:43:45 WST 2005 John Darrington <john@darrington.wattle.id.au>
878
879         * ascii.c cartesian.c casefile.c chart.h devind.c 
880           examine.q frequencies.q
881           html.c output.h piechart.c plot-chart.c plot-hist.c
882
883           Integrated the chart rendering into the output stream
884           (currently only works for html).
885           
886           Removed gratuitous use of ifndef NO_CHARTS, and replaced with
887           dummy-chart.c for compiling without charts.
888
889         * mkfile.[ch] Created.  
890
891         * som.[ch] tab.[ch]: Changed name of som_table to som_entity
892         Added type element so we can tell if it's a chart or a table.
893
894         * chart.h examine.q piechart.c plot-chart.c plot-hist.c: changed the 
895         API of charts to be more like that of tables.
896
897 Thu Jan 13 21:00:02 WST 2005 John Darrington <john@darrington.wattle.id.au>
898
899         * casefile.c main.c: Moved the SIGINT handler from casefile.c to
900         main.c. Removed the handler for SIGQUIT.
901
902 Mon Jan 10 14:43:45 WST 2005 John Darrington <john@darrington.wattle.id.au>
903
904         * casefile.c: Added a signal handler to delete temp files on 
905         SIGINT and SIGQUIT
906
907         * permissions.c Inhibited the PERMISSIONS command when SAFER is on.
908
909         * command.def Added a lot more unimplemented commands.
910
911         * copyleft.[ch] cmdline.c Moved legal information to copyleft.c
912
913 Sat Jan  8 23:58:34 2005  Ben Pfaff  <blp@gnu.org>
914
915         * sort.c: (compare_initial_runs) Needed additional level of
916         dereferencing.
917         (merge_once) Fix plenty of stupid mistakes.
918
919 Sat Jan  8 23:55:27 2005  Ben Pfaff  <blp@gnu.org>
920
921         * casefile.c: (casefile_sleep) Need to flush_buffer() after
922         calling casefile_to_disk() or we will lose the last block in the
923         file if the casefile started out as disk-based.
924         (casefile_get_reader) Initialize reader->destructive to 0.
925         (cmd_debug_casefile) Add new test pattern.
926         (test_casefile) Define new test pattern to make sure
927         casefile_sleep() works properly.
928
929 Fri Jan  7 08:00:05 WST 2005 John Darrington <john@darrington.wattle.id.au>
930
931         * Makefile.am chart.[ch]  histogram.[ch] piechart.c (Modified);
932           plot-hist.c plot-chart.c (Added) Reorganised these files in an
933           attempt to seperate the creation and processing of charts from their
934           actuall renedering.
935
936         * examine.q frequencies.q generated charts conditional upon the NO_CHARTS
937           macro.
938
939 Thu Jan  6 18:48:58 WST 2005 John Darrington <john@darrington.wattle.id.au>
940
941         * main.c Added a signal handler for SIGFPE
942
943         * sort.c Somewhat more robust fix to the previous entry.
944
945 Wed Jan  5 21:23:31 2005  Ben Pfaff  <blp@gnu.org>
946
947         * sort.c: (merge) Fix assertion for proper Huffman merge pattern:
948         0 == 1 modulo 1.  See Knuth 5.4.9 (vol. 3, 2nd ed.,
949         pp. 361).  Thanks to John Darrington <john@cellform.com.au> for
950         reporting the bug.
951
952 Wed Jan  5 22:42:26 WST 2005 John Darrington <john@darrington.wattle.id.au>
953
954         * case.h Fixed bug # 11307
955         
956 Wed Jan  5 08:30:48 WST 2005 John Darrington <john@darrington.wattle.id.au>
957
958         * val-labs.c Fixed bug which caused a crash if VALUE LABELS had
959         a trailing slash.
960
961 Mon Jan  3 17:44:37 2005  Ben Pfaff  <blp@gnu.org>
962
963         * pfm-read.c: (read_variables) Remove direct manipulation of
964         v->aux, which is no longer needed.  Fixes PR 11483.
965
966 Sat Jan  1 19:01:16 WST 2005 John Darrington <john@darrington.wattle.id.au>
967
968         * data-list.c Fixed a bug in parsing delimiters.
969
970         * group.c vars-atr.c Fixed buglet in hash/compare functions for alpha
971         values.
972
973         * percentiles.c Properly handled calculation of Tukey hinges where
974         the number of data is small.
975
976         * oneway.q Used the generic value_to_string function for independent
977         variable instead of trying to do it ourselves.
978
979         * box-whisker.c Fixed a buglet which caused a crash if the number of
980         data was zero
981
982
983 Fri Dec 31 16:47:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
984
985         * examine.q box-whisker.c chart.h Implemented boxplots in EXAMINE
986
987         * percentiles.c Fixed some bugs when calculating percentiles when
988         there's a small number of cases.
989
990 Wed Dec 29 08:18:08 WST 2004 John Darrington <john@darrington.wattle.id.au>
991
992         * percentiles.[ch] Added. Calculates percentiles and Tukey hinges
993
994         * examine.q factor_stats.[ch]  Added calculation of percentiles
995
996 Fri Dec 24 15:09:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
997
998         * t-test.q Fixed bug #11227 Made t-test work when the independent
999         variable is alpha
1000
1001 Sat Dec 11 11:43:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1002
1003         * factor_stats.c Fixed calculation of trimmed mean under various
1004         special conditions.
1005
1006 Sat Dec  4 17:14:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1007
1008         * histogram.c chart.[ch] factor_stats.c frequencies.q
1009
1010         Added code to calculate sensible histogram ranges and limits.
1011
1012 Thu Dec  2 13:37:43 WST 2004 John Darrington <john@darrington.wattle.id.au>
1013
1014         * chart.h Updated to reflect many API changes.
1015
1016         * cartesian.c chart.c Moved the definitions of chart_write_{xy}scale from 
1017         cartesian.c and into chart.c
1018
1019         * factorstats.[ch] Added the histogram calculations
1020
1021         * casefile.c Removed an unused variable.
1022
1023         * frequencies.q examine.q histogram.c  Reworked the API for 
1024         histograms.
1025
1026         * piechart.c  Revised the API for piecharts.
1027
1028         * var.h  Moved the definitions of freq_tab and freq out of var.h
1029         and into frequencies.q where they belong.
1030         
1031 Tue Nov 30 21:10:20 2004  Ben Pfaff  <blp@gnu.org>
1032
1033         * flip.c: (flip_file) Check for off_t separately from fseeko(),
1034         using AC_TYPE_OFF_T.
1035
1036 Tue Nov 30 08:47:41 2004  Ben Pfaff  <blp@gnu.org>
1037
1038         * flip.c: (flip_file) If fseeko() is not available, use long int
1039         for off_t.  Thanks to "Marshall DeBerry" <mdb@radix.net> for
1040         reporting the problem.
1041
1042 Mon Nov 29 12:20:59 WST 2004 John Darrington <john@darrington.wattle.id.au>
1043
1044         * examine.q factor_stats.[ch] Changed stderr to se_mean to avoid
1045         conflict with stdio.
1046
1047 Sun Nov 21 10:32:41 WST 2004 John Darrington <john@darrington.wattle.id.au>
1048
1049         * var-labs.c (var_to_string) Now returns null if the variable is null
1050
1051         * value-labels.c (value_to_string) Made it return null if either the 
1052         value or the variable is null.
1053
1054         * hash.c (hsh_clear) Fixed a buglet.
1055
1056         * examine.q  factor_stats.[ch] Largely  rewrote, because I'd started 
1057         with  the wrong model.
1058
1059         * casefile.[ch] Added a function to return the casereader.case_idx 
1060         member
1061
1062         * examine.q  Implemented the extreme values results.
1063
1064 John Darrington <john@darrington.wattle.id.au>
1065
1066         * settings.h set.c glob.[ch] frequencies.q q2c.c error.c lexer.[ch] 
1067           output.[ch] getline.c 
1068
1069           Plugged some memory leaks
1070
1071 Mon Nov 15 23:47:40 2004  Ben Pfaff  <blp@gnu.org>
1072
1073         Adopt GSL random number generators, paving the way for providing
1074         the complete suite of random number generators on expressions.
1075         
1076         * Makefile.am: Remove random.c, random.h.
1077
1078         * random.c: Removed.
1079
1080         * random.h: Removed.
1081
1082         * algorithm.c: (algo_default_random) Use GSL functions.
1083
1084         * casefile.c: (test_casefile) Use GSL RNG functions.
1085
1086         * expr-evl.c: (expr_evaluate) Use GSL RNG functions for OP_NORMAL,
1087         OP_UNIFORM.
1088
1089         * sample.c: (cmd_sample) Use GSL RNG functions.
1090         (sample_trns_proc) Ditto.
1091
1092         * set.q: (static var set_seed) Removed.
1093         (static var seed_flag) Removed.
1094         (static var rng) New variable.
1095         (aux_stc_custom_seed) No seed value anymore, don't print anything.
1096         (stc_custom_seed) Use new seed functions.
1097         (seed_is_set) Removed.
1098         (get_rng) New function that composes the entire external
1099         interface.
1100         (set_rng) New function.
1101         (random_seed) New function.
1102
1103 Mon Nov 15 22:08:25 2004  Ben Pfaff  <blp@gnu.org>
1104
1105         * expr-evl.c: (expr_evaluate) Fix XDATE.JDAY formula.  Thanks to
1106         John Darrington <john@darrington.wattle.id.au> for reporting this
1107         bug.
1108
1109 Tue Nov 16 13:19:18 WST 2004 John Darrington <john@darrington.wattle.id.au>
1110
1111         * permissions.c command.def Added the PERMISSIONS command
1112
1113 Mon Nov 15 01:33:32 2004  Ben Pfaff  <blp@gnu.org>
1114
1115         * q2c.c: (dump_header) Don't try to emit #includes at very top of
1116         output file because that will precede #include <config.h>, which
1117         is bad.
1118         (main) Add needed headers to /* (header) */ code.
1119
1120 Mon Nov 15 01:21:36 2004  Ben Pfaff  <blp@gnu.org>
1121
1122         Instead of making system or portable file readers responsible for
1123         dropping and reordering variables, make them read full cases and
1124         let the caller take care of any changes.
1125
1126         * get.c: New "case map" structure to handle this.  Use for GET,
1127         IMPORT, MATCH FILES.  Essentially rewrite the whole file.
1128
1129         * pfm-read.c: (pfm_read_case) Read into provided case.  Signature
1130         changed appropriately.
1131
1132         * sfm-read.c: (sfm_read_case) Ditto.
1133
1134 Mon Nov 15 00:47:45 2004  Ben Pfaff  <blp@gnu.org>
1135
1136         Decided that case_serialize() and case_unserialize() were too
1137         abstract.  Also we need a couple more functions to avoid excessive
1138         copying for data in/out fast paths.
1139
1140         * case.c: (case_serial_size) Removed.
1141         (case_serialize) Rename case_to_values() and make its argument
1142         explicitly an array of union values.
1143         (case_unserialize) Rename case_from_values() and make its argument
1144         explicitly an array of union values.
1145         (case_data_all) New function.
1146         (case_data_all_rw) New function.
1147
1148         * casefile.c: (struct casefile) Change buffer from array of
1149         unsigned char to array of union value for better accuracy.
1150         Redefine buffer_used and buffer_size in terms of values, not
1151         bytes.  Remove case_size because it is now redundant with
1152         value_cnt.  Fix up all references to these members.
1153
1154 Mon Nov 15 00:45:46 2004  Ben Pfaff  <blp@gnu.org>
1155
1156         * barchart.c: (struct subcat) Make `label' member const to silence
1157         GCC warning with -Wwrite-strings.
1158
1159         * cartesian.c: (struct dataset) Ditto.
1160
1161         * case.c: Don't re-define NDEBUG if already defined.
1162         Add lots of comments.
1163
1164         * str.c: Fix includes.
1165
1166         * crosstabs.q: Fix includes.
1167
1168         * examine.q: Fix includes.  Fix GCC warning about unused
1169         variables.
1170         
1171         * frequencies.q: (stat macro) Removed and replaced where used by
1172         its expansion.
1173
1174         * list.q: Fix includes.
1175
1176         * oneway.q: Fix includes.
1177
1178         * piechart.c: Fix includes.  Only define M_PI if not already
1179         defined.
1180
1181         * sfm-read.c: (bswap) New function.
1182         (bswap_int32) Write in terms of bswap.
1183         (bswap_flt64) Ditto.
1184
1185         * str.c: (ds_data) Add external definition here, needed because
1186         str.h has only an `extern inline' version.
1187
1188         * value-labels.c: Fix includes.
1189
1190 Mon Nov 15 00:40:55 2004  Ben Pfaff  <blp@gnu.org>
1191
1192         Instead of providing a system or portable file writer with a raw
1193         case in the format needed for output, provide it with a regular
1194         case.  The writer takes care of any needed translation.
1195
1196         * aggregate.c: Adopt new scheme for AGGREGATE.
1197         (struct agr_proc) sfm_agr_case member removed.
1198         (write_case_to_sfm) Removed because the new interface is easier to
1199         use.
1200
1201         * get.c: Adopt new scheme for SAVE, XSAVE, EXPORT.
1202
1203         * pfm-write.c: Implement new scheme.
1204
1205         * sfm-write.c: Ditto.
1206
1207 Mon Nov 15 00:32:24 2004  Ben Pfaff  <blp@gnu.org>
1208
1209         Instead of treating `struct file_handle' as a class to subclass
1210         into data files, system files, and portable files, instead use it
1211         as a helper that coordinates access.  Now it is opaque, too.
1212
1213         This means that most references to a struct file_handle are now
1214         changed into references to one of struct dfm_reader, struct
1215         dfm_writer, struct sfm_reader, struct sfm_writer, struct
1216         pfm_reader, or struct pfm_writer, according to what's being read
1217         or written.
1218
1219         Most related changes are only worth summarizing briefly.
1220
1221         * dictionary.c: (dict_clear) Destroy aux data in deleted
1222         variables.
1223         (dict_clear_aux) New function.
1224         (dict_create_var) Initialize aux, aux_dtor.
1225         (dict_delete_var) Destroy aux data in deleted variable.
1226
1227         * file-handle.h: (struct fh_ext_class) Removed.
1228         (struct file_handle) Removed.
1229         (fh_init_files) Removed.
1230
1231         * file-handle.q: Changed references to a handle's `private' member
1232         to direct references.
1233         (struct private_file_handle) Renamed file_handle.
1234         Add next, open_cnt, type, open_mode, aux members.
1235         (struct file_handle_list) Removed.
1236         (extern var inline_file) Removed.
1237         (static var file_handles) Changed from file_handle_list * to
1238         file_handle *.
1239         (create_file_handle) Initialize new members.
1240         (fh_close_handle) Removed.
1241         (mode_name) New function.
1242         (fh_open) New function.
1243         (fh_close) New function.
1244         (fh_parse_file_handle) Renamed fh_parse().
1245
1246         * glob.c: (init_glob) Remove fh_init_files() call.
1247         
1248         * aggregate.c: use sfm_writer.
1249         (create_sysfile) Removed because the new interface is simpler.
1250         
1251         * apply-dict.c: Use sfm_reader.
1252
1253         * data-list.c: Use dfm_reader.
1254
1255         * file-type.c: Use dfm_reader.
1256
1257         * get.c: Use sfm_reader, sfm_writer, pfm_reader, pfm_writer.
1258
1259         * inpt-pgm.c: Use dfm_reader.
1260
1261         * print.c: Use dfm_writer.
1262
1263         * sysfile-info: Use sfm_reader.
1264
1265         * dfm-read.c: Adopt new file handle infrastructure.
1266
1267         * dfm-write.c: Ditto.
1268
1269         * pfm-read.c: Ditto.
1270         
1271         * pfm-write.c: Ditto.
1272
1273         * sfm-read.c: Ditto.
1274
1275         * sfm-write.c: Ditto.
1276         
1277 Mon Nov 15 00:31:44 2004  Ben Pfaff  <blp@gnu.org>
1278
1279         Break dictionary functions into separate header file.
1280
1281         * dictionary.h: New file.
1282
1283         * var.h: Moved dict_*() functions to dictionary.h.
1284
1285 Mon Nov 15 00:30:33 2004  Ben Pfaff  <blp@gnu.org>
1286
1287         Get rid of procedure-specific union in struct variable, using
1288         instead a void * pointer and a destructor function.
1289
1290         Most related changes are only worth brief summaries.
1291
1292         * crosstabs.q: Fix includes.  Use new struct var_range in lieu of
1293         old p.crs member in struct variable.
1294         
1295         * frequencies.q: Fix includes.  Use new struct var_freqs in lieu
1296         of old p.frq member in struct variable.
1297
1298         * histogram.c: (draw_histogram) Takes new freq_tab arg because
1299         it's no longer possible to grab this from var->p.frq.
1300
1301         * piechart.c: (draw_piechart) Ditto.
1302
1303         * group.c: (group_proc_get) New function.
1304
1305         * levene.c: Use group_proc_get() in lieu of old p.grp_data member
1306         in struct variable.
1307
1308         * oneway.q: Ditto.
1309
1310         * t-test.q: Ditto.
1311
1312         * main.c: (execute_command) Clear aux data in default_dict after
1313         each command.  (It's debatable whether this should be done.)
1314
1315         * matrix-data.c: Use new struct mxd_var in lieu of old p.mxd
1316         member in struct variable.
1317
1318         * means.q: Get rid of integer mode, which is not included in
1319         recent SPSS and was the only code that wanted per-variable private
1320         data.
1321
1322         * var.h: (struct crosstab_proc) Removed.
1323         (struct frequencies_proc) Removed.
1324         (struct list_proc) Removed.
1325         (struct get_proc) Removed.
1326         (struct means_proc) Removed.
1327         (struct matrix_data_proc) Removed.
1328         (struct match_files_proc) Removed.
1329         (lots of enums) Removed.
1330         (struct variable) Removed members `p', `get'.  Add member
1331         `aux_dtor'.
1332
1333         * vars-atr.c: (var_attach_aux) New function.
1334         (var_detach_aux) New function.
1335         (var_clear_aux) New function.
1336         (var_dtor_free) New function.
1337         (discard_variables) Use NULL instead of inline_file.
1338
1339 Fri Nov 12 10:07:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
1340
1341         * value-labs.c  Fixed the implmentation of value_to_string, so 
1342         that it properly handles alpha values.
1343
1344         * oneway.q  Changed instances where labels were being probed manually, 
1345         to use the canonical {var,value}_to_string functions
1346
1347 Thu Nov 11 21:01:31 WST 2004 John Darrington <john@darrington.wattle.id.au>
1348
1349         * examine.q cartesian.c chart.[ch]   Added normal and detrended normal
1350         plots.  Changed the API of the cartesian plot to be a much lower level
1351         thing.
1352
1353 Sun Nov  7 17:25:04 WST 2004 John Darrington <john@darrington.wattle.id.au>
1354
1355         * examine.q Added some of the parametric calculations
1356
1357         * factor_stats.[ch]  Created
1358         
1359 Sat Nov  6 21:24:31 WST 2004 John Darrington <john@darrington.wattle.id.au>
1360
1361         * examine.q  Changed the definition of factors to be a composite, and
1362         dealt with the consequences.
1363
1364 Sat Nov  6 20:40:38 WST 2004 John Darrington <john@darrington.wattle.id.au>
1365
1366         * examine.q Fixed problem where examine wasn't dealing properly with 
1367         splits
1368
1369 Sat Nov  6 14:49:47 WST 2004 John Darrington <john@darrington.wattle.id.au>
1370
1371         * oneway.q Fixed problem where oneway wasn't dealing properly with 
1372         splits
1373
1374 Thu Nov  4 11:09:01 WST 2004 John Darrington <john@darrington.wattle.id.au>
1375
1376         * q2c.c examine.q  Fixed a bug (feature?) whereby arrays in the
1377         command which had settings didn't get the appropriate code
1378         generated.
1379
1380         * val.h value-labels.[ch] var-labs.c Added v*to_string functions
1381         to convert variables/values to strings.
1382
1383         * examine.q  Added framework for the EXAMINE command.
1384
1385 Mon Nov  1 12:46:17 WST 2004 John Darrington <john@darrington.wattle.id.au>
1386
1387         * q2c.c frequencies.q set.q t-test.q  Fixed the q2c parsing of DBL 
1388         subcommand types.  Changed frequencies.q to use it rather then the 
1389         custom parser.  Dealt with the consequences.  Added a test for NTILES
1390         subcommand of frequencies.
1391
1392 Sat Oct 30 09:16:29 WST 2004 John Darrington <john@darrington.wattle.id.au>
1393
1394         * oneway.q   Fixed up the behaviour when given missing values
1395
1396         * levene.c oneway.q Fixed a buglet with the levene statistic and
1397         incorporated the levene test into the oneway command.
1398
1399         * group.h  t-test.q  Moved the CMP_EQ and CMP_LE symbols out of 
1400         global scope, since they're only relevant to T-TEST
1401
1402 Fri Oct 29 17:39:03 WST 2004 John Darrington <john@darrington.wattle.id.au>
1403
1404         * group.c group.h group_proc.h levene.c oneway.q t-test.q
1405
1406         Made the t-test more consistent
1407         with the way it handles groups.  That is, it now uses a hash instead
1408         of an array of 2.  Also, made the levene.c file independent of the 
1409         implementation of the t-test.  So now levene should be fine for both
1410         t-test and anova.
1411
1412         * Added an oneway.q file for one way anova
1413
1414 Wed Jun  2 22:08:02 2004  Ben Pfaff  <blp@gnu.org>
1415
1416         * descript.c: (cmd_descriptives) Remove harmless but bogus test in
1417         STATISTICS parsing.
1418
1419 Mon May 31 20:45:24 2004  Ben Pfaff  <blp@gnu.org>
1420
1421         Fix memory leaks.
1422
1423         * data-list.c: (cmd_data_list) Free dls->delims on lossage.
1424         (data_list_trns_free) Free dls->delims.
1425
1426         * t-test.q: (tts_custom_pairs) Free vars.
1427         (ssbox_one_sample_init) Fix tab_vline() argument.
1428         (ssbox_independent_samples_init) Ditto.
1429         (trbox_paired_init) Ditto.
1430         (trbox_one_sample_init) Ditto.
1431
1432 Mon May 31 17:19:27 2004  Ben Pfaff  <blp@gnu.org>
1433
1434         Generalize casefiles to the extent that we can use them for
1435         sorting and other kinds of data transformations.  Change cases to
1436         be copy-on-write to improve memory efficiency in common cases.
1437         Every access to a member of a `struct ccase' was changed to be a
1438         call to a case_*() function, especially case_data(), case_num(),
1439         case_str(), or case_data_rw().  Many instances of a local variable
1440         named "case_num" were changed to "case_idx" as a consequence.
1441         Many `struct ccase *' were changed to actual `struct ccase'
1442         because of copying semantics of cases.  In several places there
1443         was a choice between updating debug code to work with the new ADTs
1444         or just deleting it because it was useless; I chose to delete it.
1445  
1446         * Makefile.am: (pspp_SOURCES) Add case.c, case.h.
1447
1448         * case.c: New file.
1449
1450         * case.h: New file.
1451
1452         * aggregate.c: (struct agr_proc) Change type of `sort' to
1453         sort_criteria *.  Add `break_vars', `break_var_cnt' members.
1454         Rename `vars' to `agr_vars', all references updated.  Change
1455         `agr_case' to type `struct ccase'.
1456         (cmd_aggregate) Deal with new members.  Use case_create(),
1457         sort_active_file_in_place(), sort_active_file_to_casefile().
1458         (agr_destroy) Deal with new members.
1459         (aggregate_single_case) Ditto.
1460         (dump_aggregate_info) Ditto.
1461         (initialize_aggregate_info) Ditto.
1462         (agr_to_active_file) Ditto.
1463         (presorted_agr_to_sysfile) Ditto.
1464         (sort_agr_to_sysfile) Removed.
1465
1466         * alloc.c: (out_of_memory) Make non-static.
1467
1468         * alloc.h: Prototype out_of_memory().
1469
1470         * casefile.c: Switched from a linked list in-memory representation
1471         to a two-level array-style representation.  The linked list was
1472         appropriate when we could stick a header onto cases, but that's no
1473         longer the case.  Also, the two-level array will allow for random
1474         in-memory access in case that's ever wanted.  Also added the
1475         concept of a `destructive casereader', one that destroys cases in
1476         the underlying casefile as they are read out.
1477         (macro CASES_PER_BLOCK) New macro.
1478         (struct casefile) New members `value_cnt', `case_list_size',
1479         `case_acct_size', `being_destroyed', `cases'.  Removed `head',
1480         `tail'.
1481         (struct casereader) Removed `cur'.  Added `destructive', `c'.
1482         (global var casefiles) Made static.
1483         (static var case_bytes) New var.
1484         (casefile_create) Takes a value count, not a case size in bytes,
1485         to conform to the case interface.  All callers updated.  Deal with
1486         new and removed members.
1487         (casefile_destroy) Deal with new and removed members.
1488         (casefile_sleep) New function.
1489         (casefile_get_case_size) Removed.
1490         (casefile_get_value_cnt) New function.
1491         (casefile_append) Rewritten to deal with new and removed members.
1492         (casefile_append_xfer) New function.
1493         (write_case_to_disk) Use case_serialize().
1494         (call_posix_fadvise) Removed because posix_fadvise64 segfaults.
1495         Couldn't figure out why.
1496         (casefile_to_disk) Don't call call_posix_fadvise.  Rewritten to
1497         deal with new and removed members.
1498         (merge) Removed.
1499         (merge_sort) Removed.
1500         (casefile_sort) Removed.
1501         (casefile_get_reader) Deal with new and removed members.
1502         (casefile_get_destructive_reader) New function.
1503         (reader_open_file) Make code more readable.  Create case for
1504         reader.
1505         (casereader_get_casefile) New function.
1506         (casereader_read) Deal with new and removed members.  Now returns
1507         a copy of the case, so that the caller is responsible for
1508         destroying the returned case.
1509         (casereader_read_xfer) New function.
1510         (casereader_destroy) Destroy reader's case.
1511         (test_casefile) Second arg is now a value count, all callers
1512         updated.  Now tests destructive readers too.
1513         (get_random_case) Deal with new case ADT.
1514         (write_random_case) Ditto.
1515         (read_and_verify_random_case) Ditto.
1516
1517         * crosstabs.q: Remove debug code.
1518
1519         * descript.q: (calc_descriptives) Deal with new case, casefile
1520         ADTs.
1521
1522         * dfm.c: (cmd_begin_data) There's no storage_source_class anymore.
1523
1524         * do-if.c: Remove unneeded header inclusion.
1525
1526         * expr-prs.c: Remove debug code.
1527
1528         * exprP.h: Remove debug code.
1529
1530         * flip.c: (flip_file) Use fseeko() if available.
1531
1532         * formats.c: Remove debug code.
1533
1534         * get.c: Remove debug code.
1535         (struct mtf_file) Change `input' from `union value *' to `struct
1536         ccase', all references updated.
1537
1538         * levene.c: (levene) Deal with new case, casefile ADTs.
1539
1540         * list.q: Remove debug code.
1541
1542         * loop.c: Remove debug code.
1543         
1544         * matrix-data.c: Remove debug code.
1545
1546         * means.q: Remove debug code.
1547
1548         * mis-val.c: Remove debug code.
1549
1550         * pfm-read.c: Remove debug code.
1551         (pfm_read_code) Change second arg from `union value *' to `struct
1552         ccase *', all references updated.
1553
1554         * recode.c: (string_to_long) Make first arg const.
1555         (convert_to_double) Ditto.
1556
1557         * repeat.c: Remove debug code.
1558
1559         * sample.c: Remove debug code.
1560
1561         * sfm-read.c: Remove debug code.
1562         (sfm_read_case) Change second arg from `union value *' to `struct
1563         ccase *'.
1564
1565         * sort.c: Redone in terms of casefiles.
1566         (enum sort_direction) Moved here from sort.h.
1567         (struct sort_criterion) New structure.
1568         (struct sort_criteria) New structure.
1569         (cmd_sort_cases) Rewritten.
1570         (prepare_to_sort_active_file) New function.
1571         (sort_active_file_in_place) New function.
1572         (sort_active_file_to_casefile) New function.
1573         (parse_sort) Renamed sort_parse_criteria(), rewritten & interface
1574         changed, all callers updated.
1575         (destroy_sort_cases_pgm) Renamed sort_destroy_criteria(),
1576         rewritten & interface changed, all callers updated.
1577         (sort_cases) Renamed sort_execute(), rewritten & interface
1578         changed, all callers updated.
1579         (struct internal_sort) Removed.
1580         (do_internal_sort) Rewritten, interface changed.
1581         (destroy_internal_sort) Removed.
1582         (compare_case_dblptrs) Use sort_criteria instead of sort_case_pgm.
1583         (struct initial_run) Removed; an initial run is now just a
1584         casefile.
1585         (compare_initial_runs) Rewritten.
1586         (struct external_sort) Changed almost completely.
1587         (do_external_sort) Rewritten, interface changed.
1588         (destroy_external_sort) Rewritten.
1589         [HAVE_MKDTEMP] (make_temp_dir) Removed.
1590         [!HAVE_MKDTEMP] (do_mkdir) Removed.
1591         [!HAVE_MKDTEMP] (make_temp_dir) Removed.
1592         (init_external_sort) Removed.
1593         (simulate_error) Removed.
1594         (rmdir_temp_dir) Removed.
1595         (get_temp_file_name) Removed.
1596         (open_temp_file) Removed.
1597         (close_temp_file) Removed.
1598         (remove_temp_file) Removed.
1599         (write_temp_file) Removed.
1600         (read_temp_file) Removed.
1601         (struct record_run) Change `record' from `struct case_lit *' to
1602         `struct ccase'.
1603         (struct initial_run_state) Remove `idx_to_fv', `free_list',
1604         `file_idx', `output_file'.  Add `run', casefile'.  Change
1605         `last_output' from `struct case_list *' to `struct ccase'.
1606         (write_initial_runs) Change interface, rewrite.
1607         (sort_sink_write) Renamed process_case(), changed interfaced,
1608         rewrote.
1609         (destroy_initial_run_state) Rewritten.
1610         (allocate_cases) Rewritten.
1611         (compare_record) Interface changed, rewritten.
1612         (start_run) Rewritten.
1613         (end_run) Rewritten.
1614         (output_record) Rewritten.
1615         (grab_case) Removed.
1616         (release_case) Removed.
1617         (struct merge_case) Change `cases' from double pointer to single
1618         pointer.
1619         (merge) Deal with new case and casefile ADTs.
1620         (struct run) Removed.
1621         (merge_once) Rewritten, interface changed.
1622         (fill_run_buffer) Removed.
1623         (sort_sink_make_source) Removed.
1624         (sort_sink_class) Removed.
1625         (struct sort_source_aux) Removed.
1626         (sort_source_read_helper) Removed.
1627         (sort_source_read) Removed.
1628         (read_sort_output) Removed.
1629         (read_internal_sort_output) Removed.
1630         (read_external_sort_output) Removed.
1631         (sort_source_destroy) Removed.
1632         (sort_source_class) Removed.
1633
1634         * sort.h: (struct sort_cases_pgm) Removed.
1635         (enum sort_direction) Moved to sort.c.
1636
1637         * t-test.q: (calculate) Deal with new case, casefile ADTs.
1638
1639         * tab.c: Remove debug code.
1640
1641         * var-labs.c: Remove debug code.
1642
1643         * var.h: (struct ccase) Removed.
1644         (struct case_list) Removed.
1645
1646         * vars-atr.c: (discard_variables) Use free_case_source().
1647
1648         * vars-prs.c: (parse_vs_variable) Make arg const.
1649         (parse_dict_variable) Ditto.
1650         (parse_variables) Make struct dictionary * arg const.
1651         (parse_var_set_vars) Make struct var_set * arg const.
1652         (struct var_set) Add const to some of the function pointers' args.
1653         (var_set_get_cnt) Make arg const.
1654         (var_set_get_var) Make first arg const.
1655         (var_set_lookup_var) Make first arg const.
1656         (dict_var_set_get_cnt) Make arg const.
1657         (dict_var_set_get_var) Make first arg const.
1658         (dict_var_set_lookup_var) Make first arg const.
1659         (var_set_create_from_dict) Make arg const.  Add cast to aux
1660         assignment.
1661         (struct array_var_set) Add const to var member.
1662         (array_var_set_get_cnt) Make arg const.
1663         (array_var_set_get_var) Make first arg const.
1664         (array_var_set_lookup_var) Make first arg const.
1665         (var_set_create_from_array) Make first arg const.  Insert cast.
1666
1667         * vfm.c: (struct write_case_data) Change trns_case, sink_case
1668         members from `struct ccase *' to `struct ccase'.
1669         (static var lag_queue) Change from double to single pointer.
1670         (procedure) Optimize trivial case.
1671         (internal_procedure) Deal with changed case, case_source ADTs.
1672         (create_trns_case) Changed interface, rewrote.
1673         (open_active_interface) Initialize modified lag queue.
1674         (write_case) Deal with changed case ADT.
1675         (lag_case) Deal with modified lag queue.
1676         (close_active_file) Destroy modified lag queue.
1677         Deal with changed case_source, case_sink ADTs.
1678         (destroy_storage_stream_info) Make null arg into no-op.
1679         (storage_sink_make_source) Set aux in created source.
1680         (storage_source_read) Deal with changed case, casefile ADTs.
1681         (storage_source_create) New function.
1682         (lagged_case) Rewrite.
1683         (free_case_source) New function.
1684         (free_case_sink) Rewrite.
1685         (struct split_aux_data) Changed prev_case from `struct ccase *' to
1686         `struct ccase'.
1687         (procedure_with_splits) Deal with changed prev_case.
1688         (procedure_with_splits_callback) Ditto.
1689         (multipass_split_aux_data) Changed prev_case from `struct ccase *' to
1690         `struct ccase'.
1691         (multipass_procedure_with_splits) Deal with changed prev_case.
1692         (multipass_split_callback) Ditto.
1693         
1694         
1695 Mon May 31 17:19:06 2004  Ben Pfaff  <blp@gnu.org>
1696
1697         The workspace idea didn't work out.
1698
1699         * Makefile.am: (pspp_SOURCES) Remove workspace.c, workspace.h.
1700         
1701         * workspace.c: Removed.
1702
1703         * workspace.h: Removed.
1704
1705 Sun May 30 18:35:19 2004  Ben Pfaff  <blp@gnu.org>
1706
1707         Fully implement arbitrary delimiters on DATA LIST, extending the
1708         half implementation that was already there.
1709
1710         * data-list.c: (struct data_list_pgm) Remove `delim', add
1711         `delims', `delim_cnt'.
1712         (cmd_data_list) Initialize new members.  Parse delimiters and
1713         clean up code a bit.
1714         (cut_field) Extract fields with arbitrary delimiters.  Also, fix
1715         handling of leading commas.
1716         (read_from_data_list_fixed) Expand tabs.  Adapt to new DFM
1717         interfaces.
1718         (read_from_data_list_free) Adapt to new DFM interfaces.
1719         (read_from_data_list_list) Ditto.
1720         (repeating_data_trns_proc) Ditto.
1721
1722         * dfm.c: Split up reader and writer into separate code, because
1723         they do different things.  Use struct string instead of explicit
1724         allocation code, for clarity.
1725         (enum dfm_reader_flags) New enum.
1726         (struct dfm_fhuser_ext) Removed.
1727         (struct dfm_reader_ext) New.
1728         (get_reader) New function, used by just about all the reader
1729         functions.
1730         (dfm_close) Removed.
1731         (close_reader) New function.
1732         (dfm_open_for_reading) Rewrite initialization of dfm_fhuser_ext.
1733         (dfm_open_for_writing) Ditto.
1734         (macro force_line_buffer_expansion) Removed.
1735         (count_tabs) Removed.
1736         (tabs_to_spaces) Removed.
1737         (read_record) Deal with new dfm_reader_ext.  Use struct string
1738         functions.  Don't convert tabs to spaces.
1739         (dfm_eof) New function.
1740         (dfm_get_record) Changed interface, rewrote.
1741         (dfm_expand_tabs) New function.
1742         (dfm_fwd_record) Renamed dfm_forward_record(), updated to new
1743         dfm_reader_ext, rewritten.
1744         (dfm_bkwd_record) Renamed dfm_reread_record(), updated to new
1745         dfm_reader_ext, rewritten.
1746         (dfm_set_record) Removed in favor of dfm_forward_columns().
1747         (dfm_forward_columns) New function.
1748         (dfm_get_cur_col) Renamed dfm_column_start, updated to new
1749         dfm_reader_ext, rewritten.
1750         (static var dfm_r_class) Use close_reader for the destructor.
1751         (struct dfm_writer_ext) New.
1752         (dfm_put_record) Updated to new dfm_writer_ext, rewritten.  Uses
1753         bounce buffer now instead of local allocation.
1754         (close_writer) New function.
1755         (static var dfm_writer_ext) Use close_writer for destructor.
1756         (cmd_begin_data) Adapt to new dfm_reader_ext.
1757
1758         * file-handle.q: Add support for per-file tab width.
1759         (struct private_file_handle) Add tab_width member.
1760         (q2c specifications) Add tabwidth subcommand.
1761         (cmd_file_handle) Put parsed tab width into private_file_handle.
1762         (create_file_handle) Set default tab width.
1763         (handle_get_tab_width) New function.
1764
1765         * file-type.c: (file_type_source_read) Adapt to new DFM interface.
1766
1767         * inpt-pgm.c: (reread_trns_proc) Ditto.
1768
1769         * matrix-data.c: (context) Ditto.
1770         (another_token) Ditto.
1771         (mget_token) Ditto.
1772         (force_eol) Ditto.
1773
1774 Sun May 30 18:33:59 2004  Ben Pfaff  <blp@gnu.org>
1775
1776         * casefile.c: (casefile_destroy) Fix memory leak by freeing
1777         cf->filename.
1778         (casereader_destroy) Don't close file descriptor -1.
1779
1780         * recode.c: (cmd_recode) Fix memory leak.
1781
1782         * set.q: (q2c specifications) Fix typo in user message.
1783
1784         * str.c: (st_bare_pad_len_copy) Change memcpy to memmove to avoid
1785         undefined behavior for overlapping arguments.
1786
1787 Sun May 30 18:31:48 2004  Ben Pfaff  <blp@gnu.org>
1788
1789         * casefile.c: valgrind doesn't implement posix_fadvise() yet, so
1790         don't call it when we're running under valgrind.
1791         (call_posix_fadvise) New function.
1792         (casefile_to_disk) Use call_posix_fadvise().
1793         (reader_open_file) Ditto.
1794         
1795 Sun May 30 18:20:12 2004  Ben Pfaff  <blp@gnu.org>
1796
1797         Update our string ADTs, struct string and struct len_string.  Get
1798         rid of pool support, which was largely unused.  Rename lots of
1799         functions to have more obvious or consistent names.
1800         
1801         * ascii.c: Get rid of ascii_pool.  It was only used for string
1802         allocations.
1803         (ascii_open_global) Don't create ascii_pool.
1804         (ascii_close_driver) Don't destroy ascii_pool.
1805         (ascii_postopen_driver) Don't use pool.
1806         (ascii_close_driver) Destroy strings manually.
1807
1808         * str.c: (ds_create) Remove pool argument, all references updated.
1809         (ds_init) Ditto.
1810         (ds_replace) Remove pool support, make more efficient when we
1811         don't need to reallocate.
1812         (ds_destroy) Remove pool support.
1813         (ds_rpad) New function.
1814         (ds_size) Renamed ds_capacity(), all references updated.
1815         (ds_value) Renamed ds_c_str(), all references updated.
1816         (ds_concat) Renamed ds_puts(), all references updated.
1817         (ds_concat_buffer) Renamed ds_concat(), all references updated.
1818         (ds_putchar) Renamed ds_putc(), all references updated.
1819         (ds_getline) Renamed ds_gets(), all references updated.
1820         (ls_create) Remove pool argument, all references updated.
1821         (ls_create_buffer) Ditto.
1822         (ls_destroy) Removed pool support.
1823         (ls_value) Renamed ls_c_str(), all references updated.
1824
1825         * str.h: (ls_length) [__GNUC__] Add inline version.
1826         (ls_c_str) [__GNUC__] Add inline version.
1827         (ls_end) [__GNUC__] Add inline version.
1828         (struct string) Remove pool member.  Rename `size' to `capacity',
1829         all references updated.
1830
1831         * tab.c: (text_format) Instead of using pool argument to
1832         ls_create_buffer(), call pool_register() on allocated data.
1833
1834 Mon Apr 26 22:40:07 2004  Ben Pfaff  <blp@gnu.org>
1835
1836         We're abusing the current ASCII driver by telling it to allocate a
1837         9999-line, 9999-character page in the tests.  This causes some
1838         systems to curl up and die because it allocates 20 MB of
1839         contiguous RAM.  This change alleviates at least part of the
1840         problem.  It is mostly a stop-gap until the new output system is
1841         ready.
1842         
1843         * ascii.c: (struct line) New structure.
1844         (struct ascii_driver_ext) Remove `page', `page_size', `line_len',
1845         `line_len_size', `n_output' members.  Add `lines', `lines_cap'.
1846         (ascii_preopen_driver) Initialize new members, not old ones.
1847         (ascii_close_driver) Destroy new members, not old ones.
1848         (ascii_open_page) Allocate new members, not old ones.
1849         (expand_line) Allocate room in line.
1850         (draw_line) Use new members.
1851         (ascii_line_horz) Ditto.
1852         (ascii_line_vert) Ditto.
1853         (ascii_line_intersection) Ditto.
1854         (text_draw) Ditto.
1855         (output_lines) Ditto.
1856         (ascii_close_page) Ditto.
1857
1858 Sun Apr 25 23:40:15 2004  Ben Pfaff  <blp@gnu.org>
1859
1860         * matrix.c: Dead code.  Removed.
1861
1862         * matrix.h: Dead code.  Removed.
1863
1864 Fri Apr 16 23:59:51 2004  Ben Pfaff  <blp@gnu.org>
1865
1866         Contrary to what I'd always understood, there is an efficient
1867         algorithm for deletion from a hash table populated via linear
1868         probing.  This change implements it.
1869         
1870         * hash.c: (hsh_rehash) Probe in increasing order.
1871         (hsh_probe) Ditto.
1872         (locate_matching_entry) Ditto.
1873         (hsh_delete) Use Knuth's Algorithm 6.4R for deletion.
1874
1875 Tue Apr 13 19:24:15 2004  Ben Pfaff  <blp@gnu.org>
1876
1877         * moments.c (calc_moments): Adjust calculation of kurtosis to
1878         avoid subtracting huge numbers from huge numbers, on Michael
1879         Kiefte's advice.
1880
1881 Sun Apr 11 14:22:12 2004  Ben Pfaff  <blp@gnu.org>
1882
1883         Rework moments routines for improved numerical stability based on
1884         Michael Kiefte's advice.  Any bugs or remaining numerical problems
1885         are still mine though.
1886
1887         There is now a struct moments1 for use with one-pass moments.  It
1888         uses a provisional means algorithm as an attempt to improve
1889         accuracy of higher moments.  The older struct moments now only
1890         handles two-pass moments.
1891         
1892         * aggregate.c: Use moments1 instead moments.
1893
1894         * descript.c: Revert previous change, which is no longer needed
1895         due to the moments revision.
1896
1897         * moments.c: (calc_moments) New function for calculating variance,
1898         skewness, kurtosis.
1899         (moments_pass_one) Only accumulate weights bigger than zero.
1900         (moments_calculate) Allow calculating the mean on pass one, others
1901         require pass two.  Implement in terms of calc_moments().
1902         (struct moments1) New structure.
1903         (init_moments1) New function.
1904         (moments1_clear) Ditto.
1905         (moments1_create) Ditto.
1906         (moments1_add) Ditto.
1907         (moments1_calculate) Ditto.
1908         (moments1_destroy) Ditto.
1909         (cmd_debug_moments) Deal with `struct moments' or `struct
1910         moments1' as requested by user.
1911
1912 Sun Apr 11 14:21:55 2004  Ben Pfaff  <blp@gnu.org>
1913
1914         * Makefile.am (pspp_SOURCES): Remove debug.c.
1915
1916         * debug.c: Removed.  It was empty anyway.
1917
1918 Fri Apr  9 20:04:49 2004  Ben Pfaff  <blp@gnu.org>
1919
1920         * descript.c (calc_descriptives): Fix assert failure when only
1921         MOMENT_MEAN is needed.
1922
1923 2004-04-09  Michael Kiefte  <mkiefte@dal.ca>
1924
1925         * descript.c: 
1926
1927         fixed problem with parsing in match_statistic() causing
1928         "DESCRIPTIVE STAT=MEAN." to barf.
1929
1930         "MEAN" is now default if "SORT" given without specification.
1931
1932         Fixed infinite loop with "DESCRIPT GIBBERISH=ALL."  Parsing is
1933         generally less forgiving of syntax errors: better to have it do
1934         nothing and type it in again then to not know what it actually did
1935         instead.  
1936
1937         z-score transformation now checks score for user-missing values
1938         and checks std_dev for SYSMIS.
1939
1940 2004-04-06  Michael Kiefte  <mkiefte@dal.ca>
1941
1942         * aggregate.c, crosstabs.q, descript.c, dictionary.c, frequencies.q, levene.c, t-test.q, var.h: 
1943         Changed dict_get_case_weight() to accept an additional int * flag
1944         to complain about system-missing, user-missing, zero, or negative
1945         weights and updated existing functions to pass int * to
1946         dict_get_case_weight().
1947
1948 2004-04-05  jmd  <jmd@gnu.org>
1949
1950         * main.c: Fixed configuration problems with gsl
1951
1952         * t-test.q: Fixed some problems encountered when compiling under Cygwin
1953
1954 2004-04-03  blp  <blp@gnu.org>
1955
1956         * lexer.c, ChangeLog:
1957         Fix infinite loop on comment at end of file, add test.
1958
1959 2004-04-03  jmd  <jmd@gnu.org>
1960
1961         * 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:
1962         Fixed the calculation of percentiles and added --syntax and --algorithm options
1963
1964 Sat Apr  3 11:43:37 2004  Ben Pfaff  <blp@gnu.org>
1965
1966         * lexer.c: (lex_skip_comment) Handle end-of-file correctly (I
1967         hope).
1968
1969 Sat Apr  3 15:00:18 WST 2004 John Darrington <john@darrington.wattle.id.au>
1970
1971         * frequencies.q:  Fixed the calculation of percentiles
1972
1973         * Makefile.am:  Added the --ansi flag and dealt with the
1974         consequences.  Added some entries to PSPP_sources so that
1975         make distcheck would pass
1976
1977         * cmdline.c:   Added the --syntax and --algorithm options
1978
1979         * q2c.c:  Added an implicit /ALGORITHM subcommand to everything.
1980
1981 Fri Apr  2 11:25:22 WAST 2004 John Darrington <john@darrington.wattle.id.au>
1982
1983         * t-test.q, levene.c, levene.h  Converted t-test (incl levene) to 
1984         use the new multipass_split_... mechanism.
1985
1986 Wed Mar 31 22:36:22 2004  Ben Pfaff  <blp@gnu.org>
1987
1988         * frequencies.q: (calc_stats) Use moments data structure and
1989         calc_seskew(), calc_sekurt() functions.
1990
1991         * set.q main.c settings.h Added support for --syntax and --algorithm 
1992         options
1993
1994 Tue Mar 30 22:04:19 2004  Ben Pfaff  <blp@gnu.org>
1995
1996         * vfm.c: Had to get last call to multipass_split_output() inside
1997         open_active_file()/close_active_file() pairing, so introduce new
1998         function.
1999         (internal_procedure) Move procedure() code here, except for calls
2000         to open_active_file() and close_active_file().
2001         (procedure) Wrap open_active_file() and close_active_file() around
2002         internal_procedure().
2003         (multipass_procedure_with_splits) Wrap open_active_file() and
2004         close_active_file() around internal_procedure().
2005
2006 Tue Mar 30 22:01:57 2004  Ben Pfaff  <blp@gnu.org>
2007
2008         * descript.c: (cmd_descriptives) Free `vars' to avoid memory leak.
2009
2010 Mon Mar 29 16:26:40 2004  Ben Pfaff  <blp@gnu.org>
2011
2012         * debug.c: Removed.  Moved cmd_debug_evaluate() into expr-evl.c.
2013
2014         * expr-evl.c: (cmd_debug_evaluate) Moved here from debug.c.
2015
2016 Mon Mar 29 16:03:08 2004  Ben Pfaff  <blp@gnu.org>
2017
2018         * algorithm.c: By default turn off some of the more expensive
2019         assertions.
2020         (expensive_assert) New macro which expands to assert if
2021         EXTRA_CHECKS is defined, to nothing otherwise.
2022         (unique) Use expensive_assert().
2023         (binary_search) Ditto.
2024         (push_heap) Ditto.
2025         (pop_heap) Ditto.
2026         (make_heap) Ditto.
2027         (sort_heap) Ditto.
2028
2029         * command.c: (conflicting_3char_prefixes) Words that are the same
2030         don't cause conflicts when they are abbreviated to the first three
2031         letters.
2032
2033         * expr-evl.c: (CONCAT_func) Fix memory leak by incrementing struct
2034         nonterm_node's n earlier.
2035         (generic_str_func) Ditto.
2036         
2037 Mon Mar 29 15:32:17 2004  Ben Pfaff  <blp@gnu.org>
2038
2039         Add support for multipass procedures.  Rewrite DESCRIPTIVES to
2040         test multipass support, take advantage of new moments
2041         calculation, and to not be such crappy code.  Get rid of q2c
2042         processing for DESCRIPTIVES.
2043
2044         * vfm.c: (struct multipass_split_aux_data) New structure.
2045         (multipass_procedure_with_splits) New function.
2046         (multipass_split_callback) New function.
2047         (multipass_split_output) New function.
2048         * descript.q: Removed.
2049
2050         * descript.c: New file.
2051
2052         * var.h: Removed descriptives enums.
2053         (struct descriptives_proc) Removed.
2054         (struct variable) Removed p.dsc.
2055
2056         * Makefile.am: (q_sources_c) Remove descript.c.
2057         (q_sources_q) Removed descript.q.
2058         
2059 Mon Mar 29 15:31:55 2004  Ben Pfaff  <blp@gnu.org>
2060
2061         New manager for keeping track of used workspace.
2062         
2063         * workspace.c: New file.
2064
2065         * workspace.h: New file.
2066
2067         * Makefile.am: (pspp_SOURCES) Add workspace.c, workspace.h.
2068
2069         * sort.c: (do_internal_sort) Use workspace_malloc().
2070         (destroy_internal_sort) Use workspace_free().
2071
2072 Mon Mar 29 15:31:08 2004  Ben Pfaff  <blp@gnu.org>
2073
2074         New `struct casefile' for managing sets of cases.
2075
2076         * casefile.c: New file.
2077
2078         * casefile.h: New file.
2079
2080         * command.def: Add DEBUG CASEFILE command.
2081
2082         * Makefile.am: (pspp_SOURCES) Add casefile.c, casefile.h.
2083
2084         * sort.c: (sort_cases) Move logic for sending storage file to disk
2085         into do_external_sort().
2086         (struct internal_sort) Use an array of ccase pointers instead of a
2087         case_list.
2088         (do_internal_sort) Rewrite to handle casefiles.
2089         (compare_case_list) Removed.
2090         (compare_cases) New function.
2091         (compare_case_dblptrs) New function.
2092         (read_internal_sort_output) Deal with new struct internal_sort.
2093
2094         * vfm.c: (static var workspace_overflow) Removed.
2095         (struct storage_stream_info) Removed all the members.  Added
2096         struct casefile * member.
2097         (storage_sink_open) Use casefile.
2098         (open_storage_file) Removed.
2099         (write_storage_file) Removed.
2100         (storage_to_disk) Removed.
2101         (destroy_storage_stream_info) Use casefile.
2102         (storage_sink_write) Use casefile.
2103         (storage_sink_make_source) Use casefile.
2104         (storage_source_count) Use casefile.
2105         (storage_source_read) Use casefile.
2106         (storage_source_on_disk) Removed.
2107         (storage_source_get_cases) Removed.
2108         (storage_source_set_cases) Removed.
2109         (storage_source_get_casefile) New function.
2110         
2111 Mon Mar 29 15:30:09 2004  Ben Pfaff  <blp@gnu.org>
2112
2113         New `struct moments' for calculating moments.
2114
2115         * stats.c: Removed.
2116
2117         * stats.h: Removed.
2118
2119         * moments.c: New file.
2120
2121         * moments.h: New file.
2122
2123         * command.def: Add DEBUG MOMENTS command.
2124
2125         * Makefile.am: (pspp_SOURCES) Add moments.c, moments.h.  Remove
2126         stats.c, stats.h.
2127
2128         * aggregate.c: Modify AGGREGATE to use the new moments
2129         calculation, even if not in such a great way.
2130         (struct agr_var) Add `moments' member.
2131         (parse_aggregate_functions) Set `moments' member to null.
2132         (agr_destroy) Destroy `moments' member.
2133         (accumulate_aggregate_info) Use `moments' for standard deviation.
2134         (dump_aggregate_info) Ditto.
2135         (initialize_aggregate_info) Create or clear `moments'.
2136
2137         * misc.h: Add pow2(), pow3(), pow4() functions in place of sqr(),
2138         cube(), pow4() that were in stats.h.  All references updated.
2139
2140         * crosstabs.q: stats.h had chi-square significance functions.  Use
2141         GSL instead.
2142         (display_chisq) Use gsl_cdf_chisq_Q() instead of chisq_sig().
2143
2144         * expr-evl.c: (expr_evaluate) Use moments_of_values() for
2145         OP_CFVAR, OP_MEAN, OP_SD, OP_VARIANCE.
2146                 
2147 Fri Mar 26 14:21:23 2004  Ben Pfaff  <blp@gnu.org>
2148
2149         * dictionary.c: (dict_compact_values) Compacted values need to
2150         start off from 0.
2151
2152 Fri Mar 26 00:54:57 2004  Ben Pfaff  <blp@gnu.org>
2153
2154         * var-labs.c: (cmd_variable_labels) For compatibility, don't allow
2155         `/' at start.  Check return value of parse_variables() for error
2156         return.
2157
2158 Fri Mar 26 00:19:27 2004  Ben Pfaff  <blp@gnu.org>
2159
2160         Revamp expressions: make the code a little nicer, and fix bugs
2161         found in testing.
2162         
2163         * expr-evl.c: (expr_evaluate) Make expression argument const.
2164         Support OP_ADD, OP_SUB, OP_MUL, OP_DIV instead of OP_PLUS, OP_MUL.
2165         OP_POW is missing for arg 2 <= 0.  OP_LOG is natural log, not
2166         base-10 log.  Fix OP_ANY, OP_ANY_STRING, OP_RANGE, OP_RANGE_STRING
2167         off-by-ones.  Add OP_MAX_STRING, OP_MIN_STRING.  Fix OP_TIME_HMS,
2168         OP_DATE_WKYR boundary conditions.  Add OP_CTIME_DAYS,
2169         OP_CTIME_HOURS, OP_CTIME_MINUTES, OP_CTIME_DAYS, OP_CTIME_SECONDS.
2170         Support OP_INDEX_2, OP_INDEX_3, OP_RINDEX_2, OP_RINDEX_3 instead
2171         of OP_INDEX, OP_INDEX_OPT, OP_RINDEX, OP_RINDEX_OPT.  Merge
2172         OP_LPAD_OPT into OP_LPAD, OP_RPAD_OPT into OP_RPAD, OP_LTRIM_OPT
2173         into OP_LTRIM, OP_RTRIM_OPT into OP_RTRIM, OP_NUMBER_OPT into
2174         OP_NUMBER.  Fix OP_RTRIM fragility.  Support OP_SUBSTR_2,
2175         OP_SUBSTR_3 instead of OP_SUBSTR, OP_SUBSTR_OPT.  Remove OP_INV.
2176         Simplify OP_SYSMIS.  Remove OP_STR_MIS.
2177
2178         * expr-opt.c: (optimize_expression) Rewrite.
2179         (macro n0) Removed.
2180         (macro n1) Removed.
2181         (macro n2) Removed.
2182         (macro s0) Removed.
2183         (macro s0l) Removed.
2184         (macro s1) Removed.
2185         (macro s1l) Removed.
2186         (macro s2) Removed.
2187         (macro s2l) Removed.
2188         (macro s) Removed.
2189         (macro sl) Removed.
2190         (eq_num_con) New function.
2191         (optimize_tree) New function.
2192         (macro rnc) Removed.
2193         (macro frnc) Removed.
2194         (str_search) Add const to string params.
2195         (str_rsearch) Ditto.
2196         (evaluate_tree_no_missing) Renamed from evaluate_tree.  Add num[],
2197         str[], str_len[] locals to substitute for most of removed macros.
2198         Support OP_ADD, OP_SUB, OP_MUL, OP_DIV instead of OP_PLUS, OP_MUL.
2199         Removed support for missing values because we're never called with
2200         missing values.  Use set_number() or set_number_errno() instead of
2201         rnc or frnc.  Removed any stuff that caused trouble in testing.
2202         We can re-add it later if it really slows anything.  Fix some
2203         random problems.
2204         (evaluate_tree_with_missing) Not yet supported.  To be added later
2205         if it's important.
2206         (repl_num_con) Removed.
2207         (collapse_node) New function.
2208         (force_repl_num_con) Removed.
2209         (set_number) New function.
2210         (set_number_errno) New function.
2211         (repl_str_con) Removed.
2212         (set_string) New function.
2213         (yrmoda) Tighten boundary conditions.  Adopt 2030 cut-off for
2214         2-digit years.
2215         (dump_node) No special case for OP_AND, OP_OR.
2216
2217         * expr-prs.c: (expr_prs) Honor EXPR_NO_OPTIMIZE bit.  Rewrite.
2218         (expr_get_type) New function.
2219         (type_check) Rewrite.
2220         (type_coercion) New function.
2221         (struct operator) New structure.
2222         (match_operator New function.
2223         (parse_binary_operators) New function.
2224         (parse_inverting_unary_operator) New function.
2225         (parse_or) Rewritten.
2226         (parse_and) Rewritten.
2227         (parse_not) Rewritten.
2228         (parse_rel) Rewritten.
2229         (parse_add) Rewritten.
2230         (parse_mul) Rewritten.
2231         (parse_neg) Rewritten.
2232         (parse_exp) Rewritten.
2233         (parse_sysvar) Add $TRUE, $FALSE system variables.
2234         Get $LENGTH, $WIDTH from get_viewlength(), get_viewwidth().
2235         (parse_primary) Use allocate_var_node(), allocate_num_con(),
2236         allocate_str_con().
2237         (struct function) Remove desc, change `func' prototype.
2238         (unary_func) Remove special cases.
2239         (MISSING_func) Reduce to unary_func() that just returns a boolean.
2240         (SYSMIS_func) Handle SYSMIS((x)) like SYSMIS(x).
2241         (VALUE_func) Use allocate_var_node().
2242         (nary_num_func) Allow MIN and MAX for strings.
2243         Use allocate_var_node().  Properly clean up.
2244         Fix return type.
2245         (generic_str_func) Use local table instead of removed `desc'
2246         member.  Mostly rewrite.
2247         (get_num_args) Revise error message.
2248         (parse_function) Return EXPR_ERROR, not 0 on error.
2249         (macro op) Removed.
2250         (macro varies) Removed.
2251         (ops[]) Use expr.def.
2252         (free_node) Do nothing if node is null.
2253         (allocate_num_con) New function.
2254         (allocate_str_con) New function.
2255         (allocate_var_node) New function.
2256         (allocate_binary_nonterminal) New function.
2257         (append_nonterminal_arg) Removed.
2258         (static var func_tab[]) Revised.
2259         (expr_debug_print_postfix) Make parameter const.
2260         Use printf() instead of debug_printf().
2261
2262         * expr.def: New file.
2263         
2264         * expr.h: Change PXP_* to EXPR_*, all references updated.  Also
2265         use named enum instead of unnamed, all references updated.  Add
2266         EXPR_ANY, EXPR_NO_OPTIMIZE.
2267
2268         * exprP.h: Remove EX_*.  Add DEFINE_OPERATOR.  Use expr.def
2269         instead of defining OP_* directly.
2270         (macro IS_TERMINAL) New macro.
2271         (macro IS_NONTERMINAL) New macro.
2272         (enum OP_NO_FLAGS) New.
2273         
2274 Fri Mar 26 00:18:01 2004  Ben Pfaff  <blp@gnu.org>
2275
2276         * error.c: (err_assert_fail) msg variable needs to be non-const.
2277
2278 Fri Mar 26 00:17:24 2004  Ben Pfaff  <blp@gnu.org>
2279
2280         * debug.c: (cmd_debug_evaluate) Rewrite.
2281
2282 Fri Mar 26 00:15:13 2004  Ben Pfaff  <blp@gnu.org>
2283
2284         Fix some CROSSTABS bit rot stupidity.
2285
2286         * crosstabs.q: Reorder the CELLS subcommands for compatibility.
2287         (internal_cmd_crosstabs) Initializes cells[] correctly.
2288         (float_M_suffix) Rename format_cell_entry(), change prototype,
2289         rewrite.
2290         (display_crosstabulation) Fix cell formatting.
2291
2292 Fri Mar 26 00:14:09 2004  Ben Pfaff  <blp@gnu.org>
2293
2294         Make lex_rest_of_line(), lex_entire_end() not discard lines.  Have
2295         to call lex_discard_line() to do that.
2296
2297         * command.c: (run_command) Call lex_discard_line() after
2298         lex_rest_of_line().
2299
2300         * lexer.c: (lex_entire_end) Change behavior.
2301         (lex_rest_of_line) Change behavior.  Return const char *.
2302         (lex_discard_line) Don't clear getl_buf, don't emit message.
2303
2304         * main.c: (handle_error) Emit message here.
2305
2306         * repeat.c: (internal_cmd_do_repeat) Use lex_discard_line()
2307         instead of lex_entire_line().
2308
2309         * str.c: (mm_find_reverse) Make length params size_t.  Rewrite.
2310
2311         * title.c: (get_title) Call lex_discard_line() after
2312         lex_rest_of_line().
2313         (cmd_file_label) Ditto.
2314         (cmd_document) Deal with const char * return value.
2315
2316 Fri Mar 26 00:10:16 2004  Ben Pfaff  <blp@gnu.org>
2317
2318         Removed REMARK command.
2319
2320         * command.c: (extract_prefix) Removed.
2321         (output_line) Removed.
2322         (cmd_remark) Removed.
2323
2324         * command.def: Remove REMARK.
2325
2326 Fri Mar 26 00:08:38 2004  Ben Pfaff  <blp@gnu.org>
2327
2328         Added abort() after lots of assert(0) invocations to avoid some
2329         compiler warnings.  We really need a NOT_REACHED macro.
2330
2331 Tue Mar 23 08:00:42 WAST 2004 John Darrington <john@darrington.wattle.id.au>
2332
2333         * sort.c: Added missing call to temp_file_close.  Changed error 
2334         messages to warnings.
2335
2336         * set.q: Improved setting of set_view{length,width} to be more tolerant
2337         of buggy OSes.
2338
2339 Sun Mar 21 10:11:14 WST 2004 John Darrington <john@darrington.wattle.id.au>
2340
2341         * val-labs.c: Fixed a bug where PSPP would crash, if VALUE LABELS was
2342         used with incorrect syntax.
2343
2344         * error.c, error.h et al:  Overridden definition of assert for a
2345         custom one.
2346
2347         * test-q.c: Fixed a buglet where it would crash if no /VARIABLES
2348         subcommand was given when it ought to have been.
2349
2350 Sat Mar 20 22:19:08 2004  Ben Pfaff  <blp@gnu.org>
2351
2352         * tab.c: (tab_vline) Fix assertions to respect row_ofs and
2353         col_ofs.
2354         (tab_hline) Ditto.
2355         (tab_box) Ditto.
2356         (tab_joint_text) Ditto.
2357
2358 Sat Mar 20 17:57:23 2004  Ben Pfaff  <blp@gnu.org>
2359
2360         * levene.c: Add #include.
2361
2362         * set.q: (set_viewport) Add `int' argument to make its prototype
2363         correct for signal().
2364
2365 Sat Mar 20 15:35:17 2004  Ben Pfaff  <blp@gnu.org>
2366
2367         * expr-evl.c: (expr_evaluate) Assert that `c' is nonzero before
2368         using it.
2369
2370 Sat Mar 20 15:18:16 2004  Ben Pfaff  <blp@gnu.org>
2371
2372         Changed DFM from open-at-first-access to explicit-open.  Before,
2373         calling dfm_get_record() or dfm_put_record() would automatically
2374         open the file.  Now, you have to call dfm_open_for_reading() or
2375         dfm_open_for_writing() explicitly.  This makes it possible to
2376         check permissions, file existence, etc. earlier.
2377
2378         Also made struct file_handle more opaque, and clean up in general.
2379
2380         * data-list.c: (cmd_data_list) Open handle for reading.
2381
2382         * dfm.c: (struct dfm_fhuser_ext) Add `where', `saw_begin_data'
2383         members.
2384         (open_file_r) Renamed dfm_open_for_reading(), rewrote.
2385         (open_file_w) Renamed dfm_open_for_writing(), rewrote.
2386         (open_inline_file) Removed.
2387         (read_record) For inline_file, if we haven't seen BEGIN DATA, read
2388         it.  Deal with line_number in extension record instead of file
2389         handle.
2390         (dfm_get_record) Rewrote.
2391         (dfm_put_record) Rewrote.
2392         (dfm_push) Assert file is open and one of ours.  Deal with
2393         line_number in extension record instead of file handle.
2394         (dfm_pop) Assert file is open and one of ours.  Deal with
2395         line_number in extension record instead of file handle.
2396         (cmd_begin_data) Use dfm_open_for_reading().  Mark that we saw
2397         BEGIN DATA.     
2398
2399         * file-handle.h: (enum constants RH_RF_*) Removed.
2400         (enum constants FH_MD_*) Removed.
2401         (struct file_handle) Removed `name', `norm_fn', `fn', `where',
2402         `recform', `lrecl', `mode' members.  Public references to
2403         `recform' changed to use handle_get_mode(), references to `lrecl'
2404         changed to use handle_get_record_width().  Added `private' member.
2405         (enum file_handle_mode) New.
2406
2407         * file-handle.q: (struct private_file_handle) New structure.
2408         (struct file_handle_list) New structure.
2409         (static var files) New.
2410         (static var file_handles) Removed.
2411         (init_file_handle) Removed.
2412         (create_file_handle) Removed.
2413         (get_handle_with_name) New function.
2414         (get_handle_for_filename) New function.
2415         (cmd_file_handle) Rewritten.
2416         (hash_file_handle) Removed.
2417         (cmp_file_handle) Removed.
2418         (fh_init_files) Rewritten.
2419         (fh_parse_file_handle) Rewritten.  Allows identifiers as
2420         filenames.
2421         (fh_get_handle_by_name) Renamed handle_get_name(), all references
2422         updated.  Rewritten.
2423         (fh_get_handle_by_filename) Renamed handle_get_filename(), all
2424         references updated.  Rewritten.
2425         (fh_record_width) Renamed handle_get_record_width(), all
2426         references updated.  Rewritten.
2427         (handle_get_mode) New function.
2428
2429         * file-type.c: (cmd_file_type) Open handle for reading.
2430
2431         * filename.c: [unix] (struct file_identity) New structure.
2432         [unix] (fn_get_identity) New function.
2433         [unix] (fn_free_identity) New function.
2434         [unix] (fn_compare_file_identities) New function.
2435         [!unix] (struct file_identity) New structure.
2436         [!unix] (fn_get_identity) New function.
2437         [!unix] (fn_free_identity) New function.
2438         [!unix] (fn_compare_file_identities) New function.
2439
2440         * lexer.c: (static var put) Renamed put_token, all references
2441         updated.
2442         (static var put_tokstr) New.
2443         (static var put_tokval) New.
2444         (lex_init) Initialize put_tokstr().
2445         (restore_token) New function.
2446         (save_token) New function.
2447         (lex_get) Use restore_token().
2448         (lex_put_back) Use save_token().
2449         (lex_put_back_id) New function.
2450         (lex_put_forward) Removed.
2451         (lex_preprocess_line) Set put_token instead of using
2452         lex_put_forward().
2453         (lex_negative_to_dash) Use save_token(), set put_token directly.
2454         (dump_token) Use stderr instead of stdout.
2455
2456         * main.c: (main) Remove call to cmd_init().
2457         
2458         * matrix-data.c: (cmd_matrix_data) Open file for reading.
2459
2460         * pfm-read.c: Use handle_get_filename() instead of trying to use
2461         h->fn directly, all over.
2462
2463         * pfm-write.c: Ditto.
2464
2465         * print.c: (internal_cmd_print) Open handle for writing.
2466         (dump_table) Use handle_get_filename().
2467         (print_trns_proc) Use handle_get_mode().
2468         (cmd_print_space) Use fh_parse_file_handle().
2469         Open handle for writing.
2470         [0] (debug_print) Removed.
2471
2472         * sfm-read.c: Use handle_get_filename() instead of trying to use
2473         h->fn directly, all over.
2474
2475         * sfm-write.c: Ditto.
2476
2477 Sat Mar 20 14:35:48 2004  Ben Pfaff  <blp@gnu.org>
2478
2479         Fix memory leaks.
2480         
2481         * autorecode.c: (arc_free) Free arc->src_values.
2482
2483         * error.c: (msg) Free buf.
2484
2485         * val-labs.c: (do_value_labels) Always free vars.
2486
2487         * vfm.c: (close_active_file) If sink has no make_source then call
2488         its destroy function.
2489
2490 Sat Mar 20 14:00:24 2004  Ben Pfaff  <blp@gnu.org>
2491
2492         Fixed cmd_parse() so that it always skips past a full command
2493         name.  A few special commands for which this would be bad get
2494         special treatment.  This lets us drop code for skipping past the
2495         end of a command name in most cmd_*() functions.  It's not worth
2496         listing all the commands affected.
2497
2498         * command.c: (struct command) Remove `cmd' member, replace by
2499         `name' member, all references updated.  Remove `word', `next',
2500         `skip_entire_name' members.
2501         (macro DEFCMD) Deal with revised `struct command'.
2502         (macro UNIMPL) Ditto.
2503         (macro SPCCMD) New macro for commands whose last word shouldn't be
2504         skipped.
2505         (static array cmd_table[]) Make const, rename `commands', remove
2506         sentinel element.
2507         (macro COMMAND_CNT) New macro.
2508         (split_words) Removed.
2509         (cmd_init) Removed.
2510         (FILE_TYPE_okay) Make parameter const.
2511         (cmd_parse) Improve error messages.
2512         (match_strings) New function.
2513         (next_word) New function.
2514         (enum command_match) New enum.
2515         (conflicting_3char_prefixes) New function.
2516         (conflicting_3char_prefix_command) New function.
2517         (cmd_match_words) New function.
2518         (count_matching_commands) New function.
2519         (get_command_name) New function.
2520         (free_words) New function.
2521         (unknown_command_error) New function.
2522         (figure_out_command) Renamed parse_command_name(), rewritten.
2523
2524         * command.def: Removed @ command.  Marked BEGIN DATA, DOCUMENT,
2525         FILE LABEL, REMARK, SUBTITLE, TITLE as special.  Renamed EVALUATE
2526         to DEBUG EVALUATE.  Added N alias for N OF CASES, SORT alias for
2527         SORT CASES.
2528
2529         * command.h: (macro SPCCMD) New.
2530
2531         * include.c: (cmd_include_at) Removed.
2532         (cmd_include) Allow identifier to be used as filename.
2533
2534         * inpt-pgm.c: (cmd_reread) Use fh_parse_file_handle().
2535
2536         * t-test.q: (cmd_t_test) Command name is now parsed for us.
2537         
2538
2539 Sat Mar 20 13:56:00 2004  Ben Pfaff  <blp@gnu.org>
2540
2541         Start work on better test framework.
2542         
2543         * Makefile.am: (pspp_sources) Add debug.c.
2544         
2545         * debug.c: New file.
2546
2547         * compute.c: (cmd_evaluate) Moved to debug.c, renamed
2548         cmd_debug_evaluate().
2549
2550         * expr-prs.c: (expr_parse) Remove PXP_DUMP support.
2551
2552         * expr.h: (enum constant PXP_DUMP) Removed.
2553
2554 Sat Mar 20 00:05:42 WST 2004 John Darrington <john@darrington.wattle.id.au>
2555
2556         * set.q:  Implemented the SHOW command, and synced it to the existing 
2557         SET cmd.
2558
2559         Added a handler for SIGWINCH so that viewlength and viewwidth follow
2560         changes as the window size is changed.
2561
2562         Added fallback to set viewlength and viewwidth from LINES and COLUMS
2563         environment variables if other methods are not available.
2564
2565         glob.c: Removed a lot of global variables from glob.c and encapsulated 
2566         them in set.q
2567
2568         random.c: Tidied up the way the random seed is set.
2569
2570         str.c: Added a ds_vprintf function.
2571
2572         error.c: Extended dump_message so that messages are always broken at
2573         '\n' characters.
2574         
2575 Thu Mar 18 11:07:14 2004  Ben Pfaff  <blp@gnu.org>
2576
2577         * pfm-write.c: (bufwrite) Write out the correct element for string
2578         variables.  From Andreas Streichardt <streichardt@globalpark.de>.
2579
2580 Mon Mar 15 20:48:03 2004  Ben Pfaff  <blp@gnu.org>
2581
2582         Get rid of static and global (!) vars in matrix-data.c.
2583
2584         * matrix-data.c: (static var nr_data) Removed.
2585         (static var nr_factor_values) Removed.
2586         (static var max_cell_index) Removed.
2587         (static var split_values) Removed.
2588         (struct nr_aux_data) New structure.
2589         (read_matrices_without_rowtype) Use a local struct nr_aux_data in
2590         place of static vars, pass to create_case_source() and procedure()
2591         as aux data.
2592         (nr_read_data_lines) Use struct nr_aux_data * parameter instead of
2593         struct matrix_data_pgm *.
2594         (nr_read_splits) Ditto.
2595         (nr_read_factors) Ditto.
2596         (nr_output_data) Ditto.
2597         (static var wr_content) Removed.
2598         (global var wr_data) Removed.
2599         (global var wr_current) Removed.
2600         (struct wr_aux_data) New structure.
2601         (read_matrices_with_rowtype) Use a local struct wr_aux_data in
2602         place of static vars, pass to create_case_source() and procedure()
2603         as aux data.
2604         (matrix_data_read_with_rowtype) Use struct wr_aux_data * parameter
2605         instead of matrix_data_pgm *.
2606         (wr_read_splits) Ditto.
2607         (wr_output_data) Ditto.
2608         (wr_read_rowtype) Ditto.
2609         (wr_read_factors) Ditto.
2610         (wr_read_indeps) Ditto.
2611         
2612 Mon Mar 15 20:07:29 2004  Ben Pfaff  <blp@gnu.org>
2613
2614         Get rid of static vars in autorecode.c.
2615
2616         * autorecode.c: (struct autorecode_trns) Rename `arc' to `specs',
2617         `n_arc' to `spec_cnt'.  All references updated.
2618         (static var v_src) Removed.
2619         (static var v_dest) Removed.
2620         (static var h_trns) Removed.
2621         (static var nv_src) Removed.
2622         (static var descend) Removed.
2623         (static var print) Removed.
2624         (enum direction) New enum.
2625         (struct autorecode_pgm) New structure.
2626         (cmd_autorecode) Use struct autorecode_pgm instead of static vars.
2627         Move n_dest local var into struct autorecode_pgm for ease of
2628         clean-up.  Use arc_free().
2629         (arc_free) New function.
2630         (recode) Modify to take struct autorecode_pgm * parameter instead
2631         of using statics.  Let the caller clean up.
2632         (autorecode_proc_func) Use struct autorecode_pgm * auxiliary data
2633         instead of statics.  Rearrange code a little.
2634
2635 Mon Mar 15 00:25:02 2004  Ben Pfaff  <blp@gnu.org>
2636
2637         Get rid of static, global vars in recode.c.  Remove debug code.
2638
2639         * recode.c: (static var head) Removed.
2640         (global var v) Removed.
2641         (global var nv) Removed.
2642         (cmd_recode) New local variables head, v, nv.  Initialize and free
2643         v.  Don't call debug_print().
2644         [DEBUGGING] (dump_dest) Removed.
2645         [DEBUGGING] (debug_print) Removed.
2646
2647 Mon Mar 15 00:14:49 2004  Ben Pfaff  <blp@gnu.org>
2648
2649         Get rid of static vars in expr-opt.c.
2650
2651         * expr-opt.c: (static var e) Removed.
2652         (static var nop) Removed.
2653         (static var mop) Removed.
2654         (static var ndbl) Removed.
2655         (static var mdbl) Removed.
2656         (static var nstr) Removed.
2657         (static var mstr) Removed.
2658         (static var nvars) Removed.
2659         (static var mvars) Removed.
2660         (struct expr_dump_state) New structure.
2661         (dump_expression) Use new struct expr_dump_state instead of static
2662         vars and pass to functions we call.
2663         (dump_node) Use struct expr_dump_state * parameter.
2664         (emit) Ditto.
2665         (emit_num_con) Ditto.
2666         (emit_str_con) Ditto.
2667         (emit_var) Ditto.
2668         
2669 Mon Mar 15 00:03:51 2004  Ben Pfaff  <blp@gnu.org>
2670
2671         Get rid of static var in COUNT.
2672
2673         * count.c: (static var head) Move into cmd_count().
2674         (cmd_count) [DEBUGGING] Don't call debug_print.
2675         [DEBUGGING] (debug_print) Removed.
2676
2677 Sun Mar 14 23:56:09 2004  Ben Pfaff  <blp@gnu.org>
2678
2679         Get rid of static vars in VALUE LABELS, ADD VALUE LABELS.
2680
2681         * val-labs.c: (static var v) Removed.
2682         (static var nv) Removed.
2683         [DEBUGGING] (debug_print) Removed.
2684         (verify_val_labs) Add struct variable **, int parameters.
2685         (get_label) Ditto.  Improve error messages, streamline.
2686         (erase_labels) New function for erasing value labels, taking over
2687         part of verify_val_labs()'s function.
2688         (init) Removed.
2689         (done) Removed.
2690         (cmd_value_labels) No need to call init() or done() anymore.
2691         (cmd_add_value_labels) Ditto.
2692         (do_value_labels) Add vars, var_cnt local variables.  Clean up
2693         after them internally.  Call erase_labels() if we should.  Don't
2694         call debug_print().
2695
2696 Sun Mar 14 23:33:53 2004  Ben Pfaff  <blp@gnu.org>
2697
2698         Get rid of static vars in MATCH FILES.
2699         
2700         * get.c: (static var mtf_head) Removed.
2701         (static var mtf_tail) Removed.
2702         (static var mtf_by) Removed.
2703         (static var mtf_n_by) Removed.
2704         (static var mtf_master) Removed.
2705         (static var mtf_seq_num) Removed.
2706         (static var mtf_seq_nums) Removed.
2707         (static var mtf_sink) Removed.
2708         (static var mtf_case) Removed.
2709         (struct mtf_proc) New structure.
2710         (cmd_match_files) Use struct mtf_proc instead of static vars.
2711         (mtf_processing_finish) Ditto.
2712         (mtf_free) Ditto.
2713         (mtf_delete_file_in_place) Ditto.
2714         (mtf_read_nonactive_records) Ditto.
2715         (mtf_compare_BY_values) Ditto.
2716         (mtf_processing) Ditto.
2717         (mtf_merge_dictionary) Ditto.
2718
2719 Sun Mar 14 22:48:12 2004  Ben Pfaff  <blp@gnu.org>
2720
2721         * command.def: Add CASESTOVARS, VARSTOCASES unimplemented commands.
2722
2723         * dictionary.c: (dict_rename_var) Add assertion.
2724         (dict_contains_var) Check by index instead of name.
2725
2726 Sun Mar 14 22:01:02 2004  Ben Pfaff  <blp@gnu.org>
2727
2728         Get rid of compaction_necessary, compaction_nval, compaction_case.
2729         Redo VFM interface.  Replace disk_sink and memory_sink by
2730         storage_sink, disk_source and memory_source by storage_source.
2731
2732         * vfm.h: (struct case_sink) Add `dict', `idx_to_fv', `value_cnt'
2733         members.
2734
2735         * vfm.c: 
2736         (struct write_case_data) Remove `begin_func', `end_func',
2737         `func_aux' members.  Add `aux', `trns_case', `sink_case',
2738         `cases_written', `cases_analyzed' members.
2739         (global var compaction_necessary) Make static.
2740         (global var compaction_nval) Removed.
2741         (global var compaction_case) Removed.
2742         (static var case_count) Removed.
2743         (struct procedure_aux_data) Removed.
2744         (struct split_aux_data) Removed.
2745         (procedure) Remove begin_func, end_func parameters.  Rewrite.
2746         (static var not_canceled) Removed.
2747         (process_active_file) Removed.
2748         (process_active_file_write_case) Removed.
2749         (process_active_file_output_case) Removed.
2750         (prepare_for_writing) Moved into open_active_file().
2751         (arrange_compaction) Ditto.
2752         (setup_lag) Ditto.
2753         (open_active_file) Rewrote.
2754         (write_case) New function.
2755         [DEBUGGING] (index_to_varname) Removed.
2756         (execute_transformations) New function.
2757         (exclude_this_case) Renamed filter_case(), changed interface.
2758         (clear_case) Added struct ccase * parameter to interface.
2759         (close_active_file) Added struct write_case_data * parameter,
2760         rewrote.
2761         (disk_sink_create) Removed.
2762         (disk_sink_destroy) Removed.
2763         (disk_sink_make_source) Removed.
2764         (disk_sink_write) Removed.
2765         (disk_source_count) Removed.
2766         (disk_source_destroy) Removed.
2767         (disk_source_read) Removed.
2768         (global var disk_sink_class) Removed.
2769         (global var disk_source_class) Removed.
2770         (global var memory_sink_class) Removed.
2771         (global var memory_source_class) Removed.
2772         (memory_sink_create) Removed.
2773         (memory_sink_destroy) Removed.
2774         (memory_sink_make_source) Removed.
2775         (memory_sink_write) Removed.
2776         (memory_source_count) Removed.
2777         (memory_source_destroy) Removed.
2778         (memory_source_get_cases) Removed.
2779         (memory_source_read) Removed.
2780         (memory_source_set_cases) Removed.
2781         (struct disk_stream_info) Removed.
2782         (struct memory_sink_info) Removed.
2783         (struct memory_source_info) Removed.
2784         (write_active_file_to_disk) Removed.
2785         (destroy_storage_stream_info) New function.
2786         (global var null_sink_class) New var.
2787         (global var storage_sink_class) New var.
2788         (global var storage_source_class) New var.
2789         (open_storage_file) New function.
2790         (storage_sink_destroy) New function.
2791         (storage_sink_make_source) New function.
2792         (storage_sink_open) New function.
2793         (storage_sink_write) New function.
2794         (storage_source_count) New function.
2795         (storage_source_destroy) New function.
2796         (storage_source_get_cases) New function.
2797         (storage_source_on_disk) New function.
2798         (storage_source_read) New function.
2799         (storage_source_set_cases) New function.
2800         (storage_source_to_disk) New function.
2801         (storage_to_disk) New function.
2802         (struct storage_stream_info) New structure.
2803         (write_storage_file) New function.
2804         (procedure_write_case) Removed.
2805         (create_case_source) Add `struct dictionary *' parameter, all
2806         references updated.
2807         (create_case_sink) Ditto.
2808         (free_case_sink) New function.
2809         (struct split_aux_data) New structure.
2810         (procedure_with_splits) New function implementing what procedure()
2811         used to.
2812         (SPLIT_FILE_proc_func) Removed.
2813         (procedure_with_splits_callback) New function.
2814         (equal_splits) New function.
2815         
2816         * aggregate.c: Pass around a struct instead of using statics.
2817         (static var outfile) Remove.
2818         (enum type) Give it tag `missing_treatment'.
2819         (static var missing) Remove.
2820         (static var sort) Remove.
2821         (static var agr_first) Remove.
2822         (static var agr_next) Remove.
2823         (static var case_count) Remove.
2824         (static var prev_case) Remove.
2825         (static var buf64_1xx) Remove.
2826         (static var buf_1xx) Remove.
2827         (struct agr_proc) New structure incorporating the above.
2828         (cmd_aggregate) Use new struct.  Clean up error handling using
2829         agr_destroy().  Completely rewrite actual implementation of
2830         aggregation.
2831         (create_sysfile) Add struct agr_proc * parameter, modify
2832         accordingly.
2833         (parse_aggregate_functions) Ditto.
2834         (free_aggregate_functions) Ditto.  Rename agr_destroy().
2835         (aggregate_single_case) Add struct agr_proc * parameter, modify
2836         accordingly.
2837         (accumulate_aggregate_info) Ditto.
2838         (dump_aggregate_info) Ditto.
2839         (initialize_aggregate_info) Ditto.
2840         (agr_00x_trns_proc) Removed.
2841         (agr_00x_end_func) Removed.
2842         (agr_10x_trns_proc) Removed.
2843         (agr_10x_trns_free) Removed.
2844         (agr_10x_end_func) Removed.
2845         (agr_11x_read) Removed.
2846         (agr_11x_finish) Removed.
2847         [DEBUGGING] (debug_print) Removed.
2848         (write_case_to_sfm) Add struct agr_proc * parameter, modify
2849         accordingly.
2850         (agr_to_active_file) New function.
2851         (presorted_agr_to_sysfile) New function.
2852         (sort_agr_to_sysfile) New function.
2853
2854         * autorecode.c: (cmd_autorecode) Use procedure_with_splits().
2855
2856         * crosstabs.q: (internal_cmd_crosstabs) Ditto.
2857
2858         * descript.q: (cmd_descriptives) Ditto.
2859
2860         * dfm.c: (cmd_begin_data) Check for storage_source_class.  Adapt
2861         to new procedure() interface.
2862
2863         * command.c: (cmd_execute) Adapt to new procedure() interface.
2864
2865         * dictionary.c: (dict_compact_values) Also delete scratch
2866         variables.
2867         (dict_get_compacted_value_cnt) New function.
2868         (dict_get_compacted_idx_to_fv) New function.
2869
2870         * flip.c: (cmd_flip) Warn about and cancel TEMPORARY.
2871         (cmd_flip) Adapt to new procedure() interface.
2872         (flip_sink_write) Use sink->idx_to_fv.
2873
2874         * frequencies.q: (internal_cmd_frequencies) Use
2875         procedure_with_splits().
2876
2877         * get.c: (cmd_save_internal) Adapt to new procedure() interface.
2878         (static var mtf_sink) New static var.
2879         (static var mtf_case) New static var.
2880         (cmd_match_files) Warn about and cancel TEMPORARY.  Redo the way
2881         we actually implement the matching.
2882         (mtf_delete_file_in_place) Use mtf_case.
2883         (mtf_processing) Use mtf_case and mtf_sink.
2884         (cmd_export) Adapt to new procedure() interface.
2885
2886         * levene.c: (levene) Use procedure_with_splits().
2887
2888         * list.q: (cmd_list) Use procedure_with_splits().
2889
2890         * matrix-data.c: (read_matrices_without_rowtype) Adapt to new
2891         procedure() interface.
2892         (read_matrices_with_rowtype) Ditto.
2893
2894         * modify-vars.c; (cmd_modify_vars) Warn about and cancel
2895         TEMPORARY.  Adapt to new procedure() interface.
2896
2897         * rename-vars.c: Warn about and cancel TEMPORARY.
2898
2899         * sort.c: (cmd_sort_cases) Warn about TEMPORARY.
2900         (sort_cases) Use dict_get_compacted_value_cnt() instead of
2901         compaction_nval.  Adapt to new procedure() interface.  Use
2902         storage_source_to_disk().
2903         (do_internal_sort) Don't try to dump the cases to memory.
2904         (compare_case_lists) Pass null idx_to_fv.
2905         (struct initial_run_state) Add `idx_to_fv' member.  Remove
2906         `case_size' member.
2907         (write_initial_runs) Don't initialize irs->case_size.  Adapt to
2908         new procedure() interface.  Reset irs->idx_to_fv after calling
2909         procedure().
2910         (sort_sink_write) Set irs->idx_to_fv.  Use case_size from struct
2911         sort_cases_pgm.  Pass irs, not struct sort_cases_pgm to
2912         push_heap().
2913         (destroy_initial_run_state) Don't dereference irs after freeing
2914         it.
2915         (allocate_cases) Don't calculate case_size locally.
2916         (compare_record) Add idx_to_fv parameter.
2917         (compare_record_run) Change parameter from struct sort_cases_pgm *
2918         to struct initial_run_state *.  Pass irs->idx_to_fv to
2919         compare_record().
2920         (compare_record_run) Third parameter now a struct
2921         initial_run_state *.
2922         (output_record) No need for out_case anymore.  Pass irs, not
2923         struct sort_cases_pgm to pop_heap().  Use case_size from struct
2924         sort_cases_pgm.
2925         (merge) Use case_size from struct sort_cases_pgm.
2926         (merge_once) Use case_size from struct sort_cases_pgm.
2927         Pass null pointer to compare_record() as idx_to_fv.
2928         (global var sort_sink_class) Make static.
2929
2930         * t-test.q: (cmd_t_test) Use procedure_with_splits().
2931
2932         * temporary.c: Remove debugging crap.
2933
2934 Sat Mar 13 14:19:52 WST 2004 John Darrington <john@darrington.wattle.id.au>
2935
2936         * t-test.q, levene.c: Fixed up the handling of MISSING values
2937         int the T-TEST
2938
2939 Fri Mar 12 16:23:35 WST 2004 John Darrington <john@darrington.wattle.id.au>
2940
2941         * t-test.q, levene.c: Added support for T-TEST /GROUP where only 
2942         one value is given.
2943
2944 Wed Mar 10 23:25:13 2004  Ben Pfaff  <blp@gnu.org>
2945
2946         Change explicit variable name checks into use of
2947         dict_class_from_id().
2948
2949         * dictionary.c: (dict_create_var)  Change explicit variable name
2950         check into use of dict_class_from_id().
2951
2952         * get.c: (trim_dictionary) Ditto.
2953
2954         * sel-if.c: (cmd_filter) Ditto.
2955
2956         * sysfile-info.c: (cmd_display) Ditto.
2957
2958         * vars-prs.c: (parse_DATA_LIST_vars) Ditto.
2959
2960         * vfm.c: (arrange_compaction) Ditto.
2961
2962         * weight.c: (cmd_weight) Ditto.
2963
2964 Wed Mar 10 21:16:34 2004  Ben Pfaff  <blp@gnu.org>
2965
2966         * temporary.c: (cmd_temporary) When TEMPORARY was the first
2967         transformation following the input program, if any, for some
2968         reason we special-cased f_trns.  That's just wrong.  It should
2969         always be set to n_trns.
2970
2971 Tue Mar  9 23:44:40 2004  Ben Pfaff  <blp@gnu.org>
2972
2973         * format.c: (parse_format_specifier_name) Fix brown-bag bug
2974         introduced in last check-in.
2975
2976 Tue Mar  9 23:10:41 2004  Ben Pfaff  <blp@gnu.org>
2977
2978         * format.c: (global array translate_fmt[]) Removed.
2979         (translate_fmt) New function as replacement.
2980         (parse_format_specifier_name) Rewrite.
2981
2982         * pfm-read.c: (convert_format) Use translate_fmt() instead of
2983         translate_fmt[].
2984
2985         * sfm-read.c: (parse_format_spec) Ditto.
2986
2987         * postscript.c: (text) Fix handling of fonts with missing
2988         ligatures.
2989
2990         * sort.c: (struct external_sort) Add temp_name member.
2991         (destroy_external_sort) Free temp_dir, temp_name members.
2992         (init_external_sort) Allocate temp_name.
2993         (get_temp_file_name) Change prototype.
2994         (open_temp_file) Deal with change to get_temp_file_name().
2995         (close_temp_file) Ditto.
2996         (remove_temp_file) Ditto.
2997         (write_temp_file) Ditto.
2998         (read_temp_file) Ditto.
2999         (sort_sink_destroy) Removed.
3000         (sort_sink_class) Change destroy member to null.
3001
3002 Tue Mar  9 22:36:34 2004  Ben Pfaff  <blp@gnu.org>
3003
3004         Eliminate temp_case.
3005
3006         * aggregate.c: (cmd_aggregate) No need to save/restore temp_case
3007         anymore.  Use agr_11x_finish().
3008         (aggregate_single_case) Make first param const.
3009         (accumulate_aggregate_info) Ditto.
3010         (agr_00x_end_func) Use compaction_case, not temp_case.
3011         (agr_11x_func) Break into agr_11x_read(), agr_11x_finish().
3012
3013         * data-list.c: (struct data_list_pgm) Add `case_size' member.
3014         (cmd_data_list) Initialize case_size.
3015         (read_from_data_list_fixed) Add struct ccase * param, use instead
3016         of temp_case.
3017         (read_from_data_list_free) Ditto.
3018         (read_from_data_list_list) Ditto.
3019         (read_one_case) Rename data_list_trns_proc(), all references
3020         updated.  Add argument in calling above functions.  Use c
3021         argument instead of temp_case.
3022         (destroy_dls) Rename data_list_trns_free(), all references
3023         updated.
3024
3025         * expr-evl.c: (expr_evaluate) Make second parameter const.
3026
3027         * file-type.c: (struct file_type_pgm) Add `case_size' member.
3028         (cmd_end_file_type) Initialize `case_size'.
3029         (file_type_source_read) Add struct ccase * parameter.  Use instead
3030         of temp_case.
3031
3032         * flip.c: Rewritten.
3033
3034         * get.c: (struct get_pgm) New structure to keep track of
3035         case_size.
3036         (cmd_get) Initialize case_size.
3037         (cmd_import) Ditto.
3038         (get_source) Deal with struct get_pgm.
3039         (get_source_read) Add struct ccase * parameter, use instead of
3040         temp_case.
3041         (import_source_read) Ditto.
3042
3043         * get.c: Use a null pointer instead of temp_case to represent the
3044         "current case" in a struct mtf_file's input member.
3045         (mtf_processing_finish) Pass null to mtf_processing(), not
3046         temp_case.
3047         (mtf_read_nonactive_records) Don't set iter->input to temp_case.
3048         (mtf_compare_BY_values) Add extra arg, use instead of null input
3049         members.
3050         (mtf_processing) Use c parameter instead of temp_case.  Pass
3051         compaction_case to process_active_file_output_case().
3052         
3053         * glob.c: (global variable temp_case) Removed.
3054
3055         * inpt-pgm.c: (struct input_program_pgm) Add `case_size' member.
3056         (cmd_input_program) Initialize case_size.  Set
3057         vfm_source->value_cnt.
3058         (init_case) Add struct ccase * parameter, use instead of
3059         temp_case.
3060         (clear_case) Ditto.
3061         (input_program_source_read) Ditto.
3062
3063         * matrix-data.c: (matrix_data_read_without_rowtype) Ditto.
3064         (dump_cell_content) Ditto.
3065         (nr_output_data) Ditto.
3066         (read_matrices_without_rowtype) Ditto.
3067         (matrix_data_read_with_rowtype) Ditto.
3068         (wr_read_splits) Ditto.
3069         (wr_output_data) Ditto.
3070
3071         * sort.h: (struct sort_cases_pgm) New member `case_size'.
3072         
3073         * sort.c: (sort_cases) Initialize scp->case_size.
3074         (struct external_sort) Remove `case_size' member.
3075         (write_initial_runs) Only call vfm_sink->class_destroy if
3076         non-null.
3077         (struct sort_source_aux) New structure.
3078         (sort_source_read_helper) New function.
3079         (sort_source_read) Use sort_source_read_helper().
3080         (read_sort_output) Change interface to be more reasonable.
3081         (read_internal_sort_output) Ditto.
3082         (read_external_sort_output) Ditto.
3083
3084         * vars-prs.c: (dict_class_to_name) Pass return value through
3085         gettext.
3086
3087         * vfm.c: (struct procedure_aux_data) Add `trns_case' member.
3088         (procedure) Initialize trns_case.
3089         (procedure) Pass trns_case to vfm_source->class->read().
3090         Free trns_case.
3091         (process_active_file) Start using struct procedure_aux_data.
3092         (process_active_file_write_case) Pass trns_case to
3093         transformations, lag_case(), clear_case().
3094         (process_active_file_output_case) Add struct ccase * parameter.
3095         (create_trns_case) New function.
3096         (make_temp_case) Removed.
3097         (vector_initialization) Removed.
3098         (close_active_file) Only call make_source if non-null, otherwise
3099         set vfm_source to null pointer.  Don't free temp_case.
3100         (disk_source_read) Add struct ccase * parameter, use instead of
3101         temp_case.
3102         (memory_source_read) Ditto.
3103         (lag_case) Add const struct ccase * member.
3104         (procedure_write_case) Use trns_case instead of temp_case.
3105         (clear_case) Add struct ccase * member, use instead of temp_case.
3106         (exclude_this_case) Ditto.
3107         (create_case_source) Add struct dictionary * parameter, use to
3108         initialize source->value_cnt.
3109
3110         * vfm.h: (struct case_source) Add `value_cnt' member.
3111         (struct case_source_class) Add struct ccase * parameter to `read'
3112         member function pointer.
3113         (struct case_sink_class) Make struct ccase * parameter const in
3114         `write' member function pointer.
3115         
3116 Wed Mar  3 20:44:37 2004  Ben Pfaff  <blp@gnu.org>
3117
3118         Fix a lot of "possibly uninitialized variable" warnings.  Some of
3119         them are even real bugs.  A few of them make me wonder how the
3120         code ever worked.
3121
3122         * aggregate.c: (parse_aggregate_functions) Initialize `function.
3123
3124         * ascii.c: (output_lines) Add default case to switch.
3125
3126         * crosstabs.q: Remove static variable `expected' and all
3127         references to it.
3128         (display_crosstabulation) Always calculate expected value.
3129         (calc_chisq) Ditto.
3130         (output_pivot_table) Initialize `cmp'.
3131         (display_crosstabulation) New variable `last_row', which is
3132         initialized.
3133
3134         * data-in.c: (parse_numeric) Always initialize sign.  How did this
3135         work at all?!
3136
3137         * data-list.c: (repeating_data_trns_proc) Always initialize code.
3138         Always set info.ofs.  (How did this work?!)
3139
3140         * expr-opt.c: (optimize_tree) Always initialize `m'.
3141         (evaluate_tree) Always initialize `c'.  (How did this work?)
3142
3143         * frequencies.q: (frq_custom_variables) Always initialize min,
3144         max.
3145         (frq_custom_grouped) Always initialize `dl'.
3146
3147         * groff-font.c: (groff_read_font) Always initialize char_set.
3148
3149         * matrix-data.c: (nr_output_data) Initialize `split'.
3150         (wr_read_splits) Remove shadowing split_cnt declaration.
3151         (wr_output_data) Initialize `split'.
3152
3153         * output.c: (tokener) Skip add character on syntax error.
3154
3155         * pool.c: (pool_strndup) Always set `copy'.  (How did this work?!)
3156
3157         * postscript.c: (read_ps_encodings) Use line.string instead of
3158         uninitialized `bp'.
3159         (write_text) Add default case to switch.
3160         (text) Always initialize multiple variables.  Fix bug with
3161         ligatures.
3162
3163         * print.c: (fixed_parse_fortran) Initialize head.
3164         (alloc_line) Add default case to switch.
3165
3166         * recode.c: (parse_dest_spec) Handle case where nothing matches.
3167         (recode_trns_proc) Move variable declaration inward.  Add default
3168         case to switch.
3169
3170         * sfm-read.c: (read_header) Initialize skip_amt.
3171
3172         * sysfile-info.c: (display_variables) Always initialize pc.
3173
3174         * vars-prs.c: Initialized `included'.
3175
3176 Wed Mar  3 09:30:09 2004  Ben Pfaff  <blp@gnu.org>
3177
3178         * main.c: (main) sigaction()'s sa_flags member was uninitialized.
3179         Just use signal() instead.
3180
3181 Wed Mar  3 09:26:30 2004  Ben Pfaff  <blp@gnu.org>
3182
3183         Get rid of vfm_sink_info and vfm_source_info.
3184         
3185         * aggregate.c: (agr_00x_end_func) Don't increment
3186         sfm_sink_info.ncases.
3187
3188         * sort.c: (do_internal_sort) Get case count from
3189         vfm_source->class->count().
3190         (struct external_sort) Add `case_size' member.
3191         (do_external_sort) Initialize case_size.
3192         (struct initial_run_state) Add `case_size' member.
3193         (write_initial_runs) Initialize case_size.
3194         (sort_sink_write) Use case_size.
3195         (read_external_sort_output) Use case_size.  Get case_cnt from
3196         initial_runs.
3197
3198         * vfm.c: (struct write_case_data) Add underscores to existing arg
3199         names, all references updated.  Renamed `aux' as `func_aux', all
3200         references updated.  Added new `aux' member.
3201         (global var vfm_source_info) Removed.
3202         (global var vfm_sink_info) Removed.
3203         (struct procedure_aux_data) New.
3204         (struct split_aux_data) New.
3205         (procedure) Use `aux' fields for procedure_aux_data,
3206         split_aux_data.
3207         (process_active_file_write_case) Pass case_count + 1 to
3208         transformation procedures, exclude_this_case().
3209         (process_active_file_output_case) Don't increment
3210         vfm_sink_info.ncases.
3211         (prepare_for_writing) Don't initialize vfm_sink_info.  Don't try
3212         to send data to disk early.
3213         (make_temp_case) Don't use vfm_sink_info.case_size.
3214         (close_active_file) Don't initialize vfm_source_info.
3215         (struct disk_stream_info) New, to allow for case_cnt and case_size fields.
3216         (disk_sink_create) Initialize and/or update disk_stream_info.
3217         (disk_sink_write) Ditto.
3218         (disk_sink_destroy) Ditto.
3219         (disk_sink_make_source) Ditto.
3220         (disk_source_read) Ditto.
3221         (disk_source_destroy) Ditto.
3222         (global var disk_source_class) Add disk_source_count().
3223         (disk_source_count) New function.
3224         (struct memory_sink_info) Add `case_cnt', `case_size' members.
3225         (struct memory_source_info) Ditto.
3226         (memory_sink_create) Deal with case_cnt, case_size.
3227         (memory_sink_write) Ditto.
3228         (memory_sink_make_source) Ditto.
3229         (memory_source_read) Ditto.
3230         (memory_source_count) New function.
3231         (memory_source_class) Add memory_source_count().
3232         (procedure_write_case) Don't use vfm_sink_info.ncases.  Do use
3233         proc_aux->cases_written, and pass it to transformation procedures
3234         and exclude_this_case ().
3235         (exclude_this_case) Add case_num parameter.  Pass it to
3236         expr_evaluate().
3237         (SPLIT_FILE_procfunc) Use split_aux->prev_case instead of static
3238         variable.
3239
3240         * vfm.h: (struct case_source_class) Add `count' member.
3241
3242         * vfmP.h: (struct stream_info) Removed.
3243         (global variable vfm_source_info) Removed.
3244         (global variable vfm_sink_info) Removed.
3245         
3246 Tue Mar  2 23:38:17 2004  Ben Pfaff  <blp@gnu.org>
3247
3248         * var.h: (typedef trns_proc_func) New typedef.
3249         (trns_free_func) New typedef.
3250         (struct trns_header) Change `proc' to type trns_proc_func, `free'
3251         to type trns_free_func.  This only changes the actual type of
3252         trns_proc_func, adding a `case_num' parameter.  Updated all
3253         implementations to use the typedefs instead.
3254
3255         * compute.c: (compute_num) Pass case_num to expr_evaluate().
3256         (compute_num_vec) Ditto.
3257         (compute_str) Ditto.
3258         (compute_str_vec) Ditto.
3259
3260         * do-if.c: (do_if_trns_proc) Ditto.
3261
3262         * expr-evl.c: (expr_evaluate) Add new case_num parameter, use for
3263         OP_CASENUM.
3264
3265         * inpt-pgm.c: (input_program_source_read) Maintain case count,
3266         pass to transformation functions.
3267         (reread_trns_proc) Pass case_num arg to expr_evaluate().
3268
3269         * loop.c: (loop_1_trns_proc) Ditto.
3270         (loop_2_trns_proc) Ditto.
3271         (loop_3_trns_proc) Ditto.
3272
3273         * print.c: (print_space_trns_proc) Ditto.
3274
3275         * sel-if.c: (select_if_proc) Ditto.
3276
3277 Tue Mar  2 11:36:52 2004  Ben Pfaff  <blp@gnu.org>
3278
3279         * frequencies.q: (cleanup_freq_tab) Avoid memory leak by
3280         destroying hash table.
3281
3282         * glob.c: (read_active_file) Variable not referenced, removed.
3283         (cancel_input_pgm) Ditto.
3284
3285         * levene.c: Add #include <stdlib.h> needed to call free().
3286
3287         * aggregate.c: (parse_aggregate_functions) Make `function'
3288         variable const.
3289
3290 Tue Mar  2 11:30:56 2004  Ben Pfaff  <blp@gnu.org>
3291
3292         Start working to eliminate VFM dependence on static variables.
3293
3294         * command.c: (cmd_parse) Use case_source_is_class().
3295
3296         * data-list.c: Rewrite to eliminate use of static variables.
3297
3298         * dfm.c: (cmd_begin_data) Use case_source_is_class().
3299
3300         * file-handle.q: (fh_handle_name) Make parameter const.
3301
3302         * file-type.c: Rewrite to eliminate use of static variables.
3303
3304         * flip.c: Rewrite to eliminate use of static variables.
3305
3306         * format.c: (get_format_var_width) New function.
3307
3308         * get.c: Eliminate use of static variables.
3309
3310         * inpt-pgm.c: Eliminate use of static variables.
3311
3312         * matrix-data.c: Eliminate use of static variables.
3313
3314         * set.q: (set_max_workspace) New variable.
3315         (cmd_set) Use SET WORKSPACE to modify set_max_workspace.
3316
3317         * var.h: (struct case_list) Move here from vfmP.h.
3318
3319         * vars-atr.c: (discard_variables) Handle new vfm_source type.
3320
3321         * vfm.c: (vfm_source) Change type from struct case_stream to
3322         struct case_source.
3323         (vfm_sink) Change type from struct case_stream to struct
3324         case_sink.
3325         (static var paging) Rename workspace_overflow, all references
3326         updated.
3327         (procedure) Use new class structures.
3328         (process_active_file) Ditto.
3329         (process_active_file_write_case) Ditto.
3330         (prepare_for_writing) Use set_max_workspace.  Use new class
3331         structures.
3332         (close_active_file) Use new class structures.  Free old sink.
3333         (global var disk_source_file) Removed.
3334         (global var disk_sink_file) Removed.
3335         (disk_stream_init) Removed.
3336         (disk_stream_read) Removed.
3337         (disk_stream_write) Removed.
3338         (disk_stream_mode) Removed.
3339         (disk_stream_destroy_source) Removed.
3340         (disk_stream_destroy_sink) Removed.
3341         (global var vfm_disk_stream) Removed.
3342         (disk_sink_create) New function.
3343         (disk_sink_write) New function.
3344         (disk_sink_destroy) New function.
3345         (disk_sink_make_source) New function.
3346         (disk_sink_class) New static var.
3347         (disk_source_read) New function.
3348         (disk_source_destroy) New function.
3349         (global var vfm_source_class) New var.
3350         (global var memory_source_cases) Removed.
3351         (global var memory_sink_cases) Removed.
3352         (global var memory_sink_max_cases) Removed.
3353         (struct memory_sink_info) New struct.
3354         (memory_stream_init) Removed.
3355         (memory_stream_read) Removed.
3356         (memory_stream_write) Removed.
3357         (memory_stream_mode) Removed.
3358         (memory_stream_destroy_source) Removed.
3359         (memory_stream_destroy_sink) Removed.
3360         (global var vfm_memory_stream) Removed.
3361         (page_to_disk) Renamed write_active_file_to_disk().
3362         (memory_sink_create) New function.
3363         (memory_sink_write) New function.
3364         (memory_sink_destroy) New function.
3365         (memory_sink_make_source) New function.
3366         (memory_sink_class) New static var.
3367         (memory_source_read) New function.
3368         (memory_source_destroy) New function.
3369         (memory_source_get_cases) New function.
3370         (memory_source_set_cases) New function.
3371         (global var vfm_source_class) New var.
3372         (procedure_write_case) Use new class structures.
3373         (create_case_source) New function.
3374         (case_source_is_complex) New function.
3375         (case_source_is_class) New function.
3376         (create_case_sink) New function.
3377
3378         * vfm.h: (global variable reinit_sysmis) Not used, removed.
3379         (global variable reinit_blanks) Not used, removed.
3380         (global variable init_zero) Not used, removed.
3381         (global variable init_blanks) Not used, removed.
3382         (struct case_source) New struct.
3383         (struct case_source_class) New struct.
3384         (struct case_sink) New struct.
3385         (struct case_sink_class) New struct.
3386         (struct case_stream) Removed.
3387
3388         * vfmP.h: (struct case_list) Moved to var.h.
3389
3390 Tue Mar  2 11:28:30 2004  Ben Pfaff  <blp@gnu.org>
3391
3392         * algorithm.c: (count_equal) New function.
3393         (count_if) New function.
3394         (unique) Add assertions.
3395         (partition) Add assertions.
3396         (is_partitioned) New function.
3397         (copy_if) Add assertions.
3398         (remove_equal) Add assertions.
3399         (lexicographical_compare) Rename lexicographical_compare_3way.
3400         (sort) Add assertions.  Rephrase some code.
3401         (is_sorted) New function.
3402
3403 Sun Feb 29 23:24:57 2004  Ben Pfaff  <blp@gnu.org>
3404
3405         Rewrite SORT CASES.
3406
3407         * sort.c: Completely rewrite.
3408
3409         * sort.h: Expose interface via struct sort_cases_pgm, not via
3410         global variables.
3411
3412         * aggregate.c: (sort) New static var.
3413         (cmd_aggregate) Use sort.
3414         (create_sysfile) Ditto.
3415         (aggregate_single_case) Ditto.
3416         (dump_aggregate_info) Ditto.
3417         (agr_00x_end_func) Ditto.
3418         (debug_print) Ditto.
3419
3420         * var.h: (enum SRT_ASCEND) Removed.
3421         (enum SRT_DESCEND) Removed.
3422         (struct sort_cases_proc) Removed.
3423         (struct variable) Remove p.srt member.
3424
3425 Sun Feb 29 23:22:45 2004  Ben Pfaff  <blp@gnu.org>
3426
3427         Get rid of the old, crappy heap structure and replace it by a new,
3428         shiny, C++ STL-like heap structure.
3429         
3430         * Makefile.am: (pspp_SOURCES) Remove heap.c, heap.h.
3431
3432         * algorithm.c: (push_heap) New function.
3433         (heapify) Ditto.
3434         (pop_heap) Ditto.
3435         (make_heap) Ditto.
3436         (sort_heap) Ditto.
3437         (is_heap) Ditto.
3438         
3439         * heap.c: Removed.
3440
3441         * heap.h: Removed.
3442
3443 Sun Feb 29 23:21:53 2004  Ben Pfaff  <blp@gnu.org>
3444
3445         Increase warning level.
3446         
3447         * Makefile.am: (AM_CFLAGS) Remove -Wnouninitialized.
3448
3449 Sat Feb 21 17:38:58 WST 2004 John Darrington <john@darrington.wattle.id.au>
3450
3451         * main.c: Added a signal handler for SIGSEGV requesting a bug report.
3452          
3453 Fri Feb 20 23:22:14 2004  Ben Pfaff  <blp@gnu.org>
3454
3455         * dictionary.c: (dict_create_var) Fix root cause of bug worked
3456         around by previous change log entry.
3457         
3458         * compute.c: (lvalue_finalize) Remove workaround from previous
3459         change log entry.
3460
3461 Fri Feb 20 14:37:41 WAST 2004 John Darrington <john@darrington.wattle.id.au>
3462
3463         * compute.c: Fixed a bug where the Format was not getting set for 
3464           computed variables (thus causing a crash when SAVEing).
3465
3466         * Added a test to stop this bug ever coming back
3467
3468 Wed Feb 18 22:21:35 2004  Ben Pfaff  <blp@gnu.org>
3469
3470         Got rid of approx.h.  In general, replaced all references to
3471         approx_eq() by ==, approx_lt() by <, etc.  Other types of changes
3472         noted below.
3473
3474         * Makefile.am: (pspp_SOURCES) Removed approx.h.
3475
3476         * data-out.c: (try_F) Replaced test for approx_eq(number, 0.0) by
3477         test for mag < EPSILON.
3478
3479         * misc.h: Add definition of EPSILON.
3480
3481 Wed Feb 18 21:32:44 2004  Ben Pfaff  <blp@gnu.org>
3482
3483         * vfm.c: (procedure) Add check to prevent recursive call.
3484
3485 Wed Feb 18 21:48:54 WST 2004 John Darrington <john@darrington.wattle.id.au>
3486
3487         * Moved the declarations relating to values to their own header file
3488           (val.h)
3489
3490         * Added levene.c and levene.h
3491
3492         * vars-atr.c: Changed the signature of compare_values to 
3493         take const * arguments.
3494                 
3495         * t-test.q: Changed the structure of struct t_test_proc 
3496        variables now contain their own group statistics information.
3497        Eventually, t_test_proc might get renamed, because it'd be 
3498        applicable to other commands too.
3499
3500 Mon Feb 16 23:15:51 2004  Ben Pfaff  <blp@gnu.org>
3501
3502         * data-out.c: Clean up.  Changed interface of convert_*() to take
3503         either a `double' or a `const char *' instead of a `const union
3504         value *'.  Update all implementations of those interfaces.
3505         (data_out) Use switch statements instead of a table.
3506         (convert_AHEX) Rewrite.
3507
3508         * format.h: Update comment.
3509
3510 Mon Feb 16 22:14:36 2004  Ben Pfaff  <blp@gnu.org>
3511
3512         * q2c.c: (dump_header) Add an Emacs header line to output files
3513         that makes generated .c files read-only by default, to make it
3514         difficult to accidentally change generated files.
3515
3516 Mon Feb 16 22:12:07 2004  Ben Pfaff  <blp@gnu.org>
3517
3518         * frequencies.q: (compare_freq_numeric_a) Compare by frequency,
3519         not bogus a->v.c <=> b->v.c pointer compare.
3520         (compare_freq_alpha_a) Ditto.
3521         (compare_freq_numeric_d) Ditto.
3522         (compare_freq_alpha_d) Ditto.
3523         
3524 Mon Feb 16 22:00:53 2004  Ben Pfaff  <blp@gnu.org>
3525
3526         Changed data_out() to store string data directly into a `union
3527         value''s s member, not indirectly into c.
3528
3529         * crosstabs.q: (output_pivot_table) Use format_short() instead of
3530         data_out().
3531         (table_value_missing) Ditto.
3532         (float_M_suffix) Ditto.
3533         (format_short) New function.
3534
3535         * data-in.h: (data_in_finite_line) Remove inline definition.
3536
3537         * data-list.c: (destroy_dls_var_spec) New function.
3538         (destroy_dls) Rewrite in terms of destroy_dls_var_spec().
3539         (data_list_source_destroy_source) Avoid cast.
3540         (struct repeating_data_trns) New field `id_value'.  Update
3541         comments.
3542         (cmd_repeating_data) Initialize id_value.  Use new
3543         repeating_data_trns_free() for freeing REPEATING DATA
3544         transformations.
3545         (rpd_parse_record) Rewrite support for record ID to be less bogus.
3546         (repeating_data_trns_free) New function.
3547
3548         * data-out.c: (data_out) Change return type to `void' by replacing
3549         error returns by writing a message into the output buffer.
3550         (convert_A) Read from v->s instead of v->c.
3551         (convert_AHEX) Ditto.
3552
3553         * expr-evl.c: Update comment.
3554         (expr_evaluate) Add assertion in OP_STRING case.
3555
3556         * format.h: (macro MAX_FORMATTED_LEN) New macro.
3557
3558         * list.q: (list_cases) Update for new data_out() semantics.
3559
3560         * print.c: (print_trns_proc) Ditto.
3561
3562         * tab.c: (tab_value) Ditto.
3563         (tab_float) Avoid stupid cast.
3564
3565         * var.h: Update comments.
3566         (macro MAX_STRING) New macro.
3567         (macro MAX_ELEMS_PER_VALUE) New macro.
3568
3569         * vars-atr.c: (compare_values) New function.
3570
3571         * vfm.c: (dump_splits) Update for new data_out() semantics.
3572
3573 Mon Feb 16 21:45:47 2004  Ben Pfaff  <blp@gnu.org>
3574
3575         * crosstabs.q: (struct table_entry) Rename v[] to values[].  All
3576         references updated.
3577         (struct crosstab) Rename v[] to vars[].  All references updated.
3578         (hash_table_entry) Replace the hash algorithm and fix a bug at the
3579         same time, which caused the hash value to depend only on a single
3580         value, not all of the variables' values.
3581         
3582 Mon Feb 16 12:49:53 2004  Ben Pfaff  <blp@gnu.org>
3583
3584         Clean up struct dictionary's value_cnt usage.
3585
3586         * dictionary.c: Add a function comment to each function.
3587         (struct dictionary) Rename value_cnt to next_value_idx, which more
3588         accurately reflects its meaning.  All references updated.
3589         (dict_rename_vars) Add assertion.
3590         (dict_get_value_cnt) Rename dict_get_next_value_idx().  All
3591         references updated.
3592         (dict_get_case_size) New function.
3593
3594         * aggregate.c: (create_sysfile) Use dict_get_case_size().
3595
3596         * get.c: (mtf_read_nonactive_records) Ditto.
3597
3598         * sort.c: (allocate_cases) Ditto.
3599         (write_initial_runs) Ditto.
3600         (merge) Ditto.
3601         (merge_once) Ditto.
3602
3603         * vfm.c: (prepare_for_writing) Ditto.
3604         (setup_lag) Ditto.
3605         (lag_case) Ditto.
3606
3607 Mon Feb 16 00:17:55 2004  Ben Pfaff  <blp@gnu.org>
3608
3609         Make vfm.c slightly less grotesque.
3610
3611         * vfm.c: (filter_var) Removed.
3612         (filter_index) Removed.
3613         (FILTERED macro) Removed.
3614         (exclude_this_case) New function.
3615         (process_active_file_write_case) Use exclude_this_case() instead
3616         of FILTERED and inline tests.
3617         (procedure_write_case) Ditto.
3618         (setup_filter) Removed.
3619         (open_active_file) Don't call setup_filter().
3620         (close_active_file) Call dict_get_filter() instead of checking
3621         filter_var.
3622
3623 Mon Feb 16 00:01:53 2004  Ben Pfaff  <blp@gnu.org>
3624
3625         * var.h: (struct variable) Update comments.
3626
3627 Sun Feb 15 23:14:59 2004  Ben Pfaff  <blp@gnu.org>
3628
3629         New functions dict_create_var_assert(), dict_lookup_var_assert().
3630         Converted several dict_*_var()/assert pairs into a single
3631         dict_*_var_assert().
3632
3633         * dictionary.c: (dict_create_var_assert) New function.
3634         (dict_lookup_var_assert) New function.
3635
3636 Sun Feb 15 23:06:08 2004  Ben Pfaff  <blp@gnu.org>
3637
3638         Got rid of "struct long_vec", envector(), devector(), etc.  Added
3639         two members `init', `reinit' to struct variable as a substitute.
3640         
3641         * Makefile.am: (pspp_SOURCES) Removed cases.c, cases.h.
3642         
3643         * cases.c: Removed.
3644
3645         * cases.h: Removed.
3646
3647         * aggregate.c: (parse_aggregate_functions) destvar doesn't need
3648         init.
3649
3650         * autorecode.c: (cmd_autorecode) destvars don't need init.
3651
3652         * compute.c: (lvalue_finalize) Set reinit.
3653
3654         * data-list.c: (fixed_parse_compatible) Don't need init usually.
3655         (dump_fmt_list) Ditto.
3656         (parse_free) Ditto.
3657
3658         * descript.q: (run_z_pass) Don't need init for z-scores.
3659
3660         * dictionary.c: (dict_create_var) Initialize `init', `reinit'
3661         members.
3662         (dict_clone_var) Copy `reinit' member, initialize `init' member.
3663
3664         * glob.c: (init_glob) Remove vec_init() calls.
3665
3666         * inpt-pgm.c: (cmd_end_input_program) Use `reinit', not `left'.
3667         
3668         * loop.c: (internal_cmd_loop) Don't need to call envector().
3669
3670         * numeric.c: (cmd_numeric) Ditto.
3671         (cmd_string) Ditto.
3672         (cmd_leave) Ditto.  Set `init', `reinit' members.
3673
3674         * recode.c: (cmd_recode) Don't need to call envector().
3675
3676         * repeat.c: (internal_cmd_do_repeat) Ditto.
3677
3678         * var.h: (struct variable) Remove `left'.  Add `init', `reinit'.
3679         (force_create_variable) Removed prototype.
3680         (force_dup_variable) Ditto.
3681
3682         * vector.c: (cmd_vector) Don't need to call envector().
3683
3684         * vfm.c: (reinit_sysmis) Removed.
3685         (reinit_blanks) Removed.
3686         (init_zero) Removed.
3687         (init_blanks) Removed.
3688         (process_active_file_write_case) No need to deal with vectors.
3689         Call clear_temp_case().
3690         (vector_initialization) Rewrite to use `init', `reinit'.
3691         (close_active_file) No need to call vec_clear().
3692         (procedure_write_case) Call clear_temp_case().
3693         (clear_temp_case) New function.
3694
3695 Sun Feb 15 20:50:36 2004  Ben Pfaff  <blp@gnu.org>
3696
3697         * pfm-write.c: (bufwrite) Get rid of nasty cast that also invoked
3698         undefined behavior.
3699
3700 Thu Feb 12 23:35:15 2004  Ben Pfaff  <blp@gnu.org>
3701
3702         Add auxiliary argument to procedure() interface.  Associated small
3703         clean-ups of vfm interface.
3704         
3705         * Updated every caller of procedure() and process_active_file() to
3706         reflect modified interface.  Simple, ordinary changes not listed
3707         otherwise below.
3708
3709         * Updated every function that implements struct case_stream's
3710         `read' function to take a write_case_func and a write_case_data.
3711         Also updated every caller of write_case() to instead call them
3712         through these arguments.  In some cases this meant that the extra
3713         args had to be threaded through a couple of extra levels.  This
3714         wasn't difficult or interesting so the details won't be given.
3715
3716         * data-list.c: (struct repeating_data_trns) Add members
3717         `write_case', `wc_data' as kluge.
3718         (read_one_set_of_repetitions) Rename repeating_data_trns_proc and
3719         make non-static.
3720         (repeating_data_set_write_case) New function.
3721
3722         * data-list.h: New file to declare repeating_data_trns_proc() and
3723         repeating_data_set_write_case().
3724
3725         * inpt-pgm.c: (input_program_source_read) Call
3726         repeating_data_set_write_case() for all the REPEATING DATA
3727         transformations, so that they know where to send their cases.
3728         It's a big kluge.  Also kluge in END CASE.
3729         (end_case_trns_proc) Never called anymore, but we still need it,
3730         so just assert(0).
3731
3732         * sort.c: (read_sort_output) Update to match struct case_stream
3733         `read' member.
3734
3735         * vfm.c: (struct write_case_data) New structure.
3736         (proc_func) Removed.
3737         (virt_proc_func) Removed.
3738         (begin_func) Removed.
3739         (virt_begin_func) Removed.
3740         (end_func) Removed.
3741         (write_case) Removed.
3742         (procedure) Added an auxiliary parameter to each function pointer
3743         argument's prototype.  Added an auxiliary data parameter.
3744         Rewrote.
3745         (process_active_file) Ditto.
3746         (process_active_file_write_case) Pass aux data along.
3747         (close_active_file) Ditto.
3748         (procedure_write_case) Ditto.
3749         (SPLIT_FILE_procfunc) Ditto.
3750
3751         * vfm.h: (typedef write_case_data) New.
3752         (typedef write_case_func) New.
3753         (struct case_stream) Add parameters to `read' member prototype.
3754         
3755 Thu Feb 12 19:24:53 WST 2004 John Darrington <john@darrington.wattle.id.au>
3756
3757         * t-test.q:  Added calculations for independent samples. (But no Levene
3758         test yet!)
3759
3760         * Makefile.am: Moved q_sources_c into own variable 
3761
3762 Wed Feb 11 23:56:51 2004  Ben Pfaff  <blp@gnu.org>
3763
3764         Miscellaneous cleanups.
3765         
3766         * Change unused to UNUSED in many source files to reflect modified
3767         pref.h.  Change use of __WIN32__, __MSDOS, __DJGPP__,
3768         __CYGWIN32__, __unix__, and unix not to assume that they're
3769         defined to a nonzero value.  Change use of __attribute__ to use
3770         NO_RETURN or PRINTF_FORMAT instead.
3771         
3772         * alloc.h: Move definitions for local_alloc(), local_free() here
3773         from ../pref.h.orig and simplify.
3774
3775         * expr-evl.c: Instead of working differently based on PAGED_STACK,
3776         use a pool allocator unconditionally.
3777         (CHECK_STRING_SPACE) Removed.
3778         (ALLOC_STRING_SPACE) Removed.
3779         (expr_evaluate) Use e->pool instead of CHECK_STRING_SPACE and
3780         ALLOC_STRING_SPACE.
3781
3782         * expr-opt.c: (dump_expression) Allocate string pool.
3783
3784         * expr-prs.c: (expr_free) Free string pool.
3785
3786         * pool.c: (pool_destroy) This pool must be removed from its
3787         parent's list of gizmos, not from its own.  Use free_all_gizmos().
3788         (pool_clear) New function.
3789         (free_all_gizmos) New function.
3790         (pool_alloc) Use space in empty block after this one if any.
3791         (pool_release) Only empty out blocks, don't actually free() them.
3792
3793         * print.c: Get rid of PAGED_STACK special case by always
3794         dynamically allocating line buffers.
3795         (struct print_trns) Always include the `line' member.
3796         (internal_cmd_print) Always initialize the `line' member.
3797         (alloc_line) Always allocate memory for `line'.
3798         (print_trns_proc) Always initialize buf from `line' member.
3799         (print_trns_free) Always free `line' memory.
3800
3801         * sort.c: (allocate_file_handles) Special-case MS-DOS for mkdir()
3802         call.
3803         
3804 Wed Feb 11 20:33:18 2004  Ben Pfaff  <blp@gnu.org>
3805
3806         * flip.c: Fixed crash from FLIP when a numeric variable is
3807           specified on NEWNAMES and a large value is used, and a couple of
3808           other minor bugs besides.
3809           (struct varname) Make name a 9-character fixed-size array
3810           instead of a 1-character variable size array.
3811           (make_new_var) Allow digits in variable names.
3812           (flip_stream_write) Limit numeric values to 8 characters and
3813           format system missing and very large and small values more
3814           appropriately.
3815
3816 Thu Feb  5 13:19:06 WAST 2004 John Darrington <john@darrington.wattle.id.au>
3817
3818         * command.c: Fixed test on command return status for the correct 
3819           value,  which had been causing a crash under certain invalid input.
3820
3821 Wed Feb  4 15:34:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
3822
3823         * t-test.q: Added calculations for the one sample variant of the T-TEST
3824
3825 Tue Feb  3 20:09:54 2004  Ben Pfaff  <blp@gnu.org>
3826
3827         * tab.c: (render_strip) Fix bug that sometimes caused joined text
3828           in joined cells to be rendered outside box boundaries.
3829
3830 Tue Feb  3 18:56:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
3831
3832         * random.c (rng_create): Fixed seeding so that it gets reseeded after
3833         SET seed=xx has been called.
3834
3835 Mon Jan 19 14:08:09 2004  Ben Pfaff  <blp@gnu.org> 
3836
3837         * random.c (rng_get_double): Fix always-returning-zero bug in my
3838         preferred way, and at the same time make sure rounding doesn't
3839         bite us.
3840
3841 Thu Jan  1 23:16:41 2004  Ben Pfaff  <blp@gnu.org>
3842
3843         * html.c: (change_attributes) Dead code, removed.
3844         (escape_string) Eliminate code to call change_attributes() that
3845         never actually called it.
3846         (output_tab_table) Get rid of dependence on tab_hit
3847         and struct tab_joined_cell's hit member, which are abominations.
3848
3849         * tab.c: (tab_output_text) Don't call
3850         d->class->text_set_font_by_name if it's a null pointer.
3851         (macro UNROLL_LOOP) Eliminate.
3852         (macro UNROLL_3_LOOPS) Eliminate.
3853         (tabi_render) Rewrite not to use the above macros.
3854
3855 Thu Jan  1 23:09:07 2004  Ben Pfaff  <blp@gnu.org>
3856
3857         Start working on a new output driver system, one that doesn't suck
3858         so much, by adding a "device-independent" output driver.  The idea
3859         is to write out only a single output stream, then use separate
3860         processes to translate them into whatever formats we want.  This
3861         is similar to how "groff" works with its various output drivers
3862         (grops, grotty, grodvi, ...).
3863         
3864         * Makefile.am: (pspp_SOURCES) Add devind.c, devind.h.
3865
3866         * list.q: (write_all_headers) Stub out devind class.
3867         (clean_up) Ditto.
3868         (determine_layout) Ditto.
3869         (list_cases) Ditto.
3870
3871         * output.c: (outp_init) Add devind class.
3872
3873         * devind.c: New file.
3874
3875         * devind.h: New file.
3876
3877 Thu Jan  1 23:08:14 2004  Ben Pfaff  <blp@gnu.org>
3878
3879         * frequencies.q: (hash_value_alpha) Fixed up the previous change
3880         to use the proper string length.
3881
3882 Wed Dec 31 16:27:33 WAST 2003 John Darrington <john@darrington.wattle.id.au>
3883
3884         * Fixed bug where FREQ would crash on alpha values
3885
3886 Tue Dec 30 22:42:57 2003  Ben Pfaff  <blp@gnu.org>
3887
3888         * Removed bletcherous alloca() workarounds for AIX from top of
3889         many files.  AIX can use the alternative alloca() implementation
3890         instead.
3891
3892 Tue Dec 30 22:35:16 2003  Ben Pfaff  <blp@gnu.org>
3893
3894         * ascii.c: (ascii_option) Fix implementation of headers option.
3895
3896 Tue Dec 30 22:32:53 2003  Ben Pfaff  <blp@gnu.org>
3897
3898         * ascii.c: Add a "squeeze" option to the ASCII driver to squeeze
3899         multiple blank lines into one.
3900         (struct ascii_driver_ext) Add squeeze_blank_lines option.
3901         (ascii_preopen_driver) Initialize squeeze_blank_lines.
3902         (static var option_tab) Add squeeze entry.
3903         (ascii_option) Set squeeze_blank_lines.
3904         (output_lines) Implement squeezing blank lines.
3905
3906 Wed Dec 31 07:19:46 WST 2003 John Darrington <john@darrington.wattle.id.au>
3907
3908         * Removed redundant code from output.h
3909
3910 Sat Dec 27 22:17:52 2003  Ben Pfaff  <blp@gnu.org>
3911
3912         Dictionary classes: each variable is "ordinary", "system", or
3913         "scratch".
3914
3915         * var.h: (enum dict_class) New enum.
3916
3917         * vars-prs.c: (dict_class_from_id) New function.
3918         (dict_class_to_name) New function.
3919
3920 Sat Dec 27 22:16:06 2003  Ben Pfaff  <blp@gnu.org>
3921
3922         * var.h: (struct freq_tab_set) Removed (not used).
3923
3924 Sat Dec 27 22:15:21 2003  Ben Pfaff  <blp@gnu.org>
3925
3926         * value-labels.c: (val_labs_destroy) vls needs to be freed too.
3927
3928 Sat Dec 27 22:10:49 2003  Ben Pfaff  <blp@gnu.org>
3929
3930         * stats.c: (hypercube) Rename pow4().  All references updated.
3931
3932 Sat Dec 27 22:05:49 2003  Ben Pfaff  <blp@gnu.org>
3933
3934         * rename-vars.c: (cmd_rename_variables) Rewritten.
3935         (compare_name) Removed.
3936
3937 Sat Dec 27 22:03:51 2003  Ben Pfaff  <blp@gnu.org>
3938
3939         var_set feature, and code taking advantage of it.
3940         
3941         * crosstabs.q: (static var var_dict) Removed.
3942         (static var variables) New variable.
3943         (static var variables_cnt) New variable.
3944         (cmd_crosstabs) Free variables instead of var_dict.
3945         (internal_cmd_crosstabs) Initialize and use variables,
3946         variables_cnt instead of var_dict.
3947         (free_var_dict) Removed.
3948         (crs_custom_tables) Use var_set instead of a copied dictionary.
3949         (crs_custom_variables) Set up variables, variables_cnt instead of
3950         var_dict.
3951         [DEBUGGING] (debug_print) Ditto.
3952
3953         * means.q: (mns_custom_tables) Use var_set instead of a copied
3954         dictionary.
3955
3956         * vars-prs.c: (parse_vs_variable) New function.
3957         (parse_dict_variable) Rewritten.
3958         (parse_variable) Rewritten.
3959         (parse_variables) Renamed parse_var_set_vars(), rewritten.
3960         (parse_variables) New function in terms of parse_var_set_vars().
3961         Now requires its first argument to be non-null.  All references
3962         that passed a null pointer updated to pass default_dict instead.
3963         (macro id_dict) Removed.
3964         (parse_DATA_LIST_vars) Add assertions.
3965         (parse_mixed_vars) Ditto.
3966         (struct var_set) New structure.
3967         (var_set_get_cnt) New function.
3968         (var_set_get_var) New function.
3969         (var_set_lookup_var) New function.
3970         (var_set_destroy) New function.
3971         (dict_var_set_get_cnt) New function.
3972         (dict_var_set_get_var) New function.
3973         (dict_var_set_lookup_var) New function.
3974         (dict_var_set_destroy) New function.
3975         (var_set_create_from_dict) New function.
3976         (struct array_var_set) New structure.
3977         (array_var_set_get_cnt) New function.
3978         (array_var_set_get_var) New function.
3979         (array_var_set_lookup_var) New function.
3980         (array_var_set_destroy) New function.
3981         (var_set_create_from_array) New function.
3982
3983         * q2c.c: (dump_parser) Use parse_variables(default_dict, ...)
3984         instead of parse_variables(NULL, ...) in output code.
3985
3986 Sat Dec 27 21:38:53 2003  Ben Pfaff  <blp@gnu.org>
3987
3988         Change inp_init from a 2-bit vector to an ordinary array.
3989         Initialize it all in cmd_end_input_program() instead of in
3990         create_variable().
3991
3992         * inpt-pgm.c: (enum value_init_type) New enum.
3993         (global var inp_init) Change to `enum value_init_type *', make
3994         static.
3995         (inp_init_size) Removed.
3996         (inp_nval) Change to `size_t', make static.
3997         (cmd_input_program) Don't initialize inp_init or inp_init_size.
3998         (cmd_end_input_program) Initialize inp_init, inp_nval.
3999         (init_case) Rewrite.
4000         (clear_case) Rewrite.
4001
4002         * inpt-pgm.h: Removed.
4003
4004 Sat Dec 27 21:36:38 2003  Ben Pfaff  <blp@gnu.org>
4005
4006         * hash.c: (hsh_hash_bytes) Use Fowler-Noll-Vo hash instead of
4007         Colin Plumb hash.  It is simpler and should better resist
4008         collisions.
4009         (hsh_hash_string) Ditto.
4010
4011 Sat Dec 27 21:34:57 2003  Ben Pfaff  <blp@gnu.org>
4012
4013         * get.c: (export_write_case_func) Remove debug printing code.
4014
4015 Sat Dec 27 21:11:09 2003  Ben Pfaff  <blp@gnu.org>
4016
4017         * get.c: (cmd_save_internal) Rename parameter.  Use &t->h instead
4018         of cast.
4019         (save_write_case_func) Use &trns->h instead of cast.
4020         (cmd_export) Use &t->h instead of cast.
4021
4022 Sat Dec 27 20:57:42 2003  Ben Pfaff  <blp@gnu.org>
4023
4024         Moved vectors into the dictionary.
4025
4026         * var.h: (struct vector) Moved here from vector.h.  `index' member
4027         renamed `idx', `v' renamed `var', `nv' renamed `cnt'.  All
4028         references updated.
4029         
4030         * vector.h: Removed.
4031
4032         * vector.c: (global var vec) Removed.
4033         (global var nvec) Removed.
4034         (cmd_vector) Rewritten.
4035         (find_vector) Removed.
4036
4037         * dictionary.c: (dict_create_vector) New function.
4038         (dict_get_vector) New function, replaces reading global vec[]
4039         array.
4040         (dict_get_vector_cnt) New function, replaces reading global nvec
4041         variable.
4042         (dict_lookup_vector) New function, replaces find_vector().
4043         (dict_clear_vectors) New function.
4044
4045 Sat Dec 27 20:54:01 2003  Ben Pfaff  <blp@gnu.org>
4046
4047         Start to move away from `struct variable' p `union' member to void
4048         * aux member.
4049
4050         * var.h: (struct variable) Add `aux' member.
4051
4052 Sat Dec 27 20:36:25 2003  Ben Pfaff  <blp@gnu.org>
4053
4054         Get rid of struct variable `foo' member.
4055
4056         * frequencies.q: (internal_cmd_frequencies) Use p.frq.used instead
4057         of foo.
4058         (frq_custom_variables) Ditto.
4059         (frq_custom_grouped) Ditto.
4060
4061         * get.c: (struct save_trns) Change `var' member from `int *' to
4062         `struct variable **'.
4063         (cmd_save_internal) Use aux instead of foo.
4064         (save_trns_proc) Use revised `var' member.
4065         (static var mtf_seq_no) Renamed mtf_seq_num.
4066         (static var mtf_seq_nums) New static var.
4067         (cmd_match_files) Initialize mtf_seq_nums.
4068         (mtf_free) Free mtf_seq_nums.
4069         (mtf_processing) Use mtf_seq_nums instead of foo.
4070         (mtf_merge_dictionary) No need to initialize mv->foo.
4071         (cmd_export) Use aux instead of foo.  Use revised `var' member.
4072         (mns_custom_tables) Don't use foo to check for duplicates, that's
4073         what PV_NO_DUPLICATE is for.
4074
4075         * var.h: (struct variable) Remove `foo' member.
4076         (struct frequencies_proc) New member.
4077         
4078 Sat Dec 27 19:46:13 2003  Ben Pfaff  <blp@gnu.org>
4079
4080         Clean up COMPUTE and IF.
4081
4082         * compute.c: More or less rewrite the darn thing.
4083         (struct compute_trns) Rename and reorder and add and delete
4084         members.
4085         (cmd_compute) Rewrite.
4086         (compute_num) Make conditional on test expression.  Now used for
4087         both COMPUTE and IF.
4088         (compute_num_vec) Ditto.
4089         (compute_str) Ditto.
4090         (compute_str_vec) Ditto.
4091         (cmd_if) Rewrite.
4092         (if_num) Removed.
4093         (if_num_vec) Removed.
4094         (if_str) Removed.
4095         (if_str_vec) Removed.
4096         (parse_target_expression) Renamed parse_rvalue_expression(),
4097         rewritten.
4098         (new_trns) Renamed compute_trns_create(), rewritten.
4099         (delete_trns) Removed.
4100         (free_trns) Renamed compute_trns_free(), rewritten.
4101         (struct lvalue) New structure.
4102         (parse_var_or_vec) Renamed lvalue_parse(), rewritten.
4103         (lvalue_get_type) New function.
4104         (lvalue_is_vector) New function.
4105         (lvalue_finalize) New function.
4106         (lvalue_destroy) New function.
4107         
4108 Sat Dec 27 19:44:14 2003  Ben Pfaff  <blp@gnu.org>
4109
4110         * command.def: Disallow MODIFY VARS in input mode, so that
4111         variables can't get dropped and confuse cmd_end_input_program()'s
4112         attempt to fill inp_init[].
4113         
4114         * modify-vars.c: (static var forward_positional_ordering) New
4115         variable.
4116         (struct var_modification) Entirely changed.
4117         (rearrange_dict) Interface changed, rewritten.
4118         (cmd_modify_vars) Deal with modified struct var_modification, much
4119         rewritten.
4120         (struct var_renaming) New structure.
4121         (compare_var_renaming_by_new_name) New function.
4122         (validate_var_modification) New function.
4123
4124         * var.h: (struct modify_vars_proc) Removed.
4125         (struct variable) Removed member p.mfv.
4126
4127 Sat Dec 27 19:40:26 2003  Ben Pfaff  <blp@gnu.org>
4128
4129         Make EVALUATE a valid command whether we're debugging or not, so
4130         that `make check' can succeed regardless of whether debugging is
4131         turned on.
4132         
4133         * command.def: [GLOBAL_DEBUGGING] Drop the #if.
4134
4135         * compute.c: [GLOBAL_DEBUGGING] (cmd_evaluate) Drop the #if.
4136
4137 Sat Dec 27 19:34:40 2003  Ben Pfaff  <blp@gnu.org>
4138
4139         * apply-dict.c: (cmd_apply_dictionary) Replace a ghastly switch
4140         statement by a simple if test.
4141
4142         * dfm.c: (dfm_get_record) Add assertion.
4143
4144 Sat Dec 27 17:51:26 2003  Ben Pfaff  <blp@gnu.org>
4145
4146         For each file x.c, move #include "x.h" to the very top of the
4147         include list, to catch x.h failing to include the proper headers.
4148
4149 Sat Dec 27 17:50:19 2003  Ben Pfaff  <blp@gnu.org>
4150
4151         * algorithm.c: (find) New function.
4152         (remove_equal) New function.
4153         (set_difference) New function.
4154         (adjacent_find_equal) New function.
4155         [TEST_UNIQUE] Removed test case.
4156         (copy_if) Find end test.
4157
4158 Sat Dec 27 17:42:45 2003  Ben Pfaff  <blp@gnu.org>
4159
4160         * dictionary.c: (dict_get_case_weight) New convenience function.
4161
4162         * aggregate.c: (accumulate_aggregate_info) Use
4163         dict_get_case_weight().
4164
4165         * frequencies.q: (calc_general) Ditto.
4166         (calc_integer) Ditto.
4167         (calc) Ditto.
4168
4169         * t-test.q: (groups_calc) Ditto.
4170         (z_calc) Ditto.
4171
4172 Sat Dec 27 17:29:45 2003  Ben Pfaff  <blp@gnu.org>
4173
4174         * glob.c: (global var default_dict) Change from `struct
4175         dictionary' to `struct dictionary *'.  All references changed.
4176         (init_glob) Initialize default_dict with dict_create().
4177
4178 Sat Dec 27 17:06:06 2003  Ben Pfaff  <blp@gnu.org>
4179
4180         struct dictionary now made opaque.  All related functions:
4181
4182         * get.c: (rename_variables) Removed.
4183         (dict_delete_run) Removed.
4184         
4185         * temporary.c: (copy_variable) Removed.
4186         (new_dictionary) Removed.
4187         (save_dictionary) Removed.
4188         (restore_dictionary) Removed.
4189         (free_dictionary) Removed.
4190
4191         * vars-atr.c: (clear_default_dict) Removed.
4192         (find_variable) Removed.
4193         (find_dict_variable) Removed.
4194         (create_variable) Removed.
4195         (delete_variable) Removed.
4196         (common_init_stuff) Removed.
4197         (init_variable) Removed.  Updating of inp_init moved into
4198         cmd_end_input_program().
4199         (replace_variable) Removed.
4200         (rename_variable) Removed.
4201         (clear_variable) Removed.
4202         (dup_variable) Removed.
4203
4204         * vars-prs.c: (is_varname) Removed.
4205         (is_dict_varname) Removed.
4206         (fill_all_vars) Removed.
4207
4208         * vector.c: (find_vector) Removed.
4209
4210         * weight.c: (stop_weighting) Removed.
4211
4212         * dictionary.c: New file.
4213         (dict_create) New, replaces new_dictionary().
4214         (dict_clone) New, replaces save_dictionary() and
4215         restore_dictionary().
4216         (dict_clear) New, replaces clear_default_dict().
4217         (dict_destroy) New, replaces free_dictionary().
4218         (dict_get_var_cnt) New function, replaces references to
4219         dict->nvar.
4220         (dict_get_var) New function, replaces references to dict->var[i].
4221         (dict_get_vars) New function, replaces fill_all_vars().
4222         (dict_create_var) New, replaces create_variable().  Interface
4223         drops `type' parameter, using a zero `width' to designate numeric.
4224         (dict_clone_var) New, replaces dup_variable().
4225         (dict_rename_var) New, replaces rename_variable().
4226         (dict_lookup_var) New, replaces find_variable(),
4227         find_dict_variable(), is_varname().
4228         (dict_contains_var) New function.
4229         (compare_variable_dblptrs) New function.
4230         (dict_delete_var) New function, replaces clear_variable().
4231         (dict_delete_vars) New function, replaces dict_delete_run().
4232         (dict_reorder_vars) New function.
4233         (dict_rename_vars) New function, replaces rename_variables().
4234         (dict_get_weight) New function, replaces reading dict->weight_var.
4235         (dict_set_weight) New function, replaces writing dict->weight_var
4236         or calling stop_weight(dict).
4237         (dict_get_filter) New function, replaces reading dict->filter_var.
4238         (dict_set_filter) New function, replaces writing dict->filter_var.
4239         (dict_get_case_limit) New function, replaces reading dict->N.
4240         (dict_set_case_limit) New function, replaces writing dict->N.
4241         (dict_get_value_cnt) New function, replaces reading dict->nval.
4242         (dict_compact_values) New function, replaces a loop that was
4243         replicated in several places.
4244         (dict_get_split_vars) New function, replaces reading dict->splits.
4245         (dict_get_split_cnt) New function, replaces reading
4246         dict->n_splits.
4247         (dict_set_split_vars) New function, replaces writing dict->splits.
4248         (dict_get_label) New function, replaces reading dict->label.
4249         (dict_set_label) New function, replaces writing dict->label.
4250         (dict_get_documents) New function, replaces reading
4251         dict->documents.
4252         (dict_set_documents) New function, replaces writing
4253         dict->documents.
4254         
4255         All references to above functions updated.
4256         
4257         * aggregate.c: (cmd_aggregate) Copy file label and documents from
4258         old dictionary to new by hand, because dict_create() can't do it
4259         itself.  Use dict_set_documents(), dict_set_split_vars().
4260
4261         * temporary.c: (cancel_temporary) Also set temp_dict to NULL after
4262         calling dict_destroy().
4263
4264         * data-list.c: (dls_var_spec) Remove `type' member, replace by
4265         `width'.
4266         (fixed_parse_compatible) Some slightly nontrivial changes for
4267         dict_create_var().
4268         (dump_fmt_list) Ditto.
4269         (parse_free) Ditto.
4270
4271         * file-type.c: (create_col_var) Ditto.
4272
4273         * get.c: (cmd_get) Use dict_compact_values() instead of a loop.
4274         (trim_dictionary) Use dict_delete_vars(), dict_reorder_vars().
4275         (rename_variables) Use dict_rename_vars().
4276         (mtf_merge_dictionary) Use dict_get_documents(),
4277         dict_set_documents(), dict_compact_values().
4278
4279         * pfm-read.c: (read_variables) Deal with changes to weighting.
4280
4281         * q2c.c: (dump_parser) Use dict_lookup_var() instead of
4282         is_varname() in output code.
4283
4284         * sfm-read.c: (read_header) Use dict_create(), dict_set_label(),
4285         other dictionary functions.
4286
4287         * title.c: (add_document_line) Use dict_get_documents(),
4288         dict_set_documents().
4289
4290         * vars-atr.c: (discard_variables) Use dict_clear(default_dict),
4291         reset default_handle by hand.  dict_clear() will clear vectors so
4292         there's no need for that by hand.
4293
4294         * vfm.c: (close_active_file) Move call to finish_compaction()
4295         earlier, so that we can do the compaction as a single step using
4296         dict_compact_values().  Use dict_clear_vectors().
4297         (finish_compaction) Use dict_delete_var(), dict_compact_values().
4298                 
4299         Some functions don't have replacements:
4300
4301         * vars-atr.c: (force_create_variable) Removed.  All references
4302         updated to dict_create_var() followed by an assertion.
4303         (force_dup_variable) Removed.  All references updated to
4304         dict_clone_var() followed by an assertion.
4305         
4306         * weight.c: (update_weighting) Removed.  No longer necessary, so
4307         all references removed.
4308
4309 Sat Dec 27 16:43:01 2003  Ben Pfaff  <blp@gnu.org>
4310
4311         Clean up AGGREGATE.
4312         
4313         * aggregate.c: Eliminate separation of weighted and unweighted
4314         case.  It made the code too obscure and I doubt it was actually
4315         faster.  Instead, all code uses the "weighted" code, because
4316         that's a generalization of the "unweighted" code.
4317         (FWEIGHT) Removed.
4318         (FOPTIONS) Ditto.
4319         (parse_aggregate_functions) No need to set FWEIGHT.
4320         (accumulate_aggregate_info) Get rid of FWEIGHT cases.
4321         (dump_aggregate_info) Ditto.
4322         (initialize_aggregate_info) No need for special plain_function
4323         that gets rid of FWEIGHT option.
4324
4325         * aggregate.c: Get rid of approximations.
4326         (accumulate_aggregate_info) Don't use approx_gt(), approx_lt(),
4327         approx_in_range().
4328         (aggregate_single_case) Don't use approx_ne().
4329
4330 Sat Dec 27 16:19:36 2003  Ben Pfaff  <blp@gnu.org>
4331
4332         * ascii.c (ascii_line_width): Dead code, removed.
4333
4334         * postscript.c (ps_line_width): Ditto.
4335
4336         * q2c.c (xrealloc): Ditto.
4337
4338         * count.c (internal_cmd_count): Ditto.
4339
4340         * means.q (validate_dependent_endpoint): Ditto.
4341
4342         * set.q: (cmd_gset) Ditto.
4343
4344         * weight.c: [0] (weight_trns_proc) Ditto.
4345
4346 Sat Dec 27 16:18:16 2003  Ben Pfaff  <blp@gnu.org>
4347
4348         Make the code -Wmissing-prototypes clean.
4349
4350         * Makefile.am (version.c): Add #include "version.h".
4351         
4352         * ascii.c: (ascii_open_global) Make static.
4353         (ascii_close_page) Ditto.
4354         (ascii_font_sizes) Ditto.
4355         (ascii_postopen_driver) Ditto.
4356         (ascii_close_driver) Ditto.
4357         (ascii_option) Ditto.
4358         (ascii_open_page) Ditto.
4359         (ascii_line_horz) Ditto.
4360         (ascii_line_vert) Ditto.
4361         (ascii_line_intersection) Ditto.
4362         (ascii_box) Ditto.
4363         (ascii_polyline_begin) Ditto.
4364         (ascii_polyline_point) Ditto.
4365         (ascii_polyline_end) Ditto.
4366         (ascii_text_set_font_by_name) Ditto.
4367         (ascii_text_set_font_by_position) Ditto.
4368         (ascii_text_set_font_by_family) Ditto.
4369         (ascii_text_get_font_name) Ditto.
4370         (ascii_text_get_font_family) Ditto.
4371         (ascii_text_set_size) Ditto.
4372         (ascii_text_get_size) Ditto.
4373         (ascii_text_metrics) Ditto.
4374         (ascii_text_draw) Ditto.
4375         (ascii_close_page) Ditto.
4376
4377         * cmdline.h: New header for parse_command_line().  Used where
4378         needed.
4379
4380         * command.c: Move prototypes for cmd_*() functions to command.h.
4381
4382         * command.h: Prototypes for cmd_*() functions moved here from
4383         command.c.
4384
4385         * crosstabs.q: (gamma_int) Ditto.
4386
4387         * file-handle.h: Add fh_init_files() prototype.
4388         
4389         * getline.c: (welcome) Ditto.
4390
4391         * glob.h: New header for init_glob().  Used where appropriate.
4392
4393         * hash.c: (comparison_helper) Ditto.
4394
4395         * html.c: (html_open_global) Ditto.
4396         (html_close_global) Ditto.
4397         (html_preopen_driver) Ditto.
4398         (html_postopen_driver) Ditto.
4399         (html_close_driver) Ditto.
4400         (html_option) Ditto.
4401         (html_open_page) Ditto.
4402         (html_close_page) Ditto.
4403         (html_submit) Ditto.
4404
4405         * inpt-pgm.c: (input_program_source_read) Ditto.
4406
4407         * output.c: (find_defn_value) Ditto.
4408         (destroy_list) Ditto.
4409
4410         * pfm-read.c: (read_int) Ditto.
4411
4412         * postscript.c: (ps_open_global) Ditto.
4413         (ps_close_global) Ditto.
4414         (ps_font_sizes) Ditto.
4415         (ps_preopen_driver) Ditto.
4416         (ps_postopen_driver) Ditto.
4417         (ps_close_driver) Ditto.
4418         (ps_option) Ditto.
4419         (ps_open_page) Ditto.
4420         (ps_close_page) Ditto.
4421         (ps_line_horz) Ditto.
4422         (ps_line_vert) Ditto.
4423         (ps_line_intersection) Ditto.
4424         (ps_box) Ditto.
4425         (ps_polyline_begin) Ditto.
4426         (ps_polyline_point) Ditto.
4427         (ps_polyline_end) Ditto.
4428         (ps_text_set_font_by_name) Ditto.
4429         (ps_text_set_font_by_position) Ditto.
4430         (ps_text_set_font_family) Ditto.
4431         (ps_text_get_font_name) Ditto.
4432         (ps_text_get_font_family) Ditto.
4433         (ps_text_set_size) Ditto.
4434         (ps_text_get_size) Ditto.
4435         (ps_text_metrics) Ditto.
4436         (ps_text_draw) Ditto.
4437
4438         * q2c.c: (finish_up) Ditto.
4439         (xmalloc) Ditto.
4440         (xstrdup) Ditto.
4441         (get_buffer) Ditto.
4442         (st_lower) Ditto.
4443         (st_upper) Ditto.
4444         (skip_ws) Ditto.
4445         (get_line) Ditto.
4446         (add_symbol) Ditto.
4447         (find_symbol) Ditto.
4448         (lex_get) Ditto.
4449         (force_id) Ditto.
4450         (force_string) Ditto.
4451         (match_id) Ditto.
4452         (match_token) Ditto.
4453         (skip_token) Ditto.
4454         (parse) Ditto.
4455         (parse_setting) Ditto.
4456         (parse_specifier) Ditto.
4457         (parse_specifiers) Ditto.
4458         (parse_subcommand) Ditto.
4459         (dump_specifier_vars) Ditto.
4460         (is_keyword) Ditto.
4461         (make_identifier) Ditto.
4462         (dump_declarations) Ditto.
4463         (dump_specifier_init) Ditto.
4464         (dump_vars_init) Ditto.
4465         (make_match) Ditto.
4466         (dump_specifier_parse) Ditto.
4467         (dump_subcommand) Ditto.
4468         (dump_parser) Ditto.
4469         (dump_header) Ditto.
4470         (dump_free) Ditto.
4471         (recognize_directive) Ditto.
4472
4473         * recode.c: (string_to_long) Ditto.
4474
4475         * repeat.c: (find_DO_REPEAT_substitution) Ditto.
4476
4477         * repeat.h: New header for perform_DO_REPEAT_substitutions, used
4478         where appropriate.
4479
4480         * sort.c: (sort_stream_read) Ditto.
4481         (sort_stream_mode) Ditto.
4482         
4483 Fri Dec 19 23:35:04 2003  Ben Pfaff  <blp@gnu.org>
4484
4485         * algorithm.c (binary_search): Fix comparison.
4486
4487 Fri Dec 19 23:27:45 2003  Ben Pfaff  <blp@gnu.org>
4488
4489         * algorithm.c: (binary_search) Fix assertion.
4490
4491 Fri Dec 19 21:31:48 2003  Ben Pfaff  <blp@gnu.org>
4492
4493         * sysfile-info.c: (compare_vectors_by_name) Rewrite.
4494
4495 Fri Dec 19 21:30:24 2003  Ben Pfaff  <blp@gnu.org>
4496
4497         * sort.c: (compare_case_lists) Rewrite.
4498
4499 Fri Dec 19 16:44:22 2003  Ben Pfaff  <blp@gnu.org>
4500
4501         * quicksort.c: Removed (not used).
4502
4503         * quicksort.h: Removed (not used).
4504
4505         * sort.c: Removed blp_quicksort() prototype.
4506
4507 Fri Dec 19 16:42:13 2003  Ben Pfaff  <blp@gnu.org>
4508
4509         * postscript.c: (int_2_compare) Rewrite.
4510         (compare_line) Rewrite.
4511
4512 Fri Dec 19 16:38:35 2003  Ben Pfaff  <blp@gnu.org>
4513
4514         * matrix-data.c (compare_factors) Use lexicographical_compare()
4515         algorithm.
4516         (compare_doubles) New function.
4517         
4518         * algorithm.c: (lexicographical_compare) New algorithm.
4519
4520 Fri Dec 19 16:23:45 2003  Ben Pfaff  <blp@gnu.org>
4521
4522         * matrix-data.c (compare_variables_by_mxd_vartype): Rewrite.
4523
4524 Fri Dec 19 15:54:45 2003  Ben Pfaff  <blp@gnu.org>
4525
4526         * expr-prs.c: (cmp_func) Removed.
4527         (parse_function) Use binary_search() algorithm.
4528         (compare_functions) New function.
4529         (init_func_tab) Use sort() algorithm.
4530
4531         * algorithm.c: (binary_search) New algorithm.
4532
4533 Fri Dec 19 15:50:45 2003  Ben Pfaff  <blp@gnu.org>
4534
4535         * descript.q: (display) Use sort() algorithm instead of qsort().
4536         (compare_func) Removed.
4537         (descriptives_compare_variables) New function.
4538
4539 Fri Dec 19 15:08:38 2003  Ben Pfaff  <blp@gnu.org>
4540
4541         Get rid of AVL trees.  Hashes are more appropriate for everything
4542         PSPP does.
4543
4544         * Makefile.am: (pspp_SOURCES) Remove avl.c, avl.h.
4545         
4546         * avl.c: Removed.
4547
4548         * avl.h: Removed.
4549
4550 Fri Dec 19 14:33:31 2003  Ben Pfaff  <blp@gnu.org>
4551
4552         Much code can be clarified by using C++ STL-like algorithms.  Not
4553         all uses of these algorithms are listed below, only the ones where
4554         the change to an algorithm was the only change of interest.
4555         
4556         * Makefile.am: (pspp_SOURCES) Add algorithm.c, algorithm.h.
4557         
4558         * algorithm.c: New file.
4559
4560         * algorithm.h: New file.
4561
4562         * modify-vars.c: (static var forward) Removed.
4563         (static var positional) Removed.
4564         (compare_variables) Removed.
4565         (struct ordering) New.
4566         (cmd_modify_vars) Use sort() algorithm.
4567         (compare_variables_given_ordering) New function.
4568         (rearrange_dict) Use sort() algorithm.
4569
4570         * sysfile-info.c: (cmd_display) Use sort() algorithm.
4571         (cmp_var_by_name) Removed.
4572
4573 Fri Dec 19 14:26:17 2003  Ben Pfaff  <blp@gnu.org>
4574
4575         Make file handles use a hash table.
4576         
4577         * file-handle.q: (files) Change to hash table, make static.
4578         (cmd_file_handle) Use hash table functions.
4579         (fh_get_handle_by_filename) Ditto.
4580         (fh_get_handle_by_name) Ditto.
4581         (hash_file_handle) New function.
4582         (cmp_file_handle) Rewrite.
4583         (fh_init_files) Use hash table functions.
4584
4585 Fri Dec 19 14:24:38 2003  Ben Pfaff  <blp@gnu.org>
4586
4587         Clean up FREQUENCIES.
4588         
4589         * Makefile.am: (pspp_SOURCES) Remove frequencies.g.
4590
4591         * frequencies.q: Remove a lot of old #if'd out code at the end.
4592         (internal_cmd_frequencies) Use calc() instead of calc_no_weight()
4593         or calc_weight().  Initialize percentile_values.
4594         (calc) New function based on calc_weight() from frequencies.g.
4595         (precalc) Use hash functions.
4596         (static var comparison_func) Removed.
4597         (static var comparison_param) Removed.
4598         (comparison_helper) Removed.
4599         (get_freq_comparator) New function.
4600         (not_missing) New function.
4601         (add_freq) Removed.
4602         (postprocess_freq_tab) Use hash table functions, algorithms,
4603         get_freq_comparator().  Rewrite.
4604         (cleanup_freq_tab) Rephrase.
4605         (add_percentile) Clean up spacing.
4606         (hash_value_numeric) New function.
4607         (hash_value_alpha) New function.
4608         (compare_value_numeric_a) Rewrite.
4609         (compare_value_alpha_a) Rewrite.
4610         (compare_value_numeric_d) Rewrite.
4611         (compare_value_alpha_d) Rewrite.
4612         (compare_freq_numeric_a) Rewrite.
4613         (compare_freq_alpha_a) Rewrite.
4614         (compare_freq_numeric_d) Rewrite.
4615         (compare_freq_alpha_d) Rewrite.
4616         (calc_stats) Clean up mode, percentiles, max.
4617         (dump_statistics) Clean up spacing.
4618         
4619         * frequencies.g: Removed.
4620
4621         * var.h: (struct freq_tab) Change `data' to hash table.
4622
4623 Fri Dec 19 14:15:46 2003  Ben Pfaff  <blp@gnu.org>
4624
4625         * file-handle.h: Remove declaration of global variable `files',
4626         which wasn't used anywhere.
4627
4628         * postscript.c: (add_encoding) Remove superfluous cast.
4629         (line) Ditto.
4630
4631         * sfm-read.c: [linux] (bswap_int32) Drop ntohl() non-portable
4632         version.
4633
4634         * temporary.c: [0] (display_tree) Removed.
4635
4636 Fri Dec 19 14:13:04 2003  Ben Pfaff  <blp@gnu.org>
4637
4638         Implement a new random number generator based on the alleged RC4
4639         algorithm.
4640
4641         * expr-evl.c: (expr_evaluate) Use rng_get_double_normal() instead
4642         of rand_normal().
4643
4644         * random.c: [!HAVE_GOOD_RANDOM] (real_rand) Removed.
4645         [!HAVE_GOOD_RANDOM] (real_srand) Removed.
4646         (macro k) Removed.
4647         (static var V[]) Removed.
4648         (static var Y) Removed.
4649         (static var X2) Removed.
4650         (setup_randomize) Removed.
4651         (shuffle) Removed.
4652         (rand_uniform) Removed.
4653         (rand_normal) Removed.
4654         (struct rng) New structure.
4655         (rng_create) New function.
4656         (rng_destroy) New function.
4657         (swap_byte) New static function.
4658         (rng_seed) New function.
4659         (rng_get_bytes) New function.
4660         (rng_get_int) New function.
4661         (rng_get_unsigned) New function.
4662         (rng_get_double) New function.
4663         (rng_get_double_normal) New function.
4664         (pspp_rng) New function.
4665
4666         * random.h: Sync up to random.c.
4667
4668         * sample.c: (struct sample_trns) Make `frac' unsigned and a
4669         fraction of UINT_MAX, not 65536.
4670         (cmd_sample) Use rng_get_unsigned(), rng_get_double(), UINT_MAX
4671         fraction.
4672
4673         * vfm.c: (open_active_file) No need to call setup_randomize() any
4674         longer.
4675
4676 Fri Dec 19 12:05:56 2003  Ben Pfaff  <blp@gnu.org>
4677
4678         Change dictionary name indexes to use hash tables instead of AVL
4679         trees.
4680
4681         * crosstabs.q: (free_var_dict) Use hash tables.
4682         (crs_custom_tables) Ditto.
4683         (calc_general) Ditto.
4684         (compare_table_entry) Rewrite.
4685         (enum_var_values) Reorder parameters.  All references updated.
4686         Rewrite.
4687
4688         * get.c: (rename_variable) Use hash tables.
4689         (mtf_merge_dictionary) Ditto.
4690
4691         * glob.c: (init_glob) Use hash tables.
4692         (cmp_variable) Removed.
4693
4694         * means.q: (mns_custom_tables) Use hash tables.
4695
4696         * modify-vars.c: (rearrange_dict) Use hash tables.
4697
4698         * rename-vars.c: (cmd_rename_variables) Use hash tables.
4699
4700         * sfm-read.c: (read_header) Use hash tables.
4701         (read_variables) Ditto.
4702
4703         * temporary.c: (new_dictionary) Use hash tables.
4704         (save_dictionary) Ditto.
4705         (restore_dictionary) Ditto.
4706
4707         * var.h: (struct dictionary) Change AVL tree `var_by_name' into
4708         hash table `name_tab'.
4709
4710         * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed.
4711         [DEBUGGING] (dump_var_tree) Removed.
4712         (find_variable) Use hash tables.
4713         (find_dict_variable) Ditto.
4714         (common_init_stuff) Ditto.
4715         (rename_variable) Ditto.
4716         (clear_variable) Ditto.  Also, remove debug code.
4717         (dup_variable) Use hash tables.
4718
4719         * vars-prs.c: (fill_all_vars) Use hash tables.
4720         (is_dict_varname) Ditto.
4721         (parse_dict_variable) Ditto.
4722         
4723 Fri Dec 19 11:46:23 2003  Ben Pfaff  <blp@gnu.org>
4724
4725         Change value labels to use hash tables instead of AVL trees, and
4726         change value labels into an ADT.
4727
4728         * Makefile.am: (pspp_SOURCES) Add value-labels.c, value-labels.h.
4729         
4730         * value-labels.c: New file.
4731
4732         * value-labels.h: New file.
4733
4734         * apply-dict.c: (cmd_apply_dictionary) Use value label ADT.
4735         Get rid of a stupid use of goto.
4736
4737         * autorecode.c: (compare_alpha_value) Rewrite.
4738         (hash_alpha_value) Ditto.
4739         (compare_numeric_value) Rewrite.
4740         (hash_numeric_value) Ditto.
4741
4742         * frequencies.q: (dump_full) Use value label ADT.
4743
4744         * pfm-read.c: (read_value_label) Use value label ADT.
4745
4746         * pfm-write.c: (write_value_labels) Use value label ADT.
4747
4748         * sfm-read.c: (read_variables) Use value label ADT.
4749         (read_value_labels) Rewrite.
4750
4751         * sfm-write.c: (write_value_labels) Rewrite.
4752
4753         * sysfile-info.c: (cmd_sysfile_info) Use value label ADT.
4754         (display_variables) Ditto.
4755         (describe_variable) Ditto.
4756
4757         * t-test.q: (print_t_groups) Use value label ADT.
4758
4759         * temporary.c: (copy_variable) Use value label ADT.
4760         (free_dictionary) Ditto.
4761
4762         * val-labs.c: (verify_val_labs) Use value label ADT.
4763         (get_label) Ditto.
4764         (debug_print) Ditto.
4765         (val_lab_cmp) Removed.
4766         (inc_ref_count) Removed.
4767         (copy_value_labels) Removed.
4768
4769         * var.h: (struct value_label) Removed.
4770         (struct variable) Change AVL tree `val_lab' into hash table
4771         `val_labs'.
4772
4773         * vars-atr.c: (init_variable) Use value label ADT.
4774         (clear_variable) Ditto.
4775         (free_value_label) Removed.
4776         (free_val_lab) Removed.
4777         (get_val_lab) Removed.
4778         (compare_variables) New function.
4779         (hash_variable) New function.
4780
4781         * vfm.c: (dump_splits) Use value label ADT.
4782
4783 Fri Dec 19 11:18:11 2003  Ben Pfaff  <blp@gnu.org>
4784
4785         Add to the hash table interface.
4786
4787         * hash.c: (hsh_hash_bytes) Add assertion.
4788         (hsh_hash_string) Ditto.
4789         (hsh_clear) Ditto.
4790         (hsh_rehash) Ditto.
4791         (hsh_probe) Ditto.
4792         (hsh_create) Ditto.  Also make minimum `size'.
4793         (hsh_destroy) Rephrase.
4794         (sort_nulls_last) Removed.
4795         (not_null) New function.
4796         (hsh_data) Ditto.
4797         (comparison_helper) Ditto.
4798         (hsh_sort) Rewritten.
4799         (hsh_data_copy) New function.
4800         (hsh_sort_copy) Ditto.
4801         (hsh_insert) Ditto.
4802         (hsh_replace) Ditto.
4803         (hsh_hash_double) Ditto.
4804         (hsh_delete) Fix stupid bug.
4805         
4806 Thu Dec 18 12:27:03 WAST 2003 John Darrington <john@darrington.wattle.id.au>
4807         * added a calculation of the mode to FREQUENCIES
4808
4809 Wed Dec 17 12:53:01 WAST 2003 John Darrington <john@darrington.wattle.id.au>
4810
4811         * moved (un)defs of DEBUGGING to config.h
4812
4813 Mon Dec 15 21:35:59 2003  Ben Pfaff  <blp@gnu.org>
4814
4815         * groff-font.c: (add_kern) Fix indentation.
4816         (add_kern) Use & instead of % to take power-of-2 modulus.
4817         (font_get_kern_adjust) Likewise.
4818
4819 Fri Dec 12 23:54:37 2003  Ben Pfaff  <blp@gnu.org>
4820
4821         * autorecode.c: (recode) Replace stupid use of memcpy() by
4822         memberwise copy.
4823         (hash_alpha_value) Use hsh_hash_bytes().  Get rid of nasty casts.
4824         (hash_numeric_value) Ditto.
4825         (autorecode_proc_func) pool_strdup() was wrong here because the
4826         source string was not null-terminated.  Use new pool_strndup()
4827         instead.
4828
4829         * crosstabs.q: (enum_var_values) Remove superfluous and bizarre
4830         use of hsh_iterator_init().
4831
4832         * data-in.c: (parse_N) Initialize i->v->f.
4833
4834         * flip.c: (cmd_flip) Use memmove(), not memcpy(), to copy
4835         overlapping arrays.
4836
4837         * groff-font.c: Use power-of-2 hash table sizes, not prime.
4838         (groff_read_font) Don't call hsh_next_prime().  Don't call
4839         fclose(NULL).
4840         (static var hash) Remove `size_p', `max_used' members.
4841         (font_char_name_to_index) Don't call hsh_next_prime().  Use
4842         hsh_hash_string() instead of hashpjw(), & instead of %.
4843         (default_font) Don't call hsh_next_prime().
4844
4845         * pool.c: (pool_strndup) New function.
4846         (pool_strdup) Reimplement in terms of pool_strndup.
4847
4848         * postscript.c: (hash_font_entry) Use hsh_hash_string().  Get rid
4849         of nasty casts.
4850         (hash_ps_encoding) Use hsh_hash_string().
4851         (hash_ps_combo) Use hsh_hash_string(), hsh_hash_int().
4852         (hash_filename2font) Use hsh_hash_string().
4853
4854         * som.c: Add #include <stdlib.h>.
4855
4856         * tab.c: (tab_destroy) Don't set t->container after freeing `t'
4857         (by destroying its pool).
4858         
4859 Fri Dec 12 23:18:59 2003  Ben Pfaff  <blp@gnu.org>
4860
4861         Miscellaneous hash table code cleanup:
4862         
4863         * hash.h: (struct hsh_table) Moved into hash.c.
4864         (hsh_count) Ditto, and transformed into function.
4865         (hsh_compare_func) New typedef, used for defining otherwise-long
4866         function types here and in hash.c
4867         (hsh_hash_func) Ditto.
4868         (hsh_free_func) Ditto.
4869         
4870         * hash.c: (struct hsh_table) Renamed `n' to `used', `m' to `size',
4871         `table' to `entries'.  Removed `mp'.  All references updated.
4872         (hsh_clear) Don't shrink entries array; if the hash was this big
4873         once, it probably will be again.
4874         (hsh_rehash) Made static.
4875         (force_hsh_insert) Renamed hsh_force_insert.
4876         (force_hsh_find) Renamed hsh_force_find.
4877
4878         Made hash table sizes powers of 2, because that's fine with any
4879         reasonable hash function and because taking a power-of-2 modulus
4880         is faster than any other:
4881         
4882         (hsh_prime_tab) Removed;
4883         (hsh_next_prime) Ditto.
4884         (next_power_of_2) New function.
4885         (hsh_create) Use next_power_of_2.
4886         (hsh_rehash) Use & instead of %.
4887
4888         Cleaned up hsh_sort:
4889         
4890         (internal_comparison_fn) Removed.
4891         (sort_nulls_last) New function.
4892         (hsh_sort) Removed second parameter, switched to using the new
4893         quicksort() function from quicksort.h to avoid using nasty need
4894         for static variables with qsort().  All references updated.
4895
4896         Changed the hash functions offered, because there are better hash
4897         functions than the ones we had, and cleaned up the names to boot:
4898         
4899         * hash.c: (hashpjw_d) Removed.
4900         (hashpjw) Ditto.
4901         (hsh_hash_bytes) New function.
4902         (hsh_hash_string) New function.
4903         (hsh_hash_int) New function.
4904
4905         Improved the hash table iteration interface:
4906         
4907         * hash.h: (hsh_iterator_init) Removed.
4908         (struct hsh_iterator) Removed `init' member, change `next' to
4909         size_t.
4910
4911         * hash.c: (hsh_foreach) Removed.  All references updated to use
4912         hsh_first/hsh_next instead.
4913         (hsh_first) New function.  Notably, unlike hsh_foreach() it does
4914         not treat a null pointer as an empty hash table.
4915         (hsh_next) New function.
4916
4917         Made deletion possible, though slow:
4918
4919         * hash.c: (locate_matching_entry) New function.
4920         (hsh_find) Use locate_matching_entry().
4921         (hsh_delete) New function also using locate_matching_entry().
4922         (hsh_force_delete) New function.
4923
4924 Fri Dec 12 23:16:10 2003  Ben Pfaff  <blp@gnu.org>
4925
4926         * quicksort.c: New file implementing a sort routine with a
4927         interface better than qsort() because it passes a user-provided
4928         parameter to the sort routine.
4929
4930         * Makefile.am: Add quicksort.c, quicksort.h.
4931
4932 Fri Dec 12 13:31:58 2003  Ben Pfaff  <blp@gnu.org>
4933
4934         * All source files: Get rid of nasty special cases for Checker,
4935         which is pretty obsolete now.
4936
4937 Thu Dec 11 21:38:24 WST 2003 John Darrington <john@darrington.wattle.id.au>
4938
4939         * Fixed a bug apparent when using the FREQUENCIES command with the
4940         html driver.  The html driver was incorrectly trying to display 
4941         empty cells.
4942
4943 Sun Jan  2 21:40:13 2000  Ben Pfaff  <blp@gnu.org>
4944
4945         * Makefile.am: Reorganized.  Put locale dir in version.c instead
4946         of passing it to each compile command.  Only put local gmp libs in
4947         LD_ADD if not installed on system.  Remove `boast' target.
4948
4949         * All source files: struct and union typedefs eliminated.
4950         `sizeof type' replaced by `sizeof object' where practical.  Moved
4951         `unused' qualifiers from start to end of declarations for gcc
4952         2.7.2 compatibility.  Change `while (1)' to `for (;;)'.  Made
4953         assertions on pointers strictly compliant.  Removed _ prefixes on
4954         some function parameter names.
4955
4956         * alloc.c: New source file, containing these external linkage
4957         functions removed from common.c: xmalloc, xcalloc, xrealloc,
4958         xstrdup.
4959
4960         * arena.c: Removed.
4961         
4962         * arena.h: Removed.
4963
4964         * ascii.c: Migrated from arenas to pools.
4965         (struct ascii_driver_ext) ops[], box[], fonts[] changed from
4966         c_string to len_string.  All references changed.
4967         (ascii_option) Signature changed to comply to new output.c
4968         interface.
4969         (count_fancy_chars) Removed.
4970         (delineate) Removed support for rich text.
4971         (ascii_text_metrics) Ditto.
4972         (text_draw) Ditto.
4973         (output_shorts) Change `box', `off', `on' from c_string to
4974         len_string.  Change `remaining' from int to size_t.
4975         (ascii_close_page) Make page numbering less haphazard.
4976
4977         * autorecode.c: Migrate from arenas to pools.
4978
4979         * avl.c: Migrate from arenas to pools.  Synch from libavl 1.4.0.
4980
4981         * bitvector.h: New file containing these macros from misc.h:
4982         SET_BIT, CLEAR_BIT, SET_BIT_TO, TEST_BIT, BIT_INDEX.
4983
4984         * command.c: (struct command) cmd1, cmd2, cmd3 members changed to
4985         word[3].  ncmd removed.
4986         (var empty_string) Removed.
4987         (var cmd_table) Declaration updated.
4988         (var cmdtab) Removed.
4989         (cmp_command) Removed.
4990         (split_words) Rewritten to use strtok_r().
4991         (init_cmd_parser) Renamed cmd_init().  Rewritten.
4992         (find_command) Removed.
4993         (FILE_TYPE_okay) Rewritten.
4994         (cmd_parse) Rewritten.  Semantics of the return value of command
4995         handlers has changed: they must now return one of the new CMD_*
4996         enumerals, rather than a magic value.  This meant that all
4997         commands had to be modified, and they were.
4998         (figure_out_command) New function.
4999
5000         * command.def: Add CORRELATIONS, PEARSON CORRELATIONS.  Add
5001         #defines for INIT, INPU, etc.
5002
5003         * command.h: New CMD_* enum series.
5004         (cur_proc) Make const char *, not char *.
5005         (cmd_init) Prototype.
5006         (cmd_parse) Ditto.
5007
5008         * common.c: Removed.
5009
5010         * common.h: Removed.
5011
5012         * correlations.q: New file.
5013
5014         * crosstabs.q: Migrate from arenas to pools.  Migrate to new-style
5015         q2c.
5016         (custom_tables) Renamed crs_custom_tables().
5017         (custom_variables) Renamed crs_custom_variables().
5018         (calc_integer) Add in some `const' qualifiers.
5019         (table_value_missing) Change from a_string to len_string.
5020         (float_M_suffix) Change from a_string to len_string.
5021
5022         * data-in.c: Rewritten.  All references to
5023         parse_string_as_format() changed to data_in().
5024
5025         * data-in.h: New file.
5026
5027         * data-list.c: Change DLS_* from #define's to enums.  Move from
5028         rpd_msg() to tmsg().
5029         (RPD_ERR) New #define.
5030         (do_reading) Change dfm_push_cust() to dfm_push(), pop_cust() to
5031         dfm_pop().
5032         (read_from_data_list_fixed) Change from old
5033         parse_string_as_format() to new data_in().
5034         (read_from_data_list_free) Ditto.
5035         (read_from_data_list_list) Ditto.
5036         (cmd_repeating_data) Modify approach to checking for end of
5037         command.
5038         (rpd_msg) Removed.
5039         (rpd_parse_record) Change from old parse_string_as_format() to new
5040         data_in().  Change from old convert_format_to_string() to new
5041         data_out().
5042         (read_one_set_of_repetitions) Change dfm_push_cust() to
5043         dfm_push(), pop_cust() to dfm_pop().
5044
5045         * data-out.c: Rewritten.  All references to
5046         convert_format_to_string() changed to data_out().
5047
5048         * descript.q: Migrate to new q2c.
5049         (cmd_descriptives) Removed.
5050         (internal_cmd_descriptives) Renamed cmd_descriptives ().
5051         (custom_variables) Renamed dsc_custom_variables().
5052
5053         * dfm.c: (struct dfm_fhuser_ext) `ln' removed.  All references
5054         removed.
5055         (open_file_r) Initialize h->where.line_number.  Migrate to new
5056         struct string.
5057         (open_file_w) Initialize h->where.line_number.
5058         (read_record) Change from ext->ln to h->where.line_number.
5059         Migrate to struct string.
5060         (dfm_put_record) Rephrased.
5061         (dfm_push_cust) Renamed dfm_push(), rewritten.
5062         (dfm_pop) New function.
5063
5064         * error.c: All references updated.
5065         (glob var error_count) Renamed err_err_count.
5066         (glob var warning_count) Renamed err_warning_count.
5067         (glob var error_already_flagged) Renamed err_already_flagged.
5068         (glob var verbosity) Renamed err_verbosity.
5069         (glob var cust_fn) Removed.
5070         (glob var cust_ln) Removed.
5071         (static var file_loc) New.
5072         (static var nfile_loc) New.
5073         (static var mfile_loc) New.
5074         (tmsg) New function.
5075         (push_cust) Removed.
5076         (pop_cust) Removed.
5077         (msg) Rewritten.
5078         (static var terminating) Removed.
5079         (failure) Renamed err_failure().
5080         (hcf) Renamed err_hcf().
5081         (err_push_file_locator) New function.
5082         (err_pop_file_locator) New function.
5083         (err_location) New function.
5084         (check_error_count) Renamed err_check_count().
5085         (vmsg) Renamed err_vmsg().  Interface changed.
5086         (verbose_msg) Removed.
5087         (err_cond_fail) New function.
5088         (error_break) Renamed err_break().
5089
5090         * error.h: All references updated.
5091         (enum MSG_CLASS_COUNT) Renamed ERR_CLASS_COUNT.
5092         (enum ERR_CLASS_MASK, ERR_VERBOSITY_SHIFT, ERR_VERBOSITY_MASK)
5093         New.
5094         (struct file_locator) New.
5095         (struct error) New.
5096         (macro verbose_msg) Removed.
5097         (macro cond_fail) Removed.
5098
5099         * expr-opt.c: (evaluate_tree) sizeof(char) == 1.
5100
5101         * expr-prs.c: Reorganized.  All references updated.
5102         (exprtypename) Renamed expr_type_name().
5103         (typename) Renamed type_name().
5104         (free_expression) Renamed expr_free().
5105         (parse_expression) Renamed expr_parse().  Uses new type_check()
5106         function.
5107         (init_functab) Renamed init_func_tab().
5108         (type_check) New function.
5109         (parse_or) Rewritten to use new allocate_nonterminal() and
5110         append_nonterminal_arg() functions.
5111         (parse_and) Ditto.
5112         (parse_not) Ditto.
5113         (parse_rel) Ditto.  Also simplified logic.
5114         (parse_add) Ditto.
5115         (parse_mul) Ditto.
5116         (parse_neg) Ditto.
5117         (parse_exp) Ditto.
5118         (SYSMIS_func) Ditto.
5119         (VALUE_func) Rephrased.
5120         (CONCAT_func) Fix memory leak by replacing free by free_node on
5121         lossage.
5122         (generic_str_func) Ditto.
5123         (parse_function) Ditto.  Also rephrasings.  Uses bsearch() to find
5124         function.
5125         (allocate_nonterminal) New function.
5126         (append_nonterminal_arg) New function.
5127         (static func_tab[]) Now at file level.
5128         (cmp_func) Moved.
5129         (init_func_tab) Moved.  Now just uses qsort() to sort func_tab[].
5130
5131         * expr.h: (enum series OP_*) Moved to exprP.h.
5132         (OP_* defines) Ditto.
5133         (struct op_desc) Ditto.
5134         (global ops[]) Ditto.
5135         (struct num_con_node) Ditto.
5136         (struct str_con_node) Ditto.
5137         (struct var_node) Ditto.
5138         (struct lag_node) Ditto.
5139         (struct casenum_node) Ditto.
5140         (struct nonterm_node) Ditto.
5141         (union any_node) Members renamed.
5142         (struct sys_node) Removed.
5143         (struct val_node) Removed.
5144         (operator typedef) Removed.
5145         (typedef exprtype) Removed.
5146         (enum series EX_*) Moved to exprP.h.
5147         (struct expression) Ditto.  Also renamed a lot of the members.
5148         (PXP_* defines) Changed to enums.
5149         (free_node prototype) Moved to exprP.h.
5150
5151         * file-handle.h: (struct file_handle) New member `where'.
5152
5153         * file-handle.q: Migrated to new q2c format.
5154         (prepend_current_directory) Removed (dead code).
5155         (cmd_file_handle) Incorporated all of internal_cmd_file_handle().
5156         (fh_get_handle_by_filename) Removed dead code.
5157         Set new `where' member.
5158
5159         * file-type.c: (file_type_source_read) References to
5160         parse_string_as_format() changed to data_in().
5161         dfm_push_cust()/pop_cust() changed to dfm_push()/dfm_pop().
5162
5163         * filename.c: All references updated.
5164         (init_filename) Renamed fn_init().
5165         (expand_line) Removed.
5166         (macro EXPAND_LINE) Removed.
5167         (interp_vars) Renamed fn_interp_vars().  Now uses st_*() instead
5168         of custom functions.
5169         (gnu_getcwd) Renamed fn_get_cwd(), rewritten.
5170         (tilde_expand) Renamed fn_tilde_expand(), uses ds_*().
5171         (normalize_filename) Renamed fn_normalize().
5172         (search_path) Renamed fn_search_path(), rewritten.
5173         (prepend_dir) Renamed fn_prepend_dir().
5174         (blp_getenv) Renamed fn_getenv().
5175         (blp_dirname) Renamed fn_dirname().
5176         (fn_basename) New function, not used.
5177         (absolute_filename_p) Renamed fn_absolute_p().
5178         (is_special_filename) Renamed fn_special_p().
5179         (file_exists) Renamed fn_exists_p().
5180         (readlink_malloc) Renamed fn_readlink().
5181         (getenv_default) Renamed fn_getenv_default().
5182         (open_file) Renamed fn_open().
5183         (close_file) Renamed fn_close().
5184         (open_file_ext) Renamed fn_open_ext().
5185         (close_file_ext) Renamed fn_close_ext().
5186
5187         * font.h: Migrate from arenas to pools.
5188
5189         * format.c: (parse_format_specifier_name) Deal with ds_* strings.
5190
5191         * frequencies.g: Migrate from arenas to pools.
5192
5193         * frequencies.q: Migrate to new q2c version.  Migrate from arenas
5194         to pools.
5195
5196         * getline.c: All references updated.
5197         (global getl_buf) Changed from char * to struct string.
5198         (static getl_include_path) Ditto.
5199         (global getl_buf_len) Removed.
5200         (global getl_buf_size) Removed.
5201         (getl_include_path) Deal with new getl_buf, getl_include_path.
5202         (getl_uninitialize) New function.
5203         (getl_get_current_directory) Rewritten.
5204         (getl_clear_include_path) Rewritten.
5205         (getl_add_include_dir) Rewritten.
5206         (getl_add_file) Assertion fixed.
5207         (getl_add_virtual_file) Change initial value of `remaining_loops'
5208         from 2 to 1.
5209         (welcome) Rewritten.
5210         (handle_line_buffer) Make static.  Change logic to make
5211         getl_add_virtual_file() change sensible.  Use ds_*() strings.
5212         (getl_read_line) Use ds_*() strings.  Implement SET ECHO.
5213         (getl_close_file) Moved.
5214         (getl_location) New function.
5215
5216         * getline.h: All references updated.
5217         (macro curln) Removed.
5218         (macro curfn) Removed.
5219         (macro am_interactive) Renamed getl_am_interactive.
5220         (macro am_reading_script) Renamed getl_reading_script.
5221
5222         * glob.c: (global fmt_parse_ignore_error) Removed.
5223         (init_glob) Use locale_dir not LOCALEDIR.  Use feholdexcept() on
5224         systems that support it (C99).  Turn off SET ECHO by default.  No
5225         necessary julcal initialization anymore.
5226
5227         * groff-font.c: Migrate from arenas to pools.
5228         (groff_read_font) Use err_push_file_locator().
5229         (groff_read_DESC) Ditto.
5230         (font_msg) Use tmsg().
5231
5232         * hash.c: (hsh_sort) Fix debug code.
5233         [GLOBAL_DEBUGGING] Include stdio.h.
5234
5235         * hash.h: (macro force_hsh_insert) Rephrase.
5236
5237         * heap.c: Rewritten.
5238         
5239         * heap.h: Rewritten.
5240
5241         * html.c: (html_option) Change from outp_value to struct string.
5242         (postopen) Change from curfn to getl_location().
5243         (escape_string) Remove rich-text code.  Signature changed.
5244         (output_tab_table) Switch from a_string to struct len_string.
5245         Remove rich text support.
5246
5247         * lexer.c: All references updated.  Largely rewritten.  Major
5248         changes listed below.  Removed tagged quote support.  Adapted to
5249         struct string tokstr.
5250         (global tokstr) Changed to struct string.
5251         (global tokstr_size) Removed.
5252         (global tokstr_len) Removed.
5253         (global tokid) New.
5254         (global tokint) Removed.
5255         (global toklongstr) Removed.
5256         (C* defines) Removed.
5257         (static tbl[]) Removed.
5258         (static id[]) Removed.
5259         (static une[]) Removed.
5260         (discard_line) Renamed lex_discard_line().
5261         (get_entire_line) Renamed lex_entire_line().
5262         (get_rest_of_line) Renamed lex_rest_of_line().
5263         (get_dotted_rest_of_line) Merged into lex_rest_of_line().
5264         (make_hexit) Removed.
5265         (syntax_error) Renamed lex_error().  Return value removed.
5266         (get_token_representation) Renamed lex_token_representation().
5267         (putback) Renamed lex_put_back().
5268         (putfwd) Renamed lex_put_forward().
5269         (convert_negative_to_dash) Renamed lex_negative_to_dash().
5270         (set_prog) Renamed lex_set_prog().
5271         (init_lex) Renamed lex_init().
5272         (reset_eof) Renamed lex_reset_eof().
5273         (lookahead) Renamed lex_look_ahead().
5274         (check_id) Rewritten.
5275         (yylex) Renamed lex_get(), rewritten.
5276         (lex_end_of_command) New function.  Many commands were rephrased
5277         using this.
5278         (lex_integer_p) New function.  Replaces compare of tokint against
5279         NOT_LONG.
5280         (lex_integer) New function.  Replaces tokint.
5281         (match_tok) Renamed lex_match().
5282         (match_id) Renamed lex_match_id().
5283         (match_int) Renamed lex_match_int().
5284         (force_match_id) Renamed lex_force_match_id(), added return value.
5285         (force_match) Renamed lex_force_match(), added return value.
5286         (force_string) Renamed lex_force_string(), added return value.
5287         (force_int) Renamed lex_force_int(), added return value.
5288         (lex_id_match_len) New function.
5289         (id_match) Renamed lex_id_match(), rewritten.
5290         (get_line) Renamed lex_get_line().
5291         (preprocess_line) Renamed lex_preprocess_line().
5292         (tokname) Renamed lex_token_name().
5293         (bin_value_func) Removed.
5294         (oct_value_func) Removed.
5295         (hex_value_func) Removed.
5296         (unexpected_eof) New function.
5297         (convert_numeric_string_to_char_string) New function.
5298         (parse_string) Rewritten, signature changed.
5299         (add_tokstr_char) Removed.
5300         (add_tokstr_unsigned) Removed.
5301         (add_tokstr_string) Removed.
5302         (parse_tagged_quote) Removed.
5303         (skip_comment) Renamed lex_skip_comment().
5304
5305         * lexer.h: All references updated.
5306         (macro is_id1) Renamed CHAR_IS_ID1.
5307         (macro is_idn) Renamed CHAR_IS_IDN.
5308         (token names ID, NUM, STRING, STOP, ... WITH, EXP) Renamed with
5309         prefix T_: T_ID, T_NUM, T_STRING, T_STOP, ... T_WITH, T_EXP.
5310         (macro get_token) Removed.
5311         (macro id_match) Removed.
5312         (macro force_match_id) Removed.
5313         (macro force_match) Removed.
5314         (macro force_string) Removed.
5315         (macro force_int) Removed.
5316         (macro force_num) Removed.
5317         (macro force_id) Removed.
5318
5319         * lexerP.h: Removed.
5320
5321         * list.q: Migrated to new q2c format.
5322         (write_line) Deal with struct len_string.
5323         (write_varname) Ditto.
5324         (write_fallback_headers) Ditto.
5325
5326         * magic.c: New file, incorporating the following global variables
5327         previously in other files: endian, second_lowest_value.  And both
5328         of those are conditional on #define's.
5329
5330         * magic.h: New file, incorporating the following global variable
5331         declarations: endian, second_lowest_value, and the following macro
5332         declarations: NOT_DOUBLE, NOT_LONG, NOT_INT.
5333
5334         * main.c: Added declarations of pgmname, finished, curdate,
5335         start_interactive.
5336         (main) Call new parse_script() function.
5337         (parse_script) New function.
5338         (execute_command) New function.
5339         (dump_token) Removed.
5340         (handle_error) New function.
5341
5342         * matrix.c: New file.
5343
5344         * matrix.h: New file.
5345
5346         * matrix-data.c: Migrated from arenas to pools.
5347         (mget_token) Change from parse_string_as_format() to data_in().
5348
5349         * means.q: Migrate to new q2c.
5350         (custom_tables) Renamed mns_custom_tables().
5351         (custom_crossbreak) Renamed mns_custom_crossbreak().
5352         (custom_variables) Renamed mns_custom_variables().
5353
5354         * mis-val.c: (static var width) Changed from `int' to `size_t'.
5355         (parse_varnames) Prototype.
5356         (parse_numeric) Rephrasings.
5357         (parse_alpha) Adapt to new struct string tokstr.
5358
5359         * misc.c: (intlog10) Rewritten.
5360         (spacing) Removed.
5361         (ansi_rand) Renamed real_rand(), moved into random.c.
5362         (ansi_srand) Renamed real_srand(), moved into random.c.
5363         (setup_randomize) Moved to random.c.
5364         (rand_uniform) Ditto.
5365         (rand_normal) Ditto.
5366         (rand_simple) Ditto.
5367         (get_config_line) Removed.
5368         (reverse) Removed (dead code).
5369
5370         * misc.h: (macro SET_BIT) Moved to bitvector.h.
5371         (macro CLEAR_BIT) Ditto.
5372         (macro TEST_BIT) Ditto.
5373         (macro SET_BIT_TO) Ditto.
5374         (macro BIT_INDEX) Ditto.
5375
5376         * output.c: (outp_read_devices) Move to err_push_file_locator()
5377         from push_cust().  Use struct string.
5378         (expand_op_tokstr) Removed.
5379         (static var op_tokstr) Changed to struct string.
5380         (static var op_tokstr_size) Removed.
5381         (tokener) Rephrasings.  Use struct string.
5382         (parse_options) Use struct string.
5383         (destroy_driver) Fix assertion.
5384         (outp_get_paper_size) Move to err_push_file_locator().
5385         [0] Removed dead code.
5386         (outp_string_width) Move to len_string.
5387
5388         * output.h: Comment fixes.
5389         (TAG_* enum series) Removed.
5390         (struct outp_value) Removed.
5391         (enum OUTP_T_FANCY) Removed.
5392         (struct outp_text) `s' changed from a_string to len_string.
5393         (struct outp_class) `option' change arg 3 from outp_value to
5394         struct string.
5395
5396         * pfm-read.c: (corrupt_msg) Rewritten.
5397
5398         * pfm-write.c: (bufwrite) Fix assertion.
5399
5400         * pool.c: New file, reference version.
5401
5402         * pool.h: New file, reference version.
5403
5404         * postscript.c: (ps_font_sizes) Fix assertion.
5405         (ps_option) Change arg 3 from outp_value to struct string.
5406         Adapt to struct string.
5407         (macro output_line) Removed.
5408         (macro add_string) Removed.
5409         (output_encodings) Adapted to struct string.  Moved to
5410         err_push_file_locator().
5411         (find_encoding_file) Fix assertion.
5412         (read_ps_encodings) Move to err_push_file_locator().
5413         (postopen) Use getl_location() instead of curfn.
5414         (out_text_plain) Move to len_string.
5415         (text) Ditto.  Remove rich text support.
5416
5417         * print.c: (cmd_print) Remove now-unneeded resource cleanup code.
5418         (cmd_print_eject) Ditto.
5419         (cmd_write) Ditto.
5420         (internal_cmd_print) Now cleans up after itself.  Uses
5421         fh_parse_file_handle() now.
5422         (cmd_print_space) Use PXP_NUMERIC to type-check.
5423
5424         * q2c.c: Overhauled.  Removed _("") i18n support.  All references
5425         updated.  All output functions updated to handle structures rather
5426         than local or static variables.  Adapt to new PSPP lex_*()
5427         functions.
5428         (macro _) Removed.
5429         (macro N_) Removed.
5430         (macro MAX_N_SBC) Removed.
5431         (global bare) Removed.
5432         (enum STRING) Renamed T_STRING.
5433         (enum ID) Renamed T_ID.
5434         (get_buffer) Buffer size increased.
5435         (strlower) Renamed st_lower(), rephrased.
5436         (strupper) Renamed st_upper(), rephrased.
5437         (skip_ws) New function.
5438         (get_line) Don't special-case any types of lines (like those
5439         beginning with ! or $, for instance).
5440         (get_token) Renamed lex_get().  Rephrased.
5441         (static var `prefix') New.
5442         (parse) New function.
5443         (parse_setting) Minor rephrasing.
5444         (dump_specifier_vars) Ditto.
5445         (make_identifier) Put null terminator on identifier, duh.
5446         (dump_vars) Renamed dump_declarations().  Never indent.  Never
5447         static.  Output changed entirely.
5448         (dump_specifier_init) Rephrase.
5449         (dump_vars_init) No index variable needed.  Other modifications.
5450         (dump_parser) Don't parse command name.  Do dump functions instead
5451         of just code fragments.
5452         (dump_free) Dump function instead of code fragment.
5453         (recognize_directive) New function.
5454         (main) Use recognize_directive().  Don't rely on magic $ line
5455         beginning: instead, parse comments.  Update list of headers.
5456
5457         * random.c: New file, containing the following functions:
5458         real_rand(), real_srand(), setup_randomize, shuffle, rand_uniform,
5459         rand_normal, rand_simple.
5460
5461         * random.h: New file.
5462
5463         * recode.c: (cmd_recode) Merge internal_cmd_recode() into this
5464         function.  `max_src_width', `max_dst_width' changed to size_t.
5465         (internal_cmd_recode) Removed.
5466         (parse_dest_spec) Merge similar cases.
5467         (parse_src_spec) Add assertion.
5468
5469         * repeat.c: (recognize_keyword) New function.
5470         (internal_cmd_do_repeat) Parse and handle PRINT keyword on END
5471         REPEAT.  Improve recognition of END REPEAT (use
5472         recognize_keyword()).  Move from curfn to getl_location().  Use
5473         struct string.
5474                 
5475         (perform_DO_REPEAT_substitutions) Adapt to struct string.
5476
5477         * set.q: Adapt to new q2c.
5478         (cmd_set) Range-check some values better.
5479         (custom_blanks) Renamed stc_custom_blanks().
5480         (custom_length) Renamed stc_custom_length().
5481         (custom_results) Renamed stc_custom_results().
5482         (custom_seed) Renamed stc_custom_seed().
5483         (custom_width) Renamed stc_custom_width().
5484         (custom_format) Renamed stc_custom_format().
5485         (custom_journal) Renamed stc_custom_journal().
5486         (custom_color) Renamed stc_custom_color().
5487         (custom_listing) Renamed stc_custom_listing().
5488         (custom_disk) Renamed stc_custom_disk().
5489         (custom_log) Renamed stc_custom_log().
5490         (custom_rcolor) Renamed stc_custom_rcolor().
5491         (custom_viewlength) Renamed stc_custom_viewlength().
5492         (custom_workdev) Renamed stc_custom_workdev().
5493
5494         * settings.h: Not necessary to include format.h any longer.
5495
5496         * sfm-read.h: (macro bswap_int32) Moved here from sfmP.h.
5497         (corrupt_msg) Rewritten.
5498
5499         * sort.c: Adapt to rewritten heap ADT.
5500
5501         * str.c: (aa_strcpy) Removed.
5502         (ab_strcpy) Removed.
5503         (ac_strcpy) Removed.
5504         (ba_strcpy) Removed.
5505         (bb_strcpy) Removed.
5506         (ca_strcpy) Removed.
5507         (aa_strdup) Removed.
5508         (aa_strdupcpy) Removed.
5509         (ba_strdup) Removed.
5510         (sa_strdup) Removed.
5511         (memrev) Renamed mm_reverse().
5512         (memrmem) Renamed mm_find_reverse().
5513         (cmp_str) Renamed st_compare_pad().
5514         (strmaxcpy) Removed.
5515         (strbarepadcpy) Renamed st_bare_pad_copy(), signature changed.
5516         (strbarepadlencpy) Renamed st_bare_pad_len_copy(), signature
5517         changed.
5518         (strpadcpy) Renamed st_pad_copy(), signature changed.
5519         (blpstrset) Removed.
5520         (ds_create) New function.
5521         (ds_init) New function.
5522         (ds_replace) New function.
5523         (ds_destroy) New function.
5524         (ds_clear) New function.
5525         (ds_extend) New function.
5526         (ds_shrink) New function.
5527         (ds_truncate) New function.
5528         (ds_length) New function.
5529         (ds_size) New function.
5530         (ds_value) New function.
5531         (ds_end) New function.
5532         (ds_concat) New function.
5533         (ds_concat_buffer) New function.
5534         (ds_printf) New function.
5535         (ds_putchar) New function.
5536         (ds_getline) New function.
5537         (ds_get_config_line) New function derived from the old
5538         misc.c:get_config_line().
5539         (ls_create) New function.
5540         (ls_create_buffer) New function.
5541         (ls_init) New function.
5542         (ls_shallow_copy) New function.
5543         (ls_destroy) New function.
5544         (ls_null) New function.
5545         (ls_null_p) New function.
5546         (ls_empty_p) New function.
5547         (ls_length) New function.
5548         (ls_value) New function.
5549         (ls_end) New function.
5550
5551         * str.h: Reformatted.
5552         (struct a_string) Removed.
5553         (struct b_string) Removed.
5554         (struct c_string) Removed.
5555         (struct len_string) New.
5556         (struct string) New.
5557         (macro as_streq) Removed.
5558         (macro bs_streq) Removed.
5559         (macro cs_streq) Removed.
5560         (macro sa_streq) Removed.
5561         (macro sb_streq) Removed.
5562         [__GNUC__] (inline function ds_putchar) New function.
5563         [__GNUC__] (inline function ds_length) New function.
5564         [__GNUC__] (inline function ds_value) New function.
5565         [__GNUC__] (inline function ds_end) New function.
5566
5567         * sysfile-info.c: (cmd_sysfile_info) Rephrased.
5568         (display_vectors) Fix missing i18n.
5569
5570         * t-test.q: Migrate to new q2c.
5571
5572         * tab.c: Migrate from arenas to pools.
5573         (tab_create) Use struct len_string.
5574         (tab_realloc) Ditto.
5575         (text_format) Ditto.
5576         (tab_joint_text) Ditto.
5577         (tab_natural_width) Remove rich text support.
5578         (tab_natural_height) Ditto.
5579         (tab_output_text) Handle TAT_FIX.
5580         (tab_raw) Change arg from a_string to len_string.
5581         (tabi_driver) Fix assertion.  Use struct len_string.
5582         (render_strip) Use struct len_string.  Remove rich text support.
5583         Add `const' qualifiers.
5584
5585         * tab.h: (enum TAB_RICH) Remove.
5586         (enums TAB_COL_NONE, TAB_COL_DONE) New.  Where appropriate,
5587         SOM_COL_* updated to read TAB_COL_*.
5588         (struct tab_table) Change arena to pool.  Change a_string to
5589         len_string.
5590
5591         * temporary.c: (restore_dictionary) Rewrite Checker code.
5592
5593         * var.h: (macros MAX_SHORT_STRING, MIN_LONG_STRING, SYSMIS,
5594         LOWEST, HIGHEST) Moved here from common.h.
5595         (typedef any_trns) Removed.  All references changed to `struct
5596         trns_header'.
5597
5598         * vars-atr.c: (force_create_variable) Fix assertion.
5599         (force_dup_variable) Fix assertion.
5600         
5601 Thu Jun  3 18:40:42 1999  Ben Pfaff  <blp@gnu.org>
5602
5603         Using alphanumeric variables in functions under AGGREGATE
5604         segfaulted.  Fixed.  Thanks to Dr. Dirk Melcher
5605         <BZN-mdksh@t-online.de> for reporting this bug.
5606         
5607         * aggregate.c: (parse_aggregate_functions) When setting the
5608         FSTRING bit, also allocate memory for the `string' member of
5609         agr_next.
5610         (free_aggregate_functions) Free iter->string.  Don't use the
5611         non-function bits when indexing the array of functions.
5612         [DEBUGGING] (debug_print) Don't use the non-function bits when
5613         indexing the array of functions.        
5614
5615 Sun May 30 00:00:54 1999  Ben Pfaff  <blp@gnu.org>
5616
5617         Under certain circumstances, the final case would be omitted from
5618         the results of an AGGREGATE operation.  Fixed.  Thanks to Dr. Dirk
5619         Melcher <BZN-mdksh@t-online.de> for reporting this bug.
5620         
5621         * aggregate.c (agr_00x_end_func): Increment number of cases in
5622         sink before writing case.  For streams that keep track of how many
5623         cases there are based on this value, this means that the last case
5624         will be read in on the next stream read.
5625
5626 Sat May 29 22:03:31 1999  Ben Pfaff  <blp@gnu.org>
5627
5628         Undefined behavior was invoked by referencing a freed pointer.
5629         
5630         * vfm.c (memory_stream_write): Free pointer *after* checking for
5631         non-null status.
5632
5633 Sat May 29 22:02:22 1999  Ben Pfaff  <blp@gnu.org>
5634
5635         A wrong record size was displayed when paging the active file to
5636         disk.
5637         
5638         * vfm.c: (memory_stream_write) Fix off-by-one error.
5639
5640 Sat May 29 21:50:26 1999  Ben Pfaff  <blp@gnu.org>
5641
5642         Not having enough temporary space for sorting caused a core dump.
5643         Fixed.
5644         
5645         * sort.c: (allocate_cases) Initialize i.
5646
5647 Sat May 29 21:40:54 1999  Ben Pfaff  <blp@gnu.org>
5648
5649         Syntax errors in function descriptions on AGGREGATE caused core
5650         dumps.  Fixed.
5651         
5652         * aggregate.c (cmd_aggregate): Don't free agr_dict after calling
5653         free_aggregate_functions(), since that function already frees
5654         agr_dict.
5655         
5656 Sat May 29 21:06:10 1999  Ben Pfaff  <blp@gnu.org>
5657
5658         A null pointer was dereferenced, causing a core dump, when
5659         PERCENTILES was specified on FREQUENCIES.  This fixes the problem,
5660         but PSPP still doesn't calculate percentiles.  Thanks to Regnor
5661         Jernsletten <rjernsle@eunet.no> for reporting this problem.
5662         
5663         * arena.c: (arena_malloc) If the arena hasn't been initialized
5664         already, initialize it.
5665
5666 Sat May 29 20:47:29 1999  Ben Pfaff  <blp@gnu.org>
5667
5668         * Makefile.cygwin: New file supplied by Hankin <hankin@dunno.com>
5669         for compilation with Cygnus Windows B20.  Not used by other
5670         systems.
5671
5672 Sat May 29 20:36:04 1999  Ben Pfaff  <blp@gnu.org>
5673
5674         SORT always sorted in ascending order.  Fixed.  Thanks to Dr. Dirk
5675         Melcher <BZN-mdksh@t-online.de> for reporting this bug.
5676
5677         * sort.c: (compare_case_lists) Reverse sense of comparison if
5678         sorting in descending order.
5679         (compare_record) Ditto.
5680
5681 Tue Mar  9 13:18:54 1999  Ben Pfaff  <blp@gnu.org>
5682
5683         SPLIT FILE with a string variable caused a core dump.  Fixed.
5684
5685         * vfm.c: If the variable is a string then make a temporary value
5686         struct pointing to it.  The underlying problem is a lot bigger
5687         than this (see TODO) but this is a stopgap for the simple case at
5688         least.
5689         
5690 Tue Mar  9 13:15:53 1999  Ben Pfaff  <blp@gnu.org>
5691
5692         Nested INCLUDEs didn't work.  Fixed.
5693
5694         * getline.c: (getl_include) Set first_line to NULL in allocated
5695         structure.
5696
5697 Tue Mar  9 13:13:46 1999  Ben Pfaff  <blp@gnu.org>
5698
5699         The MATCH FILES procedure set the values of variables not present
5700         to 0.  It should have been SYSMIS.  This is now fixed.
5701
5702         * get.c: (mtf_delete_file_in_place) Replace 0.0 by SYSMIS.
5703
5704 Tue Mar  9 12:52:23 1999  Ben Pfaff  <blp@gnu.org>
5705
5706         The REMARK command was too aggressive about skipping lines.  It
5707         didn't like being the last command in a file.
5708
5709         * command.c: (cmd_remark) Call get_entire_line() instead of
5710         get_line().
5711
5712 Tue Mar  9 12:48:05 1999  Ben Pfaff  <blp@gnu.org>
5713
5714         Comment parsing wasn't consistent with the rest of the code in its
5715         idea of where one command ends and another starts.  This meant
5716         that sometimes commands would be mysteriously ignored.  Thanks to
5717         Dr. Dirk Melcher <BZN-mdksh@t-online.de> for reporting this bug.
5718          
5719         * command.c: (parse_cmd) Hand off comment parsing to new function
5720         skip_comment() in lexer.c.
5721         * lexer.c: (skip_comment) New function.
5722
5723 Wed Jan 20 20:22:07 1999  Ben Pfaff  <blp@gnu.org>
5724
5725         The TABLE subcommand on MATCH FILES worked only erratically at
5726         best.  This fixes it.  Thanks to Dr. Dirk Melcher
5727         <BZN-mdksh@t-online.de> for reporting this bug.
5728
5729         * get.c: (mtf_compare_BY_values) When comparing string values, a
5730         difference of 1 is still a difference :-)
5731         (mtf_processing) Inverted TABLE reading logic fixed.  Also don't
5732         advance TABLE files automatically when matched.  Comment fixes.
5733
5734 Tue Jan 19 22:32:31 1999  Ben Pfaff  <blp@gnu.org>
5735
5736         VARIABLE LABELS rejected a slash before the first variable
5737         specification, contradicting the documentation.  Thanks to Walter
5738         M. Gray <graywm@northernc.on.ca> for reporting this bug.
5739
5740         * var-labs.c: (cmd_variable_labels) Ignore a leading slash in
5741         command specification.
5742
5743 Tue Jan 19 22:29:54 1999  Ben Pfaff  <blp@gnu.org>
5744
5745         Because of an incorrect optimization in memory allocation,
5746         CROSSTABS sometimes segfaulted when asked to output multiple
5747         tables.  Thanks to Walter M. Gray <graywm@northernc.on.ca> for
5748         reporting this bug.
5749
5750         * crosstabs.q: (postcalc) New variables maxcols, maxcells, which
5751         are passed to output_pivot_table() for its use.
5752         (output_pivot_table) Instead of assuming the number of columns is
5753         constant, keep track with maxcols.  In general mode, use maxcells
5754         to determine whether more matrix cells need to be allocated.    
5755
5756 Tue Jan 19 22:27:46 1999  Ben Pfaff  <blp@gnu.org>
5757
5758         CROSSTABS didn't display value labels for column and row
5759         variables.  Thanks to Walter M. Gray <graywm@northernc.on.ca> for
5760         reporting this bug.
5761
5762         * crosstabs.q: (table_value_missing) If the specified value has a
5763         value label for this variable, then show it instead of the raw
5764         value.
5765         (display_dimensions) Delegate display of value_labels to
5766         table_value_missing.
5767
5768 Mon Jan 18 20:04:06 1999  Ben Pfaff  <blp@gnu.org>
5769
5770         WRITE didn't write line ends.  Fixed.  Thanks to Dr. Dirk Melcher
5771         <BZN-mdksh@t-online.de> for reporting this bug.
5772
5773         * print.c: (print_trns_proc) Write (CR/)LF if PRINT is used _or_
5774         if the file isn't declared as binary.
5775
5776 Mon Jan 18 19:56:45 1999  Ben Pfaff  <blp@gnu.org>
5777
5778         MATCH FILES corrupted memory and dumped core on some syntax
5779         errors.  Fixed.
5780
5781         * get.c: (cmd_match_files) Set file->handle to NULL before
5782         jumping to lossage.
5783         (mtf_free_file) Don't free a null dictionary.   
5784
5785 Mon Jan 18 19:27:57 1999  Ben Pfaff  <blp@gnu.org>
5786
5787         MATCH FILES should set numeric values not available to the
5788         system-missing value, not to 0.  Thanks to Dr. Dirk Melcher
5789         <BZN-mdksh@t-online.de> for reporting this bug.
5790
5791         * get.c: (mtf_processing) Set unused records to system-missing,
5792         not 0.
5793
5794 Mon Jan 18 15:06:46 1999  Ben Pfaff  <blp@gnu.org>
5795
5796         KEEP didn't work properly on the SAVE procedure.  Fixed.  Thanks
5797         to Ralf Geschke <ralf@kuerbis.org> for reporting this bug.
5798
5799         * temporary.c: (save_dictionary) Initialize var_by_name AVL tree
5800         in newly created dictionary, and add each copied variable to the
5801         tree.
5802  
5803 Mon Jan 18 15:04:48 1999  Ben Pfaff  <blp@gnu.org>
5804
5805         Memory leak fix.
5806         
5807         * get.c: (trim_dictionary) Free variable list for KEEP after
5808         finishing with it.
5809
5810 Mon Jan 18 12:57:36 1999  Ben Pfaff  <blp@gnu.org>
5811
5812         Some systems didn't like the way open_file was coded.  Thanks to
5813         Hankin <hankin@rogue.consultco.com> for pointing this out.
5814
5815         * filename.c: (open_file) Don't try to store stdin, stdout,
5816         stderr as part of an array, because that doesn't always work.
5817
5818 Mon Jan 18 12:53:27 1999  Ben Pfaff  <blp@gnu.org>
5819
5820         The SAVE procedure didn't save long string variables properly.
5821         Fixed by this patch.  Thanks to Hankin
5822         <hankin@rogue.consultco.com> for this patch.
5823         
5824         * sfm-write.c: (write_variable) Fix off-by-one error in writing
5825         out variable pad records.
5826
5827 Tue Jan  5 14:29:27 1999  Ben Pfaff  <blp@gnu.org>
5828
5829         Previously, if PRINT SPACE were given a negative argument, it
5830         would report an error, then spin in an (almost) infinite loop.
5831         This fixes that behavior.
5832
5833         * print.c: (print_space_trns_proc) After reporting a negative
5834         argument, set number of lines to print to 1.
5835
5836 Tue Jan  5 13:59:55 1999  Ben Pfaff  <blp@gnu.org>
5837
5838         SPSS 8.0 outputs some new record types in its system files, and it
5839         allows longer value labels.  Accept these system files.
5840
5841         * sfm-read.c: (sfm_read_dictionary) Ignore record type 7 subtype
5842         11 emitted by SPSS 8.0.
5843         
5844 Tue Jan  5 13:55:50 1999  Ben Pfaff  <blp@gnu.org>
5845
5846         The LIST procedure was too conservative in allocating space for
5847         buffers, which caused a bug that only showed up with very long
5848         output variables.  Thanks to Hankin <hankin@dunno.com> for this
5849         bug report.
5850
5851         * list.q: (determine_layout) Allocate 1022 bytes instead of 256.
5852
5853 Tue Jan  5 13:34:34 1999  Ben Pfaff  <blp@gnu.org>
5854
5855         Typo meant string format specifiers weren't checked properly.  I
5856         think that Hankin <hankin@dunno.com> sent me this report, but I'm
5857         willing to be corrected on this point.
5858  
5859         * format.c: (check_string_specifier) Fix obvious typo.  
5860
5861 Tue Jan  5 12:50:42 1999  Ben Pfaff  <blp@gnu.org>
5862
5863         Using $CASENUM in an expression didn't work.  Here's a fix.
5864         Thanks to Dirk Melcher <BZN-mdksh@t-online.de> for reporting this
5865         bug.
5866          
5867         * expr-evl.c: (evaluate_expression) Add OP_CASENUM case.
5868
5869         * expr-opt.c: (dump_node) OP_CASENUM is acceptable.
5870
5871 Tue Jan  5 12:47:48 1999  Ben Pfaff  <blp@gnu.org>
5872
5873         The changes in 0.2.1 to fix DATA LIST FREE parsing broke some
5874         other behavior, *sigh*.  This patch hopefully fixes that.  This
5875         time I've actually tested it.
5876
5877         Thanks to Hankin <hankin@dunno.com> for reporting this bug.
5878
5879         * data-list.c: (read_from_data_list_free,
5880         read_from_data_list_list) Call parse_string_as_format() directly
5881         without mucking around with the field width.
5882
5883 Tue Jan  5 12:31:19 1999  Ben Pfaff  <blp@gnu.org>
5884
5885         Occasionally, you may encounter a script that wants to be
5886         interpreted in interactive mode.  Make -i emulate this behavior to
5887         allow such scripts to be executed with PSPP.
5888
5889         Thanks to Hankin <hankin@dunno.com> for reporting this behavior.
5890
5891         * cmdline.c: (pre_syntax_message[]) Update -i description.
5892
5893         * lexer.c: (preprocess_line) When getl_interactive is 2 (i.e.,
5894         when -i is given on the command line) don't treat unindented lines
5895         as starting a new command.
5896
5897 Tue Jan  5 12:30:10 1999  Ben Pfaff  <blp@gnu.org>
5898
5899         In conjunction with egcs 1.1.1, Checker emits some bogus warnings,
5900         mostly caused by local initialized aggregates.  After egcs is
5901         fixed upstream these can be removed, but for now they're not a big
5902         deal.
5903         
5904         * ascii.c: (ascii_postopen_driver) Checker chokes on local
5905         initialized arrays.  Avoid this.
5906
5907         * sfm-write.c: (sfm_write_dictionary) Don't use a local
5908         initialized struct.
5909
5910 Tue Jan  5 12:07:24 1999  Ben Pfaff  <blp@gnu.org>
5911
5912         egcs 1.1.1 has some new warnings relative to gcc 2.8.1, which the
5913         following changes avoid.  Currently I compile sources with egcs
5914         1.1.1 and gcc 2.7.2.3 before sending them out.
5915
5916         * apply-dict.c: (apply_dict) Use new avl_traverser_init() macro.
5917         
5918         * ascii.c: (option_tab[]) Initialize all struct members.
5919
5920         * avl.h: (avl_traverser_init) New macro.
5921         
5922         * command.c: (DEFCMD, UNIMPL macros, cmd_table[]) Initialize all
5923         struct members.
5924
5925         * crosstabs.q: (enum_var_values) Use new hsh_iterator_init()
5926         macro.
5927
5928         * hash.c: Comment fix.
5929
5930         * hash.h: (hsh_iterator_init) New macro.
5931
5932         * html.c: (option_tab[]) Initialize all struct members.
5933
5934         * pfm-write.c: (write_value_labels) Use new avl_traverser_init()
5935         macro.
5936
5937         * postscript.c: (option_tab[]) Initialize all struct members.
5938         (output_encodings, preclose, dump_lines) Use new
5939         hsh_iterator_init() macro.
5940
5941         * sfm-write.c: (write_value_labels) Use new avl_traverser_init()
5942         macro.
5943
5944         * sysfile-info.c: (describe_variable) Use new avl_traverser_init()
5945         macro.
5946
5947 Thu Nov 19 12:32:45 1998  Ben Pfaff  <blp@gnu.org>
5948
5949         * data-in.c: Examined each of the parsing functions to make sure
5950         that they wouldn't dump core if they were passed a string of the
5951         wrong length, since now the DATA LIST FREE/LIST routines don't
5952         check for field width before passing it to the data parser.
5953         (parse_RBHEX, parse_AHEX) Reject odd length input.
5954         (parse_string_as_format) Reject input that's too short or too
5955         long.
5956
5957         * data-list.c: Before, the DATA LIST FREE/LIST routines would pad
5958         a field to its entire declared output width then pass it to the
5959         data-in parsing routines.  This contradicted the documented
5960         behavior.  This is fixed in these changes.  Thanks to Mark H. Wood
5961         <mwood@IUPUI.Edu>.  In addition, this fixes a few more details of
5962         free-format parsing that differed from SPSS.
5963         (cut_field) Commas and spaces are treated identically.  Returns
5964         the proper column instead of a fixed 1 value.
5965         (parse_field) Removed.
5966         (read_from_data_list_free, read_from_data_list_list) Call
5967         parse_string_as_format directly instead of parse_field.
5968
5969         * heap.c: (heap_delete) Stylistic fixes.
5970
5971 Sun Aug  9 11:12:13 1998  Ben Pfaff  <blp@gnu.org>
5972
5973         * loop.c: (loop_2_trns_proc) Formatting fix.
5974
5975         * sel-if.c: (cmd_filter) Set FILTER_before_TEMPORARY.
5976
5977         * var.h: (glob var FILTER_before_TEMPORARY) New global var.
5978
5979         * vfm.c: (macro FILTERED) New.
5980         (static var filter_var) New.
5981         (process_active_file_write_case) Use FILTERED.
5982         (setup_filter) Set filter_var.
5983         (close_active_file) Delete the filter if not
5984         FILTER_before_TEMPORARY.
5985         (procedure_write_case) Use FILTERED.
5986
5987 Sat Aug  8 00:20:14 1998  Ben Pfaff  <blp@gnu.org>
5988
5989         * crosstabs.q: Changed /PIVOT={ON,OFF} to /FORMAT={PIVOT,NOPIVOT}.
5990
5991         * data-in.c: (parse_day_count) Message fix.
5992         (parse_month) Style fix.
5993
5994         * data-list.c: (struct data_list_pgm) New member eof.
5995         (cmd_data_list) Init eof to 0.
5996         (do_reading) Implement the /END subcommand and read-past-eof
5997         checking.
5998
5999         * do-if.c: Include stdio.h when debugging.
6000         (cmd_else_if) Make sure the command is .-terminated.
6001
6002         * glob.c: (init_glob) Capitalize the command prompt.
6003
6004         * inpt-pgm.c: (end_case_trns_proc) Debugging message.
6005         (end_file_trns_proc) Debugging message.
6006
6007         * loop.c: (internal_cmd_loop) Make it work when there's no loop
6008         index!
6009         (loop_2_trns_proc) Enable MXLOOPS (why was this disabled?)
6010
6011         * main.c: (dump_token) Make kwtab[] const.
6012
6013         * set.q: Spelling, comment fixes.
6014
6015         * sysfile-info.c: (cmd_display) DISPLAY VECTORS not DISPLAY
6016         VECTOR.
6017
6018         * vars-prs.c: (fill_all_vars) Style fix.
6019
6020         * vfm.c: (index_to_varname) Return const.
6021
6022 Tue Aug  4 23:49:23 1998  Ben Pfaff  <blp@gnu.org>
6023
6024         * Changes in many source files for partial -ansi -pedantic and
6025         no-debugging compliance: Remove trailing common in enum
6026         declarations; add `unused' attributes; insert some appropriate
6027         casts.
6028
6029         * cmdline.c: (parse_command_line) Add new --testing-mode flag.
6030
6031         * command.c: (shell) Make static.
6032         (run_command) Make static.
6033
6034         * data-list.c: (dump_fixed_table) Remove use of local_strdup().
6035
6036         * dfm.c: (cmd_begin_data) I18n fix.
6037
6038         * error.c: (verbose_msg) Define if __STRICT_ANSI__.
6039
6040         * error.h: (macro verbose_msg) Define if __STRICT_ANSI__.
6041
6042         * expr-opt.c: (evaluate_tree) Don't initialize local arrays if
6043         __STRICT_ANSI__.
6044
6045         * file-handle.q: Don't prepend the source file directory name to
6046         the data file name.  (Ongoing issue.)
6047         (prepend_current_directory) Comment out.
6048         (internal_cmd_file_handle) Don't call prepend_current_directory().
6049         (fh_get_handle_by_filename) Ditto.
6050
6051         * filename.c: Append zero byte to readlink() return value.
6052
6053         * getline.c: (getl_read_line) I18n fix.
6054
6055         * lexer.h: Don't use gcc features if __STRICT_ANSI__.
6056
6057         * misc.h: Don't use gcc features if __STRICT_ANSI__.
6058
6059         * pfm-write.c: (bufwrite) Don't try to increment a void * pointer
6060         directly.
6061
6062         * postscript.c: (output_encodings) Don't use local_strdup().
6063         (postopen) Ditto.
6064
6065         * print.c: Don't use gcc features if __STRICT_ANSI__.
6066
6067         * q2c.c: (dump_vars) Don't put a , at the end of the last enum.
6068
6069         * recode.c: (parse_src_spec) Fully brace nested if's.
6070
6071         * set.q: (global var set_testing_mode) New var.
6072
6073 Wed Jul 29 22:01:44 1998  Ben Pfaff  <blp@gnu.org>
6074
6075         * ascii.c: Add some more `unused' attributes that only come into
6076         play when NDEBUG is defined.
6077         (ascii_close_page) Set s_len when reallocating s.
6078         
6079         * crosstabs.q: (delete_missing) New function.
6080         (output_pivot_table) Call delete_missing() if /MISSING=REPORT.
6081         (make_summary_table) Create summary table reallocable.
6082
6083         * postscript.c: Add more `unused' attributes as above.
6084
6085         * tab.c: (tab_create) [GLOBAL_DEBUGGING] Set reallocable member.
6086         (tab_realloc) [GLOBAL_DEBUGGING] Assert that table is reallocable.
6087          
6088         * tab.h: (struct tab_table) [GLOBAL_DEBUGGING] New `reallocable'
6089         member.
6090
6091         * var.h: (macro force_dup_variable) [!GLOBAL_DEBUGGING] Remove
6092         gratuitous space between parameter definition.
6093
6094         * vars-atr.c: Changed some assert(0)'s to abort()'s to prevent
6095         complaints about running off the end of functions with NDEBUG
6096         enabled.
6097
6098 Sun Jul  5 00:17:25 1998  Ben Pfaff  <blp@gnu.org>
6099
6100         * Several source files: Removed some PORTME notes when reflection
6101         revealed that ANSI forbids that sort of breakage.  Also, added
6102         lots of `unused' qualifiers here and there.
6103
6104         * aggregate.c: (accumulate_aggregate_info) Remove local var
6105         weighting that turned out not to be used.
6106
6107         * avl.c: Update to version 1.1.0.  Add unused specifier.
6108         (avl_destroy) Initialize ab to 0.  Comment fixes.  Cast return
6109         value to void *.
6110         (avl_probe) Replace some instances of 1 with +1 where appropriate.
6111         (avl_find) Cast return value to void *.
6112         (avl_delete) q doesn't need to be initialized at the beginning of
6113         the function.  Replace some instances of 1 with +1.
6114         (force_avl_delete) Renamed avl_force_delete, all references changed.
6115         (compare_ints) `param' marked unused.
6116         (print_int) `param' marked unused.
6117         (recurse_tree) Replace some instances of 1 with +1.
6118
6119         * avl.h: Update to version 1.1.0.  Only declares avl function
6120         types if not already declared.
6121         (AVL_MAX_HEIGHT) Only define if not already defined.
6122         (struct avl_node) New unused member char pad[2].
6123         [GLOBAL_DEBUGGING] Change conditionalization to NDEBUG instead.
6124         (force_avl_insert) Renamed avl_force_insert.
6125         (force_avl_delete) Renamed avl_force_delete.
6126
6127         * crosstabs.q: (struct table_entry) Put `freq' into a union with
6128         new member `data'.
6129         (struct crosstab) Add new member `ofs'.
6130         (glob var int_tab) Removed.
6131         (custom_tables) In integer mode, assign v[i] properly through the
6132         indirect var_dict.
6133         (custom_variables) Now p.crs.max == max + 1.
6134         [DEBUGGING] (debug_print) p.crs.min and p.crs.max are now ints.
6135         (precalc) Implement integer mode.
6136         (calc_integer) Implement integer mode.
6137         (compare_table_entry) Remove unused local variable `comparing'.
6138         (make_summary_table) Implement integer mode.
6139         (macro ns_rows) Implemented as static variable now.
6140         (several variables) Made static, from global.
6141         (output_pivot_table) Use table_value_missing() for column heads.
6142         Remove several unused local variables.  Implement integer mode
6143         table summing.  Count up ns_rows.
6144         (crosstabs_dim) Make columns wider when /MISSING=REPORT requested.
6145         (find_pivot_extent) Moved into find_pivot_extent_general; now just
6146         calls that function or find_pivot_extent_integer.
6147         (find_pivot_extent_integer) New function.
6148         (enum_var_values) Implemented for integer mode.
6149         (table_value_missing) New function.
6150         (display_dimensions) Call table_value_missing() for heads.
6151         (float_M_suffix) New function.
6152         (display_crosstabulation) Call table_value_missing() for row
6153         heads.  Handle missing values in /MISSING=REPORT mode.
6154         (calc_fisher) Remove unused var N.
6155         (calc_r) Remove unused var fact.
6156
6157         * data-list.c: (dump_fixed_table) Fix table dimensioning.
6158         (read_one_set_of_repetitions) Remove unused vars var_spec, column.
6159
6160         * data-out.c: (insert_commas) Remove unused var cp.
6161         (convert_CCx) Remove unused vars save_set_decimal,
6162         save_set_grouping.
6163
6164         * descript.q: (dump_z_table) Fix table dimensioning.
6165         (pre_calc) Remove unused var j.
6166         (display) Remove unused vars title, s.  Fix table dimensioning.
6167
6168         * expr-evl.c: Comment fixes.
6169
6170         * frequencies.q: (full_dim) New function.
6171         (dump_full) Fix table dimensioning.
6172         (condensed_dim) New function.
6173         (dump_condensed) Fix table dimensioning.
6174
6175         * get.c: (cmd_match_files) Remove unused var n_val.  Remove unused
6176         label winnage.
6177
6178         * html.c: (html_close_drive) Remove unused var i.
6179         (postopen) Remove unused vars title, curfn_len, cp.
6180         (preclose) Remove unused vars this, x.
6181
6182         * lexer.c: Comment fixes.
6183
6184         * matrix-data.c: (cmd_matrix_data) Remove unused var index.
6185
6186         * means.q: (custom_tables) Remove unused var m_dim.
6187
6188         * mis-val.c: Format fix.
6189
6190         * modify-vars.c: (cmd_modify_vars) Remove unused var new_dict.
6191
6192         * output.c: (outp_get_paper_size) Remove unused var cp.
6193
6194         * pfm-read.c: (read_float) Remove unused var save, unused label
6195         underflow.
6196         (read_variables) Remove unused vars cp, j.
6197         (read_value_label) Remove unused var j.
6198
6199         * pfm-write.c: (bufwrite) Remove unused var i.
6200
6201         * postscript.c: (ps_postopen_drive) Remove unused vars dev_info,
6202         fn.
6203         (output_encodings) Remove unused vars char_cp, n_output.
6204         (read_ps_encodings) Remove unused var ep.
6205         (postopen) Remove unused var title.
6206         (preclose) Remove unused var fp.
6207         (ps_open_page) Remove unused vars true, false, orientation,
6208         mirror_horz, mirror_vert, width, length.
6209         (ps_text_metrics) Remove unused var x.
6210
6211         * q2c.c: (find_symbol) Remove unused var y.
6212         (parse_setting) Remove unused parameter sbc, all references
6213         changed.
6214         (dump_parser) Remove unused var cp.
6215         (dump_free) Remove unused var i.
6216
6217         * set.q: (static vars args, n) Removed.
6218         (internal_cmd_gset) Removed.
6219
6220         * sfm-read.c: (sfm_read_dictionary) Removed unused var i.
6221         (read_machine_flt64_info) Removed unused var file_endian.
6222         (read_documents) Removed unused var i.
6223         (read_compressed_data) Removed unused parameter dict, all
6224         references changed.
6225
6226         * sfm-write.c: (bufwrite) Removed unused var i.
6227         (sfm_write_case) Removed unused var i.
6228
6229         * sort.c: (merge_once) Remove unused var t.
6230         (write_separate) #if 0 out as dead code.
6231
6232         * split-file.c: (cmd_split_file) Remove unused var i.
6233
6234         * sysfile-info.c: (sysfile_info_dim) New function.
6235         (cmd_sysfile_info) Fix table dimensioning.
6236         (variables_dim) New function.
6237         (display_variables) Fix table dimensioning.
6238         (describe_variable) Remove unused var prev_r.
6239
6240         * t-test.q: (z_postcalc) Removed.
6241         (pairs_calc) Remove unused var bad_weight.
6242         (postcalc) Remove unused vars dfn, dfd.
6243
6244         * tab.c: (tab_create) Set t->dim to NULL.
6245         (tab_dim) Make sure t->dim is NULL first.
6246         (tab_natural_width) Remove parameter `clamp'.
6247         (tab_value) Remove duplicate assertion for table.
6248         (tab_raw) New function.
6249         (nowrap_dim) New function.
6250         (wrap_dim) New function.
6251         (tab_output_text) Fix table dimensioning.
6252
6253         * tab.h: (tab_raw) New macro.
6254
6255         * val-labs.c: (get_label) Remove unused var type.
6256         (copy_value_labels) Remove unused var trav.
6257
6258         * var.h: (struct crosstab_proc) Completely changed.
6259
6260         * vars-prs.c: (parse_dict_variable) Remove unused var v.
6261
6262         * vfm.c: (open_active_file) Remove unused vars i, lp.
6263
6264         * weight.c: (weight_trns_proc) #if 0 out as dead code.
6265         
6266 Tue Jun  2 23:37:21 1998  Ben Pfaff  <blp@gnu.org>
6267
6268         * Makefile.am: Add apply-dict.c, flip.c.
6269
6270         * apply-dict.c: New file.
6271         
6272         * command.c: (struct command) Make cmd[] larger for CLEAR
6273         TRANSFORMATIONS command name.
6274         (parse_cmd) Make sure we're in a valid state before using it as an
6275         index.  Discard variables and reset state on invalid transitions.
6276         (cmd_clear_transformations) New function.
6277
6278         * command.def: Add APPLY DICTIONARY, CLEAR TRANSFORMATIONS, FLIP.
6279         Add unimplemented PRESERVE, RESTORE.
6280
6281         * file-handle.h: Include stddef.h.
6282
6283         * flip.c: New file.
6284         
6285         * pfm-read.c: (parse_value) Pad value label values with spaces,
6286         not nulls.
6287
6288         * sfm-read.c: (struct sfm_fhuser_ext) Add reference count.
6289         (sfm_close) Decrement reference count, make sure it's zero.
6290         (sfm_maybe_close) New function.
6291         (sfm_read_dictionary) Handle reference counts.
6292
6293         * vars-atr.c: (clear_default_dict) New function.
6294         (discard_variables) Use clear_default_dict().
6295
6296 Sun May 31 00:58:05 1998  Ben Pfaff  <blp@gnu.org>
6297
6298         * Makefile.am: Add pfm-write.c.
6299         (LDADD) Add the libgmp2 libraries.
6300
6301         * command.def: Define EXPORT.
6302
6303         * get.c: (cmd_export) New function.
6304         (export_write_case_func) New function.
6305
6306         * pfm-read.c: (static spss2ascii[]) Make it const.
6307
6308         * pfm-write.c: New file.
6309
6310         * sfm-write.c: Formatting, comment fixes.
6311
6312         * var.h: Comment fix.
6313
6314 Fri May 29 21:44:12 1998  Ben Pfaff  <blp@gnu.org>
6315
6316         * Makefile.am: Add pfm.h, pfm-read.c.
6317
6318         * command.def: IMPORT is now implemented.
6319
6320         * format.c: (glob var translate_fmt[]) New var.
6321
6322         * get.c: (enum GTSV_NONE) Renamed GTSV_OPT_NONE.
6323         (cmd_import) New function.
6324         (import_source_read) New function.
6325         (glob var import_source) New var.
6326
6327         * pfm-read.c: New file.
6328
6329         * pfm.h: New file.
6330         
6331         * sfm-read.c: (parse_format_spec) Local variable translate_fmt[]
6332         moved in format.c.
6333         (dump_dictionary) Disabled printing a couple of items.
6334
6335 Mon May 25 12:42:37 1998  Ben Pfaff  <blp@gnu.org>
6336
6337         * crosstabs.q: (postcalc) Call make_summary_table().
6338         (make_summary_table) New function.
6339         (insert_summary) New function.
6340         (display_dimensions) Remove some unnecessary arguments, all
6341         references changed.
6342         (output_pivot_table) Fix lots of problems with the risk table
6343         setup.
6344         (submit) Don't display an empty table.
6345         (display_risk) Fix order of arguments to calc_risk().
6346
6347         * glob.c: Always include assert.h and stdlib.h.
6348
6349         * output.h: (enum OUTP_T_JUST_FULL) Removed, all references
6350         removed.
6351
6352         * tab.c: (tab_create) Cosmetic changes.
6353
6354         * tab.h: (enum TAB_JUSTIFY) Removed, all references removed.
6355
6356 Sun May 24 22:39:23 1998  Ben Pfaff  <blp@gnu.org>
6357
6358         * tab.def: Removed.
6359
6360         * crosstabs.q: (output_pivot_table) Headers drawing and submission
6361         code simplified, moved into new function submit().
6362         (submit) New function.
6363         (crosstabs_dim) New function.
6364         (display_directional) Substitute variable names for %s where
6365         appropriate.
6366         (somers_d_v[], somers_d_ase[], somers_d_t[]) New static vars.
6367         (calc_symmetric) Initialize parameters only if non-NULL.
6368         Calculate Somers' d.
6369         (calc_directional) Calculate Somers' d (or copy it, really).
6370         Calculate eta.
6371
6372         * output.c: (outp_string_width) New function.
6373
6374         * postscript.c: (postopen) Calculate font widths based on the
6375         width of the zero '0' character, not the width of the space
6376         character.  Set paper-width and paper-length based on points, not
6377         device units.
6378         (ps_open_page) Fix page setup string for landscape mode.
6379
6380         * som.h: (struct som_dimension) Removed.
6381         (struct som_table_class) height, width members take int * not
6382         som_dimesion * now.
6383
6384         * tab.c: Many functions now have added parameter validation.
6385         (tab_height, tab_width) These functions were removed and merged
6386         into a single function tab_resize(), and all references changed.
6387         (tab_dim) Rewritten since the interface changed; reduced from
6388         hundreds of lines to two.  All callers were changed.  Currently
6389         most of them just use tab_natural_dimensions as their callback and
6390         await detailed translation of functionality.
6391         (tab_natural_width) New function.
6392         (tab_natural_height) New function.
6393         (tab_natural_dimensions) New function.  This is a callback
6394         function, not something that you'd want to call directly.
6395         (tab_nat_dim) Removed.
6396         (tabi_table) Allocates t->w and t->h.
6397         (tabi_driver) Inlined sum_columns()'s functionality.  Calls the
6398         dimensions callback.
6399         (evaluate_dimensions) Removed.
6400         (sum_columns) Removed.
6401
6402         * tab.h: (enum TAL_1THIN) Removed.
6403         (enum series t_*) Removed.
6404         (struct tab_table) Members trh, trv changed to unsigned char *
6405         from int *.  Member dim changed to a function pointer from a
6406         unsigned char *.  Member max_stack_height removed.  New members
6407         hr_tot, vr_tot.
6408         (macros tab_l, tab_r, tab_t, tab_b) New.
6409
6410 Sat May 23 23:22:13 1998  Ben Pfaff  <blp@gnu.org>
6411
6412         * ascii.c: (delineate) Assign last_space_nchars before skipping
6413         spaces, to fix right justification.
6414
6415         * crosstabs.q: (static vars risk, direct) New vars.
6416         (static var pearson_r) Removed.
6417         (glob var chisq_fisher) Made static.
6418         (static vars row_tot[], col_tot[]) Don't include grand total
6419         anymore.
6420         (static var grand_total) Renamed W, all references changed.
6421         (output_pivot_table) Only make `table' if num_cells != 0.  Make
6422         risk and directional tables.  Deal with grand total no longer part
6423         of col_tot[].  Free rows and cols after we're done with them.
6424         (display_risk) New function.
6425         (display_directional) New function.
6426         (clac_r) Rewritten so that it stores all its results into its
6427         arguments, so it can be used for Spearman's correlation too.
6428         (calc_symmetric) Added a t[] argument, all references changed.
6429         Calculates ASEs for tau-b, tau-c, gamma.  Calculates Spearman's r,
6430         Pearson's r, Cohen's kappa.
6431         (calc_risk) New function.
6432         (calc_directional) New function.
6433
6434         * som.c: (som_submit) Improved debugging code.
6435
6436         * stats.c: (hypercube) New function.
6437         (cube) New function.
6438         (sqr) New function.
6439         (normal_sig) Went back to old implementation, which actually
6440         worked.
6441
6442         * stats.h: (macros square, cube, hypercube) Removed.  The
6443         equivalent functions in stats.c are inlined here; all references
6444         to square changed to sqr.
6445
6446 Fri May 22 00:03:41 1998  Ben Pfaff  <blp@gnu.org>
6447
6448         * crosstabs.q: (N_SYMMETRIC) New define.
6449         (postcalc) Disable debug printing.
6450         (static vars chisq_fisher, pearson_r) New.
6451         (output_pivot_table) Add support for symmetric measures.  Add
6452         chi-square output of exact sigs.
6453         (display_chisq) Rewritten.
6454         (display_symmetric) New function.
6455         (gamma_int) New function.
6456         (Pr) New function.
6457         (swap) New function.
6458         (calc_fisher) New function.
6459         (calc_chisq) Check boundary conditions better. Calculate Yates,
6460         Fisher, Mantel-Haenszel tests.
6461         (calc_r) New function.
6462         (calc_symmetric) New function.
6463
6464         * stats.c: (normal_sig) Rewritten with new algorithm.  Renamed
6465         from calc_normal.
6466         (chisq_sig) Better boundary conditions.  Renamed from
6467         calc_significance.
6468
6469         * tab.h: (struct tab_table) New member cf.
6470
6471         * tab.c: (tab_create) Set cf.
6472         (tab_width) New function.
6473         (tab_realloc) Handle cf.
6474         (tab_vline) Handle cf.
6475         (tab_hline) Handle cf.
6476         (tab_box) Handle cf.
6477         (tab_value) Handle cf.
6478         (tab_float) Handle cf.
6479         (tab_text) Handle cf.
6480         (tab_joint_text) Handle cf.
6481         (tab_offset) Handle cf.
6482         (tab_next_row) Handle cf.
6483         (evaluate_dimensions) Handle cf.
6484         (render_strip) Handle cf.
6485
6486 Wed May 20 00:03:59 1998  Ben Pfaff  <blp@gnu.org>
6487
6488         * crosstabs.q: (postcalc) New vars row_tot, col_tot, pass them to
6489         output_pivot_table().
6490         (output_pivot_table) Moved lots of local variables outside and
6491         made them static.  Add beginnings of chi-square statistic
6492         support.  Now column and row totals aren't in the main matrix.
6493         Always zero out any leftover rows & columns after we're done with
6494         the table entries.  Move all output stuff into
6495         display_dimensions(), display_crosstabs(), display_chisq().
6496         (display_dimensions) New function.
6497         (display_crosstabulation) New function.
6498         (display_chisq) New function.
6499         (calc_chisq) Implemented Pearson and likelihood-ratio chisquares.
6500
6501         * frequencies.q: (dump_full, dump_condensed) Remove tab_null()
6502         references, simplify logic.
6503
6504         * postscript.c: Remove scale, translate-x, translate-y,
6505         mirror-horz, mirror-vert, rotate-180 options.
6506         (struct ps_driver_ext) Remove scale, translate_x, translate_y.
6507         All references deleted.
6508         (macro YT) New macro.
6509         (array option_tab[]) Removed options.
6510         (ps_option) Removed options.
6511         (ps_open_page) Write page setup explicitly to output file, without
6512         using now-deleted BP function.
6513         (macro dump_line) Use YT().
6514         (macro dump_thick_line) Use YT().
6515         (draw_headers) Use YT().
6516         (switch_font) Reorder arguments to SF function.
6517         (write_text) Use YT().
6518
6519         * sfm-read.c: (sfm_read_case) Don't attempt to read variables that
6520         have get.fv == -1.
6521
6522         * sysfile-info.c: (describe_variables) Don't use tab_nulls().
6523
6524         * tab.c: (tab_create) Initialize t->ct to zeros.  Remove
6525         null-debugging code.
6526         (tab_realloc) Remove null-debugging code.  Initialize new regions
6527         of t->ct to zeros.
6528         (tab_vline) Support offsets.
6529         (tab_hline) Support offsets.
6530         (tab_box) Support offsets.
6531         (tab_null) Removed.
6532         (tab_nulls) Removed.
6533         (tab_row) Removed.
6534         (tab_col) Removed.
6535         (evaluate_dimensions) Remove null-debugging code.  Understand
6536         TAB_EMPTY attribute.  Assert that text.s.s is always non-NULL if
6537         TAB_EMPTY not present.
6538
6539         * tab.h: New cell attribute TAB_EMPTY.
6540         (macros tab_nr, tab_nc, tab_row, tab_col) New.
6541
6542         * vars-atr.c: (init_variable) Set get.fv to -1 so that GET doesn't
6543         try to read them from system files.
6544
6545         * vfm.c: (dump_splits) Don't call tab_null().   
6546
6547 Sat May 16 19:36:55 1998  Ben Pfaff  <blp@gnu.org>
6548
6549         * crosstabs.q: (struct crosstab) Added `missing' member.
6550         (custom_tables) Init missing.
6551         (calc_general) Handle missing values.
6552         (calc_chisq) New function.
6553         (output_pivot_table) Start work on chi-square output.  Update for
6554         new tab offset support functions.  Shorten statistic names.
6555
6556         * Several files: add in more `const's to placate gcc's warnings.
6557
6558         * tab.h: (struct tab_table) Add col_ofs, row_ofs members.  Comment
6559         fixes.
6560
6561         * tab.c: (tab_height, tab_realloc, tab_vline, tab_hline, tab_box,
6562         tab_null, tab_nulls, tab_value, tab_float, tab_text,
6563         tab_joint_text) Add col_ofs and row_ofs support.
6564         (tab_offset) New function.
6565         (tab_next_row) New function.
6566         (tab_row) New function.
6567         (tab_col) New function.
6568         (tabi_table) Add col_ofs and row_ofs support.
6569
6570         * vars-atr.c: (is_system_missing) New function.
6571
6572 Tue May 12 16:14:30 1998  Ben Pfaff  <blp@gnu.org>
6573
6574         * crosstabs.q: Expanded subcommand names RESID --> RESIDUAL, etc.
6575         (static var no_cells) Removed.
6576         (static var num_cells) New.
6577         (static var expected) New.
6578         (static var cells[]) New.
6579         (internal_cmd_crosstabs) Deal with new variables.
6580         (postcalc) Removed most of the meat and put it in new function
6581         output_pivot_table().
6582         (output_pivot_table) Calculates and outputs an entire pivot table.
6583
6584         * postscript.c: (postopen) Fix problems with free()ing addresses
6585         not obtained from malloc().
6586
6587         * som.c: (som_submit) Add assertion.
6588
6589         * sysfile-info.c: (describe_variable) Use new tab_nulls()
6590         function.
6591
6592         * tab.c: (static var tab_names[]) New.
6593         (tab_realloc) -1 for nc or nr indicates no change.
6594         (tab_nulls) New function.
6595         (tab_dim) Use tab_names[].
6596         (tabi_cumulate) Don't include bottom or right headers.  Furrfu.
6597         (evaluate_dimensions) Don't terminate on uninited cells, just put
6598         an X in them and emit a notice.  Use tab_names[].
6599
6600         * tab.h: Move bits into tab.def.
6601
6602         * tab.def: New.  Don't try to declare tab_table_class because then
6603         som.h has to be included.       
6604         
6605 Thu May  7 22:55:04 1998  Ben Pfaff  <blp@gnu.org>
6606
6607         * command.def: New file, contains all the command definitions
6608         previously included bodily in command.c.
6609
6610         * format.def: New file, contains all of the format definitions
6611         previously split across format.h, format.c, and sfm-write.c.
6612
6613         * lexer.h: Renamed from tokens.h in order to match corresponding
6614         .c file name.
6615
6616         * lexerP.h: Moved some rarely used functions exported by lexer.c
6617         into here.
6618
6619         * Makefile.am: Commemorate renamed files.
6620         (EXTRA_DIST) Add command.def, format.def.
6621
6622         * command.c: [0] (walk_cmdtable_func) Removed.
6623
6624         * crosstabs.q: (postcalc) Made it work and print out matrices
6625         proving it.
6626         (enum_column_values) Renamed enum_var_values, generalized for any
6627         variable.
6628
6629         * format.h: (struct fmt_desc) New member `spss'.
6630
6631         * q2c.c: (main) Generated code includes lexer.h instead of
6632         tokens.h.
6633
6634         * sfm-write.c: (write_format_spec) Use new spss member of fmt_spec
6635         instead of an independent translation table.
6636
6637 Tue May  5 13:19:03 1998  Ben Pfaff  <blp@gnu.org>
6638
6639         * Lots of source files: Added const to declarations.
6640
6641         * aggregate.c: (parse_aggregate_function) Rename inner i to j.
6642         
6643         * arena.c: (arena_clear) Set prev pointer to null when done.
6644
6645         * ascii.c: (ascii_option) Rename index as indx.
6646
6647         * avl.c: This is now a separate library called libavl.
6648         (xmalloc) Make static.
6649         (avl_probe) Step A7 can use the cache instead of an explicit
6650         compare.
6651         (avl_delete) Don't maintain a q pointer because it's always
6652         available in the pointer stack.  Comment fix.
6653
6654         * avl.h: This is now a separate library called libavl.
6655
6656         * command.c: (cmd_table[]) Remove spurious trailing "".
6657
6658         * common.h: Only include random() fix if this system needs it.
6659
6660         * crosstabs.q: Include alloca headers.
6661         (n_sorted_tab) New global var.
6662         (postcalc) Mostly rewritten.
6663         (find_pivot_extent) Rewritten.
6664         (enum_column_values) Rewritten.
6665
6666         * data-out.c: (convert_F) Rename inner n as n_spaces.
6667
6668         * error.c: (dump_message) Don't have an outer var i.
6669
6670         * file-handle.q: (static var f) Removed.  All references removed.
6671         (internal_cmd_file_handle) Uses a local variable instead of f.
6672
6673         * get.c: (trim_dictionary) Change scope of i, i1, i2.
6674         (cmd_match_files) Don't strcpy tokstr into sbc (why was this ever
6675         done?)
6676
6677         * getline.h: Declare getl_history as extern.  Reported by
6678         palme@uni-wuppertal.de (Hubert Palme).
6679
6680         * postscript.c: (postopen) Some large mods for constness.
6681
6682         * recode.c: Remove spurious copyrights since PSPP is owned by FSF
6683         anyway.
6684
6685 Fri Apr 24 12:52:47 1998  Ben Pfaff  <blp@gnu.org>
6686
6687         * Makefile.am: Rename BUILT_SOURCES to q_sources, all references
6688         changed.  Add avl.c, avl.h to pspp_SOURCES.  Remove avllib from
6689         LDADD.
6690
6691         * avl.c, avl.h: New files.  These form a clean-room
6692         reimplementation of avllib.  Iterative algorithms are used in
6693         place of recursive ones, so there is no resemblance in the code.
6694
6695         * Lots of headers: Don't include other headers by default.
6696
6697         * Lots of source files: Explicitly include all needed headers.
6698
6699         * arena.c: (arena_clear) New function.
6700
6701         * crosstabs.q: (ROW_VAR, COL_VAR) New enums.
6702         (static var ar) Removed.
6703         (staitc vars ar_tc, ar_col) New.
6704         (cmd_crosstabs) Destroy the arenas.
6705         (internal_cmd_crosstabs) Create the arenas.
6706         (precalc) Don't need a free function for the hash.
6707         (calc_general) Make sure to zero out the trailer on the key data
6708         before inserting.
6709         (print_table_entries) Updated.
6710         (postcalc) Worked on actually implementing.
6711         (find_pivot_extent) New function.
6712         (compare_value) New function.
6713         (enum_column_values) New function.
6714
6715         * data-in.c: (parse_month) Make local array `static const'.
6716         
6717         * data-out.c: (convert_date) Make local array `static const'.
6718         (convert_WKDAY) Same.
6719         (convert_MONTH) Same.
6720
6721         * frequencies.q: (postprocess_freq_tab) avl_walk_inorder() has
6722         been renamed to avl_walk().
6723         
6724         * hash.c: Rewritten more efficiently.
6725
6726         * hash.h: Add attribute const to hsh_next_prime declaration.
6727
6728         * lexer.c: (id_match) Make arguments const.
6729
6730         * postscript.c: (ps_postopen_driver) Make default fonts the
6731         Helvetica family.
6732
6733         * q2c.c: (main) Generated code needs stdlib.h.
6734
6735         * sfm-write.c: (write_value_labels) An avl_traverser needs to be
6736         initialized to 0 now, not to NULL.  All other references to
6737         avl_traverser were updated in the same way.
6738
6739         * tokens.h: Macro version of id_match updated to use const
6740         properly.
6741
6742         * val-labs.c: (inc_ref_count) New function.
6743         (copy_value_labels) Simply through use of new avl_copy() function.
6744
6745 Wed Apr 15 13:01:58 1998  Ben Pfaff  <blp@gnu.org>
6746
6747         * crosstabs.q: Probably doesn't compile.  New PIVOT subcommand.
6748         (postcalc) Worked on this.
6749
6750         * postscript.c: (OPO_DOUBLE_LINE) New enum.
6751         (struct ps_driver_ext) New line_width_thick member.
6752         (ps_preopen_drive) Init line_width_thick.
6753         (option_tab[]) Add line-* options.
6754         (ps_option) Parse line-* options.
6755         (postopen) Add line_width_thick support.  Strip leading spaces on
6756         prologue output lines.
6757         (ps_open_page) Include line_width_thick in output.
6758         (macro dump_thick_line) New.
6759         (dump_fancy_line) Support thick lines as well as double lines.
6760
6761 Tue Apr 14 00:50:08 1998  Ben Pfaff  <blp@gnu.org>
6762
6763         * Makefile.am: Add crosstabs.c to BUILT_SOURCES.  Add crosstabs.q
6764         to pspp_SOURCES.  Add crosstabs.q to EXTRA_DIST.
6765
6766         * Many source files: Rename `options' to `pv_opts' as appropriate.
6767
6768         * command.c: (static var cmd_table[]) Add CROSSTABS command.
6769
6770         * common.c: (xcalloc) New function.
6771
6772         * crosstabs.q: New file.  Not finished yet, though.
6773                 
6774         * data-list.c: Comment fix.
6775
6776         * error.c: Remove some old Checker cruft.
6777
6778         * frequencies.q: (dump_full) Cumulate valid percent instead of
6779         regular percent.
6780
6781         * getline.c: Comment fix.
6782
6783         * hash.c: Comment fixes.
6784
6785         * hash.h: (struct hsh_table) Make hash functions return unsigned
6786         instead of int to avoid problems with taking the modulo of
6787         negative return values.  All references changed.
6788
6789         * misc.c: (intlog10) Make its table static const instead of auto.
6790
6791         * sfm-read.c: (read_header) Make `prefix' static const instead of
6792         auto.
6793
6794         * var.h: (union value) Add member `hash'.
6795         (struct variable) Rename prv_index as `foo'--all references
6796         changed.  Reorder.
6797         (typedef pv_opts) Removed.  All references changed.
6798
6799         * vars-prs.c: (parse_variables) Message fixes.
6800         
6801 Mon Mar  9 15:35:08 1998  Ben Pfaff  <blp@gnu.org>
6802
6803         * get.c: (cmd_match_files) Don't reverse the order of FILEs as
6804         they are being inserted.  Don't check for BY variables of
6805         different types.  Discard variables if the active file isn't
6806         included in the merge.
6807         (mtf_processing) Essentially rewritten.
6808         (mtf_merge_dictionary) Check for master/slave variables of
6809         different types/widths.
6810
6811         * vfm.c: (static var not_canceled) New var.
6812         (process_active_file) Don't call vfm_source->read() if
6813         there's no vfm-source.  Initialize not_canceled.
6814         (process_active_file_write_case) Honor and update not_canceled.
6815         (prepare_for_writing) Rollback changes from yesterday, they were
6816         wrong.
6817         (close_active_file) Don't destroy vfm_source unless it exists.
6818         
6819 Mon Mar  9 00:56:16 1998  Ben Pfaff  <blp@gnu.org>
6820
6821         * Lots of source files: Added { } around nested if/else constructs
6822         to avoid new gcc 2.8 warnings.
6823
6824         * data-in.c: (parse_Z) Declare `int' type explicitly.
6825         (convert_Z) Ditto.
6826
6827         * get.c: (struct mtf_file) Add prev, next_min, by, input members.
6828         (cmd_match_files) Initialize mtf_by_values.  Manage by, input,
6829         prev members.  Put TABLEs at the end of the chain and FILEs at the
6830         beginning.  Don't allow the active file in STATE_INIT.  Use proper
6831         `seen' value for the active file.  Fill out the by members and
6832         make sure they're of consistent type.  Do the actual merge
6833         operation.
6834         (mtf_processing_finish) New function.
6835         (var_type_description) New function.
6836         (mtf_free_file) New function.
6837         (mtf_free) Rewritten.
6838         (mtf_delete_file_in_place) New function.
6839         (mtf_read_nonactive_records) New function.
6840         (mtf_compare_BY_values) New function.
6841         (static var mtf_seq_no) New var.
6842         (mtf_processing) New function.
6843         (mtf_merge_dictionary) Assign nval members for the system file
6844         dictionary.  Assign fv values for its variables.  Point each slave
6845         variable to the corresponding master variable.
6846
6847         * hash.c: Include str.h.
6848
6849         * mis-val.c: (copy_missing_values) src arg is const.
6850
6851         * misc.c: (spacing) Make `max' var explicitly int.
6852
6853         * sfm-read.c: (dump_dictionary) Message reformatting.
6854         (sfm_read_case) Add assertion.
6855
6856         * sort.c: Esthetic fixes.
6857
6858         * var.h: (struct match_files_proc) New struct.
6859         (struct variable) Add private data match_files_proc.
6860
6861         * vars-atr.c: (delete_variable) Implement.  Add argument for the
6862         dictionary that owning the variable.
6863         (dup_variable) Add assertion.
6864
6865         * vfm.c: Comment fixes, hopefully the comments are correct now.
6866         (process_active_file) New function.
6867         (process_active_file_write_case) New function.
6868         (process_active_file_output_case) New function.
6869         (prepare_for_writing) Use temp_dict->nval for vfm_info, not
6870         default_dict.nval.
6871         (write_case) Renamed procedure_write_case().  Now write_case is a
6872         pointer to a function.  Style fixes.
6873         
6874 1998-03-05  Ben Pfaff  <blp@gnu.org>
6875
6876         * Makefile.am: (q2c) Link with libmisc.
6877         (version.c) Define default_config_path, include_path,
6878         groff_font_path.
6879
6880         * ascii.c: (ascii_postopen_driver) When the default newline string
6881         is requested, open file in text mode.  Suggested by
6882         palme@uni-wuppertal.de (Hubert Palme).
6883         (static vars line_buf, line_p) Change from char * to unsigned char
6884         *.
6885         (ascii_close_page) char * to unsigned char *.
6886
6887         * cmdline.c: (parse_command_line) Implement -r option by
6888         prepending ~/.pspp/rc to the list of files to process.
6889
6890         * command.c: (cmd_remark) Reset getl_prompt to the standard prompt
6891         before pulling in a final line.
6892         (null_func, null_int_func) Removed (dead code).
6893
6894         * descript.q: (display) Calculate width of variable name column
6895         properly.  Calculate number of valid cases properly.  Reported by
6896         palme@uni-wuppertal.de (Hubert Palme).
6897
6898         * filename.c: (init_filename) Use default_config_path instead of
6899         now obsolete CONFIG_PATH.
6900
6901         * getline.c: (getl_initialize) Use include_path instead of now
6902         obsolete INCLUDE_PATH.
6903         (getl_add_file) New argument `where'.  All references changed.
6904
6905         * groff.c: (find_font_file) Use groff_font_path instead of now
6906         obsolete GROFF_FONT_PATH.
6907         
6908         * postscript.c: (find_ps_file) Use groff_font_path instead of now
6909         obsolete GROFF_FONT_PATH.  Copy through temporary variable to
6910         avoid problems with constness.
6911
6912         * str.h: (macro cs_streq) New macro.
6913
6914         * version.h: (glob var default_config_path, include_path,
6915         groff_font_path) New vars.
6916         
6917 1998-02-23  Ben Pfaff  <blp@gnu.org>
6918
6919         * Many source files: Change verbose_msg() priority levels and
6920         messages.
6921
6922         * aggregate.c: Include debug-print.h.
6923
6924         * cmdline.c: (parse_command_line) Add --safer/-s and --command/-c
6925         options.
6926         (static var pre_syntax_message) Document --safer/-s and
6927         --command/-c.
6928
6929         * command.c: (cmd_erase, cmd_host) Disable if set_safer is set.
6930
6931         * dfm.c: (open_inline_file) [__CHECKER__] Zero out ext->file,
6932         because it's not used but it's still copied.
6933         (open_file_r) Remove gratuitous debug message.
6934
6935         * filename.c: (safety_violation) New function.
6936         (open_file) Remove gratuitous debug messages.  Don't allow pipe
6937         files if set_safer is set.
6938
6939         * get.c: Turn off debugging.
6940
6941         * getline.c: (getl_add_virtual_file) New function.
6942         (getl_read_line) Add verbose_msg() call for opening new syntax
6943         file.
6944         (getl_perform_delayed_reset) Add a return value describing whether
6945         any action was taken.  Call reset_eof().
6946
6947         * getline.h: Comment fix.
6948
6949         * groff-font.c: (groff_read_font) Use `goto next_iteration' in
6950         place of incorrect `continue'.  Use strtok_r() instead of
6951         strtok().  Always check strtok_r() return value.
6952         (groff_read_DESC) Use strtok_r() instead of strtok().
6953
6954         * lexer.c: (reset_eof) New function.
6955
6956         * main.c: (parse) Get a token after performing a delayed reset
6957         action; allow empty syntax files.
6958
6959         * postscript.c: (output_encodings) Use strtok_r() instead of
6960         strtok().
6961
6962         * q2c.c: (dump_parser) Use strtok_r() instead of strtok().
6963
6964         * set.q: Comment fixes.
6965         (glob var set_safer) New var.
6966         (internal_cmd_set) Support SAFER.
6967
6968         * str.h: [!HAVE_STRTOK_R] Declare strtok_r() prototype.
6969
6970         * temporary.c: (free_dictionary) Set d->splits to NULL after
6971         freeing.
6972
6973         * vars-atr.c: (clear_variable) Decrement dict->n_splits if
6974         variable deleted, not if it *isn't* deleted.
6975
6976 1998-02-16  Ben Pfaff  <blp@gnu.org>
6977
6978         * command.c: (array cmd_table[]) Add MATCH FILES.
6979
6980         * common.c: Comment fixes.
6981
6982         * data-list.c, dfm.c, error.c, filename.c, list.q, matrix-data.c,
6983         modify-vars.c, postscript.c, sfm-read.c, sfm-write.c, tab.c:
6984         Include alloca.h.  Problem reported by palme@uni-wuppertal.de
6985         (Hubert Palme).
6986
6987         * expr-opt.c: Include str.h.  Problem reported by
6988         palme@uni-wuppertal.de (Hubert Palme).
6989
6990         * get.c: (cmd_get) [DEBUGGING] Update v->p.get to v->get.
6991         (static var mtf_by) Change from char ** to variable **.
6992         (static var mtf_master) New var.
6993         (mtf_merge_dictionary) New function.
6994         (cmd_match_files) Init mtf_master.  Parse mtf_by according to new
6995         var type.  Reorder tests properly.  Initialize file->dict.  Detect
6996         TABLE= without BY=.  Read file dictionaries and merge them.  Give
6997         subcommand name with IN, LAST, FIRST error messages.  Create IN,
6998         LAST, FIRST variables.  Comment fixes.
6999         (mtf_free) Don't free default_dict.  Free mtf_master.
7000
7001         * getline.c: Define getl_mode.  Change getl_buf_size to size_t
7002         from int.
7003         (handle_line_buffer) Cast int to size_t in comparison to avoid
7004         warning.
7005
7006         * getline.h: Declare getl_mode extern.
7007
7008         * groff-font.c: (groff_read_font) Type-fix calls to getline.
7009         (groff_read_DESC) Make line_size a size_t.
7010         (match_tok) Parenthesize name to avoid macro expansion.
7011
7012         * mis-val.c: (copy_missing_values) New function.
7013
7014         * postscript.c: (postopen) Make buf_size a size_t.
7015
7016         * sfm-read.c: (dump_dictionary) Make global from static.  Print
7017         variable info in parts for easier debugging with Checker.
7018
7019         * temporary.c: (copy_variable) Use copy_value_labels().
7020         (new_dictionary) New arg: whether to copy file label, documents.
7021
7022         * val-labs.c: (copy_value_labels) New function.
7023
7024         * var.h: (enums MISSING_*) Add MISSING_COUNT.
7025
7026         * vars-atr.c: [GLOBAL_DEBUGGING] (force_dup_variable) New
7027         function.
7028         (dup_variable) Set prv_index, get.fv, get.nv.
7029
7030 Fri Feb 13 15:38:36 1998  Ben Pfaff  <blp@gnu.org>
7031
7032         * Makefile.am: (pspp_SOURCE) Add htmlP.h.
7033
7034         * Many source files: For ANSI-compliance, add empty statement
7035         after label.  Reported by palme@uni-wuppertal.de (Hubert Palme)
7036         and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
7037
7038         * data-in.c: (parse_numeric) Some header files break on
7039         -DBL_MIN_10_EXP because they get a --; add () for safety.
7040         Reported by palme@uni-wuppertal.de (Hubert Palme).
7041
7042         * dfm.c: Idea by Dr Eberhard W Lisse <el@linux.lisse.na>.
7043         (struct dfm_fhuser_ext) Change `file' from FILE * to file_ext.
7044         (dfm_close) Use close_file_ext.
7045         (open_inline_file) Set file.file to NULL, not file.
7046         (open_file_r, open_file_w) Initialize file.file; fill in file_ext
7047         struct and use open_file_ext().
7048         (read_record) Use file.file.
7049
7050         * file-handle.q: (prepend_current_directory) Pass through special
7051         filenames.
7052
7053         * filename.c: Only include unistd.h if HAVE_UNISTD_H.
7054         (normalize_filename) Pass through special filenames.
7055         (open_file, close_file) Accept pipe| and |pipe syntaxes as
7056         equivalent.
7057         (dirname) Rename blp_dirname() because of name conflict on some
7058         OS.  All references changed.  Reported by palme@uni-wuppertal.de
7059         (Hubert Palme).
7060         (is_special_filename) New function.
7061
7062         * get.c: (GTSV_OPT*) Add GTSV_OPT_MATCH_FILES.
7063         (trim_dictionary) Conditionalize some of the options on whether
7064         GTSV_OPT_MATCH_FILES is in *options.
7065         (rename_variables) Don't allow variables to be renamed as scratch
7066         variables.
7067         (MTF_*) New enum series.
7068         (struct mtf_file) New struct.
7069         (static vars mtf_head, mtf_tail, mtf_by, mtf_n_by, mtf_free) New
7070         vars.
7071         (cmd_match_files, mtf_free) New functions.
7072
7073         * lexer.c: (match_int) Needed parentheses around name to escape
7074         macro expansion.  Reported by Micah Altman
7075         <maltman@www-vdc.fas.harvard.edu>.
7076
7077         * print.c: Needed to include alloca.h.  Reported by Micah Altman
7078         <maltman@www-vdc.fas.harvard.edu>.
7079
7080         * recode.c: (convert_to_double) Parenthesize -DBL_MIN_10_EXP to
7081         -(DBL_MIN_10_EXP).  Reported by palme@uni-wuppertal.de (Hubert
7082         Palme).
7083         
7084         * str.h: Include stdarg.h.  Reported by palme@uni-wuppertal.de
7085         (Hubert Palme) and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
7086
7087 Thu Feb  5 00:18:21 1998  Ben Pfaff  <blp@gnu.org>
7088
7089         * html.c: (struct html_driver_ext) Move into htmlP.h.
7090         (html_preopen_driver) Initialize cp_x, cp_y.
7091         (html_submit) Implement as call to output_tab_table().
7092         (change_attributes) New function.
7093         (escape_string) New function.
7094         (output_tab_table) New function.
7095
7096         * list.q: (write_all_headers) Add code for writing headers for the
7097         html driver.
7098         (clean_up) Write out the html close-table tag.
7099         (determine_layout) Ignore html driver.
7100         (list_cases) Write html data.
7101
7102         * som.c: (som_submit) Move more of the code into output_table().
7103
7104         * tab.c: (static var hit) Make a global var and rename tab_hit.
7105         (static var tab_table_class) Make a global var.
7106
7107         * htmlP.h: New file.
7108
7109 Tue Feb  3 16:12:18 1998  Ben Pfaff  <blp@gnu.org>
7110
7111         * dump-sysfile.c: Removed.
7112
7113         * html.c: (preclose) Change comment in emitted code.
7114
7115         * matrix-data.c: Debugging off by default.  Comment fixes.
7116         (static var container) New var.
7117         (cmd_matrix_data) Create and destroy container.  Initialize
7118         is_per_factor[] to 0s.  Move code into new function
7119         string_to_content_type().  Require split values to be present in
7120         the data when ROWTYPE_ is explicit.  Call specific function, not
7121         general read_matrices().
7122         (string_to_content_type) New function.
7123         (context) Exclude all whitespace, not just spaces.
7124         (mget_token) A dot is a number.  Add assertion.
7125         (static var data) Renamed nr_data.
7126         (static var factor_values) Renamed nr_factor_values.
7127         (read_matrices) Renamed read_matrices_without_rowtype().  Handle
7128         only specific case.  Close data_file before exit.
7129         (fill_matrix) New function.
7130         (read_data_lines) Renamed nr_read_data_lines().  Remove debug
7131         printing.  Style fixes.  Message fixes.  Move code into
7132         fill_matrix().
7133         (read_matrices_without_rowtype) Rename
7134         matrix_data_read_without_rowtype().  Fix off-by-one error on
7135         loops.  Allocate nr_data[] memory from arena.
7136         (read_matrices_with_rowtype) Removed.
7137         (read_splits) Renamed nr_read_splits().  Style fixes.
7138         (read_factors) Renamed nr_read_factors().
7139         (dump_cell_content) Comment fixes.  Arguments changed.  Change
7140         debug printing.  All references changed.
7141         (output_data) Renamed nr_output_data().
7142         (static var wr_content) New var.
7143         (struct factor_data) New struct.
7144         (static var wr_data) New var.
7145         (static var wr_current) New var.
7146         (matrix_data_source_destroy_source) Removed.
7147         (read_matrices_with_rowtype) New function.
7148         (matrix_data_read_with_rowtype) New function.
7149         (wr_read_splits) New function.
7150         (compare_factors) New function.
7151         (wr_output_data) New function.
7152         (wr_read_rowtype) New function.
7153         (wr_read_factors) New function.
7154         (wr_read_indeps) New function.
7155         (glob var matrix_data_source) Make destroy_source member NULL as
7156         well.
7157
7158 Fri Jan 23 00:09:08 1998  Ben Pfaff  <blp@gnu.org>
7159
7160         * lexer.c: (syntax_error) Give better error message when at end of
7161         file.
7162
7163         * matrix-data.c: (var content_names[]) Fix PROX spelling.  Change
7164         N_SCALAR to output as plain N.
7165         (mdump_token) Change output format.
7166         (context) Fix message output interaction with spaces in input.
7167         (another_token) New function.
7168         (force_eol) Improved error message.
7169         (static var max_cell_index) New var.
7170         (read_matrices) Init `cells'.  factor_values is now per-cell.
7171         Init max_cell_index.
7172         (read_data_lines) Replace `compare' local with new `compare' arg.
7173         Debugging messages changed.  Only read factors if per_factor.
7174         Propagate error return from read_factors(), force_eol().
7175         Copy N_SCALAR values across the N vector.
7176         (read_matrices_without_rowtype) Don't init `cells'.  Don't need to
7177         check parentheses manually since we now have is_per_factor[].
7178         Call read_data_lines() with new args.  Check for end of data after
7179         looping, using another_token().
7180         (read_factors) Arguments changed.  Use max_cell_index to determine
7181         whether to read or compare factors.  Message fixes.
7182         (dump_cell_content) New function.
7183         (output_data) Completely rewritten because content types were
7184         supported to be nested inside factor values, not vice versa.
7185         
7186 Thu Jan 22 00:26:38 1998  Ben Pfaff  <blp@gnu.org>
7187
7188         * lexer.c: (syntax_error) Support formatted varargs messages.
7189
7190         * matrix-data.c: Turn debugging on by default.
7191         (static content_type[]) New array.
7192         (static content_names[]) New array.
7193         (static rowtype_, varname_) New vars.
7194         (static is_per_factor[]) New array.
7195         (static split_values) Moved declaration.
7196         (static n_continuous, first_continuous) New var.
7197         (cmd_matrix_data) Don't init split_values.  Assign ROWTYPE_ to
7198         rowtype_.  Simplify SPLIT code.  Init is_per_factor[].  Assign
7199         VARNAME_ to varname_.  Initialize first_continuous, n_continuous.
7200         Check for continuous variables.
7201         [DEBUGGING] (debug_print) Remove content_names[].
7202         (mdump_token) New macro.
7203         (mget_token_dump) New function.
7204         (mdump_token) New function.
7205         (context) New function.
7206         (mget_token) Fix messages.
7207         (static var data, split_values, factor_values) New vars.
7208         (read_matrices) Manage split_values, factor_values.
7209         (read_data_lines) New function.
7210         (read_matrices_without_rowtype) Implemented.
7211         (read_splits) Message fixes.  Uses `just_read'.
7212         (read_factors) New function.
7213         (output_data) New function.
7214         (matrix_data_source_destroy_source) Close the file handle.
7215         (glob var matrix_source) Change name from "DATA LIST" to "MATRIX
7216         DATA".
7217
7218         * str.c: (strpadcmp) Removed.
7219
7220         * vfm.c: (dump_splits) Initialize i; fix test for end of splits.
7221
7222 Sun Jan 18 00:30:59 1998  Ben Pfaff  <blp@gnu.org>
7223
7224         * Lots of source files: Add cast to unsigned character to calls to
7225         tolower() and toupper().
7226
7227         * aggregate.c: Set default_dict.splits to NULL.
7228
7229         * command.c: (static variable tab[]) Add MATRIX DATA.
7230
7231         * data-in.c: Add debugging defines.  Formatting fixes.
7232
7233         * expr-opt.c: Formatting fixes.
7234
7235         * lexer.c: (syntax_error) Message fixes.
7236
7237         * matrix-data.c: New enum series.
7238         (static vars fmt, section, diag, explicit_rowtype, signle_split,
7239         split_values, n_factors, factors, cells, pop_n, contents,
7240         n_contents) New vars.
7241         (cmd_matrix_data) Finished implementation.
7242         (compare_variables_by_mxd_vartype) New function.
7243         [DEBUGGING] (debug_print) New function.
7244         (static vars mtoken, mtokstr, mtoklen, mtokval) New vars.
7245         (read_matrices) New function.
7246         (read_matrices_without_rowtype) New function.
7247         (read_matrices_with_rowtype) New function.
7248         (read_splits) New function.
7249         (mget_token) New function.
7250         (force_eol) New function.
7251         [0] (test_tokenizer) New function.
7252         (matrix_data_source_destroy_source) New function.
7253         (glob var matrix_data_source) New var.
7254
7255         * misc.h: Include ieeefp.h if present.
7256
7257         * split-file.h: (cmd_split_file) Changes corresponding to struct
7258         dictionary changes.
7259
7260         * str.h: Fix memmem prototype.
7261
7262         * temporary.c: (save_dictionary, restore_dictionary,
7263         free_dictionary) Changes corresponding to struct dictionary
7264         changes.
7265
7266         * var.h: (MXD_* enums) New enum series.
7267         (struct matrix_data_proc) New struct.
7268         (struct split) Removed.
7269         (struct dictionary) Changed `splits' member from `split *' to
7270         `variable **'.
7271         (macro force_create_variable) New macro.  Replaced lots of
7272         create_variable()/assert() calls with calls to this macro.
7273
7274         * vars-atr.c: (discard_variables) Changed assertion.
7275         [GLOBAL_DEBUGGING] (force_create_variable) New function
7276         called by the macro of the same name.
7277         (clear_variable) Changes to delete splits from the dictionary
7278         corresponding to struct dictionary changes.
7279
7280         * vars-prs.c: (parse_variables) [GLOBAL_DEBUGGING] Check for
7281         corrupted variable `index' values in the dictionary passed in
7282         every time this function is called.
7283
7284         * vfm.c: (dump_splits, SPLIT_FILE_procfunc) Changes corresponding
7285         to struct dictionary changes.
7286
7287 Tue Jan 13 23:45:02 1998  Ben Pfaff  <blp@gnu.org>
7288
7289         * Makefile.am: (pspp_SOURCES) Add matrix-data.c.
7290
7291         * command.c: New includes.
7292         (static array cmd_table[]) Add ERASE, HOST, NEW FILE.
7293         (cmd_erase) New function.
7294         [unix] (shell) New function.
7295         (run_command) New function.
7296         (cmd_host) New function.
7297         (cmd_new_file) New function.
7298
7299         * expr-prs.c: (parse_primary) Message fix.
7300
7301         * inpt-pgm.c: Formatting fix.
7302         (cmd_reread) Implement the FILE subcommand.
7303
7304         * matrix-data.c: New file.
7305
7306         * q2c.c: (dump_header) Change output commenting style.
7307
7308         * weight.c: Comment fix.
7309
7310 Tue Jan 13 00:53:39 1998  Ben Pfaff  <blp@gnu.org>
7311
7312         * aggregate.c: (buf64_10x) Renamed buf64_1xx, all references
7313         changed.
7314         (buf_10x) Renamed buf_1xx, all references changed.
7315         (cmd_aggregate) Implemented cases 010, 011, 110, and 111 (all
7316         cases now implemented).
7317         (create_sysfile) New function.
7318         (agr_11x_func) New function.
7319
7320         * data-in.c: (parse_numeric) Work properly if there's an
7321         explicitly coded decimal point in the data and decimal places are
7322         specified on DATA LIST.  Bug reported by Dr Eberhard W Lisse
7323         <el@linux.lisse.na>.
7324
7325         * get.c: (cmd_get, cmd_save_internal) Allow extraneous slash
7326         before file specification on GET, SAVE, XSAVE.  Bug reported by Dr
7327         Eberhard W Lisse <el@linux.lisse.na>.
7328
7329         * q2c.c: [!HAVE_STRERROR] Include misc/strerror.c, not
7330         strerror.c.  Bug reported by Alexandre Oliva
7331         <oliva@dcc.unicamp.br>.
7332
7333         * sort.c: Include sort.h.  Comment fixes.  A few esthetic fixes.
7334         (static var separate_case_tab) New var.
7335         (cmd_sort_cases) Cancel temporary transformations here.  Free
7336         v_sort before return.
7337         (sort_cases) Run an EXECUTE procedure if SEPARATE is nonzero and
7338         we're reading from a sort stream.  Don't cancel temporary
7339         transformations.  Offload internal sorting to do_internal_sort().
7340         (do_internal_sort) New function.  Handles internal sorting even
7341         when SEPARATE is nonzero.  Doesn't free v_sort.
7342         (do_external_sort) Take new arg SEPARATE.  Only destroy `x' if
7343         it's non-NULL.
7344         (write_initial_runs) Take new arg SEPARATE.  Only destroy the old
7345         sink if SEPARATE is zero.
7346         (read_output_cases) Renamed read_sort_output(), all references
7347         changed.  Now uses separate_case_tab when it exists.
7348         (write_separate) New function.
7349
7350         * vfm.c: (page_to_disk) Destroy memory_source_cases, not
7351         memory_sink_cases.  Don't redundantly call
7352         vfm_source->destroy_source().
7353         (memory_stream_mode) After switching over, set memory_sink_cases
7354         to NULL.
7355
7356 Sat Jan 10 23:35:51 1998  Ben Pfaff  <blp@gnu.org>
7357
7358         * aggregate.c: (struct agr_var) Expand dbl[] array from 2 to 3
7359         elements.
7360         (static var prev_case) New, moved out of aggregate_single_case()
7361         local scope.
7362         (static var buf64_10x, buf_10x) New.
7363         (cmd_aggregate) Initialize prev_case.  Comment fixes.  Implement
7364         the 000, 001, 100, and 101 cases.  Free prev_case.
7365         (parse_aggregate_functions) Disallow scratch variables.
7366         (free_aggregate_functions) Only free agr_dict if non-null.  Use
7367         iter->function to determine numeric/string type, not
7368         iter->src->type.
7369         (aggregate_single_case) Don't manage prev_case.  Initialize
7370         aggregate info after dumping it.
7371         (accumulate_aggregate_info) Fix sum, weighted sum, mean, weighted
7372         mean, stddev, weighted stddev definitions.
7373         (dump_aggregate_info) Implemented.
7374         (initialize_aggregate_info) Renamed from
7375         initialize_aggregate_functions().  Initializes dbl[2].
7376         (agr_00x_trns_proc, agr_00x_end_func, write_case_to_sfm,
7377         agr_10x_trns_proc, agr_10x_trns_free, agr_10x_end_func) New.
7378
7379         * cases.c: (alloc_val) Removed.
7380
7381         * get.c: (cmd_save_internal) Initialize new `dict' member.
7382
7383         * sfm-write.c: (sfm_write_dictionary, write_header,
7384         write_variable, write_value_labels, write_documents) Reorganize,
7385         simplify for new parameter structure.
7386         (write_variable) Only one variable * argument now.
7387
7388         * sfm.h: (struct sfm_write_info) Removed `pri', `sec', and
7389         replaced by new `dict' member.
7390
7391         * temporary.c: (new_dictionary) Initialize n_documents.
7392
7393         * vars-atr.c: (dup_variable) Allocate `value's from dict into
7394         v->fv manually.
7395         (init_variable, replace_variable) Eliminate usage of alloc_val().
7396
7397         * vars-prs.c: (parse_DATA_LIST_vars) Accept PV_NO_SCRATCH option.
7398
7399         * vfm.c: (arrange_compaction) Allow `temporary' value of 2 to
7400         signal that AGGREGATE is to be used for forming final cases.
7401         (close_active_file) Call end_func before stopping lagging.  Cancel
7402         temporary after finishing compaction.
7403         (write_case) Comment fixes.  Cleaned up.
7404         (compact_case) Let AGGREGATE handle compaction when `temporary' is
7405         2.
7406
7407 Sat Jan 10 02:10:47 1998  Ben Pfaff  <blp@gnu.org>
7408
7409         * Makefile.am: (BUILT_SOURCES) Add means.c.
7410         (pspp_SOURCES) Add means.c.
7411         (EXTRA_DIST) Add means.q.
7412
7413         * command.c: (array cmd_table[]) Add MEANS.
7414
7415         * common.h: Esthetic fixes.  Comment fixes.  Test for
7416         MAX_SHORT_STRING greater than 8.
7417         (macros LOWEST, HIGHEST) New.
7418
7419         * data-in.c, data-list.c, recode.c: Comment fixes.
7420
7421         * means.q: New file, base version.
7422
7423         * mis-val.c: (parse_num_or_range, parse_numeric) Replace -DBL_MAX
7424         with LOWEST, DBL_MAX with HIGHEST.
7425
7426         * q2c.c: (dump_vars) Add an enum to array types giving the number
7427         of values for the enum.
7428
7429         * sfm-read.c: (sfm_read_dictionary, read_machine_flt64_info)
7430         Replace second_lowest_value with second_lowest_flt64.
7431
7432         * sfm-write.c: (write_variable, write_rec_7_34) Replace
7433         second_lowest_value with second_lowest_flt64.
7434
7435         * t-test.q: Comment fix.
7436
7437         * temporary.c: (restore_dictionary) Esthetic fix.
7438
7439         * tokens.h: (force_match_id, force_match, force_string, force_int,
7440         force_num, force_id) Replace msg() with syntax_error().
7441
7442         * var.h: (struct means_proc) New.
7443         (struct variable) Add mns member to `p' union.
7444
7445         * vars-prs.c: (parse_variable, parse_dict_variable,
7446         parse_variables, parse_DATA_LIST_vars) Replace msg() with
7447         syntax_error().
7448
7449 Thu Jan  8 22:28:41 1998  Ben Pfaff  <blp@gnu.org>
7450
7451         * Makefile.am: (pspp_SOURCES) Add tab.h.
7452
7453         * Most source files: Added a cast to unsigned char in usages of
7454         the ctype is*() functions.  Replaced `end of command expected'
7455         calls to msg() with calls to syntax_error().
7456
7457         * frequencies.q: (dump_condensed) Fix tab_dim() column reference.
7458
7459         * lexer.c: (hex_val) Removed (was dead code).
7460         (idmatch) Parenthesize function name to avoid macro expansion.
7461
7462         * postscript.c: Comment fixes.
7463         (ps_preopen_driver) Change default font size to 10pt.
7464
7465         * sfm-read.c: (read_variables) Byteswap sv.print, sv.write as
7466         int32s.
7467         (parse_format_spec) Change system-file format spec argument type
7468         to int32.  Parse the format spec with bitwise operators.
7469
7470         * sfmP.h: (struct sysfile_format) Removed.
7471         (struct sysfile_variable) Changed print, write members from
7472         sysfile_format to int32.
7473
7474         * tokens.h: Esthetic fixes.
7475         [__GNUC__] (macro id_match) New macro to hopefully speed up
7476         identifier matching.
7477         (macros match_id, match_tok, match_int) Implemented in
7478         compiler-independent manner; no longer GNU C only.
7479
7480         * vfm.h: Include time.h.
7481
7482 Mon Jan  5 11:06:15 1998  Ben Pfaff  <blp@gnu.org>
7483
7484         * data-list.c: (dump_fixed_table) Change tab_dim().
7485
7486         * dump-sysfile.c: (open_sysfile) Fix mmap() call.
7487
7488         * error.c: Include command.h.
7489
7490         * frequencies.g: Formatting fixes.
7491
7492         * frequencies.q: Add tab_dim() calls.  Make the total cell a
7493         joined cell.
7494
7495         * glob.c: Include command.h.
7496
7497         * sfm-read.c: (struct sfm_fhuser_ext) New members sysmis, highest,
7498         lowest.
7499         (sfm_read_dictionary) Initialize sysmis, highest, lowest.
7500         (sfm_read_machine_flt64_info) Update sysmis, highest, lowest.
7501         (read_variables) Byteswap sv.type; byteswap sv.print, sv.write as
7502         the other elements (is this right?).
7503         (read_variables) Use lowest, highest members.
7504         (parse_format_spec) New arg `vv' for more stringent checking.
7505         (dump_dictionary) Byteswaps nonexplicit data.
7506         (sfm_read_case) Byteswap numeric data.
7507
7508         * som.c: Initialize table_num to 1.
7509         (render_segments) Remember to increment y_index after each table
7510         segment.
7511
7512         * sysfile-info.c: (cmd_sysfile_info) Change tab_dim().  Don't call
7513         avl_count() on a NULL tree.  No title for the second table.
7514         (cmd_display) Handle DISPLAY VECTORS by calling display_vectors().
7515         Handle AS_SCRATCH as AS_NAMES.  Warn if no variables.  Re-enable;
7516         fix call to display_variables().
7517         (display_variables) Default to 4 columns, not 3.  Set up headers.
7518         Column title is Variable, not Name.  Fix index column.
7519         Add joint text.  Add tab_dim().  Handle value labels properly.
7520         Handle DISPLAY LABELS properly.  Draw boxes correctly.
7521         (describe_variable) Value labels don't need titles.  Don't clear
7522         nonexistent index column.
7523         (compare_vectors_by_name) New function.
7524         (display_vectors) New function.
7525
7526         * tab.c: (tab_height) Add assertion.
7527         (tab_null) Add debug code.
7528         (evaluate_dimensions) Add debug code.
7529
7530         * var.h: (struct variable) get_proc data is sometimes used
7531         simultaneously with other per-procedure info, therefore it was
7532         removed from the union.  All references changed.        
7533
7534 Sun Jan  4 18:13:33 1998  Ben Pfaff  <blp@gnu.org>
7535
7536         * ascii.c: (ascii_close_page) Put title on second line of headers
7537         if there is no subtitle.
7538
7539         * command.c: (glob var cur_proc) Move definition here, from
7540         common.c.
7541         (cmd_remark) Emit blank line before remarks.
7542
7543         * command.h: (glob var cur_proc) Move declaration here, from
7544         common.h.
7545
7546         * data-list.c: (dump_fixed_table) Fix messages.
7547         (dump_free_table) Call tab_nat_dim().
7548
7549         * descript.q: (dump_z_table) Modify tab_dim() call.
7550
7551         * frequencies.q: (dump_condensed, dump_statistics) Add tab_dim()
7552         call.
7553         (dump_statistics) Don't output header.
7554
7555         * groff-font.c: Minor format fix.
7556
7557         * html.c: Comment fix.
7558
7559         * list.q: (write_varname) Indent after advancing page.
7560
7561         * output.h: Minor reordering.
7562
7563         * postscript.c: Comment fixes.  Many places, '\n' was replaced by
7564         a reference to eol[].
7565         (struct ps_driver_ext) New member eol[].
7566         (ps_preopen_driver) Initialize eol[].
7567         (ps_postopen_driver) Fix sense of text for text_opt, line_opt
7568         defaults.  Handle headers.  Fix test for minimum page length.
7569         (static var option_tab[]) Add `line-ends'.
7570         (ps_option) Handle line-ends to change eol[].
7571         (postopen) Scale prop_em_width and fixed_width properly.  Set the
7572         prologue title to outp_title if applicable.  Replace the prologue
7573         line ends with eol[].  Call draw_headers() if headers are enabled.
7574         (text_width) New function.
7575         (out_text_plain) New function.
7576         (draw_headers) New function.
7577
7578         * print.c: (dump_table) Call tab_nat_dim().
7579
7580         * som.c: (som_blank_line) Only advance a line if not at the top of
7581         a page.
7582         (som_submit) Move several informational table calls here.
7583         Increment subtable_num if SOMF_NO_TITLE not set.
7584         (output_table) Advance a line if SOMF_NO_SPACING not set.
7585         (render_columns, render_segments, render_simple) Handle spacing
7586         between tables.  Handle table titles.  Remove debug output.
7587
7588         * som.h: (SOMF_*) New enum series.
7589         (struct som_table_class) New member `flags'.
7590
7591         * sysfile-info.c: (cmd_sysfile_info) Calls tab_nat_dim().  No
7592         headers or spacing.
7593         (display_variables) Calls tab_nat_dim().
7594         (describe_variable) Remove restriction on number of value labels.
7595         Make value labels separated by thin lines.
7596
7597         * tab.c: (tab_create) Default `flags' to none.
7598         (tab_float) New arg `w'.  All references changed.
7599         (tab_nat_dim) New function.
7600         (tab_output_text) No title or spacing.
7601         (tab_flags) New function.
7602         (tabi_flags) New function.
7603         (tabi_title) New function.
7604         (strip_height) Removed.
7605         (tabi_render) Skip title when necessary.
7606         (static var tab_tab_class) Add tabi_flags, tabi_title.
7607         (evaluate_dimensions) Disable display of column, row size.
7608         (sum_columns) Add title height to top header.
7609         (render_strip) Moved within file.
7610
7611         * tab.h: (struct tab_table) New member `flags'.
7612
7613         * vfm.c: (dump_splits) Calls tab_nat_dim().  No title.
7614
7615 Sat Jan  3 16:55:44 1998  Ben Pfaff  <blp@gnu.org>
7616
7617         * Most source files: Add `const' attribute in all appropriate
7618         places.
7619         
7620         * sysfile-info.c: (cmd_sysfile_info) Add tab_dim() call, add a
7621         column to the variables table for use by describe_variable().
7622         (cmd_display) Disable for the present.
7623         (display_documents) Don't wrap documents.
7624         (display_variables) Table has four columns now.
7625         (describe_variable) Table has four columns now.  Don't use a
7626         subtable, use joined cells instead.
7627
7628         * tab.c: (tab_create) Don't set `join'.
7629         (tab_realloc) ct array is not made up of a_string's.
7630         Reallocate trh, hrh, h arrays, initialize trh array.  Initialize
7631         cell contents on GLOBAL_DEBUGGING, not DEBUGGING.
7632         (text_format) New function.
7633         (tab_title) Rewritten, uses text_format().
7634         (tab_text) Rewritten, uses text_format().
7635         (tab_joint_text) New function.
7636         (tab_join) Removed.
7637         (static var hit) New variable.
7638         (render_strip) New args r1, r2.  Implement joined cells that fit
7639         on a single page.
7640         (tabi_render) Increment hit.  Pass new args to render_strip().
7641         (evaluate_dimensions) [GLOBAL_DEBUGGING] Check for uninitialized
7642         cells.  For t_naw and t_nah, ignore joined cells and null cells in
7643         calculations.
7644         
7645         * tab.h: (struct tab_join_rect) Removed.
7646         (struct tab_table) Removed `join'.
7647         (TAB_JOIN_MAIN) Removed.
7648         (struct tab_joined_cell) New struct.
7649         (TAT_NOWRAP) New enum.
7650
7651 Fri Jan  2 01:39:58 1998  Ben Pfaff  <blp@gnu.org>
7652
7653         * ascii.c: (ascii_postopen) Replace ASCII_* macros with their
7654         expansions.
7655         (ascii_postopen_driver) Fix initialization of *_spacing so that
7656         the TAL_0 bit doesn't count.
7657
7658         * data-list.c: (dump_fixed_table) Use natural width for Format
7659         column.
7660
7661         * glob.c: (rerange) Removed.
7662         (get_date) Formatting fixes.  Internationalization fix.
7663
7664         * html.c: (html_postopen_driver) Replace HTML_DEFAULT_OUTPUT_FILE
7665         with "pspp.html".
7666
7667         * postscript.c: (ps_postopen_driver) Replace
7668         PS_DEFAULT_OUTPUT_FILE with "pspp.ps".
7669
7670         * som.c: (som_submit) Don't eject page before every table.
7671         (output_table) Fix order of arguments on call to area().
7672         (render_columns) Fix calculation of max_len.
7673         
7674         * tab.c: (tabi_cumulate) Minor change to increase elegance.
7675         (render_strip) New function.
7676         (strip_height) New function.
7677         (tabi_render) Rewrite as calls to render_strip().
7678
7679         * tab.h: (TAT_* enums) Removed TAT_RICH, all references removed.
7680         Renumbered TAT_PRINTF, TAT_TITLE, TAT_FIX to correspond better
7681         with the TAB_* and OUTP_T_* constants.
7682         
7683 Thu Jan  1 11:53:52 1998  Ben Pfaff  <blp@gnu.org>
7684
7685         * Makefile.am: Formatting fixes.
7686
7687         * ascii.c: (ascii_postopen_driver) Initialize *_line_spacing[],
7688         *_line_width[].
7689
7690         * data-list.c: (dump_fixed_table) Add tab_dim() call.
7691
7692         * descript.q: (dump_z_table, display) Add tab_dim() calls.
7693
7694         * dump-sysfile.c: (glob var length) Make type off_t.
7695         (usage) Fix arguments.
7696         (main) Return 0.
7697
7698         * output.h: (OUTP_T_*) Change constants' value to match tab.h.
7699         Now right-justification is the default so many references had to
7700         change.
7701         (struct outp_class) Removed line_width, all references changed.
7702         (OUTP_DEV_*) Add OUTP_DEV_DISABLED.
7703         (struct outp_driver) Add elements horiz_line_width,
7704         vert_line_width, horiz_line_spacing, vert_line_spacing.  Remove
7705         som element.
7706
7707         * postscript.c: (outp_encodings) Formatting fixes.  Fix garbage
7708         collection.
7709         (postopen) Initialize all the informational members of
7710         outp_driver.
7711
7712         * som.c: (som_blank_line) New function, renamed from blank_line(),
7713         all references changed.
7714         (som_submit) Disables drivers whose pages can't be opened.
7715         (render_columns, render_simple, render_segments) Add debug output.
7716         (render_columns) Fix loop range.
7717         (render_simple) Don't try to render the headers, they're taken
7718         care of automatically.  Advance cp_y past the table when done.
7719         (render_segments) Fix loop ranges.
7720
7721         * tab.c: Initialize new members of tab_table.
7722         (tab_vline) Handle trv[]; don't set style for spacing-only lines.
7723         (tab_hline) Handle trh[]; don't set style for spacing-only lines.
7724         (tab_box) Handle trh[], trv[]; don't set style for spacing-only
7725         lines.
7726         (set_expr) Removed.
7727         (tab_dim) New function.
7728         (tab_col_width) Removed.
7729         (tab_row_height) Removed.
7730         (tab_output_text) Call tab_dim().
7731         (tabi_driver) Call evaluate_dimensions(), sum_columns().
7732         (tabi_area) Implemented.
7733         (tabi_cumulate) Implemented.
7734         (tabi_render) Partially implemented, but broken.
7735         (var tab_table_class) Made static.
7736         (evaluate_dimensions) New function.
7737         (sum_columns) New function.
7738
7739         * tab.h: (enum t_*) Now start at t_end.  New: t_ptw, t_nr, t_nc,
7740         t_nah, t_naw, t_neg, t_xch, t_dup, t_lbl, t_jnz, t_sac, t_sar,
7741         t_scr, t_srr, t_sentinel.  Removed: t_nat.
7742         (struct tab_table) New: wl, wr, ht, hb, trh, hrh, trv, wrv, dim,
7743         max_stack_height, w, h.  Removed: ce, re.
7744         (macro blank_line) Removed.
7745         (glob var zero_length) Removed.
7746
7747 Fri Dec 26 15:44:31 1997  Ben Pfaff  <blp@gnu.org>
7748
7749         * Most source files: include some of the new include files broken
7750         out of var.h.
7751         
7752         * Makefile.am: (pspp_SOURCES) Add all the new source files to the
7753         list.
7754
7755         * aggregate.c: (glob var outfile) Make static.
7756
7757         * command.c: (glob var pgm_state) Move here.
7758
7759         * common.c: (glob vars endian, second_lowest_value, pgmname,
7760         finished, curdate, cur_proc, start_interactive, history_file) Move
7761         here.
7762
7763         * descript.q: (structs dsc_z_score, descriptives_trns) Move here.
7764
7765         * file-handle.q: (glob vars files, inline_file) Move here.
7766
7767         * glob.c: Lost lots of glob vars, detailed in individual file
7768         entries.
7769         (init_glob) set_printer, set_screen were obsolete, deleted.
7770         set_cprompt has fewer spaces because pspp has fewer letters than
7771         fiasco.
7772
7773         * inpt-pgm.c: (glob vars inp_init, inp_init_size) Move here.
7774         (inp_nval) Made static.
7775
7776         * lexer.c: (glob vars token, tokval, tokstr, tokstr_size,
7777         tokstr_len, toklongstr, tokint) Move here.
7778
7779         * misc.c: Lost several vars and functions.
7780
7781         * set.q: (all the set_* variables) Move here.
7782
7783         * str.c: (strmaxcpy, strbarepadcpy, strbarepadlencpy, strpadcpy,
7784         blpstrset, strpadcmp, memrev, memrmem, cmp_str) Move here from
7785         misc.c.
7786
7787         * tab.c: (set_expr, tab_col_width, tab_row_height) New functions.
7788
7789         * tab.h: (enum series t_*) New enums.
7790         (struct tab_table) Use arena struct tag.  New members ce, re.
7791
7792         * tokens.h: Comment fixes.
7793
7794         * var.h: Move lots of enums and variables and functions and
7795         structures to other files.  Use and declare a lot more union and
7796         struct tags.  Comment fixes.  
7797
7798         * vector.c: (glob vars vec, nvec) Move here.
7799
7800         * vfm.c: (glob vars reinit_sysmis, reinit_blanks, init_zero,
7801         init_blanks, last_vfm_invocation) Move here.
7802
7803         * cases.h: New file.
7804         (struct long_vec) Move here.
7805         (vec_init, vec_clear, vec_insert, vec_delete, devector, envector)
7806         Move here.
7807
7808         * command.h: New file.
7809         (STATE_* enums) Move here.
7810         (glob var pgm_state) Move here.
7811
7812         * format.c: New file.
7813         (glob var formats) Move here.
7814         (parse_format_specifier_name, fmt_to_string,
7815         check_input_specifier, check_output_specifier,
7816         check_string_specifier, convert_fmt_ItoO, parse_format_specifier)
7817         Move here.
7818
7819         * format.h: New file.  Move functions now in format.c here.
7820         (FMT_* enums) Move here.
7821         (struct fmt_desc) Move here.
7822         (FCAT_* enums) Move here.
7823         (struct fmt_spec) Move here.
7824         (glob vars formats, fmt_parse_ignore_error) Move here.
7825
7826         * inpt-pgm.h: New file.
7827         (INP_* enums) Move here, make #defines into enums.
7828         (glob vars inp_init, inp_init_size) Move here.
7829
7830         * sort.h: New file.
7831         (glob vars v_sort, nv_sort) Move here.
7832         (sort_cases, read_sort_output) Move here.
7833
7834         * vector.h: New file.
7835         (struct vector) Move here, add struct tag.
7836         (glob vars vec, nvec) Move here.
7837         (find_vector) Move here.
7838
7839         * New file.
7840         (glob vars last_vfm_invocation, temp_case, reinit_sysmis,
7841         reinit_blanks, init_zero, init_blanks) Move here.
7842         (struct case_stream) Move here.
7843         (glob vars vfm_source, vfm_sink, vfm_memory_stream,
7844         vfm_disk_stream, sort_stream, data_list_source,
7845         input_program_source, file_type_source, get_source, n_lag) Move
7846         here.
7847         (procedure, write_case, lagged_case, compact_case, page_to_disk)
7848         Move here.
7849                 
7850 Wed Dec 24 22:40:42 1997  Ben Pfaff  <blp@gnu.org>
7851
7852         * Makefile.am: (pspp_SOURCES) Added html.c, som.c, som.h.
7853         (LDADD) Add libdcdflib.
7854
7855         * ascii.c: Comment and formatting fixes.  Almost every external
7856         function had an assert added, checking driver_open and page_open.
7857         (ascii_init_driver) Broken into ascii_preopen_driver,
7858         ascii_postopen_driver, ascii_close_driver.  Manages driver_open.
7859         (ascii_open_page) Sets page_open.
7860         (ascii_close_page) Clears page_open.
7861
7862         * html.c: Comment and formatting fixes.  Almost every external
7863         function had an assert added, checking driver_open and page_open.
7864         (html_init_driver) Broken into html_preopen_driver,
7865         html_postopen_driver, html_close_driver.  Manages driver_open.
7866         (html_open_page) Sets page_open.
7867         (html_close_page) Clears page_open.
7868         (html_submit) Disabled.
7869
7870         * lexer.c: (parse_string) Remove debugging printf.
7871
7872         * list.q: (determine_layout) Open a page if one is not yet open.
7873
7874         * output.c: Comment fixes.
7875         (add_class) Set the class member of the new list element.
7876         (parse_options) Don't handle device type.
7877         (colon_tokenize) New function.
7878         (configure_driver) New four-field format with a field for device
7879         type.  Now initialize driver_open, page_open, next, and prev
7880         fields.  Use new colon_tokenize() function.  Don't do a memory
7881         copy to replace a driver, it doesn't work; instead delete the old
7882         driver and insert a new one.
7883         (destroy_driver) Don't call som_destroy_driver().  Close the page
7884         if it's open.  Find the class in the list of classes and decrement
7885         that reference count.  Remove the driver from the global driver
7886         list.
7887         (outp_iterate_enabled_drivers) Renamed outp_drivers().  All
7888         references changed.  Rewritten.  Don't return a driver that's not
7889         enabled.
7890         (outp_eject_page) All references to som_internal_eject_page()
7891         changed to use this.  Sets cp_x to 0 as well as cp_y.
7892
7893         * output.h: (OUTP_I_* enums) Removed.
7894         (struct som_submission_form) Removed.
7895         (struct outp_class) init_driver broken into preopen_driver,
7896         postopen_driver, and close_driver.  submit changed to take a
7897         som_table argument.
7898
7899         * postscript.c: Comment and formatting fixes.  Almost every
7900         external function had an assert added, checking driver_open and
7901         page_open.
7902         (ps_init_driver) Broken into ps_preopen_driver,
7903         ps_postopen_driver, ps_close_driver.  Manages driver_open.
7904         (ps_open_page) Sets page_open.
7905         (ps_close_page) Clears page_open.
7906
7907         * som.c: New file, base implementation.
7908         
7909         * som.h: (struct som_table) Add struct tag.
7910         (enum SOM_COL_ACROSS) Removed.
7911         (SOM_ROWS, SOM_COLUMNS) New enums.
7912         (struct som_table_class) Add member `cumulate'.  Remove `segment';
7913         change `render' arguments.
7914         (struct som_point, struct som_rect) Removed.
7915         (som_submit_table) Fixed typo, should have been som_submit.
7916
7917         * sysfile-info: (describe_variable) Don't try to insert a
7918         subtable; just destroy it for now.
7919
7920         * t-test.q: Include dcdflib/cdflib.h instead of cdflib.h.  Fix
7921         references to value labels.
7922
7923         * tab.c: (tab_destroy) New function.
7924         (tab_columns) Change argument.
7925         [0] (tab_submit) Remove dead code.
7926         (tab_title) Allocate string from the table's arena.
7927         (tab_output_text) Only free the buffer if we allocated it.
7928         (tab_submit) New function.
7929         (static vars t, d) New static vars.
7930         (tabi_table, tabi_driver, tabi_count, tabi_area, tabi_columns,
7931         tabi_headers, tabi_cumulate, tabi_render) New functions.
7932         (glob var tab_table_class) New global var.
7933
7934         * tab.h: (struct tab_join_rect) Don't use a som_rect; directly
7935         encapsulate the rectangle.  All references changed.
7936         
7937 Sun Dec 21 16:18:58 1997  Ben Pfaff  <blp@gnu.org>
7938
7939         * All header files updated to use struct tags in addition to
7940         typedefs for all structures.  Don't use word `struct' in struct
7941         tags.
7942         
7943         * Makefile.am: (pspp_SOURCES) Remove html.c.
7944         (INCLUDES) Replace the lib/* includes with a single lib/ include;
7945         all references updated.
7946
7947         * command.c: (parse_cmd) Remove call to som_check_workspace.
7948         (output_line) Update to new som.
7949
7950         * data-in.c: (parse_numeric) A single dot is not an error; it is
7951         the system-missing value.
7952
7953         * data-list.c: (dump_fixed_table, dump_free_table) Update to new
7954         som.
7955
7956         * data-out.c: Added `const' as appropriate to many prototypes.
7957         (convert_E, convert_F, convert_CCx) Take double argument instead
7958         of value * argument.
7959         (convert_format_to_string) Call changed functions appropriately.
7960         Instead of modifying the caller's value for FCAT_SHIFT_DECIMAL,
7961         make a local copy of the value.
7962
7963         * descript.q: Remove custom_variables() prototype now provided by
7964         q2c.  
7965         (custom_variables) Don't increment sbc_variables, the caller does
7966         this.
7967         (dump_z_table, display) Update to new som.
7968
7969         * error.c: (vmsg) Add const to prototype.  Remove code to handle
7970         `too many errors' condition.
7971         (check_error_count) New function.
7972         (msg) Add const to prototype.
7973
7974         * filename.c: (open_file) Rewrite for elegance.
7975
7976         * frequencies.q: Remove custom_*() prototypes now provided by q2c.
7977         (dump_full, dump_condensed, dump_statistics) Update for new som.
7978
7979         * list.q: Don't include somP.h.  Change all references to
7980         som_driver_ext to refer to the new members of som_driver.  Change
7981         som_internal_eject_page() references to outp_eject_page().
7982
7983         * main.c: (parse) Rewrite for elegance.  Add call to
7984         check_error_count().
7985
7986         * output.c: (add_class, outp_list_classes, outp_configure_driver)
7987         Rewrite or revise for new outp_driver_class_list structure.
7988         (outp_iterate_enabled_drivers) Fix comparison between disabled
7989         devices and current device type.
7990         (outp_eject_page) New function.
7991
7992         * output.h: Comment fixes.
7993         (struct outp_driver) New members driver_open, page_open, cp_x,
7994         cp_y, font_height, prop_em_width, fixed_width.  Deleted members
7995         ref_count, next.
7996         (struct outp_driver_class_list) New struct.
7997         (outp_class_list) Changed to type outp_driver_class_list; all
7998         references updated.
7999
8000         * print.c: (dump_table, print_trns_proc) Updated for new som.
8001
8002         * q2c.c: (dump_vars) Simplify array subcommand code.  Declare
8003         prototypes for custom subcommands.
8004         (dump_subcommand) Always include the `else'.
8005         (dump_parser) Fix comments in output code.
8006
8007         * set.q: Reordered functions.
8008
8009         * som-frnt.c, som-high.c, som-low.c, somP.h: Removed.
8010         
8011         * som.h: Rewritten from scratch.
8012
8013         * str.h: Remove dead code.
8014
8015         * tab.c, tab.h: New files, base implementation.
8016
8017         * sysfile-info.c: (cmd_sysfile_info, describe_variable) Update to
8018         new som.
8019
8020         * t-test.q: New code from John Williams
8021         <johnr.williams@stonebow.otago.ac.nz>.  Include math.h, cdflib.h.
8022         Many many new static vars and defines.
8023         (precalc, postcalc, g_postcalc, z_postcalc, t_pairs, t_groups,
8024         groups_calc, pairs_calc, z_dev_calc, z_calc) New functions.
8025         (struct value_list) New struct.
8026         (variance, covariance, pooled_variance, oneway, pearson_r, f_sig,
8027         t_crt, t_sig, print_t_groups) New functions.
8028         (cmd_t_test) Implemented.
8029
8030         * temporary.c: (cancel_temporary) Only free the temp_dict if it's
8031         non-NULL.
8032
8033         * vfm.c: (dump_splits) Update to new som.
8034
8035 Thu Dec  4 23:02:22 1997  Ben Pfaff  <blp@gnu.org>
8036
8037         * Makefile.am: (fiasco_SOURCES) Add html.c.
8038
8039         * aggregate.c: Base source.
8040
8041         * ascii.c: (postopen, preclose) Reformat.
8042
8043         * data-out.c, expr-evl.c: Comment fixes.
8044         
8045         * filename.c: (open_file) When opening a file for writing, use
8046         line buffering instead of full buffering for better interactive
8047         performance.  Suggested by Valerio Aimale
8048         <valerio@svpop.com.dist.unige.it>.  Also, recognize special file
8049         names `stdin', `stdout', `stderr'.
8050
8051         * groff-font.c: Comment fixes.
8052
8053         * html.c: New file; base version.
8054
8055         * list.q: (write_all_headers, clean_up, determine_layout,
8056         list_cases) Ignore `special' devices for now.  Needs to be fixed
8057         later.
8058
8059         * output.c: (outp_init) Add html driver to list; reverse list
8060         order.
8061
8062         * output.h: (struct outp_class_struct) New members `special',
8063         `submit'; comment fixes.  All references changed.
8064
8065         * postscript.c: (ps_init_driver) Make defaults for text_opt,
8066         line_opt depend on whether the OUTP_DEV_SCREEN bit is set on the
8067         device.
8068         (postopen) Comment fix.
8069         (preclose) Comment fixes, formatting fixes.  Change x->file.file
8070         references to more proper f->file.
8071
8072         * som-high.c: (som_submit_table) Special classes use their own
8073         renderers.
8074
8075         * som.h: Comment fixes.
8076
8077         * temporary.c: (new_dictionary) Don't try to xstrdup() a NULL
8078         string.
8079         
8080 Tue Dec  2 14:36:07 1997  Ben Pfaff  <blp@gnu.org>
8081
8082         * Makefile.am: (fiasco_SOURCES) Add aggregate.c back in.
8083
8084         * aggregate.c: Still working on this.
8085
8086         * command.c: (cmd_table[]) Add AGGREGATE back in.
8087         (split_words) Make '-' a legal word separator as well as ' '.
8088
8089         * main.c: Comment fixes.
8090
8091         * q2c.c: (dump_parser) Don't require the procedure's full name to
8092         be present, in the generated source.
8093
8094         * t-test.q: Change name to `t-test' from `t test'.  Let PAIRS be
8095         multiply specified and let it be default; let MISSING, CRITERIA,
8096         FORMAT be multiply specified.
8097         (cmd_t_test) Parse command name.  [DEBUGGING] Call debug_print().
8098         (custom_groups) Fix defaults.
8099         (custom_pairs) Check whether this is a PAIRS subcommand before
8100         attempting to parse.  Better garbage collection.  Proper storage
8101         allocation.
8102         [DEBUGGING] (debug_print) New function.
8103
8104         * temporary.c: Comment fixes.
8105         (copy_variable) Don't copy variable name and index.
8106         (save_dictionary) Copy variable name and index by hand.
8107
8108         * vars-atr.c: Comment fixes.
8109         (create_variable) New dictionary argument.  All references
8110         changed.
8111         (common_init_stuff) New dictionary argument.  All references
8112         changed.
8113         (init_variable) New dictionary argument.  All references changed.
8114         (dup_variable) New function.
8115
8116         * vars-prs.c: (parse_variables) If there are any errors, we always
8117         return 0.  Previously, it was possible for some types of errors to
8118         be ignored.
8119         
8120 Sat Nov 22 01:20:59 1997  Ben Pfaff  <blp@gnu.org>
8121
8122         * Makefile.am: (fiasco_SOURCES) For 0.1.5 release, remove
8123         aggregate.c.
8124
8125         * command.c: (cmd_table[]) Comment out AGGREGATE; add T TEST.
8126
8127         * list.q, t-test.q: Remove ALL option from VARLIST declaration in
8128         grammar rules.
8129
8130         * q2c.c: Comment fixes.
8131         (SBC_* enums) Remove SBC_VARLIST_ALL; all references removed.
8132         
8133         * t-test.q: (cmd_list) Rename cmd_t_test.
8134
8135         * temporary.c: (new_dictionary) Don't declare as static.
8136         
8137 Fri Nov 21 00:03:06 1997  Ben Pfaff  <blp@gnu.org>
8138
8139         * aggregate.c: Changes, still not finished.
8140
8141         * file-handle.q, frequencies.q, list.q, set.q: Comment fixes.
8142
8143         * q2c.c: Comment fixes.  Now its output is internationalized.
8144         (get_token) Fix parsing of escapes within literal strings.
8145         (main) Fix bad #line directives in output.
8146
8147         * t-test.q: Base implementation.
8148
8149         * temporary.c: (new_dictionary) New function.
8150         (restore_dictionary) [__CHECKER__] Change fill character to *
8151         (from @).
8152         
8153 Sun Nov 16 01:29:57 1997  Ben Pfaff  <blp@gnu.org>
8154
8155         * Makefile.am: (BUILT_SOURCES, fiasco_SOURCES) Add t-test.c
8156
8157         * aggregate.c: Changes, still not finished.
8158
8159         * descript.q, list.q: Comment fixes.
8160
8161         * q2c.c: Almost completely rewritten.
8162
8163         * t-test.q: New file, not complete.
8164
8165 Fri Nov 14 00:14:48 1997  Ben Pfaff  <blp@gnu.org>
8166
8167         * aggregate.c: Changes, still not finished.
8168
8169         * sort.c: (sort_cases) Call cancel_temporary() instead of doing it
8170         by hand.
8171
8172         * temporary.c: (cancel_temporary) New function.
8173
8174         * vars-atr.c: (discard_variables) Call cancel_temporary() instead
8175         of doing it by hand.
8176
8177         * vfm.c: (close_active_file) After restoring a TEMPORARY
8178         dictionary, set temp_dict to NULL.  Cancel TEMPORARY through
8179         cancel_temporary().
8180         (SPLIT_FILE_procfunc) Comment fix.
8181
8182 Tue Oct 28 16:08:45 1997  Ben Pfaff  <blp@gnu.org>
8183
8184         * Makefile.am: (fiasco_SOURCES) Add aggregate.c.
8185
8186         * aggregate.c: New file, not finished yet.
8187
8188         * command.c: (cmd_table) Add AGGREGATE.
8189
8190         * common.h: (pgm_state) Move declaration to var.h.
8191
8192         * lexer.c: (bin_value_func, oct_value_func, hex_value_func) i18n
8193         fixes.
8194         (parse_string) Message fix.
8195
8196         * recode.c: Comment fix.
8197
8198         * sfm-read.c: (read_variables) Code esthetic fixes.
8199         (write_header) Default date is `Jan', not `JAN'.
8200
8201         * sfmP.h: (bswap_int32) [!__linux__] Fix off-by-one errors.
8202
8203         * sort.c: (cmd_sort_cases) Farm the work out to new function
8204         parse_sort_variables().
8205         (parse_sort_variables) New function.
8206         (sort_cases) New function.  Cancels temporary transformations,
8207         which sorting didn't do previously.
8208         (cmd_sort_cases) Better garbage collection on error.  Uses
8209         do_external_sort().
8210         (write_initial_runs, merge_once) Improved code esthetics.
8211         (sort_stream_read) Reduced to one call to read_output_cases().
8212         (read_output_cases) New function.
8213
8214         * var-labs.c: (cmd_variable_labels) Re-enabled truncation of
8215         variable labels to 120 characters.
8216
8217         * var.h: Comment fixes.
8218         (glob var pgm_state) From common.h.
8219
8220         * vars-atr.c: (discard_variables) Set pgm_state to STATE_INIT.
8221
8222         * vars-prs.c: (parse_DATA_LIST_vars) Support PV_SINGLE in
8223         options.  Set *names to NULL on error.
8224
8225         * vfm.c: (memory_stream_init) Assert compaction_nval != 0.
8226
8227 Thu Oct  9 09:59:49 1997  Ben Pfaff  <blp@gnu.org>
8228
8229         * sfm-write.c, vfm.c: [HAVE_UNISTD] #include <unistd.h>, needed by
8230         SunOS4.  From Alexandre Oliva <oliva@dcc.unicamp.br>.
8231
8232 Wed Oct  8 18:55:24 1997  Ben Pfaff  <blp@gnu.org>
8233
8234         * vfm.c: (page_to_disk) Added missing local variables.
8235
8236 Tue Oct  7 20:23:17 1997  Ben Pfaff  <blp@gnu.org>
8237
8238         * get.c: Comment fix.
8239
8240         * sort.c: (cmd_sort_cases) Attempt to perform internal sort if the
8241         source is anything other than a disk stream, not just if it's in a
8242         memory stream.  Call page_to_disk() before external sort.
8243         (allocate_cases) Message fix.
8244
8245         * vfm.c: (prepare_for_writing) Warn user when paging workspace to
8246         disk.
8247         (page_to_disk) New function.
8248
8249 Sun Oct  5 15:56:14 1997  Ben Pfaff  <blp@gnu.org>
8250
8251         * Makefile.am: (INCLUDES) Include .. instead of $(top_srcdir).
8252
8253         * common.h: (macro strerror) Remove.  From Alexandre Oliva
8254         <oliva@dcc.unicamp.br>.
8255
8256         * get.c: (dict_delete_run) The number of variables to delete is
8257         not necessarily the number of variables that need to be shifted
8258         up.
8259         (trim_dictionary) Don't set *options to 0.  Fix bug that caused
8260         too many variables to be deleted.
8261
8262         * postscript.c: Comment fix.
8263
8264         * q2c.c: Include strerror.c.  From Alexandre Oliva
8265         <oliva@dcc.unicamp.br>.
8266
8267         * set.q: #undef ON and OFF.  From Alexandre Oliva
8268         <oliva@dcc.unicamp.br>.
8269
8270         * sfm-read.c: (sfm_read_dictionary) Don't set the file class too
8271         early, otherwise errors cause a bad free().
8272
8273         * str.h: (macro nvsprintf) s/FORMATS/FORMAT/ typo.  From Alexandre
8274         Oliva <oliva@dcc.unicamp.br>.
8275
8276         * temporary.c: (save_dictionary) Don't allocate memory if
8277         n_documents is 0.
8278
8279         * vfm.c: (memory_stream_write) Message fix.
8280
8281 Sat Oct  4 16:20:43 1997  Ben Pfaff  <blp@gnu.org>
8282
8283         * command.c: (static var cmd_table[]) Define REPEATING DATA
8284         command.
8285
8286         * common.h: Added support for broken systems that are missing
8287         EXIT_SUCCESS, EXIT_FAILURE, RAND_MAX, and/or strerror().
8288
8289         * Many source files: Replace syntax error messages via msg() with
8290         call to syntax_error().
8291
8292         * data-list.c: (dump_fixed_table) Add support for dumping table
8293         for REPEATING DATA as well as DATA LIST FIXED.
8294         (cmd_repeating_data) Allows and requires `/' between subcommands.
8295         Does proper thing with allowing rpd.starts_end to stay 0.  Allows
8296         CONTINUED specifications to be omitted.  Forces CONTINUED to be
8297         specified if ID is.  Calculates starts_end, cont_end from logical
8298         record length as reported by fhp.  Calls dump_fixed_table() if
8299         requested.  Fixed length of record copied by memcpy.
8300         (parse_num_or_var) Sets `num' to 0, not NOT_INT, for variables.
8301         Message fix.
8302         (realize_value) Returns sensible value for out-of-range variable
8303         values.
8304         (rpd_parse_record) New argument `ofs'.  Fixed confusion between
8305         length of occurrences and length of line.  Added warning for
8306         fields that exceed the line length.  Fixed infinite loop.
8307         (read_one_set_of_repetitions) Numerous minor changes for more
8308         complete SPSS compliance.  Message fixes.
8309
8310         * dfm.c: (dfm_close) If the file being closed is the inline file,
8311         read all the remaining data before closing it.
8312         (dfm_get_record) Don't close the file on lossage, as either it
8313         has been closed already or it doesn't belong to us.
8314
8315         * error.c: (puts_stdout) New function.
8316         (vmsg) Use puts_stdout instead of puts.
8317
8318         * file-handle.q: (fh_record_width) New function.
8319
8320         * inpt-pgm.c: (init_case) Fixed buffer overrun when inp_nval % 4
8321         == 0.
8322         (clear_case) Ditto.
8323         (input_program_source_read) Made an old kluge an approved method.
8324
8325         * lexer.c: (syntax_error) New function.
8326
8327         * misc.c: [BROKEN_RAND] (ansi_rand, ansi_srand; static var next)
8328         New.
8329
8330         * output.c: (oupt_get_paper_size) Message fix.
8331
8332         * q2c.c: Numerous fixes to formatting of generated code made to
8333         conform to GNU coding standards.  Uses syntax_error() in generated
8334         code.  Other miscellaneous generated message fixes.  Added support
8335         for broken systems that are missing EXIT_SUCCESS, EXIT_FAILURE,
8336         RAND_MAX, and/or strerror().
8337
8338 Sat Oct  4 02:09:56 1997  Ben Pfaff  <blp@gnu.org>
8339
8340         * data-in.c: Comment fixes.
8341
8342         * data-list.c: (struct repeating_data_trns) New member `id_spec'.
8343         (find_variable_input_spec) New function.
8344         (cmd_repeating_data) Initializes id_spec.
8345         (rpd_parse_record) Implemented.
8346         (read_one_set_of_repetitions) Returns -3 by default in order to
8347         kluge out some potential bugs.
8348
8349         * data-out.c: Comment fixes.
8350
8351         * file-type.c: (internal_cmd_record_type) Message fix.
8352
8353         * inpt-pgm.c: (input_program_source_read) Special temporary kluge
8354         for handling -3 return value.
8355
8356 Sat Sep 20 23:58:15 1997  Ben Pfaff  <blp@gnu.org>
8357
8358         * data-list.c: Comment fixes.
8359         (struct dls_var_spec) Reordered members.
8360         (read_from_data_list_fixed) Restructured.
8361         (struct repeating_data_trns) Reordered members.  Renamed `starts'
8362         as `starts_beg', `ends' as `starts_end'.
8363         (cmd_repeating_data) Calculates length of repeated data if
8364         necessary and possible.
8365         (parse_num_or_var) Don't allow string variables.
8366         (realize_value) New function.
8367         (rpd_msg) New function.
8368         (rpd_parse_record) New function.  Currently stubbed out.
8369         (read_one_set_of_repetitions) Implemented.
8370
8371         * inpt-pgm.c: (input_program_source_read) Comment fix.
8372
8373 Thu Sep 18 21:34:57 1997  Ben Pfaff  <blp@gnu.org>
8374
8375         * command.c: (cmd_end_repeat_p) Removed.
8376         (init_cmd_parser) Doesn't set cmd_end_repeat_p.
8377         (parse_cmd_name) Removed.
8378
8379         * data-list.c: Comment fixes.
8380         (data_list_pgm) Removed `eof' member.
8381         (static var first) New var.
8382         (cmd_data_list) Sets `first'.  Ensures that DATA LIST uses the
8383         FILE TYPE file inside FILE TYPE structures.
8384         (append_var_spec) Appends to *first, not dls.spec.
8385         (parse_fixed) Message fixes.
8386         (struct rpd_num_or_var) New.
8387         (struct repeating_data_trns) New.
8388         (static var rpd) New.
8389         (cmd_repeating_data) New function.
8390         (parse_num_or_var) New function.
8391         (parse_repeating_data) New function.
8392         (read_one_set_of_repetitions) New function.
8393
8394         * file-type.c: (cmd_file_type) Message fixes.  Always
8395         default_handle to FILE TYPE file handle.
8396         (internal_cmd_record_type) Message fixes.
8397
8398 Wed Aug 20 14:22:03 1997  Ben Pfaff  <blp@gnu.org>
8399
8400         * repeat.c: Comment fix.  Disable debugging.
8401
8402         * temporary.c: (restore_dictionary) Sets splits to NULL and
8403         n_splits to 0 before destroying the variables because now doing
8404         this tries to remove split variables.
8405
8406         * vars-atr.c: (discard_variables) Asserts that n_splits is 0 after
8407         destroying the dictionary.
8408         (clear_variable) Removes a variable from splits after destroying
8409         it.
8410
8411 Mon Aug 18 18:06:55 1997  Ben Pfaff  <blp@gnu.org>
8412
8413         * cmdline.c: (set_compat) Removed.
8414         (pick_compat) Removed.
8415         (parse_command_line) Removed -c option.
8416         (pre_syntax_message) Removed -c option.
8417         (usage) Remove compatibility code.
8418
8419         * common.h: (macros VER_PC, VER_WND, VER_X) Removed.
8420         (glob var compat) Removed.
8421
8422         * compute.c: (type_check) Fixed messages about type mismatches.
8423
8424         * data-list.c: (cmd_data_list) Removed compatibility code.
8425         (fixed_parse_compatible) Calls convert_negative_to_dash().
8426         Fixed bug where it only set the variable in fx.spec if it created
8427         the variable itself.
8428         (dump_fmt_list) Spelling fix.
8429         (cut_field) Removed compatibility code.
8430
8431         * dfm.c: (cmd_begin_data) Don't require a command terminator on
8432         BEGIN DATA command.
8433
8434         * expr-evl.c: (evaluate_expression) Implement LAG.
8435
8436         * expr-prs.c: (parse_add) Calls convert_negative_to_dash().
8437         (parse_neg) Calls convert_negative_to_dash().
8438         (LAG_func) Increases n_lag to the lag requested.  Fixed assignment
8439         bug.
8440
8441         * expr.h: (struct expression_struct) Removed member max_lag.
8442
8443         * file-type.c: (parse_col_spec) Calls convert_negative_to_dash().
8444         (internal_cmd_record_type) Removed special handling to produce
8445         negative numbers from dash tokens.
8446
8447         * getline.c: (static var DO_REPEAT_level) New var.
8448         (getl_add_DO_REPEAT_file) Increments DO_REPEAT_level.
8449         (handle_line_buffer) Copies the line into getl_buf; doesn't call
8450         copy_with_DO_REPEAT_substitutions().
8451         (getl_read_line) Maintains value of getl_mode.  Calls
8452         perform_DO_REPEAT_substitutions() whenever DO_REPEAT_level is
8453         positive.
8454         (getl_close_file) Decrements DO_REPEAT_level when appropriate.
8455
8456         * getline.h: (getl_mode) New glob var.
8457
8458         * glob.c: Comment fixes.
8459         (init_glob) Restructured.  Sets set_seed.
8460         (init_compat_dependent) Removed.  All references removed.
8461         (get_date) Format changed from MM/DD/YY to DD MMM YYYY.
8462         (__htonl, __htons) Removed.  (What were these for?)
8463
8464         * lexer.c: (static var tbl) Dash set to class CNUM.
8465         (make_hexit) New function from data-out.c.
8466         (get_token_representation) Rewritten.
8467         (convert_negative_to_dash) New function.
8468         (lex_init_compat_dependent) Removed.
8469         (yylex) A dash is parsed as part of a number if it is followed by
8470         a digit.  The ASCII representation of a number is copied to
8471         tokstr.  String parsing farmed out to parse_string().  Comment
8472         fixes.
8473         (bin_value_func, oct_value_func, hex_value_func, parse_string) New
8474         functions.
8475         (preprocess_line) Line processing depends on interactive/batch
8476         mode, not on compatibility mode.  Removed PC+ compatibility code.
8477
8478         * loop.c: (loop_3_trns_proc) Comment fix.
8479
8480         * main.c: Remove dead code.
8481         (main) Remove call to init_compat_dependent().
8482
8483         * misc.c: (convert_fmt_ItoO) Make E format conversion more
8484         conformant.
8485
8486         * print.c: (parse_string_argument) Calls
8487         convert_negative_to_dash().
8488         (fixed_parse_compatible) Calls convert_negative_to_dash().
8489
8490         * repeat.c: (RPT_* defines) Removed.
8491         (struct rpt_numeric) Removed.
8492         (struct repeat_entry) New member type, changed `replacement' from
8493         char * to char **.
8494         (clean_up) Deallocation adapted to new repeat_entry.
8495         (internal_cmd_do_repeat) `type' defaults to 0.  Remove lookahead()
8496         usage.  Creates vars for `type' of 1.
8497         (parse_ids) Sets type of 1.  Adapted to new repeat_entry.
8498         (store_numeric) Rewritten, new interface.
8499         (parse_numbers) Rewritten.
8500         (parse_strings) Rewritten.
8501         (find_DO_REPEAT_substitution) New function.
8502         (perform_DO_REPEAT_substitutions) New function.
8503         (copy_with_DO_REPEAT_substitutions) Removed.
8504         (debug_print) Rewritten.
8505
8506         * set.q: Comment fix.
8507         (custom_results) Removed compatibility code.
8508         (internal_cmd_set) Removed SET EMULATION subcommand.  Removed
8509         compatibility code.
8510
8511         * sysfile-info.c: (cmd_display) Removed compatibility code.
8512
8513         * tokens.h: Comment fixes.
8514         (token types enum) Removed `toktype' typedef name for this int
8515         type.  Removed SUBST.  Restructured.
8516
8517         * vars-atr.c: (discard_variables) Sets n_lag to 0.
8518
8519         * vars-prs.c: Comment fix.
8520
8521         * vfm.c: Comment fixes.
8522         (glob var n_lag) New var.
8523         (static vars lag_count, lag_head, lag_queue) New vars.
8524         (procedure) Removed argument nlag.
8525         (setup_lag) New function.
8526         (close_active_file) Discards lagging state.
8527         (lag_case) New function.
8528         (lagged_case) New function.
8529         (write_case) Lags a case if lagging.
8530
8531         * weight.c: (cmd_weight) Removed compatibility code.
8532         
8533 Sun Aug 17 22:34:40 1997  Ben Pfaff  <blp@gnu.org>
8534
8535         * getline.h: (struct getl_script) New members loop_index, macros.
8536
8537         * getline.c: (getl_add_file) Sets first_line field to NULL.
8538         (getl_add_DO_REPEAT_file) New function.
8539         (handle_line_buffer) When the current line's length is negative,
8540         set the filename and line number.  Increment line number after
8541         reading line.  Pass the line to
8542         copy_with_DO_REPEAT_substitutions() for processing.
8543         (getl_close_file) Free DO REPEAT lines before freeing the
8544         filename, and just set the filename to NULL when doing this,
8545         because otherwise the filename gets freed twice.
8546
8547         * glob.c: (glob var queuing) Removed.  All references removed.
8548
8549         * lexer.c: Comment fixes.
8550         (get_token_representation) New function.
8551
8552         * repeat.c: Comment fixes.
8553         (struct repeat_entry) Replaced type and v union members with a
8554         simple string.
8555         (append_record) New function.
8556         (internal_cmd_do_repeat) Started reforming it for the new
8557         repeat_entry struct.  Properly records filename changes in the
8558         getl_line_buf.  Fixed improper use of = for ==.  Fixed sense of
8559         strncasecmp() result usage.  Uses append_record() to simplify.
8560         Properly discards END REPEAT line.  Calls getl_add_DO_REPEAT_file
8561         to add in the file.
8562
8563         (copy_with_DO_REPEAT_substitutions) Started coding.
8564
8565         [DEBUGGING] (debug_print_lines) New function.
8566
8567         * set.q: (custom_results, internal_cmd_set) s/VER_PCP40/VER_PC/;
8568
8569         * tokens.h: (macro is_id1, is_idn) New macros.
8570
8571 Sat Aug 16 10:57:41 1997  Ben Pfaff  <blp@gnu.org>
8572
8573         * cmdline.c: (static var pre_syntax_message) Changed `win'
8574         compatibility mode to `wnd'.
8575
8576         * data-list.c: (fixed_parse_spss) Renamed
8577         fixed_parse_compatible().
8578
8579         * glob.c: (init_glob) Excise unused code for
8580         program_invocation_short_name.
8581
8582         * lexer.c: (preprocess_line) Leading indentors are ignored in Wnd
8583         as well as in X.
8584
8585         * print.c: (fixed_parse_spss) Renamed fixed_parse_compatible().
8586
8587         * set.q: `win' compatibility renamed `wnd'.
8588
8589 Thu Aug 14 22:11:12 1997  Ben Pfaff  <blp@gnu.org>
8590
8591         * filename.c: [__WIN32__] Change the included Windows header files
8592         (again).
8593         (absolute_filename_p) [__MSDOS__] A filename with a colon as the
8594         second character is absolute.
8595         (dirname) Fix logic error.  Don't printf() the results.
8596         (prepend_dir) Don't printf() the results.
8597
8598         * getline.c: (handle_line_buffer) New function.
8599         (getl_read_line) Reads line with handle_line_buffer() when
8600         appropriate.
8601         (getl_close_file) Discard line buffer data.
8602
8603         * getline.h: Comment fixes.
8604         (struct getl_line_list) New struct.
8605         (getl_script_struct) Added line buffer members.  These are hooks
8606         for use by DO REPEAT to allow it to insert virtual source code
8607         into the program.
8608
8609         * glob.c: (init_glob) [__DJGPP__ || (__WIN32__ && __BORLANDC__)]
8610         Override Borland C++ stupidity that claims Windows has a console
8611         window size of 0x3.
8612
8613         * repeat.c: This is in the process of being restructured from
8614         using a token-buffering approach to the DO REPEAT facility to
8615         using the more flexible approach of a line-buffering approach in
8616         conjunction with the getline module.  Comment fixes.
8617         (struct tok_struct) Removed.
8618         (static vars queue_index, queue_head, queue) Removed.
8619         (static vars line_buf_head, line_buf_tail) New vars.
8620         (internal_cmd_do_repeat) Instead of queuing tokens, queue lines.
8621         Not complete.
8622         (pull_queue, destroy_queue) Removed.
8623         [DEBUGGING] (debug_print_tokens) Removed.
8624
8625 Tue Aug  5 13:57:58 1997  Ben Pfaff  <blp@gnu.org>
8626
8627         * file-handle.q: (prepend_current_directory) New function.
8628         (internal_cmd_file_handle, fh_get_handle_by_filename) Prepends
8629         current directory before normalizing filename.
8630
8631         * filename.c: (gnu_getcwd) New function.
8632         (absolute_filename_p) New function.
8633         (search_path) New argument, PREPEND.  All references changed to
8634         pass NULL except those explicitly mentioned.  Uses
8635         absolute_filename_p().  Prepends PREPEND before trying the
8636         filename.
8637         (dirname, prepend_dir) New functions.
8638
8639         * getline.c: (getl_get_current_directory) New function.
8640         (getl_include) Passes getl_get_current_directory() as PREPEND arg
8641         to search_path().
8642                 
8643 Sun Aug  3 11:42:36 1997  Ben Pfaff  <blp@gnu.org>
8644
8645         * In several source files, the term `script' was replaced with
8646         `syntax file' inside error messages.  Usage of the term `script'
8647         in the sense of a syntax file is now deprecated.
8648
8649         * cmdline.c: (static vars pre_syntax_message, post_syntax_message)
8650         Updated messages.
8651
8652         * dump-sysfile.c: (usage) Update message.
8653
8654         * getline.c: (getl_read_line) Ignore lines beginning with `#!'.
8655
8656         * getline.h: (glob var getl_include_path) Declare extern.
8657
8658         * list.q: Define EXTERN as extern before #including somP.h.
8659
8660         * var.h: Remove declaration of `disptype' variable.
8661
8662         * vfm.c: (close_active_file) After switching the data sink to a
8663         data source, set vfm_sink to NULL, because it doesn't exist any
8664         more.
8665
8666 Thu Jul 17 21:41:44 1997  Ben Pfaff  <blp@gnu.org>
8667
8668         * glob.c: [__BORLANDC__] Include math.h.  Define _matherr() and
8669         _matherrl() to ignore all math errors.
8670
8671         * sfm-read.c: (read_value_labels) When reading the labels from
8672         disk, read the little parts separately instead of as a struct;
8673         this avoids alignment problems.
8674
8675         * sfm-write.c: (struct sfm_fhuser_ext) New member `elem_type'.
8676         (sfm_write_dictionary) Sets elem_type and frees it on lossage.
8677         (write_header) Allocates and initializes elem_type.
8678         (sfm_write_case) Uses elem_type to determine how to handle each
8679         flt64 element.
8680         (sfm_close) Frees elem_type.
8681
8682         * sfmP.h: Comment fix.
8683         [__BORLANDC__] Uses #pragma -a to adjust structure member
8684         alignment.
8685         
8686 Thu Jul 17 01:55:12 1997  Ben Pfaff  <blp@gnu.org>
8687
8688         * Makefile.am: (fiasco_SOURCES) Remove display.c.
8689
8690         * common.c: Fix typo.
8691
8692         * dfm.c: (read_record) Remove strncasecmp() emulation and fix the
8693         sense of the condition.
8694
8695         * expr-evl.c: (macro ALLOC_STRING_SPACE) [!PAGED_STACK] Add
8696         line-continuation backslash.
8697
8698         * filename.c: [__WIN32__] Include <windef.h> before <winbase.h>.
8699
8700         * frequencies.q: (custom_grouped, add_percentile) Don't use a
8701         non-constant expression as an argument to sizeof.
8702
8703         * glob.c: [__WIN32__ && __BORLANDC__] When including <conio.h>,
8704         undefine gettext macro because that's a conio function.
8705
8706         * hash.h: (hsh_prime_tab declaration) Remove.
8707
8708         * list.q: (write_fallback_headers) Move `leader' allocation out of
8709         main loop.  Change to local_alloc() allocation.
8710
8711         * output.h: Formatting fixes.  Put __attribute__ in right place on
8712         function prototypes.
8713
8714         * sfm-read.c: (read_machine_flt64_info, read_variables) Change
8715         incorrect `SECOND_LOWEST_VALUE' references to proper
8716         `second_lowest_value'.
8717
8718         * som-frnt.c: (EXTERN macro) Define as `extern' instead of null
8719         value.  This way 2 out of 3 of the som files define the vars
8720         extern, the correct way, that actually works under BC++.
8721         (som_set_float) Don't use nonconstant initializers for a struct.
8722
8723         * som-high.c: Add the standard alloca() header.
8724         (replicate_table) Add prototype.
8725
8726         Merged DISPLAY routine.
8727         * sysfile-info.c: (AS_*) New enum series.
8728         (cmd_sysfile_info) Gutted.  Calls describe_variable() to do the
8729         dirty work.
8730         (cmd_display, display_macros, display_documents,
8731         display_variables) Stolen from defunct display.c.
8732         (describe_variable) New function.
8733
8734         * temporary.c: [0] (display_tree) New debug function.
8735         (copy_variable) Performs shallow copy of value labels instead of
8736         deep copy; i.e., just copys the AVL tree and increments the
8737         reference counts.
8738
8739         * val-labs.c: Comment fixes.
8740         (do_value_labels) Optionally skip leading forward slash.
8741         (get_label) Creates only a single value label instead of many
8742         copies of one, and sets the reference count.
8743
8744         * display.c: Removed.
8745
8746         * dump-sysfile.c: New file, not yet complete.
8747
8748 Fri Jul 11 23:02:18 1997  Ben Pfaff  <blp@gnu.org>
8749
8750         For lots of source files I added more verbose_msg's.  These aren't
8751         listed below as they have tested as being benign.  In some cases
8752         these replaced debug_printf() calls.
8753
8754         * output.c: (outp_read_devices) Message fix.
8755
8756         * postscript.c: (output_encodings) Message fix.  Reports errors on
8757         fclose().
8758         (postopen) Message fix.
8759         
8760 Fri Jul 11 14:09:40 1997  Ben Pfaff  <blp@gnu.org>
8761
8762         * dfm.c: (dfm_close) Don't call fclose() for a NULL FILE.
8763
8764         * filename.c: (close_file_ext) Set f->file to NULL *after* closing
8765         it.
8766
8767         * main.c: Remove <malloc.h> #include.
8768
8769         * mis-val.c: (parse_numeric) Set .f member for each missing[]
8770         instead of trying to just set the missing[] itself, which is a
8771         gcc-specific idiom.
8772
8773         * sfm-read.c: (read_variables) Same.
8774
8775         * str.h: Add memmem() prototype.
8776
8777         * val-labs.c, var-labs.c: Replace <malloc.h> with <stdlib.h>.
8778
8779 Thu Jul 10 22:13:53 1997  Ben Pfaff  <blp@gnu.org>
8780
8781         * Makefile.am: (q2c) Don't include any libraries in the link.
8782
8783         * dfm.c: (force_line_buffer_extension) New macro.
8784         (count_tabs) New function.
8785         (tabs_To_spaces) New function.
8786         (read_record) Calls tabs_to_spaces() on the line being processed.
8787
8788         * q2c.c: Disabled i18n for this proglet so that libintl.a doesn't
8789         have to be compiled twice (once for CC, once for LOCAL_CC).
8790  
8791 Sun Jul  6 19:14:33 1997  Ben Pfaff  <blp@gnu.org>
8792
8793         * Makefile.am: (INCLUDES) Add intl directory; fix directories.
8794         (LDADD) Add @INTLLIBS@.
8795         (q2c) Add LIBS, @INTLLIBS@ to link step.
8796
8797         * inpt-pgm.c: Turn off debugging.
8798
8799         * postscript.c: (postopen) Format fix.  local_free() blocks
8800         returned by local_alloc(); don't free() them.
8801
8802 Sat Jul  5 23:44:51 1997  Ben Pfaff  <blp@gnu.org>
8803
8804         * data-in.c: (parse_string_as_format) Comment fix.  Fix check for
8805         string length.
8806
8807         * data-list.c: (read_from_data_list_fixed) Pass proper value for
8808         LEN arg, not simply the full string length.
8809
8810         * sort.c: (allocate_file_handles) Check SPSS compatible temp file
8811         directories before generic temp file directories.
8812
8813         * vfm.c: Disable debugging.
8814
8815 Fri Jul  4 13:26:41 1997  Ben Pfaff  <blp@gnu.org>
8816
8817         * get.c: Comment fix.
8818         (cmd_save_internal) Always passes GTSV_OPT_SAVE option.
8819
8820 Wed Jun 25 22:52:28 1997  Ben Pfaff  <blp@gnu.org>
8821
8822         * expr-prs.c: (debug_print_postfix) Conditionally included on
8823         GLOBAL_DEBUGGING.  Removed out_header() reference.
8824
8825         * exprP.h: Removed #undef GLOBAL_DEBUGGING.
8826
8827 Sun Jun 22 22:00:28 1997  Ben Pfaff  <blp@gnu.org>
8828
8829         * ascii.c: Removed obsolete ascii_close_page() prototype.
8830
8831         * command.c: (output_line) Comment fix.
8832
8833         * data-in.c: Formatting fix.
8834         (parse_string_as_format) Now the `fc' argument is used only for
8835         the purpose of error messages; it is not an index into the string
8836         passed.  All references changed.
8837
8838         * data-list.c: Comment fix.
8839         (cut_field) Comment fix.  Now returns the column number of the
8840         position of the field cut out on success.
8841         (parse_field) Added `column' argument.  Puts the column numbers in
8842         the error message.
8843         (read_from_data_list_free, read_from_data_list_list) Record the
8844         column number returned by cut_field(), pass it to parse_field().
8845
8846         * dfm.c: Comment fix.
8847
8848         * do-ifP.h: Comment fix.
8849
8850         * expr-prs.c: (SYSMIS_func) Implemented string-type arguments for
8851         the SYSMIS function.
8852
8853         * expr.h, exprP.h: Comment fix.
8854
8855         * glob.c: (init_glob) Only calls setlocale() and family if
8856         ENABLE_NLS set.
8857
8858         * hash.h: Comment fix.
8859
8860         * include.c: Comment fix.
8861
8862         * output.c: Comment fix.
8863
8864         * postscript.c: (ps_line_intersection) Simplified assertion.
8865
8866         * repeat.c: Comment fix.
8867
8868         * vars-atr.c: Comment fix.
8869
8870         * vars-prs.c: Comment fix.
8871
8872         * vfm.c: (vector_initialization) [DEBUGGING] Fixed undefined
8873         behavior with usage of postincrement.
8874         (memory_stream_read) Discards cases as it goes. 
8875
8876 Sun Jun 15 16:45:17 1997  Ben Pfaff  <blp@gnu.org>
8877
8878         * Makefile.am: Cleans q2c, not just distcleans it.  Distcleans
8879         foo.
8880
8881         * Most source files: Includes debug-print.h, related comment
8882         fixes.
8883
8884         * cases.c: (alloc_val) Removed complex allocation code.  Merely
8885         increments default_dict.nval and returns the former value.
8886         (envector, devector) Removed references to lv member of struct
8887         variable.
8888
8889         * common.h: (macro VME) Replaced complex definition with simple
8890         one.
8891
8892         * data-list.c: (cmd_data_list) Sets vfm_source instead of
8893         read_active_file and cancel_input_pgm.
8894         (read_from_data_list, cancel_data_list) Removed.
8895         (data_list_source_read, data_list_source_destroy_source) New
8896         functions.
8897         (glob var data_list_source) New var.
8898
8899         * dfm.c: (open_file_r, open_file_w) Simplified debug output.
8900         (cmd_begin_data) Improved criteria for an input program accessing
8901         the inline file.  Still not perfect.
8902
8903         * do-if.c: (do_if_trns_proc) Simplified debug output.
8904
8905         * expr-prs.c: Comment fixes.
8906         [DEBUGGING] (debug_print_postfix) Simplified debug output.
8907
8908         * file-handle.q: (fh_close_handle) Simplified debug output.
8909
8910         * file-type.c: Comment fixes.
8911         (cmd_file_type) Sets vfm_source instead of read_active_file and
8912         cancel_input_pgm.
8913         (cmd_end_file_type) On failure, discards variables in place of
8914         just canceling the input program.
8915         (read_from_file_type) Renamed file_type_source_read.
8916         (cancel_file_type) Renamed file_type_source_destroy_source.
8917         (glob var file_type_source) New var.
8918
8919         * get.c: (GTSV_* enum series) New enums GTSV_OPT_SAVE, GTSV_NONE.
8920         (cmd_get) Initializes options to GTSV_NONE before passing to
8921         trim_dictionary().  Removed `lv' reference.  Sets vfm_source
8922         instead of read_active_file and cancel_input_pgm.
8923         (cmd_save_internal) Initializes options before passing to
8924         trim_dictionary().  Local var `nval' removed.
8925         (dict_delete_run) Comment fixes.
8926         (trim_dictionary) Comment fixes.  Disallows scratch variables if
8927         GTSV_OPT_SAVE set in options.
8928         (read_from_get) Renamed get_source_read.
8929         (cancel_get) Renamed get_source_destroy_source.
8930         (glob var get_source) New var.
8931
8932         * inpt-pgm.c: (cmd_input_program) Sets vfm_source instead of
8933         read_active_file and cancel_input_pgm.
8934         (read_from_input_program) Renamed input_program_source_read.
8935         Simplified debug output.
8936         (cancel_input_program) Renamed
8937         input_program_source_destroy_source.
8938         (glob var input_program_source) New var.
8939
8940         * loop.c: (loop_1_trns_proc) Simplified debug output.
8941
8942         * main.c: (dump_token) Made eof output more explicit.
8943
8944         * sfm-read.c: (read_variables, dump_dictionary) Removed `lv'
8945         references.
8946
8947         * sort.c: (cmd_sort_cases) Disallows scratch variables.  Removed
8948         code for always-memory or always-disk cases.  malloc's case-list
8949         based on vfm_source_info.ncases.  Explicit support for
8950         memory_stream via memory_source_cases.
8951         (do_external_sort) Sets vfm_source instead of read_active_file and
8952         cancel_input_pgm.
8953         (allocate_file_handles) The temporary directory permissions are
8954         set to 0700 instead of 0777.
8955         (allocate_cases) Formatting fixes.  Simplified debug output.
8956         (output_record) Compacts the case if necessary before writing it
8957         out.
8958         (close_handle, open_handle_w) Simplified debug output.
8959         (write_initial_runs) Destroys vfm_sink, then sets it to
8960         sort_stream.  Writes records to memory based on
8961         vfm_sink_info.case_size.
8962         (write_to_sort_cases) Renamed sort_stream_write().
8963         (merge) Simplified error handling.  Simplified debug output.
8964         Formatting fixes.
8965         (read_from_external_sort) Renamed sort_stream_read().
8966         Reads records based on vfm_source_info.case_size.
8967         (sort_stream_write) Writes records to memory based on
8968         vfm_sink_info.case_size.
8969         (sort_stream_mode) New function.
8970         (glob var sort_stream) New variable.
8971
8972         * temporary.c: (cmd_temporary) Simplified debug output.
8973         (copy_variable) Removed references to `lv'.
8974
8975         * title.c: (get_title) Simplified debug output.
8976
8977         * var.h: Comment fixes.
8978         (struct get_proc) Removed member `lv'.
8979         (struct variable) Removed member `lv'.  Comment fixes.
8980         (glob vars read_active_file, write_active_file, cancel_input_pgm)
8981         Removed.
8982         (struct case_stream) New.
8983
8984         * vars-atr.c: (discard_variables) Changed cancel_input_pgm,
8985         read_active_file references to use vfm_source.
8986         (init_variable, replace_variable) Removed references to `lv'.
8987
8988         * vfm.c: Comment fixes.
8989         (glob var vfm_source, vfm_sink, vfm_source_info, vfm_sink_info)
8990         New variables.
8991         (static var queue, qh, qt, n_lag) Removed.  All references
8992         removed.
8993         (glob var compaction_necessary, compaction_nval, compaction_case,
8994         paging) New variables.
8995         (record_case) Removed.
8996         (procedure) Comment fixes.  Calls vfm_source->read() instead of
8997         read_active_file().
8998         (lag) Removed.
8999         (prepare_for_writing, arrange_compaction, make_temp_case,
9000         vector_initialization, setup_filter) New function.
9001         (open_active_file) Most of the code moved into the abovementioned
9002         new functions.  Now sets temp_dict to &default_dict if there is no
9003         temporary dictionary, for convenience.  New debug output.
9004         (close_active_file) Deals with changing the sink to the source.
9005         Calls finish_compaction().  Frees compaction_case.  Mostly
9006         rewritten.
9007         (glob vars disk_source_file, disk_sink_file) New vars.
9008         (destroy_active_file, read_from_memory) Removed.
9009         (disk_stream_init, disk_stream_read, disk_stream_write,
9010         disk_stream_mode, disk_stream_destroy_source,
9011         disk_stream_destroy_sink) New functions.
9012         (glob var vfm_disk_stream) New var.
9013         (glob vars memory_source_cases, memory_sink_cases,
9014         memory_sink_iter, memory_sink_max_cases) New vars.
9015         (memory_stream_init, memory_stream_read, memory_stream_write,
9016         memory_stream_mode, memory_stream_destroy_source,
9017         memory_stream_destroy_sink) New functions.
9018         (glob var vfm_memory_stream) New var.
9019         (write_case) Local var `i' renamed `cur_trns'; local var `retval'
9020         named `more_cases'.  Simplified debug output.  Otherwise mostly
9021         rewritten.
9022         (record_case) Moved into the stream drivers.  Removed.
9023         (transform) Removed (was dead code).
9024         (SPLIT_FILE_procfunc) s/vfm_replacement/vfm_sink_info/.  In the
9025         common case that the splits don't change, we don't need to copy
9026         the case into prev_case again--pointless.
9027         (compact_case) New function.
9028         (finish_compaction) New function.
9029
9030         * vfmP.h: Comment fixes.
9031         (DEV_* enum series) Removed. 
9032         (struct storage) Renamed `stream_info'.  Removed variant record.
9033         Removed `device' member.
9034
9035         * debug-print.h: New file.
9036         
9037 Sun Jun  8 01:12:38 1997  Ben Pfaff  <blp@gnu.org>
9038
9039         * autorecode.c: Turned off debugging.
9040
9041         * data-list.c: (destroy_dls) Closes the associated file handle.
9042
9043         * descript.q: (custom_variables) Added PV_NO_SCRATCH to
9044         parse_variables() options.
9045
9046         * dfm.c: (open_file_r) Removed gratuituous argument to msg() call.
9047
9048         * display.c: (display_variables) Really fixed null cell bug.
9049
9050         * file-handle.q: (fh_close_handle) Changed debugging message.
9051
9052         * frequencies.q: (custom_variables) Added PV_NO_SCRATCH to
9053         parse_variables() options.
9054
9055         * list.q: Added PV_NO_SCRATCH in q2c varlist options.
9056         (cmd_list) Fails if no variables specified.
9057         (determine_layout) Writes blank lines manually.
9058
9059         * loop.c: (loop_1_trns_proc) Made debugging code only print
9060         messages if debugging.
9061
9062         * q2c.c: (dump_subcommand) Appends sbc->message to SBC_VARLIST
9063         parse_variables() arguments.
9064         (main) Parses optional parenthesized options to varlist
9065         subcommands into sbc->message.
9066
9067         * sfm-read.c: Format fix.
9068
9069         * var.h: (FV_*) New enum series.
9070         (PV_*) New enum PV_NO_SCRATCH.
9071
9072         * vars-prs.c: (find_var) Removed.
9073         (fill_all_vars) Takes FV_* enum instead of boolean third
9074         argument.  Rewritten to deal with scratch as well as system
9075         variables.
9076         (parse_variables) Error message on scratch variable if
9077         PV_NO_SCRATCH set.
9078
9079         * vfm.c: (static var virt_begin_func) New var.
9080         (procedure) Sets up virt_begin_func.
9081         (SPLIT_FILE_procfunc) For the first case, calls virt_begin_func()
9082         after dump_splits().  For succeeding groups changes, calls
9083         virt_begin_func() instead of begin_func().      
9084
9085 Fri Jun  6 22:42:23 1997  Ben Pfaff  <blp@gnu.org>
9086
9087         * count.c, data-out.c, file-handle.q, list.q, loop.c: Turned off
9088         debugging.
9089
9090         * dfm.c: Added some debugging messages, disabled by default.
9091         (open_file_r) Fixed error message.
9092         (read_record) On eof on inline_file, instead of calling
9093         fh_close_handle(), simply jump to eof label like a normal file.
9094         Message fixes.
9095
9096         * display.c: Thin lines between rows for certain kinds of
9097         listing.  Fixed `null cell' bug.
9098
9099         * error.c: (failure) Flush stdout, stderr before failing.
9100
9101         * file-handle.q: (fh_close_handle) Added debugging message.
9102
9103         * frequencies.q: (dump_full) Bottom line extends across entire
9104         table width.  Changed title formatting.
9105         (dump_condensed) Changed title formatting.
9106         (dump_statistics) Fixed title formatting.
9107
9108         * glob.c: (init_glob) Moved initialization of cur_proc out of #if.
9109         Sets default value of set_format.
9110
9111         * list.q: (cmd_list) Calls blank_line() before determine_layout().
9112         Passes write_all_headers() to procedure() as pre-group func.
9113         (write_all_headers) New function.
9114         (determine_layout) Removed calls to write_header().
9115         Calls blank_line() before and after write_fallback_headers().
9116
9117         * recode.c: (recode_trns_free) Only attempts to free head->map if
9118         non-NULL.
9119
9120         * sfm-read.c: (read_variables) Allows `#' at beginning of system
9121         file variable names but gives a warning.  Sets `left' based on
9122         first character being/not being `#'.  On lossage frees dict->var.
9123
9124         * som-high.c: (som_draw_title) Simplified title formatting.
9125
9126         * vfm.c: (dump_splits) Fixed and changed splits formatting.
9127
9128 Thu Jun  5 22:51:15 1997  Ben Pfaff  <blp@gnu.org>
9129
9130         * autorecode.c: (cmd_autorecode) Sets h_trans to NULL at
9131         beginning.  Frees v_src, v_dest on successful exit.  Frees
9132         h_trans[*], h_trans on lossage.
9133         (recode) Frees h_trans[*], h_trans.
9134
9135         * dfm.c: (dfm_close) Formatting change.
9136         (open_inline_file) Now passed a dfm_fhuser_ext to initialize; no
9137         longer allocates its own in inline_file.
9138         (open_file_r) Passes the local dfm_fhuser_ext to
9139         open_inline_file().
9140         (open_file_w) Message fix. 
9141         (read_record) Buffer reallocation strategy changed.  Frees
9142         ext->line even in inline_file to prevent leaks.
9143         (dfm_put_record) Fixed bug where `ext' was cached before the file
9144         was opened and thus it would be NULL when the file really was
9145         open.
9146         (cmd_begin_data) Sets up inline_file basics itself, then calls
9147         open_inline_file() for the dfm_fhuser_ext.  Formatting fix.
9148
9149         * list.q: (write_line) Formatting fix.
9150         (clean_up) Minor strategy change.  Sets proportional font after
9151         finishing cleanup.
9152         (determine_layout) Sets fixed font before writing regular headers,
9153         or after writing fallback headers.
9154
9155         * modify-vars.c: (cmd_modify_vars) Frees variable lists for DROP
9156         and KEEP vars after using them.
9157
9158         * postscript.c: (ps_init_driver) Frees x->family.
9159         (postopen) When loading fonts, free the temporary font name buffer
9160         after using it.
9161         (ps_text_set_font_by_position) Free temporary font name buffer
9162         after using it.
9163         (text) Fixed code that calculated `lig' so that `lig' always gets
9164         initialized.  Formatting fix.
9165
9166         * som-low.c: (get_cell_size, som_get_table_size) `prop_height' ->
9167         `font_height'.
9168         [GLOBAL_DEBUGGIGN] (check_table) Use arena_alloc() to allocate
9169         cells, not xmalloc(), so that the cells will get destroyed
9170         automatically.
9171
9172         * sysfile-info.c: (cmd_sysfile_info) Frees the dictionary after
9173         using it.
9174
9175 Tue Jun  3 23:33:22 1997  Ben Pfaff  <blp@gnu.org>
9176
9177         * ascii.c: (ascii_text_draw) Always sets metrics for strings that
9178         are drawn.
9179
9180         * dfm.c: Comment fix.
9181
9182         * list.q: Comment fixes.  Include somP.h.  Removed static vars
9183         table, n_columns, n_rows, part.  New struct list_ext.  New static
9184         var line_buf.
9185         (n_lines_remaining, n_chars_width, write_line) New functions.
9186         (cmd_list, list_cases) Rewritten.
9187         (begin_row, end_row, flush_table) Removed.
9188         (write_header, clean_up, write_varname, write_fallback_headers,
9189         determine_layout) New functions.
9190
9191         * output.c: (outp_iterate_enabled_drivers) Minor reformat.
9192
9193         * output.h: Comment fix.
9194
9195         * postscript.c: Comment fix.
9196         (struct ps_driver_ext) Removed prop_size, fixed_size members;
9197         added font_size.  All references changed.
9198         (ps_init_driver) Initializes font_size.  Simplified space checking
9199         code.
9200         (static var option_tab[]) Removed prop-size, fixed-size; added
9201         font-size.
9202         (ps_option) Handles font_size.
9203
9204         * som-high.c: Moved prototypes into somP.h.
9205         (som_init_driver) New function.
9206         (som_submit_table) Moved some code into new function
9207         som_init_driver().
9208         (build_target) Moved some code into new function
9209         som_internal_eject_page().
9210         (som_eject_page) Uses som_internal_eject_page().
9211         (som_internal_eject_page) New function.
9212
9213         * som-low.c: Moved prototypes into somP.h.
9214
9215         * som.h: Formatting fixes.
9216
9217         * somP.h: (struct som_driver_ext) Removed em_width;
9218         added prop_em_width, fixed_width.
9219
9220 Mon Jun  2 14:25:25 1997  Ben Pfaff  <blp@gnu.org>
9221
9222         * Makefile.am: Added `localedir' definition.  Added
9223         -DLOCALEDIR="..." to DEFS.  Added -I. to INCLUDES.
9224
9225         * ascii.c: (macro draw_line) Fixed capitalization.
9226
9227         * ascii.c, autorecode.c, cases.c, cmdline.c, command.c, common.c,
9228         compute.c, count.c, data-in.c, data-list.c, data-out.c,
9229         descript.q, dfm.c, display.c, do-if.c, error.c, expr-evl.c,
9230         expr-opt.c, expr-prs.c, file-handle.q, file-type.c, filename.c,
9231         formats.c, frequencies.q, get.c, getline.c, glob.c, groff-font.c,
9232         hash.c, heap.c, include.c, inpt-pgm.c, lexer.c, list.q, loop.c,
9233         main.c, mis-val.c, misc.c, modify-vars.c, numeric.c, output.c,
9234         postscript.c, print.c, q2c.c, recode.c, rename-vars.c, repeat.c,
9235         sample.c, sel-if.c, sfm-read.c, sfm-write.c, sfmP.h, som-frnt.c,
9236         som-high.c, som-low.c, sort.c, split-file.c, sysfile-info.c,
9237         temporary.c, title.c, tokens.h, val-labs.c, var-labs.c,
9238         vars-atr.c, vars-prs.c, vector.c, vfm.c, weight.c: Marked strings
9239         for internationlization.
9240
9241         * glob.c: [HAVE_LOCALE_H] Includes locale.h.
9242
9243 Sun Jun  1 23:31:18 1997  Ben Pfaff  <blp@gnu.org>
9244
9245         * do-if.c, sort.c, val-labs.c: Comment fixes.
9246
9247         * glob.c: (init_glob) Uncommented, updated i18n support.
9248         
9249         * arena.c, ascii.c, data-in.c, descript.q, error.c, expr-evl.c,
9250         expr-opt.c, expr-prs.c, filename.c, frequencies.q, groff-font.c,
9251         output.c, postscript.c, sfm-read.c, som-high.c, vars-prs.c: Made
9252         the declarations of macros taking arguments a lot nicer.
9253
9254 Sun Jun  1 17:22:04 1997  Ben Pfaff  <blp@gnu.org>
9255
9256         * error.h: Removed CE, CW aliases for SE, SW.
9257
9258         * q2c.c: Removed explicit streq() definition since it's duplicated
9259         in str.h.
9260         
9261         * approx.h, error.h, font.h, hash.h, misc.h, output.h, somP.h,
9262         stats.h, str.h, tokens.h: Made the declarations of macros taking
9263         arguments a lot nicer-looking of <pinard@iro.umontreal.ca>.
9264         Comment fixes.
9265
9266 Sun Jun  1 12:02:06 1997  Ben Pfaff  <blp@gnu.org>
9267
9268         * cmdline.c: Comment fixes.
9269         (pick_compat) Changed return type to int.  Now, instead of setting
9270         glob var `compat' to the emulation, returns the emulation.  All
9271         references changed.
9272         (parse_command_line) Added terminating null to end of
9273         `long_options' array definition.
9274         (pre_syntax_message) Fixes.
9275         (usage) Shows the default emulation in the syntax message by
9276         calling pick_compat().
9277
9278         * getline.c: (getl_add_include_dir) Separates paths with
9279         PATH_DELIMITER, not DIR_SEPARATOR.
9280
9281         * glob.c: (init_glob) Fixed references to DEFAULT_VER_PCP40,
9282         DEFAULT_VER_WIN61, DEFAULT_VER_X40.
9283
9284         * output.c: (outp_configure_macro) Make earlier definitions for a
9285         particular key override later ones for the same key.
9286         
9287 Fri May 30 19:40:49 1997  Ben Pfaff  <blp@gnu.org>
9288
9289         * ascii.c: Comment fixes.
9290
9291         * output.c: (outp_get_paper_size)
9292         s/STAT_OUTPUT_INIT_FILE/STAT_OUTPUT_PAPERSIZE_FILE/.
9293         
9294 Sun May 25 22:34:07 1997  Ben Pfaff  <blp@gnu.org>
9295
9296         * ascii.c, postscript.c, sfm-read.c, sfm-write.c, sort.c: Include
9297         <errno.h>.  GNU libc 2 enforces this!
9298
9299         * command.c: (parse_cmd) Fixed problem with `else' clause being
9300         paired with wrong `if'.  Comment fix.
9301
9302 Fri May  9 16:53:52 1997  Ben Pfaff  <blp@gnu.org>
9303
9304         * getline.c: [!HAVE_LIBREADLINE] (read_console) Changed
9305         blp_getline() to getline().
9306
9307         * output.c: (outp_eval_dimension) Changed the fix from last time;
9308         there was no variable `a'.
9309
9310         * q2c.c: (get_line) Fixed boundary condition overrun bug.
9311
9312 Mon May  5 21:58:22 1997  Ben Pfaff  <blp@gnu.org>
9313
9314         * output.c: (outp_evaluate_dimension) Fixed handling of negative
9315         numbers having fractional parts.  Added case of a fraction without
9316         a whole-number part.
9317
9318 Fri May  2 22:08:05 1997  Ben Pfaff  <blp@gnu.org>
9319
9320         * ascii.c: (ascii_text_get_font_position) Removed.
9321
9322         * expr.h, exprP.h: Disabled debugging.
9323
9324         * groff-font.c, postscript.c: Changed `groff' to `Groff' in
9325         several places.
9326
9327         * output.h: (struct outp_class_struct) Removed
9328         text_get_font_position method.  All references deleted.
9329
9330         * postscript.c: Big change here.  Fontmaps were completely
9331         eliminated because of a change in philosophy.  Comment fixes.
9332         (struct ps_fontmap, ps2dit_map, font_family, dit2family_map)
9333         Removed.
9334         (struct ps_driver_ext) `position', `fontmap', `prop_name',
9335         `fixed_name' members removed.  New members `prop_family',
9336         `fixed_family'.  `family' member changed to type char *.
9337         (static var ps_fontmaps) Removed.
9338         () Removed.
9339         (ps_init_driver) Removed obsolete references, updated.
9340         Initializes `translate_x', `translate_y', `scale'.  Doesn't read
9341         fontmap, of course.  Refers to font names through internal_name
9342         rather than subversive means.  Frees proper items.
9343         (static var option_tab[]) Removed `fontmap-file' option; renamed
9344         `fixed-font', `prop-font'.
9345         (ps_option) Corresponds to option_tab[].
9346         (read_fontmap, release_fontmap, ps_to_dit, compare_ps2dit,
9347         hash_ps2dit, compare_dit2family, hash_dit2family, compare_family,
9348         hash_family) Removed.
9349         (postopen) Generates font names from family names.  Gets
9350         PostScript font name properly.  New prologue file comment `!!!'
9351         style.
9352         (ps_open_page) Adds translate_x, translate_y to BP prologue
9353         function; gives SF argument floating-point format.
9354         (ps_text_set_font_by_name) Doesn't try to map PostScript->Groff
9355         font name.  Doesn't change font family.
9356         (ps_text_set_font_by_position) Generates Groff font name from font
9357         family name instead of through table lookup.
9358         (ps_text_set_font_by_family) Renamed `ps_text_set_font_family',
9359         all references changed.  Reduced to simple string assignment.
9360         (ps_get_font_name) Removed.
9361         (ps_get_font_family) Reduced to string return.
9362         (text) Doesn't save `position' since it no longer exists.  Ugly
9363         kluge to save font family--fix soon?
9364         (load_font) Removed PostScript name argument.
9365         
9366 Thu May  1 14:58:59 1997  Ben Pfaff  <blp@gnu.org>
9367
9368         * postscript.c: Comment fix.
9369         (ps_open_page) Puts scale factor in PostScript output.
9370         
9371 Sat Apr 26 11:49:32 1997  Ben Pfaff  <blp@gnu.org>
9372
9373         * Makefile.am: Distcleans q2c.
9374
9375 Wed Apr 23 21:33:48 1997  Ben Pfaff  <blp@gnu.org>
9376
9377         * ascii.c: (delineate) Sets text size even if width is zero.
9378
9379         * command.c: Comment fix.
9380         (static var cmd_table[]) Re-enabled EVALUATE command.
9381         (parse_cmd) Lotsa comment fixes.  Fixed infinite loop in parsing
9382         of comments in script files.  Now more liberal on criteria for
9383         performing a state transition--if *anything* happened correctly,
9384         not just if *everything* happened correctly.
9385
9386         * data-out.c: (convert_F) Comment fix.  Why in the fsck does
9387         Checker segfault on formatting large numbers and why in the fsck
9388         hadn't I noticed this before?
9389
9390         * expr.h, exprP.h: No longer turn off GLOBAL_DEBUGGING.
9391
9392         * list.q: (cmd_list) Commented out the actual output routine
9393         because of various problems.  Probably will abandon the idea of
9394         using the general `crushed tables' for the LIST procedure.
9395
9396         * temporary.c: (restore_dictionary) Sets var_by_name to NULL after
9397         clearing it.  Allocates a new var_by_name dictionary before trying
9398         to add members to it.
9399
9400         * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed argument
9401         `sib'.  Changed type of `node' argument.
9402         [DEBUGGING] (dump_var_tree) Replaced avlwalk() with
9403         avl_walk_inorder().
9404         (clear_variable) Only dumps the var tree if var_by_name non-NULL.
9405         [DEBUGGING] Only deletes the variable from var_by_name if that var
9406         non-NULL.
9407
9408 Fri Apr 18 16:48:41 1997  Ben Pfaff  <blp@gnu.org>
9409
9410         * Makefile.am: Added include files to SOURCES.  Added
9411         frequencies.q to EXTRA_DIST.  Removed include/ from INCLUDES.  Now
9412         includes rules for q2c.  Added `boast' target.
9413
9414 Fri Apr 18 15:42:22 1997  Ben Pfaff  <blp@gnu.org>
9415
9416         * Makefile.am: Maintainer-clean Makefile.in.
9417         
9418         * Makefile.am: Fixed redundant EXTRA_DIST line.
9419
9420         * ascii.c: Comment fixes.
9421         (ascii_line_vert) Fixed overly aggressive range check.
9422
9423         * display.c: Removed dead code.
9424
9425         * list.q: Turn debugging on.
9426         (flush_table) New debug code.
9427
9428         * sfm-read.c: (read_value_labels) malloc's the structure before
9429         trying to assign to its members.
9430
9431         * sfm-write.c: Comment fix.
9432
9433         * som-high.c: (som_submit_table) Sets som.t and som.d on each call
9434         to output_table().
9435         (output_table) No arguments anymore--gets them through `som'
9436         global.  New debug code.  In crushed tables, now sets `htv' as
9437         well as `hv' to avoid bad confusion later.
9438         (dump_crush_page) New debug code.
9439
9440         * som-low.c: (som_dump_crush_page) New debug code.
9441
9442 Thu Mar 27 01:11:29 1997  Ben Pfaff  <blp@gnu.org>
9443
9444         All source files: Broke long lines into multiple lines.
9445         
9446         * ascii.c: (ascii_close_page) Uses host_system var in place of
9447         HOST_SYSTEM constant.
9448
9449         * cmdline.c: (var syntax_message[]) Broke into
9450         pre_syntax_message[] and post_syntax_message[].
9451         (usage) Outputs both parts, separated by driver list.
9452
9453         * error.h: Fixed broken formatting.
9454
9455         * expr-opt.c: (str_search, str_rsearch) New functions.
9456
9457         * misc.c: (blp_getdelim) Removed.  All references changed to
9458         `getdelim'.
9459         (str_search, str_rsearch) Removed.
9460         (memrmem) New function.
9461
9462         * misc.h: (blp_getline) Removed.  All reference changed to
9463         `getline'.
9464
9465         * stat.h: New file.
9466
9467         * filename.c: Includes "stat.h", not <sys/stat.h>.
9468         (blp_getenv) Uses host_system var instead of HOST_SYSTEM constant.
9469
9470         * output.c: (outp_list_classes) Changed output formatting.
9471
9472         * sfm-write.c: (write_header) Uses host_system var instead of
9473         HOST_SYSTEM constant.
9474         (write_rec_7_34) Extracts version numbers from the version string.
9475         Untested.
9476
9477         * sort.c: Includes "stat.h", not <sys/stat.h>.
9478
9479         * str.c: (strcasecmp) Removed.
9480
9481         * title.c: (cmd_document) Uses host_system var instead of
9482         HOST_SYSTEM constant.
9483
9484         * version.c: Generated on-the-fly by the Makefile instead of being
9485         static.
9486
9487         * str.h: Comment fixes.  Doesn't substitute for missing memmove or
9488         memcpy.
9489         [!HAVE_STRNCASECMP] Declares strncasecmp().
9490
9491         * version.h: Removed stray character.  Comment fixes.
9492         (vars host_system, build_system) New vars.
9493
9494 Mon Mar 24 21:47:31 1997  Ben Pfaff  <blp@gnu.org>
9495
9496         * Most source files: Changed formatting of copyright notice; fixed
9497         FSF address; reformatted to better conform to GNU standards;
9498         comment fixes.  Added markups to prevent GNU indent from messing
9499         up my beautiful formatting :-).
9500         
9501         * q2c.c: (get_line) Ignores lines that begin with `/* *INDENT' so
9502         that GNU indent markups can be passed through without problems.
9503
9504 Wed Feb 19 21:30:31 1997  Ben Pfaff  <blp@gnu.org>
9505
9506         * get.c: Turned off debugging.
9507
9508         * glob.c: (init_glob) Turned on save-file compression by default.
9509
9510         * sfm-write.c: (sfm_write_case) Fixed bug which resulted in less
9511         compression than was possible in save files.
9512
9513 Sun Feb 16 20:57:20 1997  Ben Pfaff  <blp@gnu.org>
9514
9515         * data-out.c: (convert_F) Comment fixes.  Debug message fixes.
9516
9517         * frequencies.q: Removed Fiasco extensions.  Updated calculation
9518         algorithms.  Polished output format. 
9519         (struct frq_info_struct) Removed members `max_degree', `min_n',
9520         all references removed.
9521         (macro frq_extensions) Removed.
9522         (static vars min_n, max_degree) Removed, all references removed.
9523         (internal_cmd_frequencies) Doesn't handle extensions.  Doesn't
9524         calculate `min_n', `max_degree'.
9525         (postcalc) Passes new arg to dump_statistics().
9526         (dump_full) Honor NOLABEL option.  Buggy?  Adds variable name
9527         title.
9528         (dump_condensed) Adds variable name title.
9529         (sum_freqs) Removed.
9530         (calc_stats) Updated calculation algorithm.
9531         (dump_statistics) Removed warning for too-few observations.
9532         Changed table formatting.  Adds variable name title if passed new
9533         arg is nonzero.
9534
9535         * output.h: Comment fix.
9536
9537         * recode.c, sample.c, sort.c: Disabled debug code.
9538
9539         * som-frnt.c: (som_set_value, som_set_float, som_set_text)
9540         Improved debug code.
9541
9542         * var.h: (enum series frq_*) Removed Fiasco extensions.
9543
9544 Sat Feb 15 21:26:53 1997  Ben Pfaff  <blp@gnu.org>
9545
9546         * command.c: Added PROCESS IF to command table.
9547
9548         * Lots & lots of places, removed checks for NULLs preceding calls
9549         to free_expression(), which itself checks.
9550
9551         * descript.q: Removed Fiasco extensions.  Removed optimizations
9552         for non-weighted active files.  Implemented some options.
9553         Finished polishing output format.  Comment fixes.  Merged
9554         `descript.g'.
9555         (static vars n_glob_miss_list, n_glob_valid, n_glob_missing,
9556         max_degree, min_n) Removed.
9557         (macro dsc_extensions) Removed.
9558         (struct dsc_info_struct) Removed `min_n' member, all references
9559         fixed.
9560         (internal_cmd_descriptives) Removed calculation of min_n,
9561         max_degree.  Only deals with one `calc' routine instead of two
9562         flavors.
9563         (precalc) Eliminated redundancy.  Updated for changes to
9564         descriptives_proc structure.
9565         (calc) Moved here from `descript.g'.  Rewritten to calculate
9566         statistics via `moments about the mean' rather than by summing,
9567         summing squares, summing cubes, and so on.
9568         (postcalc) Rewritten for new-style statistical calculation.
9569         (display) Removed support for displaying variables across rows.
9570         No longer crushes the descriptives table.  Removed ancient code.
9571         Added display of N, by variable and listwise.
9572
9573         * descript.g: Removed; merged into `descript.q'.
9574
9575         * expr-evl.c: (evaluate_expression) Now returns a double.  For
9576         numeric results, it returns the result as well as storing it in
9577         the passed `value' structure if non-NULL.  For string results it
9578         just returns 0.0 and it must be passed non-NULL.  Many references
9579         to this function were optimized by use of this change, especially
9580         but not exclusively in `compute.c'.
9581
9582         * frequencies.g: Comment fix.
9583
9584         * glob.c: (glob var process_if_expr) New global var.
9585
9586         * postscript.c: (static var option_tab[]) Corrected entry for
9587         `fixed_size'.
9588         (postopen) Sets x->size to x->prop_size.
9589         (ps_text_set_font_by_name) Sets font size as well as typeface for
9590         PROP and FIXED fonts.
9591         
9592         * sel-if.c: (cmd_process_if) New function.
9593
9594         * sfm-write.c: (struct sfm_fhuser_ext) New member `n_cases'.
9595         (sfm_write_dictionary) Sets `n_cases' to 0.
9596         (sfm_write_case) Increments `n_cases'.
9597         (sfm_close) Attempts to seek the system file back to the header
9598         and write the number of cases in its proper slot.
9599
9600         * som-frnt.c: (som_insert_table) Masks off expansion options since
9601         only SOPT_X_NORM seems to work sensibly.
9602
9603         * som-low.c: (get_cell_size) Fixed bug when a table cell was sized
9604         with a `fixed' value of 2.
9605
9606         * sort.c: (cmd_sort_cases) Cancels PROCESS IF.
9607
9608         * sysfile-info.c: (cmd_sysfile_info) Doesn't display more than 10
9609         value labels; uses SOPT_NONE instead of SOPT_X_BOTH.
9610
9611         * var.h: (enum series dsc_*) Removed Fiasco extensions.
9612         (struct descriptives_proc) Removed `miss_noweight'; new members
9613         `X_bar', `M2', `M3', `M4', `min', `max'.
9614
9615         * vars-atr.c: (discard_variables) Cancels PROCESS IF.
9616
9617         * vfm.c: (close_active_file) Cancels PROCESS IF.
9618         (write_case) Doesn't process cases unselected by PROCESS IF.
9619
9620 Fri Feb 14 23:32:58 1997  Ben Pfaff  <blp@gnu.org>
9621
9622         * glob.c: (glob var err) Removed.
9623
9624         * sysfile-info.c: (cmd_sysfile_info) When adjusting table size,
9625         doesn't have to take into account number of value labels since
9626         they're in a subtable anyway.  Also, doesn't display more than 10
9627         value labels since we can't yet break pages in subtables.
9628
9629 Tue Feb  4 15:15:50 1997  Ben Pfaff  <blp@gnu.org>
9630
9631         * som-frnt.c: (som_change_table_size) Simple change for elegance
9632         that shouldn't change behavior.
9633         (som_set_value) Comment fix.
9634
9635         * som-high.c: (som_submit_table) Message fix.
9636
9637 Wed Jan 22 21:54:00 1997  Ben Pfaff  <blp@gnu.org>
9638
9639         * command.c: Added SYSFILE INFO to command table.
9640
9641         * file-handle.q: (fh_handle_filename) New function.
9642
9643         * get.c: (save_trns_proc) Fixed a bug in padding of output data
9644         with spaces.
9645
9646         * main.c: (parse) New return value for command functions, -3.
9647
9648         * misc.h: Comment fix.
9649
9650         * output.h: Comment fixes.
9651         (macro COMPONENTS) Removed.
9652
9653         * postscript.c: (write_text) Modified literal_chars[] so that `('
9654         and ')' are not written to the output in strings as literals.
9655
9656         * sfm-read.c: (sfm_read_dictionary) New argument.
9657         (read_header) New argument.  Sets the information structure's
9658         values from the header information.  
9659         (read_variables) [__CHECKER__] Redefines isalnum()--some sort of
9660         bizarre Checker problem, I guess.
9661         (read_variables) Proper cleanup on lossage.
9662
9663         * sfm.h: (struct sfm_read_info) New struct for use by
9664         sfm_read_dictionary().
9665
9666         * som-frnt.c: (som_create_table) New argument CREATE_FLAGS,
9667         currently used just for tables that can be dynamically resized and
9668         thus have to be allocated with arena_malloc() instead of
9669         arena_alloc().  All references changed.
9670         (som_change_table_size) New function.
9671         (som_insert_table) Bugfix: now inserts `cell', not `c'!
9672
9673         * som-high.c: [GLOBAL_DEBUGGING] (check_table) Moved to som-low.c.
9674         (som_submit_table) [GLOBAL_DEBUGGING] Doesn't call check_table()
9675         any more.
9676
9677         * som-low.c: (draw_cell) Calls draw_table_cell() for SCON_TABLE
9678         cells.
9679         (draw_intersection) Now takes an argument specifying the table in
9680         question.  All references changed.
9681         (draw_table_cell) New function.
9682         (som_get_table_size) [GLOBAL_DEBUGGING] Calls check_table().
9683         (som_get_table_size) Many nice new explanatory comments.
9684         [GLOBAL_DEBUGGING] (check_table) Moved here from som-high.c.
9685
9686         * som.h: New enum series SOM_CREATE_* for use as create flags with
9687         som_create_table().
9688
9689         * str.h: Moved a comment here from TODO.
9690
9691         * sysfile-info.c: New file.  Reference implementation.
9692
9693 Sun Jan 19 14:22:11 1997  Ben Pfaff  <blp@gnu.org>
9694
9695         * command.c: Added RENAME VARIABLES to table of commands.
9696
9697         * data-in.c: (dls_error) Sets `cust_field'.
9698         (parse_N) Message fix.
9699         (parse_day_count) New function.
9700         (to_roman) Never outputs VX as a `short form' of V.
9701         (parse_month) Fixed parsing of Roman numerals.
9702         (parse_trailer) Message fix.
9703         (parse_DATE, parse_ADATE, parse_EDATE, parse_SDATE, parse_JDATE,
9704         parse_QYR, parse_MOYR, parse_WKYR, parse_DTIME) Issue a message if
9705         the date is invalid.
9706         (parse_SDATE) Fixed swapped day, year.
9707         (parse_JDATE) Fixed bug for dates in 1582.
9708         (parse_DTIME) Allows days not between 1 and 31.
9709         (parse_numeric) Makes local copy of f.type for easier usage.
9710         FMT_DOLLAR fixed.
9711
9712         * data-out.c: (convert_F) When outputting as scientific, properly
9713         sets f.type as fp->type.
9714         (insert_commas) Fixed operator precedence problem with setting of
9715         nitems.  Changed strcpy to memcpy (no null terminator). 
9716         (convert_date) Fixed FMT_JDATE: added 1900 to year.
9717         (convert_CCx) Essentially rewritten, but now it works.
9718
9719         * display.c: (cmd_display) Added DISPLAY FILE LABEL (undocumented
9720         feature of Fiasco).
9721         (display_documents) Implemented.
9722
9723         * error.c: (glob var cust_field) New var.
9724         (vmsg) Displays cust_field as part of message classes DE and DW.
9725
9726         * formats.c: (debug_print) Fixed to compile under updated
9727         dictionary format.
9728
9729         * get.c: (cmd_get, cmd_save_internal) Close file handle on
9730         failure.
9731
9732         * misc.c: (parse_format_specifier) Formatting fix.
9733
9734         * modify-vars.c: (struct var_modification) Renamed `n_reorder' as
9735         `n_rename' for clarity.
9736         (cmd_modify_vars) Initializes `forward' and `positional' at
9737         appropriate times.  Frees lists of vars to rename on failure.
9738         Comment fix.  Frees memory on success.  
9739         (rearrange_dict) Simplified `for' loop condition.
9740
9741         * rename-vars.c: New file (reference implementation).
9742         
9743         * set.q: (internal_cmd_set) Fixed `emu' test condition.
9744
9745         * sfm-read.c: (read_header) File label is created only if file
9746         label in file is not blank.
9747         (read_variables) Initializes `dict' local variable.
9748         (read_documents) Proper behavior on lossage.
9749
9750         * sfm-write.c: (write_header) Doesn't blank out the file label
9751         (why was this here to begin with?!)
9752
9753         * temporary.c: (save_dictionary) File label is copied only if
9754         non-NULL.  Doesn't try to xstrdup() dictionary documents.
9755         Adapted so as to not irritate Checker.
9756         (free_dictionary) Only destroys var_by_name if non-NULL.
9757
9758         * title.c: (cmd_file_label) Doesn't skip FILE, LABEL tokens.
9759         (cmd_document) Doesn't skip DOCUMENT token.  Adds some header
9760         lines to the document, indents the document.  Also, it works now.
9761         (add_document_line) New function.
9762
9763         * var.h: (struct dictionary) Reordering.
9764
9765         * vars-prs.c: (parse_variables) On lossage, only local_free()'s
9766         bits if it was allocated to begin with.
9767
9768 Thu Jan 16 13:08:57 1997  Ben Pfaff  <blp@gnu.org>
9769
9770         * command.c: Added MODIFY VARS to list of commands.
9771
9772         * configure.in: Updated custom macros for autoconf 2.12.  Removed
9773         mmap reference; fixed termcap library reference.
9774
9775         * display.c: (display_variables) Fixed a few bugs although it's
9776         still not well written.
9777
9778         * error.c: [!__CHECKER__] (chkr_disp_call_chain) New function.
9779         (induce_segfault) Calls chkr_disp_call_chain() instead of
9780         inducing an actual SIGSEGV.
9781
9782         * expr-opt.c: (evaluate_tree) Swapped order of arguments to
9783         str_search() and str_rsearch().  Fixed tests for matches on
9784         OP_INDEX and OP_RINDEX.
9785
9786         * filename.c: (good_getcwd) Removed as the new libc for Checker
9787         doesn't contain this bug, apparently.
9788
9789         * misc.c: (str_search, str_rsearch) Changed order of arguments for
9790         consistency with GNU memmem.
9791         (blp_getdelim) Changed `len' from `int' to `size_t'.
9792
9793         * modify-vars.c: Reference implementation.
9794
9795         * som-frnt.c: (zero_length) New global var.
9796         (som_create_table) Message fix.
9797
9798         * som.h: Added gcc attributions to som_set_text(),
9799         som_output_text() prototypes.  blank_line() refers to
9800         zero_length[] instead of a literal null string to suppress gcc
9801         warnings.
9802
9803         * sort.c: (do_external_sort) Fixed fencepost error on lossage.
9804         (allocate_cases) Decrements x_max so the last element of x[] can
9805         be used by the algorithm.
9806
9807         * var.h: Changed minor details of `variable' declaration.  
9808         (struct modify_vars_proc) New struct.
9809         (struct variable) Added field p.mfv.
9810
9811         * vars-atr.c: Comment fix.
9812
9813         * vars-prs.c: (fill_all_vars) More optimal implementation.
9814
9815         * vfm.c: (dump_splits) Sets the last byte of temp_buf to a null
9816         character, which it shouldn't have to do but printf() seems to
9817         read the null byte even though I supply a maximum length...
9818
9819 Fri Jan 10 20:22:08 1997  Ben Pfaff  <blp@gnu.org>
9820
9821         * command.c: Removed command alias X for QUIT.
9822         (parse_cmd) Fixed comment parsing.
9823
9824         * dfm.c: (struct dfm_fhuser_ext) Fields `len', `size' are now of
9825         type size_t.
9826         (read_record) Fixed references to len, size.
9827         (dfm_get_record) Restructured.
9828
9829         * file-handle.h: (struct file_handle) Field `lrecl' now of type
9830         size_t.
9831
9832         * file-handle.q: (internal_cmd_file_handle) Checks for nonpositive
9833         record length.
9834
9835         * modify-vars.c: New file.  Not complete.
9836         
9837         * set.q: (set_ccx) Fixed operator precedence problem regarding ^
9838         and ==.
9839
9840         * sfm-read.c: (bswap_flt64, read_header, write_variable) Fixed
9841         problems caused by int/size_t differences.
9842
9843         * sort.c: (output_record, merge_once) Cast `size_t's to `int's in
9844         appropriate spots.
9845
9846         * str.c: (strcasecmp) Fixed bug that cropped up when the strings
9847         being compared were of equal length.
9848
9849 Thu Jan  2 19:08:23 1997  Ben Pfaff  <blp@gnu.org>
9850
9851         * command.c: Added DOCUMENT, DROP DOCUMENTS, FILE LABEL.
9852
9853         * lexer.c: (get_dotted_rest_of_line) New function.
9854
9855         * sel-if.c: (cmd_filter) Cannot choose string or scratch variables
9856         as filters.
9857
9858         * sfm-read.c: (sfm_read_dictionary) Calls read_documents() to read
9859         type 6 records.  Frees the dictionary properly.
9860         (read_header) Initializes the dictionary instead of letting
9861         read_variables() do it.  Sets the dictionary file label from the
9862         system file.
9863         (read_documents) New function.
9864
9865         * sfm-write.c: (sfm_write_dictionary) Calls write_documents() to
9866         write type 6 record if appropriate.
9867         (write_header) Writes file label from dictionary.
9868         (write_documents) New function.
9869
9870         * temporary.c: (save_dictionary, restore_dictionary,
9871         free_dictionary) Properly handle new fields in dictionary struct.
9872
9873         * title.c: (get_title) Returns after failure().
9874         (cmd_file_label, cmd_document, cmd_drop_documents) New functions
9875         for new commands FILE LABEL, DOCUMENT, DROP DOCUMENTS.  Untested.
9876
9877         * var.h: (struct dictionary) New fields `label', `n_documents',
9878         `documents'.
9879
9880 Wed Jan  1 22:08:10 1997  Ben Pfaff  <blp@gnu.org>
9881
9882         * command.c: Added FILTER to list of commands.
9883
9884         * frequencies.g: [WEIGHTING] Removed test for weighting!=-1 since
9885         it's always true.
9886
9887         * get.c: (cmd_save_internal) Removed weighting code since it's now
9888         handled by sfm-write.c.  Properly commented out debug code.
9889
9890         * glob.c: (glob var weighting) Removed.
9891
9892         * sel-if.c: Comment fixes.
9893         (cmd_filter) New function.
9894
9895         * sfm-read.c: (struct sfm_fhuser_ext) New field `weight_index'.
9896         (sfm_read_dictionary) Sets weighting variable direct in the
9897         created dictionary now.  (Apparently we previously didn't support
9898         weighting on GET?)
9899         (read_header) Sets weight_index field in sfm_fhuser_ext from
9900         header read from disk.
9901
9902         * sfm-write.c: (sfm_write_dictionary) Comment fix.
9903         (write_header) Now sets the weighting in the header from the
9904         passed primary dictionary instead of from the sfm_write_info.
9905
9906         * sfm.h: (struct sfm_write_info) Removed field `weight'.
9907
9908         * som-high.c: (dump_crush_table) Fixed a couple of assertions that
9909         broke on boundary conditions.
9910
9911         * var.h: (struct dictionary) New fields `weight_var',
9912         `weight_index', and `filter_var'.
9913         (glob var weighting) Removed.  This is now part of struct
9914         dictionary.  All references changed; the less mechanical changes
9915         are described above.
9916
9917         * vars-atr.c: (find_dict_variable) New function.
9918
9919         * vfm.c: (static var filter_index) New variable.
9920         (open_active_file) Initializes filter_index from default_dict.
9921         (write_case) Calls proc_func() only if the filter variable is
9922         nonzero; this implements FILTER behavior.
9923
9924         * weight.c: (static var weight_varname) Removed.
9925         (cmd_weight) Modified default_dict instead of glob vars.
9926         (update_weighting) Changed the signature to modify a dictionary
9927         instead of glob vars.  Now returns the weighting variable.
9928         (get_weighting_variable) Removed; its function is absorbed by
9929         update_weighting().
9930         (stop_weighting) Operates on a dictionary now.
9931
9932 Wed Jan  1 17:00:59 1997  Ben Pfaff  <blp@gnu.org>
9933
9934         * sort.c: Removed debugging info from messages.
9935         (do_external_sort) Cleans up after itself by deleting the
9936         temporary directory on failure.  (On success it is deleted by the
9937         input program.)
9938         (allocate_cases) Removed debug code.  Added clean up code.
9939         (output_record) Removed debug code.
9940         (merge) Added code to close all the input files that are currently
9941         open.  This is a likely location for bugs, because I'm not sure
9942         about boundary conditions.  Removed an unnecesary heap_delete().
9943         (merge_once) Removed input file "optimization" that in fact
9944         screwed up the rest of the code.  Message and comment fixes.
9945
9946 Sun Dec 29 21:36:48 1996  Ben Pfaff  <blp@gnu.org>
9947
9948         * error.c: [__CHECKER__] (induce_segfault) Flushes output streams.
9949
9950         * heap.c: (heap_delete) New argument.
9951
9952         * sort.c: Finished implementation of external sort.
9953
9954         * vfm.c: (read_from_disk) Returns after a disk error.
9955
9956 Sun Dec 22 23:10:39 1996  Ben Pfaff  <blp@gnu.org>
9957
9958         * sort.c: (static var state) Removed.
9959         (static vars max_handles, tmp_basename, tmp_extname,
9960         huffman_queue) New variables.
9961         (do_external_sort) Moved most code to new functions.
9962         Creates huffman_queue.
9963         (allocate_file_handles, allocate_cases) New functions.
9964         (static vars run_no, run_length, file_index, case_count) New
9965         variables. 
9966         (output_record) Returns success.  Now really writes to the output
9967         file.
9968         (begin_run, end_run) New functions.
9969         (write_initial_runs) Returns success.  Initializes run_no to -1.
9970         Calls begin_run(), end_run() at appropriate times.  Outputs debug
9971         messages.
9972         (write_to_sort_cases) Calls begin_run(), end_run() at appropriate
9973         times.
9974         (merge) New function.
9975
9976         * heap.c, heap.h: New files.  Hopefully in near-final form.
9977
9978 Sat Dec 21 21:51:04 1996  Ben Pfaff  <blp@gnu.org>
9979
9980         * glob.c: Added write_active_file to global vars.
9981
9982         * sort.c: Several new miscellaneous static variables.
9983         (cmd_sort_cases) Big comment fix.
9984         (perform_case_2) Renamed `do_external_sort' and completely
9985         rewritten.
9986         (case_2_proc_func) Removed.
9987         (output_record, write_initial_runs, write_to_sort_cases,
9988         compare_record) New functions.
9989
9990         * vfm.c: [DEBUGGING] (index_to_varname) Excised bit rot.
9991
9992 Tue Dec 17 18:57:59 1996  Ben Pfaff  <blp@gnu.org>
9993
9994         * sort.c: (perform_case_2) Changed the method for allocation of
9995         lots of memory--now allocates one case at a time in hopes that
9996         more cases can be allocated with heavily fragmented memory.
9997
9998         * var.h: (write_active_file) New global var.
9999
10000         * vfm.c: (procedure, close_active_file, write_case,
10001         SPLIT_FILE_procfunc) Now allow beginfunc, procfunc, and endfunc
10002         arguments to procedure() to be NULL.  All references to
10003         procedure() that made use of dummy functions were changed to NULL
10004         functions.
10005         (open_active_file) If write_active_file is non-NULL, the output
10006         device becomes DEV_PGM (a new enum).
10007         (close_active_file) Sets write_active_file to NULL.
10008         (read_from_memory) Comment fix.
10009         (record_case) Calls write_active_file() when the output device is
10010         DEV_PGM.
10011
10012 Sun Dec 15 15:32:16 1996  Ben Pfaff  <blp@gnu.org>
10013
10014         * sort.c: New file.
10015
10016         * autorecode.c: (cmd_autorecode) Fixed parsing of options.
10017         Fixed checking for duplicate varnames.
10018         (recode) xmalloc()'s the transformation instead of arena_alloc()'ing
10019         it.
10020         (autorecode_trns_free) Destroys hash tables for each recoding
10021         specification.
10022         (autorecode_proc_func) Compares NULL to *vpp instead of vpp.
10023
10024         * command.c: Added SORT CASES to cmd_table.
10025         (null_func, null_int_func) Prototyped.
10026
10027         * descript.g: (calc_weight, calc_noweight) Computes own case
10028         number now.
10029         
10030         * frequencies.q: (dump_statistics) Fixed problem with
10031         too-few-cases warning message.
10032
10033         * get.c: (cmd_save_internal) Handles weighting properly.
10034
10035         * hash.c: (hsh_dump) Output format changed.
10036         (force_hsh_insert) Actually works now, prototype changed.
10037
10038         * list.q: (static var case_num) New variable.
10039         (cmd_list) Initializes case_num.
10040         (list_cases) Increments case_num.
10041
10042         * var.h: Added definitions for SORT CASES.  Comment fixes.
10043
10044         * vfm.c: Some definitions moved to new file vfmP.h.  Comment
10045         fixes.  `active' renamed vfm_active, `rep' renamed
10046         vfm_replacement, all references changed.
10047         (procedure) The procfunc no longer receives a case number.  All
10048         references changed.
10049         (write_case) Subtle reordering.
10050         (SPLIT_FILE_procfunc) Counts cases differently.  Slightly less
10051         redundant.
10052
10053         * weight.c: (get_weighting_variable) New function.
10054
10055         * vfmP.h: New file with definitions from vfm.c.
10056
10057 Sat Dec 14 10:35:30 1996  Ben Pfaff  <blp@gnu.org>
10058
10059         * command.c: (FILE_TYPE_okay) Commented out some tests because
10060         they're clumsy and not yet needed.
10061
10062         * var.h: Most *_trns structures moved to their respective source
10063         files.  Some were moved into a new file, do-ifP.h.  Comment fixes.
10064         (union any_trns) Changed to a typedef for trns_header.
10065         (struct input_program_pgm) Removed.
10066
10067         * vars-prs.c: (parse_variables) Only local_free()'s bits if it
10068         was allocated in the first place.
10069
10070 Fri Dec 13 21:30:53 1996  Ben Pfaff  <blp@gnu.org>
10071
10072         * autorecode.c: New file.
10073         
10074         * command.c: Added AUTORECODE to command table; re-enabled SET.
10075
10076         * data-out.c: (convert_F) Handles infinities and NaNs properly.
10077
10078         * error.c: (vmsg) Comment fixes.
10079
10080         * hash.c: Comment fix.
10081         (hashpjw_d) New function.
10082         (hashpjw) Reimplemented as call to more general function
10083         hashpjw_d().
10084         (internal_comparison_fn) Initializes pointers properly.
10085         (hsh_sort) [GLOBAL_DEBUGGING] New debugging code.
10086         (force_hsh_insert, force_hsh_find) New debugging wrapper
10087         functions.
10088
10089         * main.c: (main) Message fix.
10090
10091         * output.c: (outp_read_devices) Message fix.
10092
10093         * set.q: Comment fixes.
10094         (custom_results) Implemented Wnd/X form of subcommand.
10095         (set_routing) New function.
10096         (internal_cmd_set) Implemented ERRORS, MESSAGES.
10097
10098         * settings.h: (SET_ROUTE_*) New enum series.
10099         (set_results) Renamed set_results_file, all references changed.
10100         (set_messages) Removed.
10101         (glob vars set_errors, set_messages, set_results) New vars.
10102
10103         * title.c: (get_title) Remembers to xstrdup() the result of
10104         get_rest_of_line().
10105
10106         * var.h: (arc_item, arc_spec, autorecode_trns) New structures for
10107         use by AUTORECODE.
10108         (union any_trns) New element `arc'.
10109
10110 Fri Dec  6 23:53:47 1996  Ben Pfaff  <blp@gnu.org>
10111
10112         * command.c: (output_line) Removed references to set_screen.
10113
10114         * error.c: (static var terminating) New var.
10115         (hcf) Sets terminating to 1.
10116         (vmsg) If terminating is nonzero, does not attempt to call hcf().
10117         This prevents an infinite loop if an error occurs within hcf().
10118
10119         * expr-evl.c: (evaluate_expression) [__CHECKER__] Replaced case
10120         statement circumlocution with `case 42000' trick.
10121         (evaluate_expression) New support for OP_STR_MIS.
10122
10123         * expr-opt.c: (evaluate_expression) [__CHECKER__] Replaced case
10124         statement circumlocution with `case 42000' trick.
10125         (dump_node) Handles OP_STR_MIS.
10126
10127         * expr-prs.c: (MISSING_func, SYSMIS_func) Rewrote to handle string
10128         variables exceptions.
10129         (parse_function) Message fix.
10130         (ops[]) Added OP_STR_MIS.
10131
10132         * expr.h: Added OP_STR_MIS to OP_* enum.  Comment fixes.
10133
10134         * exprP.h: [__CHECKER__] Removed case statement circumlocution.
10135
10136         * glob.c: Removed set_scrnfile glob var.
10137         (init_glob) set_errorbreak set to 0 by default.
10138
10139         * groff-font.c: Changed included files.
10140         (groff_read_font) Initializes font_arena local var correctly.
10141         (default_font) New function.
10142
10143         * output.c: Comment fixes.
10144         (glob var disabled_devices) New variable.
10145         [GLOBAL_DEBUGGING] (static var iterating_driver_list) New
10146         variable.
10147         [GLOBAL_DEBUGGING] (reentrancy) New function.
10148         [GLOBAL_DEBUGGING] (outp_read_devices, outp_done, find_driver,
10149         outp_iterate_enabled_drivers) Calls to reentrancy().
10150         (destroy_list) New function.
10151         (outp_done) Moved code to destroy_list().
10152         (parse_options) Parses `listing', `screen', `printer' options
10153         internally.
10154         (configure_driver) Sets new `device' member of driver.
10155         (outp_iterate_enabled_drivers, outp_enable_device) New functions.
10156
10157         * output.h: Comment fixes.  New enum series OUTP_DEV_*.
10158         (struct outp_driver_struct) New member `device'.
10159
10160         * postscript.c: (find_encoding_file) Doesn't display its own error
10161         messages.
10162         (default_encoding) New function.
10163         (switch_font) Calls default_encoding() if no encoding can be
10164         found.
10165         (text) Makes up a character metric if none exists for the desired
10166         character.
10167         (load_font) Properly copies a fallback filename.  Calls
10168         default_font() for a font if none at all are known.
10169
10170         * set.q: Comment fixes.  Removed OUTPUT subcommand.
10171         (custom_listing) Calls outp_enable_device() to enable/disable
10172         listing device.
10173         (turn_screen_on) Removed.
10174         (internal_cmd_set) Calls outp_enable_device() to enable/disable
10175         screen, printer devices.
10176
10177         * settings.h: Comment fixes.
10178         (glob vars set_output, set_printer, set_screen, set_scrnfile)
10179         Removed.
10180
10181         * som-high.c: (som_submit_table, som_eject_page) Use
10182         outp_iterate_enabled_drivers() instead of iterating
10183         outp_driver_list directly.
10184
10185 Wed Dec  4 21:34:17 1996  Ben Pfaff  <blp@gnu.org>
10186
10187         * data-in.c: (parse_EDATE, parse_SDATE) New functions.
10188         (parse_string_as_format) Handles new formats.
10189         (parse_numeric) Now handles DOT and PCT formats.
10190
10191         * data-out.c: (convert_E, convert_F, insert_commas) Handle DOT
10192         format now.
10193         (convert_date) Handle EDATE and SDATE formats.
10194         (convert_CCx) Now if there's not room for the currency characters,
10195         converts it as F format if it's positive instead of giving up
10196         quickly.  Also fixed save-and-restore bug with decimal point
10197         characters.  
10198         (convert_format_to_string) Handles new formats.
10199
10200         * misc.c: (formats[]) Added new formats.
10201         (convert_fmt_ItoO) Supports new formats.
10202
10203         * sfm-read.c: (parse_format_spec) Supports new formats.  Better
10204         data checking.  New argument, all references changed.
10205
10206         * sfm-write.c: (write_format_spec) Supports new formats.
10207
10208         * var.h: New formats FMT_DOT, FMT_PCT, FMT_EDATE, FMT_SDATE.
10209         Comment fixes.
10210
10211 Sun Dec  1 17:19:00 1996  Ben Pfaff  <blp@gnu.org>
10212
10213         * cmdline.c: Comment fixes.
10214         (parse_command_line) Changed return type to void.
10215
10216         * data-in.c: (parse_string_as_format) Added FMT_CCA...FMT_CCE to
10217         switch.
10218         (parse_numeric) Handles international numbers (comma as decimal
10219         point).  Some reformatting.
10220
10221         * data-list.c: (parse_free) Default output format is now
10222         set_format instead of hard-coded F8.2.
10223         (read_from_data_list_list) Emits error message on undefined data
10224         only if set_undefined is nonzero.
10225
10226         * data-out.c: (convert_E) Changes decimal point from period to
10227         comma if appropriate.  Restructured.  Better comments.
10228         (convert_F) Changes decimal point from period to comma if
10229         appropriate.
10230         (insert_commas) Major bug with handling of negative values fixed.
10231         Also, inserts periods instead of commas if appropriate.
10232         (convert_CCx) New function.
10233         (convert_format_to_string) Added FMT_CCA...FMT_CCE to switch.
10234         (num_to_string) Changed `.' to set_decimal.
10235
10236         * dfm.c: Comment fixes.
10237         (dfm_close) Frees ext->line even in inline_file.
10238         (open_inline_file) New function.
10239         (open_file_r) When opening the inline file: now properly
10240         recognizes `BEGIN DATA.' line, and calls open_inline_file() to
10241         finish up.
10242         (read_record) Calls fh_close_handle() instead of dfm_close() to
10243         close the inline file.  Makes a copy of the line getl_buf to avoid
10244         interlock problems.
10245         (dfm_get_record) Restructured.  Now checks the return value of
10246         open_file_r().
10247         (cmd_begin_data) Moved open code into open_inline_file().  Relaxed
10248         checking for use of inline file.  No longer tries to close inline
10249         file.
10250
10251         * error.c: (glob var error_already_flagged) New var.
10252         (vmsg) Message change.  Now checks max number of errors/warnings,
10253         acts on it.
10254
10255         * file-handle.q: (fh_handle_name) Now allows closing of
10256         inline_file.
10257         (fh_init_files) Reformatted.
10258
10259         * get.c: (trim_dictionary) Checks SCOMP option instead of COMP.
10260
10261         * getline.c: (getl_include) Fixed bug that popped up when called
10262         when file queue was empty.
10263         (read_console) Resets error_count, warning_count,
10264         error_already_flagged to zero.
10265
10266         * glob.c: Many changes to update list of variables.
10267         (init_compat_dependent) Now this function is called whenever
10268         `compat' changes.  It now sets set_seed only if it hasn't
10269         previously been referenced.  It now calls
10270         lex_init_compat_dependent().
10271
10272         * include.c: (cmd_include_at) Frees temporary buffer instead of
10273         line buffer.  
10274         (cmd_include) Doesn't make copy of include file name.
10275
10276         * lexer.c: Comment fixes.
10277         (init_lex) Moved some code into new function
10278         lex_init_compat_dependent().
10279         (lex_init_compat_dependent) New function.
10280         (hex_val) Simplified.
10281         (preprocess_line) Uses set_endcmd instead of hardcoding `.'.
10282
10283         * main.c: Comment fixes.
10284         (main) Reformatted.
10285
10286         * misc.c: (formats[]) Added FMT_CCA...FMT_CCE.
10287         (check_input_specifier) Disallows FMT_CCA...FMT_CCE.
10288         (convert_fmt_ItoO) Detects FMT_CCA...FMT_CCE.
10289         (setup_randomize) Sets set_seed_used.
10290
10291         * set.q: Comment fixes.
10292         (custom_results) Conditionalizes on `compat'.
10293         (custom_log) Calls custom_journal().
10294         (set_ccx) New function.
10295         (cmd_set) Calls init_compat_dependent() when `compat' changes.
10296         Calls set_ccx() to handle CCA...CCE.  Sets set_grouping
10297         when set_decimal changes.  Range-checks values for MITERATE,
10298         MNEST.  Message fixes.
10299
10300         * settings.h: Comment fixes.
10301         (struct set_cust_currency) New struct.
10302         (set_cc[], set_grouping, set_seed_used) New global vars.
10303
10304         * var.h: (FMT_CCA...FMT_CCE) New output formats.
10305         (FCAT_OUTPUT_ONLY) New FCAT_* constant.
10306
10307 Thu Nov 28 23:14:07 1996  Ben Pfaff  <blp@gnu.org>
10308
10309         * glob.c: Revised variables to correspond to settings.h.
10310         (init_glob) Initializes variables from settings.h properly.
10311
10312         * set.q: Began long-overdue major revision to correspond to new
10313         philosophy.  Most code changed. 
10314
10315         * settings.h: Mostly changed; reorganized, reordered, large new
10316         comment.
10317
10318 Thu Nov 28 19:46:10 1996  Ben Pfaff  <blp@gnu.org>
10319
10320         * get.c: (cmd_save_internal) No longer forces compression off.
10321
10322         * sfm-read.c: (read_compressed_data) If eof is reached when
10323         reading a new instruction octet, only signal error if we're in the
10324         middle of a case.
10325
10326         * sfm-write.c: (COMPRESSION_BIAS) New #define.
10327         (struct sfm_fhuser_ext) New member `end'.
10328         (write_header) Refers to COMPRESSION_BIAS instead of magic 100.0.
10329         (ensure_buf_space) New function.
10330         (sfm_write_case) Reimplemented in order to support compression.
10331         (sfm_close) Writes out the remaining contents of the compression
10332         buffer if any.
10333
10334 Wed Nov 27 23:18:35 1996  Ben Pfaff  <blp@gnu.org>
10335
10336         * command.c: Defined SAVE and XSAVE commands in command table.
10337
10338         * common.h: second_lowest_value is of type flt64, not double.
10339
10340         * file-handle.h: Comment fix.
10341
10342         * get.c: Comment fixes.
10343         (static var `trns') New.
10344         (save_write_case_func, save_trns_proc, save_trns_free, null_func,
10345         cmd_save_internal, cmd_save, cmd_xsave) New functions.
10346         (dict_delete_run) Clears the variables and frees them now.
10347         (trim_dictionary) Sets default for compression.
10348         On KEEP subcommand, frees deleted variables as well as clearing
10349         them.  Finally got the sense of the test for deleting all
10350         variables correct.
10351         [DEBUGGING] (dump_dict_variables) Message fix.
10352
10353         * glob.c: (init_glob) set_compression set to 1 by default.
10354
10355         * list.q: Properly #includes config.h.
10356
10357         * misc.h: New macro REM_RND_UP.
10358
10359         * settings.h: Comment fix.
10360
10361         * sfm-read.c: (structs sysfile_header, sysfile_format,
10362         sysfile_variable; inline function bswap_int32) Moved to new file
10363         sfmP.h.
10364         (corrupt_msg) [__CHECKER__] No longer induces segfault.
10365         (sfm_read_dictionary) Fixed bug caused by failing to initialize
10366         var_by_index.
10367         (read_machine_flt64_info) Fixed some problems caused by confusion
10368         between flt64 and double types.
10369         (read_header) Message fix.
10370         (read_variables) Fixed set of cases in which we byte-swap sv.print
10371         and sv.write.  Fixed confusion of flt64 and double.
10372
10373         * sfm.h: (struct sfm_write_info) New.
10374
10375         * som-high.c: (som_draw_title) Properly frees `s'.
10376
10377         * temporary.c: (save_dictionary) Comment fix.
10378
10379         * var.h: Comment fixes.  New FMT_* enum, FMT_NUMBER_OF_FORMATS.
10380         (struct trns_header) Formatting fix.
10381         (struct save_trns) New.
10382
10383         * vars-atr.c: (discard_variables) Comment fix.
10384
10385         * sfm-write.c: New file, baseline release.
10386
10387         * sfmP.h: New file, baseline release.
10388
10389 Sun Nov 24 14:53:53 1996  Ben Pfaff  <blp@gnu.org>
10390
10391         * cmdline.c: (parse_command_line) `--version' output updated.
10392         (glob var syntax_message[]) Added my e-mail address.
10393
10394         * file-handle.q, lexer.c, vfm.c: Changed many instances of
10395         `illegal' to `invalid'.
10396
10397         * sfm-read.c: (struct sfm_fhuser_ext) New fields used as
10398         uncompression buffer.
10399         (sfm_close) Frees decompression buffer.
10400         (sfm_read_dictionary) Initializes decompression buffer.
10401         (buffer_input, read_compressed_data) New functions.
10402         (sfm_read_case) Restructured; now calls read_compressed_data() to
10403         handle compressed system file data.
10404
10405         * var.h: Comment fix.
10406
10407 Mon Nov 11 15:34:09 1996  Ben Pfaff  <blp@gnu.org>
10408
10409         * dfm.c: (dfm_close) Does not set h->{ext,class} because the
10410         caller handles it.
10411          
10412         * get.c: New comments.  New static var `get_file'.
10413         (cmd_get) Now fully implemented.  Calls discard_variables();
10414         initializes fv and lv for all variables; new debug code; sets
10415         up the dictionary; sets up the input program.
10416         (read_from_get, cancel_get) New functions.
10417
10418         * sfm-read.c: Comment fixes.
10419         (sfm_close) New static function.
10420         (sfm_read_dictionary) Properly sets up the class of the
10421         file_handle.  No longer cares what size the data is in records of
10422         type 7.  Also, on failure, properly cleans up the file_handle and
10423         free()s some stuff.
10424         (read_variables) No longer thinks it knows `nval' of the
10425         dictionary.  Now sets p.get.fv, etc., instead of speculatively
10426         setting fv itself.
10427         (read_value_labels) Fixed off-by-one error in indexing of
10428         var_by_index[].
10429         (sfm_read_case) New function.
10430         (sfm_r_class) New static var.
10431
10432         * var.h: (get_proc) New struct.
10433         (struct variable) New member p.get.
10434
10435 Thu Nov  7 20:52:28 1996  Ben Pfaff  <blp@gnu.org>
10436
10437         * get.c: Removed GTSV_OPT_MAP because of a misinterpretation of
10438         the manual's meaning.
10439         (rename_variables) New function.
10440         (trim_variables) Doesn't try to parse MAP any more.  Removed debug
10441         code.  Now properly reorders the dictionary on the KEEP keyword.
10442
10443         * sfm-read.c: (read_value_labels) Fixed some bugs regarding
10444         garbage collection.
10445
10446         * vars-atr.c: (clear_variable) New argument `dictionary *'.
10447         (rename_variable) New function.
10448         (free_val_lab) Reformatted.
10449
10450 Thu Nov  7 17:29:16 1996  Ben Pfaff  <blp@gnu.org>
10451
10452         * var.h: Reindented entire file.  Comment fixes.
10453         (glob vars var, var_by_name, nvar, N, nval, n_splits, splits)
10454         Removed.
10455         (glob var default_dict) New.
10456         (struct indirect_dictionary) Removed.
10457
10458         * Many other source files were changed to add `default_dict.'
10459         before all references to the dictionary of the active file.
10460         
10461         * vars-atr.c: (make_indirect_dictionary) Removed.
10462
10463         * glob.c: Reindented all variable declarations.  Updated for
10464         changed var.h.  Comment fixes.
10465
10466         * temporary.c: (restore_dictionary, save_dictionary) Simplified
10467         because now we can mainly copy dictionary structs.
10468
10469         * vars-prs.c: (is_dict_varname, parse_dict_variable,
10470         parse_variables) Takes dictionary instead of indirect_dictionary
10471         first argument.
10472         (parse_variables) Instead of calling make_indirect_dictionary,
10473         just sets DICT to &default_dict if DICT is NULL.  Of course, lots
10474         of `*dict.' references had to be changed to `dict->'.  Removed
10475         debug code.
10476
10477 Thu Nov  7 15:48:52 1996  Ben Pfaff  <blp@gnu.org>
10478
10479         * get.c: Added GTSV_OPT_* series of enums.
10480         (trim_dictionary, dict_delete_run) New functions.
10481         [DEBUGGING] (dump_dict_variables) New function.
10482         (cmd_get) Calls trim_dictionary() to get dictionary fully set-up.
10483         [DEBUGGING] Calls dump_dict_variables() to display results.
10484
10485         * glob.c: (cmp_variable) Now a public function declared in var.h.
10486
10487         * sfm-read.c: Turned off debug code.  Comment fixes.
10488         (read_machine_int32_info, read_machine_flt64_info) New functions
10489         to parse type 7 records.
10490         (sfm_read_dictionary) Properly byteswaps several fields now.
10491         Calls read_machine_*_info() to parse type 7 subtypes 3 and 4
10492         records.  [DEBUGGING] Dumps dictionary.
10493         (read_variables) Sets `index' field of variables created properly.
10494         Constructs avl tree of variables in dictionary.  [DEBUGGING] No
10495         longer dumps dictionary.
10496         (read_value_labels) Properly byteswaps fields.  [DEBUGGING] New
10497         debug code.
10498         [DEBUGGING] (dump_dictionary) No longer stubbed out.
10499
10500         * temporary.c: (restore_dictionary) Destroys `var_by_name' glob
10501         var before destroying any variables just to save a little time.
10502
10503         * var.h: (struct variable) Reordered in order to make name[] the
10504         first member; this makes pointers to `variable' pointers to the
10505         variable name, simplifying avl trees, etc.
10506         (struct indirect_dictionary) New struct.
10507
10508         * vars-atr.c: (find_variable) Rewritten for efficiency.
10509         (make_indirect_dictionary, is_dict_varname, parse_dict_variable)
10510         New functions.
10511         (is_varname) Rewritten for efficiency.
10512         (parse_variables) New argument, which is a `dictionary *'.  All
10513         references changed.  This function now reads variable names from
10514         the dictionary passed, or from the default dictionary if NULL.
10515
10516 Tue Nov  5 18:34:59 1996  Ben Pfaff  <blp@gnu.org>
10517
10518         * misc.h: Added new macro DIV_RND_UP to perform integer division,
10519         rounding up.  Changed many references to ROUND_UP to use this
10520         instead.
10521
10522         * sfm-read.c: Includes avl.h.
10523         (corrupt_msg) Induces a segfault under Checker.
10524         (macro assertive_bufread) New.  Many references to bufread() now
10525         use this instead.
10526         (sfm_read_dictionary) Split up into several functions.  Added code
10527         to read dictionary records following the the type 2 records.  Not
10528         quite complete.  New variable `var_by_index'.
10529         (read_header, read_variables) New functions extracted from
10530         sfm_read_dictionary().
10531         (read_value_labels) New function.
10532         (bufread) Checks ferror() if fread() doesn't return the expected
10533         value; if ferror() is zero it's just EOF.
10534         (dump_dictionary) Stubbed out.
10535
10536         * BTW: The source code now exceeds 50000 lines!
10537         
10538 Mon Nov  4 22:03:28 1996  Ben Pfaff  <blp@gnu.org>
10539
10540         * command.c: Added GET to cmd_table[].
10541
10542         * list.q: Removed reference to alloca headers.
10543         (cmd_list) Gave prototype.
10544
10545         * sfm-read.c: Added DEBUGGING comments.
10546         (sfm_read_dictionary) Checks bias correctly.  Sets
10547         dict->var_by_name to NULL.  Calculates long_string_count
10548         correctly.  realloc's dict->var[] array to minimum size.
10549         [DEBUGGING] Calls dump_dictionary.
10550         [DEBUGGING] (dump_dictionary) New function.
10551
10552         * temporary.c: (save_dictionary) Sets var_by_name to NULL.
10553         (restore_dictionary) If the dictionary contains a non-NULL
10554         var_by_name, uses that instead of generating one.
10555         (free_dictionary) Destroys var_by_name.
10556
10557         * var.h: (struct dictionary) Added field `var_by_name'.
10558
10559         * get.c: New file, not complete.
10560
10561 Sun Nov  3 12:24:36 1996  Ben Pfaff  <blp@gnu.org>
10562
10563         * mis-val.c: New enums MV_NOR_*.  New struct num_or_range.
10564         (parse_num_or_range) New function.
10565         (parse_numeric) Reimplemented in order to support LOW THRU <n> and
10566         <n> THRU HIGH missing values.
10567
10568         * output.h: [__GNUC__>1 && __OPTIMIZE__] (width, height) Made
10569         __attribute__((const)).
10570
10571         * q2c.c: (get_token) Merged isdigit || isalpha into isalnum.
10572
10573         * sfm-read.c: Finished reference implementation.
10574
10575         * sfm.h: Includes var.h.
10576
10577         * var.h: Comment fixes.
10578         (struct `variable') Reordered some fields.
10579
10580         * vars-atr.c: (is_num_user_missing) Added support for MISSING_*
10581         constants added previously.
10582
10583 Wed Oct 30 17:13:08 1996  Ben Pfaff  <blp@gnu.org>
10584
10585         * common.h: Comment fixes.  Added declaration of
10586         `second_lowest_value' as variable or macro.  Made `compat_type',
10587         `pgm_state_type' into anonymous enums.
10588
10589         * display.c: Comment fix.
10590
10591         * glob.c: [ENDIAN==UNKNOWN] Added definition for `endian' global
10592         var.
10593         [!defined SECOND_LOWEST_VALUE] Added definition for
10594         `second_lowest_value' global var.
10595         (compat, pgm_state global vars) Changed types to `int'.
10596         (init_glob) Initializes `second_lowest_value'.
10597
10598         * sfm-read.c: Continued work, not complete.
10599
10600         * var.h: Added new MISSING_* constants to handle LOWEST and
10601         HIGHEST.
10602
10603 Sat Oct 26 23:06:06 1996  Ben Pfaff  <blp@gnu.org>
10604
10605         * sfm-read.c: New file, not complete.
10606
10607         * cases.c: (vec_insert) Changed vector expansion algorithm.
10608         (vec_delete) Fixed bug that screwed up deletion sometimes, it was
10609         mucking up the RECODE transformation in particular.
10610         (envector) Harmless change in notation.
10611
10612         dfm is now fairly well tested again.  
10613         * dfm.c: (dfm_get_record) Only returns ext->ptr if ext is
10614         non-NULL--duh.
10615         (cmd_begin_data) if(ext->line) replaced by if(ext && ext->line).
10616
10617         * recode.c: Comment fix.
10618
10619         * sfm.h: Interface should be fairly final now, or at least for a
10620         day or so...
10621
10622         * vfm.c: [DEBUGGING] (index_to_varname) New function.
10623         (open_active_file) [DEBUGGING] Translates ccase indices into
10624         variable names now to make it easier to understand what's really
10625         going on.
10626
10627 Sat Oct 26 20:46:31 1996  Ben Pfaff  <blp@gnu.org>
10628
10629         * data-in.c: Comment fix.
10630
10631         * data-list.c: Includes dfm.h.
10632         (do_reading) Uses new function dfm_push_cust().
10633
10634         * data-out.c: (convert_time, convert_WKDAY, convert_MONTH) Added
10635         `return 1;' at end.
10636
10637         * file-handle.h: Completely changed.  Some parts split off into
10638         new file dfm.h.  Implemented in file-handle.q.
10639         (enum FH_*) Removed.
10640         (struct fh_ext_class) New struct.
10641         (struct file_handle) Retained only these fields: name, norm_fn,
10642         fn, recform, lrecl, mode.  New fields class, ext.
10643         (get_handle_by_name, get_handle_by_filename, parse_file_handle,
10644         close_handle, handle_name) Added `fh_' prefix to name, all
10645         references changed.
10646
10647         * dfm.h: New file, implemented in dfm.c.
10648         (get_record, put_record, fwd_record, bkwd_record, set_record,
10649         get_cur_col) Functions moved from file-handle.h, now prefixed with
10650         `dfm_'.
10651         (dfm_push_cust) New function.
10652
10653         * sfm.h: New file.  Incomplete.
10654
10655         * dfm.c: All functions adjusted/rewritten for new dfm/fhp
10656         interface.  Functions reordered, comments changed.  Not well
10657         tested, probably full of bugs.
10658         (struct dfm_fhuser_ext) New struct.
10659         (dfm_close) New function.
10660         (open_file_r) Pickier about finding `BEGIN DATA.' line.
10661         (open_file_w) User messages changed.
10662         (get_record) Comment fixed.
10663         (read_record) Increments ext->ln even for inline_file.  Calls
10664         dfm_close() for inline_file when `END DATA.' encountered.
10665         (dfm_get_record) Experimental restructuring.
10666         (dfm_push_cust) New function.
10667         (cmd_begin_data) Detects whether the inline file was fully read by
10668         checking whether it is still open; detects whether it was read at
10669         all by checking whether the line number is greater than zero.
10670
10671         * file-handle.q: All functions adjust/rewritten for new dfm/fhp
10672         interface.  Functions reordered, comments changed.  Not well
10673         tested, probably full of bugs.
10674         (init_file_handle) Removed initializers for obsolete fields, added
10675         new fields.
10676         (fh_close_handle) Much simpler, now mainly calls the class
10677         function.
10678         (fh_init_files) Renamed inline file internal filename.
10679
10680         * file-type.c: Includes dfm.h.
10681         (read_from_file_type) Doesn't use dfm internal state anymore.
10682
10683         * inpt-pgm.c, print.c: Include dfm.h.
10684
10685         * recode.c: (internal_cmd_recode) Casts strlen() return value to
10686         int in comparison with other int.
10687
10688         * som-high.c: (build_target) Fixed operator precedence problem in
10689         if statement (& versus ==).
10690
10691 Sat Oct 26 10:39:25 1996  Ben Pfaff  <blp@gnu.org>
10692
10693         * dfm.c: (read_record) Can now read fixed-length records; not
10694         tested.
10695         (put_record) Can now write fixed-length records; not tested.
10696
10697         * file-handle.h: FH_* defines changed to enums.  New enum series
10698         FH_RF_*, FH_MD_*.
10699         (struct file_handle) New members recform, lrecl, mode.
10700
10701         * file-handle.q: Parser changed.
10702         (internal_cmd_file_handle) Added support for new /RECFORM, /MODE,
10703         /LRECL subcommands.  These are compatible with Windows.
10704         (init_file_handle) Initializes recform, mode fields.
10705
10706         * q2c.c: (get_line) When outputting `!' comment lines, now
10707         increments the output file line number so that `#line' directives
10708         are correct.
10709         (make_identifier) New function that converts an arbitrary string
10710         into a valid C identifier.
10711         (dump_vars) Calls make_identifier() in two places in order to
10712         suppress some errors for bad identifiers.
10713         (make_match) Allows TRUE as synonym for YES and FALSE as synonym
10714         for NO.  Allows numbers to be prefixed by underscores to make them
10715         acceptable C identifiers but still to be parsed as numbers by the
10716         Fiasco lexer.
10717
10718 Thu Oct 24 20:13:42 1996  Ben Pfaff  <blp@gnu.org>
10719
10720         * command.c: Re-enabled RECODE, SAMPLE, SELECT IF.
10721         
10722         * dfm.c: Comment fixes. (get_record) Gives error if file handle
10723         was opened for writing.
10724         (open_file_w) New function.
10725         (read_record) Uses strncasecmp if available.  Improved error
10726         messages, comments.
10727         (put_record) New function.
10728
10729         * file-handle.h: Moved function comments into dfm.c and
10730         file-handle.q.  Comment fixes.  Removed declarations of
10731         tilde_expand() and normalize_filename().
10732         (struct file_handle) Changed `open' from boolean to enumerated
10733         field to allow for three states--closed, open for reading, open
10734         for writing--all references changed.
10735
10736         * file-handle.q: Includes filename.h.
10737
10738         * print.c: (CMD_* enums) Renamed PRT_* and moved into var.h; all
10739         references changed.
10740         (alloc_line) Makes allowance for line terminator characters in
10741         calculations.
10742         (print_trns_proc) Now handles OUTFILE, WRITE differences.
10743         (print_space_trns_proc) Handles OUTFILE differences.
10744
10745         * recode.c, sample.c: Comment fixes.
10746
10747         * var.h: (struct print_trns) Changed boolean field `eject' to
10748         bitmapped field `options'; all references changed.  New enums
10749         PRT_* for use with this field.
10750
10751         * exception.h, test-exception.c: Removed.
10752
10753 Thu Oct 24 17:47:14 1996  Ben Pfaff  <blp@gnu.org>
10754
10755         * ascii.c: (delineate) Turned off debug output.
10756
10757         * common.c: [Checker and Linux] (__assert_fail, __eprintf) Moved
10758         to error.c.
10759
10760         * data-in.c: (parse_string_as_format) Sets the entire string value
10761         to spaces, not just the short string part of it.  Is this correct
10762         now? 
10763
10764         * data-out.c: (convert_date) Fixed DATETIME format problems with
10765         decimal places, removed debug code.
10766
10767         * dfm.c: (open_file_r) Fixed bug where an error would occur in the
10768         middle of parsing BEGIN DATA that would cause the lexer to read
10769         from a wild pointer `prog'; now calls new function
10770         preprocess_line() in lexer.c.
10771
10772         * error.c: [__CHECKER__] (hcf) Calls induce_segfault() on improper
10773         termination.
10774         [Checker and Linux] (__assert_fail, _eprintf) Moved from common.c.
10775         Now call induce_segfault() to induce the segfault.
10776         (induce_segfault) New function.
10777
10778         * expr-opt.c: Comment fix.
10779         (parse_sysvar) New function.
10780         (parse_primary) Added system variable support--calls
10781         parse_sysvar().
10782         (global var ops) Added OP_CASENUM operator.
10783
10784         * expr.h: Comment fixes.
10785         (OP_* enum) added OP_CASENUM operator.
10786         (struct casenum_node) New struct.
10787         (union any_union_union) New member `cas' of type `casenum_node'.
10788
10789         * glob.c: (global var last_vfm_invocation) New var.
10790         (init_glob) Initializes last_vfm_invocation.
10791
10792         * lexer.c: (lookahead) Fixed reversed condition on if statement.
10793
10794         * getline.c: (get_line) Split into get_line() and preprocess_line().
10795         (preprocess_line) New function.
10796
10797         * var.h: Declares last_vfm_invocation.
10798
10799         * vfm.c: (procedure) Sets last_vfm_invocation.
10800
10801 Wed Oct 23 21:53:43 1996  Ben Pfaff  <blp@gnu.org>
10802
10803         * command.c: (parse_cmd) Fixed bad assertion related to
10804         lookahead().
10805
10806         * data-in.c: (parse_month) Implemented to parse months according
10807         to full interpretation of standard.
10808         (to_roman) New function.
10809         (parse_wk_delimiter) Bug fix (forgot to skip `WK' in string).
10810         (parse_weekday) Bug fix (forgot to skip all the day name).
10811
10812         * data-list.c: (read_from_data_list_fixed) Fixed bug that screwed
10813         up parsing of multirecord data items.  Also fixed user message.
10814
10815         * data-out.c: Comment fix.
10816         (year2, year4, convert_date, convert_time, convert_WKDAY,
10817         convert_MONTH) New functions to support time & date output.
10818         (convert_format_to_string) Calls new time & date output routines.
10819
10820         * expr-prs.c: (nary_num_func) Found a bug, but didn't fix it yet.
10821
10822         * lexer.c: (lookahead) Noted a previously unnoticed caveat in
10823         comment.
10824
10825         * main.c: [DEBUGGING] (dump_token) Updated to handle getline.h.
10826
10827         * misc.c: (global var formats) Fixed declarations of DATETIME,
10828         TIME, DTIME.
10829
10830         * postscript.c: (text) Fixed a pair of bugs in the reallocation of
10831         the output_char buffer.
10832
10833         * vars-prs.c: (parse_DATA_LIST_vars) Fixed a failure to free
10834         memory bug.  Fixed user messages.
10835
10836 Tue Oct 22 17:27:04 1996  Ben Pfaff  <blp@gnu.org>
10837
10838         * Removed #pragma argsused from lots of places.
10839         
10840         * data-in.c: Implemented zoned decimal and time-date formats.
10841         Untested.  This is a huge chunk of code--maybe 1000 lines and 50
10842         new functions.
10843
10844         * data-out.c: Implemented zoned decimal format.
10845
10846         * expr.h: Moved yrmoda() declaration here from exprP.h.
10847
10848         * misc.c: (global var formats) Minor fixes--added
10849         FCAT_SHIFT_DECIMAL to formats N and Z.
10850         (convert_fmt_ItoO) Added support for format Z.
10851
10852         * som-frnt.c: (som_set_value) Fixed bug regarding string values.
10853
10854 Mon Oct 21 20:39:59 1996  Ben Pfaff  <blp@gnu.org>
10855
10856         * command.c: (parse_cmd) [GLOBAL_DEBUGGING] Inserted call to
10857         som_check_workspace() that is activated between commands.
10858
10859         * data-list.c: (dump_fixed_table, dump_free_table) Finished these
10860         for good, I hope.
10861
10862         * list.q: (begin_row) Changed title expansion style from
10863         SOPT_X_VERT to SOPT_X_SHSP.
10864
10865         * som-frnt.c: Now includes `somP.h'.
10866         (som_push_workspace, som_pop_workspace) New functions that, taken
10867         together, form a solution to the recursive table building problem
10868         mentioned yesterday.  Surrounded every table output routine
10869         throughout the program with calls to these functions.
10870         [GLOBAL_DEBUGGING] (som_check_workspace) New function.
10871         (som_create_table) Checks that there's an active workspace.
10872         (som_destroy_all_tables, som_crush) Removed.
10873
10874         * som-high.c: (global var som_preserve_tables) Removed, all
10875         references deleted.
10876         (som_submit_table) Checks that there's an active workspace.
10877         (dump_columnated_table) Doesn't columnate tables that would have
10878         just one row per column.
10879         (dump_crush_page, som_dump_crush_page) Removed debugging code.
10880         (som_dump_crush_page) Moved row number labels from left side of
10881         tables to right side.
10882         (som_get_table_size) Added support for SOPT_X_SHSP.
10883
10884         * som.h: New cell expansion type SOPT_X_SHSP.
10885
10886         * somP.h: (global vars arena_stack, n_arena_stack, m_arena_stack)
10887         New vars.
10888         (global var curtab_arena) Moved from som-frnt.c.
10889
10890 Sun Oct 20 13:45:28 1996  Ben Pfaff  <blp@gnu.org>
10891
10892         * ascii.c: [GLOBAL_DEBUGGING] (SUPPRESS_WARNINGS) New debug option
10893         that causes bad location warnings to be suppressed.
10894         (delineate) Saves current font when calling draw_text(); fixed
10895         handling of NULLs when backing up.  Also fixed line-wrapping bug.
10896
10897         * command.c: Re-enabled `LEAVE', `NUMERIC', `PRINT', `PRINT EJECT',
10898         `PRINT FORMATS', `PRINT SPACE', `STRING', `TITLE', `WRITE'.
10899
10900         * common.c: Added code to cause assertion failure to dump core
10901         when run under Checker.
10902
10903         * data-list.c: (dump_fixed_table) Fixed some inconsistencies, but
10904         there are still bugs.
10905
10906         * glob.c: (__eprintf) Removed.
10907
10908         * list.q: Inserted som_preserve_tables kluge that prevents tables
10909         from being thrown away due to recursive table building through
10910         som_output_line being called from a transformation during the LIST
10911         procedure invocation.  This is a general problem that must be
10912         solved in a better way since it applies to all procedures in
10913         general.
10914         (begin_row) Changed title options to SOM_X_VERT from SOM_X_BOTH.
10915         (flush_table) Removed SOM_TOPT_PRESERVE from submission options.
10916
10917         * numeric.c: Fixed several errors in the form of msg() calls.
10918
10919         * print.c: Updated for use of som.
10920         (dump_table) Reimplemented.
10921         (print_trns_proc) Calls som_eject_page() instead of eject_page().
10922         Calls som_output_text() instead of outs_line().
10923
10924         * som-frnt.c: (som_destroy_all_tables) Sets som_preserve_tables to
10925         0.
10926         (som_output_text) Function moved from som-low.c.  Interface
10927         changed.
10928
10929         * som-high.c: (som_preserve_tables) New global public variable
10930         declared in som.h.
10931         (som_submit_table) Destroys the tables only if som_preserve_tables
10932         is 0.
10933         (paginate_horizontally) Bugfix: sets som.mpw even if there's only
10934         one subrow per row.  Now labels subrows if there's more than one
10935         subrow per row.
10936         (dump_crush_table) Added wishlist comment.
10937         (som_eject_page) New public function declared in som.h.
10938
10939         * som-low.c: (som_dump_crush_page) Draws row labels if there's
10940         more than one subrow per row.
10941         (som_output_text) Moved to som-frnt.c.
10942
10943         * som.h: (SOM_TOPT_PRESERVE) Removed.
10944
10945         * title.c: (get_title) Changed interface.
10946         (cmd_title) Changed `title' to `outp_title'.
10947         (cmd_subtitle) Changed `subtitle' to `outp_subtitle'.
10948
10949 Sun Oct 20 09:04:15 1996  Ben Pfaff  <blp@gnu.org>
10950
10951         * list.q: (flush_table) Conforms to new partial options in
10952         som_submission_form.
10953
10954         * som-high.c: (paginate_horizontally) Changed form of subrow
10955         number labels.
10956         (build_target) Omits spacing before table if
10957         SOM_TOPT_PARTIAL_OMIT_TOP is selected.
10958         (dump_crush_page) Changed interface.  Only trims bottom rule if
10959         SOM_TOPT_PARTIAL_OMIT_BTM is not selected.
10960         (dump_crush_table) Handles partial tables.
10961         (output_row_label) New function.
10962         (som_dump_crush_page) Emits subrow number labels.  Draws vertical
10963         rule on the right edge of narrow subrows.
10964
10965         * som.h: Changed SOM_SUB_PARTIAL_* series of submission type
10966         constants to a series of SOM_TOPT_PARTIAL_* submission options.
10967         All references updated.
10968
10969 Fri Oct 18 19:46:49 1996  Ben Pfaff  <blp@gnu.org>
10970
10971         * misc.c: Comment fix.
10972
10973         * som-high.c: (examine_table) Treats crushed tables separates for
10974         purpose of determining header size.
10975         (paginate_horizontally) Allots space for line numbers in crushed
10976         tables with lots of subrows per row.  Calculates the `maximum page
10977         width', the width of the widest horizontal page.
10978         (build_target) Removed trim argument; all references changed.
10979         Stricter assertions.  (dump_crush_page) New function.
10980         (dump_crush_table) Reimplemented.
10981
10982         * som-low.c: (som_dump_page) Uses new RULE_ROW &c. constants.
10983         (som_dump_crush_page) Reimplemented, interface changed.
10984
10985         * somP.h: Many many new helper macros for use with crushed tables.
10986         (global var som) Removed `tv', `cum_y' members; all references
10987         removed.  New members `mpw', `digit_space'.
10988
10989 Sun Sep 29 19:37:03 1996  Ben Pfaff  <blp@gnu.org>
10990
10991         * arena.c: (arena_alloc) [!DISCRETE_BLOCKS] Removed `size'
10992         variable, changed to constant 1024.
10993         (arena_ca_strdup) Changed `sizeof(a_string)' to
10994         `sizeof(c_string)'.
10995         (arena_ca_strdup) [!DISCRETE_BLOCKS] Changed bad cast from
10996         `(c_string *)' to `(char *)'; this fixed some offset problems.
10997
10998         * filename.c: (readlink_malloc) Changed initial allocation from
10999         100 bytes to 128.
11000         (good_getcwd) Changed from xmalloc() to local_alloc(); removed
11001         comment.
11002
11003         * postscript.c: (read_fontmap) Fixed leak by changing &owner to
11004         &fm->owner in several places.
11005
11006         * som-high.c: (output_table) Changed interface to rest of world.
11007         (examine_crush_table) Removed.  Crushed tables are re-broken now,
11008         in preparation for rewrite.
11009
11010         * som.h: Comment fix.
11011
11012 Sat Sep 28 21:28:07 1996  Ben Pfaff  <blp@gnu.org>
11013
11014         * ascii.c: (ascii_init_driver) Disposes of x->file.filename and x
11015         itself in the cleanup stage.
11016
11017         * descript.q: (display) At least temporarily, changed the table
11018         format to a crushed table.
11019
11020         * list.q: (begin_row) At least temporarily, added horizontal lines
11021         between cases.
11022
11023         * som-high.c: (examine_crush_table) Sets som.hh to the width of
11024         the horizontal "headers," that is, to the width of the far left
11025         and far right rules.
11026         (justify_pagination) Sets som.th to the width of the widest row
11027         in the crushed table.  Fixed inner loop off-by-one error.
11028
11029         * som-low.c: (som_dump_crush_page) Added code to draw horizontal
11030         rules.
11031
11032         * somP.h: Comment fix.
11033
11034 Fri Sep 27 20:08:39 1996  Ben Pfaff  <blp@gnu.org>
11035
11036         * filename.c: (open_file_ext) Now, doesn't set f->file to NULL
11037         before closing it; also, opens the constructed filename `s'
11038         instead of f->filename.
11039
11040         * postscript.c: Moved initialization of x->loaded, x->prop,
11041         x->fixed, x->current, also the add_encoding() calls, into
11042         postopen().
11043         (preclose) Destroys x->combos; sets x->loaded, x->combos to NULL;
11044         sets x->last_font to NULL; sets x->next_combo to zero.
11045
11046         * som-high.c: (crushed_row_height) Moved definition farther up.
11047         (som_submit_table) Doesn't calculate line width, font size until
11048         after calling open_page(), to accomodate changes to PostScript
11049         driver.
11050         (vert_headers) Removed; equivalent functionality moved to
11051         examine_table(), examine_crush_table().
11052         (justify_pagination) Replaced with different algorithm.
11053         (dump_crush_table) Bugfix that caused tables to fail to be clipped
11054         at the bottom of the page.
11055
11056 Thu Sep 26 22:20:26 1996  Ben Pfaff  <blp@gnu.org>
11057
11058         * command.c: Added cmd_list back into cmd_table.
11059
11060         * freq.c, frequencies.q, repeat.c, list.q, vars-atr.c, vfm.c:
11061         Comment fix: `#define DEBUGGING' --> `#define DEBUGGING 1'.
11062
11063         * list.q: (flush_table) Updated to new som_submission_form format.
11064
11065         * som-frnt.c: Comment fix.
11066
11067         * som-high.c: Changed `#endif' to `#undef EXTERN'.
11068         (output_table) Calls som_get_table_size() directly; handles
11069         crushed tables.
11070         (examine_crush_table) New function; calls vert_headers().
11071         (examine_table) Moved some code into new function, vert_headers().
11072         (justify_pagination) New function.
11073         (dump_plain_table) Removed `static' from `cy'.
11074         (dump_crush_table) New function.
11075
11076         * som-low.c: (som_dump_crush_page) New function.
11077
11078         * som.h: Comment fixes.
11079         (enum SOM_TOPT_CRUSH) New.
11080         (SOM_SUB_PARTIAL_BEG, SOM_SUB_PARTIAL_MID, SOM_SUB_PARTIAL_END)
11081         Temporarily set to zero to make do with LIST procedure.
11082
11083         * somP.h: Re-ordering.
11084
11085 Wed Sep 25 19:36:11 1996  Ben Pfaff  <blp@gnu.org>
11086
11087         * som.c: Split into som-frnt.c, som-high.c, som-low.c.
11088
11089         * somP.h: New file for use by som-high.c, som-low.c.
11090
11091         * q2c.c: Added definition for VME.
11092         (get_line) Now dumps `!' comment lines to the output file
11093         verbatim.
11094
11095         * crosstabs.q, descript.q, file-handle.q, frequencies.q, list.q,
11096         set.q: Changed format of `!' comment lines.
11097
11098 Tue Sep 24 18:39:09 1996  Ben Pfaff  <blp@gnu.org>
11099
11100         * All source files: Added copyright notice.
11101
11102         * common.c: (xmalloc, xrealloc, xstrdup) Cast size_t's to unsigned
11103         longs in msg() calls.
11104
11105         * con32s.c: (xmalloc, xrealloc) Updated from common.c.
11106
11107         * q2c.c: (xmalloc, xrealloc, xstrdup) Updated from common.c.
11108
11109 Sat Sep 21 23:16:31 1996  Ben Pfaff  <blp@gnu.org>
11110
11111         * output.c: (outp_read_devices) Changed criteria for
11112         distinguishing different types of lines.
11113
11114 Fri Sep 20 22:52:28 1996  Ben Pfaff  <blp@gnu.org>
11115
11116         * cmdline.c: Changed syntax message.
11117
11118         * filename.c: (good_getcwd) Bug fix (?).
11119         (normalize_filename) [__BORLANDC__] Uses _fullpath() library
11120         function.
11121         (search_path) Appends DIR_SEPARATOR to directory name only if it
11122         does not already end with one.
11123
11124         * glob.c: Checks STAT_PAGER envvar before PAGER.
11125
11126         * output.c: Checks environment variables instead of just local
11127         macros.
11128
11129 Tue Sep 10 21:39:00 1996  Ben Pfaff  <blp@gnu.org>
11130
11131         * arena.c: (arena_destroy) Swatted a subtle bug that cropped up
11132         when the pointer passed to the function was within the arena
11133         itself, so that it couldn't properly be set to NULL _after the
11134         arena was freed_.
11135
11136         * command.c: Re-enabled DISPLAY.
11137
11138         * display.c: Rewritten to handle tables.  Untested.
11139
11140         * filename.c: (search_path) Fixed memory leak.
11141
11142         * frequencies.q: (cmd_frequencies) Frees v_variables.
11143         (postcalc) Calls cleanup_freq_tab() after displaying statistics.
11144         (cleanup_freq_tab) New function to garbage collect.
11145         (dump_full) Elegantized.
11146
11147         * main.c: New comment.
11148
11149         * output.h: New tag for tagged quotes: TAG_NEWLINE.
11150
11151         * postscript.c: Comment fix.
11152         (release_fontmap, free_font_entry) New functions.
11153         (ps_init_driver) Sets free_font_entry() as the freefunc for
11154         hashtable `loaded'.  Calls release_fontmap() when destroying a
11155         driver; also frees the output filename; also frees the
11156         ps_driver_ext block.
11157         (free_ps_encoding) Frees the filename as well as the encoding
11158         block.
11159         (output_encodings) Frees the line buffer and pops the msg-filename
11160         stack.
11161         (read_fontmap) Frees the fontmap filename and the line buffer.
11162         (postopen, preclose) Misc. garbage collection fixes.
11163         (ps_open_page) Destroys the `combos' hash table; sets `last_font'
11164         to NULL; this fixes some output problems.
11165         (text) Handles TAG_NEWLINE.  Untested.
11166
11167         * som.c: (cell_byte_size) Merged SCON_VALUE and SCON_TEXT cases.
11168         (som_set_string) Removed.  All references changed to
11169         `som_set_text'.
11170         (som_set_text) Rewritten.  New interface.  More general.
11171
11172         * som.h: Minor format changes.
11173         (struct som_value_cell) Removed; all references changed to
11174         `som_text_cell'.
11175         (enums SOT_*) Changed.
11176
11177 Mon Sep  9 21:43:13 1996  Ben Pfaff  <blp@gnu.org>
11178
11179         * command.c: Re-enabled SPLIT FILE.
11180
11181         * postscript.c: Comment fix.
11182
11183         * som.h: Added `SOT_NONE'.
11184
11185         * split-file.h: (cmd_split_file) Removed superfluous parenthesis.
11186
11187         * vfm.c: (dump_splits) Reimplemented.
11188
11189 Sat Sep  7 22:35:12 1996  Ben Pfaff  <blp@gnu.org>
11190
11191         * Compiled the project under gcc 2.7.2, which gave some new
11192         warnings.  This led to many additions of casts from unsigned to
11193         int sprinkled throughout the code.
11194         
11195         * arena.c: Many uses of `unsigned' changed to `size_t'.
11196
11197         * command.c: Added END FILE, END REPEAT to command table.
11198         (var cmd_end_repeat) Renamed cmd_end_repeat_p.
11199         (find_command, FILE_TYPE_okay) Not commented out anymore.
11200         (parse_cmd) Calls FILE_TYPE_okay again.
11201         (output_line) Added calls to som_output_text() to put the line
11202         in the output files.
11203
11204         * common.c: (macro VME) Format changes.
11205         (xstrdup) Asserts that its argument is not NULL.
11206         
11207         * data-list.c: Implemented dump_fixed_table().
11208         
11209         * inpt-pgm.c: Formatting changes.  Comment changes.
11210         (end_case_proc) Renamed end_case_trns_proc.
11211         (cmd_end_file, end_file_trns_proc) New functions.
11212
11213         * misc.c: Many uses of `int' and `unsigned' changed to `size_t'.
11214
11215         * misc.h: (local_strdup) New macro corresponding to strdup() but
11216         allocating its data through local_alloc() if possible--that is, if
11217         GNU C is in use.
11218
11219         * postscript.c: Comment changes.
11220         (quote_ps_name, quote_ps_string, output_encodings) New functions.
11221         (output_line, add_string) New macros supporting
11222         output_encodings().
11223         (postopen) Fixed contents of ${fixed-font} and ${prop-font}
11224         substitution vars.  Calls output_encodings() when a line
11225         consisting of `!encodings' is encountered.
11226         (preclose) Some code moved into quote_ps_string().
11227         (dump_line) Changed into macro supporting dump_fancy_line().
11228         (switch_font) Now outputs DSC "%%IncludeResource: font (...)"
11229         command when appropriate.
11230         (write_text) Fixed `literal_char' array (I think it's fixed, at
11231         least.)
11232         (text) Fixed bug when width was zero.  Now exits immediately on
11233         zero height_left.  Now, when executing `goto restart;', checks
11234         that cp<end, so that we don't read beyond end-of-string.  Also,
11235         outputs the correct code to the output file by outputting the code
11236         from the metric instead of the internal metric index.
11237
11238         * repeat.c: (cmd_end_repeat) New function.
11239
11240         * som.c: (var som) `headers' renamed `options' and semantics
11241         changed.  All references changed.
11242         (draw_title) `if(px!=-1 || px!=-1)' --> `if(px!=-1 || py!=-1)'.
11243         (build_target) Only inserts spacing if SOM_TOPT_SPACING not
11244         selected.
11245         (som_text_table) Removed.
11246         (som_output_text) New function.
11247
11248         * som.h: (struct som_submission_form) Removed `header', `reuse',
11249         replaced with bitmapped field `options'.
11250         (SOM_TOPT_*) New enum set for som_submission_form.options.
11251         (SOT_*) New enum set for som_output_text().
11252
11253         * temporary.c: (copy_variable) When copying the var label, only
11254         calls xstrdup() if it's non-NULL.
11255
11256         * var.h: (enum type `vartype') Removed; all references changed to
11257         `int'.
11258
11259         * vars-atr.c: (init_variable) Changed local var `nbytes' from
11260         `int' to `size_t'.
11261
11262 Thu Sep  5 22:05:56 1996  Ben Pfaff  <blp@gnu.org>
11263
11264         * font.h: Comment changes.
11265
11266         * groff-font.c: (groff_read_font) Initializes `name' field to
11267         NULL.  Handles `encoding' field.
11268
11269         * hash.c: (hsh_dump) [GLOBAL_DEBUGGING] Output formatting changes.
11270
11271         * postscript.c: (struct font_entry) Removed `position' field.
11272         (struct ps_font_combo) New struct.
11273         (struct ps_driver_ext) Removed field `next_position'.  New fields
11274         `combos', `next_combo'.  `last_font' field changed from
11275         `font_entry *' to `ps_font_combo *'.
11276         (ps_init_driver) Reformatted; handles new fields.  When
11277         OPO_AUTO_ENCODE is set, adds the two default fonts' encodings to
11278         the encoding list.
11279         (get_encoding, find_encoding_file) New functions.
11280         (add_encoding) Some code moved out into find_encoding_file().
11281         (postopen) Changed value for ${title}.
11282         (preclose) Sets `loaded' field to NULL after destroying the hash
11283         table.
11284         (ps_open_page) Added comment.  Inits the `combos' and `next_combo'
11285         fields.
11286         (ps_text_set_font_by_position) Figures out the current family if
11287         not known.
11288         (compare_ps_combo, hash_ps_combo, free_ps_combo) New functions.
11289         (switch_font) Implemented.
11290         (write_text) Calls switch_font() more often.  Format changes.
11291         #undefs its macros after they're no longer useful.
11292         (text) Changed `continue' at one point to a jump to the top of the
11293         loop because we don't want `separate' reset to 0 at that point.
11294         (load_font) No longer sets `position' in the font_entry created.
11295
11296 Wed Sep  4 21:45:35 1996  Ben Pfaff  <blp@gnu.org>
11297
11298         * font.h: (struct font_desc) New member `encoding', which is not
11299         properly handled yet.
11300
11301         * glob.c: (init_glob) Some new i18n code, which is probably
11302         screwed up.
11303
11304         * output.c: (outp_read_devices, outp_get_paper_size) Changed
11305         `size' local from `int' to `size_t'.
11306
11307         * postscript.c: New driver configuration parameter `auto-encode'.
11308         New enums OPO_AUTO_ENCODE, ODA_COUNT.
11309         (struct font_entry) New member `position'.
11310         (struct ps_driver_ext) Reordered.  New hash table member
11311         `encodings'; new members `next_position', `next_encoding',
11312         `last_font'.  Members `current', `prop', `fixed' changed from type
11313         `font_desc *' to `font_entry *'; all references changed.
11314         (struct ps_encoding) New struct.
11315         (read_ps_encodings, compare_ps_encoding, hash_ps_encoding,
11316         free_ps_encoding, add_encoding) New functions.
11317         (ps_init_driver) Added OPO_AUTO_ENCODE to default
11318         x->output_options.  Initializes new members of ps_driver_ext.
11319         Changed default value for prologue_fn, encoding_fn.  Calls
11320         read_ps_encodings after loading default fonts.
11321         (option_tab[], ps_option) Handle new configuration parameter.
11322         (switch_font) New function.
11323         (struct output_char) `font' member changed from `font_desc *' to
11324         `font_entry *'.  New member `separate'.
11325         (read_fontmap) Changed `size' from `int' to `size_t'.
11326         (output_line, put_number) New macros for write_text().
11327         (write_text) Optimizes text output by consolidating multiple
11328         calls to PostScript `show' operator.
11329         (text) Keeps track of when text arguments can't be consolidated by
11330         write_text(), and marks those spots in the output stream.
11331         (load_font) Sets `position' of the allocated font_entry to -1, cuz
11332         the font hasn't been switched to by switch_font(), which is where
11333         the position is important--the PostScript is what cares about the
11334         position.
11335
11336 Sat Aug 31 23:52:38 1996  Ben Pfaff  <blp@gnu.org>
11337
11338         * hash.c: (hsh_destroy) Ignores NULL argument.  Doesn't try to
11339         call a NULL free_func.
11340         (hsh_rehash) Elegantized.
11341         (hsh_probe) Fix bug that manifested when the table was expanded
11342         and thus had to change location in memory.  Good thing
11343         too--otherwise could have been much more subtle.
11344         (hsh_find) [GLOBAL_DEBUGGING] Not stubbed out anymore.
11345         (hsh_foreach) New function for hash table iteration.
11346
11347         * hash.h: (struct hsh_iterator) New.
11348
11349         * lexer.c: (parse_tagged_quote) Font and family name strings in
11350         tags are now null-terminated.
11351
11352         * output.c: (outp_evaluate_dimension) Fixed over-aggressive unit
11353         parsing.
11354         (internal_get_paper_size, outp_get_paper_size) Fixed; now work as
11355         documented.  (Never before tested?)
11356
11357         * output.h: Comment changes.
11358
11359         * postscript.c: New driver options `optimize-text-size',
11360         `optimize-line-size', `max-fonts-simult'.  New enum set for
11361         specing cached line types.  Comment fixes.
11362         (struct line_form) New struct.
11363         (struct ps_driver_struct) New members `text_opt', `line_opt',
11364         `max_fonts', `lines'.
11365         (ps_init_driver) Initializes new members of ps_driver_struct.
11366         (user option type enum set) New member `nonneg_int_arg'.
11367         (static var option_tab[]) Supports new options.
11368         (ps_option) Handles new options.
11369         (find_ps_file) Made static.  No longer calls hsh_dump().
11370         (ps_get_var) Made static.
11371         (preclose) Dumps out proper DSC trailer.
11372         (ps_open_page) Elegantized.
11373         (ps_close_page) Calls dump_lines() if appropriate.
11374         (ps_line_horz, ps_line_vert, ps_line_intersection) Reduced to
11375         wrappers around line().
11376         (int_2_compare, compare_line, dump_line, dump_fancy_line,
11377         dump_lines, hash_line, free_line, line) New functions for support
11378         of line caching.
11379         (write_text, text) Made static.
11380         (text) Added to font support, not finished.
11381
11382 Thu Aug 29 21:36:41 1996  Ben Pfaff  <blp@gnu.org>
11383
11384         * font.h: (struct font_desc) New members ascent, descent.
11385
11386         * groff-font.c: (groff_read_font) Calculates font ascent and
11387         descent from the ascent and descent of the `d' and `p' characters,
11388         respectively, as per a suggestion on comp.fonts.
11389
11390         * postscript.c: (ps_open_page, ps_close_page, ps_line_horz,
11391         ps_line_vert, ps_line_intersection) Rewritten to deal with changed
11392         prologue.
11393         (write_text) Handles text right-justification and centering (not
11394         full justification).  Still very inefficient.  (One output line
11395         per character?!)
11396         (struct output_char) Added fields for font and font size.
11397         (text) Many bugfixes.
11398
11399 Sat Aug 24 23:26:00 1996  Ben Pfaff  <blp@gnu.org>
11400
11401         * cmdline.c: (usage) Calls outp_list_classes().
11402
11403         * font.h: Comment fix.
11404
11405         * groff-font.c: New exported global var `space_index'.
11406         (groff_init) New function to initialize `space_index'.
11407         (hash_kern) Casts result to unsigned.
11408         (font_name_to_index) Renamed font_char_name_to_index.  All
11409         references changed.  Also, now returns the value of `space_index'
11410         when passed an ASCII space character as an argument.  Fixed
11411         handling of nulls.
11412         (font_get_kern_adjust) Changed i from `int' to `unsigned'.
11413         Handles passed NULL pointers properly.
11414
11415         * lexer.c: (parse_tagged_quote) Comment fix.  Better range
11416         checking.
11417
11418         * output.c: (outp_list_drivers) Removed.  Removed all references.
11419         
11420         * output.h: Comment fixes.
11421
11422         * postscript.c: (ps_open_global) Calls groff_init().
11423         (output_char) New structure.
11424         (write_text) New function.
11425         (text) No longer stubbed out!  Now the output is correct--with a
11426         few exceptions, one of them being that the page has to be held
11427         upside down into a mirror.
11428
11429 Sun Aug 11 21:31:22 1996  Ben Pfaff  <blp@gnu.org>
11430
11431         * font.h: Comment fix.
11432         
11433         * font.c: (name_to_index) Renamed font_name_to_index, made extern.
11434         All callers changed.
11435         (number_to_index) Renamed font_number_to_index, made extern.  All
11436         callers changed.
11437         (font_get_kern_adjust, font_get_char_metrics) New functions.
11438
11439         * output.h: New constant OUTP_T_INTERNAL_DRAW.
11440
11441         * postscript.c: Changed default line width back to 1/2 point.
11442         (ps_line_horz, ps_line_vert, ps_line_intersection) Now lines are
11443         in the center of the space allotted for them, not just a fixed
11444         offset from the edge of the space; this fixes some bugs.
11445         (ps_line_intersection) Now supports all command line styles.
11446         (ps_text_get_size) Bug fix in computation of em width.
11447         (text) New function, the meat behind ps_text_metrics and
11448         ps_text_draw.  Not complete.
11449         (ps_text_metrics, ps_text_draw) Removed the stub taken from
11450         ascii.c; call text().
11451
11452 Sat Aug 10 23:28:17 1996  Ben Pfaff  <blp@gnu.org>
11453
11454         * arena.c: (arena_free) Assert that the argument is non-NULL.
11455         
11456         * groff-font.c: (add_kern) Calls arena_free() for old_kern if and
11457         only if old_kern is non-NULL.
11458
11459         * postscript.c: (ps_init_driver) Changed default line width to 1
11460         point.
11461         (postopen) New prologue variables.
11462         (ps_line_horz, ps_line_vert, ps_line_intersection) Implements some
11463         more of the common line styles properly, but not all.
11464         (ps_text_metrics) Fixed problem with this stubbed out version that
11465         kept it from taking font sizes into account.
11466
11467 Thu Aug  8 22:31:11 1996  Ben Pfaff  <blp@gnu.org>
11468
11469         * arena.c: (arena_malloc) Bug fix.
11470         (arena_dump) [GLOBAL_DEBUGGING] New function.
11471
11472         * ascii.c: Comment fix.
11473         (count_fancy_chars, delineate) Now static functions.
11474         
11475         * filename.c: (interp_vars) Bug fixes.
11476
11477         * font.h: Comment fixes.
11478
11479         * glob.c: (init_glob) Sets set_viewwidth, set_viewlength at
11480         beginning in case we have an error message to display before
11481         initializing the display.
11482
11483         * groff-font.c: Comment fix.  Changed rehash threshold from 2/3
11484         full to 1/2 full.
11485         (groff_read_font) Bug fixes.
11486         (name_to_index) Increments hash.used.  Sets `name' field of hash
11487         entry properly.
11488         (add_kern) Sets kern_max_used after rehashing.  Other bug fixes.
11489
11490         * hash.c: Return type changed.
11491
11492         * postscript.c: Continued development.  Now marks lines on the
11493         paper, but very buggy.
11494
11495 Sat Aug  3 20:50:35 1996  Ben Pfaff  <blp@gnu.org>
11496
11497         * Changed comments in many source files from `/* xxx /* yyy */' to
11498         `/* xxx */ /* yyy */' for cleanliness.
11499
11500         * arena.c: (arena_sd_strdup) New function.
11501         
11502         * ascii.c: (struct ascii_driver_ext) New member `file'.
11503         (ascii_init_driver) Fills out member `file' for initing; uses
11504         close_file_ext for closing drivers.
11505         (ascii_option) Changed %.*s back to %s because the a_string's are
11506         always null-terminated.
11507         (postopen, preclose) New functions.
11508         (ascii_open_page) Uses new style of open_file_ext.
11509         (ascii_option, commit_line_buf, output_lines) Use ext->file.file
11510         instead of this->output.
11511         (__assert_fail) Removed.
11512
11513         * cmdline.c: Changed syntax_message[].
11514
11515         * error.c: #include's <readline/history.h> only if the history
11516         library is available, not if just the readline library is
11517         available.
11518
11519         * filename.c: (expand_line) Removed alloca() support.
11520         (interp_vars) No longer tilde-expands argument.  Limit on output
11521         length removed.
11522         (tilde_expand) Now treats argument as path rather than filename.
11523         [!unix] Now is a no-op function.
11524         (search_path) Better verbose message formatting.
11525         (open_file, close_file) Comment fixes.
11526         (close_file) [!unix] Doesn't bother with pipes.
11527         (open_file_ext) Completely rewritten, interface revamped.
11528         (close_file_ext) New function.
11529
11530         * font.h: Comment changes.
11531
11532         * frequencies.q: Removed AIX alloca support since it doesn't use
11533         alloca.
11534
11535         * hash.c: Comment changes & additions.
11536         (hsh_create) Initializes entire table instead of first M entries.
11537         (hsh_probe) Stupid bug fixed.  Now it works.
11538         (hsh_dump) [GLOBAL_DEBUGGING] New function.
11539
11540         * main.c: (parse) Detects EOF properly in token-eating loop.
11541         Should the STOP token have its value changed to 0?
11542
11543         * misc.c: (blp_getdelim) [HAVE_GETDELIM] Now it's a macro.
11544         (blp_getline) Now it's a macro.
11545
11546         * output.h: (struct outp_driver) Removed members output, filename.
11547         
11548         * output.c: (outp_init) [!NO_POSTSCRIPT] Installs PostScript
11549         drivers in driver table.
11550         (outp_read_devices) Frees buf.  Warns if there are no active
11551         output drivers.
11552         (outp_configure_clear) Sets outp_configure_vec to NULL after
11553         deleting its elements.
11554         (configure_driver, destroy_driver) Removed references to output,
11555         filename members of outp_driver.
11556         (outp_evaluate_dimension, internal_get_paper_size,
11557         outp_get_paper_size) New functions.
11558
11559         * postscript.c: Continued development.  Now links but doesn't make
11560         any marks on the page.  Lotsa bugs I suppose.
11561
11562         * str.c: (strcasecmp) [!HAVE_STRCASECMP] New function.
11563
11564         * str.h: Comment changes.
11565
11566 Sat Jul 27 22:32:38 1996  Ben Pfaff  <blp@gnu.org>
11567
11568         * Removed dependencies on non-nested comments in several files.
11569         Also removed references to (unix || __unix__) in #if's since
11570         prefh.orig makes those two equivalent.
11571         
11572         * ascii.c: (ascii_open_global) Creates ascii_arena.
11573         (ascii_close_global) Destroys ascii_arena.
11574         (ascii_init_driver) Doesn't create ascii_arena.
11575         (ascii_copy_driver) Removed.
11576         (ascii_option) Possible bugfix regarding %s vs. %.*s with a_string's.
11577         (outp_class ascii_class) Removed ascii_copy_driver reference.
11578
11579         * frequencies.q: Now can display all statistics except median.
11580         Still not finished.
11581
11582         * output.c: Handles outp_class.ref_count so output class
11583         destructors are called properly.
11584         (add_class) Sets ref_count to 0.
11585         (configure_driver) Initializes class if ref_count++ is 0.
11586         (destroy_driver) Destructs class if --ref_count is 0.  Frees the
11587         class output file name.
11588         
11589         * output.h: (struct outp_class) Removed copy_driver, inited.
11590         Added ref_count.
11591
11592         * postscript.c: Completely replaced but not finished.
11593         
11594 Tue Jul 23 21:48:36 1996  Ben Pfaff  <blp@gnu.org>
11595
11596         * approx.h: #includes <float.h>.
11597
11598         * arena.h, arena.c: Many functions changed to take an arena **
11599         instead of an arena *, for consistency.  All callers changed.
11600         (arena_alloc) Now creates a new arena if passed *A that is NULL.
11601         (arena_destroy) Sets *A to NULL.
11602         
11603         * ascii.c: (delineate) Implements OUTP_T_VERT correctly.  Removed
11604         assertion that `width' be positive.
11605
11606         * command.c: Removed #if's from cmd_table.
11607         (walk_cmdtable_func) [0] New function (debug code).
11608         (init_cmd_parser) [0] Dumps out cmd_table (debug code).
11609         (parse_cmd) Doesn't return failure for unimplemented commands.
11610
11611         * common.h: (SYSMIS) Changed from DBL_MAX to -DBL_MAX.
11612         (SYSCODE) New constant macro.
11613
11614         * descript.q: Checks for positive n_variables before performing
11615         analysis.
11616
11617         * file-handle.q: (get_handle_by_filename) Bug fix: passes &f to
11618         avl_find instead of &fp as arg 2.
11619
11620         * frequencies.g, frequencies.q: Continued updating; now compiles &
11621         works again, but not complete.
11622
11623         * main.c: Changes to user messages.
11624
11625         * misc.c: (reverse) [0] New function.
11626
11627         * settings.h: Comment removed.  #includes "common.h".
11628
11629         * som.c: (som_set_null) New function.
11630         (som_set_value, som_set_string, som_set_text) More detailing
11631         assertions.
11632         (som_set_float) Implemented function.
11633         (dump_columnated_table) Bug fix regarding page breaks.
11634         (draw_cell) Bug fix regarding text that spilled out of a cell.
11635         (draw_intersection, draw_horz_rule, draw_vert_rule) No longer draw
11636         null lines.
11637         (get_cell_size) Support SCON_EMPTY cells.
11638         (get_table_size) When calculating rules' widths and heights, mask
11639         out SLIN_SPACING bit.  Added SOPT_X_HLTL support.
11640         
11641         * som.h: (som_any_cell) New option SOPT_X_HTLT.  Removed
11642         SOPT_X_SHADE.
11643         (struct som_submission_form) New member `header'; all users
11644         changed.
11645
11646         * val-labs.c: (get_label) User messages changed.
11647
11648         * var.h: Changed FREQUENCIES structures.
11649
11650         * vars-atr.c: (is_num_user_missing, is_str_user_missing) Made
11651         inline.
11652         
11653 Fri Jul 19 19:11:13 1996  Ben Pfaff  <blp@gnu.org>
11654
11655         * approx.h: Definition of EPSILON now depends on system's
11656         DBL_EPSILON.  Removed GNU C specific code.
11657         (cmpapx) Renamed approx_compare.
11658
11659         * frequencies.g, frequencies.q: Continued updating; still doesn't
11660         compile.
11661
11662         * groff-font.c: (name_to_index) Fix bug that kept it from
11663         compiling.
11664
11665         * hash.c, hash.h: Completed work.
11666
11667         * var.h: Changes to freq_tab, frequencies_proc.
11668         
11669 Wed Jul 17 21:23:36 1996  Ben Pfaff  <blp@gnu.org>
11670
11671         New hashing code.
11672         * hash.c, hash.h: New files.  Not completed.
11673         * Makefile.am: Added hash.c to source file list.
11674         * font.h: (struct font_desc) New member kern_size_p.
11675         * groff-font.c: Uses hash.h.
11676         (hashpjw) Moved to hash.c.
11677         (next_prime_power) Rewrote, renamed hsh_next_prime, moved to
11678         hash.c.
11679         (static var hash) New member size_p.
11680         * var.h: Includes hash.h.
11681         (struct freq_tab) Changed AVL_TREE to hash_tab.
11682
11683         * vars-prs.c: Comment, formatting fixes.
11684
11685         * frequencies.g, frequencies.q: Continued updating.  Not yet
11686         working.
11687
11688         * formats.c: Bug fix.
11689
11690 Tue Jul 16 22:10:04 1996  Ben Pfaff  <blp@gnu.org>
11691
11692         Increasing parallelism between DESCRIPTIVES and FREQUENCIES.
11693         * descript.g: Comment fixes.
11694         * descript.q: Comment fixes.  Moved some declarations into var.h.
11695         Made dsc_info a static table.  Updated FIXMEs.
11696         (internal_cmd_descriptives) Beautified.
11697         
11698         * frequencies.q: Started updating into working order.
11699         * frequencies.g: New file analogous to descript.g.
11700         * var.h: Comment fixes.  Added structures for FREQUENCIES.
11701         
11702         * som.c: Removed vestiges of crushing and partial table support.
11703
11704 Sun Jul 14 15:45:31 1996  Ben Pfaff  <blp@gnu.org>
11705
11706         * Many more changes to som.c especially, but these will not be
11707         documented as I have resolved to remove them.  This patchlevel is
11708         being released solely so that I can fall back to it if I decide
11709         that removing the changes is not a good idea.
11710
11711 Sat Jul 13 09:58:44 1996  Ben Pfaff  <blp@gnu.org>
11712
11713         * som.c: (global var som) New member `cum_y'.
11714         (build_target) Properly handles titles for partial tables.
11715         (dump_partial_beg, dump_partial_mid, dump_partial_end)
11716         Merged into single new function dump_partial().  Fixed problem
11717         with titles on partial tables.
11718         (dump_table) Calls dump_partial() for all parts of partial tables.
11719         (dump_page) Criteria for drawing title changed.
11720         
11721 Fri Jul 12 22:03:36 1996  Ben Pfaff  <blp@gnu.org>
11722
11723         * command.c: (cmd_table) Added LIST, WEIGHT.
11724
11725         * command.c: (cmd_remark) No longer frees `s' since it's not
11726         dynamically allocated.
11727         
11728         * data-out.c: (convert_f) Now correctly handles the case where
11729         abs(v->f)<1 but v->f rounds to a value of 1.00 given the specified
11730         number of decimals.
11731         (som_destroy_all_tables) Removed argument.  All callers changed.
11732         (som_vline, som_hline) Argument validity checking corrected.
11733         (som_set_value) Implemented half-heartedly.
11734         (replicate_table) Copies tables piece-by-piece when using Checker.
11735
11736         * som.h: New line style SLIN_1THIN, currently equivalent to
11737         SLIN_0.  New enum set SOM_SUB_*.
11738         (struct som_submission_form) Removed `seq_no'.  Added `type'.
11739         
11740         * list.q: Newly working file; uses partial tables.
11741         
11742         * som.c: (som_reduce_table) Renamed som_set_table_height().
11743         (som_crush) Removed argument `group'.
11744         (global var som) Removed `nt', `seq_no'.  Added `type'.
11745         (som_submit_table) Arguments changed.
11746         (output_table) Removed partial table code.
11747         (build_target) New arg; partial table support added.  All callers
11748         changed.
11749         (dump_plain_table) Removed partial table code.
11750         (dump_partial_beg, dump_partial_mid, dump_partial_end) New functions.
11751         (dump_table) Supports partial tables.
11752         (dump_page) New argument to allow not drawing top and/or bottom
11753         headers.  All callers changed.  Supports partial tables.
11754
11755 Sat Jul  6 22:22:25 1996  Ben Pfaff  <blp@gnu.org>
11756
11757         * data-out.c: Changed `#include <approx.h>' to `#include
11758         "approx.h".
11759         (convert_F) Comment fix.  Now won't print `-.000', etc.
11760
11761         * descript.q: Now Z-scores work, although there appears to
11762         be a bug (which might actually be in data-out.c:convert_F()).
11763         (descriptives_trns_proc, descriptives_trns_free) New functions.
11764         (run_z_pass) Implemented.
11765         
11766         * var.h: Comment fixes.
11767         (dsc_z_score, descriptives_trns) New structs.
11768         (descriptives_trns) Added to any_trns as `dsc'.
11769
11770         * error.c, error.h: New error class, IS (Installation Script
11771         error), used in those instances where the error is in the
11772         installation, but there is a script file or installation file that
11773         can be usefully referred to.
11774         
11775         * output.c: Change many IE classes to IS classes.
11776
11777         * cases.c, command.c, common.c, crosstabs.q, expr-evl.c,
11778         frequencies.q, list.q, vars-prs.c, vfm.c: Removed reference to
11779         HAVE_MALLOC_H because Borland C++ alloca() is broken, so why
11780         include the corresponding header?
11781         
11782         * glob.c: (init_glob) Don't malloc term_buffer under Checker.
11783         Don't bail out if termcap can't be read.
11784
11785         * som.c: (som_destroy_table) Removed.
11786         (som_reduce_table, som_destroy_all_tables) New functions.
11787         (som_crush) New function, not implemented.
11788         
11789         * som.h: New table option STAB_CRUSH.  Comment fix.  New struct
11790         som_submission_form.  Function prototypes revised.
11791
11792         Outputting huge tables (1000s of rows) a few rows at a time
11793         is supported, though untested.  May even break everything.
11794         Actually, the code doesn't even compile right now.
11795         * som.c: (struct som) New fields htv, nt, seq_no.
11796         (som_submit_table) Multiple arguments changed to a single
11797         pointer to struct submission_form.  Only increments subtable_num
11798         if seq_no is zero.  Only destroys table if it's not going to
11799         be reused.
11800         (replicate_table) New function.
11801         (output_table) Comment fix.
11802         (examine_table) Changed inline code to code calling
11803         replicate_table().  Calculates htv.  Supports partial tables.
11804         (draw_title) Removed comment.
11805         (build_target) Only allows for title on first part of partial
11806         tables.
11807         (dump_plain_table) Only resets table chunk number on first part
11808         of partial tables; FIXME: doesn't work quite right.  Supports
11809         partial tables.
11810         (dump_page) Titles only on first part of partial tables.
11811
11812 Fri Jul  5 20:16:19 1996  Ben Pfaff  <blp@gnu.org>
11813
11814         * Thanks to an unreliable IDE hard drive, I have spent the last
11815         day reconstructing my Debian GNU/Linux installation and redoing
11816         the previous day's changes--somehow I managed to save every file
11817         except for output.c and output.h.  So the following changes could
11818         really be considered independent of the output.c, output.h changes
11819         from Jul 4.
11820
11821         * output.h, output.c: Moved the outp_configure_vec global var,
11822         outp_names struct, and enum set OUTP_S_* from output.h to output.c.
11823         outp_configure_vec is now static.
11824         
11825 Thu Jul  4 20:20:24 1996  Ben Pfaff  <blp@gnu.org>
11826
11827         * The entire philosophy behind configuration of the output drivers
11828         changed.  Now there is a termcap-type configuration where drivers
11829         to be read are determined beforehand, rather than parsing the
11830         entire output init file and storing it in memory & deciding what
11831         to actually use later.  Faster & more memory-efficient at the same
11832         time, cool.
11833         
11834         * output.c: Comment fix.  Removed outp_init_drivers global var.
11835         Removed all references to synonyms.  New structure outp_defn.  New
11836         global vars outp_macros, outp_configure_vec.
11837         (search_name, delete_name, add_name, check_configure_vec,
11838         expand_name, find_defn_value) New static functions.
11839         (outp_configure_clear, outp_configure_add, outp_configure_macro,
11840         outp_read_devices) New extern functions.
11841         (outp_init) Much functionality moved into outp_read_devices.
11842         (outp_read_devices) Format of output init file changed; name of
11843         file is `devices' rather than `output' to avoid Makefile
11844         conflicts.
11845         (outp_clear) Renamed outp_done.
11846         (outp_list_classes) Bug fix, cleaned up.
11847         (outp_list_drivers) Not implemented anymore.
11848         (outp_configure_driver) Now a static function; simplified; now
11849         interpolates macros; supports new structure.
11850         (outp_enable_driver, match_synonym) Removed; all references
11851         removed.
11852         (find_driver) First argument removed.
11853         
11854         * output.h: Global var outp_init_drivers removed; new structure
11855         outp_names; new enum set OUTP_S_*; new global var
11856         outp_configure_vec; function prototypes for output.c exports
11857         updated.
11858         
11859         * main.c: (main) Calls outp_read_devices() after parsing the
11860         command line.
11861         
11862         * cmdline.c: (parse_command_line) New option -v --verbose;
11863         --version changed to -V.  --device option changed syntax to just
11864         take a single device name.  Accepts key=value declaration of
11865         output init file macros.  Syntax message updated.
11866
11867         * filename.c: (expand_line) New function.
11868         (interp_environ_vars) Renamed interp_vars; no longer uses
11869         fixed-size buffer.
11870         (blp_getenv) Allows $ARCH and $VER pseudo-environment-vars to be
11871         overridden by real environment vars.
11872         (search_path) Uses verbose_msg() instead of #ifdef'd printf().
11873         * filename.h: interp_environ_vars() renamed interp_vars().
11874         
11875         * error.c, error.h: Added extern variable `verbosity', message
11876         class MM.
11877         
11878         * error.c: (vmsg) Support message class MM.
11879         (verbose_msg) New function.
11880
11881         * descript.q: (generate_z_varname) Bug fix in generation of
11882         Z-score varnames.
11883         (dump_z_table) Bug fix in column headers.
11884         
11885         * ascii.c: (ascii_init_driver) Changed minimum number of lines per
11886         page from 29 to 15.  Don't set a default for ops[OPS_INIT,
11887         OPS_DONE].  Writes the uninit string when the driver is closed.
11888         (ascii_open_page) Write the init string before the first page.
11889         (output_shorts) Form of main loop changed from `while' to `for'.
11890         Bug fix with overstrikes: the character is printed *after* the
11891         backspace.  Eliminated a lot of `& 0xff' modifiers.
11892         (advance_to_left_margin) New function.
11893         (return_carriage, output_lines) Handle left margin.
11894
11895 Thu Jul  4 00:35:59 1996  Ben Pfaff  <blp@gnu.org>
11896
11897         * ascii.c: New option `carriage-return-style'.
11898
11899         * ascii.c: (count_fancy_chars) New function.
11900         (delineate, text_metrics) Use new function; bug fixes regarding
11901         rich text strings.
11902         (text_draw) Bug fix with rich text.
11903         (output_string, output_shorts) Reordered.
11904         (output_shorts) Now handles boxchars and some overstrike font
11905         changes.
11906         (output_char, return_carriage) New functions.
11907         (output_lines) Now handles overstriking and font changes properly;
11908         some code moved to output_shorts.
11909
11910 Tue Jul  2 22:13:23 1996  Ben Pfaff  <blp@gnu.org>
11911
11912         [GLOBAL_DEBUGGING]
11913         * ascii.c: New member `debug' in ascii_driver_ext.
11914         (ascii_init_driver, delineate) Uses new member.
11915
11916         Now you can set a vertical height on writing text.
11917         * ascii.c: (delineate) Keeps track of vertical position.
11918         (text_draw) No longer considers fully justified text an internal
11919         error.
11920         
11921         * output.h: New flag OUTP_T_VERT; other OUTP_T_ values changed.
11922
11923         Tables' titles are drawn; they can have variable height.
11924         * som.c: `som' struct has new member, title_height.
11925         (draw_title) New argument.  Moved within file.  All caller
11926         changed.
11927         (build_target) New argument, amount of space needed for first row.
11928         Calculates height of title, takes that into account.  All callers
11929         changed.
11930         (dump_plain_table, dump_columnated_table) Took calculation of y1,
11931         y2 out of loop.
11932         (dump_columnated_table) [GLOBAL_DEBUGGING] Debugging code
11933         improved.
11934         (dump_columnated_table) Organized for readability.
11935         (dump_page) Makes use of som.title_height.
11936
11937         * som.c: Many comment bug fixes.
11938
11939         * descript.q: (try_name, generate_z_name) Bug fix regarding
11940         generation of Z-score variable names.
11941         * var.h: Removed num from descriptives_proc; all referents removed.
11942
11943 Mon Jul  1 22:13:39 1996  Ben Pfaff  <blp@gnu.org>
11944
11945         * ascii.c: (ascii_line_horz, ascii_line_vert,
11946         ascii_line_intersection) Added debugging code.
11947
11948         Added a descriptive line above each table to describe it.
11949         * command.c: (parse_cmd) Calls som_new_series.
11950         
11951         * som.c: New static vars table_num, subtable_num.  New `som'
11952         member `title'.
11953         (dump_page) New arguments.
11954         (som_submit_table) Handle new variables.
11955         
11956         * som.c, som.h: (som_submit_table) New arguments.  All callers
11957         changed.
11958         (som_new_series) New function.
11959         (build_target) Makes room for extra line.
11960         (draw_title) New function.
11961         (dump_page) Calls draw_title.  Bug fix: doesn't always set
11962         som.ext->cp to 0.
11963         
11964         Columnation of tables support.
11965         * som.h: Deleted fr, lr, ri from som_table.  Reorganized.
11966         
11967         * som.c: Deleted references to fr, lr, ri.
11968         (som_columnate) Bux fix: sets group member of table.
11969         (som_add_options) Function removed.
11970         (dump_table) Split into three functions; extensively reworked.
11971         
11972         * descript.q: (dump_z_table) Better output table formatting; added
11973         title support to correspond to som.h changes.
11974         (display) Title support.
11975
11976         * output.h: Added OUTP_T_NONE.
11977         
11978 Mon Jul  1 13:00:00 1996  Ben Pfaff  <blp@gnu.org>
11979
11980         * descript.q: Improved handling of Z scores; still not perfect.
11981         
11982         * output.h, ascii.c: Added hook for getting em width of current
11983         font.
11984         
11985         * som.c: Uses new em-width hook.  Added debugging code to
11986         several functions.
11987         (som_columnate) New argument.
11988         (som_add_options) Removed.
11989
11990 Jun 29 17:40:47 1996  Ben Pfaff  <blp@gnu.org>
11991
11992         * som.h, som.c, output.c, output.h, ascii.c: Updated to work with
11993         rules as a property of the table instead of as a property of the
11994         cells.
11995         
11996         * ascii.c: Added `header' to table of options.
11997         
11998         * descript.q: Added even shorter statistic names; modified to work
11999         with new som interface.
12000         
12001         * misc.c (blp_getdelim): Bug fix.
12002         
12003         * version.c: includes 'conf.h'.
12004         
12005 ----------------------------------------------------------------------
12006 Local Variables:
12007 mode: change-log
12008 version-control: never
12009 End: