Had to get last call to multipass_split_output() inside
[pspp] / src / ChangeLog
index edc5c34daa3fbb374083f7c5e6479d4dcd323160..5514d1f59a945d852161001c7fb37f3760cc8e3a 100644 (file)
@@ -1,3 +1,348 @@
+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