Separate random numbers from other settings because of GSL dependency.
[pspp-builds.git] / src / ChangeLog
1 Sat Dec 10 23:30:19 2005  Ben Pfaff  <blp@gnu.org>
2
3         Separate random numbers from other settings because of GSL
4         dependency.
5
6         * Makefile.am: Add random.c, random.h to sources.
7
8         * glob.c: (init_glob) Call random_init().
9         (done_glob) Call random_done().
10
11         * settings.c: (static var rng) Move to random.c.
12         (done_settings) Move freeing of RNG to random_done().
13         (get_rng) Move to random.c
14         (set_rng) Ditto.
15
16         * random.c: New file.
17
18         * random.h: New file.
19
20 Sat Dec 10 18:13:36 2005  Ben Pfaff  <blp@gnu.org>
21
22         Separate settings and the SET command, for modularity.
23         
24         * Makefile.am: Add settings.c to sources.
25
26         * glob.c: (global variable test_mode) Removed.
27
28         * set.q: Remove all the set_* variables.  Remove a lot of obsolete
29         SPSS/PC+ settings.  Remove the aux_*() routines.  Moved the
30         get_*() functions into settings.c.  Rewrite the settings code and
31         functions to call the new set_*() functions.  Rewrite custom
32         currency parsing.  Write new by-hand cmd_show().
33
34         * esttings.c: New file.  Moved the get_*() functions here from
35         set.q.  Created new set_*() functions to correspond with them.
36         Regularized the names and types of some functions and updated
37         their callers.  Added static, file-scope variables to support the
38         settings.
39
40         * q2c.c: Remove "aux" support, which was only needed by set.q.
41         
42 Sun Nov 27 06:43:46 WST 2005 John Darrington <john@darington.wattle.id.au>
43
44         * data-out.c format.h: Added return value to data_out function.
45
46         * value-labels.c: Fixed bug in val_labs_remove.
47
48 Sat Nov  5 18:37:26 2005  Ben Pfaff  <blp@gnu.org>
49
50         * Makefile.am: Remove devind.c, devind.h from list of source
51         files.
52
53         * devind.c: Removed.
54
55         * devind.h: Removed.
56
57         * list.q: Removed "support" for devind.
58
59         * output.c: Don't add devind class.
60
61 Sat Nov  5 18:21:00 2005  Ben Pfaff  <blp@gnu.org>
62
63         * var.h: (struct variable) Make `init', `reinit' bool values.
64         Rearrange fields.
65
66 Fri Nov  4 19:43:01 2005  Ben Pfaff  <blp@gnu.org>
67
68         * recode.c: Rewrote whole file, as clean-up.
69
70 Fri Nov  4 19:37:50 2005  Ben Pfaff  <blp@gnu.org>
71
72         * pool.c: Don't make alignment exception for x86.
73         (pool_alloc) Return null for 0-size blocks.
74         (pool_alloc_unaligned) New function.
75         (pool_strndup) Removed.  Changed callers to use pool_clone_unaligned().
76         (pool_clone_unaligned) New function.
77         (pool_strdup) Use pool_clone_unaligned().
78
79         * var.h: (enum var_type) Give the NUMERIC, ALPHA enum this name.
80         (struct variable) Use `enum var_type' for `type'.
81
82         * vars-atr.c: (var_type_adj) New function.
83         (var_type_noun) New function.
84
85         * vars-prs: (parse_mixed_vars) Fix freeing code.
86         (parse_mixed_vars_pool) New function.
87
88 Wed Nov  2 21:24:48 2005  Ben Pfaff  <blp@gnu.org>
89
90         * file-handle-def.c: Needed another #include, to avoid missing
91         prototype warning.
92
93         * file-handle.q: (cmd_file_handle) Declarations must precede
94         statements.  Free parse data on success as well as on failure, to
95         avoid memory leak.
96
97         * get.c: (parse_write_command) Destroy dict on success, to avoid
98         memory leak.
99         
100         * data-list.c: (cmd_repeating_data) Fix usage of saw_occurs,
101         saw_length, saw_continued, saw_id, which were boolean but
102         incorrectly treated as bitmaps as result of a previous
103         half-finished cleanup.
104
105         * weight.c: (struct weight_trns) Unused, so removed.
106
107         * Makefile.am: Add range-prs.h to sources.
108
109 Wed Nov  2 21:24:15 2005  Ben Pfaff  <blp@gnu.org>
110
111         DO IF, LOOP cleanup.
112
113         * Makefile.am: Add ctl-stack.c, ctl-stack.h to source files.
114         Reformat source file list to list one file per file, so that
115         patches for future changes will be easier to read.
116
117         * ctl-stack.c, ctl-stack.h: New files.
118
119         * do-if.c: Rewrote whole file.
120
121         * do-ifP.h: Removed.
122
123         * loop.c: Rewrote whole file.
124
125         * glob.c: (global var ctl_stack) Move into ctl-stack.c.
126
127         * temporary.c: (cmd_temporary) Use ctl_stack_is_empty().
128
129         * vfm.c: (open_active_file) Use ctl_stack_clear().
130
131 Wed Nov  2 21:18:13 2005  Ben Pfaff  <blp@gnu.org>
132
133         New pool functions.
134         
135         * pool.c: (pool_create_at_offset) New function.
136         (pool_add_subpool) New function.
137
138         * pool.h: (pool_create_container) New macro.
139         
140         * expressions/parse.c: (expr_parse_pool) New function.
141         
142         * autorecode.c: (recode) Use pool_create_container().
143
144         * count.c: (cmd_count) Ditto.
145
146 Wed Nov  2 19:59:32 2005  Ben Pfaff  <blp@gnu.org>
147
148         Clean up transformations, by getting rid of `struct trns_header',
149         replacing it by `struct transformation' that has a void *
150         `private' member.  Updated all uses of transformations to match,
151         which was a lot of code.  Only major related changes listed below.
152
153         * compute.c: (cmd_if) Use get_proc_func().
154         (cmd_compute) Use get_proc_func().
155         (get_proc_func) New function.
156
157         * glob.c: (global var m_trns) Change type to size_t.
158         (global var n_trns) Ditto.
159         (global var f_trns) Ditto.
160         (global var t_trns) Change type to struct transformation *.
161
162         * var.h: (struct trns_header) Removed.
163         (struct transformation) New.
164         (typedef trns_proc_func) Takes a void * instead of a struct
165         trns_header *.
166         (typedef trns_free_func) Ditto.
167
168         * vfm.c: (execute_transformations) Takes an array of
169         transformations instead of trns_headers.
170         (add_transformation) Change prototype from (trns_header *) to
171         (trns_proc_func *, trns_free_func *, void *).
172         (next_transformation) New function.
173
174 Sat Oct 29 16:25:36 2005  Ben Pfaff  <blp@gnu.org>
175
176         * count.c: Major cleanups.  Rename practically everything.
177         Rewrite much of the code.  Use pools for memory management.  Use
178         the new parse_num_range().
179
180         * mis-val.c: (cmd_missing_values) Use the new parse_num_range().
181         (parse_number) Removed.
182
183         * missing-values.c: (mv_add_num_range) Don't add out-of-order
184         ranges, e.g. where low > high.
185
186         * pool.c: (pool_2nrealloc) New function.
187
188         * range-prs.c: New file.
189         (parse_num_range) New function.
190         (parse_number) New function.
191         
192 Fri Oct 28 22:47:48 2005  Ben Pfaff  <blp@gnu.org>
193
194         Fix up potential overflows in size calculations by replacing
195         instances of pool_alloc(p, x * sizeof *y) by pool_malloc(p, x,
196         sizeof *y) everywhere I could find them.  Similarly by
197         pool_malloc(), pool_realloc().
198         (Order is important: pool_alloc(p, sizeof *y, x) will divide by 0
199         if x is 0.)
200
201         * pool.c: (pool_nalloc) New function.
202         (pool_nmalloc) New function.
203         (pool_nrealloc) New function.
204
205 Thu Oct 27 11:16:53 WST 2005 John Darrington <john@darrington.wattle.id.au>
206
207         Separated the definition of a file handle object from the stuff 
208         pertaining to the FILE HANDLE command.
209
210         * file-handle-def.[ch]: New files.
211
212         * dfm-read.c file-handle.h file-handle.q
213         
214 Tue Oct 25 21:56:23 2005  Ben Pfaff  <blp@gnu.org>
215
216         Fix up potential overflows in size calculations by replacing
217         instances of xmalloc(x * sizeof *y) by xnmalloc(x, sizeof *y)
218         everywhere I could find them.  Similarly by xrealloc(), malloc().
219         (Order is important: xnmalloc(sizeof *y, x) will divide by 0 if x
220         is 0.)
221
222         * alloc.c: (nmalloc) New function.
223         (out_of_memory) Removed.  Replaced references by xalloc_die().
224
225         * sort.c: (allocate_cases) Fix segfault if memory allocation
226         fails.
227
228         * subclist.c: (subc_list_double_create) Use xnmalloc() instead of
229         malloc().
230         (subc_list_double_push) Use xnrealloc() instead of realloc().
231
232 Wed Oct 26 08:43:51 WST 2005 John Darrington <john@darrington.wattle.id.au>
233
234         Dictionary abstraction part #2
235
236         * algorithm.c format.c str.c sysfile-info.c val.h var.h vars-atr.c:
237           Removed unnecessary #include directives
238
239 Mon Oct 24 21:35:08 2005  Ben Pfaff  <blp@gnu.org>
240
241         * groff-font.c (font_msg): Use err_vmsg() instead of incorrectly
242         trying to pass a va_list to tmsg().  Thanks to Jason Stover for
243         reporting this bug.
244
245 Mon Oct 24 21:24:15 2005  Ben Pfaff  <blp@gnu.org>
246
247         Work to get rid of GCC 4.0 warnings, part 2.
248
249         In many files, change `unsigned char' to `char'.  This often
250         requires adding casts to <ctype.h> functions.
251
252         * data-in.c: (parse_A) Use buf_copy_rpad().
253
254         * str.c: (str_copy_buf_trunc) New function.
255
256         * value-labels.c: (value_to_string) Fix mistaken use of strncpy(),
257         by rewriting.
258
259 Mon Oct 24 13:42:32 WST 2005 John Darrington <john@darrington.wattle.id.au>
260
261         Moved some definitions to make it easier to abstract a dictionary 
262         from the rest of PSPP.
263
264         * format-prs.c lex-def.[ch]:  New files.
265
266         * Makefile.am lexer.[ch] dictionary.c vars-atr.c vfm.c algorithm.c 
267           format.c:  Moved some functions between modules.
268         
269 Sun Oct 23 19:28:08 2005  Ben Pfaff  <blp@gnu.org>
270
271         Work to get rid of GCC 4.0 warnings, part 1.
272         
273         In many files, change count parameters to parse_variables(),
274         etc. from `int' to `size_t'.  Also change related variables and
275         struct members.  Also change messages as needed (e.g. %d to %u
276         with cast to unsigned).  Also change arithmetic as necessary
277         (e.g. n >= m - 1 to n + 1 >= m). 
278
279         * crosstabs.q: (crs_custom_tables) Check for size_t overflow in
280         multiplication.
281
282         * q2c.c: (dump_declarations) Generate code for size_t instead of
283         int.
284         
285 Thu Oct 20 18:18:40 2005  Ben Pfaff  <blp@gnu.org>
286
287         * output.c: (outp_read_devices) Fix message.
288
289 Sat Sep 17 11:13:13 2005  Ben Pfaff  <blp@gnu.org>
290
291         * matrix-data.c: (cmd_matrix_data) Change type of variable whose
292         address is passed to dict_get_vars() from size_t to int to match
293         John's change below.
294
295         * modify-vars.c: (validate_var_modification) Ditto.
296
297 Mon Sep 12 19:26:06 WST 2005 John Darrington <john@darrington.wattle.id.au>
298
299         * dictionary.[ch]  Changed cnt from size_t* to int* since that's
300         what it's called as, and on  x86_64 machines they're different sizes.
301         
302         * str.c: (ds_vprintf) Copied va_list args so they can be re-used
303         
304 Sun Aug 21 00:12:24 2005  Ben Pfaff  <blp@gnu.org>
305
306         * lexer.c: (lex_sbc_only_once) New function.
307         (lex_sbc_missing) New function.
308
309 Sun Aug 21 00:00:47 2005  Ben Pfaff  <blp@gnu.org>
310
311         * case.h: (case_str) Make it return `unsigned char'.
312
313 Sat Aug 20 23:56:14 2005  Ben Pfaff  <blp@gnu.org>
314
315         Revamp SAVE, XSAVE, EXPORT.  Add (or at least parse) all the
316         subcommands that we didn't support.  Fix bug 13911.  Fix bug
317         reported by Adam Pierson (COMPRESSED and other subcommands didn't
318         work on SAVE).  Refactor all related code.
319         
320         * command.def: Add XEXPORT command.
321
322         * dictionary.c: (dict_delete_scratch_vars) New function.
323
324         * get.c: (cmd_get) Fix parsing.
325         (struct save_trns) Removed.
326         (cmd_save_internal) Removed.
327         (cmd_save) Removed.
328         (do_write_case) Removed.
329         (save_write_case_func) Removed.
330         (save_trns_proc) Removed.
331         (save_trns_free) Removed.
332         (trim_dictionary) Removed.
333         (struct export_proc) Removed.
334         (cmd_export) Rewrote.
335         (export_write_case_func) Removed.
336         (export_proc_free) Removed.
337         (enum writer_type) New enum.
338         (enum command_type) New enum.
339         (struct any_writer) New struct.
340         (any_writer_destroy) New function.
341         (parse_write_command) New function.
342         (any_writer_write_case) New function.
343         (parse_output_proc) New function.
344         (output_proc) New function.
345         (cmd_save) Rewrote.
346         (cmd_xsave) Rewrote.
347         (struct output_trns) New struct.
348         (parse_output_trns) New function.
349         (output_trns_proc) New function.
350         (output_trns_free) New function.
351         (cmd_xsave) Rewrote.
352         (cmd_xexport) New function.
353         (parse_dict_trim) New function.
354         (struct mtf_proc) Change `by_cnt' member type to `int'.
355         (cmd_import) Rewrote.
356
357         * pfm-write.c: (struct pfm_writer) Add `digits' member.
358         (pfm_writer_default_options) New function.
359         (pfm_open_writer) Add `opts' argument and handle options.
360         (write_float) Write only as many digits as `digits' member says.
361         (format_trig_double) Limit base-10 precision to LDBL_DIG.
362
363         * pfm-write.h: (enum pfm_type) Moved here from pfm-read.h.
364         (struct pfm_write_options) New struct.
365
366         * sfm-write.c: (sfm_writer_default_options) New function.
367         (sfm_open_writer) Remove `compress', `omit_long_names' args.  Add
368         `opts' argument.  Implement options.
369
370         * sfm-write.h: (struct sfm_write_options) New struct.
371
372         * expressions/helpers.c: (copy_string) Make `old' arg `unsigned
373         char *' instead of `char *'.
374         
375 Sat Aug  6 21:29:15 2005  Ben Pfaff  <blp@gnu.org>
376
377         * factor_stats.c: Needed <config.h> included earlier.
378
379         * percentiles.c: Needed to include <config.h>.
380
381         * val.h: Don't include "config.h".
382
383 Sat Aug  6 21:26:27 2005  Ben Pfaff  <blp@gnu.org>
384
385         Clean up treatment of missing values by moving all the code into
386         one place.  All references to the missing value function were
387         updated, but only major changes are detailed below.
388
389         * Makefile.am: Add missing-values.c, missing-values.h to sources.
390
391         * apply-dict.c: (cmd_apply_dictionary) Use mv_resize().
392
393         * dictionary.c: (dict_create_var) Initialize `miss' member with
394         mv_init().
395         (dict_clone_var) Copy `miss' member with mv_copy().
396         
397         * get.c: (mtf_merge_dictionary) Use mv_copy().
398
399         * missing-values.c: New file.
400         
401         * missing-values.h: New file.
402
403         * mis-val.c: Rewrite.  New version implements updated semantics.
404
405         * pfm-read.c: (read_variables) Rewrite missing value handling.
406
407         * pfm-write.c: (write_variables) Rewrite missing value handling.
408
409         * sfm-read.c: (read_variables) Rewrite missing value handling.
410
411         * sfm-write.c: (write_variable) Rewrite missing value handling.
412
413         * sfmP.h: Include "magic.h" to get definition of
414         second_lowest_value.
415
416         * sysfile-info.c: (describe_variable) Rewrite missing value
417         handling.
418
419         * val.h: Include "magic.h" to get definition of
420         second_lowest_value.
421
422         * var.h: Include "missing-values.h".  Drop MISSING_* enums.
423         (struct variable) Remove `miss_type', `missing'.  Add `miss'.
424
425         * vars-atr.c: (is_num_user_missing) Removed--use
426         mv_is_num_user_missing().
427         (is_str_user_missing) Removed--use mv_is_str_user_missing().
428         (is_system_missing) Removed--use mv_is_value_system_missing().
429         (is_missing) Removed--use mv_is_value_missing().
430         (is_user_missing) Removed--use mv_is_value_user_missing().
431         
432 Sun Jul 31 14:09:57 2005  Ben Pfaff  <blp@gnu.org>
433
434         Adopt use of gnulib for portability.
435
436         * Make.build: Add $(top_srcdir)/gl and $(top_builddir)/gl to
437         include path.
438
439         * Makefile.am: Remove bool.h, stat.h and change getline.[ch] to
440         getl.[ch] in pspp_SOURCES.  Remove libmisc, add libgl in
441         pspp_LDADD.
442
443         * In many source files, added an explicit inclusion of gettext.h
444         and definition of _ macro.  These are no longer in pref.h because
445         it interfered with definitions in a few gnulib source files.
446
447         * In many source files, changed #include "bool.h" to #include
448         <stdbool.h>, which is provided by gnulib.
449
450         * alloc.c: Removed functions defined in gnulib:
451         (xmalloc) Removed.
452         (xcalloc) Removed.
453         (xrealloc) Removed.
454         (xstrdup) Removed.
455         (out_of_memory) Redefined as wrapper for xalloc_die().
456
457         * alloc.h: Replace prototypes by #include "xalloc.h".
458
459         * casefile.c: Use full_read() and full_write() from gnulib instead
460         of our home-grown versions.
461         (full_read) Removed.
462         (full_write) Removed.
463
464         * getline.c: Renamed getl.c.
465
466         * getline.h: Renamed getl.h, updated all references.
467
468         * filename.c: (fn_readlink) Change to wrapper around xreadlink()
469         from gnulib.
470
471         * glob.c: Just #include <time.h> instead of the crazy rigmarole
472         here before.
473         (init_glob) Call set_program_name() to initial gnulib progname
474         module.
475
476         * html.c: (postopen) Use getlogin_r(), gethostname() from gnulib.
477
478         * permissions.c: Use "stat-macros.h" from gnulib.
479
480         * postscript.c: Just #include <time.h> instead of the crazy
481         rigmarole here before.
482
483         * q2c.c: (main) Make generated code #include "gettext.h".
484
485         * str.h: Get rid of most explicit declarations of standard
486         functions, in favor of including gnulib header files.
487
488         * expressions/evaluate.c: Ditto.
489
490         * expressions/operations.h.pl: Make generated code #include
491         <stdbool.h>, not "bool.h".
492
493 Sat Jul 30 23:13:17 2005  Ben Pfaff  <blp@gnu.org>
494
495         * expressions/parse.c: (validate_function_args) Fix two msg() bugs
496         found by -Wformat.
497
498 Sat Jul 30 23:10:01 2005  Ben Pfaff  <blp@gnu.org>
499
500         * expressions/evaluate.c: (expr_debug_print_postfix) Don't pass
501         null pointer to printf for %.*s.
502
503 Sat Jul 30 23:05:33 2005  Ben Pfaff  <blp@gnu.org>
504
505         * vars-atr.c: (var_is_valid_name) Fix three msg() bugs found by
506         -Wformat.
507
508 Sat Jul 30 22:58:33 2005  Ben Pfaff  <blp@gnu.org>
509
510         * rank.q: (parse_rank_function) Fix msg() bug found by -Wformat.
511
512 Sat Jul 30 22:56:12 2005  Ben Pfaff  <blp@gnu.org>
513
514         * postscript.c: (postopen) Cast `char' to `unsigned char' before
515         passing to isspace().
516
517 Sat Jul 30 22:52:09 2005  Ben Pfaff  <blp@gnu.org>
518
519         * pfm-read.c: (read_variables) Fix msg() bug found by -Wformat.
520
521 Sat Jul 30 22:50:57 2005  Ben Pfaff  <blp@gnu.org>
522
523         * histogram.c: Include <config.h>.
524
525 Sat Jul 30 22:48:50 2005  Ben Pfaff  <blp@gnu.org>
526
527         * get.c: (cmd_match_files) Fix msg() bug found by -Wformat.
528
529 Sat Jul 30 22:46:10 2005  Ben Pfaff  <blp@gnu.org>
530
531         * format.c: (check_common_specifier) Fix msg() bug found by
532         -Wformat.
533         (check_output_specifier) Ditto.
534
535 Sat Jul 30 22:43:57 2005  Ben Pfaff  <blp@gnu.org>
536
537         * file-handle.q: (cmd_file_handle) Fix msg() bug found by
538         -Wformat.
539
540 Sat Jul 30 22:41:44 2005  Ben Pfaff  <blp@gnu.org>
541
542         * data-in.c: (parse_Z) [WORDS_BIGENDIAN] Don't declare buf[], to
543         avoid "unused variable" warning.
544
545 Sat Jul 30 22:38:46 2005  Ben Pfaff  <blp@gnu.org>
546
547         * command.c: (find_word) Cast `char' to `unsigned char' before
548         passing to isspace().
549
550 Sat Jul 30 22:36:29 2005  Ben Pfaff  <blp@gnu.org>
551
552         * case.c: (case_compare) Implement as delegating to
553         case_compare_2dict().
554
555 Sat Jul 30 22:34:18 2005  Ben Pfaff  <blp@gnu.org>
556
557         * algorithm.c: Inclusion of <alloca.h> is unneeded.
558
559 Sat Jul 30 22:01:32 2005  Ben Pfaff  <blp@gnu.org>
560
561         * Make.build: Don't append -ansi to AM_CFLAGS for GCC.  Using
562         -ansi changes the behavior of header files significantly.  It
563         causes __STRICT_ANSI__ to be defined, and some headers interpret
564         that as cause to e.g. not use `long long' or __attribute__.  The
565         former example is bad when off_t is supposed to be `long long',
566         and the latter prevents -Wformat from working.
567
568 Sun Jul 24 20:26:59 2005  Ben Pfaff  <blp@gnu.org>
569
570         Get rid of dependency on libgmp by writing our own routine for
571         floating-point base conversion.
572
573         * pfm-write.c: (write_float) Rewrote.
574         (write_int) Rewrote.
575         (pow30_nonnegative) New function.
576         (pow30) New function.
577         (trig_to_char) New function.
578         (format_trig_digits) New function.
579         (recurse_format_trig_int) New function.
580         (format_trig_int) New function.
581         (should_round_up) New function.
582         (try_round_up) New function.
583         (format_trig_double) New function.
584
585 Sun Jul 24 18:49:20 2005  Ben Pfaff  <blp@gnu.org>
586
587         * data-in.c: (parse_numeric) Allow "1+23" even for F format, for
588         compatibility.
589
590 Sun Jul 24 18:47:37 2005  Ben Pfaff  <blp@gnu.org>
591
592         * pfm-read.c: (read_version_data) Read and ignore author field.
593
594 Wed Jul  6 20:44:27 2005  Ben Pfaff  <blp@gnu.org>
595
596         * get.c: (mtf_processing) Don't assume that
597         mtf_compare_BY_values() always returns -1, 0, or 1.  Actually, it
598         returns a negative, zero, or positive result.  Fixes MATCH FILES
599         bug on Mac OS X reported by "Marshall DeBerry" <mdb@radix.net>.
600
601 Mon Jul  4 18:01:15 2005  Ben Pfaff  <blp@gnu.org>
602
603         * flip.c: [HAVE_SYS_TYPES_H] Really include <sys/types.h>.  The
604         preprocessor test for sys/types.h was accidentally inverted.  This
605         was bug 12789.
606
607 Sun Jul  3 22:47:39 2005  Ben Pfaff  <blp@gnu.org>
608
609         * get.c: (cmd_match_files) Fix memory leak on `by' and on
610         `vfm_source'.
611
612         * getline.c: [HAVE_LIBREADLINE] (read_console) Fix memory leak on
613         `line'.
614
615         * vfm.c: (close_active_file) Remove unnecessary test.
616
617 Sun Jul  3 21:45:32 2005  Ben Pfaff  <blp@gnu.org>
618
619         Fix NDEBUG compile errors.
620
621         * hash.h: Needed explicit #include <assert.h>.
622
623         * linked-list.c: (ll_next) First arg is UNUSED when NDEBUG is
624         defined.
625
626 Sun Jun 12 23:44:38 2005  Ben Pfaff  <blp@gnu.org>
627
628         Implement embedding for PostScript driver.  Fixes bug 12970.
629
630         * ascii.c: Fix compiler warnings.
631
632         * html.c: Ditto.
633
634         * chart.h: Add `file' member.
635
636         * output.h: (struct outp_class) initialise_chart, finalise_chart
637         should take outp_driver *, not outp_class *.  Update all
638         references.
639
640         * plot-chart.c: (chart_create) Fix segfault when there are no
641         output drivers at all.
642         (chart_submit) Call d->class->finalise_chart.
643
644         * postscript.c: (ps_open_page) Set cp_y to 0.
645         (ps_submit) New function.
646         (ps_chart_initialise) Implement.
647         (ps_chart_finalise) Implement.
648         (static var postscript_class) Add ps_submit.
649         (static var epsf_class) Add ps_submit.
650         
651
652 Sun Jun 12 14:54:40 2005  Ben Pfaff  <blp@gnu.org>
653
654         Did some more work on bug 12859 and then realized that a *good*
655         solution would require some fundamental restructuring.  For now,
656         I'm marking REPEATING DATA unimplemented, and then we can revisit
657         it post-0.4.0.
658         
659         * command.def: Make REPEATING DATA unimplemented.
660
661         * data-list.c: (cmd_repeating_data) Assume inline file is 80
662         characters wide.
663         (realize_value) Revert previous changes; no longer needed.
664         Updated all callers.
665
666         * error.c: (err_hcf) Set nfile_loc, mfile_loc to 0 after freeing
667         file_loc, to avoid bad references later.
668
669         * str.c: Fix typo.
670
671 Tue Jun  7 00:14:09 2005  Ben Pfaff  <blp@gnu.org>
672
673         Make some code tolerant of reentry.  Should not be needed if other
674         code is correct but it is good to be generally tolerant.
675         
676         * error.c: (err_hcf) Set file_loc to null after free().
677
678         * output.c: (outp_done) Similar changes.
679
680         * str.c: (ds_destroy) Ditto.
681         
682 Tue Jun  7 00:10:20 2005  Ben Pfaff  <blp@gnu.org>
683
684         Continue work on bug 12859, plus some code cleanup.
685         
686         * data-list.c: (cmd_repeating_data) Replace `seen' bitmap by
687         boolean variables.  Don't try to compute starts_end, cont_end for
688         inline file.  Calculate length only after parsing variable
689         specifications.  Add proper transformation to list.
690         (realize_value) If the rpd_num_or_var has no value, return new
691         DEFAULT_MEMBER argument (for use with inline file).
692         (repeating_data_trns_proc) Pass default values.
693
694         * dfm-read.c: (dfm_close_reader) Only skip data if *not* still
695         open, and only if we actually started reading data.
696
697 Sun Jun  5 18:39:36 2005  Ben Pfaff  <blp@gnu.org>
698
699         Fix bug 11894.
700         
701         * output.c: (outp_read_devices) Fix message.
702
703 Fri May 27 12:34:43 WST 2005 John Darrington <john@darrington.wattle.id.au>
704         
705         * sort-prs.[ch] (newfiles), aggregate.c, sort.[ch]: Separated the guts 
706         of the sort algorithm from the parser for the SORT command.
707         
708         * rank.q: Added the parser for the RANK command.
709         
710 Thu May 26 12:29:21 2005  Ben Pfaff  <blp@gnu.org>
711
712         Fix bug 13192.
713
714         * sort.c: (sort_parse_criteria) Only set *saw_direction if
715         saw_direction is non-null.  Thanks to John Darrington for
716         reporting this bug.
717
718 Tue May 24 21:52:55 2005  Ben Pfaff  <blp@gnu.org>
719
720         * get.c: (mtf_processing) Handle case of a lookup table as the
721         active file.  Thanks to John Darrington for reporting this bug.
722
723 Wed May 25 10:27:02 WST 2005 John Darrington <john@darrington.wattle.id.au>
724         
725         * alloc.c alloc.h: (xcalloc) changed signature to imitate the
726         POSIX  calloc function.
727         
728         * crosstabs.q get.c vars-prs.c: Updated calls to xcalloc to
729         reflect new signature.
730
731         * sfm-read.c: Now much more robust in the face of badly formed
732         system files.
733
734 Mon May 23 11:57:31 WST 2005 John Darrington <john@darrington.wattle.id.au>
735
736         *sfm-read.c: Fixed some bugs regarding long string continuation
737         records, which the previous fix uncovered.
738
739 Sat May 21 12:48:34 WST 2005 John Darrington <john@darrington.wattle.id.au>
740
741         * sfm-read.c, sfmP.h:  Allow reading of system files when the 
742         case_size value in the header is -1.  Also changed some Errors to 
743         Warnings when reading system files.
744
745 Tue May 17 21:00:57 2005  Ben Pfaff  <blp@gnu.org>
746
747         * data-list.c: (data_list_trns_free) Don't free the argument
748         because cancel_transformations() will do that itself.
749         (data_list_source_destroy) Destroy the argument to
750         data_list_trns_free(), because it no longer does so itself.
751
752 Tue May 17 18:29:35 2005  Ben Pfaff  <blp@gnu.org>
753
754         * data-out.c: (format_and_round) Don't output leading `-' if value
755         rounds to zero.
756
757 Tue May 17 00:06:43 2005  Ben Pfaff  <blp@gnu.org>
758
759         Fix bug 11119.
760
761         * som.c: (output_encodings) If some cell in the table won't fit
762         with the horizontal or vertical headers, cancel those headers.
763
764         * som.h: (struct som_table_class) Add fits_width, fits_length,
765         set_headers members.
766
767         * tab.c: (tabi_fits_width) New function.
768         (tabi_fits_length) New function.
769         (tabi_set_headers) New function.
770         (global var tab_table_class) Add the new functions as appropriate
771         members.
772         
773 Mon May 16 22:34:06 2005  Ben Pfaff  <blp@gnu.org>
774
775         Fix rest of bug 13054.
776
777         * format.def: Fix EDATE, SDATE, ADATE, JDATE, QYR, MOYR, WKYR,
778         DATETIME, TIME system/portable file values.
779
780 Mon May 16 22:31:15 2005  Ben Pfaff  <blp@gnu.org>
781
782         * data-list.c: (parse_free) Use make_input_format().
783         
784         * data-out.c: (num_to_string) Use make_output_format().
785
786         * dictionary.c: (dict_create_var) Ditto.
787
788         * format.c: (global var f8_2) New var.
789         (make_input_format) New function.
790         (make_output_format) New function.
791
792         * get.c: (cmd_match_files) Use make_output_format().
793
794         * list.q: (cmd_list) Ditto.
795
796         * matrix-data.c: Ditto.
797
798         * sfm-read.c: (parse_format_spec) Check output specifier
799         thoroughly.
800
801         * tab.c: (tab_float) Use make_output_format().
802
803 Sun May 15 23:38:10 2005  Ben Pfaff  <blp@gnu.org>
804
805         Fix more of bug 13054.
806         
807         * format.def: FMT_A should allow 255-character output.  FMT_AHEX
808         should allow 510-character input and output.
809
810         * data-out.c: (num_to_string) Get rid of NEW_STYLE option.
811         (convert_E) Handle non-finite values.
812         (try_F) Rewrite.
813         (format_and_round) New function.
814         (convert_infinite) New function used by try_F() and convert_E().
815
816 Sun May 15 23:36:55 2005  Ben Pfaff  <blp@gnu.org>
817
818         Regularize string and buffer function names so that they make some
819         kind of sense.
820
821         * str.c: (mm_reverse) Rename buf_reverse().  Update all
822         references.
823         (mm_find_reverse) Rename buf_find_reverse().  Update all
824         references.
825         (mm_case_compare) Rename buf_compare_case().  Update all
826         references.
827         (st_compare_pad) Rename buf_compare_rpad().  Update all
828         references.
829         (str_compare_rpad) New function.
830         (st_bare_pad_copy) Rename buf_copy_str_rpad().  Update all
831         references.
832         (buf_copy_str_lpad) New function.
833         (st_bare_pad_len_copy) Rename buf_copy_rpad().  Update all
834         references.
835         (st_pad_copy) Rename str_copy_rpad().  Update all references.
836         (st_trim_copy) Rename str_copy_trunc().  Update all references.
837         (st_uppercase) Renamed str_uppercase().  Update all references.
838         
839 Sat May 14 08:22:26 WST 2005 John Darrington <john@darrington.wattle.id.au>
840
841         * dfm-read.c: Fixed polarity of test in dfm-close-reader.  Closes 
842         Bug #13082
843
844 Tue May 10 20:08:18 2005  Ben Pfaff  <blp@gnu.org>
845
846         * data-in.c: (data_in) Add assertion to check input specifier.
847
848         * data-out.c: (data_out) Add assertion to check output specifier.
849
850 Tue May 10 19:56:35 2005  Ben Pfaff  <blp@gnu.org>
851
852         Start to fix bug 13054.
853
854         * format.c: (check_input_specifier) Improve error message.
855         (check_input_specifier) Check F, COMMA, and DOLLAR formats for
856         valid decimal places.
857         (check_output_specifier) Ditto (but different criteria).
858         (convert_fmt_ItoO) Assert valid input and output specifiers.
859         Also, if input specifier has *any* decimal places, make the output
860         specifier 1 place wider.
861
862 Mon May  9 07:14:29 WST 2005 John Darrington <john@darrington.wattle.id.au>
863
864         * sysfile-info.c: Fixed bug [# 13024 ]
865
866 Sun May  8 13:52:12 2005  Ben Pfaff  <blp@gnu.org>
867
868         "Fix" bug 13021 by disabling FILE TYPE.  Eventually, we should
869         actually implement it.
870
871         * command.c: (FILE_TYPE_okay) Always return 1.
872
873         * command.def: Change FILE TYPE, END FILE TYPE into UNIMPL.
874
875         * file-type.c: Add prototypes to get rid of warnings.
876
877 Sun May  8 08:08:07 WST 2005 John Darrington <john@darrington.wattle.id.au>
878
879         * barchart.c box-whisker.c cartesian.c piechart.c plot-hist.c: Fixed 
880         more ISO/IEC 9899:1990 conformance issues.
881
882 Wed May  4 23:54:02 2005  Ben Pfaff  <blp@gnu.org>
883
884         Fix bug 12948.  See also new test in
885         tests/bugs/match-file-scratch.sh.
886         
887         * get.c: (mtf_merge_dictionary) Don't compact dictionary because
888         that deletes scratch variables that someone else might be using,
889         and because we can't reassign our sources' value indexes.
890         Instead, simply don't copy scratch variables into the master
891         dictionary.
892
893         * dictionary.c: (dict_compact_values) Delete variables from the
894         dictionary passed in, not from default_dict (!).
895
896 Tue May  3 22:25:17 2005  Ben Pfaff  <blp@gnu.org>
897
898         Improve hash.c comments, error-checking.
899         
900         * hash.c: (struct hsh_table) [NDEBUG] Add hash_ordered member.
901         (hsh_create) size == 0 should *not* return NULL!  Set
902         hash_ordered.
903         (hsh_clear) Set hash_ordered.
904         (locate_matching_entry) Check hash_ordered.
905         (hsh_rehash) Rename rehash().  Add assertion.  Set hash_ordered.
906         (hsh_data) Set hash_ordered.  Add const-ness to return value and
907         update all callers.
908         (hsh_sort) Ditto.       
909
910 Wed May  4 08:50:11 WST 2005 John Darrington <john@darrington.wattle.id.au>
911
912         * casefile.c: Removed unnecessary #include <valgrind/valgrind.h>
913
914 Tue May  3 19:14:48 WST 2005 John Darrington <john@darrington.wattle.id.au>
915
916         * copyleft.c: Updated copyright date.
917
918         * Makefile.am: Removed erroneous explicit "-lplot"
919
920         * examine.q oneway.q: Made these files conform to ISO/IEC 9899:1990
921
922 Tue May  3 16:20:31 WST 2005 John Darrington <john@darrington.wattle.id.au>
923
924         * command.c command.def: Added description string for unimplemented commands.
925
926         * oneway.q: Sorted the hash tables before shipping out the results. Closes 
927         bug [#12931].
928
929 Mon May  2 23:45:01 2005  Ben Pfaff  <blp@gnu.org>
930
931         Code improvements.
932         
933         * data-list.c:  (parse_fixed) Use lex_end_of_command().
934         (parse_free) Ditto.
935         (cmd_repeating_data) Set cont_end.num in right situations.
936         (parse_repeating_data) Remove redundant test.
937
938 Mon May  2 23:37:19 2005  Ben Pfaff  <blp@gnu.org>
939
940         Partial fix for bug 12859.
941         
942         * data-list.c: (cmd_data_list) Add transformation properly in
943         vfm_source == NULL case.
944
945 Mon May  2 23:27:28 2005  Ben Pfaff  <blp@gnu.org>
946
947         * lexer.c: (lex_error) Improve error messages.
948
949 Mon May  2 22:28:17 2005  Ben Pfaff  <blp@gnu.org>
950
951         * get.c: (cmd_match_files) Check token type before trying to match
952         tokid.  Fixes bug 12923.
953
954 Mon May  2 22:16:51 2005  Ben Pfaff  <blp@gnu.org>
955
956         * flip.c: [HAVE_SYS_TYPES_H] Include <sys/types.h>.  Fixes bug
957         12789.
958
959 Mon May  2 22:02:52 2005  Ben Pfaff  <blp@gnu.org>
960
961         * expressions/generate.pl: (get_token) Make use of /g
962         backward-compatible with Perl 5.6.1.
963
964 Sun May  1 23:00:19 2005  Ben Pfaff  <blp@gnu.org>
965
966         * var-display.c: (cmd_variable_alignment) Fix memory leak.
967         (cmd_variable_level) Ditto.
968
969 Sun May  1 22:49:04 2005  Ben Pfaff  <blp@gnu.org>
970
971         Hash table had buggy deletion function.  The fix required changing
972         other functions to do probing in the required order.
973
974         * hash.c: (locate_matching_entry) Rewrite and change interface.
975         (hsh_rehash) Rewrite to use locate_matching_entry().
976         (hsh_probe) Ditto.
977         (hsh_find) Ditto.
978         (hsh_delete) Ditto.  Also, fix stupid bugs.
979
980 Sun May  1 22:24:58 2005  Ben Pfaff  <blp@gnu.org>
981
982         * dictionary.c: (dict_clone) Properly copy vectors.
983
984 Sun May  1 22:07:58 2005  Ben Pfaff  <blp@gnu.org>
985
986         New implementation of long variable names.  Each variable has a
987         "normal" name, which may be up to 64 bytes long and which is used
988         for all normal operations.  Variables may have a "short" name,
989         which is limited to 8 bytes and used only for system and portable
990         file input and output.
991         
992         Make tokid case-preserving.  Update most uses of tokid to treat it
993         case-insensitively.
994
995         Update many commands to deal with long variable names.
996
997         * autorecode.c: (cmd_autorecode) Use strcasecmp() instead of strcmp().
998
999         * command.c: (cmd_parse) Ditto.
1000         (match_strings) Use toupper() before comparing characters.
1001         (conflicting_3char_prefixes) Use mm_case_compare() instead of
1002         memcmp().
1003         (cmd_match_words) Ditto.
1004
1005         * compute.c: (lvalue_parse) Use st_trim_copy() instead of
1006         strncpy().
1007
1008         * count.c: (struct cnt_var_info) Change n[] to fit long var name.
1009         Use st_trim_copy() instead of strcpy().
1010
1011         * data-in.c: (parse_enum) Use mm_case_compare() instead of
1012         memcmp().
1013
1014         * data-list.c: (struct dls_var_spec) Change name[] to fit long var
1015         name.
1016         (parse_free) Use st_trim_copy() instead of strcpy().
1017
1018         * descript.c: (struct dsc_var) Change z_name[] to fit long var
1019         name.
1020         (try_name) Use strcasecmp() instead of strcmp().
1021         (generate_z_varname) Use st_trim_copy() instead of strcpy().
1022         (descriptives_compare_dsc_vars) Use strcasecmp() instead of
1023         strcmp().
1024
1025         * dictionary.c: (struct dictionary) Removed `long_name_tab'
1026         member.
1027         (compare_long_names) Removed.
1028         (hash_long_name) Removed.
1029         (dict_create) Don't initialize `long_name_tab' member.
1030         (dict_clone) Copy short names into new dictionary. 
1031         (dict_clear) Don't clear `long_name_tab' member.
1032         (dict_get_varname_block) Removed.
1033         (dict_add_longvar_entry) Removed.
1034         (free_nte) Removed.
1035         (dict_destroy) Don't destroy `long_name_tab' member.
1036         (dict_create_var_from_short) Removed.
1037         (dict_create_var_x) Removed.
1038         (dict_create_var) Get rid of longname handling.
1039         Clear short name.
1040         (dict_clone_var) Get rid of longname parameter and longname
1041         handling.
1042         (dict_lookup_var) Get rid of longname handling.
1043         (dict_reorder_var) New function.
1044         (dict_rename_var) Clear short name.
1045         (dict_rename_vars) Get rid of longname handling.  Clear short
1046         names.
1047         (dict_create_vector) Support long vector names.
1048         (dict_lookup_vector) Use strcasecmp() instead of strcmp().
1049         (quasi_base27) Removed.
1050         (make_short_name) Removed.
1051         (compare_strings) New function.
1052         (hash_string) New function.
1053         (dict_assign_short_names) New function.
1054
1055         * file-handle.q: (get_handle_with_name) Use strcasecmp() instead
1056         of strcmp().
1057         (get_handle_for_filename) Support long handle names.
1058
1059         * file-type.c: (struct col_spec) Make `name' fit long var names.
1060         (cmd_file_type) Use strcasecmp() instead of strcmp().
1061
1062         * flip.c: (make_new_var) Rewrite.
1063         (flip_sink_write) Use st_trim_copy() instead of strncpy().
1064
1065         * format.c: (parse_format_specifier_name) Use mm_case_compare()
1066         instead of memcmp().
1067
1068         * get.c: (cmd_save_internal) Rephrase.
1069         (rename_variables) Drop test for identical variable name.
1070         (struct mtf_proc) Change `first', `last' to fit long var name.
1071
1072         * hash.c: (hsh_hash_case_string) New function for case-insensitive
1073         string hashing.
1074
1075         * lexer.c: (restore_token) Use st_trim_copy() instead of
1076         strncpy().
1077         (lex_get) Don't uppercase string when copying into tokid.
1078         (lex_put_back_id) Use st_trim_copy() instead of
1079         strncpy().
1080
1081         * list.q: (determine_layout) Consider length of variable names in
1082         choosing vertical layout.
1083
1084         * matrix-data.c: (cmd_matrix_data) Use strcasecmp() instead of
1085         strcmp().
1086         (string_to_content_type) Ditto.
1087
1088         * modify-vars.c: (compare_variables_given_ordering) Ditto.
1089         (struct var_renaming) Change `new_name' to fit long var name.
1090         (compare_var_renaming_by_new_name) Use strcasecmp() instead of
1091         strcmp().
1092
1093         * pfm-read.c: (read_variables) Disallow system variables in system
1094         files.
1095         (write_variables) Call dict_assign_short_names() and use
1096         short_name[] members.
1097
1098         * repeat.c: (internal_cmd_do_repeat) Use strcasecmp() instead of
1099         strcmp().
1100
1101         * sfm-read.c: (sfm_open_reader) Rewrite code for long variable
1102         map.  Reorder variables into same order as long variable map.
1103         (read_variables) Set short name.
1104
1105         * sfm-write.c: (sfm_open_writer) Call dict_assign_short_names().
1106         (write_variable) Use st_bare_pad_copy().
1107         (write_longvar_table) Rewrite.
1108
1109         * str.c: (mm_case_compare) New function.
1110
1111         * sysfile-info.c: (compare_vectors_by_name) Use strcasecmp()
1112         instead of strcmp().
1113
1114         * t-test.q: (tts_custom_groups) Remove redundant test.
1115         (tts_custom_pairs) Ditto.
1116
1117         * var.h: (struct variable) Change `name' to fit long var names.
1118         Remove `longname'.  Add `short_name' member.  Reorder some
1119         variables.
1120         (struct name_table_entry) Removed.
1121         (struct vector) Change `name' to fit long vector names.
1122
1123         * vars-atr.c: (var_is_valid_name) Allow long var names.
1124         (compare_var_names) Use strcasecmp() instead of strcmp().
1125         (compare_var_ptr_names) Ditto.
1126         (hash_var_name) Use hsh_hash_case_string().
1127         (hash_var_ptr_name) Ditto.
1128         (var_set_short_name) New function.
1129         (var_clear_short_name) New function.
1130         (var_set_short_name_suffix) New function.
1131
1132         * vars-prs.c: (parse_DATA_LIST_vars) Support long names.
1133         Use strcasecmp() instead of strcmp().
1134         (struct array_var_set) Removed `longname_tab'.
1135         (array_var_set_lookup_var_idx) Drop longname_tab support.
1136         (array_var_set_destroy) Don't destroy `longname_tab'.
1137         (var_set_create_from_array) Don't create `longname_tab'.
1138
1139         * vector.c: (cmd_vector) Use strcasecmp() instead of strcmp().
1140         Support long names.
1141
1142         * expressions/parse.c: (word_matches) Use mm_case_compare()
1143         instead of memcmp().
1144         (compare_strings) New function.
1145         (lookup_function) Use compare_strings() instead of strcmp().
1146         
1147 Sun May  1 22:07:43 2005  Ben Pfaff  <blp@gnu.org>
1148
1149         * algorithm.c: (move_element) New function.
1150
1151 Sun May  1 22:05:35 2005  Ben Pfaff  <blp@gnu.org>
1152
1153         * aggregate.c: (parse_aggregate_functions) Always initialize
1154         destvar.
1155
1156 Sun May  1 22:03:47 2005  Ben Pfaff  <blp@gnu.org>
1157
1158         * aggregate.c: (cmd_aggregate) Use dict_clone_var_assert().
1159
1160         * dictionary.c: (dict_clone) Ditto.
1161         (dict_clone_var_assert) New function.
1162
1163         * get.c: (mtf_merge_dictionary) Use dict_clone_var_assert().
1164
1165 Sun May  1 15:05:54 WST 2005 John Darrington <john@darrington.wattle.id.au>
1166
1167         * error.c: Added a string for the compiler version to the
1168         request_bug_report_and_abort function.
1169
1170         * groff_font.c, font.c: Removed manpage(1) style references from 
1171         comments, because RMS frowns upon them.
1172
1173 Thu Apr 28 18:52:06 2005  Ben Pfaff  <blp@gnu.org>
1174
1175         * expressions/parse.c: Improve previous fix for bug 12858 (LAG).
1176
1177 Fri Apr 29 09:28:00 WST 2005 John Darrington <john@darrington.wattle.id.au>
1178
1179         * expressions/parse.c: Added handler for OP_LAG_Vn and OP_LAG_Vs.  
1180         Fixed bug [#12858] .
1181
1182 Wed Apr 27 12:42:34 WST 2005 John Darrington <john@darrington.wattle.id.au>
1183
1184         * loop.c recode.c repeat.c: Fixed a couple of instances of SHORT_NAME_LEN 
1185         which should be LONG_NAME_LEN
1186
1187 Wed Apr 27 07:43:50 WST 2005 John Darrington <john@darrington.wattle.id.au>
1188
1189         * command.def echo.c:  Added the ECHO command.
1190
1191 Mon Apr 25 22:55:59 2005  Ben Pfaff  <blp@gnu.org>
1192
1193         Finish fixing MATCH FILES (bug 11677).
1194
1195         * get.c: (trim_dictionary) Rewrite in terms of drop_variables(),
1196         keep_variables(), rename_variables().
1197         (drop_variables) New function.
1198         (keep_variables) New function.
1199         (struct mtf_file) Rename `in' to `in_name'.  Add `in_var'.
1200         (cmd_match_files) Deal with in_var.  Use drop_variables(),
1201         keep_variables().  When IN is specified, require BY.  Set master
1202         variables after master dictionary is complete.  Add IN variables
1203         after master dictionary is complete.
1204         (mtf_free_file) Free `in_name'.
1205         (mtf_delete_file_in_place) Set in_var value to 0.
1206         (mtf_read_nonactive_records)  Rephrase.
1207         (mtf_processing) Support IN.  Rephrase.  Fix bugs.
1208         (mtf_merge_dictionary) Don't set master variables; we do that
1209         later now.
1210         (get_master) Don't insist that there's a master variable.
1211         
1212 Mon Apr 25 22:55:22 2005  Ben Pfaff  <blp@gnu.org>
1213
1214         Kluge to make some variable renaming sort of work.
1215         Needs real fix.
1216
1217         * dictionary.c: (dict_rename_var) Call dict_add_longvar_entry().
1218
1219 Mon Apr 25 22:52:28 2005  Ben Pfaff  <blp@gnu.org>
1220
1221         Add functions for comparing sets of variables between cases.
1222         Use the functions.
1223
1224         * case.c: (case_compare) New function.
1225         (case_compare_2dict) New function.
1226         
1227         * aggregate.c: (struct agr_proc) Remove `prev_break' member.  Add
1228         `break_case'.
1229         (cmd_aggregate) Nullify break_case.  Don't call
1230         initialize_aggregate_info().
1231         (agr_destroy) Destroy break_case.
1232         (aggregate_single_case) Rewrite.  Use case_compare().
1233         (dump_aggregate_info) Copy from break_case into output.
1234         (initialize_aggregate_info) Copy break_case from input.
1235
1236         * get.c: (mtf_compare_BY_values) Use case_compare_2dict().
1237
1238         * vfm.c: (equal_splits) Use case_compare().
1239
1240 Sat Apr 23 17:01:04 WST 2005 John Darrington <john@darrington.wattle.id.au>
1241
1242         * dictionary.c vars-prs.c sfm-write.c: Fixed some memory leaks
1243
1244 Sun Apr 17 23:08:15 2005  Ben Pfaff  <blp@gnu.org>
1245
1246         Start work on fixing MATCH FILES.
1247
1248         * get.c: (enum operation) Remove OP_MATCH.
1249         (trim_dictionary) Change return value to bool.  Don't support
1250         OP_MATCH.
1251         (struct mtf_file) Remove `first', `last' members.
1252         (struct mtf_proc) Add `first', `last' members.  Change mtf_case
1253         from `struct ccase *' to `struct ccase'.  Remove `by' member.
1254         (cmd_match_files) Essentially rewrite.
1255         (mtf_free) Don't free `by' member.  Destroy `mtf_case' member.
1256         (mtf_read_nonactive_records) mtf_ parameter is not unused.
1257         (mtf_processing) Ditto.  Also rephrase some code.
1258         (mtf_merge_dictionary) Rewrite for easy comprehension.  
1259
1260 Sun Apr 17 23:06:00 2005  Ben Pfaff  <blp@gnu.org>
1261
1262         * matrix-data.c: (wr_output_data) [DEBUGGING] Fix compilation
1263         error.
1264
1265         * q2c.c: (dump_token) [DEBUGGING] Fix compilation error.
1266         
1267 Thu Apr 14 2005 John Darrington
1268
1269         * var-display.c: New file.
1270
1271         * format.h var.h sfm-read.c sfm-write.c dictionary.c :  Added 
1272           display_width, measure and alignment parameters to variables.
1273
1274         * aggregate.c command.def compute.c count.c data-list.c descript.c
1275           dictionary.c dictionary.h expr-prs.c file-type.c flip.c get.c 
1276           lexer.c lexer.h loop.c modify-vars.c pfm-read.c recode.c repeat.c 
1277           sfm-read.c sfm-write.c sfm-write.h sfmP.h val-labs.c val.h var.h 
1278           vars-prs.c vector.c :  
1279               - Replaced literal constants representing maximum variable name 
1280                 length with macro definitions. 
1281               - Added support for long variable names.
1282               - Changed lexer such that it no longer makes tokens upper
1283                 case, but relies upon case insensitive behaviour of commands.
1284
1285 Mon Apr  4 22:27:34 2005  Ben Pfaff  <blp@gnu.org>
1286
1287         * aggregate.c: (parse_aggregate_functions) If dict_create_var()
1288         fails, don't dereference the resulting null pointer (bug 12427).
1289         Also, fix double free error.
1290
1291 Sat Mar 19 23:06:02 2005  Ben Pfaff  <blp@gnu.org>
1292
1293         * aggregate.c: (parse_aggregate_functions) Fix N_NO_VARS format.
1294         (accumulate_aggregate_info) Set int1 to 1 for SUM.
1295         (dump_aggregate_info) Only make SUM non-missing if there was at
1296         least one variate.
1297
1298 Sat Mar 19 14:48:19 2005  Ben Pfaff  <blp@gnu.org>
1299
1300         * aggregate.c: (dump_aggregate_info) Properly test whether the
1301         destination variable is numeric, when making the result
1302         system-missing for columnwise missing values.
1303
1304 Mon Mar 14 21:52:34 2005  Ben Pfaff  <blp@gnu.org>
1305
1306         * misc.h: Remove GCC specializations.
1307
1308 Mon Mar 14 21:07:23 2005  Ben Pfaff  <blp@gnu.org>
1309
1310         Make sort stable (bug 12313).
1311         
1312         * sort.c: Don't need to include some headers anymore.
1313         (static var min_buffers) New variable.
1314         (static var max_buffers) New variable.
1315         (static var allow_internal_sort) New variable.
1316         (cmd_sort_cases) Add test mode.
1317         (sort_execute) Rephrase.
1318         (do_internal_sort) Don't try internal sorting if
1319         allow_internal_sort is set.
1320         (struct external_sort) Renamed `initial_runs' to `runs' and
1321         updated all references.
1322         (macro MIN_BUFFER_TOTAL_SIZE_RECS) Removed.
1323         (macro MIN_BUFFER_SIZE_BYTES) Removed.
1324         (macro MIN_BUFFER_SIZE_RECS) Removed.
1325         (compare_initial_runs) Removed.
1326         (struct record_run) Add member `idx'.
1327         (write_initial_runs) Pass increasing values to process_case() as
1328         index.
1329         (process_case) Add `idx' parameter and use it to initialize new
1330         `idx' member.
1331         (allocate_cases) Limit allocated buffers to max_buffers.
1332         (compare_record_run) Use new `idx' member for last resort
1333         comparison, for stability.
1334         (end_run) Call casefile_sleep() on irs->casefile, to prevent
1335         running out of file descriptors.
1336         (struct merge_state) Removed.
1337         (merge) Don't need to allocate cases.  Always use MAX_MERGE_ORDER
1338         unless we have fewer runs left.  Always merge consecutive runs,
1339         for stability.  Return the final run.
1340         (mod) Removed.
1341         (choose_merge) New function.
1342         (merge_once) Rewritten.
1343
1344 Mon Mar 14 21:05:42 2005  Ben Pfaff  <blp@gnu.org>
1345
1346         * cmdline.c: (static var testing_mode) Move into
1347         parse_command_line().
1348         
1349 Mon Mar 14 21:05:13 2005  Ben Pfaff  <blp@gnu.org>
1350
1351         * algorithm.c: (remove_range) New function.
1352         (remove_element) New function.
1353
1354         * dictionary.c: (dict_delete_var) Use remove_element().
1355
1356         * flip.c: (cmd_flip) Ditto.
1357
1358 Sun Mar 13 22:52:05 2005  Ben Pfaff  <blp@gnu.org>
1359
1360         * file-handle.q: (struct file_handle) `open_mode' should not be
1361         const.
1362         
1363 Sun Mar 13 22:40:54 2005  Ben Pfaff  <blp@gnu.org>
1364
1365         First phase of making SORT CASES stable (bug 12313).
1366
1367         * sort.c: (struct indexed_case) New structure.
1368         (do_internal_sort) Rewrite to make internal sorting stable.
1369         (compare_case_dblptrs) Removed.
1370         (compare_indexed_cases) New function.
1371
1372 Sun Mar 13 22:38:40 2005  Ben Pfaff  <blp@gnu.org>
1373
1374         Clean-ups.
1375
1376         * casefile.c: (casereader_read_xfer_assert) New function.
1377
1378         * dictionary.c: (dict_compact_case) New function.
1379
1380         * flip.c: (struct flip_pgm) New member idx_to_fv.
1381         (cmd_flip) Initialize idx_to_fv member.
1382         (destroy_flip_pgm) Free idx_to_fv member.
1383         (flip_sink_write) Use struct flip_pgm member instead of case_sink
1384         member.
1385         (flip_sink_write) Ditto.
1386
1387         * vfm.c: (write_case) Use dict_compact_case() instead of
1388         compact_case().
1389         (compact_case) Removed.
1390         (storage_source_create) Removed `dict' parameter.  All references
1391         updated.
1392
1393         * vfm.h: (struct case_source) Removed `value_cnt' member.  All
1394         references removed.
1395         (struct case_sink) Removed `dict', `idx_to_fv' members.  All
1396         references removed.
1397
1398 Sun Mar 13 22:35:55 2005  Ben Pfaff  <blp@gnu.org>
1399
1400         More AGGREGATE fixes.
1401
1402         * aggregate.c: (accumulate_aggregate_info) Implement NMISS and
1403         NUMISS for strings.  Fix FOUT, POUT, FGT, FLT, FIN, FOUT for
1404         strings.
1405         (initialize_aggregate_info) Fix initialization for MIN, MAX for
1406         strings.
1407
1408 Sat Mar 12 23:26:21 2005  Ben Pfaff  <blp@gnu.org>
1409
1410         Start work on testing and debugging AGGREGATE.
1411
1412         * aggregate.c: (cmd_aggregate) Use discrete bool variables instead
1413         of a bit-map.  Require proper subcommand ordering.  Make OUTFILE
1414         subcommand mandatory.
1415         (parse_aggregate_functions) Check that PIN, POUT, FIN, FOUT
1416         functions' arguments are in the correct order and swap them if
1417         not.
1418         (accumulate_aggregate_info) Make SUM include weights.  Add various
1419         string functions.
1420         (dump_aggregate_info) Add various string functions.
1421         (initialize_aggregate_info) Initialize int1 for MIN, MAX.
1422
1423         * sort.c: (sort_parse_criteria) Add parameter for returning
1424         whether any directions were specified.  All callers updated.
1425
1426 Sun Mar 13 14:54:27 WST 2005 John Darrington <john@darrington.wattle.id.au>
1427
1428         * t-test.q: Fixed erroneous logic in compare_group_binary.
1429
1430 Sat Mar 12 13:29:21 2005  Ben Pfaff  <blp@gnu.org>
1431
1432         * split-file.c: (cmd_split_file) Ignore LAYERED and SEPARATE
1433         keywords (bug 11628).
1434
1435 Sat Mar 12 13:17:12 2005  Ben Pfaff  <blp@gnu.org>
1436
1437         * vfm.c: (procedure_with_splits) Fix bug 11492: end_func() must be
1438         called *before* close_active_file().
1439
1440 Sat Mar 12 12:20:57 2005  Ben Pfaff  <blp@gnu.org>
1441
1442         * file-handle.q: (struct file_handle) Change open_mode from
1443         character pointer to 3-char array, for safety.  Updated all
1444         references.
1445
1446 Sat Mar 12 12:15:49 2005  Ben Pfaff  <blp@gnu.org>
1447
1448         Thanks to Ben Kujala <bkujala@oregonchildcare.org> for reporting
1449         these bugs.
1450         
1451         * pfm-read.c: (read_header) Improve error message for many cases
1452         in which the input is not actually a portable file.
1453
1454         * file-handle.q: (fh_open) When we give an error message, actually
1455         return NULL.
1456
1457 Fri Mar 11 11:50:30 2005  Ben Pfaff  <blp@gnu.org>
1458
1459         * format.c: (check_common_specifier) New function for checks
1460         common to check_input_specifier() and check_output_specifier().
1461         (check_input_specifier) Use check_common_specifier().
1462         (check_output_specifier) Use check_common_specifier().
1463         (check_string_specifier) Removed.
1464         (check_specifier_type) New function.
1465         (check_specifier_width) New function.
1466         (get_format_var_width) Fix bug.
1467
1468         * formats.c: (internal_cmd_formats) Only accept numeric variables.
1469
1470         * lexer.c: (check_id) Rename lex_id_to_token(), make public,
1471         update all references.  Make case-insensitive.
1472
1473         * pfm-read.c: Essentially rewrite the whole file.  Now much
1474         cleaner.
1475
1476         * print.c: (check_string_width) New function.
1477         (fixed_parse_compatible) Use check_string_width(),
1478         check_specifier_type().
1479         (dump_fmt_list) Ditto.
1480
1481         * str.c: (st_trim_copy) New function.
1482         (st_uppercase) New function.
1483
1484         * vars-atr.c: (var_is_valid_name) New function.
1485         
1486         * expressions/parse.c: (type_coercion_core) Use
1487         check_specifier_type().
1488         
1489 Fri Mar 11 11:31:24 2005  Ben Pfaff  <blp@gnu.org>
1490
1491         * expressions/evaluate.c: (cmd_debug_evaluate) Fix memory leaks.
1492
1493         * expressions/parse.c: (no_match) Ditto.
1494
1495 Wed Mar  9 09:54:27 2005  Ben Pfaff  <blp@gnu.org>
1496
1497         * Makefile.am: (pspp_LDADD) Add libgsl-extras.a.
1498
1499         * expressions/helpers.c: (struct func_params) Removed.
1500         (generalized_idf) Removed.
1501         (cdf_beta) Removed.
1502         (idf_beta) Removed.
1503         (idf_fdist) Use gslextras_cdf_beta_Pinv() instead of idf_beta().
1504
1505         * expressions/operations.def: Implement IDF.BETA, CDF.BINOM,
1506         CDF.GEOM, CDF.HYPER, CDF.NEGBIN, CDF.POISSON using gsl-extras.
1507         Implement SIG.F, which I had overlooked previously.
1508
1509 Tue Mar  8 12:47:53 WST 2005 John Darrington <john@darrington.wattle.id.au>
1510
1511         * command.c command.def glob.[ch] cmdline.c: Made DEBUG cmds
1512         available only in testing mode.
1513
1514 Sun Mar  6 23:25:40 2005  Ben Pfaff  <blp@gnu.org>
1515
1516         * data-in.c: Use `bool' throughout, where relevant.
1517
1518 Sun Mar  6 19:52:22 2005  Ben Pfaff  <blp@gnu.org>
1519
1520         DATA LIST with free-field formats should not have implied decimal
1521         places (bug 12035).  Also clean up data-in.c a bit.
1522
1523         * data-in.h: (enum) Add DI_IMPLIED_DECIMALS.
1524
1525         * data-in.c: (apply_implied_decimals) New function.
1526         (parse_numeric) Don't adjust exponent if DI_IMPLIED_DECIMALS not
1527         set.  Also, get rid of gotos.
1528         (parse_Z) Use apply_implied_decimals() if the field doesn't
1529         contain a decimal point.
1530         (parse_N) Use apply_implied_decimals().
1531         (parse_IB) Ditto.
1532         (parse_PIB) Ditto.
1533         (parse_P) Ditto.
1534         (parse_PK) Ditto.
1535         (to_roman) Removed.
1536         (parse_enum) New function.
1537         (macro CHAR_IS_ROMAN) Removed.
1538         (macro ROMAN_VALUE) Removed.
1539         (parse_month) Use parse_enum().
1540         (parse_weekday) Use parse_enum().
1541         (parse_DATETIME) Use long for weekday.
1542
1543         * data-list.c: (read_from_data_list_fixed) Use
1544         DI_IMPLIED_DECIMALS.
1545
1546 Sun Mar  6 17:07:20 2005  Ben Pfaff  <blp@gnu.org>
1547
1548         When the lexer sees something like `-5' in the input, it has to
1549         decide whether it's a negative numeric constant token or a '-'
1550         token followed by a positive numeric constant token.  It always
1551         decides on the former, and then the parser can call
1552         lex_negative_to_dash() if it wants the latter.  However, this
1553         doesn't work for the case of `-0', because negative zero is
1554         (portably) indistinguishable from positive zero.  So now we divide
1555         T_NUM into two tokens, T_POS_NUM and T_NEG_NUM, to make the
1556         distinction clear.  This requires a little bit of extra effort,
1557         because there were several references to T_NUM in the code base.
1558         
1559         * lexer.c: (lex_get) Use T_NEG_NUM and T_POS_NUM to distinguish
1560         positive and negative numeric constants.
1561         (lex_double_p) Renamed lex_is_number().  Changed return type to
1562         bool.  Updated all relevant references to T_NUM to instead use
1563         this function.
1564         (lex_double) Renamed lex_number().  All references updated.
1565         (lex_integer_p) Renamed lex_is_integer().  Changed return type to
1566         bool.  All references updated.
1567         (lex_token_representation) Understand T_NEG_NUM and T_POS_NUM.
1568         (lex_negative_to_dash) Ditto.
1569         (dump_token) Ditto.
1570         
1571         * lexer.h: (enum) Add T_POS_NUM, T_NEG_NUM.  Remove T_NUM.
1572
1573 Sun Mar  6 22:09:20 2005  Ben Pfaff  <blp@gnu.org>
1574
1575         * expressions/operations.def: (NUMBER) Use DI_IMPLIED_DECIMALS.
1576
1577 Sun Mar  6 19:33:24 2005  Ben Pfaff  <blp@gnu.org>
1578
1579         * expressions/operations.def: (VEC_ELEM_NUM) Treat user-missing
1580         values as system-missing.
1581
1582         * expressions/parse.c: (parse_vector_element) Fix order of
1583         arguments in call to expr_allocate_binary().
1584
1585 Sun Mar  6 17:51:05 2005  Ben Pfaff  <blp@gnu.org>
1586
1587         * expressions/optimize.c: (optimize_tree) Fix optimization bug for
1588         x**2.
1589
1590         * expressions/parse.c: (type_coercion_core) Set *node to NULL on
1591         failure, as indicated by function comment.
1592         (parse_binary_operators) Always return NULL on type_coercion()
1593         failure.  Should have been doing this anyway, but bug in
1594         type_coercion_core() filtered through.
1595         (parse_add) Fix typo in user message.
1596         (parse_primary) Understand T_NEG_NUM and T_POS_NUM.
1597
1598 Sun Mar  6 10:47:13 2005  Ben Pfaff  <blp@gnu.org>
1599
1600         * expressions/operations.def: Add VALUE function.
1601
1602         * expressions/parse.c: (parse_function) Need an unary composite
1603         node for variables in A TO B, not a variable node.  Use
1604         allocate_unary_variable().
1605         (parse_primary) Use allocate_unary_variable().
1606         (allocate_unary_variable) New function.
1607
1608 Thu Mar  3 23:53:32 2005  Ben Pfaff  <blp@gnu.org>
1609
1610         * expressions/PSPP_expressions.pm: Renamed it back to generate.pl
1611         but fixed the real problem that was preventing the build from a
1612         separate directory.  I liked it my way better ;-)
1613         
1614 Thu Mar  3 23:17:51 2005  Ben Pfaff  <blp@gnu.org>
1615
1616         * expressions/parse.c: (expr_parse) Fix parameter type.  Thanks to
1617         John Darrington <john@darrington.wattle.id.au> for reporting this
1618         bug.
1619
1620 Thu Mar  3 22:10:25 WST 2005 John Darrington <john@darrington.wattle.id.au>
1621
1622         * expressions/Makefile.am expressions/evaluate.h.pl
1623           expressions/evaluate.inc.pl expressions/operations.h.pl
1624           expressions/optimize.inc.pl expressions/parse.inc.p:
1625
1626           Renamed generate.pl to PSPP_expressions.pm and adjusted *.pl
1627           to suit. 
1628
1629           Fixed everything so that it can be built from an arbitrary
1630           directory.
1631         
1632 Thu Mar  3 22:08:35 WST 2005 John Darrington <john@darrington.wattle.id.au>
1633
1634         * Makefile.am : Fixed up CLEANFILES target.
1635
1636 Mon Feb 28 23:49:56 2005  Ben Pfaff  <blp@gnu.org>
1637
1638         * str.h: Changed `struct len_string' to `struct fixed_string', a
1639         more accurate name.  Updated all references.
1640
1641 Mon Feb 28 23:35:30 2005  Ben Pfaff  <blp@gnu.org>
1642
1643         Redo calendar support.  Should now be bug-for-bug compatible.
1644         
1645         * calendar.c: New file.
1646
1647         * calendar.h: New file.
1648
1649         * data-in.c: Use new calendar functions.
1650         (parse_sign) Change sense of return value.
1651         (calendar_error) New function.
1652         (ymd_to_ofs) New function.
1653         (ymd_to_date) New function.
1654         (parse_DATE) Use new function.
1655         (parse_ADATE) Ditto.
1656         (parse_EDATE) Ditto.
1657         (parse_SDATE) Ditto.
1658         (parse_JDATE) Ditto.
1659         (parse_QYR) Ditto.
1660         (parse_MOYR) Ditto.
1661         (parse_WKYR) Ditto.
1662         (parse_TIME) Ditto.
1663         (parse_DTIME) Ditto.
1664         (parse_DATETIME) Ditto.
1665
1666         * data-out.c: (convert_date) Use new calendar functions.
1667
1668         * error.c: (err_vmsg) Changed interface to be more sensible.
1669         Updated all callers.
1670         (dump_message) Don't double new-lines (why did we do this
1671         anyway?).
1672
1673 Mon Feb 28 23:30:25 2005  Ben Pfaff  <blp@gnu.org>
1674
1675         * sfmP.h: (macro flt64) Moved here from pref.h.orig.
1676         (macro FLT64_MAX) Moved here from pref.h.orig.
1677
1678 Mon Feb 28 23:28:01 2005  Ben Pfaff  <blp@gnu.org>
1679
1680         * set.q: Support SET EPOCH.
1681         (static var set_epoch) New var.
1682         (aux_stc_custom_epoch) New function.
1683         (stc_custom_epoch) New function.
1684         (get_epoch) New function.
1685         (stc_custom_pager) [USE_INTERNAL_PAGER] Fix bug.
1686
1687         * format.c: Make it possible just to check whether a specifier is
1688         valid without emitting an error message.
1689         (parse_format_specifier_name) Change interface, update all
1690         callers.
1691         (check_input_specifier) Ditto.
1692         (check_output_specifier) Ditto.
1693         (parse_format_specifier) Ditto.
1694
1695 Mon Feb 28 23:24:08 2005  Ben Pfaff  <blp@gnu.org>
1696
1697         * command.def: Add DEBUG POOL.
1698
1699         * pool.c: (pool_destroy) Fix bug in deleting this pool from its
1700         parent.
1701         (pool_clear) Properly account for size of pool gizmo.
1702         (pool_realloc) Ditto.
1703         (pool_clone) New function.
1704
1705         * pool.h: Mark our allocation functions MALLOC_LIKE.
1706
1707 Mon Feb 28 23:21:26 2005  Ben Pfaff  <blp@gnu.org>
1708
1709         * Makefile.am: Move many definitions into new top-level
1710         Make.build.  Add expressions to SUBDIRS.  Add calendar.c,
1711         calendar.h.  Remove expr-evl.c, expr-opt.c expr-prs.c, expr.h,
1712         exprP.h, expr.def.
1713
1714         * case.c: (case_resize) New function.
1715         (case_swap) New function.
1716
1717         * casefile.c: Include mkfile.h.
1718
1719 Fri Feb 25 21:11:35 WST 2005 John Darrington <john@darrington.wattle.id.au>
1720
1721         * sfm-read.c: Fixed a buglet which caused a crash when trying
1722         to read a non-existent file.
1723
1724 Sun Feb 13 16:11:13 2005  Ben Pfaff  <blp@gnu.org>
1725
1726         Fix bug 11955.
1727
1728         * aggregate.c: (parse_aggregate_functions) Code cleanup.
1729         Important part: get rid of spurious copying of function->format to
1730         destvar->print and destvar->write.
1731
1732 Fri Feb 11 00:08:36 2005  Ben Pfaff  <blp@gnu.org>
1733
1734         Fix bug 11916, which was confusing a variable's `index' member
1735         with the variable's position in a var_set.  Although these are
1736         usually the same, they are not for array `var_set's.
1737         
1738         Took advantage of this bug as an opportunity to clean up and
1739         rewrite parse_var_set_vars().
1740
1741         * vars-prs.c: (parse_vs_variable_idx) New function.
1742         (parse_vs_variable) Reimplement in terms of
1743         parse_vs_variable_idx().
1744         (parse_var_idx_class) New function.
1745         (add_variable) New function.
1746         (add_variables) New function.
1747         (parse_var_set_vars) Rewritten.
1748         (struct var_set) Change `lookup_var' member that returns a
1749         variable into `lookup_var_idx' member that returns an int.
1750         Updated the var set implementations in obvious corresponding ways.
1751         Used compare_var_ptr_names(), hash_var_ptr_name() just added.
1752         
1753 Fri Feb 11 00:06:03 2005  Ben Pfaff  <blp@gnu.org>
1754
1755         Use our global variable compare & hash functions and give them
1756         better names.  Add similar functions for dealing with double
1757         pointers to variables.
1758         
1759         * vars-atr.c: (compare_variables) Renamed compare_var_names().
1760         (hash_variable) Renamed hash_var_name().
1761         (compare_var_ptr_names) New function.
1762         (hash_var_ptr_name) New function.
1763         
1764         * t-test.q: (cmd_t_test) Use global compare_var_names(),
1765         hash_var_name().
1766         (compare_var_name) Removed.
1767         (hash_var_name) Removed.
1768
1769 Fri Feb 11 00:04:39 2005  Ben Pfaff  <blp@gnu.org>
1770
1771         Fix dictionary bug.
1772         
1773         * dictionary.c: (compare_variable_dblptrs) Rename
1774         compare_var_ptrs() and fix it to properly dereference the double
1775         pointers.
1776
1777 Mon Feb  7 09:58:15 WST 2005 John Darrington <john@darrington.wattle.id.au>
1778
1779         crosstabs.q examine.q oneway.q q2c.c:  Added a q2c feature to 
1780         declare subcommands as mandatory.  Closed bug #11843
1781
1782 Sat Feb  5 20:35:10 WST 2005 John Darrington <john@darrington.wattle.id.au>
1783         
1784         * getline.c command.[ch] command.def:  Added (very rudimentary)
1785         support for line  completion when in interactive mode.  Partially 
1786         addresses bug #11693
1787         
1788 Mon Jan 31 09:52:51 WST 2005 John Darrington <john@darrington.wattle.id.au>
1789
1790         * examine.q factor_stats.c oneway.q output.c pfm-read.c: Fixed some
1791         problems revealed by valgrind.
1792
1793
1794 Wed Jan 26 11:44:11 WST 2005 John Darrington <john@darrington.wattle.id.au>
1795
1796         * set.q: Affixed a fix to the previous fix such that we'll be OK now
1797         whether or not PAGER is set.
1798
1799 Wed Jan 26 09:25:54 WST 2005 John Darrington <john@darrington.wattle.id.au>
1800
1801         * set.q: Copied the string produced by getenv("PAGER") thus avoiding
1802         "invalid free" errors.  Hopefully fixes bug #11722
1803
1804         * compute.c expr-prs.c: Check that lvalues are populated before 
1805         attempting to destroy them.  Closes bug #11676
1806
1807 Tue Jan 25 21:01:43 WST 2005 John Darrington <john@darrington.wattle.id.au>
1808
1809         * aggregate.c: Initialised the complete agr_proc structure.
1810         Closes bug #11675
1811
1812
1813 Sun Jan 23 23:02:21 2005  Ben Pfaff  <blp@gnu.org>
1814
1815         * print.c: (print_trns_free) Close the dfm writer if there is one,
1816         fixing a memory leak.
1817
1818 Mon Jan 24 12:24:36 WST 2005 John Darrington <john@darrington.wattle.id.au>
1819
1820         * glob.c oneway.q q2c.c t-test.q vfm.c: Still *more* memory leaks 
1821         fixed.
1822
1823
1824 Fri Jan 21 19:54:14 WST 2005 John Darrington <john@darrington.wattle.id.au>
1825
1826         * linked-list.[ch] Added
1827
1828         * examine.q file-handle.[hq] font.h glob.c groff-font.c postscript.c 
1829           set.q:    Yet more memory leaks
1830
1831 Tue Jan 18 23:12:40 WST 2005 John Darrington <john@darrington.wattle.id.au>
1832
1833         * t-test.q examine.q : More memory leaks fixed.
1834
1835 Tue Jan 18 19:26:59 WST 2005 John Darrington <john@darrington.wattle.id.au>
1836
1837         * examine.q  factor_stats.[ch] get.c pfm-read.c: Plugged numerous
1838         memory leaks.
1839
1840 Mon Jan 10 14:43:45 WST 2005 John Darrington <john@darrington.wattle.id.au>
1841
1842         * ascii.c cartesian.c casefile.c chart.h devind.c 
1843           examine.q frequencies.q
1844           html.c output.h piechart.c plot-chart.c plot-hist.c
1845
1846           Integrated the chart rendering into the output stream
1847           (currently only works for html).
1848           
1849           Removed gratuitous use of ifndef NO_CHARTS, and replaced with
1850           dummy-chart.c for compiling without charts.
1851
1852         * mkfile.[ch] Created.  
1853
1854         * som.[ch] tab.[ch]: Changed name of som_table to som_entity
1855         Added type element so we can tell if it's a chart or a table.
1856
1857         * chart.h examine.q piechart.c plot-chart.c plot-hist.c: changed the 
1858         API of charts to be more like that of tables.
1859
1860 Thu Jan 13 21:00:02 WST 2005 John Darrington <john@darrington.wattle.id.au>
1861
1862         * casefile.c main.c: Moved the SIGINT handler from casefile.c to
1863         main.c. Removed the handler for SIGQUIT.
1864
1865 Mon Jan 10 14:43:45 WST 2005 John Darrington <john@darrington.wattle.id.au>
1866
1867         * casefile.c: Added a signal handler to delete temp files on 
1868         SIGINT and SIGQUIT
1869
1870         * permissions.c Inhibited the PERMISSIONS command when SAFER is on.
1871
1872         * command.def Added a lot more unimplemented commands.
1873
1874         * copyleft.[ch] cmdline.c Moved legal information to copyleft.c
1875
1876 Sat Jan  8 23:58:34 2005  Ben Pfaff  <blp@gnu.org>
1877
1878         * sort.c: (compare_initial_runs) Needed additional level of
1879         dereferencing.
1880         (merge_once) Fix plenty of stupid mistakes.
1881
1882 Sat Jan  8 23:55:27 2005  Ben Pfaff  <blp@gnu.org>
1883
1884         * casefile.c: (casefile_sleep) Need to flush_buffer() after
1885         calling casefile_to_disk() or we will lose the last block in the
1886         file if the casefile started out as disk-based.
1887         (casefile_get_reader) Initialize reader->destructive to 0.
1888         (cmd_debug_casefile) Add new test pattern.
1889         (test_casefile) Define new test pattern to make sure
1890         casefile_sleep() works properly.
1891
1892 Fri Jan  7 08:00:05 WST 2005 John Darrington <john@darrington.wattle.id.au>
1893
1894         * Makefile.am chart.[ch]  histogram.[ch] piechart.c (Modified);
1895           plot-hist.c plot-chart.c (Added) Reorganised these files in an
1896           attempt to seperate the creation and processing of charts from their
1897           actuall renedering.
1898
1899         * examine.q frequencies.q generated charts conditional upon the NO_CHARTS
1900           macro.
1901
1902 Thu Jan  6 18:48:58 WST 2005 John Darrington <john@darrington.wattle.id.au>
1903
1904         * main.c Added a signal handler for SIGFPE
1905
1906         * sort.c Somewhat more robust fix to the previous entry.
1907
1908 Wed Jan  5 21:23:31 2005  Ben Pfaff  <blp@gnu.org>
1909
1910         * sort.c: (merge) Fix assertion for proper Huffman merge pattern:
1911         0 == 1 modulo 1.  See Knuth 5.4.9 (vol. 3, 2nd ed.,
1912         pp. 361).  Thanks to John Darrington <john@cellform.com.au> for
1913         reporting the bug.
1914
1915 Wed Jan  5 22:42:26 WST 2005 John Darrington <john@darrington.wattle.id.au>
1916
1917         * case.h Fixed bug # 11307
1918         
1919 Wed Jan  5 08:30:48 WST 2005 John Darrington <john@darrington.wattle.id.au>
1920
1921         * val-labs.c Fixed bug which caused a crash if VALUE LABELS had
1922         a trailing slash.
1923
1924 Mon Jan  3 17:44:37 2005  Ben Pfaff  <blp@gnu.org>
1925
1926         * pfm-read.c: (read_variables) Remove direct manipulation of
1927         v->aux, which is no longer needed.  Fixes bug 11483.
1928
1929 Sat Jan  1 19:01:16 WST 2005 John Darrington <john@darrington.wattle.id.au>
1930
1931         * data-list.c Fixed a bug in parsing delimiters.
1932
1933         * group.c vars-atr.c Fixed buglet in hash/compare functions for alpha
1934         values.
1935
1936         * percentiles.c Properly handled calculation of Tukey hinges where
1937         the number of data is small.
1938
1939         * oneway.q Used the generic value_to_string function for independent
1940         variable instead of trying to do it ourselves.
1941
1942         * box-whisker.c Fixed a buglet which caused a crash if the number of
1943         data was zero
1944
1945
1946 Fri Dec 31 16:47:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1947
1948         * examine.q box-whisker.c chart.h Implemented boxplots in EXAMINE
1949
1950         * percentiles.c Fixed some bugs when calculating percentiles when
1951         there's a small number of cases.
1952
1953 Wed Dec 29 08:18:08 WST 2004 John Darrington <john@darrington.wattle.id.au>
1954
1955         * percentiles.[ch] Added. Calculates percentiles and Tukey hinges
1956
1957         * examine.q factor_stats.[ch]  Added calculation of percentiles
1958
1959 Fri Dec 24 15:09:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
1960
1961         * t-test.q Fixed bug #11227 Made t-test work when the independent
1962         variable is alpha
1963
1964 Sat Dec 11 11:43:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1965
1966         * factor_stats.c Fixed calculation of trimmed mean under various
1967         special conditions.
1968
1969 Sat Dec  4 17:14:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1970
1971         * histogram.c chart.[ch] factor_stats.c frequencies.q
1972
1973         Added code to calculate sensible histogram ranges and limits.
1974
1975 Thu Dec  2 13:37:43 WST 2004 John Darrington <john@darrington.wattle.id.au>
1976
1977         * chart.h Updated to reflect many API changes.
1978
1979         * cartesian.c chart.c Moved the definitions of chart_write_{xy}scale from 
1980         cartesian.c and into chart.c
1981
1982         * factorstats.[ch] Added the histogram calculations
1983
1984         * casefile.c Removed an unused variable.
1985
1986         * frequencies.q examine.q histogram.c  Reworked the API for 
1987         histograms.
1988
1989         * piechart.c  Revised the API for piecharts.
1990
1991         * var.h  Moved the definitions of freq_tab and freq out of var.h
1992         and into frequencies.q where they belong.
1993         
1994 Tue Nov 30 21:10:20 2004  Ben Pfaff  <blp@gnu.org>
1995
1996         * flip.c: (flip_file) Check for off_t separately from fseeko(),
1997         using AC_TYPE_OFF_T.
1998
1999 Tue Nov 30 08:47:41 2004  Ben Pfaff  <blp@gnu.org>
2000
2001         * flip.c: (flip_file) If fseeko() is not available, use long int
2002         for off_t.  Thanks to "Marshall DeBerry" <mdb@radix.net> for
2003         reporting the problem.
2004
2005 Mon Nov 29 12:20:59 WST 2004 John Darrington <john@darrington.wattle.id.au>
2006
2007         * examine.q factor_stats.[ch] Changed stderr to se_mean to avoid
2008         conflict with stdio.
2009
2010 Sun Nov 21 10:32:41 WST 2004 John Darrington <john@darrington.wattle.id.au>
2011
2012         * var-labs.c (var_to_string) Now returns null if the variable is null
2013
2014         * value-labels.c (value_to_string) Made it return null if either the 
2015         value or the variable is null.
2016
2017         * hash.c (hsh_clear) Fixed a buglet.
2018
2019         * examine.q  factor_stats.[ch] Largely  rewrote, because I'd started 
2020         with  the wrong model.
2021
2022         * casefile.[ch] Added a function to return the casereader.case_idx 
2023         member
2024
2025         * examine.q  Implemented the extreme values results.
2026
2027 John Darrington <john@darrington.wattle.id.au>
2028
2029         * settings.h set.c glob.[ch] frequencies.q q2c.c error.c lexer.[ch] 
2030           output.[ch] getline.c 
2031
2032           Plugged some memory leaks
2033
2034 Mon Nov 15 23:47:40 2004  Ben Pfaff  <blp@gnu.org>
2035
2036         Adopt GSL random number generators, paving the way for providing
2037         the complete suite of random number generators on expressions.
2038         
2039         * Makefile.am: Remove random.c, random.h.
2040
2041         * random.c: Removed.
2042
2043         * random.h: Removed.
2044
2045         * algorithm.c: (algo_default_random) Use GSL functions.
2046
2047         * casefile.c: (test_casefile) Use GSL RNG functions.
2048
2049         * expr-evl.c: (expr_evaluate) Use GSL RNG functions for OP_NORMAL,
2050         OP_UNIFORM.
2051
2052         * sample.c: (cmd_sample) Use GSL RNG functions.
2053         (sample_trns_proc) Ditto.
2054
2055         * set.q: (static var set_seed) Removed.
2056         (static var seed_flag) Removed.
2057         (static var rng) New variable.
2058         (aux_stc_custom_seed) No seed value anymore, don't print anything.
2059         (stc_custom_seed) Use new seed functions.
2060         (seed_is_set) Removed.
2061         (get_rng) New function that composes the entire external
2062         interface.
2063         (set_rng) New function.
2064         (random_seed) New function.
2065
2066 Mon Nov 15 22:08:25 2004  Ben Pfaff  <blp@gnu.org>
2067
2068         * expr-evl.c: (expr_evaluate) Fix XDATE.JDAY formula.  Thanks to
2069         John Darrington <john@darrington.wattle.id.au> for reporting this
2070         bug.
2071
2072 Tue Nov 16 13:19:18 WST 2004 John Darrington <john@darrington.wattle.id.au>
2073
2074         * permissions.c command.def Added the PERMISSIONS command
2075
2076 Mon Nov 15 01:33:32 2004  Ben Pfaff  <blp@gnu.org>
2077
2078         * q2c.c: (dump_header) Don't try to emit #includes at very top of
2079         output file because that will precede #include <config.h>, which
2080         is bad.
2081         (main) Add needed headers to /* (header) */ code.
2082
2083 Mon Nov 15 01:21:36 2004  Ben Pfaff  <blp@gnu.org>
2084
2085         Instead of making system or portable file readers responsible for
2086         dropping and reordering variables, make them read full cases and
2087         let the caller take care of any changes.
2088
2089         * get.c: New "case map" structure to handle this.  Use for GET,
2090         IMPORT, MATCH FILES.  Essentially rewrite the whole file.
2091
2092         * pfm-read.c: (pfm_read_case) Read into provided case.  Signature
2093         changed appropriately.
2094
2095         * sfm-read.c: (sfm_read_case) Ditto.
2096
2097 Mon Nov 15 00:47:45 2004  Ben Pfaff  <blp@gnu.org>
2098
2099         Decided that case_serialize() and case_unserialize() were too
2100         abstract.  Also we need a couple more functions to avoid excessive
2101         copying for data in/out fast paths.
2102
2103         * case.c: (case_serial_size) Removed.
2104         (case_serialize) Rename case_to_values() and make its argument
2105         explicitly an array of union values.
2106         (case_unserialize) Rename case_from_values() and make its argument
2107         explicitly an array of union values.
2108         (case_data_all) New function.
2109         (case_data_all_rw) New function.
2110
2111         * casefile.c: (struct casefile) Change buffer from array of
2112         unsigned char to array of union value for better accuracy.
2113         Redefine buffer_used and buffer_size in terms of values, not
2114         bytes.  Remove case_size because it is now redundant with
2115         value_cnt.  Fix up all references to these members.
2116
2117 Mon Nov 15 00:45:46 2004  Ben Pfaff  <blp@gnu.org>
2118
2119         * barchart.c: (struct subcat) Make `label' member const to silence
2120         GCC warning with -Wwrite-strings.
2121
2122         * cartesian.c: (struct dataset) Ditto.
2123
2124         * case.c: Don't re-define NDEBUG if already defined.
2125         Add lots of comments.
2126
2127         * str.c: Fix includes.
2128
2129         * crosstabs.q: Fix includes.
2130
2131         * examine.q: Fix includes.  Fix GCC warning about unused
2132         variables.
2133         
2134         * frequencies.q: (stat macro) Removed and replaced where used by
2135         its expansion.
2136
2137         * list.q: Fix includes.
2138
2139         * oneway.q: Fix includes.
2140
2141         * piechart.c: Fix includes.  Only define M_PI if not already
2142         defined.
2143
2144         * sfm-read.c: (bswap) New function.
2145         (bswap_int32) Write in terms of bswap.
2146         (bswap_flt64) Ditto.
2147
2148         * str.c: (ds_data) Add external definition here, needed because
2149         str.h has only an `extern inline' version.
2150
2151         * value-labels.c: Fix includes.
2152
2153 Mon Nov 15 00:40:55 2004  Ben Pfaff  <blp@gnu.org>
2154
2155         Instead of providing a system or portable file writer with a raw
2156         case in the format needed for output, provide it with a regular
2157         case.  The writer takes care of any needed translation.
2158
2159         * aggregate.c: Adopt new scheme for AGGREGATE.
2160         (struct agr_proc) sfm_agr_case member removed.
2161         (write_case_to_sfm) Removed because the new interface is easier to
2162         use.
2163
2164         * get.c: Adopt new scheme for SAVE, XSAVE, EXPORT.
2165
2166         * pfm-write.c: Implement new scheme.
2167
2168         * sfm-write.c: Ditto.
2169
2170 Mon Nov 15 00:32:24 2004  Ben Pfaff  <blp@gnu.org>
2171
2172         Instead of treating `struct file_handle' as a class to subclass
2173         into data files, system files, and portable files, instead use it
2174         as a helper that coordinates access.  Now it is opaque, too.
2175
2176         This means that most references to a struct file_handle are now
2177         changed into references to one of struct dfm_reader, struct
2178         dfm_writer, struct sfm_reader, struct sfm_writer, struct
2179         pfm_reader, or struct pfm_writer, according to what's being read
2180         or written.
2181
2182         Most related changes are only worth summarizing briefly.
2183
2184         * dictionary.c: (dict_clear) Destroy aux data in deleted
2185         variables.
2186         (dict_clear_aux) New function.
2187         (dict_create_var) Initialize aux, aux_dtor.
2188         (dict_delete_var) Destroy aux data in deleted variable.
2189
2190         * file-handle.h: (struct fh_ext_class) Removed.
2191         (struct file_handle) Removed.
2192         (fh_init_files) Removed.
2193
2194         * file-handle.q: Changed references to a handle's `private' member
2195         to direct references.
2196         (struct private_file_handle) Renamed file_handle.
2197         Add next, open_cnt, type, open_mode, aux members.
2198         (struct file_handle_list) Removed.
2199         (extern var inline_file) Removed.
2200         (static var file_handles) Changed from file_handle_list * to
2201         file_handle *.
2202         (create_file_handle) Initialize new members.
2203         (fh_close_handle) Removed.
2204         (mode_name) New function.
2205         (fh_open) New function.
2206         (fh_close) New function.
2207         (fh_parse_file_handle) Renamed fh_parse().
2208
2209         * glob.c: (init_glob) Remove fh_init_files() call.
2210         
2211         * aggregate.c: use sfm_writer.
2212         (create_sysfile) Removed because the new interface is simpler.
2213         
2214         * apply-dict.c: Use sfm_reader.
2215
2216         * data-list.c: Use dfm_reader.
2217
2218         * file-type.c: Use dfm_reader.
2219
2220         * get.c: Use sfm_reader, sfm_writer, pfm_reader, pfm_writer.
2221
2222         * inpt-pgm.c: Use dfm_reader.
2223
2224         * print.c: Use dfm_writer.
2225
2226         * sysfile-info: Use sfm_reader.
2227
2228         * dfm-read.c: Adopt new file handle infrastructure.
2229
2230         * dfm-write.c: Ditto.
2231
2232         * pfm-read.c: Ditto.
2233         
2234         * pfm-write.c: Ditto.
2235
2236         * sfm-read.c: Ditto.
2237
2238         * sfm-write.c: Ditto.
2239         
2240 Mon Nov 15 00:31:44 2004  Ben Pfaff  <blp@gnu.org>
2241
2242         Break dictionary functions into separate header file.
2243
2244         * dictionary.h: New file.
2245
2246         * var.h: Moved dict_*() functions to dictionary.h.
2247
2248 Mon Nov 15 00:30:33 2004  Ben Pfaff  <blp@gnu.org>
2249
2250         Get rid of procedure-specific union in struct variable, using
2251         instead a void * pointer and a destructor function.
2252
2253         Most related changes are only worth brief summaries.
2254
2255         * crosstabs.q: Fix includes.  Use new struct var_range in lieu of
2256         old p.crs member in struct variable.
2257         
2258         * frequencies.q: Fix includes.  Use new struct var_freqs in lieu
2259         of old p.frq member in struct variable.
2260
2261         * histogram.c: (draw_histogram) Takes new freq_tab arg because
2262         it's no longer possible to grab this from var->p.frq.
2263
2264         * piechart.c: (draw_piechart) Ditto.
2265
2266         * group.c: (group_proc_get) New function.
2267
2268         * levene.c: Use group_proc_get() in lieu of old p.grp_data member
2269         in struct variable.
2270
2271         * oneway.q: Ditto.
2272
2273         * t-test.q: Ditto.
2274
2275         * main.c: (execute_command) Clear aux data in default_dict after
2276         each command.  (It's debatable whether this should be done.)
2277
2278         * matrix-data.c: Use new struct mxd_var in lieu of old p.mxd
2279         member in struct variable.
2280
2281         * means.q: Get rid of integer mode, which is not included in
2282         recent SPSS and was the only code that wanted per-variable private
2283         data.
2284
2285         * var.h: (struct crosstab_proc) Removed.
2286         (struct frequencies_proc) Removed.
2287         (struct list_proc) Removed.
2288         (struct get_proc) Removed.
2289         (struct means_proc) Removed.
2290         (struct matrix_data_proc) Removed.
2291         (struct match_files_proc) Removed.
2292         (lots of enums) Removed.
2293         (struct variable) Removed members `p', `get'.  Add member
2294         `aux_dtor'.
2295
2296         * vars-atr.c: (var_attach_aux) New function.
2297         (var_detach_aux) New function.
2298         (var_clear_aux) New function.
2299         (var_dtor_free) New function.
2300         (discard_variables) Use NULL instead of inline_file.
2301
2302 Fri Nov 12 10:07:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
2303
2304         * value-labs.c  Fixed the implmentation of value_to_string, so 
2305         that it properly handles alpha values.
2306
2307         * oneway.q  Changed instances where labels were being probed manually, 
2308         to use the canonical {var,value}_to_string functions
2309
2310 Thu Nov 11 21:01:31 WST 2004 John Darrington <john@darrington.wattle.id.au>
2311
2312         * examine.q cartesian.c chart.[ch]   Added normal and detrended normal
2313         plots.  Changed the API of the cartesian plot to be a much lower level
2314         thing.
2315
2316 Sun Nov  7 17:25:04 WST 2004 John Darrington <john@darrington.wattle.id.au>
2317
2318         * examine.q Added some of the parametric calculations
2319
2320         * factor_stats.[ch]  Created
2321         
2322 Sat Nov  6 21:24:31 WST 2004 John Darrington <john@darrington.wattle.id.au>
2323
2324         * examine.q  Changed the definition of factors to be a composite, and
2325         dealt with the consequences.
2326
2327 Sat Nov  6 20:40:38 WST 2004 John Darrington <john@darrington.wattle.id.au>
2328
2329         * examine.q Fixed problem where examine wasn't dealing properly with 
2330         splits
2331
2332 Sat Nov  6 14:49:47 WST 2004 John Darrington <john@darrington.wattle.id.au>
2333
2334         * oneway.q Fixed problem where oneway wasn't dealing properly with 
2335         splits
2336
2337 Thu Nov  4 11:09:01 WST 2004 John Darrington <john@darrington.wattle.id.au>
2338
2339         * q2c.c examine.q  Fixed a bug (feature?) whereby arrays in the
2340         command which had settings didn't get the appropriate code
2341         generated.
2342
2343         * val.h value-labels.[ch] var-labs.c Added v*to_string functions
2344         to convert variables/values to strings.
2345
2346         * examine.q  Added framework for the EXAMINE command.
2347
2348 Mon Nov  1 12:46:17 WST 2004 John Darrington <john@darrington.wattle.id.au>
2349
2350         * q2c.c frequencies.q set.q t-test.q  Fixed the q2c parsing of DBL 
2351         subcommand types.  Changed frequencies.q to use it rather then the 
2352         custom parser.  Dealt with the consequences.  Added a test for NTILES
2353         subcommand of frequencies.
2354
2355 Sat Oct 30 09:16:29 WST 2004 John Darrington <john@darrington.wattle.id.au>
2356
2357         * oneway.q   Fixed up the behaviour when given missing values
2358
2359         * levene.c oneway.q Fixed a buglet with the levene statistic and
2360         incorporated the levene test into the oneway command.
2361
2362         * group.h  t-test.q  Moved the CMP_EQ and CMP_LE symbols out of 
2363         global scope, since they're only relevant to T-TEST
2364
2365 Fri Oct 29 17:39:03 WST 2004 John Darrington <john@darrington.wattle.id.au>
2366
2367         * group.c group.h group_proc.h levene.c oneway.q t-test.q
2368
2369         Made the t-test more consistent
2370         with the way it handles groups.  That is, it now uses a hash instead
2371         of an array of 2.  Also, made the levene.c file independent of the 
2372         implementation of the t-test.  So now levene should be fine for both
2373         t-test and anova.
2374
2375         * Added an oneway.q file for one way anova
2376
2377 Wed Jun  2 22:08:02 2004  Ben Pfaff  <blp@gnu.org>
2378
2379         * descript.c: (cmd_descriptives) Remove harmless but bogus test in
2380         STATISTICS parsing.
2381
2382 Mon May 31 20:45:24 2004  Ben Pfaff  <blp@gnu.org>
2383
2384         Fix memory leaks.
2385
2386         * data-list.c: (cmd_data_list) Free dls->delims on lossage.
2387         (data_list_trns_free) Free dls->delims.
2388
2389         * t-test.q: (tts_custom_pairs) Free vars.
2390         (ssbox_one_sample_init) Fix tab_vline() argument.
2391         (ssbox_independent_samples_init) Ditto.
2392         (trbox_paired_init) Ditto.
2393         (trbox_one_sample_init) Ditto.
2394
2395 Mon May 31 17:19:27 2004  Ben Pfaff  <blp@gnu.org>
2396
2397         Generalize casefiles to the extent that we can use them for
2398         sorting and other kinds of data transformations.  Change cases to
2399         be copy-on-write to improve memory efficiency in common cases.
2400         Every access to a member of a `struct ccase' was changed to be a
2401         call to a case_*() function, especially case_data(), case_num(),
2402         case_str(), or case_data_rw().  Many instances of a local variable
2403         named "case_num" were changed to "case_idx" as a consequence.
2404         Many `struct ccase *' were changed to actual `struct ccase'
2405         because of copying semantics of cases.  In several places there
2406         was a choice between updating debug code to work with the new ADTs
2407         or just deleting it because it was useless; I chose to delete it.
2408  
2409         * Makefile.am: (pspp_SOURCES) Add case.c, case.h.
2410
2411         * case.c: New file.
2412
2413         * case.h: New file.
2414
2415         * aggregate.c: (struct agr_proc) Change type of `sort' to
2416         sort_criteria *.  Add `break_vars', `break_var_cnt' members.
2417         Rename `vars' to `agr_vars', all references updated.  Change
2418         `agr_case' to type `struct ccase'.
2419         (cmd_aggregate) Deal with new members.  Use case_create(),
2420         sort_active_file_in_place(), sort_active_file_to_casefile().
2421         (agr_destroy) Deal with new members.
2422         (aggregate_single_case) Ditto.
2423         (dump_aggregate_info) Ditto.
2424         (initialize_aggregate_info) Ditto.
2425         (agr_to_active_file) Ditto.
2426         (presorted_agr_to_sysfile) Ditto.
2427         (sort_agr_to_sysfile) Removed.
2428
2429         * alloc.c: (out_of_memory) Make non-static.
2430
2431         * alloc.h: Prototype out_of_memory().
2432
2433         * casefile.c: Switched from a linked list in-memory representation
2434         to a two-level array-style representation.  The linked list was
2435         appropriate when we could stick a header onto cases, but that's no
2436         longer the case.  Also, the two-level array will allow for random
2437         in-memory access in case that's ever wanted.  Also added the
2438         concept of a `destructive casereader', one that destroys cases in
2439         the underlying casefile as they are read out.
2440         (macro CASES_PER_BLOCK) New macro.
2441         (struct casefile) New members `value_cnt', `case_list_size',
2442         `case_acct_size', `being_destroyed', `cases'.  Removed `head',
2443         `tail'.
2444         (struct casereader) Removed `cur'.  Added `destructive', `c'.
2445         (global var casefiles) Made static.
2446         (static var case_bytes) New var.
2447         (casefile_create) Takes a value count, not a case size in bytes,
2448         to conform to the case interface.  All callers updated.  Deal with
2449         new and removed members.
2450         (casefile_destroy) Deal with new and removed members.
2451         (casefile_sleep) New function.
2452         (casefile_get_case_size) Removed.
2453         (casefile_get_value_cnt) New function.
2454         (casefile_append) Rewritten to deal with new and removed members.
2455         (casefile_append_xfer) New function.
2456         (write_case_to_disk) Use case_serialize().
2457         (call_posix_fadvise) Removed because posix_fadvise64 segfaults.
2458         Couldn't figure out why.
2459         (casefile_to_disk) Don't call call_posix_fadvise.  Rewritten to
2460         deal with new and removed members.
2461         (merge) Removed.
2462         (merge_sort) Removed.
2463         (casefile_sort) Removed.
2464         (casefile_get_reader) Deal with new and removed members.
2465         (casefile_get_destructive_reader) New function.
2466         (reader_open_file) Make code more readable.  Create case for
2467         reader.
2468         (casereader_get_casefile) New function.
2469         (casereader_read) Deal with new and removed members.  Now returns
2470         a copy of the case, so that the caller is responsible for
2471         destroying the returned case.
2472         (casereader_read_xfer) New function.
2473         (casereader_destroy) Destroy reader's case.
2474         (test_casefile) Second arg is now a value count, all callers
2475         updated.  Now tests destructive readers too.
2476         (get_random_case) Deal with new case ADT.
2477         (write_random_case) Ditto.
2478         (read_and_verify_random_case) Ditto.
2479
2480         * crosstabs.q: Remove debug code.
2481
2482         * descript.q: (calc_descriptives) Deal with new case, casefile
2483         ADTs.
2484
2485         * dfm.c: (cmd_begin_data) There's no storage_source_class anymore.
2486
2487         * do-if.c: Remove unneeded header inclusion.
2488
2489         * expr-prs.c: Remove debug code.
2490
2491         * exprP.h: Remove debug code.
2492
2493         * flip.c: (flip_file) Use fseeko() if available.
2494
2495         * formats.c: Remove debug code.
2496
2497         * get.c: Remove debug code.
2498         (struct mtf_file) Change `input' from `union value *' to `struct
2499         ccase', all references updated.
2500
2501         * levene.c: (levene) Deal with new case, casefile ADTs.
2502
2503         * list.q: Remove debug code.
2504
2505         * loop.c: Remove debug code.
2506         
2507         * matrix-data.c: Remove debug code.
2508
2509         * means.q: Remove debug code.
2510
2511         * mis-val.c: Remove debug code.
2512
2513         * pfm-read.c: Remove debug code.
2514         (pfm_read_code) Change second arg from `union value *' to `struct
2515         ccase *', all references updated.
2516
2517         * recode.c: (string_to_long) Make first arg const.
2518         (convert_to_double) Ditto.
2519
2520         * repeat.c: Remove debug code.
2521
2522         * sample.c: Remove debug code.
2523
2524         * sfm-read.c: Remove debug code.
2525         (sfm_read_case) Change second arg from `union value *' to `struct
2526         ccase *'.
2527
2528         * sort.c: Redone in terms of casefiles.
2529         (enum sort_direction) Moved here from sort.h.
2530         (struct sort_criterion) New structure.
2531         (struct sort_criteria) New structure.
2532         (cmd_sort_cases) Rewritten.
2533         (prepare_to_sort_active_file) New function.
2534         (sort_active_file_in_place) New function.
2535         (sort_active_file_to_casefile) New function.
2536         (parse_sort) Renamed sort_parse_criteria(), rewritten & interface
2537         changed, all callers updated.
2538         (destroy_sort_cases_pgm) Renamed sort_destroy_criteria(),
2539         rewritten & interface changed, all callers updated.
2540         (sort_cases) Renamed sort_execute(), rewritten & interface
2541         changed, all callers updated.
2542         (struct internal_sort) Removed.
2543         (do_internal_sort) Rewritten, interface changed.
2544         (destroy_internal_sort) Removed.
2545         (compare_case_dblptrs) Use sort_criteria instead of sort_case_pgm.
2546         (struct initial_run) Removed; an initial run is now just a
2547         casefile.
2548         (compare_initial_runs) Rewritten.
2549         (struct external_sort) Changed almost completely.
2550         (do_external_sort) Rewritten, interface changed.
2551         (destroy_external_sort) Rewritten.
2552         [HAVE_MKDTEMP] (make_temp_dir) Removed.
2553         [!HAVE_MKDTEMP] (do_mkdir) Removed.
2554         [!HAVE_MKDTEMP] (make_temp_dir) Removed.
2555         (init_external_sort) Removed.
2556         (simulate_error) Removed.
2557         (rmdir_temp_dir) Removed.
2558         (get_temp_file_name) Removed.
2559         (open_temp_file) Removed.
2560         (close_temp_file) Removed.
2561         (remove_temp_file) Removed.
2562         (write_temp_file) Removed.
2563         (read_temp_file) Removed.
2564         (struct record_run) Change `record' from `struct case_lit *' to
2565         `struct ccase'.
2566         (struct initial_run_state) Remove `idx_to_fv', `free_list',
2567         `file_idx', `output_file'.  Add `run', casefile'.  Change
2568         `last_output' from `struct case_list *' to `struct ccase'.
2569         (write_initial_runs) Change interface, rewrite.
2570         (sort_sink_write) Renamed process_case(), changed interfaced,
2571         rewrote.
2572         (destroy_initial_run_state) Rewritten.
2573         (allocate_cases) Rewritten.
2574         (compare_record) Interface changed, rewritten.
2575         (start_run) Rewritten.
2576         (end_run) Rewritten.
2577         (output_record) Rewritten.
2578         (grab_case) Removed.
2579         (release_case) Removed.
2580         (struct merge_case) Change `cases' from double pointer to single
2581         pointer.
2582         (merge) Deal with new case and casefile ADTs.
2583         (struct run) Removed.
2584         (merge_once) Rewritten, interface changed.
2585         (fill_run_buffer) Removed.
2586         (sort_sink_make_source) Removed.
2587         (sort_sink_class) Removed.
2588         (struct sort_source_aux) Removed.
2589         (sort_source_read_helper) Removed.
2590         (sort_source_read) Removed.
2591         (read_sort_output) Removed.
2592         (read_internal_sort_output) Removed.
2593         (read_external_sort_output) Removed.
2594         (sort_source_destroy) Removed.
2595         (sort_source_class) Removed.
2596
2597         * sort.h: (struct sort_cases_pgm) Removed.
2598         (enum sort_direction) Moved to sort.c.
2599
2600         * t-test.q: (calculate) Deal with new case, casefile ADTs.
2601
2602         * tab.c: Remove debug code.
2603
2604         * var-labs.c: Remove debug code.
2605
2606         * var.h: (struct ccase) Removed.
2607         (struct case_list) Removed.
2608
2609         * vars-atr.c: (discard_variables) Use free_case_source().
2610
2611         * vars-prs.c: (parse_vs_variable) Make arg const.
2612         (parse_dict_variable) Ditto.
2613         (parse_variables) Make struct dictionary * arg const.
2614         (parse_var_set_vars) Make struct var_set * arg const.
2615         (struct var_set) Add const to some of the function pointers' args.
2616         (var_set_get_cnt) Make arg const.
2617         (var_set_get_var) Make first arg const.
2618         (var_set_lookup_var) Make first arg const.
2619         (dict_var_set_get_cnt) Make arg const.
2620         (dict_var_set_get_var) Make first arg const.
2621         (dict_var_set_lookup_var) Make first arg const.
2622         (var_set_create_from_dict) Make arg const.  Add cast to aux
2623         assignment.
2624         (struct array_var_set) Add const to var member.
2625         (array_var_set_get_cnt) Make arg const.
2626         (array_var_set_get_var) Make first arg const.
2627         (array_var_set_lookup_var) Make first arg const.
2628         (var_set_create_from_array) Make first arg const.  Insert cast.
2629
2630         * vfm.c: (struct write_case_data) Change trns_case, sink_case
2631         members from `struct ccase *' to `struct ccase'.
2632         (static var lag_queue) Change from double to single pointer.
2633         (procedure) Optimize trivial case.
2634         (internal_procedure) Deal with changed case, case_source ADTs.
2635         (create_trns_case) Changed interface, rewrote.
2636         (open_active_interface) Initialize modified lag queue.
2637         (write_case) Deal with changed case ADT.
2638         (lag_case) Deal with modified lag queue.
2639         (close_active_file) Destroy modified lag queue.
2640         Deal with changed case_source, case_sink ADTs.
2641         (destroy_storage_stream_info) Make null arg into no-op.
2642         (storage_sink_make_source) Set aux in created source.
2643         (storage_source_read) Deal with changed case, casefile ADTs.
2644         (storage_source_create) New function.
2645         (lagged_case) Rewrite.
2646         (free_case_source) New function.
2647         (free_case_sink) Rewrite.
2648         (struct split_aux_data) Changed prev_case from `struct ccase *' to
2649         `struct ccase'.
2650         (procedure_with_splits) Deal with changed prev_case.
2651         (procedure_with_splits_callback) Ditto.
2652         (multipass_split_aux_data) Changed prev_case from `struct ccase *' to
2653         `struct ccase'.
2654         (multipass_procedure_with_splits) Deal with changed prev_case.
2655         (multipass_split_callback) Ditto.
2656         
2657         
2658 Mon May 31 17:19:06 2004  Ben Pfaff  <blp@gnu.org>
2659
2660         The workspace idea didn't work out.
2661
2662         * Makefile.am: (pspp_SOURCES) Remove workspace.c, workspace.h.
2663         
2664         * workspace.c: Removed.
2665
2666         * workspace.h: Removed.
2667
2668 Sun May 30 18:35:19 2004  Ben Pfaff  <blp@gnu.org>
2669
2670         Fully implement arbitrary delimiters on DATA LIST, extending the
2671         half implementation that was already there.
2672
2673         * data-list.c: (struct data_list_pgm) Remove `delim', add
2674         `delims', `delim_cnt'.
2675         (cmd_data_list) Initialize new members.  Parse delimiters and
2676         clean up code a bit.
2677         (cut_field) Extract fields with arbitrary delimiters.  Also, fix
2678         handling of leading commas.
2679         (read_from_data_list_fixed) Expand tabs.  Adapt to new DFM
2680         interfaces.
2681         (read_from_data_list_free) Adapt to new DFM interfaces.
2682         (read_from_data_list_list) Ditto.
2683         (repeating_data_trns_proc) Ditto.
2684
2685         * dfm.c: Split up reader and writer into separate code, because
2686         they do different things.  Use struct string instead of explicit
2687         allocation code, for clarity.
2688         (enum dfm_reader_flags) New enum.
2689         (struct dfm_fhuser_ext) Removed.
2690         (struct dfm_reader_ext) New.
2691         (get_reader) New function, used by just about all the reader
2692         functions.
2693         (dfm_close) Removed.
2694         (close_reader) New function.
2695         (dfm_open_for_reading) Rewrite initialization of dfm_fhuser_ext.
2696         (dfm_open_for_writing) Ditto.
2697         (macro force_line_buffer_expansion) Removed.
2698         (count_tabs) Removed.
2699         (tabs_to_spaces) Removed.
2700         (read_record) Deal with new dfm_reader_ext.  Use struct string
2701         functions.  Don't convert tabs to spaces.
2702         (dfm_eof) New function.
2703         (dfm_get_record) Changed interface, rewrote.
2704         (dfm_expand_tabs) New function.
2705         (dfm_fwd_record) Renamed dfm_forward_record(), updated to new
2706         dfm_reader_ext, rewritten.
2707         (dfm_bkwd_record) Renamed dfm_reread_record(), updated to new
2708         dfm_reader_ext, rewritten.
2709         (dfm_set_record) Removed in favor of dfm_forward_columns().
2710         (dfm_forward_columns) New function.
2711         (dfm_get_cur_col) Renamed dfm_column_start, updated to new
2712         dfm_reader_ext, rewritten.
2713         (static var dfm_r_class) Use close_reader for the destructor.
2714         (struct dfm_writer_ext) New.
2715         (dfm_put_record) Updated to new dfm_writer_ext, rewritten.  Uses
2716         bounce buffer now instead of local allocation.
2717         (close_writer) New function.
2718         (static var dfm_writer_ext) Use close_writer for destructor.
2719         (cmd_begin_data) Adapt to new dfm_reader_ext.
2720
2721         * file-handle.q: Add support for per-file tab width.
2722         (struct private_file_handle) Add tab_width member.
2723         (q2c specifications) Add tabwidth subcommand.
2724         (cmd_file_handle) Put parsed tab width into private_file_handle.
2725         (create_file_handle) Set default tab width.
2726         (handle_get_tab_width) New function.
2727
2728         * file-type.c: (file_type_source_read) Adapt to new DFM interface.
2729
2730         * inpt-pgm.c: (reread_trns_proc) Ditto.
2731
2732         * matrix-data.c: (context) Ditto.
2733         (another_token) Ditto.
2734         (mget_token) Ditto.
2735         (force_eol) Ditto.
2736
2737 Sun May 30 18:33:59 2004  Ben Pfaff  <blp@gnu.org>
2738
2739         * casefile.c: (casefile_destroy) Fix memory leak by freeing
2740         cf->filename.
2741         (casereader_destroy) Don't close file descriptor -1.
2742
2743         * recode.c: (cmd_recode) Fix memory leak.
2744
2745         * set.q: (q2c specifications) Fix typo in user message.
2746
2747         * str.c: (st_bare_pad_len_copy) Change memcpy to memmove to avoid
2748         undefined behavior for overlapping arguments.
2749
2750 Sun May 30 18:31:48 2004  Ben Pfaff  <blp@gnu.org>
2751
2752         * casefile.c: valgrind doesn't implement posix_fadvise() yet, so
2753         don't call it when we're running under valgrind.
2754         (call_posix_fadvise) New function.
2755         (casefile_to_disk) Use call_posix_fadvise().
2756         (reader_open_file) Ditto.
2757         
2758 Sun May 30 18:20:12 2004  Ben Pfaff  <blp@gnu.org>
2759
2760         Update our string ADTs, struct string and struct len_string.  Get
2761         rid of pool support, which was largely unused.  Rename lots of
2762         functions to have more obvious or consistent names.
2763         
2764         * ascii.c: Get rid of ascii_pool.  It was only used for string
2765         allocations.
2766         (ascii_open_global) Don't create ascii_pool.
2767         (ascii_close_driver) Don't destroy ascii_pool.
2768         (ascii_postopen_driver) Don't use pool.
2769         (ascii_close_driver) Destroy strings manually.
2770
2771         * str.c: (ds_create) Remove pool argument, all references updated.
2772         (ds_init) Ditto.
2773         (ds_replace) Remove pool support, make more efficient when we
2774         don't need to reallocate.
2775         (ds_destroy) Remove pool support.
2776         (ds_rpad) New function.
2777         (ds_size) Renamed ds_capacity(), all references updated.
2778         (ds_value) Renamed ds_c_str(), all references updated.
2779         (ds_concat) Renamed ds_puts(), all references updated.
2780         (ds_concat_buffer) Renamed ds_concat(), all references updated.
2781         (ds_putchar) Renamed ds_putc(), all references updated.
2782         (ds_getline) Renamed ds_gets(), all references updated.
2783         (ls_create) Remove pool argument, all references updated.
2784         (ls_create_buffer) Ditto.
2785         (ls_destroy) Removed pool support.
2786         (ls_value) Renamed ls_c_str(), all references updated.
2787
2788         * str.h: (ls_length) [__GNUC__] Add inline version.
2789         (ls_c_str) [__GNUC__] Add inline version.
2790         (ls_end) [__GNUC__] Add inline version.
2791         (struct string) Remove pool member.  Rename `size' to `capacity',
2792         all references updated.
2793
2794         * tab.c: (text_format) Instead of using pool argument to
2795         ls_create_buffer(), call pool_register() on allocated data.
2796
2797 Mon Apr 26 22:40:07 2004  Ben Pfaff  <blp@gnu.org>
2798
2799         We're abusing the current ASCII driver by telling it to allocate a
2800         9999-line, 9999-character page in the tests.  This causes some
2801         systems to curl up and die because it allocates 20 MB of
2802         contiguous RAM.  This change alleviates at least part of the
2803         problem.  It is mostly a stop-gap until the new output system is
2804         ready.
2805         
2806         * ascii.c: (struct line) New structure.
2807         (struct ascii_driver_ext) Remove `page', `page_size', `line_len',
2808         `line_len_size', `n_output' members.  Add `lines', `lines_cap'.
2809         (ascii_preopen_driver) Initialize new members, not old ones.
2810         (ascii_close_driver) Destroy new members, not old ones.
2811         (ascii_open_page) Allocate new members, not old ones.
2812         (expand_line) Allocate room in line.
2813         (draw_line) Use new members.
2814         (ascii_line_horz) Ditto.
2815         (ascii_line_vert) Ditto.
2816         (ascii_line_intersection) Ditto.
2817         (text_draw) Ditto.
2818         (output_lines) Ditto.
2819         (ascii_close_page) Ditto.
2820
2821 Sun Apr 25 23:40:15 2004  Ben Pfaff  <blp@gnu.org>
2822
2823         * matrix.c: Dead code.  Removed.
2824
2825         * matrix.h: Dead code.  Removed.
2826
2827 Fri Apr 16 23:59:51 2004  Ben Pfaff  <blp@gnu.org>
2828
2829         Contrary to what I'd always understood, there is an efficient
2830         algorithm for deletion from a hash table populated via linear
2831         probing.  This change implements it.
2832         
2833         * hash.c: (hsh_rehash) Probe in increasing order.
2834         (hsh_probe) Ditto.
2835         (locate_matching_entry) Ditto.
2836         (hsh_delete) Use Knuth's Algorithm 6.4R for deletion.
2837
2838 Tue Apr 13 19:24:15 2004  Ben Pfaff  <blp@gnu.org>
2839
2840         * moments.c (calc_moments): Adjust calculation of kurtosis to
2841         avoid subtracting huge numbers from huge numbers, on Michael
2842         Kiefte's advice.
2843
2844 Sun Apr 11 14:22:12 2004  Ben Pfaff  <blp@gnu.org>
2845
2846         Rework moments routines for improved numerical stability based on
2847         Michael Kiefte's advice.  Any bugs or remaining numerical problems
2848         are still mine though.
2849
2850         There is now a struct moments1 for use with one-pass moments.  It
2851         uses a provisional means algorithm as an attempt to improve
2852         accuracy of higher moments.  The older struct moments now only
2853         handles two-pass moments.
2854         
2855         * aggregate.c: Use moments1 instead moments.
2856
2857         * descript.c: Revert previous change, which is no longer needed
2858         due to the moments revision.
2859
2860         * moments.c: (calc_moments) New function for calculating variance,
2861         skewness, kurtosis.
2862         (moments_pass_one) Only accumulate weights bigger than zero.
2863         (moments_calculate) Allow calculating the mean on pass one, others
2864         require pass two.  Implement in terms of calc_moments().
2865         (struct moments1) New structure.
2866         (init_moments1) New function.
2867         (moments1_clear) Ditto.
2868         (moments1_create) Ditto.
2869         (moments1_add) Ditto.
2870         (moments1_calculate) Ditto.
2871         (moments1_destroy) Ditto.
2872         (cmd_debug_moments) Deal with `struct moments' or `struct
2873         moments1' as requested by user.
2874
2875 Sun Apr 11 14:21:55 2004  Ben Pfaff  <blp@gnu.org>
2876
2877         * Makefile.am (pspp_SOURCES): Remove debug.c.
2878
2879         * debug.c: Removed.  It was empty anyway.
2880
2881 Fri Apr  9 20:04:49 2004  Ben Pfaff  <blp@gnu.org>
2882
2883         * descript.c (calc_descriptives): Fix assert failure when only
2884         MOMENT_MEAN is needed.
2885
2886 2004-04-09  Michael Kiefte  <mkiefte@dal.ca>
2887
2888         * descript.c: 
2889
2890         fixed problem with parsing in match_statistic() causing
2891         "DESCRIPTIVE STAT=MEAN." to barf.
2892
2893         "MEAN" is now default if "SORT" given without specification.
2894
2895         Fixed infinite loop with "DESCRIPT GIBBERISH=ALL."  Parsing is
2896         generally less forgiving of syntax errors: better to have it do
2897         nothing and type it in again then to not know what it actually did
2898         instead.  
2899
2900         z-score transformation now checks score for user-missing values
2901         and checks std_dev for SYSMIS.
2902
2903 2004-04-06  Michael Kiefte  <mkiefte@dal.ca>
2904
2905         * aggregate.c, crosstabs.q, descript.c, dictionary.c, frequencies.q, levene.c, t-test.q, var.h: 
2906         Changed dict_get_case_weight() to accept an additional int * flag
2907         to complain about system-missing, user-missing, zero, or negative
2908         weights and updated existing functions to pass int * to
2909         dict_get_case_weight().
2910
2911 2004-04-05  jmd  <jmd@gnu.org>
2912
2913         * main.c: Fixed configuration problems with gsl
2914
2915         * t-test.q: Fixed some problems encountered when compiling under Cygwin
2916
2917 2004-04-03  blp  <blp@gnu.org>
2918
2919         * lexer.c, ChangeLog:
2920         Fix infinite loop on comment at end of file, add test.
2921
2922 2004-04-03  jmd  <jmd@gnu.org>
2923
2924         * 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:
2925         Fixed the calculation of percentiles and added --syntax and --algorithm options
2926
2927 Sat Apr  3 11:43:37 2004  Ben Pfaff  <blp@gnu.org>
2928
2929         * lexer.c: (lex_skip_comment) Handle end-of-file correctly (I
2930         hope).
2931
2932 Sat Apr  3 15:00:18 WST 2004 John Darrington <john@darrington.wattle.id.au>
2933
2934         * frequencies.q:  Fixed the calculation of percentiles
2935
2936         * Makefile.am:  Added the --ansi flag and dealt with the
2937         consequences.  Added some entries to PSPP_sources so that
2938         make distcheck would pass
2939
2940         * cmdline.c:   Added the --syntax and --algorithm options
2941
2942         * q2c.c:  Added an implicit /ALGORITHM subcommand to everything.
2943
2944 Fri Apr  2 11:25:22 WAST 2004 John Darrington <john@darrington.wattle.id.au>
2945
2946         * t-test.q, levene.c, levene.h  Converted t-test (incl levene) to 
2947         use the new multipass_split_... mechanism.
2948
2949 Wed Mar 31 22:36:22 2004  Ben Pfaff  <blp@gnu.org>
2950
2951         * frequencies.q: (calc_stats) Use moments data structure and
2952         calc_seskew(), calc_sekurt() functions.
2953
2954         * set.q main.c settings.h Added support for --syntax and --algorithm 
2955         options
2956
2957 Tue Mar 30 22:04:19 2004  Ben Pfaff  <blp@gnu.org>
2958
2959         * vfm.c: Had to get last call to multipass_split_output() inside
2960         open_active_file()/close_active_file() pairing, so introduce new
2961         function.
2962         (internal_procedure) Move procedure() code here, except for calls
2963         to open_active_file() and close_active_file().
2964         (procedure) Wrap open_active_file() and close_active_file() around
2965         internal_procedure().
2966         (multipass_procedure_with_splits) Wrap open_active_file() and
2967         close_active_file() around internal_procedure().
2968
2969 Tue Mar 30 22:01:57 2004  Ben Pfaff  <blp@gnu.org>
2970
2971         * descript.c: (cmd_descriptives) Free `vars' to avoid memory leak.
2972
2973 Mon Mar 29 16:26:40 2004  Ben Pfaff  <blp@gnu.org>
2974
2975         * debug.c: Removed.  Moved cmd_debug_evaluate() into expr-evl.c.
2976
2977         * expr-evl.c: (cmd_debug_evaluate) Moved here from debug.c.
2978
2979 Mon Mar 29 16:03:08 2004  Ben Pfaff  <blp@gnu.org>
2980
2981         * algorithm.c: By default turn off some of the more expensive
2982         assertions.
2983         (expensive_assert) New macro which expands to assert if
2984         EXTRA_CHECKS is defined, to nothing otherwise.
2985         (unique) Use expensive_assert().
2986         (binary_search) Ditto.
2987         (push_heap) Ditto.
2988         (pop_heap) Ditto.
2989         (make_heap) Ditto.
2990         (sort_heap) Ditto.
2991
2992         * command.c: (conflicting_3char_prefixes) Words that are the same
2993         don't cause conflicts when they are abbreviated to the first three
2994         letters.
2995
2996         * expr-evl.c: (CONCAT_func) Fix memory leak by incrementing struct
2997         nonterm_node's n earlier.
2998         (generic_str_func) Ditto.
2999         
3000 Mon Mar 29 15:32:17 2004  Ben Pfaff  <blp@gnu.org>
3001
3002         Add support for multipass procedures.  Rewrite DESCRIPTIVES to
3003         test multipass support, take advantage of new moments
3004         calculation, and to not be such crappy code.  Get rid of q2c
3005         processing for DESCRIPTIVES.
3006
3007         * vfm.c: (struct multipass_split_aux_data) New structure.
3008         (multipass_procedure_with_splits) New function.
3009         (multipass_split_callback) New function.
3010         (multipass_split_output) New function.
3011         * descript.q: Removed.
3012
3013         * descript.c: New file.
3014
3015         * var.h: Removed descriptives enums.
3016         (struct descriptives_proc) Removed.
3017         (struct variable) Removed p.dsc.
3018
3019         * Makefile.am: (q_sources_c) Remove descript.c.
3020         (q_sources_q) Removed descript.q.
3021         
3022 Mon Mar 29 15:31:55 2004  Ben Pfaff  <blp@gnu.org>
3023
3024         New manager for keeping track of used workspace.
3025         
3026         * workspace.c: New file.
3027
3028         * workspace.h: New file.
3029
3030         * Makefile.am: (pspp_SOURCES) Add workspace.c, workspace.h.
3031
3032         * sort.c: (do_internal_sort) Use workspace_malloc().
3033         (destroy_internal_sort) Use workspace_free().
3034
3035 Mon Mar 29 15:31:08 2004  Ben Pfaff  <blp@gnu.org>
3036
3037         New `struct casefile' for managing sets of cases.
3038
3039         * casefile.c: New file.
3040
3041         * casefile.h: New file.
3042
3043         * command.def: Add DEBUG CASEFILE command.
3044
3045         * Makefile.am: (pspp_SOURCES) Add casefile.c, casefile.h.
3046
3047         * sort.c: (sort_cases) Move logic for sending storage file to disk
3048         into do_external_sort().
3049         (struct internal_sort) Use an array of ccase pointers instead of a
3050         case_list.
3051         (do_internal_sort) Rewrite to handle casefiles.
3052         (compare_case_list) Removed.
3053         (compare_cases) New function.
3054         (compare_case_dblptrs) New function.
3055         (read_internal_sort_output) Deal with new struct internal_sort.
3056
3057         * vfm.c: (static var workspace_overflow) Removed.
3058         (struct storage_stream_info) Removed all the members.  Added
3059         struct casefile * member.
3060         (storage_sink_open) Use casefile.
3061         (open_storage_file) Removed.
3062         (write_storage_file) Removed.
3063         (storage_to_disk) Removed.
3064         (destroy_storage_stream_info) Use casefile.
3065         (storage_sink_write) Use casefile.
3066         (storage_sink_make_source) Use casefile.
3067         (storage_source_count) Use casefile.
3068         (storage_source_read) Use casefile.
3069         (storage_source_on_disk) Removed.
3070         (storage_source_get_cases) Removed.
3071         (storage_source_set_cases) Removed.
3072         (storage_source_get_casefile) New function.
3073         
3074 Mon Mar 29 15:30:09 2004  Ben Pfaff  <blp@gnu.org>
3075
3076         New `struct moments' for calculating moments.
3077
3078         * stats.c: Removed.
3079
3080         * stats.h: Removed.
3081
3082         * moments.c: New file.
3083
3084         * moments.h: New file.
3085
3086         * command.def: Add DEBUG MOMENTS command.
3087
3088         * Makefile.am: (pspp_SOURCES) Add moments.c, moments.h.  Remove
3089         stats.c, stats.h.
3090
3091         * aggregate.c: Modify AGGREGATE to use the new moments
3092         calculation, even if not in such a great way.
3093         (struct agr_var) Add `moments' member.
3094         (parse_aggregate_functions) Set `moments' member to null.
3095         (agr_destroy) Destroy `moments' member.
3096         (accumulate_aggregate_info) Use `moments' for standard deviation.
3097         (dump_aggregate_info) Ditto.
3098         (initialize_aggregate_info) Create or clear `moments'.
3099
3100         * misc.h: Add pow2(), pow3(), pow4() functions in place of sqr(),
3101         cube(), pow4() that were in stats.h.  All references updated.
3102
3103         * crosstabs.q: stats.h had chi-square significance functions.  Use
3104         GSL instead.
3105         (display_chisq) Use gsl_cdf_chisq_Q() instead of chisq_sig().
3106
3107         * expr-evl.c: (expr_evaluate) Use moments_of_values() for
3108         OP_CFVAR, OP_MEAN, OP_SD, OP_VARIANCE.
3109                 
3110 Fri Mar 26 14:21:23 2004  Ben Pfaff  <blp@gnu.org>
3111
3112         * dictionary.c: (dict_compact_values) Compacted values need to
3113         start off from 0.
3114
3115 Fri Mar 26 00:54:57 2004  Ben Pfaff  <blp@gnu.org>
3116
3117         * var-labs.c: (cmd_variable_labels) For compatibility, don't allow
3118         `/' at start.  Check return value of parse_variables() for error
3119         return.
3120
3121 Fri Mar 26 00:19:27 2004  Ben Pfaff  <blp@gnu.org>
3122
3123         Revamp expressions: make the code a little nicer, and fix bugs
3124         found in testing.
3125         
3126         * expr-evl.c: (expr_evaluate) Make expression argument const.
3127         Support OP_ADD, OP_SUB, OP_MUL, OP_DIV instead of OP_PLUS, OP_MUL.
3128         OP_POW is missing for arg 2 <= 0.  OP_LOG is natural log, not
3129         base-10 log.  Fix OP_ANY, OP_ANY_STRING, OP_RANGE, OP_RANGE_STRING
3130         off-by-ones.  Add OP_MAX_STRING, OP_MIN_STRING.  Fix OP_TIME_HMS,
3131         OP_DATE_WKYR boundary conditions.  Add OP_CTIME_DAYS,
3132         OP_CTIME_HOURS, OP_CTIME_MINUTES, OP_CTIME_DAYS, OP_CTIME_SECONDS.
3133         Support OP_INDEX_2, OP_INDEX_3, OP_RINDEX_2, OP_RINDEX_3 instead
3134         of OP_INDEX, OP_INDEX_OPT, OP_RINDEX, OP_RINDEX_OPT.  Merge
3135         OP_LPAD_OPT into OP_LPAD, OP_RPAD_OPT into OP_RPAD, OP_LTRIM_OPT
3136         into OP_LTRIM, OP_RTRIM_OPT into OP_RTRIM, OP_NUMBER_OPT into
3137         OP_NUMBER.  Fix OP_RTRIM fragility.  Support OP_SUBSTR_2,
3138         OP_SUBSTR_3 instead of OP_SUBSTR, OP_SUBSTR_OPT.  Remove OP_INV.
3139         Simplify OP_SYSMIS.  Remove OP_STR_MIS.
3140
3141         * expr-opt.c: (optimize_expression) Rewrite.
3142         (macro n0) Removed.
3143         (macro n1) Removed.
3144         (macro n2) Removed.
3145         (macro s0) Removed.
3146         (macro s0l) Removed.
3147         (macro s1) Removed.
3148         (macro s1l) Removed.
3149         (macro s2) Removed.
3150         (macro s2l) Removed.
3151         (macro s) Removed.
3152         (macro sl) Removed.
3153         (eq_num_con) New function.
3154         (optimize_tree) New function.
3155         (macro rnc) Removed.
3156         (macro frnc) Removed.
3157         (str_search) Add const to string params.
3158         (str_rsearch) Ditto.
3159         (evaluate_tree_no_missing) Renamed from evaluate_tree.  Add num[],
3160         str[], str_len[] locals to substitute for most of removed macros.
3161         Support OP_ADD, OP_SUB, OP_MUL, OP_DIV instead of OP_PLUS, OP_MUL.
3162         Removed support for missing values because we're never called with
3163         missing values.  Use set_number() or set_number_errno() instead of
3164         rnc or frnc.  Removed any stuff that caused trouble in testing.
3165         We can re-add it later if it really slows anything.  Fix some
3166         random problems.
3167         (evaluate_tree_with_missing) Not yet supported.  To be added later
3168         if it's important.
3169         (repl_num_con) Removed.
3170         (collapse_node) New function.
3171         (force_repl_num_con) Removed.
3172         (set_number) New function.
3173         (set_number_errno) New function.
3174         (repl_str_con) Removed.
3175         (set_string) New function.
3176         (yrmoda) Tighten boundary conditions.  Adopt 2030 cut-off for
3177         2-digit years.
3178         (dump_node) No special case for OP_AND, OP_OR.
3179
3180         * expr-prs.c: (expr_prs) Honor EXPR_NO_OPTIMIZE bit.  Rewrite.
3181         (expr_get_type) New function.
3182         (type_check) Rewrite.
3183         (type_coercion) New function.
3184         (struct operator) New structure.
3185         (match_operator New function.
3186         (parse_binary_operators) New function.
3187         (parse_inverting_unary_operator) New function.
3188         (parse_or) Rewritten.
3189         (parse_and) Rewritten.
3190         (parse_not) Rewritten.
3191         (parse_rel) Rewritten.
3192         (parse_add) Rewritten.
3193         (parse_mul) Rewritten.
3194         (parse_neg) Rewritten.
3195         (parse_exp) Rewritten.
3196         (parse_sysvar) Add $TRUE, $FALSE system variables.
3197         Get $LENGTH, $WIDTH from get_viewlength(), get_viewwidth().
3198         (parse_primary) Use allocate_var_node(), allocate_num_con(),
3199         allocate_str_con().
3200         (struct function) Remove desc, change `func' prototype.
3201         (unary_func) Remove special cases.
3202         (MISSING_func) Reduce to unary_func() that just returns a boolean.
3203         (SYSMIS_func) Handle SYSMIS((x)) like SYSMIS(x).
3204         (VALUE_func) Use allocate_var_node().
3205         (nary_num_func) Allow MIN and MAX for strings.
3206         Use allocate_var_node().  Properly clean up.
3207         Fix return type.
3208         (generic_str_func) Use local table instead of removed `desc'
3209         member.  Mostly rewrite.
3210         (get_num_args) Revise error message.
3211         (parse_function) Return EXPR_ERROR, not 0 on error.
3212         (macro op) Removed.
3213         (macro varies) Removed.
3214         (ops[]) Use expr.def.
3215         (free_node) Do nothing if node is null.
3216         (allocate_num_con) New function.
3217         (allocate_str_con) New function.
3218         (allocate_var_node) New function.
3219         (allocate_binary_nonterminal) New function.
3220         (append_nonterminal_arg) Removed.
3221         (static var func_tab[]) Revised.
3222         (expr_debug_print_postfix) Make parameter const.
3223         Use printf() instead of debug_printf().
3224
3225         * expr.def: New file.
3226         
3227         * expr.h: Change PXP_* to EXPR_*, all references updated.  Also
3228         use named enum instead of unnamed, all references updated.  Add
3229         EXPR_ANY, EXPR_NO_OPTIMIZE.
3230
3231         * exprP.h: Remove EX_*.  Add DEFINE_OPERATOR.  Use expr.def
3232         instead of defining OP_* directly.
3233         (macro IS_TERMINAL) New macro.
3234         (macro IS_NONTERMINAL) New macro.
3235         (enum OP_NO_FLAGS) New.
3236         
3237 Fri Mar 26 00:18:01 2004  Ben Pfaff  <blp@gnu.org>
3238
3239         * error.c: (err_assert_fail) msg variable needs to be non-const.
3240
3241 Fri Mar 26 00:17:24 2004  Ben Pfaff  <blp@gnu.org>
3242
3243         * debug.c: (cmd_debug_evaluate) Rewrite.
3244
3245 Fri Mar 26 00:15:13 2004  Ben Pfaff  <blp@gnu.org>
3246
3247         Fix some CROSSTABS bit rot stupidity.
3248
3249         * crosstabs.q: Reorder the CELLS subcommands for compatibility.
3250         (internal_cmd_crosstabs) Initializes cells[] correctly.
3251         (float_M_suffix) Rename format_cell_entry(), change prototype,
3252         rewrite.
3253         (display_crosstabulation) Fix cell formatting.
3254
3255 Fri Mar 26 00:14:09 2004  Ben Pfaff  <blp@gnu.org>
3256
3257         Make lex_rest_of_line(), lex_entire_end() not discard lines.  Have
3258         to call lex_discard_line() to do that.
3259
3260         * command.c: (run_command) Call lex_discard_line() after
3261         lex_rest_of_line().
3262
3263         * lexer.c: (lex_entire_end) Change behavior.
3264         (lex_rest_of_line) Change behavior.  Return const char *.
3265         (lex_discard_line) Don't clear getl_buf, don't emit message.
3266
3267         * main.c: (handle_error) Emit message here.
3268
3269         * repeat.c: (internal_cmd_do_repeat) Use lex_discard_line()
3270         instead of lex_entire_line().
3271
3272         * str.c: (mm_find_reverse) Make length params size_t.  Rewrite.
3273
3274         * title.c: (get_title) Call lex_discard_line() after
3275         lex_rest_of_line().
3276         (cmd_file_label) Ditto.
3277         (cmd_document) Deal with const char * return value.
3278
3279 Fri Mar 26 00:10:16 2004  Ben Pfaff  <blp@gnu.org>
3280
3281         Removed REMARK command.
3282
3283         * command.c: (extract_prefix) Removed.
3284         (output_line) Removed.
3285         (cmd_remark) Removed.
3286
3287         * command.def: Remove REMARK.
3288
3289 Fri Mar 26 00:08:38 2004  Ben Pfaff  <blp@gnu.org>
3290
3291         Added abort() after lots of assert(0) invocations to avoid some
3292         compiler warnings.  We really need a NOT_REACHED macro.
3293
3294 Tue Mar 23 08:00:42 WAST 2004 John Darrington <john@darrington.wattle.id.au>
3295
3296         * sort.c: Added missing call to temp_file_close.  Changed error 
3297         messages to warnings.
3298
3299         * set.q: Improved setting of set_view{length,width} to be more tolerant
3300         of buggy OSes.
3301
3302 Sun Mar 21 10:11:14 WST 2004 John Darrington <john@darrington.wattle.id.au>
3303
3304         * val-labs.c: Fixed a bug where PSPP would crash, if VALUE LABELS was
3305         used with incorrect syntax.
3306
3307         * error.c, error.h et al:  Overridden definition of assert for a
3308         custom one.
3309
3310         * test-q.c: Fixed a buglet where it would crash if no /VARIABLES
3311         subcommand was given when it ought to have been.
3312
3313 Sat Mar 20 22:19:08 2004  Ben Pfaff  <blp@gnu.org>
3314
3315         * tab.c: (tab_vline) Fix assertions to respect row_ofs and
3316         col_ofs.
3317         (tab_hline) Ditto.
3318         (tab_box) Ditto.
3319         (tab_joint_text) Ditto.
3320
3321 Sat Mar 20 17:57:23 2004  Ben Pfaff  <blp@gnu.org>
3322
3323         * levene.c: Add #include.
3324
3325         * set.q: (set_viewport) Add `int' argument to make its prototype
3326         correct for signal().
3327
3328 Sat Mar 20 15:35:17 2004  Ben Pfaff  <blp@gnu.org>
3329
3330         * expr-evl.c: (expr_evaluate) Assert that `c' is nonzero before
3331         using it.
3332
3333 Sat Mar 20 15:18:16 2004  Ben Pfaff  <blp@gnu.org>
3334
3335         Changed DFM from open-at-first-access to explicit-open.  Before,
3336         calling dfm_get_record() or dfm_put_record() would automatically
3337         open the file.  Now, you have to call dfm_open_for_reading() or
3338         dfm_open_for_writing() explicitly.  This makes it possible to
3339         check permissions, file existence, etc. earlier.
3340
3341         Also made struct file_handle more opaque, and clean up in general.
3342
3343         * data-list.c: (cmd_data_list) Open handle for reading.
3344
3345         * dfm.c: (struct dfm_fhuser_ext) Add `where', `saw_begin_data'
3346         members.
3347         (open_file_r) Renamed dfm_open_for_reading(), rewrote.
3348         (open_file_w) Renamed dfm_open_for_writing(), rewrote.
3349         (open_inline_file) Removed.
3350         (read_record) For inline_file, if we haven't seen BEGIN DATA, read
3351         it.  Deal with line_number in extension record instead of file
3352         handle.
3353         (dfm_get_record) Rewrote.
3354         (dfm_put_record) Rewrote.
3355         (dfm_push) Assert file is open and one of ours.  Deal with
3356         line_number in extension record instead of file handle.
3357         (dfm_pop) Assert file is open and one of ours.  Deal with
3358         line_number in extension record instead of file handle.
3359         (cmd_begin_data) Use dfm_open_for_reading().  Mark that we saw
3360         BEGIN DATA.     
3361
3362         * file-handle.h: (enum constants RH_RF_*) Removed.
3363         (enum constants FH_MD_*) Removed.
3364         (struct file_handle) Removed `name', `norm_fn', `fn', `where',
3365         `recform', `lrecl', `mode' members.  Public references to
3366         `recform' changed to use handle_get_mode(), references to `lrecl'
3367         changed to use handle_get_record_width().  Added `private' member.
3368         (enum file_handle_mode) New.
3369
3370         * file-handle.q: (struct private_file_handle) New structure.
3371         (struct file_handle_list) New structure.
3372         (static var files) New.
3373         (static var file_handles) Removed.
3374         (init_file_handle) Removed.
3375         (create_file_handle) Removed.
3376         (get_handle_with_name) New function.
3377         (get_handle_for_filename) New function.
3378         (cmd_file_handle) Rewritten.
3379         (hash_file_handle) Removed.
3380         (cmp_file_handle) Removed.
3381         (fh_init_files) Rewritten.
3382         (fh_parse_file_handle) Rewritten.  Allows identifiers as
3383         filenames.
3384         (fh_get_handle_by_name) Renamed handle_get_name(), all references
3385         updated.  Rewritten.
3386         (fh_get_handle_by_filename) Renamed handle_get_filename(), all
3387         references updated.  Rewritten.
3388         (fh_record_width) Renamed handle_get_record_width(), all
3389         references updated.  Rewritten.
3390         (handle_get_mode) New function.
3391
3392         * file-type.c: (cmd_file_type) Open handle for reading.
3393
3394         * filename.c: [unix] (struct file_identity) New structure.
3395         [unix] (fn_get_identity) New function.
3396         [unix] (fn_free_identity) New function.
3397         [unix] (fn_compare_file_identities) New function.
3398         [!unix] (struct file_identity) New structure.
3399         [!unix] (fn_get_identity) New function.
3400         [!unix] (fn_free_identity) New function.
3401         [!unix] (fn_compare_file_identities) New function.
3402
3403         * lexer.c: (static var put) Renamed put_token, all references
3404         updated.
3405         (static var put_tokstr) New.
3406         (static var put_tokval) New.
3407         (lex_init) Initialize put_tokstr().
3408         (restore_token) New function.
3409         (save_token) New function.
3410         (lex_get) Use restore_token().
3411         (lex_put_back) Use save_token().
3412         (lex_put_back_id) New function.
3413         (lex_put_forward) Removed.
3414         (lex_preprocess_line) Set put_token instead of using
3415         lex_put_forward().
3416         (lex_negative_to_dash) Use save_token(), set put_token directly.
3417         (dump_token) Use stderr instead of stdout.
3418
3419         * main.c: (main) Remove call to cmd_init().
3420         
3421         * matrix-data.c: (cmd_matrix_data) Open file for reading.
3422
3423         * pfm-read.c: Use handle_get_filename() instead of trying to use
3424         h->fn directly, all over.
3425
3426         * pfm-write.c: Ditto.
3427
3428         * print.c: (internal_cmd_print) Open handle for writing.
3429         (dump_table) Use handle_get_filename().
3430         (print_trns_proc) Use handle_get_mode().
3431         (cmd_print_space) Use fh_parse_file_handle().
3432         Open handle for writing.
3433         [0] (debug_print) Removed.
3434
3435         * sfm-read.c: Use handle_get_filename() instead of trying to use
3436         h->fn directly, all over.
3437
3438         * sfm-write.c: Ditto.
3439
3440 Sat Mar 20 14:35:48 2004  Ben Pfaff  <blp@gnu.org>
3441
3442         Fix memory leaks.
3443         
3444         * autorecode.c: (arc_free) Free arc->src_values.
3445
3446         * error.c: (msg) Free buf.
3447
3448         * val-labs.c: (do_value_labels) Always free vars.
3449
3450         * vfm.c: (close_active_file) If sink has no make_source then call
3451         its destroy function.
3452
3453 Sat Mar 20 14:00:24 2004  Ben Pfaff  <blp@gnu.org>
3454
3455         Fixed cmd_parse() so that it always skips past a full command
3456         name.  A few special commands for which this would be bad get
3457         special treatment.  This lets us drop code for skipping past the
3458         end of a command name in most cmd_*() functions.  It's not worth
3459         listing all the commands affected.
3460
3461         * command.c: (struct command) Remove `cmd' member, replace by
3462         `name' member, all references updated.  Remove `word', `next',
3463         `skip_entire_name' members.
3464         (macro DEFCMD) Deal with revised `struct command'.
3465         (macro UNIMPL) Ditto.
3466         (macro SPCCMD) New macro for commands whose last word shouldn't be
3467         skipped.
3468         (static array cmd_table[]) Make const, rename `commands', remove
3469         sentinel element.
3470         (macro COMMAND_CNT) New macro.
3471         (split_words) Removed.
3472         (cmd_init) Removed.
3473         (FILE_TYPE_okay) Make parameter const.
3474         (cmd_parse) Improve error messages.
3475         (match_strings) New function.
3476         (next_word) New function.
3477         (enum command_match) New enum.
3478         (conflicting_3char_prefixes) New function.
3479         (conflicting_3char_prefix_command) New function.
3480         (cmd_match_words) New function.
3481         (count_matching_commands) New function.
3482         (get_command_name) New function.
3483         (free_words) New function.
3484         (unknown_command_error) New function.
3485         (figure_out_command) Renamed parse_command_name(), rewritten.
3486
3487         * command.def: Removed @ command.  Marked BEGIN DATA, DOCUMENT,
3488         FILE LABEL, REMARK, SUBTITLE, TITLE as special.  Renamed EVALUATE
3489         to DEBUG EVALUATE.  Added N alias for N OF CASES, SORT alias for
3490         SORT CASES.
3491
3492         * command.h: (macro SPCCMD) New.
3493
3494         * include.c: (cmd_include_at) Removed.
3495         (cmd_include) Allow identifier to be used as filename.
3496
3497         * inpt-pgm.c: (cmd_reread) Use fh_parse_file_handle().
3498
3499         * t-test.q: (cmd_t_test) Command name is now parsed for us.
3500         
3501
3502 Sat Mar 20 13:56:00 2004  Ben Pfaff  <blp@gnu.org>
3503
3504         Start work on better test framework.
3505         
3506         * Makefile.am: (pspp_sources) Add debug.c.
3507         
3508         * debug.c: New file.
3509
3510         * compute.c: (cmd_evaluate) Moved to debug.c, renamed
3511         cmd_debug_evaluate().
3512
3513         * expr-prs.c: (expr_parse) Remove PXP_DUMP support.
3514
3515         * expr.h: (enum constant PXP_DUMP) Removed.
3516
3517 Sat Mar 20 00:05:42 WST 2004 John Darrington <john@darrington.wattle.id.au>
3518
3519         * set.q:  Implemented the SHOW command, and synced it to the existing 
3520         SET cmd.
3521
3522         Added a handler for SIGWINCH so that viewlength and viewwidth follow
3523         changes as the window size is changed.
3524
3525         Added fallback to set viewlength and viewwidth from LINES and COLUMS
3526         environment variables if other methods are not available.
3527
3528         glob.c: Removed a lot of global variables from glob.c and encapsulated 
3529         them in set.q
3530
3531         random.c: Tidied up the way the random seed is set.
3532
3533         str.c: Added a ds_vprintf function.
3534
3535         error.c: Extended dump_message so that messages are always broken at
3536         '\n' characters.
3537         
3538 Thu Mar 18 11:07:14 2004  Ben Pfaff  <blp@gnu.org>
3539
3540         * pfm-write.c: (bufwrite) Write out the correct element for string
3541         variables.  From Andreas Streichardt <streichardt@globalpark.de>.
3542
3543 Mon Mar 15 20:48:03 2004  Ben Pfaff  <blp@gnu.org>
3544
3545         Get rid of static and global (!) vars in matrix-data.c.
3546
3547         * matrix-data.c: (static var nr_data) Removed.
3548         (static var nr_factor_values) Removed.
3549         (static var max_cell_index) Removed.
3550         (static var split_values) Removed.
3551         (struct nr_aux_data) New structure.
3552         (read_matrices_without_rowtype) Use a local struct nr_aux_data in
3553         place of static vars, pass to create_case_source() and procedure()
3554         as aux data.
3555         (nr_read_data_lines) Use struct nr_aux_data * parameter instead of
3556         struct matrix_data_pgm *.
3557         (nr_read_splits) Ditto.
3558         (nr_read_factors) Ditto.
3559         (nr_output_data) Ditto.
3560         (static var wr_content) Removed.
3561         (global var wr_data) Removed.
3562         (global var wr_current) Removed.
3563         (struct wr_aux_data) New structure.
3564         (read_matrices_with_rowtype) Use a local struct wr_aux_data in
3565         place of static vars, pass to create_case_source() and procedure()
3566         as aux data.
3567         (matrix_data_read_with_rowtype) Use struct wr_aux_data * parameter
3568         instead of matrix_data_pgm *.
3569         (wr_read_splits) Ditto.
3570         (wr_output_data) Ditto.
3571         (wr_read_rowtype) Ditto.
3572         (wr_read_factors) Ditto.
3573         (wr_read_indeps) Ditto.
3574         
3575 Mon Mar 15 20:07:29 2004  Ben Pfaff  <blp@gnu.org>
3576
3577         Get rid of static vars in autorecode.c.
3578
3579         * autorecode.c: (struct autorecode_trns) Rename `arc' to `specs',
3580         `n_arc' to `spec_cnt'.  All references updated.
3581         (static var v_src) Removed.
3582         (static var v_dest) Removed.
3583         (static var h_trns) Removed.
3584         (static var nv_src) Removed.
3585         (static var descend) Removed.
3586         (static var print) Removed.
3587         (enum direction) New enum.
3588         (struct autorecode_pgm) New structure.
3589         (cmd_autorecode) Use struct autorecode_pgm instead of static vars.
3590         Move n_dest local var into struct autorecode_pgm for ease of
3591         clean-up.  Use arc_free().
3592         (arc_free) New function.
3593         (recode) Modify to take struct autorecode_pgm * parameter instead
3594         of using statics.  Let the caller clean up.
3595         (autorecode_proc_func) Use struct autorecode_pgm * auxiliary data
3596         instead of statics.  Rearrange code a little.
3597
3598 Mon Mar 15 00:25:02 2004  Ben Pfaff  <blp@gnu.org>
3599
3600         Get rid of static, global vars in recode.c.  Remove debug code.
3601
3602         * recode.c: (static var head) Removed.
3603         (global var v) Removed.
3604         (global var nv) Removed.
3605         (cmd_recode) New local variables head, v, nv.  Initialize and free
3606         v.  Don't call debug_print().
3607         [DEBUGGING] (dump_dest) Removed.
3608         [DEBUGGING] (debug_print) Removed.
3609
3610 Mon Mar 15 00:14:49 2004  Ben Pfaff  <blp@gnu.org>
3611
3612         Get rid of static vars in expr-opt.c.
3613
3614         * expr-opt.c: (static var e) Removed.
3615         (static var nop) Removed.
3616         (static var mop) Removed.
3617         (static var ndbl) Removed.
3618         (static var mdbl) Removed.
3619         (static var nstr) Removed.
3620         (static var mstr) Removed.
3621         (static var nvars) Removed.
3622         (static var mvars) Removed.
3623         (struct expr_dump_state) New structure.
3624         (dump_expression) Use new struct expr_dump_state instead of static
3625         vars and pass to functions we call.
3626         (dump_node) Use struct expr_dump_state * parameter.
3627         (emit) Ditto.
3628         (emit_num_con) Ditto.
3629         (emit_str_con) Ditto.
3630         (emit_var) Ditto.
3631         
3632 Mon Mar 15 00:03:51 2004  Ben Pfaff  <blp@gnu.org>
3633
3634         Get rid of static var in COUNT.
3635
3636         * count.c: (static var head) Move into cmd_count().
3637         (cmd_count) [DEBUGGING] Don't call debug_print.
3638         [DEBUGGING] (debug_print) Removed.
3639
3640 Sun Mar 14 23:56:09 2004  Ben Pfaff  <blp@gnu.org>
3641
3642         Get rid of static vars in VALUE LABELS, ADD VALUE LABELS.
3643
3644         * val-labs.c: (static var v) Removed.
3645         (static var nv) Removed.
3646         [DEBUGGING] (debug_print) Removed.
3647         (verify_val_labs) Add struct variable **, int parameters.
3648         (get_label) Ditto.  Improve error messages, streamline.
3649         (erase_labels) New function for erasing value labels, taking over
3650         part of verify_val_labs()'s function.
3651         (init) Removed.
3652         (done) Removed.
3653         (cmd_value_labels) No need to call init() or done() anymore.
3654         (cmd_add_value_labels) Ditto.
3655         (do_value_labels) Add vars, var_cnt local variables.  Clean up
3656         after them internally.  Call erase_labels() if we should.  Don't
3657         call debug_print().
3658
3659 Sun Mar 14 23:33:53 2004  Ben Pfaff  <blp@gnu.org>
3660
3661         Get rid of static vars in MATCH FILES.
3662         
3663         * get.c: (static var mtf_head) Removed.
3664         (static var mtf_tail) Removed.
3665         (static var mtf_by) Removed.
3666         (static var mtf_n_by) Removed.
3667         (static var mtf_master) Removed.
3668         (static var mtf_seq_num) Removed.
3669         (static var mtf_seq_nums) Removed.
3670         (static var mtf_sink) Removed.
3671         (static var mtf_case) Removed.
3672         (struct mtf_proc) New structure.
3673         (cmd_match_files) Use struct mtf_proc instead of static vars.
3674         (mtf_processing_finish) Ditto.
3675         (mtf_free) Ditto.
3676         (mtf_delete_file_in_place) Ditto.
3677         (mtf_read_nonactive_records) Ditto.
3678         (mtf_compare_BY_values) Ditto.
3679         (mtf_processing) Ditto.
3680         (mtf_merge_dictionary) Ditto.
3681
3682 Sun Mar 14 22:48:12 2004  Ben Pfaff  <blp@gnu.org>
3683
3684         * command.def: Add CASESTOVARS, VARSTOCASES unimplemented commands.
3685
3686         * dictionary.c: (dict_rename_var) Add assertion.
3687         (dict_contains_var) Check by index instead of name.
3688
3689 Sun Mar 14 22:01:02 2004  Ben Pfaff  <blp@gnu.org>
3690
3691         Get rid of compaction_necessary, compaction_nval, compaction_case.
3692         Redo VFM interface.  Replace disk_sink and memory_sink by
3693         storage_sink, disk_source and memory_source by storage_source.
3694
3695         * vfm.h: (struct case_sink) Add `dict', `idx_to_fv', `value_cnt'
3696         members.
3697
3698         * vfm.c: 
3699         (struct write_case_data) Remove `begin_func', `end_func',
3700         `func_aux' members.  Add `aux', `trns_case', `sink_case',
3701         `cases_written', `cases_analyzed' members.
3702         (global var compaction_necessary) Make static.
3703         (global var compaction_nval) Removed.
3704         (global var compaction_case) Removed.
3705         (static var case_count) Removed.
3706         (struct procedure_aux_data) Removed.
3707         (struct split_aux_data) Removed.
3708         (procedure) Remove begin_func, end_func parameters.  Rewrite.
3709         (static var not_canceled) Removed.
3710         (process_active_file) Removed.
3711         (process_active_file_write_case) Removed.
3712         (process_active_file_output_case) Removed.
3713         (prepare_for_writing) Moved into open_active_file().
3714         (arrange_compaction) Ditto.
3715         (setup_lag) Ditto.
3716         (open_active_file) Rewrote.
3717         (write_case) New function.
3718         [DEBUGGING] (index_to_varname) Removed.
3719         (execute_transformations) New function.
3720         (exclude_this_case) Renamed filter_case(), changed interface.
3721         (clear_case) Added struct ccase * parameter to interface.
3722         (close_active_file) Added struct write_case_data * parameter,
3723         rewrote.
3724         (disk_sink_create) Removed.
3725         (disk_sink_destroy) Removed.
3726         (disk_sink_make_source) Removed.
3727         (disk_sink_write) Removed.
3728         (disk_source_count) Removed.
3729         (disk_source_destroy) Removed.
3730         (disk_source_read) Removed.
3731         (global var disk_sink_class) Removed.
3732         (global var disk_source_class) Removed.
3733         (global var memory_sink_class) Removed.
3734         (global var memory_source_class) Removed.
3735         (memory_sink_create) Removed.
3736         (memory_sink_destroy) Removed.
3737         (memory_sink_make_source) Removed.
3738         (memory_sink_write) Removed.
3739         (memory_source_count) Removed.
3740         (memory_source_destroy) Removed.
3741         (memory_source_get_cases) Removed.
3742         (memory_source_read) Removed.
3743         (memory_source_set_cases) Removed.
3744         (struct disk_stream_info) Removed.
3745         (struct memory_sink_info) Removed.
3746         (struct memory_source_info) Removed.
3747         (write_active_file_to_disk) Removed.
3748         (destroy_storage_stream_info) New function.
3749         (global var null_sink_class) New var.
3750         (global var storage_sink_class) New var.
3751         (global var storage_source_class) New var.
3752         (open_storage_file) New function.
3753         (storage_sink_destroy) New function.
3754         (storage_sink_make_source) New function.
3755         (storage_sink_open) New function.
3756         (storage_sink_write) New function.
3757         (storage_source_count) New function.
3758         (storage_source_destroy) New function.
3759         (storage_source_get_cases) New function.
3760         (storage_source_on_disk) New function.
3761         (storage_source_read) New function.
3762         (storage_source_set_cases) New function.
3763         (storage_source_to_disk) New function.
3764         (storage_to_disk) New function.
3765         (struct storage_stream_info) New structure.
3766         (write_storage_file) New function.
3767         (procedure_write_case) Removed.
3768         (create_case_source) Add `struct dictionary *' parameter, all
3769         references updated.
3770         (create_case_sink) Ditto.
3771         (free_case_sink) New function.
3772         (struct split_aux_data) New structure.
3773         (procedure_with_splits) New function implementing what procedure()
3774         used to.
3775         (SPLIT_FILE_proc_func) Removed.
3776         (procedure_with_splits_callback) New function.
3777         (equal_splits) New function.
3778         
3779         * aggregate.c: Pass around a struct instead of using statics.
3780         (static var outfile) Remove.
3781         (enum type) Give it tag `missing_treatment'.
3782         (static var missing) Remove.
3783         (static var sort) Remove.
3784         (static var agr_first) Remove.
3785         (static var agr_next) Remove.
3786         (static var case_count) Remove.
3787         (static var prev_case) Remove.
3788         (static var buf64_1xx) Remove.
3789         (static var buf_1xx) Remove.
3790         (struct agr_proc) New structure incorporating the above.
3791         (cmd_aggregate) Use new struct.  Clean up error handling using
3792         agr_destroy().  Completely rewrite actual implementation of
3793         aggregation.
3794         (create_sysfile) Add struct agr_proc * parameter, modify
3795         accordingly.
3796         (parse_aggregate_functions) Ditto.
3797         (free_aggregate_functions) Ditto.  Rename agr_destroy().
3798         (aggregate_single_case) Add struct agr_proc * parameter, modify
3799         accordingly.
3800         (accumulate_aggregate_info) Ditto.
3801         (dump_aggregate_info) Ditto.
3802         (initialize_aggregate_info) Ditto.
3803         (agr_00x_trns_proc) Removed.
3804         (agr_00x_end_func) Removed.
3805         (agr_10x_trns_proc) Removed.
3806         (agr_10x_trns_free) Removed.
3807         (agr_10x_end_func) Removed.
3808         (agr_11x_read) Removed.
3809         (agr_11x_finish) Removed.
3810         [DEBUGGING] (debug_print) Removed.
3811         (write_case_to_sfm) Add struct agr_proc * parameter, modify
3812         accordingly.
3813         (agr_to_active_file) New function.
3814         (presorted_agr_to_sysfile) New function.
3815         (sort_agr_to_sysfile) New function.
3816
3817         * autorecode.c: (cmd_autorecode) Use procedure_with_splits().
3818
3819         * crosstabs.q: (internal_cmd_crosstabs) Ditto.
3820
3821         * descript.q: (cmd_descriptives) Ditto.
3822
3823         * dfm.c: (cmd_begin_data) Check for storage_source_class.  Adapt
3824         to new procedure() interface.
3825
3826         * command.c: (cmd_execute) Adapt to new procedure() interface.
3827
3828         * dictionary.c: (dict_compact_values) Also delete scratch
3829         variables.
3830         (dict_get_compacted_value_cnt) New function.
3831         (dict_get_compacted_idx_to_fv) New function.
3832
3833         * flip.c: (cmd_flip) Warn about and cancel TEMPORARY.
3834         (cmd_flip) Adapt to new procedure() interface.
3835         (flip_sink_write) Use sink->idx_to_fv.
3836
3837         * frequencies.q: (internal_cmd_frequencies) Use
3838         procedure_with_splits().
3839
3840         * get.c: (cmd_save_internal) Adapt to new procedure() interface.
3841         (static var mtf_sink) New static var.
3842         (static var mtf_case) New static var.
3843         (cmd_match_files) Warn about and cancel TEMPORARY.  Redo the way
3844         we actually implement the matching.
3845         (mtf_delete_file_in_place) Use mtf_case.
3846         (mtf_processing) Use mtf_case and mtf_sink.
3847         (cmd_export) Adapt to new procedure() interface.
3848
3849         * levene.c: (levene) Use procedure_with_splits().
3850
3851         * list.q: (cmd_list) Use procedure_with_splits().
3852
3853         * matrix-data.c: (read_matrices_without_rowtype) Adapt to new
3854         procedure() interface.
3855         (read_matrices_with_rowtype) Ditto.
3856
3857         * modify-vars.c; (cmd_modify_vars) Warn about and cancel
3858         TEMPORARY.  Adapt to new procedure() interface.
3859
3860         * rename-vars.c: Warn about and cancel TEMPORARY.
3861
3862         * sort.c: (cmd_sort_cases) Warn about TEMPORARY.
3863         (sort_cases) Use dict_get_compacted_value_cnt() instead of
3864         compaction_nval.  Adapt to new procedure() interface.  Use
3865         storage_source_to_disk().
3866         (do_internal_sort) Don't try to dump the cases to memory.
3867         (compare_case_lists) Pass null idx_to_fv.
3868         (struct initial_run_state) Add `idx_to_fv' member.  Remove
3869         `case_size' member.
3870         (write_initial_runs) Don't initialize irs->case_size.  Adapt to
3871         new procedure() interface.  Reset irs->idx_to_fv after calling
3872         procedure().
3873         (sort_sink_write) Set irs->idx_to_fv.  Use case_size from struct
3874         sort_cases_pgm.  Pass irs, not struct sort_cases_pgm to
3875         push_heap().
3876         (destroy_initial_run_state) Don't dereference irs after freeing
3877         it.
3878         (allocate_cases) Don't calculate case_size locally.
3879         (compare_record) Add idx_to_fv parameter.
3880         (compare_record_run) Change parameter from struct sort_cases_pgm *
3881         to struct initial_run_state *.  Pass irs->idx_to_fv to
3882         compare_record().
3883         (compare_record_run) Third parameter now a struct
3884         initial_run_state *.
3885         (output_record) No need for out_case anymore.  Pass irs, not
3886         struct sort_cases_pgm to pop_heap().  Use case_size from struct
3887         sort_cases_pgm.
3888         (merge) Use case_size from struct sort_cases_pgm.
3889         (merge_once) Use case_size from struct sort_cases_pgm.
3890         Pass null pointer to compare_record() as idx_to_fv.
3891         (global var sort_sink_class) Make static.
3892
3893         * t-test.q: (cmd_t_test) Use procedure_with_splits().
3894
3895         * temporary.c: Remove debugging crap.
3896
3897 Sat Mar 13 14:19:52 WST 2004 John Darrington <john@darrington.wattle.id.au>
3898
3899         * t-test.q, levene.c: Fixed up the handling of MISSING values
3900         int the T-TEST
3901
3902 Fri Mar 12 16:23:35 WST 2004 John Darrington <john@darrington.wattle.id.au>
3903
3904         * t-test.q, levene.c: Added support for T-TEST /GROUP where only 
3905         one value is given.
3906
3907 Wed Mar 10 23:25:13 2004  Ben Pfaff  <blp@gnu.org>
3908
3909         Change explicit variable name checks into use of
3910         dict_class_from_id().
3911
3912         * dictionary.c: (dict_create_var)  Change explicit variable name
3913         check into use of dict_class_from_id().
3914
3915         * get.c: (trim_dictionary) Ditto.
3916
3917         * sel-if.c: (cmd_filter) Ditto.
3918
3919         * sysfile-info.c: (cmd_display) Ditto.
3920
3921         * vars-prs.c: (parse_DATA_LIST_vars) Ditto.
3922
3923         * vfm.c: (arrange_compaction) Ditto.
3924
3925         * weight.c: (cmd_weight) Ditto.
3926
3927 Wed Mar 10 21:16:34 2004  Ben Pfaff  <blp@gnu.org>
3928
3929         * temporary.c: (cmd_temporary) When TEMPORARY was the first
3930         transformation following the input program, if any, for some
3931         reason we special-cased f_trns.  That's just wrong.  It should
3932         always be set to n_trns.
3933
3934 Tue Mar  9 23:44:40 2004  Ben Pfaff  <blp@gnu.org>
3935
3936         * format.c: (parse_format_specifier_name) Fix brown-bag bug
3937         introduced in last check-in.
3938
3939 Tue Mar  9 23:10:41 2004  Ben Pfaff  <blp@gnu.org>
3940
3941         * format.c: (global array translate_fmt[]) Removed.
3942         (translate_fmt) New function as replacement.
3943         (parse_format_specifier_name) Rewrite.
3944
3945         * pfm-read.c: (convert_format) Use translate_fmt() instead of
3946         translate_fmt[].
3947
3948         * sfm-read.c: (parse_format_spec) Ditto.
3949
3950         * postscript.c: (text) Fix handling of fonts with missing
3951         ligatures.
3952
3953         * sort.c: (struct external_sort) Add temp_name member.
3954         (destroy_external_sort) Free temp_dir, temp_name members.
3955         (init_external_sort) Allocate temp_name.
3956         (get_temp_file_name) Change prototype.
3957         (open_temp_file) Deal with change to get_temp_file_name().
3958         (close_temp_file) Ditto.
3959         (remove_temp_file) Ditto.
3960         (write_temp_file) Ditto.
3961         (read_temp_file) Ditto.
3962         (sort_sink_destroy) Removed.
3963         (sort_sink_class) Change destroy member to null.
3964
3965 Tue Mar  9 22:36:34 2004  Ben Pfaff  <blp@gnu.org>
3966
3967         Eliminate temp_case.
3968
3969         * aggregate.c: (cmd_aggregate) No need to save/restore temp_case
3970         anymore.  Use agr_11x_finish().
3971         (aggregate_single_case) Make first param const.
3972         (accumulate_aggregate_info) Ditto.
3973         (agr_00x_end_func) Use compaction_case, not temp_case.
3974         (agr_11x_func) Break into agr_11x_read(), agr_11x_finish().
3975
3976         * data-list.c: (struct data_list_pgm) Add `case_size' member.
3977         (cmd_data_list) Initialize case_size.
3978         (read_from_data_list_fixed) Add struct ccase * param, use instead
3979         of temp_case.
3980         (read_from_data_list_free) Ditto.
3981         (read_from_data_list_list) Ditto.
3982         (read_one_case) Rename data_list_trns_proc(), all references
3983         updated.  Add argument in calling above functions.  Use c
3984         argument instead of temp_case.
3985         (destroy_dls) Rename data_list_trns_free(), all references
3986         updated.
3987
3988         * expr-evl.c: (expr_evaluate) Make second parameter const.
3989
3990         * file-type.c: (struct file_type_pgm) Add `case_size' member.
3991         (cmd_end_file_type) Initialize `case_size'.
3992         (file_type_source_read) Add struct ccase * parameter.  Use instead
3993         of temp_case.
3994
3995         * flip.c: Rewritten.
3996
3997         * get.c: (struct get_pgm) New structure to keep track of
3998         case_size.
3999         (cmd_get) Initialize case_size.
4000         (cmd_import) Ditto.
4001         (get_source) Deal with struct get_pgm.
4002         (get_source_read) Add struct ccase * parameter, use instead of
4003         temp_case.
4004         (import_source_read) Ditto.
4005
4006         * get.c: Use a null pointer instead of temp_case to represent the
4007         "current case" in a struct mtf_file's input member.
4008         (mtf_processing_finish) Pass null to mtf_processing(), not
4009         temp_case.
4010         (mtf_read_nonactive_records) Don't set iter->input to temp_case.
4011         (mtf_compare_BY_values) Add extra arg, use instead of null input
4012         members.
4013         (mtf_processing) Use c parameter instead of temp_case.  Pass
4014         compaction_case to process_active_file_output_case().
4015         
4016         * glob.c: (global variable temp_case) Removed.
4017
4018         * inpt-pgm.c: (struct input_program_pgm) Add `case_size' member.
4019         (cmd_input_program) Initialize case_size.  Set
4020         vfm_source->value_cnt.
4021         (init_case) Add struct ccase * parameter, use instead of
4022         temp_case.
4023         (clear_case) Ditto.
4024         (input_program_source_read) Ditto.
4025
4026         * matrix-data.c: (matrix_data_read_without_rowtype) Ditto.
4027         (dump_cell_content) Ditto.
4028         (nr_output_data) Ditto.
4029         (read_matrices_without_rowtype) Ditto.
4030         (matrix_data_read_with_rowtype) Ditto.
4031         (wr_read_splits) Ditto.
4032         (wr_output_data) Ditto.
4033
4034         * sort.h: (struct sort_cases_pgm) New member `case_size'.
4035         
4036         * sort.c: (sort_cases) Initialize scp->case_size.
4037         (struct external_sort) Remove `case_size' member.
4038         (write_initial_runs) Only call vfm_sink->class_destroy if
4039         non-null.
4040         (struct sort_source_aux) New structure.
4041         (sort_source_read_helper) New function.
4042         (sort_source_read) Use sort_source_read_helper().
4043         (read_sort_output) Change interface to be more reasonable.
4044         (read_internal_sort_output) Ditto.
4045         (read_external_sort_output) Ditto.
4046
4047         * vars-prs.c: (dict_class_to_name) Pass return value through
4048         gettext.
4049
4050         * vfm.c: (struct procedure_aux_data) Add `trns_case' member.
4051         (procedure) Initialize trns_case.
4052         (procedure) Pass trns_case to vfm_source->class->read().
4053         Free trns_case.
4054         (process_active_file) Start using struct procedure_aux_data.
4055         (process_active_file_write_case) Pass trns_case to
4056         transformations, lag_case(), clear_case().
4057         (process_active_file_output_case) Add struct ccase * parameter.
4058         (create_trns_case) New function.
4059         (make_temp_case) Removed.
4060         (vector_initialization) Removed.
4061         (close_active_file) Only call make_source if non-null, otherwise
4062         set vfm_source to null pointer.  Don't free temp_case.
4063         (disk_source_read) Add struct ccase * parameter, use instead of
4064         temp_case.
4065         (memory_source_read) Ditto.
4066         (lag_case) Add const struct ccase * member.
4067         (procedure_write_case) Use trns_case instead of temp_case.
4068         (clear_case) Add struct ccase * member, use instead of temp_case.
4069         (exclude_this_case) Ditto.
4070         (create_case_source) Add struct dictionary * parameter, use to
4071         initialize source->value_cnt.
4072
4073         * vfm.h: (struct case_source) Add `value_cnt' member.
4074         (struct case_source_class) Add struct ccase * parameter to `read'
4075         member function pointer.
4076         (struct case_sink_class) Make struct ccase * parameter const in
4077         `write' member function pointer.
4078         
4079 Wed Mar  3 20:44:37 2004  Ben Pfaff  <blp@gnu.org>
4080
4081         Fix a lot of "possibly uninitialized variable" warnings.  Some of
4082         them are even real bugs.  A few of them make me wonder how the
4083         code ever worked.
4084
4085         * aggregate.c: (parse_aggregate_functions) Initialize `function.
4086
4087         * ascii.c: (output_lines) Add default case to switch.
4088
4089         * crosstabs.q: Remove static variable `expected' and all
4090         references to it.
4091         (display_crosstabulation) Always calculate expected value.
4092         (calc_chisq) Ditto.
4093         (output_pivot_table) Initialize `cmp'.
4094         (display_crosstabulation) New variable `last_row', which is
4095         initialized.
4096
4097         * data-in.c: (parse_numeric) Always initialize sign.  How did this
4098         work at all?!
4099
4100         * data-list.c: (repeating_data_trns_proc) Always initialize code.
4101         Always set info.ofs.  (How did this work?!)
4102
4103         * expr-opt.c: (optimize_tree) Always initialize `m'.
4104         (evaluate_tree) Always initialize `c'.  (How did this work?)
4105
4106         * frequencies.q: (frq_custom_variables) Always initialize min,
4107         max.
4108         (frq_custom_grouped) Always initialize `dl'.
4109
4110         * groff-font.c: (groff_read_font) Always initialize char_set.
4111
4112         * matrix-data.c: (nr_output_data) Initialize `split'.
4113         (wr_read_splits) Remove shadowing split_cnt declaration.
4114         (wr_output_data) Initialize `split'.
4115
4116         * output.c: (tokener) Skip add character on syntax error.
4117
4118         * pool.c: (pool_strndup) Always set `copy'.  (How did this work?!)
4119
4120         * postscript.c: (read_ps_encodings) Use line.string instead of
4121         uninitialized `bp'.
4122         (write_text) Add default case to switch.
4123         (text) Always initialize multiple variables.  Fix bug with
4124         ligatures.
4125
4126         * print.c: (fixed_parse_fortran) Initialize head.
4127         (alloc_line) Add default case to switch.
4128
4129         * recode.c: (parse_dest_spec) Handle case where nothing matches.
4130         (recode_trns_proc) Move variable declaration inward.  Add default
4131         case to switch.
4132
4133         * sfm-read.c: (read_header) Initialize skip_amt.
4134
4135         * sysfile-info.c: (display_variables) Always initialize pc.
4136
4137         * vars-prs.c: Initialized `included'.
4138
4139 Wed Mar  3 09:30:09 2004  Ben Pfaff  <blp@gnu.org>
4140
4141         * main.c: (main) sigaction()'s sa_flags member was uninitialized.
4142         Just use signal() instead.
4143
4144 Wed Mar  3 09:26:30 2004  Ben Pfaff  <blp@gnu.org>
4145
4146         Get rid of vfm_sink_info and vfm_source_info.
4147         
4148         * aggregate.c: (agr_00x_end_func) Don't increment
4149         sfm_sink_info.ncases.
4150
4151         * sort.c: (do_internal_sort) Get case count from
4152         vfm_source->class->count().
4153         (struct external_sort) Add `case_size' member.
4154         (do_external_sort) Initialize case_size.
4155         (struct initial_run_state) Add `case_size' member.
4156         (write_initial_runs) Initialize case_size.
4157         (sort_sink_write) Use case_size.
4158         (read_external_sort_output) Use case_size.  Get case_cnt from
4159         initial_runs.
4160
4161         * vfm.c: (struct write_case_data) Add underscores to existing arg
4162         names, all references updated.  Renamed `aux' as `func_aux', all
4163         references updated.  Added new `aux' member.
4164         (global var vfm_source_info) Removed.
4165         (global var vfm_sink_info) Removed.
4166         (struct procedure_aux_data) New.
4167         (struct split_aux_data) New.
4168         (procedure) Use `aux' fields for procedure_aux_data,
4169         split_aux_data.
4170         (process_active_file_write_case) Pass case_count + 1 to
4171         transformation procedures, exclude_this_case().
4172         (process_active_file_output_case) Don't increment
4173         vfm_sink_info.ncases.
4174         (prepare_for_writing) Don't initialize vfm_sink_info.  Don't try
4175         to send data to disk early.
4176         (make_temp_case) Don't use vfm_sink_info.case_size.
4177         (close_active_file) Don't initialize vfm_source_info.
4178         (struct disk_stream_info) New, to allow for case_cnt and case_size fields.
4179         (disk_sink_create) Initialize and/or update disk_stream_info.
4180         (disk_sink_write) Ditto.
4181         (disk_sink_destroy) Ditto.
4182         (disk_sink_make_source) Ditto.
4183         (disk_source_read) Ditto.
4184         (disk_source_destroy) Ditto.
4185         (global var disk_source_class) Add disk_source_count().
4186         (disk_source_count) New function.
4187         (struct memory_sink_info) Add `case_cnt', `case_size' members.
4188         (struct memory_source_info) Ditto.
4189         (memory_sink_create) Deal with case_cnt, case_size.
4190         (memory_sink_write) Ditto.
4191         (memory_sink_make_source) Ditto.
4192         (memory_source_read) Ditto.
4193         (memory_source_count) New function.
4194         (memory_source_class) Add memory_source_count().
4195         (procedure_write_case) Don't use vfm_sink_info.ncases.  Do use
4196         proc_aux->cases_written, and pass it to transformation procedures
4197         and exclude_this_case ().
4198         (exclude_this_case) Add case_num parameter.  Pass it to
4199         expr_evaluate().
4200         (SPLIT_FILE_procfunc) Use split_aux->prev_case instead of static
4201         variable.
4202
4203         * vfm.h: (struct case_source_class) Add `count' member.
4204
4205         * vfmP.h: (struct stream_info) Removed.
4206         (global variable vfm_source_info) Removed.
4207         (global variable vfm_sink_info) Removed.
4208         
4209 Tue Mar  2 23:38:17 2004  Ben Pfaff  <blp@gnu.org>
4210
4211         * var.h: (typedef trns_proc_func) New typedef.
4212         (trns_free_func) New typedef.
4213         (struct trns_header) Change `proc' to type trns_proc_func, `free'
4214         to type trns_free_func.  This only changes the actual type of
4215         trns_proc_func, adding a `case_num' parameter.  Updated all
4216         implementations to use the typedefs instead.
4217
4218         * compute.c: (compute_num) Pass case_num to expr_evaluate().
4219         (compute_num_vec) Ditto.
4220         (compute_str) Ditto.
4221         (compute_str_vec) Ditto.
4222
4223         * do-if.c: (do_if_trns_proc) Ditto.
4224
4225         * expr-evl.c: (expr_evaluate) Add new case_num parameter, use for
4226         OP_CASENUM.
4227
4228         * inpt-pgm.c: (input_program_source_read) Maintain case count,
4229         pass to transformation functions.
4230         (reread_trns_proc) Pass case_num arg to expr_evaluate().
4231
4232         * loop.c: (loop_1_trns_proc) Ditto.
4233         (loop_2_trns_proc) Ditto.
4234         (loop_3_trns_proc) Ditto.
4235
4236         * print.c: (print_space_trns_proc) Ditto.
4237
4238         * sel-if.c: (select_if_proc) Ditto.
4239
4240 Tue Mar  2 11:36:52 2004  Ben Pfaff  <blp@gnu.org>
4241
4242         * frequencies.q: (cleanup_freq_tab) Avoid memory leak by
4243         destroying hash table.
4244
4245         * glob.c: (read_active_file) Variable not referenced, removed.
4246         (cancel_input_pgm) Ditto.
4247
4248         * levene.c: Add #include <stdlib.h> needed to call free().
4249
4250         * aggregate.c: (parse_aggregate_functions) Make `function'
4251         variable const.
4252
4253 Tue Mar  2 11:30:56 2004  Ben Pfaff  <blp@gnu.org>
4254
4255         Start working to eliminate VFM dependence on static variables.
4256
4257         * command.c: (cmd_parse) Use case_source_is_class().
4258
4259         * data-list.c: Rewrite to eliminate use of static variables.
4260
4261         * dfm.c: (cmd_begin_data) Use case_source_is_class().
4262
4263         * file-handle.q: (fh_handle_name) Make parameter const.
4264
4265         * file-type.c: Rewrite to eliminate use of static variables.
4266
4267         * flip.c: Rewrite to eliminate use of static variables.
4268
4269         * format.c: (get_format_var_width) New function.
4270
4271         * get.c: Eliminate use of static variables.
4272
4273         * inpt-pgm.c: Eliminate use of static variables.
4274
4275         * matrix-data.c: Eliminate use of static variables.
4276
4277         * set.q: (set_max_workspace) New variable.
4278         (cmd_set) Use SET WORKSPACE to modify set_max_workspace.
4279
4280         * var.h: (struct case_list) Move here from vfmP.h.
4281
4282         * vars-atr.c: (discard_variables) Handle new vfm_source type.
4283
4284         * vfm.c: (vfm_source) Change type from struct case_stream to
4285         struct case_source.
4286         (vfm_sink) Change type from struct case_stream to struct
4287         case_sink.
4288         (static var paging) Rename workspace_overflow, all references
4289         updated.
4290         (procedure) Use new class structures.
4291         (process_active_file) Ditto.
4292         (process_active_file_write_case) Ditto.
4293         (prepare_for_writing) Use set_max_workspace.  Use new class
4294         structures.
4295         (close_active_file) Use new class structures.  Free old sink.
4296         (global var disk_source_file) Removed.
4297         (global var disk_sink_file) Removed.
4298         (disk_stream_init) Removed.
4299         (disk_stream_read) Removed.
4300         (disk_stream_write) Removed.
4301         (disk_stream_mode) Removed.
4302         (disk_stream_destroy_source) Removed.
4303         (disk_stream_destroy_sink) Removed.
4304         (global var vfm_disk_stream) Removed.
4305         (disk_sink_create) New function.
4306         (disk_sink_write) New function.
4307         (disk_sink_destroy) New function.
4308         (disk_sink_make_source) New function.
4309         (disk_sink_class) New static var.
4310         (disk_source_read) New function.
4311         (disk_source_destroy) New function.
4312         (global var vfm_source_class) New var.
4313         (global var memory_source_cases) Removed.
4314         (global var memory_sink_cases) Removed.
4315         (global var memory_sink_max_cases) Removed.
4316         (struct memory_sink_info) New struct.
4317         (memory_stream_init) Removed.
4318         (memory_stream_read) Removed.
4319         (memory_stream_write) Removed.
4320         (memory_stream_mode) Removed.
4321         (memory_stream_destroy_source) Removed.
4322         (memory_stream_destroy_sink) Removed.
4323         (global var vfm_memory_stream) Removed.
4324         (page_to_disk) Renamed write_active_file_to_disk().
4325         (memory_sink_create) New function.
4326         (memory_sink_write) New function.
4327         (memory_sink_destroy) New function.
4328         (memory_sink_make_source) New function.
4329         (memory_sink_class) New static var.
4330         (memory_source_read) New function.
4331         (memory_source_destroy) New function.
4332         (memory_source_get_cases) New function.
4333         (memory_source_set_cases) New function.
4334         (global var vfm_source_class) New var.
4335         (procedure_write_case) Use new class structures.
4336         (create_case_source) New function.
4337         (case_source_is_complex) New function.
4338         (case_source_is_class) New function.
4339         (create_case_sink) New function.
4340
4341         * vfm.h: (global variable reinit_sysmis) Not used, removed.
4342         (global variable reinit_blanks) Not used, removed.
4343         (global variable init_zero) Not used, removed.
4344         (global variable init_blanks) Not used, removed.
4345         (struct case_source) New struct.
4346         (struct case_source_class) New struct.
4347         (struct case_sink) New struct.
4348         (struct case_sink_class) New struct.
4349         (struct case_stream) Removed.
4350
4351         * vfmP.h: (struct case_list) Moved to var.h.
4352
4353 Tue Mar  2 11:28:30 2004  Ben Pfaff  <blp@gnu.org>
4354
4355         * algorithm.c: (count_equal) New function.
4356         (count_if) New function.
4357         (unique) Add assertions.
4358         (partition) Add assertions.
4359         (is_partitioned) New function.
4360         (copy_if) Add assertions.
4361         (remove_equal) Add assertions.
4362         (lexicographical_compare) Rename lexicographical_compare_3way.
4363         (sort) Add assertions.  Rephrase some code.
4364         (is_sorted) New function.
4365
4366 Sun Feb 29 23:24:57 2004  Ben Pfaff  <blp@gnu.org>
4367
4368         Rewrite SORT CASES.
4369
4370         * sort.c: Completely rewrite.
4371
4372         * sort.h: Expose interface via struct sort_cases_pgm, not via
4373         global variables.
4374
4375         * aggregate.c: (sort) New static var.
4376         (cmd_aggregate) Use sort.
4377         (create_sysfile) Ditto.
4378         (aggregate_single_case) Ditto.
4379         (dump_aggregate_info) Ditto.
4380         (agr_00x_end_func) Ditto.
4381         (debug_print) Ditto.
4382
4383         * var.h: (enum SRT_ASCEND) Removed.
4384         (enum SRT_DESCEND) Removed.
4385         (struct sort_cases_proc) Removed.
4386         (struct variable) Remove p.srt member.
4387
4388 Sun Feb 29 23:22:45 2004  Ben Pfaff  <blp@gnu.org>
4389
4390         Get rid of the old, crappy heap structure and replace it by a new,
4391         shiny, C++ STL-like heap structure.
4392         
4393         * Makefile.am: (pspp_SOURCES) Remove heap.c, heap.h.
4394
4395         * algorithm.c: (push_heap) New function.
4396         (heapify) Ditto.
4397         (pop_heap) Ditto.
4398         (make_heap) Ditto.
4399         (sort_heap) Ditto.
4400         (is_heap) Ditto.
4401         
4402         * heap.c: Removed.
4403
4404         * heap.h: Removed.
4405
4406 Sun Feb 29 23:21:53 2004  Ben Pfaff  <blp@gnu.org>
4407
4408         Increase warning level.
4409         
4410         * Makefile.am: (AM_CFLAGS) Remove -Wnouninitialized.
4411
4412 Sat Feb 21 17:38:58 WST 2004 John Darrington <john@darrington.wattle.id.au>
4413
4414         * main.c: Added a signal handler for SIGSEGV requesting a bug report.
4415          
4416 Fri Feb 20 23:22:14 2004  Ben Pfaff  <blp@gnu.org>
4417
4418         * dictionary.c: (dict_create_var) Fix root cause of bug worked
4419         around by previous change log entry.
4420         
4421         * compute.c: (lvalue_finalize) Remove workaround from previous
4422         change log entry.
4423
4424 Fri Feb 20 14:37:41 WAST 2004 John Darrington <john@darrington.wattle.id.au>
4425
4426         * compute.c: Fixed a bug where the Format was not getting set for 
4427           computed variables (thus causing a crash when SAVEing).
4428
4429         * Added a test to stop this bug ever coming back
4430
4431 Wed Feb 18 22:21:35 2004  Ben Pfaff  <blp@gnu.org>
4432
4433         Got rid of approx.h.  In general, replaced all references to
4434         approx_eq() by ==, approx_lt() by <, etc.  Other types of changes
4435         noted below.
4436
4437         * Makefile.am: (pspp_SOURCES) Removed approx.h.
4438
4439         * data-out.c: (try_F) Replaced test for approx_eq(number, 0.0) by
4440         test for mag < EPSILON.
4441
4442         * misc.h: Add definition of EPSILON.
4443
4444 Wed Feb 18 21:32:44 2004  Ben Pfaff  <blp@gnu.org>
4445
4446         * vfm.c: (procedure) Add check to prevent recursive call.
4447
4448 Wed Feb 18 21:48:54 WST 2004 John Darrington <john@darrington.wattle.id.au>
4449
4450         * Moved the declarations relating to values to their own header file
4451           (val.h)
4452
4453         * Added levene.c and levene.h
4454
4455         * vars-atr.c: Changed the signature of compare_values to 
4456         take const * arguments.
4457                 
4458         * t-test.q: Changed the structure of struct t_test_proc 
4459        variables now contain their own group statistics information.
4460        Eventually, t_test_proc might get renamed, because it'd be 
4461        applicable to other commands too.
4462
4463 Mon Feb 16 23:15:51 2004  Ben Pfaff  <blp@gnu.org>
4464
4465         * data-out.c: Clean up.  Changed interface of convert_*() to take
4466         either a `double' or a `const char *' instead of a `const union
4467         value *'.  Update all implementations of those interfaces.
4468         (data_out) Use switch statements instead of a table.
4469         (convert_AHEX) Rewrite.
4470
4471         * format.h: Update comment.
4472
4473 Mon Feb 16 22:14:36 2004  Ben Pfaff  <blp@gnu.org>
4474
4475         * q2c.c: (dump_header) Add an Emacs header line to output files
4476         that makes generated .c files read-only by default, to make it
4477         difficult to accidentally change generated files.
4478
4479 Mon Feb 16 22:12:07 2004  Ben Pfaff  <blp@gnu.org>
4480
4481         * frequencies.q: (compare_freq_numeric_a) Compare by frequency,
4482         not bogus a->v.c <=> b->v.c pointer compare.
4483         (compare_freq_alpha_a) Ditto.
4484         (compare_freq_numeric_d) Ditto.
4485         (compare_freq_alpha_d) Ditto.
4486         
4487 Mon Feb 16 22:00:53 2004  Ben Pfaff  <blp@gnu.org>
4488
4489         Changed data_out() to store string data directly into a `union
4490         value''s s member, not indirectly into c.
4491
4492         * crosstabs.q: (output_pivot_table) Use format_short() instead of
4493         data_out().
4494         (table_value_missing) Ditto.
4495         (float_M_suffix) Ditto.
4496         (format_short) New function.
4497
4498         * data-in.h: (data_in_finite_line) Remove inline definition.
4499
4500         * data-list.c: (destroy_dls_var_spec) New function.
4501         (destroy_dls) Rewrite in terms of destroy_dls_var_spec().
4502         (data_list_source_destroy_source) Avoid cast.
4503         (struct repeating_data_trns) New field `id_value'.  Update
4504         comments.
4505         (cmd_repeating_data) Initialize id_value.  Use new
4506         repeating_data_trns_free() for freeing REPEATING DATA
4507         transformations.
4508         (rpd_parse_record) Rewrite support for record ID to be less bogus.
4509         (repeating_data_trns_free) New function.
4510
4511         * data-out.c: (data_out) Change return type to `void' by replacing
4512         error returns by writing a message into the output buffer.
4513         (convert_A) Read from v->s instead of v->c.
4514         (convert_AHEX) Ditto.
4515
4516         * expr-evl.c: Update comment.
4517         (expr_evaluate) Add assertion in OP_STRING case.
4518
4519         * format.h: (macro MAX_FORMATTED_LEN) New macro.
4520
4521         * list.q: (list_cases) Update for new data_out() semantics.
4522
4523         * print.c: (print_trns_proc) Ditto.
4524
4525         * tab.c: (tab_value) Ditto.
4526         (tab_float) Avoid stupid cast.
4527
4528         * var.h: Update comments.
4529         (macro MAX_STRING) New macro.
4530         (macro MAX_ELEMS_PER_VALUE) New macro.
4531
4532         * vars-atr.c: (compare_values) New function.
4533
4534         * vfm.c: (dump_splits) Update for new data_out() semantics.
4535
4536 Mon Feb 16 21:45:47 2004  Ben Pfaff  <blp@gnu.org>
4537
4538         * crosstabs.q: (struct table_entry) Rename v[] to values[].  All
4539         references updated.
4540         (struct crosstab) Rename v[] to vars[].  All references updated.
4541         (hash_table_entry) Replace the hash algorithm and fix a bug at the
4542         same time, which caused the hash value to depend only on a single
4543         value, not all of the variables' values.
4544         
4545 Mon Feb 16 12:49:53 2004  Ben Pfaff  <blp@gnu.org>
4546
4547         Clean up struct dictionary's value_cnt usage.
4548
4549         * dictionary.c: Add a function comment to each function.
4550         (struct dictionary) Rename value_cnt to next_value_idx, which more
4551         accurately reflects its meaning.  All references updated.
4552         (dict_rename_vars) Add assertion.
4553         (dict_get_value_cnt) Rename dict_get_next_value_idx().  All
4554         references updated.
4555         (dict_get_case_size) New function.
4556
4557         * aggregate.c: (create_sysfile) Use dict_get_case_size().
4558
4559         * get.c: (mtf_read_nonactive_records) Ditto.
4560
4561         * sort.c: (allocate_cases) Ditto.
4562         (write_initial_runs) Ditto.
4563         (merge) Ditto.
4564         (merge_once) Ditto.
4565
4566         * vfm.c: (prepare_for_writing) Ditto.
4567         (setup_lag) Ditto.
4568         (lag_case) Ditto.
4569
4570 Mon Feb 16 00:17:55 2004  Ben Pfaff  <blp@gnu.org>
4571
4572         Make vfm.c slightly less grotesque.
4573
4574         * vfm.c: (filter_var) Removed.
4575         (filter_index) Removed.
4576         (FILTERED macro) Removed.
4577         (exclude_this_case) New function.
4578         (process_active_file_write_case) Use exclude_this_case() instead
4579         of FILTERED and inline tests.
4580         (procedure_write_case) Ditto.
4581         (setup_filter) Removed.
4582         (open_active_file) Don't call setup_filter().
4583         (close_active_file) Call dict_get_filter() instead of checking
4584         filter_var.
4585
4586 Mon Feb 16 00:01:53 2004  Ben Pfaff  <blp@gnu.org>
4587
4588         * var.h: (struct variable) Update comments.
4589
4590 Sun Feb 15 23:14:59 2004  Ben Pfaff  <blp@gnu.org>
4591
4592         New functions dict_create_var_assert(), dict_lookup_var_assert().
4593         Converted several dict_*_var()/assert pairs into a single
4594         dict_*_var_assert().
4595
4596         * dictionary.c: (dict_create_var_assert) New function.
4597         (dict_lookup_var_assert) New function.
4598
4599 Sun Feb 15 23:06:08 2004  Ben Pfaff  <blp@gnu.org>
4600
4601         Got rid of "struct long_vec", envector(), devector(), etc.  Added
4602         two members `init', `reinit' to struct variable as a substitute.
4603         
4604         * Makefile.am: (pspp_SOURCES) Removed cases.c, cases.h.
4605         
4606         * cases.c: Removed.
4607
4608         * cases.h: Removed.
4609
4610         * aggregate.c: (parse_aggregate_functions) destvar doesn't need
4611         init.
4612
4613         * autorecode.c: (cmd_autorecode) destvars don't need init.
4614
4615         * compute.c: (lvalue_finalize) Set reinit.
4616
4617         * data-list.c: (fixed_parse_compatible) Don't need init usually.
4618         (dump_fmt_list) Ditto.
4619         (parse_free) Ditto.
4620
4621         * descript.q: (run_z_pass) Don't need init for z-scores.
4622
4623         * dictionary.c: (dict_create_var) Initialize `init', `reinit'
4624         members.
4625         (dict_clone_var) Copy `reinit' member, initialize `init' member.
4626
4627         * glob.c: (init_glob) Remove vec_init() calls.
4628
4629         * inpt-pgm.c: (cmd_end_input_program) Use `reinit', not `left'.
4630         
4631         * loop.c: (internal_cmd_loop) Don't need to call envector().
4632
4633         * numeric.c: (cmd_numeric) Ditto.
4634         (cmd_string) Ditto.
4635         (cmd_leave) Ditto.  Set `init', `reinit' members.
4636
4637         * recode.c: (cmd_recode) Don't need to call envector().
4638
4639         * repeat.c: (internal_cmd_do_repeat) Ditto.
4640
4641         * var.h: (struct variable) Remove `left'.  Add `init', `reinit'.
4642         (force_create_variable) Removed prototype.
4643         (force_dup_variable) Ditto.
4644
4645         * vector.c: (cmd_vector) Don't need to call envector().
4646
4647         * vfm.c: (reinit_sysmis) Removed.
4648         (reinit_blanks) Removed.
4649         (init_zero) Removed.
4650         (init_blanks) Removed.
4651         (process_active_file_write_case) No need to deal with vectors.
4652         Call clear_temp_case().
4653         (vector_initialization) Rewrite to use `init', `reinit'.
4654         (close_active_file) No need to call vec_clear().
4655         (procedure_write_case) Call clear_temp_case().
4656         (clear_temp_case) New function.
4657
4658 Sun Feb 15 20:50:36 2004  Ben Pfaff  <blp@gnu.org>
4659
4660         * pfm-write.c: (bufwrite) Get rid of nasty cast that also invoked
4661         undefined behavior.
4662
4663 Thu Feb 12 23:35:15 2004  Ben Pfaff  <blp@gnu.org>
4664
4665         Add auxiliary argument to procedure() interface.  Associated small
4666         clean-ups of vfm interface.
4667         
4668         * Updated every caller of procedure() and process_active_file() to
4669         reflect modified interface.  Simple, ordinary changes not listed
4670         otherwise below.
4671
4672         * Updated every function that implements struct case_stream's
4673         `read' function to take a write_case_func and a write_case_data.
4674         Also updated every caller of write_case() to instead call them
4675         through these arguments.  In some cases this meant that the extra
4676         args had to be threaded through a couple of extra levels.  This
4677         wasn't difficult or interesting so the details won't be given.
4678
4679         * data-list.c: (struct repeating_data_trns) Add members
4680         `write_case', `wc_data' as kluge.
4681         (read_one_set_of_repetitions) Rename repeating_data_trns_proc and
4682         make non-static.
4683         (repeating_data_set_write_case) New function.
4684
4685         * data-list.h: New file to declare repeating_data_trns_proc() and
4686         repeating_data_set_write_case().
4687
4688         * inpt-pgm.c: (input_program_source_read) Call
4689         repeating_data_set_write_case() for all the REPEATING DATA
4690         transformations, so that they know where to send their cases.
4691         It's a big kluge.  Also kluge in END CASE.
4692         (end_case_trns_proc) Never called anymore, but we still need it,
4693         so just assert(0).
4694
4695         * sort.c: (read_sort_output) Update to match struct case_stream
4696         `read' member.
4697
4698         * vfm.c: (struct write_case_data) New structure.
4699         (proc_func) Removed.
4700         (virt_proc_func) Removed.
4701         (begin_func) Removed.
4702         (virt_begin_func) Removed.
4703         (end_func) Removed.
4704         (write_case) Removed.
4705         (procedure) Added an auxiliary parameter to each function pointer
4706         argument's prototype.  Added an auxiliary data parameter.
4707         Rewrote.
4708         (process_active_file) Ditto.
4709         (process_active_file_write_case) Pass aux data along.
4710         (close_active_file) Ditto.
4711         (procedure_write_case) Ditto.
4712         (SPLIT_FILE_procfunc) Ditto.
4713
4714         * vfm.h: (typedef write_case_data) New.
4715         (typedef write_case_func) New.
4716         (struct case_stream) Add parameters to `read' member prototype.
4717         
4718 Thu Feb 12 19:24:53 WST 2004 John Darrington <john@darrington.wattle.id.au>
4719
4720         * t-test.q:  Added calculations for independent samples. (But no Levene
4721         test yet!)
4722
4723         * Makefile.am: Moved q_sources_c into own variable 
4724
4725 Wed Feb 11 23:56:51 2004  Ben Pfaff  <blp@gnu.org>
4726
4727         Miscellaneous cleanups.
4728         
4729         * Change unused to UNUSED in many source files to reflect modified
4730         pref.h.  Change use of __WIN32__, __MSDOS, __DJGPP__,
4731         __CYGWIN32__, __unix__, and unix not to assume that they're
4732         defined to a nonzero value.  Change use of __attribute__ to use
4733         NO_RETURN or PRINTF_FORMAT instead.
4734         
4735         * alloc.h: Move definitions for local_alloc(), local_free() here
4736         from ../pref.h.orig and simplify.
4737
4738         * expr-evl.c: Instead of working differently based on PAGED_STACK,
4739         use a pool allocator unconditionally.
4740         (CHECK_STRING_SPACE) Removed.
4741         (ALLOC_STRING_SPACE) Removed.
4742         (expr_evaluate) Use e->pool instead of CHECK_STRING_SPACE and
4743         ALLOC_STRING_SPACE.
4744
4745         * expr-opt.c: (dump_expression) Allocate string pool.
4746
4747         * expr-prs.c: (expr_free) Free string pool.
4748
4749         * pool.c: (pool_destroy) This pool must be removed from its
4750         parent's list of gizmos, not from its own.  Use free_all_gizmos().
4751         (pool_clear) New function.
4752         (free_all_gizmos) New function.
4753         (pool_alloc) Use space in empty block after this one if any.
4754         (pool_release) Only empty out blocks, don't actually free() them.
4755
4756         * print.c: Get rid of PAGED_STACK special case by always
4757         dynamically allocating line buffers.
4758         (struct print_trns) Always include the `line' member.
4759         (internal_cmd_print) Always initialize the `line' member.
4760         (alloc_line) Always allocate memory for `line'.
4761         (print_trns_proc) Always initialize buf from `line' member.
4762         (print_trns_free) Always free `line' memory.
4763
4764         * sort.c: (allocate_file_handles) Special-case MS-DOS for mkdir()
4765         call.
4766         
4767 Wed Feb 11 20:33:18 2004  Ben Pfaff  <blp@gnu.org>
4768
4769         * flip.c: Fixed crash from FLIP when a numeric variable is
4770           specified on NEWNAMES and a large value is used, and a couple of
4771           other minor bugs besides.
4772           (struct varname) Make name a 9-character fixed-size array
4773           instead of a 1-character variable size array.
4774           (make_new_var) Allow digits in variable names.
4775           (flip_stream_write) Limit numeric values to 8 characters and
4776           format system missing and very large and small values more
4777           appropriately.
4778
4779 Thu Feb  5 13:19:06 WAST 2004 John Darrington <john@darrington.wattle.id.au>
4780
4781         * command.c: Fixed test on command return status for the correct 
4782           value,  which had been causing a crash under certain invalid input.
4783
4784 Wed Feb  4 15:34:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
4785
4786         * t-test.q: Added calculations for the one sample variant of the T-TEST
4787
4788 Tue Feb  3 20:09:54 2004  Ben Pfaff  <blp@gnu.org>
4789
4790         * tab.c: (render_strip) Fix bug that sometimes caused joined text
4791           in joined cells to be rendered outside box boundaries.
4792
4793 Tue Feb  3 18:56:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
4794
4795         * random.c (rng_create): Fixed seeding so that it gets reseeded after
4796         SET seed=xx has been called.
4797
4798 Mon Jan 19 14:08:09 2004  Ben Pfaff  <blp@gnu.org> 
4799
4800         * random.c (rng_get_double): Fix always-returning-zero bug in my
4801         preferred way, and at the same time make sure rounding doesn't
4802         bite us.
4803
4804 Thu Jan  1 23:16:41 2004  Ben Pfaff  <blp@gnu.org>
4805
4806         * html.c: (change_attributes) Dead code, removed.
4807         (escape_string) Eliminate code to call change_attributes() that
4808         never actually called it.
4809         (output_tab_table) Get rid of dependence on tab_hit
4810         and struct tab_joined_cell's hit member, which are abominations.
4811
4812         * tab.c: (tab_output_text) Don't call
4813         d->class->text_set_font_by_name if it's a null pointer.
4814         (macro UNROLL_LOOP) Eliminate.
4815         (macro UNROLL_3_LOOPS) Eliminate.
4816         (tabi_render) Rewrite not to use the above macros.
4817
4818 Thu Jan  1 23:09:07 2004  Ben Pfaff  <blp@gnu.org>
4819
4820         Start working on a new output driver system, one that doesn't suck
4821         so much, by adding a "device-independent" output driver.  The idea
4822         is to write out only a single output stream, then use separate
4823         processes to translate them into whatever formats we want.  This
4824         is similar to how "groff" works with its various output drivers
4825         (grops, grotty, grodvi, ...).
4826         
4827         * Makefile.am: (pspp_SOURCES) Add devind.c, devind.h.
4828
4829         * list.q: (write_all_headers) Stub out devind class.
4830         (clean_up) Ditto.
4831         (determine_layout) Ditto.
4832         (list_cases) Ditto.
4833
4834         * output.c: (outp_init) Add devind class.
4835
4836         * devind.c: New file.
4837
4838         * devind.h: New file.
4839
4840 Thu Jan  1 23:08:14 2004  Ben Pfaff  <blp@gnu.org>
4841
4842         * frequencies.q: (hash_value_alpha) Fixed up the previous change
4843         to use the proper string length.
4844
4845 Wed Dec 31 16:27:33 WAST 2003 John Darrington <john@darrington.wattle.id.au>
4846
4847         * Fixed bug where FREQ would crash on alpha values
4848
4849 Tue Dec 30 22:42:57 2003  Ben Pfaff  <blp@gnu.org>
4850
4851         * Removed bletcherous alloca() workarounds for AIX from top of
4852         many files.  AIX can use the alternative alloca() implementation
4853         instead.
4854
4855 Tue Dec 30 22:35:16 2003  Ben Pfaff  <blp@gnu.org>
4856
4857         * ascii.c: (ascii_option) Fix implementation of headers option.
4858
4859 Tue Dec 30 22:32:53 2003  Ben Pfaff  <blp@gnu.org>
4860
4861         * ascii.c: Add a "squeeze" option to the ASCII driver to squeeze
4862         multiple blank lines into one.
4863         (struct ascii_driver_ext) Add squeeze_blank_lines option.
4864         (ascii_preopen_driver) Initialize squeeze_blank_lines.
4865         (static var option_tab) Add squeeze entry.
4866         (ascii_option) Set squeeze_blank_lines.
4867         (output_lines) Implement squeezing blank lines.
4868
4869 Wed Dec 31 07:19:46 WST 2003 John Darrington <john@darrington.wattle.id.au>
4870
4871         * Removed redundant code from output.h
4872
4873 Sat Dec 27 22:17:52 2003  Ben Pfaff  <blp@gnu.org>
4874
4875         Dictionary classes: each variable is "ordinary", "system", or
4876         "scratch".
4877
4878         * var.h: (enum dict_class) New enum.
4879
4880         * vars-prs.c: (dict_class_from_id) New function.
4881         (dict_class_to_name) New function.
4882
4883 Sat Dec 27 22:16:06 2003  Ben Pfaff  <blp@gnu.org>
4884
4885         * var.h: (struct freq_tab_set) Removed (not used).
4886
4887 Sat Dec 27 22:15:21 2003  Ben Pfaff  <blp@gnu.org>
4888
4889         * value-labels.c: (val_labs_destroy) vls needs to be freed too.
4890
4891 Sat Dec 27 22:10:49 2003  Ben Pfaff  <blp@gnu.org>
4892
4893         * stats.c: (hypercube) Rename pow4().  All references updated.
4894
4895 Sat Dec 27 22:05:49 2003  Ben Pfaff  <blp@gnu.org>
4896
4897         * rename-vars.c: (cmd_rename_variables) Rewritten.
4898         (compare_name) Removed.
4899
4900 Sat Dec 27 22:03:51 2003  Ben Pfaff  <blp@gnu.org>
4901
4902         var_set feature, and code taking advantage of it.
4903         
4904         * crosstabs.q: (static var var_dict) Removed.
4905         (static var variables) New variable.
4906         (static var variables_cnt) New variable.
4907         (cmd_crosstabs) Free variables instead of var_dict.
4908         (internal_cmd_crosstabs) Initialize and use variables,
4909         variables_cnt instead of var_dict.
4910         (free_var_dict) Removed.
4911         (crs_custom_tables) Use var_set instead of a copied dictionary.
4912         (crs_custom_variables) Set up variables, variables_cnt instead of
4913         var_dict.
4914         [DEBUGGING] (debug_print) Ditto.
4915
4916         * means.q: (mns_custom_tables) Use var_set instead of a copied
4917         dictionary.
4918
4919         * vars-prs.c: (parse_vs_variable) New function.
4920         (parse_dict_variable) Rewritten.
4921         (parse_variable) Rewritten.
4922         (parse_variables) Renamed parse_var_set_vars(), rewritten.
4923         (parse_variables) New function in terms of parse_var_set_vars().
4924         Now requires its first argument to be non-null.  All references
4925         that passed a null pointer updated to pass default_dict instead.
4926         (macro id_dict) Removed.
4927         (parse_DATA_LIST_vars) Add assertions.
4928         (parse_mixed_vars) Ditto.
4929         (struct var_set) New structure.
4930         (var_set_get_cnt) New function.
4931         (var_set_get_var) New function.
4932         (var_set_lookup_var) New function.
4933         (var_set_destroy) New function.
4934         (dict_var_set_get_cnt) New function.
4935         (dict_var_set_get_var) New function.
4936         (dict_var_set_lookup_var) New function.
4937         (dict_var_set_destroy) New function.
4938         (var_set_create_from_dict) New function.
4939         (struct array_var_set) New structure.
4940         (array_var_set_get_cnt) New function.
4941         (array_var_set_get_var) New function.
4942         (array_var_set_lookup_var) New function.
4943         (array_var_set_destroy) New function.
4944         (var_set_create_from_array) New function.
4945
4946         * q2c.c: (dump_parser) Use parse_variables(default_dict, ...)
4947         instead of parse_variables(NULL, ...) in output code.
4948
4949 Sat Dec 27 21:38:53 2003  Ben Pfaff  <blp@gnu.org>
4950
4951         Change inp_init from a 2-bit vector to an ordinary array.
4952         Initialize it all in cmd_end_input_program() instead of in
4953         create_variable().
4954
4955         * inpt-pgm.c: (enum value_init_type) New enum.
4956         (global var inp_init) Change to `enum value_init_type *', make
4957         static.
4958         (inp_init_size) Removed.
4959         (inp_nval) Change to `size_t', make static.
4960         (cmd_input_program) Don't initialize inp_init or inp_init_size.
4961         (cmd_end_input_program) Initialize inp_init, inp_nval.
4962         (init_case) Rewrite.
4963         (clear_case) Rewrite.
4964
4965         * inpt-pgm.h: Removed.
4966
4967 Sat Dec 27 21:36:38 2003  Ben Pfaff  <blp@gnu.org>
4968
4969         * hash.c: (hsh_hash_bytes) Use Fowler-Noll-Vo hash instead of
4970         Colin Plumb hash.  It is simpler and should better resist
4971         collisions.
4972         (hsh_hash_string) Ditto.
4973
4974 Sat Dec 27 21:34:57 2003  Ben Pfaff  <blp@gnu.org>
4975
4976         * get.c: (export_write_case_func) Remove debug printing code.
4977
4978 Sat Dec 27 21:11:09 2003  Ben Pfaff  <blp@gnu.org>
4979
4980         * get.c: (cmd_save_internal) Rename parameter.  Use &t->h instead
4981         of cast.
4982         (save_write_case_func) Use &trns->h instead of cast.
4983         (cmd_export) Use &t->h instead of cast.
4984
4985 Sat Dec 27 20:57:42 2003  Ben Pfaff  <blp@gnu.org>
4986
4987         Moved vectors into the dictionary.
4988
4989         * var.h: (struct vector) Moved here from vector.h.  `index' member
4990         renamed `idx', `v' renamed `var', `nv' renamed `cnt'.  All
4991         references updated.
4992         
4993         * vector.h: Removed.
4994
4995         * vector.c: (global var vec) Removed.
4996         (global var nvec) Removed.
4997         (cmd_vector) Rewritten.
4998         (find_vector) Removed.
4999
5000         * dictionary.c: (dict_create_vector) New function.
5001         (dict_get_vector) New function, replaces reading global vec[]
5002         array.
5003         (dict_get_vector_cnt) New function, replaces reading global nvec
5004         variable.
5005         (dict_lookup_vector) New function, replaces find_vector().
5006         (dict_clear_vectors) New function.
5007
5008 Sat Dec 27 20:54:01 2003  Ben Pfaff  <blp@gnu.org>
5009
5010         Start to move away from `struct variable' p `union' member to void
5011         * aux member.
5012
5013         * var.h: (struct variable) Add `aux' member.
5014
5015 Sat Dec 27 20:36:25 2003  Ben Pfaff  <blp@gnu.org>
5016
5017         Get rid of struct variable `foo' member.
5018
5019         * frequencies.q: (internal_cmd_frequencies) Use p.frq.used instead
5020         of foo.
5021         (frq_custom_variables) Ditto.
5022         (frq_custom_grouped) Ditto.
5023
5024         * get.c: (struct save_trns) Change `var' member from `int *' to
5025         `struct variable **'.
5026         (cmd_save_internal) Use aux instead of foo.
5027         (save_trns_proc) Use revised `var' member.
5028         (static var mtf_seq_no) Renamed mtf_seq_num.
5029         (static var mtf_seq_nums) New static var.
5030         (cmd_match_files) Initialize mtf_seq_nums.
5031         (mtf_free) Free mtf_seq_nums.
5032         (mtf_processing) Use mtf_seq_nums instead of foo.
5033         (mtf_merge_dictionary) No need to initialize mv->foo.
5034         (cmd_export) Use aux instead of foo.  Use revised `var' member.
5035         (mns_custom_tables) Don't use foo to check for duplicates, that's
5036         what PV_NO_DUPLICATE is for.
5037
5038         * var.h: (struct variable) Remove `foo' member.
5039         (struct frequencies_proc) New member.
5040         
5041 Sat Dec 27 19:46:13 2003  Ben Pfaff  <blp@gnu.org>
5042
5043         Clean up COMPUTE and IF.
5044
5045         * compute.c: More or less rewrite the darn thing.
5046         (struct compute_trns) Rename and reorder and add and delete
5047         members.
5048         (cmd_compute) Rewrite.
5049         (compute_num) Make conditional on test expression.  Now used for
5050         both COMPUTE and IF.
5051         (compute_num_vec) Ditto.
5052         (compute_str) Ditto.
5053         (compute_str_vec) Ditto.
5054         (cmd_if) Rewrite.
5055         (if_num) Removed.
5056         (if_num_vec) Removed.
5057         (if_str) Removed.
5058         (if_str_vec) Removed.
5059         (parse_target_expression) Renamed parse_rvalue_expression(),
5060         rewritten.
5061         (new_trns) Renamed compute_trns_create(), rewritten.
5062         (delete_trns) Removed.
5063         (free_trns) Renamed compute_trns_free(), rewritten.
5064         (struct lvalue) New structure.
5065         (parse_var_or_vec) Renamed lvalue_parse(), rewritten.
5066         (lvalue_get_type) New function.
5067         (lvalue_is_vector) New function.
5068         (lvalue_finalize) New function.
5069         (lvalue_destroy) New function.
5070         
5071 Sat Dec 27 19:44:14 2003  Ben Pfaff  <blp@gnu.org>
5072
5073         * command.def: Disallow MODIFY VARS in input mode, so that
5074         variables can't get dropped and confuse cmd_end_input_program()'s
5075         attempt to fill inp_init[].
5076         
5077         * modify-vars.c: (static var forward_positional_ordering) New
5078         variable.
5079         (struct var_modification) Entirely changed.
5080         (rearrange_dict) Interface changed, rewritten.
5081         (cmd_modify_vars) Deal with modified struct var_modification, much
5082         rewritten.
5083         (struct var_renaming) New structure.
5084         (compare_var_renaming_by_new_name) New function.
5085         (validate_var_modification) New function.
5086
5087         * var.h: (struct modify_vars_proc) Removed.
5088         (struct variable) Removed member p.mfv.
5089
5090 Sat Dec 27 19:40:26 2003  Ben Pfaff  <blp@gnu.org>
5091
5092         Make EVALUATE a valid command whether we're debugging or not, so
5093         that `make check' can succeed regardless of whether debugging is
5094         turned on.
5095         
5096         * command.def: [GLOBAL_DEBUGGING] Drop the #if.
5097
5098         * compute.c: [GLOBAL_DEBUGGING] (cmd_evaluate) Drop the #if.
5099
5100 Sat Dec 27 19:34:40 2003  Ben Pfaff  <blp@gnu.org>
5101
5102         * apply-dict.c: (cmd_apply_dictionary) Replace a ghastly switch
5103         statement by a simple if test.
5104
5105         * dfm.c: (dfm_get_record) Add assertion.
5106
5107 Sat Dec 27 17:51:26 2003  Ben Pfaff  <blp@gnu.org>
5108
5109         For each file x.c, move #include "x.h" to the very top of the
5110         include list, to catch x.h failing to include the proper headers.
5111
5112 Sat Dec 27 17:50:19 2003  Ben Pfaff  <blp@gnu.org>
5113
5114         * algorithm.c: (find) New function.
5115         (remove_equal) New function.
5116         (set_difference) New function.
5117         (adjacent_find_equal) New function.
5118         [TEST_UNIQUE] Removed test case.
5119         (copy_if) Find end test.
5120
5121 Sat Dec 27 17:42:45 2003  Ben Pfaff  <blp@gnu.org>
5122
5123         * dictionary.c: (dict_get_case_weight) New convenience function.
5124
5125         * aggregate.c: (accumulate_aggregate_info) Use
5126         dict_get_case_weight().
5127
5128         * frequencies.q: (calc_general) Ditto.
5129         (calc_integer) Ditto.
5130         (calc) Ditto.
5131
5132         * t-test.q: (groups_calc) Ditto.
5133         (z_calc) Ditto.
5134
5135 Sat Dec 27 17:29:45 2003  Ben Pfaff  <blp@gnu.org>
5136
5137         * glob.c: (global var default_dict) Change from `struct
5138         dictionary' to `struct dictionary *'.  All references changed.
5139         (init_glob) Initialize default_dict with dict_create().
5140
5141 Sat Dec 27 17:06:06 2003  Ben Pfaff  <blp@gnu.org>
5142
5143         struct dictionary now made opaque.  All related functions:
5144
5145         * get.c: (rename_variables) Removed.
5146         (dict_delete_run) Removed.
5147         
5148         * temporary.c: (copy_variable) Removed.
5149         (new_dictionary) Removed.
5150         (save_dictionary) Removed.
5151         (restore_dictionary) Removed.
5152         (free_dictionary) Removed.
5153
5154         * vars-atr.c: (clear_default_dict) Removed.
5155         (find_variable) Removed.
5156         (find_dict_variable) Removed.
5157         (create_variable) Removed.
5158         (delete_variable) Removed.
5159         (common_init_stuff) Removed.
5160         (init_variable) Removed.  Updating of inp_init moved into
5161         cmd_end_input_program().
5162         (replace_variable) Removed.
5163         (rename_variable) Removed.
5164         (clear_variable) Removed.
5165         (dup_variable) Removed.
5166
5167         * vars-prs.c: (is_varname) Removed.
5168         (is_dict_varname) Removed.
5169         (fill_all_vars) Removed.
5170
5171         * vector.c: (find_vector) Removed.
5172
5173         * weight.c: (stop_weighting) Removed.
5174
5175         * dictionary.c: New file.
5176         (dict_create) New, replaces new_dictionary().
5177         (dict_clone) New, replaces save_dictionary() and
5178         restore_dictionary().
5179         (dict_clear) New, replaces clear_default_dict().
5180         (dict_destroy) New, replaces free_dictionary().
5181         (dict_get_var_cnt) New function, replaces references to
5182         dict->nvar.
5183         (dict_get_var) New function, replaces references to dict->var[i].
5184         (dict_get_vars) New function, replaces fill_all_vars().
5185         (dict_create_var) New, replaces create_variable().  Interface
5186         drops `type' parameter, using a zero `width' to designate numeric.
5187         (dict_clone_var) New, replaces dup_variable().
5188         (dict_rename_var) New, replaces rename_variable().
5189         (dict_lookup_var) New, replaces find_variable(),
5190         find_dict_variable(), is_varname().
5191         (dict_contains_var) New function.
5192         (compare_variable_dblptrs) New function.
5193         (dict_delete_var) New function, replaces clear_variable().
5194         (dict_delete_vars) New function, replaces dict_delete_run().
5195         (dict_reorder_vars) New function.
5196         (dict_rename_vars) New function, replaces rename_variables().
5197         (dict_get_weight) New function, replaces reading dict->weight_var.
5198         (dict_set_weight) New function, replaces writing dict->weight_var
5199         or calling stop_weight(dict).
5200         (dict_get_filter) New function, replaces reading dict->filter_var.
5201         (dict_set_filter) New function, replaces writing dict->filter_var.
5202         (dict_get_case_limit) New function, replaces reading dict->N.
5203         (dict_set_case_limit) New function, replaces writing dict->N.
5204         (dict_get_value_cnt) New function, replaces reading dict->nval.
5205         (dict_compact_values) New function, replaces a loop that was
5206         replicated in several places.
5207         (dict_get_split_vars) New function, replaces reading dict->splits.
5208         (dict_get_split_cnt) New function, replaces reading
5209         dict->n_splits.
5210         (dict_set_split_vars) New function, replaces writing dict->splits.
5211         (dict_get_label) New function, replaces reading dict->label.
5212         (dict_set_label) New function, replaces writing dict->label.
5213         (dict_get_documents) New function, replaces reading
5214         dict->documents.
5215         (dict_set_documents) New function, replaces writing
5216         dict->documents.
5217         
5218         All references to above functions updated.
5219         
5220         * aggregate.c: (cmd_aggregate) Copy file label and documents from
5221         old dictionary to new by hand, because dict_create() can't do it
5222         itself.  Use dict_set_documents(), dict_set_split_vars().
5223
5224         * temporary.c: (cancel_temporary) Also set temp_dict to NULL after
5225         calling dict_destroy().
5226
5227         * data-list.c: (dls_var_spec) Remove `type' member, replace by
5228         `width'.
5229         (fixed_parse_compatible) Some slightly nontrivial changes for
5230         dict_create_var().
5231         (dump_fmt_list) Ditto.
5232         (parse_free) Ditto.
5233
5234         * file-type.c: (create_col_var) Ditto.
5235
5236         * get.c: (cmd_get) Use dict_compact_values() instead of a loop.
5237         (trim_dictionary) Use dict_delete_vars(), dict_reorder_vars().
5238         (rename_variables) Use dict_rename_vars().
5239         (mtf_merge_dictionary) Use dict_get_documents(),
5240         dict_set_documents(), dict_compact_values().
5241
5242         * pfm-read.c: (read_variables) Deal with changes to weighting.
5243
5244         * q2c.c: (dump_parser) Use dict_lookup_var() instead of
5245         is_varname() in output code.
5246
5247         * sfm-read.c: (read_header) Use dict_create(), dict_set_label(),
5248         other dictionary functions.
5249
5250         * title.c: (add_document_line) Use dict_get_documents(),
5251         dict_set_documents().
5252
5253         * vars-atr.c: (discard_variables) Use dict_clear(default_dict),
5254         reset default_handle by hand.  dict_clear() will clear vectors so
5255         there's no need for that by hand.
5256
5257         * vfm.c: (close_active_file) Move call to finish_compaction()
5258         earlier, so that we can do the compaction as a single step using
5259         dict_compact_values().  Use dict_clear_vectors().
5260         (finish_compaction) Use dict_delete_var(), dict_compact_values().
5261                 
5262         Some functions don't have replacements:
5263
5264         * vars-atr.c: (force_create_variable) Removed.  All references
5265         updated to dict_create_var() followed by an assertion.
5266         (force_dup_variable) Removed.  All references updated to
5267         dict_clone_var() followed by an assertion.
5268         
5269         * weight.c: (update_weighting) Removed.  No longer necessary, so
5270         all references removed.
5271
5272 Sat Dec 27 16:43:01 2003  Ben Pfaff  <blp@gnu.org>
5273
5274         Clean up AGGREGATE.
5275         
5276         * aggregate.c: Eliminate separation of weighted and unweighted
5277         case.  It made the code too obscure and I doubt it was actually
5278         faster.  Instead, all code uses the "weighted" code, because
5279         that's a generalization of the "unweighted" code.
5280         (FWEIGHT) Removed.
5281         (FOPTIONS) Ditto.
5282         (parse_aggregate_functions) No need to set FWEIGHT.
5283         (accumulate_aggregate_info) Get rid of FWEIGHT cases.
5284         (dump_aggregate_info) Ditto.
5285         (initialize_aggregate_info) No need for special plain_function
5286         that gets rid of FWEIGHT option.
5287
5288         * aggregate.c: Get rid of approximations.
5289         (accumulate_aggregate_info) Don't use approx_gt(), approx_lt(),
5290         approx_in_range().
5291         (aggregate_single_case) Don't use approx_ne().
5292
5293 Sat Dec 27 16:19:36 2003  Ben Pfaff  <blp@gnu.org>
5294
5295         * ascii.c (ascii_line_width): Dead code, removed.
5296
5297         * postscript.c (ps_line_width): Ditto.
5298
5299         * q2c.c (xrealloc): Ditto.
5300
5301         * count.c (internal_cmd_count): Ditto.
5302
5303         * means.q (validate_dependent_endpoint): Ditto.
5304
5305         * set.q: (cmd_gset) Ditto.
5306
5307         * weight.c: [0] (weight_trns_proc) Ditto.
5308
5309 Sat Dec 27 16:18:16 2003  Ben Pfaff  <blp@gnu.org>
5310
5311         Make the code -Wmissing-prototypes clean.
5312
5313         * Makefile.am (version.c): Add #include "version.h".
5314         
5315         * ascii.c: (ascii_open_global) Make static.
5316         (ascii_close_page) Ditto.
5317         (ascii_font_sizes) Ditto.
5318         (ascii_postopen_driver) Ditto.
5319         (ascii_close_driver) Ditto.
5320         (ascii_option) Ditto.
5321         (ascii_open_page) Ditto.
5322         (ascii_line_horz) Ditto.
5323         (ascii_line_vert) Ditto.
5324         (ascii_line_intersection) Ditto.
5325         (ascii_box) Ditto.
5326         (ascii_polyline_begin) Ditto.
5327         (ascii_polyline_point) Ditto.
5328         (ascii_polyline_end) Ditto.
5329         (ascii_text_set_font_by_name) Ditto.
5330         (ascii_text_set_font_by_position) Ditto.
5331         (ascii_text_set_font_by_family) Ditto.
5332         (ascii_text_get_font_name) Ditto.
5333         (ascii_text_get_font_family) Ditto.
5334         (ascii_text_set_size) Ditto.
5335         (ascii_text_get_size) Ditto.
5336         (ascii_text_metrics) Ditto.
5337         (ascii_text_draw) Ditto.
5338         (ascii_close_page) Ditto.
5339
5340         * cmdline.h: New header for parse_command_line().  Used where
5341         needed.
5342
5343         * command.c: Move prototypes for cmd_*() functions to command.h.
5344
5345         * command.h: Prototypes for cmd_*() functions moved here from
5346         command.c.
5347
5348         * crosstabs.q: (gamma_int) Ditto.
5349
5350         * file-handle.h: Add fh_init_files() prototype.
5351         
5352         * getline.c: (welcome) Ditto.
5353
5354         * glob.h: New header for init_glob().  Used where appropriate.
5355
5356         * hash.c: (comparison_helper) Ditto.
5357
5358         * html.c: (html_open_global) Ditto.
5359         (html_close_global) Ditto.
5360         (html_preopen_driver) Ditto.
5361         (html_postopen_driver) Ditto.
5362         (html_close_driver) Ditto.
5363         (html_option) Ditto.
5364         (html_open_page) Ditto.
5365         (html_close_page) Ditto.
5366         (html_submit) Ditto.
5367
5368         * inpt-pgm.c: (input_program_source_read) Ditto.
5369
5370         * output.c: (find_defn_value) Ditto.
5371         (destroy_list) Ditto.
5372
5373         * pfm-read.c: (read_int) Ditto.
5374
5375         * postscript.c: (ps_open_global) Ditto.
5376         (ps_close_global) Ditto.
5377         (ps_font_sizes) Ditto.
5378         (ps_preopen_driver) Ditto.
5379         (ps_postopen_driver) Ditto.
5380         (ps_close_driver) Ditto.
5381         (ps_option) Ditto.
5382         (ps_open_page) Ditto.
5383         (ps_close_page) Ditto.
5384         (ps_line_horz) Ditto.
5385         (ps_line_vert) Ditto.
5386         (ps_line_intersection) Ditto.
5387         (ps_box) Ditto.
5388         (ps_polyline_begin) Ditto.
5389         (ps_polyline_point) Ditto.
5390         (ps_polyline_end) Ditto.
5391         (ps_text_set_font_by_name) Ditto.
5392         (ps_text_set_font_by_position) Ditto.
5393         (ps_text_set_font_family) Ditto.
5394         (ps_text_get_font_name) Ditto.
5395         (ps_text_get_font_family) Ditto.
5396         (ps_text_set_size) Ditto.
5397         (ps_text_get_size) Ditto.
5398         (ps_text_metrics) Ditto.
5399         (ps_text_draw) Ditto.
5400
5401         * q2c.c: (finish_up) Ditto.
5402         (xmalloc) Ditto.
5403         (xstrdup) Ditto.
5404         (get_buffer) Ditto.
5405         (st_lower) Ditto.
5406         (st_upper) Ditto.
5407         (skip_ws) Ditto.
5408         (get_line) Ditto.
5409         (add_symbol) Ditto.
5410         (find_symbol) Ditto.
5411         (lex_get) Ditto.
5412         (force_id) Ditto.
5413         (force_string) Ditto.
5414         (match_id) Ditto.
5415         (match_token) Ditto.
5416         (skip_token) Ditto.
5417         (parse) Ditto.
5418         (parse_setting) Ditto.
5419         (parse_specifier) Ditto.
5420         (parse_specifiers) Ditto.
5421         (parse_subcommand) Ditto.
5422         (dump_specifier_vars) Ditto.
5423         (is_keyword) Ditto.
5424         (make_identifier) Ditto.
5425         (dump_declarations) Ditto.
5426         (dump_specifier_init) Ditto.
5427         (dump_vars_init) Ditto.
5428         (make_match) Ditto.
5429         (dump_specifier_parse) Ditto.
5430         (dump_subcommand) Ditto.
5431         (dump_parser) Ditto.
5432         (dump_header) Ditto.
5433         (dump_free) Ditto.
5434         (recognize_directive) Ditto.
5435
5436         * recode.c: (string_to_long) Ditto.
5437
5438         * repeat.c: (find_DO_REPEAT_substitution) Ditto.
5439
5440         * repeat.h: New header for perform_DO_REPEAT_substitutions, used
5441         where appropriate.
5442
5443         * sort.c: (sort_stream_read) Ditto.
5444         (sort_stream_mode) Ditto.
5445         
5446 Fri Dec 19 23:35:04 2003  Ben Pfaff  <blp@gnu.org>
5447
5448         * algorithm.c (binary_search): Fix comparison.
5449
5450 Fri Dec 19 23:27:45 2003  Ben Pfaff  <blp@gnu.org>
5451
5452         * algorithm.c: (binary_search) Fix assertion.
5453
5454 Fri Dec 19 21:31:48 2003  Ben Pfaff  <blp@gnu.org>
5455
5456         * sysfile-info.c: (compare_vectors_by_name) Rewrite.
5457
5458 Fri Dec 19 21:30:24 2003  Ben Pfaff  <blp@gnu.org>
5459
5460         * sort.c: (compare_case_lists) Rewrite.
5461
5462 Fri Dec 19 16:44:22 2003  Ben Pfaff  <blp@gnu.org>
5463
5464         * quicksort.c: Removed (not used).
5465
5466         * quicksort.h: Removed (not used).
5467
5468         * sort.c: Removed blp_quicksort() prototype.
5469
5470 Fri Dec 19 16:42:13 2003  Ben Pfaff  <blp@gnu.org>
5471
5472         * postscript.c: (int_2_compare) Rewrite.
5473         (compare_line) Rewrite.
5474
5475 Fri Dec 19 16:38:35 2003  Ben Pfaff  <blp@gnu.org>
5476
5477         * matrix-data.c (compare_factors) Use lexicographical_compare()
5478         algorithm.
5479         (compare_doubles) New function.
5480         
5481         * algorithm.c: (lexicographical_compare) New algorithm.
5482
5483 Fri Dec 19 16:23:45 2003  Ben Pfaff  <blp@gnu.org>
5484
5485         * matrix-data.c (compare_variables_by_mxd_vartype): Rewrite.
5486
5487 Fri Dec 19 15:54:45 2003  Ben Pfaff  <blp@gnu.org>
5488
5489         * expr-prs.c: (cmp_func) Removed.
5490         (parse_function) Use binary_search() algorithm.
5491         (compare_functions) New function.
5492         (init_func_tab) Use sort() algorithm.
5493
5494         * algorithm.c: (binary_search) New algorithm.
5495
5496 Fri Dec 19 15:50:45 2003  Ben Pfaff  <blp@gnu.org>
5497
5498         * descript.q: (display) Use sort() algorithm instead of qsort().
5499         (compare_func) Removed.
5500         (descriptives_compare_variables) New function.
5501
5502 Fri Dec 19 15:08:38 2003  Ben Pfaff  <blp@gnu.org>
5503
5504         Get rid of AVL trees.  Hashes are more appropriate for everything
5505         PSPP does.
5506
5507         * Makefile.am: (pspp_SOURCES) Remove avl.c, avl.h.
5508         
5509         * avl.c: Removed.
5510
5511         * avl.h: Removed.
5512
5513 Fri Dec 19 14:33:31 2003  Ben Pfaff  <blp@gnu.org>
5514
5515         Much code can be clarified by using C++ STL-like algorithms.  Not
5516         all uses of these algorithms are listed below, only the ones where
5517         the change to an algorithm was the only change of interest.
5518         
5519         * Makefile.am: (pspp_SOURCES) Add algorithm.c, algorithm.h.
5520         
5521         * algorithm.c: New file.
5522
5523         * algorithm.h: New file.
5524
5525         * modify-vars.c: (static var forward) Removed.
5526         (static var positional) Removed.
5527         (compare_variables) Removed.
5528         (struct ordering) New.
5529         (cmd_modify_vars) Use sort() algorithm.
5530         (compare_variables_given_ordering) New function.
5531         (rearrange_dict) Use sort() algorithm.
5532
5533         * sysfile-info.c: (cmd_display) Use sort() algorithm.
5534         (cmp_var_by_name) Removed.
5535
5536 Fri Dec 19 14:26:17 2003  Ben Pfaff  <blp@gnu.org>
5537
5538         Make file handles use a hash table.
5539         
5540         * file-handle.q: (files) Change to hash table, make static.
5541         (cmd_file_handle) Use hash table functions.
5542         (fh_get_handle_by_filename) Ditto.
5543         (fh_get_handle_by_name) Ditto.
5544         (hash_file_handle) New function.
5545         (cmp_file_handle) Rewrite.
5546         (fh_init_files) Use hash table functions.
5547
5548 Fri Dec 19 14:24:38 2003  Ben Pfaff  <blp@gnu.org>
5549
5550         Clean up FREQUENCIES.
5551         
5552         * Makefile.am: (pspp_SOURCES) Remove frequencies.g.
5553
5554         * frequencies.q: Remove a lot of old #if'd out code at the end.
5555         (internal_cmd_frequencies) Use calc() instead of calc_no_weight()
5556         or calc_weight().  Initialize percentile_values.
5557         (calc) New function based on calc_weight() from frequencies.g.
5558         (precalc) Use hash functions.
5559         (static var comparison_func) Removed.
5560         (static var comparison_param) Removed.
5561         (comparison_helper) Removed.
5562         (get_freq_comparator) New function.
5563         (not_missing) New function.
5564         (add_freq) Removed.
5565         (postprocess_freq_tab) Use hash table functions, algorithms,
5566         get_freq_comparator().  Rewrite.
5567         (cleanup_freq_tab) Rephrase.
5568         (add_percentile) Clean up spacing.
5569         (hash_value_numeric) New function.
5570         (hash_value_alpha) New function.
5571         (compare_value_numeric_a) Rewrite.
5572         (compare_value_alpha_a) Rewrite.
5573         (compare_value_numeric_d) Rewrite.
5574         (compare_value_alpha_d) Rewrite.
5575         (compare_freq_numeric_a) Rewrite.
5576         (compare_freq_alpha_a) Rewrite.
5577         (compare_freq_numeric_d) Rewrite.
5578         (compare_freq_alpha_d) Rewrite.
5579         (calc_stats) Clean up mode, percentiles, max.
5580         (dump_statistics) Clean up spacing.
5581         
5582         * frequencies.g: Removed.
5583
5584         * var.h: (struct freq_tab) Change `data' to hash table.
5585
5586 Fri Dec 19 14:15:46 2003  Ben Pfaff  <blp@gnu.org>
5587
5588         * file-handle.h: Remove declaration of global variable `files',
5589         which wasn't used anywhere.
5590
5591         * postscript.c: (add_encoding) Remove superfluous cast.
5592         (line) Ditto.
5593
5594         * sfm-read.c: [linux] (bswap_int32) Drop ntohl() non-portable
5595         version.
5596
5597         * temporary.c: [0] (display_tree) Removed.
5598
5599 Fri Dec 19 14:13:04 2003  Ben Pfaff  <blp@gnu.org>
5600
5601         Implement a new random number generator based on the alleged RC4
5602         algorithm.
5603
5604         * expr-evl.c: (expr_evaluate) Use rng_get_double_normal() instead
5605         of rand_normal().
5606
5607         * random.c: [!HAVE_GOOD_RANDOM] (real_rand) Removed.
5608         [!HAVE_GOOD_RANDOM] (real_srand) Removed.
5609         (macro k) Removed.
5610         (static var V[]) Removed.
5611         (static var Y) Removed.
5612         (static var X2) Removed.
5613         (setup_randomize) Removed.
5614         (shuffle) Removed.
5615         (rand_uniform) Removed.
5616         (rand_normal) Removed.
5617         (struct rng) New structure.
5618         (rng_create) New function.
5619         (rng_destroy) New function.
5620         (swap_byte) New static function.
5621         (rng_seed) New function.
5622         (rng_get_bytes) New function.
5623         (rng_get_int) New function.
5624         (rng_get_unsigned) New function.
5625         (rng_get_double) New function.
5626         (rng_get_double_normal) New function.
5627         (pspp_rng) New function.
5628
5629         * random.h: Sync up to random.c.
5630
5631         * sample.c: (struct sample_trns) Make `frac' unsigned and a
5632         fraction of UINT_MAX, not 65536.
5633         (cmd_sample) Use rng_get_unsigned(), rng_get_double(), UINT_MAX
5634         fraction.
5635
5636         * vfm.c: (open_active_file) No need to call setup_randomize() any
5637         longer.
5638
5639 Fri Dec 19 12:05:56 2003  Ben Pfaff  <blp@gnu.org>
5640
5641         Change dictionary name indexes to use hash tables instead of AVL
5642         trees.
5643
5644         * crosstabs.q: (free_var_dict) Use hash tables.
5645         (crs_custom_tables) Ditto.
5646         (calc_general) Ditto.
5647         (compare_table_entry) Rewrite.
5648         (enum_var_values) Reorder parameters.  All references updated.
5649         Rewrite.
5650
5651         * get.c: (rename_variable) Use hash tables.
5652         (mtf_merge_dictionary) Ditto.
5653
5654         * glob.c: (init_glob) Use hash tables.
5655         (cmp_variable) Removed.
5656
5657         * means.q: (mns_custom_tables) Use hash tables.
5658
5659         * modify-vars.c: (rearrange_dict) Use hash tables.
5660
5661         * rename-vars.c: (cmd_rename_variables) Use hash tables.
5662
5663         * sfm-read.c: (read_header) Use hash tables.
5664         (read_variables) Ditto.
5665
5666         * temporary.c: (new_dictionary) Use hash tables.
5667         (save_dictionary) Ditto.
5668         (restore_dictionary) Ditto.
5669
5670         * var.h: (struct dictionary) Change AVL tree `var_by_name' into
5671         hash table `name_tab'.
5672
5673         * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed.
5674         [DEBUGGING] (dump_var_tree) Removed.
5675         (find_variable) Use hash tables.
5676         (find_dict_variable) Ditto.
5677         (common_init_stuff) Ditto.
5678         (rename_variable) Ditto.
5679         (clear_variable) Ditto.  Also, remove debug code.
5680         (dup_variable) Use hash tables.
5681
5682         * vars-prs.c: (fill_all_vars) Use hash tables.
5683         (is_dict_varname) Ditto.
5684         (parse_dict_variable) Ditto.
5685         
5686 Fri Dec 19 11:46:23 2003  Ben Pfaff  <blp@gnu.org>
5687
5688         Change value labels to use hash tables instead of AVL trees, and
5689         change value labels into an ADT.
5690
5691         * Makefile.am: (pspp_SOURCES) Add value-labels.c, value-labels.h.
5692         
5693         * value-labels.c: New file.
5694
5695         * value-labels.h: New file.
5696
5697         * apply-dict.c: (cmd_apply_dictionary) Use value label ADT.
5698         Get rid of a stupid use of goto.
5699
5700         * autorecode.c: (compare_alpha_value) Rewrite.
5701         (hash_alpha_value) Ditto.
5702         (compare_numeric_value) Rewrite.
5703         (hash_numeric_value) Ditto.
5704
5705         * frequencies.q: (dump_full) Use value label ADT.
5706
5707         * pfm-read.c: (read_value_label) Use value label ADT.
5708
5709         * pfm-write.c: (write_value_labels) Use value label ADT.
5710
5711         * sfm-read.c: (read_variables) Use value label ADT.
5712         (read_value_labels) Rewrite.
5713
5714         * sfm-write.c: (write_value_labels) Rewrite.
5715
5716         * sysfile-info.c: (cmd_sysfile_info) Use value label ADT.
5717         (display_variables) Ditto.
5718         (describe_variable) Ditto.
5719
5720         * t-test.q: (print_t_groups) Use value label ADT.
5721
5722         * temporary.c: (copy_variable) Use value label ADT.
5723         (free_dictionary) Ditto.
5724
5725         * val-labs.c: (verify_val_labs) Use value label ADT.
5726         (get_label) Ditto.
5727         (debug_print) Ditto.
5728         (val_lab_cmp) Removed.
5729         (inc_ref_count) Removed.
5730         (copy_value_labels) Removed.
5731
5732         * var.h: (struct value_label) Removed.
5733         (struct variable) Change AVL tree `val_lab' into hash table
5734         `val_labs'.
5735
5736         * vars-atr.c: (init_variable) Use value label ADT.
5737         (clear_variable) Ditto.
5738         (free_value_label) Removed.
5739         (free_val_lab) Removed.
5740         (get_val_lab) Removed.
5741         (compare_variables) New function.
5742         (hash_variable) New function.
5743
5744         * vfm.c: (dump_splits) Use value label ADT.
5745
5746 Fri Dec 19 11:18:11 2003  Ben Pfaff  <blp@gnu.org>
5747
5748         Add to the hash table interface.
5749
5750         * hash.c: (hsh_hash_bytes) Add assertion.
5751         (hsh_hash_string) Ditto.
5752         (hsh_clear) Ditto.
5753         (hsh_rehash) Ditto.
5754         (hsh_probe) Ditto.
5755         (hsh_create) Ditto.  Also make minimum `size'.
5756         (hsh_destroy) Rephrase.
5757         (sort_nulls_last) Removed.
5758         (not_null) New function.
5759         (hsh_data) Ditto.
5760         (comparison_helper) Ditto.
5761         (hsh_sort) Rewritten.
5762         (hsh_data_copy) New function.
5763         (hsh_sort_copy) Ditto.
5764         (hsh_insert) Ditto.
5765         (hsh_replace) Ditto.
5766         (hsh_hash_double) Ditto.
5767         (hsh_delete) Fix stupid bug.
5768         
5769 Thu Dec 18 12:27:03 WAST 2003 John Darrington <john@darrington.wattle.id.au>
5770         * added a calculation of the mode to FREQUENCIES
5771
5772 Wed Dec 17 12:53:01 WAST 2003 John Darrington <john@darrington.wattle.id.au>
5773
5774         * moved (un)defs of DEBUGGING to config.h
5775
5776 Mon Dec 15 21:35:59 2003  Ben Pfaff  <blp@gnu.org>
5777
5778         * groff-font.c: (add_kern) Fix indentation.
5779         (add_kern) Use & instead of % to take power-of-2 modulus.
5780         (font_get_kern_adjust) Likewise.
5781
5782 Fri Dec 12 23:54:37 2003  Ben Pfaff  <blp@gnu.org>
5783
5784         * autorecode.c: (recode) Replace stupid use of memcpy() by
5785         memberwise copy.
5786         (hash_alpha_value) Use hsh_hash_bytes().  Get rid of nasty casts.
5787         (hash_numeric_value) Ditto.
5788         (autorecode_proc_func) pool_strdup() was wrong here because the
5789         source string was not null-terminated.  Use new pool_strndup()
5790         instead.
5791
5792         * crosstabs.q: (enum_var_values) Remove superfluous and bizarre
5793         use of hsh_iterator_init().
5794
5795         * data-in.c: (parse_N) Initialize i->v->f.
5796
5797         * flip.c: (cmd_flip) Use memmove(), not memcpy(), to copy
5798         overlapping arrays.
5799
5800         * groff-font.c: Use power-of-2 hash table sizes, not prime.
5801         (groff_read_font) Don't call hsh_next_prime().  Don't call
5802         fclose(NULL).
5803         (static var hash) Remove `size_p', `max_used' members.
5804         (font_char_name_to_index) Don't call hsh_next_prime().  Use
5805         hsh_hash_string() instead of hashpjw(), & instead of %.
5806         (default_font) Don't call hsh_next_prime().
5807
5808         * pool.c: (pool_strndup) New function.
5809         (pool_strdup) Reimplement in terms of pool_strndup.
5810
5811         * postscript.c: (hash_font_entry) Use hsh_hash_string().  Get rid
5812         of nasty casts.
5813         (hash_ps_encoding) Use hsh_hash_string().
5814         (hash_ps_combo) Use hsh_hash_string(), hsh_hash_int().
5815         (hash_filename2font) Use hsh_hash_string().
5816
5817         * som.c: Add #include <stdlib.h>.
5818
5819         * tab.c: (tab_destroy) Don't set t->container after freeing `t'
5820         (by destroying its pool).
5821         
5822 Fri Dec 12 23:18:59 2003  Ben Pfaff  <blp@gnu.org>
5823
5824         Miscellaneous hash table code cleanup:
5825         
5826         * hash.h: (struct hsh_table) Moved into hash.c.
5827         (hsh_count) Ditto, and transformed into function.
5828         (hsh_compare_func) New typedef, used for defining otherwise-long
5829         function types here and in hash.c
5830         (hsh_hash_func) Ditto.
5831         (hsh_free_func) Ditto.
5832         
5833         * hash.c: (struct hsh_table) Renamed `n' to `used', `m' to `size',
5834         `table' to `entries'.  Removed `mp'.  All references updated.
5835         (hsh_clear) Don't shrink entries array; if the hash was this big
5836         once, it probably will be again.
5837         (hsh_rehash) Made static.
5838         (force_hsh_insert) Renamed hsh_force_insert.
5839         (force_hsh_find) Renamed hsh_force_find.
5840
5841         Made hash table sizes powers of 2, because that's fine with any
5842         reasonable hash function and because taking a power-of-2 modulus
5843         is faster than any other:
5844         
5845         (hsh_prime_tab) Removed;
5846         (hsh_next_prime) Ditto.
5847         (next_power_of_2) New function.
5848         (hsh_create) Use next_power_of_2.
5849         (hsh_rehash) Use & instead of %.
5850
5851         Cleaned up hsh_sort:
5852         
5853         (internal_comparison_fn) Removed.
5854         (sort_nulls_last) New function.
5855         (hsh_sort) Removed second parameter, switched to using the new
5856         quicksort() function from quicksort.h to avoid using nasty need
5857         for static variables with qsort().  All references updated.
5858
5859         Changed the hash functions offered, because there are better hash
5860         functions than the ones we had, and cleaned up the names to boot:
5861         
5862         * hash.c: (hashpjw_d) Removed.
5863         (hashpjw) Ditto.
5864         (hsh_hash_bytes) New function.
5865         (hsh_hash_string) New function.
5866         (hsh_hash_int) New function.
5867
5868         Improved the hash table iteration interface:
5869         
5870         * hash.h: (hsh_iterator_init) Removed.
5871         (struct hsh_iterator) Removed `init' member, change `next' to
5872         size_t.
5873
5874         * hash.c: (hsh_foreach) Removed.  All references updated to use
5875         hsh_first/hsh_next instead.
5876         (hsh_first) New function.  Notably, unlike hsh_foreach() it does
5877         not treat a null pointer as an empty hash table.
5878         (hsh_next) New function.
5879
5880         Made deletion possible, though slow:
5881
5882         * hash.c: (locate_matching_entry) New function.
5883         (hsh_find) Use locate_matching_entry().
5884         (hsh_delete) New function also using locate_matching_entry().
5885         (hsh_force_delete) New function.
5886
5887 Fri Dec 12 23:16:10 2003  Ben Pfaff  <blp@gnu.org>
5888
5889         * quicksort.c: New file implementing a sort routine with a
5890         interface better than qsort() because it passes a user-provided
5891         parameter to the sort routine.
5892
5893         * Makefile.am: Add quicksort.c, quicksort.h.
5894
5895 Fri Dec 12 13:31:58 2003  Ben Pfaff  <blp@gnu.org>
5896
5897         * All source files: Get rid of nasty special cases for Checker,
5898         which is pretty obsolete now.
5899
5900 Thu Dec 11 21:38:24 WST 2003 John Darrington <john@darrington.wattle.id.au>
5901
5902         * Fixed a bug apparent when using the FREQUENCIES command with the
5903         html driver.  The html driver was incorrectly trying to display 
5904         empty cells.
5905
5906 Sun Jan  2 21:40:13 2000  Ben Pfaff  <blp@gnu.org>
5907
5908         * Makefile.am: Reorganized.  Put locale dir in version.c instead
5909         of passing it to each compile command.  Only put local gmp libs in
5910         LD_ADD if not installed on system.  Remove `boast' target.
5911
5912         * All source files: struct and union typedefs eliminated.
5913         `sizeof type' replaced by `sizeof object' where practical.  Moved
5914         `unused' qualifiers from start to end of declarations for gcc
5915         2.7.2 compatibility.  Change `while (1)' to `for (;;)'.  Made
5916         assertions on pointers strictly compliant.  Removed _ prefixes on
5917         some function parameter names.
5918
5919         * alloc.c: New source file, containing these external linkage
5920         functions removed from common.c: xmalloc, xcalloc, xrealloc,
5921         xstrdup.
5922
5923         * arena.c: Removed.
5924         
5925         * arena.h: Removed.
5926
5927         * ascii.c: Migrated from arenas to pools.
5928         (struct ascii_driver_ext) ops[], box[], fonts[] changed from
5929         c_string to len_string.  All references changed.
5930         (ascii_option) Signature changed to comply to new output.c
5931         interface.
5932         (count_fancy_chars) Removed.
5933         (delineate) Removed support for rich text.
5934         (ascii_text_metrics) Ditto.
5935         (text_draw) Ditto.
5936         (output_shorts) Change `box', `off', `on' from c_string to
5937         len_string.  Change `remaining' from int to size_t.
5938         (ascii_close_page) Make page numbering less haphazard.
5939
5940         * autorecode.c: Migrate from arenas to pools.
5941
5942         * avl.c: Migrate from arenas to pools.  Synch from libavl 1.4.0.
5943
5944         * bitvector.h: New file containing these macros from misc.h:
5945         SET_BIT, CLEAR_BIT, SET_BIT_TO, TEST_BIT, BIT_INDEX.
5946
5947         * command.c: (struct command) cmd1, cmd2, cmd3 members changed to
5948         word[3].  ncmd removed.
5949         (var empty_string) Removed.
5950         (var cmd_table) Declaration updated.
5951         (var cmdtab) Removed.
5952         (cmp_command) Removed.
5953         (split_words) Rewritten to use strtok_r().
5954         (init_cmd_parser) Renamed cmd_init().  Rewritten.
5955         (find_command) Removed.
5956         (FILE_TYPE_okay) Rewritten.
5957         (cmd_parse) Rewritten.  Semantics of the return value of command
5958         handlers has changed: they must now return one of the new CMD_*
5959         enumerals, rather than a magic value.  This meant that all
5960         commands had to be modified, and they were.
5961         (figure_out_command) New function.
5962
5963         * command.def: Add CORRELATIONS, PEARSON CORRELATIONS.  Add
5964         #defines for INIT, INPU, etc.
5965
5966         * command.h: New CMD_* enum series.
5967         (cur_proc) Make const char *, not char *.
5968         (cmd_init) Prototype.
5969         (cmd_parse) Ditto.
5970
5971         * common.c: Removed.
5972
5973         * common.h: Removed.
5974
5975         * correlations.q: New file.
5976
5977         * crosstabs.q: Migrate from arenas to pools.  Migrate to new-style
5978         q2c.
5979         (custom_tables) Renamed crs_custom_tables().
5980         (custom_variables) Renamed crs_custom_variables().
5981         (calc_integer) Add in some `const' qualifiers.
5982         (table_value_missing) Change from a_string to len_string.
5983         (float_M_suffix) Change from a_string to len_string.
5984
5985         * data-in.c: Rewritten.  All references to
5986         parse_string_as_format() changed to data_in().
5987
5988         * data-in.h: New file.
5989
5990         * data-list.c: Change DLS_* from #define's to enums.  Move from
5991         rpd_msg() to tmsg().
5992         (RPD_ERR) New #define.
5993         (do_reading) Change dfm_push_cust() to dfm_push(), pop_cust() to
5994         dfm_pop().
5995         (read_from_data_list_fixed) Change from old
5996         parse_string_as_format() to new data_in().
5997         (read_from_data_list_free) Ditto.
5998         (read_from_data_list_list) Ditto.
5999         (cmd_repeating_data) Modify approach to checking for end of
6000         command.
6001         (rpd_msg) Removed.
6002         (rpd_parse_record) Change from old parse_string_as_format() to new
6003         data_in().  Change from old convert_format_to_string() to new
6004         data_out().
6005         (read_one_set_of_repetitions) Change dfm_push_cust() to
6006         dfm_push(), pop_cust() to dfm_pop().
6007
6008         * data-out.c: Rewritten.  All references to
6009         convert_format_to_string() changed to data_out().
6010
6011         * descript.q: Migrate to new q2c.
6012         (cmd_descriptives) Removed.
6013         (internal_cmd_descriptives) Renamed cmd_descriptives ().
6014         (custom_variables) Renamed dsc_custom_variables().
6015
6016         * dfm.c: (struct dfm_fhuser_ext) `ln' removed.  All references
6017         removed.
6018         (open_file_r) Initialize h->where.line_number.  Migrate to new
6019         struct string.
6020         (open_file_w) Initialize h->where.line_number.
6021         (read_record) Change from ext->ln to h->where.line_number.
6022         Migrate to struct string.
6023         (dfm_put_record) Rephrased.
6024         (dfm_push_cust) Renamed dfm_push(), rewritten.
6025         (dfm_pop) New function.
6026
6027         * error.c: All references updated.
6028         (glob var error_count) Renamed err_err_count.
6029         (glob var warning_count) Renamed err_warning_count.
6030         (glob var error_already_flagged) Renamed err_already_flagged.
6031         (glob var verbosity) Renamed err_verbosity.
6032         (glob var cust_fn) Removed.
6033         (glob var cust_ln) Removed.
6034         (static var file_loc) New.
6035         (static var nfile_loc) New.
6036         (static var mfile_loc) New.
6037         (tmsg) New function.
6038         (push_cust) Removed.
6039         (pop_cust) Removed.
6040         (msg) Rewritten.
6041         (static var terminating) Removed.
6042         (failure) Renamed err_failure().
6043         (hcf) Renamed err_hcf().
6044         (err_push_file_locator) New function.
6045         (err_pop_file_locator) New function.
6046         (err_location) New function.
6047         (check_error_count) Renamed err_check_count().
6048         (vmsg) Renamed err_vmsg().  Interface changed.
6049         (verbose_msg) Removed.
6050         (err_cond_fail) New function.
6051         (error_break) Renamed err_break().
6052
6053         * error.h: All references updated.
6054         (enum MSG_CLASS_COUNT) Renamed ERR_CLASS_COUNT.
6055         (enum ERR_CLASS_MASK, ERR_VERBOSITY_SHIFT, ERR_VERBOSITY_MASK)
6056         New.
6057         (struct file_locator) New.
6058         (struct error) New.
6059         (macro verbose_msg) Removed.
6060         (macro cond_fail) Removed.
6061
6062         * expr-opt.c: (evaluate_tree) sizeof(char) == 1.
6063
6064         * expr-prs.c: Reorganized.  All references updated.
6065         (exprtypename) Renamed expr_type_name().
6066         (typename) Renamed type_name().
6067         (free_expression) Renamed expr_free().
6068         (parse_expression) Renamed expr_parse().  Uses new type_check()
6069         function.
6070         (init_functab) Renamed init_func_tab().
6071         (type_check) New function.
6072         (parse_or) Rewritten to use new allocate_nonterminal() and
6073         append_nonterminal_arg() functions.
6074         (parse_and) Ditto.
6075         (parse_not) Ditto.
6076         (parse_rel) Ditto.  Also simplified logic.
6077         (parse_add) Ditto.
6078         (parse_mul) Ditto.
6079         (parse_neg) Ditto.
6080         (parse_exp) Ditto.
6081         (SYSMIS_func) Ditto.
6082         (VALUE_func) Rephrased.
6083         (CONCAT_func) Fix memory leak by replacing free by free_node on
6084         lossage.
6085         (generic_str_func) Ditto.
6086         (parse_function) Ditto.  Also rephrasings.  Uses bsearch() to find
6087         function.
6088         (allocate_nonterminal) New function.
6089         (append_nonterminal_arg) New function.
6090         (static func_tab[]) Now at file level.
6091         (cmp_func) Moved.
6092         (init_func_tab) Moved.  Now just uses qsort() to sort func_tab[].
6093
6094         * expr.h: (enum series OP_*) Moved to exprP.h.
6095         (OP_* defines) Ditto.
6096         (struct op_desc) Ditto.
6097         (global ops[]) Ditto.
6098         (struct num_con_node) Ditto.
6099         (struct str_con_node) Ditto.
6100         (struct var_node) Ditto.
6101         (struct lag_node) Ditto.
6102         (struct casenum_node) Ditto.
6103         (struct nonterm_node) Ditto.
6104         (union any_node) Members renamed.
6105         (struct sys_node) Removed.
6106         (struct val_node) Removed.
6107         (operator typedef) Removed.
6108         (typedef exprtype) Removed.
6109         (enum series EX_*) Moved to exprP.h.
6110         (struct expression) Ditto.  Also renamed a lot of the members.
6111         (PXP_* defines) Changed to enums.
6112         (free_node prototype) Moved to exprP.h.
6113
6114         * file-handle.h: (struct file_handle) New member `where'.
6115
6116         * file-handle.q: Migrated to new q2c format.
6117         (prepend_current_directory) Removed (dead code).
6118         (cmd_file_handle) Incorporated all of internal_cmd_file_handle().
6119         (fh_get_handle_by_filename) Removed dead code.
6120         Set new `where' member.
6121
6122         * file-type.c: (file_type_source_read) References to
6123         parse_string_as_format() changed to data_in().
6124         dfm_push_cust()/pop_cust() changed to dfm_push()/dfm_pop().
6125
6126         * filename.c: All references updated.
6127         (init_filename) Renamed fn_init().
6128         (expand_line) Removed.
6129         (macro EXPAND_LINE) Removed.
6130         (interp_vars) Renamed fn_interp_vars().  Now uses st_*() instead
6131         of custom functions.
6132         (gnu_getcwd) Renamed fn_get_cwd(), rewritten.
6133         (tilde_expand) Renamed fn_tilde_expand(), uses ds_*().
6134         (normalize_filename) Renamed fn_normalize().
6135         (search_path) Renamed fn_search_path(), rewritten.
6136         (prepend_dir) Renamed fn_prepend_dir().
6137         (blp_getenv) Renamed fn_getenv().
6138         (blp_dirname) Renamed fn_dirname().
6139         (fn_basename) New function, not used.
6140         (absolute_filename_p) Renamed fn_absolute_p().
6141         (is_special_filename) Renamed fn_special_p().
6142         (file_exists) Renamed fn_exists_p().
6143         (readlink_malloc) Renamed fn_readlink().
6144         (getenv_default) Renamed fn_getenv_default().
6145         (open_file) Renamed fn_open().
6146         (close_file) Renamed fn_close().
6147         (open_file_ext) Renamed fn_open_ext().
6148         (close_file_ext) Renamed fn_close_ext().
6149
6150         * font.h: Migrate from arenas to pools.
6151
6152         * format.c: (parse_format_specifier_name) Deal with ds_* strings.
6153
6154         * frequencies.g: Migrate from arenas to pools.
6155
6156         * frequencies.q: Migrate to new q2c version.  Migrate from arenas
6157         to pools.
6158
6159         * getline.c: All references updated.
6160         (global getl_buf) Changed from char * to struct string.
6161         (static getl_include_path) Ditto.
6162         (global getl_buf_len) Removed.
6163         (global getl_buf_size) Removed.
6164         (getl_include_path) Deal with new getl_buf, getl_include_path.
6165         (getl_uninitialize) New function.
6166         (getl_get_current_directory) Rewritten.
6167         (getl_clear_include_path) Rewritten.
6168         (getl_add_include_dir) Rewritten.
6169         (getl_add_file) Assertion fixed.
6170         (getl_add_virtual_file) Change initial value of `remaining_loops'
6171         from 2 to 1.
6172         (welcome) Rewritten.
6173         (handle_line_buffer) Make static.  Change logic to make
6174         getl_add_virtual_file() change sensible.  Use ds_*() strings.
6175         (getl_read_line) Use ds_*() strings.  Implement SET ECHO.
6176         (getl_close_file) Moved.
6177         (getl_location) New function.
6178
6179         * getline.h: All references updated.
6180         (macro curln) Removed.
6181         (macro curfn) Removed.
6182         (macro am_interactive) Renamed getl_am_interactive.
6183         (macro am_reading_script) Renamed getl_reading_script.
6184
6185         * glob.c: (global fmt_parse_ignore_error) Removed.
6186         (init_glob) Use locale_dir not LOCALEDIR.  Use feholdexcept() on
6187         systems that support it (C99).  Turn off SET ECHO by default.  No
6188         necessary julcal initialization anymore.
6189
6190         * groff-font.c: Migrate from arenas to pools.
6191         (groff_read_font) Use err_push_file_locator().
6192         (groff_read_DESC) Ditto.
6193         (font_msg) Use tmsg().
6194
6195         * hash.c: (hsh_sort) Fix debug code.
6196         [GLOBAL_DEBUGGING] Include stdio.h.
6197
6198         * hash.h: (macro force_hsh_insert) Rephrase.
6199
6200         * heap.c: Rewritten.
6201         
6202         * heap.h: Rewritten.
6203
6204         * html.c: (html_option) Change from outp_value to struct string.
6205         (postopen) Change from curfn to getl_location().
6206         (escape_string) Remove rich-text code.  Signature changed.
6207         (output_tab_table) Switch from a_string to struct len_string.
6208         Remove rich text support.
6209
6210         * lexer.c: All references updated.  Largely rewritten.  Major
6211         changes listed below.  Removed tagged quote support.  Adapted to
6212         struct string tokstr.
6213         (global tokstr) Changed to struct string.
6214         (global tokstr_size) Removed.
6215         (global tokstr_len) Removed.
6216         (global tokid) New.
6217         (global tokint) Removed.
6218         (global toklongstr) Removed.
6219         (C* defines) Removed.
6220         (static tbl[]) Removed.
6221         (static id[]) Removed.
6222         (static une[]) Removed.
6223         (discard_line) Renamed lex_discard_line().
6224         (get_entire_line) Renamed lex_entire_line().
6225         (get_rest_of_line) Renamed lex_rest_of_line().
6226         (get_dotted_rest_of_line) Merged into lex_rest_of_line().
6227         (make_hexit) Removed.
6228         (syntax_error) Renamed lex_error().  Return value removed.
6229         (get_token_representation) Renamed lex_token_representation().
6230         (putback) Renamed lex_put_back().
6231         (putfwd) Renamed lex_put_forward().
6232         (convert_negative_to_dash) Renamed lex_negative_to_dash().
6233         (set_prog) Renamed lex_set_prog().
6234         (init_lex) Renamed lex_init().
6235         (reset_eof) Renamed lex_reset_eof().
6236         (lookahead) Renamed lex_look_ahead().
6237         (check_id) Rewritten.
6238         (yylex) Renamed lex_get(), rewritten.
6239         (lex_end_of_command) New function.  Many commands were rephrased
6240         using this.
6241         (lex_integer_p) New function.  Replaces compare of tokint against
6242         NOT_LONG.
6243         (lex_integer) New function.  Replaces tokint.
6244         (match_tok) Renamed lex_match().
6245         (match_id) Renamed lex_match_id().
6246         (match_int) Renamed lex_match_int().
6247         (force_match_id) Renamed lex_force_match_id(), added return value.
6248         (force_match) Renamed lex_force_match(), added return value.
6249         (force_string) Renamed lex_force_string(), added return value.
6250         (force_int) Renamed lex_force_int(), added return value.
6251         (lex_id_match_len) New function.
6252         (id_match) Renamed lex_id_match(), rewritten.
6253         (get_line) Renamed lex_get_line().
6254         (preprocess_line) Renamed lex_preprocess_line().
6255         (tokname) Renamed lex_token_name().
6256         (bin_value_func) Removed.
6257         (oct_value_func) Removed.
6258         (hex_value_func) Removed.
6259         (unexpected_eof) New function.
6260         (convert_numeric_string_to_char_string) New function.
6261         (parse_string) Rewritten, signature changed.
6262         (add_tokstr_char) Removed.
6263         (add_tokstr_unsigned) Removed.
6264         (add_tokstr_string) Removed.
6265         (parse_tagged_quote) Removed.
6266         (skip_comment) Renamed lex_skip_comment().
6267
6268         * lexer.h: All references updated.
6269         (macro is_id1) Renamed CHAR_IS_ID1.
6270         (macro is_idn) Renamed CHAR_IS_IDN.
6271         (token names ID, NUM, STRING, STOP, ... WITH, EXP) Renamed with
6272         prefix T_: T_ID, T_NUM, T_STRING, T_STOP, ... T_WITH, T_EXP.
6273         (macro get_token) Removed.
6274         (macro id_match) Removed.
6275         (macro force_match_id) Removed.
6276         (macro force_match) Removed.
6277         (macro force_string) Removed.
6278         (macro force_int) Removed.
6279         (macro force_num) Removed.
6280         (macro force_id) Removed.
6281
6282         * lexerP.h: Removed.
6283
6284         * list.q: Migrated to new q2c format.
6285         (write_line) Deal with struct len_string.
6286         (write_varname) Ditto.
6287         (write_fallback_headers) Ditto.
6288
6289         * magic.c: New file, incorporating the following global variables
6290         previously in other files: endian, second_lowest_value.  And both
6291         of those are conditional on #define's.
6292
6293         * magic.h: New file, incorporating the following global variable
6294         declarations: endian, second_lowest_value, and the following macro
6295         declarations: NOT_DOUBLE, NOT_LONG, NOT_INT.
6296
6297         * main.c: Added declarations of pgmname, finished, curdate,
6298         start_interactive.
6299         (main) Call new parse_script() function.
6300         (parse_script) New function.
6301         (execute_command) New function.
6302         (dump_token) Removed.
6303         (handle_error) New function.
6304
6305         * matrix.c: New file.
6306
6307         * matrix.h: New file.
6308
6309         * matrix-data.c: Migrated from arenas to pools.
6310         (mget_token) Change from parse_string_as_format() to data_in().
6311
6312         * means.q: Migrate to new q2c.
6313         (custom_tables) Renamed mns_custom_tables().
6314         (custom_crossbreak) Renamed mns_custom_crossbreak().
6315         (custom_variables) Renamed mns_custom_variables().
6316
6317         * mis-val.c: (static var width) Changed from `int' to `size_t'.
6318         (parse_varnames) Prototype.
6319         (parse_numeric) Rephrasings.
6320         (parse_alpha) Adapt to new struct string tokstr.
6321
6322         * misc.c: (intlog10) Rewritten.
6323         (spacing) Removed.
6324         (ansi_rand) Renamed real_rand(), moved into random.c.
6325         (ansi_srand) Renamed real_srand(), moved into random.c.
6326         (setup_randomize) Moved to random.c.
6327         (rand_uniform) Ditto.
6328         (rand_normal) Ditto.
6329         (rand_simple) Ditto.
6330         (get_config_line) Removed.
6331         (reverse) Removed (dead code).
6332
6333         * misc.h: (macro SET_BIT) Moved to bitvector.h.
6334         (macro CLEAR_BIT) Ditto.
6335         (macro TEST_BIT) Ditto.
6336         (macro SET_BIT_TO) Ditto.
6337         (macro BIT_INDEX) Ditto.
6338
6339         * output.c: (outp_read_devices) Move to err_push_file_locator()
6340         from push_cust().  Use struct string.
6341         (expand_op_tokstr) Removed.
6342         (static var op_tokstr) Changed to struct string.
6343         (static var op_tokstr_size) Removed.
6344         (tokener) Rephrasings.  Use struct string.
6345         (parse_options) Use struct string.
6346         (destroy_driver) Fix assertion.
6347         (outp_get_paper_size) Move to err_push_file_locator().
6348         [0] Removed dead code.
6349         (outp_string_width) Move to len_string.
6350
6351         * output.h: Comment fixes.
6352         (TAG_* enum series) Removed.
6353         (struct outp_value) Removed.
6354         (enum OUTP_T_FANCY) Removed.
6355         (struct outp_text) `s' changed from a_string to len_string.
6356         (struct outp_class) `option' change arg 3 from outp_value to
6357         struct string.
6358
6359         * pfm-read.c: (corrupt_msg) Rewritten.
6360
6361         * pfm-write.c: (bufwrite) Fix assertion.
6362
6363         * pool.c: New file, reference version.
6364
6365         * pool.h: New file, reference version.
6366
6367         * postscript.c: (ps_font_sizes) Fix assertion.
6368         (ps_option) Change arg 3 from outp_value to struct string.
6369         Adapt to struct string.
6370         (macro output_line) Removed.
6371         (macro add_string) Removed.
6372         (output_encodings) Adapted to struct string.  Moved to
6373         err_push_file_locator().
6374         (find_encoding_file) Fix assertion.
6375         (read_ps_encodings) Move to err_push_file_locator().
6376         (postopen) Use getl_location() instead of curfn.
6377         (out_text_plain) Move to len_string.
6378         (text) Ditto.  Remove rich text support.
6379
6380         * print.c: (cmd_print) Remove now-unneeded resource cleanup code.
6381         (cmd_print_eject) Ditto.
6382         (cmd_write) Ditto.
6383         (internal_cmd_print) Now cleans up after itself.  Uses
6384         fh_parse_file_handle() now.
6385         (cmd_print_space) Use PXP_NUMERIC to type-check.
6386
6387         * q2c.c: Overhauled.  Removed _("") i18n support.  All references
6388         updated.  All output functions updated to handle structures rather
6389         than local or static variables.  Adapt to new PSPP lex_*()
6390         functions.
6391         (macro _) Removed.
6392         (macro N_) Removed.
6393         (macro MAX_N_SBC) Removed.
6394         (global bare) Removed.
6395         (enum STRING) Renamed T_STRING.
6396         (enum ID) Renamed T_ID.
6397         (get_buffer) Buffer size increased.
6398         (strlower) Renamed st_lower(), rephrased.
6399         (strupper) Renamed st_upper(), rephrased.
6400         (skip_ws) New function.
6401         (get_line) Don't special-case any types of lines (like those
6402         beginning with ! or $, for instance).
6403         (get_token) Renamed lex_get().  Rephrased.
6404         (static var `prefix') New.
6405         (parse) New function.
6406         (parse_setting) Minor rephrasing.
6407         (dump_specifier_vars) Ditto.
6408         (make_identifier) Put null terminator on identifier, duh.
6409         (dump_vars) Renamed dump_declarations().  Never indent.  Never
6410         static.  Output changed entirely.
6411         (dump_specifier_init) Rephrase.
6412         (dump_vars_init) No index variable needed.  Other modifications.
6413         (dump_parser) Don't parse command name.  Do dump functions instead
6414         of just code fragments.
6415         (dump_free) Dump function instead of code fragment.
6416         (recognize_directive) New function.
6417         (main) Use recognize_directive().  Don't rely on magic $ line
6418         beginning: instead, parse comments.  Update list of headers.
6419
6420         * random.c: New file, containing the following functions:
6421         real_rand(), real_srand(), setup_randomize, shuffle, rand_uniform,
6422         rand_normal, rand_simple.
6423
6424         * random.h: New file.
6425
6426         * recode.c: (cmd_recode) Merge internal_cmd_recode() into this
6427         function.  `max_src_width', `max_dst_width' changed to size_t.
6428         (internal_cmd_recode) Removed.
6429         (parse_dest_spec) Merge similar cases.
6430         (parse_src_spec) Add assertion.
6431
6432         * repeat.c: (recognize_keyword) New function.
6433         (internal_cmd_do_repeat) Parse and handle PRINT keyword on END
6434         REPEAT.  Improve recognition of END REPEAT (use
6435         recognize_keyword()).  Move from curfn to getl_location().  Use
6436         struct string.
6437                 
6438         (perform_DO_REPEAT_substitutions) Adapt to struct string.
6439
6440         * set.q: Adapt to new q2c.
6441         (cmd_set) Range-check some values better.
6442         (custom_blanks) Renamed stc_custom_blanks().
6443         (custom_length) Renamed stc_custom_length().
6444         (custom_results) Renamed stc_custom_results().
6445         (custom_seed) Renamed stc_custom_seed().
6446         (custom_width) Renamed stc_custom_width().
6447         (custom_format) Renamed stc_custom_format().
6448         (custom_journal) Renamed stc_custom_journal().
6449         (custom_color) Renamed stc_custom_color().
6450         (custom_listing) Renamed stc_custom_listing().
6451         (custom_disk) Renamed stc_custom_disk().
6452         (custom_log) Renamed stc_custom_log().
6453         (custom_rcolor) Renamed stc_custom_rcolor().
6454         (custom_viewlength) Renamed stc_custom_viewlength().
6455         (custom_workdev) Renamed stc_custom_workdev().
6456
6457         * settings.h: Not necessary to include format.h any longer.
6458
6459         * sfm-read.h: (macro bswap_int32) Moved here from sfmP.h.
6460         (corrupt_msg) Rewritten.
6461
6462         * sort.c: Adapt to rewritten heap ADT.
6463
6464         * str.c: (aa_strcpy) Removed.
6465         (ab_strcpy) Removed.
6466         (ac_strcpy) Removed.
6467         (ba_strcpy) Removed.
6468         (bb_strcpy) Removed.
6469         (ca_strcpy) Removed.
6470         (aa_strdup) Removed.
6471         (aa_strdupcpy) Removed.
6472         (ba_strdup) Removed.
6473         (sa_strdup) Removed.
6474         (memrev) Renamed mm_reverse().
6475         (memrmem) Renamed mm_find_reverse().
6476         (cmp_str) Renamed st_compare_pad().
6477         (strmaxcpy) Removed.
6478         (strbarepadcpy) Renamed st_bare_pad_copy(), signature changed.
6479         (strbarepadlencpy) Renamed st_bare_pad_len_copy(), signature
6480         changed.
6481         (strpadcpy) Renamed st_pad_copy(), signature changed.
6482         (blpstrset) Removed.
6483         (ds_create) New function.
6484         (ds_init) New function.
6485         (ds_replace) New function.
6486         (ds_destroy) New function.
6487         (ds_clear) New function.
6488         (ds_extend) New function.
6489         (ds_shrink) New function.
6490         (ds_truncate) New function.
6491         (ds_length) New function.
6492         (ds_size) New function.
6493         (ds_value) New function.
6494         (ds_end) New function.
6495         (ds_concat) New function.
6496         (ds_concat_buffer) New function.
6497         (ds_printf) New function.
6498         (ds_putchar) New function.
6499         (ds_getline) New function.
6500         (ds_get_config_line) New function derived from the old
6501         misc.c:get_config_line().
6502         (ls_create) New function.
6503         (ls_create_buffer) New function.
6504         (ls_init) New function.
6505         (ls_shallow_copy) New function.
6506         (ls_destroy) New function.
6507         (ls_null) New function.
6508         (ls_null_p) New function.
6509         (ls_empty_p) New function.
6510         (ls_length) New function.
6511         (ls_value) New function.
6512         (ls_end) New function.
6513
6514         * str.h: Reformatted.
6515         (struct a_string) Removed.
6516         (struct b_string) Removed.
6517         (struct c_string) Removed.
6518         (struct len_string) New.
6519         (struct string) New.
6520         (macro as_streq) Removed.
6521         (macro bs_streq) Removed.
6522         (macro cs_streq) Removed.
6523         (macro sa_streq) Removed.
6524         (macro sb_streq) Removed.
6525         [__GNUC__] (inline function ds_putchar) New function.
6526         [__GNUC__] (inline function ds_length) New function.
6527         [__GNUC__] (inline function ds_value) New function.
6528         [__GNUC__] (inline function ds_end) New function.
6529
6530         * sysfile-info.c: (cmd_sysfile_info) Rephrased.
6531         (display_vectors) Fix missing i18n.
6532
6533         * t-test.q: Migrate to new q2c.
6534
6535         * tab.c: Migrate from arenas to pools.
6536         (tab_create) Use struct len_string.
6537         (tab_realloc) Ditto.
6538         (text_format) Ditto.
6539         (tab_joint_text) Ditto.
6540         (tab_natural_width) Remove rich text support.
6541         (tab_natural_height) Ditto.
6542         (tab_output_text) Handle TAT_FIX.
6543         (tab_raw) Change arg from a_string to len_string.
6544         (tabi_driver) Fix assertion.  Use struct len_string.
6545         (render_strip) Use struct len_string.  Remove rich text support.
6546         Add `const' qualifiers.
6547
6548         * tab.h: (enum TAB_RICH) Remove.
6549         (enums TAB_COL_NONE, TAB_COL_DONE) New.  Where appropriate,
6550         SOM_COL_* updated to read TAB_COL_*.
6551         (struct tab_table) Change arena to pool.  Change a_string to
6552         len_string.
6553
6554         * temporary.c: (restore_dictionary) Rewrite Checker code.
6555
6556         * var.h: (macros MAX_SHORT_STRING, MIN_LONG_STRING, SYSMIS,
6557         LOWEST, HIGHEST) Moved here from common.h.
6558         (typedef any_trns) Removed.  All references changed to `struct
6559         trns_header'.
6560
6561         * vars-atr.c: (force_create_variable) Fix assertion.
6562         (force_dup_variable) Fix assertion.
6563         
6564 Thu Jun  3 18:40:42 1999  Ben Pfaff  <blp@gnu.org>
6565
6566         Using alphanumeric variables in functions under AGGREGATE
6567         segfaulted.  Fixed.  Thanks to Dr. Dirk Melcher
6568         <BZN-mdksh@t-online.de> for reporting this bug.
6569         
6570         * aggregate.c: (parse_aggregate_functions) When setting the
6571         FSTRING bit, also allocate memory for the `string' member of
6572         agr_next.
6573         (free_aggregate_functions) Free iter->string.  Don't use the
6574         non-function bits when indexing the array of functions.
6575         [DEBUGGING] (debug_print) Don't use the non-function bits when
6576         indexing the array of functions.        
6577
6578 Sun May 30 00:00:54 1999  Ben Pfaff  <blp@gnu.org>
6579
6580         Under certain circumstances, the final case would be omitted from
6581         the results of an AGGREGATE operation.  Fixed.  Thanks to Dr. Dirk
6582         Melcher <BZN-mdksh@t-online.de> for reporting this bug.
6583         
6584         * aggregate.c (agr_00x_end_func): Increment number of cases in
6585         sink before writing case.  For streams that keep track of how many
6586         cases there are based on this value, this means that the last case
6587         will be read in on the next stream read.
6588
6589 Sat May 29 22:03:31 1999  Ben Pfaff  <blp@gnu.org>
6590
6591         Undefined behavior was invoked by referencing a freed pointer.
6592         
6593         * vfm.c (memory_stream_write): Free pointer *after* checking for
6594         non-null status.
6595
6596 Sat May 29 22:02:22 1999  Ben Pfaff  <blp@gnu.org>
6597
6598         A wrong record size was displayed when paging the active file to
6599         disk.
6600         
6601         * vfm.c: (memory_stream_write) Fix off-by-one error.
6602
6603 Sat May 29 21:50:26 1999  Ben Pfaff  <blp@gnu.org>
6604
6605         Not having enough temporary space for sorting caused a core dump.
6606         Fixed.
6607         
6608         * sort.c: (allocate_cases) Initialize i.
6609
6610 Sat May 29 21:40:54 1999  Ben Pfaff  <blp@gnu.org>
6611
6612         Syntax errors in function descriptions on AGGREGATE caused core
6613         dumps.  Fixed.
6614         
6615         * aggregate.c (cmd_aggregate): Don't free agr_dict after calling
6616         free_aggregate_functions(), since that function already frees
6617         agr_dict.
6618         
6619 Sat May 29 21:06:10 1999  Ben Pfaff  <blp@gnu.org>
6620
6621         A null pointer was dereferenced, causing a core dump, when
6622         PERCENTILES was specified on FREQUENCIES.  This fixes the problem,
6623         but PSPP still doesn't calculate percentiles.  Thanks to Regnor
6624         Jernsletten <rjernsle@eunet.no> for reporting this problem.
6625         
6626         * arena.c: (arena_malloc) If the arena hasn't been initialized
6627         already, initialize it.
6628
6629 Sat May 29 20:47:29 1999  Ben Pfaff  <blp@gnu.org>
6630
6631         * Makefile.cygwin: New file supplied by Hankin <hankin@dunno.com>
6632         for compilation with Cygnus Windows B20.  Not used by other
6633         systems.
6634
6635 Sat May 29 20:36:04 1999  Ben Pfaff  <blp@gnu.org>
6636
6637         SORT always sorted in ascending order.  Fixed.  Thanks to Dr. Dirk
6638         Melcher <BZN-mdksh@t-online.de> for reporting this bug.
6639
6640         * sort.c: (compare_case_lists) Reverse sense of comparison if
6641         sorting in descending order.
6642         (compare_record) Ditto.
6643
6644 Tue Mar  9 13:18:54 1999  Ben Pfaff  <blp@gnu.org>
6645
6646         SPLIT FILE with a string variable caused a core dump.  Fixed.
6647
6648         * vfm.c: If the variable is a string then make a temporary value
6649         struct pointing to it.  The underlying problem is a lot bigger
6650         than this (see TODO) but this is a stopgap for the simple case at
6651         least.
6652         
6653 Tue Mar  9 13:15:53 1999  Ben Pfaff  <blp@gnu.org>
6654
6655         Nested INCLUDEs didn't work.  Fixed.
6656
6657         * getline.c: (getl_include) Set first_line to NULL in allocated
6658         structure.
6659
6660 Tue Mar  9 13:13:46 1999  Ben Pfaff  <blp@gnu.org>
6661
6662         The MATCH FILES procedure set the values of variables not present
6663         to 0.  It should have been SYSMIS.  This is now fixed.
6664
6665         * get.c: (mtf_delete_file_in_place) Replace 0.0 by SYSMIS.
6666
6667 Tue Mar  9 12:52:23 1999  Ben Pfaff  <blp@gnu.org>
6668
6669         The REMARK command was too aggressive about skipping lines.  It
6670         didn't like being the last command in a file.
6671
6672         * command.c: (cmd_remark) Call get_entire_line() instead of
6673         get_line().
6674
6675 Tue Mar  9 12:48:05 1999  Ben Pfaff  <blp@gnu.org>
6676
6677         Comment parsing wasn't consistent with the rest of the code in its
6678         idea of where one command ends and another starts.  This meant
6679         that sometimes commands would be mysteriously ignored.  Thanks to
6680         Dr. Dirk Melcher <BZN-mdksh@t-online.de> for reporting this bug.
6681          
6682         * command.c: (parse_cmd) Hand off comment parsing to new function
6683         skip_comment() in lexer.c.
6684         * lexer.c: (skip_comment) New function.
6685
6686 Wed Jan 20 20:22:07 1999  Ben Pfaff  <blp@gnu.org>
6687
6688         The TABLE subcommand on MATCH FILES worked only erratically at
6689         best.  This fixes it.  Thanks to Dr. Dirk Melcher
6690         <BZN-mdksh@t-online.de> for reporting this bug.
6691
6692         * get.c: (mtf_compare_BY_values) When comparing string values, a
6693         difference of 1 is still a difference :-)
6694         (mtf_processing) Inverted TABLE reading logic fixed.  Also don't
6695         advance TABLE files automatically when matched.  Comment fixes.
6696
6697 Tue Jan 19 22:32:31 1999  Ben Pfaff  <blp@gnu.org>
6698
6699         VARIABLE LABELS rejected a slash before the first variable
6700         specification, contradicting the documentation.  Thanks to Walter
6701         M. Gray <graywm@northernc.on.ca> for reporting this bug.
6702
6703         * var-labs.c: (cmd_variable_labels) Ignore a leading slash in
6704         command specification.
6705
6706 Tue Jan 19 22:29:54 1999  Ben Pfaff  <blp@gnu.org>
6707
6708         Because of an incorrect optimization in memory allocation,
6709         CROSSTABS sometimes segfaulted when asked to output multiple
6710         tables.  Thanks to Walter M. Gray <graywm@northernc.on.ca> for
6711         reporting this bug.
6712
6713         * crosstabs.q: (postcalc) New variables maxcols, maxcells, which
6714         are passed to output_pivot_table() for its use.
6715         (output_pivot_table) Instead of assuming the number of columns is
6716         constant, keep track with maxcols.  In general mode, use maxcells
6717         to determine whether more matrix cells need to be allocated.    
6718
6719 Tue Jan 19 22:27:46 1999  Ben Pfaff  <blp@gnu.org>
6720
6721         CROSSTABS didn't display value labels for column and row
6722         variables.  Thanks to Walter M. Gray <graywm@northernc.on.ca> for
6723         reporting this bug.
6724
6725         * crosstabs.q: (table_value_missing) If the specified value has a
6726         value label for this variable, then show it instead of the raw
6727         value.
6728         (display_dimensions) Delegate display of value_labels to
6729         table_value_missing.
6730
6731 Mon Jan 18 20:04:06 1999  Ben Pfaff  <blp@gnu.org>
6732
6733         WRITE didn't write line ends.  Fixed.  Thanks to Dr. Dirk Melcher
6734         <BZN-mdksh@t-online.de> for reporting this bug.
6735
6736         * print.c: (print_trns_proc) Write (CR/)LF if PRINT is used _or_
6737         if the file isn't declared as binary.
6738
6739 Mon Jan 18 19:56:45 1999  Ben Pfaff  <blp@gnu.org>
6740
6741         MATCH FILES corrupted memory and dumped core on some syntax
6742         errors.  Fixed.
6743
6744         * get.c: (cmd_match_files) Set file->handle to NULL before
6745         jumping to lossage.
6746         (mtf_free_file) Don't free a null dictionary.   
6747
6748 Mon Jan 18 19:27:57 1999  Ben Pfaff  <blp@gnu.org>
6749
6750         MATCH FILES should set numeric values not available to the
6751         system-missing value, not to 0.  Thanks to Dr. Dirk Melcher
6752         <BZN-mdksh@t-online.de> for reporting this bug.
6753
6754         * get.c: (mtf_processing) Set unused records to system-missing,
6755         not 0.
6756
6757 Mon Jan 18 15:06:46 1999  Ben Pfaff  <blp@gnu.org>
6758
6759         KEEP didn't work properly on the SAVE procedure.  Fixed.  Thanks
6760         to Ralf Geschke <ralf@kuerbis.org> for reporting this bug.
6761
6762         * temporary.c: (save_dictionary) Initialize var_by_name AVL tree
6763         in newly created dictionary, and add each copied variable to the
6764         tree.
6765  
6766 Mon Jan 18 15:04:48 1999  Ben Pfaff  <blp@gnu.org>
6767
6768         Memory leak fix.
6769         
6770         * get.c: (trim_dictionary) Free variable list for KEEP after
6771         finishing with it.
6772
6773 Mon Jan 18 12:57:36 1999  Ben Pfaff  <blp@gnu.org>
6774
6775         Some systems didn't like the way open_file was coded.  Thanks to
6776         Hankin <hankin@rogue.consultco.com> for pointing this out.
6777
6778         * filename.c: (open_file) Don't try to store stdin, stdout,
6779         stderr as part of an array, because that doesn't always work.
6780
6781 Mon Jan 18 12:53:27 1999  Ben Pfaff  <blp@gnu.org>
6782
6783         The SAVE procedure didn't save long string variables properly.
6784         Fixed by this patch.  Thanks to Hankin
6785         <hankin@rogue.consultco.com> for this patch.
6786         
6787         * sfm-write.c: (write_variable) Fix off-by-one error in writing
6788         out variable pad records.
6789
6790 Tue Jan  5 14:29:27 1999  Ben Pfaff  <blp@gnu.org>
6791
6792         Previously, if PRINT SPACE were given a negative argument, it
6793         would report an error, then spin in an (almost) infinite loop.
6794         This fixes that behavior.
6795
6796         * print.c: (print_space_trns_proc) After reporting a negative
6797         argument, set number of lines to print to 1.
6798
6799 Tue Jan  5 13:59:55 1999  Ben Pfaff  <blp@gnu.org>
6800
6801         SPSS 8.0 outputs some new record types in its system files, and it
6802         allows longer value labels.  Accept these system files.
6803
6804         * sfm-read.c: (sfm_read_dictionary) Ignore record type 7 subtype
6805         11 emitted by SPSS 8.0.
6806         
6807 Tue Jan  5 13:55:50 1999  Ben Pfaff  <blp@gnu.org>
6808
6809         The LIST procedure was too conservative in allocating space for
6810         buffers, which caused a bug that only showed up with very long
6811         output variables.  Thanks to Hankin <hankin@dunno.com> for this
6812         bug report.
6813
6814         * list.q: (determine_layout) Allocate 1022 bytes instead of 256.
6815
6816 Tue Jan  5 13:34:34 1999  Ben Pfaff  <blp@gnu.org>
6817
6818         Typo meant string format specifiers weren't checked properly.  I
6819         think that Hankin <hankin@dunno.com> sent me this report, but I'm
6820         willing to be corrected on this point.
6821  
6822         * format.c: (check_string_specifier) Fix obvious typo.  
6823
6824 Tue Jan  5 12:50:42 1999  Ben Pfaff  <blp@gnu.org>
6825
6826         Using $CASENUM in an expression didn't work.  Here's a fix.
6827         Thanks to Dirk Melcher <BZN-mdksh@t-online.de> for reporting this
6828         bug.
6829          
6830         * expr-evl.c: (evaluate_expression) Add OP_CASENUM case.
6831
6832         * expr-opt.c: (dump_node) OP_CASENUM is acceptable.
6833
6834 Tue Jan  5 12:47:48 1999  Ben Pfaff  <blp@gnu.org>
6835
6836         The changes in 0.2.1 to fix DATA LIST FREE parsing broke some
6837         other behavior, *sigh*.  This patch hopefully fixes that.  This
6838         time I've actually tested it.
6839
6840         Thanks to Hankin <hankin@dunno.com> for reporting this bug.
6841
6842         * data-list.c: (read_from_data_list_free,
6843         read_from_data_list_list) Call parse_string_as_format() directly
6844         without mucking around with the field width.
6845
6846 Tue Jan  5 12:31:19 1999  Ben Pfaff  <blp@gnu.org>
6847
6848         Occasionally, you may encounter a script that wants to be
6849         interpreted in interactive mode.  Make -i emulate this behavior to
6850         allow such scripts to be executed with PSPP.
6851
6852         Thanks to Hankin <hankin@dunno.com> for reporting this behavior.
6853
6854         * cmdline.c: (pre_syntax_message[]) Update -i description.
6855
6856         * lexer.c: (preprocess_line) When getl_interactive is 2 (i.e.,
6857         when -i is given on the command line) don't treat unindented lines
6858         as starting a new command.
6859
6860 Tue Jan  5 12:30:10 1999  Ben Pfaff  <blp@gnu.org>
6861
6862         In conjunction with egcs 1.1.1, Checker emits some bogus warnings,
6863         mostly caused by local initialized aggregates.  After egcs is
6864         fixed upstream these can be removed, but for now they're not a big
6865         deal.
6866         
6867         * ascii.c: (ascii_postopen_driver) Checker chokes on local
6868         initialized arrays.  Avoid this.
6869
6870         * sfm-write.c: (sfm_write_dictionary) Don't use a local
6871         initialized struct.
6872
6873 Tue Jan  5 12:07:24 1999  Ben Pfaff  <blp@gnu.org>
6874
6875         egcs 1.1.1 has some new warnings relative to gcc 2.8.1, which the
6876         following changes avoid.  Currently I compile sources with egcs
6877         1.1.1 and gcc 2.7.2.3 before sending them out.
6878
6879         * apply-dict.c: (apply_dict) Use new avl_traverser_init() macro.
6880         
6881         * ascii.c: (option_tab[]) Initialize all struct members.
6882
6883         * avl.h: (avl_traverser_init) New macro.
6884         
6885         * command.c: (DEFCMD, UNIMPL macros, cmd_table[]) Initialize all
6886         struct members.
6887
6888         * crosstabs.q: (enum_var_values) Use new hsh_iterator_init()
6889         macro.
6890
6891         * hash.c: Comment fix.
6892
6893         * hash.h: (hsh_iterator_init) New macro.
6894
6895         * html.c: (option_tab[]) Initialize all struct members.
6896
6897         * pfm-write.c: (write_value_labels) Use new avl_traverser_init()
6898         macro.
6899
6900         * postscript.c: (option_tab[]) Initialize all struct members.
6901         (output_encodings, preclose, dump_lines) Use new
6902         hsh_iterator_init() macro.
6903
6904         * sfm-write.c: (write_value_labels) Use new avl_traverser_init()
6905         macro.
6906
6907         * sysfile-info.c: (describe_variable) Use new avl_traverser_init()
6908         macro.
6909
6910 Thu Nov 19 12:32:45 1998  Ben Pfaff  <blp@gnu.org>
6911
6912         * data-in.c: Examined each of the parsing functions to make sure
6913         that they wouldn't dump core if they were passed a string of the
6914         wrong length, since now the DATA LIST FREE/LIST routines don't
6915         check for field width before passing it to the data parser.
6916         (parse_RBHEX, parse_AHEX) Reject odd length input.
6917         (parse_string_as_format) Reject input that's too short or too
6918         long.
6919
6920         * data-list.c: Before, the DATA LIST FREE/LIST routines would pad
6921         a field to its entire declared output width then pass it to the
6922         data-in parsing routines.  This contradicted the documented
6923         behavior.  This is fixed in these changes.  Thanks to Mark H. Wood
6924         <mwood@IUPUI.Edu>.  In addition, this fixes a few more details of
6925         free-format parsing that differed from SPSS.
6926         (cut_field) Commas and spaces are treated identically.  Returns
6927         the proper column instead of a fixed 1 value.
6928         (parse_field) Removed.
6929         (read_from_data_list_free, read_from_data_list_list) Call
6930         parse_string_as_format directly instead of parse_field.
6931
6932         * heap.c: (heap_delete) Stylistic fixes.
6933
6934 Sun Aug  9 11:12:13 1998  Ben Pfaff  <blp@gnu.org>
6935
6936         * loop.c: (loop_2_trns_proc) Formatting fix.
6937
6938         * sel-if.c: (cmd_filter) Set FILTER_before_TEMPORARY.
6939
6940         * var.h: (glob var FILTER_before_TEMPORARY) New global var.
6941
6942         * vfm.c: (macro FILTERED) New.
6943         (static var filter_var) New.
6944         (process_active_file_write_case) Use FILTERED.
6945         (setup_filter) Set filter_var.
6946         (close_active_file) Delete the filter if not
6947         FILTER_before_TEMPORARY.
6948         (procedure_write_case) Use FILTERED.
6949
6950 Sat Aug  8 00:20:14 1998  Ben Pfaff  <blp@gnu.org>
6951
6952         * crosstabs.q: Changed /PIVOT={ON,OFF} to /FORMAT={PIVOT,NOPIVOT}.
6953
6954         * data-in.c: (parse_day_count) Message fix.
6955         (parse_month) Style fix.
6956
6957         * data-list.c: (struct data_list_pgm) New member eof.
6958         (cmd_data_list) Init eof to 0.
6959         (do_reading) Implement the /END subcommand and read-past-eof
6960         checking.
6961
6962         * do-if.c: Include stdio.h when debugging.
6963         (cmd_else_if) Make sure the command is .-terminated.
6964
6965         * glob.c: (init_glob) Capitalize the command prompt.
6966
6967         * inpt-pgm.c: (end_case_trns_proc) Debugging message.
6968         (end_file_trns_proc) Debugging message.
6969
6970         * loop.c: (internal_cmd_loop) Make it work when there's no loop
6971         index!
6972         (loop_2_trns_proc) Enable MXLOOPS (why was this disabled?)
6973
6974         * main.c: (dump_token) Make kwtab[] const.
6975
6976         * set.q: Spelling, comment fixes.
6977
6978         * sysfile-info.c: (cmd_display) DISPLAY VECTORS not DISPLAY
6979         VECTOR.
6980
6981         * vars-prs.c: (fill_all_vars) Style fix.
6982
6983         * vfm.c: (index_to_varname) Return const.
6984
6985 Tue Aug  4 23:49:23 1998  Ben Pfaff  <blp@gnu.org>
6986
6987         * Changes in many source files for partial -ansi -pedantic and
6988         no-debugging compliance: Remove trailing common in enum
6989         declarations; add `unused' attributes; insert some appropriate
6990         casts.
6991
6992         * cmdline.c: (parse_command_line) Add new --testing-mode flag.
6993
6994         * command.c: (shell) Make static.
6995         (run_command) Make static.
6996
6997         * data-list.c: (dump_fixed_table) Remove use of local_strdup().
6998
6999         * dfm.c: (cmd_begin_data) I18n fix.
7000
7001         * error.c: (verbose_msg) Define if __STRICT_ANSI__.
7002
7003         * error.h: (macro verbose_msg) Define if __STRICT_ANSI__.
7004
7005         * expr-opt.c: (evaluate_tree) Don't initialize local arrays if
7006         __STRICT_ANSI__.
7007
7008         * file-handle.q: Don't prepend the source file directory name to
7009         the data file name.  (Ongoing issue.)
7010         (prepend_current_directory) Comment out.
7011         (internal_cmd_file_handle) Don't call prepend_current_directory().
7012         (fh_get_handle_by_filename) Ditto.
7013
7014         * filename.c: Append zero byte to readlink() return value.
7015
7016         * getline.c: (getl_read_line) I18n fix.
7017
7018         * lexer.h: Don't use gcc features if __STRICT_ANSI__.
7019
7020         * misc.h: Don't use gcc features if __STRICT_ANSI__.
7021
7022         * pfm-write.c: (bufwrite) Don't try to increment a void * pointer
7023         directly.
7024
7025         * postscript.c: (output_encodings) Don't use local_strdup().
7026         (postopen) Ditto.
7027
7028         * print.c: Don't use gcc features if __STRICT_ANSI__.
7029
7030         * q2c.c: (dump_vars) Don't put a , at the end of the last enum.
7031
7032         * recode.c: (parse_src_spec) Fully brace nested if's.
7033
7034         * set.q: (global var set_testing_mode) New var.
7035
7036 Wed Jul 29 22:01:44 1998  Ben Pfaff  <blp@gnu.org>
7037
7038         * ascii.c: Add some more `unused' attributes that only come into
7039         play when NDEBUG is defined.
7040         (ascii_close_page) Set s_len when reallocating s.
7041         
7042         * crosstabs.q: (delete_missing) New function.
7043         (output_pivot_table) Call delete_missing() if /MISSING=REPORT.
7044         (make_summary_table) Create summary table reallocable.
7045
7046         * postscript.c: Add more `unused' attributes as above.
7047
7048         * tab.c: (tab_create) [GLOBAL_DEBUGGING] Set reallocable member.
7049         (tab_realloc) [GLOBAL_DEBUGGING] Assert that table is reallocable.
7050          
7051         * tab.h: (struct tab_table) [GLOBAL_DEBUGGING] New `reallocable'
7052         member.
7053
7054         * var.h: (macro force_dup_variable) [!GLOBAL_DEBUGGING] Remove
7055         gratuitous space between parameter definition.
7056
7057         * vars-atr.c: Changed some assert(0)'s to abort()'s to prevent
7058         complaints about running off the end of functions with NDEBUG
7059         enabled.
7060
7061 Sun Jul  5 00:17:25 1998  Ben Pfaff  <blp@gnu.org>
7062
7063         * Several source files: Removed some PORTME notes when reflection
7064         revealed that ANSI forbids that sort of breakage.  Also, added
7065         lots of `unused' qualifiers here and there.
7066
7067         * aggregate.c: (accumulate_aggregate_info) Remove local var
7068         weighting that turned out not to be used.
7069
7070         * avl.c: Update to version 1.1.0.  Add unused specifier.
7071         (avl_destroy) Initialize ab to 0.  Comment fixes.  Cast return
7072         value to void *.
7073         (avl_probe) Replace some instances of 1 with +1 where appropriate.
7074         (avl_find) Cast return value to void *.
7075         (avl_delete) q doesn't need to be initialized at the beginning of
7076         the function.  Replace some instances of 1 with +1.
7077         (force_avl_delete) Renamed avl_force_delete, all references changed.
7078         (compare_ints) `param' marked unused.
7079         (print_int) `param' marked unused.
7080         (recurse_tree) Replace some instances of 1 with +1.
7081
7082         * avl.h: Update to version 1.1.0.  Only declares avl function
7083         types if not already declared.
7084         (AVL_MAX_HEIGHT) Only define if not already defined.
7085         (struct avl_node) New unused member char pad[2].
7086         [GLOBAL_DEBUGGING] Change conditionalization to NDEBUG instead.
7087         (force_avl_insert) Renamed avl_force_insert.
7088         (force_avl_delete) Renamed avl_force_delete.
7089
7090         * crosstabs.q: (struct table_entry) Put `freq' into a union with
7091         new member `data'.
7092         (struct crosstab) Add new member `ofs'.
7093         (glob var int_tab) Removed.
7094         (custom_tables) In integer mode, assign v[i] properly through the
7095         indirect var_dict.
7096         (custom_variables) Now p.crs.max == max + 1.
7097         [DEBUGGING] (debug_print) p.crs.min and p.crs.max are now ints.
7098         (precalc) Implement integer mode.
7099         (calc_integer) Implement integer mode.
7100         (compare_table_entry) Remove unused local variable `comparing'.
7101         (make_summary_table) Implement integer mode.
7102         (macro ns_rows) Implemented as static variable now.
7103         (several variables) Made static, from global.
7104         (output_pivot_table) Use table_value_missing() for column heads.
7105         Remove several unused local variables.  Implement integer mode
7106         table summing.  Count up ns_rows.
7107         (crosstabs_dim) Make columns wider when /MISSING=REPORT requested.
7108         (find_pivot_extent) Moved into find_pivot_extent_general; now just
7109         calls that function or find_pivot_extent_integer.
7110         (find_pivot_extent_integer) New function.
7111         (enum_var_values) Implemented for integer mode.
7112         (table_value_missing) New function.
7113         (display_dimensions) Call table_value_missing() for heads.
7114         (float_M_suffix) New function.
7115         (display_crosstabulation) Call table_value_missing() for row
7116         heads.  Handle missing values in /MISSING=REPORT mode.
7117         (calc_fisher) Remove unused var N.
7118         (calc_r) Remove unused var fact.
7119
7120         * data-list.c: (dump_fixed_table) Fix table dimensioning.
7121         (read_one_set_of_repetitions) Remove unused vars var_spec, column.
7122
7123         * data-out.c: (insert_commas) Remove unused var cp.
7124         (convert_CCx) Remove unused vars save_set_decimal,
7125         save_set_grouping.
7126
7127         * descript.q: (dump_z_table) Fix table dimensioning.
7128         (pre_calc) Remove unused var j.
7129         (display) Remove unused vars title, s.  Fix table dimensioning.
7130
7131         * expr-evl.c: Comment fixes.
7132
7133         * frequencies.q: (full_dim) New function.
7134         (dump_full) Fix table dimensioning.
7135         (condensed_dim) New function.
7136         (dump_condensed) Fix table dimensioning.
7137
7138         * get.c: (cmd_match_files) Remove unused var n_val.  Remove unused
7139         label winnage.
7140
7141         * html.c: (html_close_drive) Remove unused var i.
7142         (postopen) Remove unused vars title, curfn_len, cp.
7143         (preclose) Remove unused vars this, x.
7144
7145         * lexer.c: Comment fixes.
7146
7147         * matrix-data.c: (cmd_matrix_data) Remove unused var index.
7148
7149         * means.q: (custom_tables) Remove unused var m_dim.
7150
7151         * mis-val.c: Format fix.
7152
7153         * modify-vars.c: (cmd_modify_vars) Remove unused var new_dict.
7154
7155         * output.c: (outp_get_paper_size) Remove unused var cp.
7156
7157         * pfm-read.c: (read_float) Remove unused var save, unused label
7158         underflow.
7159         (read_variables) Remove unused vars cp, j.
7160         (read_value_label) Remove unused var j.
7161
7162         * pfm-write.c: (bufwrite) Remove unused var i.
7163
7164         * postscript.c: (ps_postopen_drive) Remove unused vars dev_info,
7165         fn.
7166         (output_encodings) Remove unused vars char_cp, n_output.
7167         (read_ps_encodings) Remove unused var ep.
7168         (postopen) Remove unused var title.
7169         (preclose) Remove unused var fp.
7170         (ps_open_page) Remove unused vars true, false, orientation,
7171         mirror_horz, mirror_vert, width, length.
7172         (ps_text_metrics) Remove unused var x.
7173
7174         * q2c.c: (find_symbol) Remove unused var y.
7175         (parse_setting) Remove unused parameter sbc, all references
7176         changed.
7177         (dump_parser) Remove unused var cp.
7178         (dump_free) Remove unused var i.
7179
7180         * set.q: (static vars args, n) Removed.
7181         (internal_cmd_gset) Removed.
7182
7183         * sfm-read.c: (sfm_read_dictionary) Removed unused var i.
7184         (read_machine_flt64_info) Removed unused var file_endian.
7185         (read_documents) Removed unused var i.
7186         (read_compressed_data) Removed unused parameter dict, all
7187         references changed.
7188
7189         * sfm-write.c: (bufwrite) Removed unused var i.
7190         (sfm_write_case) Removed unused var i.
7191
7192         * sort.c: (merge_once) Remove unused var t.
7193         (write_separate) #if 0 out as dead code.
7194
7195         * split-file.c: (cmd_split_file) Remove unused var i.
7196
7197         * sysfile-info.c: (sysfile_info_dim) New function.
7198         (cmd_sysfile_info) Fix table dimensioning.
7199         (variables_dim) New function.
7200         (display_variables) Fix table dimensioning.
7201         (describe_variable) Remove unused var prev_r.
7202
7203         * t-test.q: (z_postcalc) Removed.
7204         (pairs_calc) Remove unused var bad_weight.
7205         (postcalc) Remove unused vars dfn, dfd.
7206
7207         * tab.c: (tab_create) Set t->dim to NULL.
7208         (tab_dim) Make sure t->dim is NULL first.
7209         (tab_natural_width) Remove parameter `clamp'.
7210         (tab_value) Remove duplicate assertion for table.
7211         (tab_raw) New function.
7212         (nowrap_dim) New function.
7213         (wrap_dim) New function.
7214         (tab_output_text) Fix table dimensioning.
7215
7216         * tab.h: (tab_raw) New macro.
7217
7218         * val-labs.c: (get_label) Remove unused var type.
7219         (copy_value_labels) Remove unused var trav.
7220
7221         * var.h: (struct crosstab_proc) Completely changed.
7222
7223         * vars-prs.c: (parse_dict_variable) Remove unused var v.
7224
7225         * vfm.c: (open_active_file) Remove unused vars i, lp.
7226
7227         * weight.c: (weight_trns_proc) #if 0 out as dead code.
7228         
7229 Tue Jun  2 23:37:21 1998  Ben Pfaff  <blp@gnu.org>
7230
7231         * Makefile.am: Add apply-dict.c, flip.c.
7232
7233         * apply-dict.c: New file.
7234         
7235         * command.c: (struct command) Make cmd[] larger for CLEAR
7236         TRANSFORMATIONS command name.
7237         (parse_cmd) Make sure we're in a valid state before using it as an
7238         index.  Discard variables and reset state on invalid transitions.
7239         (cmd_clear_transformations) New function.
7240
7241         * command.def: Add APPLY DICTIONARY, CLEAR TRANSFORMATIONS, FLIP.
7242         Add unimplemented PRESERVE, RESTORE.
7243
7244         * file-handle.h: Include stddef.h.
7245
7246         * flip.c: New file.
7247         
7248         * pfm-read.c: (parse_value) Pad value label values with spaces,
7249         not nulls.
7250
7251         * sfm-read.c: (struct sfm_fhuser_ext) Add reference count.
7252         (sfm_close) Decrement reference count, make sure it's zero.
7253         (sfm_maybe_close) New function.
7254         (sfm_read_dictionary) Handle reference counts.
7255
7256         * vars-atr.c: (clear_default_dict) New function.
7257         (discard_variables) Use clear_default_dict().
7258
7259 Sun May 31 00:58:05 1998  Ben Pfaff  <blp@gnu.org>
7260
7261         * Makefile.am: Add pfm-write.c.
7262         (LDADD) Add the libgmp2 libraries.
7263
7264         * command.def: Define EXPORT.
7265
7266         * get.c: (cmd_export) New function.
7267         (export_write_case_func) New function.
7268
7269         * pfm-read.c: (static spss2ascii[]) Make it const.
7270
7271         * pfm-write.c: New file.
7272
7273         * sfm-write.c: Formatting, comment fixes.
7274
7275         * var.h: Comment fix.
7276
7277 Fri May 29 21:44:12 1998  Ben Pfaff  <blp@gnu.org>
7278
7279         * Makefile.am: Add pfm.h, pfm-read.c.
7280
7281         * command.def: IMPORT is now implemented.
7282
7283         * format.c: (glob var translate_fmt[]) New var.
7284
7285         * get.c: (enum GTSV_NONE) Renamed GTSV_OPT_NONE.
7286         (cmd_import) New function.
7287         (import_source_read) New function.
7288         (glob var import_source) New var.
7289
7290         * pfm-read.c: New file.
7291
7292         * pfm.h: New file.
7293         
7294         * sfm-read.c: (parse_format_spec) Local variable translate_fmt[]
7295         moved in format.c.
7296         (dump_dictionary) Disabled printing a couple of items.
7297
7298 Mon May 25 12:42:37 1998  Ben Pfaff  <blp@gnu.org>
7299
7300         * crosstabs.q: (postcalc) Call make_summary_table().
7301         (make_summary_table) New function.
7302         (insert_summary) New function.
7303         (display_dimensions) Remove some unnecessary arguments, all
7304         references changed.
7305         (output_pivot_table) Fix lots of problems with the risk table
7306         setup.
7307         (submit) Don't display an empty table.
7308         (display_risk) Fix order of arguments to calc_risk().
7309
7310         * glob.c: Always include assert.h and stdlib.h.
7311
7312         * output.h: (enum OUTP_T_JUST_FULL) Removed, all references
7313         removed.
7314
7315         * tab.c: (tab_create) Cosmetic changes.
7316
7317         * tab.h: (enum TAB_JUSTIFY) Removed, all references removed.
7318
7319 Sun May 24 22:39:23 1998  Ben Pfaff  <blp@gnu.org>
7320
7321         * tab.def: Removed.
7322
7323         * crosstabs.q: (output_pivot_table) Headers drawing and submission
7324         code simplified, moved into new function submit().
7325         (submit) New function.
7326         (crosstabs_dim) New function.
7327         (display_directional) Substitute variable names for %s where
7328         appropriate.
7329         (somers_d_v[], somers_d_ase[], somers_d_t[]) New static vars.
7330         (calc_symmetric) Initialize parameters only if non-NULL.
7331         Calculate Somers' d.
7332         (calc_directional) Calculate Somers' d (or copy it, really).
7333         Calculate eta.
7334
7335         * output.c: (outp_string_width) New function.
7336
7337         * postscript.c: (postopen) Calculate font widths based on the
7338         width of the zero '0' character, not the width of the space
7339         character.  Set paper-width and paper-length based on points, not
7340         device units.
7341         (ps_open_page) Fix page setup string for landscape mode.
7342
7343         * som.h: (struct som_dimension) Removed.
7344         (struct som_table_class) height, width members take int * not
7345         som_dimesion * now.
7346
7347         * tab.c: Many functions now have added parameter validation.
7348         (tab_height, tab_width) These functions were removed and merged
7349         into a single function tab_resize(), and all references changed.
7350         (tab_dim) Rewritten since the interface changed; reduced from
7351         hundreds of lines to two.  All callers were changed.  Currently
7352         most of them just use tab_natural_dimensions as their callback and
7353         await detailed translation of functionality.
7354         (tab_natural_width) New function.
7355         (tab_natural_height) New function.
7356         (tab_natural_dimensions) New function.  This is a callback
7357         function, not something that you'd want to call directly.
7358         (tab_nat_dim) Removed.
7359         (tabi_table) Allocates t->w and t->h.
7360         (tabi_driver) Inlined sum_columns()'s functionality.  Calls the
7361         dimensions callback.
7362         (evaluate_dimensions) Removed.
7363         (sum_columns) Removed.
7364
7365         * tab.h: (enum TAL_1THIN) Removed.
7366         (enum series t_*) Removed.
7367         (struct tab_table) Members trh, trv changed to unsigned char *
7368         from int *.  Member dim changed to a function pointer from a
7369         unsigned char *.  Member max_stack_height removed.  New members
7370         hr_tot, vr_tot.
7371         (macros tab_l, tab_r, tab_t, tab_b) New.
7372
7373 Sat May 23 23:22:13 1998  Ben Pfaff  <blp@gnu.org>
7374
7375         * ascii.c: (delineate) Assign last_space_nchars before skipping
7376         spaces, to fix right justification.
7377
7378         * crosstabs.q: (static vars risk, direct) New vars.
7379         (static var pearson_r) Removed.
7380         (glob var chisq_fisher) Made static.
7381         (static vars row_tot[], col_tot[]) Don't include grand total
7382         anymore.
7383         (static var grand_total) Renamed W, all references changed.
7384         (output_pivot_table) Only make `table' if num_cells != 0.  Make
7385         risk and directional tables.  Deal with grand total no longer part
7386         of col_tot[].  Free rows and cols after we're done with them.
7387         (display_risk) New function.
7388         (display_directional) New function.
7389         (clac_r) Rewritten so that it stores all its results into its
7390         arguments, so it can be used for Spearman's correlation too.
7391         (calc_symmetric) Added a t[] argument, all references changed.
7392         Calculates ASEs for tau-b, tau-c, gamma.  Calculates Spearman's r,
7393         Pearson's r, Cohen's kappa.
7394         (calc_risk) New function.
7395         (calc_directional) New function.
7396
7397         * som.c: (som_submit) Improved debugging code.
7398
7399         * stats.c: (hypercube) New function.
7400         (cube) New function.
7401         (sqr) New function.
7402         (normal_sig) Went back to old implementation, which actually
7403         worked.
7404
7405         * stats.h: (macros square, cube, hypercube) Removed.  The
7406         equivalent functions in stats.c are inlined here; all references
7407         to square changed to sqr.
7408
7409 Fri May 22 00:03:41 1998  Ben Pfaff  <blp@gnu.org>
7410
7411         * crosstabs.q: (N_SYMMETRIC) New define.
7412         (postcalc) Disable debug printing.
7413         (static vars chisq_fisher, pearson_r) New.
7414         (output_pivot_table) Add support for symmetric measures.  Add
7415         chi-square output of exact sigs.
7416         (display_chisq) Rewritten.
7417         (display_symmetric) New function.
7418         (gamma_int) New function.
7419         (Pr) New function.
7420         (swap) New function.
7421         (calc_fisher) New function.
7422         (calc_chisq) Check boundary conditions better. Calculate Yates,
7423         Fisher, Mantel-Haenszel tests.
7424         (calc_r) New function.
7425         (calc_symmetric) New function.
7426
7427         * stats.c: (normal_sig) Rewritten with new algorithm.  Renamed
7428         from calc_normal.
7429         (chisq_sig) Better boundary conditions.  Renamed from
7430         calc_significance.
7431
7432         * tab.h: (struct tab_table) New member cf.
7433
7434         * tab.c: (tab_create) Set cf.
7435         (tab_width) New function.
7436         (tab_realloc) Handle cf.
7437         (tab_vline) Handle cf.
7438         (tab_hline) Handle cf.
7439         (tab_box) Handle cf.
7440         (tab_value) Handle cf.
7441         (tab_float) Handle cf.
7442         (tab_text) Handle cf.
7443         (tab_joint_text) Handle cf.
7444         (tab_offset) Handle cf.
7445         (tab_next_row) Handle cf.
7446         (evaluate_dimensions) Handle cf.
7447         (render_strip) Handle cf.
7448
7449 Wed May 20 00:03:59 1998  Ben Pfaff  <blp@gnu.org>
7450
7451         * crosstabs.q: (postcalc) New vars row_tot, col_tot, pass them to
7452         output_pivot_table().
7453         (output_pivot_table) Moved lots of local variables outside and
7454         made them static.  Add beginnings of chi-square statistic
7455         support.  Now column and row totals aren't in the main matrix.
7456         Always zero out any leftover rows & columns after we're done with
7457         the table entries.  Move all output stuff into
7458         display_dimensions(), display_crosstabs(), display_chisq().
7459         (display_dimensions) New function.
7460         (display_crosstabulation) New function.
7461         (display_chisq) New function.
7462         (calc_chisq) Implemented Pearson and likelihood-ratio chisquares.
7463
7464         * frequencies.q: (dump_full, dump_condensed) Remove tab_null()
7465         references, simplify logic.
7466
7467         * postscript.c: Remove scale, translate-x, translate-y,
7468         mirror-horz, mirror-vert, rotate-180 options.
7469         (struct ps_driver_ext) Remove scale, translate_x, translate_y.
7470         All references deleted.
7471         (macro YT) New macro.
7472         (array option_tab[]) Removed options.
7473         (ps_option) Removed options.
7474         (ps_open_page) Write page setup explicitly to output file, without
7475         using now-deleted BP function.
7476         (macro dump_line) Use YT().
7477         (macro dump_thick_line) Use YT().
7478         (draw_headers) Use YT().
7479         (switch_font) Reorder arguments to SF function.
7480         (write_text) Use YT().
7481
7482         * sfm-read.c: (sfm_read_case) Don't attempt to read variables that
7483         have get.fv == -1.
7484
7485         * sysfile-info.c: (describe_variables) Don't use tab_nulls().
7486
7487         * tab.c: (tab_create) Initialize t->ct to zeros.  Remove
7488         null-debugging code.
7489         (tab_realloc) Remove null-debugging code.  Initialize new regions
7490         of t->ct to zeros.
7491         (tab_vline) Support offsets.
7492         (tab_hline) Support offsets.
7493         (tab_box) Support offsets.
7494         (tab_null) Removed.
7495         (tab_nulls) Removed.
7496         (tab_row) Removed.
7497         (tab_col) Removed.
7498         (evaluate_dimensions) Remove null-debugging code.  Understand
7499         TAB_EMPTY attribute.  Assert that text.s.s is always non-NULL if
7500         TAB_EMPTY not present.
7501
7502         * tab.h: New cell attribute TAB_EMPTY.
7503         (macros tab_nr, tab_nc, tab_row, tab_col) New.
7504
7505         * vars-atr.c: (init_variable) Set get.fv to -1 so that GET doesn't
7506         try to read them from system files.
7507
7508         * vfm.c: (dump_splits) Don't call tab_null().   
7509
7510 Sat May 16 19:36:55 1998  Ben Pfaff  <blp@gnu.org>
7511
7512         * crosstabs.q: (struct crosstab) Added `missing' member.
7513         (custom_tables) Init missing.
7514         (calc_general) Handle missing values.
7515         (calc_chisq) New function.
7516         (output_pivot_table) Start work on chi-square output.  Update for
7517         new tab offset support functions.  Shorten statistic names.
7518
7519         * Several files: add in more `const's to placate gcc's warnings.
7520
7521         * tab.h: (struct tab_table) Add col_ofs, row_ofs members.  Comment
7522         fixes.
7523
7524         * tab.c: (tab_height, tab_realloc, tab_vline, tab_hline, tab_box,
7525         tab_null, tab_nulls, tab_value, tab_float, tab_text,
7526         tab_joint_text) Add col_ofs and row_ofs support.
7527         (tab_offset) New function.
7528         (tab_next_row) New function.
7529         (tab_row) New function.
7530         (tab_col) New function.
7531         (tabi_table) Add col_ofs and row_ofs support.
7532
7533         * vars-atr.c: (is_system_missing) New function.
7534
7535 Tue May 12 16:14:30 1998  Ben Pfaff  <blp@gnu.org>
7536
7537         * crosstabs.q: Expanded subcommand names RESID --> RESIDUAL, etc.
7538         (static var no_cells) Removed.
7539         (static var num_cells) New.
7540         (static var expected) New.
7541         (static var cells[]) New.
7542         (internal_cmd_crosstabs) Deal with new variables.
7543         (postcalc) Removed most of the meat and put it in new function
7544         output_pivot_table().
7545         (output_pivot_table) Calculates and outputs an entire pivot table.
7546
7547         * postscript.c: (postopen) Fix problems with free()ing addresses
7548         not obtained from malloc().
7549
7550         * som.c: (som_submit) Add assertion.
7551
7552         * sysfile-info.c: (describe_variable) Use new tab_nulls()
7553         function.
7554
7555         * tab.c: (static var tab_names[]) New.
7556         (tab_realloc) -1 for nc or nr indicates no change.
7557         (tab_nulls) New function.
7558         (tab_dim) Use tab_names[].
7559         (tabi_cumulate) Don't include bottom or right headers.  Furrfu.
7560         (evaluate_dimensions) Don't terminate on uninited cells, just put
7561         an X in them and emit a notice.  Use tab_names[].
7562
7563         * tab.h: Move bits into tab.def.
7564
7565         * tab.def: New.  Don't try to declare tab_table_class because then
7566         som.h has to be included.       
7567         
7568 Thu May  7 22:55:04 1998  Ben Pfaff  <blp@gnu.org>
7569
7570         * command.def: New file, contains all the command definitions
7571         previously included bodily in command.c.
7572
7573         * format.def: New file, contains all of the format definitions
7574         previously split across format.h, format.c, and sfm-write.c.
7575
7576         * lexer.h: Renamed from tokens.h in order to match corresponding
7577         .c file name.
7578
7579         * lexerP.h: Moved some rarely used functions exported by lexer.c
7580         into here.
7581
7582         * Makefile.am: Commemorate renamed files.
7583         (EXTRA_DIST) Add command.def, format.def.
7584
7585         * command.c: [0] (walk_cmdtable_func) Removed.
7586
7587         * crosstabs.q: (postcalc) Made it work and print out matrices
7588         proving it.
7589         (enum_column_values) Renamed enum_var_values, generalized for any
7590         variable.
7591
7592         * format.h: (struct fmt_desc) New member `spss'.
7593
7594         * q2c.c: (main) Generated code includes lexer.h instead of
7595         tokens.h.
7596
7597         * sfm-write.c: (write_format_spec) Use new spss member of fmt_spec
7598         instead of an independent translation table.
7599
7600 Tue May  5 13:19:03 1998  Ben Pfaff  <blp@gnu.org>
7601
7602         * Lots of source files: Added const to declarations.
7603
7604         * aggregate.c: (parse_aggregate_function) Rename inner i to j.
7605         
7606         * arena.c: (arena_clear) Set prev pointer to null when done.
7607
7608         * ascii.c: (ascii_option) Rename index as indx.
7609
7610         * avl.c: This is now a separate library called libavl.
7611         (xmalloc) Make static.
7612         (avl_probe) Step A7 can use the cache instead of an explicit
7613         compare.
7614         (avl_delete) Don't maintain a q pointer because it's always
7615         available in the pointer stack.  Comment fix.
7616
7617         * avl.h: This is now a separate library called libavl.
7618
7619         * command.c: (cmd_table[]) Remove spurious trailing "".
7620
7621         * common.h: Only include random() fix if this system needs it.
7622
7623         * crosstabs.q: Include alloca headers.
7624         (n_sorted_tab) New global var.
7625         (postcalc) Mostly rewritten.
7626         (find_pivot_extent) Rewritten.
7627         (enum_column_values) Rewritten.
7628
7629         * data-out.c: (convert_F) Rename inner n as n_spaces.
7630
7631         * error.c: (dump_message) Don't have an outer var i.
7632
7633         * file-handle.q: (static var f) Removed.  All references removed.
7634         (internal_cmd_file_handle) Uses a local variable instead of f.
7635
7636         * get.c: (trim_dictionary) Change scope of i, i1, i2.
7637         (cmd_match_files) Don't strcpy tokstr into sbc (why was this ever
7638         done?)
7639
7640         * getline.h: Declare getl_history as extern.  Reported by
7641         palme@uni-wuppertal.de (Hubert Palme).
7642
7643         * postscript.c: (postopen) Some large mods for constness.
7644
7645         * recode.c: Remove spurious copyrights since PSPP is owned by FSF
7646         anyway.
7647
7648 Fri Apr 24 12:52:47 1998  Ben Pfaff  <blp@gnu.org>
7649
7650         * Makefile.am: Rename BUILT_SOURCES to q_sources, all references
7651         changed.  Add avl.c, avl.h to pspp_SOURCES.  Remove avllib from
7652         LDADD.
7653
7654         * avl.c, avl.h: New files.  These form a clean-room
7655         reimplementation of avllib.  Iterative algorithms are used in
7656         place of recursive ones, so there is no resemblance in the code.
7657
7658         * Lots of headers: Don't include other headers by default.
7659
7660         * Lots of source files: Explicitly include all needed headers.
7661
7662         * arena.c: (arena_clear) New function.
7663
7664         * crosstabs.q: (ROW_VAR, COL_VAR) New enums.
7665         (static var ar) Removed.
7666         (staitc vars ar_tc, ar_col) New.
7667         (cmd_crosstabs) Destroy the arenas.
7668         (internal_cmd_crosstabs) Create the arenas.
7669         (precalc) Don't need a free function for the hash.
7670         (calc_general) Make sure to zero out the trailer on the key data
7671         before inserting.
7672         (print_table_entries) Updated.
7673         (postcalc) Worked on actually implementing.
7674         (find_pivot_extent) New function.
7675         (compare_value) New function.
7676         (enum_column_values) New function.
7677
7678         * data-in.c: (parse_month) Make local array `static const'.
7679         
7680         * data-out.c: (convert_date) Make local array `static const'.
7681         (convert_WKDAY) Same.
7682         (convert_MONTH) Same.
7683
7684         * frequencies.q: (postprocess_freq_tab) avl_walk_inorder() has
7685         been renamed to avl_walk().
7686         
7687         * hash.c: Rewritten more efficiently.
7688
7689         * hash.h: Add attribute const to hsh_next_prime declaration.
7690
7691         * lexer.c: (id_match) Make arguments const.
7692
7693         * postscript.c: (ps_postopen_driver) Make default fonts the
7694         Helvetica family.
7695
7696         * q2c.c: (main) Generated code needs stdlib.h.
7697
7698         * sfm-write.c: (write_value_labels) An avl_traverser needs to be
7699         initialized to 0 now, not to NULL.  All other references to
7700         avl_traverser were updated in the same way.
7701
7702         * tokens.h: Macro version of id_match updated to use const
7703         properly.
7704
7705         * val-labs.c: (inc_ref_count) New function.
7706         (copy_value_labels) Simply through use of new avl_copy() function.
7707
7708 Wed Apr 15 13:01:58 1998  Ben Pfaff  <blp@gnu.org>
7709
7710         * crosstabs.q: Probably doesn't compile.  New PIVOT subcommand.
7711         (postcalc) Worked on this.
7712
7713         * postscript.c: (OPO_DOUBLE_LINE) New enum.
7714         (struct ps_driver_ext) New line_width_thick member.
7715         (ps_preopen_drive) Init line_width_thick.
7716         (option_tab[]) Add line-* options.
7717         (ps_option) Parse line-* options.
7718         (postopen) Add line_width_thick support.  Strip leading spaces on
7719         prologue output lines.
7720         (ps_open_page) Include line_width_thick in output.
7721         (macro dump_thick_line) New.
7722         (dump_fancy_line) Support thick lines as well as double lines.
7723
7724 Tue Apr 14 00:50:08 1998  Ben Pfaff  <blp@gnu.org>
7725
7726         * Makefile.am: Add crosstabs.c to BUILT_SOURCES.  Add crosstabs.q
7727         to pspp_SOURCES.  Add crosstabs.q to EXTRA_DIST.
7728
7729         * Many source files: Rename `options' to `pv_opts' as appropriate.
7730
7731         * command.c: (static var cmd_table[]) Add CROSSTABS command.
7732
7733         * common.c: (xcalloc) New function.
7734
7735         * crosstabs.q: New file.  Not finished yet, though.
7736                 
7737         * data-list.c: Comment fix.
7738
7739         * error.c: Remove some old Checker cruft.
7740
7741         * frequencies.q: (dump_full) Cumulate valid percent instead of
7742         regular percent.
7743
7744         * getline.c: Comment fix.
7745
7746         * hash.c: Comment fixes.
7747
7748         * hash.h: (struct hsh_table) Make hash functions return unsigned
7749         instead of int to avoid problems with taking the modulo of
7750         negative return values.  All references changed.
7751
7752         * misc.c: (intlog10) Make its table static const instead of auto.
7753
7754         * sfm-read.c: (read_header) Make `prefix' static const instead of
7755         auto.
7756
7757         * var.h: (union value) Add member `hash'.
7758         (struct variable) Rename prv_index as `foo'--all references
7759         changed.  Reorder.
7760         (typedef pv_opts) Removed.  All references changed.
7761
7762         * vars-prs.c: (parse_variables) Message fixes.
7763         
7764 Mon Mar  9 15:35:08 1998  Ben Pfaff  <blp@gnu.org>
7765
7766         * get.c: (cmd_match_files) Don't reverse the order of FILEs as
7767         they are being inserted.  Don't check for BY variables of
7768         different types.  Discard variables if the active file isn't
7769         included in the merge.
7770         (mtf_processing) Essentially rewritten.
7771         (mtf_merge_dictionary) Check for master/slave variables of
7772         different types/widths.
7773
7774         * vfm.c: (static var not_canceled) New var.
7775         (process_active_file) Don't call vfm_source->read() if
7776         there's no vfm-source.  Initialize not_canceled.
7777         (process_active_file_write_case) Honor and update not_canceled.
7778         (prepare_for_writing) Rollback changes from yesterday, they were
7779         wrong.
7780         (close_active_file) Don't destroy vfm_source unless it exists.
7781         
7782 Mon Mar  9 00:56:16 1998  Ben Pfaff  <blp@gnu.org>
7783
7784         * Lots of source files: Added { } around nested if/else constructs
7785         to avoid new gcc 2.8 warnings.
7786
7787         * data-in.c: (parse_Z) Declare `int' type explicitly.
7788         (convert_Z) Ditto.
7789
7790         * get.c: (struct mtf_file) Add prev, next_min, by, input members.
7791         (cmd_match_files) Initialize mtf_by_values.  Manage by, input,
7792         prev members.  Put TABLEs at the end of the chain and FILEs at the
7793         beginning.  Don't allow the active file in STATE_INIT.  Use proper
7794         `seen' value for the active file.  Fill out the by members and
7795         make sure they're of consistent type.  Do the actual merge
7796         operation.
7797         (mtf_processing_finish) New function.
7798         (var_type_description) New function.
7799         (mtf_free_file) New function.
7800         (mtf_free) Rewritten.
7801         (mtf_delete_file_in_place) New function.
7802         (mtf_read_nonactive_records) New function.
7803         (mtf_compare_BY_values) New function.
7804         (static var mtf_seq_no) New var.
7805         (mtf_processing) New function.
7806         (mtf_merge_dictionary) Assign nval members for the system file
7807         dictionary.  Assign fv values for its variables.  Point each slave
7808         variable to the corresponding master variable.
7809
7810         * hash.c: Include str.h.
7811
7812         * mis-val.c: (copy_missing_values) src arg is const.
7813
7814         * misc.c: (spacing) Make `max' var explicitly int.
7815
7816         * sfm-read.c: (dump_dictionary) Message reformatting.
7817         (sfm_read_case) Add assertion.
7818
7819         * sort.c: Esthetic fixes.
7820
7821         * var.h: (struct match_files_proc) New struct.
7822         (struct variable) Add private data match_files_proc.
7823
7824         * vars-atr.c: (delete_variable) Implement.  Add argument for the
7825         dictionary that owning the variable.
7826         (dup_variable) Add assertion.
7827
7828         * vfm.c: Comment fixes, hopefully the comments are correct now.
7829         (process_active_file) New function.
7830         (process_active_file_write_case) New function.
7831         (process_active_file_output_case) New function.
7832         (prepare_for_writing) Use temp_dict->nval for vfm_info, not
7833         default_dict.nval.
7834         (write_case) Renamed procedure_write_case().  Now write_case is a
7835         pointer to a function.  Style fixes.
7836         
7837 1998-03-05  Ben Pfaff  <blp@gnu.org>
7838
7839         * Makefile.am: (q2c) Link with libmisc.
7840         (version.c) Define default_config_path, include_path,
7841         groff_font_path.
7842
7843         * ascii.c: (ascii_postopen_driver) When the default newline string
7844         is requested, open file in text mode.  Suggested by
7845         palme@uni-wuppertal.de (Hubert Palme).
7846         (static vars line_buf, line_p) Change from char * to unsigned char
7847         *.
7848         (ascii_close_page) char * to unsigned char *.
7849
7850         * cmdline.c: (parse_command_line) Implement -r option by
7851         prepending ~/.pspp/rc to the list of files to process.
7852
7853         * command.c: (cmd_remark) Reset getl_prompt to the standard prompt
7854         before pulling in a final line.
7855         (null_func, null_int_func) Removed (dead code).
7856
7857         * descript.q: (display) Calculate width of variable name column
7858         properly.  Calculate number of valid cases properly.  Reported by
7859         palme@uni-wuppertal.de (Hubert Palme).
7860
7861         * filename.c: (init_filename) Use default_config_path instead of
7862         now obsolete CONFIG_PATH.
7863
7864         * getline.c: (getl_initialize) Use include_path instead of now
7865         obsolete INCLUDE_PATH.
7866         (getl_add_file) New argument `where'.  All references changed.
7867
7868         * groff.c: (find_font_file) Use groff_font_path instead of now
7869         obsolete GROFF_FONT_PATH.
7870         
7871         * postscript.c: (find_ps_file) Use groff_font_path instead of now
7872         obsolete GROFF_FONT_PATH.  Copy through temporary variable to
7873         avoid problems with constness.
7874
7875         * str.h: (macro cs_streq) New macro.
7876
7877         * version.h: (glob var default_config_path, include_path,
7878         groff_font_path) New vars.
7879         
7880 1998-02-23  Ben Pfaff  <blp@gnu.org>
7881
7882         * Many source files: Change verbose_msg() priority levels and
7883         messages.
7884
7885         * aggregate.c: Include debug-print.h.
7886
7887         * cmdline.c: (parse_command_line) Add --safer/-s and --command/-c
7888         options.
7889         (static var pre_syntax_message) Document --safer/-s and
7890         --command/-c.
7891
7892         * command.c: (cmd_erase, cmd_host) Disable if set_safer is set.
7893
7894         * dfm.c: (open_inline_file) [__CHECKER__] Zero out ext->file,
7895         because it's not used but it's still copied.
7896         (open_file_r) Remove gratuitous debug message.
7897
7898         * filename.c: (safety_violation) New function.
7899         (open_file) Remove gratuitous debug messages.  Don't allow pipe
7900         files if set_safer is set.
7901
7902         * get.c: Turn off debugging.
7903
7904         * getline.c: (getl_add_virtual_file) New function.
7905         (getl_read_line) Add verbose_msg() call for opening new syntax
7906         file.
7907         (getl_perform_delayed_reset) Add a return value describing whether
7908         any action was taken.  Call reset_eof().
7909
7910         * getline.h: Comment fix.
7911
7912         * groff-font.c: (groff_read_font) Use `goto next_iteration' in
7913         place of incorrect `continue'.  Use strtok_r() instead of
7914         strtok().  Always check strtok_r() return value.
7915         (groff_read_DESC) Use strtok_r() instead of strtok().
7916
7917         * lexer.c: (reset_eof) New function.
7918
7919         * main.c: (parse) Get a token after performing a delayed reset
7920         action; allow empty syntax files.
7921
7922         * postscript.c: (output_encodings) Use strtok_r() instead of
7923         strtok().
7924
7925         * q2c.c: (dump_parser) Use strtok_r() instead of strtok().
7926
7927         * set.q: Comment fixes.
7928         (glob var set_safer) New var.
7929         (internal_cmd_set) Support SAFER.
7930
7931         * str.h: [!HAVE_STRTOK_R] Declare strtok_r() prototype.
7932
7933         * temporary.c: (free_dictionary) Set d->splits to NULL after
7934         freeing.
7935
7936         * vars-atr.c: (clear_variable) Decrement dict->n_splits if
7937         variable deleted, not if it *isn't* deleted.
7938
7939 1998-02-16  Ben Pfaff  <blp@gnu.org>
7940
7941         * command.c: (array cmd_table[]) Add MATCH FILES.
7942
7943         * common.c: Comment fixes.
7944
7945         * data-list.c, dfm.c, error.c, filename.c, list.q, matrix-data.c,
7946         modify-vars.c, postscript.c, sfm-read.c, sfm-write.c, tab.c:
7947         Include alloca.h.  Problem reported by palme@uni-wuppertal.de
7948         (Hubert Palme).
7949
7950         * expr-opt.c: Include str.h.  Problem reported by
7951         palme@uni-wuppertal.de (Hubert Palme).
7952
7953         * get.c: (cmd_get) [DEBUGGING] Update v->p.get to v->get.
7954         (static var mtf_by) Change from char ** to variable **.
7955         (static var mtf_master) New var.
7956         (mtf_merge_dictionary) New function.
7957         (cmd_match_files) Init mtf_master.  Parse mtf_by according to new
7958         var type.  Reorder tests properly.  Initialize file->dict.  Detect
7959         TABLE= without BY=.  Read file dictionaries and merge them.  Give
7960         subcommand name with IN, LAST, FIRST error messages.  Create IN,
7961         LAST, FIRST variables.  Comment fixes.
7962         (mtf_free) Don't free default_dict.  Free mtf_master.
7963
7964         * getline.c: Define getl_mode.  Change getl_buf_size to size_t
7965         from int.
7966         (handle_line_buffer) Cast int to size_t in comparison to avoid
7967         warning.
7968
7969         * getline.h: Declare getl_mode extern.
7970
7971         * groff-font.c: (groff_read_font) Type-fix calls to getline.
7972         (groff_read_DESC) Make line_size a size_t.
7973         (match_tok) Parenthesize name to avoid macro expansion.
7974
7975         * mis-val.c: (copy_missing_values) New function.
7976
7977         * postscript.c: (postopen) Make buf_size a size_t.
7978
7979         * sfm-read.c: (dump_dictionary) Make global from static.  Print
7980         variable info in parts for easier debugging with Checker.
7981
7982         * temporary.c: (copy_variable) Use copy_value_labels().
7983         (new_dictionary) New arg: whether to copy file label, documents.
7984
7985         * val-labs.c: (copy_value_labels) New function.
7986
7987         * var.h: (enums MISSING_*) Add MISSING_COUNT.
7988
7989         * vars-atr.c: [GLOBAL_DEBUGGING] (force_dup_variable) New
7990         function.
7991         (dup_variable) Set prv_index, get.fv, get.nv.
7992
7993 Fri Feb 13 15:38:36 1998  Ben Pfaff  <blp@gnu.org>
7994
7995         * Makefile.am: (pspp_SOURCE) Add htmlP.h.
7996
7997         * Many source files: For ANSI-compliance, add empty statement
7998         after label.  Reported by palme@uni-wuppertal.de (Hubert Palme)
7999         and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
8000
8001         * data-in.c: (parse_numeric) Some header files break on
8002         -DBL_MIN_10_EXP because they get a --; add () for safety.
8003         Reported by palme@uni-wuppertal.de (Hubert Palme).
8004
8005         * dfm.c: Idea by Dr Eberhard W Lisse <el@linux.lisse.na>.
8006         (struct dfm_fhuser_ext) Change `file' from FILE * to file_ext.
8007         (dfm_close) Use close_file_ext.
8008         (open_inline_file) Set file.file to NULL, not file.
8009         (open_file_r, open_file_w) Initialize file.file; fill in file_ext
8010         struct and use open_file_ext().
8011         (read_record) Use file.file.
8012
8013         * file-handle.q: (prepend_current_directory) Pass through special
8014         filenames.
8015
8016         * filename.c: Only include unistd.h if HAVE_UNISTD_H.
8017         (normalize_filename) Pass through special filenames.
8018         (open_file, close_file) Accept pipe| and |pipe syntaxes as
8019         equivalent.
8020         (dirname) Rename blp_dirname() because of name conflict on some
8021         OS.  All references changed.  Reported by palme@uni-wuppertal.de
8022         (Hubert Palme).
8023         (is_special_filename) New function.
8024
8025         * get.c: (GTSV_OPT*) Add GTSV_OPT_MATCH_FILES.
8026         (trim_dictionary) Conditionalize some of the options on whether
8027         GTSV_OPT_MATCH_FILES is in *options.
8028         (rename_variables) Don't allow variables to be renamed as scratch
8029         variables.
8030         (MTF_*) New enum series.
8031         (struct mtf_file) New struct.
8032         (static vars mtf_head, mtf_tail, mtf_by, mtf_n_by, mtf_free) New
8033         vars.
8034         (cmd_match_files, mtf_free) New functions.
8035
8036         * lexer.c: (match_int) Needed parentheses around name to escape
8037         macro expansion.  Reported by Micah Altman
8038         <maltman@www-vdc.fas.harvard.edu>.
8039
8040         * print.c: Needed to include alloca.h.  Reported by Micah Altman
8041         <maltman@www-vdc.fas.harvard.edu>.
8042
8043         * recode.c: (convert_to_double) Parenthesize -DBL_MIN_10_EXP to
8044         -(DBL_MIN_10_EXP).  Reported by palme@uni-wuppertal.de (Hubert
8045         Palme).
8046         
8047         * str.h: Include stdarg.h.  Reported by palme@uni-wuppertal.de
8048         (Hubert Palme) and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
8049
8050 Thu Feb  5 00:18:21 1998  Ben Pfaff  <blp@gnu.org>
8051
8052         * html.c: (struct html_driver_ext) Move into htmlP.h.
8053         (html_preopen_driver) Initialize cp_x, cp_y.
8054         (html_submit) Implement as call to output_tab_table().
8055         (change_attributes) New function.
8056         (escape_string) New function.
8057         (output_tab_table) New function.
8058
8059         * list.q: (write_all_headers) Add code for writing headers for the
8060         html driver.
8061         (clean_up) Write out the html close-table tag.
8062         (determine_layout) Ignore html driver.
8063         (list_cases) Write html data.
8064
8065         * som.c: (som_submit) Move more of the code into output_table().
8066
8067         * tab.c: (static var hit) Make a global var and rename tab_hit.
8068         (static var tab_table_class) Make a global var.
8069
8070         * htmlP.h: New file.
8071
8072 Tue Feb  3 16:12:18 1998  Ben Pfaff  <blp@gnu.org>
8073
8074         * dump-sysfile.c: Removed.
8075
8076         * html.c: (preclose) Change comment in emitted code.
8077
8078         * matrix-data.c: Debugging off by default.  Comment fixes.
8079         (static var container) New var.
8080         (cmd_matrix_data) Create and destroy container.  Initialize
8081         is_per_factor[] to 0s.  Move code into new function
8082         string_to_content_type().  Require split values to be present in
8083         the data when ROWTYPE_ is explicit.  Call specific function, not
8084         general read_matrices().
8085         (string_to_content_type) New function.
8086         (context) Exclude all whitespace, not just spaces.
8087         (mget_token) A dot is a number.  Add assertion.
8088         (static var data) Renamed nr_data.
8089         (static var factor_values) Renamed nr_factor_values.
8090         (read_matrices) Renamed read_matrices_without_rowtype().  Handle
8091         only specific case.  Close data_file before exit.
8092         (fill_matrix) New function.
8093         (read_data_lines) Renamed nr_read_data_lines().  Remove debug
8094         printing.  Style fixes.  Message fixes.  Move code into
8095         fill_matrix().
8096         (read_matrices_without_rowtype) Rename
8097         matrix_data_read_without_rowtype().  Fix off-by-one error on
8098         loops.  Allocate nr_data[] memory from arena.
8099         (read_matrices_with_rowtype) Removed.
8100         (read_splits) Renamed nr_read_splits().  Style fixes.
8101         (read_factors) Renamed nr_read_factors().
8102         (dump_cell_content) Comment fixes.  Arguments changed.  Change
8103         debug printing.  All references changed.
8104         (output_data) Renamed nr_output_data().
8105         (static var wr_content) New var.
8106         (struct factor_data) New struct.
8107         (static var wr_data) New var.
8108         (static var wr_current) New var.
8109         (matrix_data_source_destroy_source) Removed.
8110         (read_matrices_with_rowtype) New function.
8111         (matrix_data_read_with_rowtype) New function.
8112         (wr_read_splits) New function.
8113         (compare_factors) New function.
8114         (wr_output_data) New function.
8115         (wr_read_rowtype) New function.
8116         (wr_read_factors) New function.
8117         (wr_read_indeps) New function.
8118         (glob var matrix_data_source) Make destroy_source member NULL as
8119         well.
8120
8121 Fri Jan 23 00:09:08 1998  Ben Pfaff  <blp@gnu.org>
8122
8123         * lexer.c: (syntax_error) Give better error message when at end of
8124         file.
8125
8126         * matrix-data.c: (var content_names[]) Fix PROX spelling.  Change
8127         N_SCALAR to output as plain N.
8128         (mdump_token) Change output format.
8129         (context) Fix message output interaction with spaces in input.
8130         (another_token) New function.
8131         (force_eol) Improved error message.
8132         (static var max_cell_index) New var.
8133         (read_matrices) Init `cells'.  factor_values is now per-cell.
8134         Init max_cell_index.
8135         (read_data_lines) Replace `compare' local with new `compare' arg.
8136         Debugging messages changed.  Only read factors if per_factor.
8137         Propagate error return from read_factors(), force_eol().
8138         Copy N_SCALAR values across the N vector.
8139         (read_matrices_without_rowtype) Don't init `cells'.  Don't need to
8140         check parentheses manually since we now have is_per_factor[].
8141         Call read_data_lines() with new args.  Check for end of data after
8142         looping, using another_token().
8143         (read_factors) Arguments changed.  Use max_cell_index to determine
8144         whether to read or compare factors.  Message fixes.
8145         (dump_cell_content) New function.
8146         (output_data) Completely rewritten because content types were
8147         supported to be nested inside factor values, not vice versa.
8148         
8149 Thu Jan 22 00:26:38 1998  Ben Pfaff  <blp@gnu.org>
8150
8151         * lexer.c: (syntax_error) Support formatted varargs messages.
8152
8153         * matrix-data.c: Turn debugging on by default.
8154         (static content_type[]) New array.
8155         (static content_names[]) New array.
8156         (static rowtype_, varname_) New vars.
8157         (static is_per_factor[]) New array.
8158         (static split_values) Moved declaration.
8159         (static n_continuous, first_continuous) New var.
8160         (cmd_matrix_data) Don't init split_values.  Assign ROWTYPE_ to
8161         rowtype_.  Simplify SPLIT code.  Init is_per_factor[].  Assign
8162         VARNAME_ to varname_.  Initialize first_continuous, n_continuous.
8163         Check for continuous variables.
8164         [DEBUGGING] (debug_print) Remove content_names[].
8165         (mdump_token) New macro.
8166         (mget_token_dump) New function.
8167         (mdump_token) New function.
8168         (context) New function.
8169         (mget_token) Fix messages.
8170         (static var data, split_values, factor_values) New vars.
8171         (read_matrices) Manage split_values, factor_values.
8172         (read_data_lines) New function.
8173         (read_matrices_without_rowtype) Implemented.
8174         (read_splits) Message fixes.  Uses `just_read'.
8175         (read_factors) New function.
8176         (output_data) New function.
8177         (matrix_data_source_destroy_source) Close the file handle.
8178         (glob var matrix_source) Change name from "DATA LIST" to "MATRIX
8179         DATA".
8180
8181         * str.c: (strpadcmp) Removed.
8182
8183         * vfm.c: (dump_splits) Initialize i; fix test for end of splits.
8184
8185 Sun Jan 18 00:30:59 1998  Ben Pfaff  <blp@gnu.org>
8186
8187         * Lots of source files: Add cast to unsigned character to calls to
8188         tolower() and toupper().
8189
8190         * aggregate.c: Set default_dict.splits to NULL.
8191
8192         * command.c: (static variable tab[]) Add MATRIX DATA.
8193
8194         * data-in.c: Add debugging defines.  Formatting fixes.
8195
8196         * expr-opt.c: Formatting fixes.
8197
8198         * lexer.c: (syntax_error) Message fixes.
8199
8200         * matrix-data.c: New enum series.
8201         (static vars fmt, section, diag, explicit_rowtype, signle_split,
8202         split_values, n_factors, factors, cells, pop_n, contents,
8203         n_contents) New vars.
8204         (cmd_matrix_data) Finished implementation.
8205         (compare_variables_by_mxd_vartype) New function.
8206         [DEBUGGING] (debug_print) New function.
8207         (static vars mtoken, mtokstr, mtoklen, mtokval) New vars.
8208         (read_matrices) New function.
8209         (read_matrices_without_rowtype) New function.
8210         (read_matrices_with_rowtype) New function.
8211         (read_splits) New function.
8212         (mget_token) New function.
8213         (force_eol) New function.
8214         [0] (test_tokenizer) New function.
8215         (matrix_data_source_destroy_source) New function.
8216         (glob var matrix_data_source) New var.
8217
8218         * misc.h: Include ieeefp.h if present.
8219
8220         * split-file.h: (cmd_split_file) Changes corresponding to struct
8221         dictionary changes.
8222
8223         * str.h: Fix memmem prototype.
8224
8225         * temporary.c: (save_dictionary, restore_dictionary,
8226         free_dictionary) Changes corresponding to struct dictionary
8227         changes.
8228
8229         * var.h: (MXD_* enums) New enum series.
8230         (struct matrix_data_proc) New struct.
8231         (struct split) Removed.
8232         (struct dictionary) Changed `splits' member from `split *' to
8233         `variable **'.
8234         (macro force_create_variable) New macro.  Replaced lots of
8235         create_variable()/assert() calls with calls to this macro.
8236
8237         * vars-atr.c: (discard_variables) Changed assertion.
8238         [GLOBAL_DEBUGGING] (force_create_variable) New function
8239         called by the macro of the same name.
8240         (clear_variable) Changes to delete splits from the dictionary
8241         corresponding to struct dictionary changes.
8242
8243         * vars-prs.c: (parse_variables) [GLOBAL_DEBUGGING] Check for
8244         corrupted variable `index' values in the dictionary passed in
8245         every time this function is called.
8246
8247         * vfm.c: (dump_splits, SPLIT_FILE_procfunc) Changes corresponding
8248         to struct dictionary changes.
8249
8250 Tue Jan 13 23:45:02 1998  Ben Pfaff  <blp@gnu.org>
8251
8252         * Makefile.am: (pspp_SOURCES) Add matrix-data.c.
8253
8254         * command.c: New includes.
8255         (static array cmd_table[]) Add ERASE, HOST, NEW FILE.
8256         (cmd_erase) New function.
8257         [unix] (shell) New function.
8258         (run_command) New function.
8259         (cmd_host) New function.
8260         (cmd_new_file) New function.
8261
8262         * expr-prs.c: (parse_primary) Message fix.
8263
8264         * inpt-pgm.c: Formatting fix.
8265         (cmd_reread) Implement the FILE subcommand.
8266
8267         * matrix-data.c: New file.
8268
8269         * q2c.c: (dump_header) Change output commenting style.
8270
8271         * weight.c: Comment fix.
8272
8273 Tue Jan 13 00:53:39 1998  Ben Pfaff  <blp@gnu.org>
8274
8275         * aggregate.c: (buf64_10x) Renamed buf64_1xx, all references
8276         changed.
8277         (buf_10x) Renamed buf_1xx, all references changed.
8278         (cmd_aggregate) Implemented cases 010, 011, 110, and 111 (all
8279         cases now implemented).
8280         (create_sysfile) New function.
8281         (agr_11x_func) New function.
8282
8283         * data-in.c: (parse_numeric) Work properly if there's an
8284         explicitly coded decimal point in the data and decimal places are
8285         specified on DATA LIST.  Bug reported by Dr Eberhard W Lisse
8286         <el@linux.lisse.na>.
8287
8288         * get.c: (cmd_get, cmd_save_internal) Allow extraneous slash
8289         before file specification on GET, SAVE, XSAVE.  Bug reported by Dr
8290         Eberhard W Lisse <el@linux.lisse.na>.
8291
8292         * q2c.c: [!HAVE_STRERROR] Include misc/strerror.c, not
8293         strerror.c.  Bug reported by Alexandre Oliva
8294         <oliva@dcc.unicamp.br>.
8295
8296         * sort.c: Include sort.h.  Comment fixes.  A few esthetic fixes.
8297         (static var separate_case_tab) New var.
8298         (cmd_sort_cases) Cancel temporary transformations here.  Free
8299         v_sort before return.
8300         (sort_cases) Run an EXECUTE procedure if SEPARATE is nonzero and
8301         we're reading from a sort stream.  Don't cancel temporary
8302         transformations.  Offload internal sorting to do_internal_sort().
8303         (do_internal_sort) New function.  Handles internal sorting even
8304         when SEPARATE is nonzero.  Doesn't free v_sort.
8305         (do_external_sort) Take new arg SEPARATE.  Only destroy `x' if
8306         it's non-NULL.
8307         (write_initial_runs) Take new arg SEPARATE.  Only destroy the old
8308         sink if SEPARATE is zero.
8309         (read_output_cases) Renamed read_sort_output(), all references
8310         changed.  Now uses separate_case_tab when it exists.
8311         (write_separate) New function.
8312
8313         * vfm.c: (page_to_disk) Destroy memory_source_cases, not
8314         memory_sink_cases.  Don't redundantly call
8315         vfm_source->destroy_source().
8316         (memory_stream_mode) After switching over, set memory_sink_cases
8317         to NULL.
8318
8319 Sat Jan 10 23:35:51 1998  Ben Pfaff  <blp@gnu.org>
8320
8321         * aggregate.c: (struct agr_var) Expand dbl[] array from 2 to 3
8322         elements.
8323         (static var prev_case) New, moved out of aggregate_single_case()
8324         local scope.
8325         (static var buf64_10x, buf_10x) New.
8326         (cmd_aggregate) Initialize prev_case.  Comment fixes.  Implement
8327         the 000, 001, 100, and 101 cases.  Free prev_case.
8328         (parse_aggregate_functions) Disallow scratch variables.
8329         (free_aggregate_functions) Only free agr_dict if non-null.  Use
8330         iter->function to determine numeric/string type, not
8331         iter->src->type.
8332         (aggregate_single_case) Don't manage prev_case.  Initialize
8333         aggregate info after dumping it.
8334         (accumulate_aggregate_info) Fix sum, weighted sum, mean, weighted
8335         mean, stddev, weighted stddev definitions.
8336         (dump_aggregate_info) Implemented.
8337         (initialize_aggregate_info) Renamed from
8338         initialize_aggregate_functions().  Initializes dbl[2].
8339         (agr_00x_trns_proc, agr_00x_end_func, write_case_to_sfm,
8340         agr_10x_trns_proc, agr_10x_trns_free, agr_10x_end_func) New.
8341
8342         * cases.c: (alloc_val) Removed.
8343
8344         * get.c: (cmd_save_internal) Initialize new `dict' member.
8345
8346         * sfm-write.c: (sfm_write_dictionary, write_header,
8347         write_variable, write_value_labels, write_documents) Reorganize,
8348         simplify for new parameter structure.
8349         (write_variable) Only one variable * argument now.
8350
8351         * sfm.h: (struct sfm_write_info) Removed `pri', `sec', and
8352         replaced by new `dict' member.
8353
8354         * temporary.c: (new_dictionary) Initialize n_documents.
8355
8356         * vars-atr.c: (dup_variable) Allocate `value's from dict into
8357         v->fv manually.
8358         (init_variable, replace_variable) Eliminate usage of alloc_val().
8359
8360         * vars-prs.c: (parse_DATA_LIST_vars) Accept PV_NO_SCRATCH option.
8361
8362         * vfm.c: (arrange_compaction) Allow `temporary' value of 2 to
8363         signal that AGGREGATE is to be used for forming final cases.
8364         (close_active_file) Call end_func before stopping lagging.  Cancel
8365         temporary after finishing compaction.
8366         (write_case) Comment fixes.  Cleaned up.
8367         (compact_case) Let AGGREGATE handle compaction when `temporary' is
8368         2.
8369
8370 Sat Jan 10 02:10:47 1998  Ben Pfaff  <blp@gnu.org>
8371
8372         * Makefile.am: (BUILT_SOURCES) Add means.c.
8373         (pspp_SOURCES) Add means.c.
8374         (EXTRA_DIST) Add means.q.
8375
8376         * command.c: (array cmd_table[]) Add MEANS.
8377
8378         * common.h: Esthetic fixes.  Comment fixes.  Test for
8379         MAX_SHORT_STRING greater than 8.
8380         (macros LOWEST, HIGHEST) New.
8381
8382         * data-in.c, data-list.c, recode.c: Comment fixes.
8383
8384         * means.q: New file, base version.
8385
8386         * mis-val.c: (parse_num_or_range, parse_numeric) Replace -DBL_MAX
8387         with LOWEST, DBL_MAX with HIGHEST.
8388
8389         * q2c.c: (dump_vars) Add an enum to array types giving the number
8390         of values for the enum.
8391
8392         * sfm-read.c: (sfm_read_dictionary, read_machine_flt64_info)
8393         Replace second_lowest_value with second_lowest_flt64.
8394
8395         * sfm-write.c: (write_variable, write_rec_7_34) Replace
8396         second_lowest_value with second_lowest_flt64.
8397
8398         * t-test.q: Comment fix.
8399
8400         * temporary.c: (restore_dictionary) Esthetic fix.
8401
8402         * tokens.h: (force_match_id, force_match, force_string, force_int,
8403         force_num, force_id) Replace msg() with syntax_error().
8404
8405         * var.h: (struct means_proc) New.
8406         (struct variable) Add mns member to `p' union.
8407
8408         * vars-prs.c: (parse_variable, parse_dict_variable,
8409         parse_variables, parse_DATA_LIST_vars) Replace msg() with
8410         syntax_error().
8411
8412 Thu Jan  8 22:28:41 1998  Ben Pfaff  <blp@gnu.org>
8413
8414         * Makefile.am: (pspp_SOURCES) Add tab.h.
8415
8416         * Most source files: Added a cast to unsigned char in usages of
8417         the ctype is*() functions.  Replaced `end of command expected'
8418         calls to msg() with calls to syntax_error().
8419
8420         * frequencies.q: (dump_condensed) Fix tab_dim() column reference.
8421
8422         * lexer.c: (hex_val) Removed (was dead code).
8423         (idmatch) Parenthesize function name to avoid macro expansion.
8424
8425         * postscript.c: Comment fixes.
8426         (ps_preopen_driver) Change default font size to 10pt.
8427
8428         * sfm-read.c: (read_variables) Byteswap sv.print, sv.write as
8429         int32s.
8430         (parse_format_spec) Change system-file format spec argument type
8431         to int32.  Parse the format spec with bitwise operators.
8432
8433         * sfmP.h: (struct sysfile_format) Removed.
8434         (struct sysfile_variable) Changed print, write members from
8435         sysfile_format to int32.
8436
8437         * tokens.h: Esthetic fixes.
8438         [__GNUC__] (macro id_match) New macro to hopefully speed up
8439         identifier matching.
8440         (macros match_id, match_tok, match_int) Implemented in
8441         compiler-independent manner; no longer GNU C only.
8442
8443         * vfm.h: Include time.h.
8444
8445 Mon Jan  5 11:06:15 1998  Ben Pfaff  <blp@gnu.org>
8446
8447         * data-list.c: (dump_fixed_table) Change tab_dim().
8448
8449         * dump-sysfile.c: (open_sysfile) Fix mmap() call.
8450
8451         * error.c: Include command.h.
8452
8453         * frequencies.g: Formatting fixes.
8454
8455         * frequencies.q: Add tab_dim() calls.  Make the total cell a
8456         joined cell.
8457
8458         * glob.c: Include command.h.
8459
8460         * sfm-read.c: (struct sfm_fhuser_ext) New members sysmis, highest,
8461         lowest.
8462         (sfm_read_dictionary) Initialize sysmis, highest, lowest.
8463         (sfm_read_machine_flt64_info) Update sysmis, highest, lowest.
8464         (read_variables) Byteswap sv.type; byteswap sv.print, sv.write as
8465         the other elements (is this right?).
8466         (read_variables) Use lowest, highest members.
8467         (parse_format_spec) New arg `vv' for more stringent checking.
8468         (dump_dictionary) Byteswaps nonexplicit data.
8469         (sfm_read_case) Byteswap numeric data.
8470
8471         * som.c: Initialize table_num to 1.
8472         (render_segments) Remember to increment y_index after each table
8473         segment.
8474
8475         * sysfile-info.c: (cmd_sysfile_info) Change tab_dim().  Don't call
8476         avl_count() on a NULL tree.  No title for the second table.
8477         (cmd_display) Handle DISPLAY VECTORS by calling display_vectors().
8478         Handle AS_SCRATCH as AS_NAMES.  Warn if no variables.  Re-enable;
8479         fix call to display_variables().
8480         (display_variables) Default to 4 columns, not 3.  Set up headers.
8481         Column title is Variable, not Name.  Fix index column.
8482         Add joint text.  Add tab_dim().  Handle value labels properly.
8483         Handle DISPLAY LABELS properly.  Draw boxes correctly.
8484         (describe_variable) Value labels don't need titles.  Don't clear
8485         nonexistent index column.
8486         (compare_vectors_by_name) New function.
8487         (display_vectors) New function.
8488
8489         * tab.c: (tab_height) Add assertion.
8490         (tab_null) Add debug code.
8491         (evaluate_dimensions) Add debug code.
8492
8493         * var.h: (struct variable) get_proc data is sometimes used
8494         simultaneously with other per-procedure info, therefore it was
8495         removed from the union.  All references changed.        
8496
8497 Sun Jan  4 18:13:33 1998  Ben Pfaff  <blp@gnu.org>
8498
8499         * ascii.c: (ascii_close_page) Put title on second line of headers
8500         if there is no subtitle.
8501
8502         * command.c: (glob var cur_proc) Move definition here, from
8503         common.c.
8504         (cmd_remark) Emit blank line before remarks.
8505
8506         * command.h: (glob var cur_proc) Move declaration here, from
8507         common.h.
8508
8509         * data-list.c: (dump_fixed_table) Fix messages.
8510         (dump_free_table) Call tab_nat_dim().
8511
8512         * descript.q: (dump_z_table) Modify tab_dim() call.
8513
8514         * frequencies.q: (dump_condensed, dump_statistics) Add tab_dim()
8515         call.
8516         (dump_statistics) Don't output header.
8517
8518         * groff-font.c: Minor format fix.
8519
8520         * html.c: Comment fix.
8521
8522         * list.q: (write_varname) Indent after advancing page.
8523
8524         * output.h: Minor reordering.
8525
8526         * postscript.c: Comment fixes.  Many places, '\n' was replaced by
8527         a reference to eol[].
8528         (struct ps_driver_ext) New member eol[].
8529         (ps_preopen_driver) Initialize eol[].
8530         (ps_postopen_driver) Fix sense of text for text_opt, line_opt
8531         defaults.  Handle headers.  Fix test for minimum page length.
8532         (static var option_tab[]) Add `line-ends'.
8533         (ps_option) Handle line-ends to change eol[].
8534         (postopen) Scale prop_em_width and fixed_width properly.  Set the
8535         prologue title to outp_title if applicable.  Replace the prologue
8536         line ends with eol[].  Call draw_headers() if headers are enabled.
8537         (text_width) New function.
8538         (out_text_plain) New function.
8539         (draw_headers) New function.
8540
8541         * print.c: (dump_table) Call tab_nat_dim().
8542
8543         * som.c: (som_blank_line) Only advance a line if not at the top of
8544         a page.
8545         (som_submit) Move several informational table calls here.
8546         Increment subtable_num if SOMF_NO_TITLE not set.
8547         (output_table) Advance a line if SOMF_NO_SPACING not set.
8548         (render_columns, render_segments, render_simple) Handle spacing
8549         between tables.  Handle table titles.  Remove debug output.
8550
8551         * som.h: (SOMF_*) New enum series.
8552         (struct som_table_class) New member `flags'.
8553
8554         * sysfile-info.c: (cmd_sysfile_info) Calls tab_nat_dim().  No
8555         headers or spacing.
8556         (display_variables) Calls tab_nat_dim().
8557         (describe_variable) Remove restriction on number of value labels.
8558         Make value labels separated by thin lines.
8559
8560         * tab.c: (tab_create) Default `flags' to none.
8561         (tab_float) New arg `w'.  All references changed.
8562         (tab_nat_dim) New function.
8563         (tab_output_text) No title or spacing.
8564         (tab_flags) New function.
8565         (tabi_flags) New function.
8566         (tabi_title) New function.
8567         (strip_height) Removed.
8568         (tabi_render) Skip title when necessary.
8569         (static var tab_tab_class) Add tabi_flags, tabi_title.
8570         (evaluate_dimensions) Disable display of column, row size.
8571         (sum_columns) Add title height to top header.
8572         (render_strip) Moved within file.
8573
8574         * tab.h: (struct tab_table) New member `flags'.
8575
8576         * vfm.c: (dump_splits) Calls tab_nat_dim().  No title.
8577
8578 Sat Jan  3 16:55:44 1998  Ben Pfaff  <blp@gnu.org>
8579
8580         * Most source files: Add `const' attribute in all appropriate
8581         places.
8582         
8583         * sysfile-info.c: (cmd_sysfile_info) Add tab_dim() call, add a
8584         column to the variables table for use by describe_variable().
8585         (cmd_display) Disable for the present.
8586         (display_documents) Don't wrap documents.
8587         (display_variables) Table has four columns now.
8588         (describe_variable) Table has four columns now.  Don't use a
8589         subtable, use joined cells instead.
8590
8591         * tab.c: (tab_create) Don't set `join'.
8592         (tab_realloc) ct array is not made up of a_string's.
8593         Reallocate trh, hrh, h arrays, initialize trh array.  Initialize
8594         cell contents on GLOBAL_DEBUGGING, not DEBUGGING.
8595         (text_format) New function.
8596         (tab_title) Rewritten, uses text_format().
8597         (tab_text) Rewritten, uses text_format().
8598         (tab_joint_text) New function.
8599         (tab_join) Removed.
8600         (static var hit) New variable.
8601         (render_strip) New args r1, r2.  Implement joined cells that fit
8602         on a single page.
8603         (tabi_render) Increment hit.  Pass new args to render_strip().
8604         (evaluate_dimensions) [GLOBAL_DEBUGGING] Check for uninitialized
8605         cells.  For t_naw and t_nah, ignore joined cells and null cells in
8606         calculations.
8607         
8608         * tab.h: (struct tab_join_rect) Removed.
8609         (struct tab_table) Removed `join'.
8610         (TAB_JOIN_MAIN) Removed.
8611         (struct tab_joined_cell) New struct.
8612         (TAT_NOWRAP) New enum.
8613
8614 Fri Jan  2 01:39:58 1998  Ben Pfaff  <blp@gnu.org>
8615
8616         * ascii.c: (ascii_postopen) Replace ASCII_* macros with their
8617         expansions.
8618         (ascii_postopen_driver) Fix initialization of *_spacing so that
8619         the TAL_0 bit doesn't count.
8620
8621         * data-list.c: (dump_fixed_table) Use natural width for Format
8622         column.
8623
8624         * glob.c: (rerange) Removed.
8625         (get_date) Formatting fixes.  Internationalization fix.
8626
8627         * html.c: (html_postopen_driver) Replace HTML_DEFAULT_OUTPUT_FILE
8628         with "pspp.html".
8629
8630         * postscript.c: (ps_postopen_driver) Replace
8631         PS_DEFAULT_OUTPUT_FILE with "pspp.ps".
8632
8633         * som.c: (som_submit) Don't eject page before every table.
8634         (output_table) Fix order of arguments on call to area().
8635         (render_columns) Fix calculation of max_len.
8636         
8637         * tab.c: (tabi_cumulate) Minor change to increase elegance.
8638         (render_strip) New function.
8639         (strip_height) New function.
8640         (tabi_render) Rewrite as calls to render_strip().
8641
8642         * tab.h: (TAT_* enums) Removed TAT_RICH, all references removed.
8643         Renumbered TAT_PRINTF, TAT_TITLE, TAT_FIX to correspond better
8644         with the TAB_* and OUTP_T_* constants.
8645         
8646 Thu Jan  1 11:53:52 1998  Ben Pfaff  <blp@gnu.org>
8647
8648         * Makefile.am: Formatting fixes.
8649
8650         * ascii.c: (ascii_postopen_driver) Initialize *_line_spacing[],
8651         *_line_width[].
8652
8653         * data-list.c: (dump_fixed_table) Add tab_dim() call.
8654
8655         * descript.q: (dump_z_table, display) Add tab_dim() calls.
8656
8657         * dump-sysfile.c: (glob var length) Make type off_t.
8658         (usage) Fix arguments.
8659         (main) Return 0.
8660
8661         * output.h: (OUTP_T_*) Change constants' value to match tab.h.
8662         Now right-justification is the default so many references had to
8663         change.
8664         (struct outp_class) Removed line_width, all references changed.
8665         (OUTP_DEV_*) Add OUTP_DEV_DISABLED.
8666         (struct outp_driver) Add elements horiz_line_width,
8667         vert_line_width, horiz_line_spacing, vert_line_spacing.  Remove
8668         som element.
8669
8670         * postscript.c: (outp_encodings) Formatting fixes.  Fix garbage
8671         collection.
8672         (postopen) Initialize all the informational members of
8673         outp_driver.
8674
8675         * som.c: (som_blank_line) New function, renamed from blank_line(),
8676         all references changed.
8677         (som_submit) Disables drivers whose pages can't be opened.
8678         (render_columns, render_simple, render_segments) Add debug output.
8679         (render_columns) Fix loop range.
8680         (render_simple) Don't try to render the headers, they're taken
8681         care of automatically.  Advance cp_y past the table when done.
8682         (render_segments) Fix loop ranges.
8683
8684         * tab.c: Initialize new members of tab_table.
8685         (tab_vline) Handle trv[]; don't set style for spacing-only lines.
8686         (tab_hline) Handle trh[]; don't set style for spacing-only lines.
8687         (tab_box) Handle trh[], trv[]; don't set style for spacing-only
8688         lines.
8689         (set_expr) Removed.
8690         (tab_dim) New function.
8691         (tab_col_width) Removed.
8692         (tab_row_height) Removed.
8693         (tab_output_text) Call tab_dim().
8694         (tabi_driver) Call evaluate_dimensions(), sum_columns().
8695         (tabi_area) Implemented.
8696         (tabi_cumulate) Implemented.
8697         (tabi_render) Partially implemented, but broken.
8698         (var tab_table_class) Made static.
8699         (evaluate_dimensions) New function.
8700         (sum_columns) New function.
8701
8702         * tab.h: (enum t_*) Now start at t_end.  New: t_ptw, t_nr, t_nc,
8703         t_nah, t_naw, t_neg, t_xch, t_dup, t_lbl, t_jnz, t_sac, t_sar,
8704         t_scr, t_srr, t_sentinel.  Removed: t_nat.
8705         (struct tab_table) New: wl, wr, ht, hb, trh, hrh, trv, wrv, dim,
8706         max_stack_height, w, h.  Removed: ce, re.
8707         (macro blank_line) Removed.
8708         (glob var zero_length) Removed.
8709
8710 Fri Dec 26 15:44:31 1997  Ben Pfaff  <blp@gnu.org>
8711
8712         * Most source files: include some of the new include files broken
8713         out of var.h.
8714         
8715         * Makefile.am: (pspp_SOURCES) Add all the new source files to the
8716         list.
8717
8718         * aggregate.c: (glob var outfile) Make static.
8719
8720         * command.c: (glob var pgm_state) Move here.
8721
8722         * common.c: (glob vars endian, second_lowest_value, pgmname,
8723         finished, curdate, cur_proc, start_interactive, history_file) Move
8724         here.
8725
8726         * descript.q: (structs dsc_z_score, descriptives_trns) Move here.
8727
8728         * file-handle.q: (glob vars files, inline_file) Move here.
8729
8730         * glob.c: Lost lots of glob vars, detailed in individual file
8731         entries.
8732         (init_glob) set_printer, set_screen were obsolete, deleted.
8733         set_cprompt has fewer spaces because pspp has fewer letters than
8734         fiasco.
8735
8736         * inpt-pgm.c: (glob vars inp_init, inp_init_size) Move here.
8737         (inp_nval) Made static.
8738
8739         * lexer.c: (glob vars token, tokval, tokstr, tokstr_size,
8740         tokstr_len, toklongstr, tokint) Move here.
8741
8742         * misc.c: Lost several vars and functions.
8743
8744         * set.q: (all the set_* variables) Move here.
8745
8746         * str.c: (strmaxcpy, strbarepadcpy, strbarepadlencpy, strpadcpy,
8747         blpstrset, strpadcmp, memrev, memrmem, cmp_str) Move here from
8748         misc.c.
8749
8750         * tab.c: (set_expr, tab_col_width, tab_row_height) New functions.
8751
8752         * tab.h: (enum series t_*) New enums.
8753         (struct tab_table) Use arena struct tag.  New members ce, re.
8754
8755         * tokens.h: Comment fixes.
8756
8757         * var.h: Move lots of enums and variables and functions and
8758         structures to other files.  Use and declare a lot more union and
8759         struct tags.  Comment fixes.  
8760
8761         * vector.c: (glob vars vec, nvec) Move here.
8762
8763         * vfm.c: (glob vars reinit_sysmis, reinit_blanks, init_zero,
8764         init_blanks, last_vfm_invocation) Move here.
8765
8766         * cases.h: New file.
8767         (struct long_vec) Move here.
8768         (vec_init, vec_clear, vec_insert, vec_delete, devector, envector)
8769         Move here.
8770
8771         * command.h: New file.
8772         (STATE_* enums) Move here.
8773         (glob var pgm_state) Move here.
8774
8775         * format.c: New file.
8776         (glob var formats) Move here.
8777         (parse_format_specifier_name, fmt_to_string,
8778         check_input_specifier, check_output_specifier,
8779         check_string_specifier, convert_fmt_ItoO, parse_format_specifier)
8780         Move here.
8781
8782         * format.h: New file.  Move functions now in format.c here.
8783         (FMT_* enums) Move here.
8784         (struct fmt_desc) Move here.
8785         (FCAT_* enums) Move here.
8786         (struct fmt_spec) Move here.
8787         (glob vars formats, fmt_parse_ignore_error) Move here.
8788
8789         * inpt-pgm.h: New file.
8790         (INP_* enums) Move here, make #defines into enums.
8791         (glob vars inp_init, inp_init_size) Move here.
8792
8793         * sort.h: New file.
8794         (glob vars v_sort, nv_sort) Move here.
8795         (sort_cases, read_sort_output) Move here.
8796
8797         * vector.h: New file.
8798         (struct vector) Move here, add struct tag.
8799         (glob vars vec, nvec) Move here.
8800         (find_vector) Move here.
8801
8802         * New file.
8803         (glob vars last_vfm_invocation, temp_case, reinit_sysmis,
8804         reinit_blanks, init_zero, init_blanks) Move here.
8805         (struct case_stream) Move here.
8806         (glob vars vfm_source, vfm_sink, vfm_memory_stream,
8807         vfm_disk_stream, sort_stream, data_list_source,
8808         input_program_source, file_type_source, get_source, n_lag) Move
8809         here.
8810         (procedure, write_case, lagged_case, compact_case, page_to_disk)
8811         Move here.
8812                 
8813 Wed Dec 24 22:40:42 1997  Ben Pfaff  <blp@gnu.org>
8814
8815         * Makefile.am: (pspp_SOURCES) Added html.c, som.c, som.h.
8816         (LDADD) Add libdcdflib.
8817
8818         * ascii.c: Comment and formatting fixes.  Almost every external
8819         function had an assert added, checking driver_open and page_open.
8820         (ascii_init_driver) Broken into ascii_preopen_driver,
8821         ascii_postopen_driver, ascii_close_driver.  Manages driver_open.
8822         (ascii_open_page) Sets page_open.
8823         (ascii_close_page) Clears page_open.
8824
8825         * html.c: Comment and formatting fixes.  Almost every external
8826         function had an assert added, checking driver_open and page_open.
8827         (html_init_driver) Broken into html_preopen_driver,
8828         html_postopen_driver, html_close_driver.  Manages driver_open.
8829         (html_open_page) Sets page_open.
8830         (html_close_page) Clears page_open.
8831         (html_submit) Disabled.
8832
8833         * lexer.c: (parse_string) Remove debugging printf.
8834
8835         * list.q: (determine_layout) Open a page if one is not yet open.
8836
8837         * output.c: Comment fixes.
8838         (add_class) Set the class member of the new list element.
8839         (parse_options) Don't handle device type.
8840         (colon_tokenize) New function.
8841         (configure_driver) New four-field format with a field for device
8842         type.  Now initialize driver_open, page_open, next, and prev
8843         fields.  Use new colon_tokenize() function.  Don't do a memory
8844         copy to replace a driver, it doesn't work; instead delete the old
8845         driver and insert a new one.
8846         (destroy_driver) Don't call som_destroy_driver().  Close the page
8847         if it's open.  Find the class in the list of classes and decrement
8848         that reference count.  Remove the driver from the global driver
8849         list.
8850         (outp_iterate_enabled_drivers) Renamed outp_drivers().  All
8851         references changed.  Rewritten.  Don't return a driver that's not
8852         enabled.
8853         (outp_eject_page) All references to som_internal_eject_page()
8854         changed to use this.  Sets cp_x to 0 as well as cp_y.
8855
8856         * output.h: (OUTP_I_* enums) Removed.
8857         (struct som_submission_form) Removed.
8858         (struct outp_class) init_driver broken into preopen_driver,
8859         postopen_driver, and close_driver.  submit changed to take a
8860         som_table argument.
8861
8862         * postscript.c: Comment and formatting fixes.  Almost every
8863         external function had an assert added, checking driver_open and
8864         page_open.
8865         (ps_init_driver) Broken into ps_preopen_driver,
8866         ps_postopen_driver, ps_close_driver.  Manages driver_open.
8867         (ps_open_page) Sets page_open.
8868         (ps_close_page) Clears page_open.
8869
8870         * som.c: New file, base implementation.
8871         
8872         * som.h: (struct som_table) Add struct tag.
8873         (enum SOM_COL_ACROSS) Removed.
8874         (SOM_ROWS, SOM_COLUMNS) New enums.
8875         (struct som_table_class) Add member `cumulate'.  Remove `segment';
8876         change `render' arguments.
8877         (struct som_point, struct som_rect) Removed.
8878         (som_submit_table) Fixed typo, should have been som_submit.
8879
8880         * sysfile-info: (describe_variable) Don't try to insert a
8881         subtable; just destroy it for now.
8882
8883         * t-test.q: Include dcdflib/cdflib.h instead of cdflib.h.  Fix
8884         references to value labels.
8885
8886         * tab.c: (tab_destroy) New function.
8887         (tab_columns) Change argument.
8888         [0] (tab_submit) Remove dead code.
8889         (tab_title) Allocate string from the table's arena.
8890         (tab_output_text) Only free the buffer if we allocated it.
8891         (tab_submit) New function.
8892         (static vars t, d) New static vars.
8893         (tabi_table, tabi_driver, tabi_count, tabi_area, tabi_columns,
8894         tabi_headers, tabi_cumulate, tabi_render) New functions.
8895         (glob var tab_table_class) New global var.
8896
8897         * tab.h: (struct tab_join_rect) Don't use a som_rect; directly
8898         encapsulate the rectangle.  All references changed.
8899         
8900 Sun Dec 21 16:18:58 1997  Ben Pfaff  <blp@gnu.org>
8901
8902         * All header files updated to use struct tags in addition to
8903         typedefs for all structures.  Don't use word `struct' in struct
8904         tags.
8905         
8906         * Makefile.am: (pspp_SOURCES) Remove html.c.
8907         (INCLUDES) Replace the lib/* includes with a single lib/ include;
8908         all references updated.
8909
8910         * command.c: (parse_cmd) Remove call to som_check_workspace.
8911         (output_line) Update to new som.
8912
8913         * data-in.c: (parse_numeric) A single dot is not an error; it is
8914         the system-missing value.
8915
8916         * data-list.c: (dump_fixed_table, dump_free_table) Update to new
8917         som.
8918
8919         * data-out.c: Added `const' as appropriate to many prototypes.
8920         (convert_E, convert_F, convert_CCx) Take double argument instead
8921         of value * argument.
8922         (convert_format_to_string) Call changed functions appropriately.
8923         Instead of modifying the caller's value for FCAT_SHIFT_DECIMAL,
8924         make a local copy of the value.
8925
8926         * descript.q: Remove custom_variables() prototype now provided by
8927         q2c.  
8928         (custom_variables) Don't increment sbc_variables, the caller does
8929         this.
8930         (dump_z_table, display) Update to new som.
8931
8932         * error.c: (vmsg) Add const to prototype.  Remove code to handle
8933         `too many errors' condition.
8934         (check_error_count) New function.
8935         (msg) Add const to prototype.
8936
8937         * filename.c: (open_file) Rewrite for elegance.
8938
8939         * frequencies.q: Remove custom_*() prototypes now provided by q2c.
8940         (dump_full, dump_condensed, dump_statistics) Update for new som.
8941
8942         * list.q: Don't include somP.h.  Change all references to
8943         som_driver_ext to refer to the new members of som_driver.  Change
8944         som_internal_eject_page() references to outp_eject_page().
8945
8946         * main.c: (parse) Rewrite for elegance.  Add call to
8947         check_error_count().
8948
8949         * output.c: (add_class, outp_list_classes, outp_configure_driver)
8950         Rewrite or revise for new outp_driver_class_list structure.
8951         (outp_iterate_enabled_drivers) Fix comparison between disabled
8952         devices and current device type.
8953         (outp_eject_page) New function.
8954
8955         * output.h: Comment fixes.
8956         (struct outp_driver) New members driver_open, page_open, cp_x,
8957         cp_y, font_height, prop_em_width, fixed_width.  Deleted members
8958         ref_count, next.
8959         (struct outp_driver_class_list) New struct.
8960         (outp_class_list) Changed to type outp_driver_class_list; all
8961         references updated.
8962
8963         * print.c: (dump_table, print_trns_proc) Updated for new som.
8964
8965         * q2c.c: (dump_vars) Simplify array subcommand code.  Declare
8966         prototypes for custom subcommands.
8967         (dump_subcommand) Always include the `else'.
8968         (dump_parser) Fix comments in output code.
8969
8970         * set.q: Reordered functions.
8971
8972         * som-frnt.c, som-high.c, som-low.c, somP.h: Removed.
8973         
8974         * som.h: Rewritten from scratch.
8975
8976         * str.h: Remove dead code.
8977
8978         * tab.c, tab.h: New files, base implementation.
8979
8980         * sysfile-info.c: (cmd_sysfile_info, describe_variable) Update to
8981         new som.
8982
8983         * t-test.q: New code from John Williams
8984         <johnr.williams@stonebow.otago.ac.nz>.  Include math.h, cdflib.h.
8985         Many many new static vars and defines.
8986         (precalc, postcalc, g_postcalc, z_postcalc, t_pairs, t_groups,
8987         groups_calc, pairs_calc, z_dev_calc, z_calc) New functions.
8988         (struct value_list) New struct.
8989         (variance, covariance, pooled_variance, oneway, pearson_r, f_sig,
8990         t_crt, t_sig, print_t_groups) New functions.
8991         (cmd_t_test) Implemented.
8992
8993         * temporary.c: (cancel_temporary) Only free the temp_dict if it's
8994         non-NULL.
8995
8996         * vfm.c: (dump_splits) Update to new som.
8997
8998 Thu Dec  4 23:02:22 1997  Ben Pfaff  <blp@gnu.org>
8999
9000         * Makefile.am: (fiasco_SOURCES) Add html.c.
9001
9002         * aggregate.c: Base source.
9003
9004         * ascii.c: (postopen, preclose) Reformat.
9005
9006         * data-out.c, expr-evl.c: Comment fixes.
9007         
9008         * filename.c: (open_file) When opening a file for writing, use
9009         line buffering instead of full buffering for better interactive
9010         performance.  Suggested by Valerio Aimale
9011         <valerio@svpop.com.dist.unige.it>.  Also, recognize special file
9012         names `stdin', `stdout', `stderr'.
9013
9014         * groff-font.c: Comment fixes.
9015
9016         * html.c: New file; base version.
9017
9018         * list.q: (write_all_headers, clean_up, determine_layout,
9019         list_cases) Ignore `special' devices for now.  Needs to be fixed
9020         later.
9021
9022         * output.c: (outp_init) Add html driver to list; reverse list
9023         order.
9024
9025         * output.h: (struct outp_class_struct) New members `special',
9026         `submit'; comment fixes.  All references changed.
9027
9028         * postscript.c: (ps_init_driver) Make defaults for text_opt,
9029         line_opt depend on whether the OUTP_DEV_SCREEN bit is set on the
9030         device.
9031         (postopen) Comment fix.
9032         (preclose) Comment fixes, formatting fixes.  Change x->file.file
9033         references to more proper f->file.
9034
9035         * som-high.c: (som_submit_table) Special classes use their own
9036         renderers.
9037
9038         * som.h: Comment fixes.
9039
9040         * temporary.c: (new_dictionary) Don't try to xstrdup() a NULL
9041         string.
9042         
9043 Tue Dec  2 14:36:07 1997  Ben Pfaff  <blp@gnu.org>
9044
9045         * Makefile.am: (fiasco_SOURCES) Add aggregate.c back in.
9046
9047         * aggregate.c: Still working on this.
9048
9049         * command.c: (cmd_table[]) Add AGGREGATE back in.
9050         (split_words) Make '-' a legal word separator as well as ' '.
9051
9052         * main.c: Comment fixes.
9053
9054         * q2c.c: (dump_parser) Don't require the procedure's full name to
9055         be present, in the generated source.
9056
9057         * t-test.q: Change name to `t-test' from `t test'.  Let PAIRS be
9058         multiply specified and let it be default; let MISSING, CRITERIA,
9059         FORMAT be multiply specified.
9060         (cmd_t_test) Parse command name.  [DEBUGGING] Call debug_print().
9061         (custom_groups) Fix defaults.
9062         (custom_pairs) Check whether this is a PAIRS subcommand before
9063         attempting to parse.  Better garbage collection.  Proper storage
9064         allocation.
9065         [DEBUGGING] (debug_print) New function.
9066
9067         * temporary.c: Comment fixes.
9068         (copy_variable) Don't copy variable name and index.
9069         (save_dictionary) Copy variable name and index by hand.
9070
9071         * vars-atr.c: Comment fixes.
9072         (create_variable) New dictionary argument.  All references
9073         changed.
9074         (common_init_stuff) New dictionary argument.  All references
9075         changed.
9076         (init_variable) New dictionary argument.  All references changed.
9077         (dup_variable) New function.
9078
9079         * vars-prs.c: (parse_variables) If there are any errors, we always
9080         return 0.  Previously, it was possible for some types of errors to
9081         be ignored.
9082         
9083 Sat Nov 22 01:20:59 1997  Ben Pfaff  <blp@gnu.org>
9084
9085         * Makefile.am: (fiasco_SOURCES) For 0.1.5 release, remove
9086         aggregate.c.
9087
9088         * command.c: (cmd_table[]) Comment out AGGREGATE; add T TEST.
9089
9090         * list.q, t-test.q: Remove ALL option from VARLIST declaration in
9091         grammar rules.
9092
9093         * q2c.c: Comment fixes.
9094         (SBC_* enums) Remove SBC_VARLIST_ALL; all references removed.
9095         
9096         * t-test.q: (cmd_list) Rename cmd_t_test.
9097
9098         * temporary.c: (new_dictionary) Don't declare as static.
9099         
9100 Fri Nov 21 00:03:06 1997  Ben Pfaff  <blp@gnu.org>
9101
9102         * aggregate.c: Changes, still not finished.
9103
9104         * file-handle.q, frequencies.q, list.q, set.q: Comment fixes.
9105
9106         * q2c.c: Comment fixes.  Now its output is internationalized.
9107         (get_token) Fix parsing of escapes within literal strings.
9108         (main) Fix bad #line directives in output.
9109
9110         * t-test.q: Base implementation.
9111
9112         * temporary.c: (new_dictionary) New function.
9113         (restore_dictionary) [__CHECKER__] Change fill character to *
9114         (from @).
9115         
9116 Sun Nov 16 01:29:57 1997  Ben Pfaff  <blp@gnu.org>
9117
9118         * Makefile.am: (BUILT_SOURCES, fiasco_SOURCES) Add t-test.c
9119
9120         * aggregate.c: Changes, still not finished.
9121
9122         * descript.q, list.q: Comment fixes.
9123
9124         * q2c.c: Almost completely rewritten.
9125
9126         * t-test.q: New file, not complete.
9127
9128 Fri Nov 14 00:14:48 1997  Ben Pfaff  <blp@gnu.org>
9129
9130         * aggregate.c: Changes, still not finished.
9131
9132         * sort.c: (sort_cases) Call cancel_temporary() instead of doing it
9133         by hand.
9134
9135         * temporary.c: (cancel_temporary) New function.
9136
9137         * vars-atr.c: (discard_variables) Call cancel_temporary() instead
9138         of doing it by hand.
9139
9140         * vfm.c: (close_active_file) After restoring a TEMPORARY
9141         dictionary, set temp_dict to NULL.  Cancel TEMPORARY through
9142         cancel_temporary().
9143         (SPLIT_FILE_procfunc) Comment fix.
9144
9145 Tue Oct 28 16:08:45 1997  Ben Pfaff  <blp@gnu.org>
9146
9147         * Makefile.am: (fiasco_SOURCES) Add aggregate.c.
9148
9149         * aggregate.c: New file, not finished yet.
9150
9151         * command.c: (cmd_table) Add AGGREGATE.
9152
9153         * common.h: (pgm_state) Move declaration to var.h.
9154
9155         * lexer.c: (bin_value_func, oct_value_func, hex_value_func) i18n
9156         fixes.
9157         (parse_string) Message fix.
9158
9159         * recode.c: Comment fix.
9160
9161         * sfm-read.c: (read_variables) Code esthetic fixes.
9162         (write_header) Default date is `Jan', not `JAN'.
9163
9164         * sfmP.h: (bswap_int32) [!__linux__] Fix off-by-one errors.
9165
9166         * sort.c: (cmd_sort_cases) Farm the work out to new function
9167         parse_sort_variables().
9168         (parse_sort_variables) New function.
9169         (sort_cases) New function.  Cancels temporary transformations,
9170         which sorting didn't do previously.
9171         (cmd_sort_cases) Better garbage collection on error.  Uses
9172         do_external_sort().
9173         (write_initial_runs, merge_once) Improved code esthetics.
9174         (sort_stream_read) Reduced to one call to read_output_cases().
9175         (read_output_cases) New function.
9176
9177         * var-labs.c: (cmd_variable_labels) Re-enabled truncation of
9178         variable labels to 120 characters.
9179
9180         * var.h: Comment fixes.
9181         (glob var pgm_state) From common.h.
9182
9183         * vars-atr.c: (discard_variables) Set pgm_state to STATE_INIT.
9184
9185         * vars-prs.c: (parse_DATA_LIST_vars) Support PV_SINGLE in
9186         options.  Set *names to NULL on error.
9187
9188         * vfm.c: (memory_stream_init) Assert compaction_nval != 0.
9189
9190 Thu Oct  9 09:59:49 1997  Ben Pfaff  <blp@gnu.org>
9191
9192         * sfm-write.c, vfm.c: [HAVE_UNISTD] #include <unistd.h>, needed by
9193         SunOS4.  From Alexandre Oliva <oliva@dcc.unicamp.br>.
9194
9195 Wed Oct  8 18:55:24 1997  Ben Pfaff  <blp@gnu.org>
9196
9197         * vfm.c: (page_to_disk) Added missing local variables.
9198
9199 Tue Oct  7 20:23:17 1997  Ben Pfaff  <blp@gnu.org>
9200
9201         * get.c: Comment fix.
9202
9203         * sort.c: (cmd_sort_cases) Attempt to perform internal sort if the
9204         source is anything other than a disk stream, not just if it's in a
9205         memory stream.  Call page_to_disk() before external sort.
9206         (allocate_cases) Message fix.
9207
9208         * vfm.c: (prepare_for_writing) Warn user when paging workspace to
9209         disk.
9210         (page_to_disk) New function.
9211
9212 Sun Oct  5 15:56:14 1997  Ben Pfaff  <blp@gnu.org>
9213
9214         * Makefile.am: (INCLUDES) Include .. instead of $(top_srcdir).
9215
9216         * common.h: (macro strerror) Remove.  From Alexandre Oliva
9217         <oliva@dcc.unicamp.br>.
9218
9219         * get.c: (dict_delete_run) The number of variables to delete is
9220         not necessarily the number of variables that need to be shifted
9221         up.
9222         (trim_dictionary) Don't set *options to 0.  Fix bug that caused
9223         too many variables to be deleted.
9224
9225         * postscript.c: Comment fix.
9226
9227         * q2c.c: Include strerror.c.  From Alexandre Oliva
9228         <oliva@dcc.unicamp.br>.
9229
9230         * set.q: #undef ON and OFF.  From Alexandre Oliva
9231         <oliva@dcc.unicamp.br>.
9232
9233         * sfm-read.c: (sfm_read_dictionary) Don't set the file class too
9234         early, otherwise errors cause a bad free().
9235
9236         * str.h: (macro nvsprintf) s/FORMATS/FORMAT/ typo.  From Alexandre
9237         Oliva <oliva@dcc.unicamp.br>.
9238
9239         * temporary.c: (save_dictionary) Don't allocate memory if
9240         n_documents is 0.
9241
9242         * vfm.c: (memory_stream_write) Message fix.
9243
9244 Sat Oct  4 16:20:43 1997  Ben Pfaff  <blp@gnu.org>
9245
9246         * command.c: (static var cmd_table[]) Define REPEATING DATA
9247         command.
9248
9249         * common.h: Added support for broken systems that are missing
9250         EXIT_SUCCESS, EXIT_FAILURE, RAND_MAX, and/or strerror().
9251
9252         * Many source files: Replace syntax error messages via msg() with
9253         call to syntax_error().
9254
9255         * data-list.c: (dump_fixed_table) Add support for dumping table
9256         for REPEATING DATA as well as DATA LIST FIXED.
9257         (cmd_repeating_data) Allows and requires `/' between subcommands.
9258         Does proper thing with allowing rpd.starts_end to stay 0.  Allows
9259         CONTINUED specifications to be omitted.  Forces CONTINUED to be
9260         specified if ID is.  Calculates starts_end, cont_end from logical
9261         record length as reported by fhp.  Calls dump_fixed_table() if
9262         requested.  Fixed length of record copied by memcpy.
9263         (parse_num_or_var) Sets `num' to 0, not NOT_INT, for variables.
9264         Message fix.
9265         (realize_value) Returns sensible value for out-of-range variable
9266         values.
9267         (rpd_parse_record) New argument `ofs'.  Fixed confusion between
9268         length of occurrences and length of line.  Added warning for
9269         fields that exceed the line length.  Fixed infinite loop.
9270         (read_one_set_of_repetitions) Numerous minor changes for more
9271         complete SPSS compliance.  Message fixes.
9272
9273         * dfm.c: (dfm_close) If the file being closed is the inline file,
9274         read all the remaining data before closing it.
9275         (dfm_get_record) Don't close the file on lossage, as either it
9276         has been closed already or it doesn't belong to us.
9277
9278         * error.c: (puts_stdout) New function.
9279         (vmsg) Use puts_stdout instead of puts.
9280
9281         * file-handle.q: (fh_record_width) New function.
9282
9283         * inpt-pgm.c: (init_case) Fixed buffer overrun when inp_nval % 4
9284         == 0.
9285         (clear_case) Ditto.
9286         (input_program_source_read) Made an old kluge an approved method.
9287
9288         * lexer.c: (syntax_error) New function.
9289
9290         * misc.c: [BROKEN_RAND] (ansi_rand, ansi_srand; static var next)
9291         New.
9292
9293         * output.c: (oupt_get_paper_size) Message fix.
9294
9295         * q2c.c: Numerous fixes to formatting of generated code made to
9296         conform to GNU coding standards.  Uses syntax_error() in generated
9297         code.  Other miscellaneous generated message fixes.  Added support
9298         for broken systems that are missing EXIT_SUCCESS, EXIT_FAILURE,
9299         RAND_MAX, and/or strerror().
9300
9301 Sat Oct  4 02:09:56 1997  Ben Pfaff  <blp@gnu.org>
9302
9303         * data-in.c: Comment fixes.
9304
9305         * data-list.c: (struct repeating_data_trns) New member `id_spec'.
9306         (find_variable_input_spec) New function.
9307         (cmd_repeating_data) Initializes id_spec.
9308         (rpd_parse_record) Implemented.
9309         (read_one_set_of_repetitions) Returns -3 by default in order to
9310         kluge out some potential bugs.
9311
9312         * data-out.c: Comment fixes.
9313
9314         * file-type.c: (internal_cmd_record_type) Message fix.
9315
9316         * inpt-pgm.c: (input_program_source_read) Special temporary kluge
9317         for handling -3 return value.
9318
9319 Sat Sep 20 23:58:15 1997  Ben Pfaff  <blp@gnu.org>
9320
9321         * data-list.c: Comment fixes.
9322         (struct dls_var_spec) Reordered members.
9323         (read_from_data_list_fixed) Restructured.
9324         (struct repeating_data_trns) Reordered members.  Renamed `starts'
9325         as `starts_beg', `ends' as `starts_end'.
9326         (cmd_repeating_data) Calculates length of repeated data if
9327         necessary and possible.
9328         (parse_num_or_var) Don't allow string variables.
9329         (realize_value) New function.
9330         (rpd_msg) New function.
9331         (rpd_parse_record) New function.  Currently stubbed out.
9332         (read_one_set_of_repetitions) Implemented.
9333
9334         * inpt-pgm.c: (input_program_source_read) Comment fix.
9335
9336 Thu Sep 18 21:34:57 1997  Ben Pfaff  <blp@gnu.org>
9337
9338         * command.c: (cmd_end_repeat_p) Removed.
9339         (init_cmd_parser) Doesn't set cmd_end_repeat_p.
9340         (parse_cmd_name) Removed.
9341
9342         * data-list.c: Comment fixes.
9343         (data_list_pgm) Removed `eof' member.
9344         (static var first) New var.
9345         (cmd_data_list) Sets `first'.  Ensures that DATA LIST uses the
9346         FILE TYPE file inside FILE TYPE structures.
9347         (append_var_spec) Appends to *first, not dls.spec.
9348         (parse_fixed) Message fixes.
9349         (struct rpd_num_or_var) New.
9350         (struct repeating_data_trns) New.
9351         (static var rpd) New.
9352         (cmd_repeating_data) New function.
9353         (parse_num_or_var) New function.
9354         (parse_repeating_data) New function.
9355         (read_one_set_of_repetitions) New function.
9356
9357         * file-type.c: (cmd_file_type) Message fixes.  Always
9358         default_handle to FILE TYPE file handle.
9359         (internal_cmd_record_type) Message fixes.
9360
9361 Wed Aug 20 14:22:03 1997  Ben Pfaff  <blp@gnu.org>
9362
9363         * repeat.c: Comment fix.  Disable debugging.
9364
9365         * temporary.c: (restore_dictionary) Sets splits to NULL and
9366         n_splits to 0 before destroying the variables because now doing
9367         this tries to remove split variables.
9368
9369         * vars-atr.c: (discard_variables) Asserts that n_splits is 0 after
9370         destroying the dictionary.
9371         (clear_variable) Removes a variable from splits after destroying
9372         it.
9373
9374 Mon Aug 18 18:06:55 1997  Ben Pfaff  <blp@gnu.org>
9375
9376         * cmdline.c: (set_compat) Removed.
9377         (pick_compat) Removed.
9378         (parse_command_line) Removed -c option.
9379         (pre_syntax_message) Removed -c option.
9380         (usage) Remove compatibility code.
9381
9382         * common.h: (macros VER_PC, VER_WND, VER_X) Removed.
9383         (glob var compat) Removed.
9384
9385         * compute.c: (type_check) Fixed messages about type mismatches.
9386
9387         * data-list.c: (cmd_data_list) Removed compatibility code.
9388         (fixed_parse_compatible) Calls convert_negative_to_dash().
9389         Fixed bug where it only set the variable in fx.spec if it created
9390         the variable itself.
9391         (dump_fmt_list) Spelling fix.
9392         (cut_field) Removed compatibility code.
9393
9394         * dfm.c: (cmd_begin_data) Don't require a command terminator on
9395         BEGIN DATA command.
9396
9397         * expr-evl.c: (evaluate_expression) Implement LAG.
9398
9399         * expr-prs.c: (parse_add) Calls convert_negative_to_dash().
9400         (parse_neg) Calls convert_negative_to_dash().
9401         (LAG_func) Increases n_lag to the lag requested.  Fixed assignment
9402         bug.
9403
9404         * expr.h: (struct expression_struct) Removed member max_lag.
9405
9406         * file-type.c: (parse_col_spec) Calls convert_negative_to_dash().
9407         (internal_cmd_record_type) Removed special handling to produce
9408         negative numbers from dash tokens.
9409
9410         * getline.c: (static var DO_REPEAT_level) New var.
9411         (getl_add_DO_REPEAT_file) Increments DO_REPEAT_level.
9412         (handle_line_buffer) Copies the line into getl_buf; doesn't call
9413         copy_with_DO_REPEAT_substitutions().
9414         (getl_read_line) Maintains value of getl_mode.  Calls
9415         perform_DO_REPEAT_substitutions() whenever DO_REPEAT_level is
9416         positive.
9417         (getl_close_file) Decrements DO_REPEAT_level when appropriate.
9418
9419         * getline.h: (getl_mode) New glob var.
9420
9421         * glob.c: Comment fixes.
9422         (init_glob) Restructured.  Sets set_seed.
9423         (init_compat_dependent) Removed.  All references removed.
9424         (get_date) Format changed from MM/DD/YY to DD MMM YYYY.
9425         (__htonl, __htons) Removed.  (What were these for?)
9426
9427         * lexer.c: (static var tbl) Dash set to class CNUM.
9428         (make_hexit) New function from data-out.c.
9429         (get_token_representation) Rewritten.
9430         (convert_negative_to_dash) New function.
9431         (lex_init_compat_dependent) Removed.
9432         (yylex) A dash is parsed as part of a number if it is followed by
9433         a digit.  The ASCII representation of a number is copied to
9434         tokstr.  String parsing farmed out to parse_string().  Comment
9435         fixes.
9436         (bin_value_func, oct_value_func, hex_value_func, parse_string) New
9437         functions.
9438         (preprocess_line) Line processing depends on interactive/batch
9439         mode, not on compatibility mode.  Removed PC+ compatibility code.
9440
9441         * loop.c: (loop_3_trns_proc) Comment fix.
9442
9443         * main.c: Remove dead code.
9444         (main) Remove call to init_compat_dependent().
9445
9446         * misc.c: (convert_fmt_ItoO) Make E format conversion more
9447         conformant.
9448
9449         * print.c: (parse_string_argument) Calls
9450         convert_negative_to_dash().
9451         (fixed_parse_compatible) Calls convert_negative_to_dash().
9452
9453         * repeat.c: (RPT_* defines) Removed.
9454         (struct rpt_numeric) Removed.
9455         (struct repeat_entry) New member type, changed `replacement' from
9456         char * to char **.
9457         (clean_up) Deallocation adapted to new repeat_entry.
9458         (internal_cmd_do_repeat) `type' defaults to 0.  Remove lookahead()
9459         usage.  Creates vars for `type' of 1.
9460         (parse_ids) Sets type of 1.  Adapted to new repeat_entry.
9461         (store_numeric) Rewritten, new interface.
9462         (parse_numbers) Rewritten.
9463         (parse_strings) Rewritten.
9464         (find_DO_REPEAT_substitution) New function.
9465         (perform_DO_REPEAT_substitutions) New function.
9466         (copy_with_DO_REPEAT_substitutions) Removed.
9467         (debug_print) Rewritten.
9468
9469         * set.q: Comment fix.
9470         (custom_results) Removed compatibility code.
9471         (internal_cmd_set) Removed SET EMULATION subcommand.  Removed
9472         compatibility code.
9473
9474         * sysfile-info.c: (cmd_display) Removed compatibility code.
9475
9476         * tokens.h: Comment fixes.
9477         (token types enum) Removed `toktype' typedef name for this int
9478         type.  Removed SUBST.  Restructured.
9479
9480         * vars-atr.c: (discard_variables) Sets n_lag to 0.
9481
9482         * vars-prs.c: Comment fix.
9483
9484         * vfm.c: Comment fixes.
9485         (glob var n_lag) New var.
9486         (static vars lag_count, lag_head, lag_queue) New vars.
9487         (procedure) Removed argument nlag.
9488         (setup_lag) New function.
9489         (close_active_file) Discards lagging state.
9490         (lag_case) New function.
9491         (lagged_case) New function.
9492         (write_case) Lags a case if lagging.
9493
9494         * weight.c: (cmd_weight) Removed compatibility code.
9495         
9496 Sun Aug 17 22:34:40 1997  Ben Pfaff  <blp@gnu.org>
9497
9498         * getline.h: (struct getl_script) New members loop_index, macros.
9499
9500         * getline.c: (getl_add_file) Sets first_line field to NULL.
9501         (getl_add_DO_REPEAT_file) New function.
9502         (handle_line_buffer) When the current line's length is negative,
9503         set the filename and line number.  Increment line number after
9504         reading line.  Pass the line to
9505         copy_with_DO_REPEAT_substitutions() for processing.
9506         (getl_close_file) Free DO REPEAT lines before freeing the
9507         filename, and just set the filename to NULL when doing this,
9508         because otherwise the filename gets freed twice.
9509
9510         * glob.c: (glob var queuing) Removed.  All references removed.
9511
9512         * lexer.c: Comment fixes.
9513         (get_token_representation) New function.
9514
9515         * repeat.c: Comment fixes.
9516         (struct repeat_entry) Replaced type and v union members with a
9517         simple string.
9518         (append_record) New function.
9519         (internal_cmd_do_repeat) Started reforming it for the new
9520         repeat_entry struct.  Properly records filename changes in the
9521         getl_line_buf.  Fixed improper use of = for ==.  Fixed sense of
9522         strncasecmp() result usage.  Uses append_record() to simplify.
9523         Properly discards END REPEAT line.  Calls getl_add_DO_REPEAT_file
9524         to add in the file.
9525
9526         (copy_with_DO_REPEAT_substitutions) Started coding.
9527
9528         [DEBUGGING] (debug_print_lines) New function.
9529
9530         * set.q: (custom_results, internal_cmd_set) s/VER_PCP40/VER_PC/;
9531
9532         * tokens.h: (macro is_id1, is_idn) New macros.
9533
9534 Sat Aug 16 10:57:41 1997  Ben Pfaff  <blp@gnu.org>
9535
9536         * cmdline.c: (static var pre_syntax_message) Changed `win'
9537         compatibility mode to `wnd'.
9538
9539         * data-list.c: (fixed_parse_spss) Renamed
9540         fixed_parse_compatible().
9541
9542         * glob.c: (init_glob) Excise unused code for
9543         program_invocation_short_name.
9544
9545         * lexer.c: (preprocess_line) Leading indentors are ignored in Wnd
9546         as well as in X.
9547
9548         * print.c: (fixed_parse_spss) Renamed fixed_parse_compatible().
9549
9550         * set.q: `win' compatibility renamed `wnd'.
9551
9552 Thu Aug 14 22:11:12 1997  Ben Pfaff  <blp@gnu.org>
9553
9554         * filename.c: [__WIN32__] Change the included Windows header files
9555         (again).
9556         (absolute_filename_p) [__MSDOS__] A filename with a colon as the
9557         second character is absolute.
9558         (dirname) Fix logic error.  Don't printf() the results.
9559         (prepend_dir) Don't printf() the results.
9560
9561         * getline.c: (handle_line_buffer) New function.
9562         (getl_read_line) Reads line with handle_line_buffer() when
9563         appropriate.
9564         (getl_close_file) Discard line buffer data.
9565
9566         * getline.h: Comment fixes.
9567         (struct getl_line_list) New struct.
9568         (getl_script_struct) Added line buffer members.  These are hooks
9569         for use by DO REPEAT to allow it to insert virtual source code
9570         into the program.
9571
9572         * glob.c: (init_glob) [__DJGPP__ || (__WIN32__ && __BORLANDC__)]
9573         Override Borland C++ stupidity that claims Windows has a console
9574         window size of 0x3.
9575
9576         * repeat.c: This is in the process of being restructured from
9577         using a token-buffering approach to the DO REPEAT facility to
9578         using the more flexible approach of a line-buffering approach in
9579         conjunction with the getline module.  Comment fixes.
9580         (struct tok_struct) Removed.
9581         (static vars queue_index, queue_head, queue) Removed.
9582         (static vars line_buf_head, line_buf_tail) New vars.
9583         (internal_cmd_do_repeat) Instead of queuing tokens, queue lines.
9584         Not complete.
9585         (pull_queue, destroy_queue) Removed.
9586         [DEBUGGING] (debug_print_tokens) Removed.
9587
9588 Tue Aug  5 13:57:58 1997  Ben Pfaff  <blp@gnu.org>
9589
9590         * file-handle.q: (prepend_current_directory) New function.
9591         (internal_cmd_file_handle, fh_get_handle_by_filename) Prepends
9592         current directory before normalizing filename.
9593
9594         * filename.c: (gnu_getcwd) New function.
9595         (absolute_filename_p) New function.
9596         (search_path) New argument, PREPEND.  All references changed to
9597         pass NULL except those explicitly mentioned.  Uses
9598         absolute_filename_p().  Prepends PREPEND before trying the
9599         filename.
9600         (dirname, prepend_dir) New functions.
9601
9602         * getline.c: (getl_get_current_directory) New function.
9603         (getl_include) Passes getl_get_current_directory() as PREPEND arg
9604         to search_path().
9605                 
9606 Sun Aug  3 11:42:36 1997  Ben Pfaff  <blp@gnu.org>
9607
9608         * In several source files, the term `script' was replaced with
9609         `syntax file' inside error messages.  Usage of the term `script'
9610         in the sense of a syntax file is now deprecated.
9611
9612         * cmdline.c: (static vars pre_syntax_message, post_syntax_message)
9613         Updated messages.
9614
9615         * dump-sysfile.c: (usage) Update message.
9616
9617         * getline.c: (getl_read_line) Ignore lines beginning with `#!'.
9618
9619         * getline.h: (glob var getl_include_path) Declare extern.
9620
9621         * list.q: Define EXTERN as extern before #including somP.h.
9622
9623         * var.h: Remove declaration of `disptype' variable.
9624
9625         * vfm.c: (close_active_file) After switching the data sink to a
9626         data source, set vfm_sink to NULL, because it doesn't exist any
9627         more.
9628
9629 Thu Jul 17 21:41:44 1997  Ben Pfaff  <blp@gnu.org>
9630
9631         * glob.c: [__BORLANDC__] Include math.h.  Define _matherr() and
9632         _matherrl() to ignore all math errors.
9633
9634         * sfm-read.c: (read_value_labels) When reading the labels from
9635         disk, read the little parts separately instead of as a struct;
9636         this avoids alignment problems.
9637
9638         * sfm-write.c: (struct sfm_fhuser_ext) New member `elem_type'.
9639         (sfm_write_dictionary) Sets elem_type and frees it on lossage.
9640         (write_header) Allocates and initializes elem_type.
9641         (sfm_write_case) Uses elem_type to determine how to handle each
9642         flt64 element.
9643         (sfm_close) Frees elem_type.
9644
9645         * sfmP.h: Comment fix.
9646         [__BORLANDC__] Uses #pragma -a to adjust structure member
9647         alignment.
9648         
9649 Thu Jul 17 01:55:12 1997  Ben Pfaff  <blp@gnu.org>
9650
9651         * Makefile.am: (fiasco_SOURCES) Remove display.c.
9652
9653         * common.c: Fix typo.
9654
9655         * dfm.c: (read_record) Remove strncasecmp() emulation and fix the
9656         sense of the condition.
9657
9658         * expr-evl.c: (macro ALLOC_STRING_SPACE) [!PAGED_STACK] Add
9659         line-continuation backslash.
9660
9661         * filename.c: [__WIN32__] Include <windef.h> before <winbase.h>.
9662
9663         * frequencies.q: (custom_grouped, add_percentile) Don't use a
9664         non-constant expression as an argument to sizeof.
9665
9666         * glob.c: [__WIN32__ && __BORLANDC__] When including <conio.h>,
9667         undefine gettext macro because that's a conio function.
9668
9669         * hash.h: (hsh_prime_tab declaration) Remove.
9670
9671         * list.q: (write_fallback_headers) Move `leader' allocation out of
9672         main loop.  Change to local_alloc() allocation.
9673
9674         * output.h: Formatting fixes.  Put __attribute__ in right place on
9675         function prototypes.
9676
9677         * sfm-read.c: (read_machine_flt64_info, read_variables) Change
9678         incorrect `SECOND_LOWEST_VALUE' references to proper
9679         `second_lowest_value'.
9680
9681         * som-frnt.c: (EXTERN macro) Define as `extern' instead of null
9682         value.  This way 2 out of 3 of the som files define the vars
9683         extern, the correct way, that actually works under BC++.
9684         (som_set_float) Don't use nonconstant initializers for a struct.
9685
9686         * som-high.c: Add the standard alloca() header.
9687         (replicate_table) Add prototype.
9688
9689         Merged DISPLAY routine.
9690         * sysfile-info.c: (AS_*) New enum series.
9691         (cmd_sysfile_info) Gutted.  Calls describe_variable() to do the
9692         dirty work.
9693         (cmd_display, display_macros, display_documents,
9694         display_variables) Stolen from defunct display.c.
9695         (describe_variable) New function.
9696
9697         * temporary.c: [0] (display_tree) New debug function.
9698         (copy_variable) Performs shallow copy of value labels instead of
9699         deep copy; i.e., just copys the AVL tree and increments the
9700         reference counts.
9701
9702         * val-labs.c: Comment fixes.
9703         (do_value_labels) Optionally skip leading forward slash.
9704         (get_label) Creates only a single value label instead of many
9705         copies of one, and sets the reference count.
9706
9707         * display.c: Removed.
9708
9709         * dump-sysfile.c: New file, not yet complete.
9710
9711 Fri Jul 11 23:02:18 1997  Ben Pfaff  <blp@gnu.org>
9712
9713         For lots of source files I added more verbose_msg's.  These aren't
9714         listed below as they have tested as being benign.  In some cases
9715         these replaced debug_printf() calls.
9716
9717         * output.c: (outp_read_devices) Message fix.
9718
9719         * postscript.c: (output_encodings) Message fix.  Reports errors on
9720         fclose().
9721         (postopen) Message fix.
9722         
9723 Fri Jul 11 14:09:40 1997  Ben Pfaff  <blp@gnu.org>
9724
9725         * dfm.c: (dfm_close) Don't call fclose() for a NULL FILE.
9726
9727         * filename.c: (close_file_ext) Set f->file to NULL *after* closing
9728         it.
9729
9730         * main.c: Remove <malloc.h> #include.
9731
9732         * mis-val.c: (parse_numeric) Set .f member for each missing[]
9733         instead of trying to just set the missing[] itself, which is a
9734         gcc-specific idiom.
9735
9736         * sfm-read.c: (read_variables) Same.
9737
9738         * str.h: Add memmem() prototype.
9739
9740         * val-labs.c, var-labs.c: Replace <malloc.h> with <stdlib.h>.
9741
9742 Thu Jul 10 22:13:53 1997  Ben Pfaff  <blp@gnu.org>
9743
9744         * Makefile.am: (q2c) Don't include any libraries in the link.
9745
9746         * dfm.c: (force_line_buffer_extension) New macro.
9747         (count_tabs) New function.
9748         (tabs_To_spaces) New function.
9749         (read_record) Calls tabs_to_spaces() on the line being processed.
9750
9751         * q2c.c: Disabled i18n for this proglet so that libintl.a doesn't
9752         have to be compiled twice (once for CC, once for LOCAL_CC).
9753  
9754 Sun Jul  6 19:14:33 1997  Ben Pfaff  <blp@gnu.org>
9755
9756         * Makefile.am: (INCLUDES) Add intl directory; fix directories.
9757         (LDADD) Add @INTLLIBS@.
9758         (q2c) Add LIBS, @INTLLIBS@ to link step.
9759
9760         * inpt-pgm.c: Turn off debugging.
9761
9762         * postscript.c: (postopen) Format fix.  local_free() blocks
9763         returned by local_alloc(); don't free() them.
9764
9765 Sat Jul  5 23:44:51 1997  Ben Pfaff  <blp@gnu.org>
9766
9767         * data-in.c: (parse_string_as_format) Comment fix.  Fix check for
9768         string length.
9769
9770         * data-list.c: (read_from_data_list_fixed) Pass proper value for
9771         LEN arg, not simply the full string length.
9772
9773         * sort.c: (allocate_file_handles) Check SPSS compatible temp file
9774         directories before generic temp file directories.
9775
9776         * vfm.c: Disable debugging.
9777
9778 Fri Jul  4 13:26:41 1997  Ben Pfaff  <blp@gnu.org>
9779
9780         * get.c: Comment fix.
9781         (cmd_save_internal) Always passes GTSV_OPT_SAVE option.
9782
9783 Wed Jun 25 22:52:28 1997  Ben Pfaff  <blp@gnu.org>
9784
9785         * expr-prs.c: (debug_print_postfix) Conditionally included on
9786         GLOBAL_DEBUGGING.  Removed out_header() reference.
9787
9788         * exprP.h: Removed #undef GLOBAL_DEBUGGING.
9789
9790 Sun Jun 22 22:00:28 1997  Ben Pfaff  <blp@gnu.org>
9791
9792         * ascii.c: Removed obsolete ascii_close_page() prototype.
9793
9794         * command.c: (output_line) Comment fix.
9795
9796         * data-in.c: Formatting fix.
9797         (parse_string_as_format) Now the `fc' argument is used only for
9798         the purpose of error messages; it is not an index into the string
9799         passed.  All references changed.
9800
9801         * data-list.c: Comment fix.
9802         (cut_field) Comment fix.  Now returns the column number of the
9803         position of the field cut out on success.
9804         (parse_field) Added `column' argument.  Puts the column numbers in
9805         the error message.
9806         (read_from_data_list_free, read_from_data_list_list) Record the
9807         column number returned by cut_field(), pass it to parse_field().
9808
9809         * dfm.c: Comment fix.
9810
9811         * do-ifP.h: Comment fix.
9812
9813         * expr-prs.c: (SYSMIS_func) Implemented string-type arguments for
9814         the SYSMIS function.
9815
9816         * expr.h, exprP.h: Comment fix.
9817
9818         * glob.c: (init_glob) Only calls setlocale() and family if
9819         ENABLE_NLS set.
9820
9821         * hash.h: Comment fix.
9822
9823         * include.c: Comment fix.
9824
9825         * output.c: Comment fix.
9826
9827         * postscript.c: (ps_line_intersection) Simplified assertion.
9828
9829         * repeat.c: Comment fix.
9830
9831         * vars-atr.c: Comment fix.
9832
9833         * vars-prs.c: Comment fix.
9834
9835         * vfm.c: (vector_initialization) [DEBUGGING] Fixed undefined
9836         behavior with usage of postincrement.
9837         (memory_stream_read) Discards cases as it goes. 
9838
9839 Sun Jun 15 16:45:17 1997  Ben Pfaff  <blp@gnu.org>
9840
9841         * Makefile.am: Cleans q2c, not just distcleans it.  Distcleans
9842         foo.
9843
9844         * Most source files: Includes debug-print.h, related comment
9845         fixes.
9846
9847         * cases.c: (alloc_val) Removed complex allocation code.  Merely
9848         increments default_dict.nval and returns the former value.
9849         (envector, devector) Removed references to lv member of struct
9850         variable.
9851
9852         * common.h: (macro VME) Replaced complex definition with simple
9853         one.
9854
9855         * data-list.c: (cmd_data_list) Sets vfm_source instead of
9856         read_active_file and cancel_input_pgm.
9857         (read_from_data_list, cancel_data_list) Removed.
9858         (data_list_source_read, data_list_source_destroy_source) New
9859         functions.
9860         (glob var data_list_source) New var.
9861
9862         * dfm.c: (open_file_r, open_file_w) Simplified debug output.
9863         (cmd_begin_data) Improved criteria for an input program accessing
9864         the inline file.  Still not perfect.
9865
9866         * do-if.c: (do_if_trns_proc) Simplified debug output.
9867
9868         * expr-prs.c: Comment fixes.
9869         [DEBUGGING] (debug_print_postfix) Simplified debug output.
9870
9871         * file-handle.q: (fh_close_handle) Simplified debug output.
9872
9873         * file-type.c: Comment fixes.
9874         (cmd_file_type) Sets vfm_source instead of read_active_file and
9875         cancel_input_pgm.
9876         (cmd_end_file_type) On failure, discards variables in place of
9877         just canceling the input program.
9878         (read_from_file_type) Renamed file_type_source_read.
9879         (cancel_file_type) Renamed file_type_source_destroy_source.
9880         (glob var file_type_source) New var.
9881
9882         * get.c: (GTSV_* enum series) New enums GTSV_OPT_SAVE, GTSV_NONE.
9883         (cmd_get) Initializes options to GTSV_NONE before passing to
9884         trim_dictionary().  Removed `lv' reference.  Sets vfm_source
9885         instead of read_active_file and cancel_input_pgm.
9886         (cmd_save_internal) Initializes options before passing to
9887         trim_dictionary().  Local var `nval' removed.
9888         (dict_delete_run) Comment fixes.
9889         (trim_dictionary) Comment fixes.  Disallows scratch variables if
9890         GTSV_OPT_SAVE set in options.
9891         (read_from_get) Renamed get_source_read.
9892         (cancel_get) Renamed get_source_destroy_source.
9893         (glob var get_source) New var.
9894
9895         * inpt-pgm.c: (cmd_input_program) Sets vfm_source instead of
9896         read_active_file and cancel_input_pgm.
9897         (read_from_input_program) Renamed input_program_source_read.
9898         Simplified debug output.
9899         (cancel_input_program) Renamed
9900         input_program_source_destroy_source.
9901         (glob var input_program_source) New var.
9902
9903         * loop.c: (loop_1_trns_proc) Simplified debug output.
9904
9905         * main.c: (dump_token) Made eof output more explicit.
9906
9907         * sfm-read.c: (read_variables, dump_dictionary) Removed `lv'
9908         references.
9909
9910         * sort.c: (cmd_sort_cases) Disallows scratch variables.  Removed
9911         code for always-memory or always-disk cases.  malloc's case-list
9912         based on vfm_source_info.ncases.  Explicit support for
9913         memory_stream via memory_source_cases.
9914         (do_external_sort) Sets vfm_source instead of read_active_file and
9915         cancel_input_pgm.
9916         (allocate_file_handles) The temporary directory permissions are
9917         set to 0700 instead of 0777.
9918         (allocate_cases) Formatting fixes.  Simplified debug output.
9919         (output_record) Compacts the case if necessary before writing it
9920         out.
9921         (close_handle, open_handle_w) Simplified debug output.
9922         (write_initial_runs) Destroys vfm_sink, then sets it to
9923         sort_stream.  Writes records to memory based on
9924         vfm_sink_info.case_size.
9925         (write_to_sort_cases) Renamed sort_stream_write().
9926         (merge) Simplified error handling.  Simplified debug output.
9927         Formatting fixes.
9928         (read_from_external_sort) Renamed sort_stream_read().
9929         Reads records based on vfm_source_info.case_size.
9930         (sort_stream_write) Writes records to memory based on
9931         vfm_sink_info.case_size.
9932         (sort_stream_mode) New function.
9933         (glob var sort_stream) New variable.
9934
9935         * temporary.c: (cmd_temporary) Simplified debug output.
9936         (copy_variable) Removed references to `lv'.
9937
9938         * title.c: (get_title) Simplified debug output.
9939
9940         * var.h: Comment fixes.
9941         (struct get_proc) Removed member `lv'.
9942         (struct variable) Removed member `lv'.  Comment fixes.
9943         (glob vars read_active_file, write_active_file, cancel_input_pgm)
9944         Removed.
9945         (struct case_stream) New.
9946
9947         * vars-atr.c: (discard_variables) Changed cancel_input_pgm,
9948         read_active_file references to use vfm_source.
9949         (init_variable, replace_variable) Removed references to `lv'.
9950
9951         * vfm.c: Comment fixes.
9952         (glob var vfm_source, vfm_sink, vfm_source_info, vfm_sink_info)
9953         New variables.
9954         (static var queue, qh, qt, n_lag) Removed.  All references
9955         removed.
9956         (glob var compaction_necessary, compaction_nval, compaction_case,
9957         paging) New variables.
9958         (record_case) Removed.
9959         (procedure) Comment fixes.  Calls vfm_source->read() instead of
9960         read_active_file().
9961         (lag) Removed.
9962         (prepare_for_writing, arrange_compaction, make_temp_case,
9963         vector_initialization, setup_filter) New function.
9964         (open_active_file) Most of the code moved into the abovementioned
9965         new functions.  Now sets temp_dict to &default_dict if there is no
9966         temporary dictionary, for convenience.  New debug output.
9967         (close_active_file) Deals with changing the sink to the source.
9968         Calls finish_compaction().  Frees compaction_case.  Mostly
9969         rewritten.
9970         (glob vars disk_source_file, disk_sink_file) New vars.
9971         (destroy_active_file, read_from_memory) Removed.
9972         (disk_stream_init, disk_stream_read, disk_stream_write,
9973         disk_stream_mode, disk_stream_destroy_source,
9974         disk_stream_destroy_sink) New functions.
9975         (glob var vfm_disk_stream) New var.
9976         (glob vars memory_source_cases, memory_sink_cases,
9977         memory_sink_iter, memory_sink_max_cases) New vars.
9978         (memory_stream_init, memory_stream_read, memory_stream_write,
9979         memory_stream_mode, memory_stream_destroy_source,
9980         memory_stream_destroy_sink) New functions.
9981         (glob var vfm_memory_stream) New var.
9982         (write_case) Local var `i' renamed `cur_trns'; local var `retval'
9983         named `more_cases'.  Simplified debug output.  Otherwise mostly
9984         rewritten.
9985         (record_case) Moved into the stream drivers.  Removed.
9986         (transform) Removed (was dead code).
9987         (SPLIT_FILE_procfunc) s/vfm_replacement/vfm_sink_info/.  In the
9988         common case that the splits don't change, we don't need to copy
9989         the case into prev_case again--pointless.
9990         (compact_case) New function.
9991         (finish_compaction) New function.
9992
9993         * vfmP.h: Comment fixes.
9994         (DEV_* enum series) Removed. 
9995         (struct storage) Renamed `stream_info'.  Removed variant record.
9996         Removed `device' member.
9997
9998         * debug-print.h: New file.
9999         
10000 Sun Jun  8 01:12:38 1997  Ben Pfaff  <blp@gnu.org>
10001
10002         * autorecode.c: Turned off debugging.
10003
10004         * data-list.c: (destroy_dls) Closes the associated file handle.
10005
10006         * descript.q: (custom_variables) Added PV_NO_SCRATCH to
10007         parse_variables() options.
10008
10009         * dfm.c: (open_file_r) Removed gratuituous argument to msg() call.
10010
10011         * display.c: (display_variables) Really fixed null cell bug.
10012
10013         * file-handle.q: (fh_close_handle) Changed debugging message.
10014
10015         * frequencies.q: (custom_variables) Added PV_NO_SCRATCH to
10016         parse_variables() options.
10017
10018         * list.q: Added PV_NO_SCRATCH in q2c varlist options.
10019         (cmd_list) Fails if no variables specified.
10020         (determine_layout) Writes blank lines manually.
10021
10022         * loop.c: (loop_1_trns_proc) Made debugging code only print
10023         messages if debugging.
10024
10025         * q2c.c: (dump_subcommand) Appends sbc->message to SBC_VARLIST
10026         parse_variables() arguments.
10027         (main) Parses optional parenthesized options to varlist
10028         subcommands into sbc->message.
10029
10030         * sfm-read.c: Format fix.
10031
10032         * var.h: (FV_*) New enum series.
10033         (PV_*) New enum PV_NO_SCRATCH.
10034
10035         * vars-prs.c: (find_var) Removed.
10036         (fill_all_vars) Takes FV_* enum instead of boolean third
10037         argument.  Rewritten to deal with scratch as well as system
10038         variables.
10039         (parse_variables) Error message on scratch variable if
10040         PV_NO_SCRATCH set.
10041
10042         * vfm.c: (static var virt_begin_func) New var.
10043         (procedure) Sets up virt_begin_func.
10044         (SPLIT_FILE_procfunc) For the first case, calls virt_begin_func()
10045         after dump_splits().  For succeeding groups changes, calls
10046         virt_begin_func() instead of begin_func().      
10047
10048 Fri Jun  6 22:42:23 1997  Ben Pfaff  <blp@gnu.org>
10049
10050         * count.c, data-out.c, file-handle.q, list.q, loop.c: Turned off
10051         debugging.
10052
10053         * dfm.c: Added some debugging messages, disabled by default.
10054         (open_file_r) Fixed error message.
10055         (read_record) On eof on inline_file, instead of calling
10056         fh_close_handle(), simply jump to eof label like a normal file.
10057         Message fixes.
10058
10059         * display.c: Thin lines between rows for certain kinds of
10060         listing.  Fixed `null cell' bug.
10061
10062         * error.c: (failure) Flush stdout, stderr before failing.
10063
10064         * file-handle.q: (fh_close_handle) Added debugging message.
10065
10066         * frequencies.q: (dump_full) Bottom line extends across entire
10067         table width.  Changed title formatting.
10068         (dump_condensed) Changed title formatting.
10069         (dump_statistics) Fixed title formatting.
10070
10071         * glob.c: (init_glob) Moved initialization of cur_proc out of #if.
10072         Sets default value of set_format.
10073
10074         * list.q: (cmd_list) Calls blank_line() before determine_layout().
10075         Passes write_all_headers() to procedure() as pre-group func.
10076         (write_all_headers) New function.
10077         (determine_layout) Removed calls to write_header().
10078         Calls blank_line() before and after write_fallback_headers().
10079
10080         * recode.c: (recode_trns_free) Only attempts to free head->map if
10081         non-NULL.
10082
10083         * sfm-read.c: (read_variables) Allows `#' at beginning of system
10084         file variable names but gives a warning.  Sets `left' based on
10085         first character being/not being `#'.  On lossage frees dict->var.
10086
10087         * som-high.c: (som_draw_title) Simplified title formatting.
10088
10089         * vfm.c: (dump_splits) Fixed and changed splits formatting.
10090
10091 Thu Jun  5 22:51:15 1997  Ben Pfaff  <blp@gnu.org>
10092
10093         * autorecode.c: (cmd_autorecode) Sets h_trans to NULL at
10094         beginning.  Frees v_src, v_dest on successful exit.  Frees
10095         h_trans[*], h_trans on lossage.
10096         (recode) Frees h_trans[*], h_trans.
10097
10098         * dfm.c: (dfm_close) Formatting change.
10099         (open_inline_file) Now passed a dfm_fhuser_ext to initialize; no
10100         longer allocates its own in inline_file.
10101         (open_file_r) Passes the local dfm_fhuser_ext to
10102         open_inline_file().
10103         (open_file_w) Message fix. 
10104         (read_record) Buffer reallocation strategy changed.  Frees
10105         ext->line even in inline_file to prevent leaks.
10106         (dfm_put_record) Fixed bug where `ext' was cached before the file
10107         was opened and thus it would be NULL when the file really was
10108         open.
10109         (cmd_begin_data) Sets up inline_file basics itself, then calls
10110         open_inline_file() for the dfm_fhuser_ext.  Formatting fix.
10111
10112         * list.q: (write_line) Formatting fix.
10113         (clean_up) Minor strategy change.  Sets proportional font after
10114         finishing cleanup.
10115         (determine_layout) Sets fixed font before writing regular headers,
10116         or after writing fallback headers.
10117
10118         * modify-vars.c: (cmd_modify_vars) Frees variable lists for DROP
10119         and KEEP vars after using them.
10120
10121         * postscript.c: (ps_init_driver) Frees x->family.
10122         (postopen) When loading fonts, free the temporary font name buffer
10123         after using it.
10124         (ps_text_set_font_by_position) Free temporary font name buffer
10125         after using it.
10126         (text) Fixed code that calculated `lig' so that `lig' always gets
10127         initialized.  Formatting fix.
10128
10129         * som-low.c: (get_cell_size, som_get_table_size) `prop_height' ->
10130         `font_height'.
10131         [GLOBAL_DEBUGGIGN] (check_table) Use arena_alloc() to allocate
10132         cells, not xmalloc(), so that the cells will get destroyed
10133         automatically.
10134
10135         * sysfile-info.c: (cmd_sysfile_info) Frees the dictionary after
10136         using it.
10137
10138 Tue Jun  3 23:33:22 1997  Ben Pfaff  <blp@gnu.org>
10139
10140         * ascii.c: (ascii_text_draw) Always sets metrics for strings that
10141         are drawn.
10142
10143         * dfm.c: Comment fix.
10144
10145         * list.q: Comment fixes.  Include somP.h.  Removed static vars
10146         table, n_columns, n_rows, part.  New struct list_ext.  New static
10147         var line_buf.
10148         (n_lines_remaining, n_chars_width, write_line) New functions.
10149         (cmd_list, list_cases) Rewritten.
10150         (begin_row, end_row, flush_table) Removed.
10151         (write_header, clean_up, write_varname, write_fallback_headers,
10152         determine_layout) New functions.
10153
10154         * output.c: (outp_iterate_enabled_drivers) Minor reformat.
10155
10156         * output.h: Comment fix.
10157
10158         * postscript.c: Comment fix.
10159         (struct ps_driver_ext) Removed prop_size, fixed_size members;
10160         added font_size.  All references changed.
10161         (ps_init_driver) Initializes font_size.  Simplified space checking
10162         code.
10163         (static var option_tab[]) Removed prop-size, fixed-size; added
10164         font-size.
10165         (ps_option) Handles font_size.
10166
10167         * som-high.c: Moved prototypes into somP.h.
10168         (som_init_driver) New function.
10169         (som_submit_table) Moved some code into new function
10170         som_init_driver().
10171         (build_target) Moved some code into new function
10172         som_internal_eject_page().
10173         (som_eject_page) Uses som_internal_eject_page().
10174         (som_internal_eject_page) New function.
10175
10176         * som-low.c: Moved prototypes into somP.h.
10177
10178         * som.h: Formatting fixes.
10179
10180         * somP.h: (struct som_driver_ext) Removed em_width;
10181         added prop_em_width, fixed_width.
10182
10183 Mon Jun  2 14:25:25 1997  Ben Pfaff  <blp@gnu.org>
10184
10185         * Makefile.am: Added `localedir' definition.  Added
10186         -DLOCALEDIR="..." to DEFS.  Added -I. to INCLUDES.
10187
10188         * ascii.c: (macro draw_line) Fixed capitalization.
10189
10190         * ascii.c, autorecode.c, cases.c, cmdline.c, command.c, common.c,
10191         compute.c, count.c, data-in.c, data-list.c, data-out.c,
10192         descript.q, dfm.c, display.c, do-if.c, error.c, expr-evl.c,
10193         expr-opt.c, expr-prs.c, file-handle.q, file-type.c, filename.c,
10194         formats.c, frequencies.q, get.c, getline.c, glob.c, groff-font.c,
10195         hash.c, heap.c, include.c, inpt-pgm.c, lexer.c, list.q, loop.c,
10196         main.c, mis-val.c, misc.c, modify-vars.c, numeric.c, output.c,
10197         postscript.c, print.c, q2c.c, recode.c, rename-vars.c, repeat.c,
10198         sample.c, sel-if.c, sfm-read.c, sfm-write.c, sfmP.h, som-frnt.c,
10199         som-high.c, som-low.c, sort.c, split-file.c, sysfile-info.c,
10200         temporary.c, title.c, tokens.h, val-labs.c, var-labs.c,
10201         vars-atr.c, vars-prs.c, vector.c, vfm.c, weight.c: Marked strings
10202         for internationlization.
10203
10204         * glob.c: [HAVE_LOCALE_H] Includes locale.h.
10205
10206 Sun Jun  1 23:31:18 1997  Ben Pfaff  <blp@gnu.org>
10207
10208         * do-if.c, sort.c, val-labs.c: Comment fixes.
10209
10210         * glob.c: (init_glob) Uncommented, updated i18n support.
10211         
10212         * arena.c, ascii.c, data-in.c, descript.q, error.c, expr-evl.c,
10213         expr-opt.c, expr-prs.c, filename.c, frequencies.q, groff-font.c,
10214         output.c, postscript.c, sfm-read.c, som-high.c, vars-prs.c: Made
10215         the declarations of macros taking arguments a lot nicer.
10216
10217 Sun Jun  1 17:22:04 1997  Ben Pfaff  <blp@gnu.org>
10218
10219         * error.h: Removed CE, CW aliases for SE, SW.
10220
10221         * q2c.c: Removed explicit streq() definition since it's duplicated
10222         in str.h.
10223         
10224         * approx.h, error.h, font.h, hash.h, misc.h, output.h, somP.h,
10225         stats.h, str.h, tokens.h: Made the declarations of macros taking
10226         arguments a lot nicer-looking of <pinard@iro.umontreal.ca>.
10227         Comment fixes.
10228
10229 Sun Jun  1 12:02:06 1997  Ben Pfaff  <blp@gnu.org>
10230
10231         * cmdline.c: Comment fixes.
10232         (pick_compat) Changed return type to int.  Now, instead of setting
10233         glob var `compat' to the emulation, returns the emulation.  All
10234         references changed.
10235         (parse_command_line) Added terminating null to end of
10236         `long_options' array definition.
10237         (pre_syntax_message) Fixes.
10238         (usage) Shows the default emulation in the syntax message by
10239         calling pick_compat().
10240
10241         * getline.c: (getl_add_include_dir) Separates paths with
10242         PATH_DELIMITER, not DIR_SEPARATOR.
10243
10244         * glob.c: (init_glob) Fixed references to DEFAULT_VER_PCP40,
10245         DEFAULT_VER_WIN61, DEFAULT_VER_X40.
10246
10247         * output.c: (outp_configure_macro) Make earlier definitions for a
10248         particular key override later ones for the same key.
10249         
10250 Fri May 30 19:40:49 1997  Ben Pfaff  <blp@gnu.org>
10251
10252         * ascii.c: Comment fixes.
10253
10254         * output.c: (outp_get_paper_size)
10255         s/STAT_OUTPUT_INIT_FILE/STAT_OUTPUT_PAPERSIZE_FILE/.
10256         
10257 Sun May 25 22:34:07 1997  Ben Pfaff  <blp@gnu.org>
10258
10259         * ascii.c, postscript.c, sfm-read.c, sfm-write.c, sort.c: Include
10260         <errno.h>.  GNU libc 2 enforces this!
10261
10262         * command.c: (parse_cmd) Fixed problem with `else' clause being
10263         paired with wrong `if'.  Comment fix.
10264
10265 Fri May  9 16:53:52 1997  Ben Pfaff  <blp@gnu.org>
10266
10267         * getline.c: [!HAVE_LIBREADLINE] (read_console) Changed
10268         blp_getline() to getline().
10269
10270         * output.c: (outp_eval_dimension) Changed the fix from last time;
10271         there was no variable `a'.
10272
10273         * q2c.c: (get_line) Fixed boundary condition overrun bug.
10274
10275 Mon May  5 21:58:22 1997  Ben Pfaff  <blp@gnu.org>
10276
10277         * output.c: (outp_evaluate_dimension) Fixed handling of negative
10278         numbers having fractional parts.  Added case of a fraction without
10279         a whole-number part.
10280
10281 Fri May  2 22:08:05 1997  Ben Pfaff  <blp@gnu.org>
10282
10283         * ascii.c: (ascii_text_get_font_position) Removed.
10284
10285         * expr.h, exprP.h: Disabled debugging.
10286
10287         * groff-font.c, postscript.c: Changed `groff' to `Groff' in
10288         several places.
10289
10290         * output.h: (struct outp_class_struct) Removed
10291         text_get_font_position method.  All references deleted.
10292
10293         * postscript.c: Big change here.  Fontmaps were completely
10294         eliminated because of a change in philosophy.  Comment fixes.
10295         (struct ps_fontmap, ps2dit_map, font_family, dit2family_map)
10296         Removed.
10297         (struct ps_driver_ext) `position', `fontmap', `prop_name',
10298         `fixed_name' members removed.  New members `prop_family',
10299         `fixed_family'.  `family' member changed to type char *.
10300         (static var ps_fontmaps) Removed.
10301         () Removed.
10302         (ps_init_driver) Removed obsolete references, updated.
10303         Initializes `translate_x', `translate_y', `scale'.  Doesn't read
10304         fontmap, of course.  Refers to font names through internal_name
10305         rather than subversive means.  Frees proper items.
10306         (static var option_tab[]) Removed `fontmap-file' option; renamed
10307         `fixed-font', `prop-font'.
10308         (ps_option) Corresponds to option_tab[].
10309         (read_fontmap, release_fontmap, ps_to_dit, compare_ps2dit,
10310         hash_ps2dit, compare_dit2family, hash_dit2family, compare_family,
10311         hash_family) Removed.
10312         (postopen) Generates font names from family names.  Gets
10313         PostScript font name properly.  New prologue file comment `!!!'
10314         style.
10315         (ps_open_page) Adds translate_x, translate_y to BP prologue
10316         function; gives SF argument floating-point format.
10317         (ps_text_set_font_by_name) Doesn't try to map PostScript->Groff
10318         font name.  Doesn't change font family.
10319         (ps_text_set_font_by_position) Generates Groff font name from font
10320         family name instead of through table lookup.
10321         (ps_text_set_font_by_family) Renamed `ps_text_set_font_family',
10322         all references changed.  Reduced to simple string assignment.
10323         (ps_get_font_name) Removed.
10324         (ps_get_font_family) Reduced to string return.
10325         (text) Doesn't save `position' since it no longer exists.  Ugly
10326         kluge to save font family--fix soon?
10327         (load_font) Removed PostScript name argument.
10328         
10329 Thu May  1 14:58:59 1997  Ben Pfaff  <blp@gnu.org>
10330
10331         * postscript.c: Comment fix.
10332         (ps_open_page) Puts scale factor in PostScript output.
10333         
10334 Sat Apr 26 11:49:32 1997  Ben Pfaff  <blp@gnu.org>
10335
10336         * Makefile.am: Distcleans q2c.
10337
10338 Wed Apr 23 21:33:48 1997  Ben Pfaff  <blp@gnu.org>
10339
10340         * ascii.c: (delineate) Sets text size even if width is zero.
10341
10342         * command.c: Comment fix.
10343         (static var cmd_table[]) Re-enabled EVALUATE command.
10344         (parse_cmd) Lotsa comment fixes.  Fixed infinite loop in parsing
10345         of comments in script files.  Now more liberal on criteria for
10346         performing a state transition--if *anything* happened correctly,
10347         not just if *everything* happened correctly.
10348
10349         * data-out.c: (convert_F) Comment fix.  Why in the fsck does
10350         Checker segfault on formatting large numbers and why in the fsck
10351         hadn't I noticed this before?
10352
10353         * expr.h, exprP.h: No longer turn off GLOBAL_DEBUGGING.
10354
10355         * list.q: (cmd_list) Commented out the actual output routine
10356         because of various problems.  Probably will abandon the idea of
10357         using the general `crushed tables' for the LIST procedure.
10358
10359         * temporary.c: (restore_dictionary) Sets var_by_name to NULL after
10360         clearing it.  Allocates a new var_by_name dictionary before trying
10361         to add members to it.
10362
10363         * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed argument
10364         `sib'.  Changed type of `node' argument.
10365         [DEBUGGING] (dump_var_tree) Replaced avlwalk() with
10366         avl_walk_inorder().
10367         (clear_variable) Only dumps the var tree if var_by_name non-NULL.
10368         [DEBUGGING] Only deletes the variable from var_by_name if that var
10369         non-NULL.
10370
10371 Fri Apr 18 16:48:41 1997  Ben Pfaff  <blp@gnu.org>
10372
10373         * Makefile.am: Added include files to SOURCES.  Added
10374         frequencies.q to EXTRA_DIST.  Removed include/ from INCLUDES.  Now
10375         includes rules for q2c.  Added `boast' target.
10376
10377 Fri Apr 18 15:42:22 1997  Ben Pfaff  <blp@gnu.org>
10378
10379         * Makefile.am: Maintainer-clean Makefile.in.
10380         
10381         * Makefile.am: Fixed redundant EXTRA_DIST line.
10382
10383         * ascii.c: Comment fixes.
10384         (ascii_line_vert) Fixed overly aggressive range check.
10385
10386         * display.c: Removed dead code.
10387
10388         * list.q: Turn debugging on.
10389         (flush_table) New debug code.
10390
10391         * sfm-read.c: (read_value_labels) malloc's the structure before
10392         trying to assign to its members.
10393
10394         * sfm-write.c: Comment fix.
10395
10396         * som-high.c: (som_submit_table) Sets som.t and som.d on each call
10397         to output_table().
10398         (output_table) No arguments anymore--gets them through `som'
10399         global.  New debug code.  In crushed tables, now sets `htv' as
10400         well as `hv' to avoid bad confusion later.
10401         (dump_crush_page) New debug code.
10402
10403         * som-low.c: (som_dump_crush_page) New debug code.
10404
10405 Thu Mar 27 01:11:29 1997  Ben Pfaff  <blp@gnu.org>
10406
10407         All source files: Broke long lines into multiple lines.
10408         
10409         * ascii.c: (ascii_close_page) Uses host_system var in place of
10410         HOST_SYSTEM constant.
10411
10412         * cmdline.c: (var syntax_message[]) Broke into
10413         pre_syntax_message[] and post_syntax_message[].
10414         (usage) Outputs both parts, separated by driver list.
10415
10416         * error.h: Fixed broken formatting.
10417
10418         * expr-opt.c: (str_search, str_rsearch) New functions.
10419
10420         * misc.c: (blp_getdelim) Removed.  All references changed to
10421         `getdelim'.
10422         (str_search, str_rsearch) Removed.
10423         (memrmem) New function.
10424
10425         * misc.h: (blp_getline) Removed.  All reference changed to
10426         `getline'.
10427
10428         * stat.h: New file.
10429
10430         * filename.c: Includes "stat.h", not <sys/stat.h>.
10431         (blp_getenv) Uses host_system var instead of HOST_SYSTEM constant.
10432
10433         * output.c: (outp_list_classes) Changed output formatting.
10434
10435         * sfm-write.c: (write_header) Uses host_system var instead of
10436         HOST_SYSTEM constant.
10437         (write_rec_7_34) Extracts version numbers from the version string.
10438         Untested.
10439
10440         * sort.c: Includes "stat.h", not <sys/stat.h>.
10441
10442         * str.c: (strcasecmp) Removed.
10443
10444         * title.c: (cmd_document) Uses host_system var instead of
10445         HOST_SYSTEM constant.
10446
10447         * version.c: Generated on-the-fly by the Makefile instead of being
10448         static.
10449
10450         * str.h: Comment fixes.  Doesn't substitute for missing memmove or
10451         memcpy.
10452         [!HAVE_STRNCASECMP] Declares strncasecmp().
10453
10454         * version.h: Removed stray character.  Comment fixes.
10455         (vars host_system, build_system) New vars.
10456
10457 Mon Mar 24 21:47:31 1997  Ben Pfaff  <blp@gnu.org>
10458
10459         * Most source files: Changed formatting of copyright notice; fixed
10460         FSF address; reformatted to better conform to GNU standards;
10461         comment fixes.  Added markups to prevent GNU indent from messing
10462         up my beautiful formatting :-).
10463         
10464         * q2c.c: (get_line) Ignores lines that begin with `/* *INDENT' so
10465         that GNU indent markups can be passed through without problems.
10466
10467 Wed Feb 19 21:30:31 1997  Ben Pfaff  <blp@gnu.org>
10468
10469         * get.c: Turned off debugging.
10470
10471         * glob.c: (init_glob) Turned on save-file compression by default.
10472
10473         * sfm-write.c: (sfm_write_case) Fixed bug which resulted in less
10474         compression than was possible in save files.
10475
10476 Sun Feb 16 20:57:20 1997  Ben Pfaff  <blp@gnu.org>
10477
10478         * data-out.c: (convert_F) Comment fixes.  Debug message fixes.
10479
10480         * frequencies.q: Removed Fiasco extensions.  Updated calculation
10481         algorithms.  Polished output format. 
10482         (struct frq_info_struct) Removed members `max_degree', `min_n',
10483         all references removed.
10484         (macro frq_extensions) Removed.
10485         (static vars min_n, max_degree) Removed, all references removed.
10486         (internal_cmd_frequencies) Doesn't handle extensions.  Doesn't
10487         calculate `min_n', `max_degree'.
10488         (postcalc) Passes new arg to dump_statistics().
10489         (dump_full) Honor NOLABEL option.  Buggy?  Adds variable name
10490         title.
10491         (dump_condensed) Adds variable name title.
10492         (sum_freqs) Removed.
10493         (calc_stats) Updated calculation algorithm.
10494         (dump_statistics) Removed warning for too-few observations.
10495         Changed table formatting.  Adds variable name title if passed new
10496         arg is nonzero.
10497
10498         * output.h: Comment fix.
10499
10500         * recode.c, sample.c, sort.c: Disabled debug code.
10501
10502         * som-frnt.c: (som_set_value, som_set_float, som_set_text)
10503         Improved debug code.
10504
10505         * var.h: (enum series frq_*) Removed Fiasco extensions.
10506
10507 Sat Feb 15 21:26:53 1997  Ben Pfaff  <blp@gnu.org>
10508
10509         * command.c: Added PROCESS IF to command table.
10510
10511         * Lots & lots of places, removed checks for NULLs preceding calls
10512         to free_expression(), which itself checks.
10513
10514         * descript.q: Removed Fiasco extensions.  Removed optimizations
10515         for non-weighted active files.  Implemented some options.
10516         Finished polishing output format.  Comment fixes.  Merged
10517         `descript.g'.
10518         (static vars n_glob_miss_list, n_glob_valid, n_glob_missing,
10519         max_degree, min_n) Removed.
10520         (macro dsc_extensions) Removed.
10521         (struct dsc_info_struct) Removed `min_n' member, all references
10522         fixed.
10523         (internal_cmd_descriptives) Removed calculation of min_n,
10524         max_degree.  Only deals with one `calc' routine instead of two
10525         flavors.
10526         (precalc) Eliminated redundancy.  Updated for changes to
10527         descriptives_proc structure.
10528         (calc) Moved here from `descript.g'.  Rewritten to calculate
10529         statistics via `moments about the mean' rather than by summing,
10530         summing squares, summing cubes, and so on.
10531         (postcalc) Rewritten for new-style statistical calculation.
10532         (display) Removed support for displaying variables across rows.
10533         No longer crushes the descriptives table.  Removed ancient code.
10534         Added display of N, by variable and listwise.
10535
10536         * descript.g: Removed; merged into `descript.q'.
10537
10538         * expr-evl.c: (evaluate_expression) Now returns a double.  For
10539         numeric results, it returns the result as well as storing it in
10540         the passed `value' structure if non-NULL.  For string results it
10541         just returns 0.0 and it must be passed non-NULL.  Many references
10542         to this function were optimized by use of this change, especially
10543         but not exclusively in `compute.c'.
10544
10545         * frequencies.g: Comment fix.
10546
10547         * glob.c: (glob var process_if_expr) New global var.
10548
10549         * postscript.c: (static var option_tab[]) Corrected entry for
10550         `fixed_size'.
10551         (postopen) Sets x->size to x->prop_size.
10552         (ps_text_set_font_by_name) Sets font size as well as typeface for
10553         PROP and FIXED fonts.
10554         
10555         * sel-if.c: (cmd_process_if) New function.
10556
10557         * sfm-write.c: (struct sfm_fhuser_ext) New member `n_cases'.
10558         (sfm_write_dictionary) Sets `n_cases' to 0.
10559         (sfm_write_case) Increments `n_cases'.
10560         (sfm_close) Attempts to seek the system file back to the header
10561         and write the number of cases in its proper slot.
10562
10563         * som-frnt.c: (som_insert_table) Masks off expansion options since
10564         only SOPT_X_NORM seems to work sensibly.
10565
10566         * som-low.c: (get_cell_size) Fixed bug when a table cell was sized
10567         with a `fixed' value of 2.
10568
10569         * sort.c: (cmd_sort_cases) Cancels PROCESS IF.
10570
10571         * sysfile-info.c: (cmd_sysfile_info) Doesn't display more than 10
10572         value labels; uses SOPT_NONE instead of SOPT_X_BOTH.
10573
10574         * var.h: (enum series dsc_*) Removed Fiasco extensions.
10575         (struct descriptives_proc) Removed `miss_noweight'; new members
10576         `X_bar', `M2', `M3', `M4', `min', `max'.
10577
10578         * vars-atr.c: (discard_variables) Cancels PROCESS IF.
10579
10580         * vfm.c: (close_active_file) Cancels PROCESS IF.
10581         (write_case) Doesn't process cases unselected by PROCESS IF.
10582
10583 Fri Feb 14 23:32:58 1997  Ben Pfaff  <blp@gnu.org>
10584
10585         * glob.c: (glob var err) Removed.
10586
10587         * sysfile-info.c: (cmd_sysfile_info) When adjusting table size,
10588         doesn't have to take into account number of value labels since
10589         they're in a subtable anyway.  Also, doesn't display more than 10
10590         value labels since we can't yet break pages in subtables.
10591
10592 Tue Feb  4 15:15:50 1997  Ben Pfaff  <blp@gnu.org>
10593
10594         * som-frnt.c: (som_change_table_size) Simple change for elegance
10595         that shouldn't change behavior.
10596         (som_set_value) Comment fix.
10597
10598         * som-high.c: (som_submit_table) Message fix.
10599
10600 Wed Jan 22 21:54:00 1997  Ben Pfaff  <blp@gnu.org>
10601
10602         * command.c: Added SYSFILE INFO to command table.
10603
10604         * file-handle.q: (fh_handle_filename) New function.
10605
10606         * get.c: (save_trns_proc) Fixed a bug in padding of output data
10607         with spaces.
10608
10609         * main.c: (parse) New return value for command functions, -3.
10610
10611         * misc.h: Comment fix.
10612
10613         * output.h: Comment fixes.
10614         (macro COMPONENTS) Removed.
10615
10616         * postscript.c: (write_text) Modified literal_chars[] so that `('
10617         and ')' are not written to the output in strings as literals.
10618
10619         * sfm-read.c: (sfm_read_dictionary) New argument.
10620         (read_header) New argument.  Sets the information structure's
10621         values from the header information.  
10622         (read_variables) [__CHECKER__] Redefines isalnum()--some sort of
10623         bizarre Checker problem, I guess.
10624         (read_variables) Proper cleanup on lossage.
10625
10626         * sfm.h: (struct sfm_read_info) New struct for use by
10627         sfm_read_dictionary().
10628
10629         * som-frnt.c: (som_create_table) New argument CREATE_FLAGS,
10630         currently used just for tables that can be dynamically resized and
10631         thus have to be allocated with arena_malloc() instead of
10632         arena_alloc().  All references changed.
10633         (som_change_table_size) New function.
10634         (som_insert_table) Bugfix: now inserts `cell', not `c'!
10635
10636         * som-high.c: [GLOBAL_DEBUGGING] (check_table) Moved to som-low.c.
10637         (som_submit_table) [GLOBAL_DEBUGGING] Doesn't call check_table()
10638         any more.
10639
10640         * som-low.c: (draw_cell) Calls draw_table_cell() for SCON_TABLE
10641         cells.
10642         (draw_intersection) Now takes an argument specifying the table in
10643         question.  All references changed.
10644         (draw_table_cell) New function.
10645         (som_get_table_size) [GLOBAL_DEBUGGING] Calls check_table().
10646         (som_get_table_size) Many nice new explanatory comments.
10647         [GLOBAL_DEBUGGING] (check_table) Moved here from som-high.c.
10648
10649         * som.h: New enum series SOM_CREATE_* for use as create flags with
10650         som_create_table().
10651
10652         * str.h: Moved a comment here from TODO.
10653
10654         * sysfile-info.c: New file.  Reference implementation.
10655
10656 Sun Jan 19 14:22:11 1997  Ben Pfaff  <blp@gnu.org>
10657
10658         * command.c: Added RENAME VARIABLES to table of commands.
10659
10660         * data-in.c: (dls_error) Sets `cust_field'.
10661         (parse_N) Message fix.
10662         (parse_day_count) New function.
10663         (to_roman) Never outputs VX as a `short form' of V.
10664         (parse_month) Fixed parsing of Roman numerals.
10665         (parse_trailer) Message fix.
10666         (parse_DATE, parse_ADATE, parse_EDATE, parse_SDATE, parse_JDATE,
10667         parse_QYR, parse_MOYR, parse_WKYR, parse_DTIME) Issue a message if
10668         the date is invalid.
10669         (parse_SDATE) Fixed swapped day, year.
10670         (parse_JDATE) Fixed bug for dates in 1582.
10671         (parse_DTIME) Allows days not between 1 and 31.
10672         (parse_numeric) Makes local copy of f.type for easier usage.
10673         FMT_DOLLAR fixed.
10674
10675         * data-out.c: (convert_F) When outputting as scientific, properly
10676         sets f.type as fp->type.
10677         (insert_commas) Fixed operator precedence problem with setting of
10678         nitems.  Changed strcpy to memcpy (no null terminator). 
10679         (convert_date) Fixed FMT_JDATE: added 1900 to year.
10680         (convert_CCx) Essentially rewritten, but now it works.
10681
10682         * display.c: (cmd_display) Added DISPLAY FILE LABEL (undocumented
10683         feature of Fiasco).
10684         (display_documents) Implemented.
10685
10686         * error.c: (glob var cust_field) New var.
10687         (vmsg) Displays cust_field as part of message classes DE and DW.
10688
10689         * formats.c: (debug_print) Fixed to compile under updated
10690         dictionary format.
10691
10692         * get.c: (cmd_get, cmd_save_internal) Close file handle on
10693         failure.
10694
10695         * misc.c: (parse_format_specifier) Formatting fix.
10696
10697         * modify-vars.c: (struct var_modification) Renamed `n_reorder' as
10698         `n_rename' for clarity.
10699         (cmd_modify_vars) Initializes `forward' and `positional' at
10700         appropriate times.  Frees lists of vars to rename on failure.
10701         Comment fix.  Frees memory on success.  
10702         (rearrange_dict) Simplified `for' loop condition.
10703
10704         * rename-vars.c: New file (reference implementation).
10705         
10706         * set.q: (internal_cmd_set) Fixed `emu' test condition.
10707
10708         * sfm-read.c: (read_header) File label is created only if file
10709         label in file is not blank.
10710         (read_variables) Initializes `dict' local variable.
10711         (read_documents) Proper behavior on lossage.
10712
10713         * sfm-write.c: (write_header) Doesn't blank out the file label
10714         (why was this here to begin with?!)
10715
10716         * temporary.c: (save_dictionary) File label is copied only if
10717         non-NULL.  Doesn't try to xstrdup() dictionary documents.
10718         Adapted so as to not irritate Checker.
10719         (free_dictionary) Only destroys var_by_name if non-NULL.
10720
10721         * title.c: (cmd_file_label) Doesn't skip FILE, LABEL tokens.
10722         (cmd_document) Doesn't skip DOCUMENT token.  Adds some header
10723         lines to the document, indents the document.  Also, it works now.
10724         (add_document_line) New function.
10725
10726         * var.h: (struct dictionary) Reordering.
10727
10728         * vars-prs.c: (parse_variables) On lossage, only local_free()'s
10729         bits if it was allocated to begin with.
10730
10731 Thu Jan 16 13:08:57 1997  Ben Pfaff  <blp@gnu.org>
10732
10733         * command.c: Added MODIFY VARS to list of commands.
10734
10735         * configure.in: Updated custom macros for autoconf 2.12.  Removed
10736         mmap reference; fixed termcap library reference.
10737
10738         * display.c: (display_variables) Fixed a few bugs although it's
10739         still not well written.
10740
10741         * error.c: [!__CHECKER__] (chkr_disp_call_chain) New function.
10742         (induce_segfault) Calls chkr_disp_call_chain() instead of
10743         inducing an actual SIGSEGV.
10744
10745         * expr-opt.c: (evaluate_tree) Swapped order of arguments to
10746         str_search() and str_rsearch().  Fixed tests for matches on
10747         OP_INDEX and OP_RINDEX.
10748
10749         * filename.c: (good_getcwd) Removed as the new libc for Checker
10750         doesn't contain this bug, apparently.
10751
10752         * misc.c: (str_search, str_rsearch) Changed order of arguments for
10753         consistency with GNU memmem.
10754         (blp_getdelim) Changed `len' from `int' to `size_t'.
10755
10756         * modify-vars.c: Reference implementation.
10757
10758         * som-frnt.c: (zero_length) New global var.
10759         (som_create_table) Message fix.
10760
10761         * som.h: Added gcc attributions to som_set_text(),
10762         som_output_text() prototypes.  blank_line() refers to
10763         zero_length[] instead of a literal null string to suppress gcc
10764         warnings.
10765
10766         * sort.c: (do_external_sort) Fixed fencepost error on lossage.
10767         (allocate_cases) Decrements x_max so the last element of x[] can
10768         be used by the algorithm.
10769
10770         * var.h: Changed minor details of `variable' declaration.  
10771         (struct modify_vars_proc) New struct.
10772         (struct variable) Added field p.mfv.
10773
10774         * vars-atr.c: Comment fix.
10775
10776         * vars-prs.c: (fill_all_vars) More optimal implementation.
10777
10778         * vfm.c: (dump_splits) Sets the last byte of temp_buf to a null
10779         character, which it shouldn't have to do but printf() seems to
10780         read the null byte even though I supply a maximum length...
10781
10782 Fri Jan 10 20:22:08 1997  Ben Pfaff  <blp@gnu.org>
10783
10784         * command.c: Removed command alias X for QUIT.
10785         (parse_cmd) Fixed comment parsing.
10786
10787         * dfm.c: (struct dfm_fhuser_ext) Fields `len', `size' are now of
10788         type size_t.
10789         (read_record) Fixed references to len, size.
10790         (dfm_get_record) Restructured.
10791
10792         * file-handle.h: (struct file_handle) Field `lrecl' now of type
10793         size_t.
10794
10795         * file-handle.q: (internal_cmd_file_handle) Checks for nonpositive
10796         record length.
10797
10798         * modify-vars.c: New file.  Not complete.
10799         
10800         * set.q: (set_ccx) Fixed operator precedence problem regarding ^
10801         and ==.
10802
10803         * sfm-read.c: (bswap_flt64, read_header, write_variable) Fixed
10804         problems caused by int/size_t differences.
10805
10806         * sort.c: (output_record, merge_once) Cast `size_t's to `int's in
10807         appropriate spots.
10808
10809         * str.c: (strcasecmp) Fixed bug that cropped up when the strings
10810         being compared were of equal length.
10811
10812 Thu Jan  2 19:08:23 1997  Ben Pfaff  <blp@gnu.org>
10813
10814         * command.c: Added DOCUMENT, DROP DOCUMENTS, FILE LABEL.
10815
10816         * lexer.c: (get_dotted_rest_of_line) New function.
10817
10818         * sel-if.c: (cmd_filter) Cannot choose string or scratch variables
10819         as filters.
10820
10821         * sfm-read.c: (sfm_read_dictionary) Calls read_documents() to read
10822         type 6 records.  Frees the dictionary properly.
10823         (read_header) Initializes the dictionary instead of letting
10824         read_variables() do it.  Sets the dictionary file label from the
10825         system file.
10826         (read_documents) New function.
10827
10828         * sfm-write.c: (sfm_write_dictionary) Calls write_documents() to
10829         write type 6 record if appropriate.
10830         (write_header) Writes file label from dictionary.
10831         (write_documents) New function.
10832
10833         * temporary.c: (save_dictionary, restore_dictionary,
10834         free_dictionary) Properly handle new fields in dictionary struct.
10835
10836         * title.c: (get_title) Returns after failure().
10837         (cmd_file_label, cmd_document, cmd_drop_documents) New functions
10838         for new commands FILE LABEL, DOCUMENT, DROP DOCUMENTS.  Untested.
10839
10840         * var.h: (struct dictionary) New fields `label', `n_documents',
10841         `documents'.
10842
10843 Wed Jan  1 22:08:10 1997  Ben Pfaff  <blp@gnu.org>
10844
10845         * command.c: Added FILTER to list of commands.
10846
10847         * frequencies.g: [WEIGHTING] Removed test for weighting!=-1 since
10848         it's always true.
10849
10850         * get.c: (cmd_save_internal) Removed weighting code since it's now
10851         handled by sfm-write.c.  Properly commented out debug code.
10852
10853         * glob.c: (glob var weighting) Removed.
10854
10855         * sel-if.c: Comment fixes.
10856         (cmd_filter) New function.
10857
10858         * sfm-read.c: (struct sfm_fhuser_ext) New field `weight_index'.
10859         (sfm_read_dictionary) Sets weighting variable direct in the
10860         created dictionary now.  (Apparently we previously didn't support
10861         weighting on GET?)
10862         (read_header) Sets weight_index field in sfm_fhuser_ext from
10863         header read from disk.
10864
10865         * sfm-write.c: (sfm_write_dictionary) Comment fix.
10866         (write_header) Now sets the weighting in the header from the
10867         passed primary dictionary instead of from the sfm_write_info.
10868
10869         * sfm.h: (struct sfm_write_info) Removed field `weight'.
10870
10871         * som-high.c: (dump_crush_table) Fixed a couple of assertions that
10872         broke on boundary conditions.
10873
10874         * var.h: (struct dictionary) New fields `weight_var',
10875         `weight_index', and `filter_var'.
10876         (glob var weighting) Removed.  This is now part of struct
10877         dictionary.  All references changed; the less mechanical changes
10878         are described above.
10879
10880         * vars-atr.c: (find_dict_variable) New function.
10881
10882         * vfm.c: (static var filter_index) New variable.
10883         (open_active_file) Initializes filter_index from default_dict.
10884         (write_case) Calls proc_func() only if the filter variable is
10885         nonzero; this implements FILTER behavior.
10886
10887         * weight.c: (static var weight_varname) Removed.
10888         (cmd_weight) Modified default_dict instead of glob vars.
10889         (update_weighting) Changed the signature to modify a dictionary
10890         instead of glob vars.  Now returns the weighting variable.
10891         (get_weighting_variable) Removed; its function is absorbed by
10892         update_weighting().
10893         (stop_weighting) Operates on a dictionary now.
10894
10895 Wed Jan  1 17:00:59 1997  Ben Pfaff  <blp@gnu.org>
10896
10897         * sort.c: Removed debugging info from messages.
10898         (do_external_sort) Cleans up after itself by deleting the
10899         temporary directory on failure.  (On success it is deleted by the
10900         input program.)
10901         (allocate_cases) Removed debug code.  Added clean up code.
10902         (output_record) Removed debug code.
10903         (merge) Added code to close all the input files that are currently
10904         open.  This is a likely location for bugs, because I'm not sure
10905         about boundary conditions.  Removed an unnecesary heap_delete().
10906         (merge_once) Removed input file "optimization" that in fact
10907         screwed up the rest of the code.  Message and comment fixes.
10908
10909 Sun Dec 29 21:36:48 1996  Ben Pfaff  <blp@gnu.org>
10910
10911         * error.c: [__CHECKER__] (induce_segfault) Flushes output streams.
10912
10913         * heap.c: (heap_delete) New argument.
10914
10915         * sort.c: Finished implementation of external sort.
10916
10917         * vfm.c: (read_from_disk) Returns after a disk error.
10918
10919 Sun Dec 22 23:10:39 1996  Ben Pfaff  <blp@gnu.org>
10920
10921         * sort.c: (static var state) Removed.
10922         (static vars max_handles, tmp_basename, tmp_extname,
10923         huffman_queue) New variables.
10924         (do_external_sort) Moved most code to new functions.
10925         Creates huffman_queue.
10926         (allocate_file_handles, allocate_cases) New functions.
10927         (static vars run_no, run_length, file_index, case_count) New
10928         variables. 
10929         (output_record) Returns success.  Now really writes to the output
10930         file.
10931         (begin_run, end_run) New functions.
10932         (write_initial_runs) Returns success.  Initializes run_no to -1.
10933         Calls begin_run(), end_run() at appropriate times.  Outputs debug
10934         messages.
10935         (write_to_sort_cases) Calls begin_run(), end_run() at appropriate
10936         times.
10937         (merge) New function.
10938
10939         * heap.c, heap.h: New files.  Hopefully in near-final form.
10940
10941 Sat Dec 21 21:51:04 1996  Ben Pfaff  <blp@gnu.org>
10942
10943         * glob.c: Added write_active_file to global vars.
10944
10945         * sort.c: Several new miscellaneous static variables.
10946         (cmd_sort_cases) Big comment fix.
10947         (perform_case_2) Renamed `do_external_sort' and completely
10948         rewritten.
10949         (case_2_proc_func) Removed.
10950         (output_record, write_initial_runs, write_to_sort_cases,
10951         compare_record) New functions.
10952
10953         * vfm.c: [DEBUGGING] (index_to_varname) Excised bit rot.
10954
10955 Tue Dec 17 18:57:59 1996  Ben Pfaff  <blp@gnu.org>
10956
10957         * sort.c: (perform_case_2) Changed the method for allocation of
10958         lots of memory--now allocates one case at a time in hopes that
10959         more cases can be allocated with heavily fragmented memory.
10960
10961         * var.h: (write_active_file) New global var.
10962
10963         * vfm.c: (procedure, close_active_file, write_case,
10964         SPLIT_FILE_procfunc) Now allow beginfunc, procfunc, and endfunc
10965         arguments to procedure() to be NULL.  All references to
10966         procedure() that made use of dummy functions were changed to NULL
10967         functions.
10968         (open_active_file) If write_active_file is non-NULL, the output
10969         device becomes DEV_PGM (a new enum).
10970         (close_active_file) Sets write_active_file to NULL.
10971         (read_from_memory) Comment fix.
10972         (record_case) Calls write_active_file() when the output device is
10973         DEV_PGM.
10974
10975 Sun Dec 15 15:32:16 1996  Ben Pfaff  <blp@gnu.org>
10976
10977         * sort.c: New file.
10978
10979         * autorecode.c: (cmd_autorecode) Fixed parsing of options.
10980         Fixed checking for duplicate varnames.
10981         (recode) xmalloc()'s the transformation instead of arena_alloc()'ing
10982         it.
10983         (autorecode_trns_free) Destroys hash tables for each recoding
10984         specification.
10985         (autorecode_proc_func) Compares NULL to *vpp instead of vpp.
10986
10987         * command.c: Added SORT CASES to cmd_table.
10988         (null_func, null_int_func) Prototyped.
10989
10990         * descript.g: (calc_weight, calc_noweight) Computes own case
10991         number now.
10992         
10993         * frequencies.q: (dump_statistics) Fixed problem with
10994         too-few-cases warning message.
10995
10996         * get.c: (cmd_save_internal) Handles weighting properly.
10997
10998         * hash.c: (hsh_dump) Output format changed.
10999         (force_hsh_insert) Actually works now, prototype changed.
11000
11001         * list.q: (static var case_num) New variable.
11002         (cmd_list) Initializes case_num.
11003         (list_cases) Increments case_num.
11004
11005         * var.h: Added definitions for SORT CASES.  Comment fixes.
11006
11007         * vfm.c: Some definitions moved to new file vfmP.h.  Comment
11008         fixes.  `active' renamed vfm_active, `rep' renamed
11009         vfm_replacement, all references changed.
11010         (procedure) The procfunc no longer receives a case number.  All
11011         references changed.
11012         (write_case) Subtle reordering.
11013         (SPLIT_FILE_procfunc) Counts cases differently.  Slightly less
11014         redundant.
11015
11016         * weight.c: (get_weighting_variable) New function.
11017
11018         * vfmP.h: New file with definitions from vfm.c.
11019
11020 Sat Dec 14 10:35:30 1996  Ben Pfaff  <blp@gnu.org>
11021
11022         * command.c: (FILE_TYPE_okay) Commented out some tests because
11023         they're clumsy and not yet needed.
11024
11025         * var.h: Most *_trns structures moved to their respective source
11026         files.  Some were moved into a new file, do-ifP.h.  Comment fixes.
11027         (union any_trns) Changed to a typedef for trns_header.
11028         (struct input_program_pgm) Removed.
11029
11030         * vars-prs.c: (parse_variables) Only local_free()'s bits if it
11031         was allocated in the first place.
11032
11033 Fri Dec 13 21:30:53 1996  Ben Pfaff  <blp@gnu.org>
11034
11035         * autorecode.c: New file.
11036         
11037         * command.c: Added AUTORECODE to command table; re-enabled SET.
11038
11039         * data-out.c: (convert_F) Handles infinities and NaNs properly.
11040
11041         * error.c: (vmsg) Comment fixes.
11042
11043         * hash.c: Comment fix.
11044         (hashpjw_d) New function.
11045         (hashpjw) Reimplemented as call to more general function
11046         hashpjw_d().
11047         (internal_comparison_fn) Initializes pointers properly.
11048         (hsh_sort) [GLOBAL_DEBUGGING] New debugging code.
11049         (force_hsh_insert, force_hsh_find) New debugging wrapper
11050         functions.
11051
11052         * main.c: (main) Message fix.
11053
11054         * output.c: (outp_read_devices) Message fix.
11055
11056         * set.q: Comment fixes.
11057         (custom_results) Implemented Wnd/X form of subcommand.
11058         (set_routing) New function.
11059         (internal_cmd_set) Implemented ERRORS, MESSAGES.
11060
11061         * settings.h: (SET_ROUTE_*) New enum series.
11062         (set_results) Renamed set_results_file, all references changed.
11063         (set_messages) Removed.
11064         (glob vars set_errors, set_messages, set_results) New vars.
11065
11066         * title.c: (get_title) Remembers to xstrdup() the result of
11067         get_rest_of_line().
11068
11069         * var.h: (arc_item, arc_spec, autorecode_trns) New structures for
11070         use by AUTORECODE.
11071         (union any_trns) New element `arc'.
11072
11073 Fri Dec  6 23:53:47 1996  Ben Pfaff  <blp@gnu.org>
11074
11075         * command.c: (output_line) Removed references to set_screen.
11076
11077         * error.c: (static var terminating) New var.
11078         (hcf) Sets terminating to 1.
11079         (vmsg) If terminating is nonzero, does not attempt to call hcf().
11080         This prevents an infinite loop if an error occurs within hcf().
11081
11082         * expr-evl.c: (evaluate_expression) [__CHECKER__] Replaced case
11083         statement circumlocution with `case 42000' trick.
11084         (evaluate_expression) New support for OP_STR_MIS.
11085
11086         * expr-opt.c: (evaluate_expression) [__CHECKER__] Replaced case
11087         statement circumlocution with `case 42000' trick.
11088         (dump_node) Handles OP_STR_MIS.
11089
11090         * expr-prs.c: (MISSING_func, SYSMIS_func) Rewrote to handle string
11091         variables exceptions.
11092         (parse_function) Message fix.
11093         (ops[]) Added OP_STR_MIS.
11094
11095         * expr.h: Added OP_STR_MIS to OP_* enum.  Comment fixes.
11096
11097         * exprP.h: [__CHECKER__] Removed case statement circumlocution.
11098
11099         * glob.c: Removed set_scrnfile glob var.
11100         (init_glob) set_errorbreak set to 0 by default.
11101
11102         * groff-font.c: Changed included files.
11103         (groff_read_font) Initializes font_arena local var correctly.
11104         (default_font) New function.
11105
11106         * output.c: Comment fixes.
11107         (glob var disabled_devices) New variable.
11108         [GLOBAL_DEBUGGING] (static var iterating_driver_list) New
11109         variable.
11110         [GLOBAL_DEBUGGING] (reentrancy) New function.
11111         [GLOBAL_DEBUGGING] (outp_read_devices, outp_done, find_driver,
11112         outp_iterate_enabled_drivers) Calls to reentrancy().
11113         (destroy_list) New function.
11114         (outp_done) Moved code to destroy_list().
11115         (parse_options) Parses `listing', `screen', `printer' options
11116         internally.
11117         (configure_driver) Sets new `device' member of driver.
11118         (outp_iterate_enabled_drivers, outp_enable_device) New functions.
11119
11120         * output.h: Comment fixes.  New enum series OUTP_DEV_*.
11121         (struct outp_driver_struct) New member `device'.
11122
11123         * postscript.c: (find_encoding_file) Doesn't display its own error
11124         messages.
11125         (default_encoding) New function.
11126         (switch_font) Calls default_encoding() if no encoding can be
11127         found.
11128         (text) Makes up a character metric if none exists for the desired
11129         character.
11130         (load_font) Properly copies a fallback filename.  Calls
11131         default_font() for a font if none at all are known.
11132
11133         * set.q: Comment fixes.  Removed OUTPUT subcommand.
11134         (custom_listing) Calls outp_enable_device() to enable/disable
11135         listing device.
11136         (turn_screen_on) Removed.
11137         (internal_cmd_set) Calls outp_enable_device() to enable/disable
11138         screen, printer devices.
11139
11140         * settings.h: Comment fixes.
11141         (glob vars set_output, set_printer, set_screen, set_scrnfile)
11142         Removed.
11143
11144         * som-high.c: (som_submit_table, som_eject_page) Use
11145         outp_iterate_enabled_drivers() instead of iterating
11146         outp_driver_list directly.
11147
11148 Wed Dec  4 21:34:17 1996  Ben Pfaff  <blp@gnu.org>
11149
11150         * data-in.c: (parse_EDATE, parse_SDATE) New functions.
11151         (parse_string_as_format) Handles new formats.
11152         (parse_numeric) Now handles DOT and PCT formats.
11153
11154         * data-out.c: (convert_E, convert_F, insert_commas) Handle DOT
11155         format now.
11156         (convert_date) Handle EDATE and SDATE formats.
11157         (convert_CCx) Now if there's not room for the currency characters,
11158         converts it as F format if it's positive instead of giving up
11159         quickly.  Also fixed save-and-restore bug with decimal point
11160         characters.  
11161         (convert_format_to_string) Handles new formats.
11162
11163         * misc.c: (formats[]) Added new formats.
11164         (convert_fmt_ItoO) Supports new formats.
11165
11166         * sfm-read.c: (parse_format_spec) Supports new formats.  Better
11167         data checking.  New argument, all references changed.
11168
11169         * sfm-write.c: (write_format_spec) Supports new formats.
11170
11171         * var.h: New formats FMT_DOT, FMT_PCT, FMT_EDATE, FMT_SDATE.
11172         Comment fixes.
11173
11174 Sun Dec  1 17:19:00 1996  Ben Pfaff  <blp@gnu.org>
11175
11176         * cmdline.c: Comment fixes.
11177         (parse_command_line) Changed return type to void.
11178
11179         * data-in.c: (parse_string_as_format) Added FMT_CCA...FMT_CCE to
11180         switch.
11181         (parse_numeric) Handles international numbers (comma as decimal
11182         point).  Some reformatting.
11183
11184         * data-list.c: (parse_free) Default output format is now
11185         set_format instead of hard-coded F8.2.
11186         (read_from_data_list_list) Emits error message on undefined data
11187         only if set_undefined is nonzero.
11188
11189         * data-out.c: (convert_E) Changes decimal point from period to
11190         comma if appropriate.  Restructured.  Better comments.
11191         (convert_F) Changes decimal point from period to comma if
11192         appropriate.
11193         (insert_commas) Major bug with handling of negative values fixed.
11194         Also, inserts periods instead of commas if appropriate.
11195         (convert_CCx) New function.
11196         (convert_format_to_string) Added FMT_CCA...FMT_CCE to switch.
11197         (num_to_string) Changed `.' to set_decimal.
11198
11199         * dfm.c: Comment fixes.
11200         (dfm_close) Frees ext->line even in inline_file.
11201         (open_inline_file) New function.
11202         (open_file_r) When opening the inline file: now properly
11203         recognizes `BEGIN DATA.' line, and calls open_inline_file() to
11204         finish up.
11205         (read_record) Calls fh_close_handle() instead of dfm_close() to
11206         close the inline file.  Makes a copy of the line getl_buf to avoid
11207         interlock problems.
11208         (dfm_get_record) Restructured.  Now checks the return value of
11209         open_file_r().
11210         (cmd_begin_data) Moved open code into open_inline_file().  Relaxed
11211         checking for use of inline file.  No longer tries to close inline
11212         file.
11213
11214         * error.c: (glob var error_already_flagged) New var.
11215         (vmsg) Message change.  Now checks max number of errors/warnings,
11216         acts on it.
11217
11218         * file-handle.q: (fh_handle_name) Now allows closing of
11219         inline_file.
11220         (fh_init_files) Reformatted.
11221
11222         * get.c: (trim_dictionary) Checks SCOMP option instead of COMP.
11223
11224         * getline.c: (getl_include) Fixed bug that popped up when called
11225         when file queue was empty.
11226         (read_console) Resets error_count, warning_count,
11227         error_already_flagged to zero.
11228
11229         * glob.c: Many changes to update list of variables.
11230         (init_compat_dependent) Now this function is called whenever
11231         `compat' changes.  It now sets set_seed only if it hasn't
11232         previously been referenced.  It now calls
11233         lex_init_compat_dependent().
11234
11235         * include.c: (cmd_include_at) Frees temporary buffer instead of
11236         line buffer.  
11237         (cmd_include) Doesn't make copy of include file name.
11238
11239         * lexer.c: Comment fixes.
11240         (init_lex) Moved some code into new function
11241         lex_init_compat_dependent().
11242         (lex_init_compat_dependent) New function.
11243         (hex_val) Simplified.
11244         (preprocess_line) Uses set_endcmd instead of hardcoding `.'.
11245
11246         * main.c: Comment fixes.
11247         (main) Reformatted.
11248
11249         * misc.c: (formats[]) Added FMT_CCA...FMT_CCE.
11250         (check_input_specifier) Disallows FMT_CCA...FMT_CCE.
11251         (convert_fmt_ItoO) Detects FMT_CCA...FMT_CCE.
11252         (setup_randomize) Sets set_seed_used.
11253
11254         * set.q: Comment fixes.
11255         (custom_results) Conditionalizes on `compat'.
11256         (custom_log) Calls custom_journal().
11257         (set_ccx) New function.
11258         (cmd_set) Calls init_compat_dependent() when `compat' changes.
11259         Calls set_ccx() to handle CCA...CCE.  Sets set_grouping
11260         when set_decimal changes.  Range-checks values for MITERATE,
11261         MNEST.  Message fixes.
11262
11263         * settings.h: Comment fixes.
11264         (struct set_cust_currency) New struct.
11265         (set_cc[], set_grouping, set_seed_used) New global vars.
11266
11267         * var.h: (FMT_CCA...FMT_CCE) New output formats.
11268         (FCAT_OUTPUT_ONLY) New FCAT_* constant.
11269
11270 Thu Nov 28 23:14:07 1996  Ben Pfaff  <blp@gnu.org>
11271
11272         * glob.c: Revised variables to correspond to settings.h.
11273         (init_glob) Initializes variables from settings.h properly.
11274
11275         * set.q: Began long-overdue major revision to correspond to new
11276         philosophy.  Most code changed. 
11277
11278         * settings.h: Mostly changed; reorganized, reordered, large new
11279         comment.
11280
11281 Thu Nov 28 19:46:10 1996  Ben Pfaff  <blp@gnu.org>
11282
11283         * get.c: (cmd_save_internal) No longer forces compression off.
11284
11285         * sfm-read.c: (read_compressed_data) If eof is reached when
11286         reading a new instruction octet, only signal error if we're in the
11287         middle of a case.
11288
11289         * sfm-write.c: (COMPRESSION_BIAS) New #define.
11290         (struct sfm_fhuser_ext) New member `end'.
11291         (write_header) Refers to COMPRESSION_BIAS instead of magic 100.0.
11292         (ensure_buf_space) New function.
11293         (sfm_write_case) Reimplemented in order to support compression.
11294         (sfm_close) Writes out the remaining contents of the compression
11295         buffer if any.
11296
11297 Wed Nov 27 23:18:35 1996  Ben Pfaff  <blp@gnu.org>
11298
11299         * command.c: Defined SAVE and XSAVE commands in command table.
11300
11301         * common.h: second_lowest_value is of type flt64, not double.
11302
11303         * file-handle.h: Comment fix.
11304
11305         * get.c: Comment fixes.
11306         (static var `trns') New.
11307         (save_write_case_func, save_trns_proc, save_trns_free, null_func,
11308         cmd_save_internal, cmd_save, cmd_xsave) New functions.
11309         (dict_delete_run) Clears the variables and frees them now.
11310         (trim_dictionary) Sets default for compression.
11311         On KEEP subcommand, frees deleted variables as well as clearing
11312         them.  Finally got the sense of the test for deleting all
11313         variables correct.
11314         [DEBUGGING] (dump_dict_variables) Message fix.
11315
11316         * glob.c: (init_glob) set_compression set to 1 by default.
11317
11318         * list.q: Properly #includes config.h.
11319
11320         * misc.h: New macro REM_RND_UP.
11321
11322         * settings.h: Comment fix.
11323
11324         * sfm-read.c: (structs sysfile_header, sysfile_format,
11325         sysfile_variable; inline function bswap_int32) Moved to new file
11326         sfmP.h.
11327         (corrupt_msg) [__CHECKER__] No longer induces segfault.
11328         (sfm_read_dictionary) Fixed bug caused by failing to initialize
11329         var_by_index.
11330         (read_machine_flt64_info) Fixed some problems caused by confusion
11331         between flt64 and double types.
11332         (read_header) Message fix.
11333         (read_variables) Fixed set of cases in which we byte-swap sv.print
11334         and sv.write.  Fixed confusion of flt64 and double.
11335
11336         * sfm.h: (struct sfm_write_info) New.
11337
11338         * som-high.c: (som_draw_title) Properly frees `s'.
11339
11340         * temporary.c: (save_dictionary) Comment fix.
11341
11342         * var.h: Comment fixes.  New FMT_* enum, FMT_NUMBER_OF_FORMATS.
11343         (struct trns_header) Formatting fix.
11344         (struct save_trns) New.
11345
11346         * vars-atr.c: (discard_variables) Comment fix.
11347
11348         * sfm-write.c: New file, baseline release.
11349
11350         * sfmP.h: New file, baseline release.
11351
11352 Sun Nov 24 14:53:53 1996  Ben Pfaff  <blp@gnu.org>
11353
11354         * cmdline.c: (parse_command_line) `--version' output updated.
11355         (glob var syntax_message[]) Added my e-mail address.
11356
11357         * file-handle.q, lexer.c, vfm.c: Changed many instances of
11358         `illegal' to `invalid'.
11359
11360         * sfm-read.c: (struct sfm_fhuser_ext) New fields used as
11361         uncompression buffer.
11362         (sfm_close) Frees decompression buffer.
11363         (sfm_read_dictionary) Initializes decompression buffer.
11364         (buffer_input, read_compressed_data) New functions.
11365         (sfm_read_case) Restructured; now calls read_compressed_data() to
11366         handle compressed system file data.
11367
11368         * var.h: Comment fix.
11369
11370 Mon Nov 11 15:34:09 1996  Ben Pfaff  <blp@gnu.org>
11371
11372         * dfm.c: (dfm_close) Does not set h->{ext,class} because the
11373         caller handles it.
11374          
11375         * get.c: New comments.  New static var `get_file'.
11376         (cmd_get) Now fully implemented.  Calls discard_variables();
11377         initializes fv and lv for all variables; new debug code; sets
11378         up the dictionary; sets up the input program.
11379         (read_from_get, cancel_get) New functions.
11380
11381         * sfm-read.c: Comment fixes.
11382         (sfm_close) New static function.
11383         (sfm_read_dictionary) Properly sets up the class of the
11384         file_handle.  No longer cares what size the data is in records of
11385         type 7.  Also, on failure, properly cleans up the file_handle and
11386         free()s some stuff.
11387         (read_variables) No longer thinks it knows `nval' of the
11388         dictionary.  Now sets p.get.fv, etc., instead of speculatively
11389         setting fv itself.
11390         (read_value_labels) Fixed off-by-one error in indexing of
11391         var_by_index[].
11392         (sfm_read_case) New function.
11393         (sfm_r_class) New static var.
11394
11395         * var.h: (get_proc) New struct.
11396         (struct variable) New member p.get.
11397
11398 Thu Nov  7 20:52:28 1996  Ben Pfaff  <blp@gnu.org>
11399
11400         * get.c: Removed GTSV_OPT_MAP because of a misinterpretation of
11401         the manual's meaning.
11402         (rename_variables) New function.
11403         (trim_variables) Doesn't try to parse MAP any more.  Removed debug
11404         code.  Now properly reorders the dictionary on the KEEP keyword.
11405
11406         * sfm-read.c: (read_value_labels) Fixed some bugs regarding
11407         garbage collection.
11408
11409         * vars-atr.c: (clear_variable) New argument `dictionary *'.
11410         (rename_variable) New function.
11411         (free_val_lab) Reformatted.
11412
11413 Thu Nov  7 17:29:16 1996  Ben Pfaff  <blp@gnu.org>
11414
11415         * var.h: Reindented entire file.  Comment fixes.
11416         (glob vars var, var_by_name, nvar, N, nval, n_splits, splits)
11417         Removed.
11418         (glob var default_dict) New.
11419         (struct indirect_dictionary) Removed.
11420
11421         * Many other source files were changed to add `default_dict.'
11422         before all references to the dictionary of the active file.
11423         
11424         * vars-atr.c: (make_indirect_dictionary) Removed.
11425
11426         * glob.c: Reindented all variable declarations.  Updated for
11427         changed var.h.  Comment fixes.
11428
11429         * temporary.c: (restore_dictionary, save_dictionary) Simplified
11430         because now we can mainly copy dictionary structs.
11431
11432         * vars-prs.c: (is_dict_varname, parse_dict_variable,
11433         parse_variables) Takes dictionary instead of indirect_dictionary
11434         first argument.
11435         (parse_variables) Instead of calling make_indirect_dictionary,
11436         just sets DICT to &default_dict if DICT is NULL.  Of course, lots
11437         of `*dict.' references had to be changed to `dict->'.  Removed
11438         debug code.
11439
11440 Thu Nov  7 15:48:52 1996  Ben Pfaff  <blp@gnu.org>
11441
11442         * get.c: Added GTSV_OPT_* series of enums.
11443         (trim_dictionary, dict_delete_run) New functions.
11444         [DEBUGGING] (dump_dict_variables) New function.
11445         (cmd_get) Calls trim_dictionary() to get dictionary fully set-up.
11446         [DEBUGGING] Calls dump_dict_variables() to display results.
11447
11448         * glob.c: (cmp_variable) Now a public function declared in var.h.
11449
11450         * sfm-read.c: Turned off debug code.  Comment fixes.
11451         (read_machine_int32_info, read_machine_flt64_info) New functions
11452         to parse type 7 records.
11453         (sfm_read_dictionary) Properly byteswaps several fields now.
11454         Calls read_machine_*_info() to parse type 7 subtypes 3 and 4
11455         records.  [DEBUGGING] Dumps dictionary.
11456         (read_variables) Sets `index' field of variables created properly.
11457         Constructs avl tree of variables in dictionary.  [DEBUGGING] No
11458         longer dumps dictionary.
11459         (read_value_labels) Properly byteswaps fields.  [DEBUGGING] New
11460         debug code.
11461         [DEBUGGING] (dump_dictionary) No longer stubbed out.
11462
11463         * temporary.c: (restore_dictionary) Destroys `var_by_name' glob
11464         var before destroying any variables just to save a little time.
11465
11466         * var.h: (struct variable) Reordered in order to make name[] the
11467         first member; this makes pointers to `variable' pointers to the
11468         variable name, simplifying avl trees, etc.
11469         (struct indirect_dictionary) New struct.
11470
11471         * vars-atr.c: (find_variable) Rewritten for efficiency.
11472         (make_indirect_dictionary, is_dict_varname, parse_dict_variable)
11473         New functions.
11474         (is_varname) Rewritten for efficiency.
11475         (parse_variables) New argument, which is a `dictionary *'.  All
11476         references changed.  This function now reads variable names from
11477         the dictionary passed, or from the default dictionary if NULL.
11478
11479 Tue Nov  5 18:34:59 1996  Ben Pfaff  <blp@gnu.org>
11480
11481         * misc.h: Added new macro DIV_RND_UP to perform integer division,
11482         rounding up.  Changed many references to ROUND_UP to use this
11483         instead.
11484
11485         * sfm-read.c: Includes avl.h.
11486         (corrupt_msg) Induces a segfault under Checker.
11487         (macro assertive_bufread) New.  Many references to bufread() now
11488         use this instead.
11489         (sfm_read_dictionary) Split up into several functions.  Added code
11490         to read dictionary records following the the type 2 records.  Not
11491         quite complete.  New variable `var_by_index'.
11492         (read_header, read_variables) New functions extracted from
11493         sfm_read_dictionary().
11494         (read_value_labels) New function.
11495         (bufread) Checks ferror() if fread() doesn't return the expected
11496         value; if ferror() is zero it's just EOF.
11497         (dump_dictionary) Stubbed out.
11498
11499         * BTW: The source code now exceeds 50000 lines!
11500         
11501 Mon Nov  4 22:03:28 1996  Ben Pfaff  <blp@gnu.org>
11502
11503         * command.c: Added GET to cmd_table[].
11504
11505         * list.q: Removed reference to alloca headers.
11506         (cmd_list) Gave prototype.
11507
11508         * sfm-read.c: Added DEBUGGING comments.
11509         (sfm_read_dictionary) Checks bias correctly.  Sets
11510         dict->var_by_name to NULL.  Calculates long_string_count
11511         correctly.  realloc's dict->var[] array to minimum size.
11512         [DEBUGGING] Calls dump_dictionary.
11513         [DEBUGGING] (dump_dictionary) New function.
11514
11515         * temporary.c: (save_dictionary) Sets var_by_name to NULL.
11516         (restore_dictionary) If the dictionary contains a non-NULL
11517         var_by_name, uses that instead of generating one.
11518         (free_dictionary) Destroys var_by_name.
11519
11520         * var.h: (struct dictionary) Added field `var_by_name'.
11521
11522         * get.c: New file, not complete.
11523
11524 Sun Nov  3 12:24:36 1996  Ben Pfaff  <blp@gnu.org>
11525
11526         * mis-val.c: New enums MV_NOR_*.  New struct num_or_range.
11527         (parse_num_or_range) New function.
11528         (parse_numeric) Reimplemented in order to support LOW THRU <n> and
11529         <n> THRU HIGH missing values.
11530
11531         * output.h: [__GNUC__>1 && __OPTIMIZE__] (width, height) Made
11532         __attribute__((const)).
11533
11534         * q2c.c: (get_token) Merged isdigit || isalpha into isalnum.
11535
11536         * sfm-read.c: Finished reference implementation.
11537
11538         * sfm.h: Includes var.h.
11539
11540         * var.h: Comment fixes.
11541         (struct `variable') Reordered some fields.
11542
11543         * vars-atr.c: (is_num_user_missing) Added support for MISSING_*
11544         constants added previously.
11545
11546 Wed Oct 30 17:13:08 1996  Ben Pfaff  <blp@gnu.org>
11547
11548         * common.h: Comment fixes.  Added declaration of
11549         `second_lowest_value' as variable or macro.  Made `compat_type',
11550         `pgm_state_type' into anonymous enums.
11551
11552         * display.c: Comment fix.
11553
11554         * glob.c: [ENDIAN==UNKNOWN] Added definition for `endian' global
11555         var.
11556         [!defined SECOND_LOWEST_VALUE] Added definition for
11557         `second_lowest_value' global var.
11558         (compat, pgm_state global vars) Changed types to `int'.
11559         (init_glob) Initializes `second_lowest_value'.
11560
11561         * sfm-read.c: Continued work, not complete.
11562
11563         * var.h: Added new MISSING_* constants to handle LOWEST and
11564         HIGHEST.
11565
11566 Sat Oct 26 23:06:06 1996  Ben Pfaff  <blp@gnu.org>
11567
11568         * sfm-read.c: New file, not complete.
11569
11570         * cases.c: (vec_insert) Changed vector expansion algorithm.
11571         (vec_delete) Fixed bug that screwed up deletion sometimes, it was
11572         mucking up the RECODE transformation in particular.
11573         (envector) Harmless change in notation.
11574
11575         dfm is now fairly well tested again.  
11576         * dfm.c: (dfm_get_record) Only returns ext->ptr if ext is
11577         non-NULL--duh.
11578         (cmd_begin_data) if(ext->line) replaced by if(ext && ext->line).
11579
11580         * recode.c: Comment fix.
11581
11582         * sfm.h: Interface should be fairly final now, or at least for a
11583         day or so...
11584
11585         * vfm.c: [DEBUGGING] (index_to_varname) New function.
11586         (open_active_file) [DEBUGGING] Translates ccase indices into
11587         variable names now to make it easier to understand what's really
11588         going on.
11589
11590 Sat Oct 26 20:46:31 1996  Ben Pfaff  <blp@gnu.org>
11591
11592         * data-in.c: Comment fix.
11593
11594         * data-list.c: Includes dfm.h.
11595         (do_reading) Uses new function dfm_push_cust().
11596
11597         * data-out.c: (convert_time, convert_WKDAY, convert_MONTH) Added
11598         `return 1;' at end.
11599
11600         * file-handle.h: Completely changed.  Some parts split off into
11601         new file dfm.h.  Implemented in file-handle.q.
11602         (enum FH_*) Removed.
11603         (struct fh_ext_class) New struct.
11604         (struct file_handle) Retained only these fields: name, norm_fn,
11605         fn, recform, lrecl, mode.  New fields class, ext.
11606         (get_handle_by_name, get_handle_by_filename, parse_file_handle,
11607         close_handle, handle_name) Added `fh_' prefix to name, all
11608         references changed.
11609
11610         * dfm.h: New file, implemented in dfm.c.
11611         (get_record, put_record, fwd_record, bkwd_record, set_record,
11612         get_cur_col) Functions moved from file-handle.h, now prefixed with
11613         `dfm_'.
11614         (dfm_push_cust) New function.
11615
11616         * sfm.h: New file.  Incomplete.
11617
11618         * dfm.c: All functions adjusted/rewritten for new dfm/fhp
11619         interface.  Functions reordered, comments changed.  Not well
11620         tested, probably full of bugs.
11621         (struct dfm_fhuser_ext) New struct.
11622         (dfm_close) New function.
11623         (open_file_r) Pickier about finding `BEGIN DATA.' line.
11624         (open_file_w) User messages changed.
11625         (get_record) Comment fixed.
11626         (read_record) Increments ext->ln even for inline_file.  Calls
11627         dfm_close() for inline_file when `END DATA.' encountered.
11628         (dfm_get_record) Experimental restructuring.
11629         (dfm_push_cust) New function.
11630         (cmd_begin_data) Detects whether the inline file was fully read by
11631         checking whether it is still open; detects whether it was read at
11632         all by checking whether the line number is greater than zero.
11633
11634         * file-handle.q: All functions adjust/rewritten for new dfm/fhp
11635         interface.  Functions reordered, comments changed.  Not well
11636         tested, probably full of bugs.
11637         (init_file_handle) Removed initializers for obsolete fields, added
11638         new fields.
11639         (fh_close_handle) Much simpler, now mainly calls the class
11640         function.
11641         (fh_init_files) Renamed inline file internal filename.
11642
11643         * file-type.c: Includes dfm.h.
11644         (read_from_file_type) Doesn't use dfm internal state anymore.
11645
11646         * inpt-pgm.c, print.c: Include dfm.h.
11647
11648         * recode.c: (internal_cmd_recode) Casts strlen() return value to
11649         int in comparison with other int.
11650
11651         * som-high.c: (build_target) Fixed operator precedence problem in
11652         if statement (& versus ==).
11653
11654 Sat Oct 26 10:39:25 1996  Ben Pfaff  <blp@gnu.org>
11655
11656         * dfm.c: (read_record) Can now read fixed-length records; not
11657         tested.
11658         (put_record) Can now write fixed-length records; not tested.
11659
11660         * file-handle.h: FH_* defines changed to enums.  New enum series
11661         FH_RF_*, FH_MD_*.
11662         (struct file_handle) New members recform, lrecl, mode.
11663
11664         * file-handle.q: Parser changed.
11665         (internal_cmd_file_handle) Added support for new /RECFORM, /MODE,
11666         /LRECL subcommands.  These are compatible with Windows.
11667         (init_file_handle) Initializes recform, mode fields.
11668
11669         * q2c.c: (get_line) When outputting `!' comment lines, now
11670         increments the output file line number so that `#line' directives
11671         are correct.
11672         (make_identifier) New function that converts an arbitrary string
11673         into a valid C identifier.
11674         (dump_vars) Calls make_identifier() in two places in order to
11675         suppress some errors for bad identifiers.
11676         (make_match) Allows TRUE as synonym for YES and FALSE as synonym
11677         for NO.  Allows numbers to be prefixed by underscores to make them
11678         acceptable C identifiers but still to be parsed as numbers by the
11679         Fiasco lexer.
11680
11681 Thu Oct 24 20:13:42 1996  Ben Pfaff  <blp@gnu.org>
11682
11683         * command.c: Re-enabled RECODE, SAMPLE, SELECT IF.
11684         
11685         * dfm.c: Comment fixes. (get_record) Gives error if file handle
11686         was opened for writing.
11687         (open_file_w) New function.
11688         (read_record) Uses strncasecmp if available.  Improved error
11689         messages, comments.
11690         (put_record) New function.
11691
11692         * file-handle.h: Moved function comments into dfm.c and
11693         file-handle.q.  Comment fixes.  Removed declarations of
11694         tilde_expand() and normalize_filename().
11695         (struct file_handle) Changed `open' from boolean to enumerated
11696         field to allow for three states--closed, open for reading, open
11697         for writing--all references changed.
11698
11699         * file-handle.q: Includes filename.h.
11700
11701         * print.c: (CMD_* enums) Renamed PRT_* and moved into var.h; all
11702         references changed.
11703         (alloc_line) Makes allowance for line terminator characters in
11704         calculations.
11705         (print_trns_proc) Now handles OUTFILE, WRITE differences.
11706         (print_space_trns_proc) Handles OUTFILE differences.
11707
11708         * recode.c, sample.c: Comment fixes.
11709
11710         * var.h: (struct print_trns) Changed boolean field `eject' to
11711         bitmapped field `options'; all references changed.  New enums
11712         PRT_* for use with this field.
11713
11714         * exception.h, test-exception.c: Removed.
11715
11716 Thu Oct 24 17:47:14 1996  Ben Pfaff  <blp@gnu.org>
11717
11718         * ascii.c: (delineate) Turned off debug output.
11719
11720         * common.c: [Checker and Linux] (__assert_fail, __eprintf) Moved
11721         to error.c.
11722
11723         * data-in.c: (parse_string_as_format) Sets the entire string value
11724         to spaces, not just the short string part of it.  Is this correct
11725         now? 
11726
11727         * data-out.c: (convert_date) Fixed DATETIME format problems with
11728         decimal places, removed debug code.
11729
11730         * dfm.c: (open_file_r) Fixed bug where an error would occur in the
11731         middle of parsing BEGIN DATA that would cause the lexer to read
11732         from a wild pointer `prog'; now calls new function
11733         preprocess_line() in lexer.c.
11734
11735         * error.c: [__CHECKER__] (hcf) Calls induce_segfault() on improper
11736         termination.
11737         [Checker and Linux] (__assert_fail, _eprintf) Moved from common.c.
11738         Now call induce_segfault() to induce the segfault.
11739         (induce_segfault) New function.
11740
11741         * expr-opt.c: Comment fix.
11742         (parse_sysvar) New function.
11743         (parse_primary) Added system variable support--calls
11744         parse_sysvar().
11745         (global var ops) Added OP_CASENUM operator.
11746
11747         * expr.h: Comment fixes.
11748         (OP_* enum) added OP_CASENUM operator.
11749         (struct casenum_node) New struct.
11750         (union any_union_union) New member `cas' of type `casenum_node'.
11751
11752         * glob.c: (global var last_vfm_invocation) New var.
11753         (init_glob) Initializes last_vfm_invocation.
11754
11755         * lexer.c: (lookahead) Fixed reversed condition on if statement.
11756
11757         * getline.c: (get_line) Split into get_line() and preprocess_line().
11758         (preprocess_line) New function.
11759
11760         * var.h: Declares last_vfm_invocation.
11761
11762         * vfm.c: (procedure) Sets last_vfm_invocation.
11763
11764 Wed Oct 23 21:53:43 1996  Ben Pfaff  <blp@gnu.org>
11765
11766         * command.c: (parse_cmd) Fixed bad assertion related to
11767         lookahead().
11768
11769         * data-in.c: (parse_month) Implemented to parse months according
11770         to full interpretation of standard.
11771         (to_roman) New function.
11772         (parse_wk_delimiter) Bug fix (forgot to skip `WK' in string).
11773         (parse_weekday) Bug fix (forgot to skip all the day name).
11774
11775         * data-list.c: (read_from_data_list_fixed) Fixed bug that screwed
11776         up parsing of multirecord data items.  Also fixed user message.
11777
11778         * data-out.c: Comment fix.
11779         (year2, year4, convert_date, convert_time, convert_WKDAY,
11780         convert_MONTH) New functions to support time & date output.
11781         (convert_format_to_string) Calls new time & date output routines.
11782
11783         * expr-prs.c: (nary_num_func) Found a bug, but didn't fix it yet.
11784
11785         * lexer.c: (lookahead) Noted a previously unnoticed caveat in
11786         comment.
11787
11788         * main.c: [DEBUGGING] (dump_token) Updated to handle getline.h.
11789
11790         * misc.c: (global var formats) Fixed declarations of DATETIME,
11791         TIME, DTIME.
11792
11793         * postscript.c: (text) Fixed a pair of bugs in the reallocation of
11794         the output_char buffer.
11795
11796         * vars-prs.c: (parse_DATA_LIST_vars) Fixed a failure to free
11797         memory bug.  Fixed user messages.
11798
11799 Tue Oct 22 17:27:04 1996  Ben Pfaff  <blp@gnu.org>
11800
11801         * Removed #pragma argsused from lots of places.
11802         
11803         * data-in.c: Implemented zoned decimal and time-date formats.
11804         Untested.  This is a huge chunk of code--maybe 1000 lines and 50
11805         new functions.
11806
11807         * data-out.c: Implemented zoned decimal format.
11808
11809         * expr.h: Moved yrmoda() declaration here from exprP.h.
11810
11811         * misc.c: (global var formats) Minor fixes--added
11812         FCAT_SHIFT_DECIMAL to formats N and Z.
11813         (convert_fmt_ItoO) Added support for format Z.
11814
11815         * som-frnt.c: (som_set_value) Fixed bug regarding string values.
11816
11817 Mon Oct 21 20:39:59 1996  Ben Pfaff  <blp@gnu.org>
11818
11819         * command.c: (parse_cmd) [GLOBAL_DEBUGGING] Inserted call to
11820         som_check_workspace() that is activated between commands.
11821
11822         * data-list.c: (dump_fixed_table, dump_free_table) Finished these
11823         for good, I hope.
11824
11825         * list.q: (begin_row) Changed title expansion style from
11826         SOPT_X_VERT to SOPT_X_SHSP.
11827
11828         * som-frnt.c: Now includes `somP.h'.
11829         (som_push_workspace, som_pop_workspace) New functions that, taken
11830         together, form a solution to the recursive table building problem
11831         mentioned yesterday.  Surrounded every table output routine
11832         throughout the program with calls to these functions.
11833         [GLOBAL_DEBUGGING] (som_check_workspace) New function.
11834         (som_create_table) Checks that there's an active workspace.
11835         (som_destroy_all_tables, som_crush) Removed.
11836
11837         * som-high.c: (global var som_preserve_tables) Removed, all
11838         references deleted.
11839         (som_submit_table) Checks that there's an active workspace.
11840         (dump_columnated_table) Doesn't columnate tables that would have
11841         just one row per column.
11842         (dump_crush_page, som_dump_crush_page) Removed debugging code.
11843         (som_dump_crush_page) Moved row number labels from left side of
11844         tables to right side.
11845         (som_get_table_size) Added support for SOPT_X_SHSP.
11846
11847         * som.h: New cell expansion type SOPT_X_SHSP.
11848
11849         * somP.h: (global vars arena_stack, n_arena_stack, m_arena_stack)
11850         New vars.
11851         (global var curtab_arena) Moved from som-frnt.c.
11852
11853 Sun Oct 20 13:45:28 1996  Ben Pfaff  <blp@gnu.org>
11854
11855         * ascii.c: [GLOBAL_DEBUGGING] (SUPPRESS_WARNINGS) New debug option
11856         that causes bad location warnings to be suppressed.
11857         (delineate) Saves current font when calling draw_text(); fixed
11858         handling of NULLs when backing up.  Also fixed line-wrapping bug.
11859
11860         * command.c: Re-enabled `LEAVE', `NUMERIC', `PRINT', `PRINT EJECT',
11861         `PRINT FORMATS', `PRINT SPACE', `STRING', `TITLE', `WRITE'.
11862
11863         * common.c: Added code to cause assertion failure to dump core
11864         when run under Checker.
11865
11866         * data-list.c: (dump_fixed_table) Fixed some inconsistencies, but
11867         there are still bugs.
11868
11869         * glob.c: (__eprintf) Removed.
11870
11871         * list.q: Inserted som_preserve_tables kluge that prevents tables
11872         from being thrown away due to recursive table building through
11873         som_output_line being called from a transformation during the LIST
11874         procedure invocation.  This is a general problem that must be
11875         solved in a better way since it applies to all procedures in
11876         general.
11877         (begin_row) Changed title options to SOM_X_VERT from SOM_X_BOTH.
11878         (flush_table) Removed SOM_TOPT_PRESERVE from submission options.
11879
11880         * numeric.c: Fixed several errors in the form of msg() calls.
11881
11882         * print.c: Updated for use of som.
11883         (dump_table) Reimplemented.
11884         (print_trns_proc) Calls som_eject_page() instead of eject_page().
11885         Calls som_output_text() instead of outs_line().
11886
11887         * som-frnt.c: (som_destroy_all_tables) Sets som_preserve_tables to
11888         0.
11889         (som_output_text) Function moved from som-low.c.  Interface
11890         changed.
11891
11892         * som-high.c: (som_preserve_tables) New global public variable
11893         declared in som.h.
11894         (som_submit_table) Destroys the tables only if som_preserve_tables
11895         is 0.
11896         (paginate_horizontally) Bugfix: sets som.mpw even if there's only
11897         one subrow per row.  Now labels subrows if there's more than one
11898         subrow per row.
11899         (dump_crush_table) Added wishlist comment.
11900         (som_eject_page) New public function declared in som.h.
11901
11902         * som-low.c: (som_dump_crush_page) Draws row labels if there's
11903         more than one subrow per row.
11904         (som_output_text) Moved to som-frnt.c.
11905
11906         * som.h: (SOM_TOPT_PRESERVE) Removed.
11907
11908         * title.c: (get_title) Changed interface.
11909         (cmd_title) Changed `title' to `outp_title'.
11910         (cmd_subtitle) Changed `subtitle' to `outp_subtitle'.
11911
11912 Sun Oct 20 09:04:15 1996  Ben Pfaff  <blp@gnu.org>
11913
11914         * list.q: (flush_table) Conforms to new partial options in
11915         som_submission_form.
11916
11917         * som-high.c: (paginate_horizontally) Changed form of subrow
11918         number labels.
11919         (build_target) Omits spacing before table if
11920         SOM_TOPT_PARTIAL_OMIT_TOP is selected.
11921         (dump_crush_page) Changed interface.  Only trims bottom rule if
11922         SOM_TOPT_PARTIAL_OMIT_BTM is not selected.
11923         (dump_crush_table) Handles partial tables.
11924         (output_row_label) New function.
11925         (som_dump_crush_page) Emits subrow number labels.  Draws vertical
11926         rule on the right edge of narrow subrows.
11927
11928         * som.h: Changed SOM_SUB_PARTIAL_* series of submission type
11929         constants to a series of SOM_TOPT_PARTIAL_* submission options.
11930         All references updated.
11931
11932 Fri Oct 18 19:46:49 1996  Ben Pfaff  <blp@gnu.org>
11933
11934         * misc.c: Comment fix.
11935
11936         * som-high.c: (examine_table) Treats crushed tables separates for
11937         purpose of determining header size.
11938         (paginate_horizontally) Allots space for line numbers in crushed
11939         tables with lots of subrows per row.  Calculates the `maximum page
11940         width', the width of the widest horizontal page.
11941         (build_target) Removed trim argument; all references changed.
11942         Stricter assertions.  (dump_crush_page) New function.
11943         (dump_crush_table) Reimplemented.
11944
11945         * som-low.c: (som_dump_page) Uses new RULE_ROW &c. constants.
11946         (som_dump_crush_page) Reimplemented, interface changed.
11947
11948         * somP.h: Many many new helper macros for use with crushed tables.
11949         (global var som) Removed `tv', `cum_y' members; all references
11950         removed.  New members `mpw', `digit_space'.
11951
11952 Sun Sep 29 19:37:03 1996  Ben Pfaff  <blp@gnu.org>
11953
11954         * arena.c: (arena_alloc) [!DISCRETE_BLOCKS] Removed `size'
11955         variable, changed to constant 1024.
11956         (arena_ca_strdup) Changed `sizeof(a_string)' to
11957         `sizeof(c_string)'.
11958         (arena_ca_strdup) [!DISCRETE_BLOCKS] Changed bad cast from
11959         `(c_string *)' to `(char *)'; this fixed some offset problems.
11960
11961         * filename.c: (readlink_malloc) Changed initial allocation from
11962         100 bytes to 128.
11963         (good_getcwd) Changed from xmalloc() to local_alloc(); removed
11964         comment.
11965
11966         * postscript.c: (read_fontmap) Fixed leak by changing &owner to
11967         &fm->owner in several places.
11968
11969         * som-high.c: (output_table) Changed interface to rest of world.
11970         (examine_crush_table) Removed.  Crushed tables are re-broken now,
11971         in preparation for rewrite.
11972
11973         * som.h: Comment fix.
11974
11975 Sat Sep 28 21:28:07 1996  Ben Pfaff  <blp@gnu.org>
11976
11977         * ascii.c: (ascii_init_driver) Disposes of x->file.filename and x
11978         itself in the cleanup stage.
11979
11980         * descript.q: (display) At least temporarily, changed the table
11981         format to a crushed table.
11982
11983         * list.q: (begin_row) At least temporarily, added horizontal lines
11984         between cases.
11985
11986         * som-high.c: (examine_crush_table) Sets som.hh to the width of
11987         the horizontal "headers," that is, to the width of the far left
11988         and far right rules.
11989         (justify_pagination) Sets som.th to the width of the widest row
11990         in the crushed table.  Fixed inner loop off-by-one error.
11991
11992         * som-low.c: (som_dump_crush_page) Added code to draw horizontal
11993         rules.
11994
11995         * somP.h: Comment fix.
11996
11997 Fri Sep 27 20:08:39 1996  Ben Pfaff  <blp@gnu.org>
11998
11999         * filename.c: (open_file_ext) Now, doesn't set f->file to NULL
12000         before closing it; also, opens the constructed filename `s'
12001         instead of f->filename.
12002
12003         * postscript.c: Moved initialization of x->loaded, x->prop,
12004         x->fixed, x->current, also the add_encoding() calls, into
12005         postopen().
12006         (preclose) Destroys x->combos; sets x->loaded, x->combos to NULL;
12007         sets x->last_font to NULL; sets x->next_combo to zero.
12008
12009         * som-high.c: (crushed_row_height) Moved definition farther up.
12010         (som_submit_table) Doesn't calculate line width, font size until
12011         after calling open_page(), to accomodate changes to PostScript
12012         driver.
12013         (vert_headers) Removed; equivalent functionality moved to
12014         examine_table(), examine_crush_table().
12015         (justify_pagination) Replaced with different algorithm.
12016         (dump_crush_table) Bugfix that caused tables to fail to be clipped
12017         at the bottom of the page.
12018
12019 Thu Sep 26 22:20:26 1996  Ben Pfaff  <blp@gnu.org>
12020
12021         * command.c: Added cmd_list back into cmd_table.
12022
12023         * freq.c, frequencies.q, repeat.c, list.q, vars-atr.c, vfm.c:
12024         Comment fix: `#define DEBUGGING' --> `#define DEBUGGING 1'.
12025
12026         * list.q: (flush_table) Updated to new som_submission_form format.
12027
12028         * som-frnt.c: Comment fix.
12029
12030         * som-high.c: Changed `#endif' to `#undef EXTERN'.
12031         (output_table) Calls som_get_table_size() directly; handles
12032         crushed tables.
12033         (examine_crush_table) New function; calls vert_headers().
12034         (examine_table) Moved some code into new function, vert_headers().
12035         (justify_pagination) New function.
12036         (dump_plain_table) Removed `static' from `cy'.
12037         (dump_crush_table) New function.
12038
12039         * som-low.c: (som_dump_crush_page) New function.
12040
12041         * som.h: Comment fixes.
12042         (enum SOM_TOPT_CRUSH) New.
12043         (SOM_SUB_PARTIAL_BEG, SOM_SUB_PARTIAL_MID, SOM_SUB_PARTIAL_END)
12044         Temporarily set to zero to make do with LIST procedure.
12045
12046         * somP.h: Re-ordering.
12047
12048 Wed Sep 25 19:36:11 1996  Ben Pfaff  <blp@gnu.org>
12049
12050         * som.c: Split into som-frnt.c, som-high.c, som-low.c.
12051
12052         * somP.h: New file for use by som-high.c, som-low.c.
12053
12054         * q2c.c: Added definition for VME.
12055         (get_line) Now dumps `!' comment lines to the output file
12056         verbatim.
12057
12058         * crosstabs.q, descript.q, file-handle.q, frequencies.q, list.q,
12059         set.q: Changed format of `!' comment lines.
12060
12061 Tue Sep 24 18:39:09 1996  Ben Pfaff  <blp@gnu.org>
12062
12063         * All source files: Added copyright notice.
12064
12065         * common.c: (xmalloc, xrealloc, xstrdup) Cast size_t's to unsigned
12066         longs in msg() calls.
12067
12068         * con32s.c: (xmalloc, xrealloc) Updated from common.c.
12069
12070         * q2c.c: (xmalloc, xrealloc, xstrdup) Updated from common.c.
12071
12072 Sat Sep 21 23:16:31 1996  Ben Pfaff  <blp@gnu.org>
12073
12074         * output.c: (outp_read_devices) Changed criteria for
12075         distinguishing different types of lines.
12076
12077 Fri Sep 20 22:52:28 1996  Ben Pfaff  <blp@gnu.org>
12078
12079         * cmdline.c: Changed syntax message.
12080
12081         * filename.c: (good_getcwd) Bug fix (?).
12082         (normalize_filename) [__BORLANDC__] Uses _fullpath() library
12083         function.
12084         (search_path) Appends DIR_SEPARATOR to directory name only if it
12085         does not already end with one.
12086
12087         * glob.c: Checks STAT_PAGER envvar before PAGER.
12088
12089         * output.c: Checks environment variables instead of just local
12090         macros.
12091
12092 Tue Sep 10 21:39:00 1996  Ben Pfaff  <blp@gnu.org>
12093
12094         * arena.c: (arena_destroy) Swatted a subtle bug that cropped up
12095         when the pointer passed to the function was within the arena
12096         itself, so that it couldn't properly be set to NULL _after the
12097         arena was freed_.
12098
12099         * command.c: Re-enabled DISPLAY.
12100
12101         * display.c: Rewritten to handle tables.  Untested.
12102
12103         * filename.c: (search_path) Fixed memory leak.
12104
12105         * frequencies.q: (cmd_frequencies) Frees v_variables.
12106         (postcalc) Calls cleanup_freq_tab() after displaying statistics.
12107         (cleanup_freq_tab) New function to garbage collect.
12108         (dump_full) Elegantized.
12109
12110         * main.c: New comment.
12111
12112         * output.h: New tag for tagged quotes: TAG_NEWLINE.
12113
12114         * postscript.c: Comment fix.
12115         (release_fontmap, free_font_entry) New functions.
12116         (ps_init_driver) Sets free_font_entry() as the freefunc for
12117         hashtable `loaded'.  Calls release_fontmap() when destroying a
12118         driver; also frees the output filename; also frees the
12119         ps_driver_ext block.
12120         (free_ps_encoding) Frees the filename as well as the encoding
12121         block.
12122         (output_encodings) Frees the line buffer and pops the msg-filename
12123         stack.
12124         (read_fontmap) Frees the fontmap filename and the line buffer.
12125         (postopen, preclose) Misc. garbage collection fixes.
12126         (ps_open_page) Destroys the `combos' hash table; sets `last_font'
12127         to NULL; this fixes some output problems.
12128         (text) Handles TAG_NEWLINE.  Untested.
12129
12130         * som.c: (cell_byte_size) Merged SCON_VALUE and SCON_TEXT cases.
12131         (som_set_string) Removed.  All references changed to
12132         `som_set_text'.
12133         (som_set_text) Rewritten.  New interface.  More general.
12134
12135         * som.h: Minor format changes.
12136         (struct som_value_cell) Removed; all references changed to
12137         `som_text_cell'.
12138         (enums SOT_*) Changed.
12139
12140 Mon Sep  9 21:43:13 1996  Ben Pfaff  <blp@gnu.org>
12141
12142         * command.c: Re-enabled SPLIT FILE.
12143
12144         * postscript.c: Comment fix.
12145
12146         * som.h: Added `SOT_NONE'.
12147
12148         * split-file.h: (cmd_split_file) Removed superfluous parenthesis.
12149
12150         * vfm.c: (dump_splits) Reimplemented.
12151
12152 Sat Sep  7 22:35:12 1996  Ben Pfaff  <blp@gnu.org>
12153
12154         * Compiled the project under gcc 2.7.2, which gave some new
12155         warnings.  This led to many additions of casts from unsigned to
12156         int sprinkled throughout the code.
12157         
12158         * arena.c: Many uses of `unsigned' changed to `size_t'.
12159
12160         * command.c: Added END FILE, END REPEAT to command table.
12161         (var cmd_end_repeat) Renamed cmd_end_repeat_p.
12162         (find_command, FILE_TYPE_okay) Not commented out anymore.
12163         (parse_cmd) Calls FILE_TYPE_okay again.
12164         (output_line) Added calls to som_output_text() to put the line
12165         in the output files.
12166
12167         * common.c: (macro VME) Format changes.
12168         (xstrdup) Asserts that its argument is not NULL.
12169         
12170         * data-list.c: Implemented dump_fixed_table().
12171         
12172         * inpt-pgm.c: Formatting changes.  Comment changes.
12173         (end_case_proc) Renamed end_case_trns_proc.
12174         (cmd_end_file, end_file_trns_proc) New functions.
12175
12176         * misc.c: Many uses of `int' and `unsigned' changed to `size_t'.
12177
12178         * misc.h: (local_strdup) New macro corresponding to strdup() but
12179         allocating its data through local_alloc() if possible--that is, if
12180         GNU C is in use.
12181
12182         * postscript.c: Comment changes.
12183         (quote_ps_name, quote_ps_string, output_encodings) New functions.
12184         (output_line, add_string) New macros supporting
12185         output_encodings().
12186         (postopen) Fixed contents of ${fixed-font} and ${prop-font}
12187         substitution vars.  Calls output_encodings() when a line
12188         consisting of `!encodings' is encountered.
12189         (preclose) Some code moved into quote_ps_string().
12190         (dump_line) Changed into macro supporting dump_fancy_line().
12191         (switch_font) Now outputs DSC "%%IncludeResource: font (...)"
12192         command when appropriate.
12193         (write_text) Fixed `literal_char' array (I think it's fixed, at
12194         least.)
12195         (text) Fixed bug when width was zero.  Now exits immediately on
12196         zero height_left.  Now, when executing `goto restart;', checks
12197         that cp<end, so that we don't read beyond end-of-string.  Also,
12198         outputs the correct code to the output file by outputting the code
12199         from the metric instead of the internal metric index.
12200
12201         * repeat.c: (cmd_end_repeat) New function.
12202
12203         * som.c: (var som) `headers' renamed `options' and semantics
12204         changed.  All references changed.
12205         (draw_title) `if(px!=-1 || px!=-1)' --> `if(px!=-1 || py!=-1)'.
12206         (build_target) Only inserts spacing if SOM_TOPT_SPACING not
12207         selected.
12208         (som_text_table) Removed.
12209         (som_output_text) New function.
12210
12211         * som.h: (struct som_submission_form) Removed `header', `reuse',
12212         replaced with bitmapped field `options'.
12213         (SOM_TOPT_*) New enum set for som_submission_form.options.
12214         (SOT_*) New enum set for som_output_text().
12215
12216         * temporary.c: (copy_variable) When copying the var label, only
12217         calls xstrdup() if it's non-NULL.
12218
12219         * var.h: (enum type `vartype') Removed; all references changed to
12220         `int'.
12221
12222         * vars-atr.c: (init_variable) Changed local var `nbytes' from
12223         `int' to `size_t'.
12224
12225 Thu Sep  5 22:05:56 1996  Ben Pfaff  <blp@gnu.org>
12226
12227         * font.h: Comment changes.
12228
12229         * groff-font.c: (groff_read_font) Initializes `name' field to
12230         NULL.  Handles `encoding' field.
12231
12232         * hash.c: (hsh_dump) [GLOBAL_DEBUGGING] Output formatting changes.
12233
12234         * postscript.c: (struct font_entry) Removed `position' field.
12235         (struct ps_font_combo) New struct.
12236         (struct ps_driver_ext) Removed field `next_position'.  New fields
12237         `combos', `next_combo'.  `last_font' field changed from
12238         `font_entry *' to `ps_font_combo *'.
12239         (ps_init_driver) Reformatted; handles new fields.  When
12240         OPO_AUTO_ENCODE is set, adds the two default fonts' encodings to
12241         the encoding list.
12242         (get_encoding, find_encoding_file) New functions.
12243         (add_encoding) Some code moved out into find_encoding_file().
12244         (postopen) Changed value for ${title}.
12245         (preclose) Sets `loaded' field to NULL after destroying the hash
12246         table.
12247         (ps_open_page) Added comment.  Inits the `combos' and `next_combo'
12248         fields.
12249         (ps_text_set_font_by_position) Figures out the current family if
12250         not known.
12251         (compare_ps_combo, hash_ps_combo, free_ps_combo) New functions.
12252         (switch_font) Implemented.
12253         (write_text) Calls switch_font() more often.  Format changes.
12254         #undefs its macros after they're no longer useful.
12255         (text) Changed `continue' at one point to a jump to the top of the
12256         loop because we don't want `separate' reset to 0 at that point.
12257         (load_font) No longer sets `position' in the font_entry created.
12258
12259 Wed Sep  4 21:45:35 1996  Ben Pfaff  <blp@gnu.org>
12260
12261         * font.h: (struct font_desc) New member `encoding', which is not
12262         properly handled yet.
12263
12264         * glob.c: (init_glob) Some new i18n code, which is probably
12265         screwed up.
12266
12267         * output.c: (outp_read_devices, outp_get_paper_size) Changed
12268         `size' local from `int' to `size_t'.
12269
12270         * postscript.c: New driver configuration parameter `auto-encode'.
12271         New enums OPO_AUTO_ENCODE, ODA_COUNT.
12272         (struct font_entry) New member `position'.
12273         (struct ps_driver_ext) Reordered.  New hash table member
12274         `encodings'; new members `next_position', `next_encoding',
12275         `last_font'.  Members `current', `prop', `fixed' changed from type
12276         `font_desc *' to `font_entry *'; all references changed.
12277         (struct ps_encoding) New struct.
12278         (read_ps_encodings, compare_ps_encoding, hash_ps_encoding,
12279         free_ps_encoding, add_encoding) New functions.
12280         (ps_init_driver) Added OPO_AUTO_ENCODE to default
12281         x->output_options.  Initializes new members of ps_driver_ext.
12282         Changed default value for prologue_fn, encoding_fn.  Calls
12283         read_ps_encodings after loading default fonts.
12284         (option_tab[], ps_option) Handle new configuration parameter.
12285         (switch_font) New function.
12286         (struct output_char) `font' member changed from `font_desc *' to
12287         `font_entry *'.  New member `separate'.
12288         (read_fontmap) Changed `size' from `int' to `size_t'.
12289         (output_line, put_number) New macros for write_text().
12290         (write_text) Optimizes text output by consolidating multiple
12291         calls to PostScript `show' operator.
12292         (text) Keeps track of when text arguments can't be consolidated by
12293         write_text(), and marks those spots in the output stream.
12294         (load_font) Sets `position' of the allocated font_entry to -1, cuz
12295         the font hasn't been switched to by switch_font(), which is where
12296         the position is important--the PostScript is what cares about the
12297         position.
12298
12299 Sat Aug 31 23:52:38 1996  Ben Pfaff  <blp@gnu.org>
12300
12301         * hash.c: (hsh_destroy) Ignores NULL argument.  Doesn't try to
12302         call a NULL free_func.
12303         (hsh_rehash) Elegantized.
12304         (hsh_probe) Fix bug that manifested when the table was expanded
12305         and thus had to change location in memory.  Good thing
12306         too--otherwise could have been much more subtle.
12307         (hsh_find) [GLOBAL_DEBUGGING] Not stubbed out anymore.
12308         (hsh_foreach) New function for hash table iteration.
12309
12310         * hash.h: (struct hsh_iterator) New.
12311
12312         * lexer.c: (parse_tagged_quote) Font and family name strings in
12313         tags are now null-terminated.
12314
12315         * output.c: (outp_evaluate_dimension) Fixed over-aggressive unit
12316         parsing.
12317         (internal_get_paper_size, outp_get_paper_size) Fixed; now work as
12318         documented.  (Never before tested?)
12319
12320         * output.h: Comment changes.
12321
12322         * postscript.c: New driver options `optimize-text-size',
12323         `optimize-line-size', `max-fonts-simult'.  New enum set for
12324         specing cached line types.  Comment fixes.
12325         (struct line_form) New struct.
12326         (struct ps_driver_struct) New members `text_opt', `line_opt',
12327         `max_fonts', `lines'.
12328         (ps_init_driver) Initializes new members of ps_driver_struct.
12329         (user option type enum set) New member `nonneg_int_arg'.
12330         (static var option_tab[]) Supports new options.
12331         (ps_option) Handles new options.
12332         (find_ps_file) Made static.  No longer calls hsh_dump().
12333         (ps_get_var) Made static.
12334         (preclose) Dumps out proper DSC trailer.
12335         (ps_open_page) Elegantized.
12336         (ps_close_page) Calls dump_lines() if appropriate.
12337         (ps_line_horz, ps_line_vert, ps_line_intersection) Reduced to
12338         wrappers around line().
12339         (int_2_compare, compare_line, dump_line, dump_fancy_line,
12340         dump_lines, hash_line, free_line, line) New functions for support
12341         of line caching.
12342         (write_text, text) Made static.
12343         (text) Added to font support, not finished.
12344
12345 Thu Aug 29 21:36:41 1996  Ben Pfaff  <blp@gnu.org>
12346
12347         * font.h: (struct font_desc) New members ascent, descent.
12348
12349         * groff-font.c: (groff_read_font) Calculates font ascent and
12350         descent from the ascent and descent of the `d' and `p' characters,
12351         respectively, as per a suggestion on comp.fonts.
12352
12353         * postscript.c: (ps_open_page, ps_close_page, ps_line_horz,
12354         ps_line_vert, ps_line_intersection) Rewritten to deal with changed
12355         prologue.
12356         (write_text) Handles text right-justification and centering (not
12357         full justification).  Still very inefficient.  (One output line
12358         per character?!)
12359         (struct output_char) Added fields for font and font size.
12360         (text) Many bugfixes.
12361
12362 Sat Aug 24 23:26:00 1996  Ben Pfaff  <blp@gnu.org>
12363
12364         * cmdline.c: (usage) Calls outp_list_classes().
12365
12366         * font.h: Comment fix.
12367
12368         * groff-font.c: New exported global var `space_index'.
12369         (groff_init) New function to initialize `space_index'.
12370         (hash_kern) Casts result to unsigned.
12371         (font_name_to_index) Renamed font_char_name_to_index.  All
12372         references changed.  Also, now returns the value of `space_index'
12373         when passed an ASCII space character as an argument.  Fixed
12374         handling of nulls.
12375         (font_get_kern_adjust) Changed i from `int' to `unsigned'.
12376         Handles passed NULL pointers properly.
12377
12378         * lexer.c: (parse_tagged_quote) Comment fix.  Better range
12379         checking.
12380
12381         * output.c: (outp_list_drivers) Removed.  Removed all references.
12382         
12383         * output.h: Comment fixes.
12384
12385         * postscript.c: (ps_open_global) Calls groff_init().
12386         (output_char) New structure.
12387         (write_text) New function.
12388         (text) No longer stubbed out!  Now the output is correct--with a
12389         few exceptions, one of them being that the page has to be held
12390         upside down into a mirror.
12391
12392 Sun Aug 11 21:31:22 1996  Ben Pfaff  <blp@gnu.org>
12393
12394         * font.h: Comment fix.
12395         
12396         * font.c: (name_to_index) Renamed font_name_to_index, made extern.
12397         All callers changed.
12398         (number_to_index) Renamed font_number_to_index, made extern.  All
12399         callers changed.
12400         (font_get_kern_adjust, font_get_char_metrics) New functions.
12401
12402         * output.h: New constant OUTP_T_INTERNAL_DRAW.
12403
12404         * postscript.c: Changed default line width back to 1/2 point.
12405         (ps_line_horz, ps_line_vert, ps_line_intersection) Now lines are
12406         in the center of the space allotted for them, not just a fixed
12407         offset from the edge of the space; this fixes some bugs.
12408         (ps_line_intersection) Now supports all command line styles.
12409         (ps_text_get_size) Bug fix in computation of em width.
12410         (text) New function, the meat behind ps_text_metrics and
12411         ps_text_draw.  Not complete.
12412         (ps_text_metrics, ps_text_draw) Removed the stub taken from
12413         ascii.c; call text().
12414
12415 Sat Aug 10 23:28:17 1996  Ben Pfaff  <blp@gnu.org>
12416
12417         * arena.c: (arena_free) Assert that the argument is non-NULL.
12418         
12419         * groff-font.c: (add_kern) Calls arena_free() for old_kern if and
12420         only if old_kern is non-NULL.
12421
12422         * postscript.c: (ps_init_driver) Changed default line width to 1
12423         point.
12424         (postopen) New prologue variables.
12425         (ps_line_horz, ps_line_vert, ps_line_intersection) Implements some
12426         more of the common line styles properly, but not all.
12427         (ps_text_metrics) Fixed problem with this stubbed out version that
12428         kept it from taking font sizes into account.
12429
12430 Thu Aug  8 22:31:11 1996  Ben Pfaff  <blp@gnu.org>
12431
12432         * arena.c: (arena_malloc) Bug fix.
12433         (arena_dump) [GLOBAL_DEBUGGING] New function.
12434
12435         * ascii.c: Comment fix.
12436         (count_fancy_chars, delineate) Now static functions.
12437         
12438         * filename.c: (interp_vars) Bug fixes.
12439
12440         * font.h: Comment fixes.
12441
12442         * glob.c: (init_glob) Sets set_viewwidth, set_viewlength at
12443         beginning in case we have an error message to display before
12444         initializing the display.
12445
12446         * groff-font.c: Comment fix.  Changed rehash threshold from 2/3
12447         full to 1/2 full.
12448         (groff_read_font) Bug fixes.
12449         (name_to_index) Increments hash.used.  Sets `name' field of hash
12450         entry properly.
12451         (add_kern) Sets kern_max_used after rehashing.  Other bug fixes.
12452
12453         * hash.c: Return type changed.
12454
12455         * postscript.c: Continued development.  Now marks lines on the
12456         paper, but very buggy.
12457
12458 Sat Aug  3 20:50:35 1996  Ben Pfaff  <blp@gnu.org>
12459
12460         * Changed comments in many source files from `/* xxx /* yyy */' to
12461         `/* xxx */ /* yyy */' for cleanliness.
12462
12463         * arena.c: (arena_sd_strdup) New function.
12464         
12465         * ascii.c: (struct ascii_driver_ext) New member `file'.
12466         (ascii_init_driver) Fills out member `file' for initing; uses
12467         close_file_ext for closing drivers.
12468         (ascii_option) Changed %.*s back to %s because the a_string's are
12469         always null-terminated.
12470         (postopen, preclose) New functions.
12471         (ascii_open_page) Uses new style of open_file_ext.
12472         (ascii_option, commit_line_buf, output_lines) Use ext->file.file
12473         instead of this->output.
12474         (__assert_fail) Removed.
12475
12476         * cmdline.c: Changed syntax_message[].
12477
12478         * error.c: #include's <readline/history.h> only if the history
12479         library is available, not if just the readline library is
12480         available.
12481
12482         * filename.c: (expand_line) Removed alloca() support.
12483         (interp_vars) No longer tilde-expands argument.  Limit on output
12484         length removed.
12485         (tilde_expand) Now treats argument as path rather than filename.
12486         [!unix] Now is a no-op function.
12487         (search_path) Better verbose message formatting.
12488         (open_file, close_file) Comment fixes.
12489         (close_file) [!unix] Doesn't bother with pipes.
12490         (open_file_ext) Completely rewritten, interface revamped.
12491         (close_file_ext) New function.
12492
12493         * font.h: Comment changes.
12494
12495         * frequencies.q: Removed AIX alloca support since it doesn't use
12496         alloca.
12497
12498         * hash.c: Comment changes & additions.
12499         (hsh_create) Initializes entire table instead of first M entries.
12500         (hsh_probe) Stupid bug fixed.  Now it works.
12501         (hsh_dump) [GLOBAL_DEBUGGING] New function.
12502
12503         * main.c: (parse) Detects EOF properly in token-eating loop.
12504         Should the STOP token have its value changed to 0?
12505
12506         * misc.c: (blp_getdelim) [HAVE_GETDELIM] Now it's a macro.
12507         (blp_getline) Now it's a macro.
12508
12509         * output.h: (struct outp_driver) Removed members output, filename.
12510         
12511         * output.c: (outp_init) [!NO_POSTSCRIPT] Installs PostScript
12512         drivers in driver table.
12513         (outp_read_devices) Frees buf.  Warns if there are no active
12514         output drivers.
12515         (outp_configure_clear) Sets outp_configure_vec to NULL after
12516         deleting its elements.
12517         (configure_driver, destroy_driver) Removed references to output,
12518         filename members of outp_driver.
12519         (outp_evaluate_dimension, internal_get_paper_size,
12520         outp_get_paper_size) New functions.
12521
12522         * postscript.c: Continued development.  Now links but doesn't make
12523         any marks on the page.  Lotsa bugs I suppose.
12524
12525         * str.c: (strcasecmp) [!HAVE_STRCASECMP] New function.
12526
12527         * str.h: Comment changes.
12528
12529 Sat Jul 27 22:32:38 1996  Ben Pfaff  <blp@gnu.org>
12530
12531         * Removed dependencies on non-nested comments in several files.
12532         Also removed references to (unix || __unix__) in #if's since
12533         prefh.orig makes those two equivalent.
12534         
12535         * ascii.c: (ascii_open_global) Creates ascii_arena.
12536         (ascii_close_global) Destroys ascii_arena.
12537         (ascii_init_driver) Doesn't create ascii_arena.
12538         (ascii_copy_driver) Removed.
12539         (ascii_option) Possible bugfix regarding %s vs. %.*s with a_string's.
12540         (outp_class ascii_class) Removed ascii_copy_driver reference.
12541
12542         * frequencies.q: Now can display all statistics except median.
12543         Still not finished.
12544
12545         * output.c: Handles outp_class.ref_count so output class
12546         destructors are called properly.
12547         (add_class) Sets ref_count to 0.
12548         (configure_driver) Initializes class if ref_count++ is 0.
12549         (destroy_driver) Destructs class if --ref_count is 0.  Frees the
12550         class output file name.
12551         
12552         * output.h: (struct outp_class) Removed copy_driver, inited.
12553         Added ref_count.
12554
12555         * postscript.c: Completely replaced but not finished.
12556         
12557 Tue Jul 23 21:48:36 1996  Ben Pfaff  <blp@gnu.org>
12558
12559         * approx.h: #includes <float.h>.
12560
12561         * arena.h, arena.c: Many functions changed to take an arena **
12562         instead of an arena *, for consistency.  All callers changed.
12563         (arena_alloc) Now creates a new arena if passed *A that is NULL.
12564         (arena_destroy) Sets *A to NULL.
12565         
12566         * ascii.c: (delineate) Implements OUTP_T_VERT correctly.  Removed
12567         assertion that `width' be positive.
12568
12569         * command.c: Removed #if's from cmd_table.
12570         (walk_cmdtable_func) [0] New function (debug code).
12571         (init_cmd_parser) [0] Dumps out cmd_table (debug code).
12572         (parse_cmd) Doesn't return failure for unimplemented commands.
12573
12574         * common.h: (SYSMIS) Changed from DBL_MAX to -DBL_MAX.
12575         (SYSCODE) New constant macro.
12576
12577         * descript.q: Checks for positive n_variables before performing
12578         analysis.
12579
12580         * file-handle.q: (get_handle_by_filename) Bug fix: passes &f to
12581         avl_find instead of &fp as arg 2.
12582
12583         * frequencies.g, frequencies.q: Continued updating; now compiles &
12584         works again, but not complete.
12585
12586         * main.c: Changes to user messages.
12587
12588         * misc.c: (reverse) [0] New function.
12589
12590         * settings.h: Comment removed.  #includes "common.h".
12591
12592         * som.c: (som_set_null) New function.
12593         (som_set_value, som_set_string, som_set_text) More detailing
12594         assertions.
12595         (som_set_float) Implemented function.
12596         (dump_columnated_table) Bug fix regarding page breaks.
12597         (draw_cell) Bug fix regarding text that spilled out of a cell.
12598         (draw_intersection, draw_horz_rule, draw_vert_rule) No longer draw
12599         null lines.
12600         (get_cell_size) Support SCON_EMPTY cells.
12601         (get_table_size) When calculating rules' widths and heights, mask
12602         out SLIN_SPACING bit.  Added SOPT_X_HLTL support.
12603         
12604         * som.h: (som_any_cell) New option SOPT_X_HTLT.  Removed
12605         SOPT_X_SHADE.
12606         (struct som_submission_form) New member `header'; all users
12607         changed.
12608
12609         * val-labs.c: (get_label) User messages changed.
12610
12611         * var.h: Changed FREQUENCIES structures.
12612
12613         * vars-atr.c: (is_num_user_missing, is_str_user_missing) Made
12614         inline.
12615         
12616 Fri Jul 19 19:11:13 1996  Ben Pfaff  <blp@gnu.org>
12617
12618         * approx.h: Definition of EPSILON now depends on system's
12619         DBL_EPSILON.  Removed GNU C specific code.
12620         (cmpapx) Renamed approx_compare.
12621
12622         * frequencies.g, frequencies.q: Continued updating; still doesn't
12623         compile.
12624
12625         * groff-font.c: (name_to_index) Fix bug that kept it from
12626         compiling.
12627
12628         * hash.c, hash.h: Completed work.
12629
12630         * var.h: Changes to freq_tab, frequencies_proc.
12631         
12632 Wed Jul 17 21:23:36 1996  Ben Pfaff  <blp@gnu.org>
12633
12634         New hashing code.
12635         * hash.c, hash.h: New files.  Not completed.
12636         * Makefile.am: Added hash.c to source file list.
12637         * font.h: (struct font_desc) New member kern_size_p.
12638         * groff-font.c: Uses hash.h.
12639         (hashpjw) Moved to hash.c.
12640         (next_prime_power) Rewrote, renamed hsh_next_prime, moved to
12641         hash.c.
12642         (static var hash) New member size_p.
12643         * var.h: Includes hash.h.
12644         (struct freq_tab) Changed AVL_TREE to hash_tab.
12645
12646         * vars-prs.c: Comment, formatting fixes.
12647
12648         * frequencies.g, frequencies.q: Continued updating.  Not yet
12649         working.
12650
12651         * formats.c: Bug fix.
12652
12653 Tue Jul 16 22:10:04 1996  Ben Pfaff  <blp@gnu.org>
12654
12655         Increasing parallelism between DESCRIPTIVES and FREQUENCIES.
12656         * descript.g: Comment fixes.
12657         * descript.q: Comment fixes.  Moved some declarations into var.h.
12658         Made dsc_info a static table.  Updated FIXMEs.
12659         (internal_cmd_descriptives) Beautified.
12660         
12661         * frequencies.q: Started updating into working order.
12662         * frequencies.g: New file analogous to descript.g.
12663         * var.h: Comment fixes.  Added structures for FREQUENCIES.
12664         
12665         * som.c: Removed vestiges of crushing and partial table support.
12666
12667 Sun Jul 14 15:45:31 1996  Ben Pfaff  <blp@gnu.org>
12668
12669         * Many more changes to som.c especially, but these will not be
12670         documented as I have resolved to remove them.  This patchlevel is
12671         being released solely so that I can fall back to it if I decide
12672         that removing the changes is not a good idea.
12673
12674 Sat Jul 13 09:58:44 1996  Ben Pfaff  <blp@gnu.org>
12675
12676         * som.c: (global var som) New member `cum_y'.
12677         (build_target) Properly handles titles for partial tables.
12678         (dump_partial_beg, dump_partial_mid, dump_partial_end)
12679         Merged into single new function dump_partial().  Fixed problem
12680         with titles on partial tables.
12681         (dump_table) Calls dump_partial() for all parts of partial tables.
12682         (dump_page) Criteria for drawing title changed.
12683         
12684 Fri Jul 12 22:03:36 1996  Ben Pfaff  <blp@gnu.org>
12685
12686         * command.c: (cmd_table) Added LIST, WEIGHT.
12687
12688         * command.c: (cmd_remark) No longer frees `s' since it's not
12689         dynamically allocated.
12690         
12691         * data-out.c: (convert_f) Now correctly handles the case where
12692         abs(v->f)<1 but v->f rounds to a value of 1.00 given the specified
12693         number of decimals.
12694         (som_destroy_all_tables) Removed argument.  All callers changed.
12695         (som_vline, som_hline) Argument validity checking corrected.
12696         (som_set_value) Implemented half-heartedly.
12697         (replicate_table) Copies tables piece-by-piece when using Checker.
12698
12699         * som.h: New line style SLIN_1THIN, currently equivalent to
12700         SLIN_0.  New enum set SOM_SUB_*.
12701         (struct som_submission_form) Removed `seq_no'.  Added `type'.
12702         
12703         * list.q: Newly working file; uses partial tables.
12704         
12705         * som.c: (som_reduce_table) Renamed som_set_table_height().
12706         (som_crush) Removed argument `group'.
12707         (global var som) Removed `nt', `seq_no'.  Added `type'.
12708         (som_submit_table) Arguments changed.
12709         (output_table) Removed partial table code.
12710         (build_target) New arg; partial table support added.  All callers
12711         changed.
12712         (dump_plain_table) Removed partial table code.
12713         (dump_partial_beg, dump_partial_mid, dump_partial_end) New functions.
12714         (dump_table) Supports partial tables.
12715         (dump_page) New argument to allow not drawing top and/or bottom
12716         headers.  All callers changed.  Supports partial tables.
12717
12718 Sat Jul  6 22:22:25 1996  Ben Pfaff  <blp@gnu.org>
12719
12720         * data-out.c: Changed `#include <approx.h>' to `#include
12721         "approx.h".
12722         (convert_F) Comment fix.  Now won't print `-.000', etc.
12723
12724         * descript.q: Now Z-scores work, although there appears to
12725         be a bug (which might actually be in data-out.c:convert_F()).
12726         (descriptives_trns_proc, descriptives_trns_free) New functions.
12727         (run_z_pass) Implemented.
12728         
12729         * var.h: Comment fixes.
12730         (dsc_z_score, descriptives_trns) New structs.
12731         (descriptives_trns) Added to any_trns as `dsc'.
12732
12733         * error.c, error.h: New error class, IS (Installation Script
12734         error), used in those instances where the error is in the
12735         installation, but there is a script file or installation file that
12736         can be usefully referred to.
12737         
12738         * output.c: Change many IE classes to IS classes.
12739
12740         * cases.c, command.c, common.c, crosstabs.q, expr-evl.c,
12741         frequencies.q, list.q, vars-prs.c, vfm.c: Removed reference to
12742         HAVE_MALLOC_H because Borland C++ alloca() is broken, so why
12743         include the corresponding header?
12744         
12745         * glob.c: (init_glob) Don't malloc term_buffer under Checker.
12746         Don't bail out if termcap can't be read.
12747
12748         * som.c: (som_destroy_table) Removed.
12749         (som_reduce_table, som_destroy_all_tables) New functions.
12750         (som_crush) New function, not implemented.
12751         
12752         * som.h: New table option STAB_CRUSH.  Comment fix.  New struct
12753         som_submission_form.  Function prototypes revised.
12754
12755         Outputting huge tables (1000s of rows) a few rows at a time
12756         is supported, though untested.  May even break everything.
12757         Actually, the code doesn't even compile right now.
12758         * som.c: (struct som) New fields htv, nt, seq_no.
12759         (som_submit_table) Multiple arguments changed to a single
12760         pointer to struct submission_form.  Only increments subtable_num
12761         if seq_no is zero.  Only destroys table if it's not going to
12762         be reused.
12763         (replicate_table) New function.
12764         (output_table) Comment fix.
12765         (examine_table) Changed inline code to code calling
12766         replicate_table().  Calculates htv.  Supports partial tables.
12767         (draw_title) Removed comment.
12768         (build_target) Only allows for title on first part of partial
12769         tables.
12770         (dump_plain_table) Only resets table chunk number on first part
12771         of partial tables; FIXME: doesn't work quite right.  Supports
12772         partial tables.
12773         (dump_page) Titles only on first part of partial tables.
12774
12775 Fri Jul  5 20:16:19 1996  Ben Pfaff  <blp@gnu.org>
12776
12777         * Thanks to an unreliable IDE hard drive, I have spent the last
12778         day reconstructing my Debian GNU/Linux installation and redoing
12779         the previous day's changes--somehow I managed to save every file
12780         except for output.c and output.h.  So the following changes could
12781         really be considered independent of the output.c, output.h changes
12782         from Jul 4.
12783
12784         * output.h, output.c: Moved the outp_configure_vec global var,
12785         outp_names struct, and enum set OUTP_S_* from output.h to output.c.
12786         outp_configure_vec is now static.
12787         
12788 Thu Jul  4 20:20:24 1996  Ben Pfaff  <blp@gnu.org>
12789
12790         * The entire philosophy behind configuration of the output drivers
12791         changed.  Now there is a termcap-type configuration where drivers
12792         to be read are determined beforehand, rather than parsing the
12793         entire output init file and storing it in memory & deciding what
12794         to actually use later.  Faster & more memory-efficient at the same
12795         time, cool.
12796         
12797         * output.c: Comment fix.  Removed outp_init_drivers global var.
12798         Removed all references to synonyms.  New structure outp_defn.  New
12799         global vars outp_macros, outp_configure_vec.
12800         (search_name, delete_name, add_name, check_configure_vec,
12801         expand_name, find_defn_value) New static functions.
12802         (outp_configure_clear, outp_configure_add, outp_configure_macro,
12803         outp_read_devices) New extern functions.
12804         (outp_init) Much functionality moved into outp_read_devices.
12805         (outp_read_devices) Format of output init file changed; name of
12806         file is `devices' rather than `output' to avoid Makefile
12807         conflicts.
12808         (outp_clear) Renamed outp_done.
12809         (outp_list_classes) Bug fix, cleaned up.
12810         (outp_list_drivers) Not implemented anymore.
12811         (outp_configure_driver) Now a static function; simplified; now
12812         interpolates macros; supports new structure.
12813         (outp_enable_driver, match_synonym) Removed; all references
12814         removed.
12815         (find_driver) First argument removed.
12816         
12817         * output.h: Global var outp_init_drivers removed; new structure
12818         outp_names; new enum set OUTP_S_*; new global var
12819         outp_configure_vec; function prototypes for output.c exports
12820         updated.
12821         
12822         * main.c: (main) Calls outp_read_devices() after parsing the
12823         command line.
12824         
12825         * cmdline.c: (parse_command_line) New option -v --verbose;
12826         --version changed to -V.  --device option changed syntax to just
12827         take a single device name.  Accepts key=value declaration of
12828         output init file macros.  Syntax message updated.
12829
12830         * filename.c: (expand_line) New function.
12831         (interp_environ_vars) Renamed interp_vars; no longer uses
12832         fixed-size buffer.
12833         (blp_getenv) Allows $ARCH and $VER pseudo-environment-vars to be
12834         overridden by real environment vars.
12835         (search_path) Uses verbose_msg() instead of #ifdef'd printf().
12836         * filename.h: interp_environ_vars() renamed interp_vars().
12837         
12838         * error.c, error.h: Added extern variable `verbosity', message
12839         class MM.
12840         
12841         * error.c: (vmsg) Support message class MM.
12842         (verbose_msg) New function.
12843
12844         * descript.q: (generate_z_varname) Bug fix in generation of
12845         Z-score varnames.
12846         (dump_z_table) Bug fix in column headers.
12847         
12848         * ascii.c: (ascii_init_driver) Changed minimum number of lines per
12849         page from 29 to 15.  Don't set a default for ops[OPS_INIT,
12850         OPS_DONE].  Writes the uninit string when the driver is closed.
12851         (ascii_open_page) Write the init string before the first page.
12852         (output_shorts) Form of main loop changed from `while' to `for'.
12853         Bug fix with overstrikes: the character is printed *after* the
12854         backspace.  Eliminated a lot of `& 0xff' modifiers.
12855         (advance_to_left_margin) New function.
12856         (return_carriage, output_lines) Handle left margin.
12857
12858 Thu Jul  4 00:35:59 1996  Ben Pfaff  <blp@gnu.org>
12859
12860         * ascii.c: New option `carriage-return-style'.
12861
12862         * ascii.c: (count_fancy_chars) New function.
12863         (delineate, text_metrics) Use new function; bug fixes regarding
12864         rich text strings.
12865         (text_draw) Bug fix with rich text.
12866         (output_string, output_shorts) Reordered.
12867         (output_shorts) Now handles boxchars and some overstrike font
12868         changes.
12869         (output_char, return_carriage) New functions.
12870         (output_lines) Now handles overstriking and font changes properly;
12871         some code moved to output_shorts.
12872
12873 Tue Jul  2 22:13:23 1996  Ben Pfaff  <blp@gnu.org>
12874
12875         [GLOBAL_DEBUGGING]
12876         * ascii.c: New member `debug' in ascii_driver_ext.
12877         (ascii_init_driver, delineate) Uses new member.
12878
12879         Now you can set a vertical height on writing text.
12880         * ascii.c: (delineate) Keeps track of vertical position.
12881         (text_draw) No longer considers fully justified text an internal
12882         error.
12883         
12884         * output.h: New flag OUTP_T_VERT; other OUTP_T_ values changed.
12885
12886         Tables' titles are drawn; they can have variable height.
12887         * som.c: `som' struct has new member, title_height.
12888         (draw_title) New argument.  Moved within file.  All caller
12889         changed.
12890         (build_target) New argument, amount of space needed for first row.
12891         Calculates height of title, takes that into account.  All callers
12892         changed.
12893         (dump_plain_table, dump_columnated_table) Took calculation of y1,
12894         y2 out of loop.
12895         (dump_columnated_table) [GLOBAL_DEBUGGING] Debugging code
12896         improved.
12897         (dump_columnated_table) Organized for readability.
12898         (dump_page) Makes use of som.title_height.
12899
12900         * som.c: Many comment bug fixes.
12901
12902         * descript.q: (try_name, generate_z_name) Bug fix regarding
12903         generation of Z-score variable names.
12904         * var.h: Removed num from descriptives_proc; all referents removed.
12905
12906 Mon Jul  1 22:13:39 1996  Ben Pfaff  <blp@gnu.org>
12907
12908         * ascii.c: (ascii_line_horz, ascii_line_vert,
12909         ascii_line_intersection) Added debugging code.
12910
12911         Added a descriptive line above each table to describe it.
12912         * command.c: (parse_cmd) Calls som_new_series.
12913         
12914         * som.c: New static vars table_num, subtable_num.  New `som'
12915         member `title'.
12916         (dump_page) New arguments.
12917         (som_submit_table) Handle new variables.
12918         
12919         * som.c, som.h: (som_submit_table) New arguments.  All callers
12920         changed.
12921         (som_new_series) New function.
12922         (build_target) Makes room for extra line.
12923         (draw_title) New function.
12924         (dump_page) Calls draw_title.  Bug fix: doesn't always set
12925         som.ext->cp to 0.
12926         
12927         Columnation of tables support.
12928         * som.h: Deleted fr, lr, ri from som_table.  Reorganized.
12929         
12930         * som.c: Deleted references to fr, lr, ri.
12931         (som_columnate) Bux fix: sets group member of table.
12932         (som_add_options) Function removed.
12933         (dump_table) Split into three functions; extensively reworked.
12934         
12935         * descript.q: (dump_z_table) Better output table formatting; added
12936         title support to correspond to som.h changes.
12937         (display) Title support.
12938
12939         * output.h: Added OUTP_T_NONE.
12940         
12941 Mon Jul  1 13:00:00 1996  Ben Pfaff  <blp@gnu.org>
12942
12943         * descript.q: Improved handling of Z scores; still not perfect.
12944         
12945         * output.h, ascii.c: Added hook for getting em width of current
12946         font.
12947         
12948         * som.c: Uses new em-width hook.  Added debugging code to
12949         several functions.
12950         (som_columnate) New argument.
12951         (som_add_options) Removed.
12952
12953 Jun 29 17:40:47 1996  Ben Pfaff  <blp@gnu.org>
12954
12955         * som.h, som.c, output.c, output.h, ascii.c: Updated to work with
12956         rules as a property of the table instead of as a property of the
12957         cells.
12958         
12959         * ascii.c: Added `header' to table of options.
12960         
12961         * descript.q: Added even shorter statistic names; modified to work
12962         with new som interface.
12963         
12964         * misc.c (blp_getdelim): Bug fix.
12965         
12966         * version.c: includes 'conf.h'.
12967         
12968 ----------------------------------------------------------------------
12969 Local Variables:
12970 mode: change-log
12971 version-control: never
12972 End: