1 Tue Jun 7 00:14:09 2005 Ben Pfaff <blp@gnu.org>
3 Make some code tolerant of reentry. Should not be needed if other
4 code is correct but it is good to be generally tolerant.
6 * error.c: (err_hcf) Set file_loc to null after free().
8 * output.c: (outp_done) Similar changes.
10 * str.c: (ds_destroy) Ditto.
12 Tue Jun 7 00:10:20 2005 Ben Pfaff <blp@gnu.org>
14 Continue work on bug 12859, plus some code cleanup.
16 * data-list.c: (cmd_repeating_data) Replace `seen' bitmap by
17 boolean variables. Don't try to compute starts_end, cont_end for
18 inline file. Calculate length only after parsing variable
19 specifications. Add proper transformation to list.
20 (realize_value) If the rpd_num_or_var has no value, return new
21 DEFAULT_MEMBER argument (for use with inline file).
22 (repeating_data_trns_proc) Pass default values.
24 * dfm-read.c: (dfm_close_reader) Only skip data if *not* still
25 open, and only if we actually started reading data.
27 Sun Jun 5 18:39:36 2005 Ben Pfaff <blp@gnu.org>
31 * output.c: (outp_read_devices) Fix message.
33 Fri May 27 12:34:43 WST 2005 John Darrington <john@darrington.wattle.id.au>
35 * sort-prs.[ch] (newfiles), aggregate.c, sort.[ch]: Separated the guts
36 of the sort algorithm from the parser for the SORT command.
38 * rank.q: Added the parser for the RANK command.
40 Thu May 26 12:29:21 2005 Ben Pfaff <blp@gnu.org>
44 * sort.c: (sort_parse_criteria) Only set *saw_direction if
45 saw_direction is non-null. Thanks to John Darrington for
48 Tue May 24 21:52:55 2005 Ben Pfaff <blp@gnu.org>
50 * get.c: (mtf_processing) Handle case of a lookup table as the
51 active file. Thanks to John Darrington for reporting this bug.
53 Wed May 25 10:27:02 WST 2005 John Darrington <john@darrington.wattle.id.au>
55 * alloc.c alloc.h: (xcalloc) changed signature to imitate the
56 POSIX calloc function.
58 * crosstabs.q get.c vars-prs.c: Updated calls to xcalloc to
59 reflect new signature.
61 * sfm-read.c: Now much more robust in the face of badly formed
64 Mon May 23 11:57:31 WST 2005 John Darrington <john@darrington.wattle.id.au>
66 *sfm-read.c: Fixed some bugs regarding long string continuation
67 records, which the previous fix uncovered.
69 Sat May 21 12:48:34 WST 2005 John Darrington <john@darrington.wattle.id.au>
71 * sfm-read.c, sfmP.h: Allow reading of system files when the
72 case_size value in the header is -1. Also changed some Errors to
73 Warnings when reading system files.
75 Tue May 17 21:00:57 2005 Ben Pfaff <blp@gnu.org>
77 * data-list.c: (data_list_trns_free) Don't free the argument
78 because cancel_transformations() will do that itself.
79 (data_list_source_destroy) Destroy the argument to
80 data_list_trns_free(), because it no longer does so itself.
82 Tue May 17 18:29:35 2005 Ben Pfaff <blp@gnu.org>
84 * data-out.c: (format_and_round) Don't output leading `-' if value
87 Tue May 17 00:06:43 2005 Ben Pfaff <blp@gnu.org>
91 * som.c: (output_encodings) If some cell in the table won't fit
92 with the horizontal or vertical headers, cancel those headers.
94 * som.h: (struct som_table_class) Add fits_width, fits_length,
97 * tab.c: (tabi_fits_width) New function.
98 (tabi_fits_length) New function.
99 (tabi_set_headers) New function.
100 (global var tab_table_class) Add the new functions as appropriate
103 Mon May 16 22:34:06 2005 Ben Pfaff <blp@gnu.org>
105 Fix rest of bug 13054.
107 * format.def: Fix EDATE, SDATE, ADATE, JDATE, QYR, MOYR, WKYR,
108 DATETIME, TIME system/portable file values.
110 Mon May 16 22:31:15 2005 Ben Pfaff <blp@gnu.org>
112 * data-list.c: (parse_free) Use make_input_format().
114 * data-out.c: (num_to_string) Use make_output_format().
116 * dictionary.c: (dict_create_var) Ditto.
118 * format.c: (global var f8_2) New var.
119 (make_input_format) New function.
120 (make_output_format) New function.
122 * get.c: (cmd_match_files) Use make_output_format().
124 * list.q: (cmd_list) Ditto.
126 * matrix-data.c: Ditto.
128 * sfm-read.c: (parse_format_spec) Check output specifier
131 * tab.c: (tab_float) Use make_output_format().
133 Sun May 15 23:38:10 2005 Ben Pfaff <blp@gnu.org>
135 Fix more of bug 13054.
137 * format.def: FMT_A should allow 255-character output. FMT_AHEX
138 should allow 510-character input and output.
140 * data-out.c: (num_to_string) Get rid of NEW_STYLE option.
141 (convert_E) Handle non-finite values.
143 (format_and_round) New function.
144 (convert_infinite) New function used by try_F() and convert_E().
146 Sun May 15 23:36:55 2005 Ben Pfaff <blp@gnu.org>
148 Regularize string and buffer function names so that they make some
151 * str.c: (mm_reverse) Rename buf_reverse(). Update all
153 (mm_find_reverse) Rename buf_find_reverse(). Update all
155 (mm_case_compare) Rename buf_compare_case(). Update all
157 (st_compare_pad) Rename buf_compare_rpad(). Update all
159 (str_compare_rpad) New function.
160 (st_bare_pad_copy) Rename buf_copy_str_rpad(). Update all
162 (buf_copy_str_lpad) New function.
163 (st_bare_pad_len_copy) Rename buf_copy_rpad(). Update all
165 (st_pad_copy) Rename str_copy_rpad(). Update all references.
166 (st_trim_copy) Rename str_copy_trunc(). Update all references.
167 (st_uppercase) Renamed str_uppercase(). Update all references.
169 Sat May 14 08:22:26 WST 2005 John Darrington <john@darrington.wattle.id.au>
171 * dfm-read.c: Fixed polarity of test in dfm-close-reader. Closes
174 Tue May 10 20:08:18 2005 Ben Pfaff <blp@gnu.org>
176 * data-in.c: (data_in) Add assertion to check input specifier.
178 * data-out.c: (data_out) Add assertion to check output specifier.
180 Tue May 10 19:56:35 2005 Ben Pfaff <blp@gnu.org>
182 Start to fix bug 13054.
184 * format.c: (check_input_specifier) Improve error message.
185 (check_input_specifier) Check F, COMMA, and DOLLAR formats for
186 valid decimal places.
187 (check_output_specifier) Ditto (but different criteria).
188 (convert_fmt_ItoO) Assert valid input and output specifiers.
189 Also, if input specifier has *any* decimal places, make the output
190 specifier 1 place wider.
192 Mon May 9 07:14:29 WST 2005 John Darrington <john@darrington.wattle.id.au>
194 * sysfile-info.c: Fixed bug [# 13024 ]
196 Sun May 8 13:52:12 2005 Ben Pfaff <blp@gnu.org>
198 "Fix" bug 13021 by disabling FILE TYPE. Eventually, we should
199 actually implement it.
201 * command.c: (FILE_TYPE_okay) Always return 1.
203 * command.def: Change FILE TYPE, END FILE TYPE into UNIMPL.
205 * file-type.c: Add prototypes to get rid of warnings.
207 Sun May 8 08:08:07 WST 2005 John Darrington <john@darrington.wattle.id.au>
209 * barchart.c box-whisker.c cartesian.c piechart.c plot-hist.c: Fixed
210 more ISO/IEC 9899:1990 conformance issues.
212 Wed May 4 23:54:02 2005 Ben Pfaff <blp@gnu.org>
214 Fix bug 12948. See also new test in
215 tests/bugs/match-file-scratch.sh.
217 * get.c: (mtf_merge_dictionary) Don't compact dictionary because
218 that deletes scratch variables that someone else might be using,
219 and because we can't reassign our sources' value indexes.
220 Instead, simply don't copy scratch variables into the master
223 * dictionary.c: (dict_compact_values) Delete variables from the
224 dictionary passed in, not from default_dict (!).
226 Tue May 3 22:25:17 2005 Ben Pfaff <blp@gnu.org>
228 Improve hash.c comments, error-checking.
230 * hash.c: (struct hsh_table) [NDEBUG] Add hash_ordered member.
231 (hsh_create) size == 0 should *not* return NULL! Set
233 (hsh_clear) Set hash_ordered.
234 (locate_matching_entry) Check hash_ordered.
235 (hsh_rehash) Rename rehash(). Add assertion. Set hash_ordered.
236 (hsh_data) Set hash_ordered. Add const-ness to return value and
240 Wed May 4 08:50:11 WST 2005 John Darrington <john@darrington.wattle.id.au>
242 * casefile.c: Removed unnecessary #include <valgrind/valgrind.h>
244 Tue May 3 19:14:48 WST 2005 John Darrington <john@darrington.wattle.id.au>
246 * copyleft.c: Updated copyright date.
248 * Makefile.am: Removed erroneous explicit "-lplot"
250 * examine.q oneway.q: Made these files conform to ISO/IEC 9899:1990
252 Tue May 3 16:20:31 WST 2005 John Darrington <john@darrington.wattle.id.au>
254 * command.c command.def: Added description string for unimplemented commands.
256 * oneway.q: Sorted the hash tables before shipping out the results. Closes
259 Mon May 2 23:45:01 2005 Ben Pfaff <blp@gnu.org>
263 * data-list.c: (parse_fixed) Use lex_end_of_command().
265 (cmd_repeating_data) Set cont_end.num in right situations.
266 (parse_repeating_data) Remove redundant test.
268 Mon May 2 23:37:19 2005 Ben Pfaff <blp@gnu.org>
270 Partial fix for bug 12859.
272 * data-list.c: (cmd_data_list) Add transformation properly in
273 vfm_source == NULL case.
275 Mon May 2 23:27:28 2005 Ben Pfaff <blp@gnu.org>
277 * lexer.c: (lex_error) Improve error messages.
279 Mon May 2 22:28:17 2005 Ben Pfaff <blp@gnu.org>
281 * get.c: (cmd_match_files) Check token type before trying to match
282 tokid. Fixes bug 12923.
284 Mon May 2 22:16:51 2005 Ben Pfaff <blp@gnu.org>
286 * flip.c: [HAVE_SYS_TYPES_H] Include <sys/types.h>. Fixes bug
289 Mon May 2 22:02:52 2005 Ben Pfaff <blp@gnu.org>
291 * expressions/generate.pl: (get_token) Make use of /g
292 backward-compatible with Perl 5.6.1.
294 Sun May 1 23:00:19 2005 Ben Pfaff <blp@gnu.org>
296 * var-display.c: (cmd_variable_alignment) Fix memory leak.
297 (cmd_variable_level) Ditto.
299 Sun May 1 22:49:04 2005 Ben Pfaff <blp@gnu.org>
301 Hash table had buggy deletion function. The fix required changing
302 other functions to do probing in the required order.
304 * hash.c: (locate_matching_entry) Rewrite and change interface.
305 (hsh_rehash) Rewrite to use locate_matching_entry().
308 (hsh_delete) Ditto. Also, fix stupid bugs.
310 Sun May 1 22:24:58 2005 Ben Pfaff <blp@gnu.org>
312 * dictionary.c: (dict_clone) Properly copy vectors.
314 Sun May 1 22:07:58 2005 Ben Pfaff <blp@gnu.org>
316 New implementation of long variable names. Each variable has a
317 "normal" name, which may be up to 64 bytes long and which is used
318 for all normal operations. Variables may have a "short" name,
319 which is limited to 8 bytes and used only for system and portable
320 file input and output.
322 Make tokid case-preserving. Update most uses of tokid to treat it
325 Update many commands to deal with long variable names.
327 * autorecode.c: (cmd_autorecode) Use strcasecmp() instead of strcmp().
329 * command.c: (cmd_parse) Ditto.
330 (match_strings) Use toupper() before comparing characters.
331 (conflicting_3char_prefixes) Use mm_case_compare() instead of
333 (cmd_match_words) Ditto.
335 * compute.c: (lvalue_parse) Use st_trim_copy() instead of
338 * count.c: (struct cnt_var_info) Change n[] to fit long var name.
339 Use st_trim_copy() instead of strcpy().
341 * data-in.c: (parse_enum) Use mm_case_compare() instead of
344 * data-list.c: (struct dls_var_spec) Change name[] to fit long var
346 (parse_free) Use st_trim_copy() instead of strcpy().
348 * descript.c: (struct dsc_var) Change z_name[] to fit long var
350 (try_name) Use strcasecmp() instead of strcmp().
351 (generate_z_varname) Use st_trim_copy() instead of strcpy().
352 (descriptives_compare_dsc_vars) Use strcasecmp() instead of
355 * dictionary.c: (struct dictionary) Removed `long_name_tab'
357 (compare_long_names) Removed.
358 (hash_long_name) Removed.
359 (dict_create) Don't initialize `long_name_tab' member.
360 (dict_clone) Copy short names into new dictionary.
361 (dict_clear) Don't clear `long_name_tab' member.
362 (dict_get_varname_block) Removed.
363 (dict_add_longvar_entry) Removed.
365 (dict_destroy) Don't destroy `long_name_tab' member.
366 (dict_create_var_from_short) Removed.
367 (dict_create_var_x) Removed.
368 (dict_create_var) Get rid of longname handling.
370 (dict_clone_var) Get rid of longname parameter and longname
372 (dict_lookup_var) Get rid of longname handling.
373 (dict_reorder_var) New function.
374 (dict_rename_var) Clear short name.
375 (dict_rename_vars) Get rid of longname handling. Clear short
377 (dict_create_vector) Support long vector names.
378 (dict_lookup_vector) Use strcasecmp() instead of strcmp().
379 (quasi_base27) Removed.
380 (make_short_name) Removed.
381 (compare_strings) New function.
382 (hash_string) New function.
383 (dict_assign_short_names) New function.
385 * file-handle.q: (get_handle_with_name) Use strcasecmp() instead
387 (get_handle_for_filename) Support long handle names.
389 * file-type.c: (struct col_spec) Make `name' fit long var names.
390 (cmd_file_type) Use strcasecmp() instead of strcmp().
392 * flip.c: (make_new_var) Rewrite.
393 (flip_sink_write) Use st_trim_copy() instead of strncpy().
395 * format.c: (parse_format_specifier_name) Use mm_case_compare()
398 * get.c: (cmd_save_internal) Rephrase.
399 (rename_variables) Drop test for identical variable name.
400 (struct mtf_proc) Change `first', `last' to fit long var name.
402 * hash.c: (hsh_hash_case_string) New function for case-insensitive
405 * lexer.c: (restore_token) Use st_trim_copy() instead of
407 (lex_get) Don't uppercase string when copying into tokid.
408 (lex_put_back_id) Use st_trim_copy() instead of
411 * list.q: (determine_layout) Consider length of variable names in
412 choosing vertical layout.
414 * matrix-data.c: (cmd_matrix_data) Use strcasecmp() instead of
416 (string_to_content_type) Ditto.
418 * modify-vars.c: (compare_variables_given_ordering) Ditto.
419 (struct var_renaming) Change `new_name' to fit long var name.
420 (compare_var_renaming_by_new_name) Use strcasecmp() instead of
423 * pfm-read.c: (read_variables) Disallow system variables in system
425 (write_variables) Call dict_assign_short_names() and use
426 short_name[] members.
428 * repeat.c: (internal_cmd_do_repeat) Use strcasecmp() instead of
431 * sfm-read.c: (sfm_open_reader) Rewrite code for long variable
432 map. Reorder variables into same order as long variable map.
433 (read_variables) Set short name.
435 * sfm-write.c: (sfm_open_writer) Call dict_assign_short_names().
436 (write_variable) Use st_bare_pad_copy().
437 (write_longvar_table) Rewrite.
439 * str.c: (mm_case_compare) New function.
441 * sysfile-info.c: (compare_vectors_by_name) Use strcasecmp()
444 * t-test.q: (tts_custom_groups) Remove redundant test.
445 (tts_custom_pairs) Ditto.
447 * var.h: (struct variable) Change `name' to fit long var names.
448 Remove `longname'. Add `short_name' member. Reorder some
450 (struct name_table_entry) Removed.
451 (struct vector) Change `name' to fit long vector names.
453 * vars-atr.c: (var_is_valid_name) Allow long var names.
454 (compare_var_names) Use strcasecmp() instead of strcmp().
455 (compare_var_ptr_names) Ditto.
456 (hash_var_name) Use hsh_hash_case_string().
457 (hash_var_ptr_name) Ditto.
458 (var_set_short_name) New function.
459 (var_clear_short_name) New function.
460 (var_set_short_name_suffix) New function.
462 * vars-prs.c: (parse_DATA_LIST_vars) Support long names.
463 Use strcasecmp() instead of strcmp().
464 (struct array_var_set) Removed `longname_tab'.
465 (array_var_set_lookup_var_idx) Drop longname_tab support.
466 (array_var_set_destroy) Don't destroy `longname_tab'.
467 (var_set_create_from_array) Don't create `longname_tab'.
469 * vector.c: (cmd_vector) Use strcasecmp() instead of strcmp().
472 * expressions/parse.c: (word_matches) Use mm_case_compare()
474 (compare_strings) New function.
475 (lookup_function) Use compare_strings() instead of strcmp().
477 Sun May 1 22:07:43 2005 Ben Pfaff <blp@gnu.org>
479 * algorithm.c: (move_element) New function.
481 Sun May 1 22:05:35 2005 Ben Pfaff <blp@gnu.org>
483 * aggregate.c: (parse_aggregate_functions) Always initialize
486 Sun May 1 22:03:47 2005 Ben Pfaff <blp@gnu.org>
488 * aggregate.c: (cmd_aggregate) Use dict_clone_var_assert().
490 * dictionary.c: (dict_clone) Ditto.
491 (dict_clone_var_assert) New function.
493 * get.c: (mtf_merge_dictionary) Use dict_clone_var_assert().
495 Sun May 1 15:05:54 WST 2005 John Darrington <john@darrington.wattle.id.au>
497 * error.c: Added a string for the compiler version to the
498 request_bug_report_and_abort function.
500 * groff_font.c, font.c: Removed manpage(1) style references from
501 comments, because RMS frowns upon them.
503 Thu Apr 28 18:52:06 2005 Ben Pfaff <blp@gnu.org>
505 * expressions/parse.c: Improve previous fix for bug 12858 (LAG).
507 Fri Apr 29 09:28:00 WST 2005 John Darrington <john@darrington.wattle.id.au>
509 * expressions/parse.c: Added handler for OP_LAG_Vn and OP_LAG_Vs.
512 Wed Apr 27 12:42:34 WST 2005 John Darrington <john@darrington.wattle.id.au>
514 * loop.c recode.c repeat.c: Fixed a couple of instances of SHORT_NAME_LEN
515 which should be LONG_NAME_LEN
517 Wed Apr 27 07:43:50 WST 2005 John Darrington <john@darrington.wattle.id.au>
519 * command.def echo.c: Added the ECHO command.
521 Mon Apr 25 22:55:59 2005 Ben Pfaff <blp@gnu.org>
523 Finish fixing MATCH FILES (bug 11677).
525 * get.c: (trim_dictionary) Rewrite in terms of drop_variables(),
526 keep_variables(), rename_variables().
527 (drop_variables) New function.
528 (keep_variables) New function.
529 (struct mtf_file) Rename `in' to `in_name'. Add `in_var'.
530 (cmd_match_files) Deal with in_var. Use drop_variables(),
531 keep_variables(). When IN is specified, require BY. Set master
532 variables after master dictionary is complete. Add IN variables
533 after master dictionary is complete.
534 (mtf_free_file) Free `in_name'.
535 (mtf_delete_file_in_place) Set in_var value to 0.
536 (mtf_read_nonactive_records) Rephrase.
537 (mtf_processing) Support IN. Rephrase. Fix bugs.
538 (mtf_merge_dictionary) Don't set master variables; we do that
540 (get_master) Don't insist that there's a master variable.
542 Mon Apr 25 22:55:22 2005 Ben Pfaff <blp@gnu.org>
544 Kluge to make some variable renaming sort of work.
547 * dictionary.c: (dict_rename_var) Call dict_add_longvar_entry().
549 Mon Apr 25 22:52:28 2005 Ben Pfaff <blp@gnu.org>
551 Add functions for comparing sets of variables between cases.
554 * case.c: (case_compare) New function.
555 (case_compare_2dict) New function.
557 * aggregate.c: (struct agr_proc) Remove `prev_break' member. Add
559 (cmd_aggregate) Nullify break_case. Don't call
560 initialize_aggregate_info().
561 (agr_destroy) Destroy break_case.
562 (aggregate_single_case) Rewrite. Use case_compare().
563 (dump_aggregate_info) Copy from break_case into output.
564 (initialize_aggregate_info) Copy break_case from input.
566 * get.c: (mtf_compare_BY_values) Use case_compare_2dict().
568 * vfm.c: (equal_splits) Use case_compare().
570 Sat Apr 23 17:01:04 WST 2005 John Darrington <john@darrington.wattle.id.au>
572 * dictionary.c vars-prs.c sfm-write.c: Fixed some memory leaks
574 Sun Apr 17 23:08:15 2005 Ben Pfaff <blp@gnu.org>
576 Start work on fixing MATCH FILES.
578 * get.c: (enum operation) Remove OP_MATCH.
579 (trim_dictionary) Change return value to bool. Don't support
581 (struct mtf_file) Remove `first', `last' members.
582 (struct mtf_proc) Add `first', `last' members. Change mtf_case
583 from `struct ccase *' to `struct ccase'. Remove `by' member.
584 (cmd_match_files) Essentially rewrite.
585 (mtf_free) Don't free `by' member. Destroy `mtf_case' member.
586 (mtf_read_nonactive_records) mtf_ parameter is not unused.
587 (mtf_processing) Ditto. Also rephrase some code.
588 (mtf_merge_dictionary) Rewrite for easy comprehension.
590 Sun Apr 17 23:06:00 2005 Ben Pfaff <blp@gnu.org>
592 * matrix-data.c: (wr_output_data) [DEBUGGING] Fix compilation
595 * q2c.c: (dump_token) [DEBUGGING] Fix compilation error.
597 Thu Apr 14 2005 John Darrington
599 * var-display.c: New file.
601 * format.h var.h sfm-read.c sfm-write.c dictionary.c : Added
602 display_width, measure and alignment parameters to variables.
604 * aggregate.c command.def compute.c count.c data-list.c descript.c
605 dictionary.c dictionary.h expr-prs.c file-type.c flip.c get.c
606 lexer.c lexer.h loop.c modify-vars.c pfm-read.c recode.c repeat.c
607 sfm-read.c sfm-write.c sfm-write.h sfmP.h val-labs.c val.h var.h
608 vars-prs.c vector.c :
609 - Replaced literal constants representing maximum variable name
610 length with macro definitions.
611 - Added support for long variable names.
612 - Changed lexer such that it no longer makes tokens upper
613 case, but relies upon case insensitive behaviour of commands.
615 Mon Apr 4 22:27:34 2005 Ben Pfaff <blp@gnu.org>
617 * aggregate.c: (parse_aggregate_functions) If dict_create_var()
618 fails, don't dereference the resulting null pointer (bug 12427).
619 Also, fix double free error.
621 Sat Mar 19 23:06:02 2005 Ben Pfaff <blp@gnu.org>
623 * aggregate.c: (parse_aggregate_functions) Fix N_NO_VARS format.
624 (accumulate_aggregate_info) Set int1 to 1 for SUM.
625 (dump_aggregate_info) Only make SUM non-missing if there was at
628 Sat Mar 19 14:48:19 2005 Ben Pfaff <blp@gnu.org>
630 * aggregate.c: (dump_aggregate_info) Properly test whether the
631 destination variable is numeric, when making the result
632 system-missing for columnwise missing values.
634 Mon Mar 14 21:52:34 2005 Ben Pfaff <blp@gnu.org>
636 * misc.h: Remove GCC specializations.
638 Mon Mar 14 21:07:23 2005 Ben Pfaff <blp@gnu.org>
640 Make sort stable (bug 12313).
642 * sort.c: Don't need to include some headers anymore.
643 (static var min_buffers) New variable.
644 (static var max_buffers) New variable.
645 (static var allow_internal_sort) New variable.
646 (cmd_sort_cases) Add test mode.
647 (sort_execute) Rephrase.
648 (do_internal_sort) Don't try internal sorting if
649 allow_internal_sort is set.
650 (struct external_sort) Renamed `initial_runs' to `runs' and
651 updated all references.
652 (macro MIN_BUFFER_TOTAL_SIZE_RECS) Removed.
653 (macro MIN_BUFFER_SIZE_BYTES) Removed.
654 (macro MIN_BUFFER_SIZE_RECS) Removed.
655 (compare_initial_runs) Removed.
656 (struct record_run) Add member `idx'.
657 (write_initial_runs) Pass increasing values to process_case() as
659 (process_case) Add `idx' parameter and use it to initialize new
661 (allocate_cases) Limit allocated buffers to max_buffers.
662 (compare_record_run) Use new `idx' member for last resort
663 comparison, for stability.
664 (end_run) Call casefile_sleep() on irs->casefile, to prevent
665 running out of file descriptors.
666 (struct merge_state) Removed.
667 (merge) Don't need to allocate cases. Always use MAX_MERGE_ORDER
668 unless we have fewer runs left. Always merge consecutive runs,
669 for stability. Return the final run.
671 (choose_merge) New function.
672 (merge_once) Rewritten.
674 Mon Mar 14 21:05:42 2005 Ben Pfaff <blp@gnu.org>
676 * cmdline.c: (static var testing_mode) Move into
677 parse_command_line().
679 Mon Mar 14 21:05:13 2005 Ben Pfaff <blp@gnu.org>
681 * algorithm.c: (remove_range) New function.
682 (remove_element) New function.
684 * dictionary.c: (dict_delete_var) Use remove_element().
686 * flip.c: (cmd_flip) Ditto.
688 Sun Mar 13 22:52:05 2005 Ben Pfaff <blp@gnu.org>
690 * file-handle.q: (struct file_handle) `open_mode' should not be
693 Sun Mar 13 22:40:54 2005 Ben Pfaff <blp@gnu.org>
695 First phase of making SORT CASES stable (bug 12313).
697 * sort.c: (struct indexed_case) New structure.
698 (do_internal_sort) Rewrite to make internal sorting stable.
699 (compare_case_dblptrs) Removed.
700 (compare_indexed_cases) New function.
702 Sun Mar 13 22:38:40 2005 Ben Pfaff <blp@gnu.org>
706 * casefile.c: (casereader_read_xfer_assert) New function.
708 * dictionary.c: (dict_compact_case) New function.
710 * flip.c: (struct flip_pgm) New member idx_to_fv.
711 (cmd_flip) Initialize idx_to_fv member.
712 (destroy_flip_pgm) Free idx_to_fv member.
713 (flip_sink_write) Use struct flip_pgm member instead of case_sink
715 (flip_sink_write) Ditto.
717 * vfm.c: (write_case) Use dict_compact_case() instead of
719 (compact_case) Removed.
720 (storage_source_create) Removed `dict' parameter. All references
723 * vfm.h: (struct case_source) Removed `value_cnt' member. All
725 (struct case_sink) Removed `dict', `idx_to_fv' members. All
728 Sun Mar 13 22:35:55 2005 Ben Pfaff <blp@gnu.org>
730 More AGGREGATE fixes.
732 * aggregate.c: (accumulate_aggregate_info) Implement NMISS and
733 NUMISS for strings. Fix FOUT, POUT, FGT, FLT, FIN, FOUT for
735 (initialize_aggregate_info) Fix initialization for MIN, MAX for
738 Sat Mar 12 23:26:21 2005 Ben Pfaff <blp@gnu.org>
740 Start work on testing and debugging AGGREGATE.
742 * aggregate.c: (cmd_aggregate) Use discrete bool variables instead
743 of a bit-map. Require proper subcommand ordering. Make OUTFILE
744 subcommand mandatory.
745 (parse_aggregate_functions) Check that PIN, POUT, FIN, FOUT
746 functions' arguments are in the correct order and swap them if
748 (accumulate_aggregate_info) Make SUM include weights. Add various
750 (dump_aggregate_info) Add various string functions.
751 (initialize_aggregate_info) Initialize int1 for MIN, MAX.
753 * sort.c: (sort_parse_criteria) Add parameter for returning
754 whether any directions were specified. All callers updated.
756 Sun Mar 13 14:54:27 WST 2005 John Darrington <john@darrington.wattle.id.au>
758 * t-test.q: Fixed erroneous logic in compare_group_binary.
760 Sat Mar 12 13:29:21 2005 Ben Pfaff <blp@gnu.org>
762 * split-file.c: (cmd_split_file) Ignore LAYERED and SEPARATE
763 keywords (bug 11628).
765 Sat Mar 12 13:17:12 2005 Ben Pfaff <blp@gnu.org>
767 * vfm.c: (procedure_with_splits) Fix bug 11492: end_func() must be
768 called *before* close_active_file().
770 Sat Mar 12 12:20:57 2005 Ben Pfaff <blp@gnu.org>
772 * file-handle.q: (struct file_handle) Change open_mode from
773 character pointer to 3-char array, for safety. Updated all
776 Sat Mar 12 12:15:49 2005 Ben Pfaff <blp@gnu.org>
778 Thanks to Ben Kujala <bkujala@oregonchildcare.org> for reporting
781 * pfm-read.c: (read_header) Improve error message for many cases
782 in which the input is not actually a portable file.
784 * file-handle.q: (fh_open) When we give an error message, actually
787 Fri Mar 11 11:50:30 2005 Ben Pfaff <blp@gnu.org>
789 * format.c: (check_common_specifier) New function for checks
790 common to check_input_specifier() and check_output_specifier().
791 (check_input_specifier) Use check_common_specifier().
792 (check_output_specifier) Use check_common_specifier().
793 (check_string_specifier) Removed.
794 (check_specifier_type) New function.
795 (check_specifier_width) New function.
796 (get_format_var_width) Fix bug.
798 * formats.c: (internal_cmd_formats) Only accept numeric variables.
800 * lexer.c: (check_id) Rename lex_id_to_token(), make public,
801 update all references. Make case-insensitive.
803 * pfm-read.c: Essentially rewrite the whole file. Now much
806 * print.c: (check_string_width) New function.
807 (fixed_parse_compatible) Use check_string_width(),
808 check_specifier_type().
809 (dump_fmt_list) Ditto.
811 * str.c: (st_trim_copy) New function.
812 (st_uppercase) New function.
814 * vars-atr.c: (var_is_valid_name) New function.
816 * expressions/parse.c: (type_coercion_core) Use
817 check_specifier_type().
819 Fri Mar 11 11:31:24 2005 Ben Pfaff <blp@gnu.org>
821 * expressions/evaluate.c: (cmd_debug_evaluate) Fix memory leaks.
823 * expressions/parse.c: (no_match) Ditto.
825 Wed Mar 9 09:54:27 2005 Ben Pfaff <blp@gnu.org>
827 * Makefile.am: (pspp_LDADD) Add libgsl-extras.a.
829 * expressions/helpers.c: (struct func_params) Removed.
830 (generalized_idf) Removed.
833 (idf_fdist) Use gslextras_cdf_beta_Pinv() instead of idf_beta().
835 * expressions/operations.def: Implement IDF.BETA, CDF.BINOM,
836 CDF.GEOM, CDF.HYPER, CDF.NEGBIN, CDF.POISSON using gsl-extras.
837 Implement SIG.F, which I had overlooked previously.
839 Tue Mar 8 12:47:53 WST 2005 John Darrington <john@darrington.wattle.id.au>
841 * command.c command.def glob.[ch] cmdline.c: Made DEBUG cmds
842 available only in testing mode.
844 Sun Mar 6 23:25:40 2005 Ben Pfaff <blp@gnu.org>
846 * data-in.c: Use `bool' throughout, where relevant.
848 Sun Mar 6 19:52:22 2005 Ben Pfaff <blp@gnu.org>
850 DATA LIST with free-field formats should not have implied decimal
851 places (bug 12035). Also clean up data-in.c a bit.
853 * data-in.h: (enum) Add DI_IMPLIED_DECIMALS.
855 * data-in.c: (apply_implied_decimals) New function.
856 (parse_numeric) Don't adjust exponent if DI_IMPLIED_DECIMALS not
857 set. Also, get rid of gotos.
858 (parse_Z) Use apply_implied_decimals() if the field doesn't
859 contain a decimal point.
860 (parse_N) Use apply_implied_decimals().
866 (parse_enum) New function.
867 (macro CHAR_IS_ROMAN) Removed.
868 (macro ROMAN_VALUE) Removed.
869 (parse_month) Use parse_enum().
870 (parse_weekday) Use parse_enum().
871 (parse_DATETIME) Use long for weekday.
873 * data-list.c: (read_from_data_list_fixed) Use
876 Sun Mar 6 17:07:20 2005 Ben Pfaff <blp@gnu.org>
878 When the lexer sees something like `-5' in the input, it has to
879 decide whether it's a negative numeric constant token or a '-'
880 token followed by a positive numeric constant token. It always
881 decides on the former, and then the parser can call
882 lex_negative_to_dash() if it wants the latter. However, this
883 doesn't work for the case of `-0', because negative zero is
884 (portably) indistinguishable from positive zero. So now we divide
885 T_NUM into two tokens, T_POS_NUM and T_NEG_NUM, to make the
886 distinction clear. This requires a little bit of extra effort,
887 because there were several references to T_NUM in the code base.
889 * lexer.c: (lex_get) Use T_NEG_NUM and T_POS_NUM to distinguish
890 positive and negative numeric constants.
891 (lex_double_p) Renamed lex_is_number(). Changed return type to
892 bool. Updated all relevant references to T_NUM to instead use
894 (lex_double) Renamed lex_number(). All references updated.
895 (lex_integer_p) Renamed lex_is_integer(). Changed return type to
896 bool. All references updated.
897 (lex_token_representation) Understand T_NEG_NUM and T_POS_NUM.
898 (lex_negative_to_dash) Ditto.
901 * lexer.h: (enum) Add T_POS_NUM, T_NEG_NUM. Remove T_NUM.
903 Sun Mar 6 22:09:20 2005 Ben Pfaff <blp@gnu.org>
905 * expressions/operations.def: (NUMBER) Use DI_IMPLIED_DECIMALS.
907 Sun Mar 6 19:33:24 2005 Ben Pfaff <blp@gnu.org>
909 * expressions/operations.def: (VEC_ELEM_NUM) Treat user-missing
910 values as system-missing.
912 * expressions/parse.c: (parse_vector_element) Fix order of
913 arguments in call to expr_allocate_binary().
915 Sun Mar 6 17:51:05 2005 Ben Pfaff <blp@gnu.org>
917 * expressions/optimize.c: (optimize_tree) Fix optimization bug for
920 * expressions/parse.c: (type_coercion_core) Set *node to NULL on
921 failure, as indicated by function comment.
922 (parse_binary_operators) Always return NULL on type_coercion()
923 failure. Should have been doing this anyway, but bug in
924 type_coercion_core() filtered through.
925 (parse_add) Fix typo in user message.
926 (parse_primary) Understand T_NEG_NUM and T_POS_NUM.
928 Sun Mar 6 10:47:13 2005 Ben Pfaff <blp@gnu.org>
930 * expressions/operations.def: Add VALUE function.
932 * expressions/parse.c: (parse_function) Need an unary composite
933 node for variables in A TO B, not a variable node. Use
934 allocate_unary_variable().
935 (parse_primary) Use allocate_unary_variable().
936 (allocate_unary_variable) New function.
938 Thu Mar 3 23:53:32 2005 Ben Pfaff <blp@gnu.org>
940 * expressions/PSPP_expressions.pm: Renamed it back to generate.pl
941 but fixed the real problem that was preventing the build from a
942 separate directory. I liked it my way better ;-)
944 Thu Mar 3 23:17:51 2005 Ben Pfaff <blp@gnu.org>
946 * expressions/parse.c: (expr_parse) Fix parameter type. Thanks to
947 John Darrington <john@darrington.wattle.id.au> for reporting this
950 Thu Mar 3 22:10:25 WST 2005 John Darrington <john@darrington.wattle.id.au>
952 * expressions/Makefile.am expressions/evaluate.h.pl
953 expressions/evaluate.inc.pl expressions/operations.h.pl
954 expressions/optimize.inc.pl expressions/parse.inc.p:
956 Renamed generate.pl to PSPP_expressions.pm and adjusted *.pl
959 Fixed everything so that it can be built from an arbitrary
962 Thu Mar 3 22:08:35 WST 2005 John Darrington <john@darrington.wattle.id.au>
964 * Makefile.am : Fixed up CLEANFILES target.
966 Mon Feb 28 23:49:56 2005 Ben Pfaff <blp@gnu.org>
968 * str.h: Changed `struct len_string' to `struct fixed_string', a
969 more accurate name. Updated all references.
971 Mon Feb 28 23:35:30 2005 Ben Pfaff <blp@gnu.org>
973 Redo calendar support. Should now be bug-for-bug compatible.
975 * calendar.c: New file.
977 * calendar.h: New file.
979 * data-in.c: Use new calendar functions.
980 (parse_sign) Change sense of return value.
981 (calendar_error) New function.
982 (ymd_to_ofs) New function.
983 (ymd_to_date) New function.
984 (parse_DATE) Use new function.
994 (parse_DATETIME) Ditto.
996 * data-out.c: (convert_date) Use new calendar functions.
998 * error.c: (err_vmsg) Changed interface to be more sensible.
1000 (dump_message) Don't double new-lines (why did we do this
1003 Mon Feb 28 23:30:25 2005 Ben Pfaff <blp@gnu.org>
1005 * sfmP.h: (macro flt64) Moved here from pref.h.orig.
1006 (macro FLT64_MAX) Moved here from pref.h.orig.
1008 Mon Feb 28 23:28:01 2005 Ben Pfaff <blp@gnu.org>
1010 * set.q: Support SET EPOCH.
1011 (static var set_epoch) New var.
1012 (aux_stc_custom_epoch) New function.
1013 (stc_custom_epoch) New function.
1014 (get_epoch) New function.
1015 (stc_custom_pager) [USE_INTERNAL_PAGER] Fix bug.
1017 * format.c: Make it possible just to check whether a specifier is
1018 valid without emitting an error message.
1019 (parse_format_specifier_name) Change interface, update all
1021 (check_input_specifier) Ditto.
1022 (check_output_specifier) Ditto.
1023 (parse_format_specifier) Ditto.
1025 Mon Feb 28 23:24:08 2005 Ben Pfaff <blp@gnu.org>
1027 * command.def: Add DEBUG POOL.
1029 * pool.c: (pool_destroy) Fix bug in deleting this pool from its
1031 (pool_clear) Properly account for size of pool gizmo.
1032 (pool_realloc) Ditto.
1033 (pool_clone) New function.
1035 * pool.h: Mark our allocation functions MALLOC_LIKE.
1037 Mon Feb 28 23:21:26 2005 Ben Pfaff <blp@gnu.org>
1039 * Makefile.am: Move many definitions into new top-level
1040 Make.build. Add expressions to SUBDIRS. Add calendar.c,
1041 calendar.h. Remove expr-evl.c, expr-opt.c expr-prs.c, expr.h,
1044 * case.c: (case_resize) New function.
1045 (case_swap) New function.
1047 * casefile.c: Include mkfile.h.
1049 Fri Feb 25 21:11:35 WST 2005 John Darrington <john@darrington.wattle.id.au>
1051 * sfm-read.c: Fixed a buglet which caused a crash when trying
1052 to read a non-existent file.
1054 Sun Feb 13 16:11:13 2005 Ben Pfaff <blp@gnu.org>
1058 * aggregate.c: (parse_aggregate_functions) Code cleanup.
1059 Important part: get rid of spurious copying of function->format to
1060 destvar->print and destvar->write.
1062 Fri Feb 11 00:08:36 2005 Ben Pfaff <blp@gnu.org>
1064 Fix bug 11916, which was confusing a variable's `index' member
1065 with the variable's position in a var_set. Although these are
1066 usually the same, they are not for array `var_set's.
1068 Took advantage of this bug as an opportunity to clean up and
1069 rewrite parse_var_set_vars().
1071 * vars-prs.c: (parse_vs_variable_idx) New function.
1072 (parse_vs_variable) Reimplement in terms of
1073 parse_vs_variable_idx().
1074 (parse_var_idx_class) New function.
1075 (add_variable) New function.
1076 (add_variables) New function.
1077 (parse_var_set_vars) Rewritten.
1078 (struct var_set) Change `lookup_var' member that returns a
1079 variable into `lookup_var_idx' member that returns an int.
1080 Updated the var set implementations in obvious corresponding ways.
1081 Used compare_var_ptr_names(), hash_var_ptr_name() just added.
1083 Fri Feb 11 00:06:03 2005 Ben Pfaff <blp@gnu.org>
1085 Use our global variable compare & hash functions and give them
1086 better names. Add similar functions for dealing with double
1087 pointers to variables.
1089 * vars-atr.c: (compare_variables) Renamed compare_var_names().
1090 (hash_variable) Renamed hash_var_name().
1091 (compare_var_ptr_names) New function.
1092 (hash_var_ptr_name) New function.
1094 * t-test.q: (cmd_t_test) Use global compare_var_names(),
1096 (compare_var_name) Removed.
1097 (hash_var_name) Removed.
1099 Fri Feb 11 00:04:39 2005 Ben Pfaff <blp@gnu.org>
1103 * dictionary.c: (compare_variable_dblptrs) Rename
1104 compare_var_ptrs() and fix it to properly dereference the double
1107 Mon Feb 7 09:58:15 WST 2005 John Darrington <john@darrington.wattle.id.au>
1109 crosstabs.q examine.q oneway.q q2c.c: Added a q2c feature to
1110 declare subcommands as mandatory. Closed bug #11843
1112 Sat Feb 5 20:35:10 WST 2005 John Darrington <john@darrington.wattle.id.au>
1114 * getline.c command.[ch] command.def: Added (very rudimentary)
1115 support for line completion when in interactive mode. Partially
1116 addresses bug #11693
1118 Mon Jan 31 09:52:51 WST 2005 John Darrington <john@darrington.wattle.id.au>
1120 * examine.q factor_stats.c oneway.q output.c pfm-read.c: Fixed some
1121 problems revealed by valgrind.
1124 Wed Jan 26 11:44:11 WST 2005 John Darrington <john@darrington.wattle.id.au>
1126 * set.q: Affixed a fix to the previous fix such that we'll be OK now
1127 whether or not PAGER is set.
1129 Wed Jan 26 09:25:54 WST 2005 John Darrington <john@darrington.wattle.id.au>
1131 * set.q: Copied the string produced by getenv("PAGER") thus avoiding
1132 "invalid free" errors. Hopefully fixes bug #11722
1134 * compute.c expr-prs.c: Check that lvalues are populated before
1135 attempting to destroy them. Closes bug #11676
1137 Tue Jan 25 21:01:43 WST 2005 John Darrington <john@darrington.wattle.id.au>
1139 * aggregate.c: Initialised the complete agr_proc structure.
1143 Sun Jan 23 23:02:21 2005 Ben Pfaff <blp@gnu.org>
1145 * print.c: (print_trns_free) Close the dfm writer if there is one,
1146 fixing a memory leak.
1148 Mon Jan 24 12:24:36 WST 2005 John Darrington <john@darrington.wattle.id.au>
1150 * glob.c oneway.q q2c.c t-test.q vfm.c: Still *more* memory leaks
1154 Fri Jan 21 19:54:14 WST 2005 John Darrington <john@darrington.wattle.id.au>
1156 * linked-list.[ch] Added
1158 * examine.q file-handle.[hq] font.h glob.c groff-font.c postscript.c
1159 set.q: Yet more memory leaks
1161 Tue Jan 18 23:12:40 WST 2005 John Darrington <john@darrington.wattle.id.au>
1163 * t-test.q examine.q : More memory leaks fixed.
1165 Tue Jan 18 19:26:59 WST 2005 John Darrington <john@darrington.wattle.id.au>
1167 * examine.q factor_stats.[ch] get.c pfm-read.c: Plugged numerous
1170 Mon Jan 10 14:43:45 WST 2005 John Darrington <john@darrington.wattle.id.au>
1172 * ascii.c cartesian.c casefile.c chart.h devind.c
1173 examine.q frequencies.q
1174 html.c output.h piechart.c plot-chart.c plot-hist.c
1176 Integrated the chart rendering into the output stream
1177 (currently only works for html).
1179 Removed gratuitous use of ifndef NO_CHARTS, and replaced with
1180 dummy-chart.c for compiling without charts.
1182 * mkfile.[ch] Created.
1184 * som.[ch] tab.[ch]: Changed name of som_table to som_entity
1185 Added type element so we can tell if it's a chart or a table.
1187 * chart.h examine.q piechart.c plot-chart.c plot-hist.c: changed the
1188 API of charts to be more like that of tables.
1190 Thu Jan 13 21:00:02 WST 2005 John Darrington <john@darrington.wattle.id.au>
1192 * casefile.c main.c: Moved the SIGINT handler from casefile.c to
1193 main.c. Removed the handler for SIGQUIT.
1195 Mon Jan 10 14:43:45 WST 2005 John Darrington <john@darrington.wattle.id.au>
1197 * casefile.c: Added a signal handler to delete temp files on
1200 * permissions.c Inhibited the PERMISSIONS command when SAFER is on.
1202 * command.def Added a lot more unimplemented commands.
1204 * copyleft.[ch] cmdline.c Moved legal information to copyleft.c
1206 Sat Jan 8 23:58:34 2005 Ben Pfaff <blp@gnu.org>
1208 * sort.c: (compare_initial_runs) Needed additional level of
1210 (merge_once) Fix plenty of stupid mistakes.
1212 Sat Jan 8 23:55:27 2005 Ben Pfaff <blp@gnu.org>
1214 * casefile.c: (casefile_sleep) Need to flush_buffer() after
1215 calling casefile_to_disk() or we will lose the last block in the
1216 file if the casefile started out as disk-based.
1217 (casefile_get_reader) Initialize reader->destructive to 0.
1218 (cmd_debug_casefile) Add new test pattern.
1219 (test_casefile) Define new test pattern to make sure
1220 casefile_sleep() works properly.
1222 Fri Jan 7 08:00:05 WST 2005 John Darrington <john@darrington.wattle.id.au>
1224 * Makefile.am chart.[ch] histogram.[ch] piechart.c (Modified);
1225 plot-hist.c plot-chart.c (Added) Reorganised these files in an
1226 attempt to seperate the creation and processing of charts from their
1229 * examine.q frequencies.q generated charts conditional upon the NO_CHARTS
1232 Thu Jan 6 18:48:58 WST 2005 John Darrington <john@darrington.wattle.id.au>
1234 * main.c Added a signal handler for SIGFPE
1236 * sort.c Somewhat more robust fix to the previous entry.
1238 Wed Jan 5 21:23:31 2005 Ben Pfaff <blp@gnu.org>
1240 * sort.c: (merge) Fix assertion for proper Huffman merge pattern:
1241 0 == 1 modulo 1. See Knuth 5.4.9 (vol. 3, 2nd ed.,
1242 pp. 361). Thanks to John Darrington <john@cellform.com.au> for
1245 Wed Jan 5 22:42:26 WST 2005 John Darrington <john@darrington.wattle.id.au>
1247 * case.h Fixed bug # 11307
1249 Wed Jan 5 08:30:48 WST 2005 John Darrington <john@darrington.wattle.id.au>
1251 * val-labs.c Fixed bug which caused a crash if VALUE LABELS had
1254 Mon Jan 3 17:44:37 2005 Ben Pfaff <blp@gnu.org>
1256 * pfm-read.c: (read_variables) Remove direct manipulation of
1257 v->aux, which is no longer needed. Fixes bug 11483.
1259 Sat Jan 1 19:01:16 WST 2005 John Darrington <john@darrington.wattle.id.au>
1261 * data-list.c Fixed a bug in parsing delimiters.
1263 * group.c vars-atr.c Fixed buglet in hash/compare functions for alpha
1266 * percentiles.c Properly handled calculation of Tukey hinges where
1267 the number of data is small.
1269 * oneway.q Used the generic value_to_string function for independent
1270 variable instead of trying to do it ourselves.
1272 * box-whisker.c Fixed a buglet which caused a crash if the number of
1276 Fri Dec 31 16:47:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1278 * examine.q box-whisker.c chart.h Implemented boxplots in EXAMINE
1280 * percentiles.c Fixed some bugs when calculating percentiles when
1281 there's a small number of cases.
1283 Wed Dec 29 08:18:08 WST 2004 John Darrington <john@darrington.wattle.id.au>
1285 * percentiles.[ch] Added. Calculates percentiles and Tukey hinges
1287 * examine.q factor_stats.[ch] Added calculation of percentiles
1289 Fri Dec 24 15:09:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
1291 * t-test.q Fixed bug #11227 Made t-test work when the independent
1294 Sat Dec 11 11:43:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1296 * factor_stats.c Fixed calculation of trimmed mean under various
1299 Sat Dec 4 17:14:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
1301 * histogram.c chart.[ch] factor_stats.c frequencies.q
1303 Added code to calculate sensible histogram ranges and limits.
1305 Thu Dec 2 13:37:43 WST 2004 John Darrington <john@darrington.wattle.id.au>
1307 * chart.h Updated to reflect many API changes.
1309 * cartesian.c chart.c Moved the definitions of chart_write_{xy}scale from
1310 cartesian.c and into chart.c
1312 * factorstats.[ch] Added the histogram calculations
1314 * casefile.c Removed an unused variable.
1316 * frequencies.q examine.q histogram.c Reworked the API for
1319 * piechart.c Revised the API for piecharts.
1321 * var.h Moved the definitions of freq_tab and freq out of var.h
1322 and into frequencies.q where they belong.
1324 Tue Nov 30 21:10:20 2004 Ben Pfaff <blp@gnu.org>
1326 * flip.c: (flip_file) Check for off_t separately from fseeko(),
1327 using AC_TYPE_OFF_T.
1329 Tue Nov 30 08:47:41 2004 Ben Pfaff <blp@gnu.org>
1331 * flip.c: (flip_file) If fseeko() is not available, use long int
1332 for off_t. Thanks to "Marshall DeBerry" <mdb@radix.net> for
1333 reporting the problem.
1335 Mon Nov 29 12:20:59 WST 2004 John Darrington <john@darrington.wattle.id.au>
1337 * examine.q factor_stats.[ch] Changed stderr to se_mean to avoid
1338 conflict with stdio.
1340 Sun Nov 21 10:32:41 WST 2004 John Darrington <john@darrington.wattle.id.au>
1342 * var-labs.c (var_to_string) Now returns null if the variable is null
1344 * value-labels.c (value_to_string) Made it return null if either the
1345 value or the variable is null.
1347 * hash.c (hsh_clear) Fixed a buglet.
1349 * examine.q factor_stats.[ch] Largely rewrote, because I'd started
1350 with the wrong model.
1352 * casefile.[ch] Added a function to return the casereader.case_idx
1355 * examine.q Implemented the extreme values results.
1357 John Darrington <john@darrington.wattle.id.au>
1359 * settings.h set.c glob.[ch] frequencies.q q2c.c error.c lexer.[ch]
1360 output.[ch] getline.c
1362 Plugged some memory leaks
1364 Mon Nov 15 23:47:40 2004 Ben Pfaff <blp@gnu.org>
1366 Adopt GSL random number generators, paving the way for providing
1367 the complete suite of random number generators on expressions.
1369 * Makefile.am: Remove random.c, random.h.
1371 * random.c: Removed.
1373 * random.h: Removed.
1375 * algorithm.c: (algo_default_random) Use GSL functions.
1377 * casefile.c: (test_casefile) Use GSL RNG functions.
1379 * expr-evl.c: (expr_evaluate) Use GSL RNG functions for OP_NORMAL,
1382 * sample.c: (cmd_sample) Use GSL RNG functions.
1383 (sample_trns_proc) Ditto.
1385 * set.q: (static var set_seed) Removed.
1386 (static var seed_flag) Removed.
1387 (static var rng) New variable.
1388 (aux_stc_custom_seed) No seed value anymore, don't print anything.
1389 (stc_custom_seed) Use new seed functions.
1390 (seed_is_set) Removed.
1391 (get_rng) New function that composes the entire external
1393 (set_rng) New function.
1394 (random_seed) New function.
1396 Mon Nov 15 22:08:25 2004 Ben Pfaff <blp@gnu.org>
1398 * expr-evl.c: (expr_evaluate) Fix XDATE.JDAY formula. Thanks to
1399 John Darrington <john@darrington.wattle.id.au> for reporting this
1402 Tue Nov 16 13:19:18 WST 2004 John Darrington <john@darrington.wattle.id.au>
1404 * permissions.c command.def Added the PERMISSIONS command
1406 Mon Nov 15 01:33:32 2004 Ben Pfaff <blp@gnu.org>
1408 * q2c.c: (dump_header) Don't try to emit #includes at very top of
1409 output file because that will precede #include <config.h>, which
1411 (main) Add needed headers to /* (header) */ code.
1413 Mon Nov 15 01:21:36 2004 Ben Pfaff <blp@gnu.org>
1415 Instead of making system or portable file readers responsible for
1416 dropping and reordering variables, make them read full cases and
1417 let the caller take care of any changes.
1419 * get.c: New "case map" structure to handle this. Use for GET,
1420 IMPORT, MATCH FILES. Essentially rewrite the whole file.
1422 * pfm-read.c: (pfm_read_case) Read into provided case. Signature
1423 changed appropriately.
1425 * sfm-read.c: (sfm_read_case) Ditto.
1427 Mon Nov 15 00:47:45 2004 Ben Pfaff <blp@gnu.org>
1429 Decided that case_serialize() and case_unserialize() were too
1430 abstract. Also we need a couple more functions to avoid excessive
1431 copying for data in/out fast paths.
1433 * case.c: (case_serial_size) Removed.
1434 (case_serialize) Rename case_to_values() and make its argument
1435 explicitly an array of union values.
1436 (case_unserialize) Rename case_from_values() and make its argument
1437 explicitly an array of union values.
1438 (case_data_all) New function.
1439 (case_data_all_rw) New function.
1441 * casefile.c: (struct casefile) Change buffer from array of
1442 unsigned char to array of union value for better accuracy.
1443 Redefine buffer_used and buffer_size in terms of values, not
1444 bytes. Remove case_size because it is now redundant with
1445 value_cnt. Fix up all references to these members.
1447 Mon Nov 15 00:45:46 2004 Ben Pfaff <blp@gnu.org>
1449 * barchart.c: (struct subcat) Make `label' member const to silence
1450 GCC warning with -Wwrite-strings.
1452 * cartesian.c: (struct dataset) Ditto.
1454 * case.c: Don't re-define NDEBUG if already defined.
1455 Add lots of comments.
1457 * str.c: Fix includes.
1459 * crosstabs.q: Fix includes.
1461 * examine.q: Fix includes. Fix GCC warning about unused
1464 * frequencies.q: (stat macro) Removed and replaced where used by
1467 * list.q: Fix includes.
1469 * oneway.q: Fix includes.
1471 * piechart.c: Fix includes. Only define M_PI if not already
1474 * sfm-read.c: (bswap) New function.
1475 (bswap_int32) Write in terms of bswap.
1476 (bswap_flt64) Ditto.
1478 * str.c: (ds_data) Add external definition here, needed because
1479 str.h has only an `extern inline' version.
1481 * value-labels.c: Fix includes.
1483 Mon Nov 15 00:40:55 2004 Ben Pfaff <blp@gnu.org>
1485 Instead of providing a system or portable file writer with a raw
1486 case in the format needed for output, provide it with a regular
1487 case. The writer takes care of any needed translation.
1489 * aggregate.c: Adopt new scheme for AGGREGATE.
1490 (struct agr_proc) sfm_agr_case member removed.
1491 (write_case_to_sfm) Removed because the new interface is easier to
1494 * get.c: Adopt new scheme for SAVE, XSAVE, EXPORT.
1496 * pfm-write.c: Implement new scheme.
1498 * sfm-write.c: Ditto.
1500 Mon Nov 15 00:32:24 2004 Ben Pfaff <blp@gnu.org>
1502 Instead of treating `struct file_handle' as a class to subclass
1503 into data files, system files, and portable files, instead use it
1504 as a helper that coordinates access. Now it is opaque, too.
1506 This means that most references to a struct file_handle are now
1507 changed into references to one of struct dfm_reader, struct
1508 dfm_writer, struct sfm_reader, struct sfm_writer, struct
1509 pfm_reader, or struct pfm_writer, according to what's being read
1512 Most related changes are only worth summarizing briefly.
1514 * dictionary.c: (dict_clear) Destroy aux data in deleted
1516 (dict_clear_aux) New function.
1517 (dict_create_var) Initialize aux, aux_dtor.
1518 (dict_delete_var) Destroy aux data in deleted variable.
1520 * file-handle.h: (struct fh_ext_class) Removed.
1521 (struct file_handle) Removed.
1522 (fh_init_files) Removed.
1524 * file-handle.q: Changed references to a handle's `private' member
1525 to direct references.
1526 (struct private_file_handle) Renamed file_handle.
1527 Add next, open_cnt, type, open_mode, aux members.
1528 (struct file_handle_list) Removed.
1529 (extern var inline_file) Removed.
1530 (static var file_handles) Changed from file_handle_list * to
1532 (create_file_handle) Initialize new members.
1533 (fh_close_handle) Removed.
1534 (mode_name) New function.
1535 (fh_open) New function.
1536 (fh_close) New function.
1537 (fh_parse_file_handle) Renamed fh_parse().
1539 * glob.c: (init_glob) Remove fh_init_files() call.
1541 * aggregate.c: use sfm_writer.
1542 (create_sysfile) Removed because the new interface is simpler.
1544 * apply-dict.c: Use sfm_reader.
1546 * data-list.c: Use dfm_reader.
1548 * file-type.c: Use dfm_reader.
1550 * get.c: Use sfm_reader, sfm_writer, pfm_reader, pfm_writer.
1552 * inpt-pgm.c: Use dfm_reader.
1554 * print.c: Use dfm_writer.
1556 * sysfile-info: Use sfm_reader.
1558 * dfm-read.c: Adopt new file handle infrastructure.
1560 * dfm-write.c: Ditto.
1562 * pfm-read.c: Ditto.
1564 * pfm-write.c: Ditto.
1566 * sfm-read.c: Ditto.
1568 * sfm-write.c: Ditto.
1570 Mon Nov 15 00:31:44 2004 Ben Pfaff <blp@gnu.org>
1572 Break dictionary functions into separate header file.
1574 * dictionary.h: New file.
1576 * var.h: Moved dict_*() functions to dictionary.h.
1578 Mon Nov 15 00:30:33 2004 Ben Pfaff <blp@gnu.org>
1580 Get rid of procedure-specific union in struct variable, using
1581 instead a void * pointer and a destructor function.
1583 Most related changes are only worth brief summaries.
1585 * crosstabs.q: Fix includes. Use new struct var_range in lieu of
1586 old p.crs member in struct variable.
1588 * frequencies.q: Fix includes. Use new struct var_freqs in lieu
1589 of old p.frq member in struct variable.
1591 * histogram.c: (draw_histogram) Takes new freq_tab arg because
1592 it's no longer possible to grab this from var->p.frq.
1594 * piechart.c: (draw_piechart) Ditto.
1596 * group.c: (group_proc_get) New function.
1598 * levene.c: Use group_proc_get() in lieu of old p.grp_data member
1605 * main.c: (execute_command) Clear aux data in default_dict after
1606 each command. (It's debatable whether this should be done.)
1608 * matrix-data.c: Use new struct mxd_var in lieu of old p.mxd
1609 member in struct variable.
1611 * means.q: Get rid of integer mode, which is not included in
1612 recent SPSS and was the only code that wanted per-variable private
1615 * var.h: (struct crosstab_proc) Removed.
1616 (struct frequencies_proc) Removed.
1617 (struct list_proc) Removed.
1618 (struct get_proc) Removed.
1619 (struct means_proc) Removed.
1620 (struct matrix_data_proc) Removed.
1621 (struct match_files_proc) Removed.
1622 (lots of enums) Removed.
1623 (struct variable) Removed members `p', `get'. Add member
1626 * vars-atr.c: (var_attach_aux) New function.
1627 (var_detach_aux) New function.
1628 (var_clear_aux) New function.
1629 (var_dtor_free) New function.
1630 (discard_variables) Use NULL instead of inline_file.
1632 Fri Nov 12 10:07:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
1634 * value-labs.c Fixed the implmentation of value_to_string, so
1635 that it properly handles alpha values.
1637 * oneway.q Changed instances where labels were being probed manually,
1638 to use the canonical {var,value}_to_string functions
1640 Thu Nov 11 21:01:31 WST 2004 John Darrington <john@darrington.wattle.id.au>
1642 * examine.q cartesian.c chart.[ch] Added normal and detrended normal
1643 plots. Changed the API of the cartesian plot to be a much lower level
1646 Sun Nov 7 17:25:04 WST 2004 John Darrington <john@darrington.wattle.id.au>
1648 * examine.q Added some of the parametric calculations
1650 * factor_stats.[ch] Created
1652 Sat Nov 6 21:24:31 WST 2004 John Darrington <john@darrington.wattle.id.au>
1654 * examine.q Changed the definition of factors to be a composite, and
1655 dealt with the consequences.
1657 Sat Nov 6 20:40:38 WST 2004 John Darrington <john@darrington.wattle.id.au>
1659 * examine.q Fixed problem where examine wasn't dealing properly with
1662 Sat Nov 6 14:49:47 WST 2004 John Darrington <john@darrington.wattle.id.au>
1664 * oneway.q Fixed problem where oneway wasn't dealing properly with
1667 Thu Nov 4 11:09:01 WST 2004 John Darrington <john@darrington.wattle.id.au>
1669 * q2c.c examine.q Fixed a bug (feature?) whereby arrays in the
1670 command which had settings didn't get the appropriate code
1673 * val.h value-labels.[ch] var-labs.c Added v*to_string functions
1674 to convert variables/values to strings.
1676 * examine.q Added framework for the EXAMINE command.
1678 Mon Nov 1 12:46:17 WST 2004 John Darrington <john@darrington.wattle.id.au>
1680 * q2c.c frequencies.q set.q t-test.q Fixed the q2c parsing of DBL
1681 subcommand types. Changed frequencies.q to use it rather then the
1682 custom parser. Dealt with the consequences. Added a test for NTILES
1683 subcommand of frequencies.
1685 Sat Oct 30 09:16:29 WST 2004 John Darrington <john@darrington.wattle.id.au>
1687 * oneway.q Fixed up the behaviour when given missing values
1689 * levene.c oneway.q Fixed a buglet with the levene statistic and
1690 incorporated the levene test into the oneway command.
1692 * group.h t-test.q Moved the CMP_EQ and CMP_LE symbols out of
1693 global scope, since they're only relevant to T-TEST
1695 Fri Oct 29 17:39:03 WST 2004 John Darrington <john@darrington.wattle.id.au>
1697 * group.c group.h group_proc.h levene.c oneway.q t-test.q
1699 Made the t-test more consistent
1700 with the way it handles groups. That is, it now uses a hash instead
1701 of an array of 2. Also, made the levene.c file independent of the
1702 implementation of the t-test. So now levene should be fine for both
1705 * Added an oneway.q file for one way anova
1707 Wed Jun 2 22:08:02 2004 Ben Pfaff <blp@gnu.org>
1709 * descript.c: (cmd_descriptives) Remove harmless but bogus test in
1712 Mon May 31 20:45:24 2004 Ben Pfaff <blp@gnu.org>
1716 * data-list.c: (cmd_data_list) Free dls->delims on lossage.
1717 (data_list_trns_free) Free dls->delims.
1719 * t-test.q: (tts_custom_pairs) Free vars.
1720 (ssbox_one_sample_init) Fix tab_vline() argument.
1721 (ssbox_independent_samples_init) Ditto.
1722 (trbox_paired_init) Ditto.
1723 (trbox_one_sample_init) Ditto.
1725 Mon May 31 17:19:27 2004 Ben Pfaff <blp@gnu.org>
1727 Generalize casefiles to the extent that we can use them for
1728 sorting and other kinds of data transformations. Change cases to
1729 be copy-on-write to improve memory efficiency in common cases.
1730 Every access to a member of a `struct ccase' was changed to be a
1731 call to a case_*() function, especially case_data(), case_num(),
1732 case_str(), or case_data_rw(). Many instances of a local variable
1733 named "case_num" were changed to "case_idx" as a consequence.
1734 Many `struct ccase *' were changed to actual `struct ccase'
1735 because of copying semantics of cases. In several places there
1736 was a choice between updating debug code to work with the new ADTs
1737 or just deleting it because it was useless; I chose to delete it.
1739 * Makefile.am: (pspp_SOURCES) Add case.c, case.h.
1745 * aggregate.c: (struct agr_proc) Change type of `sort' to
1746 sort_criteria *. Add `break_vars', `break_var_cnt' members.
1747 Rename `vars' to `agr_vars', all references updated. Change
1748 `agr_case' to type `struct ccase'.
1749 (cmd_aggregate) Deal with new members. Use case_create(),
1750 sort_active_file_in_place(), sort_active_file_to_casefile().
1751 (agr_destroy) Deal with new members.
1752 (aggregate_single_case) Ditto.
1753 (dump_aggregate_info) Ditto.
1754 (initialize_aggregate_info) Ditto.
1755 (agr_to_active_file) Ditto.
1756 (presorted_agr_to_sysfile) Ditto.
1757 (sort_agr_to_sysfile) Removed.
1759 * alloc.c: (out_of_memory) Make non-static.
1761 * alloc.h: Prototype out_of_memory().
1763 * casefile.c: Switched from a linked list in-memory representation
1764 to a two-level array-style representation. The linked list was
1765 appropriate when we could stick a header onto cases, but that's no
1766 longer the case. Also, the two-level array will allow for random
1767 in-memory access in case that's ever wanted. Also added the
1768 concept of a `destructive casereader', one that destroys cases in
1769 the underlying casefile as they are read out.
1770 (macro CASES_PER_BLOCK) New macro.
1771 (struct casefile) New members `value_cnt', `case_list_size',
1772 `case_acct_size', `being_destroyed', `cases'. Removed `head',
1774 (struct casereader) Removed `cur'. Added `destructive', `c'.
1775 (global var casefiles) Made static.
1776 (static var case_bytes) New var.
1777 (casefile_create) Takes a value count, not a case size in bytes,
1778 to conform to the case interface. All callers updated. Deal with
1779 new and removed members.
1780 (casefile_destroy) Deal with new and removed members.
1781 (casefile_sleep) New function.
1782 (casefile_get_case_size) Removed.
1783 (casefile_get_value_cnt) New function.
1784 (casefile_append) Rewritten to deal with new and removed members.
1785 (casefile_append_xfer) New function.
1786 (write_case_to_disk) Use case_serialize().
1787 (call_posix_fadvise) Removed because posix_fadvise64 segfaults.
1788 Couldn't figure out why.
1789 (casefile_to_disk) Don't call call_posix_fadvise. Rewritten to
1790 deal with new and removed members.
1792 (merge_sort) Removed.
1793 (casefile_sort) Removed.
1794 (casefile_get_reader) Deal with new and removed members.
1795 (casefile_get_destructive_reader) New function.
1796 (reader_open_file) Make code more readable. Create case for
1798 (casereader_get_casefile) New function.
1799 (casereader_read) Deal with new and removed members. Now returns
1800 a copy of the case, so that the caller is responsible for
1801 destroying the returned case.
1802 (casereader_read_xfer) New function.
1803 (casereader_destroy) Destroy reader's case.
1804 (test_casefile) Second arg is now a value count, all callers
1805 updated. Now tests destructive readers too.
1806 (get_random_case) Deal with new case ADT.
1807 (write_random_case) Ditto.
1808 (read_and_verify_random_case) Ditto.
1810 * crosstabs.q: Remove debug code.
1812 * descript.q: (calc_descriptives) Deal with new case, casefile
1815 * dfm.c: (cmd_begin_data) There's no storage_source_class anymore.
1817 * do-if.c: Remove unneeded header inclusion.
1819 * expr-prs.c: Remove debug code.
1821 * exprP.h: Remove debug code.
1823 * flip.c: (flip_file) Use fseeko() if available.
1825 * formats.c: Remove debug code.
1827 * get.c: Remove debug code.
1828 (struct mtf_file) Change `input' from `union value *' to `struct
1829 ccase', all references updated.
1831 * levene.c: (levene) Deal with new case, casefile ADTs.
1833 * list.q: Remove debug code.
1835 * loop.c: Remove debug code.
1837 * matrix-data.c: Remove debug code.
1839 * means.q: Remove debug code.
1841 * mis-val.c: Remove debug code.
1843 * pfm-read.c: Remove debug code.
1844 (pfm_read_code) Change second arg from `union value *' to `struct
1845 ccase *', all references updated.
1847 * recode.c: (string_to_long) Make first arg const.
1848 (convert_to_double) Ditto.
1850 * repeat.c: Remove debug code.
1852 * sample.c: Remove debug code.
1854 * sfm-read.c: Remove debug code.
1855 (sfm_read_case) Change second arg from `union value *' to `struct
1858 * sort.c: Redone in terms of casefiles.
1859 (enum sort_direction) Moved here from sort.h.
1860 (struct sort_criterion) New structure.
1861 (struct sort_criteria) New structure.
1862 (cmd_sort_cases) Rewritten.
1863 (prepare_to_sort_active_file) New function.
1864 (sort_active_file_in_place) New function.
1865 (sort_active_file_to_casefile) New function.
1866 (parse_sort) Renamed sort_parse_criteria(), rewritten & interface
1867 changed, all callers updated.
1868 (destroy_sort_cases_pgm) Renamed sort_destroy_criteria(),
1869 rewritten & interface changed, all callers updated.
1870 (sort_cases) Renamed sort_execute(), rewritten & interface
1871 changed, all callers updated.
1872 (struct internal_sort) Removed.
1873 (do_internal_sort) Rewritten, interface changed.
1874 (destroy_internal_sort) Removed.
1875 (compare_case_dblptrs) Use sort_criteria instead of sort_case_pgm.
1876 (struct initial_run) Removed; an initial run is now just a
1878 (compare_initial_runs) Rewritten.
1879 (struct external_sort) Changed almost completely.
1880 (do_external_sort) Rewritten, interface changed.
1881 (destroy_external_sort) Rewritten.
1882 [HAVE_MKDTEMP] (make_temp_dir) Removed.
1883 [!HAVE_MKDTEMP] (do_mkdir) Removed.
1884 [!HAVE_MKDTEMP] (make_temp_dir) Removed.
1885 (init_external_sort) Removed.
1886 (simulate_error) Removed.
1887 (rmdir_temp_dir) Removed.
1888 (get_temp_file_name) Removed.
1889 (open_temp_file) Removed.
1890 (close_temp_file) Removed.
1891 (remove_temp_file) Removed.
1892 (write_temp_file) Removed.
1893 (read_temp_file) Removed.
1894 (struct record_run) Change `record' from `struct case_lit *' to
1896 (struct initial_run_state) Remove `idx_to_fv', `free_list',
1897 `file_idx', `output_file'. Add `run', casefile'. Change
1898 `last_output' from `struct case_list *' to `struct ccase'.
1899 (write_initial_runs) Change interface, rewrite.
1900 (sort_sink_write) Renamed process_case(), changed interfaced,
1902 (destroy_initial_run_state) Rewritten.
1903 (allocate_cases) Rewritten.
1904 (compare_record) Interface changed, rewritten.
1905 (start_run) Rewritten.
1906 (end_run) Rewritten.
1907 (output_record) Rewritten.
1908 (grab_case) Removed.
1909 (release_case) Removed.
1910 (struct merge_case) Change `cases' from double pointer to single
1912 (merge) Deal with new case and casefile ADTs.
1913 (struct run) Removed.
1914 (merge_once) Rewritten, interface changed.
1915 (fill_run_buffer) Removed.
1916 (sort_sink_make_source) Removed.
1917 (sort_sink_class) Removed.
1918 (struct sort_source_aux) Removed.
1919 (sort_source_read_helper) Removed.
1920 (sort_source_read) Removed.
1921 (read_sort_output) Removed.
1922 (read_internal_sort_output) Removed.
1923 (read_external_sort_output) Removed.
1924 (sort_source_destroy) Removed.
1925 (sort_source_class) Removed.
1927 * sort.h: (struct sort_cases_pgm) Removed.
1928 (enum sort_direction) Moved to sort.c.
1930 * t-test.q: (calculate) Deal with new case, casefile ADTs.
1932 * tab.c: Remove debug code.
1934 * var-labs.c: Remove debug code.
1936 * var.h: (struct ccase) Removed.
1937 (struct case_list) Removed.
1939 * vars-atr.c: (discard_variables) Use free_case_source().
1941 * vars-prs.c: (parse_vs_variable) Make arg const.
1942 (parse_dict_variable) Ditto.
1943 (parse_variables) Make struct dictionary * arg const.
1944 (parse_var_set_vars) Make struct var_set * arg const.
1945 (struct var_set) Add const to some of the function pointers' args.
1946 (var_set_get_cnt) Make arg const.
1947 (var_set_get_var) Make first arg const.
1948 (var_set_lookup_var) Make first arg const.
1949 (dict_var_set_get_cnt) Make arg const.
1950 (dict_var_set_get_var) Make first arg const.
1951 (dict_var_set_lookup_var) Make first arg const.
1952 (var_set_create_from_dict) Make arg const. Add cast to aux
1954 (struct array_var_set) Add const to var member.
1955 (array_var_set_get_cnt) Make arg const.
1956 (array_var_set_get_var) Make first arg const.
1957 (array_var_set_lookup_var) Make first arg const.
1958 (var_set_create_from_array) Make first arg const. Insert cast.
1960 * vfm.c: (struct write_case_data) Change trns_case, sink_case
1961 members from `struct ccase *' to `struct ccase'.
1962 (static var lag_queue) Change from double to single pointer.
1963 (procedure) Optimize trivial case.
1964 (internal_procedure) Deal with changed case, case_source ADTs.
1965 (create_trns_case) Changed interface, rewrote.
1966 (open_active_interface) Initialize modified lag queue.
1967 (write_case) Deal with changed case ADT.
1968 (lag_case) Deal with modified lag queue.
1969 (close_active_file) Destroy modified lag queue.
1970 Deal with changed case_source, case_sink ADTs.
1971 (destroy_storage_stream_info) Make null arg into no-op.
1972 (storage_sink_make_source) Set aux in created source.
1973 (storage_source_read) Deal with changed case, casefile ADTs.
1974 (storage_source_create) New function.
1975 (lagged_case) Rewrite.
1976 (free_case_source) New function.
1977 (free_case_sink) Rewrite.
1978 (struct split_aux_data) Changed prev_case from `struct ccase *' to
1980 (procedure_with_splits) Deal with changed prev_case.
1981 (procedure_with_splits_callback) Ditto.
1982 (multipass_split_aux_data) Changed prev_case from `struct ccase *' to
1984 (multipass_procedure_with_splits) Deal with changed prev_case.
1985 (multipass_split_callback) Ditto.
1988 Mon May 31 17:19:06 2004 Ben Pfaff <blp@gnu.org>
1990 The workspace idea didn't work out.
1992 * Makefile.am: (pspp_SOURCES) Remove workspace.c, workspace.h.
1994 * workspace.c: Removed.
1996 * workspace.h: Removed.
1998 Sun May 30 18:35:19 2004 Ben Pfaff <blp@gnu.org>
2000 Fully implement arbitrary delimiters on DATA LIST, extending the
2001 half implementation that was already there.
2003 * data-list.c: (struct data_list_pgm) Remove `delim', add
2004 `delims', `delim_cnt'.
2005 (cmd_data_list) Initialize new members. Parse delimiters and
2006 clean up code a bit.
2007 (cut_field) Extract fields with arbitrary delimiters. Also, fix
2008 handling of leading commas.
2009 (read_from_data_list_fixed) Expand tabs. Adapt to new DFM
2011 (read_from_data_list_free) Adapt to new DFM interfaces.
2012 (read_from_data_list_list) Ditto.
2013 (repeating_data_trns_proc) Ditto.
2015 * dfm.c: Split up reader and writer into separate code, because
2016 they do different things. Use struct string instead of explicit
2017 allocation code, for clarity.
2018 (enum dfm_reader_flags) New enum.
2019 (struct dfm_fhuser_ext) Removed.
2020 (struct dfm_reader_ext) New.
2021 (get_reader) New function, used by just about all the reader
2023 (dfm_close) Removed.
2024 (close_reader) New function.
2025 (dfm_open_for_reading) Rewrite initialization of dfm_fhuser_ext.
2026 (dfm_open_for_writing) Ditto.
2027 (macro force_line_buffer_expansion) Removed.
2028 (count_tabs) Removed.
2029 (tabs_to_spaces) Removed.
2030 (read_record) Deal with new dfm_reader_ext. Use struct string
2031 functions. Don't convert tabs to spaces.
2032 (dfm_eof) New function.
2033 (dfm_get_record) Changed interface, rewrote.
2034 (dfm_expand_tabs) New function.
2035 (dfm_fwd_record) Renamed dfm_forward_record(), updated to new
2036 dfm_reader_ext, rewritten.
2037 (dfm_bkwd_record) Renamed dfm_reread_record(), updated to new
2038 dfm_reader_ext, rewritten.
2039 (dfm_set_record) Removed in favor of dfm_forward_columns().
2040 (dfm_forward_columns) New function.
2041 (dfm_get_cur_col) Renamed dfm_column_start, updated to new
2042 dfm_reader_ext, rewritten.
2043 (static var dfm_r_class) Use close_reader for the destructor.
2044 (struct dfm_writer_ext) New.
2045 (dfm_put_record) Updated to new dfm_writer_ext, rewritten. Uses
2046 bounce buffer now instead of local allocation.
2047 (close_writer) New function.
2048 (static var dfm_writer_ext) Use close_writer for destructor.
2049 (cmd_begin_data) Adapt to new dfm_reader_ext.
2051 * file-handle.q: Add support for per-file tab width.
2052 (struct private_file_handle) Add tab_width member.
2053 (q2c specifications) Add tabwidth subcommand.
2054 (cmd_file_handle) Put parsed tab width into private_file_handle.
2055 (create_file_handle) Set default tab width.
2056 (handle_get_tab_width) New function.
2058 * file-type.c: (file_type_source_read) Adapt to new DFM interface.
2060 * inpt-pgm.c: (reread_trns_proc) Ditto.
2062 * matrix-data.c: (context) Ditto.
2063 (another_token) Ditto.
2067 Sun May 30 18:33:59 2004 Ben Pfaff <blp@gnu.org>
2069 * casefile.c: (casefile_destroy) Fix memory leak by freeing
2071 (casereader_destroy) Don't close file descriptor -1.
2073 * recode.c: (cmd_recode) Fix memory leak.
2075 * set.q: (q2c specifications) Fix typo in user message.
2077 * str.c: (st_bare_pad_len_copy) Change memcpy to memmove to avoid
2078 undefined behavior for overlapping arguments.
2080 Sun May 30 18:31:48 2004 Ben Pfaff <blp@gnu.org>
2082 * casefile.c: valgrind doesn't implement posix_fadvise() yet, so
2083 don't call it when we're running under valgrind.
2084 (call_posix_fadvise) New function.
2085 (casefile_to_disk) Use call_posix_fadvise().
2086 (reader_open_file) Ditto.
2088 Sun May 30 18:20:12 2004 Ben Pfaff <blp@gnu.org>
2090 Update our string ADTs, struct string and struct len_string. Get
2091 rid of pool support, which was largely unused. Rename lots of
2092 functions to have more obvious or consistent names.
2094 * ascii.c: Get rid of ascii_pool. It was only used for string
2096 (ascii_open_global) Don't create ascii_pool.
2097 (ascii_close_driver) Don't destroy ascii_pool.
2098 (ascii_postopen_driver) Don't use pool.
2099 (ascii_close_driver) Destroy strings manually.
2101 * str.c: (ds_create) Remove pool argument, all references updated.
2103 (ds_replace) Remove pool support, make more efficient when we
2104 don't need to reallocate.
2105 (ds_destroy) Remove pool support.
2106 (ds_rpad) New function.
2107 (ds_size) Renamed ds_capacity(), all references updated.
2108 (ds_value) Renamed ds_c_str(), all references updated.
2109 (ds_concat) Renamed ds_puts(), all references updated.
2110 (ds_concat_buffer) Renamed ds_concat(), all references updated.
2111 (ds_putchar) Renamed ds_putc(), all references updated.
2112 (ds_getline) Renamed ds_gets(), all references updated.
2113 (ls_create) Remove pool argument, all references updated.
2114 (ls_create_buffer) Ditto.
2115 (ls_destroy) Removed pool support.
2116 (ls_value) Renamed ls_c_str(), all references updated.
2118 * str.h: (ls_length) [__GNUC__] Add inline version.
2119 (ls_c_str) [__GNUC__] Add inline version.
2120 (ls_end) [__GNUC__] Add inline version.
2121 (struct string) Remove pool member. Rename `size' to `capacity',
2122 all references updated.
2124 * tab.c: (text_format) Instead of using pool argument to
2125 ls_create_buffer(), call pool_register() on allocated data.
2127 Mon Apr 26 22:40:07 2004 Ben Pfaff <blp@gnu.org>
2129 We're abusing the current ASCII driver by telling it to allocate a
2130 9999-line, 9999-character page in the tests. This causes some
2131 systems to curl up and die because it allocates 20 MB of
2132 contiguous RAM. This change alleviates at least part of the
2133 problem. It is mostly a stop-gap until the new output system is
2136 * ascii.c: (struct line) New structure.
2137 (struct ascii_driver_ext) Remove `page', `page_size', `line_len',
2138 `line_len_size', `n_output' members. Add `lines', `lines_cap'.
2139 (ascii_preopen_driver) Initialize new members, not old ones.
2140 (ascii_close_driver) Destroy new members, not old ones.
2141 (ascii_open_page) Allocate new members, not old ones.
2142 (expand_line) Allocate room in line.
2143 (draw_line) Use new members.
2144 (ascii_line_horz) Ditto.
2145 (ascii_line_vert) Ditto.
2146 (ascii_line_intersection) Ditto.
2148 (output_lines) Ditto.
2149 (ascii_close_page) Ditto.
2151 Sun Apr 25 23:40:15 2004 Ben Pfaff <blp@gnu.org>
2153 * matrix.c: Dead code. Removed.
2155 * matrix.h: Dead code. Removed.
2157 Fri Apr 16 23:59:51 2004 Ben Pfaff <blp@gnu.org>
2159 Contrary to what I'd always understood, there is an efficient
2160 algorithm for deletion from a hash table populated via linear
2161 probing. This change implements it.
2163 * hash.c: (hsh_rehash) Probe in increasing order.
2165 (locate_matching_entry) Ditto.
2166 (hsh_delete) Use Knuth's Algorithm 6.4R for deletion.
2168 Tue Apr 13 19:24:15 2004 Ben Pfaff <blp@gnu.org>
2170 * moments.c (calc_moments): Adjust calculation of kurtosis to
2171 avoid subtracting huge numbers from huge numbers, on Michael
2174 Sun Apr 11 14:22:12 2004 Ben Pfaff <blp@gnu.org>
2176 Rework moments routines for improved numerical stability based on
2177 Michael Kiefte's advice. Any bugs or remaining numerical problems
2178 are still mine though.
2180 There is now a struct moments1 for use with one-pass moments. It
2181 uses a provisional means algorithm as an attempt to improve
2182 accuracy of higher moments. The older struct moments now only
2183 handles two-pass moments.
2185 * aggregate.c: Use moments1 instead moments.
2187 * descript.c: Revert previous change, which is no longer needed
2188 due to the moments revision.
2190 * moments.c: (calc_moments) New function for calculating variance,
2192 (moments_pass_one) Only accumulate weights bigger than zero.
2193 (moments_calculate) Allow calculating the mean on pass one, others
2194 require pass two. Implement in terms of calc_moments().
2195 (struct moments1) New structure.
2196 (init_moments1) New function.
2197 (moments1_clear) Ditto.
2198 (moments1_create) Ditto.
2199 (moments1_add) Ditto.
2200 (moments1_calculate) Ditto.
2201 (moments1_destroy) Ditto.
2202 (cmd_debug_moments) Deal with `struct moments' or `struct
2203 moments1' as requested by user.
2205 Sun Apr 11 14:21:55 2004 Ben Pfaff <blp@gnu.org>
2207 * Makefile.am (pspp_SOURCES): Remove debug.c.
2209 * debug.c: Removed. It was empty anyway.
2211 Fri Apr 9 20:04:49 2004 Ben Pfaff <blp@gnu.org>
2213 * descript.c (calc_descriptives): Fix assert failure when only
2214 MOMENT_MEAN is needed.
2216 2004-04-09 Michael Kiefte <mkiefte@dal.ca>
2220 fixed problem with parsing in match_statistic() causing
2221 "DESCRIPTIVE STAT=MEAN." to barf.
2223 "MEAN" is now default if "SORT" given without specification.
2225 Fixed infinite loop with "DESCRIPT GIBBERISH=ALL." Parsing is
2226 generally less forgiving of syntax errors: better to have it do
2227 nothing and type it in again then to not know what it actually did
2230 z-score transformation now checks score for user-missing values
2231 and checks std_dev for SYSMIS.
2233 2004-04-06 Michael Kiefte <mkiefte@dal.ca>
2235 * aggregate.c, crosstabs.q, descript.c, dictionary.c, frequencies.q, levene.c, t-test.q, var.h:
2236 Changed dict_get_case_weight() to accept an additional int * flag
2237 to complain about system-missing, user-missing, zero, or negative
2238 weights and updated existing functions to pass int * to
2239 dict_get_case_weight().
2241 2004-04-05 jmd <jmd@gnu.org>
2243 * main.c: Fixed configuration problems with gsl
2245 * t-test.q: Fixed some problems encountered when compiling under Cygwin
2247 2004-04-03 blp <blp@gnu.org>
2249 * lexer.c, ChangeLog:
2250 Fix infinite loop on comment at end of file, add test.
2252 2004-04-03 jmd <jmd@gnu.org>
2254 * settings.h, var.h, ChangeLog, Makefile.am, cmdline.c, command.c, command.h, error.h, filename.c, frequencies.q, lexer.h, main.c, q2c.c, set.q:
2255 Fixed the calculation of percentiles and added --syntax and --algorithm options
2257 Sat Apr 3 11:43:37 2004 Ben Pfaff <blp@gnu.org>
2259 * lexer.c: (lex_skip_comment) Handle end-of-file correctly (I
2262 Sat Apr 3 15:00:18 WST 2004 John Darrington <john@darrington.wattle.id.au>
2264 * frequencies.q: Fixed the calculation of percentiles
2266 * Makefile.am: Added the --ansi flag and dealt with the
2267 consequences. Added some entries to PSPP_sources so that
2268 make distcheck would pass
2270 * cmdline.c: Added the --syntax and --algorithm options
2272 * q2c.c: Added an implicit /ALGORITHM subcommand to everything.
2274 Fri Apr 2 11:25:22 WAST 2004 John Darrington <john@darrington.wattle.id.au>
2276 * t-test.q, levene.c, levene.h Converted t-test (incl levene) to
2277 use the new multipass_split_... mechanism.
2279 Wed Mar 31 22:36:22 2004 Ben Pfaff <blp@gnu.org>
2281 * frequencies.q: (calc_stats) Use moments data structure and
2282 calc_seskew(), calc_sekurt() functions.
2284 * set.q main.c settings.h Added support for --syntax and --algorithm
2287 Tue Mar 30 22:04:19 2004 Ben Pfaff <blp@gnu.org>
2289 * vfm.c: Had to get last call to multipass_split_output() inside
2290 open_active_file()/close_active_file() pairing, so introduce new
2292 (internal_procedure) Move procedure() code here, except for calls
2293 to open_active_file() and close_active_file().
2294 (procedure) Wrap open_active_file() and close_active_file() around
2295 internal_procedure().
2296 (multipass_procedure_with_splits) Wrap open_active_file() and
2297 close_active_file() around internal_procedure().
2299 Tue Mar 30 22:01:57 2004 Ben Pfaff <blp@gnu.org>
2301 * descript.c: (cmd_descriptives) Free `vars' to avoid memory leak.
2303 Mon Mar 29 16:26:40 2004 Ben Pfaff <blp@gnu.org>
2305 * debug.c: Removed. Moved cmd_debug_evaluate() into expr-evl.c.
2307 * expr-evl.c: (cmd_debug_evaluate) Moved here from debug.c.
2309 Mon Mar 29 16:03:08 2004 Ben Pfaff <blp@gnu.org>
2311 * algorithm.c: By default turn off some of the more expensive
2313 (expensive_assert) New macro which expands to assert if
2314 EXTRA_CHECKS is defined, to nothing otherwise.
2315 (unique) Use expensive_assert().
2316 (binary_search) Ditto.
2322 * command.c: (conflicting_3char_prefixes) Words that are the same
2323 don't cause conflicts when they are abbreviated to the first three
2326 * expr-evl.c: (CONCAT_func) Fix memory leak by incrementing struct
2327 nonterm_node's n earlier.
2328 (generic_str_func) Ditto.
2330 Mon Mar 29 15:32:17 2004 Ben Pfaff <blp@gnu.org>
2332 Add support for multipass procedures. Rewrite DESCRIPTIVES to
2333 test multipass support, take advantage of new moments
2334 calculation, and to not be such crappy code. Get rid of q2c
2335 processing for DESCRIPTIVES.
2337 * vfm.c: (struct multipass_split_aux_data) New structure.
2338 (multipass_procedure_with_splits) New function.
2339 (multipass_split_callback) New function.
2340 (multipass_split_output) New function.
2341 * descript.q: Removed.
2343 * descript.c: New file.
2345 * var.h: Removed descriptives enums.
2346 (struct descriptives_proc) Removed.
2347 (struct variable) Removed p.dsc.
2349 * Makefile.am: (q_sources_c) Remove descript.c.
2350 (q_sources_q) Removed descript.q.
2352 Mon Mar 29 15:31:55 2004 Ben Pfaff <blp@gnu.org>
2354 New manager for keeping track of used workspace.
2356 * workspace.c: New file.
2358 * workspace.h: New file.
2360 * Makefile.am: (pspp_SOURCES) Add workspace.c, workspace.h.
2362 * sort.c: (do_internal_sort) Use workspace_malloc().
2363 (destroy_internal_sort) Use workspace_free().
2365 Mon Mar 29 15:31:08 2004 Ben Pfaff <blp@gnu.org>
2367 New `struct casefile' for managing sets of cases.
2369 * casefile.c: New file.
2371 * casefile.h: New file.
2373 * command.def: Add DEBUG CASEFILE command.
2375 * Makefile.am: (pspp_SOURCES) Add casefile.c, casefile.h.
2377 * sort.c: (sort_cases) Move logic for sending storage file to disk
2378 into do_external_sort().
2379 (struct internal_sort) Use an array of ccase pointers instead of a
2381 (do_internal_sort) Rewrite to handle casefiles.
2382 (compare_case_list) Removed.
2383 (compare_cases) New function.
2384 (compare_case_dblptrs) New function.
2385 (read_internal_sort_output) Deal with new struct internal_sort.
2387 * vfm.c: (static var workspace_overflow) Removed.
2388 (struct storage_stream_info) Removed all the members. Added
2389 struct casefile * member.
2390 (storage_sink_open) Use casefile.
2391 (open_storage_file) Removed.
2392 (write_storage_file) Removed.
2393 (storage_to_disk) Removed.
2394 (destroy_storage_stream_info) Use casefile.
2395 (storage_sink_write) Use casefile.
2396 (storage_sink_make_source) Use casefile.
2397 (storage_source_count) Use casefile.
2398 (storage_source_read) Use casefile.
2399 (storage_source_on_disk) Removed.
2400 (storage_source_get_cases) Removed.
2401 (storage_source_set_cases) Removed.
2402 (storage_source_get_casefile) New function.
2404 Mon Mar 29 15:30:09 2004 Ben Pfaff <blp@gnu.org>
2406 New `struct moments' for calculating moments.
2412 * moments.c: New file.
2414 * moments.h: New file.
2416 * command.def: Add DEBUG MOMENTS command.
2418 * Makefile.am: (pspp_SOURCES) Add moments.c, moments.h. Remove
2421 * aggregate.c: Modify AGGREGATE to use the new moments
2422 calculation, even if not in such a great way.
2423 (struct agr_var) Add `moments' member.
2424 (parse_aggregate_functions) Set `moments' member to null.
2425 (agr_destroy) Destroy `moments' member.
2426 (accumulate_aggregate_info) Use `moments' for standard deviation.
2427 (dump_aggregate_info) Ditto.
2428 (initialize_aggregate_info) Create or clear `moments'.
2430 * misc.h: Add pow2(), pow3(), pow4() functions in place of sqr(),
2431 cube(), pow4() that were in stats.h. All references updated.
2433 * crosstabs.q: stats.h had chi-square significance functions. Use
2435 (display_chisq) Use gsl_cdf_chisq_Q() instead of chisq_sig().
2437 * expr-evl.c: (expr_evaluate) Use moments_of_values() for
2438 OP_CFVAR, OP_MEAN, OP_SD, OP_VARIANCE.
2440 Fri Mar 26 14:21:23 2004 Ben Pfaff <blp@gnu.org>
2442 * dictionary.c: (dict_compact_values) Compacted values need to
2445 Fri Mar 26 00:54:57 2004 Ben Pfaff <blp@gnu.org>
2447 * var-labs.c: (cmd_variable_labels) For compatibility, don't allow
2448 `/' at start. Check return value of parse_variables() for error
2451 Fri Mar 26 00:19:27 2004 Ben Pfaff <blp@gnu.org>
2453 Revamp expressions: make the code a little nicer, and fix bugs
2456 * expr-evl.c: (expr_evaluate) Make expression argument const.
2457 Support OP_ADD, OP_SUB, OP_MUL, OP_DIV instead of OP_PLUS, OP_MUL.
2458 OP_POW is missing for arg 2 <= 0. OP_LOG is natural log, not
2459 base-10 log. Fix OP_ANY, OP_ANY_STRING, OP_RANGE, OP_RANGE_STRING
2460 off-by-ones. Add OP_MAX_STRING, OP_MIN_STRING. Fix OP_TIME_HMS,
2461 OP_DATE_WKYR boundary conditions. Add OP_CTIME_DAYS,
2462 OP_CTIME_HOURS, OP_CTIME_MINUTES, OP_CTIME_DAYS, OP_CTIME_SECONDS.
2463 Support OP_INDEX_2, OP_INDEX_3, OP_RINDEX_2, OP_RINDEX_3 instead
2464 of OP_INDEX, OP_INDEX_OPT, OP_RINDEX, OP_RINDEX_OPT. Merge
2465 OP_LPAD_OPT into OP_LPAD, OP_RPAD_OPT into OP_RPAD, OP_LTRIM_OPT
2466 into OP_LTRIM, OP_RTRIM_OPT into OP_RTRIM, OP_NUMBER_OPT into
2467 OP_NUMBER. Fix OP_RTRIM fragility. Support OP_SUBSTR_2,
2468 OP_SUBSTR_3 instead of OP_SUBSTR, OP_SUBSTR_OPT. Remove OP_INV.
2469 Simplify OP_SYSMIS. Remove OP_STR_MIS.
2471 * expr-opt.c: (optimize_expression) Rewrite.
2476 (macro s0l) Removed.
2478 (macro s1l) Removed.
2480 (macro s2l) Removed.
2483 (eq_num_con) New function.
2484 (optimize_tree) New function.
2485 (macro rnc) Removed.
2486 (macro frnc) Removed.
2487 (str_search) Add const to string params.
2488 (str_rsearch) Ditto.
2489 (evaluate_tree_no_missing) Renamed from evaluate_tree. Add num[],
2490 str[], str_len[] locals to substitute for most of removed macros.
2491 Support OP_ADD, OP_SUB, OP_MUL, OP_DIV instead of OP_PLUS, OP_MUL.
2492 Removed support for missing values because we're never called with
2493 missing values. Use set_number() or set_number_errno() instead of
2494 rnc or frnc. Removed any stuff that caused trouble in testing.
2495 We can re-add it later if it really slows anything. Fix some
2497 (evaluate_tree_with_missing) Not yet supported. To be added later
2499 (repl_num_con) Removed.
2500 (collapse_node) New function.
2501 (force_repl_num_con) Removed.
2502 (set_number) New function.
2503 (set_number_errno) New function.
2504 (repl_str_con) Removed.
2505 (set_string) New function.
2506 (yrmoda) Tighten boundary conditions. Adopt 2030 cut-off for
2508 (dump_node) No special case for OP_AND, OP_OR.
2510 * expr-prs.c: (expr_prs) Honor EXPR_NO_OPTIMIZE bit. Rewrite.
2511 (expr_get_type) New function.
2512 (type_check) Rewrite.
2513 (type_coercion) New function.
2514 (struct operator) New structure.
2515 (match_operator New function.
2516 (parse_binary_operators) New function.
2517 (parse_inverting_unary_operator) New function.
2518 (parse_or) Rewritten.
2519 (parse_and) Rewritten.
2520 (parse_not) Rewritten.
2521 (parse_rel) Rewritten.
2522 (parse_add) Rewritten.
2523 (parse_mul) Rewritten.
2524 (parse_neg) Rewritten.
2525 (parse_exp) Rewritten.
2526 (parse_sysvar) Add $TRUE, $FALSE system variables.
2527 Get $LENGTH, $WIDTH from get_viewlength(), get_viewwidth().
2528 (parse_primary) Use allocate_var_node(), allocate_num_con(),
2530 (struct function) Remove desc, change `func' prototype.
2531 (unary_func) Remove special cases.
2532 (MISSING_func) Reduce to unary_func() that just returns a boolean.
2533 (SYSMIS_func) Handle SYSMIS((x)) like SYSMIS(x).
2534 (VALUE_func) Use allocate_var_node().
2535 (nary_num_func) Allow MIN and MAX for strings.
2536 Use allocate_var_node(). Properly clean up.
2538 (generic_str_func) Use local table instead of removed `desc'
2539 member. Mostly rewrite.
2540 (get_num_args) Revise error message.
2541 (parse_function) Return EXPR_ERROR, not 0 on error.
2543 (macro varies) Removed.
2544 (ops[]) Use expr.def.
2545 (free_node) Do nothing if node is null.
2546 (allocate_num_con) New function.
2547 (allocate_str_con) New function.
2548 (allocate_var_node) New function.
2549 (allocate_binary_nonterminal) New function.
2550 (append_nonterminal_arg) Removed.
2551 (static var func_tab[]) Revised.
2552 (expr_debug_print_postfix) Make parameter const.
2553 Use printf() instead of debug_printf().
2555 * expr.def: New file.
2557 * expr.h: Change PXP_* to EXPR_*, all references updated. Also
2558 use named enum instead of unnamed, all references updated. Add
2559 EXPR_ANY, EXPR_NO_OPTIMIZE.
2561 * exprP.h: Remove EX_*. Add DEFINE_OPERATOR. Use expr.def
2562 instead of defining OP_* directly.
2563 (macro IS_TERMINAL) New macro.
2564 (macro IS_NONTERMINAL) New macro.
2565 (enum OP_NO_FLAGS) New.
2567 Fri Mar 26 00:18:01 2004 Ben Pfaff <blp@gnu.org>
2569 * error.c: (err_assert_fail) msg variable needs to be non-const.
2571 Fri Mar 26 00:17:24 2004 Ben Pfaff <blp@gnu.org>
2573 * debug.c: (cmd_debug_evaluate) Rewrite.
2575 Fri Mar 26 00:15:13 2004 Ben Pfaff <blp@gnu.org>
2577 Fix some CROSSTABS bit rot stupidity.
2579 * crosstabs.q: Reorder the CELLS subcommands for compatibility.
2580 (internal_cmd_crosstabs) Initializes cells[] correctly.
2581 (float_M_suffix) Rename format_cell_entry(), change prototype,
2583 (display_crosstabulation) Fix cell formatting.
2585 Fri Mar 26 00:14:09 2004 Ben Pfaff <blp@gnu.org>
2587 Make lex_rest_of_line(), lex_entire_end() not discard lines. Have
2588 to call lex_discard_line() to do that.
2590 * command.c: (run_command) Call lex_discard_line() after
2593 * lexer.c: (lex_entire_end) Change behavior.
2594 (lex_rest_of_line) Change behavior. Return const char *.
2595 (lex_discard_line) Don't clear getl_buf, don't emit message.
2597 * main.c: (handle_error) Emit message here.
2599 * repeat.c: (internal_cmd_do_repeat) Use lex_discard_line()
2600 instead of lex_entire_line().
2602 * str.c: (mm_find_reverse) Make length params size_t. Rewrite.
2604 * title.c: (get_title) Call lex_discard_line() after
2606 (cmd_file_label) Ditto.
2607 (cmd_document) Deal with const char * return value.
2609 Fri Mar 26 00:10:16 2004 Ben Pfaff <blp@gnu.org>
2611 Removed REMARK command.
2613 * command.c: (extract_prefix) Removed.
2614 (output_line) Removed.
2615 (cmd_remark) Removed.
2617 * command.def: Remove REMARK.
2619 Fri Mar 26 00:08:38 2004 Ben Pfaff <blp@gnu.org>
2621 Added abort() after lots of assert(0) invocations to avoid some
2622 compiler warnings. We really need a NOT_REACHED macro.
2624 Tue Mar 23 08:00:42 WAST 2004 John Darrington <john@darrington.wattle.id.au>
2626 * sort.c: Added missing call to temp_file_close. Changed error
2627 messages to warnings.
2629 * set.q: Improved setting of set_view{length,width} to be more tolerant
2632 Sun Mar 21 10:11:14 WST 2004 John Darrington <john@darrington.wattle.id.au>
2634 * val-labs.c: Fixed a bug where PSPP would crash, if VALUE LABELS was
2635 used with incorrect syntax.
2637 * error.c, error.h et al: Overridden definition of assert for a
2640 * test-q.c: Fixed a buglet where it would crash if no /VARIABLES
2641 subcommand was given when it ought to have been.
2643 Sat Mar 20 22:19:08 2004 Ben Pfaff <blp@gnu.org>
2645 * tab.c: (tab_vline) Fix assertions to respect row_ofs and
2649 (tab_joint_text) Ditto.
2651 Sat Mar 20 17:57:23 2004 Ben Pfaff <blp@gnu.org>
2653 * levene.c: Add #include.
2655 * set.q: (set_viewport) Add `int' argument to make its prototype
2656 correct for signal().
2658 Sat Mar 20 15:35:17 2004 Ben Pfaff <blp@gnu.org>
2660 * expr-evl.c: (expr_evaluate) Assert that `c' is nonzero before
2663 Sat Mar 20 15:18:16 2004 Ben Pfaff <blp@gnu.org>
2665 Changed DFM from open-at-first-access to explicit-open. Before,
2666 calling dfm_get_record() or dfm_put_record() would automatically
2667 open the file. Now, you have to call dfm_open_for_reading() or
2668 dfm_open_for_writing() explicitly. This makes it possible to
2669 check permissions, file existence, etc. earlier.
2671 Also made struct file_handle more opaque, and clean up in general.
2673 * data-list.c: (cmd_data_list) Open handle for reading.
2675 * dfm.c: (struct dfm_fhuser_ext) Add `where', `saw_begin_data'
2677 (open_file_r) Renamed dfm_open_for_reading(), rewrote.
2678 (open_file_w) Renamed dfm_open_for_writing(), rewrote.
2679 (open_inline_file) Removed.
2680 (read_record) For inline_file, if we haven't seen BEGIN DATA, read
2681 it. Deal with line_number in extension record instead of file
2683 (dfm_get_record) Rewrote.
2684 (dfm_put_record) Rewrote.
2685 (dfm_push) Assert file is open and one of ours. Deal with
2686 line_number in extension record instead of file handle.
2687 (dfm_pop) Assert file is open and one of ours. Deal with
2688 line_number in extension record instead of file handle.
2689 (cmd_begin_data) Use dfm_open_for_reading(). Mark that we saw
2692 * file-handle.h: (enum constants RH_RF_*) Removed.
2693 (enum constants FH_MD_*) Removed.
2694 (struct file_handle) Removed `name', `norm_fn', `fn', `where',
2695 `recform', `lrecl', `mode' members. Public references to
2696 `recform' changed to use handle_get_mode(), references to `lrecl'
2697 changed to use handle_get_record_width(). Added `private' member.
2698 (enum file_handle_mode) New.
2700 * file-handle.q: (struct private_file_handle) New structure.
2701 (struct file_handle_list) New structure.
2702 (static var files) New.
2703 (static var file_handles) Removed.
2704 (init_file_handle) Removed.
2705 (create_file_handle) Removed.
2706 (get_handle_with_name) New function.
2707 (get_handle_for_filename) New function.
2708 (cmd_file_handle) Rewritten.
2709 (hash_file_handle) Removed.
2710 (cmp_file_handle) Removed.
2711 (fh_init_files) Rewritten.
2712 (fh_parse_file_handle) Rewritten. Allows identifiers as
2714 (fh_get_handle_by_name) Renamed handle_get_name(), all references
2716 (fh_get_handle_by_filename) Renamed handle_get_filename(), all
2717 references updated. Rewritten.
2718 (fh_record_width) Renamed handle_get_record_width(), all
2719 references updated. Rewritten.
2720 (handle_get_mode) New function.
2722 * file-type.c: (cmd_file_type) Open handle for reading.
2724 * filename.c: [unix] (struct file_identity) New structure.
2725 [unix] (fn_get_identity) New function.
2726 [unix] (fn_free_identity) New function.
2727 [unix] (fn_compare_file_identities) New function.
2728 [!unix] (struct file_identity) New structure.
2729 [!unix] (fn_get_identity) New function.
2730 [!unix] (fn_free_identity) New function.
2731 [!unix] (fn_compare_file_identities) New function.
2733 * lexer.c: (static var put) Renamed put_token, all references
2735 (static var put_tokstr) New.
2736 (static var put_tokval) New.
2737 (lex_init) Initialize put_tokstr().
2738 (restore_token) New function.
2739 (save_token) New function.
2740 (lex_get) Use restore_token().
2741 (lex_put_back) Use save_token().
2742 (lex_put_back_id) New function.
2743 (lex_put_forward) Removed.
2744 (lex_preprocess_line) Set put_token instead of using
2746 (lex_negative_to_dash) Use save_token(), set put_token directly.
2747 (dump_token) Use stderr instead of stdout.
2749 * main.c: (main) Remove call to cmd_init().
2751 * matrix-data.c: (cmd_matrix_data) Open file for reading.
2753 * pfm-read.c: Use handle_get_filename() instead of trying to use
2754 h->fn directly, all over.
2756 * pfm-write.c: Ditto.
2758 * print.c: (internal_cmd_print) Open handle for writing.
2759 (dump_table) Use handle_get_filename().
2760 (print_trns_proc) Use handle_get_mode().
2761 (cmd_print_space) Use fh_parse_file_handle().
2762 Open handle for writing.
2763 [0] (debug_print) Removed.
2765 * sfm-read.c: Use handle_get_filename() instead of trying to use
2766 h->fn directly, all over.
2768 * sfm-write.c: Ditto.
2770 Sat Mar 20 14:35:48 2004 Ben Pfaff <blp@gnu.org>
2774 * autorecode.c: (arc_free) Free arc->src_values.
2776 * error.c: (msg) Free buf.
2778 * val-labs.c: (do_value_labels) Always free vars.
2780 * vfm.c: (close_active_file) If sink has no make_source then call
2781 its destroy function.
2783 Sat Mar 20 14:00:24 2004 Ben Pfaff <blp@gnu.org>
2785 Fixed cmd_parse() so that it always skips past a full command
2786 name. A few special commands for which this would be bad get
2787 special treatment. This lets us drop code for skipping past the
2788 end of a command name in most cmd_*() functions. It's not worth
2789 listing all the commands affected.
2791 * command.c: (struct command) Remove `cmd' member, replace by
2792 `name' member, all references updated. Remove `word', `next',
2793 `skip_entire_name' members.
2794 (macro DEFCMD) Deal with revised `struct command'.
2795 (macro UNIMPL) Ditto.
2796 (macro SPCCMD) New macro for commands whose last word shouldn't be
2798 (static array cmd_table[]) Make const, rename `commands', remove
2800 (macro COMMAND_CNT) New macro.
2801 (split_words) Removed.
2803 (FILE_TYPE_okay) Make parameter const.
2804 (cmd_parse) Improve error messages.
2805 (match_strings) New function.
2806 (next_word) New function.
2807 (enum command_match) New enum.
2808 (conflicting_3char_prefixes) New function.
2809 (conflicting_3char_prefix_command) New function.
2810 (cmd_match_words) New function.
2811 (count_matching_commands) New function.
2812 (get_command_name) New function.
2813 (free_words) New function.
2814 (unknown_command_error) New function.
2815 (figure_out_command) Renamed parse_command_name(), rewritten.
2817 * command.def: Removed @ command. Marked BEGIN DATA, DOCUMENT,
2818 FILE LABEL, REMARK, SUBTITLE, TITLE as special. Renamed EVALUATE
2819 to DEBUG EVALUATE. Added N alias for N OF CASES, SORT alias for
2822 * command.h: (macro SPCCMD) New.
2824 * include.c: (cmd_include_at) Removed.
2825 (cmd_include) Allow identifier to be used as filename.
2827 * inpt-pgm.c: (cmd_reread) Use fh_parse_file_handle().
2829 * t-test.q: (cmd_t_test) Command name is now parsed for us.
2832 Sat Mar 20 13:56:00 2004 Ben Pfaff <blp@gnu.org>
2834 Start work on better test framework.
2836 * Makefile.am: (pspp_sources) Add debug.c.
2838 * debug.c: New file.
2840 * compute.c: (cmd_evaluate) Moved to debug.c, renamed
2841 cmd_debug_evaluate().
2843 * expr-prs.c: (expr_parse) Remove PXP_DUMP support.
2845 * expr.h: (enum constant PXP_DUMP) Removed.
2847 Sat Mar 20 00:05:42 WST 2004 John Darrington <john@darrington.wattle.id.au>
2849 * set.q: Implemented the SHOW command, and synced it to the existing
2852 Added a handler for SIGWINCH so that viewlength and viewwidth follow
2853 changes as the window size is changed.
2855 Added fallback to set viewlength and viewwidth from LINES and COLUMS
2856 environment variables if other methods are not available.
2858 glob.c: Removed a lot of global variables from glob.c and encapsulated
2861 random.c: Tidied up the way the random seed is set.
2863 str.c: Added a ds_vprintf function.
2865 error.c: Extended dump_message so that messages are always broken at
2868 Thu Mar 18 11:07:14 2004 Ben Pfaff <blp@gnu.org>
2870 * pfm-write.c: (bufwrite) Write out the correct element for string
2871 variables. From Andreas Streichardt <streichardt@globalpark.de>.
2873 Mon Mar 15 20:48:03 2004 Ben Pfaff <blp@gnu.org>
2875 Get rid of static and global (!) vars in matrix-data.c.
2877 * matrix-data.c: (static var nr_data) Removed.
2878 (static var nr_factor_values) Removed.
2879 (static var max_cell_index) Removed.
2880 (static var split_values) Removed.
2881 (struct nr_aux_data) New structure.
2882 (read_matrices_without_rowtype) Use a local struct nr_aux_data in
2883 place of static vars, pass to create_case_source() and procedure()
2885 (nr_read_data_lines) Use struct nr_aux_data * parameter instead of
2886 struct matrix_data_pgm *.
2887 (nr_read_splits) Ditto.
2888 (nr_read_factors) Ditto.
2889 (nr_output_data) Ditto.
2890 (static var wr_content) Removed.
2891 (global var wr_data) Removed.
2892 (global var wr_current) Removed.
2893 (struct wr_aux_data) New structure.
2894 (read_matrices_with_rowtype) Use a local struct wr_aux_data in
2895 place of static vars, pass to create_case_source() and procedure()
2897 (matrix_data_read_with_rowtype) Use struct wr_aux_data * parameter
2898 instead of matrix_data_pgm *.
2899 (wr_read_splits) Ditto.
2900 (wr_output_data) Ditto.
2901 (wr_read_rowtype) Ditto.
2902 (wr_read_factors) Ditto.
2903 (wr_read_indeps) Ditto.
2905 Mon Mar 15 20:07:29 2004 Ben Pfaff <blp@gnu.org>
2907 Get rid of static vars in autorecode.c.
2909 * autorecode.c: (struct autorecode_trns) Rename `arc' to `specs',
2910 `n_arc' to `spec_cnt'. All references updated.
2911 (static var v_src) Removed.
2912 (static var v_dest) Removed.
2913 (static var h_trns) Removed.
2914 (static var nv_src) Removed.
2915 (static var descend) Removed.
2916 (static var print) Removed.
2917 (enum direction) New enum.
2918 (struct autorecode_pgm) New structure.
2919 (cmd_autorecode) Use struct autorecode_pgm instead of static vars.
2920 Move n_dest local var into struct autorecode_pgm for ease of
2921 clean-up. Use arc_free().
2922 (arc_free) New function.
2923 (recode) Modify to take struct autorecode_pgm * parameter instead
2924 of using statics. Let the caller clean up.
2925 (autorecode_proc_func) Use struct autorecode_pgm * auxiliary data
2926 instead of statics. Rearrange code a little.
2928 Mon Mar 15 00:25:02 2004 Ben Pfaff <blp@gnu.org>
2930 Get rid of static, global vars in recode.c. Remove debug code.
2932 * recode.c: (static var head) Removed.
2933 (global var v) Removed.
2934 (global var nv) Removed.
2935 (cmd_recode) New local variables head, v, nv. Initialize and free
2936 v. Don't call debug_print().
2937 [DEBUGGING] (dump_dest) Removed.
2938 [DEBUGGING] (debug_print) Removed.
2940 Mon Mar 15 00:14:49 2004 Ben Pfaff <blp@gnu.org>
2942 Get rid of static vars in expr-opt.c.
2944 * expr-opt.c: (static var e) Removed.
2945 (static var nop) Removed.
2946 (static var mop) Removed.
2947 (static var ndbl) Removed.
2948 (static var mdbl) Removed.
2949 (static var nstr) Removed.
2950 (static var mstr) Removed.
2951 (static var nvars) Removed.
2952 (static var mvars) Removed.
2953 (struct expr_dump_state) New structure.
2954 (dump_expression) Use new struct expr_dump_state instead of static
2955 vars and pass to functions we call.
2956 (dump_node) Use struct expr_dump_state * parameter.
2958 (emit_num_con) Ditto.
2959 (emit_str_con) Ditto.
2962 Mon Mar 15 00:03:51 2004 Ben Pfaff <blp@gnu.org>
2964 Get rid of static var in COUNT.
2966 * count.c: (static var head) Move into cmd_count().
2967 (cmd_count) [DEBUGGING] Don't call debug_print.
2968 [DEBUGGING] (debug_print) Removed.
2970 Sun Mar 14 23:56:09 2004 Ben Pfaff <blp@gnu.org>
2972 Get rid of static vars in VALUE LABELS, ADD VALUE LABELS.
2974 * val-labs.c: (static var v) Removed.
2975 (static var nv) Removed.
2976 [DEBUGGING] (debug_print) Removed.
2977 (verify_val_labs) Add struct variable **, int parameters.
2978 (get_label) Ditto. Improve error messages, streamline.
2979 (erase_labels) New function for erasing value labels, taking over
2980 part of verify_val_labs()'s function.
2983 (cmd_value_labels) No need to call init() or done() anymore.
2984 (cmd_add_value_labels) Ditto.
2985 (do_value_labels) Add vars, var_cnt local variables. Clean up
2986 after them internally. Call erase_labels() if we should. Don't
2989 Sun Mar 14 23:33:53 2004 Ben Pfaff <blp@gnu.org>
2991 Get rid of static vars in MATCH FILES.
2993 * get.c: (static var mtf_head) Removed.
2994 (static var mtf_tail) Removed.
2995 (static var mtf_by) Removed.
2996 (static var mtf_n_by) Removed.
2997 (static var mtf_master) Removed.
2998 (static var mtf_seq_num) Removed.
2999 (static var mtf_seq_nums) Removed.
3000 (static var mtf_sink) Removed.
3001 (static var mtf_case) Removed.
3002 (struct mtf_proc) New structure.
3003 (cmd_match_files) Use struct mtf_proc instead of static vars.
3004 (mtf_processing_finish) Ditto.
3006 (mtf_delete_file_in_place) Ditto.
3007 (mtf_read_nonactive_records) Ditto.
3008 (mtf_compare_BY_values) Ditto.
3009 (mtf_processing) Ditto.
3010 (mtf_merge_dictionary) Ditto.
3012 Sun Mar 14 22:48:12 2004 Ben Pfaff <blp@gnu.org>
3014 * command.def: Add CASESTOVARS, VARSTOCASES unimplemented commands.
3016 * dictionary.c: (dict_rename_var) Add assertion.
3017 (dict_contains_var) Check by index instead of name.
3019 Sun Mar 14 22:01:02 2004 Ben Pfaff <blp@gnu.org>
3021 Get rid of compaction_necessary, compaction_nval, compaction_case.
3022 Redo VFM interface. Replace disk_sink and memory_sink by
3023 storage_sink, disk_source and memory_source by storage_source.
3025 * vfm.h: (struct case_sink) Add `dict', `idx_to_fv', `value_cnt'
3029 (struct write_case_data) Remove `begin_func', `end_func',
3030 `func_aux' members. Add `aux', `trns_case', `sink_case',
3031 `cases_written', `cases_analyzed' members.
3032 (global var compaction_necessary) Make static.
3033 (global var compaction_nval) Removed.
3034 (global var compaction_case) Removed.
3035 (static var case_count) Removed.
3036 (struct procedure_aux_data) Removed.
3037 (struct split_aux_data) Removed.
3038 (procedure) Remove begin_func, end_func parameters. Rewrite.
3039 (static var not_canceled) Removed.
3040 (process_active_file) Removed.
3041 (process_active_file_write_case) Removed.
3042 (process_active_file_output_case) Removed.
3043 (prepare_for_writing) Moved into open_active_file().
3044 (arrange_compaction) Ditto.
3046 (open_active_file) Rewrote.
3047 (write_case) New function.
3048 [DEBUGGING] (index_to_varname) Removed.
3049 (execute_transformations) New function.
3050 (exclude_this_case) Renamed filter_case(), changed interface.
3051 (clear_case) Added struct ccase * parameter to interface.
3052 (close_active_file) Added struct write_case_data * parameter,
3054 (disk_sink_create) Removed.
3055 (disk_sink_destroy) Removed.
3056 (disk_sink_make_source) Removed.
3057 (disk_sink_write) Removed.
3058 (disk_source_count) Removed.
3059 (disk_source_destroy) Removed.
3060 (disk_source_read) Removed.
3061 (global var disk_sink_class) Removed.
3062 (global var disk_source_class) Removed.
3063 (global var memory_sink_class) Removed.
3064 (global var memory_source_class) Removed.
3065 (memory_sink_create) Removed.
3066 (memory_sink_destroy) Removed.
3067 (memory_sink_make_source) Removed.
3068 (memory_sink_write) Removed.
3069 (memory_source_count) Removed.
3070 (memory_source_destroy) Removed.
3071 (memory_source_get_cases) Removed.
3072 (memory_source_read) Removed.
3073 (memory_source_set_cases) Removed.
3074 (struct disk_stream_info) Removed.
3075 (struct memory_sink_info) Removed.
3076 (struct memory_source_info) Removed.
3077 (write_active_file_to_disk) Removed.
3078 (destroy_storage_stream_info) New function.
3079 (global var null_sink_class) New var.
3080 (global var storage_sink_class) New var.
3081 (global var storage_source_class) New var.
3082 (open_storage_file) New function.
3083 (storage_sink_destroy) New function.
3084 (storage_sink_make_source) New function.
3085 (storage_sink_open) New function.
3086 (storage_sink_write) New function.
3087 (storage_source_count) New function.
3088 (storage_source_destroy) New function.
3089 (storage_source_get_cases) New function.
3090 (storage_source_on_disk) New function.
3091 (storage_source_read) New function.
3092 (storage_source_set_cases) New function.
3093 (storage_source_to_disk) New function.
3094 (storage_to_disk) New function.
3095 (struct storage_stream_info) New structure.
3096 (write_storage_file) New function.
3097 (procedure_write_case) Removed.
3098 (create_case_source) Add `struct dictionary *' parameter, all
3100 (create_case_sink) Ditto.
3101 (free_case_sink) New function.
3102 (struct split_aux_data) New structure.
3103 (procedure_with_splits) New function implementing what procedure()
3105 (SPLIT_FILE_proc_func) Removed.
3106 (procedure_with_splits_callback) New function.
3107 (equal_splits) New function.
3109 * aggregate.c: Pass around a struct instead of using statics.
3110 (static var outfile) Remove.
3111 (enum type) Give it tag `missing_treatment'.
3112 (static var missing) Remove.
3113 (static var sort) Remove.
3114 (static var agr_first) Remove.
3115 (static var agr_next) Remove.
3116 (static var case_count) Remove.
3117 (static var prev_case) Remove.
3118 (static var buf64_1xx) Remove.
3119 (static var buf_1xx) Remove.
3120 (struct agr_proc) New structure incorporating the above.
3121 (cmd_aggregate) Use new struct. Clean up error handling using
3122 agr_destroy(). Completely rewrite actual implementation of
3124 (create_sysfile) Add struct agr_proc * parameter, modify
3126 (parse_aggregate_functions) Ditto.
3127 (free_aggregate_functions) Ditto. Rename agr_destroy().
3128 (aggregate_single_case) Add struct agr_proc * parameter, modify
3130 (accumulate_aggregate_info) Ditto.
3131 (dump_aggregate_info) Ditto.
3132 (initialize_aggregate_info) Ditto.
3133 (agr_00x_trns_proc) Removed.
3134 (agr_00x_end_func) Removed.
3135 (agr_10x_trns_proc) Removed.
3136 (agr_10x_trns_free) Removed.
3137 (agr_10x_end_func) Removed.
3138 (agr_11x_read) Removed.
3139 (agr_11x_finish) Removed.
3140 [DEBUGGING] (debug_print) Removed.
3141 (write_case_to_sfm) Add struct agr_proc * parameter, modify
3143 (agr_to_active_file) New function.
3144 (presorted_agr_to_sysfile) New function.
3145 (sort_agr_to_sysfile) New function.
3147 * autorecode.c: (cmd_autorecode) Use procedure_with_splits().
3149 * crosstabs.q: (internal_cmd_crosstabs) Ditto.
3151 * descript.q: (cmd_descriptives) Ditto.
3153 * dfm.c: (cmd_begin_data) Check for storage_source_class. Adapt
3154 to new procedure() interface.
3156 * command.c: (cmd_execute) Adapt to new procedure() interface.
3158 * dictionary.c: (dict_compact_values) Also delete scratch
3160 (dict_get_compacted_value_cnt) New function.
3161 (dict_get_compacted_idx_to_fv) New function.
3163 * flip.c: (cmd_flip) Warn about and cancel TEMPORARY.
3164 (cmd_flip) Adapt to new procedure() interface.
3165 (flip_sink_write) Use sink->idx_to_fv.
3167 * frequencies.q: (internal_cmd_frequencies) Use
3168 procedure_with_splits().
3170 * get.c: (cmd_save_internal) Adapt to new procedure() interface.
3171 (static var mtf_sink) New static var.
3172 (static var mtf_case) New static var.
3173 (cmd_match_files) Warn about and cancel TEMPORARY. Redo the way
3174 we actually implement the matching.
3175 (mtf_delete_file_in_place) Use mtf_case.
3176 (mtf_processing) Use mtf_case and mtf_sink.
3177 (cmd_export) Adapt to new procedure() interface.
3179 * levene.c: (levene) Use procedure_with_splits().
3181 * list.q: (cmd_list) Use procedure_with_splits().
3183 * matrix-data.c: (read_matrices_without_rowtype) Adapt to new
3184 procedure() interface.
3185 (read_matrices_with_rowtype) Ditto.
3187 * modify-vars.c; (cmd_modify_vars) Warn about and cancel
3188 TEMPORARY. Adapt to new procedure() interface.
3190 * rename-vars.c: Warn about and cancel TEMPORARY.
3192 * sort.c: (cmd_sort_cases) Warn about TEMPORARY.
3193 (sort_cases) Use dict_get_compacted_value_cnt() instead of
3194 compaction_nval. Adapt to new procedure() interface. Use
3195 storage_source_to_disk().
3196 (do_internal_sort) Don't try to dump the cases to memory.
3197 (compare_case_lists) Pass null idx_to_fv.
3198 (struct initial_run_state) Add `idx_to_fv' member. Remove
3200 (write_initial_runs) Don't initialize irs->case_size. Adapt to
3201 new procedure() interface. Reset irs->idx_to_fv after calling
3203 (sort_sink_write) Set irs->idx_to_fv. Use case_size from struct
3204 sort_cases_pgm. Pass irs, not struct sort_cases_pgm to
3206 (destroy_initial_run_state) Don't dereference irs after freeing
3208 (allocate_cases) Don't calculate case_size locally.
3209 (compare_record) Add idx_to_fv parameter.
3210 (compare_record_run) Change parameter from struct sort_cases_pgm *
3211 to struct initial_run_state *. Pass irs->idx_to_fv to
3213 (compare_record_run) Third parameter now a struct
3214 initial_run_state *.
3215 (output_record) No need for out_case anymore. Pass irs, not
3216 struct sort_cases_pgm to pop_heap(). Use case_size from struct
3218 (merge) Use case_size from struct sort_cases_pgm.
3219 (merge_once) Use case_size from struct sort_cases_pgm.
3220 Pass null pointer to compare_record() as idx_to_fv.
3221 (global var sort_sink_class) Make static.
3223 * t-test.q: (cmd_t_test) Use procedure_with_splits().
3225 * temporary.c: Remove debugging crap.
3227 Sat Mar 13 14:19:52 WST 2004 John Darrington <john@darrington.wattle.id.au>
3229 * t-test.q, levene.c: Fixed up the handling of MISSING values
3232 Fri Mar 12 16:23:35 WST 2004 John Darrington <john@darrington.wattle.id.au>
3234 * t-test.q, levene.c: Added support for T-TEST /GROUP where only
3237 Wed Mar 10 23:25:13 2004 Ben Pfaff <blp@gnu.org>
3239 Change explicit variable name checks into use of
3240 dict_class_from_id().
3242 * dictionary.c: (dict_create_var) Change explicit variable name
3243 check into use of dict_class_from_id().
3245 * get.c: (trim_dictionary) Ditto.
3247 * sel-if.c: (cmd_filter) Ditto.
3249 * sysfile-info.c: (cmd_display) Ditto.
3251 * vars-prs.c: (parse_DATA_LIST_vars) Ditto.
3253 * vfm.c: (arrange_compaction) Ditto.
3255 * weight.c: (cmd_weight) Ditto.
3257 Wed Mar 10 21:16:34 2004 Ben Pfaff <blp@gnu.org>
3259 * temporary.c: (cmd_temporary) When TEMPORARY was the first
3260 transformation following the input program, if any, for some
3261 reason we special-cased f_trns. That's just wrong. It should
3262 always be set to n_trns.
3264 Tue Mar 9 23:44:40 2004 Ben Pfaff <blp@gnu.org>
3266 * format.c: (parse_format_specifier_name) Fix brown-bag bug
3267 introduced in last check-in.
3269 Tue Mar 9 23:10:41 2004 Ben Pfaff <blp@gnu.org>
3271 * format.c: (global array translate_fmt[]) Removed.
3272 (translate_fmt) New function as replacement.
3273 (parse_format_specifier_name) Rewrite.
3275 * pfm-read.c: (convert_format) Use translate_fmt() instead of
3278 * sfm-read.c: (parse_format_spec) Ditto.
3280 * postscript.c: (text) Fix handling of fonts with missing
3283 * sort.c: (struct external_sort) Add temp_name member.
3284 (destroy_external_sort) Free temp_dir, temp_name members.
3285 (init_external_sort) Allocate temp_name.
3286 (get_temp_file_name) Change prototype.
3287 (open_temp_file) Deal with change to get_temp_file_name().
3288 (close_temp_file) Ditto.
3289 (remove_temp_file) Ditto.
3290 (write_temp_file) Ditto.
3291 (read_temp_file) Ditto.
3292 (sort_sink_destroy) Removed.
3293 (sort_sink_class) Change destroy member to null.
3295 Tue Mar 9 22:36:34 2004 Ben Pfaff <blp@gnu.org>
3297 Eliminate temp_case.
3299 * aggregate.c: (cmd_aggregate) No need to save/restore temp_case
3300 anymore. Use agr_11x_finish().
3301 (aggregate_single_case) Make first param const.
3302 (accumulate_aggregate_info) Ditto.
3303 (agr_00x_end_func) Use compaction_case, not temp_case.
3304 (agr_11x_func) Break into agr_11x_read(), agr_11x_finish().
3306 * data-list.c: (struct data_list_pgm) Add `case_size' member.
3307 (cmd_data_list) Initialize case_size.
3308 (read_from_data_list_fixed) Add struct ccase * param, use instead
3310 (read_from_data_list_free) Ditto.
3311 (read_from_data_list_list) Ditto.
3312 (read_one_case) Rename data_list_trns_proc(), all references
3313 updated. Add argument in calling above functions. Use c
3314 argument instead of temp_case.
3315 (destroy_dls) Rename data_list_trns_free(), all references
3318 * expr-evl.c: (expr_evaluate) Make second parameter const.
3320 * file-type.c: (struct file_type_pgm) Add `case_size' member.
3321 (cmd_end_file_type) Initialize `case_size'.
3322 (file_type_source_read) Add struct ccase * parameter. Use instead
3325 * flip.c: Rewritten.
3327 * get.c: (struct get_pgm) New structure to keep track of
3329 (cmd_get) Initialize case_size.
3331 (get_source) Deal with struct get_pgm.
3332 (get_source_read) Add struct ccase * parameter, use instead of
3334 (import_source_read) Ditto.
3336 * get.c: Use a null pointer instead of temp_case to represent the
3337 "current case" in a struct mtf_file's input member.
3338 (mtf_processing_finish) Pass null to mtf_processing(), not
3340 (mtf_read_nonactive_records) Don't set iter->input to temp_case.
3341 (mtf_compare_BY_values) Add extra arg, use instead of null input
3343 (mtf_processing) Use c parameter instead of temp_case. Pass
3344 compaction_case to process_active_file_output_case().
3346 * glob.c: (global variable temp_case) Removed.
3348 * inpt-pgm.c: (struct input_program_pgm) Add `case_size' member.
3349 (cmd_input_program) Initialize case_size. Set
3350 vfm_source->value_cnt.
3351 (init_case) Add struct ccase * parameter, use instead of
3354 (input_program_source_read) Ditto.
3356 * matrix-data.c: (matrix_data_read_without_rowtype) Ditto.
3357 (dump_cell_content) Ditto.
3358 (nr_output_data) Ditto.
3359 (read_matrices_without_rowtype) Ditto.
3360 (matrix_data_read_with_rowtype) Ditto.
3361 (wr_read_splits) Ditto.
3362 (wr_output_data) Ditto.
3364 * sort.h: (struct sort_cases_pgm) New member `case_size'.
3366 * sort.c: (sort_cases) Initialize scp->case_size.
3367 (struct external_sort) Remove `case_size' member.
3368 (write_initial_runs) Only call vfm_sink->class_destroy if
3370 (struct sort_source_aux) New structure.
3371 (sort_source_read_helper) New function.
3372 (sort_source_read) Use sort_source_read_helper().
3373 (read_sort_output) Change interface to be more reasonable.
3374 (read_internal_sort_output) Ditto.
3375 (read_external_sort_output) Ditto.
3377 * vars-prs.c: (dict_class_to_name) Pass return value through
3380 * vfm.c: (struct procedure_aux_data) Add `trns_case' member.
3381 (procedure) Initialize trns_case.
3382 (procedure) Pass trns_case to vfm_source->class->read().
3384 (process_active_file) Start using struct procedure_aux_data.
3385 (process_active_file_write_case) Pass trns_case to
3386 transformations, lag_case(), clear_case().
3387 (process_active_file_output_case) Add struct ccase * parameter.
3388 (create_trns_case) New function.
3389 (make_temp_case) Removed.
3390 (vector_initialization) Removed.
3391 (close_active_file) Only call make_source if non-null, otherwise
3392 set vfm_source to null pointer. Don't free temp_case.
3393 (disk_source_read) Add struct ccase * parameter, use instead of
3395 (memory_source_read) Ditto.
3396 (lag_case) Add const struct ccase * member.
3397 (procedure_write_case) Use trns_case instead of temp_case.
3398 (clear_case) Add struct ccase * member, use instead of temp_case.
3399 (exclude_this_case) Ditto.
3400 (create_case_source) Add struct dictionary * parameter, use to
3401 initialize source->value_cnt.
3403 * vfm.h: (struct case_source) Add `value_cnt' member.
3404 (struct case_source_class) Add struct ccase * parameter to `read'
3405 member function pointer.
3406 (struct case_sink_class) Make struct ccase * parameter const in
3407 `write' member function pointer.
3409 Wed Mar 3 20:44:37 2004 Ben Pfaff <blp@gnu.org>
3411 Fix a lot of "possibly uninitialized variable" warnings. Some of
3412 them are even real bugs. A few of them make me wonder how the
3415 * aggregate.c: (parse_aggregate_functions) Initialize `function.
3417 * ascii.c: (output_lines) Add default case to switch.
3419 * crosstabs.q: Remove static variable `expected' and all
3421 (display_crosstabulation) Always calculate expected value.
3423 (output_pivot_table) Initialize `cmp'.
3424 (display_crosstabulation) New variable `last_row', which is
3427 * data-in.c: (parse_numeric) Always initialize sign. How did this
3430 * data-list.c: (repeating_data_trns_proc) Always initialize code.
3431 Always set info.ofs. (How did this work?!)
3433 * expr-opt.c: (optimize_tree) Always initialize `m'.
3434 (evaluate_tree) Always initialize `c'. (How did this work?)
3436 * frequencies.q: (frq_custom_variables) Always initialize min,
3438 (frq_custom_grouped) Always initialize `dl'.
3440 * groff-font.c: (groff_read_font) Always initialize char_set.
3442 * matrix-data.c: (nr_output_data) Initialize `split'.
3443 (wr_read_splits) Remove shadowing split_cnt declaration.
3444 (wr_output_data) Initialize `split'.
3446 * output.c: (tokener) Skip add character on syntax error.
3448 * pool.c: (pool_strndup) Always set `copy'. (How did this work?!)
3450 * postscript.c: (read_ps_encodings) Use line.string instead of
3452 (write_text) Add default case to switch.
3453 (text) Always initialize multiple variables. Fix bug with
3456 * print.c: (fixed_parse_fortran) Initialize head.
3457 (alloc_line) Add default case to switch.
3459 * recode.c: (parse_dest_spec) Handle case where nothing matches.
3460 (recode_trns_proc) Move variable declaration inward. Add default
3463 * sfm-read.c: (read_header) Initialize skip_amt.
3465 * sysfile-info.c: (display_variables) Always initialize pc.
3467 * vars-prs.c: Initialized `included'.
3469 Wed Mar 3 09:30:09 2004 Ben Pfaff <blp@gnu.org>
3471 * main.c: (main) sigaction()'s sa_flags member was uninitialized.
3472 Just use signal() instead.
3474 Wed Mar 3 09:26:30 2004 Ben Pfaff <blp@gnu.org>
3476 Get rid of vfm_sink_info and vfm_source_info.
3478 * aggregate.c: (agr_00x_end_func) Don't increment
3479 sfm_sink_info.ncases.
3481 * sort.c: (do_internal_sort) Get case count from
3482 vfm_source->class->count().
3483 (struct external_sort) Add `case_size' member.
3484 (do_external_sort) Initialize case_size.
3485 (struct initial_run_state) Add `case_size' member.
3486 (write_initial_runs) Initialize case_size.
3487 (sort_sink_write) Use case_size.
3488 (read_external_sort_output) Use case_size. Get case_cnt from
3491 * vfm.c: (struct write_case_data) Add underscores to existing arg
3492 names, all references updated. Renamed `aux' as `func_aux', all
3493 references updated. Added new `aux' member.
3494 (global var vfm_source_info) Removed.
3495 (global var vfm_sink_info) Removed.
3496 (struct procedure_aux_data) New.
3497 (struct split_aux_data) New.
3498 (procedure) Use `aux' fields for procedure_aux_data,
3500 (process_active_file_write_case) Pass case_count + 1 to
3501 transformation procedures, exclude_this_case().
3502 (process_active_file_output_case) Don't increment
3503 vfm_sink_info.ncases.
3504 (prepare_for_writing) Don't initialize vfm_sink_info. Don't try
3505 to send data to disk early.
3506 (make_temp_case) Don't use vfm_sink_info.case_size.
3507 (close_active_file) Don't initialize vfm_source_info.
3508 (struct disk_stream_info) New, to allow for case_cnt and case_size fields.
3509 (disk_sink_create) Initialize and/or update disk_stream_info.
3510 (disk_sink_write) Ditto.
3511 (disk_sink_destroy) Ditto.
3512 (disk_sink_make_source) Ditto.
3513 (disk_source_read) Ditto.
3514 (disk_source_destroy) Ditto.
3515 (global var disk_source_class) Add disk_source_count().
3516 (disk_source_count) New function.
3517 (struct memory_sink_info) Add `case_cnt', `case_size' members.
3518 (struct memory_source_info) Ditto.
3519 (memory_sink_create) Deal with case_cnt, case_size.
3520 (memory_sink_write) Ditto.
3521 (memory_sink_make_source) Ditto.
3522 (memory_source_read) Ditto.
3523 (memory_source_count) New function.
3524 (memory_source_class) Add memory_source_count().
3525 (procedure_write_case) Don't use vfm_sink_info.ncases. Do use
3526 proc_aux->cases_written, and pass it to transformation procedures
3527 and exclude_this_case ().
3528 (exclude_this_case) Add case_num parameter. Pass it to
3530 (SPLIT_FILE_procfunc) Use split_aux->prev_case instead of static
3533 * vfm.h: (struct case_source_class) Add `count' member.
3535 * vfmP.h: (struct stream_info) Removed.
3536 (global variable vfm_source_info) Removed.
3537 (global variable vfm_sink_info) Removed.
3539 Tue Mar 2 23:38:17 2004 Ben Pfaff <blp@gnu.org>
3541 * var.h: (typedef trns_proc_func) New typedef.
3542 (trns_free_func) New typedef.
3543 (struct trns_header) Change `proc' to type trns_proc_func, `free'
3544 to type trns_free_func. This only changes the actual type of
3545 trns_proc_func, adding a `case_num' parameter. Updated all
3546 implementations to use the typedefs instead.
3548 * compute.c: (compute_num) Pass case_num to expr_evaluate().
3549 (compute_num_vec) Ditto.
3550 (compute_str) Ditto.
3551 (compute_str_vec) Ditto.
3553 * do-if.c: (do_if_trns_proc) Ditto.
3555 * expr-evl.c: (expr_evaluate) Add new case_num parameter, use for
3558 * inpt-pgm.c: (input_program_source_read) Maintain case count,
3559 pass to transformation functions.
3560 (reread_trns_proc) Pass case_num arg to expr_evaluate().
3562 * loop.c: (loop_1_trns_proc) Ditto.
3563 (loop_2_trns_proc) Ditto.
3564 (loop_3_trns_proc) Ditto.
3566 * print.c: (print_space_trns_proc) Ditto.
3568 * sel-if.c: (select_if_proc) Ditto.
3570 Tue Mar 2 11:36:52 2004 Ben Pfaff <blp@gnu.org>
3572 * frequencies.q: (cleanup_freq_tab) Avoid memory leak by
3573 destroying hash table.
3575 * glob.c: (read_active_file) Variable not referenced, removed.
3576 (cancel_input_pgm) Ditto.
3578 * levene.c: Add #include <stdlib.h> needed to call free().
3580 * aggregate.c: (parse_aggregate_functions) Make `function'
3583 Tue Mar 2 11:30:56 2004 Ben Pfaff <blp@gnu.org>
3585 Start working to eliminate VFM dependence on static variables.
3587 * command.c: (cmd_parse) Use case_source_is_class().
3589 * data-list.c: Rewrite to eliminate use of static variables.
3591 * dfm.c: (cmd_begin_data) Use case_source_is_class().
3593 * file-handle.q: (fh_handle_name) Make parameter const.
3595 * file-type.c: Rewrite to eliminate use of static variables.
3597 * flip.c: Rewrite to eliminate use of static variables.
3599 * format.c: (get_format_var_width) New function.
3601 * get.c: Eliminate use of static variables.
3603 * inpt-pgm.c: Eliminate use of static variables.
3605 * matrix-data.c: Eliminate use of static variables.
3607 * set.q: (set_max_workspace) New variable.
3608 (cmd_set) Use SET WORKSPACE to modify set_max_workspace.
3610 * var.h: (struct case_list) Move here from vfmP.h.
3612 * vars-atr.c: (discard_variables) Handle new vfm_source type.
3614 * vfm.c: (vfm_source) Change type from struct case_stream to
3616 (vfm_sink) Change type from struct case_stream to struct
3618 (static var paging) Rename workspace_overflow, all references
3620 (procedure) Use new class structures.
3621 (process_active_file) Ditto.
3622 (process_active_file_write_case) Ditto.
3623 (prepare_for_writing) Use set_max_workspace. Use new class
3625 (close_active_file) Use new class structures. Free old sink.
3626 (global var disk_source_file) Removed.
3627 (global var disk_sink_file) Removed.
3628 (disk_stream_init) Removed.
3629 (disk_stream_read) Removed.
3630 (disk_stream_write) Removed.
3631 (disk_stream_mode) Removed.
3632 (disk_stream_destroy_source) Removed.
3633 (disk_stream_destroy_sink) Removed.
3634 (global var vfm_disk_stream) Removed.
3635 (disk_sink_create) New function.
3636 (disk_sink_write) New function.
3637 (disk_sink_destroy) New function.
3638 (disk_sink_make_source) New function.
3639 (disk_sink_class) New static var.
3640 (disk_source_read) New function.
3641 (disk_source_destroy) New function.
3642 (global var vfm_source_class) New var.
3643 (global var memory_source_cases) Removed.
3644 (global var memory_sink_cases) Removed.
3645 (global var memory_sink_max_cases) Removed.
3646 (struct memory_sink_info) New struct.
3647 (memory_stream_init) Removed.
3648 (memory_stream_read) Removed.
3649 (memory_stream_write) Removed.
3650 (memory_stream_mode) Removed.
3651 (memory_stream_destroy_source) Removed.
3652 (memory_stream_destroy_sink) Removed.
3653 (global var vfm_memory_stream) Removed.
3654 (page_to_disk) Renamed write_active_file_to_disk().
3655 (memory_sink_create) New function.
3656 (memory_sink_write) New function.
3657 (memory_sink_destroy) New function.
3658 (memory_sink_make_source) New function.
3659 (memory_sink_class) New static var.
3660 (memory_source_read) New function.
3661 (memory_source_destroy) New function.
3662 (memory_source_get_cases) New function.
3663 (memory_source_set_cases) New function.
3664 (global var vfm_source_class) New var.
3665 (procedure_write_case) Use new class structures.
3666 (create_case_source) New function.
3667 (case_source_is_complex) New function.
3668 (case_source_is_class) New function.
3669 (create_case_sink) New function.
3671 * vfm.h: (global variable reinit_sysmis) Not used, removed.
3672 (global variable reinit_blanks) Not used, removed.
3673 (global variable init_zero) Not used, removed.
3674 (global variable init_blanks) Not used, removed.
3675 (struct case_source) New struct.
3676 (struct case_source_class) New struct.
3677 (struct case_sink) New struct.
3678 (struct case_sink_class) New struct.
3679 (struct case_stream) Removed.
3681 * vfmP.h: (struct case_list) Moved to var.h.
3683 Tue Mar 2 11:28:30 2004 Ben Pfaff <blp@gnu.org>
3685 * algorithm.c: (count_equal) New function.
3686 (count_if) New function.
3687 (unique) Add assertions.
3688 (partition) Add assertions.
3689 (is_partitioned) New function.
3690 (copy_if) Add assertions.
3691 (remove_equal) Add assertions.
3692 (lexicographical_compare) Rename lexicographical_compare_3way.
3693 (sort) Add assertions. Rephrase some code.
3694 (is_sorted) New function.
3696 Sun Feb 29 23:24:57 2004 Ben Pfaff <blp@gnu.org>
3700 * sort.c: Completely rewrite.
3702 * sort.h: Expose interface via struct sort_cases_pgm, not via
3705 * aggregate.c: (sort) New static var.
3706 (cmd_aggregate) Use sort.
3707 (create_sysfile) Ditto.
3708 (aggregate_single_case) Ditto.
3709 (dump_aggregate_info) Ditto.
3710 (agr_00x_end_func) Ditto.
3711 (debug_print) Ditto.
3713 * var.h: (enum SRT_ASCEND) Removed.
3714 (enum SRT_DESCEND) Removed.
3715 (struct sort_cases_proc) Removed.
3716 (struct variable) Remove p.srt member.
3718 Sun Feb 29 23:22:45 2004 Ben Pfaff <blp@gnu.org>
3720 Get rid of the old, crappy heap structure and replace it by a new,
3721 shiny, C++ STL-like heap structure.
3723 * Makefile.am: (pspp_SOURCES) Remove heap.c, heap.h.
3725 * algorithm.c: (push_heap) New function.
3736 Sun Feb 29 23:21:53 2004 Ben Pfaff <blp@gnu.org>
3738 Increase warning level.
3740 * Makefile.am: (AM_CFLAGS) Remove -Wnouninitialized.
3742 Sat Feb 21 17:38:58 WST 2004 John Darrington <john@darrington.wattle.id.au>
3744 * main.c: Added a signal handler for SIGSEGV requesting a bug report.
3746 Fri Feb 20 23:22:14 2004 Ben Pfaff <blp@gnu.org>
3748 * dictionary.c: (dict_create_var) Fix root cause of bug worked
3749 around by previous change log entry.
3751 * compute.c: (lvalue_finalize) Remove workaround from previous
3754 Fri Feb 20 14:37:41 WAST 2004 John Darrington <john@darrington.wattle.id.au>
3756 * compute.c: Fixed a bug where the Format was not getting set for
3757 computed variables (thus causing a crash when SAVEing).
3759 * Added a test to stop this bug ever coming back
3761 Wed Feb 18 22:21:35 2004 Ben Pfaff <blp@gnu.org>
3763 Got rid of approx.h. In general, replaced all references to
3764 approx_eq() by ==, approx_lt() by <, etc. Other types of changes
3767 * Makefile.am: (pspp_SOURCES) Removed approx.h.
3769 * data-out.c: (try_F) Replaced test for approx_eq(number, 0.0) by
3770 test for mag < EPSILON.
3772 * misc.h: Add definition of EPSILON.
3774 Wed Feb 18 21:32:44 2004 Ben Pfaff <blp@gnu.org>
3776 * vfm.c: (procedure) Add check to prevent recursive call.
3778 Wed Feb 18 21:48:54 WST 2004 John Darrington <john@darrington.wattle.id.au>
3780 * Moved the declarations relating to values to their own header file
3783 * Added levene.c and levene.h
3785 * vars-atr.c: Changed the signature of compare_values to
3786 take const * arguments.
3788 * t-test.q: Changed the structure of struct t_test_proc
3789 variables now contain their own group statistics information.
3790 Eventually, t_test_proc might get renamed, because it'd be
3791 applicable to other commands too.
3793 Mon Feb 16 23:15:51 2004 Ben Pfaff <blp@gnu.org>
3795 * data-out.c: Clean up. Changed interface of convert_*() to take
3796 either a `double' or a `const char *' instead of a `const union
3797 value *'. Update all implementations of those interfaces.
3798 (data_out) Use switch statements instead of a table.
3799 (convert_AHEX) Rewrite.
3801 * format.h: Update comment.
3803 Mon Feb 16 22:14:36 2004 Ben Pfaff <blp@gnu.org>
3805 * q2c.c: (dump_header) Add an Emacs header line to output files
3806 that makes generated .c files read-only by default, to make it
3807 difficult to accidentally change generated files.
3809 Mon Feb 16 22:12:07 2004 Ben Pfaff <blp@gnu.org>
3811 * frequencies.q: (compare_freq_numeric_a) Compare by frequency,
3812 not bogus a->v.c <=> b->v.c pointer compare.
3813 (compare_freq_alpha_a) Ditto.
3814 (compare_freq_numeric_d) Ditto.
3815 (compare_freq_alpha_d) Ditto.
3817 Mon Feb 16 22:00:53 2004 Ben Pfaff <blp@gnu.org>
3819 Changed data_out() to store string data directly into a `union
3820 value''s s member, not indirectly into c.
3822 * crosstabs.q: (output_pivot_table) Use format_short() instead of
3824 (table_value_missing) Ditto.
3825 (float_M_suffix) Ditto.
3826 (format_short) New function.
3828 * data-in.h: (data_in_finite_line) Remove inline definition.
3830 * data-list.c: (destroy_dls_var_spec) New function.
3831 (destroy_dls) Rewrite in terms of destroy_dls_var_spec().
3832 (data_list_source_destroy_source) Avoid cast.
3833 (struct repeating_data_trns) New field `id_value'. Update
3835 (cmd_repeating_data) Initialize id_value. Use new
3836 repeating_data_trns_free() for freeing REPEATING DATA
3838 (rpd_parse_record) Rewrite support for record ID to be less bogus.
3839 (repeating_data_trns_free) New function.
3841 * data-out.c: (data_out) Change return type to `void' by replacing
3842 error returns by writing a message into the output buffer.
3843 (convert_A) Read from v->s instead of v->c.
3844 (convert_AHEX) Ditto.
3846 * expr-evl.c: Update comment.
3847 (expr_evaluate) Add assertion in OP_STRING case.
3849 * format.h: (macro MAX_FORMATTED_LEN) New macro.
3851 * list.q: (list_cases) Update for new data_out() semantics.
3853 * print.c: (print_trns_proc) Ditto.
3855 * tab.c: (tab_value) Ditto.
3856 (tab_float) Avoid stupid cast.
3858 * var.h: Update comments.
3859 (macro MAX_STRING) New macro.
3860 (macro MAX_ELEMS_PER_VALUE) New macro.
3862 * vars-atr.c: (compare_values) New function.
3864 * vfm.c: (dump_splits) Update for new data_out() semantics.
3866 Mon Feb 16 21:45:47 2004 Ben Pfaff <blp@gnu.org>
3868 * crosstabs.q: (struct table_entry) Rename v[] to values[]. All
3870 (struct crosstab) Rename v[] to vars[]. All references updated.
3871 (hash_table_entry) Replace the hash algorithm and fix a bug at the
3872 same time, which caused the hash value to depend only on a single
3873 value, not all of the variables' values.
3875 Mon Feb 16 12:49:53 2004 Ben Pfaff <blp@gnu.org>
3877 Clean up struct dictionary's value_cnt usage.
3879 * dictionary.c: Add a function comment to each function.
3880 (struct dictionary) Rename value_cnt to next_value_idx, which more
3881 accurately reflects its meaning. All references updated.
3882 (dict_rename_vars) Add assertion.
3883 (dict_get_value_cnt) Rename dict_get_next_value_idx(). All
3885 (dict_get_case_size) New function.
3887 * aggregate.c: (create_sysfile) Use dict_get_case_size().
3889 * get.c: (mtf_read_nonactive_records) Ditto.
3891 * sort.c: (allocate_cases) Ditto.
3892 (write_initial_runs) Ditto.
3896 * vfm.c: (prepare_for_writing) Ditto.
3900 Mon Feb 16 00:17:55 2004 Ben Pfaff <blp@gnu.org>
3902 Make vfm.c slightly less grotesque.
3904 * vfm.c: (filter_var) Removed.
3905 (filter_index) Removed.
3906 (FILTERED macro) Removed.
3907 (exclude_this_case) New function.
3908 (process_active_file_write_case) Use exclude_this_case() instead
3909 of FILTERED and inline tests.
3910 (procedure_write_case) Ditto.
3911 (setup_filter) Removed.
3912 (open_active_file) Don't call setup_filter().
3913 (close_active_file) Call dict_get_filter() instead of checking
3916 Mon Feb 16 00:01:53 2004 Ben Pfaff <blp@gnu.org>
3918 * var.h: (struct variable) Update comments.
3920 Sun Feb 15 23:14:59 2004 Ben Pfaff <blp@gnu.org>
3922 New functions dict_create_var_assert(), dict_lookup_var_assert().
3923 Converted several dict_*_var()/assert pairs into a single
3924 dict_*_var_assert().
3926 * dictionary.c: (dict_create_var_assert) New function.
3927 (dict_lookup_var_assert) New function.
3929 Sun Feb 15 23:06:08 2004 Ben Pfaff <blp@gnu.org>
3931 Got rid of "struct long_vec", envector(), devector(), etc. Added
3932 two members `init', `reinit' to struct variable as a substitute.
3934 * Makefile.am: (pspp_SOURCES) Removed cases.c, cases.h.
3940 * aggregate.c: (parse_aggregate_functions) destvar doesn't need
3943 * autorecode.c: (cmd_autorecode) destvars don't need init.
3945 * compute.c: (lvalue_finalize) Set reinit.
3947 * data-list.c: (fixed_parse_compatible) Don't need init usually.
3948 (dump_fmt_list) Ditto.
3951 * descript.q: (run_z_pass) Don't need init for z-scores.
3953 * dictionary.c: (dict_create_var) Initialize `init', `reinit'
3955 (dict_clone_var) Copy `reinit' member, initialize `init' member.
3957 * glob.c: (init_glob) Remove vec_init() calls.
3959 * inpt-pgm.c: (cmd_end_input_program) Use `reinit', not `left'.
3961 * loop.c: (internal_cmd_loop) Don't need to call envector().
3963 * numeric.c: (cmd_numeric) Ditto.
3965 (cmd_leave) Ditto. Set `init', `reinit' members.
3967 * recode.c: (cmd_recode) Don't need to call envector().
3969 * repeat.c: (internal_cmd_do_repeat) Ditto.
3971 * var.h: (struct variable) Remove `left'. Add `init', `reinit'.
3972 (force_create_variable) Removed prototype.
3973 (force_dup_variable) Ditto.
3975 * vector.c: (cmd_vector) Don't need to call envector().
3977 * vfm.c: (reinit_sysmis) Removed.
3978 (reinit_blanks) Removed.
3979 (init_zero) Removed.
3980 (init_blanks) Removed.
3981 (process_active_file_write_case) No need to deal with vectors.
3982 Call clear_temp_case().
3983 (vector_initialization) Rewrite to use `init', `reinit'.
3984 (close_active_file) No need to call vec_clear().
3985 (procedure_write_case) Call clear_temp_case().
3986 (clear_temp_case) New function.
3988 Sun Feb 15 20:50:36 2004 Ben Pfaff <blp@gnu.org>
3990 * pfm-write.c: (bufwrite) Get rid of nasty cast that also invoked
3993 Thu Feb 12 23:35:15 2004 Ben Pfaff <blp@gnu.org>
3995 Add auxiliary argument to procedure() interface. Associated small
3996 clean-ups of vfm interface.
3998 * Updated every caller of procedure() and process_active_file() to
3999 reflect modified interface. Simple, ordinary changes not listed
4002 * Updated every function that implements struct case_stream's
4003 `read' function to take a write_case_func and a write_case_data.
4004 Also updated every caller of write_case() to instead call them
4005 through these arguments. In some cases this meant that the extra
4006 args had to be threaded through a couple of extra levels. This
4007 wasn't difficult or interesting so the details won't be given.
4009 * data-list.c: (struct repeating_data_trns) Add members
4010 `write_case', `wc_data' as kluge.
4011 (read_one_set_of_repetitions) Rename repeating_data_trns_proc and
4013 (repeating_data_set_write_case) New function.
4015 * data-list.h: New file to declare repeating_data_trns_proc() and
4016 repeating_data_set_write_case().
4018 * inpt-pgm.c: (input_program_source_read) Call
4019 repeating_data_set_write_case() for all the REPEATING DATA
4020 transformations, so that they know where to send their cases.
4021 It's a big kluge. Also kluge in END CASE.
4022 (end_case_trns_proc) Never called anymore, but we still need it,
4025 * sort.c: (read_sort_output) Update to match struct case_stream
4028 * vfm.c: (struct write_case_data) New structure.
4029 (proc_func) Removed.
4030 (virt_proc_func) Removed.
4031 (begin_func) Removed.
4032 (virt_begin_func) Removed.
4034 (write_case) Removed.
4035 (procedure) Added an auxiliary parameter to each function pointer
4036 argument's prototype. Added an auxiliary data parameter.
4038 (process_active_file) Ditto.
4039 (process_active_file_write_case) Pass aux data along.
4040 (close_active_file) Ditto.
4041 (procedure_write_case) Ditto.
4042 (SPLIT_FILE_procfunc) Ditto.
4044 * vfm.h: (typedef write_case_data) New.
4045 (typedef write_case_func) New.
4046 (struct case_stream) Add parameters to `read' member prototype.
4048 Thu Feb 12 19:24:53 WST 2004 John Darrington <john@darrington.wattle.id.au>
4050 * t-test.q: Added calculations for independent samples. (But no Levene
4053 * Makefile.am: Moved q_sources_c into own variable
4055 Wed Feb 11 23:56:51 2004 Ben Pfaff <blp@gnu.org>
4057 Miscellaneous cleanups.
4059 * Change unused to UNUSED in many source files to reflect modified
4060 pref.h. Change use of __WIN32__, __MSDOS, __DJGPP__,
4061 __CYGWIN32__, __unix__, and unix not to assume that they're
4062 defined to a nonzero value. Change use of __attribute__ to use
4063 NO_RETURN or PRINTF_FORMAT instead.
4065 * alloc.h: Move definitions for local_alloc(), local_free() here
4066 from ../pref.h.orig and simplify.
4068 * expr-evl.c: Instead of working differently based on PAGED_STACK,
4069 use a pool allocator unconditionally.
4070 (CHECK_STRING_SPACE) Removed.
4071 (ALLOC_STRING_SPACE) Removed.
4072 (expr_evaluate) Use e->pool instead of CHECK_STRING_SPACE and
4075 * expr-opt.c: (dump_expression) Allocate string pool.
4077 * expr-prs.c: (expr_free) Free string pool.
4079 * pool.c: (pool_destroy) This pool must be removed from its
4080 parent's list of gizmos, not from its own. Use free_all_gizmos().
4081 (pool_clear) New function.
4082 (free_all_gizmos) New function.
4083 (pool_alloc) Use space in empty block after this one if any.
4084 (pool_release) Only empty out blocks, don't actually free() them.
4086 * print.c: Get rid of PAGED_STACK special case by always
4087 dynamically allocating line buffers.
4088 (struct print_trns) Always include the `line' member.
4089 (internal_cmd_print) Always initialize the `line' member.
4090 (alloc_line) Always allocate memory for `line'.
4091 (print_trns_proc) Always initialize buf from `line' member.
4092 (print_trns_free) Always free `line' memory.
4094 * sort.c: (allocate_file_handles) Special-case MS-DOS for mkdir()
4097 Wed Feb 11 20:33:18 2004 Ben Pfaff <blp@gnu.org>
4099 * flip.c: Fixed crash from FLIP when a numeric variable is
4100 specified on NEWNAMES and a large value is used, and a couple of
4101 other minor bugs besides.
4102 (struct varname) Make name a 9-character fixed-size array
4103 instead of a 1-character variable size array.
4104 (make_new_var) Allow digits in variable names.
4105 (flip_stream_write) Limit numeric values to 8 characters and
4106 format system missing and very large and small values more
4109 Thu Feb 5 13:19:06 WAST 2004 John Darrington <john@darrington.wattle.id.au>
4111 * command.c: Fixed test on command return status for the correct
4112 value, which had been causing a crash under certain invalid input.
4114 Wed Feb 4 15:34:11 WST 2004 John Darrington <john@darrington.wattle.id.au>
4116 * t-test.q: Added calculations for the one sample variant of the T-TEST
4118 Tue Feb 3 20:09:54 2004 Ben Pfaff <blp@gnu.org>
4120 * tab.c: (render_strip) Fix bug that sometimes caused joined text
4121 in joined cells to be rendered outside box boundaries.
4123 Tue Feb 3 18:56:45 WST 2004 John Darrington <john@darrington.wattle.id.au>
4125 * random.c (rng_create): Fixed seeding so that it gets reseeded after
4126 SET seed=xx has been called.
4128 Mon Jan 19 14:08:09 2004 Ben Pfaff <blp@gnu.org>
4130 * random.c (rng_get_double): Fix always-returning-zero bug in my
4131 preferred way, and at the same time make sure rounding doesn't
4134 Thu Jan 1 23:16:41 2004 Ben Pfaff <blp@gnu.org>
4136 * html.c: (change_attributes) Dead code, removed.
4137 (escape_string) Eliminate code to call change_attributes() that
4138 never actually called it.
4139 (output_tab_table) Get rid of dependence on tab_hit
4140 and struct tab_joined_cell's hit member, which are abominations.
4142 * tab.c: (tab_output_text) Don't call
4143 d->class->text_set_font_by_name if it's a null pointer.
4144 (macro UNROLL_LOOP) Eliminate.
4145 (macro UNROLL_3_LOOPS) Eliminate.
4146 (tabi_render) Rewrite not to use the above macros.
4148 Thu Jan 1 23:09:07 2004 Ben Pfaff <blp@gnu.org>
4150 Start working on a new output driver system, one that doesn't suck
4151 so much, by adding a "device-independent" output driver. The idea
4152 is to write out only a single output stream, then use separate
4153 processes to translate them into whatever formats we want. This
4154 is similar to how "groff" works with its various output drivers
4155 (grops, grotty, grodvi, ...).
4157 * Makefile.am: (pspp_SOURCES) Add devind.c, devind.h.
4159 * list.q: (write_all_headers) Stub out devind class.
4161 (determine_layout) Ditto.
4164 * output.c: (outp_init) Add devind class.
4166 * devind.c: New file.
4168 * devind.h: New file.
4170 Thu Jan 1 23:08:14 2004 Ben Pfaff <blp@gnu.org>
4172 * frequencies.q: (hash_value_alpha) Fixed up the previous change
4173 to use the proper string length.
4175 Wed Dec 31 16:27:33 WAST 2003 John Darrington <john@darrington.wattle.id.au>
4177 * Fixed bug where FREQ would crash on alpha values
4179 Tue Dec 30 22:42:57 2003 Ben Pfaff <blp@gnu.org>
4181 * Removed bletcherous alloca() workarounds for AIX from top of
4182 many files. AIX can use the alternative alloca() implementation
4185 Tue Dec 30 22:35:16 2003 Ben Pfaff <blp@gnu.org>
4187 * ascii.c: (ascii_option) Fix implementation of headers option.
4189 Tue Dec 30 22:32:53 2003 Ben Pfaff <blp@gnu.org>
4191 * ascii.c: Add a "squeeze" option to the ASCII driver to squeeze
4192 multiple blank lines into one.
4193 (struct ascii_driver_ext) Add squeeze_blank_lines option.
4194 (ascii_preopen_driver) Initialize squeeze_blank_lines.
4195 (static var option_tab) Add squeeze entry.
4196 (ascii_option) Set squeeze_blank_lines.
4197 (output_lines) Implement squeezing blank lines.
4199 Wed Dec 31 07:19:46 WST 2003 John Darrington <john@darrington.wattle.id.au>
4201 * Removed redundant code from output.h
4203 Sat Dec 27 22:17:52 2003 Ben Pfaff <blp@gnu.org>
4205 Dictionary classes: each variable is "ordinary", "system", or
4208 * var.h: (enum dict_class) New enum.
4210 * vars-prs.c: (dict_class_from_id) New function.
4211 (dict_class_to_name) New function.
4213 Sat Dec 27 22:16:06 2003 Ben Pfaff <blp@gnu.org>
4215 * var.h: (struct freq_tab_set) Removed (not used).
4217 Sat Dec 27 22:15:21 2003 Ben Pfaff <blp@gnu.org>
4219 * value-labels.c: (val_labs_destroy) vls needs to be freed too.
4221 Sat Dec 27 22:10:49 2003 Ben Pfaff <blp@gnu.org>
4223 * stats.c: (hypercube) Rename pow4(). All references updated.
4225 Sat Dec 27 22:05:49 2003 Ben Pfaff <blp@gnu.org>
4227 * rename-vars.c: (cmd_rename_variables) Rewritten.
4228 (compare_name) Removed.
4230 Sat Dec 27 22:03:51 2003 Ben Pfaff <blp@gnu.org>
4232 var_set feature, and code taking advantage of it.
4234 * crosstabs.q: (static var var_dict) Removed.
4235 (static var variables) New variable.
4236 (static var variables_cnt) New variable.
4237 (cmd_crosstabs) Free variables instead of var_dict.
4238 (internal_cmd_crosstabs) Initialize and use variables,
4239 variables_cnt instead of var_dict.
4240 (free_var_dict) Removed.
4241 (crs_custom_tables) Use var_set instead of a copied dictionary.
4242 (crs_custom_variables) Set up variables, variables_cnt instead of
4244 [DEBUGGING] (debug_print) Ditto.
4246 * means.q: (mns_custom_tables) Use var_set instead of a copied
4249 * vars-prs.c: (parse_vs_variable) New function.
4250 (parse_dict_variable) Rewritten.
4251 (parse_variable) Rewritten.
4252 (parse_variables) Renamed parse_var_set_vars(), rewritten.
4253 (parse_variables) New function in terms of parse_var_set_vars().
4254 Now requires its first argument to be non-null. All references
4255 that passed a null pointer updated to pass default_dict instead.
4256 (macro id_dict) Removed.
4257 (parse_DATA_LIST_vars) Add assertions.
4258 (parse_mixed_vars) Ditto.
4259 (struct var_set) New structure.
4260 (var_set_get_cnt) New function.
4261 (var_set_get_var) New function.
4262 (var_set_lookup_var) New function.
4263 (var_set_destroy) New function.
4264 (dict_var_set_get_cnt) New function.
4265 (dict_var_set_get_var) New function.
4266 (dict_var_set_lookup_var) New function.
4267 (dict_var_set_destroy) New function.
4268 (var_set_create_from_dict) New function.
4269 (struct array_var_set) New structure.
4270 (array_var_set_get_cnt) New function.
4271 (array_var_set_get_var) New function.
4272 (array_var_set_lookup_var) New function.
4273 (array_var_set_destroy) New function.
4274 (var_set_create_from_array) New function.
4276 * q2c.c: (dump_parser) Use parse_variables(default_dict, ...)
4277 instead of parse_variables(NULL, ...) in output code.
4279 Sat Dec 27 21:38:53 2003 Ben Pfaff <blp@gnu.org>
4281 Change inp_init from a 2-bit vector to an ordinary array.
4282 Initialize it all in cmd_end_input_program() instead of in
4285 * inpt-pgm.c: (enum value_init_type) New enum.
4286 (global var inp_init) Change to `enum value_init_type *', make
4288 (inp_init_size) Removed.
4289 (inp_nval) Change to `size_t', make static.
4290 (cmd_input_program) Don't initialize inp_init or inp_init_size.
4291 (cmd_end_input_program) Initialize inp_init, inp_nval.
4292 (init_case) Rewrite.
4293 (clear_case) Rewrite.
4295 * inpt-pgm.h: Removed.
4297 Sat Dec 27 21:36:38 2003 Ben Pfaff <blp@gnu.org>
4299 * hash.c: (hsh_hash_bytes) Use Fowler-Noll-Vo hash instead of
4300 Colin Plumb hash. It is simpler and should better resist
4302 (hsh_hash_string) Ditto.
4304 Sat Dec 27 21:34:57 2003 Ben Pfaff <blp@gnu.org>
4306 * get.c: (export_write_case_func) Remove debug printing code.
4308 Sat Dec 27 21:11:09 2003 Ben Pfaff <blp@gnu.org>
4310 * get.c: (cmd_save_internal) Rename parameter. Use &t->h instead
4312 (save_write_case_func) Use &trns->h instead of cast.
4313 (cmd_export) Use &t->h instead of cast.
4315 Sat Dec 27 20:57:42 2003 Ben Pfaff <blp@gnu.org>
4317 Moved vectors into the dictionary.
4319 * var.h: (struct vector) Moved here from vector.h. `index' member
4320 renamed `idx', `v' renamed `var', `nv' renamed `cnt'. All
4323 * vector.h: Removed.
4325 * vector.c: (global var vec) Removed.
4326 (global var nvec) Removed.
4327 (cmd_vector) Rewritten.
4328 (find_vector) Removed.
4330 * dictionary.c: (dict_create_vector) New function.
4331 (dict_get_vector) New function, replaces reading global vec[]
4333 (dict_get_vector_cnt) New function, replaces reading global nvec
4335 (dict_lookup_vector) New function, replaces find_vector().
4336 (dict_clear_vectors) New function.
4338 Sat Dec 27 20:54:01 2003 Ben Pfaff <blp@gnu.org>
4340 Start to move away from `struct variable' p `union' member to void
4343 * var.h: (struct variable) Add `aux' member.
4345 Sat Dec 27 20:36:25 2003 Ben Pfaff <blp@gnu.org>
4347 Get rid of struct variable `foo' member.
4349 * frequencies.q: (internal_cmd_frequencies) Use p.frq.used instead
4351 (frq_custom_variables) Ditto.
4352 (frq_custom_grouped) Ditto.
4354 * get.c: (struct save_trns) Change `var' member from `int *' to
4355 `struct variable **'.
4356 (cmd_save_internal) Use aux instead of foo.
4357 (save_trns_proc) Use revised `var' member.
4358 (static var mtf_seq_no) Renamed mtf_seq_num.
4359 (static var mtf_seq_nums) New static var.
4360 (cmd_match_files) Initialize mtf_seq_nums.
4361 (mtf_free) Free mtf_seq_nums.
4362 (mtf_processing) Use mtf_seq_nums instead of foo.
4363 (mtf_merge_dictionary) No need to initialize mv->foo.
4364 (cmd_export) Use aux instead of foo. Use revised `var' member.
4365 (mns_custom_tables) Don't use foo to check for duplicates, that's
4366 what PV_NO_DUPLICATE is for.
4368 * var.h: (struct variable) Remove `foo' member.
4369 (struct frequencies_proc) New member.
4371 Sat Dec 27 19:46:13 2003 Ben Pfaff <blp@gnu.org>
4373 Clean up COMPUTE and IF.
4375 * compute.c: More or less rewrite the darn thing.
4376 (struct compute_trns) Rename and reorder and add and delete
4378 (cmd_compute) Rewrite.
4379 (compute_num) Make conditional on test expression. Now used for
4380 both COMPUTE and IF.
4381 (compute_num_vec) Ditto.
4382 (compute_str) Ditto.
4383 (compute_str_vec) Ditto.
4386 (if_num_vec) Removed.
4388 (if_str_vec) Removed.
4389 (parse_target_expression) Renamed parse_rvalue_expression(),
4391 (new_trns) Renamed compute_trns_create(), rewritten.
4392 (delete_trns) Removed.
4393 (free_trns) Renamed compute_trns_free(), rewritten.
4394 (struct lvalue) New structure.
4395 (parse_var_or_vec) Renamed lvalue_parse(), rewritten.
4396 (lvalue_get_type) New function.
4397 (lvalue_is_vector) New function.
4398 (lvalue_finalize) New function.
4399 (lvalue_destroy) New function.
4401 Sat Dec 27 19:44:14 2003 Ben Pfaff <blp@gnu.org>
4403 * command.def: Disallow MODIFY VARS in input mode, so that
4404 variables can't get dropped and confuse cmd_end_input_program()'s
4405 attempt to fill inp_init[].
4407 * modify-vars.c: (static var forward_positional_ordering) New
4409 (struct var_modification) Entirely changed.
4410 (rearrange_dict) Interface changed, rewritten.
4411 (cmd_modify_vars) Deal with modified struct var_modification, much
4413 (struct var_renaming) New structure.
4414 (compare_var_renaming_by_new_name) New function.
4415 (validate_var_modification) New function.
4417 * var.h: (struct modify_vars_proc) Removed.
4418 (struct variable) Removed member p.mfv.
4420 Sat Dec 27 19:40:26 2003 Ben Pfaff <blp@gnu.org>
4422 Make EVALUATE a valid command whether we're debugging or not, so
4423 that `make check' can succeed regardless of whether debugging is
4426 * command.def: [GLOBAL_DEBUGGING] Drop the #if.
4428 * compute.c: [GLOBAL_DEBUGGING] (cmd_evaluate) Drop the #if.
4430 Sat Dec 27 19:34:40 2003 Ben Pfaff <blp@gnu.org>
4432 * apply-dict.c: (cmd_apply_dictionary) Replace a ghastly switch
4433 statement by a simple if test.
4435 * dfm.c: (dfm_get_record) Add assertion.
4437 Sat Dec 27 17:51:26 2003 Ben Pfaff <blp@gnu.org>
4439 For each file x.c, move #include "x.h" to the very top of the
4440 include list, to catch x.h failing to include the proper headers.
4442 Sat Dec 27 17:50:19 2003 Ben Pfaff <blp@gnu.org>
4444 * algorithm.c: (find) New function.
4445 (remove_equal) New function.
4446 (set_difference) New function.
4447 (adjacent_find_equal) New function.
4448 [TEST_UNIQUE] Removed test case.
4449 (copy_if) Find end test.
4451 Sat Dec 27 17:42:45 2003 Ben Pfaff <blp@gnu.org>
4453 * dictionary.c: (dict_get_case_weight) New convenience function.
4455 * aggregate.c: (accumulate_aggregate_info) Use
4456 dict_get_case_weight().
4458 * frequencies.q: (calc_general) Ditto.
4459 (calc_integer) Ditto.
4462 * t-test.q: (groups_calc) Ditto.
4465 Sat Dec 27 17:29:45 2003 Ben Pfaff <blp@gnu.org>
4467 * glob.c: (global var default_dict) Change from `struct
4468 dictionary' to `struct dictionary *'. All references changed.
4469 (init_glob) Initialize default_dict with dict_create().
4471 Sat Dec 27 17:06:06 2003 Ben Pfaff <blp@gnu.org>
4473 struct dictionary now made opaque. All related functions:
4475 * get.c: (rename_variables) Removed.
4476 (dict_delete_run) Removed.
4478 * temporary.c: (copy_variable) Removed.
4479 (new_dictionary) Removed.
4480 (save_dictionary) Removed.
4481 (restore_dictionary) Removed.
4482 (free_dictionary) Removed.
4484 * vars-atr.c: (clear_default_dict) Removed.
4485 (find_variable) Removed.
4486 (find_dict_variable) Removed.
4487 (create_variable) Removed.
4488 (delete_variable) Removed.
4489 (common_init_stuff) Removed.
4490 (init_variable) Removed. Updating of inp_init moved into
4491 cmd_end_input_program().
4492 (replace_variable) Removed.
4493 (rename_variable) Removed.
4494 (clear_variable) Removed.
4495 (dup_variable) Removed.
4497 * vars-prs.c: (is_varname) Removed.
4498 (is_dict_varname) Removed.
4499 (fill_all_vars) Removed.
4501 * vector.c: (find_vector) Removed.
4503 * weight.c: (stop_weighting) Removed.
4505 * dictionary.c: New file.
4506 (dict_create) New, replaces new_dictionary().
4507 (dict_clone) New, replaces save_dictionary() and
4508 restore_dictionary().
4509 (dict_clear) New, replaces clear_default_dict().
4510 (dict_destroy) New, replaces free_dictionary().
4511 (dict_get_var_cnt) New function, replaces references to
4513 (dict_get_var) New function, replaces references to dict->var[i].
4514 (dict_get_vars) New function, replaces fill_all_vars().
4515 (dict_create_var) New, replaces create_variable(). Interface
4516 drops `type' parameter, using a zero `width' to designate numeric.
4517 (dict_clone_var) New, replaces dup_variable().
4518 (dict_rename_var) New, replaces rename_variable().
4519 (dict_lookup_var) New, replaces find_variable(),
4520 find_dict_variable(), is_varname().
4521 (dict_contains_var) New function.
4522 (compare_variable_dblptrs) New function.
4523 (dict_delete_var) New function, replaces clear_variable().
4524 (dict_delete_vars) New function, replaces dict_delete_run().
4525 (dict_reorder_vars) New function.
4526 (dict_rename_vars) New function, replaces rename_variables().
4527 (dict_get_weight) New function, replaces reading dict->weight_var.
4528 (dict_set_weight) New function, replaces writing dict->weight_var
4529 or calling stop_weight(dict).
4530 (dict_get_filter) New function, replaces reading dict->filter_var.
4531 (dict_set_filter) New function, replaces writing dict->filter_var.
4532 (dict_get_case_limit) New function, replaces reading dict->N.
4533 (dict_set_case_limit) New function, replaces writing dict->N.
4534 (dict_get_value_cnt) New function, replaces reading dict->nval.
4535 (dict_compact_values) New function, replaces a loop that was
4536 replicated in several places.
4537 (dict_get_split_vars) New function, replaces reading dict->splits.
4538 (dict_get_split_cnt) New function, replaces reading
4540 (dict_set_split_vars) New function, replaces writing dict->splits.
4541 (dict_get_label) New function, replaces reading dict->label.
4542 (dict_set_label) New function, replaces writing dict->label.
4543 (dict_get_documents) New function, replaces reading
4545 (dict_set_documents) New function, replaces writing
4548 All references to above functions updated.
4550 * aggregate.c: (cmd_aggregate) Copy file label and documents from
4551 old dictionary to new by hand, because dict_create() can't do it
4552 itself. Use dict_set_documents(), dict_set_split_vars().
4554 * temporary.c: (cancel_temporary) Also set temp_dict to NULL after
4555 calling dict_destroy().
4557 * data-list.c: (dls_var_spec) Remove `type' member, replace by
4559 (fixed_parse_compatible) Some slightly nontrivial changes for
4561 (dump_fmt_list) Ditto.
4564 * file-type.c: (create_col_var) Ditto.
4566 * get.c: (cmd_get) Use dict_compact_values() instead of a loop.
4567 (trim_dictionary) Use dict_delete_vars(), dict_reorder_vars().
4568 (rename_variables) Use dict_rename_vars().
4569 (mtf_merge_dictionary) Use dict_get_documents(),
4570 dict_set_documents(), dict_compact_values().
4572 * pfm-read.c: (read_variables) Deal with changes to weighting.
4574 * q2c.c: (dump_parser) Use dict_lookup_var() instead of
4575 is_varname() in output code.
4577 * sfm-read.c: (read_header) Use dict_create(), dict_set_label(),
4578 other dictionary functions.
4580 * title.c: (add_document_line) Use dict_get_documents(),
4581 dict_set_documents().
4583 * vars-atr.c: (discard_variables) Use dict_clear(default_dict),
4584 reset default_handle by hand. dict_clear() will clear vectors so
4585 there's no need for that by hand.
4587 * vfm.c: (close_active_file) Move call to finish_compaction()
4588 earlier, so that we can do the compaction as a single step using
4589 dict_compact_values(). Use dict_clear_vectors().
4590 (finish_compaction) Use dict_delete_var(), dict_compact_values().
4592 Some functions don't have replacements:
4594 * vars-atr.c: (force_create_variable) Removed. All references
4595 updated to dict_create_var() followed by an assertion.
4596 (force_dup_variable) Removed. All references updated to
4597 dict_clone_var() followed by an assertion.
4599 * weight.c: (update_weighting) Removed. No longer necessary, so
4600 all references removed.
4602 Sat Dec 27 16:43:01 2003 Ben Pfaff <blp@gnu.org>
4606 * aggregate.c: Eliminate separation of weighted and unweighted
4607 case. It made the code too obscure and I doubt it was actually
4608 faster. Instead, all code uses the "weighted" code, because
4609 that's a generalization of the "unweighted" code.
4612 (parse_aggregate_functions) No need to set FWEIGHT.
4613 (accumulate_aggregate_info) Get rid of FWEIGHT cases.
4614 (dump_aggregate_info) Ditto.
4615 (initialize_aggregate_info) No need for special plain_function
4616 that gets rid of FWEIGHT option.
4618 * aggregate.c: Get rid of approximations.
4619 (accumulate_aggregate_info) Don't use approx_gt(), approx_lt(),
4621 (aggregate_single_case) Don't use approx_ne().
4623 Sat Dec 27 16:19:36 2003 Ben Pfaff <blp@gnu.org>
4625 * ascii.c (ascii_line_width): Dead code, removed.
4627 * postscript.c (ps_line_width): Ditto.
4629 * q2c.c (xrealloc): Ditto.
4631 * count.c (internal_cmd_count): Ditto.
4633 * means.q (validate_dependent_endpoint): Ditto.
4635 * set.q: (cmd_gset) Ditto.
4637 * weight.c: [0] (weight_trns_proc) Ditto.
4639 Sat Dec 27 16:18:16 2003 Ben Pfaff <blp@gnu.org>
4641 Make the code -Wmissing-prototypes clean.
4643 * Makefile.am (version.c): Add #include "version.h".
4645 * ascii.c: (ascii_open_global) Make static.
4646 (ascii_close_page) Ditto.
4647 (ascii_font_sizes) Ditto.
4648 (ascii_postopen_driver) Ditto.
4649 (ascii_close_driver) Ditto.
4650 (ascii_option) Ditto.
4651 (ascii_open_page) Ditto.
4652 (ascii_line_horz) Ditto.
4653 (ascii_line_vert) Ditto.
4654 (ascii_line_intersection) Ditto.
4656 (ascii_polyline_begin) Ditto.
4657 (ascii_polyline_point) Ditto.
4658 (ascii_polyline_end) Ditto.
4659 (ascii_text_set_font_by_name) Ditto.
4660 (ascii_text_set_font_by_position) Ditto.
4661 (ascii_text_set_font_by_family) Ditto.
4662 (ascii_text_get_font_name) Ditto.
4663 (ascii_text_get_font_family) Ditto.
4664 (ascii_text_set_size) Ditto.
4665 (ascii_text_get_size) Ditto.
4666 (ascii_text_metrics) Ditto.
4667 (ascii_text_draw) Ditto.
4668 (ascii_close_page) Ditto.
4670 * cmdline.h: New header for parse_command_line(). Used where
4673 * command.c: Move prototypes for cmd_*() functions to command.h.
4675 * command.h: Prototypes for cmd_*() functions moved here from
4678 * crosstabs.q: (gamma_int) Ditto.
4680 * file-handle.h: Add fh_init_files() prototype.
4682 * getline.c: (welcome) Ditto.
4684 * glob.h: New header for init_glob(). Used where appropriate.
4686 * hash.c: (comparison_helper) Ditto.
4688 * html.c: (html_open_global) Ditto.
4689 (html_close_global) Ditto.
4690 (html_preopen_driver) Ditto.
4691 (html_postopen_driver) Ditto.
4692 (html_close_driver) Ditto.
4693 (html_option) Ditto.
4694 (html_open_page) Ditto.
4695 (html_close_page) Ditto.
4696 (html_submit) Ditto.
4698 * inpt-pgm.c: (input_program_source_read) Ditto.
4700 * output.c: (find_defn_value) Ditto.
4701 (destroy_list) Ditto.
4703 * pfm-read.c: (read_int) Ditto.
4705 * postscript.c: (ps_open_global) Ditto.
4706 (ps_close_global) Ditto.
4707 (ps_font_sizes) Ditto.
4708 (ps_preopen_driver) Ditto.
4709 (ps_postopen_driver) Ditto.
4710 (ps_close_driver) Ditto.
4712 (ps_open_page) Ditto.
4713 (ps_close_page) Ditto.
4714 (ps_line_horz) Ditto.
4715 (ps_line_vert) Ditto.
4716 (ps_line_intersection) Ditto.
4718 (ps_polyline_begin) Ditto.
4719 (ps_polyline_point) Ditto.
4720 (ps_polyline_end) Ditto.
4721 (ps_text_set_font_by_name) Ditto.
4722 (ps_text_set_font_by_position) Ditto.
4723 (ps_text_set_font_family) Ditto.
4724 (ps_text_get_font_name) Ditto.
4725 (ps_text_get_font_family) Ditto.
4726 (ps_text_set_size) Ditto.
4727 (ps_text_get_size) Ditto.
4728 (ps_text_metrics) Ditto.
4729 (ps_text_draw) Ditto.
4731 * q2c.c: (finish_up) Ditto.
4740 (find_symbol) Ditto.
4743 (force_string) Ditto.
4745 (match_token) Ditto.
4748 (parse_setting) Ditto.
4749 (parse_specifier) Ditto.
4750 (parse_specifiers) Ditto.
4751 (parse_subcommand) Ditto.
4752 (dump_specifier_vars) Ditto.
4754 (make_identifier) Ditto.
4755 (dump_declarations) Ditto.
4756 (dump_specifier_init) Ditto.
4757 (dump_vars_init) Ditto.
4759 (dump_specifier_parse) Ditto.
4760 (dump_subcommand) Ditto.
4761 (dump_parser) Ditto.
4762 (dump_header) Ditto.
4764 (recognize_directive) Ditto.
4766 * recode.c: (string_to_long) Ditto.
4768 * repeat.c: (find_DO_REPEAT_substitution) Ditto.
4770 * repeat.h: New header for perform_DO_REPEAT_substitutions, used
4773 * sort.c: (sort_stream_read) Ditto.
4774 (sort_stream_mode) Ditto.
4776 Fri Dec 19 23:35:04 2003 Ben Pfaff <blp@gnu.org>
4778 * algorithm.c (binary_search): Fix comparison.
4780 Fri Dec 19 23:27:45 2003 Ben Pfaff <blp@gnu.org>
4782 * algorithm.c: (binary_search) Fix assertion.
4784 Fri Dec 19 21:31:48 2003 Ben Pfaff <blp@gnu.org>
4786 * sysfile-info.c: (compare_vectors_by_name) Rewrite.
4788 Fri Dec 19 21:30:24 2003 Ben Pfaff <blp@gnu.org>
4790 * sort.c: (compare_case_lists) Rewrite.
4792 Fri Dec 19 16:44:22 2003 Ben Pfaff <blp@gnu.org>
4794 * quicksort.c: Removed (not used).
4796 * quicksort.h: Removed (not used).
4798 * sort.c: Removed blp_quicksort() prototype.
4800 Fri Dec 19 16:42:13 2003 Ben Pfaff <blp@gnu.org>
4802 * postscript.c: (int_2_compare) Rewrite.
4803 (compare_line) Rewrite.
4805 Fri Dec 19 16:38:35 2003 Ben Pfaff <blp@gnu.org>
4807 * matrix-data.c (compare_factors) Use lexicographical_compare()
4809 (compare_doubles) New function.
4811 * algorithm.c: (lexicographical_compare) New algorithm.
4813 Fri Dec 19 16:23:45 2003 Ben Pfaff <blp@gnu.org>
4815 * matrix-data.c (compare_variables_by_mxd_vartype): Rewrite.
4817 Fri Dec 19 15:54:45 2003 Ben Pfaff <blp@gnu.org>
4819 * expr-prs.c: (cmp_func) Removed.
4820 (parse_function) Use binary_search() algorithm.
4821 (compare_functions) New function.
4822 (init_func_tab) Use sort() algorithm.
4824 * algorithm.c: (binary_search) New algorithm.
4826 Fri Dec 19 15:50:45 2003 Ben Pfaff <blp@gnu.org>
4828 * descript.q: (display) Use sort() algorithm instead of qsort().
4829 (compare_func) Removed.
4830 (descriptives_compare_variables) New function.
4832 Fri Dec 19 15:08:38 2003 Ben Pfaff <blp@gnu.org>
4834 Get rid of AVL trees. Hashes are more appropriate for everything
4837 * Makefile.am: (pspp_SOURCES) Remove avl.c, avl.h.
4843 Fri Dec 19 14:33:31 2003 Ben Pfaff <blp@gnu.org>
4845 Much code can be clarified by using C++ STL-like algorithms. Not
4846 all uses of these algorithms are listed below, only the ones where
4847 the change to an algorithm was the only change of interest.
4849 * Makefile.am: (pspp_SOURCES) Add algorithm.c, algorithm.h.
4851 * algorithm.c: New file.
4853 * algorithm.h: New file.
4855 * modify-vars.c: (static var forward) Removed.
4856 (static var positional) Removed.
4857 (compare_variables) Removed.
4858 (struct ordering) New.
4859 (cmd_modify_vars) Use sort() algorithm.
4860 (compare_variables_given_ordering) New function.
4861 (rearrange_dict) Use sort() algorithm.
4863 * sysfile-info.c: (cmd_display) Use sort() algorithm.
4864 (cmp_var_by_name) Removed.
4866 Fri Dec 19 14:26:17 2003 Ben Pfaff <blp@gnu.org>
4868 Make file handles use a hash table.
4870 * file-handle.q: (files) Change to hash table, make static.
4871 (cmd_file_handle) Use hash table functions.
4872 (fh_get_handle_by_filename) Ditto.
4873 (fh_get_handle_by_name) Ditto.
4874 (hash_file_handle) New function.
4875 (cmp_file_handle) Rewrite.
4876 (fh_init_files) Use hash table functions.
4878 Fri Dec 19 14:24:38 2003 Ben Pfaff <blp@gnu.org>
4880 Clean up FREQUENCIES.
4882 * Makefile.am: (pspp_SOURCES) Remove frequencies.g.
4884 * frequencies.q: Remove a lot of old #if'd out code at the end.
4885 (internal_cmd_frequencies) Use calc() instead of calc_no_weight()
4886 or calc_weight(). Initialize percentile_values.
4887 (calc) New function based on calc_weight() from frequencies.g.
4888 (precalc) Use hash functions.
4889 (static var comparison_func) Removed.
4890 (static var comparison_param) Removed.
4891 (comparison_helper) Removed.
4892 (get_freq_comparator) New function.
4893 (not_missing) New function.
4895 (postprocess_freq_tab) Use hash table functions, algorithms,
4896 get_freq_comparator(). Rewrite.
4897 (cleanup_freq_tab) Rephrase.
4898 (add_percentile) Clean up spacing.
4899 (hash_value_numeric) New function.
4900 (hash_value_alpha) New function.
4901 (compare_value_numeric_a) Rewrite.
4902 (compare_value_alpha_a) Rewrite.
4903 (compare_value_numeric_d) Rewrite.
4904 (compare_value_alpha_d) Rewrite.
4905 (compare_freq_numeric_a) Rewrite.
4906 (compare_freq_alpha_a) Rewrite.
4907 (compare_freq_numeric_d) Rewrite.
4908 (compare_freq_alpha_d) Rewrite.
4909 (calc_stats) Clean up mode, percentiles, max.
4910 (dump_statistics) Clean up spacing.
4912 * frequencies.g: Removed.
4914 * var.h: (struct freq_tab) Change `data' to hash table.
4916 Fri Dec 19 14:15:46 2003 Ben Pfaff <blp@gnu.org>
4918 * file-handle.h: Remove declaration of global variable `files',
4919 which wasn't used anywhere.
4921 * postscript.c: (add_encoding) Remove superfluous cast.
4924 * sfm-read.c: [linux] (bswap_int32) Drop ntohl() non-portable
4927 * temporary.c: [0] (display_tree) Removed.
4929 Fri Dec 19 14:13:04 2003 Ben Pfaff <blp@gnu.org>
4931 Implement a new random number generator based on the alleged RC4
4934 * expr-evl.c: (expr_evaluate) Use rng_get_double_normal() instead
4937 * random.c: [!HAVE_GOOD_RANDOM] (real_rand) Removed.
4938 [!HAVE_GOOD_RANDOM] (real_srand) Removed.
4940 (static var V[]) Removed.
4941 (static var Y) Removed.
4942 (static var X2) Removed.
4943 (setup_randomize) Removed.
4945 (rand_uniform) Removed.
4946 (rand_normal) Removed.
4947 (struct rng) New structure.
4948 (rng_create) New function.
4949 (rng_destroy) New function.
4950 (swap_byte) New static function.
4951 (rng_seed) New function.
4952 (rng_get_bytes) New function.
4953 (rng_get_int) New function.
4954 (rng_get_unsigned) New function.
4955 (rng_get_double) New function.
4956 (rng_get_double_normal) New function.
4957 (pspp_rng) New function.
4959 * random.h: Sync up to random.c.
4961 * sample.c: (struct sample_trns) Make `frac' unsigned and a
4962 fraction of UINT_MAX, not 65536.
4963 (cmd_sample) Use rng_get_unsigned(), rng_get_double(), UINT_MAX
4966 * vfm.c: (open_active_file) No need to call setup_randomize() any
4969 Fri Dec 19 12:05:56 2003 Ben Pfaff <blp@gnu.org>
4971 Change dictionary name indexes to use hash tables instead of AVL
4974 * crosstabs.q: (free_var_dict) Use hash tables.
4975 (crs_custom_tables) Ditto.
4976 (calc_general) Ditto.
4977 (compare_table_entry) Rewrite.
4978 (enum_var_values) Reorder parameters. All references updated.
4981 * get.c: (rename_variable) Use hash tables.
4982 (mtf_merge_dictionary) Ditto.
4984 * glob.c: (init_glob) Use hash tables.
4985 (cmp_variable) Removed.
4987 * means.q: (mns_custom_tables) Use hash tables.
4989 * modify-vars.c: (rearrange_dict) Use hash tables.
4991 * rename-vars.c: (cmd_rename_variables) Use hash tables.
4993 * sfm-read.c: (read_header) Use hash tables.
4994 (read_variables) Ditto.
4996 * temporary.c: (new_dictionary) Use hash tables.
4997 (save_dictionary) Ditto.
4998 (restore_dictionary) Ditto.
5000 * var.h: (struct dictionary) Change AVL tree `var_by_name' into
5001 hash table `name_tab'.
5003 * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed.
5004 [DEBUGGING] (dump_var_tree) Removed.
5005 (find_variable) Use hash tables.
5006 (find_dict_variable) Ditto.
5007 (common_init_stuff) Ditto.
5008 (rename_variable) Ditto.
5009 (clear_variable) Ditto. Also, remove debug code.
5010 (dup_variable) Use hash tables.
5012 * vars-prs.c: (fill_all_vars) Use hash tables.
5013 (is_dict_varname) Ditto.
5014 (parse_dict_variable) Ditto.
5016 Fri Dec 19 11:46:23 2003 Ben Pfaff <blp@gnu.org>
5018 Change value labels to use hash tables instead of AVL trees, and
5019 change value labels into an ADT.
5021 * Makefile.am: (pspp_SOURCES) Add value-labels.c, value-labels.h.
5023 * value-labels.c: New file.
5025 * value-labels.h: New file.
5027 * apply-dict.c: (cmd_apply_dictionary) Use value label ADT.
5028 Get rid of a stupid use of goto.
5030 * autorecode.c: (compare_alpha_value) Rewrite.
5031 (hash_alpha_value) Ditto.
5032 (compare_numeric_value) Rewrite.
5033 (hash_numeric_value) Ditto.
5035 * frequencies.q: (dump_full) Use value label ADT.
5037 * pfm-read.c: (read_value_label) Use value label ADT.
5039 * pfm-write.c: (write_value_labels) Use value label ADT.
5041 * sfm-read.c: (read_variables) Use value label ADT.
5042 (read_value_labels) Rewrite.
5044 * sfm-write.c: (write_value_labels) Rewrite.
5046 * sysfile-info.c: (cmd_sysfile_info) Use value label ADT.
5047 (display_variables) Ditto.
5048 (describe_variable) Ditto.
5050 * t-test.q: (print_t_groups) Use value label ADT.
5052 * temporary.c: (copy_variable) Use value label ADT.
5053 (free_dictionary) Ditto.
5055 * val-labs.c: (verify_val_labs) Use value label ADT.
5057 (debug_print) Ditto.
5058 (val_lab_cmp) Removed.
5059 (inc_ref_count) Removed.
5060 (copy_value_labels) Removed.
5062 * var.h: (struct value_label) Removed.
5063 (struct variable) Change AVL tree `val_lab' into hash table
5066 * vars-atr.c: (init_variable) Use value label ADT.
5067 (clear_variable) Ditto.
5068 (free_value_label) Removed.
5069 (free_val_lab) Removed.
5070 (get_val_lab) Removed.
5071 (compare_variables) New function.
5072 (hash_variable) New function.
5074 * vfm.c: (dump_splits) Use value label ADT.
5076 Fri Dec 19 11:18:11 2003 Ben Pfaff <blp@gnu.org>
5078 Add to the hash table interface.
5080 * hash.c: (hsh_hash_bytes) Add assertion.
5081 (hsh_hash_string) Ditto.
5085 (hsh_create) Ditto. Also make minimum `size'.
5086 (hsh_destroy) Rephrase.
5087 (sort_nulls_last) Removed.
5088 (not_null) New function.
5090 (comparison_helper) Ditto.
5091 (hsh_sort) Rewritten.
5092 (hsh_data_copy) New function.
5093 (hsh_sort_copy) Ditto.
5095 (hsh_replace) Ditto.
5096 (hsh_hash_double) Ditto.
5097 (hsh_delete) Fix stupid bug.
5099 Thu Dec 18 12:27:03 WAST 2003 John Darrington <john@darrington.wattle.id.au>
5100 * added a calculation of the mode to FREQUENCIES
5102 Wed Dec 17 12:53:01 WAST 2003 John Darrington <john@darrington.wattle.id.au>
5104 * moved (un)defs of DEBUGGING to config.h
5106 Mon Dec 15 21:35:59 2003 Ben Pfaff <blp@gnu.org>
5108 * groff-font.c: (add_kern) Fix indentation.
5109 (add_kern) Use & instead of % to take power-of-2 modulus.
5110 (font_get_kern_adjust) Likewise.
5112 Fri Dec 12 23:54:37 2003 Ben Pfaff <blp@gnu.org>
5114 * autorecode.c: (recode) Replace stupid use of memcpy() by
5116 (hash_alpha_value) Use hsh_hash_bytes(). Get rid of nasty casts.
5117 (hash_numeric_value) Ditto.
5118 (autorecode_proc_func) pool_strdup() was wrong here because the
5119 source string was not null-terminated. Use new pool_strndup()
5122 * crosstabs.q: (enum_var_values) Remove superfluous and bizarre
5123 use of hsh_iterator_init().
5125 * data-in.c: (parse_N) Initialize i->v->f.
5127 * flip.c: (cmd_flip) Use memmove(), not memcpy(), to copy
5130 * groff-font.c: Use power-of-2 hash table sizes, not prime.
5131 (groff_read_font) Don't call hsh_next_prime(). Don't call
5133 (static var hash) Remove `size_p', `max_used' members.
5134 (font_char_name_to_index) Don't call hsh_next_prime(). Use
5135 hsh_hash_string() instead of hashpjw(), & instead of %.
5136 (default_font) Don't call hsh_next_prime().
5138 * pool.c: (pool_strndup) New function.
5139 (pool_strdup) Reimplement in terms of pool_strndup.
5141 * postscript.c: (hash_font_entry) Use hsh_hash_string(). Get rid
5143 (hash_ps_encoding) Use hsh_hash_string().
5144 (hash_ps_combo) Use hsh_hash_string(), hsh_hash_int().
5145 (hash_filename2font) Use hsh_hash_string().
5147 * som.c: Add #include <stdlib.h>.
5149 * tab.c: (tab_destroy) Don't set t->container after freeing `t'
5150 (by destroying its pool).
5152 Fri Dec 12 23:18:59 2003 Ben Pfaff <blp@gnu.org>
5154 Miscellaneous hash table code cleanup:
5156 * hash.h: (struct hsh_table) Moved into hash.c.
5157 (hsh_count) Ditto, and transformed into function.
5158 (hsh_compare_func) New typedef, used for defining otherwise-long
5159 function types here and in hash.c
5160 (hsh_hash_func) Ditto.
5161 (hsh_free_func) Ditto.
5163 * hash.c: (struct hsh_table) Renamed `n' to `used', `m' to `size',
5164 `table' to `entries'. Removed `mp'. All references updated.
5165 (hsh_clear) Don't shrink entries array; if the hash was this big
5166 once, it probably will be again.
5167 (hsh_rehash) Made static.
5168 (force_hsh_insert) Renamed hsh_force_insert.
5169 (force_hsh_find) Renamed hsh_force_find.
5171 Made hash table sizes powers of 2, because that's fine with any
5172 reasonable hash function and because taking a power-of-2 modulus
5173 is faster than any other:
5175 (hsh_prime_tab) Removed;
5176 (hsh_next_prime) Ditto.
5177 (next_power_of_2) New function.
5178 (hsh_create) Use next_power_of_2.
5179 (hsh_rehash) Use & instead of %.
5181 Cleaned up hsh_sort:
5183 (internal_comparison_fn) Removed.
5184 (sort_nulls_last) New function.
5185 (hsh_sort) Removed second parameter, switched to using the new
5186 quicksort() function from quicksort.h to avoid using nasty need
5187 for static variables with qsort(). All references updated.
5189 Changed the hash functions offered, because there are better hash
5190 functions than the ones we had, and cleaned up the names to boot:
5192 * hash.c: (hashpjw_d) Removed.
5194 (hsh_hash_bytes) New function.
5195 (hsh_hash_string) New function.
5196 (hsh_hash_int) New function.
5198 Improved the hash table iteration interface:
5200 * hash.h: (hsh_iterator_init) Removed.
5201 (struct hsh_iterator) Removed `init' member, change `next' to
5204 * hash.c: (hsh_foreach) Removed. All references updated to use
5205 hsh_first/hsh_next instead.
5206 (hsh_first) New function. Notably, unlike hsh_foreach() it does
5207 not treat a null pointer as an empty hash table.
5208 (hsh_next) New function.
5210 Made deletion possible, though slow:
5212 * hash.c: (locate_matching_entry) New function.
5213 (hsh_find) Use locate_matching_entry().
5214 (hsh_delete) New function also using locate_matching_entry().
5215 (hsh_force_delete) New function.
5217 Fri Dec 12 23:16:10 2003 Ben Pfaff <blp@gnu.org>
5219 * quicksort.c: New file implementing a sort routine with a
5220 interface better than qsort() because it passes a user-provided
5221 parameter to the sort routine.
5223 * Makefile.am: Add quicksort.c, quicksort.h.
5225 Fri Dec 12 13:31:58 2003 Ben Pfaff <blp@gnu.org>
5227 * All source files: Get rid of nasty special cases for Checker,
5228 which is pretty obsolete now.
5230 Thu Dec 11 21:38:24 WST 2003 John Darrington <john@darrington.wattle.id.au>
5232 * Fixed a bug apparent when using the FREQUENCIES command with the
5233 html driver. The html driver was incorrectly trying to display
5236 Sun Jan 2 21:40:13 2000 Ben Pfaff <blp@gnu.org>
5238 * Makefile.am: Reorganized. Put locale dir in version.c instead
5239 of passing it to each compile command. Only put local gmp libs in
5240 LD_ADD if not installed on system. Remove `boast' target.
5242 * All source files: struct and union typedefs eliminated.
5243 `sizeof type' replaced by `sizeof object' where practical. Moved
5244 `unused' qualifiers from start to end of declarations for gcc
5245 2.7.2 compatibility. Change `while (1)' to `for (;;)'. Made
5246 assertions on pointers strictly compliant. Removed _ prefixes on
5247 some function parameter names.
5249 * alloc.c: New source file, containing these external linkage
5250 functions removed from common.c: xmalloc, xcalloc, xrealloc,
5257 * ascii.c: Migrated from arenas to pools.
5258 (struct ascii_driver_ext) ops[], box[], fonts[] changed from
5259 c_string to len_string. All references changed.
5260 (ascii_option) Signature changed to comply to new output.c
5262 (count_fancy_chars) Removed.
5263 (delineate) Removed support for rich text.
5264 (ascii_text_metrics) Ditto.
5266 (output_shorts) Change `box', `off', `on' from c_string to
5267 len_string. Change `remaining' from int to size_t.
5268 (ascii_close_page) Make page numbering less haphazard.
5270 * autorecode.c: Migrate from arenas to pools.
5272 * avl.c: Migrate from arenas to pools. Synch from libavl 1.4.0.
5274 * bitvector.h: New file containing these macros from misc.h:
5275 SET_BIT, CLEAR_BIT, SET_BIT_TO, TEST_BIT, BIT_INDEX.
5277 * command.c: (struct command) cmd1, cmd2, cmd3 members changed to
5278 word[3]. ncmd removed.
5279 (var empty_string) Removed.
5280 (var cmd_table) Declaration updated.
5281 (var cmdtab) Removed.
5282 (cmp_command) Removed.
5283 (split_words) Rewritten to use strtok_r().
5284 (init_cmd_parser) Renamed cmd_init(). Rewritten.
5285 (find_command) Removed.
5286 (FILE_TYPE_okay) Rewritten.
5287 (cmd_parse) Rewritten. Semantics of the return value of command
5288 handlers has changed: they must now return one of the new CMD_*
5289 enumerals, rather than a magic value. This meant that all
5290 commands had to be modified, and they were.
5291 (figure_out_command) New function.
5293 * command.def: Add CORRELATIONS, PEARSON CORRELATIONS. Add
5294 #defines for INIT, INPU, etc.
5296 * command.h: New CMD_* enum series.
5297 (cur_proc) Make const char *, not char *.
5298 (cmd_init) Prototype.
5301 * common.c: Removed.
5303 * common.h: Removed.
5305 * correlations.q: New file.
5307 * crosstabs.q: Migrate from arenas to pools. Migrate to new-style
5309 (custom_tables) Renamed crs_custom_tables().
5310 (custom_variables) Renamed crs_custom_variables().
5311 (calc_integer) Add in some `const' qualifiers.
5312 (table_value_missing) Change from a_string to len_string.
5313 (float_M_suffix) Change from a_string to len_string.
5315 * data-in.c: Rewritten. All references to
5316 parse_string_as_format() changed to data_in().
5318 * data-in.h: New file.
5320 * data-list.c: Change DLS_* from #define's to enums. Move from
5321 rpd_msg() to tmsg().
5322 (RPD_ERR) New #define.
5323 (do_reading) Change dfm_push_cust() to dfm_push(), pop_cust() to
5325 (read_from_data_list_fixed) Change from old
5326 parse_string_as_format() to new data_in().
5327 (read_from_data_list_free) Ditto.
5328 (read_from_data_list_list) Ditto.
5329 (cmd_repeating_data) Modify approach to checking for end of
5332 (rpd_parse_record) Change from old parse_string_as_format() to new
5333 data_in(). Change from old convert_format_to_string() to new
5335 (read_one_set_of_repetitions) Change dfm_push_cust() to
5336 dfm_push(), pop_cust() to dfm_pop().
5338 * data-out.c: Rewritten. All references to
5339 convert_format_to_string() changed to data_out().
5341 * descript.q: Migrate to new q2c.
5342 (cmd_descriptives) Removed.
5343 (internal_cmd_descriptives) Renamed cmd_descriptives ().
5344 (custom_variables) Renamed dsc_custom_variables().
5346 * dfm.c: (struct dfm_fhuser_ext) `ln' removed. All references
5348 (open_file_r) Initialize h->where.line_number. Migrate to new
5350 (open_file_w) Initialize h->where.line_number.
5351 (read_record) Change from ext->ln to h->where.line_number.
5352 Migrate to struct string.
5353 (dfm_put_record) Rephrased.
5354 (dfm_push_cust) Renamed dfm_push(), rewritten.
5355 (dfm_pop) New function.
5357 * error.c: All references updated.
5358 (glob var error_count) Renamed err_err_count.
5359 (glob var warning_count) Renamed err_warning_count.
5360 (glob var error_already_flagged) Renamed err_already_flagged.
5361 (glob var verbosity) Renamed err_verbosity.
5362 (glob var cust_fn) Removed.
5363 (glob var cust_ln) Removed.
5364 (static var file_loc) New.
5365 (static var nfile_loc) New.
5366 (static var mfile_loc) New.
5367 (tmsg) New function.
5368 (push_cust) Removed.
5371 (static var terminating) Removed.
5372 (failure) Renamed err_failure().
5373 (hcf) Renamed err_hcf().
5374 (err_push_file_locator) New function.
5375 (err_pop_file_locator) New function.
5376 (err_location) New function.
5377 (check_error_count) Renamed err_check_count().
5378 (vmsg) Renamed err_vmsg(). Interface changed.
5379 (verbose_msg) Removed.
5380 (err_cond_fail) New function.
5381 (error_break) Renamed err_break().
5383 * error.h: All references updated.
5384 (enum MSG_CLASS_COUNT) Renamed ERR_CLASS_COUNT.
5385 (enum ERR_CLASS_MASK, ERR_VERBOSITY_SHIFT, ERR_VERBOSITY_MASK)
5387 (struct file_locator) New.
5389 (macro verbose_msg) Removed.
5390 (macro cond_fail) Removed.
5392 * expr-opt.c: (evaluate_tree) sizeof(char) == 1.
5394 * expr-prs.c: Reorganized. All references updated.
5395 (exprtypename) Renamed expr_type_name().
5396 (typename) Renamed type_name().
5397 (free_expression) Renamed expr_free().
5398 (parse_expression) Renamed expr_parse(). Uses new type_check()
5400 (init_functab) Renamed init_func_tab().
5401 (type_check) New function.
5402 (parse_or) Rewritten to use new allocate_nonterminal() and
5403 append_nonterminal_arg() functions.
5406 (parse_rel) Ditto. Also simplified logic.
5411 (SYSMIS_func) Ditto.
5412 (VALUE_func) Rephrased.
5413 (CONCAT_func) Fix memory leak by replacing free by free_node on
5415 (generic_str_func) Ditto.
5416 (parse_function) Ditto. Also rephrasings. Uses bsearch() to find
5418 (allocate_nonterminal) New function.
5419 (append_nonterminal_arg) New function.
5420 (static func_tab[]) Now at file level.
5422 (init_func_tab) Moved. Now just uses qsort() to sort func_tab[].
5424 * expr.h: (enum series OP_*) Moved to exprP.h.
5425 (OP_* defines) Ditto.
5426 (struct op_desc) Ditto.
5427 (global ops[]) Ditto.
5428 (struct num_con_node) Ditto.
5429 (struct str_con_node) Ditto.
5430 (struct var_node) Ditto.
5431 (struct lag_node) Ditto.
5432 (struct casenum_node) Ditto.
5433 (struct nonterm_node) Ditto.
5434 (union any_node) Members renamed.
5435 (struct sys_node) Removed.
5436 (struct val_node) Removed.
5437 (operator typedef) Removed.
5438 (typedef exprtype) Removed.
5439 (enum series EX_*) Moved to exprP.h.
5440 (struct expression) Ditto. Also renamed a lot of the members.
5441 (PXP_* defines) Changed to enums.
5442 (free_node prototype) Moved to exprP.h.
5444 * file-handle.h: (struct file_handle) New member `where'.
5446 * file-handle.q: Migrated to new q2c format.
5447 (prepend_current_directory) Removed (dead code).
5448 (cmd_file_handle) Incorporated all of internal_cmd_file_handle().
5449 (fh_get_handle_by_filename) Removed dead code.
5450 Set new `where' member.
5452 * file-type.c: (file_type_source_read) References to
5453 parse_string_as_format() changed to data_in().
5454 dfm_push_cust()/pop_cust() changed to dfm_push()/dfm_pop().
5456 * filename.c: All references updated.
5457 (init_filename) Renamed fn_init().
5458 (expand_line) Removed.
5459 (macro EXPAND_LINE) Removed.
5460 (interp_vars) Renamed fn_interp_vars(). Now uses st_*() instead
5461 of custom functions.
5462 (gnu_getcwd) Renamed fn_get_cwd(), rewritten.
5463 (tilde_expand) Renamed fn_tilde_expand(), uses ds_*().
5464 (normalize_filename) Renamed fn_normalize().
5465 (search_path) Renamed fn_search_path(), rewritten.
5466 (prepend_dir) Renamed fn_prepend_dir().
5467 (blp_getenv) Renamed fn_getenv().
5468 (blp_dirname) Renamed fn_dirname().
5469 (fn_basename) New function, not used.
5470 (absolute_filename_p) Renamed fn_absolute_p().
5471 (is_special_filename) Renamed fn_special_p().
5472 (file_exists) Renamed fn_exists_p().
5473 (readlink_malloc) Renamed fn_readlink().
5474 (getenv_default) Renamed fn_getenv_default().
5475 (open_file) Renamed fn_open().
5476 (close_file) Renamed fn_close().
5477 (open_file_ext) Renamed fn_open_ext().
5478 (close_file_ext) Renamed fn_close_ext().
5480 * font.h: Migrate from arenas to pools.
5482 * format.c: (parse_format_specifier_name) Deal with ds_* strings.
5484 * frequencies.g: Migrate from arenas to pools.
5486 * frequencies.q: Migrate to new q2c version. Migrate from arenas
5489 * getline.c: All references updated.
5490 (global getl_buf) Changed from char * to struct string.
5491 (static getl_include_path) Ditto.
5492 (global getl_buf_len) Removed.
5493 (global getl_buf_size) Removed.
5494 (getl_include_path) Deal with new getl_buf, getl_include_path.
5495 (getl_uninitialize) New function.
5496 (getl_get_current_directory) Rewritten.
5497 (getl_clear_include_path) Rewritten.
5498 (getl_add_include_dir) Rewritten.
5499 (getl_add_file) Assertion fixed.
5500 (getl_add_virtual_file) Change initial value of `remaining_loops'
5502 (welcome) Rewritten.
5503 (handle_line_buffer) Make static. Change logic to make
5504 getl_add_virtual_file() change sensible. Use ds_*() strings.
5505 (getl_read_line) Use ds_*() strings. Implement SET ECHO.
5506 (getl_close_file) Moved.
5507 (getl_location) New function.
5509 * getline.h: All references updated.
5510 (macro curln) Removed.
5511 (macro curfn) Removed.
5512 (macro am_interactive) Renamed getl_am_interactive.
5513 (macro am_reading_script) Renamed getl_reading_script.
5515 * glob.c: (global fmt_parse_ignore_error) Removed.
5516 (init_glob) Use locale_dir not LOCALEDIR. Use feholdexcept() on
5517 systems that support it (C99). Turn off SET ECHO by default. No
5518 necessary julcal initialization anymore.
5520 * groff-font.c: Migrate from arenas to pools.
5521 (groff_read_font) Use err_push_file_locator().
5522 (groff_read_DESC) Ditto.
5523 (font_msg) Use tmsg().
5525 * hash.c: (hsh_sort) Fix debug code.
5526 [GLOBAL_DEBUGGING] Include stdio.h.
5528 * hash.h: (macro force_hsh_insert) Rephrase.
5530 * heap.c: Rewritten.
5532 * heap.h: Rewritten.
5534 * html.c: (html_option) Change from outp_value to struct string.
5535 (postopen) Change from curfn to getl_location().
5536 (escape_string) Remove rich-text code. Signature changed.
5537 (output_tab_table) Switch from a_string to struct len_string.
5538 Remove rich text support.
5540 * lexer.c: All references updated. Largely rewritten. Major
5541 changes listed below. Removed tagged quote support. Adapted to
5542 struct string tokstr.
5543 (global tokstr) Changed to struct string.
5544 (global tokstr_size) Removed.
5545 (global tokstr_len) Removed.
5547 (global tokint) Removed.
5548 (global toklongstr) Removed.
5549 (C* defines) Removed.
5550 (static tbl[]) Removed.
5551 (static id[]) Removed.
5552 (static une[]) Removed.
5553 (discard_line) Renamed lex_discard_line().
5554 (get_entire_line) Renamed lex_entire_line().
5555 (get_rest_of_line) Renamed lex_rest_of_line().
5556 (get_dotted_rest_of_line) Merged into lex_rest_of_line().
5557 (make_hexit) Removed.
5558 (syntax_error) Renamed lex_error(). Return value removed.
5559 (get_token_representation) Renamed lex_token_representation().
5560 (putback) Renamed lex_put_back().
5561 (putfwd) Renamed lex_put_forward().
5562 (convert_negative_to_dash) Renamed lex_negative_to_dash().
5563 (set_prog) Renamed lex_set_prog().
5564 (init_lex) Renamed lex_init().
5565 (reset_eof) Renamed lex_reset_eof().
5566 (lookahead) Renamed lex_look_ahead().
5567 (check_id) Rewritten.
5568 (yylex) Renamed lex_get(), rewritten.
5569 (lex_end_of_command) New function. Many commands were rephrased
5571 (lex_integer_p) New function. Replaces compare of tokint against
5573 (lex_integer) New function. Replaces tokint.
5574 (match_tok) Renamed lex_match().
5575 (match_id) Renamed lex_match_id().
5576 (match_int) Renamed lex_match_int().
5577 (force_match_id) Renamed lex_force_match_id(), added return value.
5578 (force_match) Renamed lex_force_match(), added return value.
5579 (force_string) Renamed lex_force_string(), added return value.
5580 (force_int) Renamed lex_force_int(), added return value.
5581 (lex_id_match_len) New function.
5582 (id_match) Renamed lex_id_match(), rewritten.
5583 (get_line) Renamed lex_get_line().
5584 (preprocess_line) Renamed lex_preprocess_line().
5585 (tokname) Renamed lex_token_name().
5586 (bin_value_func) Removed.
5587 (oct_value_func) Removed.
5588 (hex_value_func) Removed.
5589 (unexpected_eof) New function.
5590 (convert_numeric_string_to_char_string) New function.
5591 (parse_string) Rewritten, signature changed.
5592 (add_tokstr_char) Removed.
5593 (add_tokstr_unsigned) Removed.
5594 (add_tokstr_string) Removed.
5595 (parse_tagged_quote) Removed.
5596 (skip_comment) Renamed lex_skip_comment().
5598 * lexer.h: All references updated.
5599 (macro is_id1) Renamed CHAR_IS_ID1.
5600 (macro is_idn) Renamed CHAR_IS_IDN.
5601 (token names ID, NUM, STRING, STOP, ... WITH, EXP) Renamed with
5602 prefix T_: T_ID, T_NUM, T_STRING, T_STOP, ... T_WITH, T_EXP.
5603 (macro get_token) Removed.
5604 (macro id_match) Removed.
5605 (macro force_match_id) Removed.
5606 (macro force_match) Removed.
5607 (macro force_string) Removed.
5608 (macro force_int) Removed.
5609 (macro force_num) Removed.
5610 (macro force_id) Removed.
5612 * lexerP.h: Removed.
5614 * list.q: Migrated to new q2c format.
5615 (write_line) Deal with struct len_string.
5616 (write_varname) Ditto.
5617 (write_fallback_headers) Ditto.
5619 * magic.c: New file, incorporating the following global variables
5620 previously in other files: endian, second_lowest_value. And both
5621 of those are conditional on #define's.
5623 * magic.h: New file, incorporating the following global variable
5624 declarations: endian, second_lowest_value, and the following macro
5625 declarations: NOT_DOUBLE, NOT_LONG, NOT_INT.
5627 * main.c: Added declarations of pgmname, finished, curdate,
5629 (main) Call new parse_script() function.
5630 (parse_script) New function.
5631 (execute_command) New function.
5632 (dump_token) Removed.
5633 (handle_error) New function.
5635 * matrix.c: New file.
5637 * matrix.h: New file.
5639 * matrix-data.c: Migrated from arenas to pools.
5640 (mget_token) Change from parse_string_as_format() to data_in().
5642 * means.q: Migrate to new q2c.
5643 (custom_tables) Renamed mns_custom_tables().
5644 (custom_crossbreak) Renamed mns_custom_crossbreak().
5645 (custom_variables) Renamed mns_custom_variables().
5647 * mis-val.c: (static var width) Changed from `int' to `size_t'.
5648 (parse_varnames) Prototype.
5649 (parse_numeric) Rephrasings.
5650 (parse_alpha) Adapt to new struct string tokstr.
5652 * misc.c: (intlog10) Rewritten.
5654 (ansi_rand) Renamed real_rand(), moved into random.c.
5655 (ansi_srand) Renamed real_srand(), moved into random.c.
5656 (setup_randomize) Moved to random.c.
5657 (rand_uniform) Ditto.
5658 (rand_normal) Ditto.
5659 (rand_simple) Ditto.
5660 (get_config_line) Removed.
5661 (reverse) Removed (dead code).
5663 * misc.h: (macro SET_BIT) Moved to bitvector.h.
5664 (macro CLEAR_BIT) Ditto.
5665 (macro TEST_BIT) Ditto.
5666 (macro SET_BIT_TO) Ditto.
5667 (macro BIT_INDEX) Ditto.
5669 * output.c: (outp_read_devices) Move to err_push_file_locator()
5670 from push_cust(). Use struct string.
5671 (expand_op_tokstr) Removed.
5672 (static var op_tokstr) Changed to struct string.
5673 (static var op_tokstr_size) Removed.
5674 (tokener) Rephrasings. Use struct string.
5675 (parse_options) Use struct string.
5676 (destroy_driver) Fix assertion.
5677 (outp_get_paper_size) Move to err_push_file_locator().
5678 [0] Removed dead code.
5679 (outp_string_width) Move to len_string.
5681 * output.h: Comment fixes.
5682 (TAG_* enum series) Removed.
5683 (struct outp_value) Removed.
5684 (enum OUTP_T_FANCY) Removed.
5685 (struct outp_text) `s' changed from a_string to len_string.
5686 (struct outp_class) `option' change arg 3 from outp_value to
5689 * pfm-read.c: (corrupt_msg) Rewritten.
5691 * pfm-write.c: (bufwrite) Fix assertion.
5693 * pool.c: New file, reference version.
5695 * pool.h: New file, reference version.
5697 * postscript.c: (ps_font_sizes) Fix assertion.
5698 (ps_option) Change arg 3 from outp_value to struct string.
5699 Adapt to struct string.
5700 (macro output_line) Removed.
5701 (macro add_string) Removed.
5702 (output_encodings) Adapted to struct string. Moved to
5703 err_push_file_locator().
5704 (find_encoding_file) Fix assertion.
5705 (read_ps_encodings) Move to err_push_file_locator().
5706 (postopen) Use getl_location() instead of curfn.
5707 (out_text_plain) Move to len_string.
5708 (text) Ditto. Remove rich text support.
5710 * print.c: (cmd_print) Remove now-unneeded resource cleanup code.
5711 (cmd_print_eject) Ditto.
5713 (internal_cmd_print) Now cleans up after itself. Uses
5714 fh_parse_file_handle() now.
5715 (cmd_print_space) Use PXP_NUMERIC to type-check.
5717 * q2c.c: Overhauled. Removed _("") i18n support. All references
5718 updated. All output functions updated to handle structures rather
5719 than local or static variables. Adapt to new PSPP lex_*()
5723 (macro MAX_N_SBC) Removed.
5724 (global bare) Removed.
5725 (enum STRING) Renamed T_STRING.
5726 (enum ID) Renamed T_ID.
5727 (get_buffer) Buffer size increased.
5728 (strlower) Renamed st_lower(), rephrased.
5729 (strupper) Renamed st_upper(), rephrased.
5730 (skip_ws) New function.
5731 (get_line) Don't special-case any types of lines (like those
5732 beginning with ! or $, for instance).
5733 (get_token) Renamed lex_get(). Rephrased.
5734 (static var `prefix') New.
5735 (parse) New function.
5736 (parse_setting) Minor rephrasing.
5737 (dump_specifier_vars) Ditto.
5738 (make_identifier) Put null terminator on identifier, duh.
5739 (dump_vars) Renamed dump_declarations(). Never indent. Never
5740 static. Output changed entirely.
5741 (dump_specifier_init) Rephrase.
5742 (dump_vars_init) No index variable needed. Other modifications.
5743 (dump_parser) Don't parse command name. Do dump functions instead
5744 of just code fragments.
5745 (dump_free) Dump function instead of code fragment.
5746 (recognize_directive) New function.
5747 (main) Use recognize_directive(). Don't rely on magic $ line
5748 beginning: instead, parse comments. Update list of headers.
5750 * random.c: New file, containing the following functions:
5751 real_rand(), real_srand(), setup_randomize, shuffle, rand_uniform,
5752 rand_normal, rand_simple.
5754 * random.h: New file.
5756 * recode.c: (cmd_recode) Merge internal_cmd_recode() into this
5757 function. `max_src_width', `max_dst_width' changed to size_t.
5758 (internal_cmd_recode) Removed.
5759 (parse_dest_spec) Merge similar cases.
5760 (parse_src_spec) Add assertion.
5762 * repeat.c: (recognize_keyword) New function.
5763 (internal_cmd_do_repeat) Parse and handle PRINT keyword on END
5764 REPEAT. Improve recognition of END REPEAT (use
5765 recognize_keyword()). Move from curfn to getl_location(). Use
5768 (perform_DO_REPEAT_substitutions) Adapt to struct string.
5770 * set.q: Adapt to new q2c.
5771 (cmd_set) Range-check some values better.
5772 (custom_blanks) Renamed stc_custom_blanks().
5773 (custom_length) Renamed stc_custom_length().
5774 (custom_results) Renamed stc_custom_results().
5775 (custom_seed) Renamed stc_custom_seed().
5776 (custom_width) Renamed stc_custom_width().
5777 (custom_format) Renamed stc_custom_format().
5778 (custom_journal) Renamed stc_custom_journal().
5779 (custom_color) Renamed stc_custom_color().
5780 (custom_listing) Renamed stc_custom_listing().
5781 (custom_disk) Renamed stc_custom_disk().
5782 (custom_log) Renamed stc_custom_log().
5783 (custom_rcolor) Renamed stc_custom_rcolor().
5784 (custom_viewlength) Renamed stc_custom_viewlength().
5785 (custom_workdev) Renamed stc_custom_workdev().
5787 * settings.h: Not necessary to include format.h any longer.
5789 * sfm-read.h: (macro bswap_int32) Moved here from sfmP.h.
5790 (corrupt_msg) Rewritten.
5792 * sort.c: Adapt to rewritten heap ADT.
5794 * str.c: (aa_strcpy) Removed.
5795 (ab_strcpy) Removed.
5796 (ac_strcpy) Removed.
5797 (ba_strcpy) Removed.
5798 (bb_strcpy) Removed.
5799 (ca_strcpy) Removed.
5800 (aa_strdup) Removed.
5801 (aa_strdupcpy) Removed.
5802 (ba_strdup) Removed.
5803 (sa_strdup) Removed.
5804 (memrev) Renamed mm_reverse().
5805 (memrmem) Renamed mm_find_reverse().
5806 (cmp_str) Renamed st_compare_pad().
5807 (strmaxcpy) Removed.
5808 (strbarepadcpy) Renamed st_bare_pad_copy(), signature changed.
5809 (strbarepadlencpy) Renamed st_bare_pad_len_copy(), signature
5811 (strpadcpy) Renamed st_pad_copy(), signature changed.
5812 (blpstrset) Removed.
5813 (ds_create) New function.
5814 (ds_init) New function.
5815 (ds_replace) New function.
5816 (ds_destroy) New function.
5817 (ds_clear) New function.
5818 (ds_extend) New function.
5819 (ds_shrink) New function.
5820 (ds_truncate) New function.
5821 (ds_length) New function.
5822 (ds_size) New function.
5823 (ds_value) New function.
5824 (ds_end) New function.
5825 (ds_concat) New function.
5826 (ds_concat_buffer) New function.
5827 (ds_printf) New function.
5828 (ds_putchar) New function.
5829 (ds_getline) New function.
5830 (ds_get_config_line) New function derived from the old
5831 misc.c:get_config_line().
5832 (ls_create) New function.
5833 (ls_create_buffer) New function.
5834 (ls_init) New function.
5835 (ls_shallow_copy) New function.
5836 (ls_destroy) New function.
5837 (ls_null) New function.
5838 (ls_null_p) New function.
5839 (ls_empty_p) New function.
5840 (ls_length) New function.
5841 (ls_value) New function.
5842 (ls_end) New function.
5844 * str.h: Reformatted.
5845 (struct a_string) Removed.
5846 (struct b_string) Removed.
5847 (struct c_string) Removed.
5848 (struct len_string) New.
5849 (struct string) New.
5850 (macro as_streq) Removed.
5851 (macro bs_streq) Removed.
5852 (macro cs_streq) Removed.
5853 (macro sa_streq) Removed.
5854 (macro sb_streq) Removed.
5855 [__GNUC__] (inline function ds_putchar) New function.
5856 [__GNUC__] (inline function ds_length) New function.
5857 [__GNUC__] (inline function ds_value) New function.
5858 [__GNUC__] (inline function ds_end) New function.
5860 * sysfile-info.c: (cmd_sysfile_info) Rephrased.
5861 (display_vectors) Fix missing i18n.
5863 * t-test.q: Migrate to new q2c.
5865 * tab.c: Migrate from arenas to pools.
5866 (tab_create) Use struct len_string.
5867 (tab_realloc) Ditto.
5868 (text_format) Ditto.
5869 (tab_joint_text) Ditto.
5870 (tab_natural_width) Remove rich text support.
5871 (tab_natural_height) Ditto.
5872 (tab_output_text) Handle TAT_FIX.
5873 (tab_raw) Change arg from a_string to len_string.
5874 (tabi_driver) Fix assertion. Use struct len_string.
5875 (render_strip) Use struct len_string. Remove rich text support.
5876 Add `const' qualifiers.
5878 * tab.h: (enum TAB_RICH) Remove.
5879 (enums TAB_COL_NONE, TAB_COL_DONE) New. Where appropriate,
5880 SOM_COL_* updated to read TAB_COL_*.
5881 (struct tab_table) Change arena to pool. Change a_string to
5884 * temporary.c: (restore_dictionary) Rewrite Checker code.
5886 * var.h: (macros MAX_SHORT_STRING, MIN_LONG_STRING, SYSMIS,
5887 LOWEST, HIGHEST) Moved here from common.h.
5888 (typedef any_trns) Removed. All references changed to `struct
5891 * vars-atr.c: (force_create_variable) Fix assertion.
5892 (force_dup_variable) Fix assertion.
5894 Thu Jun 3 18:40:42 1999 Ben Pfaff <blp@gnu.org>
5896 Using alphanumeric variables in functions under AGGREGATE
5897 segfaulted. Fixed. Thanks to Dr. Dirk Melcher
5898 <BZN-mdksh@t-online.de> for reporting this bug.
5900 * aggregate.c: (parse_aggregate_functions) When setting the
5901 FSTRING bit, also allocate memory for the `string' member of
5903 (free_aggregate_functions) Free iter->string. Don't use the
5904 non-function bits when indexing the array of functions.
5905 [DEBUGGING] (debug_print) Don't use the non-function bits when
5906 indexing the array of functions.
5908 Sun May 30 00:00:54 1999 Ben Pfaff <blp@gnu.org>
5910 Under certain circumstances, the final case would be omitted from
5911 the results of an AGGREGATE operation. Fixed. Thanks to Dr. Dirk
5912 Melcher <BZN-mdksh@t-online.de> for reporting this bug.
5914 * aggregate.c (agr_00x_end_func): Increment number of cases in
5915 sink before writing case. For streams that keep track of how many
5916 cases there are based on this value, this means that the last case
5917 will be read in on the next stream read.
5919 Sat May 29 22:03:31 1999 Ben Pfaff <blp@gnu.org>
5921 Undefined behavior was invoked by referencing a freed pointer.
5923 * vfm.c (memory_stream_write): Free pointer *after* checking for
5926 Sat May 29 22:02:22 1999 Ben Pfaff <blp@gnu.org>
5928 A wrong record size was displayed when paging the active file to
5931 * vfm.c: (memory_stream_write) Fix off-by-one error.
5933 Sat May 29 21:50:26 1999 Ben Pfaff <blp@gnu.org>
5935 Not having enough temporary space for sorting caused a core dump.
5938 * sort.c: (allocate_cases) Initialize i.
5940 Sat May 29 21:40:54 1999 Ben Pfaff <blp@gnu.org>
5942 Syntax errors in function descriptions on AGGREGATE caused core
5945 * aggregate.c (cmd_aggregate): Don't free agr_dict after calling
5946 free_aggregate_functions(), since that function already frees
5949 Sat May 29 21:06:10 1999 Ben Pfaff <blp@gnu.org>
5951 A null pointer was dereferenced, causing a core dump, when
5952 PERCENTILES was specified on FREQUENCIES. This fixes the problem,
5953 but PSPP still doesn't calculate percentiles. Thanks to Regnor
5954 Jernsletten <rjernsle@eunet.no> for reporting this problem.
5956 * arena.c: (arena_malloc) If the arena hasn't been initialized
5957 already, initialize it.
5959 Sat May 29 20:47:29 1999 Ben Pfaff <blp@gnu.org>
5961 * Makefile.cygwin: New file supplied by Hankin <hankin@dunno.com>
5962 for compilation with Cygnus Windows B20. Not used by other
5965 Sat May 29 20:36:04 1999 Ben Pfaff <blp@gnu.org>
5967 SORT always sorted in ascending order. Fixed. Thanks to Dr. Dirk
5968 Melcher <BZN-mdksh@t-online.de> for reporting this bug.
5970 * sort.c: (compare_case_lists) Reverse sense of comparison if
5971 sorting in descending order.
5972 (compare_record) Ditto.
5974 Tue Mar 9 13:18:54 1999 Ben Pfaff <blp@gnu.org>
5976 SPLIT FILE with a string variable caused a core dump. Fixed.
5978 * vfm.c: If the variable is a string then make a temporary value
5979 struct pointing to it. The underlying problem is a lot bigger
5980 than this (see TODO) but this is a stopgap for the simple case at
5983 Tue Mar 9 13:15:53 1999 Ben Pfaff <blp@gnu.org>
5985 Nested INCLUDEs didn't work. Fixed.
5987 * getline.c: (getl_include) Set first_line to NULL in allocated
5990 Tue Mar 9 13:13:46 1999 Ben Pfaff <blp@gnu.org>
5992 The MATCH FILES procedure set the values of variables not present
5993 to 0. It should have been SYSMIS. This is now fixed.
5995 * get.c: (mtf_delete_file_in_place) Replace 0.0 by SYSMIS.
5997 Tue Mar 9 12:52:23 1999 Ben Pfaff <blp@gnu.org>
5999 The REMARK command was too aggressive about skipping lines. It
6000 didn't like being the last command in a file.
6002 * command.c: (cmd_remark) Call get_entire_line() instead of
6005 Tue Mar 9 12:48:05 1999 Ben Pfaff <blp@gnu.org>
6007 Comment parsing wasn't consistent with the rest of the code in its
6008 idea of where one command ends and another starts. This meant
6009 that sometimes commands would be mysteriously ignored. Thanks to
6010 Dr. Dirk Melcher <BZN-mdksh@t-online.de> for reporting this bug.
6012 * command.c: (parse_cmd) Hand off comment parsing to new function
6013 skip_comment() in lexer.c.
6014 * lexer.c: (skip_comment) New function.
6016 Wed Jan 20 20:22:07 1999 Ben Pfaff <blp@gnu.org>
6018 The TABLE subcommand on MATCH FILES worked only erratically at
6019 best. This fixes it. Thanks to Dr. Dirk Melcher
6020 <BZN-mdksh@t-online.de> for reporting this bug.
6022 * get.c: (mtf_compare_BY_values) When comparing string values, a
6023 difference of 1 is still a difference :-)
6024 (mtf_processing) Inverted TABLE reading logic fixed. Also don't
6025 advance TABLE files automatically when matched. Comment fixes.
6027 Tue Jan 19 22:32:31 1999 Ben Pfaff <blp@gnu.org>
6029 VARIABLE LABELS rejected a slash before the first variable
6030 specification, contradicting the documentation. Thanks to Walter
6031 M. Gray <graywm@northernc.on.ca> for reporting this bug.
6033 * var-labs.c: (cmd_variable_labels) Ignore a leading slash in
6034 command specification.
6036 Tue Jan 19 22:29:54 1999 Ben Pfaff <blp@gnu.org>
6038 Because of an incorrect optimization in memory allocation,
6039 CROSSTABS sometimes segfaulted when asked to output multiple
6040 tables. Thanks to Walter M. Gray <graywm@northernc.on.ca> for
6043 * crosstabs.q: (postcalc) New variables maxcols, maxcells, which
6044 are passed to output_pivot_table() for its use.
6045 (output_pivot_table) Instead of assuming the number of columns is
6046 constant, keep track with maxcols. In general mode, use maxcells
6047 to determine whether more matrix cells need to be allocated.
6049 Tue Jan 19 22:27:46 1999 Ben Pfaff <blp@gnu.org>
6051 CROSSTABS didn't display value labels for column and row
6052 variables. Thanks to Walter M. Gray <graywm@northernc.on.ca> for
6055 * crosstabs.q: (table_value_missing) If the specified value has a
6056 value label for this variable, then show it instead of the raw
6058 (display_dimensions) Delegate display of value_labels to
6059 table_value_missing.
6061 Mon Jan 18 20:04:06 1999 Ben Pfaff <blp@gnu.org>
6063 WRITE didn't write line ends. Fixed. Thanks to Dr. Dirk Melcher
6064 <BZN-mdksh@t-online.de> for reporting this bug.
6066 * print.c: (print_trns_proc) Write (CR/)LF if PRINT is used _or_
6067 if the file isn't declared as binary.
6069 Mon Jan 18 19:56:45 1999 Ben Pfaff <blp@gnu.org>
6071 MATCH FILES corrupted memory and dumped core on some syntax
6074 * get.c: (cmd_match_files) Set file->handle to NULL before
6076 (mtf_free_file) Don't free a null dictionary.
6078 Mon Jan 18 19:27:57 1999 Ben Pfaff <blp@gnu.org>
6080 MATCH FILES should set numeric values not available to the
6081 system-missing value, not to 0. Thanks to Dr. Dirk Melcher
6082 <BZN-mdksh@t-online.de> for reporting this bug.
6084 * get.c: (mtf_processing) Set unused records to system-missing,
6087 Mon Jan 18 15:06:46 1999 Ben Pfaff <blp@gnu.org>
6089 KEEP didn't work properly on the SAVE procedure. Fixed. Thanks
6090 to Ralf Geschke <ralf@kuerbis.org> for reporting this bug.
6092 * temporary.c: (save_dictionary) Initialize var_by_name AVL tree
6093 in newly created dictionary, and add each copied variable to the
6096 Mon Jan 18 15:04:48 1999 Ben Pfaff <blp@gnu.org>
6100 * get.c: (trim_dictionary) Free variable list for KEEP after
6103 Mon Jan 18 12:57:36 1999 Ben Pfaff <blp@gnu.org>
6105 Some systems didn't like the way open_file was coded. Thanks to
6106 Hankin <hankin@rogue.consultco.com> for pointing this out.
6108 * filename.c: (open_file) Don't try to store stdin, stdout,
6109 stderr as part of an array, because that doesn't always work.
6111 Mon Jan 18 12:53:27 1999 Ben Pfaff <blp@gnu.org>
6113 The SAVE procedure didn't save long string variables properly.
6114 Fixed by this patch. Thanks to Hankin
6115 <hankin@rogue.consultco.com> for this patch.
6117 * sfm-write.c: (write_variable) Fix off-by-one error in writing
6118 out variable pad records.
6120 Tue Jan 5 14:29:27 1999 Ben Pfaff <blp@gnu.org>
6122 Previously, if PRINT SPACE were given a negative argument, it
6123 would report an error, then spin in an (almost) infinite loop.
6124 This fixes that behavior.
6126 * print.c: (print_space_trns_proc) After reporting a negative
6127 argument, set number of lines to print to 1.
6129 Tue Jan 5 13:59:55 1999 Ben Pfaff <blp@gnu.org>
6131 SPSS 8.0 outputs some new record types in its system files, and it
6132 allows longer value labels. Accept these system files.
6134 * sfm-read.c: (sfm_read_dictionary) Ignore record type 7 subtype
6135 11 emitted by SPSS 8.0.
6137 Tue Jan 5 13:55:50 1999 Ben Pfaff <blp@gnu.org>
6139 The LIST procedure was too conservative in allocating space for
6140 buffers, which caused a bug that only showed up with very long
6141 output variables. Thanks to Hankin <hankin@dunno.com> for this
6144 * list.q: (determine_layout) Allocate 1022 bytes instead of 256.
6146 Tue Jan 5 13:34:34 1999 Ben Pfaff <blp@gnu.org>
6148 Typo meant string format specifiers weren't checked properly. I
6149 think that Hankin <hankin@dunno.com> sent me this report, but I'm
6150 willing to be corrected on this point.
6152 * format.c: (check_string_specifier) Fix obvious typo.
6154 Tue Jan 5 12:50:42 1999 Ben Pfaff <blp@gnu.org>
6156 Using $CASENUM in an expression didn't work. Here's a fix.
6157 Thanks to Dirk Melcher <BZN-mdksh@t-online.de> for reporting this
6160 * expr-evl.c: (evaluate_expression) Add OP_CASENUM case.
6162 * expr-opt.c: (dump_node) OP_CASENUM is acceptable.
6164 Tue Jan 5 12:47:48 1999 Ben Pfaff <blp@gnu.org>
6166 The changes in 0.2.1 to fix DATA LIST FREE parsing broke some
6167 other behavior, *sigh*. This patch hopefully fixes that. This
6168 time I've actually tested it.
6170 Thanks to Hankin <hankin@dunno.com> for reporting this bug.
6172 * data-list.c: (read_from_data_list_free,
6173 read_from_data_list_list) Call parse_string_as_format() directly
6174 without mucking around with the field width.
6176 Tue Jan 5 12:31:19 1999 Ben Pfaff <blp@gnu.org>
6178 Occasionally, you may encounter a script that wants to be
6179 interpreted in interactive mode. Make -i emulate this behavior to
6180 allow such scripts to be executed with PSPP.
6182 Thanks to Hankin <hankin@dunno.com> for reporting this behavior.
6184 * cmdline.c: (pre_syntax_message[]) Update -i description.
6186 * lexer.c: (preprocess_line) When getl_interactive is 2 (i.e.,
6187 when -i is given on the command line) don't treat unindented lines
6188 as starting a new command.
6190 Tue Jan 5 12:30:10 1999 Ben Pfaff <blp@gnu.org>
6192 In conjunction with egcs 1.1.1, Checker emits some bogus warnings,
6193 mostly caused by local initialized aggregates. After egcs is
6194 fixed upstream these can be removed, but for now they're not a big
6197 * ascii.c: (ascii_postopen_driver) Checker chokes on local
6198 initialized arrays. Avoid this.
6200 * sfm-write.c: (sfm_write_dictionary) Don't use a local
6203 Tue Jan 5 12:07:24 1999 Ben Pfaff <blp@gnu.org>
6205 egcs 1.1.1 has some new warnings relative to gcc 2.8.1, which the
6206 following changes avoid. Currently I compile sources with egcs
6207 1.1.1 and gcc 2.7.2.3 before sending them out.
6209 * apply-dict.c: (apply_dict) Use new avl_traverser_init() macro.
6211 * ascii.c: (option_tab[]) Initialize all struct members.
6213 * avl.h: (avl_traverser_init) New macro.
6215 * command.c: (DEFCMD, UNIMPL macros, cmd_table[]) Initialize all
6218 * crosstabs.q: (enum_var_values) Use new hsh_iterator_init()
6221 * hash.c: Comment fix.
6223 * hash.h: (hsh_iterator_init) New macro.
6225 * html.c: (option_tab[]) Initialize all struct members.
6227 * pfm-write.c: (write_value_labels) Use new avl_traverser_init()
6230 * postscript.c: (option_tab[]) Initialize all struct members.
6231 (output_encodings, preclose, dump_lines) Use new
6232 hsh_iterator_init() macro.
6234 * sfm-write.c: (write_value_labels) Use new avl_traverser_init()
6237 * sysfile-info.c: (describe_variable) Use new avl_traverser_init()
6240 Thu Nov 19 12:32:45 1998 Ben Pfaff <blp@gnu.org>
6242 * data-in.c: Examined each of the parsing functions to make sure
6243 that they wouldn't dump core if they were passed a string of the
6244 wrong length, since now the DATA LIST FREE/LIST routines don't
6245 check for field width before passing it to the data parser.
6246 (parse_RBHEX, parse_AHEX) Reject odd length input.
6247 (parse_string_as_format) Reject input that's too short or too
6250 * data-list.c: Before, the DATA LIST FREE/LIST routines would pad
6251 a field to its entire declared output width then pass it to the
6252 data-in parsing routines. This contradicted the documented
6253 behavior. This is fixed in these changes. Thanks to Mark H. Wood
6254 <mwood@IUPUI.Edu>. In addition, this fixes a few more details of
6255 free-format parsing that differed from SPSS.
6256 (cut_field) Commas and spaces are treated identically. Returns
6257 the proper column instead of a fixed 1 value.
6258 (parse_field) Removed.
6259 (read_from_data_list_free, read_from_data_list_list) Call
6260 parse_string_as_format directly instead of parse_field.
6262 * heap.c: (heap_delete) Stylistic fixes.
6264 Sun Aug 9 11:12:13 1998 Ben Pfaff <blp@gnu.org>
6266 * loop.c: (loop_2_trns_proc) Formatting fix.
6268 * sel-if.c: (cmd_filter) Set FILTER_before_TEMPORARY.
6270 * var.h: (glob var FILTER_before_TEMPORARY) New global var.
6272 * vfm.c: (macro FILTERED) New.
6273 (static var filter_var) New.
6274 (process_active_file_write_case) Use FILTERED.
6275 (setup_filter) Set filter_var.
6276 (close_active_file) Delete the filter if not
6277 FILTER_before_TEMPORARY.
6278 (procedure_write_case) Use FILTERED.
6280 Sat Aug 8 00:20:14 1998 Ben Pfaff <blp@gnu.org>
6282 * crosstabs.q: Changed /PIVOT={ON,OFF} to /FORMAT={PIVOT,NOPIVOT}.
6284 * data-in.c: (parse_day_count) Message fix.
6285 (parse_month) Style fix.
6287 * data-list.c: (struct data_list_pgm) New member eof.
6288 (cmd_data_list) Init eof to 0.
6289 (do_reading) Implement the /END subcommand and read-past-eof
6292 * do-if.c: Include stdio.h when debugging.
6293 (cmd_else_if) Make sure the command is .-terminated.
6295 * glob.c: (init_glob) Capitalize the command prompt.
6297 * inpt-pgm.c: (end_case_trns_proc) Debugging message.
6298 (end_file_trns_proc) Debugging message.
6300 * loop.c: (internal_cmd_loop) Make it work when there's no loop
6302 (loop_2_trns_proc) Enable MXLOOPS (why was this disabled?)
6304 * main.c: (dump_token) Make kwtab[] const.
6306 * set.q: Spelling, comment fixes.
6308 * sysfile-info.c: (cmd_display) DISPLAY VECTORS not DISPLAY
6311 * vars-prs.c: (fill_all_vars) Style fix.
6313 * vfm.c: (index_to_varname) Return const.
6315 Tue Aug 4 23:49:23 1998 Ben Pfaff <blp@gnu.org>
6317 * Changes in many source files for partial -ansi -pedantic and
6318 no-debugging compliance: Remove trailing common in enum
6319 declarations; add `unused' attributes; insert some appropriate
6322 * cmdline.c: (parse_command_line) Add new --testing-mode flag.
6324 * command.c: (shell) Make static.
6325 (run_command) Make static.
6327 * data-list.c: (dump_fixed_table) Remove use of local_strdup().
6329 * dfm.c: (cmd_begin_data) I18n fix.
6331 * error.c: (verbose_msg) Define if __STRICT_ANSI__.
6333 * error.h: (macro verbose_msg) Define if __STRICT_ANSI__.
6335 * expr-opt.c: (evaluate_tree) Don't initialize local arrays if
6338 * file-handle.q: Don't prepend the source file directory name to
6339 the data file name. (Ongoing issue.)
6340 (prepend_current_directory) Comment out.
6341 (internal_cmd_file_handle) Don't call prepend_current_directory().
6342 (fh_get_handle_by_filename) Ditto.
6344 * filename.c: Append zero byte to readlink() return value.
6346 * getline.c: (getl_read_line) I18n fix.
6348 * lexer.h: Don't use gcc features if __STRICT_ANSI__.
6350 * misc.h: Don't use gcc features if __STRICT_ANSI__.
6352 * pfm-write.c: (bufwrite) Don't try to increment a void * pointer
6355 * postscript.c: (output_encodings) Don't use local_strdup().
6358 * print.c: Don't use gcc features if __STRICT_ANSI__.
6360 * q2c.c: (dump_vars) Don't put a , at the end of the last enum.
6362 * recode.c: (parse_src_spec) Fully brace nested if's.
6364 * set.q: (global var set_testing_mode) New var.
6366 Wed Jul 29 22:01:44 1998 Ben Pfaff <blp@gnu.org>
6368 * ascii.c: Add some more `unused' attributes that only come into
6369 play when NDEBUG is defined.
6370 (ascii_close_page) Set s_len when reallocating s.
6372 * crosstabs.q: (delete_missing) New function.
6373 (output_pivot_table) Call delete_missing() if /MISSING=REPORT.
6374 (make_summary_table) Create summary table reallocable.
6376 * postscript.c: Add more `unused' attributes as above.
6378 * tab.c: (tab_create) [GLOBAL_DEBUGGING] Set reallocable member.
6379 (tab_realloc) [GLOBAL_DEBUGGING] Assert that table is reallocable.
6381 * tab.h: (struct tab_table) [GLOBAL_DEBUGGING] New `reallocable'
6384 * var.h: (macro force_dup_variable) [!GLOBAL_DEBUGGING] Remove
6385 gratuitous space between parameter definition.
6387 * vars-atr.c: Changed some assert(0)'s to abort()'s to prevent
6388 complaints about running off the end of functions with NDEBUG
6391 Sun Jul 5 00:17:25 1998 Ben Pfaff <blp@gnu.org>
6393 * Several source files: Removed some PORTME notes when reflection
6394 revealed that ANSI forbids that sort of breakage. Also, added
6395 lots of `unused' qualifiers here and there.
6397 * aggregate.c: (accumulate_aggregate_info) Remove local var
6398 weighting that turned out not to be used.
6400 * avl.c: Update to version 1.1.0. Add unused specifier.
6401 (avl_destroy) Initialize ab to 0. Comment fixes. Cast return
6403 (avl_probe) Replace some instances of 1 with +1 where appropriate.
6404 (avl_find) Cast return value to void *.
6405 (avl_delete) q doesn't need to be initialized at the beginning of
6406 the function. Replace some instances of 1 with +1.
6407 (force_avl_delete) Renamed avl_force_delete, all references changed.
6408 (compare_ints) `param' marked unused.
6409 (print_int) `param' marked unused.
6410 (recurse_tree) Replace some instances of 1 with +1.
6412 * avl.h: Update to version 1.1.0. Only declares avl function
6413 types if not already declared.
6414 (AVL_MAX_HEIGHT) Only define if not already defined.
6415 (struct avl_node) New unused member char pad[2].
6416 [GLOBAL_DEBUGGING] Change conditionalization to NDEBUG instead.
6417 (force_avl_insert) Renamed avl_force_insert.
6418 (force_avl_delete) Renamed avl_force_delete.
6420 * crosstabs.q: (struct table_entry) Put `freq' into a union with
6422 (struct crosstab) Add new member `ofs'.
6423 (glob var int_tab) Removed.
6424 (custom_tables) In integer mode, assign v[i] properly through the
6426 (custom_variables) Now p.crs.max == max + 1.
6427 [DEBUGGING] (debug_print) p.crs.min and p.crs.max are now ints.
6428 (precalc) Implement integer mode.
6429 (calc_integer) Implement integer mode.
6430 (compare_table_entry) Remove unused local variable `comparing'.
6431 (make_summary_table) Implement integer mode.
6432 (macro ns_rows) Implemented as static variable now.
6433 (several variables) Made static, from global.
6434 (output_pivot_table) Use table_value_missing() for column heads.
6435 Remove several unused local variables. Implement integer mode
6436 table summing. Count up ns_rows.
6437 (crosstabs_dim) Make columns wider when /MISSING=REPORT requested.
6438 (find_pivot_extent) Moved into find_pivot_extent_general; now just
6439 calls that function or find_pivot_extent_integer.
6440 (find_pivot_extent_integer) New function.
6441 (enum_var_values) Implemented for integer mode.
6442 (table_value_missing) New function.
6443 (display_dimensions) Call table_value_missing() for heads.
6444 (float_M_suffix) New function.
6445 (display_crosstabulation) Call table_value_missing() for row
6446 heads. Handle missing values in /MISSING=REPORT mode.
6447 (calc_fisher) Remove unused var N.
6448 (calc_r) Remove unused var fact.
6450 * data-list.c: (dump_fixed_table) Fix table dimensioning.
6451 (read_one_set_of_repetitions) Remove unused vars var_spec, column.
6453 * data-out.c: (insert_commas) Remove unused var cp.
6454 (convert_CCx) Remove unused vars save_set_decimal,
6457 * descript.q: (dump_z_table) Fix table dimensioning.
6458 (pre_calc) Remove unused var j.
6459 (display) Remove unused vars title, s. Fix table dimensioning.
6461 * expr-evl.c: Comment fixes.
6463 * frequencies.q: (full_dim) New function.
6464 (dump_full) Fix table dimensioning.
6465 (condensed_dim) New function.
6466 (dump_condensed) Fix table dimensioning.
6468 * get.c: (cmd_match_files) Remove unused var n_val. Remove unused
6471 * html.c: (html_close_drive) Remove unused var i.
6472 (postopen) Remove unused vars title, curfn_len, cp.
6473 (preclose) Remove unused vars this, x.
6475 * lexer.c: Comment fixes.
6477 * matrix-data.c: (cmd_matrix_data) Remove unused var index.
6479 * means.q: (custom_tables) Remove unused var m_dim.
6481 * mis-val.c: Format fix.
6483 * modify-vars.c: (cmd_modify_vars) Remove unused var new_dict.
6485 * output.c: (outp_get_paper_size) Remove unused var cp.
6487 * pfm-read.c: (read_float) Remove unused var save, unused label
6489 (read_variables) Remove unused vars cp, j.
6490 (read_value_label) Remove unused var j.
6492 * pfm-write.c: (bufwrite) Remove unused var i.
6494 * postscript.c: (ps_postopen_drive) Remove unused vars dev_info,
6496 (output_encodings) Remove unused vars char_cp, n_output.
6497 (read_ps_encodings) Remove unused var ep.
6498 (postopen) Remove unused var title.
6499 (preclose) Remove unused var fp.
6500 (ps_open_page) Remove unused vars true, false, orientation,
6501 mirror_horz, mirror_vert, width, length.
6502 (ps_text_metrics) Remove unused var x.
6504 * q2c.c: (find_symbol) Remove unused var y.
6505 (parse_setting) Remove unused parameter sbc, all references
6507 (dump_parser) Remove unused var cp.
6508 (dump_free) Remove unused var i.
6510 * set.q: (static vars args, n) Removed.
6511 (internal_cmd_gset) Removed.
6513 * sfm-read.c: (sfm_read_dictionary) Removed unused var i.
6514 (read_machine_flt64_info) Removed unused var file_endian.
6515 (read_documents) Removed unused var i.
6516 (read_compressed_data) Removed unused parameter dict, all
6519 * sfm-write.c: (bufwrite) Removed unused var i.
6520 (sfm_write_case) Removed unused var i.
6522 * sort.c: (merge_once) Remove unused var t.
6523 (write_separate) #if 0 out as dead code.
6525 * split-file.c: (cmd_split_file) Remove unused var i.
6527 * sysfile-info.c: (sysfile_info_dim) New function.
6528 (cmd_sysfile_info) Fix table dimensioning.
6529 (variables_dim) New function.
6530 (display_variables) Fix table dimensioning.
6531 (describe_variable) Remove unused var prev_r.
6533 * t-test.q: (z_postcalc) Removed.
6534 (pairs_calc) Remove unused var bad_weight.
6535 (postcalc) Remove unused vars dfn, dfd.
6537 * tab.c: (tab_create) Set t->dim to NULL.
6538 (tab_dim) Make sure t->dim is NULL first.
6539 (tab_natural_width) Remove parameter `clamp'.
6540 (tab_value) Remove duplicate assertion for table.
6541 (tab_raw) New function.
6542 (nowrap_dim) New function.
6543 (wrap_dim) New function.
6544 (tab_output_text) Fix table dimensioning.
6546 * tab.h: (tab_raw) New macro.
6548 * val-labs.c: (get_label) Remove unused var type.
6549 (copy_value_labels) Remove unused var trav.
6551 * var.h: (struct crosstab_proc) Completely changed.
6553 * vars-prs.c: (parse_dict_variable) Remove unused var v.
6555 * vfm.c: (open_active_file) Remove unused vars i, lp.
6557 * weight.c: (weight_trns_proc) #if 0 out as dead code.
6559 Tue Jun 2 23:37:21 1998 Ben Pfaff <blp@gnu.org>
6561 * Makefile.am: Add apply-dict.c, flip.c.
6563 * apply-dict.c: New file.
6565 * command.c: (struct command) Make cmd[] larger for CLEAR
6566 TRANSFORMATIONS command name.
6567 (parse_cmd) Make sure we're in a valid state before using it as an
6568 index. Discard variables and reset state on invalid transitions.
6569 (cmd_clear_transformations) New function.
6571 * command.def: Add APPLY DICTIONARY, CLEAR TRANSFORMATIONS, FLIP.
6572 Add unimplemented PRESERVE, RESTORE.
6574 * file-handle.h: Include stddef.h.
6578 * pfm-read.c: (parse_value) Pad value label values with spaces,
6581 * sfm-read.c: (struct sfm_fhuser_ext) Add reference count.
6582 (sfm_close) Decrement reference count, make sure it's zero.
6583 (sfm_maybe_close) New function.
6584 (sfm_read_dictionary) Handle reference counts.
6586 * vars-atr.c: (clear_default_dict) New function.
6587 (discard_variables) Use clear_default_dict().
6589 Sun May 31 00:58:05 1998 Ben Pfaff <blp@gnu.org>
6591 * Makefile.am: Add pfm-write.c.
6592 (LDADD) Add the libgmp2 libraries.
6594 * command.def: Define EXPORT.
6596 * get.c: (cmd_export) New function.
6597 (export_write_case_func) New function.
6599 * pfm-read.c: (static spss2ascii[]) Make it const.
6601 * pfm-write.c: New file.
6603 * sfm-write.c: Formatting, comment fixes.
6605 * var.h: Comment fix.
6607 Fri May 29 21:44:12 1998 Ben Pfaff <blp@gnu.org>
6609 * Makefile.am: Add pfm.h, pfm-read.c.
6611 * command.def: IMPORT is now implemented.
6613 * format.c: (glob var translate_fmt[]) New var.
6615 * get.c: (enum GTSV_NONE) Renamed GTSV_OPT_NONE.
6616 (cmd_import) New function.
6617 (import_source_read) New function.
6618 (glob var import_source) New var.
6620 * pfm-read.c: New file.
6624 * sfm-read.c: (parse_format_spec) Local variable translate_fmt[]
6626 (dump_dictionary) Disabled printing a couple of items.
6628 Mon May 25 12:42:37 1998 Ben Pfaff <blp@gnu.org>
6630 * crosstabs.q: (postcalc) Call make_summary_table().
6631 (make_summary_table) New function.
6632 (insert_summary) New function.
6633 (display_dimensions) Remove some unnecessary arguments, all
6635 (output_pivot_table) Fix lots of problems with the risk table
6637 (submit) Don't display an empty table.
6638 (display_risk) Fix order of arguments to calc_risk().
6640 * glob.c: Always include assert.h and stdlib.h.
6642 * output.h: (enum OUTP_T_JUST_FULL) Removed, all references
6645 * tab.c: (tab_create) Cosmetic changes.
6647 * tab.h: (enum TAB_JUSTIFY) Removed, all references removed.
6649 Sun May 24 22:39:23 1998 Ben Pfaff <blp@gnu.org>
6653 * crosstabs.q: (output_pivot_table) Headers drawing and submission
6654 code simplified, moved into new function submit().
6655 (submit) New function.
6656 (crosstabs_dim) New function.
6657 (display_directional) Substitute variable names for %s where
6659 (somers_d_v[], somers_d_ase[], somers_d_t[]) New static vars.
6660 (calc_symmetric) Initialize parameters only if non-NULL.
6661 Calculate Somers' d.
6662 (calc_directional) Calculate Somers' d (or copy it, really).
6665 * output.c: (outp_string_width) New function.
6667 * postscript.c: (postopen) Calculate font widths based on the
6668 width of the zero '0' character, not the width of the space
6669 character. Set paper-width and paper-length based on points, not
6671 (ps_open_page) Fix page setup string for landscape mode.
6673 * som.h: (struct som_dimension) Removed.
6674 (struct som_table_class) height, width members take int * not
6677 * tab.c: Many functions now have added parameter validation.
6678 (tab_height, tab_width) These functions were removed and merged
6679 into a single function tab_resize(), and all references changed.
6680 (tab_dim) Rewritten since the interface changed; reduced from
6681 hundreds of lines to two. All callers were changed. Currently
6682 most of them just use tab_natural_dimensions as their callback and
6683 await detailed translation of functionality.
6684 (tab_natural_width) New function.
6685 (tab_natural_height) New function.
6686 (tab_natural_dimensions) New function. This is a callback
6687 function, not something that you'd want to call directly.
6688 (tab_nat_dim) Removed.
6689 (tabi_table) Allocates t->w and t->h.
6690 (tabi_driver) Inlined sum_columns()'s functionality. Calls the
6691 dimensions callback.
6692 (evaluate_dimensions) Removed.
6693 (sum_columns) Removed.
6695 * tab.h: (enum TAL_1THIN) Removed.
6696 (enum series t_*) Removed.
6697 (struct tab_table) Members trh, trv changed to unsigned char *
6698 from int *. Member dim changed to a function pointer from a
6699 unsigned char *. Member max_stack_height removed. New members
6701 (macros tab_l, tab_r, tab_t, tab_b) New.
6703 Sat May 23 23:22:13 1998 Ben Pfaff <blp@gnu.org>
6705 * ascii.c: (delineate) Assign last_space_nchars before skipping
6706 spaces, to fix right justification.
6708 * crosstabs.q: (static vars risk, direct) New vars.
6709 (static var pearson_r) Removed.
6710 (glob var chisq_fisher) Made static.
6711 (static vars row_tot[], col_tot[]) Don't include grand total
6713 (static var grand_total) Renamed W, all references changed.
6714 (output_pivot_table) Only make `table' if num_cells != 0. Make
6715 risk and directional tables. Deal with grand total no longer part
6716 of col_tot[]. Free rows and cols after we're done with them.
6717 (display_risk) New function.
6718 (display_directional) New function.
6719 (clac_r) Rewritten so that it stores all its results into its
6720 arguments, so it can be used for Spearman's correlation too.
6721 (calc_symmetric) Added a t[] argument, all references changed.
6722 Calculates ASEs for tau-b, tau-c, gamma. Calculates Spearman's r,
6723 Pearson's r, Cohen's kappa.
6724 (calc_risk) New function.
6725 (calc_directional) New function.
6727 * som.c: (som_submit) Improved debugging code.
6729 * stats.c: (hypercube) New function.
6730 (cube) New function.
6732 (normal_sig) Went back to old implementation, which actually
6735 * stats.h: (macros square, cube, hypercube) Removed. The
6736 equivalent functions in stats.c are inlined here; all references
6737 to square changed to sqr.
6739 Fri May 22 00:03:41 1998 Ben Pfaff <blp@gnu.org>
6741 * crosstabs.q: (N_SYMMETRIC) New define.
6742 (postcalc) Disable debug printing.
6743 (static vars chisq_fisher, pearson_r) New.
6744 (output_pivot_table) Add support for symmetric measures. Add
6745 chi-square output of exact sigs.
6746 (display_chisq) Rewritten.
6747 (display_symmetric) New function.
6748 (gamma_int) New function.
6750 (swap) New function.
6751 (calc_fisher) New function.
6752 (calc_chisq) Check boundary conditions better. Calculate Yates,
6753 Fisher, Mantel-Haenszel tests.
6754 (calc_r) New function.
6755 (calc_symmetric) New function.
6757 * stats.c: (normal_sig) Rewritten with new algorithm. Renamed
6759 (chisq_sig) Better boundary conditions. Renamed from
6762 * tab.h: (struct tab_table) New member cf.
6764 * tab.c: (tab_create) Set cf.
6765 (tab_width) New function.
6766 (tab_realloc) Handle cf.
6767 (tab_vline) Handle cf.
6768 (tab_hline) Handle cf.
6769 (tab_box) Handle cf.
6770 (tab_value) Handle cf.
6771 (tab_float) Handle cf.
6772 (tab_text) Handle cf.
6773 (tab_joint_text) Handle cf.
6774 (tab_offset) Handle cf.
6775 (tab_next_row) Handle cf.
6776 (evaluate_dimensions) Handle cf.
6777 (render_strip) Handle cf.
6779 Wed May 20 00:03:59 1998 Ben Pfaff <blp@gnu.org>
6781 * crosstabs.q: (postcalc) New vars row_tot, col_tot, pass them to
6782 output_pivot_table().
6783 (output_pivot_table) Moved lots of local variables outside and
6784 made them static. Add beginnings of chi-square statistic
6785 support. Now column and row totals aren't in the main matrix.
6786 Always zero out any leftover rows & columns after we're done with
6787 the table entries. Move all output stuff into
6788 display_dimensions(), display_crosstabs(), display_chisq().
6789 (display_dimensions) New function.
6790 (display_crosstabulation) New function.
6791 (display_chisq) New function.
6792 (calc_chisq) Implemented Pearson and likelihood-ratio chisquares.
6794 * frequencies.q: (dump_full, dump_condensed) Remove tab_null()
6795 references, simplify logic.
6797 * postscript.c: Remove scale, translate-x, translate-y,
6798 mirror-horz, mirror-vert, rotate-180 options.
6799 (struct ps_driver_ext) Remove scale, translate_x, translate_y.
6800 All references deleted.
6801 (macro YT) New macro.
6802 (array option_tab[]) Removed options.
6803 (ps_option) Removed options.
6804 (ps_open_page) Write page setup explicitly to output file, without
6805 using now-deleted BP function.
6806 (macro dump_line) Use YT().
6807 (macro dump_thick_line) Use YT().
6808 (draw_headers) Use YT().
6809 (switch_font) Reorder arguments to SF function.
6810 (write_text) Use YT().
6812 * sfm-read.c: (sfm_read_case) Don't attempt to read variables that
6815 * sysfile-info.c: (describe_variables) Don't use tab_nulls().
6817 * tab.c: (tab_create) Initialize t->ct to zeros. Remove
6818 null-debugging code.
6819 (tab_realloc) Remove null-debugging code. Initialize new regions
6821 (tab_vline) Support offsets.
6822 (tab_hline) Support offsets.
6823 (tab_box) Support offsets.
6825 (tab_nulls) Removed.
6828 (evaluate_dimensions) Remove null-debugging code. Understand
6829 TAB_EMPTY attribute. Assert that text.s.s is always non-NULL if
6830 TAB_EMPTY not present.
6832 * tab.h: New cell attribute TAB_EMPTY.
6833 (macros tab_nr, tab_nc, tab_row, tab_col) New.
6835 * vars-atr.c: (init_variable) Set get.fv to -1 so that GET doesn't
6836 try to read them from system files.
6838 * vfm.c: (dump_splits) Don't call tab_null().
6840 Sat May 16 19:36:55 1998 Ben Pfaff <blp@gnu.org>
6842 * crosstabs.q: (struct crosstab) Added `missing' member.
6843 (custom_tables) Init missing.
6844 (calc_general) Handle missing values.
6845 (calc_chisq) New function.
6846 (output_pivot_table) Start work on chi-square output. Update for
6847 new tab offset support functions. Shorten statistic names.
6849 * Several files: add in more `const's to placate gcc's warnings.
6851 * tab.h: (struct tab_table) Add col_ofs, row_ofs members. Comment
6854 * tab.c: (tab_height, tab_realloc, tab_vline, tab_hline, tab_box,
6855 tab_null, tab_nulls, tab_value, tab_float, tab_text,
6856 tab_joint_text) Add col_ofs and row_ofs support.
6857 (tab_offset) New function.
6858 (tab_next_row) New function.
6859 (tab_row) New function.
6860 (tab_col) New function.
6861 (tabi_table) Add col_ofs and row_ofs support.
6863 * vars-atr.c: (is_system_missing) New function.
6865 Tue May 12 16:14:30 1998 Ben Pfaff <blp@gnu.org>
6867 * crosstabs.q: Expanded subcommand names RESID --> RESIDUAL, etc.
6868 (static var no_cells) Removed.
6869 (static var num_cells) New.
6870 (static var expected) New.
6871 (static var cells[]) New.
6872 (internal_cmd_crosstabs) Deal with new variables.
6873 (postcalc) Removed most of the meat and put it in new function
6874 output_pivot_table().
6875 (output_pivot_table) Calculates and outputs an entire pivot table.
6877 * postscript.c: (postopen) Fix problems with free()ing addresses
6878 not obtained from malloc().
6880 * som.c: (som_submit) Add assertion.
6882 * sysfile-info.c: (describe_variable) Use new tab_nulls()
6885 * tab.c: (static var tab_names[]) New.
6886 (tab_realloc) -1 for nc or nr indicates no change.
6887 (tab_nulls) New function.
6888 (tab_dim) Use tab_names[].
6889 (tabi_cumulate) Don't include bottom or right headers. Furrfu.
6890 (evaluate_dimensions) Don't terminate on uninited cells, just put
6891 an X in them and emit a notice. Use tab_names[].
6893 * tab.h: Move bits into tab.def.
6895 * tab.def: New. Don't try to declare tab_table_class because then
6896 som.h has to be included.
6898 Thu May 7 22:55:04 1998 Ben Pfaff <blp@gnu.org>
6900 * command.def: New file, contains all the command definitions
6901 previously included bodily in command.c.
6903 * format.def: New file, contains all of the format definitions
6904 previously split across format.h, format.c, and sfm-write.c.
6906 * lexer.h: Renamed from tokens.h in order to match corresponding
6909 * lexerP.h: Moved some rarely used functions exported by lexer.c
6912 * Makefile.am: Commemorate renamed files.
6913 (EXTRA_DIST) Add command.def, format.def.
6915 * command.c: [0] (walk_cmdtable_func) Removed.
6917 * crosstabs.q: (postcalc) Made it work and print out matrices
6919 (enum_column_values) Renamed enum_var_values, generalized for any
6922 * format.h: (struct fmt_desc) New member `spss'.
6924 * q2c.c: (main) Generated code includes lexer.h instead of
6927 * sfm-write.c: (write_format_spec) Use new spss member of fmt_spec
6928 instead of an independent translation table.
6930 Tue May 5 13:19:03 1998 Ben Pfaff <blp@gnu.org>
6932 * Lots of source files: Added const to declarations.
6934 * aggregate.c: (parse_aggregate_function) Rename inner i to j.
6936 * arena.c: (arena_clear) Set prev pointer to null when done.
6938 * ascii.c: (ascii_option) Rename index as indx.
6940 * avl.c: This is now a separate library called libavl.
6941 (xmalloc) Make static.
6942 (avl_probe) Step A7 can use the cache instead of an explicit
6944 (avl_delete) Don't maintain a q pointer because it's always
6945 available in the pointer stack. Comment fix.
6947 * avl.h: This is now a separate library called libavl.
6949 * command.c: (cmd_table[]) Remove spurious trailing "".
6951 * common.h: Only include random() fix if this system needs it.
6953 * crosstabs.q: Include alloca headers.
6954 (n_sorted_tab) New global var.
6955 (postcalc) Mostly rewritten.
6956 (find_pivot_extent) Rewritten.
6957 (enum_column_values) Rewritten.
6959 * data-out.c: (convert_F) Rename inner n as n_spaces.
6961 * error.c: (dump_message) Don't have an outer var i.
6963 * file-handle.q: (static var f) Removed. All references removed.
6964 (internal_cmd_file_handle) Uses a local variable instead of f.
6966 * get.c: (trim_dictionary) Change scope of i, i1, i2.
6967 (cmd_match_files) Don't strcpy tokstr into sbc (why was this ever
6970 * getline.h: Declare getl_history as extern. Reported by
6971 palme@uni-wuppertal.de (Hubert Palme).
6973 * postscript.c: (postopen) Some large mods for constness.
6975 * recode.c: Remove spurious copyrights since PSPP is owned by FSF
6978 Fri Apr 24 12:52:47 1998 Ben Pfaff <blp@gnu.org>
6980 * Makefile.am: Rename BUILT_SOURCES to q_sources, all references
6981 changed. Add avl.c, avl.h to pspp_SOURCES. Remove avllib from
6984 * avl.c, avl.h: New files. These form a clean-room
6985 reimplementation of avllib. Iterative algorithms are used in
6986 place of recursive ones, so there is no resemblance in the code.
6988 * Lots of headers: Don't include other headers by default.
6990 * Lots of source files: Explicitly include all needed headers.
6992 * arena.c: (arena_clear) New function.
6994 * crosstabs.q: (ROW_VAR, COL_VAR) New enums.
6995 (static var ar) Removed.
6996 (staitc vars ar_tc, ar_col) New.
6997 (cmd_crosstabs) Destroy the arenas.
6998 (internal_cmd_crosstabs) Create the arenas.
6999 (precalc) Don't need a free function for the hash.
7000 (calc_general) Make sure to zero out the trailer on the key data
7002 (print_table_entries) Updated.
7003 (postcalc) Worked on actually implementing.
7004 (find_pivot_extent) New function.
7005 (compare_value) New function.
7006 (enum_column_values) New function.
7008 * data-in.c: (parse_month) Make local array `static const'.
7010 * data-out.c: (convert_date) Make local array `static const'.
7011 (convert_WKDAY) Same.
7012 (convert_MONTH) Same.
7014 * frequencies.q: (postprocess_freq_tab) avl_walk_inorder() has
7015 been renamed to avl_walk().
7017 * hash.c: Rewritten more efficiently.
7019 * hash.h: Add attribute const to hsh_next_prime declaration.
7021 * lexer.c: (id_match) Make arguments const.
7023 * postscript.c: (ps_postopen_driver) Make default fonts the
7026 * q2c.c: (main) Generated code needs stdlib.h.
7028 * sfm-write.c: (write_value_labels) An avl_traverser needs to be
7029 initialized to 0 now, not to NULL. All other references to
7030 avl_traverser were updated in the same way.
7032 * tokens.h: Macro version of id_match updated to use const
7035 * val-labs.c: (inc_ref_count) New function.
7036 (copy_value_labels) Simply through use of new avl_copy() function.
7038 Wed Apr 15 13:01:58 1998 Ben Pfaff <blp@gnu.org>
7040 * crosstabs.q: Probably doesn't compile. New PIVOT subcommand.
7041 (postcalc) Worked on this.
7043 * postscript.c: (OPO_DOUBLE_LINE) New enum.
7044 (struct ps_driver_ext) New line_width_thick member.
7045 (ps_preopen_drive) Init line_width_thick.
7046 (option_tab[]) Add line-* options.
7047 (ps_option) Parse line-* options.
7048 (postopen) Add line_width_thick support. Strip leading spaces on
7049 prologue output lines.
7050 (ps_open_page) Include line_width_thick in output.
7051 (macro dump_thick_line) New.
7052 (dump_fancy_line) Support thick lines as well as double lines.
7054 Tue Apr 14 00:50:08 1998 Ben Pfaff <blp@gnu.org>
7056 * Makefile.am: Add crosstabs.c to BUILT_SOURCES. Add crosstabs.q
7057 to pspp_SOURCES. Add crosstabs.q to EXTRA_DIST.
7059 * Many source files: Rename `options' to `pv_opts' as appropriate.
7061 * command.c: (static var cmd_table[]) Add CROSSTABS command.
7063 * common.c: (xcalloc) New function.
7065 * crosstabs.q: New file. Not finished yet, though.
7067 * data-list.c: Comment fix.
7069 * error.c: Remove some old Checker cruft.
7071 * frequencies.q: (dump_full) Cumulate valid percent instead of
7074 * getline.c: Comment fix.
7076 * hash.c: Comment fixes.
7078 * hash.h: (struct hsh_table) Make hash functions return unsigned
7079 instead of int to avoid problems with taking the modulo of
7080 negative return values. All references changed.
7082 * misc.c: (intlog10) Make its table static const instead of auto.
7084 * sfm-read.c: (read_header) Make `prefix' static const instead of
7087 * var.h: (union value) Add member `hash'.
7088 (struct variable) Rename prv_index as `foo'--all references
7090 (typedef pv_opts) Removed. All references changed.
7092 * vars-prs.c: (parse_variables) Message fixes.
7094 Mon Mar 9 15:35:08 1998 Ben Pfaff <blp@gnu.org>
7096 * get.c: (cmd_match_files) Don't reverse the order of FILEs as
7097 they are being inserted. Don't check for BY variables of
7098 different types. Discard variables if the active file isn't
7099 included in the merge.
7100 (mtf_processing) Essentially rewritten.
7101 (mtf_merge_dictionary) Check for master/slave variables of
7102 different types/widths.
7104 * vfm.c: (static var not_canceled) New var.
7105 (process_active_file) Don't call vfm_source->read() if
7106 there's no vfm-source. Initialize not_canceled.
7107 (process_active_file_write_case) Honor and update not_canceled.
7108 (prepare_for_writing) Rollback changes from yesterday, they were
7110 (close_active_file) Don't destroy vfm_source unless it exists.
7112 Mon Mar 9 00:56:16 1998 Ben Pfaff <blp@gnu.org>
7114 * Lots of source files: Added { } around nested if/else constructs
7115 to avoid new gcc 2.8 warnings.
7117 * data-in.c: (parse_Z) Declare `int' type explicitly.
7120 * get.c: (struct mtf_file) Add prev, next_min, by, input members.
7121 (cmd_match_files) Initialize mtf_by_values. Manage by, input,
7122 prev members. Put TABLEs at the end of the chain and FILEs at the
7123 beginning. Don't allow the active file in STATE_INIT. Use proper
7124 `seen' value for the active file. Fill out the by members and
7125 make sure they're of consistent type. Do the actual merge
7127 (mtf_processing_finish) New function.
7128 (var_type_description) New function.
7129 (mtf_free_file) New function.
7130 (mtf_free) Rewritten.
7131 (mtf_delete_file_in_place) New function.
7132 (mtf_read_nonactive_records) New function.
7133 (mtf_compare_BY_values) New function.
7134 (static var mtf_seq_no) New var.
7135 (mtf_processing) New function.
7136 (mtf_merge_dictionary) Assign nval members for the system file
7137 dictionary. Assign fv values for its variables. Point each slave
7138 variable to the corresponding master variable.
7140 * hash.c: Include str.h.
7142 * mis-val.c: (copy_missing_values) src arg is const.
7144 * misc.c: (spacing) Make `max' var explicitly int.
7146 * sfm-read.c: (dump_dictionary) Message reformatting.
7147 (sfm_read_case) Add assertion.
7149 * sort.c: Esthetic fixes.
7151 * var.h: (struct match_files_proc) New struct.
7152 (struct variable) Add private data match_files_proc.
7154 * vars-atr.c: (delete_variable) Implement. Add argument for the
7155 dictionary that owning the variable.
7156 (dup_variable) Add assertion.
7158 * vfm.c: Comment fixes, hopefully the comments are correct now.
7159 (process_active_file) New function.
7160 (process_active_file_write_case) New function.
7161 (process_active_file_output_case) New function.
7162 (prepare_for_writing) Use temp_dict->nval for vfm_info, not
7164 (write_case) Renamed procedure_write_case(). Now write_case is a
7165 pointer to a function. Style fixes.
7167 1998-03-05 Ben Pfaff <blp@gnu.org>
7169 * Makefile.am: (q2c) Link with libmisc.
7170 (version.c) Define default_config_path, include_path,
7173 * ascii.c: (ascii_postopen_driver) When the default newline string
7174 is requested, open file in text mode. Suggested by
7175 palme@uni-wuppertal.de (Hubert Palme).
7176 (static vars line_buf, line_p) Change from char * to unsigned char
7178 (ascii_close_page) char * to unsigned char *.
7180 * cmdline.c: (parse_command_line) Implement -r option by
7181 prepending ~/.pspp/rc to the list of files to process.
7183 * command.c: (cmd_remark) Reset getl_prompt to the standard prompt
7184 before pulling in a final line.
7185 (null_func, null_int_func) Removed (dead code).
7187 * descript.q: (display) Calculate width of variable name column
7188 properly. Calculate number of valid cases properly. Reported by
7189 palme@uni-wuppertal.de (Hubert Palme).
7191 * filename.c: (init_filename) Use default_config_path instead of
7192 now obsolete CONFIG_PATH.
7194 * getline.c: (getl_initialize) Use include_path instead of now
7195 obsolete INCLUDE_PATH.
7196 (getl_add_file) New argument `where'. All references changed.
7198 * groff.c: (find_font_file) Use groff_font_path instead of now
7199 obsolete GROFF_FONT_PATH.
7201 * postscript.c: (find_ps_file) Use groff_font_path instead of now
7202 obsolete GROFF_FONT_PATH. Copy through temporary variable to
7203 avoid problems with constness.
7205 * str.h: (macro cs_streq) New macro.
7207 * version.h: (glob var default_config_path, include_path,
7208 groff_font_path) New vars.
7210 1998-02-23 Ben Pfaff <blp@gnu.org>
7212 * Many source files: Change verbose_msg() priority levels and
7215 * aggregate.c: Include debug-print.h.
7217 * cmdline.c: (parse_command_line) Add --safer/-s and --command/-c
7219 (static var pre_syntax_message) Document --safer/-s and
7222 * command.c: (cmd_erase, cmd_host) Disable if set_safer is set.
7224 * dfm.c: (open_inline_file) [__CHECKER__] Zero out ext->file,
7225 because it's not used but it's still copied.
7226 (open_file_r) Remove gratuitous debug message.
7228 * filename.c: (safety_violation) New function.
7229 (open_file) Remove gratuitous debug messages. Don't allow pipe
7230 files if set_safer is set.
7232 * get.c: Turn off debugging.
7234 * getline.c: (getl_add_virtual_file) New function.
7235 (getl_read_line) Add verbose_msg() call for opening new syntax
7237 (getl_perform_delayed_reset) Add a return value describing whether
7238 any action was taken. Call reset_eof().
7240 * getline.h: Comment fix.
7242 * groff-font.c: (groff_read_font) Use `goto next_iteration' in
7243 place of incorrect `continue'. Use strtok_r() instead of
7244 strtok(). Always check strtok_r() return value.
7245 (groff_read_DESC) Use strtok_r() instead of strtok().
7247 * lexer.c: (reset_eof) New function.
7249 * main.c: (parse) Get a token after performing a delayed reset
7250 action; allow empty syntax files.
7252 * postscript.c: (output_encodings) Use strtok_r() instead of
7255 * q2c.c: (dump_parser) Use strtok_r() instead of strtok().
7257 * set.q: Comment fixes.
7258 (glob var set_safer) New var.
7259 (internal_cmd_set) Support SAFER.
7261 * str.h: [!HAVE_STRTOK_R] Declare strtok_r() prototype.
7263 * temporary.c: (free_dictionary) Set d->splits to NULL after
7266 * vars-atr.c: (clear_variable) Decrement dict->n_splits if
7267 variable deleted, not if it *isn't* deleted.
7269 1998-02-16 Ben Pfaff <blp@gnu.org>
7271 * command.c: (array cmd_table[]) Add MATCH FILES.
7273 * common.c: Comment fixes.
7275 * data-list.c, dfm.c, error.c, filename.c, list.q, matrix-data.c,
7276 modify-vars.c, postscript.c, sfm-read.c, sfm-write.c, tab.c:
7277 Include alloca.h. Problem reported by palme@uni-wuppertal.de
7280 * expr-opt.c: Include str.h. Problem reported by
7281 palme@uni-wuppertal.de (Hubert Palme).
7283 * get.c: (cmd_get) [DEBUGGING] Update v->p.get to v->get.
7284 (static var mtf_by) Change from char ** to variable **.
7285 (static var mtf_master) New var.
7286 (mtf_merge_dictionary) New function.
7287 (cmd_match_files) Init mtf_master. Parse mtf_by according to new
7288 var type. Reorder tests properly. Initialize file->dict. Detect
7289 TABLE= without BY=. Read file dictionaries and merge them. Give
7290 subcommand name with IN, LAST, FIRST error messages. Create IN,
7291 LAST, FIRST variables. Comment fixes.
7292 (mtf_free) Don't free default_dict. Free mtf_master.
7294 * getline.c: Define getl_mode. Change getl_buf_size to size_t
7296 (handle_line_buffer) Cast int to size_t in comparison to avoid
7299 * getline.h: Declare getl_mode extern.
7301 * groff-font.c: (groff_read_font) Type-fix calls to getline.
7302 (groff_read_DESC) Make line_size a size_t.
7303 (match_tok) Parenthesize name to avoid macro expansion.
7305 * mis-val.c: (copy_missing_values) New function.
7307 * postscript.c: (postopen) Make buf_size a size_t.
7309 * sfm-read.c: (dump_dictionary) Make global from static. Print
7310 variable info in parts for easier debugging with Checker.
7312 * temporary.c: (copy_variable) Use copy_value_labels().
7313 (new_dictionary) New arg: whether to copy file label, documents.
7315 * val-labs.c: (copy_value_labels) New function.
7317 * var.h: (enums MISSING_*) Add MISSING_COUNT.
7319 * vars-atr.c: [GLOBAL_DEBUGGING] (force_dup_variable) New
7321 (dup_variable) Set prv_index, get.fv, get.nv.
7323 Fri Feb 13 15:38:36 1998 Ben Pfaff <blp@gnu.org>
7325 * Makefile.am: (pspp_SOURCE) Add htmlP.h.
7327 * Many source files: For ANSI-compliance, add empty statement
7328 after label. Reported by palme@uni-wuppertal.de (Hubert Palme)
7329 and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
7331 * data-in.c: (parse_numeric) Some header files break on
7332 -DBL_MIN_10_EXP because they get a --; add () for safety.
7333 Reported by palme@uni-wuppertal.de (Hubert Palme).
7335 * dfm.c: Idea by Dr Eberhard W Lisse <el@linux.lisse.na>.
7336 (struct dfm_fhuser_ext) Change `file' from FILE * to file_ext.
7337 (dfm_close) Use close_file_ext.
7338 (open_inline_file) Set file.file to NULL, not file.
7339 (open_file_r, open_file_w) Initialize file.file; fill in file_ext
7340 struct and use open_file_ext().
7341 (read_record) Use file.file.
7343 * file-handle.q: (prepend_current_directory) Pass through special
7346 * filename.c: Only include unistd.h if HAVE_UNISTD_H.
7347 (normalize_filename) Pass through special filenames.
7348 (open_file, close_file) Accept pipe| and |pipe syntaxes as
7350 (dirname) Rename blp_dirname() because of name conflict on some
7351 OS. All references changed. Reported by palme@uni-wuppertal.de
7353 (is_special_filename) New function.
7355 * get.c: (GTSV_OPT*) Add GTSV_OPT_MATCH_FILES.
7356 (trim_dictionary) Conditionalize some of the options on whether
7357 GTSV_OPT_MATCH_FILES is in *options.
7358 (rename_variables) Don't allow variables to be renamed as scratch
7360 (MTF_*) New enum series.
7361 (struct mtf_file) New struct.
7362 (static vars mtf_head, mtf_tail, mtf_by, mtf_n_by, mtf_free) New
7364 (cmd_match_files, mtf_free) New functions.
7366 * lexer.c: (match_int) Needed parentheses around name to escape
7367 macro expansion. Reported by Micah Altman
7368 <maltman@www-vdc.fas.harvard.edu>.
7370 * print.c: Needed to include alloca.h. Reported by Micah Altman
7371 <maltman@www-vdc.fas.harvard.edu>.
7373 * recode.c: (convert_to_double) Parenthesize -DBL_MIN_10_EXP to
7374 -(DBL_MIN_10_EXP). Reported by palme@uni-wuppertal.de (Hubert
7377 * str.h: Include stdarg.h. Reported by palme@uni-wuppertal.de
7378 (Hubert Palme) and Micah Altman <maltman@www-vdc.fas.harvard.edu>.
7380 Thu Feb 5 00:18:21 1998 Ben Pfaff <blp@gnu.org>
7382 * html.c: (struct html_driver_ext) Move into htmlP.h.
7383 (html_preopen_driver) Initialize cp_x, cp_y.
7384 (html_submit) Implement as call to output_tab_table().
7385 (change_attributes) New function.
7386 (escape_string) New function.
7387 (output_tab_table) New function.
7389 * list.q: (write_all_headers) Add code for writing headers for the
7391 (clean_up) Write out the html close-table tag.
7392 (determine_layout) Ignore html driver.
7393 (list_cases) Write html data.
7395 * som.c: (som_submit) Move more of the code into output_table().
7397 * tab.c: (static var hit) Make a global var and rename tab_hit.
7398 (static var tab_table_class) Make a global var.
7400 * htmlP.h: New file.
7402 Tue Feb 3 16:12:18 1998 Ben Pfaff <blp@gnu.org>
7404 * dump-sysfile.c: Removed.
7406 * html.c: (preclose) Change comment in emitted code.
7408 * matrix-data.c: Debugging off by default. Comment fixes.
7409 (static var container) New var.
7410 (cmd_matrix_data) Create and destroy container. Initialize
7411 is_per_factor[] to 0s. Move code into new function
7412 string_to_content_type(). Require split values to be present in
7413 the data when ROWTYPE_ is explicit. Call specific function, not
7414 general read_matrices().
7415 (string_to_content_type) New function.
7416 (context) Exclude all whitespace, not just spaces.
7417 (mget_token) A dot is a number. Add assertion.
7418 (static var data) Renamed nr_data.
7419 (static var factor_values) Renamed nr_factor_values.
7420 (read_matrices) Renamed read_matrices_without_rowtype(). Handle
7421 only specific case. Close data_file before exit.
7422 (fill_matrix) New function.
7423 (read_data_lines) Renamed nr_read_data_lines(). Remove debug
7424 printing. Style fixes. Message fixes. Move code into
7426 (read_matrices_without_rowtype) Rename
7427 matrix_data_read_without_rowtype(). Fix off-by-one error on
7428 loops. Allocate nr_data[] memory from arena.
7429 (read_matrices_with_rowtype) Removed.
7430 (read_splits) Renamed nr_read_splits(). Style fixes.
7431 (read_factors) Renamed nr_read_factors().
7432 (dump_cell_content) Comment fixes. Arguments changed. Change
7433 debug printing. All references changed.
7434 (output_data) Renamed nr_output_data().
7435 (static var wr_content) New var.
7436 (struct factor_data) New struct.
7437 (static var wr_data) New var.
7438 (static var wr_current) New var.
7439 (matrix_data_source_destroy_source) Removed.
7440 (read_matrices_with_rowtype) New function.
7441 (matrix_data_read_with_rowtype) New function.
7442 (wr_read_splits) New function.
7443 (compare_factors) New function.
7444 (wr_output_data) New function.
7445 (wr_read_rowtype) New function.
7446 (wr_read_factors) New function.
7447 (wr_read_indeps) New function.
7448 (glob var matrix_data_source) Make destroy_source member NULL as
7451 Fri Jan 23 00:09:08 1998 Ben Pfaff <blp@gnu.org>
7453 * lexer.c: (syntax_error) Give better error message when at end of
7456 * matrix-data.c: (var content_names[]) Fix PROX spelling. Change
7457 N_SCALAR to output as plain N.
7458 (mdump_token) Change output format.
7459 (context) Fix message output interaction with spaces in input.
7460 (another_token) New function.
7461 (force_eol) Improved error message.
7462 (static var max_cell_index) New var.
7463 (read_matrices) Init `cells'. factor_values is now per-cell.
7464 Init max_cell_index.
7465 (read_data_lines) Replace `compare' local with new `compare' arg.
7466 Debugging messages changed. Only read factors if per_factor.
7467 Propagate error return from read_factors(), force_eol().
7468 Copy N_SCALAR values across the N vector.
7469 (read_matrices_without_rowtype) Don't init `cells'. Don't need to
7470 check parentheses manually since we now have is_per_factor[].
7471 Call read_data_lines() with new args. Check for end of data after
7472 looping, using another_token().
7473 (read_factors) Arguments changed. Use max_cell_index to determine
7474 whether to read or compare factors. Message fixes.
7475 (dump_cell_content) New function.
7476 (output_data) Completely rewritten because content types were
7477 supported to be nested inside factor values, not vice versa.
7479 Thu Jan 22 00:26:38 1998 Ben Pfaff <blp@gnu.org>
7481 * lexer.c: (syntax_error) Support formatted varargs messages.
7483 * matrix-data.c: Turn debugging on by default.
7484 (static content_type[]) New array.
7485 (static content_names[]) New array.
7486 (static rowtype_, varname_) New vars.
7487 (static is_per_factor[]) New array.
7488 (static split_values) Moved declaration.
7489 (static n_continuous, first_continuous) New var.
7490 (cmd_matrix_data) Don't init split_values. Assign ROWTYPE_ to
7491 rowtype_. Simplify SPLIT code. Init is_per_factor[]. Assign
7492 VARNAME_ to varname_. Initialize first_continuous, n_continuous.
7493 Check for continuous variables.
7494 [DEBUGGING] (debug_print) Remove content_names[].
7495 (mdump_token) New macro.
7496 (mget_token_dump) New function.
7497 (mdump_token) New function.
7498 (context) New function.
7499 (mget_token) Fix messages.
7500 (static var data, split_values, factor_values) New vars.
7501 (read_matrices) Manage split_values, factor_values.
7502 (read_data_lines) New function.
7503 (read_matrices_without_rowtype) Implemented.
7504 (read_splits) Message fixes. Uses `just_read'.
7505 (read_factors) New function.
7506 (output_data) New function.
7507 (matrix_data_source_destroy_source) Close the file handle.
7508 (glob var matrix_source) Change name from "DATA LIST" to "MATRIX
7511 * str.c: (strpadcmp) Removed.
7513 * vfm.c: (dump_splits) Initialize i; fix test for end of splits.
7515 Sun Jan 18 00:30:59 1998 Ben Pfaff <blp@gnu.org>
7517 * Lots of source files: Add cast to unsigned character to calls to
7518 tolower() and toupper().
7520 * aggregate.c: Set default_dict.splits to NULL.
7522 * command.c: (static variable tab[]) Add MATRIX DATA.
7524 * data-in.c: Add debugging defines. Formatting fixes.
7526 * expr-opt.c: Formatting fixes.
7528 * lexer.c: (syntax_error) Message fixes.
7530 * matrix-data.c: New enum series.
7531 (static vars fmt, section, diag, explicit_rowtype, signle_split,
7532 split_values, n_factors, factors, cells, pop_n, contents,
7533 n_contents) New vars.
7534 (cmd_matrix_data) Finished implementation.
7535 (compare_variables_by_mxd_vartype) New function.
7536 [DEBUGGING] (debug_print) New function.
7537 (static vars mtoken, mtokstr, mtoklen, mtokval) New vars.
7538 (read_matrices) New function.
7539 (read_matrices_without_rowtype) New function.
7540 (read_matrices_with_rowtype) New function.
7541 (read_splits) New function.
7542 (mget_token) New function.
7543 (force_eol) New function.
7544 [0] (test_tokenizer) New function.
7545 (matrix_data_source_destroy_source) New function.
7546 (glob var matrix_data_source) New var.
7548 * misc.h: Include ieeefp.h if present.
7550 * split-file.h: (cmd_split_file) Changes corresponding to struct
7553 * str.h: Fix memmem prototype.
7555 * temporary.c: (save_dictionary, restore_dictionary,
7556 free_dictionary) Changes corresponding to struct dictionary
7559 * var.h: (MXD_* enums) New enum series.
7560 (struct matrix_data_proc) New struct.
7561 (struct split) Removed.
7562 (struct dictionary) Changed `splits' member from `split *' to
7564 (macro force_create_variable) New macro. Replaced lots of
7565 create_variable()/assert() calls with calls to this macro.
7567 * vars-atr.c: (discard_variables) Changed assertion.
7568 [GLOBAL_DEBUGGING] (force_create_variable) New function
7569 called by the macro of the same name.
7570 (clear_variable) Changes to delete splits from the dictionary
7571 corresponding to struct dictionary changes.
7573 * vars-prs.c: (parse_variables) [GLOBAL_DEBUGGING] Check for
7574 corrupted variable `index' values in the dictionary passed in
7575 every time this function is called.
7577 * vfm.c: (dump_splits, SPLIT_FILE_procfunc) Changes corresponding
7578 to struct dictionary changes.
7580 Tue Jan 13 23:45:02 1998 Ben Pfaff <blp@gnu.org>
7582 * Makefile.am: (pspp_SOURCES) Add matrix-data.c.
7584 * command.c: New includes.
7585 (static array cmd_table[]) Add ERASE, HOST, NEW FILE.
7586 (cmd_erase) New function.
7587 [unix] (shell) New function.
7588 (run_command) New function.
7589 (cmd_host) New function.
7590 (cmd_new_file) New function.
7592 * expr-prs.c: (parse_primary) Message fix.
7594 * inpt-pgm.c: Formatting fix.
7595 (cmd_reread) Implement the FILE subcommand.
7597 * matrix-data.c: New file.
7599 * q2c.c: (dump_header) Change output commenting style.
7601 * weight.c: Comment fix.
7603 Tue Jan 13 00:53:39 1998 Ben Pfaff <blp@gnu.org>
7605 * aggregate.c: (buf64_10x) Renamed buf64_1xx, all references
7607 (buf_10x) Renamed buf_1xx, all references changed.
7608 (cmd_aggregate) Implemented cases 010, 011, 110, and 111 (all
7609 cases now implemented).
7610 (create_sysfile) New function.
7611 (agr_11x_func) New function.
7613 * data-in.c: (parse_numeric) Work properly if there's an
7614 explicitly coded decimal point in the data and decimal places are
7615 specified on DATA LIST. Bug reported by Dr Eberhard W Lisse
7616 <el@linux.lisse.na>.
7618 * get.c: (cmd_get, cmd_save_internal) Allow extraneous slash
7619 before file specification on GET, SAVE, XSAVE. Bug reported by Dr
7620 Eberhard W Lisse <el@linux.lisse.na>.
7622 * q2c.c: [!HAVE_STRERROR] Include misc/strerror.c, not
7623 strerror.c. Bug reported by Alexandre Oliva
7624 <oliva@dcc.unicamp.br>.
7626 * sort.c: Include sort.h. Comment fixes. A few esthetic fixes.
7627 (static var separate_case_tab) New var.
7628 (cmd_sort_cases) Cancel temporary transformations here. Free
7629 v_sort before return.
7630 (sort_cases) Run an EXECUTE procedure if SEPARATE is nonzero and
7631 we're reading from a sort stream. Don't cancel temporary
7632 transformations. Offload internal sorting to do_internal_sort().
7633 (do_internal_sort) New function. Handles internal sorting even
7634 when SEPARATE is nonzero. Doesn't free v_sort.
7635 (do_external_sort) Take new arg SEPARATE. Only destroy `x' if
7637 (write_initial_runs) Take new arg SEPARATE. Only destroy the old
7638 sink if SEPARATE is zero.
7639 (read_output_cases) Renamed read_sort_output(), all references
7640 changed. Now uses separate_case_tab when it exists.
7641 (write_separate) New function.
7643 * vfm.c: (page_to_disk) Destroy memory_source_cases, not
7644 memory_sink_cases. Don't redundantly call
7645 vfm_source->destroy_source().
7646 (memory_stream_mode) After switching over, set memory_sink_cases
7649 Sat Jan 10 23:35:51 1998 Ben Pfaff <blp@gnu.org>
7651 * aggregate.c: (struct agr_var) Expand dbl[] array from 2 to 3
7653 (static var prev_case) New, moved out of aggregate_single_case()
7655 (static var buf64_10x, buf_10x) New.
7656 (cmd_aggregate) Initialize prev_case. Comment fixes. Implement
7657 the 000, 001, 100, and 101 cases. Free prev_case.
7658 (parse_aggregate_functions) Disallow scratch variables.
7659 (free_aggregate_functions) Only free agr_dict if non-null. Use
7660 iter->function to determine numeric/string type, not
7662 (aggregate_single_case) Don't manage prev_case. Initialize
7663 aggregate info after dumping it.
7664 (accumulate_aggregate_info) Fix sum, weighted sum, mean, weighted
7665 mean, stddev, weighted stddev definitions.
7666 (dump_aggregate_info) Implemented.
7667 (initialize_aggregate_info) Renamed from
7668 initialize_aggregate_functions(). Initializes dbl[2].
7669 (agr_00x_trns_proc, agr_00x_end_func, write_case_to_sfm,
7670 agr_10x_trns_proc, agr_10x_trns_free, agr_10x_end_func) New.
7672 * cases.c: (alloc_val) Removed.
7674 * get.c: (cmd_save_internal) Initialize new `dict' member.
7676 * sfm-write.c: (sfm_write_dictionary, write_header,
7677 write_variable, write_value_labels, write_documents) Reorganize,
7678 simplify for new parameter structure.
7679 (write_variable) Only one variable * argument now.
7681 * sfm.h: (struct sfm_write_info) Removed `pri', `sec', and
7682 replaced by new `dict' member.
7684 * temporary.c: (new_dictionary) Initialize n_documents.
7686 * vars-atr.c: (dup_variable) Allocate `value's from dict into
7688 (init_variable, replace_variable) Eliminate usage of alloc_val().
7690 * vars-prs.c: (parse_DATA_LIST_vars) Accept PV_NO_SCRATCH option.
7692 * vfm.c: (arrange_compaction) Allow `temporary' value of 2 to
7693 signal that AGGREGATE is to be used for forming final cases.
7694 (close_active_file) Call end_func before stopping lagging. Cancel
7695 temporary after finishing compaction.
7696 (write_case) Comment fixes. Cleaned up.
7697 (compact_case) Let AGGREGATE handle compaction when `temporary' is
7700 Sat Jan 10 02:10:47 1998 Ben Pfaff <blp@gnu.org>
7702 * Makefile.am: (BUILT_SOURCES) Add means.c.
7703 (pspp_SOURCES) Add means.c.
7704 (EXTRA_DIST) Add means.q.
7706 * command.c: (array cmd_table[]) Add MEANS.
7708 * common.h: Esthetic fixes. Comment fixes. Test for
7709 MAX_SHORT_STRING greater than 8.
7710 (macros LOWEST, HIGHEST) New.
7712 * data-in.c, data-list.c, recode.c: Comment fixes.
7714 * means.q: New file, base version.
7716 * mis-val.c: (parse_num_or_range, parse_numeric) Replace -DBL_MAX
7717 with LOWEST, DBL_MAX with HIGHEST.
7719 * q2c.c: (dump_vars) Add an enum to array types giving the number
7720 of values for the enum.
7722 * sfm-read.c: (sfm_read_dictionary, read_machine_flt64_info)
7723 Replace second_lowest_value with second_lowest_flt64.
7725 * sfm-write.c: (write_variable, write_rec_7_34) Replace
7726 second_lowest_value with second_lowest_flt64.
7728 * t-test.q: Comment fix.
7730 * temporary.c: (restore_dictionary) Esthetic fix.
7732 * tokens.h: (force_match_id, force_match, force_string, force_int,
7733 force_num, force_id) Replace msg() with syntax_error().
7735 * var.h: (struct means_proc) New.
7736 (struct variable) Add mns member to `p' union.
7738 * vars-prs.c: (parse_variable, parse_dict_variable,
7739 parse_variables, parse_DATA_LIST_vars) Replace msg() with
7742 Thu Jan 8 22:28:41 1998 Ben Pfaff <blp@gnu.org>
7744 * Makefile.am: (pspp_SOURCES) Add tab.h.
7746 * Most source files: Added a cast to unsigned char in usages of
7747 the ctype is*() functions. Replaced `end of command expected'
7748 calls to msg() with calls to syntax_error().
7750 * frequencies.q: (dump_condensed) Fix tab_dim() column reference.
7752 * lexer.c: (hex_val) Removed (was dead code).
7753 (idmatch) Parenthesize function name to avoid macro expansion.
7755 * postscript.c: Comment fixes.
7756 (ps_preopen_driver) Change default font size to 10pt.
7758 * sfm-read.c: (read_variables) Byteswap sv.print, sv.write as
7760 (parse_format_spec) Change system-file format spec argument type
7761 to int32. Parse the format spec with bitwise operators.
7763 * sfmP.h: (struct sysfile_format) Removed.
7764 (struct sysfile_variable) Changed print, write members from
7765 sysfile_format to int32.
7767 * tokens.h: Esthetic fixes.
7768 [__GNUC__] (macro id_match) New macro to hopefully speed up
7769 identifier matching.
7770 (macros match_id, match_tok, match_int) Implemented in
7771 compiler-independent manner; no longer GNU C only.
7773 * vfm.h: Include time.h.
7775 Mon Jan 5 11:06:15 1998 Ben Pfaff <blp@gnu.org>
7777 * data-list.c: (dump_fixed_table) Change tab_dim().
7779 * dump-sysfile.c: (open_sysfile) Fix mmap() call.
7781 * error.c: Include command.h.
7783 * frequencies.g: Formatting fixes.
7785 * frequencies.q: Add tab_dim() calls. Make the total cell a
7788 * glob.c: Include command.h.
7790 * sfm-read.c: (struct sfm_fhuser_ext) New members sysmis, highest,
7792 (sfm_read_dictionary) Initialize sysmis, highest, lowest.
7793 (sfm_read_machine_flt64_info) Update sysmis, highest, lowest.
7794 (read_variables) Byteswap sv.type; byteswap sv.print, sv.write as
7795 the other elements (is this right?).
7796 (read_variables) Use lowest, highest members.
7797 (parse_format_spec) New arg `vv' for more stringent checking.
7798 (dump_dictionary) Byteswaps nonexplicit data.
7799 (sfm_read_case) Byteswap numeric data.
7801 * som.c: Initialize table_num to 1.
7802 (render_segments) Remember to increment y_index after each table
7805 * sysfile-info.c: (cmd_sysfile_info) Change tab_dim(). Don't call
7806 avl_count() on a NULL tree. No title for the second table.
7807 (cmd_display) Handle DISPLAY VECTORS by calling display_vectors().
7808 Handle AS_SCRATCH as AS_NAMES. Warn if no variables. Re-enable;
7809 fix call to display_variables().
7810 (display_variables) Default to 4 columns, not 3. Set up headers.
7811 Column title is Variable, not Name. Fix index column.
7812 Add joint text. Add tab_dim(). Handle value labels properly.
7813 Handle DISPLAY LABELS properly. Draw boxes correctly.
7814 (describe_variable) Value labels don't need titles. Don't clear
7815 nonexistent index column.
7816 (compare_vectors_by_name) New function.
7817 (display_vectors) New function.
7819 * tab.c: (tab_height) Add assertion.
7820 (tab_null) Add debug code.
7821 (evaluate_dimensions) Add debug code.
7823 * var.h: (struct variable) get_proc data is sometimes used
7824 simultaneously with other per-procedure info, therefore it was
7825 removed from the union. All references changed.
7827 Sun Jan 4 18:13:33 1998 Ben Pfaff <blp@gnu.org>
7829 * ascii.c: (ascii_close_page) Put title on second line of headers
7830 if there is no subtitle.
7832 * command.c: (glob var cur_proc) Move definition here, from
7834 (cmd_remark) Emit blank line before remarks.
7836 * command.h: (glob var cur_proc) Move declaration here, from
7839 * data-list.c: (dump_fixed_table) Fix messages.
7840 (dump_free_table) Call tab_nat_dim().
7842 * descript.q: (dump_z_table) Modify tab_dim() call.
7844 * frequencies.q: (dump_condensed, dump_statistics) Add tab_dim()
7846 (dump_statistics) Don't output header.
7848 * groff-font.c: Minor format fix.
7850 * html.c: Comment fix.
7852 * list.q: (write_varname) Indent after advancing page.
7854 * output.h: Minor reordering.
7856 * postscript.c: Comment fixes. Many places, '\n' was replaced by
7857 a reference to eol[].
7858 (struct ps_driver_ext) New member eol[].
7859 (ps_preopen_driver) Initialize eol[].
7860 (ps_postopen_driver) Fix sense of text for text_opt, line_opt
7861 defaults. Handle headers. Fix test for minimum page length.
7862 (static var option_tab[]) Add `line-ends'.
7863 (ps_option) Handle line-ends to change eol[].
7864 (postopen) Scale prop_em_width and fixed_width properly. Set the
7865 prologue title to outp_title if applicable. Replace the prologue
7866 line ends with eol[]. Call draw_headers() if headers are enabled.
7867 (text_width) New function.
7868 (out_text_plain) New function.
7869 (draw_headers) New function.
7871 * print.c: (dump_table) Call tab_nat_dim().
7873 * som.c: (som_blank_line) Only advance a line if not at the top of
7875 (som_submit) Move several informational table calls here.
7876 Increment subtable_num if SOMF_NO_TITLE not set.
7877 (output_table) Advance a line if SOMF_NO_SPACING not set.
7878 (render_columns, render_segments, render_simple) Handle spacing
7879 between tables. Handle table titles. Remove debug output.
7881 * som.h: (SOMF_*) New enum series.
7882 (struct som_table_class) New member `flags'.
7884 * sysfile-info.c: (cmd_sysfile_info) Calls tab_nat_dim(). No
7886 (display_variables) Calls tab_nat_dim().
7887 (describe_variable) Remove restriction on number of value labels.
7888 Make value labels separated by thin lines.
7890 * tab.c: (tab_create) Default `flags' to none.
7891 (tab_float) New arg `w'. All references changed.
7892 (tab_nat_dim) New function.
7893 (tab_output_text) No title or spacing.
7894 (tab_flags) New function.
7895 (tabi_flags) New function.
7896 (tabi_title) New function.
7897 (strip_height) Removed.
7898 (tabi_render) Skip title when necessary.
7899 (static var tab_tab_class) Add tabi_flags, tabi_title.
7900 (evaluate_dimensions) Disable display of column, row size.
7901 (sum_columns) Add title height to top header.
7902 (render_strip) Moved within file.
7904 * tab.h: (struct tab_table) New member `flags'.
7906 * vfm.c: (dump_splits) Calls tab_nat_dim(). No title.
7908 Sat Jan 3 16:55:44 1998 Ben Pfaff <blp@gnu.org>
7910 * Most source files: Add `const' attribute in all appropriate
7913 * sysfile-info.c: (cmd_sysfile_info) Add tab_dim() call, add a
7914 column to the variables table for use by describe_variable().
7915 (cmd_display) Disable for the present.
7916 (display_documents) Don't wrap documents.
7917 (display_variables) Table has four columns now.
7918 (describe_variable) Table has four columns now. Don't use a
7919 subtable, use joined cells instead.
7921 * tab.c: (tab_create) Don't set `join'.
7922 (tab_realloc) ct array is not made up of a_string's.
7923 Reallocate trh, hrh, h arrays, initialize trh array. Initialize
7924 cell contents on GLOBAL_DEBUGGING, not DEBUGGING.
7925 (text_format) New function.
7926 (tab_title) Rewritten, uses text_format().
7927 (tab_text) Rewritten, uses text_format().
7928 (tab_joint_text) New function.
7930 (static var hit) New variable.
7931 (render_strip) New args r1, r2. Implement joined cells that fit
7933 (tabi_render) Increment hit. Pass new args to render_strip().
7934 (evaluate_dimensions) [GLOBAL_DEBUGGING] Check for uninitialized
7935 cells. For t_naw and t_nah, ignore joined cells and null cells in
7938 * tab.h: (struct tab_join_rect) Removed.
7939 (struct tab_table) Removed `join'.
7940 (TAB_JOIN_MAIN) Removed.
7941 (struct tab_joined_cell) New struct.
7942 (TAT_NOWRAP) New enum.
7944 Fri Jan 2 01:39:58 1998 Ben Pfaff <blp@gnu.org>
7946 * ascii.c: (ascii_postopen) Replace ASCII_* macros with their
7948 (ascii_postopen_driver) Fix initialization of *_spacing so that
7949 the TAL_0 bit doesn't count.
7951 * data-list.c: (dump_fixed_table) Use natural width for Format
7954 * glob.c: (rerange) Removed.
7955 (get_date) Formatting fixes. Internationalization fix.
7957 * html.c: (html_postopen_driver) Replace HTML_DEFAULT_OUTPUT_FILE
7960 * postscript.c: (ps_postopen_driver) Replace
7961 PS_DEFAULT_OUTPUT_FILE with "pspp.ps".
7963 * som.c: (som_submit) Don't eject page before every table.
7964 (output_table) Fix order of arguments on call to area().
7965 (render_columns) Fix calculation of max_len.
7967 * tab.c: (tabi_cumulate) Minor change to increase elegance.
7968 (render_strip) New function.
7969 (strip_height) New function.
7970 (tabi_render) Rewrite as calls to render_strip().
7972 * tab.h: (TAT_* enums) Removed TAT_RICH, all references removed.
7973 Renumbered TAT_PRINTF, TAT_TITLE, TAT_FIX to correspond better
7974 with the TAB_* and OUTP_T_* constants.
7976 Thu Jan 1 11:53:52 1998 Ben Pfaff <blp@gnu.org>
7978 * Makefile.am: Formatting fixes.
7980 * ascii.c: (ascii_postopen_driver) Initialize *_line_spacing[],
7983 * data-list.c: (dump_fixed_table) Add tab_dim() call.
7985 * descript.q: (dump_z_table, display) Add tab_dim() calls.
7987 * dump-sysfile.c: (glob var length) Make type off_t.
7988 (usage) Fix arguments.
7991 * output.h: (OUTP_T_*) Change constants' value to match tab.h.
7992 Now right-justification is the default so many references had to
7994 (struct outp_class) Removed line_width, all references changed.
7995 (OUTP_DEV_*) Add OUTP_DEV_DISABLED.
7996 (struct outp_driver) Add elements horiz_line_width,
7997 vert_line_width, horiz_line_spacing, vert_line_spacing. Remove
8000 * postscript.c: (outp_encodings) Formatting fixes. Fix garbage
8002 (postopen) Initialize all the informational members of
8005 * som.c: (som_blank_line) New function, renamed from blank_line(),
8006 all references changed.
8007 (som_submit) Disables drivers whose pages can't be opened.
8008 (render_columns, render_simple, render_segments) Add debug output.
8009 (render_columns) Fix loop range.
8010 (render_simple) Don't try to render the headers, they're taken
8011 care of automatically. Advance cp_y past the table when done.
8012 (render_segments) Fix loop ranges.
8014 * tab.c: Initialize new members of tab_table.
8015 (tab_vline) Handle trv[]; don't set style for spacing-only lines.
8016 (tab_hline) Handle trh[]; don't set style for spacing-only lines.
8017 (tab_box) Handle trh[], trv[]; don't set style for spacing-only
8020 (tab_dim) New function.
8021 (tab_col_width) Removed.
8022 (tab_row_height) Removed.
8023 (tab_output_text) Call tab_dim().
8024 (tabi_driver) Call evaluate_dimensions(), sum_columns().
8025 (tabi_area) Implemented.
8026 (tabi_cumulate) Implemented.
8027 (tabi_render) Partially implemented, but broken.
8028 (var tab_table_class) Made static.
8029 (evaluate_dimensions) New function.
8030 (sum_columns) New function.
8032 * tab.h: (enum t_*) Now start at t_end. New: t_ptw, t_nr, t_nc,
8033 t_nah, t_naw, t_neg, t_xch, t_dup, t_lbl, t_jnz, t_sac, t_sar,
8034 t_scr, t_srr, t_sentinel. Removed: t_nat.
8035 (struct tab_table) New: wl, wr, ht, hb, trh, hrh, trv, wrv, dim,
8036 max_stack_height, w, h. Removed: ce, re.
8037 (macro blank_line) Removed.
8038 (glob var zero_length) Removed.
8040 Fri Dec 26 15:44:31 1997 Ben Pfaff <blp@gnu.org>
8042 * Most source files: include some of the new include files broken
8045 * Makefile.am: (pspp_SOURCES) Add all the new source files to the
8048 * aggregate.c: (glob var outfile) Make static.
8050 * command.c: (glob var pgm_state) Move here.
8052 * common.c: (glob vars endian, second_lowest_value, pgmname,
8053 finished, curdate, cur_proc, start_interactive, history_file) Move
8056 * descript.q: (structs dsc_z_score, descriptives_trns) Move here.
8058 * file-handle.q: (glob vars files, inline_file) Move here.
8060 * glob.c: Lost lots of glob vars, detailed in individual file
8062 (init_glob) set_printer, set_screen were obsolete, deleted.
8063 set_cprompt has fewer spaces because pspp has fewer letters than
8066 * inpt-pgm.c: (glob vars inp_init, inp_init_size) Move here.
8067 (inp_nval) Made static.
8069 * lexer.c: (glob vars token, tokval, tokstr, tokstr_size,
8070 tokstr_len, toklongstr, tokint) Move here.
8072 * misc.c: Lost several vars and functions.
8074 * set.q: (all the set_* variables) Move here.
8076 * str.c: (strmaxcpy, strbarepadcpy, strbarepadlencpy, strpadcpy,
8077 blpstrset, strpadcmp, memrev, memrmem, cmp_str) Move here from
8080 * tab.c: (set_expr, tab_col_width, tab_row_height) New functions.
8082 * tab.h: (enum series t_*) New enums.
8083 (struct tab_table) Use arena struct tag. New members ce, re.
8085 * tokens.h: Comment fixes.
8087 * var.h: Move lots of enums and variables and functions and
8088 structures to other files. Use and declare a lot more union and
8089 struct tags. Comment fixes.
8091 * vector.c: (glob vars vec, nvec) Move here.
8093 * vfm.c: (glob vars reinit_sysmis, reinit_blanks, init_zero,
8094 init_blanks, last_vfm_invocation) Move here.
8096 * cases.h: New file.
8097 (struct long_vec) Move here.
8098 (vec_init, vec_clear, vec_insert, vec_delete, devector, envector)
8101 * command.h: New file.
8102 (STATE_* enums) Move here.
8103 (glob var pgm_state) Move here.
8105 * format.c: New file.
8106 (glob var formats) Move here.
8107 (parse_format_specifier_name, fmt_to_string,
8108 check_input_specifier, check_output_specifier,
8109 check_string_specifier, convert_fmt_ItoO, parse_format_specifier)
8112 * format.h: New file. Move functions now in format.c here.
8113 (FMT_* enums) Move here.
8114 (struct fmt_desc) Move here.
8115 (FCAT_* enums) Move here.
8116 (struct fmt_spec) Move here.
8117 (glob vars formats, fmt_parse_ignore_error) Move here.
8119 * inpt-pgm.h: New file.
8120 (INP_* enums) Move here, make #defines into enums.
8121 (glob vars inp_init, inp_init_size) Move here.
8124 (glob vars v_sort, nv_sort) Move here.
8125 (sort_cases, read_sort_output) Move here.
8127 * vector.h: New file.
8128 (struct vector) Move here, add struct tag.
8129 (glob vars vec, nvec) Move here.
8130 (find_vector) Move here.
8133 (glob vars last_vfm_invocation, temp_case, reinit_sysmis,
8134 reinit_blanks, init_zero, init_blanks) Move here.
8135 (struct case_stream) Move here.
8136 (glob vars vfm_source, vfm_sink, vfm_memory_stream,
8137 vfm_disk_stream, sort_stream, data_list_source,
8138 input_program_source, file_type_source, get_source, n_lag) Move
8140 (procedure, write_case, lagged_case, compact_case, page_to_disk)
8143 Wed Dec 24 22:40:42 1997 Ben Pfaff <blp@gnu.org>
8145 * Makefile.am: (pspp_SOURCES) Added html.c, som.c, som.h.
8146 (LDADD) Add libdcdflib.
8148 * ascii.c: Comment and formatting fixes. Almost every external
8149 function had an assert added, checking driver_open and page_open.
8150 (ascii_init_driver) Broken into ascii_preopen_driver,
8151 ascii_postopen_driver, ascii_close_driver. Manages driver_open.
8152 (ascii_open_page) Sets page_open.
8153 (ascii_close_page) Clears page_open.
8155 * html.c: Comment and formatting fixes. Almost every external
8156 function had an assert added, checking driver_open and page_open.
8157 (html_init_driver) Broken into html_preopen_driver,
8158 html_postopen_driver, html_close_driver. Manages driver_open.
8159 (html_open_page) Sets page_open.
8160 (html_close_page) Clears page_open.
8161 (html_submit) Disabled.
8163 * lexer.c: (parse_string) Remove debugging printf.
8165 * list.q: (determine_layout) Open a page if one is not yet open.
8167 * output.c: Comment fixes.
8168 (add_class) Set the class member of the new list element.
8169 (parse_options) Don't handle device type.
8170 (colon_tokenize) New function.
8171 (configure_driver) New four-field format with a field for device
8172 type. Now initialize driver_open, page_open, next, and prev
8173 fields. Use new colon_tokenize() function. Don't do a memory
8174 copy to replace a driver, it doesn't work; instead delete the old
8175 driver and insert a new one.
8176 (destroy_driver) Don't call som_destroy_driver(). Close the page
8177 if it's open. Find the class in the list of classes and decrement
8178 that reference count. Remove the driver from the global driver
8180 (outp_iterate_enabled_drivers) Renamed outp_drivers(). All
8181 references changed. Rewritten. Don't return a driver that's not
8183 (outp_eject_page) All references to som_internal_eject_page()
8184 changed to use this. Sets cp_x to 0 as well as cp_y.
8186 * output.h: (OUTP_I_* enums) Removed.
8187 (struct som_submission_form) Removed.
8188 (struct outp_class) init_driver broken into preopen_driver,
8189 postopen_driver, and close_driver. submit changed to take a
8192 * postscript.c: Comment and formatting fixes. Almost every
8193 external function had an assert added, checking driver_open and
8195 (ps_init_driver) Broken into ps_preopen_driver,
8196 ps_postopen_driver, ps_close_driver. Manages driver_open.
8197 (ps_open_page) Sets page_open.
8198 (ps_close_page) Clears page_open.
8200 * som.c: New file, base implementation.
8202 * som.h: (struct som_table) Add struct tag.
8203 (enum SOM_COL_ACROSS) Removed.
8204 (SOM_ROWS, SOM_COLUMNS) New enums.
8205 (struct som_table_class) Add member `cumulate'. Remove `segment';
8206 change `render' arguments.
8207 (struct som_point, struct som_rect) Removed.
8208 (som_submit_table) Fixed typo, should have been som_submit.
8210 * sysfile-info: (describe_variable) Don't try to insert a
8211 subtable; just destroy it for now.
8213 * t-test.q: Include dcdflib/cdflib.h instead of cdflib.h. Fix
8214 references to value labels.
8216 * tab.c: (tab_destroy) New function.
8217 (tab_columns) Change argument.
8218 [0] (tab_submit) Remove dead code.
8219 (tab_title) Allocate string from the table's arena.
8220 (tab_output_text) Only free the buffer if we allocated it.
8221 (tab_submit) New function.
8222 (static vars t, d) New static vars.
8223 (tabi_table, tabi_driver, tabi_count, tabi_area, tabi_columns,
8224 tabi_headers, tabi_cumulate, tabi_render) New functions.
8225 (glob var tab_table_class) New global var.
8227 * tab.h: (struct tab_join_rect) Don't use a som_rect; directly
8228 encapsulate the rectangle. All references changed.
8230 Sun Dec 21 16:18:58 1997 Ben Pfaff <blp@gnu.org>
8232 * All header files updated to use struct tags in addition to
8233 typedefs for all structures. Don't use word `struct' in struct
8236 * Makefile.am: (pspp_SOURCES) Remove html.c.
8237 (INCLUDES) Replace the lib/* includes with a single lib/ include;
8238 all references updated.
8240 * command.c: (parse_cmd) Remove call to som_check_workspace.
8241 (output_line) Update to new som.
8243 * data-in.c: (parse_numeric) A single dot is not an error; it is
8244 the system-missing value.
8246 * data-list.c: (dump_fixed_table, dump_free_table) Update to new
8249 * data-out.c: Added `const' as appropriate to many prototypes.
8250 (convert_E, convert_F, convert_CCx) Take double argument instead
8251 of value * argument.
8252 (convert_format_to_string) Call changed functions appropriately.
8253 Instead of modifying the caller's value for FCAT_SHIFT_DECIMAL,
8254 make a local copy of the value.
8256 * descript.q: Remove custom_variables() prototype now provided by
8258 (custom_variables) Don't increment sbc_variables, the caller does
8260 (dump_z_table, display) Update to new som.
8262 * error.c: (vmsg) Add const to prototype. Remove code to handle
8263 `too many errors' condition.
8264 (check_error_count) New function.
8265 (msg) Add const to prototype.
8267 * filename.c: (open_file) Rewrite for elegance.
8269 * frequencies.q: Remove custom_*() prototypes now provided by q2c.
8270 (dump_full, dump_condensed, dump_statistics) Update for new som.
8272 * list.q: Don't include somP.h. Change all references to
8273 som_driver_ext to refer to the new members of som_driver. Change
8274 som_internal_eject_page() references to outp_eject_page().
8276 * main.c: (parse) Rewrite for elegance. Add call to
8277 check_error_count().
8279 * output.c: (add_class, outp_list_classes, outp_configure_driver)
8280 Rewrite or revise for new outp_driver_class_list structure.
8281 (outp_iterate_enabled_drivers) Fix comparison between disabled
8282 devices and current device type.
8283 (outp_eject_page) New function.
8285 * output.h: Comment fixes.
8286 (struct outp_driver) New members driver_open, page_open, cp_x,
8287 cp_y, font_height, prop_em_width, fixed_width. Deleted members
8289 (struct outp_driver_class_list) New struct.
8290 (outp_class_list) Changed to type outp_driver_class_list; all
8293 * print.c: (dump_table, print_trns_proc) Updated for new som.
8295 * q2c.c: (dump_vars) Simplify array subcommand code. Declare
8296 prototypes for custom subcommands.
8297 (dump_subcommand) Always include the `else'.
8298 (dump_parser) Fix comments in output code.
8300 * set.q: Reordered functions.
8302 * som-frnt.c, som-high.c, som-low.c, somP.h: Removed.
8304 * som.h: Rewritten from scratch.
8306 * str.h: Remove dead code.
8308 * tab.c, tab.h: New files, base implementation.
8310 * sysfile-info.c: (cmd_sysfile_info, describe_variable) Update to
8313 * t-test.q: New code from John Williams
8314 <johnr.williams@stonebow.otago.ac.nz>. Include math.h, cdflib.h.
8315 Many many new static vars and defines.
8316 (precalc, postcalc, g_postcalc, z_postcalc, t_pairs, t_groups,
8317 groups_calc, pairs_calc, z_dev_calc, z_calc) New functions.
8318 (struct value_list) New struct.
8319 (variance, covariance, pooled_variance, oneway, pearson_r, f_sig,
8320 t_crt, t_sig, print_t_groups) New functions.
8321 (cmd_t_test) Implemented.
8323 * temporary.c: (cancel_temporary) Only free the temp_dict if it's
8326 * vfm.c: (dump_splits) Update to new som.
8328 Thu Dec 4 23:02:22 1997 Ben Pfaff <blp@gnu.org>
8330 * Makefile.am: (fiasco_SOURCES) Add html.c.
8332 * aggregate.c: Base source.
8334 * ascii.c: (postopen, preclose) Reformat.
8336 * data-out.c, expr-evl.c: Comment fixes.
8338 * filename.c: (open_file) When opening a file for writing, use
8339 line buffering instead of full buffering for better interactive
8340 performance. Suggested by Valerio Aimale
8341 <valerio@svpop.com.dist.unige.it>. Also, recognize special file
8342 names `stdin', `stdout', `stderr'.
8344 * groff-font.c: Comment fixes.
8346 * html.c: New file; base version.
8348 * list.q: (write_all_headers, clean_up, determine_layout,
8349 list_cases) Ignore `special' devices for now. Needs to be fixed
8352 * output.c: (outp_init) Add html driver to list; reverse list
8355 * output.h: (struct outp_class_struct) New members `special',
8356 `submit'; comment fixes. All references changed.
8358 * postscript.c: (ps_init_driver) Make defaults for text_opt,
8359 line_opt depend on whether the OUTP_DEV_SCREEN bit is set on the
8361 (postopen) Comment fix.
8362 (preclose) Comment fixes, formatting fixes. Change x->file.file
8363 references to more proper f->file.
8365 * som-high.c: (som_submit_table) Special classes use their own
8368 * som.h: Comment fixes.
8370 * temporary.c: (new_dictionary) Don't try to xstrdup() a NULL
8373 Tue Dec 2 14:36:07 1997 Ben Pfaff <blp@gnu.org>
8375 * Makefile.am: (fiasco_SOURCES) Add aggregate.c back in.
8377 * aggregate.c: Still working on this.
8379 * command.c: (cmd_table[]) Add AGGREGATE back in.
8380 (split_words) Make '-' a legal word separator as well as ' '.
8382 * main.c: Comment fixes.
8384 * q2c.c: (dump_parser) Don't require the procedure's full name to
8385 be present, in the generated source.
8387 * t-test.q: Change name to `t-test' from `t test'. Let PAIRS be
8388 multiply specified and let it be default; let MISSING, CRITERIA,
8389 FORMAT be multiply specified.
8390 (cmd_t_test) Parse command name. [DEBUGGING] Call debug_print().
8391 (custom_groups) Fix defaults.
8392 (custom_pairs) Check whether this is a PAIRS subcommand before
8393 attempting to parse. Better garbage collection. Proper storage
8395 [DEBUGGING] (debug_print) New function.
8397 * temporary.c: Comment fixes.
8398 (copy_variable) Don't copy variable name and index.
8399 (save_dictionary) Copy variable name and index by hand.
8401 * vars-atr.c: Comment fixes.
8402 (create_variable) New dictionary argument. All references
8404 (common_init_stuff) New dictionary argument. All references
8406 (init_variable) New dictionary argument. All references changed.
8407 (dup_variable) New function.
8409 * vars-prs.c: (parse_variables) If there are any errors, we always
8410 return 0. Previously, it was possible for some types of errors to
8413 Sat Nov 22 01:20:59 1997 Ben Pfaff <blp@gnu.org>
8415 * Makefile.am: (fiasco_SOURCES) For 0.1.5 release, remove
8418 * command.c: (cmd_table[]) Comment out AGGREGATE; add T TEST.
8420 * list.q, t-test.q: Remove ALL option from VARLIST declaration in
8423 * q2c.c: Comment fixes.
8424 (SBC_* enums) Remove SBC_VARLIST_ALL; all references removed.
8426 * t-test.q: (cmd_list) Rename cmd_t_test.
8428 * temporary.c: (new_dictionary) Don't declare as static.
8430 Fri Nov 21 00:03:06 1997 Ben Pfaff <blp@gnu.org>
8432 * aggregate.c: Changes, still not finished.
8434 * file-handle.q, frequencies.q, list.q, set.q: Comment fixes.
8436 * q2c.c: Comment fixes. Now its output is internationalized.
8437 (get_token) Fix parsing of escapes within literal strings.
8438 (main) Fix bad #line directives in output.
8440 * t-test.q: Base implementation.
8442 * temporary.c: (new_dictionary) New function.
8443 (restore_dictionary) [__CHECKER__] Change fill character to *
8446 Sun Nov 16 01:29:57 1997 Ben Pfaff <blp@gnu.org>
8448 * Makefile.am: (BUILT_SOURCES, fiasco_SOURCES) Add t-test.c
8450 * aggregate.c: Changes, still not finished.
8452 * descript.q, list.q: Comment fixes.
8454 * q2c.c: Almost completely rewritten.
8456 * t-test.q: New file, not complete.
8458 Fri Nov 14 00:14:48 1997 Ben Pfaff <blp@gnu.org>
8460 * aggregate.c: Changes, still not finished.
8462 * sort.c: (sort_cases) Call cancel_temporary() instead of doing it
8465 * temporary.c: (cancel_temporary) New function.
8467 * vars-atr.c: (discard_variables) Call cancel_temporary() instead
8468 of doing it by hand.
8470 * vfm.c: (close_active_file) After restoring a TEMPORARY
8471 dictionary, set temp_dict to NULL. Cancel TEMPORARY through
8473 (SPLIT_FILE_procfunc) Comment fix.
8475 Tue Oct 28 16:08:45 1997 Ben Pfaff <blp@gnu.org>
8477 * Makefile.am: (fiasco_SOURCES) Add aggregate.c.
8479 * aggregate.c: New file, not finished yet.
8481 * command.c: (cmd_table) Add AGGREGATE.
8483 * common.h: (pgm_state) Move declaration to var.h.
8485 * lexer.c: (bin_value_func, oct_value_func, hex_value_func) i18n
8487 (parse_string) Message fix.
8489 * recode.c: Comment fix.
8491 * sfm-read.c: (read_variables) Code esthetic fixes.
8492 (write_header) Default date is `Jan', not `JAN'.
8494 * sfmP.h: (bswap_int32) [!__linux__] Fix off-by-one errors.
8496 * sort.c: (cmd_sort_cases) Farm the work out to new function
8497 parse_sort_variables().
8498 (parse_sort_variables) New function.
8499 (sort_cases) New function. Cancels temporary transformations,
8500 which sorting didn't do previously.
8501 (cmd_sort_cases) Better garbage collection on error. Uses
8503 (write_initial_runs, merge_once) Improved code esthetics.
8504 (sort_stream_read) Reduced to one call to read_output_cases().
8505 (read_output_cases) New function.
8507 * var-labs.c: (cmd_variable_labels) Re-enabled truncation of
8508 variable labels to 120 characters.
8510 * var.h: Comment fixes.
8511 (glob var pgm_state) From common.h.
8513 * vars-atr.c: (discard_variables) Set pgm_state to STATE_INIT.
8515 * vars-prs.c: (parse_DATA_LIST_vars) Support PV_SINGLE in
8516 options. Set *names to NULL on error.
8518 * vfm.c: (memory_stream_init) Assert compaction_nval != 0.
8520 Thu Oct 9 09:59:49 1997 Ben Pfaff <blp@gnu.org>
8522 * sfm-write.c, vfm.c: [HAVE_UNISTD] #include <unistd.h>, needed by
8523 SunOS4. From Alexandre Oliva <oliva@dcc.unicamp.br>.
8525 Wed Oct 8 18:55:24 1997 Ben Pfaff <blp@gnu.org>
8527 * vfm.c: (page_to_disk) Added missing local variables.
8529 Tue Oct 7 20:23:17 1997 Ben Pfaff <blp@gnu.org>
8531 * get.c: Comment fix.
8533 * sort.c: (cmd_sort_cases) Attempt to perform internal sort if the
8534 source is anything other than a disk stream, not just if it's in a
8535 memory stream. Call page_to_disk() before external sort.
8536 (allocate_cases) Message fix.
8538 * vfm.c: (prepare_for_writing) Warn user when paging workspace to
8540 (page_to_disk) New function.
8542 Sun Oct 5 15:56:14 1997 Ben Pfaff <blp@gnu.org>
8544 * Makefile.am: (INCLUDES) Include .. instead of $(top_srcdir).
8546 * common.h: (macro strerror) Remove. From Alexandre Oliva
8547 <oliva@dcc.unicamp.br>.
8549 * get.c: (dict_delete_run) The number of variables to delete is
8550 not necessarily the number of variables that need to be shifted
8552 (trim_dictionary) Don't set *options to 0. Fix bug that caused
8553 too many variables to be deleted.
8555 * postscript.c: Comment fix.
8557 * q2c.c: Include strerror.c. From Alexandre Oliva
8558 <oliva@dcc.unicamp.br>.
8560 * set.q: #undef ON and OFF. From Alexandre Oliva
8561 <oliva@dcc.unicamp.br>.
8563 * sfm-read.c: (sfm_read_dictionary) Don't set the file class too
8564 early, otherwise errors cause a bad free().
8566 * str.h: (macro nvsprintf) s/FORMATS/FORMAT/ typo. From Alexandre
8567 Oliva <oliva@dcc.unicamp.br>.
8569 * temporary.c: (save_dictionary) Don't allocate memory if
8572 * vfm.c: (memory_stream_write) Message fix.
8574 Sat Oct 4 16:20:43 1997 Ben Pfaff <blp@gnu.org>
8576 * command.c: (static var cmd_table[]) Define REPEATING DATA
8579 * common.h: Added support for broken systems that are missing
8580 EXIT_SUCCESS, EXIT_FAILURE, RAND_MAX, and/or strerror().
8582 * Many source files: Replace syntax error messages via msg() with
8583 call to syntax_error().
8585 * data-list.c: (dump_fixed_table) Add support for dumping table
8586 for REPEATING DATA as well as DATA LIST FIXED.
8587 (cmd_repeating_data) Allows and requires `/' between subcommands.
8588 Does proper thing with allowing rpd.starts_end to stay 0. Allows
8589 CONTINUED specifications to be omitted. Forces CONTINUED to be
8590 specified if ID is. Calculates starts_end, cont_end from logical
8591 record length as reported by fhp. Calls dump_fixed_table() if
8592 requested. Fixed length of record copied by memcpy.
8593 (parse_num_or_var) Sets `num' to 0, not NOT_INT, for variables.
8595 (realize_value) Returns sensible value for out-of-range variable
8597 (rpd_parse_record) New argument `ofs'. Fixed confusion between
8598 length of occurrences and length of line. Added warning for
8599 fields that exceed the line length. Fixed infinite loop.
8600 (read_one_set_of_repetitions) Numerous minor changes for more
8601 complete SPSS compliance. Message fixes.
8603 * dfm.c: (dfm_close) If the file being closed is the inline file,
8604 read all the remaining data before closing it.
8605 (dfm_get_record) Don't close the file on lossage, as either it
8606 has been closed already or it doesn't belong to us.
8608 * error.c: (puts_stdout) New function.
8609 (vmsg) Use puts_stdout instead of puts.
8611 * file-handle.q: (fh_record_width) New function.
8613 * inpt-pgm.c: (init_case) Fixed buffer overrun when inp_nval % 4
8616 (input_program_source_read) Made an old kluge an approved method.
8618 * lexer.c: (syntax_error) New function.
8620 * misc.c: [BROKEN_RAND] (ansi_rand, ansi_srand; static var next)
8623 * output.c: (oupt_get_paper_size) Message fix.
8625 * q2c.c: Numerous fixes to formatting of generated code made to
8626 conform to GNU coding standards. Uses syntax_error() in generated
8627 code. Other miscellaneous generated message fixes. Added support
8628 for broken systems that are missing EXIT_SUCCESS, EXIT_FAILURE,
8629 RAND_MAX, and/or strerror().
8631 Sat Oct 4 02:09:56 1997 Ben Pfaff <blp@gnu.org>
8633 * data-in.c: Comment fixes.
8635 * data-list.c: (struct repeating_data_trns) New member `id_spec'.
8636 (find_variable_input_spec) New function.
8637 (cmd_repeating_data) Initializes id_spec.
8638 (rpd_parse_record) Implemented.
8639 (read_one_set_of_repetitions) Returns -3 by default in order to
8640 kluge out some potential bugs.
8642 * data-out.c: Comment fixes.
8644 * file-type.c: (internal_cmd_record_type) Message fix.
8646 * inpt-pgm.c: (input_program_source_read) Special temporary kluge
8647 for handling -3 return value.
8649 Sat Sep 20 23:58:15 1997 Ben Pfaff <blp@gnu.org>
8651 * data-list.c: Comment fixes.
8652 (struct dls_var_spec) Reordered members.
8653 (read_from_data_list_fixed) Restructured.
8654 (struct repeating_data_trns) Reordered members. Renamed `starts'
8655 as `starts_beg', `ends' as `starts_end'.
8656 (cmd_repeating_data) Calculates length of repeated data if
8657 necessary and possible.
8658 (parse_num_or_var) Don't allow string variables.
8659 (realize_value) New function.
8660 (rpd_msg) New function.
8661 (rpd_parse_record) New function. Currently stubbed out.
8662 (read_one_set_of_repetitions) Implemented.
8664 * inpt-pgm.c: (input_program_source_read) Comment fix.
8666 Thu Sep 18 21:34:57 1997 Ben Pfaff <blp@gnu.org>
8668 * command.c: (cmd_end_repeat_p) Removed.
8669 (init_cmd_parser) Doesn't set cmd_end_repeat_p.
8670 (parse_cmd_name) Removed.
8672 * data-list.c: Comment fixes.
8673 (data_list_pgm) Removed `eof' member.
8674 (static var first) New var.
8675 (cmd_data_list) Sets `first'. Ensures that DATA LIST uses the
8676 FILE TYPE file inside FILE TYPE structures.
8677 (append_var_spec) Appends to *first, not dls.spec.
8678 (parse_fixed) Message fixes.
8679 (struct rpd_num_or_var) New.
8680 (struct repeating_data_trns) New.
8681 (static var rpd) New.
8682 (cmd_repeating_data) New function.
8683 (parse_num_or_var) New function.
8684 (parse_repeating_data) New function.
8685 (read_one_set_of_repetitions) New function.
8687 * file-type.c: (cmd_file_type) Message fixes. Always
8688 default_handle to FILE TYPE file handle.
8689 (internal_cmd_record_type) Message fixes.
8691 Wed Aug 20 14:22:03 1997 Ben Pfaff <blp@gnu.org>
8693 * repeat.c: Comment fix. Disable debugging.
8695 * temporary.c: (restore_dictionary) Sets splits to NULL and
8696 n_splits to 0 before destroying the variables because now doing
8697 this tries to remove split variables.
8699 * vars-atr.c: (discard_variables) Asserts that n_splits is 0 after
8700 destroying the dictionary.
8701 (clear_variable) Removes a variable from splits after destroying
8704 Mon Aug 18 18:06:55 1997 Ben Pfaff <blp@gnu.org>
8706 * cmdline.c: (set_compat) Removed.
8707 (pick_compat) Removed.
8708 (parse_command_line) Removed -c option.
8709 (pre_syntax_message) Removed -c option.
8710 (usage) Remove compatibility code.
8712 * common.h: (macros VER_PC, VER_WND, VER_X) Removed.
8713 (glob var compat) Removed.
8715 * compute.c: (type_check) Fixed messages about type mismatches.
8717 * data-list.c: (cmd_data_list) Removed compatibility code.
8718 (fixed_parse_compatible) Calls convert_negative_to_dash().
8719 Fixed bug where it only set the variable in fx.spec if it created
8720 the variable itself.
8721 (dump_fmt_list) Spelling fix.
8722 (cut_field) Removed compatibility code.
8724 * dfm.c: (cmd_begin_data) Don't require a command terminator on
8727 * expr-evl.c: (evaluate_expression) Implement LAG.
8729 * expr-prs.c: (parse_add) Calls convert_negative_to_dash().
8730 (parse_neg) Calls convert_negative_to_dash().
8731 (LAG_func) Increases n_lag to the lag requested. Fixed assignment
8734 * expr.h: (struct expression_struct) Removed member max_lag.
8736 * file-type.c: (parse_col_spec) Calls convert_negative_to_dash().
8737 (internal_cmd_record_type) Removed special handling to produce
8738 negative numbers from dash tokens.
8740 * getline.c: (static var DO_REPEAT_level) New var.
8741 (getl_add_DO_REPEAT_file) Increments DO_REPEAT_level.
8742 (handle_line_buffer) Copies the line into getl_buf; doesn't call
8743 copy_with_DO_REPEAT_substitutions().
8744 (getl_read_line) Maintains value of getl_mode. Calls
8745 perform_DO_REPEAT_substitutions() whenever DO_REPEAT_level is
8747 (getl_close_file) Decrements DO_REPEAT_level when appropriate.
8749 * getline.h: (getl_mode) New glob var.
8751 * glob.c: Comment fixes.
8752 (init_glob) Restructured. Sets set_seed.
8753 (init_compat_dependent) Removed. All references removed.
8754 (get_date) Format changed from MM/DD/YY to DD MMM YYYY.
8755 (__htonl, __htons) Removed. (What were these for?)
8757 * lexer.c: (static var tbl) Dash set to class CNUM.
8758 (make_hexit) New function from data-out.c.
8759 (get_token_representation) Rewritten.
8760 (convert_negative_to_dash) New function.
8761 (lex_init_compat_dependent) Removed.
8762 (yylex) A dash is parsed as part of a number if it is followed by
8763 a digit. The ASCII representation of a number is copied to
8764 tokstr. String parsing farmed out to parse_string(). Comment
8766 (bin_value_func, oct_value_func, hex_value_func, parse_string) New
8768 (preprocess_line) Line processing depends on interactive/batch
8769 mode, not on compatibility mode. Removed PC+ compatibility code.
8771 * loop.c: (loop_3_trns_proc) Comment fix.
8773 * main.c: Remove dead code.
8774 (main) Remove call to init_compat_dependent().
8776 * misc.c: (convert_fmt_ItoO) Make E format conversion more
8779 * print.c: (parse_string_argument) Calls
8780 convert_negative_to_dash().
8781 (fixed_parse_compatible) Calls convert_negative_to_dash().
8783 * repeat.c: (RPT_* defines) Removed.
8784 (struct rpt_numeric) Removed.
8785 (struct repeat_entry) New member type, changed `replacement' from
8787 (clean_up) Deallocation adapted to new repeat_entry.
8788 (internal_cmd_do_repeat) `type' defaults to 0. Remove lookahead()
8789 usage. Creates vars for `type' of 1.
8790 (parse_ids) Sets type of 1. Adapted to new repeat_entry.
8791 (store_numeric) Rewritten, new interface.
8792 (parse_numbers) Rewritten.
8793 (parse_strings) Rewritten.
8794 (find_DO_REPEAT_substitution) New function.
8795 (perform_DO_REPEAT_substitutions) New function.
8796 (copy_with_DO_REPEAT_substitutions) Removed.
8797 (debug_print) Rewritten.
8799 * set.q: Comment fix.
8800 (custom_results) Removed compatibility code.
8801 (internal_cmd_set) Removed SET EMULATION subcommand. Removed
8804 * sysfile-info.c: (cmd_display) Removed compatibility code.
8806 * tokens.h: Comment fixes.
8807 (token types enum) Removed `toktype' typedef name for this int
8808 type. Removed SUBST. Restructured.
8810 * vars-atr.c: (discard_variables) Sets n_lag to 0.
8812 * vars-prs.c: Comment fix.
8814 * vfm.c: Comment fixes.
8815 (glob var n_lag) New var.
8816 (static vars lag_count, lag_head, lag_queue) New vars.
8817 (procedure) Removed argument nlag.
8818 (setup_lag) New function.
8819 (close_active_file) Discards lagging state.
8820 (lag_case) New function.
8821 (lagged_case) New function.
8822 (write_case) Lags a case if lagging.
8824 * weight.c: (cmd_weight) Removed compatibility code.
8826 Sun Aug 17 22:34:40 1997 Ben Pfaff <blp@gnu.org>
8828 * getline.h: (struct getl_script) New members loop_index, macros.
8830 * getline.c: (getl_add_file) Sets first_line field to NULL.
8831 (getl_add_DO_REPEAT_file) New function.
8832 (handle_line_buffer) When the current line's length is negative,
8833 set the filename and line number. Increment line number after
8834 reading line. Pass the line to
8835 copy_with_DO_REPEAT_substitutions() for processing.
8836 (getl_close_file) Free DO REPEAT lines before freeing the
8837 filename, and just set the filename to NULL when doing this,
8838 because otherwise the filename gets freed twice.
8840 * glob.c: (glob var queuing) Removed. All references removed.
8842 * lexer.c: Comment fixes.
8843 (get_token_representation) New function.
8845 * repeat.c: Comment fixes.
8846 (struct repeat_entry) Replaced type and v union members with a
8848 (append_record) New function.
8849 (internal_cmd_do_repeat) Started reforming it for the new
8850 repeat_entry struct. Properly records filename changes in the
8851 getl_line_buf. Fixed improper use of = for ==. Fixed sense of
8852 strncasecmp() result usage. Uses append_record() to simplify.
8853 Properly discards END REPEAT line. Calls getl_add_DO_REPEAT_file
8856 (copy_with_DO_REPEAT_substitutions) Started coding.
8858 [DEBUGGING] (debug_print_lines) New function.
8860 * set.q: (custom_results, internal_cmd_set) s/VER_PCP40/VER_PC/;
8862 * tokens.h: (macro is_id1, is_idn) New macros.
8864 Sat Aug 16 10:57:41 1997 Ben Pfaff <blp@gnu.org>
8866 * cmdline.c: (static var pre_syntax_message) Changed `win'
8867 compatibility mode to `wnd'.
8869 * data-list.c: (fixed_parse_spss) Renamed
8870 fixed_parse_compatible().
8872 * glob.c: (init_glob) Excise unused code for
8873 program_invocation_short_name.
8875 * lexer.c: (preprocess_line) Leading indentors are ignored in Wnd
8878 * print.c: (fixed_parse_spss) Renamed fixed_parse_compatible().
8880 * set.q: `win' compatibility renamed `wnd'.
8882 Thu Aug 14 22:11:12 1997 Ben Pfaff <blp@gnu.org>
8884 * filename.c: [__WIN32__] Change the included Windows header files
8886 (absolute_filename_p) [__MSDOS__] A filename with a colon as the
8887 second character is absolute.
8888 (dirname) Fix logic error. Don't printf() the results.
8889 (prepend_dir) Don't printf() the results.
8891 * getline.c: (handle_line_buffer) New function.
8892 (getl_read_line) Reads line with handle_line_buffer() when
8894 (getl_close_file) Discard line buffer data.
8896 * getline.h: Comment fixes.
8897 (struct getl_line_list) New struct.
8898 (getl_script_struct) Added line buffer members. These are hooks
8899 for use by DO REPEAT to allow it to insert virtual source code
8902 * glob.c: (init_glob) [__DJGPP__ || (__WIN32__ && __BORLANDC__)]
8903 Override Borland C++ stupidity that claims Windows has a console
8906 * repeat.c: This is in the process of being restructured from
8907 using a token-buffering approach to the DO REPEAT facility to
8908 using the more flexible approach of a line-buffering approach in
8909 conjunction with the getline module. Comment fixes.
8910 (struct tok_struct) Removed.
8911 (static vars queue_index, queue_head, queue) Removed.
8912 (static vars line_buf_head, line_buf_tail) New vars.
8913 (internal_cmd_do_repeat) Instead of queuing tokens, queue lines.
8915 (pull_queue, destroy_queue) Removed.
8916 [DEBUGGING] (debug_print_tokens) Removed.
8918 Tue Aug 5 13:57:58 1997 Ben Pfaff <blp@gnu.org>
8920 * file-handle.q: (prepend_current_directory) New function.
8921 (internal_cmd_file_handle, fh_get_handle_by_filename) Prepends
8922 current directory before normalizing filename.
8924 * filename.c: (gnu_getcwd) New function.
8925 (absolute_filename_p) New function.
8926 (search_path) New argument, PREPEND. All references changed to
8927 pass NULL except those explicitly mentioned. Uses
8928 absolute_filename_p(). Prepends PREPEND before trying the
8930 (dirname, prepend_dir) New functions.
8932 * getline.c: (getl_get_current_directory) New function.
8933 (getl_include) Passes getl_get_current_directory() as PREPEND arg
8936 Sun Aug 3 11:42:36 1997 Ben Pfaff <blp@gnu.org>
8938 * In several source files, the term `script' was replaced with
8939 `syntax file' inside error messages. Usage of the term `script'
8940 in the sense of a syntax file is now deprecated.
8942 * cmdline.c: (static vars pre_syntax_message, post_syntax_message)
8945 * dump-sysfile.c: (usage) Update message.
8947 * getline.c: (getl_read_line) Ignore lines beginning with `#!'.
8949 * getline.h: (glob var getl_include_path) Declare extern.
8951 * list.q: Define EXTERN as extern before #including somP.h.
8953 * var.h: Remove declaration of `disptype' variable.
8955 * vfm.c: (close_active_file) After switching the data sink to a
8956 data source, set vfm_sink to NULL, because it doesn't exist any
8959 Thu Jul 17 21:41:44 1997 Ben Pfaff <blp@gnu.org>
8961 * glob.c: [__BORLANDC__] Include math.h. Define _matherr() and
8962 _matherrl() to ignore all math errors.
8964 * sfm-read.c: (read_value_labels) When reading the labels from
8965 disk, read the little parts separately instead of as a struct;
8966 this avoids alignment problems.
8968 * sfm-write.c: (struct sfm_fhuser_ext) New member `elem_type'.
8969 (sfm_write_dictionary) Sets elem_type and frees it on lossage.
8970 (write_header) Allocates and initializes elem_type.
8971 (sfm_write_case) Uses elem_type to determine how to handle each
8973 (sfm_close) Frees elem_type.
8975 * sfmP.h: Comment fix.
8976 [__BORLANDC__] Uses #pragma -a to adjust structure member
8979 Thu Jul 17 01:55:12 1997 Ben Pfaff <blp@gnu.org>
8981 * Makefile.am: (fiasco_SOURCES) Remove display.c.
8983 * common.c: Fix typo.
8985 * dfm.c: (read_record) Remove strncasecmp() emulation and fix the
8986 sense of the condition.
8988 * expr-evl.c: (macro ALLOC_STRING_SPACE) [!PAGED_STACK] Add
8989 line-continuation backslash.
8991 * filename.c: [__WIN32__] Include <windef.h> before <winbase.h>.
8993 * frequencies.q: (custom_grouped, add_percentile) Don't use a
8994 non-constant expression as an argument to sizeof.
8996 * glob.c: [__WIN32__ && __BORLANDC__] When including <conio.h>,
8997 undefine gettext macro because that's a conio function.
8999 * hash.h: (hsh_prime_tab declaration) Remove.
9001 * list.q: (write_fallback_headers) Move `leader' allocation out of
9002 main loop. Change to local_alloc() allocation.
9004 * output.h: Formatting fixes. Put __attribute__ in right place on
9005 function prototypes.
9007 * sfm-read.c: (read_machine_flt64_info, read_variables) Change
9008 incorrect `SECOND_LOWEST_VALUE' references to proper
9009 `second_lowest_value'.
9011 * som-frnt.c: (EXTERN macro) Define as `extern' instead of null
9012 value. This way 2 out of 3 of the som files define the vars
9013 extern, the correct way, that actually works under BC++.
9014 (som_set_float) Don't use nonconstant initializers for a struct.
9016 * som-high.c: Add the standard alloca() header.
9017 (replicate_table) Add prototype.
9019 Merged DISPLAY routine.
9020 * sysfile-info.c: (AS_*) New enum series.
9021 (cmd_sysfile_info) Gutted. Calls describe_variable() to do the
9023 (cmd_display, display_macros, display_documents,
9024 display_variables) Stolen from defunct display.c.
9025 (describe_variable) New function.
9027 * temporary.c: [0] (display_tree) New debug function.
9028 (copy_variable) Performs shallow copy of value labels instead of
9029 deep copy; i.e., just copys the AVL tree and increments the
9032 * val-labs.c: Comment fixes.
9033 (do_value_labels) Optionally skip leading forward slash.
9034 (get_label) Creates only a single value label instead of many
9035 copies of one, and sets the reference count.
9037 * display.c: Removed.
9039 * dump-sysfile.c: New file, not yet complete.
9041 Fri Jul 11 23:02:18 1997 Ben Pfaff <blp@gnu.org>
9043 For lots of source files I added more verbose_msg's. These aren't
9044 listed below as they have tested as being benign. In some cases
9045 these replaced debug_printf() calls.
9047 * output.c: (outp_read_devices) Message fix.
9049 * postscript.c: (output_encodings) Message fix. Reports errors on
9051 (postopen) Message fix.
9053 Fri Jul 11 14:09:40 1997 Ben Pfaff <blp@gnu.org>
9055 * dfm.c: (dfm_close) Don't call fclose() for a NULL FILE.
9057 * filename.c: (close_file_ext) Set f->file to NULL *after* closing
9060 * main.c: Remove <malloc.h> #include.
9062 * mis-val.c: (parse_numeric) Set .f member for each missing[]
9063 instead of trying to just set the missing[] itself, which is a
9066 * sfm-read.c: (read_variables) Same.
9068 * str.h: Add memmem() prototype.
9070 * val-labs.c, var-labs.c: Replace <malloc.h> with <stdlib.h>.
9072 Thu Jul 10 22:13:53 1997 Ben Pfaff <blp@gnu.org>
9074 * Makefile.am: (q2c) Don't include any libraries in the link.
9076 * dfm.c: (force_line_buffer_extension) New macro.
9077 (count_tabs) New function.
9078 (tabs_To_spaces) New function.
9079 (read_record) Calls tabs_to_spaces() on the line being processed.
9081 * q2c.c: Disabled i18n for this proglet so that libintl.a doesn't
9082 have to be compiled twice (once for CC, once for LOCAL_CC).
9084 Sun Jul 6 19:14:33 1997 Ben Pfaff <blp@gnu.org>
9086 * Makefile.am: (INCLUDES) Add intl directory; fix directories.
9087 (LDADD) Add @INTLLIBS@.
9088 (q2c) Add LIBS, @INTLLIBS@ to link step.
9090 * inpt-pgm.c: Turn off debugging.
9092 * postscript.c: (postopen) Format fix. local_free() blocks
9093 returned by local_alloc(); don't free() them.
9095 Sat Jul 5 23:44:51 1997 Ben Pfaff <blp@gnu.org>
9097 * data-in.c: (parse_string_as_format) Comment fix. Fix check for
9100 * data-list.c: (read_from_data_list_fixed) Pass proper value for
9101 LEN arg, not simply the full string length.
9103 * sort.c: (allocate_file_handles) Check SPSS compatible temp file
9104 directories before generic temp file directories.
9106 * vfm.c: Disable debugging.
9108 Fri Jul 4 13:26:41 1997 Ben Pfaff <blp@gnu.org>
9110 * get.c: Comment fix.
9111 (cmd_save_internal) Always passes GTSV_OPT_SAVE option.
9113 Wed Jun 25 22:52:28 1997 Ben Pfaff <blp@gnu.org>
9115 * expr-prs.c: (debug_print_postfix) Conditionally included on
9116 GLOBAL_DEBUGGING. Removed out_header() reference.
9118 * exprP.h: Removed #undef GLOBAL_DEBUGGING.
9120 Sun Jun 22 22:00:28 1997 Ben Pfaff <blp@gnu.org>
9122 * ascii.c: Removed obsolete ascii_close_page() prototype.
9124 * command.c: (output_line) Comment fix.
9126 * data-in.c: Formatting fix.
9127 (parse_string_as_format) Now the `fc' argument is used only for
9128 the purpose of error messages; it is not an index into the string
9129 passed. All references changed.
9131 * data-list.c: Comment fix.
9132 (cut_field) Comment fix. Now returns the column number of the
9133 position of the field cut out on success.
9134 (parse_field) Added `column' argument. Puts the column numbers in
9136 (read_from_data_list_free, read_from_data_list_list) Record the
9137 column number returned by cut_field(), pass it to parse_field().
9139 * dfm.c: Comment fix.
9141 * do-ifP.h: Comment fix.
9143 * expr-prs.c: (SYSMIS_func) Implemented string-type arguments for
9144 the SYSMIS function.
9146 * expr.h, exprP.h: Comment fix.
9148 * glob.c: (init_glob) Only calls setlocale() and family if
9151 * hash.h: Comment fix.
9153 * include.c: Comment fix.
9155 * output.c: Comment fix.
9157 * postscript.c: (ps_line_intersection) Simplified assertion.
9159 * repeat.c: Comment fix.
9161 * vars-atr.c: Comment fix.
9163 * vars-prs.c: Comment fix.
9165 * vfm.c: (vector_initialization) [DEBUGGING] Fixed undefined
9166 behavior with usage of postincrement.
9167 (memory_stream_read) Discards cases as it goes.
9169 Sun Jun 15 16:45:17 1997 Ben Pfaff <blp@gnu.org>
9171 * Makefile.am: Cleans q2c, not just distcleans it. Distcleans
9174 * Most source files: Includes debug-print.h, related comment
9177 * cases.c: (alloc_val) Removed complex allocation code. Merely
9178 increments default_dict.nval and returns the former value.
9179 (envector, devector) Removed references to lv member of struct
9182 * common.h: (macro VME) Replaced complex definition with simple
9185 * data-list.c: (cmd_data_list) Sets vfm_source instead of
9186 read_active_file and cancel_input_pgm.
9187 (read_from_data_list, cancel_data_list) Removed.
9188 (data_list_source_read, data_list_source_destroy_source) New
9190 (glob var data_list_source) New var.
9192 * dfm.c: (open_file_r, open_file_w) Simplified debug output.
9193 (cmd_begin_data) Improved criteria for an input program accessing
9194 the inline file. Still not perfect.
9196 * do-if.c: (do_if_trns_proc) Simplified debug output.
9198 * expr-prs.c: Comment fixes.
9199 [DEBUGGING] (debug_print_postfix) Simplified debug output.
9201 * file-handle.q: (fh_close_handle) Simplified debug output.
9203 * file-type.c: Comment fixes.
9204 (cmd_file_type) Sets vfm_source instead of read_active_file and
9206 (cmd_end_file_type) On failure, discards variables in place of
9207 just canceling the input program.
9208 (read_from_file_type) Renamed file_type_source_read.
9209 (cancel_file_type) Renamed file_type_source_destroy_source.
9210 (glob var file_type_source) New var.
9212 * get.c: (GTSV_* enum series) New enums GTSV_OPT_SAVE, GTSV_NONE.
9213 (cmd_get) Initializes options to GTSV_NONE before passing to
9214 trim_dictionary(). Removed `lv' reference. Sets vfm_source
9215 instead of read_active_file and cancel_input_pgm.
9216 (cmd_save_internal) Initializes options before passing to
9217 trim_dictionary(). Local var `nval' removed.
9218 (dict_delete_run) Comment fixes.
9219 (trim_dictionary) Comment fixes. Disallows scratch variables if
9220 GTSV_OPT_SAVE set in options.
9221 (read_from_get) Renamed get_source_read.
9222 (cancel_get) Renamed get_source_destroy_source.
9223 (glob var get_source) New var.
9225 * inpt-pgm.c: (cmd_input_program) Sets vfm_source instead of
9226 read_active_file and cancel_input_pgm.
9227 (read_from_input_program) Renamed input_program_source_read.
9228 Simplified debug output.
9229 (cancel_input_program) Renamed
9230 input_program_source_destroy_source.
9231 (glob var input_program_source) New var.
9233 * loop.c: (loop_1_trns_proc) Simplified debug output.
9235 * main.c: (dump_token) Made eof output more explicit.
9237 * sfm-read.c: (read_variables, dump_dictionary) Removed `lv'
9240 * sort.c: (cmd_sort_cases) Disallows scratch variables. Removed
9241 code for always-memory or always-disk cases. malloc's case-list
9242 based on vfm_source_info.ncases. Explicit support for
9243 memory_stream via memory_source_cases.
9244 (do_external_sort) Sets vfm_source instead of read_active_file and
9246 (allocate_file_handles) The temporary directory permissions are
9247 set to 0700 instead of 0777.
9248 (allocate_cases) Formatting fixes. Simplified debug output.
9249 (output_record) Compacts the case if necessary before writing it
9251 (close_handle, open_handle_w) Simplified debug output.
9252 (write_initial_runs) Destroys vfm_sink, then sets it to
9253 sort_stream. Writes records to memory based on
9254 vfm_sink_info.case_size.
9255 (write_to_sort_cases) Renamed sort_stream_write().
9256 (merge) Simplified error handling. Simplified debug output.
9258 (read_from_external_sort) Renamed sort_stream_read().
9259 Reads records based on vfm_source_info.case_size.
9260 (sort_stream_write) Writes records to memory based on
9261 vfm_sink_info.case_size.
9262 (sort_stream_mode) New function.
9263 (glob var sort_stream) New variable.
9265 * temporary.c: (cmd_temporary) Simplified debug output.
9266 (copy_variable) Removed references to `lv'.
9268 * title.c: (get_title) Simplified debug output.
9270 * var.h: Comment fixes.
9271 (struct get_proc) Removed member `lv'.
9272 (struct variable) Removed member `lv'. Comment fixes.
9273 (glob vars read_active_file, write_active_file, cancel_input_pgm)
9275 (struct case_stream) New.
9277 * vars-atr.c: (discard_variables) Changed cancel_input_pgm,
9278 read_active_file references to use vfm_source.
9279 (init_variable, replace_variable) Removed references to `lv'.
9281 * vfm.c: Comment fixes.
9282 (glob var vfm_source, vfm_sink, vfm_source_info, vfm_sink_info)
9284 (static var queue, qh, qt, n_lag) Removed. All references
9286 (glob var compaction_necessary, compaction_nval, compaction_case,
9287 paging) New variables.
9288 (record_case) Removed.
9289 (procedure) Comment fixes. Calls vfm_source->read() instead of
9292 (prepare_for_writing, arrange_compaction, make_temp_case,
9293 vector_initialization, setup_filter) New function.
9294 (open_active_file) Most of the code moved into the abovementioned
9295 new functions. Now sets temp_dict to &default_dict if there is no
9296 temporary dictionary, for convenience. New debug output.
9297 (close_active_file) Deals with changing the sink to the source.
9298 Calls finish_compaction(). Frees compaction_case. Mostly
9300 (glob vars disk_source_file, disk_sink_file) New vars.
9301 (destroy_active_file, read_from_memory) Removed.
9302 (disk_stream_init, disk_stream_read, disk_stream_write,
9303 disk_stream_mode, disk_stream_destroy_source,
9304 disk_stream_destroy_sink) New functions.
9305 (glob var vfm_disk_stream) New var.
9306 (glob vars memory_source_cases, memory_sink_cases,
9307 memory_sink_iter, memory_sink_max_cases) New vars.
9308 (memory_stream_init, memory_stream_read, memory_stream_write,
9309 memory_stream_mode, memory_stream_destroy_source,
9310 memory_stream_destroy_sink) New functions.
9311 (glob var vfm_memory_stream) New var.
9312 (write_case) Local var `i' renamed `cur_trns'; local var `retval'
9313 named `more_cases'. Simplified debug output. Otherwise mostly
9315 (record_case) Moved into the stream drivers. Removed.
9316 (transform) Removed (was dead code).
9317 (SPLIT_FILE_procfunc) s/vfm_replacement/vfm_sink_info/. In the
9318 common case that the splits don't change, we don't need to copy
9319 the case into prev_case again--pointless.
9320 (compact_case) New function.
9321 (finish_compaction) New function.
9323 * vfmP.h: Comment fixes.
9324 (DEV_* enum series) Removed.
9325 (struct storage) Renamed `stream_info'. Removed variant record.
9326 Removed `device' member.
9328 * debug-print.h: New file.
9330 Sun Jun 8 01:12:38 1997 Ben Pfaff <blp@gnu.org>
9332 * autorecode.c: Turned off debugging.
9334 * data-list.c: (destroy_dls) Closes the associated file handle.
9336 * descript.q: (custom_variables) Added PV_NO_SCRATCH to
9337 parse_variables() options.
9339 * dfm.c: (open_file_r) Removed gratuituous argument to msg() call.
9341 * display.c: (display_variables) Really fixed null cell bug.
9343 * file-handle.q: (fh_close_handle) Changed debugging message.
9345 * frequencies.q: (custom_variables) Added PV_NO_SCRATCH to
9346 parse_variables() options.
9348 * list.q: Added PV_NO_SCRATCH in q2c varlist options.
9349 (cmd_list) Fails if no variables specified.
9350 (determine_layout) Writes blank lines manually.
9352 * loop.c: (loop_1_trns_proc) Made debugging code only print
9353 messages if debugging.
9355 * q2c.c: (dump_subcommand) Appends sbc->message to SBC_VARLIST
9356 parse_variables() arguments.
9357 (main) Parses optional parenthesized options to varlist
9358 subcommands into sbc->message.
9360 * sfm-read.c: Format fix.
9362 * var.h: (FV_*) New enum series.
9363 (PV_*) New enum PV_NO_SCRATCH.
9365 * vars-prs.c: (find_var) Removed.
9366 (fill_all_vars) Takes FV_* enum instead of boolean third
9367 argument. Rewritten to deal with scratch as well as system
9369 (parse_variables) Error message on scratch variable if
9372 * vfm.c: (static var virt_begin_func) New var.
9373 (procedure) Sets up virt_begin_func.
9374 (SPLIT_FILE_procfunc) For the first case, calls virt_begin_func()
9375 after dump_splits(). For succeeding groups changes, calls
9376 virt_begin_func() instead of begin_func().
9378 Fri Jun 6 22:42:23 1997 Ben Pfaff <blp@gnu.org>
9380 * count.c, data-out.c, file-handle.q, list.q, loop.c: Turned off
9383 * dfm.c: Added some debugging messages, disabled by default.
9384 (open_file_r) Fixed error message.
9385 (read_record) On eof on inline_file, instead of calling
9386 fh_close_handle(), simply jump to eof label like a normal file.
9389 * display.c: Thin lines between rows for certain kinds of
9390 listing. Fixed `null cell' bug.
9392 * error.c: (failure) Flush stdout, stderr before failing.
9394 * file-handle.q: (fh_close_handle) Added debugging message.
9396 * frequencies.q: (dump_full) Bottom line extends across entire
9397 table width. Changed title formatting.
9398 (dump_condensed) Changed title formatting.
9399 (dump_statistics) Fixed title formatting.
9401 * glob.c: (init_glob) Moved initialization of cur_proc out of #if.
9402 Sets default value of set_format.
9404 * list.q: (cmd_list) Calls blank_line() before determine_layout().
9405 Passes write_all_headers() to procedure() as pre-group func.
9406 (write_all_headers) New function.
9407 (determine_layout) Removed calls to write_header().
9408 Calls blank_line() before and after write_fallback_headers().
9410 * recode.c: (recode_trns_free) Only attempts to free head->map if
9413 * sfm-read.c: (read_variables) Allows `#' at beginning of system
9414 file variable names but gives a warning. Sets `left' based on
9415 first character being/not being `#'. On lossage frees dict->var.
9417 * som-high.c: (som_draw_title) Simplified title formatting.
9419 * vfm.c: (dump_splits) Fixed and changed splits formatting.
9421 Thu Jun 5 22:51:15 1997 Ben Pfaff <blp@gnu.org>
9423 * autorecode.c: (cmd_autorecode) Sets h_trans to NULL at
9424 beginning. Frees v_src, v_dest on successful exit. Frees
9425 h_trans[*], h_trans on lossage.
9426 (recode) Frees h_trans[*], h_trans.
9428 * dfm.c: (dfm_close) Formatting change.
9429 (open_inline_file) Now passed a dfm_fhuser_ext to initialize; no
9430 longer allocates its own in inline_file.
9431 (open_file_r) Passes the local dfm_fhuser_ext to
9433 (open_file_w) Message fix.
9434 (read_record) Buffer reallocation strategy changed. Frees
9435 ext->line even in inline_file to prevent leaks.
9436 (dfm_put_record) Fixed bug where `ext' was cached before the file
9437 was opened and thus it would be NULL when the file really was
9439 (cmd_begin_data) Sets up inline_file basics itself, then calls
9440 open_inline_file() for the dfm_fhuser_ext. Formatting fix.
9442 * list.q: (write_line) Formatting fix.
9443 (clean_up) Minor strategy change. Sets proportional font after
9445 (determine_layout) Sets fixed font before writing regular headers,
9446 or after writing fallback headers.
9448 * modify-vars.c: (cmd_modify_vars) Frees variable lists for DROP
9449 and KEEP vars after using them.
9451 * postscript.c: (ps_init_driver) Frees x->family.
9452 (postopen) When loading fonts, free the temporary font name buffer
9454 (ps_text_set_font_by_position) Free temporary font name buffer
9456 (text) Fixed code that calculated `lig' so that `lig' always gets
9457 initialized. Formatting fix.
9459 * som-low.c: (get_cell_size, som_get_table_size) `prop_height' ->
9461 [GLOBAL_DEBUGGIGN] (check_table) Use arena_alloc() to allocate
9462 cells, not xmalloc(), so that the cells will get destroyed
9465 * sysfile-info.c: (cmd_sysfile_info) Frees the dictionary after
9468 Tue Jun 3 23:33:22 1997 Ben Pfaff <blp@gnu.org>
9470 * ascii.c: (ascii_text_draw) Always sets metrics for strings that
9473 * dfm.c: Comment fix.
9475 * list.q: Comment fixes. Include somP.h. Removed static vars
9476 table, n_columns, n_rows, part. New struct list_ext. New static
9478 (n_lines_remaining, n_chars_width, write_line) New functions.
9479 (cmd_list, list_cases) Rewritten.
9480 (begin_row, end_row, flush_table) Removed.
9481 (write_header, clean_up, write_varname, write_fallback_headers,
9482 determine_layout) New functions.
9484 * output.c: (outp_iterate_enabled_drivers) Minor reformat.
9486 * output.h: Comment fix.
9488 * postscript.c: Comment fix.
9489 (struct ps_driver_ext) Removed prop_size, fixed_size members;
9490 added font_size. All references changed.
9491 (ps_init_driver) Initializes font_size. Simplified space checking
9493 (static var option_tab[]) Removed prop-size, fixed-size; added
9495 (ps_option) Handles font_size.
9497 * som-high.c: Moved prototypes into somP.h.
9498 (som_init_driver) New function.
9499 (som_submit_table) Moved some code into new function
9501 (build_target) Moved some code into new function
9502 som_internal_eject_page().
9503 (som_eject_page) Uses som_internal_eject_page().
9504 (som_internal_eject_page) New function.
9506 * som-low.c: Moved prototypes into somP.h.
9508 * som.h: Formatting fixes.
9510 * somP.h: (struct som_driver_ext) Removed em_width;
9511 added prop_em_width, fixed_width.
9513 Mon Jun 2 14:25:25 1997 Ben Pfaff <blp@gnu.org>
9515 * Makefile.am: Added `localedir' definition. Added
9516 -DLOCALEDIR="..." to DEFS. Added -I. to INCLUDES.
9518 * ascii.c: (macro draw_line) Fixed capitalization.
9520 * ascii.c, autorecode.c, cases.c, cmdline.c, command.c, common.c,
9521 compute.c, count.c, data-in.c, data-list.c, data-out.c,
9522 descript.q, dfm.c, display.c, do-if.c, error.c, expr-evl.c,
9523 expr-opt.c, expr-prs.c, file-handle.q, file-type.c, filename.c,
9524 formats.c, frequencies.q, get.c, getline.c, glob.c, groff-font.c,
9525 hash.c, heap.c, include.c, inpt-pgm.c, lexer.c, list.q, loop.c,
9526 main.c, mis-val.c, misc.c, modify-vars.c, numeric.c, output.c,
9527 postscript.c, print.c, q2c.c, recode.c, rename-vars.c, repeat.c,
9528 sample.c, sel-if.c, sfm-read.c, sfm-write.c, sfmP.h, som-frnt.c,
9529 som-high.c, som-low.c, sort.c, split-file.c, sysfile-info.c,
9530 temporary.c, title.c, tokens.h, val-labs.c, var-labs.c,
9531 vars-atr.c, vars-prs.c, vector.c, vfm.c, weight.c: Marked strings
9532 for internationlization.
9534 * glob.c: [HAVE_LOCALE_H] Includes locale.h.
9536 Sun Jun 1 23:31:18 1997 Ben Pfaff <blp@gnu.org>
9538 * do-if.c, sort.c, val-labs.c: Comment fixes.
9540 * glob.c: (init_glob) Uncommented, updated i18n support.
9542 * arena.c, ascii.c, data-in.c, descript.q, error.c, expr-evl.c,
9543 expr-opt.c, expr-prs.c, filename.c, frequencies.q, groff-font.c,
9544 output.c, postscript.c, sfm-read.c, som-high.c, vars-prs.c: Made
9545 the declarations of macros taking arguments a lot nicer.
9547 Sun Jun 1 17:22:04 1997 Ben Pfaff <blp@gnu.org>
9549 * error.h: Removed CE, CW aliases for SE, SW.
9551 * q2c.c: Removed explicit streq() definition since it's duplicated
9554 * approx.h, error.h, font.h, hash.h, misc.h, output.h, somP.h,
9555 stats.h, str.h, tokens.h: Made the declarations of macros taking
9556 arguments a lot nicer-looking of <pinard@iro.umontreal.ca>.
9559 Sun Jun 1 12:02:06 1997 Ben Pfaff <blp@gnu.org>
9561 * cmdline.c: Comment fixes.
9562 (pick_compat) Changed return type to int. Now, instead of setting
9563 glob var `compat' to the emulation, returns the emulation. All
9565 (parse_command_line) Added terminating null to end of
9566 `long_options' array definition.
9567 (pre_syntax_message) Fixes.
9568 (usage) Shows the default emulation in the syntax message by
9569 calling pick_compat().
9571 * getline.c: (getl_add_include_dir) Separates paths with
9572 PATH_DELIMITER, not DIR_SEPARATOR.
9574 * glob.c: (init_glob) Fixed references to DEFAULT_VER_PCP40,
9575 DEFAULT_VER_WIN61, DEFAULT_VER_X40.
9577 * output.c: (outp_configure_macro) Make earlier definitions for a
9578 particular key override later ones for the same key.
9580 Fri May 30 19:40:49 1997 Ben Pfaff <blp@gnu.org>
9582 * ascii.c: Comment fixes.
9584 * output.c: (outp_get_paper_size)
9585 s/STAT_OUTPUT_INIT_FILE/STAT_OUTPUT_PAPERSIZE_FILE/.
9587 Sun May 25 22:34:07 1997 Ben Pfaff <blp@gnu.org>
9589 * ascii.c, postscript.c, sfm-read.c, sfm-write.c, sort.c: Include
9590 <errno.h>. GNU libc 2 enforces this!
9592 * command.c: (parse_cmd) Fixed problem with `else' clause being
9593 paired with wrong `if'. Comment fix.
9595 Fri May 9 16:53:52 1997 Ben Pfaff <blp@gnu.org>
9597 * getline.c: [!HAVE_LIBREADLINE] (read_console) Changed
9598 blp_getline() to getline().
9600 * output.c: (outp_eval_dimension) Changed the fix from last time;
9601 there was no variable `a'.
9603 * q2c.c: (get_line) Fixed boundary condition overrun bug.
9605 Mon May 5 21:58:22 1997 Ben Pfaff <blp@gnu.org>
9607 * output.c: (outp_evaluate_dimension) Fixed handling of negative
9608 numbers having fractional parts. Added case of a fraction without
9609 a whole-number part.
9611 Fri May 2 22:08:05 1997 Ben Pfaff <blp@gnu.org>
9613 * ascii.c: (ascii_text_get_font_position) Removed.
9615 * expr.h, exprP.h: Disabled debugging.
9617 * groff-font.c, postscript.c: Changed `groff' to `Groff' in
9620 * output.h: (struct outp_class_struct) Removed
9621 text_get_font_position method. All references deleted.
9623 * postscript.c: Big change here. Fontmaps were completely
9624 eliminated because of a change in philosophy. Comment fixes.
9625 (struct ps_fontmap, ps2dit_map, font_family, dit2family_map)
9627 (struct ps_driver_ext) `position', `fontmap', `prop_name',
9628 `fixed_name' members removed. New members `prop_family',
9629 `fixed_family'. `family' member changed to type char *.
9630 (static var ps_fontmaps) Removed.
9632 (ps_init_driver) Removed obsolete references, updated.
9633 Initializes `translate_x', `translate_y', `scale'. Doesn't read
9634 fontmap, of course. Refers to font names through internal_name
9635 rather than subversive means. Frees proper items.
9636 (static var option_tab[]) Removed `fontmap-file' option; renamed
9637 `fixed-font', `prop-font'.
9638 (ps_option) Corresponds to option_tab[].
9639 (read_fontmap, release_fontmap, ps_to_dit, compare_ps2dit,
9640 hash_ps2dit, compare_dit2family, hash_dit2family, compare_family,
9641 hash_family) Removed.
9642 (postopen) Generates font names from family names. Gets
9643 PostScript font name properly. New prologue file comment `!!!'
9645 (ps_open_page) Adds translate_x, translate_y to BP prologue
9646 function; gives SF argument floating-point format.
9647 (ps_text_set_font_by_name) Doesn't try to map PostScript->Groff
9648 font name. Doesn't change font family.
9649 (ps_text_set_font_by_position) Generates Groff font name from font
9650 family name instead of through table lookup.
9651 (ps_text_set_font_by_family) Renamed `ps_text_set_font_family',
9652 all references changed. Reduced to simple string assignment.
9653 (ps_get_font_name) Removed.
9654 (ps_get_font_family) Reduced to string return.
9655 (text) Doesn't save `position' since it no longer exists. Ugly
9656 kluge to save font family--fix soon?
9657 (load_font) Removed PostScript name argument.
9659 Thu May 1 14:58:59 1997 Ben Pfaff <blp@gnu.org>
9661 * postscript.c: Comment fix.
9662 (ps_open_page) Puts scale factor in PostScript output.
9664 Sat Apr 26 11:49:32 1997 Ben Pfaff <blp@gnu.org>
9666 * Makefile.am: Distcleans q2c.
9668 Wed Apr 23 21:33:48 1997 Ben Pfaff <blp@gnu.org>
9670 * ascii.c: (delineate) Sets text size even if width is zero.
9672 * command.c: Comment fix.
9673 (static var cmd_table[]) Re-enabled EVALUATE command.
9674 (parse_cmd) Lotsa comment fixes. Fixed infinite loop in parsing
9675 of comments in script files. Now more liberal on criteria for
9676 performing a state transition--if *anything* happened correctly,
9677 not just if *everything* happened correctly.
9679 * data-out.c: (convert_F) Comment fix. Why in the fsck does
9680 Checker segfault on formatting large numbers and why in the fsck
9681 hadn't I noticed this before?
9683 * expr.h, exprP.h: No longer turn off GLOBAL_DEBUGGING.
9685 * list.q: (cmd_list) Commented out the actual output routine
9686 because of various problems. Probably will abandon the idea of
9687 using the general `crushed tables' for the LIST procedure.
9689 * temporary.c: (restore_dictionary) Sets var_by_name to NULL after
9690 clearing it. Allocates a new var_by_name dictionary before trying
9691 to add members to it.
9693 * vars-atr.c: [DEBUGGING] (dump_one_var_node) Removed argument
9694 `sib'. Changed type of `node' argument.
9695 [DEBUGGING] (dump_var_tree) Replaced avlwalk() with
9697 (clear_variable) Only dumps the var tree if var_by_name non-NULL.
9698 [DEBUGGING] Only deletes the variable from var_by_name if that var
9701 Fri Apr 18 16:48:41 1997 Ben Pfaff <blp@gnu.org>
9703 * Makefile.am: Added include files to SOURCES. Added
9704 frequencies.q to EXTRA_DIST. Removed include/ from INCLUDES. Now
9705 includes rules for q2c. Added `boast' target.
9707 Fri Apr 18 15:42:22 1997 Ben Pfaff <blp@gnu.org>
9709 * Makefile.am: Maintainer-clean Makefile.in.
9711 * Makefile.am: Fixed redundant EXTRA_DIST line.
9713 * ascii.c: Comment fixes.
9714 (ascii_line_vert) Fixed overly aggressive range check.
9716 * display.c: Removed dead code.
9718 * list.q: Turn debugging on.
9719 (flush_table) New debug code.
9721 * sfm-read.c: (read_value_labels) malloc's the structure before
9722 trying to assign to its members.
9724 * sfm-write.c: Comment fix.
9726 * som-high.c: (som_submit_table) Sets som.t and som.d on each call
9728 (output_table) No arguments anymore--gets them through `som'
9729 global. New debug code. In crushed tables, now sets `htv' as
9730 well as `hv' to avoid bad confusion later.
9731 (dump_crush_page) New debug code.
9733 * som-low.c: (som_dump_crush_page) New debug code.
9735 Thu Mar 27 01:11:29 1997 Ben Pfaff <blp@gnu.org>
9737 All source files: Broke long lines into multiple lines.
9739 * ascii.c: (ascii_close_page) Uses host_system var in place of
9740 HOST_SYSTEM constant.
9742 * cmdline.c: (var syntax_message[]) Broke into
9743 pre_syntax_message[] and post_syntax_message[].
9744 (usage) Outputs both parts, separated by driver list.
9746 * error.h: Fixed broken formatting.
9748 * expr-opt.c: (str_search, str_rsearch) New functions.
9750 * misc.c: (blp_getdelim) Removed. All references changed to
9752 (str_search, str_rsearch) Removed.
9753 (memrmem) New function.
9755 * misc.h: (blp_getline) Removed. All reference changed to
9760 * filename.c: Includes "stat.h", not <sys/stat.h>.
9761 (blp_getenv) Uses host_system var instead of HOST_SYSTEM constant.
9763 * output.c: (outp_list_classes) Changed output formatting.
9765 * sfm-write.c: (write_header) Uses host_system var instead of
9766 HOST_SYSTEM constant.
9767 (write_rec_7_34) Extracts version numbers from the version string.
9770 * sort.c: Includes "stat.h", not <sys/stat.h>.
9772 * str.c: (strcasecmp) Removed.
9774 * title.c: (cmd_document) Uses host_system var instead of
9775 HOST_SYSTEM constant.
9777 * version.c: Generated on-the-fly by the Makefile instead of being
9780 * str.h: Comment fixes. Doesn't substitute for missing memmove or
9782 [!HAVE_STRNCASECMP] Declares strncasecmp().
9784 * version.h: Removed stray character. Comment fixes.
9785 (vars host_system, build_system) New vars.
9787 Mon Mar 24 21:47:31 1997 Ben Pfaff <blp@gnu.org>
9789 * Most source files: Changed formatting of copyright notice; fixed
9790 FSF address; reformatted to better conform to GNU standards;
9791 comment fixes. Added markups to prevent GNU indent from messing
9792 up my beautiful formatting :-).
9794 * q2c.c: (get_line) Ignores lines that begin with `/* *INDENT' so
9795 that GNU indent markups can be passed through without problems.
9797 Wed Feb 19 21:30:31 1997 Ben Pfaff <blp@gnu.org>
9799 * get.c: Turned off debugging.
9801 * glob.c: (init_glob) Turned on save-file compression by default.
9803 * sfm-write.c: (sfm_write_case) Fixed bug which resulted in less
9804 compression than was possible in save files.
9806 Sun Feb 16 20:57:20 1997 Ben Pfaff <blp@gnu.org>
9808 * data-out.c: (convert_F) Comment fixes. Debug message fixes.
9810 * frequencies.q: Removed Fiasco extensions. Updated calculation
9811 algorithms. Polished output format.
9812 (struct frq_info_struct) Removed members `max_degree', `min_n',
9813 all references removed.
9814 (macro frq_extensions) Removed.
9815 (static vars min_n, max_degree) Removed, all references removed.
9816 (internal_cmd_frequencies) Doesn't handle extensions. Doesn't
9817 calculate `min_n', `max_degree'.
9818 (postcalc) Passes new arg to dump_statistics().
9819 (dump_full) Honor NOLABEL option. Buggy? Adds variable name
9821 (dump_condensed) Adds variable name title.
9822 (sum_freqs) Removed.
9823 (calc_stats) Updated calculation algorithm.
9824 (dump_statistics) Removed warning for too-few observations.
9825 Changed table formatting. Adds variable name title if passed new
9828 * output.h: Comment fix.
9830 * recode.c, sample.c, sort.c: Disabled debug code.
9832 * som-frnt.c: (som_set_value, som_set_float, som_set_text)
9833 Improved debug code.
9835 * var.h: (enum series frq_*) Removed Fiasco extensions.
9837 Sat Feb 15 21:26:53 1997 Ben Pfaff <blp@gnu.org>
9839 * command.c: Added PROCESS IF to command table.
9841 * Lots & lots of places, removed checks for NULLs preceding calls
9842 to free_expression(), which itself checks.
9844 * descript.q: Removed Fiasco extensions. Removed optimizations
9845 for non-weighted active files. Implemented some options.
9846 Finished polishing output format. Comment fixes. Merged
9848 (static vars n_glob_miss_list, n_glob_valid, n_glob_missing,
9849 max_degree, min_n) Removed.
9850 (macro dsc_extensions) Removed.
9851 (struct dsc_info_struct) Removed `min_n' member, all references
9853 (internal_cmd_descriptives) Removed calculation of min_n,
9854 max_degree. Only deals with one `calc' routine instead of two
9856 (precalc) Eliminated redundancy. Updated for changes to
9857 descriptives_proc structure.
9858 (calc) Moved here from `descript.g'. Rewritten to calculate
9859 statistics via `moments about the mean' rather than by summing,
9860 summing squares, summing cubes, and so on.
9861 (postcalc) Rewritten for new-style statistical calculation.
9862 (display) Removed support for displaying variables across rows.
9863 No longer crushes the descriptives table. Removed ancient code.
9864 Added display of N, by variable and listwise.
9866 * descript.g: Removed; merged into `descript.q'.
9868 * expr-evl.c: (evaluate_expression) Now returns a double. For
9869 numeric results, it returns the result as well as storing it in
9870 the passed `value' structure if non-NULL. For string results it
9871 just returns 0.0 and it must be passed non-NULL. Many references
9872 to this function were optimized by use of this change, especially
9873 but not exclusively in `compute.c'.
9875 * frequencies.g: Comment fix.
9877 * glob.c: (glob var process_if_expr) New global var.
9879 * postscript.c: (static var option_tab[]) Corrected entry for
9881 (postopen) Sets x->size to x->prop_size.
9882 (ps_text_set_font_by_name) Sets font size as well as typeface for
9883 PROP and FIXED fonts.
9885 * sel-if.c: (cmd_process_if) New function.
9887 * sfm-write.c: (struct sfm_fhuser_ext) New member `n_cases'.
9888 (sfm_write_dictionary) Sets `n_cases' to 0.
9889 (sfm_write_case) Increments `n_cases'.
9890 (sfm_close) Attempts to seek the system file back to the header
9891 and write the number of cases in its proper slot.
9893 * som-frnt.c: (som_insert_table) Masks off expansion options since
9894 only SOPT_X_NORM seems to work sensibly.
9896 * som-low.c: (get_cell_size) Fixed bug when a table cell was sized
9897 with a `fixed' value of 2.
9899 * sort.c: (cmd_sort_cases) Cancels PROCESS IF.
9901 * sysfile-info.c: (cmd_sysfile_info) Doesn't display more than 10
9902 value labels; uses SOPT_NONE instead of SOPT_X_BOTH.
9904 * var.h: (enum series dsc_*) Removed Fiasco extensions.
9905 (struct descriptives_proc) Removed `miss_noweight'; new members
9906 `X_bar', `M2', `M3', `M4', `min', `max'.
9908 * vars-atr.c: (discard_variables) Cancels PROCESS IF.
9910 * vfm.c: (close_active_file) Cancels PROCESS IF.
9911 (write_case) Doesn't process cases unselected by PROCESS IF.
9913 Fri Feb 14 23:32:58 1997 Ben Pfaff <blp@gnu.org>
9915 * glob.c: (glob var err) Removed.
9917 * sysfile-info.c: (cmd_sysfile_info) When adjusting table size,
9918 doesn't have to take into account number of value labels since
9919 they're in a subtable anyway. Also, doesn't display more than 10
9920 value labels since we can't yet break pages in subtables.
9922 Tue Feb 4 15:15:50 1997 Ben Pfaff <blp@gnu.org>
9924 * som-frnt.c: (som_change_table_size) Simple change for elegance
9925 that shouldn't change behavior.
9926 (som_set_value) Comment fix.
9928 * som-high.c: (som_submit_table) Message fix.
9930 Wed Jan 22 21:54:00 1997 Ben Pfaff <blp@gnu.org>
9932 * command.c: Added SYSFILE INFO to command table.
9934 * file-handle.q: (fh_handle_filename) New function.
9936 * get.c: (save_trns_proc) Fixed a bug in padding of output data
9939 * main.c: (parse) New return value for command functions, -3.
9941 * misc.h: Comment fix.
9943 * output.h: Comment fixes.
9944 (macro COMPONENTS) Removed.
9946 * postscript.c: (write_text) Modified literal_chars[] so that `('
9947 and ')' are not written to the output in strings as literals.
9949 * sfm-read.c: (sfm_read_dictionary) New argument.
9950 (read_header) New argument. Sets the information structure's
9951 values from the header information.
9952 (read_variables) [__CHECKER__] Redefines isalnum()--some sort of
9953 bizarre Checker problem, I guess.
9954 (read_variables) Proper cleanup on lossage.
9956 * sfm.h: (struct sfm_read_info) New struct for use by
9957 sfm_read_dictionary().
9959 * som-frnt.c: (som_create_table) New argument CREATE_FLAGS,
9960 currently used just for tables that can be dynamically resized and
9961 thus have to be allocated with arena_malloc() instead of
9962 arena_alloc(). All references changed.
9963 (som_change_table_size) New function.
9964 (som_insert_table) Bugfix: now inserts `cell', not `c'!
9966 * som-high.c: [GLOBAL_DEBUGGING] (check_table) Moved to som-low.c.
9967 (som_submit_table) [GLOBAL_DEBUGGING] Doesn't call check_table()
9970 * som-low.c: (draw_cell) Calls draw_table_cell() for SCON_TABLE
9972 (draw_intersection) Now takes an argument specifying the table in
9973 question. All references changed.
9974 (draw_table_cell) New function.
9975 (som_get_table_size) [GLOBAL_DEBUGGING] Calls check_table().
9976 (som_get_table_size) Many nice new explanatory comments.
9977 [GLOBAL_DEBUGGING] (check_table) Moved here from som-high.c.
9979 * som.h: New enum series SOM_CREATE_* for use as create flags with
9982 * str.h: Moved a comment here from TODO.
9984 * sysfile-info.c: New file. Reference implementation.
9986 Sun Jan 19 14:22:11 1997 Ben Pfaff <blp@gnu.org>
9988 * command.c: Added RENAME VARIABLES to table of commands.
9990 * data-in.c: (dls_error) Sets `cust_field'.
9991 (parse_N) Message fix.
9992 (parse_day_count) New function.
9993 (to_roman) Never outputs VX as a `short form' of V.
9994 (parse_month) Fixed parsing of Roman numerals.
9995 (parse_trailer) Message fix.
9996 (parse_DATE, parse_ADATE, parse_EDATE, parse_SDATE, parse_JDATE,
9997 parse_QYR, parse_MOYR, parse_WKYR, parse_DTIME) Issue a message if
9998 the date is invalid.
9999 (parse_SDATE) Fixed swapped day, year.
10000 (parse_JDATE) Fixed bug for dates in 1582.
10001 (parse_DTIME) Allows days not between 1 and 31.
10002 (parse_numeric) Makes local copy of f.type for easier usage.
10005 * data-out.c: (convert_F) When outputting as scientific, properly
10006 sets f.type as fp->type.
10007 (insert_commas) Fixed operator precedence problem with setting of
10008 nitems. Changed strcpy to memcpy (no null terminator).
10009 (convert_date) Fixed FMT_JDATE: added 1900 to year.
10010 (convert_CCx) Essentially rewritten, but now it works.
10012 * display.c: (cmd_display) Added DISPLAY FILE LABEL (undocumented
10013 feature of Fiasco).
10014 (display_documents) Implemented.
10016 * error.c: (glob var cust_field) New var.
10017 (vmsg) Displays cust_field as part of message classes DE and DW.
10019 * formats.c: (debug_print) Fixed to compile under updated
10022 * get.c: (cmd_get, cmd_save_internal) Close file handle on
10025 * misc.c: (parse_format_specifier) Formatting fix.
10027 * modify-vars.c: (struct var_modification) Renamed `n_reorder' as
10028 `n_rename' for clarity.
10029 (cmd_modify_vars) Initializes `forward' and `positional' at
10030 appropriate times. Frees lists of vars to rename on failure.
10031 Comment fix. Frees memory on success.
10032 (rearrange_dict) Simplified `for' loop condition.
10034 * rename-vars.c: New file (reference implementation).
10036 * set.q: (internal_cmd_set) Fixed `emu' test condition.
10038 * sfm-read.c: (read_header) File label is created only if file
10039 label in file is not blank.
10040 (read_variables) Initializes `dict' local variable.
10041 (read_documents) Proper behavior on lossage.
10043 * sfm-write.c: (write_header) Doesn't blank out the file label
10044 (why was this here to begin with?!)
10046 * temporary.c: (save_dictionary) File label is copied only if
10047 non-NULL. Doesn't try to xstrdup() dictionary documents.
10048 Adapted so as to not irritate Checker.
10049 (free_dictionary) Only destroys var_by_name if non-NULL.
10051 * title.c: (cmd_file_label) Doesn't skip FILE, LABEL tokens.
10052 (cmd_document) Doesn't skip DOCUMENT token. Adds some header
10053 lines to the document, indents the document. Also, it works now.
10054 (add_document_line) New function.
10056 * var.h: (struct dictionary) Reordering.
10058 * vars-prs.c: (parse_variables) On lossage, only local_free()'s
10059 bits if it was allocated to begin with.
10061 Thu Jan 16 13:08:57 1997 Ben Pfaff <blp@gnu.org>
10063 * command.c: Added MODIFY VARS to list of commands.
10065 * configure.in: Updated custom macros for autoconf 2.12. Removed
10066 mmap reference; fixed termcap library reference.
10068 * display.c: (display_variables) Fixed a few bugs although it's
10069 still not well written.
10071 * error.c: [!__CHECKER__] (chkr_disp_call_chain) New function.
10072 (induce_segfault) Calls chkr_disp_call_chain() instead of
10073 inducing an actual SIGSEGV.
10075 * expr-opt.c: (evaluate_tree) Swapped order of arguments to
10076 str_search() and str_rsearch(). Fixed tests for matches on
10077 OP_INDEX and OP_RINDEX.
10079 * filename.c: (good_getcwd) Removed as the new libc for Checker
10080 doesn't contain this bug, apparently.
10082 * misc.c: (str_search, str_rsearch) Changed order of arguments for
10083 consistency with GNU memmem.
10084 (blp_getdelim) Changed `len' from `int' to `size_t'.
10086 * modify-vars.c: Reference implementation.
10088 * som-frnt.c: (zero_length) New global var.
10089 (som_create_table) Message fix.
10091 * som.h: Added gcc attributions to som_set_text(),
10092 som_output_text() prototypes. blank_line() refers to
10093 zero_length[] instead of a literal null string to suppress gcc
10096 * sort.c: (do_external_sort) Fixed fencepost error on lossage.
10097 (allocate_cases) Decrements x_max so the last element of x[] can
10098 be used by the algorithm.
10100 * var.h: Changed minor details of `variable' declaration.
10101 (struct modify_vars_proc) New struct.
10102 (struct variable) Added field p.mfv.
10104 * vars-atr.c: Comment fix.
10106 * vars-prs.c: (fill_all_vars) More optimal implementation.
10108 * vfm.c: (dump_splits) Sets the last byte of temp_buf to a null
10109 character, which it shouldn't have to do but printf() seems to
10110 read the null byte even though I supply a maximum length...
10112 Fri Jan 10 20:22:08 1997 Ben Pfaff <blp@gnu.org>
10114 * command.c: Removed command alias X for QUIT.
10115 (parse_cmd) Fixed comment parsing.
10117 * dfm.c: (struct dfm_fhuser_ext) Fields `len', `size' are now of
10119 (read_record) Fixed references to len, size.
10120 (dfm_get_record) Restructured.
10122 * file-handle.h: (struct file_handle) Field `lrecl' now of type
10125 * file-handle.q: (internal_cmd_file_handle) Checks for nonpositive
10128 * modify-vars.c: New file. Not complete.
10130 * set.q: (set_ccx) Fixed operator precedence problem regarding ^
10133 * sfm-read.c: (bswap_flt64, read_header, write_variable) Fixed
10134 problems caused by int/size_t differences.
10136 * sort.c: (output_record, merge_once) Cast `size_t's to `int's in
10139 * str.c: (strcasecmp) Fixed bug that cropped up when the strings
10140 being compared were of equal length.
10142 Thu Jan 2 19:08:23 1997 Ben Pfaff <blp@gnu.org>
10144 * command.c: Added DOCUMENT, DROP DOCUMENTS, FILE LABEL.
10146 * lexer.c: (get_dotted_rest_of_line) New function.
10148 * sel-if.c: (cmd_filter) Cannot choose string or scratch variables
10151 * sfm-read.c: (sfm_read_dictionary) Calls read_documents() to read
10152 type 6 records. Frees the dictionary properly.
10153 (read_header) Initializes the dictionary instead of letting
10154 read_variables() do it. Sets the dictionary file label from the
10156 (read_documents) New function.
10158 * sfm-write.c: (sfm_write_dictionary) Calls write_documents() to
10159 write type 6 record if appropriate.
10160 (write_header) Writes file label from dictionary.
10161 (write_documents) New function.
10163 * temporary.c: (save_dictionary, restore_dictionary,
10164 free_dictionary) Properly handle new fields in dictionary struct.
10166 * title.c: (get_title) Returns after failure().
10167 (cmd_file_label, cmd_document, cmd_drop_documents) New functions
10168 for new commands FILE LABEL, DOCUMENT, DROP DOCUMENTS. Untested.
10170 * var.h: (struct dictionary) New fields `label', `n_documents',
10173 Wed Jan 1 22:08:10 1997 Ben Pfaff <blp@gnu.org>
10175 * command.c: Added FILTER to list of commands.
10177 * frequencies.g: [WEIGHTING] Removed test for weighting!=-1 since
10180 * get.c: (cmd_save_internal) Removed weighting code since it's now
10181 handled by sfm-write.c. Properly commented out debug code.
10183 * glob.c: (glob var weighting) Removed.
10185 * sel-if.c: Comment fixes.
10186 (cmd_filter) New function.
10188 * sfm-read.c: (struct sfm_fhuser_ext) New field `weight_index'.
10189 (sfm_read_dictionary) Sets weighting variable direct in the
10190 created dictionary now. (Apparently we previously didn't support
10192 (read_header) Sets weight_index field in sfm_fhuser_ext from
10193 header read from disk.
10195 * sfm-write.c: (sfm_write_dictionary) Comment fix.
10196 (write_header) Now sets the weighting in the header from the
10197 passed primary dictionary instead of from the sfm_write_info.
10199 * sfm.h: (struct sfm_write_info) Removed field `weight'.
10201 * som-high.c: (dump_crush_table) Fixed a couple of assertions that
10202 broke on boundary conditions.
10204 * var.h: (struct dictionary) New fields `weight_var',
10205 `weight_index', and `filter_var'.
10206 (glob var weighting) Removed. This is now part of struct
10207 dictionary. All references changed; the less mechanical changes
10208 are described above.
10210 * vars-atr.c: (find_dict_variable) New function.
10212 * vfm.c: (static var filter_index) New variable.
10213 (open_active_file) Initializes filter_index from default_dict.
10214 (write_case) Calls proc_func() only if the filter variable is
10215 nonzero; this implements FILTER behavior.
10217 * weight.c: (static var weight_varname) Removed.
10218 (cmd_weight) Modified default_dict instead of glob vars.
10219 (update_weighting) Changed the signature to modify a dictionary
10220 instead of glob vars. Now returns the weighting variable.
10221 (get_weighting_variable) Removed; its function is absorbed by
10222 update_weighting().
10223 (stop_weighting) Operates on a dictionary now.
10225 Wed Jan 1 17:00:59 1997 Ben Pfaff <blp@gnu.org>
10227 * sort.c: Removed debugging info from messages.
10228 (do_external_sort) Cleans up after itself by deleting the
10229 temporary directory on failure. (On success it is deleted by the
10231 (allocate_cases) Removed debug code. Added clean up code.
10232 (output_record) Removed debug code.
10233 (merge) Added code to close all the input files that are currently
10234 open. This is a likely location for bugs, because I'm not sure
10235 about boundary conditions. Removed an unnecesary heap_delete().
10236 (merge_once) Removed input file "optimization" that in fact
10237 screwed up the rest of the code. Message and comment fixes.
10239 Sun Dec 29 21:36:48 1996 Ben Pfaff <blp@gnu.org>
10241 * error.c: [__CHECKER__] (induce_segfault) Flushes output streams.
10243 * heap.c: (heap_delete) New argument.
10245 * sort.c: Finished implementation of external sort.
10247 * vfm.c: (read_from_disk) Returns after a disk error.
10249 Sun Dec 22 23:10:39 1996 Ben Pfaff <blp@gnu.org>
10251 * sort.c: (static var state) Removed.
10252 (static vars max_handles, tmp_basename, tmp_extname,
10253 huffman_queue) New variables.
10254 (do_external_sort) Moved most code to new functions.
10255 Creates huffman_queue.
10256 (allocate_file_handles, allocate_cases) New functions.
10257 (static vars run_no, run_length, file_index, case_count) New
10259 (output_record) Returns success. Now really writes to the output
10261 (begin_run, end_run) New functions.
10262 (write_initial_runs) Returns success. Initializes run_no to -1.
10263 Calls begin_run(), end_run() at appropriate times. Outputs debug
10265 (write_to_sort_cases) Calls begin_run(), end_run() at appropriate
10267 (merge) New function.
10269 * heap.c, heap.h: New files. Hopefully in near-final form.
10271 Sat Dec 21 21:51:04 1996 Ben Pfaff <blp@gnu.org>
10273 * glob.c: Added write_active_file to global vars.
10275 * sort.c: Several new miscellaneous static variables.
10276 (cmd_sort_cases) Big comment fix.
10277 (perform_case_2) Renamed `do_external_sort' and completely
10279 (case_2_proc_func) Removed.
10280 (output_record, write_initial_runs, write_to_sort_cases,
10281 compare_record) New functions.
10283 * vfm.c: [DEBUGGING] (index_to_varname) Excised bit rot.
10285 Tue Dec 17 18:57:59 1996 Ben Pfaff <blp@gnu.org>
10287 * sort.c: (perform_case_2) Changed the method for allocation of
10288 lots of memory--now allocates one case at a time in hopes that
10289 more cases can be allocated with heavily fragmented memory.
10291 * var.h: (write_active_file) New global var.
10293 * vfm.c: (procedure, close_active_file, write_case,
10294 SPLIT_FILE_procfunc) Now allow beginfunc, procfunc, and endfunc
10295 arguments to procedure() to be NULL. All references to
10296 procedure() that made use of dummy functions were changed to NULL
10298 (open_active_file) If write_active_file is non-NULL, the output
10299 device becomes DEV_PGM (a new enum).
10300 (close_active_file) Sets write_active_file to NULL.
10301 (read_from_memory) Comment fix.
10302 (record_case) Calls write_active_file() when the output device is
10305 Sun Dec 15 15:32:16 1996 Ben Pfaff <blp@gnu.org>
10307 * sort.c: New file.
10309 * autorecode.c: (cmd_autorecode) Fixed parsing of options.
10310 Fixed checking for duplicate varnames.
10311 (recode) xmalloc()'s the transformation instead of arena_alloc()'ing
10313 (autorecode_trns_free) Destroys hash tables for each recoding
10315 (autorecode_proc_func) Compares NULL to *vpp instead of vpp.
10317 * command.c: Added SORT CASES to cmd_table.
10318 (null_func, null_int_func) Prototyped.
10320 * descript.g: (calc_weight, calc_noweight) Computes own case
10323 * frequencies.q: (dump_statistics) Fixed problem with
10324 too-few-cases warning message.
10326 * get.c: (cmd_save_internal) Handles weighting properly.
10328 * hash.c: (hsh_dump) Output format changed.
10329 (force_hsh_insert) Actually works now, prototype changed.
10331 * list.q: (static var case_num) New variable.
10332 (cmd_list) Initializes case_num.
10333 (list_cases) Increments case_num.
10335 * var.h: Added definitions for SORT CASES. Comment fixes.
10337 * vfm.c: Some definitions moved to new file vfmP.h. Comment
10338 fixes. `active' renamed vfm_active, `rep' renamed
10339 vfm_replacement, all references changed.
10340 (procedure) The procfunc no longer receives a case number. All
10341 references changed.
10342 (write_case) Subtle reordering.
10343 (SPLIT_FILE_procfunc) Counts cases differently. Slightly less
10346 * weight.c: (get_weighting_variable) New function.
10348 * vfmP.h: New file with definitions from vfm.c.
10350 Sat Dec 14 10:35:30 1996 Ben Pfaff <blp@gnu.org>
10352 * command.c: (FILE_TYPE_okay) Commented out some tests because
10353 they're clumsy and not yet needed.
10355 * var.h: Most *_trns structures moved to their respective source
10356 files. Some were moved into a new file, do-ifP.h. Comment fixes.
10357 (union any_trns) Changed to a typedef for trns_header.
10358 (struct input_program_pgm) Removed.
10360 * vars-prs.c: (parse_variables) Only local_free()'s bits if it
10361 was allocated in the first place.
10363 Fri Dec 13 21:30:53 1996 Ben Pfaff <blp@gnu.org>
10365 * autorecode.c: New file.
10367 * command.c: Added AUTORECODE to command table; re-enabled SET.
10369 * data-out.c: (convert_F) Handles infinities and NaNs properly.
10371 * error.c: (vmsg) Comment fixes.
10373 * hash.c: Comment fix.
10374 (hashpjw_d) New function.
10375 (hashpjw) Reimplemented as call to more general function
10377 (internal_comparison_fn) Initializes pointers properly.
10378 (hsh_sort) [GLOBAL_DEBUGGING] New debugging code.
10379 (force_hsh_insert, force_hsh_find) New debugging wrapper
10382 * main.c: (main) Message fix.
10384 * output.c: (outp_read_devices) Message fix.
10386 * set.q: Comment fixes.
10387 (custom_results) Implemented Wnd/X form of subcommand.
10388 (set_routing) New function.
10389 (internal_cmd_set) Implemented ERRORS, MESSAGES.
10391 * settings.h: (SET_ROUTE_*) New enum series.
10392 (set_results) Renamed set_results_file, all references changed.
10393 (set_messages) Removed.
10394 (glob vars set_errors, set_messages, set_results) New vars.
10396 * title.c: (get_title) Remembers to xstrdup() the result of
10397 get_rest_of_line().
10399 * var.h: (arc_item, arc_spec, autorecode_trns) New structures for
10401 (union any_trns) New element `arc'.
10403 Fri Dec 6 23:53:47 1996 Ben Pfaff <blp@gnu.org>
10405 * command.c: (output_line) Removed references to set_screen.
10407 * error.c: (static var terminating) New var.
10408 (hcf) Sets terminating to 1.
10409 (vmsg) If terminating is nonzero, does not attempt to call hcf().
10410 This prevents an infinite loop if an error occurs within hcf().
10412 * expr-evl.c: (evaluate_expression) [__CHECKER__] Replaced case
10413 statement circumlocution with `case 42000' trick.
10414 (evaluate_expression) New support for OP_STR_MIS.
10416 * expr-opt.c: (evaluate_expression) [__CHECKER__] Replaced case
10417 statement circumlocution with `case 42000' trick.
10418 (dump_node) Handles OP_STR_MIS.
10420 * expr-prs.c: (MISSING_func, SYSMIS_func) Rewrote to handle string
10421 variables exceptions.
10422 (parse_function) Message fix.
10423 (ops[]) Added OP_STR_MIS.
10425 * expr.h: Added OP_STR_MIS to OP_* enum. Comment fixes.
10427 * exprP.h: [__CHECKER__] Removed case statement circumlocution.
10429 * glob.c: Removed set_scrnfile glob var.
10430 (init_glob) set_errorbreak set to 0 by default.
10432 * groff-font.c: Changed included files.
10433 (groff_read_font) Initializes font_arena local var correctly.
10434 (default_font) New function.
10436 * output.c: Comment fixes.
10437 (glob var disabled_devices) New variable.
10438 [GLOBAL_DEBUGGING] (static var iterating_driver_list) New
10440 [GLOBAL_DEBUGGING] (reentrancy) New function.
10441 [GLOBAL_DEBUGGING] (outp_read_devices, outp_done, find_driver,
10442 outp_iterate_enabled_drivers) Calls to reentrancy().
10443 (destroy_list) New function.
10444 (outp_done) Moved code to destroy_list().
10445 (parse_options) Parses `listing', `screen', `printer' options
10447 (configure_driver) Sets new `device' member of driver.
10448 (outp_iterate_enabled_drivers, outp_enable_device) New functions.
10450 * output.h: Comment fixes. New enum series OUTP_DEV_*.
10451 (struct outp_driver_struct) New member `device'.
10453 * postscript.c: (find_encoding_file) Doesn't display its own error
10455 (default_encoding) New function.
10456 (switch_font) Calls default_encoding() if no encoding can be
10458 (text) Makes up a character metric if none exists for the desired
10460 (load_font) Properly copies a fallback filename. Calls
10461 default_font() for a font if none at all are known.
10463 * set.q: Comment fixes. Removed OUTPUT subcommand.
10464 (custom_listing) Calls outp_enable_device() to enable/disable
10466 (turn_screen_on) Removed.
10467 (internal_cmd_set) Calls outp_enable_device() to enable/disable
10468 screen, printer devices.
10470 * settings.h: Comment fixes.
10471 (glob vars set_output, set_printer, set_screen, set_scrnfile)
10474 * som-high.c: (som_submit_table, som_eject_page) Use
10475 outp_iterate_enabled_drivers() instead of iterating
10476 outp_driver_list directly.
10478 Wed Dec 4 21:34:17 1996 Ben Pfaff <blp@gnu.org>
10480 * data-in.c: (parse_EDATE, parse_SDATE) New functions.
10481 (parse_string_as_format) Handles new formats.
10482 (parse_numeric) Now handles DOT and PCT formats.
10484 * data-out.c: (convert_E, convert_F, insert_commas) Handle DOT
10486 (convert_date) Handle EDATE and SDATE formats.
10487 (convert_CCx) Now if there's not room for the currency characters,
10488 converts it as F format if it's positive instead of giving up
10489 quickly. Also fixed save-and-restore bug with decimal point
10491 (convert_format_to_string) Handles new formats.
10493 * misc.c: (formats[]) Added new formats.
10494 (convert_fmt_ItoO) Supports new formats.
10496 * sfm-read.c: (parse_format_spec) Supports new formats. Better
10497 data checking. New argument, all references changed.
10499 * sfm-write.c: (write_format_spec) Supports new formats.
10501 * var.h: New formats FMT_DOT, FMT_PCT, FMT_EDATE, FMT_SDATE.
10504 Sun Dec 1 17:19:00 1996 Ben Pfaff <blp@gnu.org>
10506 * cmdline.c: Comment fixes.
10507 (parse_command_line) Changed return type to void.
10509 * data-in.c: (parse_string_as_format) Added FMT_CCA...FMT_CCE to
10511 (parse_numeric) Handles international numbers (comma as decimal
10512 point). Some reformatting.
10514 * data-list.c: (parse_free) Default output format is now
10515 set_format instead of hard-coded F8.2.
10516 (read_from_data_list_list) Emits error message on undefined data
10517 only if set_undefined is nonzero.
10519 * data-out.c: (convert_E) Changes decimal point from period to
10520 comma if appropriate. Restructured. Better comments.
10521 (convert_F) Changes decimal point from period to comma if
10523 (insert_commas) Major bug with handling of negative values fixed.
10524 Also, inserts periods instead of commas if appropriate.
10525 (convert_CCx) New function.
10526 (convert_format_to_string) Added FMT_CCA...FMT_CCE to switch.
10527 (num_to_string) Changed `.' to set_decimal.
10529 * dfm.c: Comment fixes.
10530 (dfm_close) Frees ext->line even in inline_file.
10531 (open_inline_file) New function.
10532 (open_file_r) When opening the inline file: now properly
10533 recognizes `BEGIN DATA.' line, and calls open_inline_file() to
10535 (read_record) Calls fh_close_handle() instead of dfm_close() to
10536 close the inline file. Makes a copy of the line getl_buf to avoid
10537 interlock problems.
10538 (dfm_get_record) Restructured. Now checks the return value of
10540 (cmd_begin_data) Moved open code into open_inline_file(). Relaxed
10541 checking for use of inline file. No longer tries to close inline
10544 * error.c: (glob var error_already_flagged) New var.
10545 (vmsg) Message change. Now checks max number of errors/warnings,
10548 * file-handle.q: (fh_handle_name) Now allows closing of
10550 (fh_init_files) Reformatted.
10552 * get.c: (trim_dictionary) Checks SCOMP option instead of COMP.
10554 * getline.c: (getl_include) Fixed bug that popped up when called
10555 when file queue was empty.
10556 (read_console) Resets error_count, warning_count,
10557 error_already_flagged to zero.
10559 * glob.c: Many changes to update list of variables.
10560 (init_compat_dependent) Now this function is called whenever
10561 `compat' changes. It now sets set_seed only if it hasn't
10562 previously been referenced. It now calls
10563 lex_init_compat_dependent().
10565 * include.c: (cmd_include_at) Frees temporary buffer instead of
10567 (cmd_include) Doesn't make copy of include file name.
10569 * lexer.c: Comment fixes.
10570 (init_lex) Moved some code into new function
10571 lex_init_compat_dependent().
10572 (lex_init_compat_dependent) New function.
10573 (hex_val) Simplified.
10574 (preprocess_line) Uses set_endcmd instead of hardcoding `.'.
10576 * main.c: Comment fixes.
10577 (main) Reformatted.
10579 * misc.c: (formats[]) Added FMT_CCA...FMT_CCE.
10580 (check_input_specifier) Disallows FMT_CCA...FMT_CCE.
10581 (convert_fmt_ItoO) Detects FMT_CCA...FMT_CCE.
10582 (setup_randomize) Sets set_seed_used.
10584 * set.q: Comment fixes.
10585 (custom_results) Conditionalizes on `compat'.
10586 (custom_log) Calls custom_journal().
10587 (set_ccx) New function.
10588 (cmd_set) Calls init_compat_dependent() when `compat' changes.
10589 Calls set_ccx() to handle CCA...CCE. Sets set_grouping
10590 when set_decimal changes. Range-checks values for MITERATE,
10591 MNEST. Message fixes.
10593 * settings.h: Comment fixes.
10594 (struct set_cust_currency) New struct.
10595 (set_cc[], set_grouping, set_seed_used) New global vars.
10597 * var.h: (FMT_CCA...FMT_CCE) New output formats.
10598 (FCAT_OUTPUT_ONLY) New FCAT_* constant.
10600 Thu Nov 28 23:14:07 1996 Ben Pfaff <blp@gnu.org>
10602 * glob.c: Revised variables to correspond to settings.h.
10603 (init_glob) Initializes variables from settings.h properly.
10605 * set.q: Began long-overdue major revision to correspond to new
10606 philosophy. Most code changed.
10608 * settings.h: Mostly changed; reorganized, reordered, large new
10611 Thu Nov 28 19:46:10 1996 Ben Pfaff <blp@gnu.org>
10613 * get.c: (cmd_save_internal) No longer forces compression off.
10615 * sfm-read.c: (read_compressed_data) If eof is reached when
10616 reading a new instruction octet, only signal error if we're in the
10619 * sfm-write.c: (COMPRESSION_BIAS) New #define.
10620 (struct sfm_fhuser_ext) New member `end'.
10621 (write_header) Refers to COMPRESSION_BIAS instead of magic 100.0.
10622 (ensure_buf_space) New function.
10623 (sfm_write_case) Reimplemented in order to support compression.
10624 (sfm_close) Writes out the remaining contents of the compression
10627 Wed Nov 27 23:18:35 1996 Ben Pfaff <blp@gnu.org>
10629 * command.c: Defined SAVE and XSAVE commands in command table.
10631 * common.h: second_lowest_value is of type flt64, not double.
10633 * file-handle.h: Comment fix.
10635 * get.c: Comment fixes.
10636 (static var `trns') New.
10637 (save_write_case_func, save_trns_proc, save_trns_free, null_func,
10638 cmd_save_internal, cmd_save, cmd_xsave) New functions.
10639 (dict_delete_run) Clears the variables and frees them now.
10640 (trim_dictionary) Sets default for compression.
10641 On KEEP subcommand, frees deleted variables as well as clearing
10642 them. Finally got the sense of the test for deleting all
10644 [DEBUGGING] (dump_dict_variables) Message fix.
10646 * glob.c: (init_glob) set_compression set to 1 by default.
10648 * list.q: Properly #includes config.h.
10650 * misc.h: New macro REM_RND_UP.
10652 * settings.h: Comment fix.
10654 * sfm-read.c: (structs sysfile_header, sysfile_format,
10655 sysfile_variable; inline function bswap_int32) Moved to new file
10657 (corrupt_msg) [__CHECKER__] No longer induces segfault.
10658 (sfm_read_dictionary) Fixed bug caused by failing to initialize
10660 (read_machine_flt64_info) Fixed some problems caused by confusion
10661 between flt64 and double types.
10662 (read_header) Message fix.
10663 (read_variables) Fixed set of cases in which we byte-swap sv.print
10664 and sv.write. Fixed confusion of flt64 and double.
10666 * sfm.h: (struct sfm_write_info) New.
10668 * som-high.c: (som_draw_title) Properly frees `s'.
10670 * temporary.c: (save_dictionary) Comment fix.
10672 * var.h: Comment fixes. New FMT_* enum, FMT_NUMBER_OF_FORMATS.
10673 (struct trns_header) Formatting fix.
10674 (struct save_trns) New.
10676 * vars-atr.c: (discard_variables) Comment fix.
10678 * sfm-write.c: New file, baseline release.
10680 * sfmP.h: New file, baseline release.
10682 Sun Nov 24 14:53:53 1996 Ben Pfaff <blp@gnu.org>
10684 * cmdline.c: (parse_command_line) `--version' output updated.
10685 (glob var syntax_message[]) Added my e-mail address.
10687 * file-handle.q, lexer.c, vfm.c: Changed many instances of
10688 `illegal' to `invalid'.
10690 * sfm-read.c: (struct sfm_fhuser_ext) New fields used as
10691 uncompression buffer.
10692 (sfm_close) Frees decompression buffer.
10693 (sfm_read_dictionary) Initializes decompression buffer.
10694 (buffer_input, read_compressed_data) New functions.
10695 (sfm_read_case) Restructured; now calls read_compressed_data() to
10696 handle compressed system file data.
10698 * var.h: Comment fix.
10700 Mon Nov 11 15:34:09 1996 Ben Pfaff <blp@gnu.org>
10702 * dfm.c: (dfm_close) Does not set h->{ext,class} because the
10705 * get.c: New comments. New static var `get_file'.
10706 (cmd_get) Now fully implemented. Calls discard_variables();
10707 initializes fv and lv for all variables; new debug code; sets
10708 up the dictionary; sets up the input program.
10709 (read_from_get, cancel_get) New functions.
10711 * sfm-read.c: Comment fixes.
10712 (sfm_close) New static function.
10713 (sfm_read_dictionary) Properly sets up the class of the
10714 file_handle. No longer cares what size the data is in records of
10715 type 7. Also, on failure, properly cleans up the file_handle and
10716 free()s some stuff.
10717 (read_variables) No longer thinks it knows `nval' of the
10718 dictionary. Now sets p.get.fv, etc., instead of speculatively
10720 (read_value_labels) Fixed off-by-one error in indexing of
10722 (sfm_read_case) New function.
10723 (sfm_r_class) New static var.
10725 * var.h: (get_proc) New struct.
10726 (struct variable) New member p.get.
10728 Thu Nov 7 20:52:28 1996 Ben Pfaff <blp@gnu.org>
10730 * get.c: Removed GTSV_OPT_MAP because of a misinterpretation of
10731 the manual's meaning.
10732 (rename_variables) New function.
10733 (trim_variables) Doesn't try to parse MAP any more. Removed debug
10734 code. Now properly reorders the dictionary on the KEEP keyword.
10736 * sfm-read.c: (read_value_labels) Fixed some bugs regarding
10737 garbage collection.
10739 * vars-atr.c: (clear_variable) New argument `dictionary *'.
10740 (rename_variable) New function.
10741 (free_val_lab) Reformatted.
10743 Thu Nov 7 17:29:16 1996 Ben Pfaff <blp@gnu.org>
10745 * var.h: Reindented entire file. Comment fixes.
10746 (glob vars var, var_by_name, nvar, N, nval, n_splits, splits)
10748 (glob var default_dict) New.
10749 (struct indirect_dictionary) Removed.
10751 * Many other source files were changed to add `default_dict.'
10752 before all references to the dictionary of the active file.
10754 * vars-atr.c: (make_indirect_dictionary) Removed.
10756 * glob.c: Reindented all variable declarations. Updated for
10757 changed var.h. Comment fixes.
10759 * temporary.c: (restore_dictionary, save_dictionary) Simplified
10760 because now we can mainly copy dictionary structs.
10762 * vars-prs.c: (is_dict_varname, parse_dict_variable,
10763 parse_variables) Takes dictionary instead of indirect_dictionary
10765 (parse_variables) Instead of calling make_indirect_dictionary,
10766 just sets DICT to &default_dict if DICT is NULL. Of course, lots
10767 of `*dict.' references had to be changed to `dict->'. Removed
10770 Thu Nov 7 15:48:52 1996 Ben Pfaff <blp@gnu.org>
10772 * get.c: Added GTSV_OPT_* series of enums.
10773 (trim_dictionary, dict_delete_run) New functions.
10774 [DEBUGGING] (dump_dict_variables) New function.
10775 (cmd_get) Calls trim_dictionary() to get dictionary fully set-up.
10776 [DEBUGGING] Calls dump_dict_variables() to display results.
10778 * glob.c: (cmp_variable) Now a public function declared in var.h.
10780 * sfm-read.c: Turned off debug code. Comment fixes.
10781 (read_machine_int32_info, read_machine_flt64_info) New functions
10782 to parse type 7 records.
10783 (sfm_read_dictionary) Properly byteswaps several fields now.
10784 Calls read_machine_*_info() to parse type 7 subtypes 3 and 4
10785 records. [DEBUGGING] Dumps dictionary.
10786 (read_variables) Sets `index' field of variables created properly.
10787 Constructs avl tree of variables in dictionary. [DEBUGGING] No
10788 longer dumps dictionary.
10789 (read_value_labels) Properly byteswaps fields. [DEBUGGING] New
10791 [DEBUGGING] (dump_dictionary) No longer stubbed out.
10793 * temporary.c: (restore_dictionary) Destroys `var_by_name' glob
10794 var before destroying any variables just to save a little time.
10796 * var.h: (struct variable) Reordered in order to make name[] the
10797 first member; this makes pointers to `variable' pointers to the
10798 variable name, simplifying avl trees, etc.
10799 (struct indirect_dictionary) New struct.
10801 * vars-atr.c: (find_variable) Rewritten for efficiency.
10802 (make_indirect_dictionary, is_dict_varname, parse_dict_variable)
10804 (is_varname) Rewritten for efficiency.
10805 (parse_variables) New argument, which is a `dictionary *'. All
10806 references changed. This function now reads variable names from
10807 the dictionary passed, or from the default dictionary if NULL.
10809 Tue Nov 5 18:34:59 1996 Ben Pfaff <blp@gnu.org>
10811 * misc.h: Added new macro DIV_RND_UP to perform integer division,
10812 rounding up. Changed many references to ROUND_UP to use this
10815 * sfm-read.c: Includes avl.h.
10816 (corrupt_msg) Induces a segfault under Checker.
10817 (macro assertive_bufread) New. Many references to bufread() now
10819 (sfm_read_dictionary) Split up into several functions. Added code
10820 to read dictionary records following the the type 2 records. Not
10821 quite complete. New variable `var_by_index'.
10822 (read_header, read_variables) New functions extracted from
10823 sfm_read_dictionary().
10824 (read_value_labels) New function.
10825 (bufread) Checks ferror() if fread() doesn't return the expected
10826 value; if ferror() is zero it's just EOF.
10827 (dump_dictionary) Stubbed out.
10829 * BTW: The source code now exceeds 50000 lines!
10831 Mon Nov 4 22:03:28 1996 Ben Pfaff <blp@gnu.org>
10833 * command.c: Added GET to cmd_table[].
10835 * list.q: Removed reference to alloca headers.
10836 (cmd_list) Gave prototype.
10838 * sfm-read.c: Added DEBUGGING comments.
10839 (sfm_read_dictionary) Checks bias correctly. Sets
10840 dict->var_by_name to NULL. Calculates long_string_count
10841 correctly. realloc's dict->var[] array to minimum size.
10842 [DEBUGGING] Calls dump_dictionary.
10843 [DEBUGGING] (dump_dictionary) New function.
10845 * temporary.c: (save_dictionary) Sets var_by_name to NULL.
10846 (restore_dictionary) If the dictionary contains a non-NULL
10847 var_by_name, uses that instead of generating one.
10848 (free_dictionary) Destroys var_by_name.
10850 * var.h: (struct dictionary) Added field `var_by_name'.
10852 * get.c: New file, not complete.
10854 Sun Nov 3 12:24:36 1996 Ben Pfaff <blp@gnu.org>
10856 * mis-val.c: New enums MV_NOR_*. New struct num_or_range.
10857 (parse_num_or_range) New function.
10858 (parse_numeric) Reimplemented in order to support LOW THRU <n> and
10859 <n> THRU HIGH missing values.
10861 * output.h: [__GNUC__>1 && __OPTIMIZE__] (width, height) Made
10862 __attribute__((const)).
10864 * q2c.c: (get_token) Merged isdigit || isalpha into isalnum.
10866 * sfm-read.c: Finished reference implementation.
10868 * sfm.h: Includes var.h.
10870 * var.h: Comment fixes.
10871 (struct `variable') Reordered some fields.
10873 * vars-atr.c: (is_num_user_missing) Added support for MISSING_*
10874 constants added previously.
10876 Wed Oct 30 17:13:08 1996 Ben Pfaff <blp@gnu.org>
10878 * common.h: Comment fixes. Added declaration of
10879 `second_lowest_value' as variable or macro. Made `compat_type',
10880 `pgm_state_type' into anonymous enums.
10882 * display.c: Comment fix.
10884 * glob.c: [ENDIAN==UNKNOWN] Added definition for `endian' global
10886 [!defined SECOND_LOWEST_VALUE] Added definition for
10887 `second_lowest_value' global var.
10888 (compat, pgm_state global vars) Changed types to `int'.
10889 (init_glob) Initializes `second_lowest_value'.
10891 * sfm-read.c: Continued work, not complete.
10893 * var.h: Added new MISSING_* constants to handle LOWEST and
10896 Sat Oct 26 23:06:06 1996 Ben Pfaff <blp@gnu.org>
10898 * sfm-read.c: New file, not complete.
10900 * cases.c: (vec_insert) Changed vector expansion algorithm.
10901 (vec_delete) Fixed bug that screwed up deletion sometimes, it was
10902 mucking up the RECODE transformation in particular.
10903 (envector) Harmless change in notation.
10905 dfm is now fairly well tested again.
10906 * dfm.c: (dfm_get_record) Only returns ext->ptr if ext is
10908 (cmd_begin_data) if(ext->line) replaced by if(ext && ext->line).
10910 * recode.c: Comment fix.
10912 * sfm.h: Interface should be fairly final now, or at least for a
10915 * vfm.c: [DEBUGGING] (index_to_varname) New function.
10916 (open_active_file) [DEBUGGING] Translates ccase indices into
10917 variable names now to make it easier to understand what's really
10920 Sat Oct 26 20:46:31 1996 Ben Pfaff <blp@gnu.org>
10922 * data-in.c: Comment fix.
10924 * data-list.c: Includes dfm.h.
10925 (do_reading) Uses new function dfm_push_cust().
10927 * data-out.c: (convert_time, convert_WKDAY, convert_MONTH) Added
10928 `return 1;' at end.
10930 * file-handle.h: Completely changed. Some parts split off into
10931 new file dfm.h. Implemented in file-handle.q.
10932 (enum FH_*) Removed.
10933 (struct fh_ext_class) New struct.
10934 (struct file_handle) Retained only these fields: name, norm_fn,
10935 fn, recform, lrecl, mode. New fields class, ext.
10936 (get_handle_by_name, get_handle_by_filename, parse_file_handle,
10937 close_handle, handle_name) Added `fh_' prefix to name, all
10938 references changed.
10940 * dfm.h: New file, implemented in dfm.c.
10941 (get_record, put_record, fwd_record, bkwd_record, set_record,
10942 get_cur_col) Functions moved from file-handle.h, now prefixed with
10944 (dfm_push_cust) New function.
10946 * sfm.h: New file. Incomplete.
10948 * dfm.c: All functions adjusted/rewritten for new dfm/fhp
10949 interface. Functions reordered, comments changed. Not well
10950 tested, probably full of bugs.
10951 (struct dfm_fhuser_ext) New struct.
10952 (dfm_close) New function.
10953 (open_file_r) Pickier about finding `BEGIN DATA.' line.
10954 (open_file_w) User messages changed.
10955 (get_record) Comment fixed.
10956 (read_record) Increments ext->ln even for inline_file. Calls
10957 dfm_close() for inline_file when `END DATA.' encountered.
10958 (dfm_get_record) Experimental restructuring.
10959 (dfm_push_cust) New function.
10960 (cmd_begin_data) Detects whether the inline file was fully read by
10961 checking whether it is still open; detects whether it was read at
10962 all by checking whether the line number is greater than zero.
10964 * file-handle.q: All functions adjust/rewritten for new dfm/fhp
10965 interface. Functions reordered, comments changed. Not well
10966 tested, probably full of bugs.
10967 (init_file_handle) Removed initializers for obsolete fields, added
10969 (fh_close_handle) Much simpler, now mainly calls the class
10971 (fh_init_files) Renamed inline file internal filename.
10973 * file-type.c: Includes dfm.h.
10974 (read_from_file_type) Doesn't use dfm internal state anymore.
10976 * inpt-pgm.c, print.c: Include dfm.h.
10978 * recode.c: (internal_cmd_recode) Casts strlen() return value to
10979 int in comparison with other int.
10981 * som-high.c: (build_target) Fixed operator precedence problem in
10982 if statement (& versus ==).
10984 Sat Oct 26 10:39:25 1996 Ben Pfaff <blp@gnu.org>
10986 * dfm.c: (read_record) Can now read fixed-length records; not
10988 (put_record) Can now write fixed-length records; not tested.
10990 * file-handle.h: FH_* defines changed to enums. New enum series
10992 (struct file_handle) New members recform, lrecl, mode.
10994 * file-handle.q: Parser changed.
10995 (internal_cmd_file_handle) Added support for new /RECFORM, /MODE,
10996 /LRECL subcommands. These are compatible with Windows.
10997 (init_file_handle) Initializes recform, mode fields.
10999 * q2c.c: (get_line) When outputting `!' comment lines, now
11000 increments the output file line number so that `#line' directives
11002 (make_identifier) New function that converts an arbitrary string
11003 into a valid C identifier.
11004 (dump_vars) Calls make_identifier() in two places in order to
11005 suppress some errors for bad identifiers.
11006 (make_match) Allows TRUE as synonym for YES and FALSE as synonym
11007 for NO. Allows numbers to be prefixed by underscores to make them
11008 acceptable C identifiers but still to be parsed as numbers by the
11011 Thu Oct 24 20:13:42 1996 Ben Pfaff <blp@gnu.org>
11013 * command.c: Re-enabled RECODE, SAMPLE, SELECT IF.
11015 * dfm.c: Comment fixes. (get_record) Gives error if file handle
11016 was opened for writing.
11017 (open_file_w) New function.
11018 (read_record) Uses strncasecmp if available. Improved error
11019 messages, comments.
11020 (put_record) New function.
11022 * file-handle.h: Moved function comments into dfm.c and
11023 file-handle.q. Comment fixes. Removed declarations of
11024 tilde_expand() and normalize_filename().
11025 (struct file_handle) Changed `open' from boolean to enumerated
11026 field to allow for three states--closed, open for reading, open
11027 for writing--all references changed.
11029 * file-handle.q: Includes filename.h.
11031 * print.c: (CMD_* enums) Renamed PRT_* and moved into var.h; all
11032 references changed.
11033 (alloc_line) Makes allowance for line terminator characters in
11035 (print_trns_proc) Now handles OUTFILE, WRITE differences.
11036 (print_space_trns_proc) Handles OUTFILE differences.
11038 * recode.c, sample.c: Comment fixes.
11040 * var.h: (struct print_trns) Changed boolean field `eject' to
11041 bitmapped field `options'; all references changed. New enums
11042 PRT_* for use with this field.
11044 * exception.h, test-exception.c: Removed.
11046 Thu Oct 24 17:47:14 1996 Ben Pfaff <blp@gnu.org>
11048 * ascii.c: (delineate) Turned off debug output.
11050 * common.c: [Checker and Linux] (__assert_fail, __eprintf) Moved
11053 * data-in.c: (parse_string_as_format) Sets the entire string value
11054 to spaces, not just the short string part of it. Is this correct
11057 * data-out.c: (convert_date) Fixed DATETIME format problems with
11058 decimal places, removed debug code.
11060 * dfm.c: (open_file_r) Fixed bug where an error would occur in the
11061 middle of parsing BEGIN DATA that would cause the lexer to read
11062 from a wild pointer `prog'; now calls new function
11063 preprocess_line() in lexer.c.
11065 * error.c: [__CHECKER__] (hcf) Calls induce_segfault() on improper
11067 [Checker and Linux] (__assert_fail, _eprintf) Moved from common.c.
11068 Now call induce_segfault() to induce the segfault.
11069 (induce_segfault) New function.
11071 * expr-opt.c: Comment fix.
11072 (parse_sysvar) New function.
11073 (parse_primary) Added system variable support--calls
11075 (global var ops) Added OP_CASENUM operator.
11077 * expr.h: Comment fixes.
11078 (OP_* enum) added OP_CASENUM operator.
11079 (struct casenum_node) New struct.
11080 (union any_union_union) New member `cas' of type `casenum_node'.
11082 * glob.c: (global var last_vfm_invocation) New var.
11083 (init_glob) Initializes last_vfm_invocation.
11085 * lexer.c: (lookahead) Fixed reversed condition on if statement.
11087 * getline.c: (get_line) Split into get_line() and preprocess_line().
11088 (preprocess_line) New function.
11090 * var.h: Declares last_vfm_invocation.
11092 * vfm.c: (procedure) Sets last_vfm_invocation.
11094 Wed Oct 23 21:53:43 1996 Ben Pfaff <blp@gnu.org>
11096 * command.c: (parse_cmd) Fixed bad assertion related to
11099 * data-in.c: (parse_month) Implemented to parse months according
11100 to full interpretation of standard.
11101 (to_roman) New function.
11102 (parse_wk_delimiter) Bug fix (forgot to skip `WK' in string).
11103 (parse_weekday) Bug fix (forgot to skip all the day name).
11105 * data-list.c: (read_from_data_list_fixed) Fixed bug that screwed
11106 up parsing of multirecord data items. Also fixed user message.
11108 * data-out.c: Comment fix.
11109 (year2, year4, convert_date, convert_time, convert_WKDAY,
11110 convert_MONTH) New functions to support time & date output.
11111 (convert_format_to_string) Calls new time & date output routines.
11113 * expr-prs.c: (nary_num_func) Found a bug, but didn't fix it yet.
11115 * lexer.c: (lookahead) Noted a previously unnoticed caveat in
11118 * main.c: [DEBUGGING] (dump_token) Updated to handle getline.h.
11120 * misc.c: (global var formats) Fixed declarations of DATETIME,
11123 * postscript.c: (text) Fixed a pair of bugs in the reallocation of
11124 the output_char buffer.
11126 * vars-prs.c: (parse_DATA_LIST_vars) Fixed a failure to free
11127 memory bug. Fixed user messages.
11129 Tue Oct 22 17:27:04 1996 Ben Pfaff <blp@gnu.org>
11131 * Removed #pragma argsused from lots of places.
11133 * data-in.c: Implemented zoned decimal and time-date formats.
11134 Untested. This is a huge chunk of code--maybe 1000 lines and 50
11137 * data-out.c: Implemented zoned decimal format.
11139 * expr.h: Moved yrmoda() declaration here from exprP.h.
11141 * misc.c: (global var formats) Minor fixes--added
11142 FCAT_SHIFT_DECIMAL to formats N and Z.
11143 (convert_fmt_ItoO) Added support for format Z.
11145 * som-frnt.c: (som_set_value) Fixed bug regarding string values.
11147 Mon Oct 21 20:39:59 1996 Ben Pfaff <blp@gnu.org>
11149 * command.c: (parse_cmd) [GLOBAL_DEBUGGING] Inserted call to
11150 som_check_workspace() that is activated between commands.
11152 * data-list.c: (dump_fixed_table, dump_free_table) Finished these
11155 * list.q: (begin_row) Changed title expansion style from
11156 SOPT_X_VERT to SOPT_X_SHSP.
11158 * som-frnt.c: Now includes `somP.h'.
11159 (som_push_workspace, som_pop_workspace) New functions that, taken
11160 together, form a solution to the recursive table building problem
11161 mentioned yesterday. Surrounded every table output routine
11162 throughout the program with calls to these functions.
11163 [GLOBAL_DEBUGGING] (som_check_workspace) New function.
11164 (som_create_table) Checks that there's an active workspace.
11165 (som_destroy_all_tables, som_crush) Removed.
11167 * som-high.c: (global var som_preserve_tables) Removed, all
11168 references deleted.
11169 (som_submit_table) Checks that there's an active workspace.
11170 (dump_columnated_table) Doesn't columnate tables that would have
11171 just one row per column.
11172 (dump_crush_page, som_dump_crush_page) Removed debugging code.
11173 (som_dump_crush_page) Moved row number labels from left side of
11174 tables to right side.
11175 (som_get_table_size) Added support for SOPT_X_SHSP.
11177 * som.h: New cell expansion type SOPT_X_SHSP.
11179 * somP.h: (global vars arena_stack, n_arena_stack, m_arena_stack)
11181 (global var curtab_arena) Moved from som-frnt.c.
11183 Sun Oct 20 13:45:28 1996 Ben Pfaff <blp@gnu.org>
11185 * ascii.c: [GLOBAL_DEBUGGING] (SUPPRESS_WARNINGS) New debug option
11186 that causes bad location warnings to be suppressed.
11187 (delineate) Saves current font when calling draw_text(); fixed
11188 handling of NULLs when backing up. Also fixed line-wrapping bug.
11190 * command.c: Re-enabled `LEAVE', `NUMERIC', `PRINT', `PRINT EJECT',
11191 `PRINT FORMATS', `PRINT SPACE', `STRING', `TITLE', `WRITE'.
11193 * common.c: Added code to cause assertion failure to dump core
11194 when run under Checker.
11196 * data-list.c: (dump_fixed_table) Fixed some inconsistencies, but
11197 there are still bugs.
11199 * glob.c: (__eprintf) Removed.
11201 * list.q: Inserted som_preserve_tables kluge that prevents tables
11202 from being thrown away due to recursive table building through
11203 som_output_line being called from a transformation during the LIST
11204 procedure invocation. This is a general problem that must be
11205 solved in a better way since it applies to all procedures in
11207 (begin_row) Changed title options to SOM_X_VERT from SOM_X_BOTH.
11208 (flush_table) Removed SOM_TOPT_PRESERVE from submission options.
11210 * numeric.c: Fixed several errors in the form of msg() calls.
11212 * print.c: Updated for use of som.
11213 (dump_table) Reimplemented.
11214 (print_trns_proc) Calls som_eject_page() instead of eject_page().
11215 Calls som_output_text() instead of outs_line().
11217 * som-frnt.c: (som_destroy_all_tables) Sets som_preserve_tables to
11219 (som_output_text) Function moved from som-low.c. Interface
11222 * som-high.c: (som_preserve_tables) New global public variable
11224 (som_submit_table) Destroys the tables only if som_preserve_tables
11226 (paginate_horizontally) Bugfix: sets som.mpw even if there's only
11227 one subrow per row. Now labels subrows if there's more than one
11229 (dump_crush_table) Added wishlist comment.
11230 (som_eject_page) New public function declared in som.h.
11232 * som-low.c: (som_dump_crush_page) Draws row labels if there's
11233 more than one subrow per row.
11234 (som_output_text) Moved to som-frnt.c.
11236 * som.h: (SOM_TOPT_PRESERVE) Removed.
11238 * title.c: (get_title) Changed interface.
11239 (cmd_title) Changed `title' to `outp_title'.
11240 (cmd_subtitle) Changed `subtitle' to `outp_subtitle'.
11242 Sun Oct 20 09:04:15 1996 Ben Pfaff <blp@gnu.org>
11244 * list.q: (flush_table) Conforms to new partial options in
11245 som_submission_form.
11247 * som-high.c: (paginate_horizontally) Changed form of subrow
11249 (build_target) Omits spacing before table if
11250 SOM_TOPT_PARTIAL_OMIT_TOP is selected.
11251 (dump_crush_page) Changed interface. Only trims bottom rule if
11252 SOM_TOPT_PARTIAL_OMIT_BTM is not selected.
11253 (dump_crush_table) Handles partial tables.
11254 (output_row_label) New function.
11255 (som_dump_crush_page) Emits subrow number labels. Draws vertical
11256 rule on the right edge of narrow subrows.
11258 * som.h: Changed SOM_SUB_PARTIAL_* series of submission type
11259 constants to a series of SOM_TOPT_PARTIAL_* submission options.
11260 All references updated.
11262 Fri Oct 18 19:46:49 1996 Ben Pfaff <blp@gnu.org>
11264 * misc.c: Comment fix.
11266 * som-high.c: (examine_table) Treats crushed tables separates for
11267 purpose of determining header size.
11268 (paginate_horizontally) Allots space for line numbers in crushed
11269 tables with lots of subrows per row. Calculates the `maximum page
11270 width', the width of the widest horizontal page.
11271 (build_target) Removed trim argument; all references changed.
11272 Stricter assertions. (dump_crush_page) New function.
11273 (dump_crush_table) Reimplemented.
11275 * som-low.c: (som_dump_page) Uses new RULE_ROW &c. constants.
11276 (som_dump_crush_page) Reimplemented, interface changed.
11278 * somP.h: Many many new helper macros for use with crushed tables.
11279 (global var som) Removed `tv', `cum_y' members; all references
11280 removed. New members `mpw', `digit_space'.
11282 Sun Sep 29 19:37:03 1996 Ben Pfaff <blp@gnu.org>
11284 * arena.c: (arena_alloc) [!DISCRETE_BLOCKS] Removed `size'
11285 variable, changed to constant 1024.
11286 (arena_ca_strdup) Changed `sizeof(a_string)' to
11287 `sizeof(c_string)'.
11288 (arena_ca_strdup) [!DISCRETE_BLOCKS] Changed bad cast from
11289 `(c_string *)' to `(char *)'; this fixed some offset problems.
11291 * filename.c: (readlink_malloc) Changed initial allocation from
11293 (good_getcwd) Changed from xmalloc() to local_alloc(); removed
11296 * postscript.c: (read_fontmap) Fixed leak by changing &owner to
11297 &fm->owner in several places.
11299 * som-high.c: (output_table) Changed interface to rest of world.
11300 (examine_crush_table) Removed. Crushed tables are re-broken now,
11301 in preparation for rewrite.
11303 * som.h: Comment fix.
11305 Sat Sep 28 21:28:07 1996 Ben Pfaff <blp@gnu.org>
11307 * ascii.c: (ascii_init_driver) Disposes of x->file.filename and x
11308 itself in the cleanup stage.
11310 * descript.q: (display) At least temporarily, changed the table
11311 format to a crushed table.
11313 * list.q: (begin_row) At least temporarily, added horizontal lines
11316 * som-high.c: (examine_crush_table) Sets som.hh to the width of
11317 the horizontal "headers," that is, to the width of the far left
11318 and far right rules.
11319 (justify_pagination) Sets som.th to the width of the widest row
11320 in the crushed table. Fixed inner loop off-by-one error.
11322 * som-low.c: (som_dump_crush_page) Added code to draw horizontal
11325 * somP.h: Comment fix.
11327 Fri Sep 27 20:08:39 1996 Ben Pfaff <blp@gnu.org>
11329 * filename.c: (open_file_ext) Now, doesn't set f->file to NULL
11330 before closing it; also, opens the constructed filename `s'
11331 instead of f->filename.
11333 * postscript.c: Moved initialization of x->loaded, x->prop,
11334 x->fixed, x->current, also the add_encoding() calls, into
11336 (preclose) Destroys x->combos; sets x->loaded, x->combos to NULL;
11337 sets x->last_font to NULL; sets x->next_combo to zero.
11339 * som-high.c: (crushed_row_height) Moved definition farther up.
11340 (som_submit_table) Doesn't calculate line width, font size until
11341 after calling open_page(), to accomodate changes to PostScript
11343 (vert_headers) Removed; equivalent functionality moved to
11344 examine_table(), examine_crush_table().
11345 (justify_pagination) Replaced with different algorithm.
11346 (dump_crush_table) Bugfix that caused tables to fail to be clipped
11347 at the bottom of the page.
11349 Thu Sep 26 22:20:26 1996 Ben Pfaff <blp@gnu.org>
11351 * command.c: Added cmd_list back into cmd_table.
11353 * freq.c, frequencies.q, repeat.c, list.q, vars-atr.c, vfm.c:
11354 Comment fix: `#define DEBUGGING' --> `#define DEBUGGING 1'.
11356 * list.q: (flush_table) Updated to new som_submission_form format.
11358 * som-frnt.c: Comment fix.
11360 * som-high.c: Changed `#endif' to `#undef EXTERN'.
11361 (output_table) Calls som_get_table_size() directly; handles
11363 (examine_crush_table) New function; calls vert_headers().
11364 (examine_table) Moved some code into new function, vert_headers().
11365 (justify_pagination) New function.
11366 (dump_plain_table) Removed `static' from `cy'.
11367 (dump_crush_table) New function.
11369 * som-low.c: (som_dump_crush_page) New function.
11371 * som.h: Comment fixes.
11372 (enum SOM_TOPT_CRUSH) New.
11373 (SOM_SUB_PARTIAL_BEG, SOM_SUB_PARTIAL_MID, SOM_SUB_PARTIAL_END)
11374 Temporarily set to zero to make do with LIST procedure.
11376 * somP.h: Re-ordering.
11378 Wed Sep 25 19:36:11 1996 Ben Pfaff <blp@gnu.org>
11380 * som.c: Split into som-frnt.c, som-high.c, som-low.c.
11382 * somP.h: New file for use by som-high.c, som-low.c.
11384 * q2c.c: Added definition for VME.
11385 (get_line) Now dumps `!' comment lines to the output file
11388 * crosstabs.q, descript.q, file-handle.q, frequencies.q, list.q,
11389 set.q: Changed format of `!' comment lines.
11391 Tue Sep 24 18:39:09 1996 Ben Pfaff <blp@gnu.org>
11393 * All source files: Added copyright notice.
11395 * common.c: (xmalloc, xrealloc, xstrdup) Cast size_t's to unsigned
11396 longs in msg() calls.
11398 * con32s.c: (xmalloc, xrealloc) Updated from common.c.
11400 * q2c.c: (xmalloc, xrealloc, xstrdup) Updated from common.c.
11402 Sat Sep 21 23:16:31 1996 Ben Pfaff <blp@gnu.org>
11404 * output.c: (outp_read_devices) Changed criteria for
11405 distinguishing different types of lines.
11407 Fri Sep 20 22:52:28 1996 Ben Pfaff <blp@gnu.org>
11409 * cmdline.c: Changed syntax message.
11411 * filename.c: (good_getcwd) Bug fix (?).
11412 (normalize_filename) [__BORLANDC__] Uses _fullpath() library
11414 (search_path) Appends DIR_SEPARATOR to directory name only if it
11415 does not already end with one.
11417 * glob.c: Checks STAT_PAGER envvar before PAGER.
11419 * output.c: Checks environment variables instead of just local
11422 Tue Sep 10 21:39:00 1996 Ben Pfaff <blp@gnu.org>
11424 * arena.c: (arena_destroy) Swatted a subtle bug that cropped up
11425 when the pointer passed to the function was within the arena
11426 itself, so that it couldn't properly be set to NULL _after the
11429 * command.c: Re-enabled DISPLAY.
11431 * display.c: Rewritten to handle tables. Untested.
11433 * filename.c: (search_path) Fixed memory leak.
11435 * frequencies.q: (cmd_frequencies) Frees v_variables.
11436 (postcalc) Calls cleanup_freq_tab() after displaying statistics.
11437 (cleanup_freq_tab) New function to garbage collect.
11438 (dump_full) Elegantized.
11440 * main.c: New comment.
11442 * output.h: New tag for tagged quotes: TAG_NEWLINE.
11444 * postscript.c: Comment fix.
11445 (release_fontmap, free_font_entry) New functions.
11446 (ps_init_driver) Sets free_font_entry() as the freefunc for
11447 hashtable `loaded'. Calls release_fontmap() when destroying a
11448 driver; also frees the output filename; also frees the
11449 ps_driver_ext block.
11450 (free_ps_encoding) Frees the filename as well as the encoding
11452 (output_encodings) Frees the line buffer and pops the msg-filename
11454 (read_fontmap) Frees the fontmap filename and the line buffer.
11455 (postopen, preclose) Misc. garbage collection fixes.
11456 (ps_open_page) Destroys the `combos' hash table; sets `last_font'
11457 to NULL; this fixes some output problems.
11458 (text) Handles TAG_NEWLINE. Untested.
11460 * som.c: (cell_byte_size) Merged SCON_VALUE and SCON_TEXT cases.
11461 (som_set_string) Removed. All references changed to
11463 (som_set_text) Rewritten. New interface. More general.
11465 * som.h: Minor format changes.
11466 (struct som_value_cell) Removed; all references changed to
11468 (enums SOT_*) Changed.
11470 Mon Sep 9 21:43:13 1996 Ben Pfaff <blp@gnu.org>
11472 * command.c: Re-enabled SPLIT FILE.
11474 * postscript.c: Comment fix.
11476 * som.h: Added `SOT_NONE'.
11478 * split-file.h: (cmd_split_file) Removed superfluous parenthesis.
11480 * vfm.c: (dump_splits) Reimplemented.
11482 Sat Sep 7 22:35:12 1996 Ben Pfaff <blp@gnu.org>
11484 * Compiled the project under gcc 2.7.2, which gave some new
11485 warnings. This led to many additions of casts from unsigned to
11486 int sprinkled throughout the code.
11488 * arena.c: Many uses of `unsigned' changed to `size_t'.
11490 * command.c: Added END FILE, END REPEAT to command table.
11491 (var cmd_end_repeat) Renamed cmd_end_repeat_p.
11492 (find_command, FILE_TYPE_okay) Not commented out anymore.
11493 (parse_cmd) Calls FILE_TYPE_okay again.
11494 (output_line) Added calls to som_output_text() to put the line
11495 in the output files.
11497 * common.c: (macro VME) Format changes.
11498 (xstrdup) Asserts that its argument is not NULL.
11500 * data-list.c: Implemented dump_fixed_table().
11502 * inpt-pgm.c: Formatting changes. Comment changes.
11503 (end_case_proc) Renamed end_case_trns_proc.
11504 (cmd_end_file, end_file_trns_proc) New functions.
11506 * misc.c: Many uses of `int' and `unsigned' changed to `size_t'.
11508 * misc.h: (local_strdup) New macro corresponding to strdup() but
11509 allocating its data through local_alloc() if possible--that is, if
11512 * postscript.c: Comment changes.
11513 (quote_ps_name, quote_ps_string, output_encodings) New functions.
11514 (output_line, add_string) New macros supporting
11515 output_encodings().
11516 (postopen) Fixed contents of ${fixed-font} and ${prop-font}
11517 substitution vars. Calls output_encodings() when a line
11518 consisting of `!encodings' is encountered.
11519 (preclose) Some code moved into quote_ps_string().
11520 (dump_line) Changed into macro supporting dump_fancy_line().
11521 (switch_font) Now outputs DSC "%%IncludeResource: font (...)"
11522 command when appropriate.
11523 (write_text) Fixed `literal_char' array (I think it's fixed, at
11525 (text) Fixed bug when width was zero. Now exits immediately on
11526 zero height_left. Now, when executing `goto restart;', checks
11527 that cp<end, so that we don't read beyond end-of-string. Also,
11528 outputs the correct code to the output file by outputting the code
11529 from the metric instead of the internal metric index.
11531 * repeat.c: (cmd_end_repeat) New function.
11533 * som.c: (var som) `headers' renamed `options' and semantics
11534 changed. All references changed.
11535 (draw_title) `if(px!=-1 || px!=-1)' --> `if(px!=-1 || py!=-1)'.
11536 (build_target) Only inserts spacing if SOM_TOPT_SPACING not
11538 (som_text_table) Removed.
11539 (som_output_text) New function.
11541 * som.h: (struct som_submission_form) Removed `header', `reuse',
11542 replaced with bitmapped field `options'.
11543 (SOM_TOPT_*) New enum set for som_submission_form.options.
11544 (SOT_*) New enum set for som_output_text().
11546 * temporary.c: (copy_variable) When copying the var label, only
11547 calls xstrdup() if it's non-NULL.
11549 * var.h: (enum type `vartype') Removed; all references changed to
11552 * vars-atr.c: (init_variable) Changed local var `nbytes' from
11555 Thu Sep 5 22:05:56 1996 Ben Pfaff <blp@gnu.org>
11557 * font.h: Comment changes.
11559 * groff-font.c: (groff_read_font) Initializes `name' field to
11560 NULL. Handles `encoding' field.
11562 * hash.c: (hsh_dump) [GLOBAL_DEBUGGING] Output formatting changes.
11564 * postscript.c: (struct font_entry) Removed `position' field.
11565 (struct ps_font_combo) New struct.
11566 (struct ps_driver_ext) Removed field `next_position'. New fields
11567 `combos', `next_combo'. `last_font' field changed from
11568 `font_entry *' to `ps_font_combo *'.
11569 (ps_init_driver) Reformatted; handles new fields. When
11570 OPO_AUTO_ENCODE is set, adds the two default fonts' encodings to
11572 (get_encoding, find_encoding_file) New functions.
11573 (add_encoding) Some code moved out into find_encoding_file().
11574 (postopen) Changed value for ${title}.
11575 (preclose) Sets `loaded' field to NULL after destroying the hash
11577 (ps_open_page) Added comment. Inits the `combos' and `next_combo'
11579 (ps_text_set_font_by_position) Figures out the current family if
11581 (compare_ps_combo, hash_ps_combo, free_ps_combo) New functions.
11582 (switch_font) Implemented.
11583 (write_text) Calls switch_font() more often. Format changes.
11584 #undefs its macros after they're no longer useful.
11585 (text) Changed `continue' at one point to a jump to the top of the
11586 loop because we don't want `separate' reset to 0 at that point.
11587 (load_font) No longer sets `position' in the font_entry created.
11589 Wed Sep 4 21:45:35 1996 Ben Pfaff <blp@gnu.org>
11591 * font.h: (struct font_desc) New member `encoding', which is not
11592 properly handled yet.
11594 * glob.c: (init_glob) Some new i18n code, which is probably
11597 * output.c: (outp_read_devices, outp_get_paper_size) Changed
11598 `size' local from `int' to `size_t'.
11600 * postscript.c: New driver configuration parameter `auto-encode'.
11601 New enums OPO_AUTO_ENCODE, ODA_COUNT.
11602 (struct font_entry) New member `position'.
11603 (struct ps_driver_ext) Reordered. New hash table member
11604 `encodings'; new members `next_position', `next_encoding',
11605 `last_font'. Members `current', `prop', `fixed' changed from type
11606 `font_desc *' to `font_entry *'; all references changed.
11607 (struct ps_encoding) New struct.
11608 (read_ps_encodings, compare_ps_encoding, hash_ps_encoding,
11609 free_ps_encoding, add_encoding) New functions.
11610 (ps_init_driver) Added OPO_AUTO_ENCODE to default
11611 x->output_options. Initializes new members of ps_driver_ext.
11612 Changed default value for prologue_fn, encoding_fn. Calls
11613 read_ps_encodings after loading default fonts.
11614 (option_tab[], ps_option) Handle new configuration parameter.
11615 (switch_font) New function.
11616 (struct output_char) `font' member changed from `font_desc *' to
11617 `font_entry *'. New member `separate'.
11618 (read_fontmap) Changed `size' from `int' to `size_t'.
11619 (output_line, put_number) New macros for write_text().
11620 (write_text) Optimizes text output by consolidating multiple
11621 calls to PostScript `show' operator.
11622 (text) Keeps track of when text arguments can't be consolidated by
11623 write_text(), and marks those spots in the output stream.
11624 (load_font) Sets `position' of the allocated font_entry to -1, cuz
11625 the font hasn't been switched to by switch_font(), which is where
11626 the position is important--the PostScript is what cares about the
11629 Sat Aug 31 23:52:38 1996 Ben Pfaff <blp@gnu.org>
11631 * hash.c: (hsh_destroy) Ignores NULL argument. Doesn't try to
11632 call a NULL free_func.
11633 (hsh_rehash) Elegantized.
11634 (hsh_probe) Fix bug that manifested when the table was expanded
11635 and thus had to change location in memory. Good thing
11636 too--otherwise could have been much more subtle.
11637 (hsh_find) [GLOBAL_DEBUGGING] Not stubbed out anymore.
11638 (hsh_foreach) New function for hash table iteration.
11640 * hash.h: (struct hsh_iterator) New.
11642 * lexer.c: (parse_tagged_quote) Font and family name strings in
11643 tags are now null-terminated.
11645 * output.c: (outp_evaluate_dimension) Fixed over-aggressive unit
11647 (internal_get_paper_size, outp_get_paper_size) Fixed; now work as
11648 documented. (Never before tested?)
11650 * output.h: Comment changes.
11652 * postscript.c: New driver options `optimize-text-size',
11653 `optimize-line-size', `max-fonts-simult'. New enum set for
11654 specing cached line types. Comment fixes.
11655 (struct line_form) New struct.
11656 (struct ps_driver_struct) New members `text_opt', `line_opt',
11657 `max_fonts', `lines'.
11658 (ps_init_driver) Initializes new members of ps_driver_struct.
11659 (user option type enum set) New member `nonneg_int_arg'.
11660 (static var option_tab[]) Supports new options.
11661 (ps_option) Handles new options.
11662 (find_ps_file) Made static. No longer calls hsh_dump().
11663 (ps_get_var) Made static.
11664 (preclose) Dumps out proper DSC trailer.
11665 (ps_open_page) Elegantized.
11666 (ps_close_page) Calls dump_lines() if appropriate.
11667 (ps_line_horz, ps_line_vert, ps_line_intersection) Reduced to
11668 wrappers around line().
11669 (int_2_compare, compare_line, dump_line, dump_fancy_line,
11670 dump_lines, hash_line, free_line, line) New functions for support
11672 (write_text, text) Made static.
11673 (text) Added to font support, not finished.
11675 Thu Aug 29 21:36:41 1996 Ben Pfaff <blp@gnu.org>
11677 * font.h: (struct font_desc) New members ascent, descent.
11679 * groff-font.c: (groff_read_font) Calculates font ascent and
11680 descent from the ascent and descent of the `d' and `p' characters,
11681 respectively, as per a suggestion on comp.fonts.
11683 * postscript.c: (ps_open_page, ps_close_page, ps_line_horz,
11684 ps_line_vert, ps_line_intersection) Rewritten to deal with changed
11686 (write_text) Handles text right-justification and centering (not
11687 full justification). Still very inefficient. (One output line
11689 (struct output_char) Added fields for font and font size.
11690 (text) Many bugfixes.
11692 Sat Aug 24 23:26:00 1996 Ben Pfaff <blp@gnu.org>
11694 * cmdline.c: (usage) Calls outp_list_classes().
11696 * font.h: Comment fix.
11698 * groff-font.c: New exported global var `space_index'.
11699 (groff_init) New function to initialize `space_index'.
11700 (hash_kern) Casts result to unsigned.
11701 (font_name_to_index) Renamed font_char_name_to_index. All
11702 references changed. Also, now returns the value of `space_index'
11703 when passed an ASCII space character as an argument. Fixed
11705 (font_get_kern_adjust) Changed i from `int' to `unsigned'.
11706 Handles passed NULL pointers properly.
11708 * lexer.c: (parse_tagged_quote) Comment fix. Better range
11711 * output.c: (outp_list_drivers) Removed. Removed all references.
11713 * output.h: Comment fixes.
11715 * postscript.c: (ps_open_global) Calls groff_init().
11716 (output_char) New structure.
11717 (write_text) New function.
11718 (text) No longer stubbed out! Now the output is correct--with a
11719 few exceptions, one of them being that the page has to be held
11720 upside down into a mirror.
11722 Sun Aug 11 21:31:22 1996 Ben Pfaff <blp@gnu.org>
11724 * font.h: Comment fix.
11726 * font.c: (name_to_index) Renamed font_name_to_index, made extern.
11727 All callers changed.
11728 (number_to_index) Renamed font_number_to_index, made extern. All
11730 (font_get_kern_adjust, font_get_char_metrics) New functions.
11732 * output.h: New constant OUTP_T_INTERNAL_DRAW.
11734 * postscript.c: Changed default line width back to 1/2 point.
11735 (ps_line_horz, ps_line_vert, ps_line_intersection) Now lines are
11736 in the center of the space allotted for them, not just a fixed
11737 offset from the edge of the space; this fixes some bugs.
11738 (ps_line_intersection) Now supports all command line styles.
11739 (ps_text_get_size) Bug fix in computation of em width.
11740 (text) New function, the meat behind ps_text_metrics and
11741 ps_text_draw. Not complete.
11742 (ps_text_metrics, ps_text_draw) Removed the stub taken from
11743 ascii.c; call text().
11745 Sat Aug 10 23:28:17 1996 Ben Pfaff <blp@gnu.org>
11747 * arena.c: (arena_free) Assert that the argument is non-NULL.
11749 * groff-font.c: (add_kern) Calls arena_free() for old_kern if and
11750 only if old_kern is non-NULL.
11752 * postscript.c: (ps_init_driver) Changed default line width to 1
11754 (postopen) New prologue variables.
11755 (ps_line_horz, ps_line_vert, ps_line_intersection) Implements some
11756 more of the common line styles properly, but not all.
11757 (ps_text_metrics) Fixed problem with this stubbed out version that
11758 kept it from taking font sizes into account.
11760 Thu Aug 8 22:31:11 1996 Ben Pfaff <blp@gnu.org>
11762 * arena.c: (arena_malloc) Bug fix.
11763 (arena_dump) [GLOBAL_DEBUGGING] New function.
11765 * ascii.c: Comment fix.
11766 (count_fancy_chars, delineate) Now static functions.
11768 * filename.c: (interp_vars) Bug fixes.
11770 * font.h: Comment fixes.
11772 * glob.c: (init_glob) Sets set_viewwidth, set_viewlength at
11773 beginning in case we have an error message to display before
11774 initializing the display.
11776 * groff-font.c: Comment fix. Changed rehash threshold from 2/3
11778 (groff_read_font) Bug fixes.
11779 (name_to_index) Increments hash.used. Sets `name' field of hash
11781 (add_kern) Sets kern_max_used after rehashing. Other bug fixes.
11783 * hash.c: Return type changed.
11785 * postscript.c: Continued development. Now marks lines on the
11786 paper, but very buggy.
11788 Sat Aug 3 20:50:35 1996 Ben Pfaff <blp@gnu.org>
11790 * Changed comments in many source files from `/* xxx /* yyy */' to
11791 `/* xxx */ /* yyy */' for cleanliness.
11793 * arena.c: (arena_sd_strdup) New function.
11795 * ascii.c: (struct ascii_driver_ext) New member `file'.
11796 (ascii_init_driver) Fills out member `file' for initing; uses
11797 close_file_ext for closing drivers.
11798 (ascii_option) Changed %.*s back to %s because the a_string's are
11799 always null-terminated.
11800 (postopen, preclose) New functions.
11801 (ascii_open_page) Uses new style of open_file_ext.
11802 (ascii_option, commit_line_buf, output_lines) Use ext->file.file
11803 instead of this->output.
11804 (__assert_fail) Removed.
11806 * cmdline.c: Changed syntax_message[].
11808 * error.c: #include's <readline/history.h> only if the history
11809 library is available, not if just the readline library is
11812 * filename.c: (expand_line) Removed alloca() support.
11813 (interp_vars) No longer tilde-expands argument. Limit on output
11815 (tilde_expand) Now treats argument as path rather than filename.
11816 [!unix] Now is a no-op function.
11817 (search_path) Better verbose message formatting.
11818 (open_file, close_file) Comment fixes.
11819 (close_file) [!unix] Doesn't bother with pipes.
11820 (open_file_ext) Completely rewritten, interface revamped.
11821 (close_file_ext) New function.
11823 * font.h: Comment changes.
11825 * frequencies.q: Removed AIX alloca support since it doesn't use
11828 * hash.c: Comment changes & additions.
11829 (hsh_create) Initializes entire table instead of first M entries.
11830 (hsh_probe) Stupid bug fixed. Now it works.
11831 (hsh_dump) [GLOBAL_DEBUGGING] New function.
11833 * main.c: (parse) Detects EOF properly in token-eating loop.
11834 Should the STOP token have its value changed to 0?
11836 * misc.c: (blp_getdelim) [HAVE_GETDELIM] Now it's a macro.
11837 (blp_getline) Now it's a macro.
11839 * output.h: (struct outp_driver) Removed members output, filename.
11841 * output.c: (outp_init) [!NO_POSTSCRIPT] Installs PostScript
11842 drivers in driver table.
11843 (outp_read_devices) Frees buf. Warns if there are no active
11845 (outp_configure_clear) Sets outp_configure_vec to NULL after
11846 deleting its elements.
11847 (configure_driver, destroy_driver) Removed references to output,
11848 filename members of outp_driver.
11849 (outp_evaluate_dimension, internal_get_paper_size,
11850 outp_get_paper_size) New functions.
11852 * postscript.c: Continued development. Now links but doesn't make
11853 any marks on the page. Lotsa bugs I suppose.
11855 * str.c: (strcasecmp) [!HAVE_STRCASECMP] New function.
11857 * str.h: Comment changes.
11859 Sat Jul 27 22:32:38 1996 Ben Pfaff <blp@gnu.org>
11861 * Removed dependencies on non-nested comments in several files.
11862 Also removed references to (unix || __unix__) in #if's since
11863 prefh.orig makes those two equivalent.
11865 * ascii.c: (ascii_open_global) Creates ascii_arena.
11866 (ascii_close_global) Destroys ascii_arena.
11867 (ascii_init_driver) Doesn't create ascii_arena.
11868 (ascii_copy_driver) Removed.
11869 (ascii_option) Possible bugfix regarding %s vs. %.*s with a_string's.
11870 (outp_class ascii_class) Removed ascii_copy_driver reference.
11872 * frequencies.q: Now can display all statistics except median.
11873 Still not finished.
11875 * output.c: Handles outp_class.ref_count so output class
11876 destructors are called properly.
11877 (add_class) Sets ref_count to 0.
11878 (configure_driver) Initializes class if ref_count++ is 0.
11879 (destroy_driver) Destructs class if --ref_count is 0. Frees the
11880 class output file name.
11882 * output.h: (struct outp_class) Removed copy_driver, inited.
11885 * postscript.c: Completely replaced but not finished.
11887 Tue Jul 23 21:48:36 1996 Ben Pfaff <blp@gnu.org>
11889 * approx.h: #includes <float.h>.
11891 * arena.h, arena.c: Many functions changed to take an arena **
11892 instead of an arena *, for consistency. All callers changed.
11893 (arena_alloc) Now creates a new arena if passed *A that is NULL.
11894 (arena_destroy) Sets *A to NULL.
11896 * ascii.c: (delineate) Implements OUTP_T_VERT correctly. Removed
11897 assertion that `width' be positive.
11899 * command.c: Removed #if's from cmd_table.
11900 (walk_cmdtable_func) [0] New function (debug code).
11901 (init_cmd_parser) [0] Dumps out cmd_table (debug code).
11902 (parse_cmd) Doesn't return failure for unimplemented commands.
11904 * common.h: (SYSMIS) Changed from DBL_MAX to -DBL_MAX.
11905 (SYSCODE) New constant macro.
11907 * descript.q: Checks for positive n_variables before performing
11910 * file-handle.q: (get_handle_by_filename) Bug fix: passes &f to
11911 avl_find instead of &fp as arg 2.
11913 * frequencies.g, frequencies.q: Continued updating; now compiles &
11914 works again, but not complete.
11916 * main.c: Changes to user messages.
11918 * misc.c: (reverse) [0] New function.
11920 * settings.h: Comment removed. #includes "common.h".
11922 * som.c: (som_set_null) New function.
11923 (som_set_value, som_set_string, som_set_text) More detailing
11925 (som_set_float) Implemented function.
11926 (dump_columnated_table) Bug fix regarding page breaks.
11927 (draw_cell) Bug fix regarding text that spilled out of a cell.
11928 (draw_intersection, draw_horz_rule, draw_vert_rule) No longer draw
11930 (get_cell_size) Support SCON_EMPTY cells.
11931 (get_table_size) When calculating rules' widths and heights, mask
11932 out SLIN_SPACING bit. Added SOPT_X_HLTL support.
11934 * som.h: (som_any_cell) New option SOPT_X_HTLT. Removed
11936 (struct som_submission_form) New member `header'; all users
11939 * val-labs.c: (get_label) User messages changed.
11941 * var.h: Changed FREQUENCIES structures.
11943 * vars-atr.c: (is_num_user_missing, is_str_user_missing) Made
11946 Fri Jul 19 19:11:13 1996 Ben Pfaff <blp@gnu.org>
11948 * approx.h: Definition of EPSILON now depends on system's
11949 DBL_EPSILON. Removed GNU C specific code.
11950 (cmpapx) Renamed approx_compare.
11952 * frequencies.g, frequencies.q: Continued updating; still doesn't
11955 * groff-font.c: (name_to_index) Fix bug that kept it from
11958 * hash.c, hash.h: Completed work.
11960 * var.h: Changes to freq_tab, frequencies_proc.
11962 Wed Jul 17 21:23:36 1996 Ben Pfaff <blp@gnu.org>
11965 * hash.c, hash.h: New files. Not completed.
11966 * Makefile.am: Added hash.c to source file list.
11967 * font.h: (struct font_desc) New member kern_size_p.
11968 * groff-font.c: Uses hash.h.
11969 (hashpjw) Moved to hash.c.
11970 (next_prime_power) Rewrote, renamed hsh_next_prime, moved to
11972 (static var hash) New member size_p.
11973 * var.h: Includes hash.h.
11974 (struct freq_tab) Changed AVL_TREE to hash_tab.
11976 * vars-prs.c: Comment, formatting fixes.
11978 * frequencies.g, frequencies.q: Continued updating. Not yet
11981 * formats.c: Bug fix.
11983 Tue Jul 16 22:10:04 1996 Ben Pfaff <blp@gnu.org>
11985 Increasing parallelism between DESCRIPTIVES and FREQUENCIES.
11986 * descript.g: Comment fixes.
11987 * descript.q: Comment fixes. Moved some declarations into var.h.
11988 Made dsc_info a static table. Updated FIXMEs.
11989 (internal_cmd_descriptives) Beautified.
11991 * frequencies.q: Started updating into working order.
11992 * frequencies.g: New file analogous to descript.g.
11993 * var.h: Comment fixes. Added structures for FREQUENCIES.
11995 * som.c: Removed vestiges of crushing and partial table support.
11997 Sun Jul 14 15:45:31 1996 Ben Pfaff <blp@gnu.org>
11999 * Many more changes to som.c especially, but these will not be
12000 documented as I have resolved to remove them. This patchlevel is
12001 being released solely so that I can fall back to it if I decide
12002 that removing the changes is not a good idea.
12004 Sat Jul 13 09:58:44 1996 Ben Pfaff <blp@gnu.org>
12006 * som.c: (global var som) New member `cum_y'.
12007 (build_target) Properly handles titles for partial tables.
12008 (dump_partial_beg, dump_partial_mid, dump_partial_end)
12009 Merged into single new function dump_partial(). Fixed problem
12010 with titles on partial tables.
12011 (dump_table) Calls dump_partial() for all parts of partial tables.
12012 (dump_page) Criteria for drawing title changed.
12014 Fri Jul 12 22:03:36 1996 Ben Pfaff <blp@gnu.org>
12016 * command.c: (cmd_table) Added LIST, WEIGHT.
12018 * command.c: (cmd_remark) No longer frees `s' since it's not
12019 dynamically allocated.
12021 * data-out.c: (convert_f) Now correctly handles the case where
12022 abs(v->f)<1 but v->f rounds to a value of 1.00 given the specified
12023 number of decimals.
12024 (som_destroy_all_tables) Removed argument. All callers changed.
12025 (som_vline, som_hline) Argument validity checking corrected.
12026 (som_set_value) Implemented half-heartedly.
12027 (replicate_table) Copies tables piece-by-piece when using Checker.
12029 * som.h: New line style SLIN_1THIN, currently equivalent to
12030 SLIN_0. New enum set SOM_SUB_*.
12031 (struct som_submission_form) Removed `seq_no'. Added `type'.
12033 * list.q: Newly working file; uses partial tables.
12035 * som.c: (som_reduce_table) Renamed som_set_table_height().
12036 (som_crush) Removed argument `group'.
12037 (global var som) Removed `nt', `seq_no'. Added `type'.
12038 (som_submit_table) Arguments changed.
12039 (output_table) Removed partial table code.
12040 (build_target) New arg; partial table support added. All callers
12042 (dump_plain_table) Removed partial table code.
12043 (dump_partial_beg, dump_partial_mid, dump_partial_end) New functions.
12044 (dump_table) Supports partial tables.
12045 (dump_page) New argument to allow not drawing top and/or bottom
12046 headers. All callers changed. Supports partial tables.
12048 Sat Jul 6 22:22:25 1996 Ben Pfaff <blp@gnu.org>
12050 * data-out.c: Changed `#include <approx.h>' to `#include
12052 (convert_F) Comment fix. Now won't print `-.000', etc.
12054 * descript.q: Now Z-scores work, although there appears to
12055 be a bug (which might actually be in data-out.c:convert_F()).
12056 (descriptives_trns_proc, descriptives_trns_free) New functions.
12057 (run_z_pass) Implemented.
12059 * var.h: Comment fixes.
12060 (dsc_z_score, descriptives_trns) New structs.
12061 (descriptives_trns) Added to any_trns as `dsc'.
12063 * error.c, error.h: New error class, IS (Installation Script
12064 error), used in those instances where the error is in the
12065 installation, but there is a script file or installation file that
12066 can be usefully referred to.
12068 * output.c: Change many IE classes to IS classes.
12070 * cases.c, command.c, common.c, crosstabs.q, expr-evl.c,
12071 frequencies.q, list.q, vars-prs.c, vfm.c: Removed reference to
12072 HAVE_MALLOC_H because Borland C++ alloca() is broken, so why
12073 include the corresponding header?
12075 * glob.c: (init_glob) Don't malloc term_buffer under Checker.
12076 Don't bail out if termcap can't be read.
12078 * som.c: (som_destroy_table) Removed.
12079 (som_reduce_table, som_destroy_all_tables) New functions.
12080 (som_crush) New function, not implemented.
12082 * som.h: New table option STAB_CRUSH. Comment fix. New struct
12083 som_submission_form. Function prototypes revised.
12085 Outputting huge tables (1000s of rows) a few rows at a time
12086 is supported, though untested. May even break everything.
12087 Actually, the code doesn't even compile right now.
12088 * som.c: (struct som) New fields htv, nt, seq_no.
12089 (som_submit_table) Multiple arguments changed to a single
12090 pointer to struct submission_form. Only increments subtable_num
12091 if seq_no is zero. Only destroys table if it's not going to
12093 (replicate_table) New function.
12094 (output_table) Comment fix.
12095 (examine_table) Changed inline code to code calling
12096 replicate_table(). Calculates htv. Supports partial tables.
12097 (draw_title) Removed comment.
12098 (build_target) Only allows for title on first part of partial
12100 (dump_plain_table) Only resets table chunk number on first part
12101 of partial tables; FIXME: doesn't work quite right. Supports
12103 (dump_page) Titles only on first part of partial tables.
12105 Fri Jul 5 20:16:19 1996 Ben Pfaff <blp@gnu.org>
12107 * Thanks to an unreliable IDE hard drive, I have spent the last
12108 day reconstructing my Debian GNU/Linux installation and redoing
12109 the previous day's changes--somehow I managed to save every file
12110 except for output.c and output.h. So the following changes could
12111 really be considered independent of the output.c, output.h changes
12114 * output.h, output.c: Moved the outp_configure_vec global var,
12115 outp_names struct, and enum set OUTP_S_* from output.h to output.c.
12116 outp_configure_vec is now static.
12118 Thu Jul 4 20:20:24 1996 Ben Pfaff <blp@gnu.org>
12120 * The entire philosophy behind configuration of the output drivers
12121 changed. Now there is a termcap-type configuration where drivers
12122 to be read are determined beforehand, rather than parsing the
12123 entire output init file and storing it in memory & deciding what
12124 to actually use later. Faster & more memory-efficient at the same
12127 * output.c: Comment fix. Removed outp_init_drivers global var.
12128 Removed all references to synonyms. New structure outp_defn. New
12129 global vars outp_macros, outp_configure_vec.
12130 (search_name, delete_name, add_name, check_configure_vec,
12131 expand_name, find_defn_value) New static functions.
12132 (outp_configure_clear, outp_configure_add, outp_configure_macro,
12133 outp_read_devices) New extern functions.
12134 (outp_init) Much functionality moved into outp_read_devices.
12135 (outp_read_devices) Format of output init file changed; name of
12136 file is `devices' rather than `output' to avoid Makefile
12138 (outp_clear) Renamed outp_done.
12139 (outp_list_classes) Bug fix, cleaned up.
12140 (outp_list_drivers) Not implemented anymore.
12141 (outp_configure_driver) Now a static function; simplified; now
12142 interpolates macros; supports new structure.
12143 (outp_enable_driver, match_synonym) Removed; all references
12145 (find_driver) First argument removed.
12147 * output.h: Global var outp_init_drivers removed; new structure
12148 outp_names; new enum set OUTP_S_*; new global var
12149 outp_configure_vec; function prototypes for output.c exports
12152 * main.c: (main) Calls outp_read_devices() after parsing the
12155 * cmdline.c: (parse_command_line) New option -v --verbose;
12156 --version changed to -V. --device option changed syntax to just
12157 take a single device name. Accepts key=value declaration of
12158 output init file macros. Syntax message updated.
12160 * filename.c: (expand_line) New function.
12161 (interp_environ_vars) Renamed interp_vars; no longer uses
12163 (blp_getenv) Allows $ARCH and $VER pseudo-environment-vars to be
12164 overridden by real environment vars.
12165 (search_path) Uses verbose_msg() instead of #ifdef'd printf().
12166 * filename.h: interp_environ_vars() renamed interp_vars().
12168 * error.c, error.h: Added extern variable `verbosity', message
12171 * error.c: (vmsg) Support message class MM.
12172 (verbose_msg) New function.
12174 * descript.q: (generate_z_varname) Bug fix in generation of
12176 (dump_z_table) Bug fix in column headers.
12178 * ascii.c: (ascii_init_driver) Changed minimum number of lines per
12179 page from 29 to 15. Don't set a default for ops[OPS_INIT,
12180 OPS_DONE]. Writes the uninit string when the driver is closed.
12181 (ascii_open_page) Write the init string before the first page.
12182 (output_shorts) Form of main loop changed from `while' to `for'.
12183 Bug fix with overstrikes: the character is printed *after* the
12184 backspace. Eliminated a lot of `& 0xff' modifiers.
12185 (advance_to_left_margin) New function.
12186 (return_carriage, output_lines) Handle left margin.
12188 Thu Jul 4 00:35:59 1996 Ben Pfaff <blp@gnu.org>
12190 * ascii.c: New option `carriage-return-style'.
12192 * ascii.c: (count_fancy_chars) New function.
12193 (delineate, text_metrics) Use new function; bug fixes regarding
12195 (text_draw) Bug fix with rich text.
12196 (output_string, output_shorts) Reordered.
12197 (output_shorts) Now handles boxchars and some overstrike font
12199 (output_char, return_carriage) New functions.
12200 (output_lines) Now handles overstriking and font changes properly;
12201 some code moved to output_shorts.
12203 Tue Jul 2 22:13:23 1996 Ben Pfaff <blp@gnu.org>
12206 * ascii.c: New member `debug' in ascii_driver_ext.
12207 (ascii_init_driver, delineate) Uses new member.
12209 Now you can set a vertical height on writing text.
12210 * ascii.c: (delineate) Keeps track of vertical position.
12211 (text_draw) No longer considers fully justified text an internal
12214 * output.h: New flag OUTP_T_VERT; other OUTP_T_ values changed.
12216 Tables' titles are drawn; they can have variable height.
12217 * som.c: `som' struct has new member, title_height.
12218 (draw_title) New argument. Moved within file. All caller
12220 (build_target) New argument, amount of space needed for first row.
12221 Calculates height of title, takes that into account. All callers
12223 (dump_plain_table, dump_columnated_table) Took calculation of y1,
12225 (dump_columnated_table) [GLOBAL_DEBUGGING] Debugging code
12227 (dump_columnated_table) Organized for readability.
12228 (dump_page) Makes use of som.title_height.
12230 * som.c: Many comment bug fixes.
12232 * descript.q: (try_name, generate_z_name) Bug fix regarding
12233 generation of Z-score variable names.
12234 * var.h: Removed num from descriptives_proc; all referents removed.
12236 Mon Jul 1 22:13:39 1996 Ben Pfaff <blp@gnu.org>
12238 * ascii.c: (ascii_line_horz, ascii_line_vert,
12239 ascii_line_intersection) Added debugging code.
12241 Added a descriptive line above each table to describe it.
12242 * command.c: (parse_cmd) Calls som_new_series.
12244 * som.c: New static vars table_num, subtable_num. New `som'
12246 (dump_page) New arguments.
12247 (som_submit_table) Handle new variables.
12249 * som.c, som.h: (som_submit_table) New arguments. All callers
12251 (som_new_series) New function.
12252 (build_target) Makes room for extra line.
12253 (draw_title) New function.
12254 (dump_page) Calls draw_title. Bug fix: doesn't always set
12257 Columnation of tables support.
12258 * som.h: Deleted fr, lr, ri from som_table. Reorganized.
12260 * som.c: Deleted references to fr, lr, ri.
12261 (som_columnate) Bux fix: sets group member of table.
12262 (som_add_options) Function removed.
12263 (dump_table) Split into three functions; extensively reworked.
12265 * descript.q: (dump_z_table) Better output table formatting; added
12266 title support to correspond to som.h changes.
12267 (display) Title support.
12269 * output.h: Added OUTP_T_NONE.
12271 Mon Jul 1 13:00:00 1996 Ben Pfaff <blp@gnu.org>
12273 * descript.q: Improved handling of Z scores; still not perfect.
12275 * output.h, ascii.c: Added hook for getting em width of current
12278 * som.c: Uses new em-width hook. Added debugging code to
12280 (som_columnate) New argument.
12281 (som_add_options) Removed.
12283 Jun 29 17:40:47 1996 Ben Pfaff <blp@gnu.org>
12285 * som.h, som.c, output.c, output.h, ascii.c: Updated to work with
12286 rules as a property of the table instead of as a property of the
12289 * ascii.c: Added `header' to table of options.
12291 * descript.q: Added even shorter statistic names; modified to work
12292 with new som interface.
12294 * misc.c (blp_getdelim): Bug fix.
12296 * version.c: includes 'conf.h'.
12298 ----------------------------------------------------------------------
12301 version-control: never