+Sun May 30 18:35:19 2004 Ben Pfaff <blp@gnu.org>
+
+ Fully implement arbitrary delimiters on DATA LIST, extending the
+ half implementation that was already there.
+
+ * data-list.c: (struct data_list_pgm) Remove `delim', add
+ `delims', `delim_cnt'.
+ (cmd_data_list) Initialize new members. Parse delimiters and
+ clean up code a bit.
+ (cut_field) Extract fields with arbitrary delimiters. Also, fix
+ handling of leading commas.
+ (read_from_data_list_fixed) Expand tabs. Adapt to new DFM
+ interfaces.
+ (read_from_data_list_free) Adapt to new DFM interfaces.
+ (read_from_data_list_list) Ditto.
+ (repeating_data_trns_proc) Ditto.
+
+ * dfm.c: Split up reader and writer into separate code, because
+ they do different things. Use struct string instead of explicit
+ allocation code, for clarity.
+ (enum dfm_reader_flags) New enum.
+ (struct dfm_fhuser_ext) Removed.
+ (struct dfm_reader_ext) New.
+ (get_reader) New function, used by just about all the reader
+ functions.
+ (dfm_close) Removed.
+ (close_reader) New function.
+ (dfm_open_for_reading) Rewrite initialization of dfm_fhuser_ext.
+ (dfm_open_for_writing) Ditto.
+ (macro force_line_buffer_expansion) Removed.
+ (count_tabs) Removed.
+ (tabs_to_spaces) Removed.
+ (read_record) Deal with new dfm_reader_ext. Use struct string
+ functions. Don't convert tabs to spaces.
+ (dfm_eof) New function.
+ (dfm_get_record) Changed interface, rewrote.
+ (dfm_expand_tabs) New function.
+ (dfm_fwd_record) Renamed dfm_forward_record(), updated to new
+ dfm_reader_ext, rewritten.
+ (dfm_bkwd_record) Renamed dfm_reread_record(), updated to new
+ dfm_reader_ext, rewritten.
+ (dfm_set_record) Removed in favor of dfm_forward_columns().
+ (dfm_forward_columns) New function.
+ (dfm_get_cur_col) Renamed dfm_column_start, updated to new
+ dfm_reader_ext, rewritten.
+ (static var dfm_r_class) Use close_reader for the destructor.
+ (struct dfm_writer_ext) New.
+ (dfm_put_record) Updated to new dfm_writer_ext, rewritten. Uses
+ bounce buffer now instead of local allocation.
+ (close_writer) New function.
+ (static var dfm_writer_ext) Use close_writer for destructor.
+ (cmd_begin_data) Adapt to new dfm_reader_ext.
+
+ * file-handle.q: Add support for per-file tab width.
+ (struct private_file_handle) Add tab_width member.
+ (q2c specifications) Add tabwidth subcommand.
+ (cmd_file_handle) Put parsed tab width into private_file_handle.
+ (create_file_handle) Set default tab width.
+ (handle_get_tab_width) New function.
+
+ * file-type.c: (file_type_source_read) Adapt to new DFM interface.
+
+ * inpt-pgm.c: (reread_trns_proc) Ditto.
+
+ * matrix-data.c: (context) Ditto.
+ (another_token) Ditto.
+ (mget_token) Ditto.
+ (force_eol) Ditto.
+
+Sun May 30 18:33:59 2004 Ben Pfaff <blp@gnu.org>
+
+ * casefile.c: (casefile_destroy) Fix memory leak by freeing
+ cf->filename.
+ (casereader_destroy) Don't close file descriptor -1.
+
+ * recode.c: (cmd_recode) Fix memory leak.
+
+ * set.q: (q2c specifications) Fix typo in user message.
+
+ * str.c: (st_bare_pad_len_copy) Change memcpy to memmove to avoid
+ undefined behavior for overlapping arguments.
+
+Sun May 30 18:31:48 2004 Ben Pfaff <blp@gnu.org>
+
+ * casefile.c: valgrind doesn't implement posix_fadvise() yet, so
+ don't call it when we're running under valgrind.
+ (call_posix_fadvise) New function.
+ (casefile_to_disk) Use call_posix_fadvise().
+ (reader_open_file) Ditto.
+
+Sun May 30 18:20:12 2004 Ben Pfaff <blp@gnu.org>
+
+ Update our string ADTs, struct string and struct len_string. Get
+ rid of pool support, which was largely unused. Rename lots of
+ functions to have more obvious or consistent names.
+
+ * ascii.c: Get rid of ascii_pool. It was only used for string
+ allocations.
+ (ascii_open_global) Don't create ascii_pool.
+ (ascii_close_driver) Don't destroy ascii_pool.
+ (ascii_postopen_driver) Don't use pool.
+ (ascii_close_driver) Destroy strings manually.
+
+ * str.c: (ds_create) Remove pool argument, all references updated.
+ (ds_init) Ditto.
+ (ds_replace) Remove pool support, make more efficient when we
+ don't need to reallocate.
+ (ds_destroy) Remove pool support.
+ (ds_rpad) New function.
+ (ds_size) Renamed ds_capacity(), all references updated.
+ (ds_value) Renamed ds_c_str(), all references updated.
+ (ds_concat) Renamed ds_puts(), all references updated.
+ (ds_concat_buffer) Renamed ds_concat(), all references updated.
+ (ds_putchar) Renamed ds_putc(), all references updated.
+ (ds_getline) Renamed ds_gets(), all references updated.
+ (ls_create) Remove pool argument, all references updated.
+ (ls_create_buffer) Ditto.
+ (ls_destroy) Removed pool support.
+ (ls_value) Renamed ls_c_str(), all references updated.
+
+ * str.h: (ls_length) [__GNUC__] Add inline version.
+ (ls_c_str) [__GNUC__] Add inline version.
+ (ls_end) [__GNUC__] Add inline version.
+ (struct string) Remove pool member. Rename `size' to `capacity',
+ all references updated.
+
+ * tab.c: (text_format) Instead of using pool argument to
+ ls_create_buffer(), call pool_register() on allocated data.
+
+Mon Apr 26 22:40:07 2004 Ben Pfaff <blp@gnu.org>
+
+ We're abusing the current ASCII driver by telling it to allocate a
+ 9999-line, 9999-character page in the tests. This causes some
+ systems to curl up and die because it allocates 20 MB of
+ contiguous RAM. This change alleviates at least part of the
+ problem. It is mostly a stop-gap until the new output system is
+ ready.
+
+ * ascii.c: (struct line) New structure.
+ (struct ascii_driver_ext) Remove `page', `page_size', `line_len',
+ `line_len_size', `n_output' members. Add `lines', `lines_cap'.
+ (ascii_preopen_driver) Initialize new members, not old ones.
+ (ascii_close_driver) Destroy new members, not old ones.
+ (ascii_open_page) Allocate new members, not old ones.
+ (expand_line) Allocate room in line.
+ (draw_line) Use new members.
+ (ascii_line_horz) Ditto.
+ (ascii_line_vert) Ditto.
+ (ascii_line_intersection) Ditto.
+ (text_draw) Ditto.
+ (output_lines) Ditto.
+ (ascii_close_page) Ditto.
+
+Sun Apr 25 23:40:15 2004 Ben Pfaff <blp@gnu.org>
+
+ * matrix.c: Dead code. Removed.
+
+ * matrix.h: Dead code. Removed.
+
+Fri Apr 16 23:59:51 2004 Ben Pfaff <blp@gnu.org>
+
+ Contrary to what I'd always understood, there is an efficient
+ algorithm for deletion from a hash table populated via linear
+ probing. This change implements it.
+
+ * hash.c: (hsh_rehash) Probe in increasing order.
+ (hsh_probe) Ditto.
+ (locate_matching_entry) Ditto.
+ (hsh_delete) Use Knuth's Algorithm 6.4R for deletion.
+
+Tue Apr 13 19:24:15 2004 Ben Pfaff <blp@gnu.org>
+
+ * moments.c (calc_moments): Adjust calculation of kurtosis to
+ avoid subtracting huge numbers from huge numbers, on Michael
+ Kiefte's advice.
+
+Sun Apr 11 14:22:12 2004 Ben Pfaff <blp@gnu.org>
+
+ Rework moments routines for improved numerical stability based on
+ Michael Kiefte's advice. Any bugs or remaining numerical problems
+ are still mine though.
+
+ There is now a struct moments1 for use with one-pass moments. It
+ uses a provisional means algorithm as an attempt to improve
+ accuracy of higher moments. The older struct moments now only
+ handles two-pass moments.
+
+ * aggregate.c: Use moments1 instead moments.
+
+ * descript.c: Revert previous change, which is no longer needed
+ due to the moments revision.
+
+ * moments.c: (calc_moments) New function for calculating variance,
+ skewness, kurtosis.
+ (moments_pass_one) Only accumulate weights bigger than zero.
+ (moments_calculate) Allow calculating the mean on pass one, others
+ require pass two. Implement in terms of calc_moments().
+ (struct moments1) New structure.
+ (init_moments1) New function.
+ (moments1_clear) Ditto.
+ (moments1_create) Ditto.
+ (moments1_add) Ditto.
+ (moments1_calculate) Ditto.
+ (moments1_destroy) Ditto.
+ (cmd_debug_moments) Deal with `struct moments' or `struct
+ moments1' as requested by user.
+
+Sun Apr 11 14:21:55 2004 Ben Pfaff <blp@gnu.org>
+
+ * Makefile.am (pspp_SOURCES): Remove debug.c.
+
+ * debug.c: Removed. It was empty anyway.
+
+Fri Apr 9 20:04:49 2004 Ben Pfaff <blp@gnu.org>
+
+ * descript.c (calc_descriptives): Fix assert failure when only
+ MOMENT_MEAN is needed.
+
+2004-04-09 Michael Kiefte <mkiefte@dal.ca>
+
+ * descript.c:
+
+ fixed problem with parsing in match_statistic() causing
+ "DESCRIPTIVE STAT=MEAN." to barf.
+
+ "MEAN" is now default if "SORT" given without specification.
+
+ Fixed infinite loop with "DESCRIPT GIBBERISH=ALL." Parsing is
+ generally less forgiving of syntax errors: better to have it do
+ nothing and type it in again then to not know what it actually did
+ instead.
+
+ z-score transformation now checks score for user-missing values
+ and checks std_dev for SYSMIS.
+
+2004-04-06 Michael Kiefte <mkiefte@dal.ca>
+
+ * aggregate.c, crosstabs.q, descript.c, dictionary.c, frequencies.q, levene.c, t-test.q, var.h:
+ Changed dict_get_case_weight() to accept an additional int * flag
+ to complain about system-missing, user-missing, zero, or negative
+ weights and updated existing functions to pass int * to
+ dict_get_case_weight().
+
+2004-04-05 jmd <jmd@gnu.org>
+
+ * main.c: Fixed configuration problems with gsl
+
+ * t-test.q: Fixed some problems encountered when compiling under Cygwin
+
+2004-04-03 blp <blp@gnu.org>
+
+ * lexer.c, ChangeLog:
+ Fix infinite loop on comment at end of file, add test.
+
+2004-04-03 jmd <jmd@gnu.org>
+
+ * 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:
+ Fixed the calculation of percentiles and added --syntax and --algorithm options
+
+Sat Apr 3 11:43:37 2004 Ben Pfaff <blp@gnu.org>
+
+ * lexer.c: (lex_skip_comment) Handle end-of-file correctly (I
+ hope).
+
+Sat Apr 3 15:00:18 WST 2004 John Darrington <john@darrington.wattle.id.au>
+
+ * frequencies.q: Fixed the calculation of percentiles
+
+ * Makefile.am: Added the --ansi flag and dealt with the
+ consequences. Added some entries to PSPP_sources so that
+ make distcheck would pass
+
+ * cmdline.c: Added the --syntax and --algorithm options
+
+ * q2c.c: Added an implicit /ALGORITHM subcommand to everything.
+
+Fri Apr 2 11:25:22 WAST 2004 John Darrington <john@darrington.wattle.id.au>
+
+ * t-test.q, levene.c, levene.h Converted t-test (incl levene) to
+ use the new multipass_split_... mechanism.
+
+Wed Mar 31 22:36:22 2004 Ben Pfaff <blp@gnu.org>
+
+ * frequencies.q: (calc_stats) Use moments data structure and
+ calc_seskew(), calc_sekurt() functions.
+
+ * set.q main.c settings.h Added support for --syntax and --algorithm
+ options
+
+Tue Mar 30 22:04:19 2004 Ben Pfaff <blp@gnu.org>
+
+ * vfm.c: Had to get last call to multipass_split_output() inside
+ open_active_file()/close_active_file() pairing, so introduce new
+ function.
+ (internal_procedure) Move procedure() code here, except for calls
+ to open_active_file() and close_active_file().
+ (procedure) Wrap open_active_file() and close_active_file() around
+ internal_procedure().
+ (multipass_procedure_with_splits) Wrap open_active_file() and
+ close_active_file() around internal_procedure().
+
+Tue Mar 30 22:01:57 2004 Ben Pfaff <blp@gnu.org>
+
+ * descript.c: (cmd_descriptives) Free `vars' to avoid memory leak.
+
+Mon Mar 29 16:26:40 2004 Ben Pfaff <blp@gnu.org>
+
+ * debug.c: Removed. Moved cmd_debug_evaluate() into expr-evl.c.
+
+ * expr-evl.c: (cmd_debug_evaluate) Moved here from debug.c.
+
+Mon Mar 29 16:03:08 2004 Ben Pfaff <blp@gnu.org>
+
+ * algorithm.c: By default turn off some of the more expensive
+ assertions.
+ (expensive_assert) New macro which expands to assert if
+ EXTRA_CHECKS is defined, to nothing otherwise.
+ (unique) Use expensive_assert().
+ (binary_search) Ditto.
+ (push_heap) Ditto.
+ (pop_heap) Ditto.
+ (make_heap) Ditto.
+ (sort_heap) Ditto.
+
+ * command.c: (conflicting_3char_prefixes) Words that are the same
+ don't cause conflicts when they are abbreviated to the first three
+ letters.
+
+ * expr-evl.c: (CONCAT_func) Fix memory leak by incrementing struct
+ nonterm_node's n earlier.
+ (generic_str_func) Ditto.
+
+Mon Mar 29 15:32:17 2004 Ben Pfaff <blp@gnu.org>
+
+ Add support for multipass procedures. Rewrite DESCRIPTIVES to
+ test multipass support, take advantage of new moments
+ calculation, and to not be such crappy code. Get rid of q2c
+ processing for DESCRIPTIVES.
+
+ * vfm.c: (struct multipass_split_aux_data) New structure.
+ (multipass_procedure_with_splits) New function.
+ (multipass_split_callback) New function.
+ (multipass_split_output) New function.
+ * descript.q: Removed.
+
+ * descript.c: New file.
+
+ * var.h: Removed descriptives enums.
+ (struct descriptives_proc) Removed.
+ (struct variable) Removed p.dsc.
+
+ * Makefile.am: (q_sources_c) Remove descript.c.
+ (q_sources_q) Removed descript.q.
+
+Mon Mar 29 15:31:55 2004 Ben Pfaff <blp@gnu.org>
+
+ New manager for keeping track of used workspace.
+
+ * workspace.c: New file.
+
+ * workspace.h: New file.
+
+ * Makefile.am: (pspp_SOURCES) Add workspace.c, workspace.h.
+
+ * sort.c: (do_internal_sort) Use workspace_malloc().
+ (destroy_internal_sort) Use workspace_free().
+
+Mon Mar 29 15:31:08 2004 Ben Pfaff <blp@gnu.org>
+
+ New `struct casefile' for managing sets of cases.
+
+ * casefile.c: New file.
+
+ * casefile.h: New file.
+
+ * command.def: Add DEBUG CASEFILE command.
+
+ * Makefile.am: (pspp_SOURCES) Add casefile.c, casefile.h.
+
+ * sort.c: (sort_cases) Move logic for sending storage file to disk
+ into do_external_sort().
+ (struct internal_sort) Use an array of ccase pointers instead of a
+ case_list.
+ (do_internal_sort) Rewrite to handle casefiles.
+ (compare_case_list) Removed.
+ (compare_cases) New function.
+ (compare_case_dblptrs) New function.
+ (read_internal_sort_output) Deal with new struct internal_sort.
+
+ * vfm.c: (static var workspace_overflow) Removed.
+ (struct storage_stream_info) Removed all the members. Added
+ struct casefile * member.
+ (storage_sink_open) Use casefile.
+ (open_storage_file) Removed.
+ (write_storage_file) Removed.
+ (storage_to_disk) Removed.
+ (destroy_storage_stream_info) Use casefile.
+ (storage_sink_write) Use casefile.
+ (storage_sink_make_source) Use casefile.
+ (storage_source_count) Use casefile.
+ (storage_source_read) Use casefile.
+ (storage_source_on_disk) Removed.
+ (storage_source_get_cases) Removed.
+ (storage_source_set_cases) Removed.
+ (storage_source_get_casefile) New function.
+
+Mon Mar 29 15:30:09 2004 Ben Pfaff <blp@gnu.org>
+
+ New `struct moments' for calculating moments.
+
+ * stats.c: Removed.
+
+ * stats.h: Removed.
+
+ * moments.c: New file.
+
+ * moments.h: New file.
+
+ * command.def: Add DEBUG MOMENTS command.
+
+ * Makefile.am: (pspp_SOURCES) Add moments.c, moments.h. Remove
+ stats.c, stats.h.
+
+ * aggregate.c: Modify AGGREGATE to use the new moments
+ calculation, even if not in such a great way.
+ (struct agr_var) Add `moments' member.
+ (parse_aggregate_functions) Set `moments' member to null.
+ (agr_destroy) Destroy `moments' member.
+ (accumulate_aggregate_info) Use `moments' for standard deviation.
+ (dump_aggregate_info) Ditto.
+ (initialize_aggregate_info) Create or clear `moments'.
+
+ * misc.h: Add pow2(), pow3(), pow4() functions in place of sqr(),
+ cube(), pow4() that were in stats.h. All references updated.
+
+ * crosstabs.q: stats.h had chi-square significance functions. Use
+ GSL instead.
+ (display_chisq) Use gsl_cdf_chisq_Q() instead of chisq_sig().
+
+ * expr-evl.c: (expr_evaluate) Use moments_of_values() for
+ OP_CFVAR, OP_MEAN, OP_SD, OP_VARIANCE.
+
+Fri Mar 26 14:21:23 2004 Ben Pfaff <blp@gnu.org>
+
+ * dictionary.c: (dict_compact_values) Compacted values need to
+ start off from 0.
+
+Fri Mar 26 00:54:57 2004 Ben Pfaff <blp@gnu.org>
+
+ * var-labs.c: (cmd_variable_labels) For compatibility, don't allow
+ `/' at start. Check return value of parse_variables() for error
+ return.
+
+Fri Mar 26 00:19:27 2004 Ben Pfaff <blp@gnu.org>
+
+ Revamp expressions: make the code a little nicer, and fix bugs
+ found in testing.
+
+ * expr-evl.c: (expr_evaluate) Make expression argument const.
+ Support OP_ADD, OP_SUB, OP_MUL, OP_DIV instead of OP_PLUS, OP_MUL.
+ OP_POW is missing for arg 2 <= 0. OP_LOG is natural log, not
+ base-10 log. Fix OP_ANY, OP_ANY_STRING, OP_RANGE, OP_RANGE_STRING
+ off-by-ones. Add OP_MAX_STRING, OP_MIN_STRING. Fix OP_TIME_HMS,
+ OP_DATE_WKYR boundary conditions. Add OP_CTIME_DAYS,
+ OP_CTIME_HOURS, OP_CTIME_MINUTES, OP_CTIME_DAYS, OP_CTIME_SECONDS.
+ Support OP_INDEX_2, OP_INDEX_3, OP_RINDEX_2, OP_RINDEX_3 instead
+ of OP_INDEX, OP_INDEX_OPT, OP_RINDEX, OP_RINDEX_OPT. Merge
+ OP_LPAD_OPT into OP_LPAD, OP_RPAD_OPT into OP_RPAD, OP_LTRIM_OPT
+ into OP_LTRIM, OP_RTRIM_OPT into OP_RTRIM, OP_NUMBER_OPT into
+ OP_NUMBER. Fix OP_RTRIM fragility. Support OP_SUBSTR_2,
+ OP_SUBSTR_3 instead of OP_SUBSTR, OP_SUBSTR_OPT. Remove OP_INV.
+ Simplify OP_SYSMIS. Remove OP_STR_MIS.
+
+ * expr-opt.c: (optimize_expression) Rewrite.
+ (macro n0) Removed.
+ (macro n1) Removed.
+ (macro n2) Removed.
+ (macro s0) Removed.
+ (macro s0l) Removed.
+ (macro s1) Removed.
+ (macro s1l) Removed.
+ (macro s2) Removed.
+ (macro s2l) Removed.
+ (macro s) Removed.
+ (macro sl) Removed.
+ (eq_num_con) New function.
+ (optimize_tree) New function.
+ (macro rnc) Removed.
+ (macro frnc) Removed.
+ (str_search) Add const to string params.
+ (str_rsearch) Ditto.
+ (evaluate_tree_no_missing) Renamed from evaluate_tree. Add num[],
+ str[], str_len[] locals to substitute for most of removed macros.
+ Support OP_ADD, OP_SUB, OP_MUL, OP_DIV instead of OP_PLUS, OP_MUL.
+ Removed support for missing values because we're never called with
+ missing values. Use set_number() or set_number_errno() instead of
+ rnc or frnc. Removed any stuff that caused trouble in testing.
+ We can re-add it later if it really slows anything. Fix some
+ random problems.
+ (evaluate_tree_with_missing) Not yet supported. To be added later
+ if it's important.
+ (repl_num_con) Removed.
+ (collapse_node) New function.
+ (force_repl_num_con) Removed.
+ (set_number) New function.
+ (set_number_errno) New function.
+ (repl_str_con) Removed.
+ (set_string) New function.
+ (yrmoda) Tighten boundary conditions. Adopt 2030 cut-off for
+ 2-digit years.
+ (dump_node) No special case for OP_AND, OP_OR.
+
+ * expr-prs.c: (expr_prs) Honor EXPR_NO_OPTIMIZE bit. Rewrite.
+ (expr_get_type) New function.
+ (type_check) Rewrite.
+ (type_coercion) New function.
+ (struct operator) New structure.
+ (match_operator New function.
+ (parse_binary_operators) New function.
+ (parse_inverting_unary_operator) New function.
+ (parse_or) Rewritten.
+ (parse_and) Rewritten.
+ (parse_not) Rewritten.
+ (parse_rel) Rewritten.
+ (parse_add) Rewritten.
+ (parse_mul) Rewritten.
+ (parse_neg) Rewritten.
+ (parse_exp) Rewritten.
+ (parse_sysvar) Add $TRUE, $FALSE system variables.
+ Get $LENGTH, $WIDTH from get_viewlength(), get_viewwidth().
+ (parse_primary) Use allocate_var_node(), allocate_num_con(),
+ allocate_str_con().
+ (struct function) Remove desc, change `func' prototype.
+ (unary_func) Remove special cases.
+ (MISSING_func) Reduce to unary_func() that just returns a boolean.
+ (SYSMIS_func) Handle SYSMIS((x)) like SYSMIS(x).
+ (VALUE_func) Use allocate_var_node().
+ (nary_num_func) Allow MIN and MAX for strings.
+ Use allocate_var_node(). Properly clean up.
+ Fix return type.
+ (generic_str_func) Use local table instead of removed `desc'
+ member. Mostly rewrite.
+ (get_num_args) Revise error message.
+ (parse_function) Return EXPR_ERROR, not 0 on error.
+ (macro op) Removed.
+ (macro varies) Removed.
+ (ops[]) Use expr.def.
+ (free_node) Do nothing if node is null.
+ (allocate_num_con) New function.
+ (allocate_str_con) New function.
+ (allocate_var_node) New function.
+ (allocate_binary_nonterminal) New function.
+ (append_nonterminal_arg) Removed.
+ (static var func_tab[]) Revised.
+ (expr_debug_print_postfix) Make parameter const.
+ Use printf() instead of debug_printf().
+
+ * expr.def: New file.
+
+ * expr.h: Change PXP_* to EXPR_*, all references updated. Also
+ use named enum instead of unnamed, all references updated. Add
+ EXPR_ANY, EXPR_NO_OPTIMIZE.
+
+ * exprP.h: Remove EX_*. Add DEFINE_OPERATOR. Use expr.def
+ instead of defining OP_* directly.
+ (macro IS_TERMINAL) New macro.
+ (macro IS_NONTERMINAL) New macro.
+ (enum OP_NO_FLAGS) New.
+
+Fri Mar 26 00:18:01 2004 Ben Pfaff <blp@gnu.org>
+
+ * error.c: (err_assert_fail) msg variable needs to be non-const.
+
+Fri Mar 26 00:17:24 2004 Ben Pfaff <blp@gnu.org>
+
+ * debug.c: (cmd_debug_evaluate) Rewrite.
+
+Fri Mar 26 00:15:13 2004 Ben Pfaff <blp@gnu.org>
+
+ Fix some CROSSTABS bit rot stupidity.
+
+ * crosstabs.q: Reorder the CELLS subcommands for compatibility.
+ (internal_cmd_crosstabs) Initializes cells[] correctly.
+ (float_M_suffix) Rename format_cell_entry(), change prototype,
+ rewrite.
+ (display_crosstabulation) Fix cell formatting.
+
+Fri Mar 26 00:14:09 2004 Ben Pfaff <blp@gnu.org>
+
+ Make lex_rest_of_line(), lex_entire_end() not discard lines. Have
+ to call lex_discard_line() to do that.
+
+ * command.c: (run_command) Call lex_discard_line() after
+ lex_rest_of_line().
+
+ * lexer.c: (lex_entire_end) Change behavior.
+ (lex_rest_of_line) Change behavior. Return const char *.
+ (lex_discard_line) Don't clear getl_buf, don't emit message.
+
+ * main.c: (handle_error) Emit message here.
+
+ * repeat.c: (internal_cmd_do_repeat) Use lex_discard_line()
+ instead of lex_entire_line().
+
+ * str.c: (mm_find_reverse) Make length params size_t. Rewrite.
+
+ * title.c: (get_title) Call lex_discard_line() after
+ lex_rest_of_line().
+ (cmd_file_label) Ditto.
+ (cmd_document) Deal with const char * return value.
+
+Fri Mar 26 00:10:16 2004 Ben Pfaff <blp@gnu.org>
+
+ Removed REMARK command.
+
+ * command.c: (extract_prefix) Removed.
+ (output_line) Removed.
+ (cmd_remark) Removed.
+
+ * command.def: Remove REMARK.
+
+Fri Mar 26 00:08:38 2004 Ben Pfaff <blp@gnu.org>
+
+ Added abort() after lots of assert(0) invocations to avoid some
+ compiler warnings. We really need a NOT_REACHED macro.
+
+Tue Mar 23 08:00:42 WAST 2004 John Darrington <john@darrington.wattle.id.au>
+
+ * sort.c: Added missing call to temp_file_close. Changed error
+ messages to warnings.
+
+ * set.q: Improved setting of set_view{length,width} to be more tolerant
+ of buggy OSes.
+
+Sun Mar 21 10:11:14 WST 2004 John Darrington <john@darrington.wattle.id.au>
+
+ * val-labs.c: Fixed a bug where PSPP would crash, if VALUE LABELS was
+ used with incorrect syntax.
+
+ * error.c, error.h et al: Overridden definition of assert for a
+ custom one.
+
+ * test-q.c: Fixed a buglet where it would crash if no /VARIABLES
+ subcommand was given when it ought to have been.
+
+Sat Mar 20 22:19:08 2004 Ben Pfaff <blp@gnu.org>
+
+ * tab.c: (tab_vline) Fix assertions to respect row_ofs and
+ col_ofs.
+ (tab_hline) Ditto.
+ (tab_box) Ditto.
+ (tab_joint_text) Ditto.
+
+Sat Mar 20 17:57:23 2004 Ben Pfaff <blp@gnu.org>
+
+ * levene.c: Add #include.
+
+ * set.q: (set_viewport) Add `int' argument to make its prototype
+ correct for signal().
+
+Sat Mar 20 15:35:17 2004 Ben Pfaff <blp@gnu.org>
+
+ * expr-evl.c: (expr_evaluate) Assert that `c' is nonzero before
+ using it.
+
+Sat Mar 20 15:18:16 2004 Ben Pfaff <blp@gnu.org>
+
+ Changed DFM from open-at-first-access to explicit-open. Before,
+ calling dfm_get_record() or dfm_put_record() would automatically
+ open the file. Now, you have to call dfm_open_for_reading() or
+ dfm_open_for_writing() explicitly. This makes it possible to
+ check permissions, file existence, etc. earlier.
+
+ Also made struct file_handle more opaque, and clean up in general.
+
+ * data-list.c: (cmd_data_list) Open handle for reading.
+
+ * dfm.c: (struct dfm_fhuser_ext) Add `where', `saw_begin_data'
+ members.
+ (open_file_r) Renamed dfm_open_for_reading(), rewrote.
+ (open_file_w) Renamed dfm_open_for_writing(), rewrote.
+ (open_inline_file) Removed.
+ (read_record) For inline_file, if we haven't seen BEGIN DATA, read
+ it. Deal with line_number in extension record instead of file
+ handle.
+ (dfm_get_record) Rewrote.
+ (dfm_put_record) Rewrote.
+ (dfm_push) Assert file is open and one of ours. Deal with
+ line_number in extension record instead of file handle.
+ (dfm_pop) Assert file is open and one of ours. Deal with
+ line_number in extension record instead of file handle.
+ (cmd_begin_data) Use dfm_open_for_reading(). Mark that we saw
+ BEGIN DATA.
+
+ * file-handle.h: (enum constants RH_RF_*) Removed.
+ (enum constants FH_MD_*) Removed.
+ (struct file_handle) Removed `name', `norm_fn', `fn', `where',
+ `recform', `lrecl', `mode' members. Public references to
+ `recform' changed to use handle_get_mode(), references to `lrecl'
+ changed to use handle_get_record_width(). Added `private' member.
+ (enum file_handle_mode) New.
+
+ * file-handle.q: (struct private_file_handle) New structure.
+ (struct file_handle_list) New structure.
+ (static var files) New.
+ (static var file_handles) Removed.
+ (init_file_handle) Removed.
+ (create_file_handle) Removed.
+ (get_handle_with_name) New function.
+ (get_handle_for_filename) New function.
+ (cmd_file_handle) Rewritten.
+ (hash_file_handle) Removed.
+ (cmp_file_handle) Removed.
+ (fh_init_files) Rewritten.
+ (fh_parse_file_handle) Rewritten. Allows identifiers as
+ filenames.
+ (fh_get_handle_by_name) Renamed handle_get_name(), all references
+ updated. Rewritten.
+ (fh_get_handle_by_filename) Renamed handle_get_filename(), all
+ references updated. Rewritten.
+ (fh_record_width) Renamed handle_get_record_width(), all
+ references updated. Rewritten.
+ (handle_get_mode) New function.
+
+ * file-type.c: (cmd_file_type) Open handle for reading.
+
+ * filename.c: [unix] (struct file_identity) New structure.
+ [unix] (fn_get_identity) New function.
+ [unix] (fn_free_identity) New function.
+ [unix] (fn_compare_file_identities) New function.
+ [!unix] (struct file_identity) New structure.
+ [!unix] (fn_get_identity) New function.
+ [!unix] (fn_free_identity) New function.
+ [!unix] (fn_compare_file_identities) New function.
+
+ * lexer.c: (static var put) Renamed put_token, all references
+ updated.
+ (static var put_tokstr) New.
+ (static var put_tokval) New.
+ (lex_init) Initialize put_tokstr().
+ (restore_token) New function.
+ (save_token) New function.
+ (lex_get) Use restore_token().
+ (lex_put_back) Use save_token().
+ (lex_put_back_id) New function.
+ (lex_put_forward) Removed.
+ (lex_preprocess_line) Set put_token instead of using
+ lex_put_forward().
+ (lex_negative_to_dash) Use save_token(), set put_token directly.
+ (dump_token) Use stderr instead of stdout.
+
+ * main.c: (main) Remove call to cmd_init().
+
+ * matrix-data.c: (cmd_matrix_data) Open file for reading.
+
+ * pfm-read.c: Use handle_get_filename() instead of trying to use
+ h->fn directly, all over.
+
+ * pfm-write.c: Ditto.
+
+ * print.c: (internal_cmd_print) Open handle for writing.
+ (dump_table) Use handle_get_filename().
+ (print_trns_proc) Use handle_get_mode().
+ (cmd_print_space) Use fh_parse_file_handle().
+ Open handle for writing.
+ [0] (debug_print) Removed.
+
+ * sfm-read.c: Use handle_get_filename() instead of trying to use
+ h->fn directly, all over.
+
+ * sfm-write.c: Ditto.
+
+Sat Mar 20 14:35:48 2004 Ben Pfaff <blp@gnu.org>
+
+ Fix memory leaks.
+
+ * autorecode.c: (arc_free) Free arc->src_values.
+
+ * error.c: (msg) Free buf.
+
+ * val-labs.c: (do_value_labels) Always free vars.
+
+ * vfm.c: (close_active_file) If sink has no make_source then call
+ its destroy function.
+
+Sat Mar 20 14:00:24 2004 Ben Pfaff <blp@gnu.org>
+
+ Fixed cmd_parse() so that it always skips past a full command
+ name. A few special commands for which this would be bad get
+ special treatment. This lets us drop code for skipping past the
+ end of a command name in most cmd_*() functions. It's not worth
+ listing all the commands affected.
+
+ * command.c: (struct command) Remove `cmd' member, replace by
+ `name' member, all references updated. Remove `word', `next',
+ `skip_entire_name' members.
+ (macro DEFCMD) Deal with revised `struct command'.
+ (macro UNIMPL) Ditto.
+ (macro SPCCMD) New macro for commands whose last word shouldn't be
+ skipped.
+ (static array cmd_table[]) Make const, rename `commands', remove
+ sentinel element.
+ (macro COMMAND_CNT) New macro.
+ (split_words) Removed.
+ (cmd_init) Removed.
+ (FILE_TYPE_okay) Make parameter const.
+ (cmd_parse) Improve error messages.
+ (match_strings) New function.
+ (next_word) New function.
+ (enum command_match) New enum.
+ (conflicting_3char_prefixes) New function.
+ (conflicting_3char_prefix_command) New function.
+ (cmd_match_words) New function.
+ (count_matching_commands) New function.
+ (get_command_name) New function.
+ (free_words) New function.
+ (unknown_command_error) New function.
+ (figure_out_command) Renamed parse_command_name(), rewritten.
+
+ * command.def: Removed @ command. Marked BEGIN DATA, DOCUMENT,
+ FILE LABEL, REMARK, SUBTITLE, TITLE as special. Renamed EVALUATE
+ to DEBUG EVALUATE. Added N alias for N OF CASES, SORT alias for
+ SORT CASES.
+
+ * command.h: (macro SPCCMD) New.
+
+ * include.c: (cmd_include_at) Removed.
+ (cmd_include) Allow identifier to be used as filename.
+
+ * inpt-pgm.c: (cmd_reread) Use fh_parse_file_handle().
+
+ * t-test.q: (cmd_t_test) Command name is now parsed for us.
+
+
+Sat Mar 20 13:56:00 2004 Ben Pfaff <blp@gnu.org>
+
+ Start work on better test framework.
+
+ * Makefile.am: (pspp_sources) Add debug.c.
+
+ * debug.c: New file.
+
+ * compute.c: (cmd_evaluate) Moved to debug.c, renamed
+ cmd_debug_evaluate().
+
+ * expr-prs.c: (expr_parse) Remove PXP_DUMP support.
+
+ * expr.h: (enum constant PXP_DUMP) Removed.
+
+Sat Mar 20 00:05:42 WST 2004 John Darrington <john@darrington.wattle.id.au>
+
+ * set.q: Implemented the SHOW command, and synced it to the existing
+ SET cmd.
+
+ Added a handler for SIGWINCH so that viewlength and viewwidth follow
+ changes as the window size is changed.
+
+ Added fallback to set viewlength and viewwidth from LINES and COLUMS
+ environment variables if other methods are not available.
+
+ glob.c: Removed a lot of global variables from glob.c and encapsulated
+ them in set.q
+
+ random.c: Tidied up the way the random seed is set.
+
+ str.c: Added a ds_vprintf function.
+
+ error.c: Extended dump_message so that messages are always broken at
+ '\n' characters.
+
+Thu Mar 18 11:07:14 2004 Ben Pfaff <blp@gnu.org>
+
+ * pfm-write.c: (bufwrite) Write out the correct element for string
+ variables. From Andreas Streichardt <streichardt@globalpark.de>.
+
+Mon Mar 15 20:48:03 2004 Ben Pfaff <blp@gnu.org>
+
+ Get rid of static and global (!) vars in matrix-data.c.
+
+ * matrix-data.c: (static var nr_data) Removed.
+ (static var nr_factor_values) Removed.
+ (static var max_cell_index) Removed.
+ (static var split_values) Removed.
+ (struct nr_aux_data) New structure.
+ (read_matrices_without_rowtype) Use a local struct nr_aux_data in
+ place of static vars, pass to create_case_source() and procedure()
+ as aux data.
+ (nr_read_data_lines) Use struct nr_aux_data * parameter instead of
+ struct matrix_data_pgm *.
+ (nr_read_splits) Ditto.
+ (nr_read_factors) Ditto.
+ (nr_output_data) Ditto.
+ (static var wr_content) Removed.
+ (global var wr_data) Removed.
+ (global var wr_current) Removed.
+ (struct wr_aux_data) New structure.
+ (read_matrices_with_rowtype) Use a local struct wr_aux_data in
+ place of static vars, pass to create_case_source() and procedure()
+ as aux data.
+ (matrix_data_read_with_rowtype) Use struct wr_aux_data * parameter
+ instead of matrix_data_pgm *.
+ (wr_read_splits) Ditto.
+ (wr_output_data) Ditto.
+ (wr_read_rowtype) Ditto.
+ (wr_read_factors) Ditto.
+ (wr_read_indeps) Ditto.
+
+Mon Mar 15 20:07:29 2004 Ben Pfaff <blp@gnu.org>
+
+ Get rid of static vars in autorecode.c.
+
+ * autorecode.c: (struct autorecode_trns) Rename `arc' to `specs',
+ `n_arc' to `spec_cnt'. All references updated.
+ (static var v_src) Removed.
+ (static var v_dest) Removed.
+ (static var h_trns) Removed.
+ (static var nv_src) Removed.
+ (static var descend) Removed.
+ (static var print) Removed.
+ (enum direction) New enum.
+ (struct autorecode_pgm) New structure.
+ (cmd_autorecode) Use struct autorecode_pgm instead of static vars.
+ Move n_dest local var into struct autorecode_pgm for ease of
+ clean-up. Use arc_free().
+ (arc_free) New function.
+ (recode) Modify to take struct autorecode_pgm * parameter instead
+ of using statics. Let the caller clean up.
+ (autorecode_proc_func) Use struct autorecode_pgm * auxiliary data
+ instead of statics. Rearrange code a little.
+
+Mon Mar 15 00:25:02 2004 Ben Pfaff <blp@gnu.org>
+
+ Get rid of static, global vars in recode.c. Remove debug code.
+
+ * recode.c: (static var head) Removed.
+ (global var v) Removed.
+ (global var nv) Removed.
+ (cmd_recode) New local variables head, v, nv. Initialize and free
+ v. Don't call debug_print().
+ [DEBUGGING] (dump_dest) Removed.
+ [DEBUGGING] (debug_print) Removed.
+
+Mon Mar 15 00:14:49 2004 Ben Pfaff <blp@gnu.org>
+
+ Get rid of static vars in expr-opt.c.
+
+ * expr-opt.c: (static var e) Removed.
+ (static var nop) Removed.
+ (static var mop) Removed.
+ (static var ndbl) Removed.
+ (static var mdbl) Removed.
+ (static var nstr) Removed.
+ (static var mstr) Removed.
+ (static var nvars) Removed.
+ (static var mvars) Removed.
+ (struct expr_dump_state) New structure.
+ (dump_expression) Use new struct expr_dump_state instead of static
+ vars and pass to functions we call.
+ (dump_node) Use struct expr_dump_state * parameter.
+ (emit) Ditto.
+ (emit_num_con) Ditto.
+ (emit_str_con) Ditto.
+ (emit_var) Ditto.
+
Mon Mar 15 00:03:51 2004 Ben Pfaff <blp@gnu.org>
Get rid of static var in COUNT.