1 Mon Mar 15 00:25:02 2004 Ben Pfaff <blp@gnu.org>
3 Get rid of static, global vars in recode.c. Remove debug code.
5 * recode.c: (static var head) Removed.
6 (global var v) Removed.
7 (global var nv) Removed.
8 (cmd_recode) New local variables head, v, nv. Initialize and free
9 v. Don't call debug_print().
10 [DEBUGGING] (dump_dest) Removed.
11 [DEBUGGING] (debug_print) Removed.
13 Mon Mar 15 00:14:49 2004 Ben Pfaff <blp@gnu.org>
15 Get rid of static vars in expr-opt.c.
17 * expr-opt.c: (static var e) Removed.
18 (static var nop) Removed.
19 (static var mop) Removed.
20 (static var ndbl) Removed.
21 (static var mdbl) Removed.
22 (static var nstr) Removed.
23 (static var mstr) Removed.
24 (static var nvars) Removed.
25 (static var mvars) Removed.
26 (struct expr_dump_state) New structure.
27 (dump_expression) Use new struct expr_dump_state instead of static
28 vars and pass to functions we call.
29 (dump_node) Use struct expr_dump_state * parameter.
35 Mon Mar 15 00:03:51 2004 Ben Pfaff <blp@gnu.org>
37 Get rid of static var in COUNT.
39 * count.c: (static var head) Move into cmd_count().
40 (cmd_count) [DEBUGGING] Don't call debug_print.
41 [DEBUGGING] (debug_print) Removed.
43 Sun Mar 14 23:56:09 2004 Ben Pfaff <blp@gnu.org>
45 Get rid of static vars in VALUE LABELS, ADD VALUE LABELS.
47 * val-labs.c: (static var v) Removed.
48 (static var nv) Removed.
49 [DEBUGGING] (debug_print) Removed.
50 (verify_val_labs) Add struct variable **, int parameters.
51 (get_label) Ditto. Improve error messages, streamline.
52 (erase_labels) New function for erasing value labels, taking over
53 part of verify_val_labs()'s function.
56 (cmd_value_labels) No need to call init() or done() anymore.
57 (cmd_add_value_labels) Ditto.
58 (do_value_labels) Add vars, var_cnt local variables. Clean up
59 after them internally. Call erase_labels() if we should. Don't
62 Sun Mar 14 23:33:53 2004 Ben Pfaff <blp@gnu.org>
64 Get rid of static vars in MATCH FILES.
66 * get.c: (static var mtf_head) Removed.
67 (static var mtf_tail) Removed.
68 (static var mtf_by) Removed.
69 (static var mtf_n_by) Removed.
70 (static var mtf_master) Removed.
71 (static var mtf_seq_num) Removed.
72 (static var mtf_seq_nums) Removed.
73 (static var mtf_sink) Removed.
74 (static var mtf_case) Removed.
75 (struct mtf_proc) New structure.
76 (cmd_match_files) Use struct mtf_proc instead of static vars.
77 (mtf_processing_finish) Ditto.
79 (mtf_delete_file_in_place) Ditto.
80 (mtf_read_nonactive_records) Ditto.
81 (mtf_compare_BY_values) Ditto.
82 (mtf_processing) Ditto.
83 (mtf_merge_dictionary) Ditto.
85 Sun Mar 14 22:48:12 2004 Ben Pfaff <blp@gnu.org>
87 * command.def: Add CASESTOVARS, VARSTOCASES unimplemented commands.
89 * dictionary.c: (dict_rename_var) Add assertion.
90 (dict_contains_var) Check by index instead of name.
92 Sun Mar 14 22:01:02 2004 Ben Pfaff <blp@gnu.org>
94 Get rid of compaction_necessary, compaction_nval, compaction_case.
95 Redo VFM interface. Replace disk_sink and memory_sink by
96 storage_sink, disk_source and memory_source by storage_source.
98 * vfm.h: (struct case_sink) Add `dict', `idx_to_fv', `value_cnt'
102 (struct write_case_data) Remove `begin_func', `end_func',
103 `func_aux' members. Add `aux', `trns_case', `sink_case',
104 `cases_written', `cases_analyzed' members.
105 (global var compaction_necessary) Make static.
106 (global var compaction_nval) Removed.
107 (global var compaction_case) Removed.
108 (static var case_count) Removed.
109 (struct procedure_aux_data) Removed.
110 (struct split_aux_data) Removed.
111 (procedure) Remove begin_func, end_func parameters. Rewrite.
112 (static var not_canceled) Removed.
113 (process_active_file) Removed.
114 (process_active_file_write_case) Removed.
115 (process_active_file_output_case) Removed.
116 (prepare_for_writing) Moved into open_active_file().
117 (arrange_compaction) Ditto.
119 (open_active_file) Rewrote.
120 (write_case) New function.
121 [DEBUGGING] (index_to_varname) Removed.
122 (execute_transformations) New function.
123 (exclude_this_case) Renamed filter_case(), changed interface.
124 (clear_case) Added struct ccase * parameter to interface.
125 (close_active_file) Added struct write_case_data * parameter,
127 (disk_sink_create) Removed.
128 (disk_sink_destroy) Removed.
129 (disk_sink_make_source) Removed.
130 (disk_sink_write) Removed.
131 (disk_source_count) Removed.
132 (disk_source_destroy) Removed.
133 (disk_source_read) Removed.
134 (global var disk_sink_class) Removed.
135 (global var disk_source_class) Removed.
136 (global var memory_sink_class) Removed.
137 (global var memory_source_class) Removed.
138 (memory_sink_create) Removed.
139 (memory_sink_destroy) Removed.
140 (memory_sink_make_source) Removed.
141 (memory_sink_write) Removed.
142 (memory_source_count) Removed.
143 (memory_source_destroy) Removed.
144 (memory_source_get_cases) Removed.
145 (memory_source_read) Removed.
146 (memory_source_set_cases) Removed.
147 (struct disk_stream_info) Removed.
148 (struct memory_sink_info) Removed.
149 (struct memory_source_info) Removed.
150 (write_active_file_to_disk) Removed.
151 (destroy_storage_stream_info) New function.
152 (global var null_sink_class) New var.
153 (global var storage_sink_class) New var.
154 (global var storage_source_class) New var.
155 (open_storage_file) New function.
156 (storage_sink_destroy) New function.
157 (storage_sink_make_source) New function.
158 (storage_sink_open) New function.
159 (storage_sink_write) New function.
160 (storage_source_count) New function.
161 (storage_source_destroy) New function.
162 (storage_source_get_cases) New function.
163 (storage_source_on_disk) New function.
164 (storage_source_read) New function.
165 (storage_source_set_cases) New function.
166 (storage_source_to_disk) New function.
167 (storage_to_disk) New function.
168 (struct storage_stream_info) New structure.
169 (write_storage_file) New function.
170 (procedure_write_case) Removed.
171 (create_case_source) Add `struct dictionary *' parameter, all
173 (create_case_sink) Ditto.
174 (free_case_sink) New function.
175 (struct split_aux_data) New structure.
176 (procedure_with_splits) New function implementing what procedure()
178 (SPLIT_FILE_proc_func) Removed.
179 (procedure_with_splits_callback) New function.
180 (equal_splits) New function.
182 * aggregate.c: Pass around a struct instead of using statics.
183 (static var outfile) Remove.
184 (enum type) Give it tag `missing_treatment'.
185 (static var missing) Remove.
186 (static var sort) Remove.
187 (static var agr_first) Remove.
188 (static var agr_next) Remove.
189 (static var case_count) Remove.
190 (static var prev_case) Remove.
191 (static var buf64_1xx) Remove.
192 (static var buf_1xx) Remove.
193 (struct agr_proc) New structure incorporating the above.
194 (cmd_aggregate) Use new struct. Clean up error handling using
195 agr_destroy(). Completely rewrite actual implementation of
197 (create_sysfile) Add struct agr_proc * parameter, modify
199 (parse_aggregate_functions) Ditto.
200 (free_aggregate_functions) Ditto. Rename agr_destroy().
201 (aggregate_single_case) Add struct agr_proc * parameter, modify
203 (accumulate_aggregate_info) Ditto.
204 (dump_aggregate_info) Ditto.
205 (initialize_aggregate_info) Ditto.
206 (agr_00x_trns_proc) Removed.
207 (agr_00x_end_func) Removed.
208 (agr_10x_trns_proc) Removed.
209 (agr_10x_trns_free) Removed.
210 (agr_10x_end_func) Removed.
211 (agr_11x_read) Removed.
212 (agr_11x_finish) Removed.
213 [DEBUGGING] (debug_print) Removed.
214 (write_case_to_sfm) Add struct agr_proc * parameter, modify
216 (agr_to_active_file) New function.
217 (presorted_agr_to_sysfile) New function.
218 (sort_agr_to_sysfile) New function.
220 * autorecode.c: (cmd_autorecode) Use procedure_with_splits().
222 * crosstabs.q: (internal_cmd_crosstabs) Ditto.
224 * descript.q: (cmd_descriptives) Ditto.
226 * dfm.c: (cmd_begin_data) Check for storage_source_class. Adapt
227 to new procedure() interface.
229 * command.c: (cmd_execute) Adapt to new procedure() interface.
231 * dictionary.c: (dict_compact_values) Also delete scratch
233 (dict_get_compacted_value_cnt) New function.
234 (dict_get_compacted_idx_to_fv) New function.
236 * flip.c: (cmd_flip) Warn about and cancel TEMPORARY.
237 (cmd_flip) Adapt to new procedure() interface.
238 (flip_sink_write) Use sink->idx_to_fv.
240 * frequencies.q: (internal_cmd_frequencies) Use
241 procedure_with_splits().
243 * get.c: (cmd_save_internal) Adapt to new procedure() interface.
244 (static var mtf_sink) New static var.
245 (static var mtf_case) New static var.
246 (cmd_match_files) Warn about and cancel TEMPORARY. Redo the way
247 we actually implement the matching.
248 (mtf_delete_file_in_place) Use mtf_case.
249 (mtf_processing) Use mtf_case and mtf_sink.
250 (cmd_export) Adapt to new procedure() interface.
252 * levene.c: (levene) Use procedure_with_splits().
254 * list.q: (cmd_list) Use procedure_with_splits().
256 * matrix-data.c: (read_matrices_without_rowtype) Adapt to new
257 procedure() interface.
258 (read_matrices_with_rowtype) Ditto.
260 * modify-vars.c; (cmd_modify_vars) Warn about and cancel
261 TEMPORARY. Adapt to new procedure() interface.
263 * rename-vars.c: Warn about and cancel TEMPORARY.
265 * sort.c: (cmd_sort_cases) Warn about TEMPORARY.
266 (sort_cases) Use dict_get_compacted_value_cnt() instead of
267 compaction_nval. Adapt to new procedure() interface. Use
268 storage_source_to_disk().
269 (do_internal_sort) Don't try to dump the cases to memory.
270 (compare_case_lists) Pass null idx_to_fv.
271 (struct initial_run_state) Add `idx_to_fv' member. Remove
273 (write_initial_runs) Don't initialize irs->case_size. Adapt to
274 new procedure() interface. Reset irs->idx_to_fv after calling
276 (sort_sink_write) Set irs->idx_to_fv. Use case_size from struct
277 sort_cases_pgm. Pass irs, not struct sort_cases_pgm to
279 (destroy_initial_run_state) Don't dereference irs after freeing
281 (allocate_cases) Don't calculate case_size locally.
282 (compare_record) Add idx_to_fv parameter.
283 (compare_record_run) Change parameter from struct sort_cases_pgm *
284 to struct initial_run_state *. Pass irs->idx_to_fv to
286 (compare_record_run) Third parameter now a struct
288 (output_record) No need for out_case anymore. Pass irs, not
289 struct sort_cases_pgm to pop_heap(). Use case_size from struct
291 (merge) Use case_size from struct sort_cases_pgm.
292 (merge_once) Use case_size from struct sort_cases_pgm.
293 Pass null pointer to compare_record() as idx_to_fv.
294 (global var sort_sink_class) Make static.
296 * t-test.q: (cmd_t_test) Use procedure_with_splits().
298 * temporary.c: Remove debugging crap.
300 Sat Mar 13 14:19:52 WST 2004 John Darrington <john@darrington.wattle.id.au>
302 * t-test.q, levene.c: Fixed up the handling of MISSING values
305 Fri Mar 12 16:23:35 WST 2004 John Darrington <john@darrington.wattle.id.au>
307 * t-test.q, levene.c: Added support for T-TEST /GROUP where only
310 Wed Mar 10 23:25:13 2004 Ben Pfaff <blp@gnu.org>
312 Change explicit variable name checks into use of
313 dict_class_from_id().
315 * dictionary.c: (dict_create_var) Change explicit variable name
316 check into use of dict_class_from_id().
318 * get.c: (trim_dictionary) Ditto.
320 * sel-if.c: (cmd_filter) Ditto.
322 * sysfile-info.c: (cmd_display) Ditto.
324 * vars-prs.c: (parse_DATA_LIST_vars) Ditto.
326 * vfm.c: (arrange_compaction) Ditto.
328 * weight.c: (cmd_weight) Ditto.
330 Wed Mar 10 21:16:34 2004 Ben Pfaff <blp@gnu.org>
332 * temporary.c: (cmd_temporary) When TEMPORARY was the first
333 transformation following the input program, if any, for some
334 reason we special-cased f_trns. That's just wrong. It should
335 always be set to n_trns.
337 Tue Mar 9 23:44:40 2004 Ben Pfaff <blp@gnu.org>
339 * format.c: (parse_format_specifier_name) Fix brown-bag bug
340 introduced in last check-in.
342 Tue Mar 9 23:10:41 2004 Ben Pfaff <blp@gnu.org>
344 * format.c: (global array translate_fmt[]) Removed.
345 (translate_fmt) New function as replacement.
346 (parse_format_specifier_name) Rewrite.
348 * pfm-read.c: (convert_format) Use translate_fmt() instead of
351 * sfm-read.c: (parse_format_spec) Ditto.
353 * postscript.c: (text) Fix handling of fonts with missing
356 * sort.c: (struct external_sort) Add temp_name member.
357 (destroy_external_sort) Free temp_dir, temp_name members.
358 (init_external_sort) Allocate temp_name.
359 (get_temp_file_name) Change prototype.
360 (open_temp_file) Deal with change to get_temp_file_name().
361 (close_temp_file) Ditto.
362 (remove_temp_file) Ditto.
363 (write_temp_file) Ditto.
364 (read_temp_file) Ditto.
365 (sort_sink_destroy) Removed.
366 (sort_sink_class) Change destroy member to null.
368 Tue Mar 9 22:36:34 2004 Ben Pfaff <blp@gnu.org>
372 * aggregate.c: (cmd_aggregate) No need to save/restore temp_case
373 anymore. Use agr_11x_finish().
374 (aggregate_single_case) Make first param const.
375 (accumulate_aggregate_info) Ditto.
376 (agr_00x_end_func) Use compaction_case, not temp_case.
377 (agr_11x_func) Break into agr_11x_read(), agr_11x_finish().
379 * data-list.c: (struct data_list_pgm) Add `case_size' member.
380 (cmd_data_list) Initialize case_size.
381 (read_from_data_list_fixed) Add struct ccase * param, use instead
383 (read_from_data_list_free) Ditto.
384 (read_from_data_list_list) Ditto.
385 (read_one_case) Rename data_list_trns_proc(), all references
386 updated. Add argument in calling above functions. Use c
387 argument instead of temp_case.
388 (destroy_dls) Rename data_list_trns_free(), all references
391 * expr-evl.c: (expr_evaluate) Make second parameter const.
393 * file-type.c: (struct file_type_pgm) Add `case_size' member.
394 (cmd_end_file_type) Initialize `case_size'.
395 (file_type_source_read) Add struct ccase * parameter. Use instead
400 * get.c: (struct get_pgm) New structure to keep track of
402 (cmd_get) Initialize case_size.
404 (get_source) Deal with struct get_pgm.
405 (get_source_read) Add struct ccase * parameter, use instead of
407 (import_source_read) Ditto.
409 * get.c: Use a null pointer instead of temp_case to represent the
410 "current case" in a struct mtf_file's input member.
411 (mtf_processing_finish) Pass null to mtf_processing(), not
413 (mtf_read_nonactive_records) Don't set iter->input to temp_case.
414 (mtf_compare_BY_values) Add extra arg, use instead of null input
416 (mtf_processing) Use c parameter instead of temp_case. Pass
417 compaction_case to process_active_file_output_case().
419 * glob.c: (global variable temp_case) Removed.
421 * inpt-pgm.c: (struct input_program_pgm) Add `case_size' member.
422 (cmd_input_program) Initialize case_size. Set
423 vfm_source->value_cnt.
424 (init_case) Add struct ccase * parameter, use instead of
427 (input_program_source_read) Ditto.
429 * matrix-data.c: (matrix_data_read_without_rowtype) Ditto.
430 (dump_cell_content) Ditto.
431 (nr_output_data) Ditto.
432 (read_matrices_without_rowtype) Ditto.
433 (matrix_data_read_with_rowtype) Ditto.
434 (wr_read_splits) Ditto.
435 (wr_output_data) Ditto.
437 * sort.h: (struct sort_cases_pgm) New member `case_size'.
439 * sort.c: (sort_cases) Initialize scp->case_size.
440 (struct external_sort) Remove `case_size' member.
441 (write_initial_runs) Only call vfm_sink->class_destroy if
443 (struct sort_source_aux) New structure.
444 (sort_source_read_helper) New function.
445 (sort_source_read) Use sort_source_read_helper().
446 (read_sort_output) Change interface to be more reasonable.
447 (read_internal_sort_output) Ditto.
448 (read_external_sort_output) Ditto.
450 * vars-prs.c: (dict_class_to_name) Pass return value through
453 * vfm.c: (struct procedure_aux_data) Add `trns_case' member.
454 (procedure) Initialize trns_case.
455 (procedure) Pass trns_case to vfm_source->class->read().
457 (process_active_file) Start using struct procedure_aux_data.
458 (process_active_file_write_case) Pass trns_case to
459 transformations, lag_case(), clear_case().
460 (process_active_file_output_case) Add struct ccase * parameter.
461 (create_trns_case) New function.
462 (make_temp_case) Removed.
463 (vector_initialization) Removed.
464 (close_active_file) Only call make_source if non-null, otherwise
465 set vfm_source to null pointer. Don't free temp_case.
466 (disk_source_read) Add struct ccase * parameter, use instead of
468 (memory_source_read) Ditto.
469 (lag_case) Add const struct ccase * member.
470 (procedure_write_case) Use trns_case instead of temp_case.
471 (clear_case) Add struct ccase * member, use instead of temp_case.
472 (exclude_this_case) Ditto.
473 (create_case_source) Add struct dictionary * parameter, use to
474 initialize source->value_cnt.
476 * vfm.h: (struct case_source) Add `value_cnt' member.
477 (struct case_source_class) Add struct ccase * parameter to `read'
478 member function pointer.
479 (struct case_sink_class) Make struct ccase * parameter const in
480 `write' member function pointer.
482 Wed Mar 3 20:44:37 2004 Ben Pfaff <blp@gnu.org>
484 Fix a lot of "possibly uninitialized variable" warnings. Some of
485 them are even real bugs. A few of them make me wonder how the
488 * aggregate.c: (parse_aggregate_functions) Initialize `function.
490 * ascii.c: (output_lines) Add default case to switch.
492 * crosstabs.q: Remove static variable `expected' and all
494 (display_crosstabulation) Always calculate expected value.
496 (output_pivot_table) Initialize `cmp'.
497 (display_crosstabulation) New variable `last_row', which is
500 * data-in.c: (parse_numeric) Always initialize sign. How did this
503 * data-list.c: (repeating_data_trns_proc) Always initialize code.
504 Always set info.ofs. (How did this work?!)
506 * expr-opt.c: (optimize_tree) Always initialize `m'.
507 (evaluate_tree) Always initialize `c'. (How did this work?)
509 * frequencies.q: (frq_custom_variables) Always initialize min,
511 (frq_custom_grouped) Always initialize `dl'.
513 * groff-font.c: (groff_read_font) Always initialize char_set.
515 * matrix-data.c: (nr_output_data) Initialize `split'.
516 (wr_read_splits) Remove shadowing split_cnt declaration.
517 (wr_output_data) Initialize `split'.
519 * output.c: (tokener) Skip add character on syntax error.
521 * pool.c: (pool_strndup) Always set `copy'. (How did this work?!)
523 * postscript.c: (read_ps_encodings) Use line.string instead of
525 (write_text) Add default case to switch.
526 (text) Always initialize multiple variables. Fix bug with
529 * print.c: (fixed_parse_fortran) Initialize head.
530 (alloc_line) Add default case to switch.
532 * recode.c: (parse_dest_spec) Handle case where nothing matches.
533 (recode_trns_proc) Move variable declaration inward. Add default
536 * sfm-read.c: (read_header) Initialize skip_amt.
538 * sysfile-info.c: (display_variables) Always initialize pc.
540 * vars-prs.c: Initialized `included'.
542 Wed Mar 3 09:30:09 2004 Ben Pfaff <blp@gnu.org>
544 * main.c: (main) sigaction()'s sa_flags member was uninitialized.
545 Just use signal() instead.
547 Wed Mar 3 09:26:30 2004 Ben Pfaff <blp@gnu.org>
549 Get rid of vfm_sink_info and vfm_source_info.
551 * aggregate.c: (agr_00x_end_func) Don't increment
552 sfm_sink_info.ncases.
554 * sort.c: (do_internal_sort) Get case count from
555 vfm_source->class->count().
556 (struct external_sort) Add `case_size' member.
557 (do_external_sort) Initialize case_size.
558 (struct initial_run_state) Add `case_size' member.
559 (write_initial_runs) Initialize case_size.
560 (sort_sink_write) Use case_size.
561 (read_external_sort_output) Use case_size. Get case_cnt from
564 * vfm.c: (struct write_case_data) Add underscores to existing arg
565 names, all references updated. Renamed `aux' as `func_aux', all
566 references updated. Added new `aux' member.
567 (global var vfm_source_info) Removed.
568 (global var vfm_sink_info) Removed.
569 (struct procedure_aux_data) New.
570 (struct split_aux_data) New.
571 (procedure) Use `aux' fields for procedure_aux_data,
573 (process_active_file_write_case) Pass case_count + 1 to
574 transformation procedures, exclude_this_case().
575 (process_active_file_output_case) Don't increment
576 vfm_sink_info.ncases.
577 (prepare_for_writing) Don't initialize vfm_sink_info. Don't try
578 to send data to disk early.
579 (make_temp_case) Don't use vfm_sink_info.case_size.
580 (close_active_file) Don't initialize vfm_source_info.
581 (struct disk_stream_info) New, to allow for case_cnt and case_size fields.
582 (disk_sink_create) Initialize and/or update disk_stream_info.
583 (disk_sink_write) Ditto.
584 (disk_sink_destroy) Ditto.
585 (disk_sink_make_source) Ditto.
586 (disk_source_read) Ditto.
587 (disk_source_destroy) Ditto.
588 (global var disk_source_class) Add disk_source_count().
589 (disk_source_count) New function.
590 (struct memory_sink_info) Add `case_cnt', `case_size' members.
591 (struct memory_source_info) Ditto.
592 (memory_sink_create) Deal with case_cnt, case_size.
593 (memory_sink_write) Ditto.
594 (memory_sink_make_source) Ditto.
595 (memory_source_read) Ditto.
596 (memory_source_count) New function.
597 (memory_source_class) Add memory_source_count().
598 (procedure_write_case) Don't use vfm_sink_info.ncases. Do use
599 proc_aux->cases_written, and pass it to transformation procedures
600 and exclude_this_case ().
601 (exclude_this_case) Add case_num parameter. Pass it to
603 (SPLIT_FILE_procfunc) Use split_aux->prev_case instead of static
606 * vfm.h: (struct case_source_class) Add `count' member.
608 * vfmP.h: (struct stream_info) Removed.
609 (global variable vfm_source_info) Removed.
610 (global variable vfm_sink_info) Removed.
612 Tue Mar 2 23:38:17 2004 Ben Pfaff <blp@gnu.org>
614 * var.h: (typedef trns_proc_func) New typedef.
615 (trns_free_func) New typedef.
616 (struct trns_header) Change `proc' to type trns_proc_func, `free'
617 to type trns_free_func. This only changes the actual type of
618 trns_proc_func, adding a `case_num' parameter. Updated all
619 implementations to use the typedefs instead.
621 * compute.c: (compute_num) Pass case_num to expr_evaluate().
622 (compute_num_vec) Ditto.
624 (compute_str_vec) Ditto.
626 * do-if.c: (do_if_trns_proc) Ditto.
628 * expr-evl.c: (expr_evaluate) Add new case_num parameter, use for
631 * inpt-pgm.c: (input_program_source_read) Maintain case count,
632 pass to transformation functions.
633 (reread_trns_proc) Pass case_num arg to expr_evaluate().
635 * loop.c: (loop_1_trns_proc) Ditto.
636 (loop_2_trns_proc) Ditto.
637 (loop_3_trns_proc) Ditto.
639 * print.c: (print_space_trns_proc) Ditto.
641 * sel-if.c: (select_if_proc) Ditto.
643 Tue Mar 2 11:36:52 2004 Ben Pfaff <blp@gnu.org>
645 * frequencies.q: (cleanup_freq_tab) Avoid memory leak by
646 destroying hash table.
648 * glob.c: (read_active_file) Variable not referenced, removed.
649 (cancel_input_pgm) Ditto.
651 * levene.c: Add #include <stdlib.h> needed to call free().
653 * aggregate.c: (parse_aggregate_functions) Make `function'
656 Tue Mar 2 11:30:56 2004 Ben Pfaff <blp@gnu.org>
658 Start working to eliminate VFM dependence on static variables.
660 * command.c: (cmd_parse) Use case_source_is_class().
662 * data-list.c: Rewrite to eliminate use of static variables.
664 * dfm.c: (cmd_begin_data) Use case_source_is_class().
666 * file-handle.q: (fh_handle_name) Make parameter const.
668 * file-type.c: Rewrite to eliminate use of static variables.
670 * flip.c: Rewrite to eliminate use of static variables.
672 * format.c: (get_format_var_width) New function.
674 * get.c: Eliminate use of static variables.
676 * inpt-pgm.c: Eliminate use of static variables.
678 * matrix-data.c: Eliminate use of static variables.
680 * set.q: (set_max_workspace) New variable.
681 (cmd_set) Use SET WORKSPACE to modify set_max_workspace.
683 * var.h: (struct case_list) Move here from vfmP.h.
685 * vars-atr.c: (discard_variables) Handle new vfm_source type.
687 * vfm.c: (vfm_source) Change type from struct case_stream to
689 (vfm_sink) Change type from struct case_stream to struct
691 (static var paging) Rename workspace_overflow, all references
693 (procedure) Use new class structures.
694 (process_active_file) Ditto.
695 (process_active_file_write_case) Ditto.
696 (prepare_for_writing) Use set_max_workspace. Use new class
698 (close_active_file) Use new class structures. Free old sink.
699 (global var disk_source_file) Removed.
700 (global var disk_sink_file) Removed.
701 (disk_stream_init) Removed.
702 (disk_stream_read) Removed.
703 (disk_stream_write) Removed.
704 (disk_stream_mode) Removed.
705 (disk_stream_destroy_source) Removed.
706 (disk_stream_destroy_sink) Removed.
707 (global var vfm_disk_stream) Removed.
708 (disk_sink_create) New function.
709 (disk_sink_write) New function.
710 (disk_sink_destroy) New function.
711 (disk_sink_make_source) New function.
712 (disk_sink_class) New static var.
713 (disk_source_read) New function.
714 (disk_source_destroy) New function.
715 (global var vfm_source_class) New var.
716 (global var memory_source_cases) Removed.
717 (global var memory_sink_cases) Removed.
718 (global var memory_sink_max_cases) Removed.
719 (struct memory_sink_info) New struct.
720 (memory_stream_init) Removed.
721 (memory_stream_read) Removed.
722 (memory_stream_write) Removed.
723 (memory_stream_mode) Removed.
724 (memory_stream_destroy_source) Removed.
725 (memory_stream_destroy_sink) Removed.
726 (global var vfm_memory_stream) Removed.
727 (page_to_disk) Renamed write_active_file_to_disk().
728 (memory_sink_create) New function.
729 (memory_sink_write) New function.
730 (memory_sink_destroy) New function.
731 (memory_sink_make_source) New function.
732 (memory_sink_class) New static var.
733 (memory_source_read) New function.
734 (memory_source_destroy) New function.
735 (memory_source_get_cases) New function.
736 (memory_source_set_cases) New function.
737 (global var vfm_source_class) New var.
738 (procedure_write_case) Use new class structures.
739 (create_case_source) New function.
740 (case_source_is_complex) New function.
741 (case_source_is_class) New function.
742 (create_case_sink) New function.
744 * vfm.h: (global variable reinit_sysmis) Not used, removed.
745 (global variable reinit_blanks) Not used, removed.
746 (global variable init_zero) Not used, removed.
747 (global variable init_blanks) Not used, removed.
748 (struct case_source) New struct.
749 (struct case_source_class) New struct.
750 (struct case_sink) New struct.
751 (struct case_sink_class) New struct.
752 (struct case_stream) Removed.
754 * vfmP.h: (struct case_list) Moved to var.h.
756 Tue Mar 2 11:28:30 2004 Ben Pfaff <blp@gnu.org>
758 * algorithm.c: (count_equal) New function.
759 (count_if) New function.
760 (unique) Add assertions.
761 (partition) Add assertions.
762 (is_partitioned) New function.
763 (copy_if) Add assertions.
764 (remove_equal) Add assertions.
765 (lexicographical_compare) Rename lexicographical_compare_3way.
766 (sort) Add assertions. Rephrase some code.
767 (is_sorted) New function.
769 Sun Feb 29 23:24:57 2004 Ben Pfaff <blp@gnu.org>
773 * sort.c: Completely rewrite.
775 * sort.h: Expose interface via struct sort_cases_pgm, not via
778 * aggregate.c: (sort) New static var.
779 (cmd_aggregate) Use sort.
780 (create_sysfile) Ditto.
781 (aggregate_single_case) Ditto.
782 (dump_aggregate_info) Ditto.
783 (agr_00x_end_func) Ditto.
786 * var.h: (enum SRT_ASCEND) Removed.
787 (enum SRT_DESCEND) Removed.
788 (struct sort_cases_proc) Removed.
789 (struct variable) Remove p.srt member.
791 Sun Feb 29 23:22:45 2004 Ben Pfaff <blp@gnu.org>
793 Get rid of the old, crappy heap structure and replace it by a new,
794 shiny, C++ STL-like heap structure.
796 * Makefile.am: (pspp_SOURCES) Remove heap.c, heap.h.
798 * algorithm.c: (push_heap) New function.
809 Sun Feb 29 23:21:53 2004 Ben Pfaff <blp@gnu.org>
811 Increase warning level.
813 * Makefile.am: (AM_CFLAGS) Remove -Wnouninitialized.
815 Sat Feb 21 17:38:58 WST 2004 John Darrington <john@darrington.wattle.id.au>
817 * main.c: Added a signal handler for SIGSEGV requesting a bug report.
819 Fri Feb 20 23:22:14 2004 Ben Pfaff <blp@gnu.org>
821 * dictionary.c: (dict_create_var) Fix root cause of bug worked
822 around by previous change log entry.
824 * compute.c: (lvalue_finalize) Remove workaround from previous
827 Fri Feb 20 14:37:41 WAST 2004 John Darrington <john@darrington.wattle.id.au>
829 * compute.c: Fixed a bug where the Format was not getting set for
830 computed variables (thus causing a crash when SAVEing).
832 * Added a test to stop this bug ever coming back
834 Wed Feb 18 22:21:35 2004 Ben Pfaff <blp@gnu.org>
836 Got rid of approx.h. In general, replaced all references to
837 approx_eq() by ==, approx_lt() by <, etc. Other types of changes
840 * Makefile.am: (pspp_SOURCES) Removed approx.h.
842 * data-out.c: (try_F) Replaced test for approx_eq(number, 0.0) by
843 test for mag < EPSILON.
845 * misc.h: Add definition of EPSILON.
847 Wed Feb 18 21:32:44 2004 Ben Pfaff <blp@gnu.org>
849 * vfm.c: (procedure) Add check to prevent recursive call.
851 Wed Feb 18 21:48:54 WST 2004 John Darrington <john@darrington.wattle.id.au>
853 * Moved the declarations relating to values to their own header file
856 * Added levene.c and levene.h
858 * vars-atr.c: Changed the signature of compare_values to
859 take const * arguments.
861 * t-test.q: Changed the structure of struct t_test_proc
862 variables now contain their own group statistics information.
863 Eventually, t_test_proc might get renamed, because it'd be
864 applicable to other commands too.
866 Mon Feb 16 23:15:51 2004 Ben Pfaff <blp@gnu.org>
868 * data-out.c: Clean up. Changed interface of convert_*() to take
869 either a `double' or a `const char *' instead of a `const union
870 value *'. Update all implementations of those interfaces.
871 (data_out) Use switch statements instead of a table.
872 (convert_AHEX) Rewrite.
874 * format.h: Update comment.
876 Mon Feb 16 22:14:36 2004 Ben Pfaff <blp@gnu.org>
878 * q2c.c: (dump_header) Add an Emacs header line to output files
879 that makes generated .c files read-only by default, to make it
880 difficult to accidentally change generated files.
882 Mon Feb 16 22:12:07 2004 Ben Pfaff <blp@gnu.org>
884 * frequencies.q: (compare_freq_numeric_a) Compare by frequency,
885 not bogus a->v.c <=> b->v.c pointer compare.
886 (compare_freq_alpha_a) Ditto.
887 (compare_freq_numeric_d) Ditto.
888 (compare_freq_alpha_d) Ditto.
890 Mon Feb 16 22:00:53 2004 Ben Pfaff <blp@gnu.org>
892 Changed data_out() to store string data directly into a `union
893 value''s s member, not indirectly into c.
895 * crosstabs.q: (output_pivot_table) Use format_short() instead of
897 (table_value_missing) Ditto.
898 (float_M_suffix) Ditto.
899 (format_short) New function.
901 * data-in.h: (data_in_finite_line) Remove inline definition.
903 * data-list.c: (destroy_dls_var_spec) New function.
904 (destroy_dls) Rewrite in terms of destroy_dls_var_spec().
905 (data_list_source_destroy_source) Avoid cast.
906 (struct repeating_data_trns) New field `id_value'. Update
908 (cmd_repeating_data) Initialize id_value. Use new
909 repeating_data_trns_free() for freeing REPEATING DATA
911 (rpd_parse_record) Rewrite support for record ID to be less bogus.
912 (repeating_data_trns_free) New function.
914 * data-out.c: (data_out) Change return type to `void' by replacing
915 error returns by writing a message into the output buffer.
916 (convert_A) Read from v->s instead of v->c.
917 (convert_AHEX) Ditto.
919 * expr-evl.c: Update comment.
920 (expr_evaluate) Add assertion in OP_STRING case.
922 * format.h: (macro MAX_FORMATTED_LEN) New macro.
924 * list.q: (list_cases) Update for new data_out() semantics.
926 * print.c: (print_trns_proc) Ditto.
928 * tab.c: (tab_value) Ditto.
929 (tab_float) Avoid stupid cast.
931 * var.h: Update comments.
932 (macro MAX_STRING) New macro.
933 (macro MAX_ELEMS_PER_VALUE) New macro.
935 * vars-atr.c: (compare_values) New function.
937 * vfm.c: (dump_splits) Update for new data_out() semantics.
939 Mon Feb 16 21:45:47 2004 Ben Pfaff <blp@gnu.org>
941 * crosstabs.q: (struct table_entry) Rename v[] to values[]. All
943 (struct crosstab) Rename v[] to vars[]. All references updated.
944 (hash_table_entry) Replace the hash algorithm and fix a bug at the
945 same time, which caused the hash value to depend only on a single
946 value, not all of the variables' values.
948 Mon Feb 16 12:49:53 2004 Ben Pfaff <blp@gnu.org>
950 Clean up struct dictionary's value_cnt usage.
952 * dictionary.c: Add a function comment to each function.
953 (struct dictionary) Rename value_cnt to next_value_idx, which more
954 accurately reflects its meaning. All references updated.
955 (dict_rename_vars) Add assertion.
956 (dict_get_value_cnt) Rename dict_get_next_value_idx(). All
958 (dict_get_case_size) New function.
960 * aggregate.c: (create_sysfile) Use dict_get_case_size().
962 * get.c: (mtf_read_nonactive_records) Ditto.
964 * sort.c: (allocate_cases) Ditto.
965 (write_initial_runs) Ditto.
969 * vfm.c: (prepare_for_writing) Ditto.
973 Mon Feb 16 00:17:55 2004 Ben Pfaff <blp@gnu.org>
975 Make vfm.c slightly less grotesque.
977 * vfm.c: (filter_var) Removed.
978 (filter_index) Removed.
979 (FILTERED macro) Removed.
980 (exclude_this_case) New function.
981 (process_active_file_write_case) Use exclude_this_case() instead
982 of FILTERED and inline tests.
983 (procedure_write_case) Ditto.
984 (setup_filter) Removed.
985 (open_active_file) Don't call setup_filter().
986 (close_active_file) Call dict_get_filter() instead of checking
989 Mon Feb 16 00:01:53 2004 Ben Pfaff <blp@gnu.org>
991 * var.h: (struct variable) Update comments.
993 Sun Feb 15 23:14:59 2004 Ben Pfaff <blp@gnu.org>
995 New functions dict_create_var_assert(), dict_lookup_var_assert().
996 Converted several dict_*_var()/assert pairs into a single
999 * dictionary.c: (dict_create_var_assert) New function.
1000 (dict_lookup_var_assert) New function.
1002 Sun Feb 15 23:06:08 2004 Ben Pfaff <blp@gnu.org>
1004 Got rid of "struct long_vec", envector(), devector(), etc. Added
1005 two members `init', `reinit' to struct variable as a substitute.
1007 * Makefile.am: (pspp_SOURCES) Removed cases.c, cases.h.
1013 * aggregate.c: (parse_aggregate_functions) destvar doesn't need
1016 * autorecode.c: (cmd_autorecode) destvars don't need init.
1018 * compute.c: (lvalue_finalize) Set reinit.
1020 * data-list.c: (fixed_parse_compatible) Don't need init usually.
1021 (dump_fmt_list) Ditto.
1024 * descript.q: (run_z_pass) Don't need init for z-scores.
1026 * dictionary.c: (dict_create_var) Initialize `init', `reinit'
1028 (dict_clone_var) Copy `reinit' member, initialize `init' member.
1030 * glob.c: (init_glob) Remove vec_init() calls.
1032 * inpt-pgm.c: (cmd_end_input_program) Use `reinit', not `left'.
1034 * loop.c: (internal_cmd_loop) Don't need to call envector().
1036 * numeric.c: (cmd_numeric) Ditto.
1038 (cmd_leave) Ditto. Set `init', `reinit' members.
1040 * recode.c: (cmd_recode) Don't need to call envector().
1042 * repeat.c: (internal_cmd_do_repeat) Ditto.
1044 * var.h: (struct variable) Remove `left'. Add `init', `reinit'.
1045 (force_create_variable) Removed prototype.
1046 (force_dup_variable) Ditto.
1048 * vector.c: (cmd_vector) Don't need to call envector().
1050 * vfm.c: (reinit_sysmis) Removed.
1051 (reinit_blanks) Removed.
1052 (init_zero) Removed.
1053 (init_blanks) Removed.
1054 (process_active_file_write_case) No need to deal with vectors.
1055 Call clear_temp_case().
1056 (vector_initialization) Rewrite to use `init', `reinit'.
1057 (close_active_file) No need to call vec_clear().
1058 (procedure_write_case) Call clear_temp_case().
1059 (clear_temp_case) New function.
1061 Sun Feb 15 20:50:36 2004 Ben Pfaff <blp@gnu.org>
1063 * pfm-write.c: (bufwrite) Get rid of nasty cast that also invoked
1066 Thu Feb 12 23:35:15 2004 Ben Pfaff <blp@gnu.org>
1068 Add auxiliary argument to procedure() interface. Associated small
1069 clean-ups of vfm interface.
1071 * Updated every caller of procedure() and process_active_file() to
1072 reflect modified interface. Simple, ordinary changes not listed
1075 * Updated every function that implements struct case_stream's
1076 `read' function to take a write_case_func and a write_case_data.
1077 Also updated every caller of write_case() to instead call them
1078 through these arguments. In some cases this meant that the extra
1079 args had to be threaded through a couple of extra levels. This
1080 wasn't difficult or interesting so the details won't be given.
1082 * data-list.c: (struct repeating_data_trns) Add members
1083 `write_case', `wc_data' as kluge.
1084 (read_one_set_of_repetitions) Rename repeating_data_trns_proc and
1086 (repeating_data_set_write_case) New function.
1088 * data-list.h: New file to declare repeating_data_trns_proc() and
1089 repeating_data_set_write_case().
1091 * inpt-pgm.c: (input_program_source_read) Call
1092 repeating_data_set_write_case() for all the REPEATING DATA
1093 transformations, so that they know where to send their cases.
1094 It's a big kluge. Also kluge in END CASE.
1095 (end_case_trns_proc) Never called anymore, but we still need it,
1098 * sort.c: (read_sort_output) Update to match struct case_stream
1101 * vfm.c: (struct write_case_data) New structure.
1102 (proc_func) Removed.
1103 (virt_proc_func) Removed.
1104 (begin_func) Removed.
1105 (virt_begin_func) Removed.
1107 (write_case) Removed.
1108 (procedure) Added an auxiliary parameter to each function pointer
1109 argument's prototype. Added an auxiliary data parameter.
1111 (process_active_file) Ditto.
1112 (process_active_file_write_case) Pass aux data along.
1113 (close_active_file) Ditto.
1114 (procedure_write_case) Ditto.
1115 (SPLIT_FILE_procfunc) Ditto.
1117 * vfm.h: (typedef write_case_data) New.
1118 (typedef write_case_func) New.
1119 (struct case_stream) Add parameters to `read' member prototype.
1121 Thu Feb 12 19:24:53 WST 2004 John Darrington <john@darrington.wattle.id.au>
1123 * t-test.q: Added calculations for independent samples. (But no Levene
1126 * Makefile.am: Moved q_sources_c into own variable
1128 Wed Feb 11 23:56:51 2004 Ben Pfaff <blp@gnu.org>
1130 Miscellaneous cleanups.
1132 * Change unused to UNUSED in many source files to reflect modified
1133 pref.h. Change use of __WIN32__, __MSDOS, __DJGPP__,
1134 __CYGWIN32__, __unix__, and unix not to assume that they're
1135 defined to a nonzero value. Change use of __attribute__ to use
1136 NO_RETURN or PRINTF_FORMAT instead.
1138 * alloc.h: Move definitions for local_alloc(), local_free() here
1139 from ../pref.h.orig and simplify.
1141 * expr-evl.c: Instead of working differently based on PAGED_STACK,
1142 use a pool allocator unconditionally.
1143 (CHECK_STRING_SPACE) Removed.
1144 (ALLOC_STRING_SPACE) Removed.
1145 (expr_evaluate) Use e->pool instead of CHECK_STRING_SPACE and
1148 * expr-opt.c: (dump_expression) Allocate string pool.
1150 * expr-prs.c: (expr_free) Free string pool.
1152 * pool.c: (pool_destroy) This pool must be removed from its
1153 parent's list of gizmos, not from its own. Use free_all_gizmos().
1154 (pool_clear) New function.
1155 (free_all_gizmos) New function.
1156 (pool_alloc) Use space in empty block after this one if any.
1157 (pool_release) Only empty out blocks, don't actually free() them.
1159 * print.c: Get rid of PAGED_STACK special case by always
1160 dynamically allocating line buffers.
1161 (struct print_trns) Always include the `line' member.
1162 (internal_cmd_print) Always initialize the `line' member.
1163 (alloc_line) Always allocate memory for `line'.
1164 (print_trns_proc) Always initialize buf from `line' member.
1165 (print_trns_free) Always free `line' memory.
1167 * sort.c: (allocate_file_handles) Special-case MS-DOS for mkdir()
1170 Wed Feb 11 20:33:18 2004 Ben Pfaff <blp@gnu.org>
1172 * flip.c: Fixed crash from FLIP when a numeric variable is
1173 specified on NEWNAMES and a large value is used, and a couple of
1174 other minor bugs besides.
1175 (struct varname) Make name a 9-character fixed-size array
1176 instead of a 1-character variable size array.
1177 (make_new_var) Allow digits in variable names.
1178 (flip_stream_write) Limit numeric values to 8 characters and
1179 format system missing and very large and small values more
1182 Thu Feb 5 13:19:06 WAST 2004 John Darrington <john@darrington.wattle.id.au>
1184 * command.c: Fixed test on command return status for the correct
1185 value, which had been causing a crash under certain invalid input.
1187 Wed Feb 4 15:34:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
1189 * t-test.q: Added calculations for the one sample variant of the T-TEST
1191 Tue Feb 3 20:09:54 2004 Ben Pfaff <blp@gnu.org>
1193 * tab.c: (render_strip) Fix bug that sometimes caused joined text
1194 in joined cells to be rendered outside box boundaries.
1196 Tue Feb 3 18:56:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1198 * random.c (rng_create): Fixed seeding so that it gets reseeded after
1199 SET seed=xx has been called.
1201 Mon Jan 19 14:08:09 2004 Ben Pfaff <blp@gnu.org>
1203 * random.c (rng_get_double): Fix always-returning-zero bug in my
1204 preferred way, and at the same time make sure rounding doesn't
1207 Thu Jan 1 23:16:41 2004 Ben Pfaff <blp@gnu.org>
1209 * html.c: (change_attributes) Dead code, removed.
1210 (escape_string) Eliminate code to call change_attributes() that
1211 never actually called it.
1212 (output_tab_table) Get rid of dependence on tab_hit
1213 and struct tab_joined_cell's hit member, which are abominations.
1215 * tab.c: (tab_output_text) Don't call
1216 d->class->text_set_font_by_name if it's a null pointer.
1217 (macro UNROLL_LOOP) Eliminate.
1218 (macro UNROLL_3_LOOPS) Eliminate.
1219 (tabi_render) Rewrite not to use the above macros.
1221 Thu Jan 1 23:09:07 2004 Ben Pfaff <blp@gnu.org>
1223 Start working on a new output driver system, one that doesn't suck
1224 so much, by adding a "device-independent" output driver. The idea
1225 is to write out only a single output stream, then use separate
1226 processes to translate them into whatever formats we want. This
1227 is similar to how "groff" works with its various output drivers
1228 (grops, grotty, grodvi, ...).
1230 * Makefile.am: (pspp_SOURCES) Add devind.c, devind.h.
1232 * list.q: (write_all_headers) Stub out devind class.
1234 (determine_layout) Ditto.
1237 * output.c: (outp_init) Add devind class.
1239 * devind.c: New file.
1241 * devind.h: New file.
1243 Thu Jan 1 23:08:14 2004 Ben Pfaff <blp@gnu.org>
1245 * frequencies.q: (hash_value_alpha) Fixed up the previous change
1246 to use the proper string length.
1248 Wed Dec 31 16:27:33 WAST 2003 John Darrington <john@darrington.wattle.id.au>
1250 * Fixed bug where FREQ would crash on alpha values
1252 Tue Dec 30 22:42:57 2003 Ben Pfaff <blp@gnu.org>
1254 * Removed bletcherous alloca() workarounds for AIX from top of
1255 many files. AIX can use the alternative alloca() implementation
1258 Tue Dec 30 22:35:16 2003 Ben Pfaff <blp@gnu.org>
1260 * ascii.c: (ascii_option) Fix implementation of headers option.
1262 Tue Dec 30 22:32:53 2003 Ben Pfaff <blp@gnu.org>
1264 * ascii.c: Add a "squeeze" option to the ASCII driver to squeeze
1265 multiple blank lines into one.
1266 (struct ascii_driver_ext) Add squeeze_blank_lines option.
1267 (ascii_preopen_driver) Initialize squeeze_blank_lines.
1268 (static var option_tab) Add squeeze entry.
1269 (ascii_option) Set squeeze_blank_lines.
1270 (output_lines) Implement squeezing blank lines.
1272 Wed Dec 31 07:19:46 WST 2003 John Darrington <john@darrington.wattle.id.au>
1274 * Removed redundant code from output.h
1276 Sat Dec 27 22:17:52 2003 Ben Pfaff <blp@gnu.org>
1278 Dictionary classes: each variable is "ordinary", "system", or
1281 * var.h: (enum dict_class) New enum.
1283 * vars-prs.c: (dict_class_from_id) New function.
1284 (dict_class_to_name) New function.
1286 Sat Dec 27 22:16:06 2003 Ben Pfaff <blp@gnu.org>
1288 * var.h: (struct freq_tab_set) Removed (not used).
1290 Sat Dec 27 22:15:21 2003 Ben Pfaff <blp@gnu.org>
1292 * value-labels.c: (val_labs_destroy) vls needs to be freed too.
1294 Sat Dec 27 22:10:49 2003 Ben Pfaff <blp@gnu.org>
1296 * stats.c: (hypercube) Rename pow4(). All references updated.
1298 Sat Dec 27 22:05:49 2003 Ben Pfaff <blp@gnu.org>
1300 * rename-vars.c: (cmd_rename_variables) Rewritten.
1301 (compare_name) Removed.
1303 Sat Dec 27 22:03:51 2003 Ben Pfaff <blp@gnu.org>
1305 var_set feature, and code taking advantage of it.
1307 * crosstabs.q: (static var var_dict) Removed.
1308 (static var variables) New variable.
1309 (static var variables_cnt) New variable.
1310 (cmd_crosstabs) Free variables instead of var_dict.
1311 (internal_cmd_crosstabs) Initialize and use variables,
1312 variables_cnt instead of var_dict.
1313 (free_var_dict) Removed.
1314 (crs_custom_tables) Use var_set instead of a copied dictionary.
1315 (crs_custom_variables) Set up variables, variables_cnt instead of
1317 [DEBUGGING] (debug_print) Ditto.
1319 * means.q: (mns_custom_tables) Use var_set instead of a copied
1322 * vars-prs.c: (parse_vs_variable) New function.
1323 (parse_dict_variable) Rewritten.
1324 (parse_variable) Rewritten.
1325 (parse_variables) Renamed parse_var_set_vars(), rewritten.
1326 (parse_variables) New function in terms of parse_var_set_vars().
1327 Now requires its first argument to be non-null. All references
1328 that passed a null pointer updated to pass default_dict instead.
1329 (macro id_dict) Removed.
1330 (parse_DATA_LIST_vars) Add assertions.
1331 (parse_mixed_vars) Ditto.
1332 (struct var_set) New structure.
1333 (var_set_get_cnt) New function.
1334 (var_set_get_var) New function.
1335 (var_set_lookup_var) New function.
1336 (var_set_destroy) New function.
1337 (dict_var_set_get_cnt) New function.
1338 (dict_var_set_get_var) New function.
1339 (dict_var_set_lookup_var) New function.
1340 (dict_var_set_destroy) New function.
1341 (var_set_create_from_dict) New function.
1342 (struct array_var_set) New structure.
1343 (array_var_set_get_cnt) New function.
1344 (array_var_set_get_var) New function.
1345 (array_var_set_lookup_var) New function.
1346 (array_var_set_destroy) New function.
1347 (var_set_create_from_array) New function.
1349 * q2c.c: (dump_parser) Use parse_variables(default_dict, ...)
1350 instead of parse_variables(NULL, ...) in output code.
1352 Sat Dec 27 21:38:53 2003 Ben Pfaff <blp@gnu.org>
1354 Change inp_init from a 2-bit vector to an ordinary array.
1355 Initialize it all in cmd_end_input_program() instead of in
1358 * inpt-pgm.c: (enum value_init_type) New enum.
1359 (global var inp_init) Change to `enum value_init_type *', make
1361 (inp_init_size) Removed.
1362 (inp_nval) Change to `size_t', make static.
1363 (cmd_input_program) Don't initialize inp_init or inp_init_size.
1364 (cmd_end_input_program) Initialize inp_init, inp_nval.
1365 (init_case) Rewrite.
1366 (clear_case) Rewrite.
1368 * inpt-pgm.h: Removed.
1370 Sat Dec 27 21:36:38 2003 Ben Pfaff <blp@gnu.org>
1372 * hash.c: (hsh_hash_bytes) Use Fowler-Noll-Vo hash instead of
1373 Colin Plumb hash. It is simpler and should better resist
1375 (hsh_hash_string) Ditto.
1377 Sat Dec 27 21:34:57 2003 Ben Pfaff <blp@gnu.org>
1379 * get.c: (export_write_case_func) Remove debug printing code.
1381 Sat Dec 27 21:11:09 2003 Ben Pfaff <blp@gnu.org>
1383 * get.c: (cmd_save_internal) Rename parameter. Use &t->h instead
1385 (save_write_case_func) Use &trns->h instead of cast.
1386 (cmd_export) Use &t->h instead of cast.
1388 Sat Dec 27 20:57:42 2003 Ben Pfaff <blp@gnu.org>
1390 Moved vectors into the dictionary.
1392 * var.h: (struct vector) Moved here from vector.h. `index' member
1393 renamed `idx', `v' renamed `var', `nv' renamed `cnt'. All
1396 * vector.h: Removed.
1398 * vector.c: (global var vec) Removed.
1399 (global var nvec) Removed.
1400 (cmd_vector) Rewritten.
1401 (find_vector) Removed.
1403 * dictionary.c: (dict_create_vector) New function.
1404 (dict_get_vector) New function, replaces reading global vec[]
1406 (dict_get_vector_cnt) New function, replaces reading global nvec
1408 (dict_lookup_vector) New function, replaces find_vector().
1409 (dict_clear_vectors) New function.
1411 Sat Dec 27 20:54:01 2003 Ben Pfaff <blp@gnu.org>
1413 Start to move away from `struct variable' p `union' member to void
1416 * var.h: (struct variable) Add `aux' member.
1418 Sat Dec 27 20:36:25 2003 Ben Pfaff <blp@gnu.org>
1420 Get rid of struct variable `foo' member.
1422 * frequencies.q: (internal_cmd_frequencies) Use p.frq.used instead
1424 (frq_custom_variables) Ditto.
1425 (frq_custom_grouped) Ditto.
1427 * get.c: (struct save_trns) Change `var' member from `int *' to
1428 `struct variable **'.
1429 (cmd_save_internal) Use aux instead of foo.
1430 (save_trns_proc) Use revised `var' member.
1431 (static var mtf_seq_no) Renamed mtf_seq_num.
1432 (static var mtf_seq_nums) New static var.
1433 (cmd_match_files) Initialize mtf_seq_nums.
1434 (mtf_free) Free mtf_seq_nums.
1435 (mtf_processing) Use mtf_seq_nums instead of foo.
1436 (mtf_merge_dictionary) No need to initialize mv->foo.
1437 (cmd_export) Use aux instead of foo. Use revised `var' member.
1438 (mns_custom_tables) Don't use foo to check for duplicates, that's
1439 what PV_NO_DUPLICATE is for.
1441 * var.h: (struct variable) Remove `foo' member.
1442 (struct frequencies_proc) New member.
1444 Sat Dec 27 19:46:13 2003 Ben Pfaff <blp@gnu.org>
1446 Clean up COMPUTE and IF.
1448 * compute.c: More or less rewrite the darn thing.
1449 (struct compute_trns) Rename and reorder and add and delete
1451 (cmd_compute) Rewrite.
1452 (compute_num) Make conditional on test expression. Now used for
1453 both COMPUTE and IF.
1454 (compute_num_vec) Ditto.
1455 (compute_str) Ditto.
1456 (compute_str_vec) Ditto.
1459 (if_num_vec) Removed.
1461 (if_str_vec) Removed.
1462 (parse_target_expression) Renamed parse_rvalue_expression(),
1464 (new_trns) Renamed compute_trns_create(), rewritten.
1465 (delete_trns) Removed.
1466 (free_trns) Renamed compute_trns_free(), rewritten.
1467 (struct lvalue) New structure.
1468 (parse_var_or_vec) Renamed lvalue_parse(), rewritten.
1469 (lvalue_get_type) New function.
1470 (lvalue_is_vector) New function.
1471 (lvalue_finalize) New function.
1472 (lvalue_destroy) New function.
1474 Sat Dec 27 19:44:14 2003 Ben Pfaff <blp@gnu.org>
1476 * command.def: Disallow MODIFY VARS in input mode, so that
1477 variables can't get dropped and confuse cmd_end_input_program()'s
1478 attempt to fill inp_init[].
1480 * modify-vars.c: (static var forward_positional_ordering) New
1482 (struct var_modification) Entirely changed.
1483 (rearrange_dict) Interface changed, rewritten.
1484 (cmd_modify_vars) Deal with modified struct var_modification, much
1486 (struct var_renaming) New structure.
1487 (compare_var_renaming_by_new_name) New function.
1488 (validate_var_modification) New function.
1490 * var.h: (struct modify_vars_proc) Removed.
1491 (struct variable) Removed member p.mfv.
1493 Sat Dec 27 19:40:26 2003 Ben Pfaff <blp@gnu.org>
1495 Make EVALUATE a valid command whether we're debugging or not, so
1496 that `make check' can succeed regardless of whether debugging is
1499 * command.def: [GLOBAL_DEBUGGING] Drop the #if.
1501 * compute.c: [GLOBAL_DEBUGGING] (cmd_evaluate) Drop the #if.
1503 Sat Dec 27 19:34:40 2003 Ben Pfaff <blp@gnu.org>
1505 * apply-dict.c: (cmd_apply_dictionary) Replace a ghastly switch
1506 statement by a simple if test.
1508 * dfm.c: (dfm_get_record) Add assertion.
1510 Sat Dec 27 17:51:26 2003 Ben Pfaff <blp@gnu.org>
1512 For each file x.c, move #include "x.h" to the very top of the
1513 include list, to catch x.h failing to include the proper headers.
1515 Sat Dec 27 17:50:19 2003 Ben Pfaff <blp@gnu.org>
1517 * algorithm.c: (find) New function.
1518 (remove_equal) New function.
1519 (set_difference) New function.
1520 (adjacent_find_equal) New function.
1521 [TEST_UNIQUE] Removed test case.
1522 (copy_if) Find end test.
1524 Sat Dec 27 17:42:45 2003 Ben Pfaff <blp@gnu.org>
1526 * dictionary.c: (dict_get_case_weight) New convenience function.
1528 * aggregate.c: (accumulate_aggregate_info) Use
1529 dict_get_case_weight().
1531 * frequencies.q: (calc_general) Ditto.
1532 (calc_integer) Ditto.
1535 * t-test.q: (groups_calc) Ditto.
1538 Sat Dec 27 17:29:45 2003 Ben Pfaff <blp@gnu.org>
1540 * glob.c: (global var default_dict) Change from `struct
1541 dictionary' to `struct dictionary *'. All references changed.
1542 (init_glob) Initialize default_dict with dict_create().
1544 Sat Dec 27 17:06:06 2003 Ben Pfaff <blp@gnu.org>
1546 struct dictionary now made opaque. All related functions:
1548 * get.c: (rename_variables) Removed.
1549 (dict_delete_run) Removed.
1551 * temporary.c: (copy_variable) Removed.
1552 (new_dictionary) Removed.
1553 (save_dictionary) Removed.
1554 (restore_dictionary) Removed.
1555 (free_dictionary) Removed.
1557 * vars-atr.c: (clear_default_dict) Removed.
1558 (find_variable) Removed.
1559 (find_dict_variable) Removed.
1560 (create_variable) Removed.
1561 (delete_variable) Removed.
1562 (common_init_stuff) Removed.
1563 (init_variable) Removed. Updating of inp_init moved into
1564 cmd_end_input_program().
1565 (replace_variable) Removed.
1566 (rename_variable) Removed.
1567 (clear_variable) Removed.
1568 (dup_variable) Removed.
1570 * vars-prs.c: (is_varname) Removed.
1571 (is_dict_varname) Removed.
1572 (fill_all_vars) Removed.
1574 * vector.c: (find_vector) Removed.
1576 * weight.c: (stop_weighting) Removed.
1578 * dictionary.c: New file.
1579 (dict_create) New, replaces new_dictionary().
1580 (dict_clone) New, replaces save_dictionary() and
1581 restore_dictionary().
1582 (dict_clear) New, replaces clear_default_dict().
1583 (dict_destroy) New, replaces free_dictionary().
1584 (dict_get_var_cnt) New function, replaces references to
1586 (dict_get_var) New function, replaces references to dict->var[i].
1587 (dict_get_vars) New function, replaces fill_all_vars().
1588 (dict_create_var) New, replaces create_variable(). Interface
1589 drops `type' parameter, using a zero `width' to designate numeric.
1590 (dict_clone_var) New, replaces dup_variable().
1591 (dict_rename_var) New, replaces rename_variable().
1592 (dict_lookup_var) New, replaces find_variable(),
1593 find_dict_variable(), is_varname().
1594 (dict_contains_var) New function.
1595 (compare_variable_dblptrs) New function.
1596 (dict_delete_var) New function, replaces clear_variable().
1597 (dict_delete_vars) New function, replaces dict_delete_run().
1598 (dict_reorder_vars) New function.
1599 (dict_rename_vars) New function, replaces rename_variables().
1600 (dict_get_weight) New function, replaces reading dict->weight_var.
1601 (dict_set_weight) New function, replaces writing dict->weight_var
1602 or calling stop_weight(dict).
1603 (dict_get_filter) New function, replaces reading dict->filter_var.
1604 (dict_set_filter) New function, replaces writing dict->filter_var.
1605 (dict_get_case_limit) New function, replaces reading dict->N.
1606 (dict_set_case_limit) New function, replaces writing dict->N.
1607 (dict_get_value_cnt) New function, replaces reading dict->nval.
1608 (dict_compact_values) New function, replaces a loop that was
1609 replicated in several places.
1610 (dict_get_split_vars) New function, replaces reading dict->splits.
1611 (dict_get_split_cnt) New function, replaces reading
1613 (dict_set_split_vars) New function, replaces writing dict->splits.
1614 (dict_get_label) New function, replaces reading dict->label.
1615 (dict_set_label) New function, replaces writing dict->label.
1616 (dict_get_documents) New function, replaces reading
1618 (dict_set_documents) New function, replaces writing
1621 All references to above functions updated.
1623 * aggregate.c: (cmd_aggregate) Copy file label and documents from
1624 old dictionary to new by hand, because dict_create() can't do it
1625 itself. Use dict_set_documents(), dict_set_split_vars().
1627 * temporary.c: (cancel_temporary) Also set temp_dict to NULL after
1628 calling dict_destroy().
1630 * data-list.c: (dls_var_spec) Remove `type' member, replace by
1632 (fixed_parse_compatible) Some slightly nontrivial changes for
1634 (dump_fmt_list) Ditto.
1637 * file-type.c: (create_col_var) Ditto.
1639 * get.c: (cmd_get) Use dict_compact_values() instead of a loop.
1640 (trim_dictionary) Use dict_delete_vars(), dict_reorder_vars().
1641 (rename_variables) Use dict_rename_vars().
1642 (mtf_merge_dictionary) Use dict_get_documents(),
1643 dict_set_documents(), dict_compact_values().
1645 * pfm-read.c: (read_variables) Deal with changes to weighting.
1647 * q2c.c: (dump_parser) Use dict_lookup_var() instead of
1648 is_varname() in output code.
1650 * sfm-read.c: (read_header) Use dict_create(), dict_set_label(),
1651 other dictionary functions.
1653 * title.c: (add_document_line) Use dict_get_documents(),
1654 dict_set_documents().
1656 * vars-atr.c: (discard_variables) Use dict_clear(default_dict),
1657 reset default_handle by hand. dict_clear() will clear vectors so
1658 there's no need for that by hand.
1660 * vfm.c: (close_active_file) Move call to finish_compaction()
1661 earlier, so that we can do the compaction as a single step using
1662 dict_compact_values(). Use dict_clear_vectors().
1663 (finish_compaction) Use dict_delete_var(), dict_compact_values().
1665 Some functions don't have replacements:
1667 * vars-atr.c: (force_create_variable) Removed. All references
1668 updated to dict_create_var() followed by an assertion.
1669 (force_dup_variable) Removed. All references updated to
1670 dict_clone_var() followed by an assertion.
1672 * weight.c: (update_weighting) Removed. No longer necessary, so
1673 all references removed.
1675 Sat Dec 27 16:43:01 2003 Ben Pfaff <blp@gnu.org>
1679 * aggregate.c: Eliminate separation of weighted and unweighted
1680 case. It made the code too obscure and I doubt it was actually
1681 faster. Instead, all code uses the "weighted" code, because
1682 that's a generalization of the "unweighted" code.
1685 (parse_aggregate_functions) No need to set FWEIGHT.
1686 (accumulate_aggregate_info) Get rid of FWEIGHT cases.
1687 (dump_aggregate_info) Ditto.
1688 (initialize_aggregate_info) No need for special plain_function
1689 that gets rid of FWEIGHT option.
1691 * aggregate.c: Get rid of approximations.
1692 (accumulate_aggregate_info) Don't use approx_gt(), approx_lt(),
1694 (aggregate_single_case) Don't use approx_ne().
1696 Sat Dec 27 16:19:36 2003 Ben Pfaff <blp@gnu.org>
1698 * ascii.c (ascii_line_width): Dead code, removed.
1700 * postscript.c (ps_line_width): Ditto.
1702 * q2c.c (xrealloc): Ditto.
1704 * count.c (internal_cmd_count): Ditto.
1706 * means.q (validate_dependent_endpoint): Ditto.
1708 * set.q: (cmd_gset) Ditto.
1710 * weight.c: [0] (weight_trns_proc) Ditto.
1712 Sat Dec 27 16:18:16 2003 Ben Pfaff <blp@gnu.org>
1714 Make the code -Wmissing-prototypes clean.
1716 * Makefile.am (version.c): Add #include "version.h".
1718 * ascii.c: (ascii_open_global) Make static.
1719 (ascii_close_page) Ditto.
1720 (ascii_font_sizes) Ditto.
1721 (ascii_postopen_driver) Ditto.
1722 (ascii_close_driver) Ditto.
1723 (ascii_option) Ditto.
1724 (ascii_open_page) Ditto.
1725 (ascii_line_horz) Ditto.
1726 (ascii_line_vert) Ditto.
1727 (ascii_line_intersection) Ditto.
1729 (ascii_polyline_begin) Ditto.
1730 (ascii_polyline_point) Ditto.
1731 (ascii_polyline_end) Ditto.
1732 (ascii_text_set_font_by_name) Ditto.
1733 (ascii_text_set_font_by_position) Ditto.
1734 (ascii_text_set_font_by_family) Ditto.
1735 (ascii_text_get_font_name) Ditto.
1736 (ascii_text_get_font_family) Ditto.
1737 (ascii_text_set_size) Ditto.
1738 (ascii_text_get_size) Ditto.
1739 (ascii_text_metrics) Ditto.
1740 (ascii_text_draw) Ditto.
1741 (ascii_close_page) Ditto.
1743 * cmdline.h: New header for parse_command_line(). Used where
1746 * command.c: Move prototypes for cmd_*() functions to command.h.
1748 * command.h: Prototypes for cmd_*() functions moved here from
1751 * crosstabs.q: (gamma_int) Ditto.
1753 * file-handle.h: Add fh_init_files() prototype.
1755 * getline.c: (welcome) Ditto.
1757 * glob.h: New header for init_glob(). Used where appropriate.
1759 * hash.c: (comparison_helper) Ditto.
1761 * html.c: (html_open_global) Ditto.
1762 (html_close_global) Ditto.
1763 (html_preopen_driver) Ditto.
1764 (html_postopen_driver) Ditto.
1765 (html_close_driver) Ditto.
1766 (html_option) Ditto.
1767 (html_open_page) Ditto.
1768 (html_close_page) Ditto.
1769 (html_submit) Ditto.
1771 * inpt-pgm.c: (input_program_source_read) Ditto.
1773 * output.c: (find_defn_value) Ditto.
1774 (destroy_list) Ditto.
1776 * pfm-read.c: (read_int) Ditto.
1778 * postscript.c: (ps_open_global) Ditto.
1779 (ps_close_global) Ditto.
1780 (ps_font_sizes) Ditto.
1781 (ps_preopen_driver) Ditto.
1782 (ps_postopen_driver) Ditto.
1783 (ps_close_driver) Ditto.
1785 (ps_open_page) Ditto.
1786 (ps_close_page) Ditto.
1787 (ps_line_horz) Ditto.
1788 (ps_line_vert) Ditto.
1789 (ps_line_intersection) Ditto.
1791 (ps_polyline_begin) Ditto.
1792 (ps_polyline_point) Ditto.
1793 (ps_polyline_end) Ditto.
1794 (ps_text_set_font_by_name) Ditto.
1795 (ps_text_set_font_by_position) Ditto.
1796 (ps_text_set_font_family) Ditto.
1797 (ps_text_get_font_name) Ditto.
1798 (ps_text_get_font_family) Ditto.
1799 (ps_text_set_size) Ditto.
1800 (ps_text_get_size) Ditto.
1801 (ps_text_metrics) Ditto.
1802 (ps_text_draw) Ditto.
1804 * q2c.c: (finish_up) Ditto.
1813 (find_symbol) Ditto.
1816 (force_string) Ditto.
1818 (match_token) Ditto.
1821 (parse_setting) Ditto.
1822 (parse_specifier) Ditto.
1823 (parse_specifiers) Ditto.
1824 (parse_subcommand) Ditto.
1825 (dump_specifier_vars) Ditto.
1827 (make_identifier) Ditto.
1828 (dump_declarations) Ditto.
1829 (dump_specifier_init) Ditto.
1830 (dump_vars_init) Ditto.
1832 (dump_specifier_parse) Ditto.
1833 (dump_subcommand) Ditto.
1834 (dump_parser) Ditto.
1835 (dump_header) Ditto.
1837 (recognize_directive) Ditto.
1839 * recode.c: (string_to_long) Ditto.
1841 * repeat.c: (find_DO_REPEAT_substitution) Ditto.
1843 * repeat.h: New header for perform_DO_REPEAT_substitutions, used
1846 * sort.c: (sort_stream_read) Ditto.
1847 (sort_stream_mode) Ditto.
1849 Fri Dec 19 23:35:04 2003 Ben Pfaff <blp@gnu.org>
1851 * algorithm.c (binary_search): Fix comparison.
1853 Fri Dec 19 23:27:45 2003 Ben Pfaff <blp@gnu.org>
1855 * algorithm.c: (binary_search) Fix assertion.
1857 Fri Dec 19 21:31:48 2003 Ben Pfaff <blp@gnu.org>
1859 * sysfile-info.c: (compare_vectors_by_name) Rewrite.
1861 Fri Dec 19 21:30:24 2003 Ben Pfaff <blp@gnu.org>
1863 * sort.c: (compare_case_lists) Rewrite.
1865 Fri Dec 19 16:44:22 2003 Ben Pfaff <blp@gnu.org>
1867 * quicksort.c: Removed (not used).
1869 * quicksort.h: Removed (not used).
1871 * sort.c: Removed blp_quicksort() prototype.
1873 Fri Dec 19 16:42:13 2003 Ben Pfaff <blp@gnu.org>
1875 * postscript.c: (int_2_compare) Rewrite.
1876 (compare_line) Rewrite.
1878 Fri Dec 19 16:38:35 2003 Ben Pfaff <blp@gnu.org>
1880 * matrix-data.c (compare_factors) Use lexicographical_compare()
1882 (compare_doubles) New function.
1884 * algorithm.c: (lexicographical_compare) New algorithm.
1886 Fri Dec 19 16:23:45 2003 Ben Pfaff <blp@gnu.org>
1888 * matrix-data.c (compare_variables_by_mxd_vartype): Rewrite.
1890 Fri Dec 19 15:54:45 2003 Ben Pfaff <blp@gnu.org>
1892 * expr-prs.c: (cmp_func) Removed.
1893 (parse_function) Use binary_search() algorithm.
1894 (compare_functions) New function.
1895 (init_func_tab) Use sort() algorithm.
1897 * algorithm.c: (binary_search) New algorithm.
1899 Fri Dec 19 15:50:45 2003 Ben Pfaff <blp@gnu.org>
1901 * descript.q: (display) Use sort() algorithm instead of qsort().
1902 (compare_func) Removed.
1903 (descriptives_compare_variables) New function.
1905 Fri Dec 19 15:08:38 2003 Ben Pfaff <blp@gnu.org>
1907 Get rid of AVL trees. Hashes are more appropriate for everything
1910 * Makefile.am: (pspp_SOURCES) Remove avl.c, avl.h.
1916 Fri Dec 19 14:33:31 2003 Ben Pfaff <blp@gnu.org>
1918 Much code can be clarified by using C++ STL-like algorithms. Not
1919 all uses of these algorithms are listed below, only the ones where
1920 the change to an algorithm was the only change of interest.
1922 * Makefile.am: (pspp_SOURCES) Add algorithm.c, algorithm.h.
1924 * algorithm.c: New file.
1926 * algorithm.h: New file.
1928 * modify-vars.c: (static var forward) Removed.
1929 (static var positional) Removed.
1930 (compare_variables) Removed.
1931 (struct ordering) New.
1932 (cmd_modify_vars) Use sort() algorithm.
1933 (compare_variables_given_ordering) New function.
1934 (rearrange_dict) Use sort() algorithm.
1936 * sysfile-info.c: (cmd_display) Use sort() algorithm.
1937 (cmp_var_by_name) Removed.
1939 Fri Dec 19 14:26:17 2003 Ben Pfaff <blp@gnu.org>
1941 Make file handles use a hash table.
1943 * file-handle.q: (files) Change to hash table, make static.
1944 (cmd_file_handle) Use hash table functions.
1945 (fh_get_handle_by_filename) Ditto.
1946 (fh_get_handle_by_name) Ditto.
1947 (hash_file_handle) New function.
1948 (cmp_file_handle) Rewrite.
1949 (fh_init_files) Use hash table functions.
1951 Fri Dec 19 14:24:38 2003 Ben Pfaff <blp@gnu.org>
1953 Clean up FREQUENCIES.
1955 * Makefile.am: (pspp_SOURCES) Remove frequencies.g.
1957 * frequencies.q: Remove a lot of old #if'd out code at the end.
1958 (internal_cmd_frequencies) Use calc() instead of calc_no_weight()
1959 or calc_weight(). Initialize percentile_values.
1960 (calc) New function based on calc_weight() from frequencies.g.
1961 (precalc) Use hash functions.
1962 (static var comparison_func) Removed.
1963 (static var comparison_param) Removed.
1964 (comparison_helper) Removed.
1965 (get_freq_comparator) New function.
1966 (not_missing) New function.
1968 (postprocess_freq_tab) Use hash table functions, algorithms,
1969 get_freq_comparator(). Rewrite.
1970 (cleanup_freq_tab) Rephrase.
1971 (add_percentile) Clean up spacing.
1972 (hash_value_numeric) New function.
1973 (hash_value_alpha) New function.
1974 (compare_value_numeric_a) Rewrite.
1975 (compare_value_alpha_a) Rewrite.
1976 (compare_value_numeric_d) Rewrite.
1977 (compare_value_alpha_d) Rewrite.
1978 (compare_freq_numeric_a) Rewrite.
1979 (compare_freq_alpha_a) Rewrite.
1980 (compare_freq_numeric_d) Rewrite.
1981 (compare_freq_alpha_d) Rewrite.
1982 (calc_stats) Clean up mode, percentiles, max.
1983 (dump_statistics) Clean up spacing.
1985 * frequencies.g: Removed.
1987 * var.h: (struct freq_tab) Change `data' to hash table.
1989 Fri Dec 19 14:15:46 2003 Ben Pfaff <blp@gnu.org>
1991 * file-handle.h: Remove declaration of global variable `files',
1992 which wasn't used anywhere.
1994 * postscript.c: (add_encoding) Remove superfluous cast.
1997 * sfm-read.c: [linux] (bswap_int32) Drop ntohl() non-portable
2000 * temporary.c: [0] (display_tree) Removed.
2002 Fri Dec 19 14:13:04 2003 Ben Pfaff <blp@gnu.org>
2004 Implement a new random number generator based on the alleged RC4
2007 * expr-evl.c: (expr_evaluate) Use rng_get_double_normal() instead
2010 * random.c: [!HAVE_GOOD_RANDOM] (real_rand) Removed.
2011 [!HAVE_GOOD_RANDOM] (real_srand) Removed.
2013 (static var V[]) Removed.
2014 (static var Y) Removed.
2015 (static var X2) Removed.
2016 (setup_randomize) Removed.
2018 (rand_uniform) Removed.
2019 (rand_normal) Removed.
2020 (struct rng) New structure.
2021 (rng_create) New function.
2022 (rng_destroy) New function.
2023 (swap_byte) New static function.
2024 (rng_seed) New function.
2025 (rng_get_bytes) New function.
2026 (rng_get_int) New function.
2027 (rng_get_unsigned) New function.
2028 (rng_get_double) New function.
2029 (rng_get_double_normal) New function.
2030 (pspp_rng) New function.
2032 * random.h: Sync up to random.c.
2034 * sample.c: (struct sample_trns) Make `frac' unsigned and a
2035 fraction of UINT_MAX, not 65536.
2036 (cmd_sample) Use rng_get_unsigned(), rng_get_double(), UINT_MAX
2039 * vfm.c: (open_active_file) No need to call setup_randomize() any
2042 Fri Dec 19 12:05:56 2003 Ben Pfaff <blp@gnu.org>
2044 Change dictionary name indexes to use hash tables instead of AVL
2047 * crosstabs.q: (free_var_dict) Use hash tables.
2048 (crs_custom_tables) Ditto.
2049 (calc_general) Ditto.
2050 (compare_table_entry) Rewrite.
2051 (enum_var_values) Reorder parameters. All references updated.
2054 * get.c: (rename_variable) Use hash tables.
2055 (mtf_merge_dictionary) Ditto.
2057 * glob.c: (init_glob) Use hash tables.
2058 (cmp_variable) Removed.
2060 * means.q: (mns_custom_tables) Use hash tables.
2062 * modify-vars.c: (rearrange_dict) Use hash tables.
2064 * rename-vars.c: (cmd_rename_variables) Use hash tables.
2066 * sfm-read.c: (read_header) Use hash tables.
2067 (read_variables) Ditto.
2069 * temporary.c: (new_dictionary) Use hash tables.
2070 (save_dictionary) Ditto.
2071 (restore_dictionary) Ditto.
2073 * var.h: (struct dictionary) Change AVL tree `var_by_name' into
2074 hash table `name_tab'.
2076 * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed.
2077 [DEBUGGING] (dump_var_tree) Removed.
2078 (find_variable) Use hash tables.
2079 (find_dict_variable) Ditto.
2080 (common_init_stuff) Ditto.
2081 (rename_variable) Ditto.
2082 (clear_variable) Ditto. Also, remove debug code.
2083 (dup_variable) Use hash tables.
2085 * vars-prs.c: (fill_all_vars) Use hash tables.
2086 (is_dict_varname) Ditto.
2087 (parse_dict_variable) Ditto.
2089 Fri Dec 19 11:46:23 2003 Ben Pfaff <blp@gnu.org>
2091 Change value labels to use hash tables instead of AVL trees, and
2092 change value labels into an ADT.
2094 * Makefile.am: (pspp_SOURCES) Add value-labels.c, value-labels.h.
2096 * value-labels.c: New file.
2098 * value-labels.h: New file.
2100 * apply-dict.c: (cmd_apply_dictionary) Use value label ADT.
2101 Get rid of a stupid use of goto.
2103 * autorecode.c: (compare_alpha_value) Rewrite.
2104 (hash_alpha_value) Ditto.
2105 (compare_numeric_value) Rewrite.
2106 (hash_numeric_value) Ditto.
2108 * frequencies.q: (dump_full) Use value label ADT.
2110 * pfm-read.c: (read_value_label) Use value label ADT.
2112 * pfm-write.c: (write_value_labels) Use value label ADT.
2114 * sfm-read.c: (read_variables) Use value label ADT.
2115 (read_value_labels) Rewrite.
2117 * sfm-write.c: (write_value_labels) Rewrite.
2119 * sysfile-info.c: (cmd_sysfile_info) Use value label ADT.
2120 (display_variables) Ditto.
2121 (describe_variable) Ditto.
2123 * t-test.q: (print_t_groups) Use value label ADT.
2125 * temporary.c: (copy_variable) Use value label ADT.
2126 (free_dictionary) Ditto.
2128 * val-labs.c: (verify_val_labs) Use value label ADT.
2130 (debug_print) Ditto.
2131 (val_lab_cmp) Removed.
2132 (inc_ref_count) Removed.
2133 (copy_value_labels) Removed.
2135 * var.h: (struct value_label) Removed.
2136 (struct variable) Change AVL tree `val_lab' into hash table
2139 * vars-atr.c: (init_variable) Use value label ADT.
2140 (clear_variable) Ditto.
2141 (free_value_label) Removed.
2142 (free_val_lab) Removed.
2143 (get_val_lab) Removed.
2144 (compare_variables) New function.
2145 (hash_variable) New function.
2147 * vfm.c: (dump_splits) Use value label ADT.
2149 Fri Dec 19 11:18:11 2003 Ben Pfaff <blp@gnu.org>
2151 Add to the hash table interface.
2153 * hash.c: (hsh_hash_bytes) Add assertion.
2154 (hsh_hash_string) Ditto.
2158 (hsh_create) Ditto. Also make minimum `size'.
2159 (hsh_destroy) Rephrase.
2160 (sort_nulls_last) Removed.
2161 (not_null) New function.
2163 (comparison_helper) Ditto.
2164 (hsh_sort) Rewritten.
2165 (hsh_data_copy) New function.
2166 (hsh_sort_copy) Ditto.
2168 (hsh_replace) Ditto.
2169 (hsh_hash_double) Ditto.
2170 (hsh_delete) Fix stupid bug.
2172 Thu Dec 18 12:27:03 WAST 2003 John Darrington <john@darrington.wattle.id.au>
2173 * added a calculation of the mode to FREQUENCIES
2175 Wed Dec 17 12:53:01 WAST 2003 John Darrington <john@darrington.wattle.id.au>
2177 * moved (un)defs of DEBUGGING to config.h
2179 Mon Dec 15 21:35:59 2003 Ben Pfaff <blp@gnu.org>
2181 * groff-font.c: (add_kern) Fix indentation.
2182 (add_kern) Use & instead of % to take power-of-2 modulus.
2183 (font_get_kern_adjust) Likewise.
2185 Fri Dec 12 23:54:37 2003 Ben Pfaff <blp@gnu.org>
2187 * autorecode.c: (recode) Replace stupid use of memcpy() by
2189 (hash_alpha_value) Use hsh_hash_bytes(). Get rid of nasty casts.
2190 (hash_numeric_value) Ditto.
2191 (autorecode_proc_func) pool_strdup() was wrong here because the
2192 source string was not null-terminated. Use new pool_strndup()
2195 * crosstabs.q: (enum_var_values) Remove superfluous and bizarre
2196 use of hsh_iterator_init().
2198 * data-in.c: (parse_N) Initialize i->v->f.
2200 * flip.c: (cmd_flip) Use memmove(), not memcpy(), to copy
2203 * groff-font.c: Use power-of-2 hash table sizes, not prime.
2204 (groff_read_font) Don't call hsh_next_prime(). Don't call
2206 (static var hash) Remove `size_p', `max_used' members.
2207 (font_char_name_to_index) Don't call hsh_next_prime(). Use
2208 hsh_hash_string() instead of hashpjw(), & instead of %.
2209 (default_font) Don't call hsh_next_prime().
2211 * pool.c: (pool_strndup) New function.
2212 (pool_strdup) Reimplement in terms of pool_strndup.
2214 * postscript.c: (hash_font_entry) Use hsh_hash_string(). Get rid
2216 (hash_ps_encoding) Use hsh_hash_string().
2217 (hash_ps_combo) Use hsh_hash_string(), hsh_hash_int().
2218 (hash_filename2font) Use hsh_hash_string().
2220 * som.c: Add #include <stdlib.h>.
2222 * tab.c: (tab_destroy) Don't set t->container after freeing `t'
2223 (by destroying its pool).
2225 Fri Dec 12 23:18:59 2003 Ben Pfaff <blp@gnu.org>
2227 Miscellaneous hash table code cleanup:
2229 * hash.h: (struct hsh_table) Moved into hash.c.
2230 (hsh_count) Ditto, and transformed into function.
2231 (hsh_compare_func) New typedef, used for defining otherwise-long
2232 function types here and in hash.c
2233 (hsh_hash_func) Ditto.
2234 (hsh_free_func) Ditto.
2236 * hash.c: (struct hsh_table) Renamed `n' to `used', `m' to `size',
2237 `table' to `entries'. Removed `mp'. All references updated.
2238 (hsh_clear) Don't shrink entries array; if the hash was this big
2239 once, it probably will be again.
2240 (hsh_rehash) Made static.
2241 (force_hsh_insert) Renamed hsh_force_insert.
2242 (force_hsh_find) Renamed hsh_force_find.
2244 Made hash table sizes powers of 2, because that's fine with any
2245 reasonable hash function and because taking a power-of-2 modulus
2246 is faster than any other:
2248 (hsh_prime_tab) Removed;
2249 (hsh_next_prime) Ditto.
2250 (next_power_of_2) New function.
2251 (hsh_create) Use next_power_of_2.
2252 (hsh_rehash) Use & instead of %.
2254 Cleaned up hsh_sort:
2256 (internal_comparison_fn) Removed.
2257 (sort_nulls_last) New function.
2258 (hsh_sort) Removed second parameter, switched to using the new
2259 quicksort() function from quicksort.h to avoid using nasty need
2260 for static variables with qsort(). All references updated.
2262 Changed the hash functions offered, because there are better hash
2263 functions than the ones we had, and cleaned up the names to boot:
2265 * hash.c: (hashpjw_d) Removed.
2267 (hsh_hash_bytes) New function.
2268 (hsh_hash_string) New function.
2269 (hsh_hash_int) New function.
2271 Improved the hash table iteration interface:
2273 * hash.h: (hsh_iterator_init) Removed.
2274 (struct hsh_iterator) Removed `init' member, change `next' to
2277 * hash.c: (hsh_foreach) Removed. All references updated to use
2278 hsh_first/hsh_next instead.
2279 (hsh_first) New function. Notably, unlike hsh_foreach() it does
2280 not treat a null pointer as an empty hash table.
2281 (hsh_next) New function.
2283 Made deletion possible, though slow:
2285 * hash.c: (locate_matching_entry) New function.
2286 (hsh_find) Use locate_matching_entry().
2287 (hsh_delete) New function also using locate_matching_entry().
2288 (hsh_force_delete) New function.
2290 Fri Dec 12 23:16:10 2003 Ben Pfaff <blp@gnu.org>
2292 * quicksort.c: New file implementing a sort routine with a
2293 interface better than qsort() because it passes a user-provided
2294 parameter to the sort routine.
2296 * Makefile.am: Add quicksort.c, quicksort.h.
2298 Fri Dec 12 13:31:58 2003 Ben Pfaff <blp@gnu.org>
2300 * All source files: Get rid of nasty special cases for Checker,
2301 which is pretty obsolete now.
2303 Thu Dec 11 21:38:24 WST 2003 John Darrington <john@darrington.wattle.id.au>
2305 * Fixed a bug apparent when using the FREQUENCIES command with the
2306 html driver. The html driver was incorrectly trying to display
2309 Sun Jan 2 21:40:13 2000 Ben Pfaff <blp@gnu.org>
2311 * Makefile.am: Reorganized. Put locale dir in version.c instead
2312 of passing it to each compile command. Only put local gmp libs in
2313 LD_ADD if not installed on system. Remove `boast' target.
2315 * All source files: struct and union typedefs eliminated.
2316 `sizeof type' replaced by `sizeof object' where practical. Moved
2317 `unused' qualifiers from start to end of declarations for gcc
2318 2.7.2 compatibility. Change `while (1)' to `for (;;)'. Made
2319 assertions on pointers strictly compliant. Removed _ prefixes on
2320 some function parameter names.
2322 * alloc.c: New source file, containing these external linkage
2323 functions removed from common.c: xmalloc, xcalloc, xrealloc,
2330 * ascii.c: Migrated from arenas to pools.
2331 (struct ascii_driver_ext) ops[], box[], fonts[] changed from
2332 c_string to len_string. All references changed.
2333 (ascii_option) Signature changed to comply to new output.c
2335 (count_fancy_chars) Removed.
2336 (delineate) Removed support for rich text.
2337 (ascii_text_metrics) Ditto.
2339 (output_shorts) Change `box', `off', `on' from c_string to
2340 len_string. Change `remaining' from int to size_t.
2341 (ascii_close_page) Make page numbering less haphazard.
2343 * autorecode.c: Migrate from arenas to pools.
2345 * avl.c: Migrate from arenas to pools. Synch from libavl 1.4.0.
2347 * bitvector.h: New file containing these macros from misc.h:
2348 SET_BIT, CLEAR_BIT, SET_BIT_TO, TEST_BIT, BIT_INDEX.
2350 * command.c: (struct command) cmd1, cmd2, cmd3 members changed to
2351 word[3]. ncmd removed.
2352 (var empty_string) Removed.
2353 (var cmd_table) Declaration updated.
2354 (var cmdtab) Removed.
2355 (cmp_command) Removed.
2356 (split_words) Rewritten to use strtok_r().
2357 (init_cmd_parser) Renamed cmd_init(). Rewritten.
2358 (find_command) Removed.
2359 (FILE_TYPE_okay) Rewritten.
2360 (cmd_parse) Rewritten. Semantics of the return value of command
2361 handlers has changed: they must now return one of the new CMD_*
2362 enumerals, rather than a magic value. This meant that all
2363 commands had to be modified, and they were.
2364 (figure_out_command) New function.
2366 * command.def: Add CORRELATIONS, PEARSON CORRELATIONS. Add
2367 #defines for INIT, INPU, etc.
2369 * command.h: New CMD_* enum series.
2370 (cur_proc) Make const char *, not char *.
2371 (cmd_init) Prototype.
2374 * common.c: Removed.
2376 * common.h: Removed.
2378 * correlations.q: New file.
2380 * crosstabs.q: Migrate from arenas to pools. Migrate to new-style
2382 (custom_tables) Renamed crs_custom_tables().
2383 (custom_variables) Renamed crs_custom_variables().
2384 (calc_integer) Add in some `const' qualifiers.
2385 (table_value_missing) Change from a_string to len_string.
2386 (float_M_suffix) Change from a_string to len_string.
2388 * data-in.c: Rewritten. All references to
2389 parse_string_as_format() changed to data_in().
2391 * data-in.h: New file.
2393 * data-list.c: Change DLS_* from #define's to enums. Move from
2394 rpd_msg() to tmsg().
2395 (RPD_ERR) New #define.
2396 (do_reading) Change dfm_push_cust() to dfm_push(), pop_cust() to
2398 (read_from_data_list_fixed) Change from old
2399 parse_string_as_format() to new data_in().
2400 (read_from_data_list_free) Ditto.
2401 (read_from_data_list_list) Ditto.
2402 (cmd_repeating_data) Modify approach to checking for end of
2405 (rpd_parse_record) Change from old parse_string_as_format() to new
2406 data_in(). Change from old convert_format_to_string() to new
2408 (read_one_set_of_repetitions) Change dfm_push_cust() to
2409 dfm_push(), pop_cust() to dfm_pop().
2411 * data-out.c: Rewritten. All references to
2412 convert_format_to_string() changed to data_out().
2414 * descript.q: Migrate to new q2c.
2415 (cmd_descriptives) Removed.
2416 (internal_cmd_descriptives) Renamed cmd_descriptives ().
2417 (custom_variables) Renamed dsc_custom_variables().
2419 * dfm.c: (struct dfm_fhuser_ext) `ln' removed. All references
2421 (open_file_r) Initialize h->where.line_number. Migrate to new
2423 (open_file_w) Initialize h->where.line_number.
2424 (read_record) Change from ext->ln to h->where.line_number.
2425 Migrate to struct string.
2426 (dfm_put_record) Rephrased.
2427 (dfm_push_cust) Renamed dfm_push(), rewritten.
2428 (dfm_pop) New function.
2430 * error.c: All references updated.
2431 (glob var error_count) Renamed err_err_count.
2432 (glob var warning_count) Renamed err_warning_count.
2433 (glob var error_already_flagged) Renamed err_already_flagged.
2434 (glob var verbosity) Renamed err_verbosity.
2435 (glob var cust_fn) Removed.
2436 (glob var cust_ln) Removed.
2437 (static var file_loc) New.
2438 (static var nfile_loc) New.
2439 (static var mfile_loc) New.
2440 (tmsg) New function.
2441 (push_cust) Removed.
2444 (static var terminating) Removed.
2445 (failure) Renamed err_failure().
2446 (hcf) Renamed err_hcf().
2447 (err_push_file_locator) New function.
2448 (err_pop_file_locator) New function.
2449 (err_location) New function.
2450 (check_error_count) Renamed err_check_count().
2451 (vmsg) Renamed err_vmsg(). Interface changed.
2452 (verbose_msg) Removed.
2453 (err_cond_fail) New function.
2454 (error_break) Renamed err_break().
2456 * error.h: All references updated.
2457 (enum MSG_CLASS_COUNT) Renamed ERR_CLASS_COUNT.
2458 (enum ERR_CLASS_MASK, ERR_VERBOSITY_SHIFT, ERR_VERBOSITY_MASK)
2460 (struct file_locator) New.
2462 (macro verbose_msg) Removed.
2463 (macro cond_fail) Removed.
2465 * expr-opt.c: (evaluate_tree) sizeof(char) == 1.
2467 * expr-prs.c: Reorganized. All references updated.
2468 (exprtypename) Renamed expr_type_name().
2469 (typename) Renamed type_name().
2470 (free_expression) Renamed expr_free().
2471 (parse_expression) Renamed expr_parse(). Uses new type_check()
2473 (init_functab) Renamed init_func_tab().
2474 (type_check) New function.
2475 (parse_or) Rewritten to use new allocate_nonterminal() and
2476 append_nonterminal_arg() functions.
2479 (parse_rel) Ditto. Also simplified logic.
2484 (SYSMIS_func) Ditto.
2485 (VALUE_func) Rephrased.
2486 (CONCAT_func) Fix memory leak by replacing free by free_node on
2488 (generic_str_func) Ditto.
2489 (parse_function) Ditto. Also rephrasings. Uses bsearch() to find
2491 (allocate_nonterminal) New function.
2492 (append_nonterminal_arg) New function.
2493 (static func_tab[]) Now at file level.
2495 (init_func_tab) Moved. Now just uses qsort() to sort func_tab[].
2497 * expr.h: (enum series OP_*) Moved to exprP.h.
2498 (OP_* defines) Ditto.
2499 (struct op_desc) Ditto.
2500 (global ops[]) Ditto.
2501 (struct num_con_node) Ditto.
2502 (struct str_con_node) Ditto.
2503 (struct var_node) Ditto.
2504 (struct lag_node) Ditto.
2505 (struct casenum_node) Ditto.
2506 (struct nonterm_node) Ditto.
2507 (union any_node) Members renamed.
2508 (struct sys_node) Removed.
2509 (struct val_node) Removed.
2510 (operator typedef) Removed.
2511 (typedef exprtype) Removed.
2512 (enum series EX_*) Moved to exprP.h.
2513 (struct expression) Ditto. Also renamed a lot of the members.
2514 (PXP_* defines) Changed to enums.
2515 (free_node prototype) Moved to exprP.h.
2517 * file-handle.h: (struct file_handle) New member `where'.
2519 * file-handle.q: Migrated to new q2c format.
2520 (prepend_current_directory) Removed (dead code).
2521 (cmd_file_handle) Incorporated all of internal_cmd_file_handle().
2522 (fh_get_handle_by_filename) Removed dead code.
2523 Set new `where' member.
2525 * file-type.c: (file_type_source_read) References to
2526 parse_string_as_format() changed to data_in().
2527 dfm_push_cust()/pop_cust() changed to dfm_push()/dfm_pop().
2529 * filename.c: All references updated.
2530 (init_filename) Renamed fn_init().
2531 (expand_line) Removed.
2532 (macro EXPAND_LINE) Removed.
2533 (interp_vars) Renamed fn_interp_vars(). Now uses st_*() instead
2534 of custom functions.
2535 (gnu_getcwd) Renamed fn_get_cwd(), rewritten.
2536 (tilde_expand) Renamed fn_tilde_expand(), uses ds_*().
2537 (normalize_filename) Renamed fn_normalize().
2538 (search_path) Renamed fn_search_path(), rewritten.
2539 (prepend_dir) Renamed fn_prepend_dir().
2540 (blp_getenv) Renamed fn_getenv().
2541 (blp_dirname) Renamed fn_dirname().
2542 (fn_basename) New function, not used.
2543 (absolute_filename_p) Renamed fn_absolute_p().
2544 (is_special_filename) Renamed fn_special_p().
2545 (file_exists) Renamed fn_exists_p().
2546 (readlink_malloc) Renamed fn_readlink().
2547 (getenv_default) Renamed fn_getenv_default().
2548 (open_file) Renamed fn_open().
2549 (close_file) Renamed fn_close().
2550 (open_file_ext) Renamed fn_open_ext().
2551 (close_file_ext) Renamed fn_close_ext().
2553 * font.h: Migrate from arenas to pools.
2555 * format.c: (parse_format_specifier_name) Deal with ds_* strings.
2557 * frequencies.g: Migrate from arenas to pools.
2559 * frequencies.q: Migrate to new q2c version. Migrate from arenas
2562 * getline.c: All references updated.
2563 (global getl_buf) Changed from char * to struct string.
2564 (static getl_include_path) Ditto.
2565 (global getl_buf_len) Removed.
2566 (global getl_buf_size) Removed.
2567 (getl_include_path) Deal with new getl_buf, getl_include_path.
2568 (getl_uninitialize) New function.
2569 (getl_get_current_directory) Rewritten.
2570 (getl_clear_include_path) Rewritten.
2571 (getl_add_include_dir) Rewritten.
2572 (getl_add_file) Assertion fixed.
2573 (getl_add_virtual_file) Change initial value of `remaining_loops'
2575 (welcome) Rewritten.
2576 (handle_line_buffer) Make static. Change logic to make
2577 getl_add_virtual_file() change sensible. Use ds_*() strings.
2578 (getl_read_line) Use ds_*() strings. Implement SET ECHO.
2579 (getl_close_file) Moved.
2580 (getl_location) New function.
2582 * getline.h: All references updated.
2583 (macro curln) Removed.
2584 (macro curfn) Removed.
2585 (macro am_interactive) Renamed getl_am_interactive.
2586 (macro am_reading_script) Renamed getl_reading_script.
2588 * glob.c: (global fmt_parse_ignore_error) Removed.
2589 (init_glob) Use locale_dir not LOCALEDIR. Use feholdexcept() on
2590 systems that support it (C99). Turn off SET ECHO by default. No
2591 necessary julcal initialization anymore.
2593 * groff-font.c: Migrate from arenas to pools.
2594 (groff_read_font) Use err_push_file_locator().
2595 (groff_read_DESC) Ditto.
2596 (font_msg) Use tmsg().
2598 * hash.c: (hsh_sort) Fix debug code.
2599 [GLOBAL_DEBUGGING] Include stdio.h.
2601 * hash.h: (macro force_hsh_insert) Rephrase.
2603 * heap.c: Rewritten.
2605 * heap.h: Rewritten.
2607 * html.c: (html_option) Change from outp_value to struct string.
2608 (postopen) Change from curfn to getl_location().
2609 (escape_string) Remove rich-text code. Signature changed.
2610 (output_tab_table) Switch from a_string to struct len_string.
2611 Remove rich text support.
2613 * lexer.c: All references updated. Largely rewritten. Major
2614 changes listed below. Removed tagged quote support. Adapted to
2615 struct string tokstr.
2616 (global tokstr) Changed to struct string.
2617 (global tokstr_size) Removed.
2618 (global tokstr_len) Removed.
2620 (global tokint) Removed.
2621 (global toklongstr) Removed.
2622 (C* defines) Removed.
2623 (static tbl[]) Removed.
2624 (static id[]) Removed.
2625 (static une[]) Removed.
2626 (discard_line) Renamed lex_discard_line().
2627 (get_entire_line) Renamed lex_entire_line().
2628 (get_rest_of_line) Renamed lex_rest_of_line().
2629 (get_dotted_rest_of_line) Merged into lex_rest_of_line().
2630 (make_hexit) Removed.
2631 (syntax_error) Renamed lex_error(). Return value removed.
2632 (get_token_representation) Renamed lex_token_representation().
2633 (putback) Renamed lex_put_back().
2634 (putfwd) Renamed lex_put_forward().
2635 (convert_negative_to_dash) Renamed lex_negative_to_dash().
2636 (set_prog) Renamed lex_set_prog().
2637 (init_lex) Renamed lex_init().
2638 (reset_eof) Renamed lex_reset_eof().
2639 (lookahead) Renamed lex_look_ahead().
2640 (check_id) Rewritten.
2641 (yylex) Renamed lex_get(), rewritten.
2642 (lex_end_of_command) New function. Many commands were rephrased
2644 (lex_integer_p) New function. Replaces compare of tokint against
2646 (lex_integer) New function. Replaces tokint.
2647 (match_tok) Renamed lex_match().
2648 (match_id) Renamed lex_match_id().
2649 (match_int) Renamed lex_match_int().
2650 (force_match_id) Renamed lex_force_match_id(), added return value.
2651 (force_match) Renamed lex_force_match(), added return value.
2652 (force_string) Renamed lex_force_string(), added return value.
2653 (force_int) Renamed lex_force_int(), added return value.
2654 (lex_id_match_len) New function.
2655 (id_match) Renamed lex_id_match(), rewritten.
2656 (get_line) Renamed lex_get_line().
2657 (preprocess_line) Renamed lex_preprocess_line().
2658 (tokname) Renamed lex_token_name().
2659 (bin_value_func) Removed.
2660 (oct_value_func) Removed.
2661 (hex_value_func) Removed.
2662 (unexpected_eof) New function.
2663 (convert_numeric_string_to_char_string) New function.
2664 (parse_string) Rewritten, signature changed.
2665 (add_tokstr_char) Removed.
2666 (add_tokstr_unsigned) Removed.
2667 (add_tokstr_string) Removed.
2668 (parse_tagged_quote) Removed.
2669 (skip_comment) Renamed lex_skip_comment().
2671 * lexer.h: All references updated.
2672 (macro is_id1) Renamed CHAR_IS_ID1.
2673 (macro is_idn) Renamed CHAR_IS_IDN.
2674 (token names ID, NUM, STRING, STOP, ... WITH, EXP) Renamed with
2675 prefix T_: T_ID, T_NUM, T_STRING, T_STOP, ... T_WITH, T_EXP.
2676 (macro get_token) Removed.
2677 (macro id_match) Removed.
2678 (macro force_match_id) Removed.
2679 (macro force_match) Removed.
2680 (macro force_string) Removed.
2681 (macro force_int) Removed.
2682 (macro force_num) Removed.
2683 (macro force_id) Removed.
2685 * lexerP.h: Removed.
2687 * list.q: Migrated to new q2c format.
2688 (write_line) Deal with struct len_string.
2689 (write_varname) Ditto.
2690 (write_fallback_headers) Ditto.
2692 * magic.c: New file, incorporating the following global variables
2693 previously in other files: endian, second_lowest_value. And both
2694 of those are conditional on #define's.
2696 * magic.h: New file, incorporating the following global variable
2697 declarations: endian, second_lowest_value, and the following macro
2698 declarations: NOT_DOUBLE, NOT_LONG, NOT_INT.
2700 * main.c: Added declarations of pgmname, finished, curdate,
2702 (main) Call new parse_script() function.
2703 (parse_script) New function.
2704 (execute_command) New function.
2705 (dump_token) Removed.
2706 (handle_error) New function.
2708 * matrix.c: New file.
2710 * matrix.h: New file.
2712 * matrix-data.c: Migrated from arenas to pools.
2713 (mget_token) Change from parse_string_as_format() to data_in().
2715 * means.q: Migrate to new q2c.
2716 (custom_tables) Renamed mns_custom_tables().
2717 (custom_crossbreak) Renamed mns_custom_crossbreak().
2718 (custom_variables) Renamed mns_custom_variables().
2720 * mis-val.c: (static var width) Changed from `int' to `size_t'.
2721 (parse_varnames) Prototype.
2722 (parse_numeric) Rephrasings.
2723 (parse_alpha) Adapt to new struct string tokstr.
2725 * misc.c: (intlog10) Rewritten.
2727 (ansi_rand) Renamed real_rand(), moved into random.c.
2728 (ansi_srand) Renamed real_srand(), moved into random.c.
2729 (setup_randomize) Moved to random.c.
2730 (rand_uniform) Ditto.
2731 (rand_normal) Ditto.
2732 (rand_simple) Ditto.
2733 (get_config_line) Removed.
2734 (reverse) Removed (dead code).
2736 * misc.h: (macro SET_BIT) Moved to bitvector.h.
2737 (macro CLEAR_BIT) Ditto.
2738 (macro TEST_BIT) Ditto.
2739 (macro SET_BIT_TO) Ditto.
2740 (macro BIT_INDEX) Ditto.
2742 * output.c: (outp_read_devices) Move to err_push_file_locator()
2743 from push_cust(). Use struct string.
2744 (expand_op_tokstr) Removed.
2745 (static var op_tokstr) Changed to struct string.
2746 (static var op_tokstr_size) Removed.
2747 (tokener) Rephrasings. Use struct string.
2748 (parse_options) Use struct string.
2749 (destroy_driver) Fix assertion.
2750 (outp_get_paper_size) Move to err_push_file_locator().
2751 [0] Removed dead code.
2752 (outp_string_width) Move to len_string.
2754 * output.h: Comment fixes.
2755 (TAG_* enum series) Removed.
2756 (struct outp_value) Removed.
2757 (enum OUTP_T_FANCY) Removed.
2758 (struct outp_text) `s' changed from a_string to len_string.
2759 (struct outp_class) `option' change arg 3 from outp_value to
2762 * pfm-read.c: (corrupt_msg) Rewritten.
2764 * pfm-write.c: (bufwrite) Fix assertion.
2766 * pool.c: New file, reference version.
2768 * pool.h: New file, reference version.
2770 * postscript.c: (ps_font_sizes) Fix assertion.
2771 (ps_option) Change arg 3 from outp_value to struct string.
2772 Adapt to struct string.
2773 (macro output_line) Removed.
2774 (macro add_string) Removed.
2775 (output_encodings) Adapted to struct string. Moved to
2776 err_push_file_locator().
2777 (find_encoding_file) Fix assertion.
2778 (read_ps_encodings) Move to err_push_file_locator().
2779 (postopen) Use getl_location() instead of curfn.
2780 (out_text_plain) Move to len_string.
2781 (text) Ditto. Remove rich text support.
2783 * print.c: (cmd_print) Remove now-unneeded resource cleanup code.
2784 (cmd_print_eject) Ditto.
2786 (internal_cmd_print) Now cleans up after itself. Uses
2787 fh_parse_file_handle() now.
2788 (cmd_print_space) Use PXP_NUMERIC to type-check.
2790 * q2c.c: Overhauled. Removed _("") i18n support. All references
2791 updated. All output functions updated to handle structures rather
2792 than local or static variables. Adapt to new PSPP lex_*()
2796 (macro MAX_N_SBC) Removed.
2797 (global bare) Removed.
2798 (enum STRING) Renamed T_STRING.
2799 (enum ID) Renamed T_ID.
2800 (get_buffer) Buffer size increased.
2801 (strlower) Renamed st_lower(), rephrased.
2802 (strupper) Renamed st_upper(), rephrased.
2803 (skip_ws) New function.
2804 (get_line) Don't special-case any types of lines (like those
2805 beginning with ! or $, for instance).
2806 (get_token) Renamed lex_get(). Rephrased.
2807 (static var `prefix') New.
2808 (parse) New function.
2809 (parse_setting) Minor rephrasing.
2810 (dump_specifier_vars) Ditto.
2811 (make_identifier) Put null terminator on identifier, duh.
2812 (dump_vars) Renamed dump_declarations(). Never indent. Never
2813 static. Output changed entirely.
2814 (dump_specifier_init) Rephrase.
2815 (dump_vars_init) No index variable needed. Other modifications.
2816 (dump_parser) Don't parse command name. Do dump functions instead
2817 of just code fragments.
2818 (dump_free) Dump function instead of code fragment.
2819 (recognize_directive) New function.
2820 (main) Use recognize_directive(). Don't rely on magic $ line
2821 beginning: instead, parse comments. Update list of headers.
2823 * random.c: New file, containing the following functions:
2824 real_rand(), real_srand(), setup_randomize, shuffle, rand_uniform,
2825 rand_normal, rand_simple.
2827 * random.h: New file.
2829 * recode.c: (cmd_recode) Merge internal_cmd_recode() into this
2830 function. `max_src_width', `max_dst_width' changed to size_t.
2831 (internal_cmd_recode) Removed.
2832 (parse_dest_spec) Merge similar cases.
2833 (parse_src_spec) Add assertion.
2835 * repeat.c: (recognize_keyword) New function.
2836 (internal_cmd_do_repeat) Parse and handle PRINT keyword on END
2837 REPEAT. Improve recognition of END REPEAT (use
2838 recognize_keyword()). Move from curfn to getl_location(). Use
2841 (perform_DO_REPEAT_substitutions) Adapt to struct string.
2843 * set.q: Adapt to new q2c.
2844 (cmd_set) Range-check some values better.
2845 (custom_blanks) Renamed stc_custom_blanks().
2846 (custom_length) Renamed stc_custom_length().
2847 (custom_results) Renamed stc_custom_results().
2848 (custom_seed) Renamed stc_custom_seed().
2849 (custom_width) Renamed stc_custom_width().
2850 (custom_format) Renamed stc_custom_format().
2851 (custom_journal) Renamed stc_custom_journal().
2852 (custom_color) Renamed stc_custom_color().
2853 (custom_listing) Renamed stc_custom_listing().
2854 (custom_disk) Renamed stc_custom_disk().
2855 (custom_log) Renamed stc_custom_log().
2856 (custom_rcolor) Renamed stc_custom_rcolor().
2857 (custom_viewlength) Renamed stc_custom_viewlength().
2858 (custom_workdev) Renamed stc_custom_workdev().
2860 * settings.h: Not necessary to include format.h any longer.
2862 * sfm-read.h: (macro bswap_int32) Moved here from sfmP.h.
2863 (corrupt_msg) Rewritten.
2865 * sort.c: Adapt to rewritten heap ADT.
2867 * str.c: (aa_strcpy) Removed.
2868 (ab_strcpy) Removed.
2869 (ac_strcpy) Removed.
2870 (ba_strcpy) Removed.
2871 (bb_strcpy) Removed.
2872 (ca_strcpy) Removed.
2873 (aa_strdup) Removed.
2874 (aa_strdupcpy) Removed.
2875 (ba_strdup) Removed.
2876 (sa_strdup) Removed.
2877 (memrev) Renamed mm_reverse().
2878 (memrmem) Renamed mm_find_reverse().
2879 (cmp_str) Renamed st_compare_pad().
2880 (strmaxcpy) Removed.
2881 (strbarepadcpy) Renamed st_bare_pad_copy(), signature changed.
2882 (strbarepadlencpy) Renamed st_bare_pad_len_copy(), signature
2884 (strpadcpy) Renamed st_pad_copy(), signature changed.
2885 (blpstrset) Removed.
2886 (ds_create) New function.
2887 (ds_init) New function.
2888 (ds_replace) New function.
2889 (ds_destroy) New function.
2890 (ds_clear) New function.
2891 (ds_extend) New function.
2892 (ds_shrink) New function.
2893 (ds_truncate) New function.
2894 (ds_length) New function.
2895 (ds_size) New function.
2896 (ds_value) New function.
2897 (ds_end) New function.
2898 (ds_concat) New function.
2899 (ds_concat_buffer) New function.
2900 (ds_printf) New function.
2901 (ds_putchar) New function.
2902 (ds_getline) New function.
2903 (ds_get_config_line) New function derived from the old
2904 misc.c:get_config_line().
2905 (ls_create) New function.
2906 (ls_create_buffer) New function.
2907 (ls_init) New function.
2908 (ls_shallow_copy) New function.
2909 (ls_destroy) New function.
2910 (ls_null) New function.
2911 (ls_null_p) New function.
2912 (ls_empty_p) New function.
2913 (ls_length) New function.
2914 (ls_value) New function.
2915 (ls_end) New function.
2917 * str.h: Reformatted.
2918 (struct a_string) Removed.
2919 (struct b_string) Removed.
2920 (struct c_string) Removed.
2921 (struct len_string) New.
2922 (struct string) New.
2923 (macro as_streq) Removed.
2924 (macro bs_streq) Removed.
2925 (macro cs_streq) Removed.
2926 (macro sa_streq) Removed.
2927 (macro sb_streq) Removed.
2928 [__GNUC__] (inline function ds_putchar) New function.
2929 [__GNUC__] (inline function ds_length) New function.
2930 [__GNUC__] (inline function ds_value) New function.
2931 [__GNUC__] (inline function ds_end) New function.
2933 * sysfile-info.c: (cmd_sysfile_info) Rephrased.
2934 (display_vectors) Fix missing i18n.
2936 * t-test.q: Migrate to new q2c.
2938 * tab.c: Migrate from arenas to pools.
2939 (tab_create) Use struct len_string.
2940 (tab_realloc) Ditto.
2941 (text_format) Ditto.
2942 (tab_joint_text) Ditto.
2943 (tab_natural_width) Remove rich text support.
2944 (tab_natural_height) Ditto.
2945 (tab_output_text) Handle TAT_FIX.
2946 (tab_raw) Change arg from a_string to len_string.
2947 (tabi_driver) Fix assertion. Use struct len_string.
2948 (render_strip) Use struct len_string. Remove rich text support.
2949 Add `const' qualifiers.
2951 * tab.h: (enum TAB_RICH) Remove.
2952 (enums TAB_COL_NONE, TAB_COL_DONE) New. Where appropriate,
2953 SOM_COL_* updated to read TAB_COL_*.
2954 (struct tab_table) Change arena to pool. Change a_string to
2957 * temporary.c: (restore_dictionary) Rewrite Checker code.
2959 * var.h: (macros MAX_SHORT_STRING, MIN_LONG_STRING, SYSMIS,
2960 LOWEST, HIGHEST) Moved here from common.h.
2961 (typedef any_trns) Removed. All references changed to `struct
2964 * vars-atr.c: (force_create_variable) Fix assertion.
2965 (force_dup_variable) Fix assertion.
2967 Thu Jun 3 18:40:42 1999 Ben Pfaff <blp@gnu.org>
2969 Using alphanumeric variables in functions under AGGREGATE
2970 segfaulted. Fixed. Thanks to Dr. Dirk Melcher
2971 <BZN-mdksh@t-online.de> for reporting this bug.
2973 * aggregate.c: (parse_aggregate_functions) When setting the
2974 FSTRING bit, also allocate memory for the `string' member of
2976 (free_aggregate_functions) Free iter->string. Don't use the
2977 non-function bits when indexing the array of functions.
2978 [DEBUGGING] (debug_print) Don't use the non-function bits when
2979 indexing the array of functions.
2981 Sun May 30 00:00:54 1999 Ben Pfaff <blp@gnu.org>
2983 Under certain circumstances, the final case would be omitted from
2984 the results of an AGGREGATE operation. Fixed. Thanks to Dr. Dirk
2985 Melcher <BZN-mdksh@t-online.de> for reporting this bug.
2987 * aggregate.c (agr_00x_end_func): Increment number of cases in
2988 sink before writing case. For streams that keep track of how many
2989 cases there are based on this value, this means that the last case
2990 will be read in on the next stream read.
2992 Sat May 29 22:03:31 1999 Ben Pfaff <blp@gnu.org>
2994 Undefined behavior was invoked by referencing a freed pointer.
2996 * vfm.c (memory_stream_write): Free pointer *after* checking for
2999 Sat May 29 22:02:22 1999 Ben Pfaff <blp@gnu.org>
3001 A wrong record size was displayed when paging the active file to
3004 * vfm.c: (memory_stream_write) Fix off-by-one error.
3006 Sat May 29 21:50:26 1999 Ben Pfaff <blp@gnu.org>
3008 Not having enough temporary space for sorting caused a core dump.
3011 * sort.c: (allocate_cases) Initialize i.
3013 Sat May 29 21:40:54 1999 Ben Pfaff <blp@gnu.org>
3015 Syntax errors in function descriptions on AGGREGATE caused core
3018 * aggregate.c (cmd_aggregate): Don't free agr_dict after calling
3019 free_aggregate_functions(), since that function already frees
3022 Sat May 29 21:06:10 1999 Ben Pfaff <blp@gnu.org>
3024 A null pointer was dereferenced, causing a core dump, when
3025 PERCENTILES was specified on FREQUENCIES. This fixes the problem,
3026 but PSPP still doesn't calculate percentiles. Thanks to Regnor
3027 Jernsletten <rjernsle@eunet.no> for reporting this problem.
3029 * arena.c: (arena_malloc) If the arena hasn't been initialized
3030 already, initialize it.
3032 Sat May 29 20:47:29 1999 Ben Pfaff <blp@gnu.org>
3034 * Makefile.cygwin: New file supplied by Hankin <hankin@dunno.com>
3035 for compilation with Cygnus Windows B20. Not used by other
3038 Sat May 29 20:36:04 1999 Ben Pfaff <blp@gnu.org>
3040 SORT always sorted in ascending order. Fixed. Thanks to Dr. Dirk
3041 Melcher <BZN-mdksh@t-online.de> for reporting this bug.
3043 * sort.c: (compare_case_lists) Reverse sense of comparison if
3044 sorting in descending order.
3045 (compare_record) Ditto.
3047 Tue Mar 9 13:18:54 1999 Ben Pfaff <blp@gnu.org>
3049 SPLIT FILE with a string variable caused a core dump. Fixed.
3051 * vfm.c: If the variable is a string then make a temporary value
3052 struct pointing to it. The underlying problem is a lot bigger
3053 than this (see TODO) but this is a stopgap for the simple case at
3056 Tue Mar 9 13:15:53 1999 Ben Pfaff <blp@gnu.org>
3058 Nested INCLUDEs didn't work. Fixed.
3060 * getline.c: (getl_include) Set first_line to NULL in allocated
3063 Tue Mar 9 13:13:46 1999 Ben Pfaff <blp@gnu.org>
3065 The MATCH FILES procedure set the values of variables not present
3066 to 0. It should have been SYSMIS. This is now fixed.
3068 * get.c: (mtf_delete_file_in_place) Replace 0.0 by SYSMIS.
3070 Tue Mar 9 12:52:23 1999 Ben Pfaff <blp@gnu.org>
3072 The REMARK command was too aggressive about skipping lines. It
3073 didn't like being the last command in a file.
3075 * command.c: (cmd_remark) Call get_entire_line() instead of
3078 Tue Mar 9 12:48:05 1999 Ben Pfaff <blp@gnu.org>
3080 Comment parsing wasn't consistent with the rest of the code in its
3081 idea of where one command ends and another starts. This meant
3082 that sometimes commands would be mysteriously ignored. Thanks to
3083 Dr. Dirk Melcher <BZN-mdksh@t-online.de> for reporting this bug.
3085 * command.c: (parse_cmd) Hand off comment parsing to new function
3086 skip_comment() in lexer.c.
3087 * lexer.c: (skip_comment) New function.
3089 Wed Jan 20 20:22:07 1999 Ben Pfaff <blp@gnu.org>
3091 The TABLE subcommand on MATCH FILES worked only erratically at
3092 best. This fixes it. Thanks to Dr. Dirk Melcher
3093 <BZN-mdksh@t-online.de> for reporting this bug.
3095 * get.c: (mtf_compare_BY_values) When comparing string values, a
3096 difference of 1 is still a difference :-)
3097 (mtf_processing) Inverted TABLE reading logic fixed. Also don't
3098 advance TABLE files automatically when matched. Comment fixes.
3100 Tue Jan 19 22:32:31 1999 Ben Pfaff <blp@gnu.org>
3102 VARIABLE LABELS rejected a slash before the first variable
3103 specification, contradicting the documentation. Thanks to Walter
3104 M. Gray <graywm@northernc.on.ca> for reporting this bug.
3106 * var-labs.c: (cmd_variable_labels) Ignore a leading slash in
3107 command specification.
3109 Tue Jan 19 22:29:54 1999 Ben Pfaff <blp@gnu.org>
3111 Because of an incorrect optimization in memory allocation,
3112 CROSSTABS sometimes segfaulted when asked to output multiple
3113 tables. Thanks to Walter M. Gray <graywm@northernc.on.ca> for
3116 * crosstabs.q: (postcalc) New variables maxcols, maxcells, which
3117 are passed to output_pivot_table() for its use.
3118 (output_pivot_table) Instead of assuming the number of columns is
3119 constant, keep track with maxcols. In general mode, use maxcells
3120 to determine whether more matrix cells need to be allocated.
3122 Tue Jan 19 22:27:46 1999 Ben Pfaff <blp@gnu.org>
3124 CROSSTABS didn't display value labels for column and row
3125 variables. Thanks to Walter M. Gray <graywm@northernc.on.ca> for
3128 * crosstabs.q: (table_value_missing) If the specified value has a
3129 value label for this variable, then show it instead of the raw
3131 (display_dimensions) Delegate display of value_labels to
3132 table_value_missing.
3134 Mon Jan 18 20:04:06 1999 Ben Pfaff <blp@gnu.org>
3136 WRITE didn't write line ends. Fixed. Thanks to Dr. Dirk Melcher
3137 <BZN-mdksh@t-online.de> for reporting this bug.
3139 * print.c: (print_trns_proc) Write (CR/)LF if PRINT is used _or_
3140 if the file isn't declared as binary.
3142 Mon Jan 18 19:56:45 1999 Ben Pfaff <blp@gnu.org>
3144 MATCH FILES corrupted memory and dumped core on some syntax
3147 * get.c: (cmd_match_files) Set file->handle to NULL before
3149 (mtf_free_file) Don't free a null dictionary.
3151 Mon Jan 18 19:27:57 1999 Ben Pfaff <blp@gnu.org>
3153 MATCH FILES should set numeric values not available to the
3154 system-missing value, not to 0. Thanks to Dr. Dirk Melcher
3155 <BZN-mdksh@t-online.de> for reporting this bug.
3157 * get.c: (mtf_processing) Set unused records to system-missing,
3160 Mon Jan 18 15:06:46 1999 Ben Pfaff <blp@gnu.org>
3162 KEEP didn't work properly on the SAVE procedure. Fixed. Thanks
3163 to Ralf Geschke <ralf@kuerbis.org> for reporting this bug.
3165 * temporary.c: (save_dictionary) Initialize var_by_name AVL tree
3166 in newly created dictionary, and add each copied variable to the
3169 Mon Jan 18 15:04:48 1999 Ben Pfaff <blp@gnu.org>
3173 * get.c: (trim_dictionary) Free variable list for KEEP after
3176 Mon Jan 18 12:57:36 1999 Ben Pfaff <blp@gnu.org>
3178 Some systems didn't like the way open_file was coded. Thanks to
3179 Hankin <hankin@rogue.consultco.com> for pointing this out.
3181 * filename.c: (open_file) Don't try to store stdin, stdout,
3182 stderr as part of an array, because that doesn't always work.
3184 Mon Jan 18 12:53:27 1999 Ben Pfaff <blp@gnu.org>
3186 The SAVE procedure didn't save long string variables properly.
3187 Fixed by this patch. Thanks to Hankin
3188 <hankin@rogue.consultco.com> for this patch.
3190 * sfm-write.c: (write_variable) Fix off-by-one error in writing
3191 out variable pad records.
3193 Tue Jan 5 14:29:27 1999 Ben Pfaff <blp@gnu.org>
3195 Previously, if PRINT SPACE were given a negative argument, it
3196 would report an error, then spin in an (almost) infinite loop.
3197 This fixes that behavior.
3199 * print.c: (print_space_trns_proc) After reporting a negative
3200 argument, set number of lines to print to 1.
3202 Tue Jan 5 13:59:55 1999 Ben Pfaff <blp@gnu.org>
3204 SPSS 8.0 outputs some new record types in its system files, and it
3205 allows longer value labels. Accept these system files.
3207 * sfm-read.c: (sfm_read_dictionary) Ignore record type 7 subtype
3208 11 emitted by SPSS 8.0.
3210 Tue Jan 5 13:55:50 1999 Ben Pfaff <blp@gnu.org>
3212 The LIST procedure was too conservative in allocating space for
3213 buffers, which caused a bug that only showed up with very long
3214 output variables. Thanks to Hankin <hankin@dunno.com> for this
3217 * list.q: (determine_layout) Allocate 1022 bytes instead of 256.
3219 Tue Jan 5 13:34:34 1999 Ben Pfaff <blp@gnu.org>
3221 Typo meant string format specifiers weren't checked properly. I
3222 think that Hankin <hankin@dunno.com> sent me this report, but I'm
3223 willing to be corrected on this point.
3225 * format.c: (check_string_specifier) Fix obvious typo.
3227 Tue Jan 5 12:50:42 1999 Ben Pfaff <blp@gnu.org>
3229 Using $CASENUM in an expression didn't work. Here's a fix.
3230 Thanks to Dirk Melcher <BZN-mdksh@t-online.de> for reporting this
3233 * expr-evl.c: (evaluate_expression) Add OP_CASENUM case.
3235 * expr-opt.c: (dump_node) OP_CASENUM is acceptable.
3237 Tue Jan 5 12:47:48 1999 Ben Pfaff <blp@gnu.org>
3239 The changes in 0.2.1 to fix DATA LIST FREE parsing broke some
3240 other behavior, *sigh*. This patch hopefully fixes that. This
3241 time I've actually tested it.
3243 Thanks to Hankin <hankin@dunno.com> for reporting this bug.
3245 * data-list.c: (read_from_data_list_free,
3246 read_from_data_list_list) Call parse_string_as_format() directly
3247 without mucking around with the field width.
3249 Tue Jan 5 12:31:19 1999 Ben Pfaff <blp@gnu.org>
3251 Occasionally, you may encounter a script that wants to be
3252 interpreted in interactive mode. Make -i emulate this behavior to
3253 allow such scripts to be executed with PSPP.
3255 Thanks to Hankin <hankin@dunno.com> for reporting this behavior.
3257 * cmdline.c: (pre_syntax_message[]) Update -i description.
3259 * lexer.c: (preprocess_line) When getl_interactive is 2 (i.e.,
3260 when -i is given on the command line) don't treat unindented lines
3261 as starting a new command.
3263 Tue Jan 5 12:30:10 1999 Ben Pfaff <blp@gnu.org>
3265 In conjunction with egcs 1.1.1, Checker emits some bogus warnings,
3266 mostly caused by local initialized aggregates. After egcs is
3267 fixed upstream these can be removed, but for now they're not a big
3270 * ascii.c: (ascii_postopen_driver) Checker chokes on local
3271 initialized arrays. Avoid this.
3273 * sfm-write.c: (sfm_write_dictionary) Don't use a local
3276 Tue Jan 5 12:07:24 1999 Ben Pfaff <blp@gnu.org>
3278 egcs 1.1.1 has some new warnings relative to gcc 2.8.1, which the
3279 following changes avoid. Currently I compile sources with egcs
3280 1.1.1 and gcc 2.7.2.3 before sending them out.
3282 * apply-dict.c: (apply_dict) Use new avl_traverser_init() macro.
3284 * ascii.c: (option_tab[]) Initialize all struct members.
3286 * avl.h: (avl_traverser_init) New macro.
3288 * command.c: (DEFCMD, UNIMPL macros, cmd_table[]) Initialize all
3291 * crosstabs.q: (enum_var_values) Use new hsh_iterator_init()
3294 * hash.c: Comment fix.
3296 * hash.h: (hsh_iterator_init) New macro.
3298 * html.c: (option_tab[]) Initialize all struct members.
3300 * pfm-write.c: (write_value_labels) Use new avl_traverser_init()
3303 * postscript.c: (option_tab[]) Initialize all struct members.
3304 (output_encodings, preclose, dump_lines) Use new
3305 hsh_iterator_init() macro.
3307 * sfm-write.c: (write_value_labels) Use new avl_traverser_init()
3310 * sysfile-info.c: (describe_variable) Use new avl_traverser_init()
3313 Thu Nov 19 12:32:45 1998 Ben Pfaff <blp@gnu.org>
3315 * data-in.c: Examined each of the parsing functions to make sure
3316 that they wouldn't dump core if they were passed a string of the
3317 wrong length, since now the DATA LIST FREE/LIST routines don't
3318 check for field width before passing it to the data parser.
3319 (parse_RBHEX, parse_AHEX) Reject odd length input.
3320 (parse_string_as_format) Reject input that's too short or too
3323 * data-list.c: Before, the DATA LIST FREE/LIST routines would pad
3324 a field to its entire declared output width then pass it to the
3325 data-in parsing routines. This contradicted the documented
3326 behavior. This is fixed in these changes. Thanks to Mark H. Wood
3327 <mwood@IUPUI.Edu>. In addition, this fixes a few more details of
3328 free-format parsing that differed from SPSS.
3329 (cut_field) Commas and spaces are treated identically. Returns
3330 the proper column instead of a fixed 1 value.
3331 (parse_field) Removed.
3332 (read_from_data_list_free, read_from_data_list_list) Call
3333 parse_string_as_format directly instead of parse_field.
3335 * heap.c: (heap_delete) Stylistic fixes.
3337 Sun Aug 9 11:12:13 1998 Ben Pfaff <blp@gnu.org>
3339 * loop.c: (loop_2_trns_proc) Formatting fix.
3341 * sel-if.c: (cmd_filter) Set FILTER_before_TEMPORARY.
3343 * var.h: (glob var FILTER_before_TEMPORARY) New global var.
3345 * vfm.c: (macro FILTERED) New.
3346 (static var filter_var) New.
3347 (process_active_file_write_case) Use FILTERED.
3348 (setup_filter) Set filter_var.
3349 (close_active_file) Delete the filter if not
3350 FILTER_before_TEMPORARY.
3351 (procedure_write_case) Use FILTERED.
3353 Sat Aug 8 00:20:14 1998 Ben Pfaff <blp@gnu.org>
3355 * crosstabs.q: Changed /PIVOT={ON,OFF} to /FORMAT={PIVOT,NOPIVOT}.
3357 * data-in.c: (parse_day_count) Message fix.
3358 (parse_month) Style fix.
3360 * data-list.c: (struct data_list_pgm) New member eof.
3361 (cmd_data_list) Init eof to 0.
3362 (do_reading) Implement the /END subcommand and read-past-eof
3365 * do-if.c: Include stdio.h when debugging.
3366 (cmd_else_if) Make sure the command is .-terminated.
3368 * glob.c: (init_glob) Capitalize the command prompt.
3370 * inpt-pgm.c: (end_case_trns_proc) Debugging message.
3371 (end_file_trns_proc) Debugging message.
3373 * loop.c: (internal_cmd_loop) Make it work when there's no loop
3375 (loop_2_trns_proc) Enable MXLOOPS (why was this disabled?)
3377 * main.c: (dump_token) Make kwtab[] const.
3379 * set.q: Spelling, comment fixes.
3381 * sysfile-info.c: (cmd_display) DISPLAY VECTORS not DISPLAY
3384 * vars-prs.c: (fill_all_vars) Style fix.
3386 * vfm.c: (index_to_varname) Return const.
3388 Tue Aug 4 23:49:23 1998 Ben Pfaff <blp@gnu.org>
3390 * Changes in many source files for partial -ansi -pedantic and
3391 no-debugging compliance: Remove trailing common in enum
3392 declarations; add `unused' attributes; insert some appropriate
3395 * cmdline.c: (parse_command_line) Add new --testing-mode flag.
3397 * command.c: (shell) Make static.
3398 (run_command) Make static.
3400 * data-list.c: (dump_fixed_table) Remove use of local_strdup().
3402 * dfm.c: (cmd_begin_data) I18n fix.
3404 * error.c: (verbose_msg) Define if __STRICT_ANSI__.
3406 * error.h: (macro verbose_msg) Define if __STRICT_ANSI__.
3408 * expr-opt.c: (evaluate_tree) Don't initialize local arrays if
3411 * file-handle.q: Don't prepend the source file directory name to
3412 the data file name. (Ongoing issue.)
3413 (prepend_current_directory) Comment out.
3414 (internal_cmd_file_handle) Don't call prepend_current_directory().
3415 (fh_get_handle_by_filename) Ditto.
3417 * filename.c: Append zero byte to readlink() return value.
3419 * getline.c: (getl_read_line) I18n fix.
3421 * lexer.h: Don't use gcc features if __STRICT_ANSI__.
3423 * misc.h: Don't use gcc features if __STRICT_ANSI__.
3425 * pfm-write.c: (bufwrite) Don't try to increment a void * pointer
3428 * postscript.c: (output_encodings) Don't use local_strdup().
3431 * print.c: Don't use gcc features if __STRICT_ANSI__.
3433 * q2c.c: (dump_vars) Don't put a , at the end of the last enum.
3435 * recode.c: (parse_src_spec) Fully brace nested if's.
3437 * set.q: (global var set_testing_mode) New var.
3439 Wed Jul 29 22:01:44 1998 Ben Pfaff <blp@gnu.org>
3441 * ascii.c: Add some more `unused' attributes that only come into
3442 play when NDEBUG is defined.
3443 (ascii_close_page) Set s_len when reallocating s.
3445 * crosstabs.q: (delete_missing) New function.
3446 (output_pivot_table) Call delete_missing() if /MISSING=REPORT.
3447 (make_summary_table) Create summary table reallocable.
3449 * postscript.c: Add more `unused' attributes as above.
3451 * tab.c: (tab_create) [GLOBAL_DEBUGGING] Set reallocable member.
3452 (tab_realloc) [GLOBAL_DEBUGGING] Assert that table is reallocable.
3454 * tab.h: (struct tab_table) [GLOBAL_DEBUGGING] New `reallocable'
3457 * var.h: (macro force_dup_variable) [!GLOBAL_DEBUGGING] Remove
3458 gratuitous space between parameter definition.
3460 * vars-atr.c: Changed some assert(0)'s to abort()'s to prevent
3461 complaints about running off the end of functions with NDEBUG
3464 Sun Jul 5 00:17:25 1998 Ben Pfaff <blp@gnu.org>
3466 * Several source files: Removed some PORTME notes when reflection
3467 revealed that ANSI forbids that sort of breakage. Also, added
3468 lots of `unused' qualifiers here and there.
3470 * aggregate.c: (accumulate_aggregate_info) Remove local var
3471 weighting that turned out not to be used.
3473 * avl.c: Update to version 1.1.0. Add unused specifier.
3474 (avl_destroy) Initialize ab to 0. Comment fixes. Cast return
3476 (avl_probe) Replace some instances of 1 with +1 where appropriate.
3477 (avl_find) Cast return value to void *.
3478 (avl_delete) q doesn't need to be initialized at the beginning of
3479 the function. Replace some instances of 1 with +1.
3480 (force_avl_delete) Renamed avl_force_delete, all references changed.
3481 (compare_ints) `param' marked unused.
3482 (print_int) `param' marked unused.
3483 (recurse_tree) Replace some instances of 1 with +1.
3485 * avl.h: Update to version 1.1.0. Only declares avl function
3486 types if not already declared.
3487 (AVL_MAX_HEIGHT) Only define if not already defined.
3488 (struct avl_node) New unused member char pad[2].
3489 [GLOBAL_DEBUGGING] Change conditionalization to NDEBUG instead.
3490 (force_avl_insert) Renamed avl_force_insert.
3491 (force_avl_delete) Renamed avl_force_delete.
3493 * crosstabs.q: (struct table_entry) Put `freq' into a union with
3495 (struct crosstab) Add new member `ofs'.
3496 (glob var int_tab) Removed.
3497 (custom_tables) In integer mode, assign v[i] properly through the
3499 (custom_variables) Now p.crs.max == max + 1.
3500 [DEBUGGING] (debug_print) p.crs.min and p.crs.max are now ints.
3501 (precalc) Implement integer mode.
3502 (calc_integer) Implement integer mode.
3503 (compare_table_entry) Remove unused local variable `comparing'.
3504 (make_summary_table) Implement integer mode.
3505 (macro ns_rows) Implemented as static variable now.
3506 (several variables) Made static, from global.
3507 (output_pivot_table) Use table_value_missing() for column heads.
3508 Remove several unused local variables. Implement integer mode
3509 table summing. Count up ns_rows.
3510 (crosstabs_dim) Make columns wider when /MISSING=REPORT requested.
3511 (find_pivot_extent) Moved into find_pivot_extent_general; now just
3512 calls that function or find_pivot_extent_integer.
3513 (find_pivot_extent_integer) New function.
3514 (enum_var_values) Implemented for integer mode.
3515 (table_value_missing) New function.
3516 (display_dimensions) Call table_value_missing() for heads.
3517 (float_M_suffix) New function.
3518 (display_crosstabulation) Call table_value_missing() for row
3519 heads. Handle missing values in /MISSING=REPORT mode.
3520 (calc_fisher) Remove unused var N.
3521 (calc_r) Remove unused var fact.
3523 * data-list.c: (dump_fixed_table) Fix table dimensioning.
3524 (read_one_set_of_repetitions) Remove unused vars var_spec, column.
3526 * data-out.c: (insert_commas) Remove unused var cp.
3527 (convert_CCx) Remove unused vars save_set_decimal,
3530 * descript.q: (dump_z_table) Fix table dimensioning.
3531 (pre_calc) Remove unused var j.
3532 (display) Remove unused vars title, s. Fix table dimensioning.
3534 * expr-evl.c: Comment fixes.
3536 * frequencies.q: (full_dim) New function.
3537 (dump_full) Fix table dimensioning.
3538 (condensed_dim) New function.
3539 (dump_condensed) Fix table dimensioning.
3541 * get.c: (cmd_match_files) Remove unused var n_val. Remove unused
3544 * html.c: (html_close_drive) Remove unused var i.
3545 (postopen) Remove unused vars title, curfn_len, cp.
3546 (preclose) Remove unused vars this, x.
3548 * lexer.c: Comment fixes.
3550 * matrix-data.c: (cmd_matrix_data) Remove unused var index.
3552 * means.q: (custom_tables) Remove unused var m_dim.
3554 * mis-val.c: Format fix.
3556 * modify-vars.c: (cmd_modify_vars) Remove unused var new_dict.
3558 * output.c: (outp_get_paper_size) Remove unused var cp.
3560 * pfm-read.c: (read_float) Remove unused var save, unused label
3562 (read_variables) Remove unused vars cp, j.
3563 (read_value_label) Remove unused var j.
3565 * pfm-write.c: (bufwrite) Remove unused var i.
3567 * postscript.c: (ps_postopen_drive) Remove unused vars dev_info,
3569 (output_encodings) Remove unused vars char_cp, n_output.
3570 (read_ps_encodings) Remove unused var ep.
3571 (postopen) Remove unused var title.
3572 (preclose) Remove unused var fp.
3573 (ps_open_page) Remove unused vars true, false, orientation,
3574 mirror_horz, mirror_vert, width, length.
3575 (ps_text_metrics) Remove unused var x.
3577 * q2c.c: (find_symbol) Remove unused var y.
3578 (parse_setting) Remove unused parameter sbc, all references
3580 (dump_parser) Remove unused var cp.
3581 (dump_free) Remove unused var i.
3583 * set.q: (static vars args, n) Removed.
3584 (internal_cmd_gset) Removed.
3586 * sfm-read.c: (sfm_read_dictionary) Removed unused var i.
3587 (read_machine_flt64_info) Removed unused var file_endian.
3588 (read_documents) Removed unused var i.
3589 (read_compressed_data) Removed unused parameter dict, all
3592 * sfm-write.c: (bufwrite) Removed unused var i.
3593 (sfm_write_case) Removed unused var i.
3595 * sort.c: (merge_once) Remove unused var t.
3596 (write_separate) #if 0 out as dead code.
3598 * split-file.c: (cmd_split_file) Remove unused var i.
3600 * sysfile-info.c: (sysfile_info_dim) New function.
3601 (cmd_sysfile_info) Fix table dimensioning.
3602 (variables_dim) New function.
3603 (display_variables) Fix table dimensioning.
3604 (describe_variable) Remove unused var prev_r.
3606 * t-test.q: (z_postcalc) Removed.
3607 (pairs_calc) Remove unused var bad_weight.
3608 (postcalc) Remove unused vars dfn, dfd.
3610 * tab.c: (tab_create) Set t->dim to NULL.
3611 (tab_dim) Make sure t->dim is NULL first.
3612 (tab_natural_width) Remove parameter `clamp'.
3613 (tab_value) Remove duplicate assertion for table.
3614 (tab_raw) New function.
3615 (nowrap_dim) New function.
3616 (wrap_dim) New function.
3617 (tab_output_text) Fix table dimensioning.
3619 * tab.h: (tab_raw) New macro.
3621 * val-labs.c: (get_label) Remove unused var type.
3622 (copy_value_labels) Remove unused var trav.
3624 * var.h: (struct crosstab_proc) Completely changed.
3626 * vars-prs.c: (parse_dict_variable) Remove unused var v.
3628 * vfm.c: (open_active_file) Remove unused vars i, lp.
3630 * weight.c: (weight_trns_proc) #if 0 out as dead code.
3632 Tue Jun 2 23:37:21 1998 Ben Pfaff <blp@gnu.org>
3634 * Makefile.am: Add apply-dict.c, flip.c.
3636 * apply-dict.c: New file.
3638 * command.c: (struct command) Make cmd[] larger for CLEAR
3639 TRANSFORMATIONS command name.
3640 (parse_cmd) Make sure we're in a valid state before using it as an
3641 index. Discard variables and reset state on invalid transitions.
3642 (cmd_clear_transformations) New function.
3644 * command.def: Add APPLY DICTIONARY, CLEAR TRANSFORMATIONS, FLIP.
3645 Add unimplemented PRESERVE, RESTORE.
3647 * file-handle.h: Include stddef.h.
3651 * pfm-read.c: (parse_value) Pad value label values with spaces,
3654 * sfm-read.c: (struct sfm_fhuser_ext) Add reference count.
3655 (sfm_close) Decrement reference count, make sure it's zero.
3656 (sfm_maybe_close) New function.
3657 (sfm_read_dictionary) Handle reference counts.
3659 * vars-atr.c: (clear_default_dict) New function.
3660 (discard_variables) Use clear_default_dict().
3662 Sun May 31 00:58:05 1998 Ben Pfaff <blp@gnu.org>
3664 * Makefile.am: Add pfm-write.c.
3665 (LDADD) Add the libgmp2 libraries.
3667 * command.def: Define EXPORT.
3669 * get.c: (cmd_export) New function.
3670 (export_write_case_func) New function.
3672 * pfm-read.c: (static spss2ascii[]) Make it const.
3674 * pfm-write.c: New file.
3676 * sfm-write.c: Formatting, comment fixes.
3678 * var.h: Comment fix.
3680 Fri May 29 21:44:12 1998 Ben Pfaff <blp@gnu.org>
3682 * Makefile.am: Add pfm.h, pfm-read.c.
3684 * command.def: IMPORT is now implemented.
3686 * format.c: (glob var translate_fmt[]) New var.
3688 * get.c: (enum GTSV_NONE) Renamed GTSV_OPT_NONE.
3689 (cmd_import) New function.
3690 (import_source_read) New function.
3691 (glob var import_source) New var.
3693 * pfm-read.c: New file.
3697 * sfm-read.c: (parse_format_spec) Local variable translate_fmt[]
3699 (dump_dictionary) Disabled printing a couple of items.
3701 Mon May 25 12:42:37 1998 Ben Pfaff <blp@gnu.org>
3703 * crosstabs.q: (postcalc) Call make_summary_table().
3704 (make_summary_table) New function.
3705 (insert_summary) New function.
3706 (display_dimensions) Remove some unnecessary arguments, all
3708 (output_pivot_table) Fix lots of problems with the risk table
3710 (submit) Don't display an empty table.
3711 (display_risk) Fix order of arguments to calc_risk().
3713 * glob.c: Always include assert.h and stdlib.h.
3715 * output.h: (enum OUTP_T_JUST_FULL) Removed, all references
3718 * tab.c: (tab_create) Cosmetic changes.
3720 * tab.h: (enum TAB_JUSTIFY) Removed, all references removed.
3722 Sun May 24 22:39:23 1998 Ben Pfaff <blp@gnu.org>
3726 * crosstabs.q: (output_pivot_table) Headers drawing and submission
3727 code simplified, moved into new function submit().
3728 (submit) New function.
3729 (crosstabs_dim) New function.
3730 (display_directional) Substitute variable names for %s where
3732 (somers_d_v[], somers_d_ase[], somers_d_t[]) New static vars.
3733 (calc_symmetric) Initialize parameters only if non-NULL.
3734 Calculate Somers' d.
3735 (calc_directional) Calculate Somers' d (or copy it, really).
3738 * output.c: (outp_string_width) New function.
3740 * postscript.c: (postopen) Calculate font widths based on the
3741 width of the zero '0' character, not the width of the space
3742 character. Set paper-width and paper-length based on points, not
3744 (ps_open_page) Fix page setup string for landscape mode.
3746 * som.h: (struct som_dimension) Removed.
3747 (struct som_table_class) height, width members take int * not
3750 * tab.c: Many functions now have added parameter validation.
3751 (tab_height, tab_width) These functions were removed and merged
3752 into a single function tab_resize(), and all references changed.
3753 (tab_dim) Rewritten since the interface changed; reduced from
3754 hundreds of lines to two. All callers were changed. Currently
3755 most of them just use tab_natural_dimensions as their callback and
3756 await detailed translation of functionality.
3757 (tab_natural_width) New function.
3758 (tab_natural_height) New function.
3759 (tab_natural_dimensions) New function. This is a callback
3760 function, not something that you'd want to call directly.
3761 (tab_nat_dim) Removed.
3762 (tabi_table) Allocates t->w and t->h.
3763 (tabi_driver) Inlined sum_columns()'s functionality. Calls the
3764 dimensions callback.
3765 (evaluate_dimensions) Removed.
3766 (sum_columns) Removed.
3768 * tab.h: (enum TAL_1THIN) Removed.
3769 (enum series t_*) Removed.
3770 (struct tab_table) Members trh, trv changed to unsigned char *
3771 from int *. Member dim changed to a function pointer from a
3772 unsigned char *. Member max_stack_height removed. New members
3774 (macros tab_l, tab_r, tab_t, tab_b) New.
3776 Sat May 23 23:22:13 1998 Ben Pfaff <blp@gnu.org>
3778 * ascii.c: (delineate) Assign last_space_nchars before skipping
3779 spaces, to fix right justification.
3781 * crosstabs.q: (static vars risk, direct) New vars.
3782 (static var pearson_r) Removed.
3783 (glob var chisq_fisher) Made static.
3784 (static vars row_tot[], col_tot[]) Don't include grand total
3786 (static var grand_total) Renamed W, all references changed.
3787 (output_pivot_table) Only make `table' if num_cells != 0. Make
3788 risk and directional tables. Deal with grand total no longer part
3789 of col_tot[]. Free rows and cols after we're done with them.
3790 (display_risk) New function.
3791 (display_directional) New function.
3792 (clac_r) Rewritten so that it stores all its results into its
3793 arguments, so it can be used for Spearman's correlation too.
3794 (calc_symmetric) Added a t[] argument, all references changed.
3795 Calculates ASEs for tau-b, tau-c, gamma. Calculates Spearman's r,
3796 Pearson's r, Cohen's kappa.
3797 (calc_risk) New function.
3798 (calc_directional) New function.
3800 * som.c: (som_submit) Improved debugging code.
3802 * stats.c: (hypercube) New function.
3803 (cube) New function.
3805 (normal_sig) Went back to old implementation, which actually
3808 * stats.h: (macros square, cube, hypercube) Removed. The
3809 equivalent functions in stats.c are inlined here; all references
3810 to square changed to sqr.
3812 Fri May 22 00:03:41 1998 Ben Pfaff <blp@gnu.org>
3814 * crosstabs.q: (N_SYMMETRIC) New define.
3815 (postcalc) Disable debug printing.
3816 (static vars chisq_fisher, pearson_r) New.
3817 (output_pivot_table) Add support for symmetric measures. Add
3818 chi-square output of exact sigs.
3819 (display_chisq) Rewritten.
3820 (display_symmetric) New function.
3821 (gamma_int) New function.
3823 (swap) New function.
3824 (calc_fisher) New function.
3825 (calc_chisq) Check boundary conditions better. Calculate Yates,
3826 Fisher, Mantel-Haenszel tests.
3827 (calc_r) New function.
3828 (calc_symmetric) New function.
3830 * stats.c: (normal_sig) Rewritten with new algorithm. Renamed
3832 (chisq_sig) Better boundary conditions. Renamed from
3835 * tab.h: (struct tab_table) New member cf.
3837 * tab.c: (tab_create) Set cf.
3838 (tab_width) New function.
3839 (tab_realloc) Handle cf.
3840 (tab_vline) Handle cf.
3841 (tab_hline) Handle cf.
3842 (tab_box) Handle cf.
3843 (tab_value) Handle cf.
3844 (tab_float) Handle cf.
3845 (tab_text) Handle cf.
3846 (tab_joint_text) Handle cf.
3847 (tab_offset) Handle cf.
3848 (tab_next_row) Handle cf.
3849 (evaluate_dimensions) Handle cf.
3850 (render_strip) Handle cf.
3852 Wed May 20 00:03:59 1998 Ben Pfaff <blp@gnu.org>
3854 * crosstabs.q: (postcalc) New vars row_tot, col_tot, pass them to
3855 output_pivot_table().
3856 (output_pivot_table) Moved lots of local variables outside and
3857 made them static. Add beginnings of chi-square statistic
3858 support. Now column and row totals aren't in the main matrix.
3859 Always zero out any leftover rows & columns after we're done with
3860 the table entries. Move all output stuff into
3861 display_dimensions(), display_crosstabs(), display_chisq().
3862 (display_dimensions) New function.
3863 (display_crosstabulation) New function.
3864 (display_chisq) New function.
3865 (calc_chisq) Implemented Pearson and likelihood-ratio chisquares.
3867 * frequencies.q: (dump_full, dump_condensed) Remove tab_null()
3868 references, simplify logic.
3870 * postscript.c: Remove scale, translate-x, translate-y,
3871 mirror-horz, mirror-vert, rotate-180 options.
3872 (struct ps_driver_ext) Remove scale, translate_x, translate_y.
3873 All references deleted.
3874 (macro YT) New macro.
3875 (array option_tab[]) Removed options.
3876 (ps_option) Removed options.
3877 (ps_open_page) Write page setup explicitly to output file, without
3878 using now-deleted BP function.
3879 (macro dump_line) Use YT().
3880 (macro dump_thick_line) Use YT().
3881 (draw_headers) Use YT().
3882 (switch_font) Reorder arguments to SF function.
3883 (write_text) Use YT().
3885 * sfm-read.c: (sfm_read_case) Don't attempt to read variables that
3888 * sysfile-info.c: (describe_variables) Don't use tab_nulls().
3890 * tab.c: (tab_create) Initialize t->ct to zeros. Remove
3891 null-debugging code.
3892 (tab_realloc) Remove null-debugging code. Initialize new regions
3894 (tab_vline) Support offsets.
3895 (tab_hline) Support offsets.
3896 (tab_box) Support offsets.
3898 (tab_nulls) Removed.
3901 (evaluate_dimensions) Remove null-debugging code. Understand
3902 TAB_EMPTY attribute. Assert that text.s.s is always non-NULL if
3903 TAB_EMPTY not present.
3905 * tab.h: New cell attribute TAB_EMPTY.
3906 (macros tab_nr, tab_nc, tab_row, tab_col) New.
3908 * vars-atr.c: (init_variable) Set get.fv to -1 so that GET doesn't
3909 try to read them from system files.
3911 * vfm.c: (dump_splits) Don't call tab_null().
3913 Sat May 16 19:36:55 1998 Ben Pfaff <blp@gnu.org>
3915 * crosstabs.q: (struct crosstab) Added `missing' member.
3916 (custom_tables) Init missing.
3917 (calc_general) Handle missing values.
3918 (calc_chisq) New function.
3919 (output_pivot_table) Start work on chi-square output. Update for
3920 new tab offset support functions. Shorten statistic names.
3922 * Several files: add in more `const's to placate gcc's warnings.
3924 * tab.h: (struct tab_table) Add col_ofs, row_ofs members. Comment
3927 * tab.c: (tab_height, tab_realloc, tab_vline, tab_hline, tab_box,
3928 tab_null, tab_nulls, tab_value, tab_float, tab_text,
3929 tab_joint_text) Add col_ofs and row_ofs support.
3930 (tab_offset) New function.
3931 (tab_next_row) New function.
3932 (tab_row) New function.
3933 (tab_col) New function.
3934 (tabi_table) Add col_ofs and row_ofs support.
3936 * vars-atr.c: (is_system_missing) New function.
3938 Tue May 12 16:14:30 1998 Ben Pfaff <blp@gnu.org>
3940 * crosstabs.q: Expanded subcommand names RESID --> RESIDUAL, etc.
3941 (static var no_cells) Removed.
3942 (static var num_cells) New.
3943 (static var expected) New.
3944 (static var cells[]) New.
3945 (internal_cmd_crosstabs) Deal with new variables.
3946 (postcalc) Removed most of the meat and put it in new function
3947 output_pivot_table().
3948 (output_pivot_table) Calculates and outputs an entire pivot table.
3950 * postscript.c: (postopen) Fix problems with free()ing addresses
3951 not obtained from malloc().
3953 * som.c: (som_submit) Add assertion.
3955 * sysfile-info.c: (describe_variable) Use new tab_nulls()
3958 * tab.c: (static var tab_names[]) New.
3959 (tab_realloc) -1 for nc or nr indicates no change.
3960 (tab_nulls) New function.
3961 (tab_dim) Use tab_names[].
3962 (tabi_cumulate) Don't include bottom or right headers. Furrfu.
3963 (evaluate_dimensions) Don't terminate on uninited cells, just put
3964 an X in them and emit a notice. Use tab_names[].
3966 * tab.h: Move bits into tab.def.
3968 * tab.def: New. Don't try to declare tab_table_class because then
3969 som.h has to be included.
3971 Thu May 7 22:55:04 1998 Ben Pfaff <blp@gnu.org>
3973 * command.def: New file, contains all the command definitions
3974 previously included bodily in command.c.
3976 * format.def: New file, contains all of the format definitions
3977 previously split across format.h, format.c, and sfm-write.c.
3979 * lexer.h: Renamed from tokens.h in order to match corresponding
3982 * lexerP.h: Moved some rarely used functions exported by lexer.c
3985 * Makefile.am: Commemorate renamed files.
3986 (EXTRA_DIST) Add command.def, format.def.
3988 * command.c: [0] (walk_cmdtable_func) Removed.
3990 * crosstabs.q: (postcalc) Made it work and print out matrices
3992 (enum_column_values) Renamed enum_var_values, generalized for any
3995 * format.h: (struct fmt_desc) New member `spss'.
3997 * q2c.c: (main) Generated code includes lexer.h instead of
4000 * sfm-write.c: (write_format_spec) Use new spss member of fmt_spec
4001 instead of an independent translation table.
4003 Tue May 5 13:19:03 1998 Ben Pfaff <blp@gnu.org>
4005 * Lots of source files: Added const to declarations.
4007 * aggregate.c: (parse_aggregate_function) Rename inner i to j.
4009 * arena.c: (arena_clear) Set prev pointer to null when done.
4011 * ascii.c: (ascii_option) Rename index as indx.
4013 * avl.c: This is now a separate library called libavl.
4014 (xmalloc) Make static.
4015 (avl_probe) Step A7 can use the cache instead of an explicit
4017 (avl_delete) Don't maintain a q pointer because it's always
4018 available in the pointer stack. Comment fix.
4020 * avl.h: This is now a separate library called libavl.
4022 * command.c: (cmd_table[]) Remove spurious trailing "".
4024 * common.h: Only include random() fix if this system needs it.
4026 * crosstabs.q: Include alloca headers.
4027 (n_sorted_tab) New global var.
4028 (postcalc) Mostly rewritten.
4029 (find_pivot_extent) Rewritten.
4030 (enum_column_values) Rewritten.
4032 * data-out.c: (convert_F) Rename inner n as n_spaces.
4034 * error.c: (dump_message) Don't have an outer var i.
4036 * file-handle.q: (static var f) Removed. All references removed.
4037 (internal_cmd_file_handle) Uses a local variable instead of f.
4039 * get.c: (trim_dictionary) Change scope of i, i1, i2.
4040 (cmd_match_files) Don't strcpy tokstr into sbc (why was this ever
4043 * getline.h: Declare getl_history as extern. Reported by
4044 palme@uni-wuppertal.de (Hubert Palme).
4046 * postscript.c: (postopen) Some large mods for constness.
4048 * recode.c: Remove spurious copyrights since PSPP is owned by FSF
4051 Fri Apr 24 12:52:47 1998 Ben Pfaff <blp@gnu.org>
4053 * Makefile.am: Rename BUILT_SOURCES to q_sources, all references
4054 changed. Add avl.c, avl.h to pspp_SOURCES. Remove avllib from
4057 * avl.c, avl.h: New files. These form a clean-room
4058 reimplementation of avllib. Iterative algorithms are used in
4059 place of recursive ones, so there is no resemblance in the code.
4061 * Lots of headers: Don't include other headers by default.
4063 * Lots of source files: Explicitly include all needed headers.
4065 * arena.c: (arena_clear) New function.
4067 * crosstabs.q: (ROW_VAR, COL_VAR) New enums.
4068 (static var ar) Removed.
4069 (staitc vars ar_tc, ar_col) New.
4070 (cmd_crosstabs) Destroy the arenas.
4071 (internal_cmd_crosstabs) Create the arenas.
4072 (precalc) Don't need a free function for the hash.
4073 (calc_general) Make sure to zero out the trailer on the key data
4075 (print_table_entries) Updated.
4076 (postcalc) Worked on actually implementing.
4077 (find_pivot_extent) New function.
4078 (compare_value) New function.
4079 (enum_column_values) New function.
4081 * data-in.c: (parse_month) Make local array `static const'.
4083 * data-out.c: (convert_date) Make local array `static const'.
4084 (convert_WKDAY) Same.
4085 (convert_MONTH) Same.
4087 * frequencies.q: (postprocess_freq_tab) avl_walk_inorder() has
4088 been renamed to avl_walk().
4090 * hash.c: Rewritten more efficiently.
4092 * hash.h: Add attribute const to hsh_next_prime declaration.
4094 * lexer.c: (id_match) Make arguments const.
4096 * postscript.c: (ps_postopen_driver) Make default fonts the
4099 * q2c.c: (main) Generated code needs stdlib.h.
4101 * sfm-write.c: (write_value_labels) An avl_traverser needs to be
4102 initialized to 0 now, not to NULL. All other references to
4103 avl_traverser were updated in the same way.
4105 * tokens.h: Macro version of id_match updated to use const
4108 * val-labs.c: (inc_ref_count) New function.
4109 (copy_value_labels) Simply through use of new avl_copy() function.
4111 Wed Apr 15 13:01:58 1998 Ben Pfaff <blp@gnu.org>
4113 * crosstabs.q: Probably doesn't compile. New PIVOT subcommand.
4114 (postcalc) Worked on this.
4116 * postscript.c: (OPO_DOUBLE_LINE) New enum.
4117 (struct ps_driver_ext) New line_width_thick member.
4118 (ps_preopen_drive) Init line_width_thick.
4119 (option_tab[]) Add line-* options.
4120 (ps_option) Parse line-* options.
4121 (postopen) Add line_width_thick support. Strip leading spaces on
4122 prologue output lines.
4123 (ps_open_page) Include line_width_thick in output.
4124 (macro dump_thick_line) New.
4125 (dump_fancy_line) Support thick lines as well as double lines.
4127 Tue Apr 14 00:50:08 1998 Ben Pfaff <blp@gnu.org>
4129 * Makefile.am: Add crosstabs.c to BUILT_SOURCES. Add crosstabs.q
4130 to pspp_SOURCES. Add crosstabs.q to EXTRA_DIST.
4132 * Many source files: Rename `options' to `pv_opts' as appropriate.
4134 * command.c: (static var cmd_table[]) Add CROSSTABS command.
4136 * common.c: (xcalloc) New function.
4138 * crosstabs.q: New file. Not finished yet, though.
4140 * data-list.c: Comment fix.
4142 * error.c: Remove some old Checker cruft.
4144 * frequencies.q: (dump_full) Cumulate valid percent instead of
4147 * getline.c: Comment fix.
4149 * hash.c: Comment fixes.
4151 * hash.h: (struct hsh_table) Make hash functions return unsigned
4152 instead of int to avoid problems with taking the modulo of
4153 negative return values. All references changed.
4155 * misc.c: (intlog10) Make its table static const instead of auto.
4157 * sfm-read.c: (read_header) Make `prefix' static const instead of
4160 * var.h: (union value) Add member `hash'.
4161 (struct variable) Rename prv_index as `foo'--all references
4163 (typedef pv_opts) Removed. All references changed.
4165 * vars-prs.c: (parse_variables) Message fixes.
4167 Mon Mar 9 15:35:08 1998 Ben Pfaff <blp@gnu.org>
4169 * get.c: (cmd_match_files) Don't reverse the order of FILEs as
4170 they are being inserted. Don't check for BY variables of
4171 different types. Discard variables if the active file isn't
4172 included in the merge.
4173 (mtf_processing) Essentially rewritten.
4174 (mtf_merge_dictionary) Check for master/slave variables of
4175 different types/widths.
4177 * vfm.c: (static var not_canceled) New var.
4178 (process_active_file) Don't call vfm_source->read() if
4179 there's no vfm-source. Initialize not_canceled.
4180 (process_active_file_write_case) Honor and update not_canceled.
4181 (prepare_for_writing) Rollback changes from yesterday, they were
4183 (close_active_file) Don't destroy vfm_source unless it exists.
4185 Mon Mar 9 00:56:16 1998 Ben Pfaff <blp@gnu.org>
4187 * Lots of source files: Added { } around nested if/else constructs
4188 to avoid new gcc 2.8 warnings.
4190 * data-in.c: (parse_Z) Declare `int' type explicitly.
4193 * get.c: (struct mtf_file) Add prev, next_min, by, input members.
4194 (cmd_match_files) Initialize mtf_by_values. Manage by, input,
4195 prev members. Put TABLEs at the end of the chain and FILEs at the
4196 beginning. Don't allow the active file in STATE_INIT. Use proper
4197 `seen' value for the active file. Fill out the by members and
4198 make sure they're of consistent type. Do the actual merge
4200 (mtf_processing_finish) New function.
4201 (var_type_description) New function.
4202 (mtf_free_file) New function.
4203 (mtf_free) Rewritten.
4204 (mtf_delete_file_in_place) New function.
4205 (mtf_read_nonactive_records) New function.
4206 (mtf_compare_BY_values) New function.
4207 (static var mtf_seq_no) New var.
4208 (mtf_processing) New function.
4209 (mtf_merge_dictionary) Assign nval members for the system file
4210 dictionary. Assign fv values for its variables. Point each slave
4211 variable to the corresponding master variable.
4213 * hash.c: Include str.h.
4215 * mis-val.c: (copy_missing_values) src arg is const.
4217 * misc.c: (spacing) Make `max' var explicitly int.
4219 * sfm-read.c: (dump_dictionary) Message reformatting.
4220 (sfm_read_case) Add assertion.
4222 * sort.c: Esthetic fixes.
4224 * var.h: (struct match_files_proc) New struct.
4225 (struct variable) Add private data match_files_proc.
4227 * vars-atr.c: (delete_variable) Implement. Add argument for the
4228 dictionary that owning the variable.
4229 (dup_variable) Add assertion.
4231 * vfm.c: Comment fixes, hopefully the comments are correct now.
4232 (process_active_file) New function.
4233 (process_active_file_write_case) New function.
4234 (process_active_file_output_case) New function.
4235 (prepare_for_writing) Use temp_dict->nval for vfm_info, not
4237 (write_case) Renamed procedure_write_case(). Now write_case is a
4238 pointer to a function. Style fixes.
4240 1998-03-05 Ben Pfaff <blp@gnu.org>
4242 * Makefile.am: (q2c) Link with libmisc.
4243 (version.c) Define default_config_path, include_path,
4246 * ascii.c: (ascii_postopen_driver) When the default newline string
4247 is requested, open file in text mode. Suggested by
4248 palme@uni-wuppertal.de (Hubert Palme).
4249 (static vars line_buf, line_p) Change from char * to unsigned char
4251 (ascii_close_page) char * to unsigned char *.
4253 * cmdline.c: (parse_command_line) Implement -r option by
4254 prepending ~/.pspp/rc to the list of files to process.
4256 * command.c: (cmd_remark) Reset getl_prompt to the standard prompt
4257 before pulling in a final line.
4258 (null_func, null_int_func) Removed (dead code).
4260 * descript.q: (display) Calculate width of variable name column
4261 properly. Calculate number of valid cases properly. Reported by
4262 palme@uni-wuppertal.de (Hubert Palme).
4264 * filename.c: (init_filename) Use default_config_path instead of
4265 now obsolete CONFIG_PATH.
4267 * getline.c: (getl_initialize) Use include_path instead of now
4268 obsolete INCLUDE_PATH.
4269 (getl_add_file) New argument `where'. All references changed.
4271 * groff.c: (find_font_file) Use groff_font_path instead of now
4272 obsolete GROFF_FONT_PATH.
4274 * postscript.c: (find_ps_file) Use groff_font_path instead of now
4275 obsolete GROFF_FONT_PATH. Copy through temporary variable to
4276 avoid problems with constness.
4278 * str.h: (macro cs_streq) New macro.
4280 * version.h: (glob var default_config_path, include_path,
4281 groff_font_path) New vars.
4283 1998-02-23 Ben Pfaff <blp@gnu.org>
4285 * Many source files: Change verbose_msg() priority levels and
4288 * aggregate.c: Include debug-print.h.
4290 * cmdline.c: (parse_command_line) Add --safer/-s and --command/-c
4292 (static var pre_syntax_message) Document --safer/-s and
4295 * command.c: (cmd_erase, cmd_host) Disable if set_safer is set.
4297 * dfm.c: (open_inline_file) [__CHECKER__] Zero out ext->file,
4298 because it's not used but it's still copied.
4299 (open_file_r) Remove gratuitous debug message.
4301 * filename.c: (safety_violation) New function.
4302 (open_file) Remove gratuitous debug messages. Don't allow pipe
4303 files if set_safer is set.
4305 * get.c: Turn off debugging.
4307 * getline.c: (getl_add_virtual_file) New function.
4308 (getl_read_line) Add verbose_msg() call for opening new syntax
4310 (getl_perform_delayed_reset) Add a return value describing whether
4311 any action was taken. Call reset_eof().
4313 * getline.h: Comment fix.
4315 * groff-font.c: (groff_read_font) Use `goto next_iteration' in
4316 place of incorrect `continue'. Use strtok_r() instead of
4317 strtok(). Always check strtok_r() return value.
4318 (groff_read_DESC) Use strtok_r() instead of strtok().
4320 * lexer.c: (reset_eof) New function.
4322 * main.c: (parse) Get a token after performing a delayed reset
4323 action; allow empty syntax files.
4325 * postscript.c: (output_encodings) Use strtok_r() instead of
4328 * q2c.c: (dump_parser) Use strtok_r() instead of strtok().
4330 * set.q: Comment fixes.
4331 (glob var set_safer) New var.
4332 (internal_cmd_set) Support SAFER.
4334 * str.h: [!HAVE_STRTOK_R] Declare strtok_r() prototype.
4336 * temporary.c: (free_dictionary) Set d->splits to NULL after
4339 * vars-atr.c: (clear_variable) Decrement dict->n_splits if
4340 variable deleted, not if it *isn't* deleted.
4342 1998-02-16 Ben Pfaff <blp@gnu.org>
4344 * command.c: (array cmd_table[]) Add MATCH FILES.
4346 * common.c: Comment fixes.
4348 * data-list.c, dfm.c, error.c, filename.c, list.q, matrix-data.c,
4349 modify-vars.c, postscript.c, sfm-read.c, sfm-write.c, tab.c:
4350 Include alloca.h. Problem reported by palme@uni-wuppertal.de
4353 * expr-opt.c: Include str.h. Problem reported by
4354 palme@uni-wuppertal.de (Hubert Palme).
4356 * get.c: (cmd_get) [DEBUGGING] Update v->p.get to v->get.
4357 (static var mtf_by) Change from char ** to variable **.
4358 (static var mtf_master) New var.
4359 (mtf_merge_dictionary) New function.
4360 (cmd_match_files) Init mtf_master. Parse mtf_by according to new
4361 var type. Reorder tests properly. Initialize file->dict. Detect
4362 TABLE= without BY=. Read file dictionaries and merge them. Give
4363 subcommand name with IN, LAST, FIRST error messages. Create IN,
4364 LAST, FIRST variables. Comment fixes.
4365 (mtf_free) Don't free default_dict. Free mtf_master.
4367 * getline.c: Define getl_mode. Change getl_buf_size to size_t
4369 (handle_line_buffer) Cast int to size_t in comparison to avoid
4372 * getline.h: Declare getl_mode extern.
4374 * groff-font.c: (groff_read_font) Type-fix calls to getline.
4375 (groff_read_DESC) Make line_size a size_t.
4376 (match_tok) Parenthesize name to avoid macro expansion.
4378 * mis-val.c: (copy_missing_values) New function.
4380 * postscript.c: (postopen) Make buf_size a size_t.
4382 * sfm-read.c: (dump_dictionary) Make global from static. Print
4383 variable info in parts for easier debugging with Checker.
4385 * temporary.c: (copy_variable) Use copy_value_labels().
4386 (new_dictionary) New arg: whether to copy file label, documents.
4388 * val-labs.c: (copy_value_labels) New function.
4390 * var.h: (enums MISSING_*) Add MISSING_COUNT.
4392 * vars-atr.c: [GLOBAL_DEBUGGING] (force_dup_variable) New
4394 (dup_variable) Set prv_index, get.fv, get.nv.
4396 Fri Feb 13 15:38:36 1998 Ben Pfaff <blp@gnu.org>
4398 * Makefile.am: (pspp_SOURCE) Add htmlP.h.
4400 * Many source files: For ANSI-compliance, add empty statement
4401 after label. Reported by palme@uni-wuppertal.de (Hubert Palme)
4402 and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
4404 * data-in.c: (parse_numeric) Some header files break on
4405 -DBL_MIN_10_EXP because they get a --; add () for safety.
4406 Reported by palme@uni-wuppertal.de (Hubert Palme).
4408 * dfm.c: Idea by Dr Eberhard W Lisse <el@linux.lisse.na>.
4409 (struct dfm_fhuser_ext) Change `file' from FILE * to file_ext.
4410 (dfm_close) Use close_file_ext.
4411 (open_inline_file) Set file.file to NULL, not file.
4412 (open_file_r, open_file_w) Initialize file.file; fill in file_ext
4413 struct and use open_file_ext().
4414 (read_record) Use file.file.
4416 * file-handle.q: (prepend_current_directory) Pass through special
4419 * filename.c: Only include unistd.h if HAVE_UNISTD_H.
4420 (normalize_filename) Pass through special filenames.
4421 (open_file, close_file) Accept pipe| and |pipe syntaxes as
4423 (dirname) Rename blp_dirname() because of name conflict on some
4424 OS. All references changed. Reported by palme@uni-wuppertal.de
4426 (is_special_filename) New function.
4428 * get.c: (GTSV_OPT*) Add GTSV_OPT_MATCH_FILES.
4429 (trim_dictionary) Conditionalize some of the options on whether
4430 GTSV_OPT_MATCH_FILES is in *options.
4431 (rename_variables) Don't allow variables to be renamed as scratch
4433 (MTF_*) New enum series.
4434 (struct mtf_file) New struct.
4435 (static vars mtf_head, mtf_tail, mtf_by, mtf_n_by, mtf_free) New
4437 (cmd_match_files, mtf_free) New functions.
4439 * lexer.c: (match_int) Needed parentheses around name to escape
4440 macro expansion. Reported by Micah Altman
4441 <maltman@www-vdc.fas.harvard.edu>.
4443 * print.c: Needed to include alloca.h. Reported by Micah Altman
4444 <maltman@www-vdc.fas.harvard.edu>.
4446 * recode.c: (convert_to_double) Parenthesize -DBL_MIN_10_EXP to
4447 -(DBL_MIN_10_EXP). Reported by palme@uni-wuppertal.de (Hubert
4450 * str.h: Include stdarg.h. Reported by palme@uni-wuppertal.de
4451 (Hubert Palme) and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
4453 Thu Feb 5 00:18:21 1998 Ben Pfaff <blp@gnu.org>
4455 * html.c: (struct html_driver_ext) Move into htmlP.h.
4456 (html_preopen_driver) Initialize cp_x, cp_y.
4457 (html_submit) Implement as call to output_tab_table().
4458 (change_attributes) New function.
4459 (escape_string) New function.
4460 (output_tab_table) New function.
4462 * list.q: (write_all_headers) Add code for writing headers for the
4464 (clean_up) Write out the html close-table tag.
4465 (determine_layout) Ignore html driver.
4466 (list_cases) Write html data.
4468 * som.c: (som_submit) Move more of the code into output_table().
4470 * tab.c: (static var hit) Make a global var and rename tab_hit.
4471 (static var tab_table_class) Make a global var.
4473 * htmlP.h: New file.
4475 Tue Feb 3 16:12:18 1998 Ben Pfaff <blp@gnu.org>
4477 * dump-sysfile.c: Removed.
4479 * html.c: (preclose) Change comment in emitted code.
4481 * matrix-data.c: Debugging off by default. Comment fixes.
4482 (static var container) New var.
4483 (cmd_matrix_data) Create and destroy container. Initialize
4484 is_per_factor[] to 0s. Move code into new function
4485 string_to_content_type(). Require split values to be present in
4486 the data when ROWTYPE_ is explicit. Call specific function, not
4487 general read_matrices().
4488 (string_to_content_type) New function.
4489 (context) Exclude all whitespace, not just spaces.
4490 (mget_token) A dot is a number. Add assertion.
4491 (static var data) Renamed nr_data.
4492 (static var factor_values) Renamed nr_factor_values.
4493 (read_matrices) Renamed read_matrices_without_rowtype(). Handle
4494 only specific case. Close data_file before exit.
4495 (fill_matrix) New function.
4496 (read_data_lines) Renamed nr_read_data_lines(). Remove debug
4497 printing. Style fixes. Message fixes. Move code into
4499 (read_matrices_without_rowtype) Rename
4500 matrix_data_read_without_rowtype(). Fix off-by-one error on
4501 loops. Allocate nr_data[] memory from arena.
4502 (read_matrices_with_rowtype) Removed.
4503 (read_splits) Renamed nr_read_splits(). Style fixes.
4504 (read_factors) Renamed nr_read_factors().
4505 (dump_cell_content) Comment fixes. Arguments changed. Change
4506 debug printing. All references changed.
4507 (output_data) Renamed nr_output_data().
4508 (static var wr_content) New var.
4509 (struct factor_data) New struct.
4510 (static var wr_data) New var.
4511 (static var wr_current) New var.
4512 (matrix_data_source_destroy_source) Removed.
4513 (read_matrices_with_rowtype) New function.
4514 (matrix_data_read_with_rowtype) New function.
4515 (wr_read_splits) New function.
4516 (compare_factors) New function.
4517 (wr_output_data) New function.
4518 (wr_read_rowtype) New function.
4519 (wr_read_factors) New function.
4520 (wr_read_indeps) New function.
4521 (glob var matrix_data_source) Make destroy_source member NULL as
4524 Fri Jan 23 00:09:08 1998 Ben Pfaff <blp@gnu.org>
4526 * lexer.c: (syntax_error) Give better error message when at end of
4529 * matrix-data.c: (var content_names[]) Fix PROX spelling. Change
4530 N_SCALAR to output as plain N.
4531 (mdump_token) Change output format.
4532 (context) Fix message output interaction with spaces in input.
4533 (another_token) New function.
4534 (force_eol) Improved error message.
4535 (static var max_cell_index) New var.
4536 (read_matrices) Init `cells'. factor_values is now per-cell.
4537 Init max_cell_index.
4538 (read_data_lines) Replace `compare' local with new `compare' arg.
4539 Debugging messages changed. Only read factors if per_factor.
4540 Propagate error return from read_factors(), force_eol().
4541 Copy N_SCALAR values across the N vector.
4542 (read_matrices_without_rowtype) Don't init `cells'. Don't need to
4543 check parentheses manually since we now have is_per_factor[].
4544 Call read_data_lines() with new args. Check for end of data after
4545 looping, using another_token().
4546 (read_factors) Arguments changed. Use max_cell_index to determine
4547 whether to read or compare factors. Message fixes.
4548 (dump_cell_content) New function.
4549 (output_data) Completely rewritten because content types were
4550 supported to be nested inside factor values, not vice versa.
4552 Thu Jan 22 00:26:38 1998 Ben Pfaff <blp@gnu.org>
4554 * lexer.c: (syntax_error) Support formatted varargs messages.
4556 * matrix-data.c: Turn debugging on by default.
4557 (static content_type[]) New array.
4558 (static content_names[]) New array.
4559 (static rowtype_, varname_) New vars.
4560 (static is_per_factor[]) New array.
4561 (static split_values) Moved declaration.
4562 (static n_continuous, first_continuous) New var.
4563 (cmd_matrix_data) Don't init split_values. Assign ROWTYPE_ to
4564 rowtype_. Simplify SPLIT code. Init is_per_factor[]. Assign
4565 VARNAME_ to varname_. Initialize first_continuous, n_continuous.
4566 Check for continuous variables.
4567 [DEBUGGING] (debug_print) Remove content_names[].
4568 (mdump_token) New macro.
4569 (mget_token_dump) New function.
4570 (mdump_token) New function.
4571 (context) New function.
4572 (mget_token) Fix messages.
4573 (static var data, split_values, factor_values) New vars.
4574 (read_matrices) Manage split_values, factor_values.
4575 (read_data_lines) New function.
4576 (read_matrices_without_rowtype) Implemented.
4577 (read_splits) Message fixes. Uses `just_read'.
4578 (read_factors) New function.
4579 (output_data) New function.
4580 (matrix_data_source_destroy_source) Close the file handle.
4581 (glob var matrix_source) Change name from "DATA LIST" to "MATRIX
4584 * str.c: (strpadcmp) Removed.
4586 * vfm.c: (dump_splits) Initialize i; fix test for end of splits.
4588 Sun Jan 18 00:30:59 1998 Ben Pfaff <blp@gnu.org>
4590 * Lots of source files: Add cast to unsigned character to calls to
4591 tolower() and toupper().
4593 * aggregate.c: Set default_dict.splits to NULL.
4595 * command.c: (static variable tab[]) Add MATRIX DATA.
4597 * data-in.c: Add debugging defines. Formatting fixes.
4599 * expr-opt.c: Formatting fixes.
4601 * lexer.c: (syntax_error) Message fixes.
4603 * matrix-data.c: New enum series.
4604 (static vars fmt, section, diag, explicit_rowtype, signle_split,
4605 split_values, n_factors, factors, cells, pop_n, contents,
4606 n_contents) New vars.
4607 (cmd_matrix_data) Finished implementation.
4608 (compare_variables_by_mxd_vartype) New function.
4609 [DEBUGGING] (debug_print) New function.
4610 (static vars mtoken, mtokstr, mtoklen, mtokval) New vars.
4611 (read_matrices) New function.
4612 (read_matrices_without_rowtype) New function.
4613 (read_matrices_with_rowtype) New function.
4614 (read_splits) New function.
4615 (mget_token) New function.
4616 (force_eol) New function.
4617 [0] (test_tokenizer) New function.
4618 (matrix_data_source_destroy_source) New function.
4619 (glob var matrix_data_source) New var.
4621 * misc.h: Include ieeefp.h if present.
4623 * split-file.h: (cmd_split_file) Changes corresponding to struct
4626 * str.h: Fix memmem prototype.
4628 * temporary.c: (save_dictionary, restore_dictionary,
4629 free_dictionary) Changes corresponding to struct dictionary
4632 * var.h: (MXD_* enums) New enum series.
4633 (struct matrix_data_proc) New struct.
4634 (struct split) Removed.
4635 (struct dictionary) Changed `splits' member from `split *' to
4637 (macro force_create_variable) New macro. Replaced lots of
4638 create_variable()/assert() calls with calls to this macro.
4640 * vars-atr.c: (discard_variables) Changed assertion.
4641 [GLOBAL_DEBUGGING] (force_create_variable) New function
4642 called by the macro of the same name.
4643 (clear_variable) Changes to delete splits from the dictionary
4644 corresponding to struct dictionary changes.
4646 * vars-prs.c: (parse_variables) [GLOBAL_DEBUGGING] Check for
4647 corrupted variable `index' values in the dictionary passed in
4648 every time this function is called.
4650 * vfm.c: (dump_splits, SPLIT_FILE_procfunc) Changes corresponding
4651 to struct dictionary changes.
4653 Tue Jan 13 23:45:02 1998 Ben Pfaff <blp@gnu.org>
4655 * Makefile.am: (pspp_SOURCES) Add matrix-data.c.
4657 * command.c: New includes.
4658 (static array cmd_table[]) Add ERASE, HOST, NEW FILE.
4659 (cmd_erase) New function.
4660 [unix] (shell) New function.
4661 (run_command) New function.
4662 (cmd_host) New function.
4663 (cmd_new_file) New function.
4665 * expr-prs.c: (parse_primary) Message fix.
4667 * inpt-pgm.c: Formatting fix.
4668 (cmd_reread) Implement the FILE subcommand.
4670 * matrix-data.c: New file.
4672 * q2c.c: (dump_header) Change output commenting style.
4674 * weight.c: Comment fix.
4676 Tue Jan 13 00:53:39 1998 Ben Pfaff <blp@gnu.org>
4678 * aggregate.c: (buf64_10x) Renamed buf64_1xx, all references
4680 (buf_10x) Renamed buf_1xx, all references changed.
4681 (cmd_aggregate) Implemented cases 010, 011, 110, and 111 (all
4682 cases now implemented).
4683 (create_sysfile) New function.
4684 (agr_11x_func) New function.
4686 * data-in.c: (parse_numeric) Work properly if there's an
4687 explicitly coded decimal point in the data and decimal places are
4688 specified on DATA LIST. Bug reported by Dr Eberhard W Lisse
4689 <el@linux.lisse.na>.
4691 * get.c: (cmd_get, cmd_save_internal) Allow extraneous slash
4692 before file specification on GET, SAVE, XSAVE. Bug reported by Dr
4693 Eberhard W Lisse <el@linux.lisse.na>.
4695 * q2c.c: [!HAVE_STRERROR] Include misc/strerror.c, not
4696 strerror.c. Bug reported by Alexandre Oliva
4697 <oliva@dcc.unicamp.br>.
4699 * sort.c: Include sort.h. Comment fixes. A few esthetic fixes.
4700 (static var separate_case_tab) New var.
4701 (cmd_sort_cases) Cancel temporary transformations here. Free
4702 v_sort before return.
4703 (sort_cases) Run an EXECUTE procedure if SEPARATE is nonzero and
4704 we're reading from a sort stream. Don't cancel temporary
4705 transformations. Offload internal sorting to do_internal_sort().
4706 (do_internal_sort) New function. Handles internal sorting even
4707 when SEPARATE is nonzero. Doesn't free v_sort.
4708 (do_external_sort) Take new arg SEPARATE. Only destroy `x' if
4710 (write_initial_runs) Take new arg SEPARATE. Only destroy the old
4711 sink if SEPARATE is zero.
4712 (read_output_cases) Renamed read_sort_output(), all references
4713 changed. Now uses separate_case_tab when it exists.
4714 (write_separate) New function.
4716 * vfm.c: (page_to_disk) Destroy memory_source_cases, not
4717 memory_sink_cases. Don't redundantly call
4718 vfm_source->destroy_source().
4719 (memory_stream_mode) After switching over, set memory_sink_cases
4722 Sat Jan 10 23:35:51 1998 Ben Pfaff <blp@gnu.org>
4724 * aggregate.c: (struct agr_var) Expand dbl[] array from 2 to 3
4726 (static var prev_case) New, moved out of aggregate_single_case()
4728 (static var buf64_10x, buf_10x) New.
4729 (cmd_aggregate) Initialize prev_case. Comment fixes. Implement
4730 the 000, 001, 100, and 101 cases. Free prev_case.
4731 (parse_aggregate_functions) Disallow scratch variables.
4732 (free_aggregate_functions) Only free agr_dict if non-null. Use
4733 iter->function to determine numeric/string type, not
4735 (aggregate_single_case) Don't manage prev_case. Initialize
4736 aggregate info after dumping it.
4737 (accumulate_aggregate_info) Fix sum, weighted sum, mean, weighted
4738 mean, stddev, weighted stddev definitions.
4739 (dump_aggregate_info) Implemented.
4740 (initialize_aggregate_info) Renamed from
4741 initialize_aggregate_functions(). Initializes dbl[2].
4742 (agr_00x_trns_proc, agr_00x_end_func, write_case_to_sfm,
4743 agr_10x_trns_proc, agr_10x_trns_free, agr_10x_end_func) New.
4745 * cases.c: (alloc_val) Removed.
4747 * get.c: (cmd_save_internal) Initialize new `dict' member.
4749 * sfm-write.c: (sfm_write_dictionary, write_header,
4750 write_variable, write_value_labels, write_documents) Reorganize,
4751 simplify for new parameter structure.
4752 (write_variable) Only one variable * argument now.
4754 * sfm.h: (struct sfm_write_info) Removed `pri', `sec', and
4755 replaced by new `dict' member.
4757 * temporary.c: (new_dictionary) Initialize n_documents.
4759 * vars-atr.c: (dup_variable) Allocate `value's from dict into
4761 (init_variable, replace_variable) Eliminate usage of alloc_val().
4763 * vars-prs.c: (parse_DATA_LIST_vars) Accept PV_NO_SCRATCH option.
4765 * vfm.c: (arrange_compaction) Allow `temporary' value of 2 to
4766 signal that AGGREGATE is to be used for forming final cases.
4767 (close_active_file) Call end_func before stopping lagging. Cancel
4768 temporary after finishing compaction.
4769 (write_case) Comment fixes. Cleaned up.
4770 (compact_case) Let AGGREGATE handle compaction when `temporary' is
4773 Sat Jan 10 02:10:47 1998 Ben Pfaff <blp@gnu.org>
4775 * Makefile.am: (BUILT_SOURCES) Add means.c.
4776 (pspp_SOURCES) Add means.c.
4777 (EXTRA_DIST) Add means.q.
4779 * command.c: (array cmd_table[]) Add MEANS.
4781 * common.h: Esthetic fixes. Comment fixes. Test for
4782 MAX_SHORT_STRING greater than 8.
4783 (macros LOWEST, HIGHEST) New.
4785 * data-in.c, data-list.c, recode.c: Comment fixes.
4787 * means.q: New file, base version.
4789 * mis-val.c: (parse_num_or_range, parse_numeric) Replace -DBL_MAX
4790 with LOWEST, DBL_MAX with HIGHEST.
4792 * q2c.c: (dump_vars) Add an enum to array types giving the number
4793 of values for the enum.
4795 * sfm-read.c: (sfm_read_dictionary, read_machine_flt64_info)
4796 Replace second_lowest_value with second_lowest_flt64.
4798 * sfm-write.c: (write_variable, write_rec_7_34) Replace
4799 second_lowest_value with second_lowest_flt64.
4801 * t-test.q: Comment fix.
4803 * temporary.c: (restore_dictionary) Esthetic fix.
4805 * tokens.h: (force_match_id, force_match, force_string, force_int,
4806 force_num, force_id) Replace msg() with syntax_error().
4808 * var.h: (struct means_proc) New.
4809 (struct variable) Add mns member to `p' union.
4811 * vars-prs.c: (parse_variable, parse_dict_variable,
4812 parse_variables, parse_DATA_LIST_vars) Replace msg() with
4815 Thu Jan 8 22:28:41 1998 Ben Pfaff <blp@gnu.org>
4817 * Makefile.am: (pspp_SOURCES) Add tab.h.
4819 * Most source files: Added a cast to unsigned char in usages of
4820 the ctype is*() functions. Replaced `end of command expected'
4821 calls to msg() with calls to syntax_error().
4823 * frequencies.q: (dump_condensed) Fix tab_dim() column reference.
4825 * lexer.c: (hex_val) Removed (was dead code).
4826 (idmatch) Parenthesize function name to avoid macro expansion.
4828 * postscript.c: Comment fixes.
4829 (ps_preopen_driver) Change default font size to 10pt.
4831 * sfm-read.c: (read_variables) Byteswap sv.print, sv.write as
4833 (parse_format_spec) Change system-file format spec argument type
4834 to int32. Parse the format spec with bitwise operators.
4836 * sfmP.h: (struct sysfile_format) Removed.
4837 (struct sysfile_variable) Changed print, write members from
4838 sysfile_format to int32.
4840 * tokens.h: Esthetic fixes.
4841 [__GNUC__] (macro id_match) New macro to hopefully speed up
4842 identifier matching.
4843 (macros match_id, match_tok, match_int) Implemented in
4844 compiler-independent manner; no longer GNU C only.
4846 * vfm.h: Include time.h.
4848 Mon Jan 5 11:06:15 1998 Ben Pfaff <blp@gnu.org>
4850 * data-list.c: (dump_fixed_table) Change tab_dim().
4852 * dump-sysfile.c: (open_sysfile) Fix mmap() call.
4854 * error.c: Include command.h.
4856 * frequencies.g: Formatting fixes.
4858 * frequencies.q: Add tab_dim() calls. Make the total cell a
4861 * glob.c: Include command.h.
4863 * sfm-read.c: (struct sfm_fhuser_ext) New members sysmis, highest,
4865 (sfm_read_dictionary) Initialize sysmis, highest, lowest.
4866 (sfm_read_machine_flt64_info) Update sysmis, highest, lowest.
4867 (read_variables) Byteswap sv.type; byteswap sv.print, sv.write as
4868 the other elements (is this right?).
4869 (read_variables) Use lowest, highest members.
4870 (parse_format_spec) New arg `vv' for more stringent checking.
4871 (dump_dictionary) Byteswaps nonexplicit data.
4872 (sfm_read_case) Byteswap numeric data.
4874 * som.c: Initialize table_num to 1.
4875 (render_segments) Remember to increment y_index after each table
4878 * sysfile-info.c: (cmd_sysfile_info) Change tab_dim(). Don't call
4879 avl_count() on a NULL tree. No title for the second table.
4880 (cmd_display) Handle DISPLAY VECTORS by calling display_vectors().
4881 Handle AS_SCRATCH as AS_NAMES. Warn if no variables. Re-enable;
4882 fix call to display_variables().
4883 (display_variables) Default to 4 columns, not 3. Set up headers.
4884 Column title is Variable, not Name. Fix index column.
4885 Add joint text. Add tab_dim(). Handle value labels properly.
4886 Handle DISPLAY LABELS properly. Draw boxes correctly.
4887 (describe_variable) Value labels don't need titles. Don't clear
4888 nonexistent index column.
4889 (compare_vectors_by_name) New function.
4890 (display_vectors) New function.
4892 * tab.c: (tab_height) Add assertion.
4893 (tab_null) Add debug code.
4894 (evaluate_dimensions) Add debug code.
4896 * var.h: (struct variable) get_proc data is sometimes used
4897 simultaneously with other per-procedure info, therefore it was
4898 removed from the union. All references changed.
4900 Sun Jan 4 18:13:33 1998 Ben Pfaff <blp@gnu.org>
4902 * ascii.c: (ascii_close_page) Put title on second line of headers
4903 if there is no subtitle.
4905 * command.c: (glob var cur_proc) Move definition here, from
4907 (cmd_remark) Emit blank line before remarks.
4909 * command.h: (glob var cur_proc) Move declaration here, from
4912 * data-list.c: (dump_fixed_table) Fix messages.
4913 (dump_free_table) Call tab_nat_dim().
4915 * descript.q: (dump_z_table) Modify tab_dim() call.
4917 * frequencies.q: (dump_condensed, dump_statistics) Add tab_dim()
4919 (dump_statistics) Don't output header.
4921 * groff-font.c: Minor format fix.
4923 * html.c: Comment fix.
4925 * list.q: (write_varname) Indent after advancing page.
4927 * output.h: Minor reordering.
4929 * postscript.c: Comment fixes. Many places, '\n' was replaced by
4930 a reference to eol[].
4931 (struct ps_driver_ext) New member eol[].
4932 (ps_preopen_driver) Initialize eol[].
4933 (ps_postopen_driver) Fix sense of text for text_opt, line_opt
4934 defaults. Handle headers. Fix test for minimum page length.
4935 (static var option_tab[]) Add `line-ends'.
4936 (ps_option) Handle line-ends to change eol[].
4937 (postopen) Scale prop_em_width and fixed_width properly. Set the
4938 prologue title to outp_title if applicable. Replace the prologue
4939 line ends with eol[]. Call draw_headers() if headers are enabled.
4940 (text_width) New function.
4941 (out_text_plain) New function.
4942 (draw_headers) New function.
4944 * print.c: (dump_table) Call tab_nat_dim().
4946 * som.c: (som_blank_line) Only advance a line if not at the top of
4948 (som_submit) Move several informational table calls here.
4949 Increment subtable_num if SOMF_NO_TITLE not set.
4950 (output_table) Advance a line if SOMF_NO_SPACING not set.
4951 (render_columns, render_segments, render_simple) Handle spacing
4952 between tables. Handle table titles. Remove debug output.
4954 * som.h: (SOMF_*) New enum series.
4955 (struct som_table_class) New member `flags'.
4957 * sysfile-info.c: (cmd_sysfile_info) Calls tab_nat_dim(). No
4959 (display_variables) Calls tab_nat_dim().
4960 (describe_variable) Remove restriction on number of value labels.
4961 Make value labels separated by thin lines.
4963 * tab.c: (tab_create) Default `flags' to none.
4964 (tab_float) New arg `w'. All references changed.
4965 (tab_nat_dim) New function.
4966 (tab_output_text) No title or spacing.
4967 (tab_flags) New function.
4968 (tabi_flags) New function.
4969 (tabi_title) New function.
4970 (strip_height) Removed.
4971 (tabi_render) Skip title when necessary.
4972 (static var tab_tab_class) Add tabi_flags, tabi_title.
4973 (evaluate_dimensions) Disable display of column, row size.
4974 (sum_columns) Add title height to top header.
4975 (render_strip) Moved within file.
4977 * tab.h: (struct tab_table) New member `flags'.
4979 * vfm.c: (dump_splits) Calls tab_nat_dim(). No title.
4981 Sat Jan 3 16:55:44 1998 Ben Pfaff <blp@gnu.org>
4983 * Most source files: Add `const' attribute in all appropriate
4986 * sysfile-info.c: (cmd_sysfile_info) Add tab_dim() call, add a
4987 column to the variables table for use by describe_variable().
4988 (cmd_display) Disable for the present.
4989 (display_documents) Don't wrap documents.
4990 (display_variables) Table has four columns now.
4991 (describe_variable) Table has four columns now. Don't use a
4992 subtable, use joined cells instead.
4994 * tab.c: (tab_create) Don't set `join'.
4995 (tab_realloc) ct array is not made up of a_string's.
4996 Reallocate trh, hrh, h arrays, initialize trh array. Initialize
4997 cell contents on GLOBAL_DEBUGGING, not DEBUGGING.
4998 (text_format) New function.
4999 (tab_title) Rewritten, uses text_format().
5000 (tab_text) Rewritten, uses text_format().
5001 (tab_joint_text) New function.
5003 (static var hit) New variable.
5004 (render_strip) New args r1, r2. Implement joined cells that fit
5006 (tabi_render) Increment hit. Pass new args to render_strip().
5007 (evaluate_dimensions) [GLOBAL_DEBUGGING] Check for uninitialized
5008 cells. For t_naw and t_nah, ignore joined cells and null cells in
5011 * tab.h: (struct tab_join_rect) Removed.
5012 (struct tab_table) Removed `join'.
5013 (TAB_JOIN_MAIN) Removed.
5014 (struct tab_joined_cell) New struct.
5015 (TAT_NOWRAP) New enum.
5017 Fri Jan 2 01:39:58 1998 Ben Pfaff <blp@gnu.org>
5019 * ascii.c: (ascii_postopen) Replace ASCII_* macros with their
5021 (ascii_postopen_driver) Fix initialization of *_spacing so that
5022 the TAL_0 bit doesn't count.
5024 * data-list.c: (dump_fixed_table) Use natural width for Format
5027 * glob.c: (rerange) Removed.
5028 (get_date) Formatting fixes. Internationalization fix.
5030 * html.c: (html_postopen_driver) Replace HTML_DEFAULT_OUTPUT_FILE
5033 * postscript.c: (ps_postopen_driver) Replace
5034 PS_DEFAULT_OUTPUT_FILE with "pspp.ps".
5036 * som.c: (som_submit) Don't eject page before every table.
5037 (output_table) Fix order of arguments on call to area().
5038 (render_columns) Fix calculation of max_len.
5040 * tab.c: (tabi_cumulate) Minor change to increase elegance.
5041 (render_strip) New function.
5042 (strip_height) New function.
5043 (tabi_render) Rewrite as calls to render_strip().
5045 * tab.h: (TAT_* enums) Removed TAT_RICH, all references removed.
5046 Renumbered TAT_PRINTF, TAT_TITLE, TAT_FIX to correspond better
5047 with the TAB_* and OUTP_T_* constants.
5049 Thu Jan 1 11:53:52 1998 Ben Pfaff <blp@gnu.org>
5051 * Makefile.am: Formatting fixes.
5053 * ascii.c: (ascii_postopen_driver) Initialize *_line_spacing[],
5056 * data-list.c: (dump_fixed_table) Add tab_dim() call.
5058 * descript.q: (dump_z_table, display) Add tab_dim() calls.
5060 * dump-sysfile.c: (glob var length) Make type off_t.
5061 (usage) Fix arguments.
5064 * output.h: (OUTP_T_*) Change constants' value to match tab.h.
5065 Now right-justification is the default so many references had to
5067 (struct outp_class) Removed line_width, all references changed.
5068 (OUTP_DEV_*) Add OUTP_DEV_DISABLED.
5069 (struct outp_driver) Add elements horiz_line_width,
5070 vert_line_width, horiz_line_spacing, vert_line_spacing. Remove
5073 * postscript.c: (outp_encodings) Formatting fixes. Fix garbage
5075 (postopen) Initialize all the informational members of
5078 * som.c: (som_blank_line) New function, renamed from blank_line(),
5079 all references changed.
5080 (som_submit) Disables drivers whose pages can't be opened.
5081 (render_columns, render_simple, render_segments) Add debug output.
5082 (render_columns) Fix loop range.
5083 (render_simple) Don't try to render the headers, they're taken
5084 care of automatically. Advance cp_y past the table when done.
5085 (render_segments) Fix loop ranges.
5087 * tab.c: Initialize new members of tab_table.
5088 (tab_vline) Handle trv[]; don't set style for spacing-only lines.
5089 (tab_hline) Handle trh[]; don't set style for spacing-only lines.
5090 (tab_box) Handle trh[], trv[]; don't set style for spacing-only
5093 (tab_dim) New function.
5094 (tab_col_width) Removed.
5095 (tab_row_height) Removed.
5096 (tab_output_text) Call tab_dim().
5097 (tabi_driver) Call evaluate_dimensions(), sum_columns().
5098 (tabi_area) Implemented.
5099 (tabi_cumulate) Implemented.
5100 (tabi_render) Partially implemented, but broken.
5101 (var tab_table_class) Made static.
5102 (evaluate_dimensions) New function.
5103 (sum_columns) New function.
5105 * tab.h: (enum t_*) Now start at t_end. New: t_ptw, t_nr, t_nc,
5106 t_nah, t_naw, t_neg, t_xch, t_dup, t_lbl, t_jnz, t_sac, t_sar,
5107 t_scr, t_srr, t_sentinel. Removed: t_nat.
5108 (struct tab_table) New: wl, wr, ht, hb, trh, hrh, trv, wrv, dim,
5109 max_stack_height, w, h. Removed: ce, re.
5110 (macro blank_line) Removed.
5111 (glob var zero_length) Removed.
5113 Fri Dec 26 15:44:31 1997 Ben Pfaff <blp@gnu.org>
5115 * Most source files: include some of the new include files broken
5118 * Makefile.am: (pspp_SOURCES) Add all the new source files to the
5121 * aggregate.c: (glob var outfile) Make static.
5123 * command.c: (glob var pgm_state) Move here.
5125 * common.c: (glob vars endian, second_lowest_value, pgmname,
5126 finished, curdate, cur_proc, start_interactive, history_file) Move
5129 * descript.q: (structs dsc_z_score, descriptives_trns) Move here.
5131 * file-handle.q: (glob vars files, inline_file) Move here.
5133 * glob.c: Lost lots of glob vars, detailed in individual file
5135 (init_glob) set_printer, set_screen were obsolete, deleted.
5136 set_cprompt has fewer spaces because pspp has fewer letters than
5139 * inpt-pgm.c: (glob vars inp_init, inp_init_size) Move here.
5140 (inp_nval) Made static.
5142 * lexer.c: (glob vars token, tokval, tokstr, tokstr_size,
5143 tokstr_len, toklongstr, tokint) Move here.
5145 * misc.c: Lost several vars and functions.
5147 * set.q: (all the set_* variables) Move here.
5149 * str.c: (strmaxcpy, strbarepadcpy, strbarepadlencpy, strpadcpy,
5150 blpstrset, strpadcmp, memrev, memrmem, cmp_str) Move here from
5153 * tab.c: (set_expr, tab_col_width, tab_row_height) New functions.
5155 * tab.h: (enum series t_*) New enums.
5156 (struct tab_table) Use arena struct tag. New members ce, re.
5158 * tokens.h: Comment fixes.
5160 * var.h: Move lots of enums and variables and functions and
5161 structures to other files. Use and declare a lot more union and
5162 struct tags. Comment fixes.
5164 * vector.c: (glob vars vec, nvec) Move here.
5166 * vfm.c: (glob vars reinit_sysmis, reinit_blanks, init_zero,
5167 init_blanks, last_vfm_invocation) Move here.
5169 * cases.h: New file.
5170 (struct long_vec) Move here.
5171 (vec_init, vec_clear, vec_insert, vec_delete, devector, envector)
5174 * command.h: New file.
5175 (STATE_* enums) Move here.
5176 (glob var pgm_state) Move here.
5178 * format.c: New file.
5179 (glob var formats) Move here.
5180 (parse_format_specifier_name, fmt_to_string,
5181 check_input_specifier, check_output_specifier,
5182 check_string_specifier, convert_fmt_ItoO, parse_format_specifier)
5185 * format.h: New file. Move functions now in format.c here.
5186 (FMT_* enums) Move here.
5187 (struct fmt_desc) Move here.
5188 (FCAT_* enums) Move here.
5189 (struct fmt_spec) Move here.
5190 (glob vars formats, fmt_parse_ignore_error) Move here.
5192 * inpt-pgm.h: New file.
5193 (INP_* enums) Move here, make #defines into enums.
5194 (glob vars inp_init, inp_init_size) Move here.
5197 (glob vars v_sort, nv_sort) Move here.
5198 (sort_cases, read_sort_output) Move here.
5200 * vector.h: New file.
5201 (struct vector) Move here, add struct tag.
5202 (glob vars vec, nvec) Move here.
5203 (find_vector) Move here.
5206 (glob vars last_vfm_invocation, temp_case, reinit_sysmis,
5207 reinit_blanks, init_zero, init_blanks) Move here.
5208 (struct case_stream) Move here.
5209 (glob vars vfm_source, vfm_sink, vfm_memory_stream,
5210 vfm_disk_stream, sort_stream, data_list_source,
5211 input_program_source, file_type_source, get_source, n_lag) Move
5213 (procedure, write_case, lagged_case, compact_case, page_to_disk)
5216 Wed Dec 24 22:40:42 1997 Ben Pfaff <blp@gnu.org>
5218 * Makefile.am: (pspp_SOURCES) Added html.c, som.c, som.h.
5219 (LDADD) Add libdcdflib.
5221 * ascii.c: Comment and formatting fixes. Almost every external
5222 function had an assert added, checking driver_open and page_open.
5223 (ascii_init_driver) Broken into ascii_preopen_driver,
5224 ascii_postopen_driver, ascii_close_driver. Manages driver_open.
5225 (ascii_open_page) Sets page_open.
5226 (ascii_close_page) Clears page_open.
5228 * html.c: Comment and formatting fixes. Almost every external
5229 function had an assert added, checking driver_open and page_open.
5230 (html_init_driver) Broken into html_preopen_driver,
5231 html_postopen_driver, html_close_driver. Manages driver_open.
5232 (html_open_page) Sets page_open.
5233 (html_close_page) Clears page_open.
5234 (html_submit) Disabled.
5236 * lexer.c: (parse_string) Remove debugging printf.
5238 * list.q: (determine_layout) Open a page if one is not yet open.
5240 * output.c: Comment fixes.
5241 (add_class) Set the class member of the new list element.
5242 (parse_options) Don't handle device type.
5243 (colon_tokenize) New function.
5244 (configure_driver) New four-field format with a field for device
5245 type. Now initialize driver_open, page_open, next, and prev
5246 fields. Use new colon_tokenize() function. Don't do a memory
5247 copy to replace a driver, it doesn't work; instead delete the old
5248 driver and insert a new one.
5249 (destroy_driver) Don't call som_destroy_driver(). Close the page
5250 if it's open. Find the class in the list of classes and decrement
5251 that reference count. Remove the driver from the global driver
5253 (outp_iterate_enabled_drivers) Renamed outp_drivers(). All
5254 references changed. Rewritten. Don't return a driver that's not
5256 (outp_eject_page) All references to som_internal_eject_page()
5257 changed to use this. Sets cp_x to 0 as well as cp_y.
5259 * output.h: (OUTP_I_* enums) Removed.
5260 (struct som_submission_form) Removed.
5261 (struct outp_class) init_driver broken into preopen_driver,
5262 postopen_driver, and close_driver. submit changed to take a
5265 * postscript.c: Comment and formatting fixes. Almost every
5266 external function had an assert added, checking driver_open and
5268 (ps_init_driver) Broken into ps_preopen_driver,
5269 ps_postopen_driver, ps_close_driver. Manages driver_open.
5270 (ps_open_page) Sets page_open.
5271 (ps_close_page) Clears page_open.
5273 * som.c: New file, base implementation.
5275 * som.h: (struct som_table) Add struct tag.
5276 (enum SOM_COL_ACROSS) Removed.
5277 (SOM_ROWS, SOM_COLUMNS) New enums.
5278 (struct som_table_class) Add member `cumulate'. Remove `segment';
5279 change `render' arguments.
5280 (struct som_point, struct som_rect) Removed.
5281 (som_submit_table) Fixed typo, should have been som_submit.
5283 * sysfile-info: (describe_variable) Don't try to insert a
5284 subtable; just destroy it for now.
5286 * t-test.q: Include dcdflib/cdflib.h instead of cdflib.h. Fix
5287 references to value labels.
5289 * tab.c: (tab_destroy) New function.
5290 (tab_columns) Change argument.
5291 [0] (tab_submit) Remove dead code.
5292 (tab_title) Allocate string from the table's arena.
5293 (tab_output_text) Only free the buffer if we allocated it.
5294 (tab_submit) New function.
5295 (static vars t, d) New static vars.
5296 (tabi_table, tabi_driver, tabi_count, tabi_area, tabi_columns,
5297 tabi_headers, tabi_cumulate, tabi_render) New functions.
5298 (glob var tab_table_class) New global var.
5300 * tab.h: (struct tab_join_rect) Don't use a som_rect; directly
5301 encapsulate the rectangle. All references changed.
5303 Sun Dec 21 16:18:58 1997 Ben Pfaff <blp@gnu.org>
5305 * All header files updated to use struct tags in addition to
5306 typedefs for all structures. Don't use word `struct' in struct
5309 * Makefile.am: (pspp_SOURCES) Remove html.c.
5310 (INCLUDES) Replace the lib/* includes with a single lib/ include;
5311 all references updated.
5313 * command.c: (parse_cmd) Remove call to som_check_workspace.
5314 (output_line) Update to new som.
5316 * data-in.c: (parse_numeric) A single dot is not an error; it is
5317 the system-missing value.
5319 * data-list.c: (dump_fixed_table, dump_free_table) Update to new
5322 * data-out.c: Added `const' as appropriate to many prototypes.
5323 (convert_E, convert_F, convert_CCx) Take double argument instead
5324 of value * argument.
5325 (convert_format_to_string) Call changed functions appropriately.
5326 Instead of modifying the caller's value for FCAT_SHIFT_DECIMAL,
5327 make a local copy of the value.
5329 * descript.q: Remove custom_variables() prototype now provided by
5331 (custom_variables) Don't increment sbc_variables, the caller does
5333 (dump_z_table, display) Update to new som.
5335 * error.c: (vmsg) Add const to prototype. Remove code to handle
5336 `too many errors' condition.
5337 (check_error_count) New function.
5338 (msg) Add const to prototype.
5340 * filename.c: (open_file) Rewrite for elegance.
5342 * frequencies.q: Remove custom_*() prototypes now provided by q2c.
5343 (dump_full, dump_condensed, dump_statistics) Update for new som.
5345 * list.q: Don't include somP.h. Change all references to
5346 som_driver_ext to refer to the new members of som_driver. Change
5347 som_internal_eject_page() references to outp_eject_page().
5349 * main.c: (parse) Rewrite for elegance. Add call to
5350 check_error_count().
5352 * output.c: (add_class, outp_list_classes, outp_configure_driver)
5353 Rewrite or revise for new outp_driver_class_list structure.
5354 (outp_iterate_enabled_drivers) Fix comparison between disabled
5355 devices and current device type.
5356 (outp_eject_page) New function.
5358 * output.h: Comment fixes.
5359 (struct outp_driver) New members driver_open, page_open, cp_x,
5360 cp_y, font_height, prop_em_width, fixed_width. Deleted members
5362 (struct outp_driver_class_list) New struct.
5363 (outp_class_list) Changed to type outp_driver_class_list; all
5366 * print.c: (dump_table, print_trns_proc) Updated for new som.
5368 * q2c.c: (dump_vars) Simplify array subcommand code. Declare
5369 prototypes for custom subcommands.
5370 (dump_subcommand) Always include the `else'.
5371 (dump_parser) Fix comments in output code.
5373 * set.q: Reordered functions.
5375 * som-frnt.c, som-high.c, som-low.c, somP.h: Removed.
5377 * som.h: Rewritten from scratch.
5379 * str.h: Remove dead code.
5381 * tab.c, tab.h: New files, base implementation.
5383 * sysfile-info.c: (cmd_sysfile_info, describe_variable) Update to
5386 * t-test.q: New code from John Williams
5387 <johnr.williams@stonebow.otago.ac.nz>. Include math.h, cdflib.h.
5388 Many many new static vars and defines.
5389 (precalc, postcalc, g_postcalc, z_postcalc, t_pairs, t_groups,
5390 groups_calc, pairs_calc, z_dev_calc, z_calc) New functions.
5391 (struct value_list) New struct.
5392 (variance, covariance, pooled_variance, oneway, pearson_r, f_sig,
5393 t_crt, t_sig, print_t_groups) New functions.
5394 (cmd_t_test) Implemented.
5396 * temporary.c: (cancel_temporary) Only free the temp_dict if it's
5399 * vfm.c: (dump_splits) Update to new som.
5401 Thu Dec 4 23:02:22 1997 Ben Pfaff <blp@gnu.org>
5403 * Makefile.am: (fiasco_SOURCES) Add html.c.
5405 * aggregate.c: Base source.
5407 * ascii.c: (postopen, preclose) Reformat.
5409 * data-out.c, expr-evl.c: Comment fixes.
5411 * filename.c: (open_file) When opening a file for writing, use
5412 line buffering instead of full buffering for better interactive
5413 performance. Suggested by Valerio Aimale
5414 <valerio@svpop.com.dist.unige.it>. Also, recognize special file
5415 names `stdin', `stdout', `stderr'.
5417 * groff-font.c: Comment fixes.
5419 * html.c: New file; base version.
5421 * list.q: (write_all_headers, clean_up, determine_layout,
5422 list_cases) Ignore `special' devices for now. Needs to be fixed
5425 * output.c: (outp_init) Add html driver to list; reverse list
5428 * output.h: (struct outp_class_struct) New members `special',
5429 `submit'; comment fixes. All references changed.
5431 * postscript.c: (ps_init_driver) Make defaults for text_opt,
5432 line_opt depend on whether the OUTP_DEV_SCREEN bit is set on the
5434 (postopen) Comment fix.
5435 (preclose) Comment fixes, formatting fixes. Change x->file.file
5436 references to more proper f->file.
5438 * som-high.c: (som_submit_table) Special classes use their own
5441 * som.h: Comment fixes.
5443 * temporary.c: (new_dictionary) Don't try to xstrdup() a NULL
5446 Tue Dec 2 14:36:07 1997 Ben Pfaff <blp@gnu.org>
5448 * Makefile.am: (fiasco_SOURCES) Add aggregate.c back in.
5450 * aggregate.c: Still working on this.
5452 * command.c: (cmd_table[]) Add AGGREGATE back in.
5453 (split_words) Make '-' a legal word separator as well as ' '.
5455 * main.c: Comment fixes.
5457 * q2c.c: (dump_parser) Don't require the procedure's full name to
5458 be present, in the generated source.
5460 * t-test.q: Change name to `t-test' from `t test'. Let PAIRS be
5461 multiply specified and let it be default; let MISSING, CRITERIA,
5462 FORMAT be multiply specified.
5463 (cmd_t_test) Parse command name. [DEBUGGING] Call debug_print().
5464 (custom_groups) Fix defaults.
5465 (custom_pairs) Check whether this is a PAIRS subcommand before
5466 attempting to parse. Better garbage collection. Proper storage
5468 [DEBUGGING] (debug_print) New function.
5470 * temporary.c: Comment fixes.
5471 (copy_variable) Don't copy variable name and index.
5472 (save_dictionary) Copy variable name and index by hand.
5474 * vars-atr.c: Comment fixes.
5475 (create_variable) New dictionary argument. All references
5477 (common_init_stuff) New dictionary argument. All references
5479 (init_variable) New dictionary argument. All references changed.
5480 (dup_variable) New function.
5482 * vars-prs.c: (parse_variables) If there are any errors, we always
5483 return 0. Previously, it was possible for some types of errors to
5486 Sat Nov 22 01:20:59 1997 Ben Pfaff <blp@gnu.org>
5488 * Makefile.am: (fiasco_SOURCES) For 0.1.5 release, remove
5491 * command.c: (cmd_table[]) Comment out AGGREGATE; add T TEST.
5493 * list.q, t-test.q: Remove ALL option from VARLIST declaration in
5496 * q2c.c: Comment fixes.
5497 (SBC_* enums) Remove SBC_VARLIST_ALL; all references removed.
5499 * t-test.q: (cmd_list) Rename cmd_t_test.
5501 * temporary.c: (new_dictionary) Don't declare as static.
5503 Fri Nov 21 00:03:06 1997 Ben Pfaff <blp@gnu.org>
5505 * aggregate.c: Changes, still not finished.
5507 * file-handle.q, frequencies.q, list.q, set.q: Comment fixes.
5509 * q2c.c: Comment fixes. Now its output is internationalized.
5510 (get_token) Fix parsing of escapes within literal strings.
5511 (main) Fix bad #line directives in output.
5513 * t-test.q: Base implementation.
5515 * temporary.c: (new_dictionary) New function.
5516 (restore_dictionary) [__CHECKER__] Change fill character to *
5519 Sun Nov 16 01:29:57 1997 Ben Pfaff <blp@gnu.org>
5521 * Makefile.am: (BUILT_SOURCES, fiasco_SOURCES) Add t-test.c
5523 * aggregate.c: Changes, still not finished.
5525 * descript.q, list.q: Comment fixes.
5527 * q2c.c: Almost completely rewritten.
5529 * t-test.q: New file, not complete.
5531 Fri Nov 14 00:14:48 1997 Ben Pfaff <blp@gnu.org>
5533 * aggregate.c: Changes, still not finished.
5535 * sort.c: (sort_cases) Call cancel_temporary() instead of doing it
5538 * temporary.c: (cancel_temporary) New function.
5540 * vars-atr.c: (discard_variables) Call cancel_temporary() instead
5541 of doing it by hand.
5543 * vfm.c: (close_active_file) After restoring a TEMPORARY
5544 dictionary, set temp_dict to NULL. Cancel TEMPORARY through
5546 (SPLIT_FILE_procfunc) Comment fix.
5548 Tue Oct 28 16:08:45 1997 Ben Pfaff <blp@gnu.org>
5550 * Makefile.am: (fiasco_SOURCES) Add aggregate.c.
5552 * aggregate.c: New file, not finished yet.
5554 * command.c: (cmd_table) Add AGGREGATE.
5556 * common.h: (pgm_state) Move declaration to var.h.
5558 * lexer.c: (bin_value_func, oct_value_func, hex_value_func) i18n
5560 (parse_string) Message fix.
5562 * recode.c: Comment fix.
5564 * sfm-read.c: (read_variables) Code esthetic fixes.
5565 (write_header) Default date is `Jan', not `JAN'.
5567 * sfmP.h: (bswap_int32) [!__linux__] Fix off-by-one errors.
5569 * sort.c: (cmd_sort_cases) Farm the work out to new function
5570 parse_sort_variables().
5571 (parse_sort_variables) New function.
5572 (sort_cases) New function. Cancels temporary transformations,
5573 which sorting didn't do previously.
5574 (cmd_sort_cases) Better garbage collection on error. Uses
5576 (write_initial_runs, merge_once) Improved code esthetics.
5577 (sort_stream_read) Reduced to one call to read_output_cases().
5578 (read_output_cases) New function.
5580 * var-labs.c: (cmd_variable_labels) Re-enabled truncation of
5581 variable labels to 120 characters.
5583 * var.h: Comment fixes.
5584 (glob var pgm_state) From common.h.
5586 * vars-atr.c: (discard_variables) Set pgm_state to STATE_INIT.
5588 * vars-prs.c: (parse_DATA_LIST_vars) Support PV_SINGLE in
5589 options. Set *names to NULL on error.
5591 * vfm.c: (memory_stream_init) Assert compaction_nval != 0.
5593 Thu Oct 9 09:59:49 1997 Ben Pfaff <blp@gnu.org>
5595 * sfm-write.c, vfm.c: [HAVE_UNISTD] #include <unistd.h>, needed by
5596 SunOS4. From Alexandre Oliva <oliva@dcc.unicamp.br>.
5598 Wed Oct 8 18:55:24 1997 Ben Pfaff <blp@gnu.org>
5600 * vfm.c: (page_to_disk) Added missing local variables.
5602 Tue Oct 7 20:23:17 1997 Ben Pfaff <blp@gnu.org>
5604 * get.c: Comment fix.
5606 * sort.c: (cmd_sort_cases) Attempt to perform internal sort if the
5607 source is anything other than a disk stream, not just if it's in a
5608 memory stream. Call page_to_disk() before external sort.
5609 (allocate_cases) Message fix.
5611 * vfm.c: (prepare_for_writing) Warn user when paging workspace to
5613 (page_to_disk) New function.
5615 Sun Oct 5 15:56:14 1997 Ben Pfaff <blp@gnu.org>
5617 * Makefile.am: (INCLUDES) Include .. instead of $(top_srcdir).
5619 * common.h: (macro strerror) Remove. From Alexandre Oliva
5620 <oliva@dcc.unicamp.br>.
5622 * get.c: (dict_delete_run) The number of variables to delete is
5623 not necessarily the number of variables that need to be shifted
5625 (trim_dictionary) Don't set *options to 0. Fix bug that caused
5626 too many variables to be deleted.
5628 * postscript.c: Comment fix.
5630 * q2c.c: Include strerror.c. From Alexandre Oliva
5631 <oliva@dcc.unicamp.br>.
5633 * set.q: #undef ON and OFF. From Alexandre Oliva
5634 <oliva@dcc.unicamp.br>.
5636 * sfm-read.c: (sfm_read_dictionary) Don't set the file class too
5637 early, otherwise errors cause a bad free().
5639 * str.h: (macro nvsprintf) s/FORMATS/FORMAT/ typo. From Alexandre
5640 Oliva <oliva@dcc.unicamp.br>.
5642 * temporary.c: (save_dictionary) Don't allocate memory if
5645 * vfm.c: (memory_stream_write) Message fix.
5647 Sat Oct 4 16:20:43 1997 Ben Pfaff <blp@gnu.org>
5649 * command.c: (static var cmd_table[]) Define REPEATING DATA
5652 * common.h: Added support for broken systems that are missing
5653 EXIT_SUCCESS, EXIT_FAILURE, RAND_MAX, and/or strerror().
5655 * Many source files: Replace syntax error messages via msg() with
5656 call to syntax_error().
5658 * data-list.c: (dump_fixed_table) Add support for dumping table
5659 for REPEATING DATA as well as DATA LIST FIXED.
5660 (cmd_repeating_data) Allows and requires `/' between subcommands.
5661 Does proper thing with allowing rpd.starts_end to stay 0. Allows
5662 CONTINUED specifications to be omitted. Forces CONTINUED to be
5663 specified if ID is. Calculates starts_end, cont_end from logical
5664 record length as reported by fhp. Calls dump_fixed_table() if
5665 requested. Fixed length of record copied by memcpy.
5666 (parse_num_or_var) Sets `num' to 0, not NOT_INT, for variables.
5668 (realize_value) Returns sensible value for out-of-range variable
5670 (rpd_parse_record) New argument `ofs'. Fixed confusion between
5671 length of occurrences and length of line. Added warning for
5672 fields that exceed the line length. Fixed infinite loop.
5673 (read_one_set_of_repetitions) Numerous minor changes for more
5674 complete SPSS compliance. Message fixes.
5676 * dfm.c: (dfm_close) If the file being closed is the inline file,
5677 read all the remaining data before closing it.
5678 (dfm_get_record) Don't close the file on lossage, as either it
5679 has been closed already or it doesn't belong to us.
5681 * error.c: (puts_stdout) New function.
5682 (vmsg) Use puts_stdout instead of puts.
5684 * file-handle.q: (fh_record_width) New function.
5686 * inpt-pgm.c: (init_case) Fixed buffer overrun when inp_nval % 4
5689 (input_program_source_read) Made an old kluge an approved method.
5691 * lexer.c: (syntax_error) New function.
5693 * misc.c: [BROKEN_RAND] (ansi_rand, ansi_srand; static var next)
5696 * output.c: (oupt_get_paper_size) Message fix.
5698 * q2c.c: Numerous fixes to formatting of generated code made to
5699 conform to GNU coding standards. Uses syntax_error() in generated
5700 code. Other miscellaneous generated message fixes. Added support
5701 for broken systems that are missing EXIT_SUCCESS, EXIT_FAILURE,
5702 RAND_MAX, and/or strerror().
5704 Sat Oct 4 02:09:56 1997 Ben Pfaff <blp@gnu.org>
5706 * data-in.c: Comment fixes.
5708 * data-list.c: (struct repeating_data_trns) New member `id_spec'.
5709 (find_variable_input_spec) New function.
5710 (cmd_repeating_data) Initializes id_spec.
5711 (rpd_parse_record) Implemented.
5712 (read_one_set_of_repetitions) Returns -3 by default in order to
5713 kluge out some potential bugs.
5715 * data-out.c: Comment fixes.
5717 * file-type.c: (internal_cmd_record_type) Message fix.
5719 * inpt-pgm.c: (input_program_source_read) Special temporary kluge
5720 for handling -3 return value.
5722 Sat Sep 20 23:58:15 1997 Ben Pfaff <blp@gnu.org>
5724 * data-list.c: Comment fixes.
5725 (struct dls_var_spec) Reordered members.
5726 (read_from_data_list_fixed) Restructured.
5727 (struct repeating_data_trns) Reordered members. Renamed `starts'
5728 as `starts_beg', `ends' as `starts_end'.
5729 (cmd_repeating_data) Calculates length of repeated data if
5730 necessary and possible.
5731 (parse_num_or_var) Don't allow string variables.
5732 (realize_value) New function.
5733 (rpd_msg) New function.
5734 (rpd_parse_record) New function. Currently stubbed out.
5735 (read_one_set_of_repetitions) Implemented.
5737 * inpt-pgm.c: (input_program_source_read) Comment fix.
5739 Thu Sep 18 21:34:57 1997 Ben Pfaff <blp@gnu.org>
5741 * command.c: (cmd_end_repeat_p) Removed.
5742 (init_cmd_parser) Doesn't set cmd_end_repeat_p.
5743 (parse_cmd_name) Removed.
5745 * data-list.c: Comment fixes.
5746 (data_list_pgm) Removed `eof' member.
5747 (static var first) New var.
5748 (cmd_data_list) Sets `first'. Ensures that DATA LIST uses the
5749 FILE TYPE file inside FILE TYPE structures.
5750 (append_var_spec) Appends to *first, not dls.spec.
5751 (parse_fixed) Message fixes.
5752 (struct rpd_num_or_var) New.
5753 (struct repeating_data_trns) New.
5754 (static var rpd) New.
5755 (cmd_repeating_data) New function.
5756 (parse_num_or_var) New function.
5757 (parse_repeating_data) New function.
5758 (read_one_set_of_repetitions) New function.
5760 * file-type.c: (cmd_file_type) Message fixes. Always
5761 default_handle to FILE TYPE file handle.
5762 (internal_cmd_record_type) Message fixes.
5764 Wed Aug 20 14:22:03 1997 Ben Pfaff <blp@gnu.org>
5766 * repeat.c: Comment fix. Disable debugging.
5768 * temporary.c: (restore_dictionary) Sets splits to NULL and
5769 n_splits to 0 before destroying the variables because now doing
5770 this tries to remove split variables.
5772 * vars-atr.c: (discard_variables) Asserts that n_splits is 0 after
5773 destroying the dictionary.
5774 (clear_variable) Removes a variable from splits after destroying
5777 Mon Aug 18 18:06:55 1997 Ben Pfaff <blp@gnu.org>
5779 * cmdline.c: (set_compat) Removed.
5780 (pick_compat) Removed.
5781 (parse_command_line) Removed -c option.
5782 (pre_syntax_message) Removed -c option.
5783 (usage) Remove compatibility code.
5785 * common.h: (macros VER_PC, VER_WND, VER_X) Removed.
5786 (glob var compat) Removed.
5788 * compute.c: (type_check) Fixed messages about type mismatches.
5790 * data-list.c: (cmd_data_list) Removed compatibility code.
5791 (fixed_parse_compatible) Calls convert_negative_to_dash().
5792 Fixed bug where it only set the variable in fx.spec if it created
5793 the variable itself.
5794 (dump_fmt_list) Spelling fix.
5795 (cut_field) Removed compatibility code.
5797 * dfm.c: (cmd_begin_data) Don't require a command terminator on
5800 * expr-evl.c: (evaluate_expression) Implement LAG.
5802 * expr-prs.c: (parse_add) Calls convert_negative_to_dash().
5803 (parse_neg) Calls convert_negative_to_dash().
5804 (LAG_func) Increases n_lag to the lag requested. Fixed assignment
5807 * expr.h: (struct expression_struct) Removed member max_lag.
5809 * file-type.c: (parse_col_spec) Calls convert_negative_to_dash().
5810 (internal_cmd_record_type) Removed special handling to produce
5811 negative numbers from dash tokens.
5813 * getline.c: (static var DO_REPEAT_level) New var.
5814 (getl_add_DO_REPEAT_file) Increments DO_REPEAT_level.
5815 (handle_line_buffer) Copies the line into getl_buf; doesn't call
5816 copy_with_DO_REPEAT_substitutions().
5817 (getl_read_line) Maintains value of getl_mode. Calls
5818 perform_DO_REPEAT_substitutions() whenever DO_REPEAT_level is
5820 (getl_close_file) Decrements DO_REPEAT_level when appropriate.
5822 * getline.h: (getl_mode) New glob var.
5824 * glob.c: Comment fixes.
5825 (init_glob) Restructured. Sets set_seed.
5826 (init_compat_dependent) Removed. All references removed.
5827 (get_date) Format changed from MM/DD/YY to DD MMM YYYY.
5828 (__htonl, __htons) Removed. (What were these for?)
5830 * lexer.c: (static var tbl) Dash set to class CNUM.
5831 (make_hexit) New function from data-out.c.
5832 (get_token_representation) Rewritten.
5833 (convert_negative_to_dash) New function.
5834 (lex_init_compat_dependent) Removed.
5835 (yylex) A dash is parsed as part of a number if it is followed by
5836 a digit. The ASCII representation of a number is copied to
5837 tokstr. String parsing farmed out to parse_string(). Comment
5839 (bin_value_func, oct_value_func, hex_value_func, parse_string) New
5841 (preprocess_line) Line processing depends on interactive/batch
5842 mode, not on compatibility mode. Removed PC+ compatibility code.
5844 * loop.c: (loop_3_trns_proc) Comment fix.
5846 * main.c: Remove dead code.
5847 (main) Remove call to init_compat_dependent().
5849 * misc.c: (convert_fmt_ItoO) Make E format conversion more
5852 * print.c: (parse_string_argument) Calls
5853 convert_negative_to_dash().
5854 (fixed_parse_compatible) Calls convert_negative_to_dash().
5856 * repeat.c: (RPT_* defines) Removed.
5857 (struct rpt_numeric) Removed.
5858 (struct repeat_entry) New member type, changed `replacement' from
5860 (clean_up) Deallocation adapted to new repeat_entry.
5861 (internal_cmd_do_repeat) `type' defaults to 0. Remove lookahead()
5862 usage. Creates vars for `type' of 1.
5863 (parse_ids) Sets type of 1. Adapted to new repeat_entry.
5864 (store_numeric) Rewritten, new interface.
5865 (parse_numbers) Rewritten.
5866 (parse_strings) Rewritten.
5867 (find_DO_REPEAT_substitution) New function.
5868 (perform_DO_REPEAT_substitutions) New function.
5869 (copy_with_DO_REPEAT_substitutions) Removed.
5870 (debug_print) Rewritten.
5872 * set.q: Comment fix.
5873 (custom_results) Removed compatibility code.
5874 (internal_cmd_set) Removed SET EMULATION subcommand. Removed
5877 * sysfile-info.c: (cmd_display) Removed compatibility code.
5879 * tokens.h: Comment fixes.
5880 (token types enum) Removed `toktype' typedef name for this int
5881 type. Removed SUBST. Restructured.
5883 * vars-atr.c: (discard_variables) Sets n_lag to 0.
5885 * vars-prs.c: Comment fix.
5887 * vfm.c: Comment fixes.
5888 (glob var n_lag) New var.
5889 (static vars lag_count, lag_head, lag_queue) New vars.
5890 (procedure) Removed argument nlag.
5891 (setup_lag) New function.
5892 (close_active_file) Discards lagging state.
5893 (lag_case) New function.
5894 (lagged_case) New function.
5895 (write_case) Lags a case if lagging.
5897 * weight.c: (cmd_weight) Removed compatibility code.
5899 Sun Aug 17 22:34:40 1997 Ben Pfaff <blp@gnu.org>
5901 * getline.h: (struct getl_script) New members loop_index, macros.
5903 * getline.c: (getl_add_file) Sets first_line field to NULL.
5904 (getl_add_DO_REPEAT_file) New function.
5905 (handle_line_buffer) When the current line's length is negative,
5906 set the filename and line number. Increment line number after
5907 reading line. Pass the line to
5908 copy_with_DO_REPEAT_substitutions() for processing.
5909 (getl_close_file) Free DO REPEAT lines before freeing the
5910 filename, and just set the filename to NULL when doing this,
5911 because otherwise the filename gets freed twice.
5913 * glob.c: (glob var queuing) Removed. All references removed.
5915 * lexer.c: Comment fixes.
5916 (get_token_representation) New function.
5918 * repeat.c: Comment fixes.
5919 (struct repeat_entry) Replaced type and v union members with a
5921 (append_record) New function.
5922 (internal_cmd_do_repeat) Started reforming it for the new
5923 repeat_entry struct. Properly records filename changes in the
5924 getl_line_buf. Fixed improper use of = for ==. Fixed sense of
5925 strncasecmp() result usage. Uses append_record() to simplify.
5926 Properly discards END REPEAT line. Calls getl_add_DO_REPEAT_file
5929 (copy_with_DO_REPEAT_substitutions) Started coding.
5931 [DEBUGGING] (debug_print_lines) New function.
5933 * set.q: (custom_results, internal_cmd_set) s/VER_PCP40/VER_PC/;
5935 * tokens.h: (macro is_id1, is_idn) New macros.
5937 Sat Aug 16 10:57:41 1997 Ben Pfaff <blp@gnu.org>
5939 * cmdline.c: (static var pre_syntax_message) Changed `win'
5940 compatibility mode to `wnd'.
5942 * data-list.c: (fixed_parse_spss) Renamed
5943 fixed_parse_compatible().
5945 * glob.c: (init_glob) Excise unused code for
5946 program_invocation_short_name.
5948 * lexer.c: (preprocess_line) Leading indentors are ignored in Wnd
5951 * print.c: (fixed_parse_spss) Renamed fixed_parse_compatible().
5953 * set.q: `win' compatibility renamed `wnd'.
5955 Thu Aug 14 22:11:12 1997 Ben Pfaff <blp@gnu.org>
5957 * filename.c: [__WIN32__] Change the included Windows header files
5959 (absolute_filename_p) [__MSDOS__] A filename with a colon as the
5960 second character is absolute.
5961 (dirname) Fix logic error. Don't printf() the results.
5962 (prepend_dir) Don't printf() the results.
5964 * getline.c: (handle_line_buffer) New function.
5965 (getl_read_line) Reads line with handle_line_buffer() when
5967 (getl_close_file) Discard line buffer data.
5969 * getline.h: Comment fixes.
5970 (struct getl_line_list) New struct.
5971 (getl_script_struct) Added line buffer members. These are hooks
5972 for use by DO REPEAT to allow it to insert virtual source code
5975 * glob.c: (init_glob) [__DJGPP__ || (__WIN32__ && __BORLANDC__)]
5976 Override Borland C++ stupidity that claims Windows has a console
5979 * repeat.c: This is in the process of being restructured from
5980 using a token-buffering approach to the DO REPEAT facility to
5981 using the more flexible approach of a line-buffering approach in
5982 conjunction with the getline module. Comment fixes.
5983 (struct tok_struct) Removed.
5984 (static vars queue_index, queue_head, queue) Removed.
5985 (static vars line_buf_head, line_buf_tail) New vars.
5986 (internal_cmd_do_repeat) Instead of queuing tokens, queue lines.
5988 (pull_queue, destroy_queue) Removed.
5989 [DEBUGGING] (debug_print_tokens) Removed.
5991 Tue Aug 5 13:57:58 1997 Ben Pfaff <blp@gnu.org>
5993 * file-handle.q: (prepend_current_directory) New function.
5994 (internal_cmd_file_handle, fh_get_handle_by_filename) Prepends
5995 current directory before normalizing filename.
5997 * filename.c: (gnu_getcwd) New function.
5998 (absolute_filename_p) New function.
5999 (search_path) New argument, PREPEND. All references changed to
6000 pass NULL except those explicitly mentioned. Uses
6001 absolute_filename_p(). Prepends PREPEND before trying the
6003 (dirname, prepend_dir) New functions.
6005 * getline.c: (getl_get_current_directory) New function.
6006 (getl_include) Passes getl_get_current_directory() as PREPEND arg
6009 Sun Aug 3 11:42:36 1997 Ben Pfaff <blp@gnu.org>
6011 * In several source files, the term `script' was replaced with
6012 `syntax file' inside error messages. Usage of the term `script'
6013 in the sense of a syntax file is now deprecated.
6015 * cmdline.c: (static vars pre_syntax_message, post_syntax_message)
6018 * dump-sysfile.c: (usage) Update message.
6020 * getline.c: (getl_read_line) Ignore lines beginning with `#!'.
6022 * getline.h: (glob var getl_include_path) Declare extern.
6024 * list.q: Define EXTERN as extern before #including somP.h.
6026 * var.h: Remove declaration of `disptype' variable.
6028 * vfm.c: (close_active_file) After switching the data sink to a
6029 data source, set vfm_sink to NULL, because it doesn't exist any
6032 Thu Jul 17 21:41:44 1997 Ben Pfaff <blp@gnu.org>
6034 * glob.c: [__BORLANDC__] Include math.h. Define _matherr() and
6035 _matherrl() to ignore all math errors.
6037 * sfm-read.c: (read_value_labels) When reading the labels from
6038 disk, read the little parts separately instead of as a struct;
6039 this avoids alignment problems.
6041 * sfm-write.c: (struct sfm_fhuser_ext) New member `elem_type'.
6042 (sfm_write_dictionary) Sets elem_type and frees it on lossage.
6043 (write_header) Allocates and initializes elem_type.
6044 (sfm_write_case) Uses elem_type to determine how to handle each
6046 (sfm_close) Frees elem_type.
6048 * sfmP.h: Comment fix.
6049 [__BORLANDC__] Uses #pragma -a to adjust structure member
6052 Thu Jul 17 01:55:12 1997 Ben Pfaff <blp@gnu.org>
6054 * Makefile.am: (fiasco_SOURCES) Remove display.c.
6056 * common.c: Fix typo.
6058 * dfm.c: (read_record) Remove strncasecmp() emulation and fix the
6059 sense of the condition.
6061 * expr-evl.c: (macro ALLOC_STRING_SPACE) [!PAGED_STACK] Add
6062 line-continuation backslash.
6064 * filename.c: [__WIN32__] Include <windef.h> before <winbase.h>.
6066 * frequencies.q: (custom_grouped, add_percentile) Don't use a
6067 non-constant expression as an argument to sizeof.
6069 * glob.c: [__WIN32__ && __BORLANDC__] When including <conio.h>,
6070 undefine gettext macro because that's a conio function.
6072 * hash.h: (hsh_prime_tab declaration) Remove.
6074 * list.q: (write_fallback_headers) Move `leader' allocation out of
6075 main loop. Change to local_alloc() allocation.
6077 * output.h: Formatting fixes. Put __attribute__ in right place on
6078 function prototypes.
6080 * sfm-read.c: (read_machine_flt64_info, read_variables) Change
6081 incorrect `SECOND_LOWEST_VALUE' references to proper
6082 `second_lowest_value'.
6084 * som-frnt.c: (EXTERN macro) Define as `extern' instead of null
6085 value. This way 2 out of 3 of the som files define the vars
6086 extern, the correct way, that actually works under BC++.
6087 (som_set_float) Don't use nonconstant initializers for a struct.
6089 * som-high.c: Add the standard alloca() header.
6090 (replicate_table) Add prototype.
6092 Merged DISPLAY routine.
6093 * sysfile-info.c: (AS_*) New enum series.
6094 (cmd_sysfile_info) Gutted. Calls describe_variable() to do the
6096 (cmd_display, display_macros, display_documents,
6097 display_variables) Stolen from defunct display.c.
6098 (describe_variable) New function.
6100 * temporary.c: [0] (display_tree) New debug function.
6101 (copy_variable) Performs shallow copy of value labels instead of
6102 deep copy; i.e., just copys the AVL tree and increments the
6105 * val-labs.c: Comment fixes.
6106 (do_value_labels) Optionally skip leading forward slash.
6107 (get_label) Creates only a single value label instead of many
6108 copies of one, and sets the reference count.
6110 * display.c: Removed.
6112 * dump-sysfile.c: New file, not yet complete.
6114 Fri Jul 11 23:02:18 1997 Ben Pfaff <blp@gnu.org>
6116 For lots of source files I added more verbose_msg's. These aren't
6117 listed below as they have tested as being benign. In some cases
6118 these replaced debug_printf() calls.
6120 * output.c: (outp_read_devices) Message fix.
6122 * postscript.c: (output_encodings) Message fix. Reports errors on
6124 (postopen) Message fix.
6126 Fri Jul 11 14:09:40 1997 Ben Pfaff <blp@gnu.org>
6128 * dfm.c: (dfm_close) Don't call fclose() for a NULL FILE.
6130 * filename.c: (close_file_ext) Set f->file to NULL *after* closing
6133 * main.c: Remove <malloc.h> #include.
6135 * mis-val.c: (parse_numeric) Set .f member for each missing[]
6136 instead of trying to just set the missing[] itself, which is a
6139 * sfm-read.c: (read_variables) Same.
6141 * str.h: Add memmem() prototype.
6143 * val-labs.c, var-labs.c: Replace <malloc.h> with <stdlib.h>.
6145 Thu Jul 10 22:13:53 1997 Ben Pfaff <blp@gnu.org>
6147 * Makefile.am: (q2c) Don't include any libraries in the link.
6149 * dfm.c: (force_line_buffer_extension) New macro.
6150 (count_tabs) New function.
6151 (tabs_To_spaces) New function.
6152 (read_record) Calls tabs_to_spaces() on the line being processed.
6154 * q2c.c: Disabled i18n for this proglet so that libintl.a doesn't
6155 have to be compiled twice (once for CC, once for LOCAL_CC).
6157 Sun Jul 6 19:14:33 1997 Ben Pfaff <blp@gnu.org>
6159 * Makefile.am: (INCLUDES) Add intl directory; fix directories.
6160 (LDADD) Add @INTLLIBS@.
6161 (q2c) Add LIBS, @INTLLIBS@ to link step.
6163 * inpt-pgm.c: Turn off debugging.
6165 * postscript.c: (postopen) Format fix. local_free() blocks
6166 returned by local_alloc(); don't free() them.
6168 Sat Jul 5 23:44:51 1997 Ben Pfaff <blp@gnu.org>
6170 * data-in.c: (parse_string_as_format) Comment fix. Fix check for
6173 * data-list.c: (read_from_data_list_fixed) Pass proper value for
6174 LEN arg, not simply the full string length.
6176 * sort.c: (allocate_file_handles) Check SPSS compatible temp file
6177 directories before generic temp file directories.
6179 * vfm.c: Disable debugging.
6181 Fri Jul 4 13:26:41 1997 Ben Pfaff <blp@gnu.org>
6183 * get.c: Comment fix.
6184 (cmd_save_internal) Always passes GTSV_OPT_SAVE option.
6186 Wed Jun 25 22:52:28 1997 Ben Pfaff <blp@gnu.org>
6188 * expr-prs.c: (debug_print_postfix) Conditionally included on
6189 GLOBAL_DEBUGGING. Removed out_header() reference.
6191 * exprP.h: Removed #undef GLOBAL_DEBUGGING.
6193 Sun Jun 22 22:00:28 1997 Ben Pfaff <blp@gnu.org>
6195 * ascii.c: Removed obsolete ascii_close_page() prototype.
6197 * command.c: (output_line) Comment fix.
6199 * data-in.c: Formatting fix.
6200 (parse_string_as_format) Now the `fc' argument is used only for
6201 the purpose of error messages; it is not an index into the string
6202 passed. All references changed.
6204 * data-list.c: Comment fix.
6205 (cut_field) Comment fix. Now returns the column number of the
6206 position of the field cut out on success.
6207 (parse_field) Added `column' argument. Puts the column numbers in
6209 (read_from_data_list_free, read_from_data_list_list) Record the
6210 column number returned by cut_field(), pass it to parse_field().
6212 * dfm.c: Comment fix.
6214 * do-ifP.h: Comment fix.
6216 * expr-prs.c: (SYSMIS_func) Implemented string-type arguments for
6217 the SYSMIS function.
6219 * expr.h, exprP.h: Comment fix.
6221 * glob.c: (init_glob) Only calls setlocale() and family if
6224 * hash.h: Comment fix.
6226 * include.c: Comment fix.
6228 * output.c: Comment fix.
6230 * postscript.c: (ps_line_intersection) Simplified assertion.
6232 * repeat.c: Comment fix.
6234 * vars-atr.c: Comment fix.
6236 * vars-prs.c: Comment fix.
6238 * vfm.c: (vector_initialization) [DEBUGGING] Fixed undefined
6239 behavior with usage of postincrement.
6240 (memory_stream_read) Discards cases as it goes.
6242 Sun Jun 15 16:45:17 1997 Ben Pfaff <blp@gnu.org>
6244 * Makefile.am: Cleans q2c, not just distcleans it. Distcleans
6247 * Most source files: Includes debug-print.h, related comment
6250 * cases.c: (alloc_val) Removed complex allocation code. Merely
6251 increments default_dict.nval and returns the former value.
6252 (envector, devector) Removed references to lv member of struct
6255 * common.h: (macro VME) Replaced complex definition with simple
6258 * data-list.c: (cmd_data_list) Sets vfm_source instead of
6259 read_active_file and cancel_input_pgm.
6260 (read_from_data_list, cancel_data_list) Removed.
6261 (data_list_source_read, data_list_source_destroy_source) New
6263 (glob var data_list_source) New var.
6265 * dfm.c: (open_file_r, open_file_w) Simplified debug output.
6266 (cmd_begin_data) Improved criteria for an input program accessing
6267 the inline file. Still not perfect.
6269 * do-if.c: (do_if_trns_proc) Simplified debug output.
6271 * expr-prs.c: Comment fixes.
6272 [DEBUGGING] (debug_print_postfix) Simplified debug output.
6274 * file-handle.q: (fh_close_handle) Simplified debug output.
6276 * file-type.c: Comment fixes.
6277 (cmd_file_type) Sets vfm_source instead of read_active_file and
6279 (cmd_end_file_type) On failure, discards variables in place of
6280 just canceling the input program.
6281 (read_from_file_type) Renamed file_type_source_read.
6282 (cancel_file_type) Renamed file_type_source_destroy_source.
6283 (glob var file_type_source) New var.
6285 * get.c: (GTSV_* enum series) New enums GTSV_OPT_SAVE, GTSV_NONE.
6286 (cmd_get) Initializes options to GTSV_NONE before passing to
6287 trim_dictionary(). Removed `lv' reference. Sets vfm_source
6288 instead of read_active_file and cancel_input_pgm.
6289 (cmd_save_internal) Initializes options before passing to
6290 trim_dictionary(). Local var `nval' removed.
6291 (dict_delete_run) Comment fixes.
6292 (trim_dictionary) Comment fixes. Disallows scratch variables if
6293 GTSV_OPT_SAVE set in options.
6294 (read_from_get) Renamed get_source_read.
6295 (cancel_get) Renamed get_source_destroy_source.
6296 (glob var get_source) New var.
6298 * inpt-pgm.c: (cmd_input_program) Sets vfm_source instead of
6299 read_active_file and cancel_input_pgm.
6300 (read_from_input_program) Renamed input_program_source_read.
6301 Simplified debug output.
6302 (cancel_input_program) Renamed
6303 input_program_source_destroy_source.
6304 (glob var input_program_source) New var.
6306 * loop.c: (loop_1_trns_proc) Simplified debug output.
6308 * main.c: (dump_token) Made eof output more explicit.
6310 * sfm-read.c: (read_variables, dump_dictionary) Removed `lv'
6313 * sort.c: (cmd_sort_cases) Disallows scratch variables. Removed
6314 code for always-memory or always-disk cases. malloc's case-list
6315 based on vfm_source_info.ncases. Explicit support for
6316 memory_stream via memory_source_cases.
6317 (do_external_sort) Sets vfm_source instead of read_active_file and
6319 (allocate_file_handles) The temporary directory permissions are
6320 set to 0700 instead of 0777.
6321 (allocate_cases) Formatting fixes. Simplified debug output.
6322 (output_record) Compacts the case if necessary before writing it
6324 (close_handle, open_handle_w) Simplified debug output.
6325 (write_initial_runs) Destroys vfm_sink, then sets it to
6326 sort_stream. Writes records to memory based on
6327 vfm_sink_info.case_size.
6328 (write_to_sort_cases) Renamed sort_stream_write().
6329 (merge) Simplified error handling. Simplified debug output.
6331 (read_from_external_sort) Renamed sort_stream_read().
6332 Reads records based on vfm_source_info.case_size.
6333 (sort_stream_write) Writes records to memory based on
6334 vfm_sink_info.case_size.
6335 (sort_stream_mode) New function.
6336 (glob var sort_stream) New variable.
6338 * temporary.c: (cmd_temporary) Simplified debug output.
6339 (copy_variable) Removed references to `lv'.
6341 * title.c: (get_title) Simplified debug output.
6343 * var.h: Comment fixes.
6344 (struct get_proc) Removed member `lv'.
6345 (struct variable) Removed member `lv'. Comment fixes.
6346 (glob vars read_active_file, write_active_file, cancel_input_pgm)
6348 (struct case_stream) New.
6350 * vars-atr.c: (discard_variables) Changed cancel_input_pgm,
6351 read_active_file references to use vfm_source.
6352 (init_variable, replace_variable) Removed references to `lv'.
6354 * vfm.c: Comment fixes.
6355 (glob var vfm_source, vfm_sink, vfm_source_info, vfm_sink_info)
6357 (static var queue, qh, qt, n_lag) Removed. All references
6359 (glob var compaction_necessary, compaction_nval, compaction_case,
6360 paging) New variables.
6361 (record_case) Removed.
6362 (procedure) Comment fixes. Calls vfm_source->read() instead of
6365 (prepare_for_writing, arrange_compaction, make_temp_case,
6366 vector_initialization, setup_filter) New function.
6367 (open_active_file) Most of the code moved into the abovementioned
6368 new functions. Now sets temp_dict to &default_dict if there is no
6369 temporary dictionary, for convenience. New debug output.
6370 (close_active_file) Deals with changing the sink to the source.
6371 Calls finish_compaction(). Frees compaction_case. Mostly
6373 (glob vars disk_source_file, disk_sink_file) New vars.
6374 (destroy_active_file, read_from_memory) Removed.
6375 (disk_stream_init, disk_stream_read, disk_stream_write,
6376 disk_stream_mode, disk_stream_destroy_source,
6377 disk_stream_destroy_sink) New functions.
6378 (glob var vfm_disk_stream) New var.
6379 (glob vars memory_source_cases, memory_sink_cases,
6380 memory_sink_iter, memory_sink_max_cases) New vars.
6381 (memory_stream_init, memory_stream_read, memory_stream_write,
6382 memory_stream_mode, memory_stream_destroy_source,
6383 memory_stream_destroy_sink) New functions.
6384 (glob var vfm_memory_stream) New var.
6385 (write_case) Local var `i' renamed `cur_trns'; local var `retval'
6386 named `more_cases'. Simplified debug output. Otherwise mostly
6388 (record_case) Moved into the stream drivers. Removed.
6389 (transform) Removed (was dead code).
6390 (SPLIT_FILE_procfunc) s/vfm_replacement/vfm_sink_info/. In the
6391 common case that the splits don't change, we don't need to copy
6392 the case into prev_case again--pointless.
6393 (compact_case) New function.
6394 (finish_compaction) New function.
6396 * vfmP.h: Comment fixes.
6397 (DEV_* enum series) Removed.
6398 (struct storage) Renamed `stream_info'. Removed variant record.
6399 Removed `device' member.
6401 * debug-print.h: New file.
6403 Sun Jun 8 01:12:38 1997 Ben Pfaff <blp@gnu.org>
6405 * autorecode.c: Turned off debugging.
6407 * data-list.c: (destroy_dls) Closes the associated file handle.
6409 * descript.q: (custom_variables) Added PV_NO_SCRATCH to
6410 parse_variables() options.
6412 * dfm.c: (open_file_r) Removed gratuituous argument to msg() call.
6414 * display.c: (display_variables) Really fixed null cell bug.
6416 * file-handle.q: (fh_close_handle) Changed debugging message.
6418 * frequencies.q: (custom_variables) Added PV_NO_SCRATCH to
6419 parse_variables() options.
6421 * list.q: Added PV_NO_SCRATCH in q2c varlist options.
6422 (cmd_list) Fails if no variables specified.
6423 (determine_layout) Writes blank lines manually.
6425 * loop.c: (loop_1_trns_proc) Made debugging code only print
6426 messages if debugging.
6428 * q2c.c: (dump_subcommand) Appends sbc->message to SBC_VARLIST
6429 parse_variables() arguments.
6430 (main) Parses optional parenthesized options to varlist
6431 subcommands into sbc->message.
6433 * sfm-read.c: Format fix.
6435 * var.h: (FV_*) New enum series.
6436 (PV_*) New enum PV_NO_SCRATCH.
6438 * vars-prs.c: (find_var) Removed.
6439 (fill_all_vars) Takes FV_* enum instead of boolean third
6440 argument. Rewritten to deal with scratch as well as system
6442 (parse_variables) Error message on scratch variable if
6445 * vfm.c: (static var virt_begin_func) New var.
6446 (procedure) Sets up virt_begin_func.
6447 (SPLIT_FILE_procfunc) For the first case, calls virt_begin_func()
6448 after dump_splits(). For succeeding groups changes, calls
6449 virt_begin_func() instead of begin_func().
6451 Fri Jun 6 22:42:23 1997 Ben Pfaff <blp@gnu.org>
6453 * count.c, data-out.c, file-handle.q, list.q, loop.c: Turned off
6456 * dfm.c: Added some debugging messages, disabled by default.
6457 (open_file_r) Fixed error message.
6458 (read_record) On eof on inline_file, instead of calling
6459 fh_close_handle(), simply jump to eof label like a normal file.
6462 * display.c: Thin lines between rows for certain kinds of
6463 listing. Fixed `null cell' bug.
6465 * error.c: (failure) Flush stdout, stderr before failing.
6467 * file-handle.q: (fh_close_handle) Added debugging message.
6469 * frequencies.q: (dump_full) Bottom line extends across entire
6470 table width. Changed title formatting.
6471 (dump_condensed) Changed title formatting.
6472 (dump_statistics) Fixed title formatting.
6474 * glob.c: (init_glob) Moved initialization of cur_proc out of #if.
6475 Sets default value of set_format.
6477 * list.q: (cmd_list) Calls blank_line() before determine_layout().
6478 Passes write_all_headers() to procedure() as pre-group func.
6479 (write_all_headers) New function.
6480 (determine_layout) Removed calls to write_header().
6481 Calls blank_line() before and after write_fallback_headers().
6483 * recode.c: (recode_trns_free) Only attempts to free head->map if
6486 * sfm-read.c: (read_variables) Allows `#' at beginning of system
6487 file variable names but gives a warning. Sets `left' based on
6488 first character being/not being `#'. On lossage frees dict->var.
6490 * som-high.c: (som_draw_title) Simplified title formatting.
6492 * vfm.c: (dump_splits) Fixed and changed splits formatting.
6494 Thu Jun 5 22:51:15 1997 Ben Pfaff <blp@gnu.org>
6496 * autorecode.c: (cmd_autorecode) Sets h_trans to NULL at
6497 beginning. Frees v_src, v_dest on successful exit. Frees
6498 h_trans[*], h_trans on lossage.
6499 (recode) Frees h_trans[*], h_trans.
6501 * dfm.c: (dfm_close) Formatting change.
6502 (open_inline_file) Now passed a dfm_fhuser_ext to initialize; no
6503 longer allocates its own in inline_file.
6504 (open_file_r) Passes the local dfm_fhuser_ext to
6506 (open_file_w) Message fix.
6507 (read_record) Buffer reallocation strategy changed. Frees
6508 ext->line even in inline_file to prevent leaks.
6509 (dfm_put_record) Fixed bug where `ext' was cached before the file
6510 was opened and thus it would be NULL when the file really was
6512 (cmd_begin_data) Sets up inline_file basics itself, then calls
6513 open_inline_file() for the dfm_fhuser_ext. Formatting fix.
6515 * list.q: (write_line) Formatting fix.
6516 (clean_up) Minor strategy change. Sets proportional font after
6518 (determine_layout) Sets fixed font before writing regular headers,
6519 or after writing fallback headers.
6521 * modify-vars.c: (cmd_modify_vars) Frees variable lists for DROP
6522 and KEEP vars after using them.
6524 * postscript.c: (ps_init_driver) Frees x->family.
6525 (postopen) When loading fonts, free the temporary font name buffer
6527 (ps_text_set_font_by_position) Free temporary font name buffer
6529 (text) Fixed code that calculated `lig' so that `lig' always gets
6530 initialized. Formatting fix.
6532 * som-low.c: (get_cell_size, som_get_table_size) `prop_height' ->
6534 [GLOBAL_DEBUGGIGN] (check_table) Use arena_alloc() to allocate
6535 cells, not xmalloc(), so that the cells will get destroyed
6538 * sysfile-info.c: (cmd_sysfile_info) Frees the dictionary after
6541 Tue Jun 3 23:33:22 1997 Ben Pfaff <blp@gnu.org>
6543 * ascii.c: (ascii_text_draw) Always sets metrics for strings that
6546 * dfm.c: Comment fix.
6548 * list.q: Comment fixes. Include somP.h. Removed static vars
6549 table, n_columns, n_rows, part. New struct list_ext. New static
6551 (n_lines_remaining, n_chars_width, write_line) New functions.
6552 (cmd_list, list_cases) Rewritten.
6553 (begin_row, end_row, flush_table) Removed.
6554 (write_header, clean_up, write_varname, write_fallback_headers,
6555 determine_layout) New functions.
6557 * output.c: (outp_iterate_enabled_drivers) Minor reformat.
6559 * output.h: Comment fix.
6561 * postscript.c: Comment fix.
6562 (struct ps_driver_ext) Removed prop_size, fixed_size members;
6563 added font_size. All references changed.
6564 (ps_init_driver) Initializes font_size. Simplified space checking
6566 (static var option_tab[]) Removed prop-size, fixed-size; added
6568 (ps_option) Handles font_size.
6570 * som-high.c: Moved prototypes into somP.h.
6571 (som_init_driver) New function.
6572 (som_submit_table) Moved some code into new function
6574 (build_target) Moved some code into new function
6575 som_internal_eject_page().
6576 (som_eject_page) Uses som_internal_eject_page().
6577 (som_internal_eject_page) New function.
6579 * som-low.c: Moved prototypes into somP.h.
6581 * som.h: Formatting fixes.
6583 * somP.h: (struct som_driver_ext) Removed em_width;
6584 added prop_em_width, fixed_width.
6586 Mon Jun 2 14:25:25 1997 Ben Pfaff <blp@gnu.org>
6588 * Makefile.am: Added `localedir' definition. Added
6589 -DLOCALEDIR="..." to DEFS. Added -I. to INCLUDES.
6591 * ascii.c: (macro draw_line) Fixed capitalization.
6593 * ascii.c, autorecode.c, cases.c, cmdline.c, command.c, common.c,
6594 compute.c, count.c, data-in.c, data-list.c, data-out.c,
6595 descript.q, dfm.c, display.c, do-if.c, error.c, expr-evl.c,
6596 expr-opt.c, expr-prs.c, file-handle.q, file-type.c, filename.c,
6597 formats.c, frequencies.q, get.c, getline.c, glob.c, groff-font.c,
6598 hash.c, heap.c, include.c, inpt-pgm.c, lexer.c, list.q, loop.c,
6599 main.c, mis-val.c, misc.c, modify-vars.c, numeric.c, output.c,
6600 postscript.c, print.c, q2c.c, recode.c, rename-vars.c, repeat.c,
6601 sample.c, sel-if.c, sfm-read.c, sfm-write.c, sfmP.h, som-frnt.c,
6602 som-high.c, som-low.c, sort.c, split-file.c, sysfile-info.c,
6603 temporary.c, title.c, tokens.h, val-labs.c, var-labs.c,
6604 vars-atr.c, vars-prs.c, vector.c, vfm.c, weight.c: Marked strings
6605 for internationlization.
6607 * glob.c: [HAVE_LOCALE_H] Includes locale.h.
6609 Sun Jun 1 23:31:18 1997 Ben Pfaff <blp@gnu.org>
6611 * do-if.c, sort.c, val-labs.c: Comment fixes.
6613 * glob.c: (init_glob) Uncommented, updated i18n support.
6615 * arena.c, ascii.c, data-in.c, descript.q, error.c, expr-evl.c,
6616 expr-opt.c, expr-prs.c, filename.c, frequencies.q, groff-font.c,
6617 output.c, postscript.c, sfm-read.c, som-high.c, vars-prs.c: Made
6618 the declarations of macros taking arguments a lot nicer.
6620 Sun Jun 1 17:22:04 1997 Ben Pfaff <blp@gnu.org>
6622 * error.h: Removed CE, CW aliases for SE, SW.
6624 * q2c.c: Removed explicit streq() definition since it's duplicated
6627 * approx.h, error.h, font.h, hash.h, misc.h, output.h, somP.h,
6628 stats.h, str.h, tokens.h: Made the declarations of macros taking
6629 arguments a lot nicer-looking of <pinard@iro.umontreal.ca>.
6632 Sun Jun 1 12:02:06 1997 Ben Pfaff <blp@gnu.org>
6634 * cmdline.c: Comment fixes.
6635 (pick_compat) Changed return type to int. Now, instead of setting
6636 glob var `compat' to the emulation, returns the emulation. All
6638 (parse_command_line) Added terminating null to end of
6639 `long_options' array definition.
6640 (pre_syntax_message) Fixes.
6641 (usage) Shows the default emulation in the syntax message by
6642 calling pick_compat().
6644 * getline.c: (getl_add_include_dir) Separates paths with
6645 PATH_DELIMITER, not DIR_SEPARATOR.
6647 * glob.c: (init_glob) Fixed references to DEFAULT_VER_PCP40,
6648 DEFAULT_VER_WIN61, DEFAULT_VER_X40.
6650 * output.c: (outp_configure_macro) Make earlier definitions for a
6651 particular key override later ones for the same key.
6653 Fri May 30 19:40:49 1997 Ben Pfaff <blp@gnu.org>
6655 * ascii.c: Comment fixes.
6657 * output.c: (outp_get_paper_size)
6658 s/STAT_OUTPUT_INIT_FILE/STAT_OUTPUT_PAPERSIZE_FILE/.
6660 Sun May 25 22:34:07 1997 Ben Pfaff <blp@gnu.org>
6662 * ascii.c, postscript.c, sfm-read.c, sfm-write.c, sort.c: Include
6663 <errno.h>. GNU libc 2 enforces this!
6665 * command.c: (parse_cmd) Fixed problem with `else' clause being
6666 paired with wrong `if'. Comment fix.
6668 Fri May 9 16:53:52 1997 Ben Pfaff <blp@gnu.org>
6670 * getline.c: [!HAVE_LIBREADLINE] (read_console) Changed
6671 blp_getline() to getline().
6673 * output.c: (outp_eval_dimension) Changed the fix from last time;
6674 there was no variable `a'.
6676 * q2c.c: (get_line) Fixed boundary condition overrun bug.
6678 Mon May 5 21:58:22 1997 Ben Pfaff <blp@gnu.org>
6680 * output.c: (outp_evaluate_dimension) Fixed handling of negative
6681 numbers having fractional parts. Added case of a fraction without
6682 a whole-number part.
6684 Fri May 2 22:08:05 1997 Ben Pfaff <blp@gnu.org>
6686 * ascii.c: (ascii_text_get_font_position) Removed.
6688 * expr.h, exprP.h: Disabled debugging.
6690 * groff-font.c, postscript.c: Changed `groff' to `Groff' in
6693 * output.h: (struct outp_class_struct) Removed
6694 text_get_font_position method. All references deleted.
6696 * postscript.c: Big change here. Fontmaps were completely
6697 eliminated because of a change in philosophy. Comment fixes.
6698 (struct ps_fontmap, ps2dit_map, font_family, dit2family_map)
6700 (struct ps_driver_ext) `position', `fontmap', `prop_name',
6701 `fixed_name' members removed. New members `prop_family',
6702 `fixed_family'. `family' member changed to type char *.
6703 (static var ps_fontmaps) Removed.
6705 (ps_init_driver) Removed obsolete references, updated.
6706 Initializes `translate_x', `translate_y', `scale'. Doesn't read
6707 fontmap, of course. Refers to font names through internal_name
6708 rather than subversive means. Frees proper items.
6709 (static var option_tab[]) Removed `fontmap-file' option; renamed
6710 `fixed-font', `prop-font'.
6711 (ps_option) Corresponds to option_tab[].
6712 (read_fontmap, release_fontmap, ps_to_dit, compare_ps2dit,
6713 hash_ps2dit, compare_dit2family, hash_dit2family, compare_family,
6714 hash_family) Removed.
6715 (postopen) Generates font names from family names. Gets
6716 PostScript font name properly. New prologue file comment `!!!'
6718 (ps_open_page) Adds translate_x, translate_y to BP prologue
6719 function; gives SF argument floating-point format.
6720 (ps_text_set_font_by_name) Doesn't try to map PostScript->Groff
6721 font name. Doesn't change font family.
6722 (ps_text_set_font_by_position) Generates Groff font name from font
6723 family name instead of through table lookup.
6724 (ps_text_set_font_by_family) Renamed `ps_text_set_font_family',
6725 all references changed. Reduced to simple string assignment.
6726 (ps_get_font_name) Removed.
6727 (ps_get_font_family) Reduced to string return.
6728 (text) Doesn't save `position' since it no longer exists. Ugly
6729 kluge to save font family--fix soon?
6730 (load_font) Removed PostScript name argument.
6732 Thu May 1 14:58:59 1997 Ben Pfaff <blp@gnu.org>
6734 * postscript.c: Comment fix.
6735 (ps_open_page) Puts scale factor in PostScript output.
6737 Sat Apr 26 11:49:32 1997 Ben Pfaff <blp@gnu.org>
6739 * Makefile.am: Distcleans q2c.
6741 Wed Apr 23 21:33:48 1997 Ben Pfaff <blp@gnu.org>
6743 * ascii.c: (delineate) Sets text size even if width is zero.
6745 * command.c: Comment fix.
6746 (static var cmd_table[]) Re-enabled EVALUATE command.
6747 (parse_cmd) Lotsa comment fixes. Fixed infinite loop in parsing
6748 of comments in script files. Now more liberal on criteria for
6749 performing a state transition--if *anything* happened correctly,
6750 not just if *everything* happened correctly.
6752 * data-out.c: (convert_F) Comment fix. Why in the fsck does
6753 Checker segfault on formatting large numbers and why in the fsck
6754 hadn't I noticed this before?
6756 * expr.h, exprP.h: No longer turn off GLOBAL_DEBUGGING.
6758 * list.q: (cmd_list) Commented out the actual output routine
6759 because of various problems. Probably will abandon the idea of
6760 using the general `crushed tables' for the LIST procedure.
6762 * temporary.c: (restore_dictionary) Sets var_by_name to NULL after
6763 clearing it. Allocates a new var_by_name dictionary before trying
6764 to add members to it.
6766 * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed argument
6767 `sib'. Changed type of `node' argument.
6768 [DEBUGGING] (dump_var_tree) Replaced avlwalk() with
6770 (clear_variable) Only dumps the var tree if var_by_name non-NULL.
6771 [DEBUGGING] Only deletes the variable from var_by_name if that var
6774 Fri Apr 18 16:48:41 1997 Ben Pfaff <blp@gnu.org>
6776 * Makefile.am: Added include files to SOURCES. Added
6777 frequencies.q to EXTRA_DIST. Removed include/ from INCLUDES. Now
6778 includes rules for q2c. Added `boast' target.
6780 Fri Apr 18 15:42:22 1997 Ben Pfaff <blp@gnu.org>
6782 * Makefile.am: Maintainer-clean Makefile.in.
6784 * Makefile.am: Fixed redundant EXTRA_DIST line.
6786 * ascii.c: Comment fixes.
6787 (ascii_line_vert) Fixed overly aggressive range check.
6789 * display.c: Removed dead code.
6791 * list.q: Turn debugging on.
6792 (flush_table) New debug code.
6794 * sfm-read.c: (read_value_labels) malloc's the structure before
6795 trying to assign to its members.
6797 * sfm-write.c: Comment fix.
6799 * som-high.c: (som_submit_table) Sets som.t and som.d on each call
6801 (output_table) No arguments anymore--gets them through `som'
6802 global. New debug code. In crushed tables, now sets `htv' as
6803 well as `hv' to avoid bad confusion later.
6804 (dump_crush_page) New debug code.
6806 * som-low.c: (som_dump_crush_page) New debug code.
6808 Thu Mar 27 01:11:29 1997 Ben Pfaff <blp@gnu.org>
6810 All source files: Broke long lines into multiple lines.
6812 * ascii.c: (ascii_close_page) Uses host_system var in place of
6813 HOST_SYSTEM constant.
6815 * cmdline.c: (var syntax_message[]) Broke into
6816 pre_syntax_message[] and post_syntax_message[].
6817 (usage) Outputs both parts, separated by driver list.
6819 * error.h: Fixed broken formatting.
6821 * expr-opt.c: (str_search, str_rsearch) New functions.
6823 * misc.c: (blp_getdelim) Removed. All references changed to
6825 (str_search, str_rsearch) Removed.
6826 (memrmem) New function.
6828 * misc.h: (blp_getline) Removed. All reference changed to
6833 * filename.c: Includes "stat.h", not <sys/stat.h>.
6834 (blp_getenv) Uses host_system var instead of HOST_SYSTEM constant.
6836 * output.c: (outp_list_classes) Changed output formatting.
6838 * sfm-write.c: (write_header) Uses host_system var instead of
6839 HOST_SYSTEM constant.
6840 (write_rec_7_34) Extracts version numbers from the version string.
6843 * sort.c: Includes "stat.h", not <sys/stat.h>.
6845 * str.c: (strcasecmp) Removed.
6847 * title.c: (cmd_document) Uses host_system var instead of
6848 HOST_SYSTEM constant.
6850 * version.c: Generated on-the-fly by the Makefile instead of being
6853 * str.h: Comment fixes. Doesn't substitute for missing memmove or
6855 [!HAVE_STRNCASECMP] Declares strncasecmp().
6857 * version.h: Removed stray character. Comment fixes.
6858 (vars host_system, build_system) New vars.
6860 Mon Mar 24 21:47:31 1997 Ben Pfaff <blp@gnu.org>
6862 * Most source files: Changed formatting of copyright notice; fixed
6863 FSF address; reformatted to better conform to GNU standards;
6864 comment fixes. Added markups to prevent GNU indent from messing
6865 up my beautiful formatting :-).
6867 * q2c.c: (get_line) Ignores lines that begin with `/* *INDENT' so
6868 that GNU indent markups can be passed through without problems.
6870 Wed Feb 19 21:30:31 1997 Ben Pfaff <blp@gnu.org>
6872 * get.c: Turned off debugging.
6874 * glob.c: (init_glob) Turned on save-file compression by default.
6876 * sfm-write.c: (sfm_write_case) Fixed bug which resulted in less
6877 compression than was possible in save files.
6879 Sun Feb 16 20:57:20 1997 Ben Pfaff <blp@gnu.org>
6881 * data-out.c: (convert_F) Comment fixes. Debug message fixes.
6883 * frequencies.q: Removed Fiasco extensions. Updated calculation
6884 algorithms. Polished output format.
6885 (struct frq_info_struct) Removed members `max_degree', `min_n',
6886 all references removed.
6887 (macro frq_extensions) Removed.
6888 (static vars min_n, max_degree) Removed, all references removed.
6889 (internal_cmd_frequencies) Doesn't handle extensions. Doesn't
6890 calculate `min_n', `max_degree'.
6891 (postcalc) Passes new arg to dump_statistics().
6892 (dump_full) Honor NOLABEL option. Buggy? Adds variable name
6894 (dump_condensed) Adds variable name title.
6895 (sum_freqs) Removed.
6896 (calc_stats) Updated calculation algorithm.
6897 (dump_statistics) Removed warning for too-few observations.
6898 Changed table formatting. Adds variable name title if passed new
6901 * output.h: Comment fix.
6903 * recode.c, sample.c, sort.c: Disabled debug code.
6905 * som-frnt.c: (som_set_value, som_set_float, som_set_text)
6906 Improved debug code.
6908 * var.h: (enum series frq_*) Removed Fiasco extensions.
6910 Sat Feb 15 21:26:53 1997 Ben Pfaff <blp@gnu.org>
6912 * command.c: Added PROCESS IF to command table.
6914 * Lots & lots of places, removed checks for NULLs preceding calls
6915 to free_expression(), which itself checks.
6917 * descript.q: Removed Fiasco extensions. Removed optimizations
6918 for non-weighted active files. Implemented some options.
6919 Finished polishing output format. Comment fixes. Merged
6921 (static vars n_glob_miss_list, n_glob_valid, n_glob_missing,
6922 max_degree, min_n) Removed.
6923 (macro dsc_extensions) Removed.
6924 (struct dsc_info_struct) Removed `min_n' member, all references
6926 (internal_cmd_descriptives) Removed calculation of min_n,
6927 max_degree. Only deals with one `calc' routine instead of two
6929 (precalc) Eliminated redundancy. Updated for changes to
6930 descriptives_proc structure.
6931 (calc) Moved here from `descript.g'. Rewritten to calculate
6932 statistics via `moments about the mean' rather than by summing,
6933 summing squares, summing cubes, and so on.
6934 (postcalc) Rewritten for new-style statistical calculation.
6935 (display) Removed support for displaying variables across rows.
6936 No longer crushes the descriptives table. Removed ancient code.
6937 Added display of N, by variable and listwise.
6939 * descript.g: Removed; merged into `descript.q'.
6941 * expr-evl.c: (evaluate_expression) Now returns a double. For
6942 numeric results, it returns the result as well as storing it in
6943 the passed `value' structure if non-NULL. For string results it
6944 just returns 0.0 and it must be passed non-NULL. Many references
6945 to this function were optimized by use of this change, especially
6946 but not exclusively in `compute.c'.
6948 * frequencies.g: Comment fix.
6950 * glob.c: (glob var process_if_expr) New global var.
6952 * postscript.c: (static var option_tab[]) Corrected entry for
6954 (postopen) Sets x->size to x->prop_size.
6955 (ps_text_set_font_by_name) Sets font size as well as typeface for
6956 PROP and FIXED fonts.
6958 * sel-if.c: (cmd_process_if) New function.
6960 * sfm-write.c: (struct sfm_fhuser_ext) New member `n_cases'.
6961 (sfm_write_dictionary) Sets `n_cases' to 0.
6962 (sfm_write_case) Increments `n_cases'.
6963 (sfm_close) Attempts to seek the system file back to the header
6964 and write the number of cases in its proper slot.
6966 * som-frnt.c: (som_insert_table) Masks off expansion options since
6967 only SOPT_X_NORM seems to work sensibly.
6969 * som-low.c: (get_cell_size) Fixed bug when a table cell was sized
6970 with a `fixed' value of 2.
6972 * sort.c: (cmd_sort_cases) Cancels PROCESS IF.
6974 * sysfile-info.c: (cmd_sysfile_info) Doesn't display more than 10
6975 value labels; uses SOPT_NONE instead of SOPT_X_BOTH.
6977 * var.h: (enum series dsc_*) Removed Fiasco extensions.
6978 (struct descriptives_proc) Removed `miss_noweight'; new members
6979 `X_bar', `M2', `M3', `M4', `min', `max'.
6981 * vars-atr.c: (discard_variables) Cancels PROCESS IF.
6983 * vfm.c: (close_active_file) Cancels PROCESS IF.
6984 (write_case) Doesn't process cases unselected by PROCESS IF.
6986 Fri Feb 14 23:32:58 1997 Ben Pfaff <blp@gnu.org>
6988 * glob.c: (glob var err) Removed.
6990 * sysfile-info.c: (cmd_sysfile_info) When adjusting table size,
6991 doesn't have to take into account number of value labels since
6992 they're in a subtable anyway. Also, doesn't display more than 10
6993 value labels since we can't yet break pages in subtables.
6995 Tue Feb 4 15:15:50 1997 Ben Pfaff <blp@gnu.org>
6997 * som-frnt.c: (som_change_table_size) Simple change for elegance
6998 that shouldn't change behavior.
6999 (som_set_value) Comment fix.
7001 * som-high.c: (som_submit_table) Message fix.
7003 Wed Jan 22 21:54:00 1997 Ben Pfaff <blp@gnu.org>
7005 * command.c: Added SYSFILE INFO to command table.
7007 * file-handle.q: (fh_handle_filename) New function.
7009 * get.c: (save_trns_proc) Fixed a bug in padding of output data
7012 * main.c: (parse) New return value for command functions, -3.
7014 * misc.h: Comment fix.
7016 * output.h: Comment fixes.
7017 (macro COMPONENTS) Removed.
7019 * postscript.c: (write_text) Modified literal_chars[] so that `('
7020 and ')' are not written to the output in strings as literals.
7022 * sfm-read.c: (sfm_read_dictionary) New argument.
7023 (read_header) New argument. Sets the information structure's
7024 values from the header information.
7025 (read_variables) [__CHECKER__] Redefines isalnum()--some sort of
7026 bizarre Checker problem, I guess.
7027 (read_variables) Proper cleanup on lossage.
7029 * sfm.h: (struct sfm_read_info) New struct for use by
7030 sfm_read_dictionary().
7032 * som-frnt.c: (som_create_table) New argument CREATE_FLAGS,
7033 currently used just for tables that can be dynamically resized and
7034 thus have to be allocated with arena_malloc() instead of
7035 arena_alloc(). All references changed.
7036 (som_change_table_size) New function.
7037 (som_insert_table) Bugfix: now inserts `cell', not `c'!
7039 * som-high.c: [GLOBAL_DEBUGGING] (check_table) Moved to som-low.c.
7040 (som_submit_table) [GLOBAL_DEBUGGING] Doesn't call check_table()
7043 * som-low.c: (draw_cell) Calls draw_table_cell() for SCON_TABLE
7045 (draw_intersection) Now takes an argument specifying the table in
7046 question. All references changed.
7047 (draw_table_cell) New function.
7048 (som_get_table_size) [GLOBAL_DEBUGGING] Calls check_table().
7049 (som_get_table_size) Many nice new explanatory comments.
7050 [GLOBAL_DEBUGGING] (check_table) Moved here from som-high.c.
7052 * som.h: New enum series SOM_CREATE_* for use as create flags with
7055 * str.h: Moved a comment here from TODO.
7057 * sysfile-info.c: New file. Reference implementation.
7059 Sun Jan 19 14:22:11 1997 Ben Pfaff <blp@gnu.org>
7061 * command.c: Added RENAME VARIABLES to table of commands.
7063 * data-in.c: (dls_error) Sets `cust_field'.
7064 (parse_N) Message fix.
7065 (parse_day_count) New function.
7066 (to_roman) Never outputs VX as a `short form' of V.
7067 (parse_month) Fixed parsing of Roman numerals.
7068 (parse_trailer) Message fix.
7069 (parse_DATE, parse_ADATE, parse_EDATE, parse_SDATE, parse_JDATE,
7070 parse_QYR, parse_MOYR, parse_WKYR, parse_DTIME) Issue a message if
7071 the date is invalid.
7072 (parse_SDATE) Fixed swapped day, year.
7073 (parse_JDATE) Fixed bug for dates in 1582.
7074 (parse_DTIME) Allows days not between 1 and 31.
7075 (parse_numeric) Makes local copy of f.type for easier usage.
7078 * data-out.c: (convert_F) When outputting as scientific, properly
7079 sets f.type as fp->type.
7080 (insert_commas) Fixed operator precedence problem with setting of
7081 nitems. Changed strcpy to memcpy (no null terminator).
7082 (convert_date) Fixed FMT_JDATE: added 1900 to year.
7083 (convert_CCx) Essentially rewritten, but now it works.
7085 * display.c: (cmd_display) Added DISPLAY FILE LABEL (undocumented
7087 (display_documents) Implemented.
7089 * error.c: (glob var cust_field) New var.
7090 (vmsg) Displays cust_field as part of message classes DE and DW.
7092 * formats.c: (debug_print) Fixed to compile under updated
7095 * get.c: (cmd_get, cmd_save_internal) Close file handle on
7098 * misc.c: (parse_format_specifier) Formatting fix.
7100 * modify-vars.c: (struct var_modification) Renamed `n_reorder' as
7101 `n_rename' for clarity.
7102 (cmd_modify_vars) Initializes `forward' and `positional' at
7103 appropriate times. Frees lists of vars to rename on failure.
7104 Comment fix. Frees memory on success.
7105 (rearrange_dict) Simplified `for' loop condition.
7107 * rename-vars.c: New file (reference implementation).
7109 * set.q: (internal_cmd_set) Fixed `emu' test condition.
7111 * sfm-read.c: (read_header) File label is created only if file
7112 label in file is not blank.
7113 (read_variables) Initializes `dict' local variable.
7114 (read_documents) Proper behavior on lossage.
7116 * sfm-write.c: (write_header) Doesn't blank out the file label
7117 (why was this here to begin with?!)
7119 * temporary.c: (save_dictionary) File label is copied only if
7120 non-NULL. Doesn't try to xstrdup() dictionary documents.
7121 Adapted so as to not irritate Checker.
7122 (free_dictionary) Only destroys var_by_name if non-NULL.
7124 * title.c: (cmd_file_label) Doesn't skip FILE, LABEL tokens.
7125 (cmd_document) Doesn't skip DOCUMENT token. Adds some header
7126 lines to the document, indents the document. Also, it works now.
7127 (add_document_line) New function.
7129 * var.h: (struct dictionary) Reordering.
7131 * vars-prs.c: (parse_variables) On lossage, only local_free()'s
7132 bits if it was allocated to begin with.
7134 Thu Jan 16 13:08:57 1997 Ben Pfaff <blp@gnu.org>
7136 * command.c: Added MODIFY VARS to list of commands.
7138 * configure.in: Updated custom macros for autoconf 2.12. Removed
7139 mmap reference; fixed termcap library reference.
7141 * display.c: (display_variables) Fixed a few bugs although it's
7142 still not well written.
7144 * error.c: [!__CHECKER__] (chkr_disp_call_chain) New function.
7145 (induce_segfault) Calls chkr_disp_call_chain() instead of
7146 inducing an actual SIGSEGV.
7148 * expr-opt.c: (evaluate_tree) Swapped order of arguments to
7149 str_search() and str_rsearch(). Fixed tests for matches on
7150 OP_INDEX and OP_RINDEX.
7152 * filename.c: (good_getcwd) Removed as the new libc for Checker
7153 doesn't contain this bug, apparently.
7155 * misc.c: (str_search, str_rsearch) Changed order of arguments for
7156 consistency with GNU memmem.
7157 (blp_getdelim) Changed `len' from `int' to `size_t'.
7159 * modify-vars.c: Reference implementation.
7161 * som-frnt.c: (zero_length) New global var.
7162 (som_create_table) Message fix.
7164 * som.h: Added gcc attributions to som_set_text(),
7165 som_output_text() prototypes. blank_line() refers to
7166 zero_length[] instead of a literal null string to suppress gcc
7169 * sort.c: (do_external_sort) Fixed fencepost error on lossage.
7170 (allocate_cases) Decrements x_max so the last element of x[] can
7171 be used by the algorithm.
7173 * var.h: Changed minor details of `variable' declaration.
7174 (struct modify_vars_proc) New struct.
7175 (struct variable) Added field p.mfv.
7177 * vars-atr.c: Comment fix.
7179 * vars-prs.c: (fill_all_vars) More optimal implementation.
7181 * vfm.c: (dump_splits) Sets the last byte of temp_buf to a null
7182 character, which it shouldn't have to do but printf() seems to
7183 read the null byte even though I supply a maximum length...
7185 Fri Jan 10 20:22:08 1997 Ben Pfaff <blp@gnu.org>
7187 * command.c: Removed command alias X for QUIT.
7188 (parse_cmd) Fixed comment parsing.
7190 * dfm.c: (struct dfm_fhuser_ext) Fields `len', `size' are now of
7192 (read_record) Fixed references to len, size.
7193 (dfm_get_record) Restructured.
7195 * file-handle.h: (struct file_handle) Field `lrecl' now of type
7198 * file-handle.q: (internal_cmd_file_handle) Checks for nonpositive
7201 * modify-vars.c: New file. Not complete.
7203 * set.q: (set_ccx) Fixed operator precedence problem regarding ^
7206 * sfm-read.c: (bswap_flt64, read_header, write_variable) Fixed
7207 problems caused by int/size_t differences.
7209 * sort.c: (output_record, merge_once) Cast `size_t's to `int's in
7212 * str.c: (strcasecmp) Fixed bug that cropped up when the strings
7213 being compared were of equal length.
7215 Thu Jan 2 19:08:23 1997 Ben Pfaff <blp@gnu.org>
7217 * command.c: Added DOCUMENT, DROP DOCUMENTS, FILE LABEL.
7219 * lexer.c: (get_dotted_rest_of_line) New function.
7221 * sel-if.c: (cmd_filter) Cannot choose string or scratch variables
7224 * sfm-read.c: (sfm_read_dictionary) Calls read_documents() to read
7225 type 6 records. Frees the dictionary properly.
7226 (read_header) Initializes the dictionary instead of letting
7227 read_variables() do it. Sets the dictionary file label from the
7229 (read_documents) New function.
7231 * sfm-write.c: (sfm_write_dictionary) Calls write_documents() to
7232 write type 6 record if appropriate.
7233 (write_header) Writes file label from dictionary.
7234 (write_documents) New function.
7236 * temporary.c: (save_dictionary, restore_dictionary,
7237 free_dictionary) Properly handle new fields in dictionary struct.
7239 * title.c: (get_title) Returns after failure().
7240 (cmd_file_label, cmd_document, cmd_drop_documents) New functions
7241 for new commands FILE LABEL, DOCUMENT, DROP DOCUMENTS. Untested.
7243 * var.h: (struct dictionary) New fields `label', `n_documents',
7246 Wed Jan 1 22:08:10 1997 Ben Pfaff <blp@gnu.org>
7248 * command.c: Added FILTER to list of commands.
7250 * frequencies.g: [WEIGHTING] Removed test for weighting!=-1 since
7253 * get.c: (cmd_save_internal) Removed weighting code since it's now
7254 handled by sfm-write.c. Properly commented out debug code.
7256 * glob.c: (glob var weighting) Removed.
7258 * sel-if.c: Comment fixes.
7259 (cmd_filter) New function.
7261 * sfm-read.c: (struct sfm_fhuser_ext) New field `weight_index'.
7262 (sfm_read_dictionary) Sets weighting variable direct in the
7263 created dictionary now. (Apparently we previously didn't support
7265 (read_header) Sets weight_index field in sfm_fhuser_ext from
7266 header read from disk.
7268 * sfm-write.c: (sfm_write_dictionary) Comment fix.
7269 (write_header) Now sets the weighting in the header from the
7270 passed primary dictionary instead of from the sfm_write_info.
7272 * sfm.h: (struct sfm_write_info) Removed field `weight'.
7274 * som-high.c: (dump_crush_table) Fixed a couple of assertions that
7275 broke on boundary conditions.
7277 * var.h: (struct dictionary) New fields `weight_var',
7278 `weight_index', and `filter_var'.
7279 (glob var weighting) Removed. This is now part of struct
7280 dictionary. All references changed; the less mechanical changes
7281 are described above.
7283 * vars-atr.c: (find_dict_variable) New function.
7285 * vfm.c: (static var filter_index) New variable.
7286 (open_active_file) Initializes filter_index from default_dict.
7287 (write_case) Calls proc_func() only if the filter variable is
7288 nonzero; this implements FILTER behavior.
7290 * weight.c: (static var weight_varname) Removed.
7291 (cmd_weight) Modified default_dict instead of glob vars.
7292 (update_weighting) Changed the signature to modify a dictionary
7293 instead of glob vars. Now returns the weighting variable.
7294 (get_weighting_variable) Removed; its function is absorbed by
7296 (stop_weighting) Operates on a dictionary now.
7298 Wed Jan 1 17:00:59 1997 Ben Pfaff <blp@gnu.org>
7300 * sort.c: Removed debugging info from messages.
7301 (do_external_sort) Cleans up after itself by deleting the
7302 temporary directory on failure. (On success it is deleted by the
7304 (allocate_cases) Removed debug code. Added clean up code.
7305 (output_record) Removed debug code.
7306 (merge) Added code to close all the input files that are currently
7307 open. This is a likely location for bugs, because I'm not sure
7308 about boundary conditions. Removed an unnecesary heap_delete().
7309 (merge_once) Removed input file "optimization" that in fact
7310 screwed up the rest of the code. Message and comment fixes.
7312 Sun Dec 29 21:36:48 1996 Ben Pfaff <blp@gnu.org>
7314 * error.c: [__CHECKER__] (induce_segfault) Flushes output streams.
7316 * heap.c: (heap_delete) New argument.
7318 * sort.c: Finished implementation of external sort.
7320 * vfm.c: (read_from_disk) Returns after a disk error.
7322 Sun Dec 22 23:10:39 1996 Ben Pfaff <blp@gnu.org>
7324 * sort.c: (static var state) Removed.
7325 (static vars max_handles, tmp_basename, tmp_extname,
7326 huffman_queue) New variables.
7327 (do_external_sort) Moved most code to new functions.
7328 Creates huffman_queue.
7329 (allocate_file_handles, allocate_cases) New functions.
7330 (static vars run_no, run_length, file_index, case_count) New
7332 (output_record) Returns success. Now really writes to the output
7334 (begin_run, end_run) New functions.
7335 (write_initial_runs) Returns success. Initializes run_no to -1.
7336 Calls begin_run(), end_run() at appropriate times. Outputs debug
7338 (write_to_sort_cases) Calls begin_run(), end_run() at appropriate
7340 (merge) New function.
7342 * heap.c, heap.h: New files. Hopefully in near-final form.
7344 Sat Dec 21 21:51:04 1996 Ben Pfaff <blp@gnu.org>
7346 * glob.c: Added write_active_file to global vars.
7348 * sort.c: Several new miscellaneous static variables.
7349 (cmd_sort_cases) Big comment fix.
7350 (perform_case_2) Renamed `do_external_sort' and completely
7352 (case_2_proc_func) Removed.
7353 (output_record, write_initial_runs, write_to_sort_cases,
7354 compare_record) New functions.
7356 * vfm.c: [DEBUGGING] (index_to_varname) Excised bit rot.
7358 Tue Dec 17 18:57:59 1996 Ben Pfaff <blp@gnu.org>
7360 * sort.c: (perform_case_2) Changed the method for allocation of
7361 lots of memory--now allocates one case at a time in hopes that
7362 more cases can be allocated with heavily fragmented memory.
7364 * var.h: (write_active_file) New global var.
7366 * vfm.c: (procedure, close_active_file, write_case,
7367 SPLIT_FILE_procfunc) Now allow beginfunc, procfunc, and endfunc
7368 arguments to procedure() to be NULL. All references to
7369 procedure() that made use of dummy functions were changed to NULL
7371 (open_active_file) If write_active_file is non-NULL, the output
7372 device becomes DEV_PGM (a new enum).
7373 (close_active_file) Sets write_active_file to NULL.
7374 (read_from_memory) Comment fix.
7375 (record_case) Calls write_active_file() when the output device is
7378 Sun Dec 15 15:32:16 1996 Ben Pfaff <blp@gnu.org>
7382 * autorecode.c: (cmd_autorecode) Fixed parsing of options.
7383 Fixed checking for duplicate varnames.
7384 (recode) xmalloc()'s the transformation instead of arena_alloc()'ing
7386 (autorecode_trns_free) Destroys hash tables for each recoding
7388 (autorecode_proc_func) Compares NULL to *vpp instead of vpp.
7390 * command.c: Added SORT CASES to cmd_table.
7391 (null_func, null_int_func) Prototyped.
7393 * descript.g: (calc_weight, calc_noweight) Computes own case
7396 * frequencies.q: (dump_statistics) Fixed problem with
7397 too-few-cases warning message.
7399 * get.c: (cmd_save_internal) Handles weighting properly.
7401 * hash.c: (hsh_dump) Output format changed.
7402 (force_hsh_insert) Actually works now, prototype changed.
7404 * list.q: (static var case_num) New variable.
7405 (cmd_list) Initializes case_num.
7406 (list_cases) Increments case_num.
7408 * var.h: Added definitions for SORT CASES. Comment fixes.
7410 * vfm.c: Some definitions moved to new file vfmP.h. Comment
7411 fixes. `active' renamed vfm_active, `rep' renamed
7412 vfm_replacement, all references changed.
7413 (procedure) The procfunc no longer receives a case number. All
7415 (write_case) Subtle reordering.
7416 (SPLIT_FILE_procfunc) Counts cases differently. Slightly less
7419 * weight.c: (get_weighting_variable) New function.
7421 * vfmP.h: New file with definitions from vfm.c.
7423 Sat Dec 14 10:35:30 1996 Ben Pfaff <blp@gnu.org>
7425 * command.c: (FILE_TYPE_okay) Commented out some tests because
7426 they're clumsy and not yet needed.
7428 * var.h: Most *_trns structures moved to their respective source
7429 files. Some were moved into a new file, do-ifP.h. Comment fixes.
7430 (union any_trns) Changed to a typedef for trns_header.
7431 (struct input_program_pgm) Removed.
7433 * vars-prs.c: (parse_variables) Only local_free()'s bits if it
7434 was allocated in the first place.
7436 Fri Dec 13 21:30:53 1996 Ben Pfaff <blp@gnu.org>
7438 * autorecode.c: New file.
7440 * command.c: Added AUTORECODE to command table; re-enabled SET.
7442 * data-out.c: (convert_F) Handles infinities and NaNs properly.
7444 * error.c: (vmsg) Comment fixes.
7446 * hash.c: Comment fix.
7447 (hashpjw_d) New function.
7448 (hashpjw) Reimplemented as call to more general function
7450 (internal_comparison_fn) Initializes pointers properly.
7451 (hsh_sort) [GLOBAL_DEBUGGING] New debugging code.
7452 (force_hsh_insert, force_hsh_find) New debugging wrapper
7455 * main.c: (main) Message fix.
7457 * output.c: (outp_read_devices) Message fix.
7459 * set.q: Comment fixes.
7460 (custom_results) Implemented Wnd/X form of subcommand.
7461 (set_routing) New function.
7462 (internal_cmd_set) Implemented ERRORS, MESSAGES.
7464 * settings.h: (SET_ROUTE_*) New enum series.
7465 (set_results) Renamed set_results_file, all references changed.
7466 (set_messages) Removed.
7467 (glob vars set_errors, set_messages, set_results) New vars.
7469 * title.c: (get_title) Remembers to xstrdup() the result of
7472 * var.h: (arc_item, arc_spec, autorecode_trns) New structures for
7474 (union any_trns) New element `arc'.
7476 Fri Dec 6 23:53:47 1996 Ben Pfaff <blp@gnu.org>
7478 * command.c: (output_line) Removed references to set_screen.
7480 * error.c: (static var terminating) New var.
7481 (hcf) Sets terminating to 1.
7482 (vmsg) If terminating is nonzero, does not attempt to call hcf().
7483 This prevents an infinite loop if an error occurs within hcf().
7485 * expr-evl.c: (evaluate_expression) [__CHECKER__] Replaced case
7486 statement circumlocution with `case 42000' trick.
7487 (evaluate_expression) New support for OP_STR_MIS.
7489 * expr-opt.c: (evaluate_expression) [__CHECKER__] Replaced case
7490 statement circumlocution with `case 42000' trick.
7491 (dump_node) Handles OP_STR_MIS.
7493 * expr-prs.c: (MISSING_func, SYSMIS_func) Rewrote to handle string
7494 variables exceptions.
7495 (parse_function) Message fix.
7496 (ops[]) Added OP_STR_MIS.
7498 * expr.h: Added OP_STR_MIS to OP_* enum. Comment fixes.
7500 * exprP.h: [__CHECKER__] Removed case statement circumlocution.
7502 * glob.c: Removed set_scrnfile glob var.
7503 (init_glob) set_errorbreak set to 0 by default.
7505 * groff-font.c: Changed included files.
7506 (groff_read_font) Initializes font_arena local var correctly.
7507 (default_font) New function.
7509 * output.c: Comment fixes.
7510 (glob var disabled_devices) New variable.
7511 [GLOBAL_DEBUGGING] (static var iterating_driver_list) New
7513 [GLOBAL_DEBUGGING] (reentrancy) New function.
7514 [GLOBAL_DEBUGGING] (outp_read_devices, outp_done, find_driver,
7515 outp_iterate_enabled_drivers) Calls to reentrancy().
7516 (destroy_list) New function.
7517 (outp_done) Moved code to destroy_list().
7518 (parse_options) Parses `listing', `screen', `printer' options
7520 (configure_driver) Sets new `device' member of driver.
7521 (outp_iterate_enabled_drivers, outp_enable_device) New functions.
7523 * output.h: Comment fixes. New enum series OUTP_DEV_*.
7524 (struct outp_driver_struct) New member `device'.
7526 * postscript.c: (find_encoding_file) Doesn't display its own error
7528 (default_encoding) New function.
7529 (switch_font) Calls default_encoding() if no encoding can be
7531 (text) Makes up a character metric if none exists for the desired
7533 (load_font) Properly copies a fallback filename. Calls
7534 default_font() for a font if none at all are known.
7536 * set.q: Comment fixes. Removed OUTPUT subcommand.
7537 (custom_listing) Calls outp_enable_device() to enable/disable
7539 (turn_screen_on) Removed.
7540 (internal_cmd_set) Calls outp_enable_device() to enable/disable
7541 screen, printer devices.
7543 * settings.h: Comment fixes.
7544 (glob vars set_output, set_printer, set_screen, set_scrnfile)
7547 * som-high.c: (som_submit_table, som_eject_page) Use
7548 outp_iterate_enabled_drivers() instead of iterating
7549 outp_driver_list directly.
7551 Wed Dec 4 21:34:17 1996 Ben Pfaff <blp@gnu.org>
7553 * data-in.c: (parse_EDATE, parse_SDATE) New functions.
7554 (parse_string_as_format) Handles new formats.
7555 (parse_numeric) Now handles DOT and PCT formats.
7557 * data-out.c: (convert_E, convert_F, insert_commas) Handle DOT
7559 (convert_date) Handle EDATE and SDATE formats.
7560 (convert_CCx) Now if there's not room for the currency characters,
7561 converts it as F format if it's positive instead of giving up
7562 quickly. Also fixed save-and-restore bug with decimal point
7564 (convert_format_to_string) Handles new formats.
7566 * misc.c: (formats[]) Added new formats.
7567 (convert_fmt_ItoO) Supports new formats.
7569 * sfm-read.c: (parse_format_spec) Supports new formats. Better
7570 data checking. New argument, all references changed.
7572 * sfm-write.c: (write_format_spec) Supports new formats.
7574 * var.h: New formats FMT_DOT, FMT_PCT, FMT_EDATE, FMT_SDATE.
7577 Sun Dec 1 17:19:00 1996 Ben Pfaff <blp@gnu.org>
7579 * cmdline.c: Comment fixes.
7580 (parse_command_line) Changed return type to void.
7582 * data-in.c: (parse_string_as_format) Added FMT_CCA...FMT_CCE to
7584 (parse_numeric) Handles international numbers (comma as decimal
7585 point). Some reformatting.
7587 * data-list.c: (parse_free) Default output format is now
7588 set_format instead of hard-coded F8.2.
7589 (read_from_data_list_list) Emits error message on undefined data
7590 only if set_undefined is nonzero.
7592 * data-out.c: (convert_E) Changes decimal point from period to
7593 comma if appropriate. Restructured. Better comments.
7594 (convert_F) Changes decimal point from period to comma if
7596 (insert_commas) Major bug with handling of negative values fixed.
7597 Also, inserts periods instead of commas if appropriate.
7598 (convert_CCx) New function.
7599 (convert_format_to_string) Added FMT_CCA...FMT_CCE to switch.
7600 (num_to_string) Changed `.' to set_decimal.
7602 * dfm.c: Comment fixes.
7603 (dfm_close) Frees ext->line even in inline_file.
7604 (open_inline_file) New function.
7605 (open_file_r) When opening the inline file: now properly
7606 recognizes `BEGIN DATA.' line, and calls open_inline_file() to
7608 (read_record) Calls fh_close_handle() instead of dfm_close() to
7609 close the inline file. Makes a copy of the line getl_buf to avoid
7611 (dfm_get_record) Restructured. Now checks the return value of
7613 (cmd_begin_data) Moved open code into open_inline_file(). Relaxed
7614 checking for use of inline file. No longer tries to close inline
7617 * error.c: (glob var error_already_flagged) New var.
7618 (vmsg) Message change. Now checks max number of errors/warnings,
7621 * file-handle.q: (fh_handle_name) Now allows closing of
7623 (fh_init_files) Reformatted.
7625 * get.c: (trim_dictionary) Checks SCOMP option instead of COMP.
7627 * getline.c: (getl_include) Fixed bug that popped up when called
7628 when file queue was empty.
7629 (read_console) Resets error_count, warning_count,
7630 error_already_flagged to zero.
7632 * glob.c: Many changes to update list of variables.
7633 (init_compat_dependent) Now this function is called whenever
7634 `compat' changes. It now sets set_seed only if it hasn't
7635 previously been referenced. It now calls
7636 lex_init_compat_dependent().
7638 * include.c: (cmd_include_at) Frees temporary buffer instead of
7640 (cmd_include) Doesn't make copy of include file name.
7642 * lexer.c: Comment fixes.
7643 (init_lex) Moved some code into new function
7644 lex_init_compat_dependent().
7645 (lex_init_compat_dependent) New function.
7646 (hex_val) Simplified.
7647 (preprocess_line) Uses set_endcmd instead of hardcoding `.'.
7649 * main.c: Comment fixes.
7652 * misc.c: (formats[]) Added FMT_CCA...FMT_CCE.
7653 (check_input_specifier) Disallows FMT_CCA...FMT_CCE.
7654 (convert_fmt_ItoO) Detects FMT_CCA...FMT_CCE.
7655 (setup_randomize) Sets set_seed_used.
7657 * set.q: Comment fixes.
7658 (custom_results) Conditionalizes on `compat'.
7659 (custom_log) Calls custom_journal().
7660 (set_ccx) New function.
7661 (cmd_set) Calls init_compat_dependent() when `compat' changes.
7662 Calls set_ccx() to handle CCA...CCE. Sets set_grouping
7663 when set_decimal changes. Range-checks values for MITERATE,
7664 MNEST. Message fixes.
7666 * settings.h: Comment fixes.
7667 (struct set_cust_currency) New struct.
7668 (set_cc[], set_grouping, set_seed_used) New global vars.
7670 * var.h: (FMT_CCA...FMT_CCE) New output formats.
7671 (FCAT_OUTPUT_ONLY) New FCAT_* constant.
7673 Thu Nov 28 23:14:07 1996 Ben Pfaff <blp@gnu.org>
7675 * glob.c: Revised variables to correspond to settings.h.
7676 (init_glob) Initializes variables from settings.h properly.
7678 * set.q: Began long-overdue major revision to correspond to new
7679 philosophy. Most code changed.
7681 * settings.h: Mostly changed; reorganized, reordered, large new
7684 Thu Nov 28 19:46:10 1996 Ben Pfaff <blp@gnu.org>
7686 * get.c: (cmd_save_internal) No longer forces compression off.
7688 * sfm-read.c: (read_compressed_data) If eof is reached when
7689 reading a new instruction octet, only signal error if we're in the
7692 * sfm-write.c: (COMPRESSION_BIAS) New #define.
7693 (struct sfm_fhuser_ext) New member `end'.
7694 (write_header) Refers to COMPRESSION_BIAS instead of magic 100.0.
7695 (ensure_buf_space) New function.
7696 (sfm_write_case) Reimplemented in order to support compression.
7697 (sfm_close) Writes out the remaining contents of the compression
7700 Wed Nov 27 23:18:35 1996 Ben Pfaff <blp@gnu.org>
7702 * command.c: Defined SAVE and XSAVE commands in command table.
7704 * common.h: second_lowest_value is of type flt64, not double.
7706 * file-handle.h: Comment fix.
7708 * get.c: Comment fixes.
7709 (static var `trns') New.
7710 (save_write_case_func, save_trns_proc, save_trns_free, null_func,
7711 cmd_save_internal, cmd_save, cmd_xsave) New functions.
7712 (dict_delete_run) Clears the variables and frees them now.
7713 (trim_dictionary) Sets default for compression.
7714 On KEEP subcommand, frees deleted variables as well as clearing
7715 them. Finally got the sense of the test for deleting all
7717 [DEBUGGING] (dump_dict_variables) Message fix.
7719 * glob.c: (init_glob) set_compression set to 1 by default.
7721 * list.q: Properly #includes config.h.
7723 * misc.h: New macro REM_RND_UP.
7725 * settings.h: Comment fix.
7727 * sfm-read.c: (structs sysfile_header, sysfile_format,
7728 sysfile_variable; inline function bswap_int32) Moved to new file
7730 (corrupt_msg) [__CHECKER__] No longer induces segfault.
7731 (sfm_read_dictionary) Fixed bug caused by failing to initialize
7733 (read_machine_flt64_info) Fixed some problems caused by confusion
7734 between flt64 and double types.
7735 (read_header) Message fix.
7736 (read_variables) Fixed set of cases in which we byte-swap sv.print
7737 and sv.write. Fixed confusion of flt64 and double.
7739 * sfm.h: (struct sfm_write_info) New.
7741 * som-high.c: (som_draw_title) Properly frees `s'.
7743 * temporary.c: (save_dictionary) Comment fix.
7745 * var.h: Comment fixes. New FMT_* enum, FMT_NUMBER_OF_FORMATS.
7746 (struct trns_header) Formatting fix.
7747 (struct save_trns) New.
7749 * vars-atr.c: (discard_variables) Comment fix.
7751 * sfm-write.c: New file, baseline release.
7753 * sfmP.h: New file, baseline release.
7755 Sun Nov 24 14:53:53 1996 Ben Pfaff <blp@gnu.org>
7757 * cmdline.c: (parse_command_line) `--version' output updated.
7758 (glob var syntax_message[]) Added my e-mail address.
7760 * file-handle.q, lexer.c, vfm.c: Changed many instances of
7761 `illegal' to `invalid'.
7763 * sfm-read.c: (struct sfm_fhuser_ext) New fields used as
7764 uncompression buffer.
7765 (sfm_close) Frees decompression buffer.
7766 (sfm_read_dictionary) Initializes decompression buffer.
7767 (buffer_input, read_compressed_data) New functions.
7768 (sfm_read_case) Restructured; now calls read_compressed_data() to
7769 handle compressed system file data.
7771 * var.h: Comment fix.
7773 Mon Nov 11 15:34:09 1996 Ben Pfaff <blp@gnu.org>
7775 * dfm.c: (dfm_close) Does not set h->{ext,class} because the
7778 * get.c: New comments. New static var `get_file'.
7779 (cmd_get) Now fully implemented. Calls discard_variables();
7780 initializes fv and lv for all variables; new debug code; sets
7781 up the dictionary; sets up the input program.
7782 (read_from_get, cancel_get) New functions.
7784 * sfm-read.c: Comment fixes.
7785 (sfm_close) New static function.
7786 (sfm_read_dictionary) Properly sets up the class of the
7787 file_handle. No longer cares what size the data is in records of
7788 type 7. Also, on failure, properly cleans up the file_handle and
7790 (read_variables) No longer thinks it knows `nval' of the
7791 dictionary. Now sets p.get.fv, etc., instead of speculatively
7793 (read_value_labels) Fixed off-by-one error in indexing of
7795 (sfm_read_case) New function.
7796 (sfm_r_class) New static var.
7798 * var.h: (get_proc) New struct.
7799 (struct variable) New member p.get.
7801 Thu Nov 7 20:52:28 1996 Ben Pfaff <blp@gnu.org>
7803 * get.c: Removed GTSV_OPT_MAP because of a misinterpretation of
7804 the manual's meaning.
7805 (rename_variables) New function.
7806 (trim_variables) Doesn't try to parse MAP any more. Removed debug
7807 code. Now properly reorders the dictionary on the KEEP keyword.
7809 * sfm-read.c: (read_value_labels) Fixed some bugs regarding
7812 * vars-atr.c: (clear_variable) New argument `dictionary *'.
7813 (rename_variable) New function.
7814 (free_val_lab) Reformatted.
7816 Thu Nov 7 17:29:16 1996 Ben Pfaff <blp@gnu.org>
7818 * var.h: Reindented entire file. Comment fixes.
7819 (glob vars var, var_by_name, nvar, N, nval, n_splits, splits)
7821 (glob var default_dict) New.
7822 (struct indirect_dictionary) Removed.
7824 * Many other source files were changed to add `default_dict.'
7825 before all references to the dictionary of the active file.
7827 * vars-atr.c: (make_indirect_dictionary) Removed.
7829 * glob.c: Reindented all variable declarations. Updated for
7830 changed var.h. Comment fixes.
7832 * temporary.c: (restore_dictionary, save_dictionary) Simplified
7833 because now we can mainly copy dictionary structs.
7835 * vars-prs.c: (is_dict_varname, parse_dict_variable,
7836 parse_variables) Takes dictionary instead of indirect_dictionary
7838 (parse_variables) Instead of calling make_indirect_dictionary,
7839 just sets DICT to &default_dict if DICT is NULL. Of course, lots
7840 of `*dict.' references had to be changed to `dict->'. Removed
7843 Thu Nov 7 15:48:52 1996 Ben Pfaff <blp@gnu.org>
7845 * get.c: Added GTSV_OPT_* series of enums.
7846 (trim_dictionary, dict_delete_run) New functions.
7847 [DEBUGGING] (dump_dict_variables) New function.
7848 (cmd_get) Calls trim_dictionary() to get dictionary fully set-up.
7849 [DEBUGGING] Calls dump_dict_variables() to display results.
7851 * glob.c: (cmp_variable) Now a public function declared in var.h.
7853 * sfm-read.c: Turned off debug code. Comment fixes.
7854 (read_machine_int32_info, read_machine_flt64_info) New functions
7855 to parse type 7 records.
7856 (sfm_read_dictionary) Properly byteswaps several fields now.
7857 Calls read_machine_*_info() to parse type 7 subtypes 3 and 4
7858 records. [DEBUGGING] Dumps dictionary.
7859 (read_variables) Sets `index' field of variables created properly.
7860 Constructs avl tree of variables in dictionary. [DEBUGGING] No
7861 longer dumps dictionary.
7862 (read_value_labels) Properly byteswaps fields. [DEBUGGING] New
7864 [DEBUGGING] (dump_dictionary) No longer stubbed out.
7866 * temporary.c: (restore_dictionary) Destroys `var_by_name' glob
7867 var before destroying any variables just to save a little time.
7869 * var.h: (struct variable) Reordered in order to make name[] the
7870 first member; this makes pointers to `variable' pointers to the
7871 variable name, simplifying avl trees, etc.
7872 (struct indirect_dictionary) New struct.
7874 * vars-atr.c: (find_variable) Rewritten for efficiency.
7875 (make_indirect_dictionary, is_dict_varname, parse_dict_variable)
7877 (is_varname) Rewritten for efficiency.
7878 (parse_variables) New argument, which is a `dictionary *'. All
7879 references changed. This function now reads variable names from
7880 the dictionary passed, or from the default dictionary if NULL.
7882 Tue Nov 5 18:34:59 1996 Ben Pfaff <blp@gnu.org>
7884 * misc.h: Added new macro DIV_RND_UP to perform integer division,
7885 rounding up. Changed many references to ROUND_UP to use this
7888 * sfm-read.c: Includes avl.h.
7889 (corrupt_msg) Induces a segfault under Checker.
7890 (macro assertive_bufread) New. Many references to bufread() now
7892 (sfm_read_dictionary) Split up into several functions. Added code
7893 to read dictionary records following the the type 2 records. Not
7894 quite complete. New variable `var_by_index'.
7895 (read_header, read_variables) New functions extracted from
7896 sfm_read_dictionary().
7897 (read_value_labels) New function.
7898 (bufread) Checks ferror() if fread() doesn't return the expected
7899 value; if ferror() is zero it's just EOF.
7900 (dump_dictionary) Stubbed out.
7902 * BTW: The source code now exceeds 50000 lines!
7904 Mon Nov 4 22:03:28 1996 Ben Pfaff <blp@gnu.org>
7906 * command.c: Added GET to cmd_table[].
7908 * list.q: Removed reference to alloca headers.
7909 (cmd_list) Gave prototype.
7911 * sfm-read.c: Added DEBUGGING comments.
7912 (sfm_read_dictionary) Checks bias correctly. Sets
7913 dict->var_by_name to NULL. Calculates long_string_count
7914 correctly. realloc's dict->var[] array to minimum size.
7915 [DEBUGGING] Calls dump_dictionary.
7916 [DEBUGGING] (dump_dictionary) New function.
7918 * temporary.c: (save_dictionary) Sets var_by_name to NULL.
7919 (restore_dictionary) If the dictionary contains a non-NULL
7920 var_by_name, uses that instead of generating one.
7921 (free_dictionary) Destroys var_by_name.
7923 * var.h: (struct dictionary) Added field `var_by_name'.
7925 * get.c: New file, not complete.
7927 Sun Nov 3 12:24:36 1996 Ben Pfaff <blp@gnu.org>
7929 * mis-val.c: New enums MV_NOR_*. New struct num_or_range.
7930 (parse_num_or_range) New function.
7931 (parse_numeric) Reimplemented in order to support LOW THRU <n> and
7932 <n> THRU HIGH missing values.
7934 * output.h: [__GNUC__>1 && __OPTIMIZE__] (width, height) Made
7935 __attribute__((const)).
7937 * q2c.c: (get_token) Merged isdigit || isalpha into isalnum.
7939 * sfm-read.c: Finished reference implementation.
7941 * sfm.h: Includes var.h.
7943 * var.h: Comment fixes.
7944 (struct `variable') Reordered some fields.
7946 * vars-atr.c: (is_num_user_missing) Added support for MISSING_*
7947 constants added previously.
7949 Wed Oct 30 17:13:08 1996 Ben Pfaff <blp@gnu.org>
7951 * common.h: Comment fixes. Added declaration of
7952 `second_lowest_value' as variable or macro. Made `compat_type',
7953 `pgm_state_type' into anonymous enums.
7955 * display.c: Comment fix.
7957 * glob.c: [ENDIAN==UNKNOWN] Added definition for `endian' global
7959 [!defined SECOND_LOWEST_VALUE] Added definition for
7960 `second_lowest_value' global var.
7961 (compat, pgm_state global vars) Changed types to `int'.
7962 (init_glob) Initializes `second_lowest_value'.
7964 * sfm-read.c: Continued work, not complete.
7966 * var.h: Added new MISSING_* constants to handle LOWEST and
7969 Sat Oct 26 23:06:06 1996 Ben Pfaff <blp@gnu.org>
7971 * sfm-read.c: New file, not complete.
7973 * cases.c: (vec_insert) Changed vector expansion algorithm.
7974 (vec_delete) Fixed bug that screwed up deletion sometimes, it was
7975 mucking up the RECODE transformation in particular.
7976 (envector) Harmless change in notation.
7978 dfm is now fairly well tested again.
7979 * dfm.c: (dfm_get_record) Only returns ext->ptr if ext is
7981 (cmd_begin_data) if(ext->line) replaced by if(ext && ext->line).
7983 * recode.c: Comment fix.
7985 * sfm.h: Interface should be fairly final now, or at least for a
7988 * vfm.c: [DEBUGGING] (index_to_varname) New function.
7989 (open_active_file) [DEBUGGING] Translates ccase indices into
7990 variable names now to make it easier to understand what's really
7993 Sat Oct 26 20:46:31 1996 Ben Pfaff <blp@gnu.org>
7995 * data-in.c: Comment fix.
7997 * data-list.c: Includes dfm.h.
7998 (do_reading) Uses new function dfm_push_cust().
8000 * data-out.c: (convert_time, convert_WKDAY, convert_MONTH) Added
8003 * file-handle.h: Completely changed. Some parts split off into
8004 new file dfm.h. Implemented in file-handle.q.
8005 (enum FH_*) Removed.
8006 (struct fh_ext_class) New struct.
8007 (struct file_handle) Retained only these fields: name, norm_fn,
8008 fn, recform, lrecl, mode. New fields class, ext.
8009 (get_handle_by_name, get_handle_by_filename, parse_file_handle,
8010 close_handle, handle_name) Added `fh_' prefix to name, all
8013 * dfm.h: New file, implemented in dfm.c.
8014 (get_record, put_record, fwd_record, bkwd_record, set_record,
8015 get_cur_col) Functions moved from file-handle.h, now prefixed with
8017 (dfm_push_cust) New function.
8019 * sfm.h: New file. Incomplete.
8021 * dfm.c: All functions adjusted/rewritten for new dfm/fhp
8022 interface. Functions reordered, comments changed. Not well
8023 tested, probably full of bugs.
8024 (struct dfm_fhuser_ext) New struct.
8025 (dfm_close) New function.
8026 (open_file_r) Pickier about finding `BEGIN DATA.' line.
8027 (open_file_w) User messages changed.
8028 (get_record) Comment fixed.
8029 (read_record) Increments ext->ln even for inline_file. Calls
8030 dfm_close() for inline_file when `END DATA.' encountered.
8031 (dfm_get_record) Experimental restructuring.
8032 (dfm_push_cust) New function.
8033 (cmd_begin_data) Detects whether the inline file was fully read by
8034 checking whether it is still open; detects whether it was read at
8035 all by checking whether the line number is greater than zero.
8037 * file-handle.q: All functions adjust/rewritten for new dfm/fhp
8038 interface. Functions reordered, comments changed. Not well
8039 tested, probably full of bugs.
8040 (init_file_handle) Removed initializers for obsolete fields, added
8042 (fh_close_handle) Much simpler, now mainly calls the class
8044 (fh_init_files) Renamed inline file internal filename.
8046 * file-type.c: Includes dfm.h.
8047 (read_from_file_type) Doesn't use dfm internal state anymore.
8049 * inpt-pgm.c, print.c: Include dfm.h.
8051 * recode.c: (internal_cmd_recode) Casts strlen() return value to
8052 int in comparison with other int.
8054 * som-high.c: (build_target) Fixed operator precedence problem in
8055 if statement (& versus ==).
8057 Sat Oct 26 10:39:25 1996 Ben Pfaff <blp@gnu.org>
8059 * dfm.c: (read_record) Can now read fixed-length records; not
8061 (put_record) Can now write fixed-length records; not tested.
8063 * file-handle.h: FH_* defines changed to enums. New enum series
8065 (struct file_handle) New members recform, lrecl, mode.
8067 * file-handle.q: Parser changed.
8068 (internal_cmd_file_handle) Added support for new /RECFORM, /MODE,
8069 /LRECL subcommands. These are compatible with Windows.
8070 (init_file_handle) Initializes recform, mode fields.
8072 * q2c.c: (get_line) When outputting `!' comment lines, now
8073 increments the output file line number so that `#line' directives
8075 (make_identifier) New function that converts an arbitrary string
8076 into a valid C identifier.
8077 (dump_vars) Calls make_identifier() in two places in order to
8078 suppress some errors for bad identifiers.
8079 (make_match) Allows TRUE as synonym for YES and FALSE as synonym
8080 for NO. Allows numbers to be prefixed by underscores to make them
8081 acceptable C identifiers but still to be parsed as numbers by the
8084 Thu Oct 24 20:13:42 1996 Ben Pfaff <blp@gnu.org>
8086 * command.c: Re-enabled RECODE, SAMPLE, SELECT IF.
8088 * dfm.c: Comment fixes. (get_record) Gives error if file handle
8089 was opened for writing.
8090 (open_file_w) New function.
8091 (read_record) Uses strncasecmp if available. Improved error
8093 (put_record) New function.
8095 * file-handle.h: Moved function comments into dfm.c and
8096 file-handle.q. Comment fixes. Removed declarations of
8097 tilde_expand() and normalize_filename().
8098 (struct file_handle) Changed `open' from boolean to enumerated
8099 field to allow for three states--closed, open for reading, open
8100 for writing--all references changed.
8102 * file-handle.q: Includes filename.h.
8104 * print.c: (CMD_* enums) Renamed PRT_* and moved into var.h; all
8106 (alloc_line) Makes allowance for line terminator characters in
8108 (print_trns_proc) Now handles OUTFILE, WRITE differences.
8109 (print_space_trns_proc) Handles OUTFILE differences.
8111 * recode.c, sample.c: Comment fixes.
8113 * var.h: (struct print_trns) Changed boolean field `eject' to
8114 bitmapped field `options'; all references changed. New enums
8115 PRT_* for use with this field.
8117 * exception.h, test-exception.c: Removed.
8119 Thu Oct 24 17:47:14 1996 Ben Pfaff <blp@gnu.org>
8121 * ascii.c: (delineate) Turned off debug output.
8123 * common.c: [Checker and Linux] (__assert_fail, __eprintf) Moved
8126 * data-in.c: (parse_string_as_format) Sets the entire string value
8127 to spaces, not just the short string part of it. Is this correct
8130 * data-out.c: (convert_date) Fixed DATETIME format problems with
8131 decimal places, removed debug code.
8133 * dfm.c: (open_file_r) Fixed bug where an error would occur in the
8134 middle of parsing BEGIN DATA that would cause the lexer to read
8135 from a wild pointer `prog'; now calls new function
8136 preprocess_line() in lexer.c.
8138 * error.c: [__CHECKER__] (hcf) Calls induce_segfault() on improper
8140 [Checker and Linux] (__assert_fail, _eprintf) Moved from common.c.
8141 Now call induce_segfault() to induce the segfault.
8142 (induce_segfault) New function.
8144 * expr-opt.c: Comment fix.
8145 (parse_sysvar) New function.
8146 (parse_primary) Added system variable support--calls
8148 (global var ops) Added OP_CASENUM operator.
8150 * expr.h: Comment fixes.
8151 (OP_* enum) added OP_CASENUM operator.
8152 (struct casenum_node) New struct.
8153 (union any_union_union) New member `cas' of type `casenum_node'.
8155 * glob.c: (global var last_vfm_invocation) New var.
8156 (init_glob) Initializes last_vfm_invocation.
8158 * lexer.c: (lookahead) Fixed reversed condition on if statement.
8160 * getline.c: (get_line) Split into get_line() and preprocess_line().
8161 (preprocess_line) New function.
8163 * var.h: Declares last_vfm_invocation.
8165 * vfm.c: (procedure) Sets last_vfm_invocation.
8167 Wed Oct 23 21:53:43 1996 Ben Pfaff <blp@gnu.org>
8169 * command.c: (parse_cmd) Fixed bad assertion related to
8172 * data-in.c: (parse_month) Implemented to parse months according
8173 to full interpretation of standard.
8174 (to_roman) New function.
8175 (parse_wk_delimiter) Bug fix (forgot to skip `WK' in string).
8176 (parse_weekday) Bug fix (forgot to skip all the day name).
8178 * data-list.c: (read_from_data_list_fixed) Fixed bug that screwed
8179 up parsing of multirecord data items. Also fixed user message.
8181 * data-out.c: Comment fix.
8182 (year2, year4, convert_date, convert_time, convert_WKDAY,
8183 convert_MONTH) New functions to support time & date output.
8184 (convert_format_to_string) Calls new time & date output routines.
8186 * expr-prs.c: (nary_num_func) Found a bug, but didn't fix it yet.
8188 * lexer.c: (lookahead) Noted a previously unnoticed caveat in
8191 * main.c: [DEBUGGING] (dump_token) Updated to handle getline.h.
8193 * misc.c: (global var formats) Fixed declarations of DATETIME,
8196 * postscript.c: (text) Fixed a pair of bugs in the reallocation of
8197 the output_char buffer.
8199 * vars-prs.c: (parse_DATA_LIST_vars) Fixed a failure to free
8200 memory bug. Fixed user messages.
8202 Tue Oct 22 17:27:04 1996 Ben Pfaff <blp@gnu.org>
8204 * Removed #pragma argsused from lots of places.
8206 * data-in.c: Implemented zoned decimal and time-date formats.
8207 Untested. This is a huge chunk of code--maybe 1000 lines and 50
8210 * data-out.c: Implemented zoned decimal format.
8212 * expr.h: Moved yrmoda() declaration here from exprP.h.
8214 * misc.c: (global var formats) Minor fixes--added
8215 FCAT_SHIFT_DECIMAL to formats N and Z.
8216 (convert_fmt_ItoO) Added support for format Z.
8218 * som-frnt.c: (som_set_value) Fixed bug regarding string values.
8220 Mon Oct 21 20:39:59 1996 Ben Pfaff <blp@gnu.org>
8222 * command.c: (parse_cmd) [GLOBAL_DEBUGGING] Inserted call to
8223 som_check_workspace() that is activated between commands.
8225 * data-list.c: (dump_fixed_table, dump_free_table) Finished these
8228 * list.q: (begin_row) Changed title expansion style from
8229 SOPT_X_VERT to SOPT_X_SHSP.
8231 * som-frnt.c: Now includes `somP.h'.
8232 (som_push_workspace, som_pop_workspace) New functions that, taken
8233 together, form a solution to the recursive table building problem
8234 mentioned yesterday. Surrounded every table output routine
8235 throughout the program with calls to these functions.
8236 [GLOBAL_DEBUGGING] (som_check_workspace) New function.
8237 (som_create_table) Checks that there's an active workspace.
8238 (som_destroy_all_tables, som_crush) Removed.
8240 * som-high.c: (global var som_preserve_tables) Removed, all
8242 (som_submit_table) Checks that there's an active workspace.
8243 (dump_columnated_table) Doesn't columnate tables that would have
8244 just one row per column.
8245 (dump_crush_page, som_dump_crush_page) Removed debugging code.
8246 (som_dump_crush_page) Moved row number labels from left side of
8247 tables to right side.
8248 (som_get_table_size) Added support for SOPT_X_SHSP.
8250 * som.h: New cell expansion type SOPT_X_SHSP.
8252 * somP.h: (global vars arena_stack, n_arena_stack, m_arena_stack)
8254 (global var curtab_arena) Moved from som-frnt.c.
8256 Sun Oct 20 13:45:28 1996 Ben Pfaff <blp@gnu.org>
8258 * ascii.c: [GLOBAL_DEBUGGING] (SUPPRESS_WARNINGS) New debug option
8259 that causes bad location warnings to be suppressed.
8260 (delineate) Saves current font when calling draw_text(); fixed
8261 handling of NULLs when backing up. Also fixed line-wrapping bug.
8263 * command.c: Re-enabled `LEAVE', `NUMERIC', `PRINT', `PRINT EJECT',
8264 `PRINT FORMATS', `PRINT SPACE', `STRING', `TITLE', `WRITE'.
8266 * common.c: Added code to cause assertion failure to dump core
8267 when run under Checker.
8269 * data-list.c: (dump_fixed_table) Fixed some inconsistencies, but
8270 there are still bugs.
8272 * glob.c: (__eprintf) Removed.
8274 * list.q: Inserted som_preserve_tables kluge that prevents tables
8275 from being thrown away due to recursive table building through
8276 som_output_line being called from a transformation during the LIST
8277 procedure invocation. This is a general problem that must be
8278 solved in a better way since it applies to all procedures in
8280 (begin_row) Changed title options to SOM_X_VERT from SOM_X_BOTH.
8281 (flush_table) Removed SOM_TOPT_PRESERVE from submission options.
8283 * numeric.c: Fixed several errors in the form of msg() calls.
8285 * print.c: Updated for use of som.
8286 (dump_table) Reimplemented.
8287 (print_trns_proc) Calls som_eject_page() instead of eject_page().
8288 Calls som_output_text() instead of outs_line().
8290 * som-frnt.c: (som_destroy_all_tables) Sets som_preserve_tables to
8292 (som_output_text) Function moved from som-low.c. Interface
8295 * som-high.c: (som_preserve_tables) New global public variable
8297 (som_submit_table) Destroys the tables only if som_preserve_tables
8299 (paginate_horizontally) Bugfix: sets som.mpw even if there's only
8300 one subrow per row. Now labels subrows if there's more than one
8302 (dump_crush_table) Added wishlist comment.
8303 (som_eject_page) New public function declared in som.h.
8305 * som-low.c: (som_dump_crush_page) Draws row labels if there's
8306 more than one subrow per row.
8307 (som_output_text) Moved to som-frnt.c.
8309 * som.h: (SOM_TOPT_PRESERVE) Removed.
8311 * title.c: (get_title) Changed interface.
8312 (cmd_title) Changed `title' to `outp_title'.
8313 (cmd_subtitle) Changed `subtitle' to `outp_subtitle'.
8315 Sun Oct 20 09:04:15 1996 Ben Pfaff <blp@gnu.org>
8317 * list.q: (flush_table) Conforms to new partial options in
8318 som_submission_form.
8320 * som-high.c: (paginate_horizontally) Changed form of subrow
8322 (build_target) Omits spacing before table if
8323 SOM_TOPT_PARTIAL_OMIT_TOP is selected.
8324 (dump_crush_page) Changed interface. Only trims bottom rule if
8325 SOM_TOPT_PARTIAL_OMIT_BTM is not selected.
8326 (dump_crush_table) Handles partial tables.
8327 (output_row_label) New function.
8328 (som_dump_crush_page) Emits subrow number labels. Draws vertical
8329 rule on the right edge of narrow subrows.
8331 * som.h: Changed SOM_SUB_PARTIAL_* series of submission type
8332 constants to a series of SOM_TOPT_PARTIAL_* submission options.
8333 All references updated.
8335 Fri Oct 18 19:46:49 1996 Ben Pfaff <blp@gnu.org>
8337 * misc.c: Comment fix.
8339 * som-high.c: (examine_table) Treats crushed tables separates for
8340 purpose of determining header size.
8341 (paginate_horizontally) Allots space for line numbers in crushed
8342 tables with lots of subrows per row. Calculates the `maximum page
8343 width', the width of the widest horizontal page.
8344 (build_target) Removed trim argument; all references changed.
8345 Stricter assertions. (dump_crush_page) New function.
8346 (dump_crush_table) Reimplemented.
8348 * som-low.c: (som_dump_page) Uses new RULE_ROW &c. constants.
8349 (som_dump_crush_page) Reimplemented, interface changed.
8351 * somP.h: Many many new helper macros for use with crushed tables.
8352 (global var som) Removed `tv', `cum_y' members; all references
8353 removed. New members `mpw', `digit_space'.
8355 Sun Sep 29 19:37:03 1996 Ben Pfaff <blp@gnu.org>
8357 * arena.c: (arena_alloc) [!DISCRETE_BLOCKS] Removed `size'
8358 variable, changed to constant 1024.
8359 (arena_ca_strdup) Changed `sizeof(a_string)' to
8361 (arena_ca_strdup) [!DISCRETE_BLOCKS] Changed bad cast from
8362 `(c_string *)' to `(char *)'; this fixed some offset problems.
8364 * filename.c: (readlink_malloc) Changed initial allocation from
8366 (good_getcwd) Changed from xmalloc() to local_alloc(); removed
8369 * postscript.c: (read_fontmap) Fixed leak by changing &owner to
8370 &fm->owner in several places.
8372 * som-high.c: (output_table) Changed interface to rest of world.
8373 (examine_crush_table) Removed. Crushed tables are re-broken now,
8374 in preparation for rewrite.
8376 * som.h: Comment fix.
8378 Sat Sep 28 21:28:07 1996 Ben Pfaff <blp@gnu.org>
8380 * ascii.c: (ascii_init_driver) Disposes of x->file.filename and x
8381 itself in the cleanup stage.
8383 * descript.q: (display) At least temporarily, changed the table
8384 format to a crushed table.
8386 * list.q: (begin_row) At least temporarily, added horizontal lines
8389 * som-high.c: (examine_crush_table) Sets som.hh to the width of
8390 the horizontal "headers," that is, to the width of the far left
8391 and far right rules.
8392 (justify_pagination) Sets som.th to the width of the widest row
8393 in the crushed table. Fixed inner loop off-by-one error.
8395 * som-low.c: (som_dump_crush_page) Added code to draw horizontal
8398 * somP.h: Comment fix.
8400 Fri Sep 27 20:08:39 1996 Ben Pfaff <blp@gnu.org>
8402 * filename.c: (open_file_ext) Now, doesn't set f->file to NULL
8403 before closing it; also, opens the constructed filename `s'
8404 instead of f->filename.
8406 * postscript.c: Moved initialization of x->loaded, x->prop,
8407 x->fixed, x->current, also the add_encoding() calls, into
8409 (preclose) Destroys x->combos; sets x->loaded, x->combos to NULL;
8410 sets x->last_font to NULL; sets x->next_combo to zero.
8412 * som-high.c: (crushed_row_height) Moved definition farther up.
8413 (som_submit_table) Doesn't calculate line width, font size until
8414 after calling open_page(), to accomodate changes to PostScript
8416 (vert_headers) Removed; equivalent functionality moved to
8417 examine_table(), examine_crush_table().
8418 (justify_pagination) Replaced with different algorithm.
8419 (dump_crush_table) Bugfix that caused tables to fail to be clipped
8420 at the bottom of the page.
8422 Thu Sep 26 22:20:26 1996 Ben Pfaff <blp@gnu.org>
8424 * command.c: Added cmd_list back into cmd_table.
8426 * freq.c, frequencies.q, repeat.c, list.q, vars-atr.c, vfm.c:
8427 Comment fix: `#define DEBUGGING' --> `#define DEBUGGING 1'.
8429 * list.q: (flush_table) Updated to new som_submission_form format.
8431 * som-frnt.c: Comment fix.
8433 * som-high.c: Changed `#endif' to `#undef EXTERN'.
8434 (output_table) Calls som_get_table_size() directly; handles
8436 (examine_crush_table) New function; calls vert_headers().
8437 (examine_table) Moved some code into new function, vert_headers().
8438 (justify_pagination) New function.
8439 (dump_plain_table) Removed `static' from `cy'.
8440 (dump_crush_table) New function.
8442 * som-low.c: (som_dump_crush_page) New function.
8444 * som.h: Comment fixes.
8445 (enum SOM_TOPT_CRUSH) New.
8446 (SOM_SUB_PARTIAL_BEG, SOM_SUB_PARTIAL_MID, SOM_SUB_PARTIAL_END)
8447 Temporarily set to zero to make do with LIST procedure.
8449 * somP.h: Re-ordering.
8451 Wed Sep 25 19:36:11 1996 Ben Pfaff <blp@gnu.org>
8453 * som.c: Split into som-frnt.c, som-high.c, som-low.c.
8455 * somP.h: New file for use by som-high.c, som-low.c.
8457 * q2c.c: Added definition for VME.
8458 (get_line) Now dumps `!' comment lines to the output file
8461 * crosstabs.q, descript.q, file-handle.q, frequencies.q, list.q,
8462 set.q: Changed format of `!' comment lines.
8464 Tue Sep 24 18:39:09 1996 Ben Pfaff <blp@gnu.org>
8466 * All source files: Added copyright notice.
8468 * common.c: (xmalloc, xrealloc, xstrdup) Cast size_t's to unsigned
8469 longs in msg() calls.
8471 * con32s.c: (xmalloc, xrealloc) Updated from common.c.
8473 * q2c.c: (xmalloc, xrealloc, xstrdup) Updated from common.c.
8475 Sat Sep 21 23:16:31 1996 Ben Pfaff <blp@gnu.org>
8477 * output.c: (outp_read_devices) Changed criteria for
8478 distinguishing different types of lines.
8480 Fri Sep 20 22:52:28 1996 Ben Pfaff <blp@gnu.org>
8482 * cmdline.c: Changed syntax message.
8484 * filename.c: (good_getcwd) Bug fix (?).
8485 (normalize_filename) [__BORLANDC__] Uses _fullpath() library
8487 (search_path) Appends DIR_SEPARATOR to directory name only if it
8488 does not already end with one.
8490 * glob.c: Checks STAT_PAGER envvar before PAGER.
8492 * output.c: Checks environment variables instead of just local
8495 Tue Sep 10 21:39:00 1996 Ben Pfaff <blp@gnu.org>
8497 * arena.c: (arena_destroy) Swatted a subtle bug that cropped up
8498 when the pointer passed to the function was within the arena
8499 itself, so that it couldn't properly be set to NULL _after the
8502 * command.c: Re-enabled DISPLAY.
8504 * display.c: Rewritten to handle tables. Untested.
8506 * filename.c: (search_path) Fixed memory leak.
8508 * frequencies.q: (cmd_frequencies) Frees v_variables.
8509 (postcalc) Calls cleanup_freq_tab() after displaying statistics.
8510 (cleanup_freq_tab) New function to garbage collect.
8511 (dump_full) Elegantized.
8513 * main.c: New comment.
8515 * output.h: New tag for tagged quotes: TAG_NEWLINE.
8517 * postscript.c: Comment fix.
8518 (release_fontmap, free_font_entry) New functions.
8519 (ps_init_driver) Sets free_font_entry() as the freefunc for
8520 hashtable `loaded'. Calls release_fontmap() when destroying a
8521 driver; also frees the output filename; also frees the
8522 ps_driver_ext block.
8523 (free_ps_encoding) Frees the filename as well as the encoding
8525 (output_encodings) Frees the line buffer and pops the msg-filename
8527 (read_fontmap) Frees the fontmap filename and the line buffer.
8528 (postopen, preclose) Misc. garbage collection fixes.
8529 (ps_open_page) Destroys the `combos' hash table; sets `last_font'
8530 to NULL; this fixes some output problems.
8531 (text) Handles TAG_NEWLINE. Untested.
8533 * som.c: (cell_byte_size) Merged SCON_VALUE and SCON_TEXT cases.
8534 (som_set_string) Removed. All references changed to
8536 (som_set_text) Rewritten. New interface. More general.
8538 * som.h: Minor format changes.
8539 (struct som_value_cell) Removed; all references changed to
8541 (enums SOT_*) Changed.
8543 Mon Sep 9 21:43:13 1996 Ben Pfaff <blp@gnu.org>
8545 * command.c: Re-enabled SPLIT FILE.
8547 * postscript.c: Comment fix.
8549 * som.h: Added `SOT_NONE'.
8551 * split-file.h: (cmd_split_file) Removed superfluous parenthesis.
8553 * vfm.c: (dump_splits) Reimplemented.
8555 Sat Sep 7 22:35:12 1996 Ben Pfaff <blp@gnu.org>
8557 * Compiled the project under gcc 2.7.2, which gave some new
8558 warnings. This led to many additions of casts from unsigned to
8559 int sprinkled throughout the code.
8561 * arena.c: Many uses of `unsigned' changed to `size_t'.
8563 * command.c: Added END FILE, END REPEAT to command table.
8564 (var cmd_end_repeat) Renamed cmd_end_repeat_p.
8565 (find_command, FILE_TYPE_okay) Not commented out anymore.
8566 (parse_cmd) Calls FILE_TYPE_okay again.
8567 (output_line) Added calls to som_output_text() to put the line
8568 in the output files.
8570 * common.c: (macro VME) Format changes.
8571 (xstrdup) Asserts that its argument is not NULL.
8573 * data-list.c: Implemented dump_fixed_table().
8575 * inpt-pgm.c: Formatting changes. Comment changes.
8576 (end_case_proc) Renamed end_case_trns_proc.
8577 (cmd_end_file, end_file_trns_proc) New functions.
8579 * misc.c: Many uses of `int' and `unsigned' changed to `size_t'.
8581 * misc.h: (local_strdup) New macro corresponding to strdup() but
8582 allocating its data through local_alloc() if possible--that is, if
8585 * postscript.c: Comment changes.
8586 (quote_ps_name, quote_ps_string, output_encodings) New functions.
8587 (output_line, add_string) New macros supporting
8589 (postopen) Fixed contents of ${fixed-font} and ${prop-font}
8590 substitution vars. Calls output_encodings() when a line
8591 consisting of `!encodings' is encountered.
8592 (preclose) Some code moved into quote_ps_string().
8593 (dump_line) Changed into macro supporting dump_fancy_line().
8594 (switch_font) Now outputs DSC "%%IncludeResource: font (...)"
8595 command when appropriate.
8596 (write_text) Fixed `literal_char' array (I think it's fixed, at
8598 (text) Fixed bug when width was zero. Now exits immediately on
8599 zero height_left. Now, when executing `goto restart;', checks
8600 that cp<end, so that we don't read beyond end-of-string. Also,
8601 outputs the correct code to the output file by outputting the code
8602 from the metric instead of the internal metric index.
8604 * repeat.c: (cmd_end_repeat) New function.
8606 * som.c: (var som) `headers' renamed `options' and semantics
8607 changed. All references changed.
8608 (draw_title) `if(px!=-1 || px!=-1)' --> `if(px!=-1 || py!=-1)'.
8609 (build_target) Only inserts spacing if SOM_TOPT_SPACING not
8611 (som_text_table) Removed.
8612 (som_output_text) New function.
8614 * som.h: (struct som_submission_form) Removed `header', `reuse',
8615 replaced with bitmapped field `options'.
8616 (SOM_TOPT_*) New enum set for som_submission_form.options.
8617 (SOT_*) New enum set for som_output_text().
8619 * temporary.c: (copy_variable) When copying the var label, only
8620 calls xstrdup() if it's non-NULL.
8622 * var.h: (enum type `vartype') Removed; all references changed to
8625 * vars-atr.c: (init_variable) Changed local var `nbytes' from
8628 Thu Sep 5 22:05:56 1996 Ben Pfaff <blp@gnu.org>
8630 * font.h: Comment changes.
8632 * groff-font.c: (groff_read_font) Initializes `name' field to
8633 NULL. Handles `encoding' field.
8635 * hash.c: (hsh_dump) [GLOBAL_DEBUGGING] Output formatting changes.
8637 * postscript.c: (struct font_entry) Removed `position' field.
8638 (struct ps_font_combo) New struct.
8639 (struct ps_driver_ext) Removed field `next_position'. New fields
8640 `combos', `next_combo'. `last_font' field changed from
8641 `font_entry *' to `ps_font_combo *'.
8642 (ps_init_driver) Reformatted; handles new fields. When
8643 OPO_AUTO_ENCODE is set, adds the two default fonts' encodings to
8645 (get_encoding, find_encoding_file) New functions.
8646 (add_encoding) Some code moved out into find_encoding_file().
8647 (postopen) Changed value for ${title}.
8648 (preclose) Sets `loaded' field to NULL after destroying the hash
8650 (ps_open_page) Added comment. Inits the `combos' and `next_combo'
8652 (ps_text_set_font_by_position) Figures out the current family if
8654 (compare_ps_combo, hash_ps_combo, free_ps_combo) New functions.
8655 (switch_font) Implemented.
8656 (write_text) Calls switch_font() more often. Format changes.
8657 #undefs its macros after they're no longer useful.
8658 (text) Changed `continue' at one point to a jump to the top of the
8659 loop because we don't want `separate' reset to 0 at that point.
8660 (load_font) No longer sets `position' in the font_entry created.
8662 Wed Sep 4 21:45:35 1996 Ben Pfaff <blp@gnu.org>
8664 * font.h: (struct font_desc) New member `encoding', which is not
8665 properly handled yet.
8667 * glob.c: (init_glob) Some new i18n code, which is probably
8670 * output.c: (outp_read_devices, outp_get_paper_size) Changed
8671 `size' local from `int' to `size_t'.
8673 * postscript.c: New driver configuration parameter `auto-encode'.
8674 New enums OPO_AUTO_ENCODE, ODA_COUNT.
8675 (struct font_entry) New member `position'.
8676 (struct ps_driver_ext) Reordered. New hash table member
8677 `encodings'; new members `next_position', `next_encoding',
8678 `last_font'. Members `current', `prop', `fixed' changed from type
8679 `font_desc *' to `font_entry *'; all references changed.
8680 (struct ps_encoding) New struct.
8681 (read_ps_encodings, compare_ps_encoding, hash_ps_encoding,
8682 free_ps_encoding, add_encoding) New functions.
8683 (ps_init_driver) Added OPO_AUTO_ENCODE to default
8684 x->output_options. Initializes new members of ps_driver_ext.
8685 Changed default value for prologue_fn, encoding_fn. Calls
8686 read_ps_encodings after loading default fonts.
8687 (option_tab[], ps_option) Handle new configuration parameter.
8688 (switch_font) New function.
8689 (struct output_char) `font' member changed from `font_desc *' to
8690 `font_entry *'. New member `separate'.
8691 (read_fontmap) Changed `size' from `int' to `size_t'.
8692 (output_line, put_number) New macros for write_text().
8693 (write_text) Optimizes text output by consolidating multiple
8694 calls to PostScript `show' operator.
8695 (text) Keeps track of when text arguments can't be consolidated by
8696 write_text(), and marks those spots in the output stream.
8697 (load_font) Sets `position' of the allocated font_entry to -1, cuz
8698 the font hasn't been switched to by switch_font(), which is where
8699 the position is important--the PostScript is what cares about the
8702 Sat Aug 31 23:52:38 1996 Ben Pfaff <blp@gnu.org>
8704 * hash.c: (hsh_destroy) Ignores NULL argument. Doesn't try to
8705 call a NULL free_func.
8706 (hsh_rehash) Elegantized.
8707 (hsh_probe) Fix bug that manifested when the table was expanded
8708 and thus had to change location in memory. Good thing
8709 too--otherwise could have been much more subtle.
8710 (hsh_find) [GLOBAL_DEBUGGING] Not stubbed out anymore.
8711 (hsh_foreach) New function for hash table iteration.
8713 * hash.h: (struct hsh_iterator) New.
8715 * lexer.c: (parse_tagged_quote) Font and family name strings in
8716 tags are now null-terminated.
8718 * output.c: (outp_evaluate_dimension) Fixed over-aggressive unit
8720 (internal_get_paper_size, outp_get_paper_size) Fixed; now work as
8721 documented. (Never before tested?)
8723 * output.h: Comment changes.
8725 * postscript.c: New driver options `optimize-text-size',
8726 `optimize-line-size', `max-fonts-simult'. New enum set for
8727 specing cached line types. Comment fixes.
8728 (struct line_form) New struct.
8729 (struct ps_driver_struct) New members `text_opt', `line_opt',
8730 `max_fonts', `lines'.
8731 (ps_init_driver) Initializes new members of ps_driver_struct.
8732 (user option type enum set) New member `nonneg_int_arg'.
8733 (static var option_tab[]) Supports new options.
8734 (ps_option) Handles new options.
8735 (find_ps_file) Made static. No longer calls hsh_dump().
8736 (ps_get_var) Made static.
8737 (preclose) Dumps out proper DSC trailer.
8738 (ps_open_page) Elegantized.
8739 (ps_close_page) Calls dump_lines() if appropriate.
8740 (ps_line_horz, ps_line_vert, ps_line_intersection) Reduced to
8741 wrappers around line().
8742 (int_2_compare, compare_line, dump_line, dump_fancy_line,
8743 dump_lines, hash_line, free_line, line) New functions for support
8745 (write_text, text) Made static.
8746 (text) Added to font support, not finished.
8748 Thu Aug 29 21:36:41 1996 Ben Pfaff <blp@gnu.org>
8750 * font.h: (struct font_desc) New members ascent, descent.
8752 * groff-font.c: (groff_read_font) Calculates font ascent and
8753 descent from the ascent and descent of the `d' and `p' characters,
8754 respectively, as per a suggestion on comp.fonts.
8756 * postscript.c: (ps_open_page, ps_close_page, ps_line_horz,
8757 ps_line_vert, ps_line_intersection) Rewritten to deal with changed
8759 (write_text) Handles text right-justification and centering (not
8760 full justification). Still very inefficient. (One output line
8762 (struct output_char) Added fields for font and font size.
8763 (text) Many bugfixes.
8765 Sat Aug 24 23:26:00 1996 Ben Pfaff <blp@gnu.org>
8767 * cmdline.c: (usage) Calls outp_list_classes().
8769 * font.h: Comment fix.
8771 * groff-font.c: New exported global var `space_index'.
8772 (groff_init) New function to initialize `space_index'.
8773 (hash_kern) Casts result to unsigned.
8774 (font_name_to_index) Renamed font_char_name_to_index. All
8775 references changed. Also, now returns the value of `space_index'
8776 when passed an ASCII space character as an argument. Fixed
8778 (font_get_kern_adjust) Changed i from `int' to `unsigned'.
8779 Handles passed NULL pointers properly.
8781 * lexer.c: (parse_tagged_quote) Comment fix. Better range
8784 * output.c: (outp_list_drivers) Removed. Removed all references.
8786 * output.h: Comment fixes.
8788 * postscript.c: (ps_open_global) Calls groff_init().
8789 (output_char) New structure.
8790 (write_text) New function.
8791 (text) No longer stubbed out! Now the output is correct--with a
8792 few exceptions, one of them being that the page has to be held
8793 upside down into a mirror.
8795 Sun Aug 11 21:31:22 1996 Ben Pfaff <blp@gnu.org>
8797 * font.h: Comment fix.
8799 * font.c: (name_to_index) Renamed font_name_to_index, made extern.
8800 All callers changed.
8801 (number_to_index) Renamed font_number_to_index, made extern. All
8803 (font_get_kern_adjust, font_get_char_metrics) New functions.
8805 * output.h: New constant OUTP_T_INTERNAL_DRAW.
8807 * postscript.c: Changed default line width back to 1/2 point.
8808 (ps_line_horz, ps_line_vert, ps_line_intersection) Now lines are
8809 in the center of the space allotted for them, not just a fixed
8810 offset from the edge of the space; this fixes some bugs.
8811 (ps_line_intersection) Now supports all command line styles.
8812 (ps_text_get_size) Bug fix in computation of em width.
8813 (text) New function, the meat behind ps_text_metrics and
8814 ps_text_draw. Not complete.
8815 (ps_text_metrics, ps_text_draw) Removed the stub taken from
8816 ascii.c; call text().
8818 Sat Aug 10 23:28:17 1996 Ben Pfaff <blp@gnu.org>
8820 * arena.c: (arena_free) Assert that the argument is non-NULL.
8822 * groff-font.c: (add_kern) Calls arena_free() for old_kern if and
8823 only if old_kern is non-NULL.
8825 * postscript.c: (ps_init_driver) Changed default line width to 1
8827 (postopen) New prologue variables.
8828 (ps_line_horz, ps_line_vert, ps_line_intersection) Implements some
8829 more of the common line styles properly, but not all.
8830 (ps_text_metrics) Fixed problem with this stubbed out version that
8831 kept it from taking font sizes into account.
8833 Thu Aug 8 22:31:11 1996 Ben Pfaff <blp@gnu.org>
8835 * arena.c: (arena_malloc) Bug fix.
8836 (arena_dump) [GLOBAL_DEBUGGING] New function.
8838 * ascii.c: Comment fix.
8839 (count_fancy_chars, delineate) Now static functions.
8841 * filename.c: (interp_vars) Bug fixes.
8843 * font.h: Comment fixes.
8845 * glob.c: (init_glob) Sets set_viewwidth, set_viewlength at
8846 beginning in case we have an error message to display before
8847 initializing the display.
8849 * groff-font.c: Comment fix. Changed rehash threshold from 2/3
8851 (groff_read_font) Bug fixes.
8852 (name_to_index) Increments hash.used. Sets `name' field of hash
8854 (add_kern) Sets kern_max_used after rehashing. Other bug fixes.
8856 * hash.c: Return type changed.
8858 * postscript.c: Continued development. Now marks lines on the
8859 paper, but very buggy.
8861 Sat Aug 3 20:50:35 1996 Ben Pfaff <blp@gnu.org>
8863 * Changed comments in many source files from `/* xxx /* yyy */' to
8864 `/* xxx */ /* yyy */' for cleanliness.
8866 * arena.c: (arena_sd_strdup) New function.
8868 * ascii.c: (struct ascii_driver_ext) New member `file'.
8869 (ascii_init_driver) Fills out member `file' for initing; uses
8870 close_file_ext for closing drivers.
8871 (ascii_option) Changed %.*s back to %s because the a_string's are
8872 always null-terminated.
8873 (postopen, preclose) New functions.
8874 (ascii_open_page) Uses new style of open_file_ext.
8875 (ascii_option, commit_line_buf, output_lines) Use ext->file.file
8876 instead of this->output.
8877 (__assert_fail) Removed.
8879 * cmdline.c: Changed syntax_message[].
8881 * error.c: #include's <readline/history.h> only if the history
8882 library is available, not if just the readline library is
8885 * filename.c: (expand_line) Removed alloca() support.
8886 (interp_vars) No longer tilde-expands argument. Limit on output
8888 (tilde_expand) Now treats argument as path rather than filename.
8889 [!unix] Now is a no-op function.
8890 (search_path) Better verbose message formatting.
8891 (open_file, close_file) Comment fixes.
8892 (close_file) [!unix] Doesn't bother with pipes.
8893 (open_file_ext) Completely rewritten, interface revamped.
8894 (close_file_ext) New function.
8896 * font.h: Comment changes.
8898 * frequencies.q: Removed AIX alloca support since it doesn't use
8901 * hash.c: Comment changes & additions.
8902 (hsh_create) Initializes entire table instead of first M entries.
8903 (hsh_probe) Stupid bug fixed. Now it works.
8904 (hsh_dump) [GLOBAL_DEBUGGING] New function.
8906 * main.c: (parse) Detects EOF properly in token-eating loop.
8907 Should the STOP token have its value changed to 0?
8909 * misc.c: (blp_getdelim) [HAVE_GETDELIM] Now it's a macro.
8910 (blp_getline) Now it's a macro.
8912 * output.h: (struct outp_driver) Removed members output, filename.
8914 * output.c: (outp_init) [!NO_POSTSCRIPT] Installs PostScript
8915 drivers in driver table.
8916 (outp_read_devices) Frees buf. Warns if there are no active
8918 (outp_configure_clear) Sets outp_configure_vec to NULL after
8919 deleting its elements.
8920 (configure_driver, destroy_driver) Removed references to output,
8921 filename members of outp_driver.
8922 (outp_evaluate_dimension, internal_get_paper_size,
8923 outp_get_paper_size) New functions.
8925 * postscript.c: Continued development. Now links but doesn't make
8926 any marks on the page. Lotsa bugs I suppose.
8928 * str.c: (strcasecmp) [!HAVE_STRCASECMP] New function.
8930 * str.h: Comment changes.
8932 Sat Jul 27 22:32:38 1996 Ben Pfaff <blp@gnu.org>
8934 * Removed dependencies on non-nested comments in several files.
8935 Also removed references to (unix || __unix__) in #if's since
8936 prefh.orig makes those two equivalent.
8938 * ascii.c: (ascii_open_global) Creates ascii_arena.
8939 (ascii_close_global) Destroys ascii_arena.
8940 (ascii_init_driver) Doesn't create ascii_arena.
8941 (ascii_copy_driver) Removed.
8942 (ascii_option) Possible bugfix regarding %s vs. %.*s with a_string's.
8943 (outp_class ascii_class) Removed ascii_copy_driver reference.
8945 * frequencies.q: Now can display all statistics except median.
8948 * output.c: Handles outp_class.ref_count so output class
8949 destructors are called properly.
8950 (add_class) Sets ref_count to 0.
8951 (configure_driver) Initializes class if ref_count++ is 0.
8952 (destroy_driver) Destructs class if --ref_count is 0. Frees the
8953 class output file name.
8955 * output.h: (struct outp_class) Removed copy_driver, inited.
8958 * postscript.c: Completely replaced but not finished.
8960 Tue Jul 23 21:48:36 1996 Ben Pfaff <blp@gnu.org>
8962 * approx.h: #includes <float.h>.
8964 * arena.h, arena.c: Many functions changed to take an arena **
8965 instead of an arena *, for consistency. All callers changed.
8966 (arena_alloc) Now creates a new arena if passed *A that is NULL.
8967 (arena_destroy) Sets *A to NULL.
8969 * ascii.c: (delineate) Implements OUTP_T_VERT correctly. Removed
8970 assertion that `width' be positive.
8972 * command.c: Removed #if's from cmd_table.
8973 (walk_cmdtable_func) [0] New function (debug code).
8974 (init_cmd_parser) [0] Dumps out cmd_table (debug code).
8975 (parse_cmd) Doesn't return failure for unimplemented commands.
8977 * common.h: (SYSMIS) Changed from DBL_MAX to -DBL_MAX.
8978 (SYSCODE) New constant macro.
8980 * descript.q: Checks for positive n_variables before performing
8983 * file-handle.q: (get_handle_by_filename) Bug fix: passes &f to
8984 avl_find instead of &fp as arg 2.
8986 * frequencies.g, frequencies.q: Continued updating; now compiles &
8987 works again, but not complete.
8989 * main.c: Changes to user messages.
8991 * misc.c: (reverse) [0] New function.
8993 * settings.h: Comment removed. #includes "common.h".
8995 * som.c: (som_set_null) New function.
8996 (som_set_value, som_set_string, som_set_text) More detailing
8998 (som_set_float) Implemented function.
8999 (dump_columnated_table) Bug fix regarding page breaks.
9000 (draw_cell) Bug fix regarding text that spilled out of a cell.
9001 (draw_intersection, draw_horz_rule, draw_vert_rule) No longer draw
9003 (get_cell_size) Support SCON_EMPTY cells.
9004 (get_table_size) When calculating rules' widths and heights, mask
9005 out SLIN_SPACING bit. Added SOPT_X_HLTL support.
9007 * som.h: (som_any_cell) New option SOPT_X_HTLT. Removed
9009 (struct som_submission_form) New member `header'; all users
9012 * val-labs.c: (get_label) User messages changed.
9014 * var.h: Changed FREQUENCIES structures.
9016 * vars-atr.c: (is_num_user_missing, is_str_user_missing) Made
9019 Fri Jul 19 19:11:13 1996 Ben Pfaff <blp@gnu.org>
9021 * approx.h: Definition of EPSILON now depends on system's
9022 DBL_EPSILON. Removed GNU C specific code.
9023 (cmpapx) Renamed approx_compare.
9025 * frequencies.g, frequencies.q: Continued updating; still doesn't
9028 * groff-font.c: (name_to_index) Fix bug that kept it from
9031 * hash.c, hash.h: Completed work.
9033 * var.h: Changes to freq_tab, frequencies_proc.
9035 Wed Jul 17 21:23:36 1996 Ben Pfaff <blp@gnu.org>
9038 * hash.c, hash.h: New files. Not completed.
9039 * Makefile.am: Added hash.c to source file list.
9040 * font.h: (struct font_desc) New member kern_size_p.
9041 * groff-font.c: Uses hash.h.
9042 (hashpjw) Moved to hash.c.
9043 (next_prime_power) Rewrote, renamed hsh_next_prime, moved to
9045 (static var hash) New member size_p.
9046 * var.h: Includes hash.h.
9047 (struct freq_tab) Changed AVL_TREE to hash_tab.
9049 * vars-prs.c: Comment, formatting fixes.
9051 * frequencies.g, frequencies.q: Continued updating. Not yet
9054 * formats.c: Bug fix.
9056 Tue Jul 16 22:10:04 1996 Ben Pfaff <blp@gnu.org>
9058 Increasing parallelism between DESCRIPTIVES and FREQUENCIES.
9059 * descript.g: Comment fixes.
9060 * descript.q: Comment fixes. Moved some declarations into var.h.
9061 Made dsc_info a static table. Updated FIXMEs.
9062 (internal_cmd_descriptives) Beautified.
9064 * frequencies.q: Started updating into working order.
9065 * frequencies.g: New file analogous to descript.g.
9066 * var.h: Comment fixes. Added structures for FREQUENCIES.
9068 * som.c: Removed vestiges of crushing and partial table support.
9070 Sun Jul 14 15:45:31 1996 Ben Pfaff <blp@gnu.org>
9072 * Many more changes to som.c especially, but these will not be
9073 documented as I have resolved to remove them. This patchlevel is
9074 being released solely so that I can fall back to it if I decide
9075 that removing the changes is not a good idea.
9077 Sat Jul 13 09:58:44 1996 Ben Pfaff <blp@gnu.org>
9079 * som.c: (global var som) New member `cum_y'.
9080 (build_target) Properly handles titles for partial tables.
9081 (dump_partial_beg, dump_partial_mid, dump_partial_end)
9082 Merged into single new function dump_partial(). Fixed problem
9083 with titles on partial tables.
9084 (dump_table) Calls dump_partial() for all parts of partial tables.
9085 (dump_page) Criteria for drawing title changed.
9087 Fri Jul 12 22:03:36 1996 Ben Pfaff <blp@gnu.org>
9089 * command.c: (cmd_table) Added LIST, WEIGHT.
9091 * command.c: (cmd_remark) No longer frees `s' since it's not
9092 dynamically allocated.
9094 * data-out.c: (convert_f) Now correctly handles the case where
9095 abs(v->f)<1 but v->f rounds to a value of 1.00 given the specified
9097 (som_destroy_all_tables) Removed argument. All callers changed.
9098 (som_vline, som_hline) Argument validity checking corrected.
9099 (som_set_value) Implemented half-heartedly.
9100 (replicate_table) Copies tables piece-by-piece when using Checker.
9102 * som.h: New line style SLIN_1THIN, currently equivalent to
9103 SLIN_0. New enum set SOM_SUB_*.
9104 (struct som_submission_form) Removed `seq_no'. Added `type'.
9106 * list.q: Newly working file; uses partial tables.
9108 * som.c: (som_reduce_table) Renamed som_set_table_height().
9109 (som_crush) Removed argument `group'.
9110 (global var som) Removed `nt', `seq_no'. Added `type'.
9111 (som_submit_table) Arguments changed.
9112 (output_table) Removed partial table code.
9113 (build_target) New arg; partial table support added. All callers
9115 (dump_plain_table) Removed partial table code.
9116 (dump_partial_beg, dump_partial_mid, dump_partial_end) New functions.
9117 (dump_table) Supports partial tables.
9118 (dump_page) New argument to allow not drawing top and/or bottom
9119 headers. All callers changed. Supports partial tables.
9121 Sat Jul 6 22:22:25 1996 Ben Pfaff <blp@gnu.org>
9123 * data-out.c: Changed `#include <approx.h>' to `#include
9125 (convert_F) Comment fix. Now won't print `-.000', etc.
9127 * descript.q: Now Z-scores work, although there appears to
9128 be a bug (which might actually be in data-out.c:convert_F()).
9129 (descriptives_trns_proc, descriptives_trns_free) New functions.
9130 (run_z_pass) Implemented.
9132 * var.h: Comment fixes.
9133 (dsc_z_score, descriptives_trns) New structs.
9134 (descriptives_trns) Added to any_trns as `dsc'.
9136 * error.c, error.h: New error class, IS (Installation Script
9137 error), used in those instances where the error is in the
9138 installation, but there is a script file or installation file that
9139 can be usefully referred to.
9141 * output.c: Change many IE classes to IS classes.
9143 * cases.c, command.c, common.c, crosstabs.q, expr-evl.c,
9144 frequencies.q, list.q, vars-prs.c, vfm.c: Removed reference to
9145 HAVE_MALLOC_H because Borland C++ alloca() is broken, so why
9146 include the corresponding header?
9148 * glob.c: (init_glob) Don't malloc term_buffer under Checker.
9149 Don't bail out if termcap can't be read.
9151 * som.c: (som_destroy_table) Removed.
9152 (som_reduce_table, som_destroy_all_tables) New functions.
9153 (som_crush) New function, not implemented.
9155 * som.h: New table option STAB_CRUSH. Comment fix. New struct
9156 som_submission_form. Function prototypes revised.
9158 Outputting huge tables (1000s of rows) a few rows at a time
9159 is supported, though untested. May even break everything.
9160 Actually, the code doesn't even compile right now.
9161 * som.c: (struct som) New fields htv, nt, seq_no.
9162 (som_submit_table) Multiple arguments changed to a single
9163 pointer to struct submission_form. Only increments subtable_num
9164 if seq_no is zero. Only destroys table if it's not going to
9166 (replicate_table) New function.
9167 (output_table) Comment fix.
9168 (examine_table) Changed inline code to code calling
9169 replicate_table(). Calculates htv. Supports partial tables.
9170 (draw_title) Removed comment.
9171 (build_target) Only allows for title on first part of partial
9173 (dump_plain_table) Only resets table chunk number on first part
9174 of partial tables; FIXME: doesn't work quite right. Supports
9176 (dump_page) Titles only on first part of partial tables.
9178 Fri Jul 5 20:16:19 1996 Ben Pfaff <blp@gnu.org>
9180 * Thanks to an unreliable IDE hard drive, I have spent the last
9181 day reconstructing my Debian GNU/Linux installation and redoing
9182 the previous day's changes--somehow I managed to save every file
9183 except for output.c and output.h. So the following changes could
9184 really be considered independent of the output.c, output.h changes
9187 * output.h, output.c: Moved the outp_configure_vec global var,
9188 outp_names struct, and enum set OUTP_S_* from output.h to output.c.
9189 outp_configure_vec is now static.
9191 Thu Jul 4 20:20:24 1996 Ben Pfaff <blp@gnu.org>
9193 * The entire philosophy behind configuration of the output drivers
9194 changed. Now there is a termcap-type configuration where drivers
9195 to be read are determined beforehand, rather than parsing the
9196 entire output init file and storing it in memory & deciding what
9197 to actually use later. Faster & more memory-efficient at the same
9200 * output.c: Comment fix. Removed outp_init_drivers global var.
9201 Removed all references to synonyms. New structure outp_defn. New
9202 global vars outp_macros, outp_configure_vec.
9203 (search_name, delete_name, add_name, check_configure_vec,
9204 expand_name, find_defn_value) New static functions.
9205 (outp_configure_clear, outp_configure_add, outp_configure_macro,
9206 outp_read_devices) New extern functions.
9207 (outp_init) Much functionality moved into outp_read_devices.
9208 (outp_read_devices) Format of output init file changed; name of
9209 file is `devices' rather than `output' to avoid Makefile
9211 (outp_clear) Renamed outp_done.
9212 (outp_list_classes) Bug fix, cleaned up.
9213 (outp_list_drivers) Not implemented anymore.
9214 (outp_configure_driver) Now a static function; simplified; now
9215 interpolates macros; supports new structure.
9216 (outp_enable_driver, match_synonym) Removed; all references
9218 (find_driver) First argument removed.
9220 * output.h: Global var outp_init_drivers removed; new structure
9221 outp_names; new enum set OUTP_S_*; new global var
9222 outp_configure_vec; function prototypes for output.c exports
9225 * main.c: (main) Calls outp_read_devices() after parsing the
9228 * cmdline.c: (parse_command_line) New option -v --verbose;
9229 --version changed to -V. --device option changed syntax to just
9230 take a single device name. Accepts key=value declaration of
9231 output init file macros. Syntax message updated.
9233 * filename.c: (expand_line) New function.
9234 (interp_environ_vars) Renamed interp_vars; no longer uses
9236 (blp_getenv) Allows $ARCH and $VER pseudo-environment-vars to be
9237 overridden by real environment vars.
9238 (search_path) Uses verbose_msg() instead of #ifdef'd printf().
9239 * filename.h: interp_environ_vars() renamed interp_vars().
9241 * error.c, error.h: Added extern variable `verbosity', message
9244 * error.c: (vmsg) Support message class MM.
9245 (verbose_msg) New function.
9247 * descript.q: (generate_z_varname) Bug fix in generation of
9249 (dump_z_table) Bug fix in column headers.
9251 * ascii.c: (ascii_init_driver) Changed minimum number of lines per
9252 page from 29 to 15. Don't set a default for ops[OPS_INIT,
9253 OPS_DONE]. Writes the uninit string when the driver is closed.
9254 (ascii_open_page) Write the init string before the first page.
9255 (output_shorts) Form of main loop changed from `while' to `for'.
9256 Bug fix with overstrikes: the character is printed *after* the
9257 backspace. Eliminated a lot of `& 0xff' modifiers.
9258 (advance_to_left_margin) New function.
9259 (return_carriage, output_lines) Handle left margin.
9261 Thu Jul 4 00:35:59 1996 Ben Pfaff <blp@gnu.org>
9263 * ascii.c: New option `carriage-return-style'.
9265 * ascii.c: (count_fancy_chars) New function.
9266 (delineate, text_metrics) Use new function; bug fixes regarding
9268 (text_draw) Bug fix with rich text.
9269 (output_string, output_shorts) Reordered.
9270 (output_shorts) Now handles boxchars and some overstrike font
9272 (output_char, return_carriage) New functions.
9273 (output_lines) Now handles overstriking and font changes properly;
9274 some code moved to output_shorts.
9276 Tue Jul 2 22:13:23 1996 Ben Pfaff <blp@gnu.org>
9279 * ascii.c: New member `debug' in ascii_driver_ext.
9280 (ascii_init_driver, delineate) Uses new member.
9282 Now you can set a vertical height on writing text.
9283 * ascii.c: (delineate) Keeps track of vertical position.
9284 (text_draw) No longer considers fully justified text an internal
9287 * output.h: New flag OUTP_T_VERT; other OUTP_T_ values changed.
9289 Tables' titles are drawn; they can have variable height.
9290 * som.c: `som' struct has new member, title_height.
9291 (draw_title) New argument. Moved within file. All caller
9293 (build_target) New argument, amount of space needed for first row.
9294 Calculates height of title, takes that into account. All callers
9296 (dump_plain_table, dump_columnated_table) Took calculation of y1,
9298 (dump_columnated_table) [GLOBAL_DEBUGGING] Debugging code
9300 (dump_columnated_table) Organized for readability.
9301 (dump_page) Makes use of som.title_height.
9303 * som.c: Many comment bug fixes.
9305 * descript.q: (try_name, generate_z_name) Bug fix regarding
9306 generation of Z-score variable names.
9307 * var.h: Removed num from descriptives_proc; all referents removed.
9309 Mon Jul 1 22:13:39 1996 Ben Pfaff <blp@gnu.org>
9311 * ascii.c: (ascii_line_horz, ascii_line_vert,
9312 ascii_line_intersection) Added debugging code.
9314 Added a descriptive line above each table to describe it.
9315 * command.c: (parse_cmd) Calls som_new_series.
9317 * som.c: New static vars table_num, subtable_num. New `som'
9319 (dump_page) New arguments.
9320 (som_submit_table) Handle new variables.
9322 * som.c, som.h: (som_submit_table) New arguments. All callers
9324 (som_new_series) New function.
9325 (build_target) Makes room for extra line.
9326 (draw_title) New function.
9327 (dump_page) Calls draw_title. Bug fix: doesn't always set
9330 Columnation of tables support.
9331 * som.h: Deleted fr, lr, ri from som_table. Reorganized.
9333 * som.c: Deleted references to fr, lr, ri.
9334 (som_columnate) Bux fix: sets group member of table.
9335 (som_add_options) Function removed.
9336 (dump_table) Split into three functions; extensively reworked.
9338 * descript.q: (dump_z_table) Better output table formatting; added
9339 title support to correspond to som.h changes.
9340 (display) Title support.
9342 * output.h: Added OUTP_T_NONE.
9344 Mon Jul 1 13:00:00 1996 Ben Pfaff <blp@gnu.org>
9346 * descript.q: Improved handling of Z scores; still not perfect.
9348 * output.h, ascii.c: Added hook for getting em width of current
9351 * som.c: Uses new em-width hook. Added debugging code to
9353 (som_columnate) New argument.
9354 (som_add_options) Removed.
9356 Jun 29 17:40:47 1996 Ben Pfaff <blp@gnu.org>
9358 * som.h, som.c, output.c, output.h, ascii.c: Updated to work with
9359 rules as a property of the table instead of as a property of the
9362 * ascii.c: Added `header' to table of options.
9364 * descript.q: Added even shorter statistic names; modified to work
9365 with new som interface.
9367 * misc.c (blp_getdelim): Bug fix.
9369 * version.c: includes 'conf.h'.
9371 ----------------------------------------------------------------------
9374 version-control: never