2008-07-01 David Bateman * pr-output.cc (static inline std::string rational_approx (double, int)): Test for underflow of fractional part of rational approximation earlier in the loop. 2009-07-01 Joe Rothweiler * input.cc (raw_mode): Use TCSADRAIN if no wait. 2009-06-30 Jaroslav Hajek * symtab.h (force_variable): Remove assertion. 2009-06-26 John W. Eaton * load-path.cc (Faddpath): Preserve order of prepended elements. 2009-06-24 Thorsten Meyer * oct-map.cc (Octave_map::squeeze, Octave_map::permute, Octave_map::transpose, Octave_map::reshape, Octave_map::concat, Octave_map::index): Add tests for preservation of key order in struct arrays. 2009-06-24 Jaroslav Hajek * pt-mat.cc (get_concat_class): Use empty string as zero value. (tm_row_const_rep::tm_row_const_rep): Initialize class_nm to empty string. (tm_const::tm_const): Ditto. 2009-06-24 John W. Eaton * pt-assign.cc (former_built_in_variables): Remove "ans" from the list. 2009-06-24 Jaroslav Hajek * pt-eval.cc (do_unwind_protect_cleanup_code): Workaround sig_atomic_t != int. 2009-06-23 Jaroslav Hajek * quit.h (octave_quit_exception): Delete. (exit_status, quitting_gracefully): New globals. * quit.cc: Initialize them. (Fquit): Set the globals, simulate interrupt. (main_loop): Handle exit properly. * octave.cc (execute_eval_option_code): Ditto. (execute_command_line_file): Ditto. * pt-eval.cc (do_unwind_protect_cleanup_code): Fix order of unwind_protect calls. 2009-06-23 John W. Eaton * oct-map.cc (Octave_map::squeeze, Octave_map::permute, Octave_map::transpose, Octave_map::reshape, Octave_map::concat): Preserve key order. 2009-06-22 Jaroslav Hajek * ov-cell.cc (octave_cell::all_strings): Avoid duplicate conversions. 2009-06-20 Jaroslav Hajek * ov.cc (Fsubsasgn): Uniquify shared value before assigning to it. 2009-06-17 John W. Eaton * mex.cc (mxArray_octave_value::get_data): If octave_value::mex_get_data returns a valid pointer, mark it as foreign and return it instead of enumerating the types that can be handled directly. * ov-re-mat.h (octave_matrix::mex_get_data): New function. * ov-bool-mat.h (octave_bool_matrix::mex_get_data): Ditto. * ov-flt-re-mat.h (octave_float_matrix::mex_get_data): Ditto. * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::mex_get_data): Ditto. * ov-base-mat.h (octave_base_matrix::mex_get_data): Delete. 2009-06-16 Jaroslav Hajek * symtab.h (symbol_table::set_scope_and_context): Avoid checking error_state for setting context. 2009-06-12 Kai NODA * ls-mat4.h: Fix include guard * ov-type-conv.h: Add missing include guard. 2009-06-12 Jaroslav Hajek * ov-cell.cc (octave_cell::sort (Array&)): Simplify. 2009-06-10 John W. Eaton * pt-fcn-handle.cc (tree_anon_fcn_handle::dup): Don't convert to tree_constant object here. Do inherit from current symbol table scope and context. New test. * lex.l (handle_identifier): Set lexer_flags.looking_for_object_index false if identifier is a keyword. ({IDENT}{S}*): Don't set lexer_flags.looking_for_object_index here. 2009-06-09 Jaroslav Hajek * octave.cc (octave_main): Call initialize_command_input conditionally. Move line_editing update in front of it. Call command_editor::force_default_editor if not line_editing. 2009-06-09 Jaroslav Hajek * data.cc (Flog2): Fix tests. 2009-06-08 John W. Eaton * variables.cc (symbol_exist): Returnn 1 for function handles and inline function objects. 2009-06-08 Jaroslav Hajek * symtab.h (symbol_table::do_clear_global, symbol_table::do_clear_global_pattern): Properly erase from both local and global table. 2009-06-08 Jaroslav Hajek * variables.cc (Fclear): Clear also globals when called without arguments. 2009-06-07 Jaroslav Hajek * graphics.cc (color_property::do_set): Allow a wider range of types. 2009-06-07 Jaroslav Hajek * DLD-FUNCTIONS/find.cc (Ffind): Fix docs. Improve second argument handling. Add regression tests. 2009-06-06 Rik * data.cc: Update documentation for 'complex' function 2009-06-06 Rik * load-save.cc: Update documentation for NA and isna functions 2009-06-06 Rik * load-save.cc: Update documentation for load and save 2009-06-06 Rik * pr-output.cc: Update documentation for 'format' 2009-06-05 Rik * variables.cc: Update documentation for 'who' family of functions 2009-06-03 Rik * input.cc: Correct documentation for keyboard function 2009-05-25 Jaroslav Hajek Version 3.2.0 released. 2009-06-02 Rob Mahurin * Makefile.in: Add CARBON_LIBS to OCTINTERP_LINK_DEPS. From Bernard Desgraups . 2009-06-02 Jaroslav Hajek * ov-base.cc (octave_base_value::numeric_assign): Gripe when no index given. * ov-cell.cc (octave_cell::subsasgn): Ditto. * ov-struct.cc (octave_struct::subsasgn): Ditto. * ov-list.cc (octave_list::subsasgn): Ditto. 2009-05-28 John W. Eaton * load-path.cc (load_path::do_files): Avoid shadow warning from GCC. 2009-05-27 John W. Eaton * DLD-FUNCTIONS/__magick_read__.cc (write_image): Bail out if given indexed image. 2009-05-27 Jaroslav Hajek * DLD-FUNCTIONS/__magick_read__.cc (encode_map): Fix RGB color construction. 2009-05-26 John W. Eaton * load-path.h, load-path.cc (load_path::files, load_path::do_files): New arg, OMIT_EXTS. * help.cc (F__list_functions__): Call load_path::files with omit_exts set to true. * symtab.h (symbol_table::symbol_record::symbol_record_rep::is_variable): Use "! is_local ()" instead of storage_class != local. (symbol_table::do_variable_names): Only add variables to the list. (symbol_table::unmark_forced_variables): New static function * variables.cc (do_who): Use is_variable instead of is_defined. Also limit output to variables when using regexp pattern. * octave.cc (unmark_forced_vars): Delete. (execute_eval_option_code): Don't add unmark_forced_vars to unwind_protect stack here. * toplev.cc (main_loop): Add symbol_table::unmark_forced_variables to the unwind_protect stack here. * input.cc (get_debug_input): Likewise. * parse.y (parse_fcn_file, eval_string): Likewise. 2009-05-25 Jaroslav Hajek * toplev.h (quit_allowed): New global variable. * toplev.cc (quit_allowed): Declare it. (Fquit): Raise error if quitting is not allowed. * octave.cc (octave_main): if running as embedded, disable quit by default. 2009-05-25 Jaroslav Hajek * variables.cc (do_who): Only output symbols with a defined value. 2009-05-22 Michael Goffioul * toplev.h (main_loop): Tag with OCTINTERP_API. * input.h (octave_read, get_input_from_file, get_input_from_stdin): Ditto. * lex.h (create_buffer, current_buffer, switch_to_buffer, delete_buffer, restore_input_buffer, delete_input_buffer): Ditto. 2009-05-22 Robert T. Short * ov-class.h, ov-class.cc (octave_class::clear_exemplar_map): New function. * symtab.h (symbol_record::clear_objects, symbol_record::do_clear_objects): New functions. * variables.cc (do_matlab_compatible_clear, clear): Handle -classes option. 2009-05-22 Jaroslav Hajek * src/ov-base-mat.cc (octave_base_matrix::assign (const octave_value_list, typename MT::element_type)): Avoid out of bounds assignments. 2009-05-21 Michael Goffioul * graphics.cc (figure::properties::get_boundingbox, figure::properties::set_boundingbox): Get screen size from root object. (convert_position): Get screen resolution from root object and remove unneeded "backend" argument. (axes::properties::get_boundingbox, figure::properties::get_boundingbox, figure::properties::set_boundingbox): Remove unneeded backend argument to convert_position call. * debug.h (class bp_table): Tag with OCTINTERP_API. * input.h (Vdebugging): Ditto. * pt-eval.h (class tree_evaluator): Ditto. * toplev.h (class octave_call_stack): Ditto. * file-io.cc (mkstemp): Add mktemp-based implementation of mkstemp on platforms that do not have it (mkstemp is required by the new help system). * TEMPLATE-INST/Array-os.cc: Add "extern template" declaration for Array to avoid implicit instantiation (and duplicate symbols at link-time) [Win32] 2009-05-20 John W. Eaton * pt-assign.cc (maybe_warn_former_built_in_variable): Set initialized to true when done initializing vars set. From Michael Goffioul . 2009-05-20 Jaroslav Hajek * ov-typeinfo.h (octave_value_typeinfo::unary_class_ops, octave_value_typeinfo::unary_ops, octave_value_typeinfo::non_const_unary_ops, octave_value_typeinfo::binary_class_ops, octave_value_typeinfo::binary_ops, octave_value_typeinfo::compound_binary_class_ops, octave_value_typeinfo::compound_binary_ops, octave_value_typeinfo::cat_ops, octave_value_typeinfo::assign_ops, octave_value_typeinfo::assignany_ops, octave_value_typeinfo::pref_assign_conv, octave_value_typeinfo::type_conv_ops, octave_value_typeinfo::widening_ops): Declare as Array. * ov-typeinfo.cc: Reflect changes. 2009-05-20 Jaroslav Hajek * toplev.h (octave_exit_func): New typedef. (octave_exit): Change to octave_exit_func. 2009-05-20 Jaroslav Hajek * ov-typeinfo.cc: Don't include oct-obj.h. 2009-05-20 Jaroslav Hajek * toplev.h (octave_quit_exception): New class. (octave_exit): New global variable. * toplev.cc (octave_exit): Initialize to ::exit. (clean_up_and_exit): Call octave_exit if set. (Fquit): Raise octave_quit_exception to quit. (main_loop): Catch octave_quit_exception. * octave.cc (execute_command_line_file): Ditto. (execute_eval_option_code): Ditto. 2009-05-19 John W. Eaton * DLD-FUNCTIONS/fltk_backend.cc (F__fltk_redraw__): New function. (F__init_fltk__): Call add_input_event_hook with feval to add __fltk_redraw__ to the list of even hook functions to call. Call mlock when initializing. (F__remove_fltk__): Call remove_input_event_hook with feval to remove __fltk_redraw__ from the list of event hook functions. Unlock __init_fltk__ when shutting down. * input.cc (Finput_event_hook): Delete. (input_event_hook): Handle set of functions instead of just one. (Fadd_input_event_hook, Fremove_input_event_hook): New functions. 2009-05-19 Jaroslav Hajek * Makefile.in: Add X11_LIBS to OCTINTERP_LINK_DEPS. 2009-05-17 Jaroslav Hajek * TEMPLATE-INST/Array-tc.cc: Change #include. 2009-05-15 Robert T. Short * ov-class.cc (octave_class::exemplar_info): Fix typo in error message. * ov-class.cc (Fmethods): Methods returns cell array. * ls-mat5.cc (read_mat5_binary_element): Construct exemplar array and ensure inheritance is correct. 2009-05-15 John W. Eaton * error.cc (Ferror): Handle error struct argument. * ls-mat5.cc (save_mat5_binary_element): Avoid multiple calls to contents method. From David Bateman . (save_mat5_element_length): Use const Cell to avoid making copies when indexing. 2009-05-15 Jaroslav Hajek * oct-stream.cc: Don't instantiate Array2. (octave_stream::read): Make read_fptr_table a static 2d array. (FILL_TABLE_ROW): Update. 2009-05-12 Jaroslav Hajek * data.cc (F__accumarray_sum__): Optimize the constant range case. 2009-05-11 John W. Eaton * sparse-xdiv.cc (do_rightdiv_sm_dm, do_leftdiv_dm_sm): Avoid apparent MSVC bug with typedef. * Makefile.in (install-lib): Remove $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octinterp.$(SHLLIB_VER), not $(DESTDIR)$(octlibdir)/$(SHLPRE)octinterp.$(SHLEXT_VER). 2009-05-08 Carsten Clark * data.cc (Fissorted): Fix typo in documentation entry. 2009-05-07 Robert T. Short * ov-class.h, ov-class.cc (octave_class::reconstruct_exemplar): New function. * ov-class.cc (octave_class::load_binary, octave_class::load_hdf5, octave_class::load_ascii): Construct exemplar table and ensure inheritance is correct. * ov-struct.cc (struct): Return struct from object. 2009-05-07 John W. Eaton * graphics.h.in (base_graphics_object::set): Undo previous change. (base_properties::set (const caseless_str&, const octave_value&): New virtual function. (base_properties::set (const caseless_str&, const std::string&, const octave_value&)): No longer virtual. * toplev.cc (octave_config_info): Remove F2C and F2CFLAGS from the config infor struct. * oct-conf.h.in (OCTAVE_CONF_F2CFLAGS, OCTAVE_CONF_F2C): Delete definitions. 2009-05-07 Marco Atzeri * Makefile.in: (SHLPRE): Rename from SHLLIBPRE. 2009-05-07 John W. Eaton * genprops.awk (emit_declarations): Emit decls for static has_property functions. (emit_source): Add class name argument to base_properties::set function. Pass class name to set_dynamic and base_properties::set. Emit definitions for has_property functions. * graphics.h.in, graphics.cc (base_properties::set, base_properties::set_dynamic): New argument CNAME. (base_properties::all_dynamic_properties): New static data member. (base_properties::has_dynamic_property): New static function. (base_graphics_object::set): Pass class name to base_properties::set function. (property_list::set): Check for invalid property names. 2009-05-06 Jaroslav Hajek * ov-re-mat.cc (Fdouble): Fix order of branches. 2009-05-05 John Swensen * debug.h, debug.cc (breakpoints): Rename from bp_map, use a std::set instead of a std::map object. Change all uses. (bp_table::do_get_breakpoint_list): Simplify. 2009-05-05 Robert T. Short * ov-class.h, ov-class.cc (octave_class::reconstruct_parents): New function. * ov-class.cc (octave_class::load_binary, octave_class::load_hdf5): Contstruct parent list. (get_current_method_class): Clean up method class extraction. 2009-05-05 John W. Eaton * graphics.cc (array_property::validate): Require object to be any numeric type, not necessarily a double precision value. * variables.cc (set_internal_variable): Pass NM in call to error. 2009-05-04 Peter O'Gorman * utils.cc: Don't define HAVE_C99_VSNPRINTF here. 2009-05-01 John W. Eaton * error.cc (Vlast_error_file, Vlast_error_name, Vlast_error_line, Vlast_error_column): Delete. (Vlast_error_stack): New static variable. (initialize_last_error_stack): New static function. (verror, Frethrow, Flasterror): Set or use Vlast_error_stack, not Vlast_error_file, etc. 2009-04-27 John W. Eaton * ov-class.cc (octave_class::dotref): Handle empty parent class. (octave_class::get_current_method_class): Allow result to be empty. (called_from_builtin): New static function. (octave_class::subsref, octave_class::subsasgn): Use it. 2009-04-23 John W. Eaton * ov-class.cc (Fclass): Check newly constructed classes against the first constructed object of the class. * ov-class.h, ov-class.cc (octave_class::exmplar_info): New class. (exemplar_map): New static data member. (exemplar_iterator, exemplar_const_iterator): New typedefs. * ov-class.h (octave_class::nparents, octave_class::parent_class_name_list): New functions. * ov.h (octave_base_value::nparents, octave_base_value::parent_class_name_list): New functions. * ov-base.h, ov-base.cc (octave_base_value::nparents, octave_base_value::parent_class_name_list): New functions. (parent_class_names): Error if called for wrong type argument. * symtab.cc (load_out_of_date_fcn): New arg, dispatch_type. (out_of_date_check_internal): Pass dispatch type to load_out_of_date_fcn. 2009-04-22 John W. Eaton * ov-base-int.cc (octave_base_int_helper::char_value_out_of_range): Correct result for specialization. * ov-class.cc (octave_class::dotref, octave_class::subsasgn): Protect against possibly invalid octave_value -> string conversions. 2009-04-22 Robert T. Short * variables.cc (symbol_exist): Also return 1 for objects. * ov-base.h (octave_base_value::assign): New virtual function. * ov-class.h (octave_class::assign): New function. * ov-class.cc (octave_class::find_parent_class): Simplify. (octave_class::octave_class): Don't allow duplicate parent classes. (octave_class::subsasgn): Allow cls = method (cls, value) to work properly when method is a parent-class method. (get_method_class): New static function. (octave_class:subsasgn, octave_class::dotref): Use it. (F__isa_parent__): New function. 2009-04-22 Jaroslav Hajek * ov-range.cc (octave_range::char_array_value): New virtual function override. * ov-range.h: Declare it. 2009-04-22 Jaroslav Hajek * pt-mat.cc (tm_row_const::tm_row_const_rep::do_init_element): Update class name even for all-zeros elements. (get_concat_class): Update the default value if possible. 2009-04-21 John W. Eaton * parse.y (Fassignin): Add missing unwind_protect frame. * toplev.h (push (symbol_table::scope_id, symbol_table::context_id)): New function. * toplev.cc (main_loop): Don't call symbol_table::reset_scope. * mex.cc (mexGetVariable, mexPutVariable): Use unwind_protect to restore call stack and scope. * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Don't use symbol_table::push_scope. * variablees.cc (do_who): Likewise. Use octave_call_stack and unwind_protect to manage change in scope. * ov-fcn-handle.cc (octave_fcn_handle::load_ascii, octave_fcn_handle::load_binary, octave_fcn_handle::load_hdf5): Likewise. * ls-mat5.cc (read_mat5_binary_element): Likewise. * symtab.h (erase_scope (void*)): New function, for unwind_protect. (symbol_table::push_scope, symbol_table::pop_scope, symbol_table::reset_scope): Delete. (symbol_table::scope_stack): Delete static member. * symtab.cc (symbol_table::scope_stack): Delete definition. 2009-04-17 Jaroslav Hajek * oct-map.h (Octave_map::contents (const_iterator) const, Octave_map::contents (iterator)): Simplify. 2009-04-17 Jaroslav Hajek * oct-map.cc (Octave_map::assign (const octave_value_list&, const std::string&, const Cell&)): Fix & simplify. (common_size): Remove. 2009-04-16 Jaroslav Hajek * pt-idx.cc (make_value_list): Gripe on magic end query for undefined variables. 2009-04-16 Jaroslav Hajek * xpow.cc (same_sign): New helper function. (elem_xpow (double, const Range&), elem_xpow (const Complex&, const Range&)): Only optimize monotonic-magnitude integer ranges, start always from the smaller end. 2008-04-11 David Bateman * ov-cell.cc (Fstruct2cell): Treat possible trailing singleton for creation of cell array from column structure vector. 2009-04-09 Jaroslav Hajek * ov-cell.cc (octave_cell::subsasgn): Fix reference counting optimization. 2009-04-08 John W. Eaton * load-path.cc (rehash_internal): New function. (Frehash): Use it. (Fpath, Faddpath, Frmpath): Call rehash_internal if path is modified. 2009-04-08 Jaroslav Hajek * xpow.cc (elem_xpow (double, const Range&), elem_xpow (const Complex&, const Range&)): New functions. * xpow.h: Declare them. * OPERATORS/op-range.cc: Define scalar .^ range and complex .^ range & install them. 2009-04-04 Jaroslav Hajek * ov-struct.cc (octave_struct::subsasgn): Fix reference counting optimization. 2008-04-03 David Bateman * DLD-FUNCTIONS/max.cc (MINMAX_SPARSE_BODY): Allow sparse boolean values. 2009-04-01 Jaroslav Hajek * ov-str-mat.cc (default_numeric_conversion_function): Create an octave_scalar if possible. 2009-03-29 John W. Eaton * DLD-FUNCTIONS/fltk_backend.cc (plot_window::button_press): Don't pass arbitrary input to fl_message as a format string. 2009-03-29 Jaroslav Hajek * pt-eval.cc (do_unwind_protect_cleanup_code): Protect also octave_interrupt_state. 2009-03-29 Jaroslav Hajek * DLD-FUNCTIONS/cellfun.cc (Fcellslices): Index n-d arrays along the last dimension. 2009-03-27 Jaroslav Hajek * DLD-FUNCTIONS/balance.cc (Fbalance): Fix order of output args. 2009-03-26 Jaroslav Hajek * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx (const Array&, ...)): Move dimensions fixup to liboctave. 2009-03-26 Jaroslav Hajek * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx (const Array&, ...)): Simplify. Instantiate for bool and octave_int types. (find_nonzero_elem_idx (const Sparse&, ...)): Instantiate for bool. (Ffind): Handle bool and octave_int cases. 2009-03-25 John W. Eaton * version.h (OCTAVE_VERSION): Now 3.1.55+. (OCTAVE_API_VERSION): Now api-v37+. * version.h (OCTAVE_VERSION): Now 3.1.55. (OCTAVE_API_VERSION): Now api-v37. (OCTAVE_RELEASE_DATE): Now 2009-03-25. * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): Also return [](0x0) if the array has 0 rows and it is not a column vector. * oct-stream.cc (octave_stream::write (const Array&, octave_idx_type, oct_data_conv::data_type, octave_idx_type, oct_mach_info::float_format)): Seek to skip if still inside bounds of existing file. Otherwise, write NUL to skip. * Makefile.in (%.df : %.cc): Write source file name to output, wrapped in XDEFUN_FILE_NAME macro. * mkbuiltins: Provide definition for XDEFUN_FILE_NAME. * mkgendoc: Likeiwse. (XDEFUN_DLD_INTERNAL, XDEFUNX_DLD_INTERNAL, XDEFUN_INTERNAL, XDEFCONSTFUN_INTERNAL, XDEFUNX_INTERNAL, XDEFVAR_INTERNAL, XDEFCONST_INTERNAL): Pass file_name to print_doc_string. (print_doc_string): New arg, FILE_NAME. Print file name as comment. 2009-03-24 John W. Eaton * ov-class.cc (F__parent_classes__): New function. 2009-03-24 Robert T. Short * ov-class.h, ov-class.cc (octave_class::octave_class (const Octave_map&, const std::string&, const octave_value_list&)): New constructor. (octave_class::find_parent_class, octave_class::parent_classes): New functions. (octave_class::dotref): Also look in parent class. (Fclass): Handle parent class arguments. * ov-base.h (octave_base_value::get_parent_list, octave_base_value::parent_classes): New virtual functions. * load-path.h, load-path.cc (load_path::parent_map): New data member. (load_path::add_to_parent_map): New static function. (load_path::do_add_to_parent_map): New member function. (load_path::do_find_method): Also look in parent classes for methods. (load_path::parent_map_type, load_path::const_parent_map_iterator, load_path::parent_map_iterator): New typedefs. 2009-03-23 John W. Eaton * symtab.h (symbol_table::symbol_record::symobl_recoord_rep::is_variable): Also return true if symbol is tagged as a variable. (symbol_table::symbol_record::symobl_recoord_rep::force_variable): Don't set variable value. (symbol_table::symbol_record::symobl_recoord_rep::clear_forced, symbol_table::symbol_record::clear_forced): Delete. (symbol_table::unmark_forced_variables): Rename from symbol_table::clear_forced_variables. (symbol_table::do_unmark_forced_variables): Rename from symbol_table::do_clear_forced_variables. * parse.y (make_script, finish_function): Call symbol_table::unmark_forced_variables instead of symbol_table::clear_forced_variables. * octave.cc (unmark_forced_vars): New function. (execute_eval_option_code): Add it to the unwind-protect stack. 2009-03-22 Jaroslav Hajek * pt-eval.cc (tree_evaluator::visit_simple_for_command): Remove struct branch, handle structs by the generic code. (tree_evaluator::visit_complex_for_command): Add missing const qualifiers. 2009-03-21 Jaroslav Hajek * ov-base-diag.cc: Add missing include. * sparse-xdiv.cc: Ditto. * DLD-FUNCTIONS/__glpk__.cc: Ditto. * DLD-FUNCTIONS/__lin_interpn__.cc: Ditto. * DLD-FUNCTIONS/__voronoi__.cc: Ditto. 2009-03-20 Jaroslav Hajek * ov-re-mat.cc (octave_matrix::load_ascii): Simplify. * ov-flt-re-mat.cc (octave_float_matrix::load_ascii): Simplify. * ov-cx-mat.cc (octave_complex_matrix::load_ascii): Simplify. * ov-flt-cx-mat.cc (octave_float_complex_matrix::load_ascii): Simplify. 2009-03-20 Jaroslav Hajek * ov-re-mat.cc (octave_matrix::isnan, octave_matrix::isinf, octave_matrix::finite): Simplify. * ov-flt-re-mat.cc (octave_float_matrix::isnan, octave_float_matrix::isinf, octave_float_matrix::finite): Simplify. * ov-cx-mat.cc (octave_complex_matrix::isnan, octave_complex_matrix::isinf, octave_complex_matrix::finite): Simplify. * ov-flt-cx-mat.cc (octave_float_complex_matrix::isnan, octave_float_complex_matrix::isinf, octave_float_complex_matrix::finite): Simplify. 2009-03-19 Benjamin Lindner * ls-oct-ascii.cc (extract_keyword): Replace loop with call to read_until_newline to avoid leaving stray '\r' in stream when reading files with CRLF line endings. 2009-03-18 Jaroslav Hajek * DLD-FUNCTIONS/cellfun.cc (scalar_col_helper, scalar_col_helper_def, scalar_col_helper_nda, scalar_query_helper): New classes. (make_col_helper): New function. (Fcellfun): Use col_helper classes for UniformOutput. Avoid copying by using const variables. 2009-03-17 Jaroslav Hajek * OPERATORS/op-b-bm.cc: Add missing INSTALL_BINOPs. * OPERATORS/op-bm-b.cc: Ditto. * OPERATORS/op-fm-fm.cc: Ditto. * OPERATORS/op-m-m.cc: Ditto. 2009-03-17 Jaroslav Hajek * ov.cc (octave_value::octave_value): Move to ov.h * ov.h (octave_value::octave_value): Implement fast inline constructor using a static rep. 2009-03-15 Jaroslav Hajek * DLD-FUNCTIONS/cellfun.cc (Fcellslices): New DLD function. 2009-03-13 Jaroslav Hajek * ov.h (octave_value::compound_binary_op): Support bool compound ops. * ov.cc (do_binary_op, decompose_binary_op, binary_op_fcn_name): Ditto. * pt-cbinop.cc (strip_not, simplify_and_or_op): New funcs. (maybe_compound_binary_expression): Support bool compound ops. * OPERATORS/op-int.h: Support bool compound ops. * OPERATORS/op-b-bm.cc: Ditto. * OPERATORS/op-bm-b.cc: Ditto. * OPERATORS/op-bm-bm.cc: Ditto. * OPERATORS/op-fm-fm.cc: Ditto. * OPERATORS/op-m-m.cc: Ditto. 2009-03-13 Jaroslav Hajek * xpow.cc (xpow (const NDArray&, double), xpow (const ComplexNDArray&, double), xpow (const FloatNDArray&, float), xpow (const FloatComplexNDArray&, float)): Use xisint for testing ints. Optimize w.r.t int exponents. 2009-03-13 John W. Eaton * parse.y (maybe_warn_assign_as_truth_value, make_binary_op, maybe_warn_variable_switch_label, maybe_warn_associativity_change): Print file and line number info if available. * lex.l (gripe_matlab_incompatible): Likewise. * error.cc (pr_where): Use octave_call_stack::backtrace to print complete stack trace at once. Don't attempt to print code. (error_2): Set error_state to 0 before calling pr_where. (warning_1): Switch sense of test on symbol_table::at_top_level. Call pr_where after printing primary warning message. 2009-03-13 Jaroslav Hajek * ov-range.h (octave_range::octave_range (const Range&)): Allow constructing from invalid range op result. * ov-range.cc (octave_range::try_narrowing_conversion): Validate invalid range op results. * data.cc (fill_matrix): Return packed form (zero-step range) if possible. 2009-03-10 Jason Riedy * DLD-FUNCTIONS/lu.cc (lu): Call fact.Pr_mat () and fact.Pc_mat () to return permutation matrices in the sparse case. 2009-03-12 John W. Eaton * ls-mat-ascii.cc (get_mat_data_input_line): If we are looking at '\r' or '\n', skip current line ending instead of skipping until the next. 2009-03-12 Ben Abbott * graphics.cc: Fix default "papersize" property value. 2009-03-12 Jaroslav Hajek * ov-flt-perm.h, ov-flt-perm.cc: Remove sources. * ov.h, ov.cc (octave_value::octave_value (const PermMatrix&)): Remove use "single" argument. * ov.cc (install_types): Update. * xpow.cc, xpow.h (xpow (PermMatrix, float)): Remove. * ov-base-diag.cc (octave_base_diag::do_index_op): Remove permutation creating block. * ov-re-diag.cc (octave_diag_matrix::do_index_op): Move it here. * ov-re-diag.h (octave_diag_matrix::do_index_op): New decl. * DLD-FUNCTIONS/det.cc (Fdet): Update. * DLD-FUNCTIONS/inv.cc (Finv): Update. * DLD-FUNCTIONS/pinv.cc (Fpinv): Update. * OPERATORS/op-fcm-pm.cc <-- OPERATORS/op-fcm-fpm.cc * OPERATORS/op-fcm-pm.cc: Update. * OPERATORS/op-fm-pm.cc <-- OPERATORS/op-fm-fpm.cc * OPERATORS/op-fm-pm.cc: Update. * OPERATORS/op-pm-fcm.cc <-- OPERATORS/op-fpm-fcm.cc * OPERATORS/op-pm-fcm.cc: Update. * OPERATORS/op-pm-fm.cc <-- OPERATORS/op-fpm-fm.cc * OPERATORS/op-pm-fm.cc: Update. * OPERATORS/op-pm-pm.cc: Update. * OPERATORS/op-pm-template.cc: Update. 2009-03-11 Jaroslav Hajek * xpow.cc (xpow (const PermMatrix&, double), xpow (const PermMatrix&, float)): New functions. * xpow.h: Declare them. * DLD-FUNCTIONS/op-pm-pm.cc: Support permutation matrix ^ scalar. * DLD-FUNCTIONS/op-fpm-fpm.cc: Ditto. 2009-03-11 Jaroslav Hajek * ov-ch-mat.cc (octave_char_matrix::double_value, octave_char_matrix::float_value, octave_char_matrix::complex_value, octave_char_matrix::float_complex_value): Cast to unsigned char. 2009-03-10 Jason Riedy * OPERATORS/op-pm-sm.cc (mul_pm_sm): New Octave binding for perm * sparse. (ldiv_pm_sm): New Octave binding for perm \ sparse. (mul_sm_pm): New Octave binding for sparse * perm. (div_sm_pm): New Octave binding for sparse / perm. (install_pm_sm_ops): Install the above bindings. * OPERATORS/op-pm-scm.cc (mul_pm_scm): New Octave binding for perm * sparse complex. (ldiv_pm_scm): New Octave binding for perm \ sparse complex. (mul_scm_pm): New Octave binding for sparse complex * perm. (div_scm_pm): New Octave binding for sparse complex / perm. (install_pm_scm_ops): Install the above bindings. * Makefile.in (PERM_OP_XSRC): Add op-pm-sm.cc and op-pm-scm.cc for operations between permutations and sparse matrices. 2009-03-10 Jason Riedy * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): New override for find on PermMatrix. (find): Add a branch testing arg.is_perm_matrix () and calling the above override. 2009-03-10 John W. Eaton * c-file-ptr-stream.cc, dynamic-ld.cc, error.cc, lex.l, pager.cc, zfstream.cc: Include . * zfstream.h: Include instead of and . * c-file-ptr-stream.h, help.h, load-path.h, load-save.h, ls-ascii-helper.h, oct-iostrm.h, oct-stream.h, ov-base-diag.h, ov-base-int.h, ov-base-mat.h, ov-base-scalar.h, ov-base-sparse.h, ov-base.h, ov-bool-mat.h, ov-bool-sparse.h, ov-bool.h, ov-cell.h, ov-ch-mat.h, ov-class.h, ov-colon.h, ov-complex.h, ov-cs-list.h, ov-cx-mat.h, ov-cx-sparse.h, ov-fcn-handle.h, ov-fcn-inline.h, ov-float.h, ov-flt-complex.h, ov-flt-cx-mat.h, ov-flt-re-mat.h, ov-intx.h, ov-list.h, ov-range.h, ov-re-mat.h, ov-re-sparse.h, ov-scalar.h, ov-str-mat.h, ov-struct.h, ov.h, pager.h, pr-output.h, procstream.h, pt-assign.h, pt-cell.h, pt-const.h, pt-fcn-handle.h, pt-id.h, pt-mat.h, pt.h, utils.h: Include instead of . 2009-03-10 Jaroslav Hajek * data.cc (Fsize_equal): Allow single argument call. * DLD-FUNCTIONS/max.cc (Fcummin, Fcummax): Update docs. 2009-03-09 Benjamin Lindner * ls-ascii-helper.h, ls-ascii-helper.cc: New files. * Makefile.in: Add them to the appropriate lists. * load-save.cc (Fload): Open all files in binary mode. * ov-range.cc (load_ascii): Explicitly handle CR and CRLF line endings. * ov-fcn-handle.cc (load_ascii): Likewise. * ov-fcn-inline.cc (load_ascii): Likewise. * ov-str-mat.cc (load_ascii): Likewise. * ls-mat-ascii.cc (get_mat_data_input_line): Likewise. * ls-oct-ascii.cc (extract_keyword, read_ascii_data): Likewise. * ls-oct-ascii.h (extract_keyword): Likewise. 2009-03-09 John W. Eaton * graphics.h.in (OCTAVE_DEFAULT_FONTNAME): New macro, defaults to "*". (axes::properties, text::properties): Use it to set default fontname. * graphics.cc (axes::properties::set_defaults): Likewise. 2009-03-09 Rafael Laboissiere * Makefile.in (maintainer-clean): Remove y.tab.h here. (distclean): Not here. 2009-03-09 Jason Riedy * OPERATORS/op-dm-sm.cc (add_dm_sm): Octave binding for diag + sparse. (sub_dm_sm): Octave binding for diag - sparse. (add_sm_dm): Octave binding for diag + sparse. (sub_sm_dm): Octave binding for diag - sparse. (install_dm_sm_ops): Install above bindings. * OPERATORS/op-dm-scm.cc (add_cdm_sm): Octave binding for diag + sparse. (add_dm_scm): Octave binding for diag + sparse. (add_cdm_scm): Octave binding for diag + sparse. (sub_cdm_sm): Octave binding for diag - sparse. (sub_dm_scm): Octave binding for diag - sparse. (sub_cdm_csm): Octave binding for diag - sparse. (add_sm_cdm): Octave binding for diag + sparse. (add_scm_dm): Octave binding for diag + sparse. (add_scm_cdm): Octave binding for diag + sparse. (sub_sm_cdm): Octave binding for diag - sparse. (sub_scm_dm): Octave binding for diag - sparse. (sub_scm_cdm): Octave binding for diag - sparse. (install_dm_scm_ops): Install above bindings. 2009-03-08 Jason Riedy * sparse-xdiv.h (xleftdiv): Declare overrides for xleftdiv (diagonal, sparse), both real and complex. (xdiv): Declare overrides for xdiv (sparse, diagonal), both real and complex. * sparse-xdiv.cc (do_rightdiv_sm_dm): New template function. Implementation for xdiv (sparse, diagonal). (xdiv): Call do_rightdiv_sm_dm to implement overrides, real and complex. (do_leftdiv_dm_sm): New template function. Implementation for xleftdiv (diagonal, sparse). (xleftdiv): Call do_leftdiv_dm_sm to implement overrides, real and complex. * OPERATORS/op-dm-sm.cc (ldiv_dm_sm): Octave binding for real left division, diagonal into sparse. (div_sm_dm): Octave binding for real right division, sparse by diagonal. (install_dm_sm_ops): Install above bindings. * OPERATORS/op-dm-scm.cc (ldiv_dm_scm): Octave binding for real diagonal \ complex sparse. (ldiv_cdm_sm): Octave binding for complex diagonal \ real sparse. (ldiv_cdm_scm): Octave binding for complex diagonal \ complex sparse. (div_scm_dm): Octave binding for complex sparse / real diagonal. (div_sm_cdm): Octave binding for real sparse / complex diagonal. (div_scm_cdm): Octave binding for complex sparse / complex diagonal. (install_dm_scm_ops): Install above bindings. 2009-03-08 Jason Riedy * OPERATORS/op-dm-scm.cc: New file. Implement multiplication between diagonal matrices (both real and complex) and complex sparse matrices. * OPERATORS/op-dm-sm.cc: New file. Implement multiplication between diagonal matrices and sparse matrices, all real. * Makefile.in (DIAG_OP_XSRC): Add op-dm-sm.cc and op-dm-scm.cc. 2009-03-09 Jaroslav Hajek * data.cc (F__accumarray_sum__): New function. (do_accumarray_sum): New helper template function. 2009-03-07 Jaroslav Hajek * xdiv.cc (mdm_div_impl, dmm_lelftdiv_impl, dmdm_div_impl, dmdm_leftdiv_impl): Optimize. 2009-03-07 John W. Eaton * pr-output.cc (octave_print_internal (std::ostream&, const PermMatrix&, bool, int)): Delete unused variable SCALE. * utils.cc (octave_vsnprintf): Avoid uninitialized variable warning from GCC. * DLD-FUNCTIONS/qz.cc (Fqz): Avoid "maybe clobbered by vfork" warning from GCC. * version.h (OCTAVE_VERSION): Now 3.1.54. (OCTAVE_API_VERSION): Now api-v36. (OCTAVE_RELEASE_DATE): Now 2009-03-07. * octave.cc (verbose_usage): Include --doc-cache-file in option list. 2009-03-06 Jaroslav Hajek * ov.h (octave_value::diag_matrix_value, octave_value::complex_diag_matrix_value, octave_value::float_diag_matrix_value, octave_value::float_complex_diag_matrix_value, octave_value::perm_matrix_value): New methods. * ov-base.cc (octave_base_value::diag_matrix_value, octave_base_value::complex_diag_matrix_value, octave_base_value::float_diag_matrix_value, octave_base_value::float_complex_diag_matrix_value, octave_base_value::perm_matrix_value): New virtual methods. * ov-base.h: Declare them. * ov-base-diag.h (octave_base_diag::diag_matrix_value, octave_base_diag::complex_diag_matrix_value, octave_base_diag::float_diag_matrix_value, octave_base_diag::float_complex_diag_matrix_value, octave_base_diag::perm_matrix_value): Remove declarations. * DLD-FUNCTIONS/inv.cc (Finv): Simplify handling diag & perm matrices. * DLD-FUNCTIONS/pinv.cc (Fpinv): Ditto. * DLD-FUNCTIONS/det.cc (Fdet): Ditto. 2009-03-05 Jaroslav Hajek * ls-hdf5.cc (add_hdf5_data): Handle diag & perm matrices. 2009-03-05 John W. Eaton * pt-cell.cc, pt-cell.h (tree_cell::dup): Now const. * comment-list.cc, comment-list.h (octave_comment_list::dup): Ditto. * pt-arg-list.cc, pt-arg-list.h (tree_argument_list::dup): Ditto. * pt-assign.cc, pt-assign.h (tree_simple_assignment::dup, tree_multi_assignment::dup): Ditto. * pt-binop.cc, pt-binop.h (tree_binary_expression::dup, tree_boolean_expression::dup): Ditto. * pt-cmd.cc, pt-cmd.h (tree_no_op_command::dup, tree_function_def::dup): Ditto. * pt-colon.cc, pt-colon.h (tree_colon_expression::dup): Ditto. * pt-const.cc, pt-const.h (tree_constant::dup): Ditto. * pt-decl.cc, pt-decl.h (tree_decl_elt::dup, tree_decl_init_list::dup, tree_global_command::dup, tree_static_command::dup): Ditto. * pt-except.cc, pt-except.h (tree_try_catch_command::dup, tree_unwind_protect_command::dup): Ditto. * pt-fcn-handle.cc, pt-fcn-handle.h (tree_fcn_handle::dup, tree_anon_fcn_handle::dup): Ditto. * pt-id.cc, pt-id.h (tree_identifier::dup): Ditto. * pt-idx.cc, pt-idx.h (tree_index_expression::dup): Ditto. * pt-jump.cc, pt-jump.h (tree_break_command::dup, tree_continue_command::dup, tree_return_command::dup): Ditto. * pt-loop.cc, pt-loop.h (tree_while_command::dup, tree_do_until_command::dup, tree_simple_for_command::dup, tree_complex_for_command::dup): Ditto. * pt-mat.cc, pt-mat.h (tree_matrix::dup): Ditto. * pt-misc.cc, pt-misc.h (tree_parameter_list::dup, tree_return_list::dup): Ditto. * pt-select.cc, pt-select.h (tree_if_clause::dup, tree_if_command_list::dup, tree_if_command::dup, tree_switch_case::dup, tree_switch_case_list::dup, tree_switch_command::dup): Ditto. * pt-stmt.cc, pt-stmt.h (tree_statement::dup, tree_statement_list::dup): Ditto. * pt-unop.cc, pt-unop.h (tree_prefix_expression::dup, tree_postfix_expression::dup): Ditto. * pt-fcn-handle.h (tree_anon_fcn_handle::parameter_list, tree_anon_fcn_handle::return_list, tree_anon_fcn_handle::body, tree_anon_fcn_handle::scope): Ditto. 2009-03-05 Jason Riedy * ov-base-int.cc (convert_to_str_internal): Replace elt_type with element_type throughout. 2009-03-05 Jaroslav Hajek * DLD-FUNCTIONS/sparse.cc (Fsparse): Handle diagonal and permutation matrices. 2009-03-03 John W. Eaton * ov-struct.cc (octave_struct::save_ascii, octave_struct::save_binary, octave_struct::save_hdf5): Preserve order of structure fields. * ls-mat5.cc (save_mat5_binary_element): Likewise. * symtab.h (symbol_table::do_inherit): Only inherit values for symbols from the donor_scope that already exist in the table. (symbol_table::symbol_record::symbol_record_rep::dup): Now const. (symbol_table::symbol_record::operator=): Decrement rep->count and maybe delete rep. (symbol_table::fcn_info::operator=): Likewise. * pt-fcn-handle.cc: (tree_anon_fcn_handle::dup): Transform tree_anon_fcn_handle objects to tree_constant objects containing octave_fcn_handle objects. New tests. * pt-assign.cc (tree_simple_assignment::rvalue1): Assign result of call to rhs->rvalue1() to an octave_value object, not an octave_value_list object. 2009-03-03 Jaroslav Hajek * oct-stream.h (octave_stream_list::lookup_cache): New member field. (octave_stream_list::octave_stream_list): Initialize it. (octave_stream_list::do_lookup): Use it. (octave_stream_list::clear): Make flush optional. Do physically erase entries from the map. Close files. (octave_stream_list::do_remove): Call clear on "all". Do erase deleted entry from the map. 2009-03-02 John W. Eaton * graphics.cc (Fget, F__get__): Return a column vector of property values, not a row vector. 2009-03-01 John W. Eaton * OPERATORS/op-fcm-fcm.cc (DEFNDASSIGNOP_FN (dbl_assign)): LHS type is float_complex_matrix, not complex_matrix. RHS value function is float_complex_array, not complex_array. 2009-03-01 Jaroslav Hajek * ov-perm.cc (octave_perm_matrix::print_raw): Call octave_print_internal. (octave_perm_matrix::print_raw): Call print_raw. * pr-output.cc (octave_print_internal (...,const DiagMatrix&,...)): Indicate diagonal matrix. (octave_print_internal (...,const ComplexDiagMatrix&,...)): Ditto. (octave_print_internal (...,const PermMatrix&,...)): New function. * pr-output.h: Declare it. 2009-02-27 Jaroslav Hajek * OPERATORS/op-dms-template.cc (gripe_if_zero): New template static function. (dmsdiv, sdmldiv): Call it. 2009-02-26 John W. Eaton * symtab.h (symbol_table::symbol_record::symbol_record_rep::forced): New static constant. (symbol_table::symbol_record::symbol_record_rep::force_variable, symbol_table::symbol_record::force_variable): New functions. (symbol_table::symbol_record::symbol_record_rep::is_forced, symbol_table::symbol_record::symbol_record_rep::mark_forced, symbol_table::symbol_record::symbol_record_rep::unmark_forced, symbol_table::symbol_record::symbol_record_rep::clear_forced, symbol_table::symbol_record::is_forced, symbol_table::symbol_record::mark_forced, symbol_table::symbol_record::clear_forced, symbol_table::symbol_record::unmark_forced): New fucntions. * lex.h, lex.l (force_local_variable): Delete. (handle_identifier): Call symbol_table::force_variable instead of force_local_variable. * parse.y (make_script): Call symbol_table:clear_forced_variables after defining script. (finish_function): Call symbol_table::clear_forced_variables instead of symbol_table::clear_variables. * DLD-FUNCTIONS/chol.cc: Correct spelling of CHOLMOD in tests. * version.h (OCTAVE_VERSION): Now 3.1.53+. (OCTAVE_API_VERSION): Now api-v35+. 2009-02-25 John W. Eaton * version.h (OCTAVE_VERSION): Now 3.1.53. (OCTAVE_API_VERSION): Now api-v35. (OCTAVE_RELEASE_DATE): Now 2009-02-25. (OCTAVE_COPYRIGHT): Update year. * Makefile.in (distclean): Remove tags TAGS y.tab.h y.output yy.lex.c here, not in maintainer-clean target. Also remove parse.output. * DLD-FUNCTIONS/rand.cc: Note that the tests for the old random number generator will fail if using 64-bit indexing. 2009-02-25 Jaroslav Hajek * DLD-FUNCTIONS/lu.cc (maybe_set_triangular): New function. (Flu): Use it. * DLD-FUNCTIONS/qr.cc (maybe_set_triangular): New function. (Fqr): Use it. 2009-02-25 John W. Eaton * DLD-FUNCTIONS/chol.cc: Fix tests for missing cholmod. * input.cc (get_debug_input): Write debugging location info directly to std::cerr instead of calling message. * pt-eval.cc (tree_evaluator::do_breakpoint): Write debugging location info directly to std::cerr, not octave_stdout. * defaults.h.in (OCTAVE_DOC_CACHE_FILE): New macro. * defaults.cc (set_default_doc_cache_file): New function. (install_defaults): Call it. * help.cc (__list_functions__): Simplify * input.cc (get_debug_input): Don't pass arbitrary input to message as a format string. 2009-02-24 John W. Eaton * help.cc, help.h (Vdoc_cache_file): New global variable. (Fdoc_cache_file): New function. * octave.cc (DOC_CACHE_FILE_OPTION): New option tag. (long_opts): Include doc-cache-file in the list. (octave_main): Handle DOC_CACHE_FILE_OPTION. 2009-02-24 Jaroslav Hajek * ov-scalar.h (octave_scalar::int8_scalar_value): New method. (octave_scalar::int16_scalar_value): New method. (octave_scalar::int32_scalar_value): New method. (octave_scalar::int64_scalar_value): New method. (octave_scalar::uint8_scalar_value): New method. (octave_scalar::uint16_scalar_value): New method. (octave_scalar::uint32_scalar_value): New method. (octave_scalar::uint64_scalar_value): New method. * ov-float.h (octave_float_scalar::int8_scalar_value): New method. (octave_float_scalar::int16_scalar_value): New method. (octave_float_scalar::int32_scalar_value): New method. (octave_float_scalar::int64_scalar_value): New method. (octave_float_scalar::uint8_scalar_value): New method. (octave_float_scalar::uint16_scalar_value): New method. (octave_float_scalar::uint32_scalar_value): New method. (octave_float_scalar::uint64_scalar_value): New method. * OPERATORS/op-s-s.cc (scalar_to_float): Remove duplicate conversion. * OPERATORS/op-range.cc (range_to_float_matrix): Ditto. 2009-02-24 John W. Eaton * OPERATORS/op-float-conv.cc: New file. * Makefile.in (FLOAT_OP_XSRC): Add it to the list. (DOUBLE_OP_XSRC): Move op-double-conv.cc here from INTTYPE_OP_XSRC. * ops.h (DEFFLTCONVFN, DEFSTRFLTCONVFN): New macros. 2009-02-23 John W. Eaton * ov-base-sparse.cc (octave_base_sparse::print_raw): Remove extra ")" from output. * DLD-FUNCTIONS/eigs.cc (Feigs): If sigma argument is not a string, try extraction as complex value and check for error instead of inquiring about type first. * pt-eval.cc (tree_evaluator::visit_break_command, tree_evaluator::visit_return_command, tree_evaluator::visit_global_command, tree_evaluator::visit_static_command): Handle breakpoint. (tree_evaluator::visit_simple_for_command, tree_evaluator::visit_complex_for_command): Handle breakpoint once at beginning of loop. (tree_evaluator::visit_if_command_list): Don't call do_breakpoint for else clauses. (tree_evaluator::visit_no_op_command): Handle breakpoint if no-op command is end of function or script. (tree_evaluator::visit_statement): Handle breakpoint for expressions but not commands. (tree_evaluator::visit_while_command, tree_evaluator::visit_do_until_command): Check for breakpoint set on cmd, not expr. (tree_evaluator::visit_do_until_command): Handle breakpoint between check for breaking out of loop and loop control expression. * pt-cmd.h (tree_no_op_command::eof): New data member (tree_no_op_command::tree_no_op_command): Initialize it. (tree_no_op_command::is_end_of_fcn_or_script): New function. * pt-stmt.cc (tree_statement::is_end_of_fcn_or_script): Call is_end_of_fcn_or_script instead of looking at original text of no-op command. * pt-select.h, pt-select.cc (tree_if_command::set_breakpoint, tree_if_command::delete_breakpoint): New functions. (tree_switch_command::set_breakpoint, tree_switch_command::delete_breakpoint): New functions. * pt-stmt.h, pt-stmt.cc (tree_statement::set_breakpoint, tree_statement::delete_breakpoint, tree_statement::is_breakpoint): Delegate real work to cmd or expr. (tree_statement::bp): Delete data member. (tree_statement::tree_statement): Don't initialize bp. (tree_statement::dup): Don't copy bp. * pt.h (tree::line (int), tree:column (int)): New functions. (tree:set_breakpoint, tree::delete_breakpoint): Now virtual. * parse.y (finish_if_command): Also store line and column info for if statement in first element of list. (finish_switch_command): Likewise, for switch. * input.cc (last_debugging_command): New static variable. (octave_gets): Set it here. Don't insert repeated debugging commands in the history list. 2009-02-23 Jaroslav Hajek * DLD-FUNCTIONS/pinv.cc: Support diagonal and permutation matrices. 2008-02-21 David Bateman * OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc, OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc, OPERATORS/op-scm-cs.cc, OPERATORS/op-scm-s.cc, OPERATORS/op-sm-cs.cc, OPERATORS/op-sm-s.cc: Don't perform any narrowing to full matrices. 2009-02-20 Jaroslav Hajek * ov-base-diag.h (octave_base_diag::sqrt): Remove. * ov-re-diag.cc (octave_diag_matrix::sqrt): New method. * ov-re-diag.h: Declare it. * ov-flt-re-diag.cc (octave_float_diag_matrix::sqrt): New method. * ov-flt-re-diag.h: Declare it. * ov-cx-diag.cc (octave_complex_diag_matrix::sqrt): New method. * ov-cx-diag.h: Declare it. * ov-flt-cx-diag.cc (octave_float_complex_diag_matrix::sqrt): New method. * ov-flt-cx-diag.h: Declare it. 2009-02-20 John W. Eaton * dynamic-ld.cc (octave_dynamic_loader::do_load_mex): Clear and reload mex file if it is out of date. Don't check path for file. * pt-bp.cc (tree_breakpoint::visit_octave_user_script, tree_breakpoint::visit_octave_user_function): Don't panic. Call accept on command list if it exists. 2009-02-20 Jaroslav Hajek * ov-base-mat.cc (octave_base_matrix::do_index_op): Correctly compute all-scalar index. * ov-cell.cc (octave_cell::is_sorted, octave_cell::is_sorted_rows): New methods. (octave_cell::octave_cell (const Array&)): New constructor. * ov-cell.h: Declare them. * ov-cell.cc (octave_cell::sort): Create result already with cellstr_cache. * strfns.cc (Fstrcmp): Use special code when dealing with cellstr arrays. 2009-02-20 John W. Eaton * ov-base-mat.cc (octave_base_matrix::assign): Correctly compute all-scalar index. * symbtab.cc (symbol_table::stash_dir_name_for_subfunctions): New function. * symtab.h: Provide decl. * parse.y (load_fcn_from_file): Call it after parsing a function. 2009-02-19 Jaroslav Hajek * ov-cell.h (octave_cell::cellstr_cache): New field. (octave_cell::clear_cellstr_cache, octave_cell::make_cellstr_cache, octave_cell::assign, octave_cell::delete_elements, octave_cell::mex_get_data): New methods. (octave_cell::is_cellstr): Reuse cellstr cache if possible, create if successful. (octave_cell::cellstr_value): Reuse cellstr cache if possible. (octave_cell::subsasgn): Clear cellstr cache. 2009-02-19 Jaroslav Hajek * DLD-FUNCTIONS/lookup.cc (Flookup): Use Array::lookup if possible. Do not compare octave_values directly. Properly check for iscellstr. 2009-02-19 John W. Eaton * data.cc, graphics.cc, help.cc, lex.l, load-path.cc, parse.y: Consistent doc strings for internal functions. 2009-02-18 John W. Eaton * ov.cc (convert_to_octave_idx_type_array): New static function. (octave_value::octave_idx_type_vector_value): New function. * ov.h (octave_value::octave_idx_type_vector_value): Provide decl. * DLD-FUNCTIONS/qr.cc (Fqrdelete, Fqrinsert): Use it to convert octave_value object to array of octave_idx_type values. * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): Likewise. * DLD-FUNCTIONS/time.cc (strptime): Likewise. * DLD-FUNCTIONS/quad.cc (Fquad): Eliminate unnecessary cast. * toplev.cc (run_command_and_return_output): Likewise. * strfns.cc (Fstrvcat): Use octave_idx_type and size_t instead of int as needed. (Fstrcmp, Fstrncmp): Use octave_idx_type instead of int as needed. * DLD-FUNCTIONS/hex2num.cc (Fhex2num, Fnum2hex): Use union to avoid reinterpret_cast and GCC warning. * mex.cc (call_mex): Declare local nargout variable volatile to avoid "maybe clobbered by vfork" warning from GCC. * ov-cx-mat.cc (xabs): Comment out unused static function. * ov-flt-cx-mat.cc (xabs): Ditto. * c-file-ptr-stream.cc (c_file_ptr_buf::seekoff, c_file_ptr_buf::seepos, c_zfile_ptr_buf::seekoff, c_zfile_ptr_buf::seepos): Avoid unused paramter warnings. 2009-02-18 Jaroslav Hajek * data.cc (Fresize): Allow arbitrary number of parameters. Improve documentation. 2009-02-17 Benjamin Lindner * file-io.cc: (Fmkstemp): Use mkstemps if it is available and mkstemp is missing. 2009-02-17 Olaf Till * DLD-FUNCTIONS/lsode.cc, DLD-FUNCTIONS/daspk.cc, DLD-FUNCTIONS/dassl.cc, DLD-FUNCTIONS/dasrt.cc: Documentation fixes. 2009-02-17 Kai Habel * DLD-FUNCTIONS/convhulln.cc (Fconvhulln): Compute convex hull volume and return it as second output. New tests. 2009-02-17 John W. Eaton * ov-fcn.h (octave_function::octave_function): Initialize data members. (octave_function::dispatch_class): No longer virtual. Replace with version from ov-usr-fcn.h. (octave_function::xdispatch_class, octave_function::stash_dispatch_class): Move here from ov-usr-fcn.h. (octave_function::mark_as_private_function, octave_function::is_private_function, octave_function::is_private_function_of_class): New functions. (octave_function::private_function): New data member. * ov-usr-fcn.h (octave_user_function::xdispatch_class, octave_user_function::stash_dispatch_class, octave_user_function::dispatch_class): Delete. * ov-usr-fcn.cc (octave_user_function::octave_user_function): Don't initialize xdispatch_type. * symtab.cc (symbol_table::fcn_info::fcn_info_rep::load_private_function): If private directory is subdirectory of class directory, qmark function as a private directory of the class. * ov-class.cc (octave_class::in_class_method): Also return true for functions that are private to a class. (octave_class::subsasgn): If not in class method, look for subsasgn method. If not found, or if not in a class method, perform default struct-style subscripted indexing. * ov-class.h (octave_class::empty_clone): Preserve fields and class name. * oct-map.h (Octave_map::Octave_map (const string_vector&): New constructor. * ov-class.cc (octave_class::subsref): If indexing directly and result is map, return class object, not simple struct. * symtab.cc (symbol_table::fcn_info::fcn_info_rep::load_private_function): Pass dir_name to load_fcn_from_file. 2009-02-17 Jaroslav Hajek * DLD-FUNCTIONS/data.cc (NATIVE_REDUCTION): Add BOOL_FCN argument. (NATIVE_REDUCTION_1): Check integer overflow flags and possibly gripe. (Fsum): Reflect change. (Fcumsum): USE NATIVE_REDUCTION. * gripes.cc (gripe_native_integer_math_truncated): New function. 2009-02-17 Jaroslav Hajek * DLD-FUNCTIONS/max.cc (Fcummin, Fcummax): Improve inline docs. 2009-02-17 Jaroslav Hajek * DLD-FUNCTIONS/max.cc (MINMAX_DOUBLE_SBODY): New macro. (MINMAX_DOUBLE_BODY): Move part of code to MINMAX_DOUBLE_SBODY. (MINMAX_SINGLE_SBODY): New macro. (MINMAX_SINGLE_BODY): Move part of code to MINMAX_DOUBLE_SBODY. (MINMAX_INT_SBODY): New macro. (MINMAX_INT_BODY): Move part of code to MINMAX_DOUBLE_SBODY. (CUMMINMAX_BODY): New macro. (Fcummin, Fcummax): New DLD functions. 2009-02-17 John W. Eaton * octave.gperf: Eliminate whitespace to allow gperf 2.7.2 to work. * file-io.cc (Ffscanf, Fsscanf): Check error_state after call to octave_stream::scanf. (Ffgetl): Check error state after call to octave_stream::getl. (Ffgets): Check error state after call to octave_stream::gets. * oct-stream.cc (octave_base_stream::do_gets, octave_base_stream::do_scanf): Disallow reading from stdin when running interactively. * toplev.cc (octave_config_info): Add CARBON_LIBS, X11_INCFLAGS, and X11_LIBS to the struct. * oct-conf.h.in (OCTAVE_CONF_CARBON_LIBS, OCTAVE_CONF_X11_INCFLAGS, OCTAVE_CONF_X11_LIBS): New macros. 2009-02-17 Thomas Treichl * Makefile.in (octave$(EXEEXT)): Link with CARBON_LIBS. 2009-02-16 John W. Eaton * lex.l (next_token_can_follow_bin_op): Push all characters read on to buffer stack. * genprops.awk (emit_source): Don't use + to concatenate strings. 2009-02-16 Jaroslav Hajek * data.cc (NATIVE_REDUCTION): Use boolNDArray::any for native bool summation, boolNDArray::sum for double-valued. 2009-02-16 Jaroslav Hajek * ov-base-mat.cc (octave_base_matrix::assign (const octave_value_list&, typename MT::element_type): Fix invalid index. * ov-re-mat.cc (default_numeric_demotion_function): Use float_array_value instead of float_matrix_value. 2009-02-16 John W. Eaton * input.cc (gnu_readline): Use fputs instead of fprintf. 2009-02-15 John W. Eaton * defun.cc, defun-int.h, defun-dld.h (DEFUN_INTERNAL, DEFCONSTFUN_INTERNAL, DEFUNX_INTERNAL, DEFUN_DLD_INTERNAL, DEFUNX_DLD_INTERNAL, install_builtin_function, install_dld_function, install_mex_function): Delete IS_TEXT_FCN arg. Fix all uses. (DEFMD, DEFUN_TEXT): Delete. * mkbuiltins, mkgendoc: Adapt to DEFUN macro changes. * lex.h, lex.l (lexer_flags::at_beginning_of_statement): New data member. Set it as needed in rules. (is_keyword_token): Handle lexer_flags::at_beginning_of_statement. (next_token_can_follow_bin_op, looks_like_command_arg): New functions. (handle_identifier): Use them to determine Don't check is_command_name or is_rawcommand_name. * parse.y (statement): Recognize word_list_cmd here. (expression): Not here. * lex.l (handle_string): Delete arg TEXT_STYLE. (BIN_OP_RETURN, XBIN_OP_RETURN): New arg, BOS. Change all uses. * lex.h, lex.l (lexer_flags::doing_raw_command): Delete data member and all uses. * debug.cc, dirfns.cc, error.cc, input.cc, lex.l, load-path.cc, load-save.cc, oct-hist.cc, ov-class.cc, pager.cc, parse.y, pr-output.cc, sysdep.cc, utils.cc, variables.cc: Replace all uses of DEFCMD with DEFUN. * variables.cc (command_set, rawcommand_set): Delete static variables. (mark_as_command, unmark_command, is_command_name, mark_as_rawcommand, unmark_raw_command, is_rawcommand_name): Delete. (Fmark_as_command, Funmark_command, Fiscommand, Fmark_as_rawcommand, Funmark_rawcommand, Fisrawcommand): Convert to .m files and move to scripts/deprecated. * variables.h (mark_as_command, is_command_name, is_marked_as_rawcommand, mark_as_rawcommand, unmark_rawcommand, is_rawcommand_name): Delete decls. * lex.h, lex.l (lexer_flags.looking_at_object_index): Now a std::list object instead of an int. Push TRUE to list at start of object index. Push FALSE at beginning of matrix list. Pop value at end of object index or matrix list. (lexer_flags.looking_for_object_index): New data member. Set it as needed in rules. (inside_any_object_index): New function. * parse.y (begin_obj_idx, cancel_obj_idx): Delete non-terminals and all uses. 2009-02-13 Ben Abbott * graphics.h.in (class axes::properties): Initialize ticklength. * graphics.cc (default_axes_ticklength): New function. 2009-02-13 John W. Eaton * oct-stream.cc (octave_base_stream::do_gets): Handle CRLF and CR. * toplev.cc (do_octave_atexit): Only save history if Vsaving_history is true. 2009-02-12 John W. Eaton * data.cc, ov-base-diag.h, ov-base-mat.h, ov-base-scalar.h, ov-base-sparse.h, ov-base.cc, ov-base.h, ov-perm.h, ov-range.h, ov.h: Rename internal issorted and issorted_rows functions to is_sorted and is_sorted_rows. * ov-base-diag.h, ov-base-mat.h, ov-base-scalar.h, ov-base.h, ov-cell.h, ov-perm.h, ov-range.h, ov.h, data.cc, ov-base.cc, ov-cell.cc: Rename all uses of sortrows_idx to sort_rows_idx. * TEMPLATE-INST/Array-tc.cc: Don't instantiate sort functions for Arrays of octave_value objects. (octave_sort::ascending_compare, octave_sort::descending_compare): Delete. * ov.h (octave_value::cellstr_value): New function. * ov-base.cc, ov-base.h (octave_base_value::cellstr_value): New function. * ov-cell.h (octave_cell::cellstr_value, octave_cell::sort, octave_cell::sortrows_idx): New functions * Cell.h, Cell.cc (Cell::Cell (Array)): New constructor. * TEMPLATE-INST/Array-tc.cc: Undo previous change. (octave_sort::ascending_compare, octave_sort::descending_compare): Pass args by const reference instead of value. * version.h (OCTAVE_VERSION): Now 3.1.52+. (OCTAVE_API_VERSION): Now api-v34+. * TEMPLATE-INST/Array-tc.cc (octave_sort::ascending_compare, octave_sort::descending_compare): Delete unused template specializations. Use NO_INSTANTIATE_ARRAY_SORT instead of INSTANTIATE_ARRAY_SORT for octave_values. 2009-02-11 Thomas Treichl * gl-render.h: Use HAVE_FRAMEWORK_OPENGL. * gl-render.cc (opengl_tesselator, opengl_renderer::draw, opengl_renderer::init_marker): Use HAVE_FRAMEWORK_OPENGL. 2009-02-11 Jaroslav Hajek * ov.h (octave_value::issorted, octave_value::sortrows_idx, octave_value::issorted_rows): New methods. * ov.cc (octave_base_value::issorted, octave_base_value::sortrows_idx, octave_base_value::issorted_rows): New methods. * ov.cc: Declare them. * ov-base-mat.h (octave_base_matrix::issorted, octave_base_matrix::sortrows_idx, octave_base_matrix::issorted_rows): New methods. * ov-base-diag.h (octave_base_diag::issorted, octave_base_diag::sortrows_idx, octave_base_diag::issorted_rows): New methods. * ov-perm.h (octave_perm_matrix::issorted, octave_perm_matrix::sortrows_idx, octave_perm_matrix::issorted_rows): New methods. * ov-range.h (octave_range::issorted, octave_range::sortrows_idx, octave_range::issorted_rows): New methods. * data.cc (F__sortrows_idx__, Fissorted): New defuns. 2009-02-11 John W. Eaton * toplev.cc (octave_config_info): Add octetcdir to the struct. * defaults.h.in (OCTAVE_OCTETCDIR): New macro. 2009-02-10 Jaroslav Hajek * DLD-FUNCTIONS/__pchip_deriv__.cc (F__pchip_deriv__): Add support for computing pchip derivatives along rows of matrix. Eliminate redundant copying by using const args where appropriate. 2009-02-09 John W. Eaton * version.h (OCTAVE_VERSION): Now 3.1.52. (OCTAVE_RELEASE_DATE): Now 2009-02-09. (OCTAVE_COPYRIGHT): Update year. * load-path.cc (dir_info::update, dir_info::initialize): Likewise, to allow some functionality if getcwd fails. * toplev.cc (main_loop): Also catch octave_execution_exception. * DLD-FUNCTIONS/dispatch.cc: Comment out troublesome tests. * DLD-FUNCTIONS/eigs.cc: Increase tolerance to 1e-11 on all tests. * lex.l (lexical_feedback::looking_at_decl_list): New data member. * lex.l (lexical_feedback::init): Initialize it. (handle_identifier): Also force local variable if looking_at_decl_list. * parse.y (parsing_decl_list): New non-terminal. (declaration): Use it. Set lexer_flags.looking_at_decl_list to false after parsing the declaration. 2009-02-09 Jaroslav Hajek * TEMPLATE-INST/Array-tc.cc: Reflect changes in octave_sort. 2009-02-08 John W. Eaton * octave.cc (initialize_pathsearch): Delete. (octave_main): Don't call initialize_pathsearch. 2009-02-07 John W. Eaton * parse.y (eval_string): Use the one true evaluator. 2009-02-06 John W. Eaton * Makefile.in (INCLUDES): Include oct-hdf5.h in the list. * Makefile.in (oct-gperf.h): Don't use pipeline to process gperf output. 2009-02-05 John W. Eaton * symtab.cc (symbol_table::fcn_info::cn_info_rep::xfind): New function. (symbol_table::fcn_info::cn_info_rep::find): Use it to avoid recursive call. * graphics.cc (Fdrawnow): Return after errors. Don't strip trailing directory separator from name used in call to file_stat. * DLD-FUNCTIONS/eigs.cc (Feigs): Avoid warnings about ambiguous else. Style fixes. Return after errors. 2009-02-05 Jaroslav Hajek * oct-map.cc (Octave_map::index): Optimize. 2009-02-05 Jaroslav Hajek * OPERATORS/op-cm-cs.cc: Use scalar_value in scalar-to-matrix indexed assignments. * OPERATORS/op-fcm-fcs.cc: Ditto. * OPERATORS/op-fm-fs.cc: Ditto. * OPERATORS/op-m-s.cc: Ditto. * OPERATORS/op-int.h (OCTAVE_MS_INT_ASSIGN_OPS): Use homogeneous integer scalar-to-matrix assignment. (OCTAVE_MM_INT_ASSIGN_OPS): Use homogeneous integer matrix-to-matrix assignment. * Cell.h (Cell::index): Remove direct idx_vector overloads. (Cell::assign): Remove direct idx_vector overloads. (Cell::delete_elements): Remove direct idx_vector overloads. * Cell.cc (Cell::index (const octave_value_list&)): Call ArrayN::index. * oct-map.h (Octave_map::index): Remove direct idx_vector overloads. * oct-map.cc (Octave_map::index): Ditto. * ov-base-mat.cc (octave_base_mat::do_index_op): Optimize scalar indexing case. (octave_base_mat::assign (const octave_value_list&, const MT&)): Specialize variable argument number. (octave_base_mat::assign (const octave_value_list&, const typename MT::element_type&)): New method overload with optimized scalar indexing case. * ov-cell.cc (octave_base_matrix::do_index_op, octave_base_matrix::assign, octave_base_matrix::delete_elements): Specialize. (octave_cell::assign (const_octave_value_list, const octave_value&): Delete method. * ov-cell.h: Reflect change. * ov-cx-mat.cc (octave_complex_matrix::assign): Delete overloads. * ov-cx-mat.h: Reflect changes. * ov-flt-cx-mat.cc (octave_float_complex_matrix::assign): Delete overloads. * ov-flt-cx-mat.h: Reflect changes. * ov-list.cc (octave_list::do_index_op): Simplify. * ov-struct.cc (octave_struct::do_index_op): Simplify. * pt-eval.cc (tree_evaluator::visit_simple_for_command): Optimize traversing a row vector. 2009-02-05 John W. Eaton * variables.cc (Vignore_function_time_stamp): Eliminate unused static variable. * debug.cc (get_file_line): Override default precedence in logical expression. * ov-null-mat.cc (default_null_str_numeric_conversion_function, default_null_sq_str_numeric_conversion_function, default_null_matrix_numeric_conversion_function): Avoid unused variable warning. * ov-flt-re-diag.cc (octave_float_diag_matrix::save_binary): Avoid unused parameter warning. * pt-eval.cc (tree_evaluator::visit_if_clause): Likewise. * ov-typeinfo.cc (octave_value_typeinfo::do_register_type): Likewise. * ov-base.cc (octave_base_value::subsref (const std::string&, const std::list&, bool): Likewise. * ov-flt-cx-diag.cc (octave_float_complex_diag_matrix::save_binary): Likewise. * oct-hdf5.h: New file. * ls-hdf5.cc, ov-base.h, ov.h: Include oct-hdf5.h instead of hdf5.h. * ls-hdf5.h: Include oct-hdf5.h. * load-save.cc: Include ls-hdf5.h instead of hdf5.h. * ov-base-sparse.cc, load-save.cc: Don't protect #include "ls-hdf5.h" with #ifdef. 2009-02-04 Kai Habel * gl-render.cc (opengl_renderer::draw (surface::properties)): Normalize surface normals. Correct calculation of diffuse lighting. * gl-render.cc (opengl_renderer::draw (patch::properties)): Correct calculation of diffuse lighting. 2009-02-04 John W. Eaton * help.cc (do_which): If NAME is not in the symbol table, look for a function file in the load path. (raw_help_from_file): Unwind-protect and set reading_script_file. * pt-loop.h, pt-loop.cc (evaluating_looping_command): Delete global variable and all uses. * parse.y, parse.h (evaluating_function_body): Delete global variable and all uses. (make_break_command, make_continue_command, make_return_command): Use tree_evaluator::in_fcn_or_script_body and tree_evaluator::in_loop_command instead of evaluating_function_body and evaluating_looping_command. * pt-eval.h (tree_evaluator::in_function_or_script_body): Delete member variable and all uses. (tree_evaluator::reset): Delete function and all uses. * pt-eval.cc, pt-eval.h (tree_evaluator::in_fcn_or_script_body, tree_evaluator::in_loop_command): New static variables. (tree_evaluator::visit_simple_for_command, tree_evaluator::visit_complex_for_command, tree_evaluator::visit_while_command, tree_evaluator::visit_do_until_command): Unwind-protect and set tree_evaluator::in_loop_command instead of evaluating_looping_command. (tree_evaluator::visit_statement): Only call echo_code if evaluating function or script and (Vecho_executing_commands & ECHO_FUNCTIONS). Use tree_evaluator::in_fcn_or_script_body instead of evaluating_function_body. * ov-usr-fcn.cc (octave_user_script::do_multi_index_op): octave_user_function::do_multi_index_op): Unwind-protect and set tree_evaluator::in_fcn_or_script_body. * pt-stmt.cc, pt-stmt.h (tree_statement::echo_code): Rename from maybe_echo_code. Simplify. 2009-02-04 Jaroslav Hajek * pt-loop.h (tree_simple_for_command::do_for_loop_once, tree_complex_for_command::do_for_loop_once): Remove obsolete decls. * pt-loop.cc (quit_loop_now): Remove obsolete method. * pt-eval.cc (DO_ND_LOOP): Delete macro. (tree_evaluator::visit_simple_for_command): Use the generic do_index_op for iterating matrices. 2009-02-04 John W. Eaton New evaluator and debugger derived from tree-walker class. * pt-eval.h, pt-eval.cc: New files. Parse tree evaluator code adapted from eval member functions in classes derived from tree_command. * Makefile.in (PT_INCLUDES, PT_SRC): Add them to the lists * pt-cmd.cc (tree_function_def::eval): Delete. * pt-cmd.h: Delete decl. (tree_command::eval): Delete pure virtual function. (tree_no_op_command::eval): Delete. (tree_function_def::function): Return octave_value, instead of pointer to octave_function. Change all uses. * pt-except.cc (do_catch_code, tree_try_catch_command::eval, do_unwind_protect_cleanup_code, tree_unwind_protect_command::eval): Delete. * pt-except.h: Delete decls. * pt-jump.cc (tree_break_command::eval, tree_return_command::eval, tree_continue_command::eval): Delete. * pt-jump.h: Delete decls. * pt-loop.cc (DO_ND_LOOP): Delete macro. (tree_while_command::eval, tree_do_until_command::eval, tree_simple_for_command::do_for_loop_once, tree_simple_for_command::eval, tree_complex_for_command::do_for_loop_once, tree_complex_for_command::eval): * pt-loop.h: Delete decls. * pt-select.cc (tree_if_clause::eval, tree_if_command_list::eval, tree_if_command::eval, tree_switch_case::eval, tree_switch_case_list::eval, tree_switch_command::eval): Delete. * pt-select.h: Delete decls. (class tree_if_clause, class tree_switch_case): Derive from tree. Handle line and column in constructors. * pt-stmt.cc (tree_statement::eval): Delete * pt-stmt.h: Delete decl. * pt-stmt.cc, pt-stmt.h (tree_statement::is_command, tree_statement::is_expression, tree_statement::line, tree_statement::column): Now const. * pt-stmt.cc (tree_statement::set_print_flag, tree_statement::is_end_of_fcn_or_script): New functions. * pt-stmt.h: Provide decl. (set_breakpoint, delete_breakpoint, is_breakpoint): New function. (bp): New member variable. (print_result): Delete member variable. (tree_statement_list::anon_function_body): New member variable. (tree_statement_list::mark_as_anon_function_body, tree_statement_list::is_anon_function_body, tree_statement_list::is_script_body): New functions. * pt-decl.cc (tree_decl_init_list::eval, tree_decl_command::accept, tree_global_command::do_init, tree_global_command::eval, tree_static_command::do_init, tree_static_command::eval): Delete. * pt-decl.h: Delete decls. (tree_decl_elt::eval_fcn): Delete typedef. * pt-decl.cc (tree_global_command::accept, tree_static_command::accept): New functions. * pt-stmt.cc (tree_statement::print_result): Move here from pt-stmt.h. Return true if expr is printable. * ov-base.cc (Vsilent_functions): Delete. (octave_base_value::print_with_name): Don't check evaluating_function_body && Vsilent_functions here. * ov-class.cc (octave_class::print_with_name): Likewise. * ov-base.h (Vsilent_functions): Delete decl. * pt-eval.cc (Fsilent_functions): Move here from ov-base.cc. (Vsilent_functions): New static variable. * sighandlers.cc (user_abort): Set tree_evaluator::debug_mode here. * pt.h (tree::bp): Rename from tree::break_point. (tree::set_breakpoint, tree::delete_breakpoint, tree::is_breakpoint): No longer virtual. * input.cc (get_debug_input): Use current_evaluator and tree-walker to evaluate command. * ov-usr-fcn.cc (octave_user_script::do_multi_index_op): Likewise. * toplev.cc (main_loop): Likewise. * parse.y (eval_string): * input.h, input.cc (Vdebugging_current_line): Delete. (get_debug_input): Use tree_evaluator::debug_line instead of Vdebugging_current_line. * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Handle inline functions and anonymous functions as single expressions. * parse.y (eval_string): Likewise. * parse.y (make_do_until_command): Rename first argument from do_tok to until_tok. (loop_command): Pass UNTIL token instead of DO token to make_do_until_command. (make_elseif_clause): New arg, elseif_tok. Pass line and column info to tree_if_clause constructor. (elseif_clause): Pass ELSEIF token to make_elseif_clause. (make_switch_case): New arg, case_tok. Pass line and column info to tree_switch_case constructor. (switch_case): Pass CASE token to make_switch_case. (make_script): New arg end_script. Append it to cmds. (script): Create no-op command for end of script and pass it to make_script. (start_function): New arg, end_function. Append it to body. (function2): Pass end_function to start_function. (make_end): New function. (function_end): Declare as tree_statement_type. Create no-op command for end of script. (make_anon_fcn_handle): Mark body as anonymous function. (set_stmt_print_flag): Set print flag for all separator types * parse.y (fold (tree_binary_expression*), fold (tree_unary_expression *), finish_colon_expression, finish_matrix): Call rvalue1 instead of rvalue. Stash line number in new tree_constant object. * debug.h (bp_table::have_breakpoints): New static function. (bp_table::do_have_breakpoints): New member function. * debug.cc (bp_table::do_add_breakpoint, bp_table::do_remove_breakpoint, bp_table::do_remove_all_breakpoints_in_file, bp_table::do_remove_all_breakpoints): Call bp_table::have_breakpoints to set tree_evaluator::debug_mode. (Fdbnext): Delete function. Alias to dbstep. (Fdbquit, Fdbcont): Set tree_evaluator::dbstep_flag to zero. (Fdbstep): Rewrite to use tree_evaluator::dbstep_flag instead of tree::break_next, tree::last_line, tree::break_function, and tree::last_break_function. (Fdbwhere): Use tree_evaluator::debug_line and tree_evaluator::debug_column to get current line and column info. Don't print column if it is less than zero. * pt.cc, pt.h (tree::break_next, tree::last_line, tree::last_break_function, tree::break_function, tree::break_statement): Delete. * pt-bp.cc (tree_breakpoint::visit_global_command, tree_breakpoint::visit_static_command, tree_breakpoint::take_action (tree_statement&)): New functions. * pt-bp.h: Provide decls. * pt-bp.h (tree_walker::visit_global_command, tree_walker::visit_static_command): New pure virtual functions. (tree_walker::visit_decl_command): Delete. * pt-bp.cc (tree_breakpoint::visit_decl_command): Delete. * pt-bp.h: Delete decl. (MAYBE_DO_BREAKPOINT): Delete macro and all uses. * pt-bp.cc (tree_breakpoint::visit_no_op_command): Do nothing. (tree_breakpoint::visit_argument_list, tree_breakpoint::visit_binary_expression, tree_breakpoint::visit_colon_expression, tree_breakpoint::visit_decl_elt, tree_breakpoint::visit_decl_init_list, tree_breakpoint::visit_octave_user_script, tree_breakpoint::visit_octave_user_function, tree_breakpoint::visit_octave_user_function_header, tree_breakpoint::visit_octave_user_function_trailer, tree_breakpoint::visit_identifier, tree_breakpoint::visit_index_expression, tree_breakpoint::visit_matrix, tree_breakpoint::visit_cell, tree_breakpoint::visit_multi_assignment, tree_breakpoint::visit_anon_fcn_handle, tree_breakpoint::visit_constant, tree_breakpoint::visit_fcn_handle, tree_breakpoint::visit_parameter_list, tree_breakpoint::visit_postfix_expression, tree_breakpoint::visit_prefix_expression, tree_breakpoint::visit_return_list, tree_breakpoint::visit_simple_assignment): Call panic_impossible since breakpoints aren't set on expressions. (tree_breakpoint::visit_if_clause): Fold into visit_if_command_list. (tree_breakpoint::visit_switch_case): Fold into visit_switch_case_list. (tree_breakpoint::visit_try_catch_command, tree_breakpoint::visit_unwind_protect_command): Don't set breakpoint on command itself, the the statements it contains. (tree_breakpoint::visit_global_command, tree_breakpoint::visit_static_command): Call do_decl_command to do actual work. (tree_breakpoint::visit_while_command, tree_breakpoint::visit_do_until_command, tree_breakpoint::visit_simple_for_command, tree_breakpoint::visit_complex_for_command, tree_breakpoint::visit_statement, tree_breakpoint::visit_statement_list, tree_breakpoint::visit_switch_case_list): Set breakpoints at appropriate places. * pt-pr-code.h, pt-pr-code.cc (tree_print_code::visit_global_command, tree_print_code::visit_static_command, tree_print_code::do_decl_command): New functions. (tree_print_code::visit_decl_command): Delete. * pt-check.h, pt-check.cc (tree_checker::visit_global_command, tree_checker::visit_static_command, tree_checker::do_decl_command): New functions. (tree_checker::visit_decl_command): Delete. * pt-select.cc (tree_switch_case::label_matches): Call rvalue1 instead of rvalue. * pt-exp.h, pt-exp.cc (tree_expression::rvalue1): New function. (tree_expression::rvalue (void)): Delete. (tree_expression::is_logically_true): Call rvalue1 instead of rvalue. * pt-fcn-handle.h, pt-fcn-handle.cc (tree_fcn_handle::rvalue1, tree_anon_fcn_handle::rvalue1): New functions. (tree_fcn_handle:rvalue (void), tree_anon_fcn_handle::rvalue1 (void)): Delete. (tree_fcn_handle::rvalue (int), tree_anon_fcn_handle_rvalue (int)): Call rvalue1 instead of rvalue. * pt-idx.h, pt-idx.cc (tree_index_expression::rvalue1): New function. (tree_index_expression::rvalue (void)): Delete. (tree_index_expression::get_struct_index, tree_index_expression::rvalue (int)): Call rvalue1 instead of rvalue. * pt-mat.h, pt-mat.cc (tree_matrix::rvalue1): New function. (tree_matrix::rvalue (void)): Delete. (tm_row_const::tm_row_const_rep::init, tree_matrix::rvalue (int)): Call rvalue1 instead of rvalue. * pt-misc.cc (tree_parameter_list::convert_to_const_vector): Call rvalue1 instead of rvalue. * pt-arg-list.cc (tree_argument_list::convert_to_const_vector): Likewise. * pt-unop.h, pt-unop.cc (tree_prefix_expression::rvalue1, tree_postfix_expression::rvalue1): New functions. (tree_prefix_expression::rvalue (void), tree_postfix_expression::rvalue (void)): Delete. (tree_prefix_expression::rvalue (int), tree_postfix_expression::rvalue (int)): Call rvalue1 instead of rvalue. * pt-id.h, pt-id.cc (tree_identifier::rvalue1): New function. (tree_identifier::rvalue (void)): Delete. * pt-assign.h, pt-assign.cc (tree_simple_assignment::rvalue1, tree_multi_assignment::rvalue1): New functions. (tree_simple_assignment::rvalue (void), tree_multi_assignment::rvalue (void): Delete. (tree_simple_assignment::rvalue (int)): Call rvalue1 instead of rvalue. * pt-binop.h, pt-binop.cc (tree_binary_expression::rvalue1, tree_boolean_expression::rvalue1): New functions. (tree_binary_expression::rvalue (void), tree_boolean_expression::rvalue (void)): Delete. (tree_binary_expression::rvalue (int), tree_boolean_expression::rvalue (int)): Call rvalue1 instead of rvalue. * pt-cbinop.h, pt-cbinop.cc (tree_compound_binary_expression::rvalue1): New function. (tree_compound_binary_expression::rvalue (void)): Delete. * pt-cell.h, pt-cell.cc (tree_cell::rvalue1): New function. (tree_cell::rvalue (void)): Delete. (tree_cell::rvalue (int)): Call rvalue1 instead of rvalue. * pt-colon.h, pt-colon.cc (tree_colon_expression::rvalue1): New function. (tree_colon_expression::rvalue (void)): Delete. (tree_colon_expression::rvalue (int)): Call rvalue1 instead of rvalue. * pt-const.h, pt-const.cc (tree_constant::rvalue1): New function. (tree_constant::rvalue (void)): Delete. (tree_constant::rvalue (int)): Call rvalue1 instead of rvalue. * pt-decl.h, pt-decl.cc (tree_decl_elt::ravlue1): New function. (tree_decl_elt::ravlue (void)): Delete. (tree_decl_elt::eval): Call rvalue1 instead of rvalue. 2009-02-03 Jaroslav Hajek * TEMPLATE-INST/Array-tc.cc: Replace vec_index by pointers. 2009-02-02 Jaroslav Hajek * ov-re-mat.cc (octave_matrix::abs, octave_matrix::real, octave_matrix::imag, octave_matrix::conj): Use special code. * ov-flt-re-mat.cc (octave_float_matrix::abs, octave_float_matrix::real, octave_float_matrix::imag, octave_float_matrix::conj): Use special code. * ov-cx-mat.cc (octave_complex_matrix::abs, octave_complex_matrix::real, octave_complex_matrix::imag, octave_complex_matrix::conj): Use special code. * ov-flt-cx-mat.cc (octave_float_complex_matrix::abs, octave_float_complex_matrix::real, octave_float_complex_matrix::imag, octave_float_complex_matrix::conj): Use special code. 2009-01-30 Jaroslav Hajek * DLD-FUNCTIONS/lookup.cc (Flookup): Add missing check. 2009-01-29 John W. Eaton * pt-stmt.cc (tree_statement::eval): Check in_function_or_script_body instead of symbol_table::at_top_level () to decide whether to call octave_call_stack::set_statement. * graphics.cc (properties::set_defaults): Also set horizontalalignment, verticalalignmnt, and rotation properties for new label objects here. * ov-base-scalar.cc (octave_base_scalar::is_true (void) const): Error if scalar is NaN. * ov-base-mat.cc (octave_base_matrix::is_true (void) const): Likewise, if any element of matrix is NaN. * ov-cell.cc (octave_cell::is_true): New function. * Cell.h (Cell::any_element_is_nan): New function. 2009-01-29 Jaroslav Hajek * pr-output.cc: (void octave_print_internal (..., const DiagMatrix& m,...), (void octave_print_internal (..., const ComplexDiagMatrix& m,...), (void octave_print_internal (..., const FloatDiagMatrix& m,...), (void octave_print_internal (..., const FloatComplexDiagMatrix& m,...)): New functions. * pr-output.h: Declare them. * ov-base-diag.cc (octave_base_diag::print_raw): Call octave_print_internal. 2009-01-28 John W. Eaton * Makefile.in (install, uninstall): Handle SHLLIBPRE and SHLBINPRE library prefixes. From Marco Atzeri . 2008-01-28 David Bateman * DLD-FUNCTIONS/regexp.cc (octregexp_list): Don't break for zero length match, but rather advance the index by one character and try again. 2009-01-28 Jaroslav Hajek * DLD-FUNCTIONS/lookup.cc (Flookup): Fix doc string. 2009-01-27 John W. Eaton * load-path.cc (Fcommand_line_path): Rename from Fcommandlinepath. 2009-01-27 Ben Abbott * graphics.cc (convert_position): Handle character units. (default_axes_tick, default_figure_papersize, default_figure_paperposition): New functions. * graphics.h.in (class figure::properties): Use them to initialize papersize, paperposition, xtick, ytick, and ztick properties. 2009-01-27 Jaroslav Hajek * DLD-FUNCTIONS/qr.cc (Fqr): Treat empty matrices correctly. 2009-01-26 Thomas Treichl * display.cc (display_info::init): Use double instead of CGFloat. Use HAVE_FRAMEWORK_CARBON instead of OCTAVE_USE_OS_X_API. 2009-01-26 John W. Eaton * load-path.cc (load_path::do_find_fcn): Handle @foo/bar. 2009-01-24 Jaroslav Hajek * pt-cell.cc (tree_cell::rvalue): Optimize the single row case. 2009-01-24 Jaroslav Hajek * ov-struct.cc (octave_struct::subsasgn): Reshape cs-list on rhs according to the index expression. * ov-cell.cc (octave_cell::subsasgn): Ditto. 2008-12-25 Ben Abbott * load-path.cc (Fcommandlinepath): New function. * load-path.h (load_path::get_command_line_path, load_path::do_get_command_line_path): New functions. 2009-01-24 Ben Abbott * DLD-FUNCTIONS/eigs.cc: eigs.cc: skip tests if ARPACK is missing. 2009-01-25 Søren Hauberg * help.cc (do_get_help_text, raw_help_from_symbol_table): new output to flag the a function is found but not documented. 2009-01-25 Søren Hauberg * help.cc (raw_help_from_file): No longer search for files called 'Contents.m', as this is moved to 'script/help.m'. 2009-01-23 John W. Eaton * toplev.cc (octave_call_stack::do_goto_caller_frame): Also allow caller frame to be base frame, not just user code. 2009-01-23 Jaroslav Hajek * gripes.cc (gripe_indexed_cs_list, gripe_invalid_inquiry_subscript): New functions. * gripes.h: Declare them. * pt-idx.cc: Remove definitions of the above funcs. * ov-cell.cc (octave_cell::subsref): Declare constants as const. (octave_cell::subsasgn): Remove dead branch, declare constants as const. (octave_cell::list_value): Optimize. * ov-struct.cc (octave_struct::subsref): Declare constants as const. (octave_struct::subsasgn): Remove dead branch, declare constants as const. * ov-cs-list.cc (octave_cs_list::octave_cs_list (const Cell&)): Optimize. * oct-obj.cc (octave_value_list::octave_value_list (const std::list&)): New constructor. * oct-obj.h: Declare it. * pt-arg-list.cc (convert_to_const_vector): Optimize. * symtab.cc (symbol_table::fcn_info::fcn_info_rep::find): Use const reference to avoid redundant copy. * ov-usr-fcn.cc (octave_user_function::bind_automatic_vars): Optimize. (octave_user_function::octave_all_va_args): Optimize. 2009-01-22 Jaroslav Hajek * Cell.h (Cell::Cell (octave_value_list)): Only declare. (Cell::index (*)): Change resize_ok type to bool. * Cell.cc (Cell::Cell (octave_value_list)): Redefine. * oct-obj.h, oct-obj.cc: Change octave_value_list::data to Cell variable, reflect changes. 2009-01-22 John W. Eaton * help.cc (do_which (std::ostream&, const std::string&), Fwhich): Delete. (do_which (const std::string&, std::string&), F__which__): New functions. * do_which (const std::string&): Call do_which (const std::string&, std::string&) to do the work. 2009-01-22 Søren Hauberg * defun-int.h (print_usage): No longer mark as deprecated. * defun.cc (print_usage): Simply call feval to execute print_usage.m. * help.cc (additional_help_message, display_names_from_help_list, display_symtab_names, simple_help, try_info, help_from_info, display_help_text, display_usage_text, raw_help_from_list, help_from_list, help_from_symbol_table, help_from_file, builtin_help, Fhelp, display_file, do_type, Ftype, first_help_sentence, print_lookfor, Flookfor): Delete. (looks_like_html, raw_help_from_map, raw_help, do_get_help_text, F__operators__, F__keywords__, F__builtins__, file_is_in_dir, F__list_functions__): New functions. (pair_type, map_iter): New typedefs. (operators, keywords): Use pair_type for elements of list. (names): Use map for (keyword, doc) lists. (make_name_list): Sprinkle with const. * help.h (display_help_text, display_usage_text, additional_help_message): Delete decls. 2009-01-22 John W. Eaton * toplev.cc (octave_config_info): Check OCTAVEUSE_OS_X_API instead of __APPLE__ && __MACH__. * display.cc (display_info::init): Get info for Windows and OS X systems. 2009-01-22 Jaroslav Hajek * pt-idx.cc (tree_index_expression::lvalue): Correct tmpi when seeing a plain struct component. * ov-struct.cc (octave_struct::subsasgn): Use proper type substr in empty_conv. 2009-01-22 Jaroslav Hajek * DLD-FUNCTIONS/qr.cc: Remove HAVE_QRUPDATE check. * DLD-FUNCTIONS/chol.cc: Ditto. 2009-01-21 John W. Eaton * Makefile.in (display.o): Add X11_INCFLAGS to CPPFLAGS. (octave$(EXEEXT)): Link with X11_LIBS. * display.h, display.cc: New files. * graphics.cc (default_screendepth, default_screensize, default_screenpixelsperinch): New functions. * graphics.h.in (class root_figure::properties): New property, screendepth. Use default_screensize to initialize screensize property. Use default_screenpixelsperinch to initialize screenpixelsperinch property. * graphics.cc (properties::init): Set default xlabel, ylabel, zlabel, and title properties that differ from default text properties. 2009-01-21 Jaroslav Hajek * OPERATORS/op-range.cc: Define & register range-scalar ops. 2009-01-21 Jaroslav Hajek * ov.h (octave_value::subsref (..., bool auto_add)): New method. (octave_value::next_subsref (bool auto_add, ...)): New method. * ov.cc (octave_value::next_subsref (bool auto_add, ...)): New method. * ov-base.h (octave_base_value::subsref (..., bool auto_add)): New virtual method. * ov-base.cc (octave_base_value::subsref (..., bool auto_add)): New virtual method. * ov-cell.cc (octave_cell::subsref (..., bool auto_add)): New virtual method. * ov-cell.h (octave_cell::subsref (..., bool auto_add)): Declare it. * ov-struct.cc (octave_struct::subsref (..., bool auto_add)): New virtual method. (octave_struct::subsref (const std::string& type, const std::list& idx)): Do not allow resizing. * ov-struct.h (octave_struct::subsref (..., bool auto_add)): Declare it. * ov-struct.cc (octave_struct::dotref (..., bool auto_add)): New virtual method. * ov-struct.h (octave_struct::dotref (..., bool auto_add)): Declare it. * pt-idx.cc (tree_index_expression::rvalue): Do not reevaluate already evaluated part of the index chain. (tree_index_expression::rvalue): Do not reevaluate already evaluated part of the index chain. Do not actually perform trailing indexing. Do not allow indexing cs-lists. 2009-01-20 John W. Eaton * file-io.cc (Ffstat): New function. 2009-01-17 Jaroslav Hajek * DLD-FUNCTIONS/qr.cc (Fqrupdate, Fqrinsert, Fqrdelete, Fqrshift): Reflect changes in liboctave. * DLD-FUNCTIONS/chol.cc (Fcholupdate, Fcholinsert): Reflect changes in liboctave. 2009-01-19 Jaroslav Hajek * ov.h (octave_value::make_unique (int)): New method. * oct-obj.h (octave_value_list::octave_value_list (const Cell&)): New constructor. * ov-cell.cc (octave_cell::subsasgn): Allow composed {} indexing in multi-assignments. Optimize. * ov-struct.cc (octave_struct::subsasgn): Correct composed {} indexing in multi-assignments. Optimize & fix bugs. * pt-idx.cc (tree_index_expression::lvalue): Rewrite to allow specifying cs-list anywhere in index chain, be more robust. 2009-01-19 John W. Eaton * lex.l (grab_comment_block): If not reading input from a file, bail out at first newline inside a comment. * lex.l (lexer_debug_flag): New static variable. (F__lexer_debug_flag__): New function. (LEXER_DEBUG): New macro. Use it in all patterns. (DISPLAY_TOK_AND_RETURN): Also display token if lexer_debug_flag is set. (process_comment): Display comment if lexer_debug_flag is set. (display_character, display_state, lexer_debug): New static functions. (xunput): Display character if lexer_debug_flag is set. 2009-01-17 Jaroslav Hajek * ov.h: Describe usage of storable_value and make_storable_value. * ov.cc: Remove FIXME comment. 2009-01-15 John W. Eaton * data.cc (Freshape): Include mismatched dimensions in error message. From Robert Millan . 2009-01-14 Jaroslav Hajek * ov.cc (octave_value::maybe_economize): New method. (octave_value::non_null_value): rename to storable_value. (octave_value::make_non_null_value): rename to make_storable_value. * ov-base.h (octave_base_value::maybe_economize): New method. * ov-base-mat.h (octave_base_mat::maybe_economize): New override. * oct-obj.cc (octave_value_list::normalize_null_values): Rename to make_storable_values, use make_storable_value. * oct-obj.h: Ditto. * ov-builtin.cc: non_null_value -> storable_value. * ov-cell.cc: Ditto. * ov-struct.cc: Ditto. * pt-decl.h: Ditto. 2009-01-15 Søren Hauberg * DLD-FUNCTIONS/__magick_read__.cc (encode_uint_image): Initialize bitdepth. 2009-01-14 Søren Hauberg * DLD-FUNCTIONS/betainc.cc, DLD-FUNCTIONS/chol.cc, DLD-FUNCTIONS/daspk.cc, DLD-FUNCTIONS/dasrt.cc, DLD-FUNCTIONS/dassl.cc, DLD-FUNCTIONS/filter.cc, DLD-FUNCTIONS/gammainc.cc, DLD-FUNCTIONS/gcd.cc, DLD-FUNCTIONS/givens.cc, DLD-FUNCTIONS/hess.cc, DLD-FUNCTIONS/lsode.cc, DLD-FUNCTIONS/qr.cc, DLD-FUNCTIONS/qz.cc, DLD-FUNCTIONS/schur.cc, DLD-FUNCTIONS/svd.cc, DLD-FUNCTIONS/syl.cc, data.cc, mappers.cc: Use ifnottex instead of ifinfo. 2009-01-14 John W. Eaton * load-path.cc (load_path::do_set): Call do_clear after disabling add_hook. 2009-01-13 Jaroslav Hajek * dirfns.cc (Freadddir): qsort -> sort. * graphics.cc (maybe_set_children): Ditto. * help.cc (simple_help): Ditto. * input.cc (generate_possible_completions): Ditto. * oct_map.cc (keys_ok): Ditto. * ov-fcn-inline.cc (Finline): Ditto. * variables.cc (Fisrawcommand): Ditto. 2009-01-12 John W. Eaton * octave.cc (maximum_braindamage): Set confirm_recursive_rmdir to false. * strfns.cc (Fstrcmp, Fstrncmp): Simplify by initializing all elements of output to false with constructor argument. 2009-01-12 Thorsten Meyer * strfns.cc (Fstrncmp): New test. 2009-01-12 John W. Eaton * pt-stmt.h (tree_statement::is_null_statement): New function. * parse.y (set_stmt_print_flag): Return list. Remove trailing null statements from list. (list, simple_list): Simplify action. (make_statement, make_statement_list, append_statement_list): Always create statements and them to the list. * base-list.h (octave_base_list::push_front, octave_base_list::push_back, octave_base_list::pop_front, octave_base_list::pop_back): New functions. * DLD-FUNCTIONS/qr.cc (Fqrupdate, Fqrinsert, Fqrdelete, Fqrshift): Require args to be numeric, not necessarily matrix objects. 2009-01-12 Ben Abbott * graphics.h.in (text::properties::fontunits): Fix typo in list of possible values. 2009-01-12 John W. Eaton * strfns.cc (Fstrvcat, Fchar): Use queue to avoid duplicate calls to all_strings. 2009-01-12 Thorsten Meyer * strfns.cc (Fstrvcap): New function. 2008-11-29 Thorsten Meyer * strfns.cc (Fchar, Fischar, Fstrncmp, Flist_in_columns): Improve documentation strings. Add examples and tests. 2009-01-12 Jaroslav Hajek * ov-perm.cc (octave_perm_matrix::do_index_op): Return shallow copy when indexed by (:,:). * ov-base-mat.cc (octave_base_diag::do_index_op): Return shallow copy when indexed by (:,:). Optimize indexing equivalent to resizing. * data.cc: Fix tests. * mappers.cc: Fix tests. 2009-01-12 Jaroslav Hajek * ov-base-diag.h, ov-base-mat.h, ov-base-scalar.h, ov-base-sparse.h, ov-base.cc, ov-base.h, ov-perm.h, ov-range.h, ov.h: Add full_value methods to octave_value, octave_base_value and its relevant subclasses. * data.cc (Ffull): New DEFUN. * DLD-FUNCTIONS/sparse.cc (Ffull): move to data.cc. 2009-01-11 Jaroslav Hajek * ov.h (octave_value::is_copy_of): New method. * ov-struct.cc (numeric_conv): Add output parameter orig. (octave_struct::subsasgn): Temporarily erase duplicate lhs value prior to assignment. 2009-01-11 Jaroslav Hajek * oct-obj.cc (octave_value_list::all_scalars): New method. * oct-obj.h: Declare it. * ov-cell.cc (octave_cell::subsasgn): Disable assigning to non-scalar {}-indexed cell, unless in a multi-assignment. 2009-01-10 Jaroslav Hajek * DLD-FUNCTIONS/sparse.cc (Ffull): Convert diagonal & permutation matrices, leave other classes untouched. 2009-01-09 Jaroslav Hajek * OPERATORS/op-cdm-cdm.cc: Install missing widening op. * OPERATORS/op-dm-dm.cc: Ditto. * OPERATORS/op-fcdm-fcdm.cc: Ditto. * OPERATORS/op-fdm-fdm.cc: Ditto. * OPERATORS/op-pm-pm.cc: Ditto. * OPERATORS/op-fpm-fpm.cc: Ditto. 2009-01-09 Jaroslav Hajek * ov-cell.cc (octave_cell::subsasgn): Put erased copy back after make_unique has been called. 2009-01-09 Kai Habel * graphics.cc: Calculate normals for surface boundaries, use more neighboring points to calculate interior normals 2009-01-09 John W. Eaton * input.cc (get_user_input (void)): Don't increment input_line_number. * lex.l (xunput): New function. Use it in place of yyunput anywhere a newline character may be put back on the input stream. Increment input_line_number in all rules that consume newlines characters. (text_yyinput): Increment input_line_number (fixup_column_count): Increment input_line_number. (prep_for_function): Set input_line_number to 1, not 0. (reset_parser): Set input_line_number to current_command_number, not current_command_number-1. (flex_stream_reader::ungetc): Call xunput, not yyunput. * parse.y (input_line_number): Initialize to 1, not 0. (text_getc): Increment input_line_number correctly. (stdio_stream_reader::ungetc): Decrement input_line_number if putting back a newline character. (parse_fcn_file): Set input_line_number to 1, not 0. (eval_string): Unwind-protect input_line_number and current_input_column. * parse.y (make_statement): New function. (statement): Use it. (make_statement_list, append_statement_list): New functions. (simple_list1, list1): Use them. 2009-01-08 Jaroslav Hajek * ov-cell.cc (octave_cell::subsasgn): Erase duplicate lhs value prior to assignment to avoid a redundant copy. 2008-12-26 Thorsten Meyer * mappers.cc (Ftoascii), mappers.cc (Ftolower), mappers.cc (Ftoupper), DLD-FUNCTIONS/regexp.cc (Fregexp), DLD-FUNCTIONS/regexp.cc (Fregexpi), DLD-FUNCTIONS/regexp.cc (Fregexprep): Add references. 2008-12-27 Jaroslav Hajek * oct-obj.h, oct-obj.cc (octave_value_list::valid_scalar_indices): Remove. * ov-base-diag.cc, ov-base-diag.h, ov-base-scalar.cc, ov-base.h, ov-bool-mat.cc, ov-bool-mat.h, ov-bool-sparse.cc, ov-bool-sparse.h, ov-bool.cc, ov-bool.h, ov-ch-mat.cc, ov-ch-mat.h, ov-colon.h, ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h, ov-cx-sparse.cc, ov-cx-sparse.h, ov-float.cc, ov-float.h, ov-flt-complex.cc, ov-flt-complex.h, ov-flt-cx-mat.cc, ov-flt-cx-mat.h, ov-flt-re-mat.cc, ov-flt-re-mat.h, ov-intx.h, ov-perm.cc, ov-perm.h, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h, ov-scalar.cc, ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov.h: Remove valid_as_scalar_index and valid_as_zero_index methods from octave_value, octave_base_value and all of its subclasses. 2008-12-26 Francesco Potortì * data.cc (resize): Add cross reference to postpad. 2008-12-25 Jaroslav Hajek * load-save.h (load_save_format_type, load_save_format_options): New enums. (load_save_format): Convert to a class. * load-save.cc (do_save(..., const octave_value&,...)): Use fmt.type in switch. Use options of LS_MAT_ASCII. (do_load, write_header): Use format.type in switch. * ls-mat-ascii.h (save_mat_ascii_data): Add tabs option. * ls-mat-ascii.cc (save_mat_ascii_data): Implement it. 2008-12-24 Ben Abbott * DLD-FUNCTIONS/chol.cc: Compare results to 0 in tests. Delete spurious function calls in test block. 2008-12-24 John W. Eaton * DLD-FUNCTIONS/eigs.cc: Use "testif HAVE_ARPACK" to skip tests if ARPACK is not available. * Makefile.in (DLD_XSRC): Add eigs.cc to the list. * load-save.cc (parse_save_options): Handle -double. 2008-12-23 David Bateman * DLD-FUNCTIONS/eigs.cc: New file. * Makefile.in (DLD_XSRC): Add it here. 2008-12-22 David Bateman * DLD-FUNCTIONS/__voronoi__.cc (F__voronoi__): Resize AtInf array before returning it. 2008-12-12 David Bateman * DLD-FUNCTIONS/chol.cc (Fcholinv): Add test. 2008-12-12 Jaroslav Hajek * ls-hdf5.cc (add_hdf5_data): Check for diagonal & permutation matrices and convert them to full prior to saving. 2008-12-11 Jaroslav Hajek * ov-re-mat.cc (Fdouble): Handle diagonal & perm matrices. * ov-flt-re-mat.cc (Fsingle): Handle diagonal & perm matrices. 2008-12-11 Jaroslav Hajek * ov-base-diag.cc (octave_base_diag::subsasgn): New method. * ov-base-diag.h (octave_base_diag::subsasgn): Declare it. (octave_base_diag::chk_valid_scalar): New method decl. * ov-re-diag.cc (octave_diag_matrix::chk_valid_scalar): New method override. * ov-re-diag.h: Declare it. * ov-flt-re-diag.cc (octave_float_diag_matrix::chk_valid_scalar): New method override. * ov-flt-re-diag.h: Declare it. * ov-cx-diag.cc (octave_complex_diag_matrix::chk_valid_scalar): New method override. * ov-cx-diag.h: Declare it. * ov-flt-cx-diag.cc (octave_float_complex_diag_matrix::chk_valid_scalar): New method override. * ov-flt-cx-diag.h: Declare it. 2008-12-10 Jaroslav Hajek * DLD-FUNCTIONS/expm.cc: Remove. * Makefile.in: Update. 2008-12-10 Jaroslav Hajek * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::empty_clone): Construct an empty matrix instead of zero. 2008-12-07 Thorsten Meyer * mappers.cc (Ftolower): Make lower alias of tolower, add tests * mappers.cc (Ftoupper): Make upper alias of toupper, add tests 2008-12-09 Jaroslav Hajek * DLD-FUNCTIONS/balance.cc (Fbalance): Exploit the new AEPBAL functionality. 2008-12-08 Jaroslav Hajek * xpow.cc ( xpow (const DiagMatrix& a, double b), xpow (const DiagMatrix& a, const Complex& b), xpow (const ComplexDiagMatrix& a, double b), xpow (const ComplexDiagMatrix& a, const Complex& b), xpow (const FloatDiagMatrix& a, float b), xpow (const FloatDiagMatrix& a, const FloatComplex& b), xpow (const FloatComplexDiagMatrix& a, float b), xpow (const FloatComplexDiagMatrix& a, const FloatComplex& b)): New methods. * xpow.h: Declare them. * OPERATORS/op-dms-template.cc: Support diagonal matrix ^ scalar. 2008-12-08 Jaroslav Hajek * ov-re-diag.cc (octave_diag_matrix::save_binary, octave_diag_matrix::load_binary): New methods. * ov-re-diag.h: Declare them. * ov-flt-re-diag.cc (octave_float_diag_matrix::save_binary, octave_float_diag_matrix::load_binary): New methods. * ov-flt-re-diag.h: Declare them. * ov-cx-diag.cc (octave_complex_diag_matrix::save_binary, octave_complex_diag_matrix::load_binary): New methods. * ov-cx-diag.h: Declare them. * ov-flt-cx-diag.cc (octave_float_complex_diag_matrix::save_binary, octave_float_complex_diag_matrix::load_binary): New methods. * ov-flt-cx-diag.h: Declare them. * ov-perm.cc (octave_perm_matrix::save_binary, octave_perm_matrix::load_binary): New methods. * ov-perm.h: Declare them. 2008-12-06 Jaroslav Hajek * ov-fcn-handle.cc (octave_fcn_handle::load_binary): Call istream::get rather than istream::read to supply null terminating character. 2008-10-29 Jaroslav Hajek * file-io.cc, gl-render.cc, load-save.cc, ls-hdf5.cc, ls-mat4.cc, ls-mat5.cc, ls-oct-binary.cc, mex.cc, oct.h, ov-base-int.cc, ov-bool-mat.cc, ov-bool-sparse.cc, ov-cell.cc, ov-class.cc, ov-cx-mat.cc, ov-cx-sparse.cc, ov-fcn-handle.cc, ov-fcn-inline.cc, ov-flt-cx-mat.cc, ov-flt-re-mat.cc, ov-re-mat.cc, ov-re-sparse.cc, ov-str-mat.cc, ov-struct.cc, toplev.cc, DLD-FUNCTIONS/__lin_interpn__.cc, DLD-FUNCTIONS/amd.cc, DLD-FUNCTIONS/ccolamd.cc, DLD-FUNCTIONS/cellfun.cc, DLD-FUNCTIONS/colamd.cc, DLD-FUNCTIONS/gcd.cc, DLD-FUNCTIONS/matrix_type.cc, DLD-FUNCTIONS/regexp.cc, DLD-FUNCTIONS/symbfact.cc, DLD-FUNCTIONS/symrcm.cc: Include oct-locbuf.h. 2008-12-05 Jaroslav Hajek * ov-base-diag.cc (save_ascii, load_ascii): Save natively. * ov-base-diag.h (load_ascii): Declare. * ov-perm.cc (save_ascii, load_ascii): Save natively. * ov-perm.h (load_ascii): Declare. 2008-12-04 Thorsten Meyer * strfns.cc (Fchar): Add test from str2mat.m 2008-12-04 Jaroslav Hajek * ov.h (octave_value::is_perm_matrix): New method. * ov-base.h (octave_base_value::is_perm_matrix): New method. * ov-perm.h (octave_perm_matrix::is_perm_matrix): New method. * DLD-FUNCTIONS/inv.cc (Finv): Handle permutation matrices specially, compute rcond for diagonal matrices. * DLD-FUNCTIONS/det.cc (Fdet): Handle permutation & diagonal matrices specially. 2008-12-03 Jaroslav Hajek * ov-perm.h: New source. * ov-perm.cc: New source. * ov-flt-perm.h: New source. * ov-flt-perm.cc: New source. * ov-base-diag.cc (octave_base_diag::do_index_op): If subscripting an identity matrix by permutation(s), return a permutation matrix object. * ov.cc (octave_value::octave_value (const PermMatrix&)): New constructor. * ov.cc (octave_value::octave_value (const PermMatrix&)): Declare it. * op-cm-pm.cc: New source. * op-fcm-fpm.cc: New source. * op-fm-fpm.cc: New source. * op-fpm-fcm.cc: New source. * op-fpm-fm.cc: New source. * op-fpm-fpm.cc: New source. * op-m-pm.cc: New source. * op-pm-cm.cc: New source. * op-pm-m.cc: New source. * op-pm-pm.cc: New source. * op-pm-template.cc: New source. * Makefile.in: Include new sources. * DLD-FUNCTIONS/qr.cc (Fqr): Reflect interface changes of QR classes. 2008-12-03 John W. Eaton * debug.cc (bp_table::do_get_breakpoint_list): Style fixes. 2008-12-01 Jaroslav Hajek * ov-base.h (octave_base_value::is_diag_matrix): New virtual method. * ops.h (CONCAT2, CONCAT3): New macros. Use CONCAT macros instead of direct token pasting to avoid disabling argument prescan. * xdiv.cc, xdiv.h: Implement xdiv and xleftdiv overloads for diagonal and mixed dense-diagonal operands. * ov-re-diag.h: New source. * ov-re-diag.cc: New source. * ov-flt-re-diag.h: New source. * ov-flt-re-diag.cc: New source. * ov-base-diag.h: New source. * ov-base-diag.cc: New source. * OPERATORS/op-m-dm.cc: New source. * OPERATORS/op-m-cdm.cc: New source. * OPERATORS/op-fm-fdm.cc: New source. * OPERATORS/op-fm-fcdm.cc: New source. * OPERATORS/op-fdm-fs.cc: New source. * OPERATORS/op-fdm-fm.cc: New source. * OPERATORS/op-fdm-fdm.cc: New source. * OPERATORS/op-fdm-fcs.cc: New source. * OPERATORS/op-fdm-fcm.cc: New source. * OPERATORS/op-fdm-fcdm.cc: New source. * OPERATORS/op-fcm-fdm.cc: New source. * OPERATORS/op-fcm-fcdm.cc: New source. * OPERATORS/op-fcdm-fs.cc: New source. * OPERATORS/op-fcdm-fm.cc: New source. * OPERATORS/op-fcdm-fdm.cc: New source. * OPERATORS/op-fcdm-fcs.cc: New source. * OPERATORS/op-fcdm-fcm.cc: New source. * OPERATORS/op-fcdm-fcdm.cc: New source. * OPERATORS/op-dms-template.cc: New source. * OPERATORS/op-dm-template.cc: New source. * OPERATORS/op-dm-s.cc: New source. * OPERATORS/op-dm-m.cc: New source. * OPERATORS/op-dm-dm.cc: New source. * OPERATORS/op-dm-cs.cc: New source. * OPERATORS/op-dm-cm.cc: New source. * OPERATORS/op-dm-cdm.cc: New source. * OPERATORS/op-cm-dm.cc: New source. * OPERATORS/op-cm-cdm.cc: New source. * OPERATORS/op-cdm-s.cc: New source. * OPERATORS/op-cdm-m.cc: New source. * OPERATORS/op-cdm-dm.cc: New source. * OPERATORS/op-cdm-cs.cc: New source. * OPERATORS/op-cdm-cm.cc: New source. * OPERATORS/op-cdm-cdm.cc: New source. * Makefile.in: Include them. * ov-re-mat.cc (octave_matrix::diag): New method override. * ov-re-mat.h: Declare it. * ov-cx-mat.cc: Likewise with octave_complex_matrix. * ov-cx-mat.h: Likewise with octave_complex_matrix. * ov-flt-re-mat.cc: Likewise with octave_float_matrix. * ov-flt-re-mat.h: Likewise with octave_float_matrix. * ov-flt-cx-mat.cc: Likewise with octave_float_complex_matrix. * ov-flt-cx-mat.h: Likewise with octave_float_complex_matrix. * ov.cc (octave_value::octave_value (const DiagMatrix&)) (octave_value::octave_value (const FloatDiagMatrix&)) (octave_value::octave_value (const ComplexDiagMatrix&)) (octave_value::octave_value (const FloatComplexDiagMatrix&)): Construct a diagonal matrix object. * data.cc (Fdiag): Support explicit dimensions. Fix tests. (Feye): Return diagonal matrix objects if possible. Fix tests. * mappers.cc (Freal, Fimag): Fix tests. * DLD-FUNCTIONS/inv.cc (Finv): Handle diagonal matrix objects. * ov-range.h (octave_range::diag): Declare only. * ov-range.cc (octave_range::diag): Return DiagMatrix if possible. 2008-11-25 Jaroslav Hajek * ov.cc (octave_value::is_equal): New member function. * ov.h: Declare it. * pt-select.cc (tree_switch_case::label_matches): Call octave_value::is_equal. 2008-12-04 Thomas Treichl * DLD-FUNCTIONS/cellfun.cc: Added more tests for cellfun. 2008-11-25 Jaroslav Hajek * ov-base.h (octave_base_value::type_conv_info): New class. * ov-base.h, ov-bool-mat.cc, ov-bool-mat.h, ov-bool-sparse.cc, ov-bool-sparse.h, ov-bool.cc, ov-bool.h, ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h, ov-null-mat.cc, ov-null-mat.h, ov-range.cc, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-scalar.cc, ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov.h: Return type_conv_info instead of type_conv_fcn from numeric_conversion_function and numeric_demotion_function methods. * ov-base.cc (octave_base_value::numeric_assign): Try biased conversion first if possible. * ov.cc (do_binary_op): Likewise. Also, search recursively. * ov.cc (do_cat_op): Likewise. 2008-11-24 David Bateman * graphics.cc (F__go_delete__): Check validity of handles before deleting them to avoid issues with callback function also deleting the handles. 2008-11-21 John Swensen * debug.cc (bp_table::do_get_breakpoint_list): Avoid modifying bp_map while iterating over it. 2008-11-21 Jarkko Kaleva * DLD-FUNCTIONS/eig.cc (Feig): Handle generalized eigenvalues and eigenvectors. 2008-11-19 Jaroslav Hajek * DLD_FUNCTIONS/det.cc: Include only DET.h. Retrieve & matrix type & store it after calculation if possible. 2008-11-17 John W. Eaton * load-path.cc (load_path::dir_info::update): Simplify previous change. * load-path.h (load_path::dir_info::abs_dir_name): New data member. (load_path::dir_info::dir_info, load_path::dir_info::operator =): Copy abs_dir_name. (load_path::abs_dir_cache_type, load_path::dir_cache_iterator, load_path::const_dir_cache_iterator): New typedefs. (load_path::abs_dir_cache): New static data member. (load_path::dir_info:dir_info): New constructor. * load-path.cc (load_path::abs_dir_cache): Define new static data member. (load_path::dir_info::update): Look in abs_dir_cache for relative directory names. (load_path::dir_info::initialize): Update abs_dir_cache here. 2008-11-13 John W. Eaton * ov-int8.h, ov-int16.h, ov-int32.h, ov-int64.h, ov-uint8.h, ov-uint16.h, ov-uint32.h, ov-uint64.h: Don't define OCTAVE_INT_NDARRAY_T. * ov-intx.h (class OCTAVE_VALUE_INT_MATRIX_T, class OCTAVE_VALUE_INT_SCALAR_T): Use intNDArray instead of OCTAVE_INT_NDARRAY_T. (OCTAVE_VALUE_INT_MATRIX_T::increment, OCTAVE_VALUE_INT_MATRIX_T::decrement, OCTAVE_VALUE_INT_SCALAR_T::increment, OCTAVE_VALUE_INT_SCALAR_T::decrement): Convert 1 to OCTAVE_INT_T. 2008-11-15 Thorsten Meyer * strfns.cc (Fchar): adapt to conserve empty strings, add tests 2008-11-12 Michael Goffioul * dirfcn.cc (Ffilesep): Make it return all file separators when 'all' is given as argument. * DLD-FUNCTIONS/getrusage.cc: Undefine min/max. * TEMPLATE-INST/Array-os.cc: Declare Array as extern template. 2008-11-12 David Bateman * OPERATORS/op-cell.cc (op_catop_matrix_cell): Cast args in the correct order. * OPERATORS/op-struct.cc (op_catop_matrix_struct): Ditto. 2008-11-11 Jaroslav Hajek * pt-assign.cc: Fix handling of empty cs-lists in assignment LHS. 2008-11-11 John W. Eaton * lex.l ({S}+): Don't insert separator if next token is a separator. * parse.y (F__parser_debug_flag__): New function. 2008-10-31 Jaroslav Hajek * xnorm.cc: New source. * xnorm.h: New header file. * Makefile.in: Include xnorm.cc in the build process. * data.cc (Fnorm): Call xnorm, xcolnorms, xrownorms or xfrobnorm to do the actual work. 2008-10-31 David Bateman * ov-base-scalar.h (octave_value octave_base_scalar::reshape (const dim_vector&) const): New method. 2008-10-30 John W. Eaton * oct-map.cc (Octave_map::index): Copy key_list. 2008-10-31 David Bateman * graphics.h.in (void image::init (void)): Add a constraint for logical cdata. * graphics.h.in (base_property::delete_listener): New method. (property::delete_listener): New method. (base_graphics_object::delete_listener): New method. (base_graphics_object::delete_property_listener): New method. (base_graphics_object::remove_all_listeners): New method. (graphics_object::delete_property_listener): New method. (axes::set_defaults): Call remove_all_listeners. * graphics.cc (void base_properties::delete_listener): New method (void base_graphics_object::remove_all_listeners (void)): New method (Fdellistener): New command to remove listener functions associated with a property. 2008-10-30 David Bateman * graphics.h.in (axes::properties): Add keyreverse property. * graphics.cc (axes::properties::set_defaults): Initialize keyreverse property. 2008-10-28 Jaroslav Hajek * Cell.h (Cell::assign (const Array&, ...), Cell::delete_elements (const Array&, ...)): New member functions. * Cell.cc (Cell::assign (const octave_value_list&, ...), Cell::delete_elements (const octave_value_list&, ...)): Call Array::assign. * DLD-FUNCTIONS/dlmread.cc: Call Array::resize_fill. * ov-base-mat.cc (octave_base_matrix::assign): Call Array::assign. (octave_base_matrix::delete_elements):: Call Array::delete_elements. * ov-cell.cc (Fcell): Call Array::chop_trailing_singletons, simplify. * ov-cx-mat.cc (octave_complex_matrix::assign): Call Array::assign. * ov-flt-cx-mat.cc (octave_float_complex_matrix::assign): Call Array::assign. * ov-list.cc (octave_list::subsasgn): Call Array::assign. * pr-output.cc (PRINT_ND_ARRAY): Use zero-based indices. 2008-10-29 Thorsten Meyer * data.cc (Fcolumns): Remove "and" from @seealso string. * mappers.cc (Fgamma, Flgamma): Replace @seealso reference to deprecated gammai by gammainc. * DLD-FUNCTIONS/sqrtm.cc (Fsqrtm): Remove reference to Octave Forge function funm. * DLD-FUNCTIONS/qz.cc (Fqz): removed @seealso reference to Octave Forge function dare. * DLD-FUNCTIONS/rcond.cc (Frcond): removed @seealso reference to mldivide. * debug.cc (Fdbstop): Fix @seealso references and function name in docstring of dbnext. * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Remove @seealso reference to isclass. * syscalls.cc (Fwaitpid): Replace WCONTINUED by WCONTINUE. * oct-hist.cc (Fhistory_size, Fsaving_history): Fix @seealso references to history_timestamp_format_string. * DLD-FUNCTIONS/luinc.cc (Fluinc): Remove reference to missing function cholinc. 2008-10-29 Jaroslav Hajek * DLD-FUNCTIONS/qr.cc (Fcholinsert, Fcholdelete, Fcholshift): Fix inline docs. 2008-10-28 John W. Eaton * parse.y (finish_function): Clear local variables in function scope. * symtab.h (symbol_table::clear_variables): New argument, scope. 2008-10-28 Brian Gough * DLD-FUNCTIONS/besselj.cc: Added tests. 2008-10-23 John W. Eaton * oct-hist.c (initialize_history): New arg, read_history_file) * oct-hist.h: Fix decl. * octave.cc (octave_main): Set read_history_file to false if --no-history option is specified. Pass read_history_file to initialize_history. * DLD-FUNCTIONS/fltk_backend.cc: Update initialization comment. 2008-10-22 John W. Eaton * DLD-FUNCTIONS/fltk_backend.cc (figure_manager::do_close_all): Rename from close_all. Now private. (figure_manager::do_new_window): Rename from new_window. Now private. (figure_manager::do_delete_window): Rename from delete_window. Now private. (figure_manager::do_mark_modified): Rename from mark_modified. Now private. (figure_manager::do_get_size): Rename from get_size. Now private. (figure_manager::close_all, figure_manager::do_new_window, figure_manager::do_delete_window, figure_manager::do_mark_modified, figure_manager::do_get_size): New static functions. (figure_manager::instance_ok): New function. (figure_manager::Instance): Delete. Eliminate all uses in favor of static methods that call instance_ok and forward to private member functions. (figure_manager::instance): New static data member. (figure_manager::hnd2idx, figure_manager::figprops2idx, figure_manager::figprops2idx, figure_manager::str2idx): Now static. * DLD-FUNCTIONS/fltk_backend.cc (figure_manager::default_size): Increase default window size. * graphics.cc (figure::properties::remove_child): New function. * graphics.h.in: Provide decl. * gl-render.cc (opengl_renderer::draw): Get all children. * DLD-FUNCTIONS/fltk_backend.cc (__fltk_redraw__): Check for "root" object, not "root_figure". * graphics.h.in (base_properties::get_all_children): New function. 2008-10-22 David Bateman * graphics.h.in (line::properties, surface::properties): Add data source properties. 2008-10-21 John W. Eaton * graphics.h.in (axes::properties::delete_children): Delete decl. * graphics.h.in (gh_manager::is_handle_visible): New function. (axes::properites): Move title property after label properties. (graphics_object::is_handle_visible): New function. (base_properties::is_handle_visible): New function. (base_properties): Mark children property with G. * graphics.cc (axes::properties::set_text_child): New function. (axes::properties::set_title, axes::properties::set_xlabel, axes::properties::set_ylabel, axes::properties::set_zlabel): Use it. (base_property::get_children): New function. Only return handles that are visible. (axes::properties::delete_text_child): Set handlevisibility to "off" for newly created object and add it to the list of children. Call base_properties::remove_child on previous handle value. (axes::properties::set_defaults): Don't explicitly delete xlabel, ylabel, zlabel, and title handles. Reinitialize them after deleting children. (axes::properties::remove_child): Don't explicitly delete xlabel, ylabel, zlabel, and title handles. (axes::properties::init): Move here from graphics.h.in. Set handlevisibility to "off" for xlabel, ylabel, zlabel, and title and add them to the list of children. (axes::properties::delete_children): Delete. * genprops.awk: Allow whitespace between BEGIN_PROPERTIES and opening paren. Accept optional second argument for graphics object name. * graphics.h.in (root_figure properties): Pass "root" as second arg to BEGIN_PROPERTIES. 2008-10-16 John W. Eaton * graphics.cc (make_handle_fraction): New static function. (gh_manager::get_handle): Use it. (gh_manager::do_free): Call make_handle_fraction to replace fractional part of non-figure handles. * graphics.cc (base_properties::remove_child): Handle children as a column vector instead of a row vector. * utils.cc (Fis_absolute_filename, Fis_rooted_relative_filename, Fmake_absolute_filename, Ffind_dir_in_path): New functions. 2008-10-16 David Bateman * graphics.cc (void axes::properties::set_defaults (base_graphics_object&, const std::string&)): Preserve font and position properties if the axis is "replaced". 2008-10-16 John W. Eaton * graphics.h.in (class axes::properties): New property: interpreter. 2008-10-15 David Bateman * ov-class.c (Fsuperiorto, Finferiorto): Allow more than one class to be defined at a time. 2008-10-12 David Bateman * pt-colon.cc (octave_value tree_colon_expression::make_range (const octave_value&, const octave_value&, const octave_value&)): Treating class overloading of colon operator. (octave_value tree_colon_expression::rvalue (void)): Ditto. 2008-10-10 John W. Eaton * graphics.h.in (base_properties::adopt): Place new child at front of list, not end. Make list of children a column vector instead of a row vector. * graphics.cc (gh_manager::do_free): Set the beingdeleted property, then delete the children, then execute the deletefcn. (axes::properties::set_defaults, axes::properties::remove_child, axes::properites::delete_children): Call delete_text_child to manage the title, xlabel, ylabel, and zlabel properties. (axes::properties::get_title, axes::properties::get_xlabel, axes::properties::get_ylabel, axes::properties::get_zlabel): Delete. * graphics.h.in (axes::properites::title, axes::properites::xlabel, axes::properites::ylabel, axes::properites::zlabel): No longer mutable. Don't generate factory default values or custom get functions for these properties. * graphics.cc (axes::properties::delete_text_child): New function. * graphics.h.in: Provide decl. * graphics.h.in (graphics_object::type): New function. 2008-10-10 David Bateman * graphics.h.in (radio_property axes::properties::__colorbar__): Delete. * graphics.cc (void axes::properties::sync_positions (void)): Disable code synchronizing outerposiiton and position. (void axes::properties::set_defaults (base_graphics_object&, const std::string&): Remove __colorbar__. (F__go_delete__): Don't delete if already being deleting to avoid recursion in callback functions. (F__go_axes_init__): Flag error if handle is deleted during initialization due. 2008-10-09 David Bateman * ov-class.cc (Octave_map octave_class::map_value (void) const): Remove. (bool octave_class::save_ascii (std::ostream&), bool octave_class::load_ascii (std::istream&), bool octave_class::save_binary (std::ostream&, bool&), bool octave_class::save_binary (std::ostream&, bool&), bool octave_class::save_hdf5 (hid_t, const char *, bool), bool octave_class::load_hdf5 (hid_t, const char *, bool)): Allow saving and reloading of classes. * ov-class. (Octave_map octave_class::map_value (void) const): Remove. * ls-mat.cc (std::string read_mat5_binary_element (std::istream&, const std::string&, bool, bool&, octave_value&), int save_mat5_element_length (const octave_value&, const std::string&, bool, bool)): Allow saving and loading of classes. * ls-oct-ascii.h (template bool extract_keyword (std::istream&, const char *, T&, const bool)): Initialize value with null constructor rather than 0. 2008-10-07 David Bateman * graphics.cc (F__go_delete__): Allow arrays of graphic handles. 2008-10-01 Jaroslav Hajek * OPERATORS/op-i64-i64.cc: Instantiate all 64-bit operations. * OPERATORS/op-ui64-ui64.cc: Instantiate all unsigned 64-bit operations. 2008-10-06 John W. Eaton * ov-type-conv.h (octave_type_conv_body): Avoid shadow warning from GCC. 2008-10-06 David Bateman * graphics.cc (static bool is_handle (const octave_value&)): Delete. (static octave_value is_handle (const octave_value&)): New function. 2008-10-03 Jaroslav Hajek * Cell.cc (Cell::delete_elements): Don't pass second arg to Array::maybe_delete_elements. * ov-base-mat.cc (octave_base_matrix::delete_elements): Ditto. 2008-10-02 Jaroslav Hajek * Cell.h (Cell::delete_elements): Declare new member function. * Cell.h (Cell::delete_elements): Define it. * oct-map.cc (Octave_map::maybe_delete_elements): Call delete_elements instead of assign with empty Cell. 2008-10-02 John W. Eaton * pt-arg-list.cc (tree_argument_list::convert_to_const_vector): Don't insert undefined elements in return list. 2008-09-30 Jaroslav Hajek * ov-str-mat.h (octave-char-matrix-str::assign): Remove declaration. * ov-str-mat.cc (octave-char-matrix-str::assign): Remove definition. 2008-09-30 John W. Eaton * DLD-FUNCTIONS/__magick_read__.cc: Only define magick_to_octave_value if HAVE_MAGICK is defined. 2008-09-29 John W. Eaton * symtab.cc (symbol_table::fcn_info::fcn_info_rep::load_class_method): Call load_class_constructor if name and dispatch_type are the same. 2008-09-29 David Bateman * symtab.cc (octave_value symbol_table::find_function (const std::string&, tree_argument_list *, const string_vector&, octave_value_list&, bool&)): If first character of function name is "@" then look for class specific method. 2008-09-26 John W. Eaton * symtab.cc (out_of_date_check_internal): Fix order of arguments in call to load_path::find_method. 2008-09-26 David Bateman * ov-class.h (idx_vector index_vector (void) const): Declare new maethod. * ov-class.cc (idx_vector index_vector (void) const): Define new method. * (Fismethod): New function. 2008-09-26 John W. Eaton * DLD-FUNCTIONS/urlwrite.cc (urlwrite_cleanup_file) New function. (urlwrite_delete_file, urlwrite_filename): New static variables. (Furlwrite): Only return filename if urlget succeeds. Use unwind_protect to delete files we create if download fails. 2008-09-26 Jaroslav Hajek * ov-null-mat.h: New header file. * ov-null-mat.cc: New source. * ov.h (octave_value::is_null_value, octave_value::non_null_value, octave_value::make_non_null_value): Declare new member functions. * ov.cc (octave_value:non_null_value, octave_value::make_non_null_value): Define them. (octave_value::assign (assign_op op, const octave_value& rhs)): (register_types): Register null types. Call non_null_value (). * oct-obj.cc (octave_value_list::normalize_null_values): New member function. * oct-obj.h (octave_value_list::normalize_null_values): Declare it. * ov-base.h (is_null_value): New virtual member function. * ops.h (NULLASSIGNOPDECL, DEFNULLASSIGNOP_FN): New macros. * ov-base-mat.cc (octave_base_mat::delete_elements): New member func. * ov-base-mat.h: Declare it. * ov-base-sparse.cc (octave_base_sparse::delete_elements): New member func. * ov-base-sparse.h: Declare it. * ov-cell.cc (octave_cell:subsasgn): Handle null values. * ov-struct.cc (octave_cell:subsasgn): Handle null values. * ov-builtin.cc (octave_builtin::do_multi_index_op): Normalize return values. * pt-misc.cc (tree_parameter_list::define_from_arg_vector): Call octave_lvalue::define instead of octave_lvalue::assign. * pt-decl.h (tree_decl_elt::rvalue): Call non_null_value (). * OPERATORS/op-int.h (OCTAVE_INT_NULL_ASSIGN_OPS, OCTAVE_INSTALL_INT_NULL_ASSIGN_OPS): New macros. * OPERATORS/op-m-m.cc: Install & define assignment & conversion operators. * OPERATORS/op-bm-bm.cc: Ditto. * OPERATORS/op-cell.cc: Ditto. * OPERATORS/op-cm-cm.cc: Ditto. * OPERATORS/op-cs-cs.cc: Ditto. * OPERATORS/op-fcm-fcm.cc: Ditto. * OPERATORS/op-fcs-fcs.cc: Ditto. * OPERATORS/op-fm-fm.cc: Ditto. * OPERATORS/op-fs-fs.cc: Ditto. * OPERATORS/op-int.h: Ditto. * OPERATORS/op-m-m.cc: Ditto. * OPERATORS/op-range.cc: Ditto. * OPERATORS/op-s-s.cc: Ditto. * OPERATORS/op-scm-scm.cc: Ditto. * OPERATORS/op-sm-sm.cc: Ditto. * OPERATORS/op-str-str.cc: Ditto. * OPERATORS/op-i16-i16.cc: Ditto. * OPERATORS/op-i32-i32.cc: Ditto. * OPERATORS/op-i64-i64.cc: Ditto. * OPERATORS/op-i8-i8.cc: Ditto. * OPERATORS/op-ui16-ui16.cc: Ditto. * OPERATORS/op-ui32-ui32.cc: Ditto. * OPERATORS/op-ui64-ui64.cc: Ditto. * OPERATORS/op-ui8-ui8.cc: Ditto. 2008-09-25 David Bateman * pt-mat.cc (class tm_row_const): Add any_class test (class tm_const): Ditto. (octave_value tree_matrix::rvalue (void)): If any object to concatenate is a class object, dispatch to the appropriate vertcat/horzcat function. 2008-09-25 John W. Eaton * symtab.cc (symbol_table::do_find): Don't set evaluated_args and args_evaluated here, prior to call to symbol_table::fcn_info::find. 2008-09-24 Søren Hauberg * DLD-FUNCTIONS/__magick_read__.cc (magick_to_octave_value): New template function with specializations for various GraphicsMagick++ types. (F__magick_finfo__): New function. 2008-09-24 John W. Eaton * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Add symbol_table::clear_variables cleanup function to the unwind_protect stack after the parameter list cleanup functions. * load-path.cc (load_path::do_initialize): Check for OCTAVE_PATH in the environment, not OCTAVE_LOADPATH. 2008-09-24 Thomas Weber * DLD-FUNCTIONS/regexp.cc (octregexp_list): Retry if match limit is exceeded. 2008-09-24 John W. Eaton * genprops.awk (emit_declarations): Emit call to set_mode before updaters. 2008-09-23 John W. Eaton * pt-arg-list.cc (F__end__): Dispatch to user-defined end function for classes if one is defined. * lex.l (is_keyword_token): Allow "end" as a functon name. 2008-09-23 David Bateman * variables.cc (static octave_value do_who (int, const string_vector&, bool, bool, std::string): Add final message argument and simple treatment of the "-file" option. 2008-09-22 David Bateman * debug.cc (static octave_user_code * get_user_code (const std::string&)): Only check user code as break points can't be set in builtins or oct-files. (bp_table::intmap bp_table::do_remove_all_breakpoints_in_file (const std::string&, bool)): Add flag to silence the error message from this function if a user code with breakpoints is not found. (bp_table::fname_line_map bp_table::do_get_breakpoint_list (const octave_value_list&)): Do an ourt of date check on the function before checking the breakpoints. * debug.h (do_remove_all_breakpoints_in_file, remove_all_breakpoints_in_file): Add flag to silence error message. * symtab.cc (out_of_date_check_internal): Clear breakpoints in function if out_of_date. split into two versions taking the octave_function pointer seperately or not. * symtab.h (bool out_of_date_check (octave_function*)): New function. 2008-09-18 David Bateman * DLD-FUNCTIONS/fftw.cc (Ffftw): Clarify the documentation. 2008-09-17 Krzesimir Nowak * debug.cc (Fisdebugmode): New function. 2008-09-17 David Bateman * data.cc (do_cat): Chopping trailing singleton dimensions. * data.cc (SINGLE_TYPE_CONCAT, DO_SINGLE_TYPE_CONCAT): New macros (do_cat): Special case single type concatenations for speed. * pt.mat.cc (std::string get_concat_class (const std::string&, const std::string&), void maybe_warn_string_concat (bool, bool)): Remove static declaration. * pt-mat.h (std::string get_concat_class (const std::string&, const std::string&), void maybe_warn_string_concat (bool, bool)): Define extern here. * DLD-FUNCTIONS/sparse.cc (Fsparse): Clarify the help string. 2008-09-10 John W. Eaton * octave.cc (octave_main): Make all command-line arguments available to startup scripts and PKG_ADD files. 2008-09-09 David Bateman * DLD-FUNCTIONS/regexp.cc (octregexp_list): Distinguish between matlab named tokens and perl lookbehind expressions. For lookbehind expression replace "*" and "+" with a limited number of fixed length expressions to simulate arbitrary length look behind. 2008-09-08 Michael Goffioul * DLD-FUNCTIONS/__magick_read__.cc (encode_uint_image): Resolve "pow" ambiguity. * graphics.cc (base_properties::get_dynamic, base_properties::set_dynamic, base_propertyes::get_property_dynamic): Add the 3rd template parameter to std::map, corresponding to all_props field. 2008-09-08 John W. Eaton * ls-oct-ascii.cc (std::string extract_keyword (std::istream&, const char *, const bool)): Also accept \r as line ending character. * ls-oct-ascii.h (template bool extract_keyword (std::istream&, const char *, T&, const bool)): Likewise. (template bool extract_keyword (std::istream&, const string_vector&, std::string&, T&, const bool)): Likewise. 2008-09-03 Ben Abbott * mappers.cc: Use eps(single) as tolerance for single precesion test. 2008-09-03 John W. Eaton * variables.cc (mlock): Lock current function on the call stack. (Fmlock): Lock caller. * symtab.cc (out_of_date_check_internal): If dispatch type is set, check for method. If that fails, check for regular function. 2008-09-02 Michael Goffioul * graphics.cc (hggroup::update_axis_limits): Also reacts on [xyzac]liminclude changes. 2008-08-31 Michael Goffioul * DLD-FUNCTIONS/fltk_backend.cc (fltk_backend::redraw_figure, fltk_backend::print_figure): Change graphics_handle argument to graphics_object. 2008-08-29 David Bateman * src/graphics.cc: Replace int by octave_idx_type in multiple places. (array_property::is_equal): In macro CHECK_ARRAY_EQUAL, special case scalar case and keep copy of array value to avoid early destruction of converted array values. 2008-08-28 David Bateman * graphics.h.in (root_figure::properties::showhiddenhandles): New property. 2008-08-27 Jaroslav Hajek * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Initialize output vectors by NA value. 2008-08-26 Ben Abbott * mappers.cc: Adjust tolerance for single precesion tests. * DLD-FUNCTIONS/chol.cc: Double tolerance. 2008-08-26 Jaroslav Hajek * parse.y (Fassignin): Use default scope when calling varref. 2008-08-26 Michael Goffioul * genprops.awk (emit_declarations): Call updaters/listeners only when 'set' method returned true. * graphics.h.in (base_property::set, base_property::do_set): Return bool value. (property::set): Likewise. (string_property::do_set): Check value change and return bool value. (radio_property::do_set, double_property::do_set, array_property::do_set): Likewise. (color_property::do_set, double_radio_property::do_set, row_vector_property::do_set, bool_property::do_set, handle_property::do_set): Return bool value. (any_property::do_set, callback_property::do_set): Return always true. (color_values::operator==, color_values::operator!=): Add. (array_property::is_equal): Add. * graphics.cc (base_property::set): Executes listeners/notifiers only when do_set returns true. Return bool value. (color_property::do_set, double_radio_property::do_set): Check value change and return bool value. (array_property::is_equal): Add. * genprops.awk (emit_declarations, emit_source): Change code emission when emitting base_properties code (base is 1). (BEGIN): Initialize pcount to 0. (BEGIN_PROPERTIES): Initialize base to 0. (BEGIN_BASE_PROPERTIES): New statement. (main): Add support for 'f' modifier. Add support for non xxx_property typed properties. * graphics.h.in (base_properties::base_properties): Remove implementation. (base_properties::get_tag, base_properties::get_parent, base_properties::get_type, base_properties::get___myhandle__, base_properties::get_busyaction, base_properties::get_buttondownfcn, base_properties::is_clipping, base_properties::get_clipping, base_properties::execute_createfcn, base_properties::get_createfcn, base_properties::execute_deletefcn, base_properties::get_deletefcn, base_properties::get_handlevisibility, base_properties::is_hittest, base_properties::get_hittest, base_properties::is_interruptible, base_properties::get_interruptible, base_properties::is_selected, base_properties::get_selected, base_properties::is_selectionhighlight, base_properties::get_selectionhighlight, base_properties::get_uicontextmenu, base_properties::get_userdata, base_properties::is_visible, base_properties::get_visible, base_properties::is_beingdeleted, base_properties::get_beingdeleted, base_properties::set_busyaction, base_properties::set_buttondownfcn, base_properties::set_clipping, base_properties::set_createfcn, base_properties::set_deletefcn, base_properties::set_handlevisibility, base_properties::set_hittest, base_properties::set_interruptible, base_properties::set_selected, base_properties::set_selectionhighlight, base_properties::set_uicontextmenu, base_properties::set_userdata, base_properties::set_visible, base_properties::set_beingdeleted, base_properties::get_children): Remove (now auto-generated). (base_properties::enum): Likewise. (base_properties::is_modified): Call is___modified__. (base_properties::set_modified): Call set___modified__. (base_properties::set_children): Add. (base_properties::set_dynamic, base_properties::get_dynamic, base_properties::get_property_dynamic): New methods. (class base_properties): Surround properties declaration with BEGIN_BASE_PROPERTIES/END_PROPERTIES pair. * graphics.cc (base_properties::get, base_properties::set, base_properties::get_property): Remove (now auto-generated). (base_properties::set_dynamic, base_properties::get_dynamic, base_properties::get_property_dynamic): New methods. (base_properties::set_children): Likewise. * DLD_FUNCTIONS/fltk_backend.cc (F__fltk_redraw__): Make static. (F__init_fltk__): Protect from mutliple invocations. (F__remove_fltk__): Likewise. (F__init_fltk__): Register input event hook. (F__remove_fltk__): Unregister input event hook. * DLD_FUNCTIONS/fltk_backend.cc (fltk_backend::close_figure): Remove. (fltk_backend::object_destroyed, fltk_backend::property_changed): New methods. * genprops.awk (emit_declarations): Generate "enum" property fields. (emit_sources): Emit set_id calls. * graphics.h.in (base_property::id): New field. (base_property::base_property): Initialize it. (base_property::get_id, base_property::set_id): Add accessors. (property::get_id, property::set_id): Likewise. (base_graphics_backend::close_figure, graphics_backend::close_figure): Remove methods. (base_graphics_backend::redraw_figure, base_graphics_backend::print_figure, graphics_backend::redraw_figure, graphics_backend::print_figure): Change graphics_handle argument into graphics_object. (base_graphics_backend::property_changed, base_graphics_backend::object_created, base_graphics_backend::object_destroyed, graphics_backend::property_changed, graphics_backend::object_created, graphics_backend::object_destroyed): New signature with graphics_object argument. (base_properties::base_properties): Add set_id calls. (class base_properties): Add "enum" property fields. (root_figure::properties::remove_child): Add overloaded method. (figure::properties::close): Remove. (figure::properties::set_backend): Call object_destroyed instead of close. (figure::~figure): Remove close call. (figure::properties::get_title): New method. * graphics.cc (base_property::set): Call property_changed only for valid id (>=0); Use graphics_object argument. (gh_manager::do_free): Call object_destroyed with graphics_object argument. (base_graphics_backend::property_changed, base_graphics_backend::object_created, base_graphics_object::object_destroyed): Implement wrappers for graphics_handle argument case. (gnuplot_backend::close_figure): Remove. (gnuplot_backend::object_destroyed, gnuplot_backend::property_changed): New methods. (gnuplot_backend::redraw_figure, gnuplot_backend::print_figure): Change graphics_handle argument to graphics_object. (root_figure::properties::remove_child): Add. (figure::properties::close): Remove. (figure::properties::set_position): Do not call set_figure_position. (figure::properties::get_title): New method. (gh_manager::do_make_graphics_handle): Call object_created with a graphics_object argument. (gh_manager::do_make_figure_handle): Likewise. (Fdrawnow): Call redraw_figure and print_figure with a graphics_object argument. 2008-08-26 Maciek Gajewski * graphics.h.in (base_property::set): Remove inline implementation. (base_graphics_backend::property_changed, base_graphics_backend::object_created, base_graphics_backend::object_destroyed): New method. (graphics_backend::property_changed, graphics_backend::object_created, graphics_backend::object_destroyed): Likewise. * graphics.cc (base_property::set): Moved from header file. (gh_manager::do_free): Add backend notification. (gh_manager::do_make_graphics_handle): Likewise. (gh_manager::do_make_figure_handle): Likewise. 2008-08-25 Thomas L. Scofield * DLD-FUNCTIONS/__magick_read__.cc: Untabify. (jpg_settings, encode_bool_image, encode_uint_image, encode_map): New functions. (write_image): Use them to handle various image types. 2008-08-25 David Bateman * graphics.cc (void gh_manager::do_execute_callback (const graphics_handle&, const octave_value&, const octave_value&)): Don't pass the function handle as first arg of property listener functions * graphics.h.in (class base_properties): Add functor for caseless string comparison. Use it in the property map, so that user added properties are found in a case insensitive fashion. 2008-08-22 John W. Eaton * symtab.h (symbol_table::inherit): Pass reference to symbol table to do_inherit instead of scope. (symbol_table::do_inherit): First arg is now reference to symbol_table, not scope id. Insert all variables from donor scope. 2008-08-21 Thomas Treichl * mappers.cc: Increase test script tolerance. 2008-08-20 John W. Eaton * help.cc (builtin_help): Go to next symbol name on error. (do_type, do_which): Omit separate path search for files. (help_from_symbol_table): Only insert Texinfo markup if it looks like the help message is already in Texinfo. 2008-08-19 David Bateman * load-path.cc (load-path::do_find_dir (const std:string&) const)): Method to find a directory on the load-path corresponding to the argument. * load-path.h (load-path::do_find_dir (const std:string&) const), load-path::find_dir (const std::string&) const): New methods. * utils.cc (std::string contents_file_in_path (const std::string&)): New function. * utils.h (std::string contents_file_in_path (const std::string&)): Declare it. * help.cc (static bool raw_help_from_file (const std::string&, std::string&, std::string&, bool&)): Also check is requested argument is a directory and contains the file Contents.m. * OPERATORS/op-int-conv.cc (DEFINTCONVFN): New macro that warn for integer conversion issues. Use it to replace DEFCONVFN. * OPERATORS/op-int.h (DEFINTBINOP_OP, DEFINTNDBINOP_OP, DEFINTBINOP_FN, DEFINTNDBINOP_FN): New macros that warn for integer truncation issues. Use them to replace the corresponding macros in the integer arithmetic macros. Update other integer arithmetic functions that don't use these macros individually. * error.cc (initialize_default_warning_state (void)): Initialize the default warning state for the integer warnings to be off. * gripes.cc (void gripe_binop_integer_math_truncated (const char *, const char *, const char *), void gripe_unop_integer_math_truncated (const char *, const char *), void gripe_non_integer_conversion (const char *, const char *), void gripe_nan_conversion (const char *, const char *)): Warning functions for integer conversion and math issues. * gripes.h (void gripe_binop_integer_math_truncated (const char *, const char *, const char *), void gripe_unop_integer_math_truncated (const char *, const char *), void gripe_non_integer_conversion (const char *, const char *), void gripe_nan_conversion (const char *, const char *)): Declare them. * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::convert_gripe, OCTAVE_VALUE_INT_SCALAR_T::convert_gripe): Adapt for new means of flagging integer truncation. (OCTAVE_VALUE_INT_MATRIX_T::decrement, OCTAVE_VALUE_INT_MATRIX_T::increment, OCTAVE_VALUE_INT_SCALAR_T::decrement, OCTAVE_VALUE_INT_SCALAR_T::increment): Check for integer truncation. * ov.cc (convert_to_int_array): Adapt for new means of flagging integer truncation. 2008-08-19 Jaroslav Hajek * pt-assign.h (tree_simple_assignment::first_execution): New member field. (tree_simple_assignment::first_execution): Ditto. * pt-assign.cc (tree_simple_assignment::tree_simple_assignment): Initialize first_execution. (tree_multi_assignment::tree_multi_assignment): Ditto. (tree_simple_assignment::rvalue): Check for obsolete built-in variables only at first execution. (tree_multi_assignment::rvalue): Ditto. * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Checks whether LB and UB are of proper size. * oct-obj.cc, oct-obj.h (octave_value_list::make_argv): Allow calling without fcn_name. * load-save.cc (parse_save_options (const string_vector&, ...)): Return string_vector with parsed arguments removed instead. (parse_save_options (const std::string&, ...)): Ditto. (Fsave): Fix calls to parse_save_options. 2008-08-19 John W. Eaton * parse.y (Feval): Return value produced by evaluating CATCH string. 2008-08-12 John W. Eaton * pt-fcn-handle.cc (tree_anon_fcn_handle::rvalue): Call stash_parent_function_scope for user function. * ov-fcn-inline.cc (octave_fcn_inline::octave_fcn_inline): Likewise. * ov-struct.cc (octave_struct::subsref): Don't allow resizing for simple x(idx) case. 2008-08-07 John W. Eaton * ov.cc (octave_value::idx_type_value): Don't include default argument values in definition. * src/glrender.h, src/zfstream.h: Don't include config.h. * oct-errno.h: Include . * Cell.cc, DLD-FUNCTIONS/regexp.cc, DLD-FUNCTIONS/dlmread.cc, debug.cc, error.cc, file-io.cc, graphics.cc, help.cc, input.cc, lex.l, load-path.cc, load-save.cc, ls-mat-ascii.cc, ls-oct-ascii.cc, oct-stream.cc, octave.cc, variables.cc, ov-fcn-handle.cc, parse.y, pr-output.cc, symtab.cc, sysdep.cc, utils.cc, graphics.h.in: Replace all uses of NPOS with std::string::npos. * ov.cc (octave_value::idx_type_value): Move definition here. * ov.h: From here. * DLD-FUNCTIONS/fsolve.cc (override_options): Don't fail if options_map does not contain an expected keyword. Fix typo in warning identifier. (make_unimplemented_options): Use CamelCase names here. 2008-08-06 Søren Hauberg * error.cc (Ferror): Update format of error messages in exmple. * parse.y: (Feval): Likewise. 2008-08-06 John W. Eaton * DLD-FUNCTIONS/fsolve.cc (hybrd_info_to_fsolve_info): Update INFO values to be compatible with Matlab's current fsolve. (make_unimplemented_options, override_options): New functions. (Ffsolve): Handle optimset options. Update doc string. * ov-usr-fcn.cc (octave_user_function::do_multi_index_op, octave_user_script::do_multi_index_op): Call octave_call_stack::backtrace_error_message. * toplev.h (octave_call_stack::do_pop): Don't call backtrace_error_message here. * toplev.cc, toplev.h (octave_call_stack::do_backtrace_error_message): Rename from octave_call_stack::backtrace_error_message. * toplev.h (octave_call_stack::backtrace_error_message): New public static function. 2008-08-05 John W. Eaton * gripes.cc (gripe_truncated_conversion, gripe_logical_conversion): Don't declare as extern here. * utils.cc (octave_format, octave_vformat): Likewise. * pr-output.cc (octave_print_internal (std::ostream&, const Cell&, bool, int, bool)): Likewise. * toplev.cc (octave_call_stack::backtrace_error_message): New function. * toplev.h: Provide decl. (octave_call_stack::do_pop): Call backtrace_error_message if error_state is nonzero. * pt-unop.cc (tree_prefix_expression::eval_error, tree_postfix_expression::eval_error): Delete. Eliminate all uses. * pt-unop.h: Delete decls. * pt-select.cc (tree_switch_case::eval_error, tree_switch_command::eval_error): Delete. Eliminate all uses. (tree_if_command::eval): Omit "evaluating if command" message. * pt-select.h: Delete decls. * pt-loop.cc (tree_while_command::eval_error, tree_complex_for_command::eval_error, tree_simple_for_command::eval_error, tree_do_until_command::eval_error): Delete. Eliminate all uses. * pt-loop.h: Delete decls. * pt-exp.cc (tree_expression::is_logically_true): Omit "evaluating conditional expression" error message. * pt-decl.cc (tree_global_command::eval): Omit "evaluating global command" error message. (tree_static_command::eval): Omit "evaluating static command" error message. * pt-colon.cc (tree_colon_expression::eval_error): Omit "evaluating colon expression" error message. * pt-colon.h (tree_colon_expression::eval_error): Eliminate default argument value. * pt-idx.cc (tree_index_expression::eval_error): Delete. Eliminate all uses. * pt-idx.h: Delete decl. * pt-binop.cc (tree_binary_expression::eval_error): Delete. * pt-binop.cc, pt-cbinop.cc: Eliminate all uses of eval_error. * pt-binop.h: Delete decl. * pt-assign.cc (tree_simple_assignment::eval_error, tree_multi_assignment::eval_error): Delete. Eliminate all uses. * pt-assign.h: Delete decls. * ov-usr-fcn.cc (octave_user_script::traceback_error, octave_user_function::traceback_error): Delete. Eliminate all uses. * ov-usr-fcn.h: Delete decls. * ov-builtin.cc (octave_builtin::do_multi_index_op): Call gripe_library_exectuion_error on octave_execution_exception. * ov-mex-fcn.cc (octave_mex_function::do_multi_index_op): Likewise. * ov.cc (do_binary_op, do_cat_op, do_unary_op, do_non_const_unary_op): Likewise. * pt-stmt.cc (tree_statement::eval): Likewise. * gripes.cc (gripe_library_execution_error): New function. * gripes.h: Provide decl. * dirfns.cc (Fpathsep): Fix usage of dir_path::path_sep_str. * defaults.cc (set_exec_path, set_image_path): Likewise. * load-path.h (load_path::set_command_line_path): Likewise. * load-path.cc (maybe_add_path_elts, load_path::do_initialize, load_path::do_path, genpath, Fpath): Likewise. (split_path): Fix usage of dir_path::path_sep_char. 2008-08-04 John W. Eaton * symtab.cc (symbol_table::fcn_info::fcn_info_rep::find_autoload): Fix usage of file_ops::dir_sep_chars. * variables.cc (looks_like_struct): Likewise. * ov-fcn-handle.cc (octave_fcn_handle::set_fcn): Likewise. * octave.cc (execute_command_line_file): Likewise. * ls-mat5.cc (read_mat5_binary_element): Likewise. * load-save.cc (find_file_to_load): Likewise. * load-path.cc (load_path::do_find_file): Likewise. * graphics.cc (drawnow): Likewise. * parse.y (frob_function): Likewise. * octave.cc (initialize_pathsearch): Fix usage of file_ops::dir_sep_str. * help.cc (Flookfor): Likewise. * dirfns.cc (Ffilesep): Likewise. (Fautoload): Likewise. * defaults.cc (subst_octave_home): Fix usage of file_ops::dir_sep_char. (Fmfilename): Likewise. 2008-07-31 John W. Eaton * parse.y (assign_lhs): Call force_local_variable on all elements of lexer_flags.pending_local_variables here, then clear the set. (matrix): Clear lexer_flags.pending_local_variable here. * lex.l (lexical_feedback::init): Clear it. (force_local_variable): No longer static. (is_variable): Also return true for names in the lexer_flags.pending_local_variables. (handle_identifier): If we are parsing a matrix list, mark identifiers as pending local variables rather than forcing them to be local variables immediately. * lex.h (lexical_feedback::pending_local_variables): New data member. (force_local_variable): Provide decl. 2008-07-30 John W. Eaton * ov-intx.h, ov.cc: Style fixes. * gripes.cc (gripe_truncated_conversion): Use the warning ID Octave:int-convert-overflow. 2008-07-30 Jaroslav Hajek * gripes.cc (gripe_truncated_conversion): New function. * gripes.h (gripe_truncated_conversion): Declare it. * ops.h (DEFCONVFNX2): New macro. (DEFCONVFN, DEFCONVFN2): Call DEFCONVFNX2 instead of DEFCONVFNX. * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::convert_gripe): New member function. (OCTAVE_VALUE_INT_MATRIX_T::int*_array_value): Call convert_gripe. (OCTAVE_VALUE_INT_SCALAR_T::convert_gripe): New member function. (OCTAVE_VALUE_INT_SCALAR_T::int*_scalar_value): Call convert_gripe. (OCTAVE_VALUE_INT_SCALAR_T::int*_array_value): Call int*_scalar_value. * ov.cc (convert_to_int_array): New function. (int_vector_value): Call convert_to_int_array. 2008-07-30 John W. Eaton * defun-dld.h (DEFUNX_DLD): Eliminate fsname arg. * defun-int.h (DEFINE_FUN_INSTALLER_FUN2, DEFINE_FUN_INSTALLER_FUN3, DEFINE_FUNX_INSTALLER_FUN2): Delete. (DEFINE_FUNX_INSTALLER_FUN): Rename from DEFINE_FUNX_INSTALLER_FUN3. Don't emit fsname function. Don't append cxx_abi to gname. (DEFINE_FUN_INSTALLER_FUN): Define in terms of DEFINE_FUNX_INSTALLER_FUN, not DEFINE_FUN_INSTALLER_FUN2. * dynamic-ld.cc (octave_dynamic_loader::name_mangler, octave_dynamic_loader::name_uscore_mangler): New functions. (octave_dynamic_loader::mangle_name, octave_dynamic_loader::xmangle_name): Delete. (octave_dynamic_loader::do_load_oct): Search for function with name_mangler then name_uscore_mangler. * oct-stream.cc (do_read): New arg, do_NA_conv. Perform NA translation if do_NA_conv is true. (DO_READ_VAL_TEMPLATE, read_fptr): Include the new arg for do_read in decl. (octave_stream::read): Pass do_NA_conv to do_read. 2008-07-29 David Bateman * data.cc (FNA): Add tests for conversion of single to double NA values. * ov-flt-re-mat.cc (Fsingle): Documentation fix. 2008-07-28 David Bateman * error.cc (last_error_id, last_error_message, last_warning_id, last_warning_message): New functions to return the error/warning message and id without exposing the internal values. * error.h (last_error_id, last_error_message, last_warning_id, last_warning_message): Declare them. * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Use them to pass the error to the ErrorHandler function. 2008-07-28 John W. Eaton * error.cc (Flasterror, Flasterr): Unwind-protect error_state. * DLD-FUNCTIONS/__magick_read__.cc (F__magick_write__, write_image): New functions. 2008-07-25 John W. Eaton * DLD-FUNCTIONS/det.cc (Fdet): Return calculated determinant for numerically singular matrices, not 0. * symtab.cc (get_dispatch_type): New function. (symbol_table::fcn_info::fcn_info_rep::find): Use it. * ov-class.cc (set_class_relationship): Delete static function. (Fsuperiorto, Finferiorto): Warn about precedence conflicts. Call symbol_table::set_class_relationship instead of local static function. * symtab.h (symbol_table::class_precedence_table): New data member. (symbol_table::set_class_relationship, symbol_table::is_superiorto): New static functions. 2008-07-24 John W. Eaton * load-path.h (load_path::dir_info::class_info): New struct. (load_path::dir_info::method_file_map_type): Now a map from class name to a to a class_info object. Change all uses. * load-path.cc (load_path::dir_info::get_method_file_map): Also look for private functions in the class directory. (load_path::add_to_method_map): Also add private functions from class directories to private_fcn_map. * dirfns.cc (Fmkdir): If directory already exists, return status = true, but also set error message. 2008-07-23 John W. Eaton * ov-usr_fcn.cc (octave_user_function::do_multi_index_op): Don't unwind_protect and set curr_parent_function here. * toplev.cc (curr_parent_function): Delete definition. * toplev.h: (curr_parent_function): Delete declaration. * ov-usr-fcn.h (octave_user_function::parent_scope): New data member. (octave_user_function::parent_fcn_scope, octave_user_function::stash_parent_fcn_scope): New functions. * ov-usr_fcn.cc (octave_user_function::octave_user_function): Initialize parent_scope. * symtab.cc (symbol_table::fcn_info::fcn_info_rep::find): Check parent of current function by looking at call stack, not global curr_parent_function variable. * parse.y (frob_function): If parsing nested function, stash current parent function scope. * ov-fcn.h (octave_function::parent_fcn_scope): New virtual function. 2008-07-22 Michael Goffioul * graphics.cc (F__go_execute_callback__): New function. * DLD-FUNCTIONS/fltk_backend.cc: Undefine min/max after FLTK headers inclusion. * graphics.h.in (class base_graphics_event, class graphics_event): New classes (replace gh_manager::event_data). (class gh_manager::event_data): Remove. (gh_manager::post_function, gh_manager::do_post_function): Use graphics_event::event_fcn type. (gh_manager::event_queue, gh_manager::do_post_event): Use graphics_event type. * graphics.cc (class callback_event, class function_event, class set_event): Renamed from xxx_data classes. (graphics_event::create_callback_event, graphics_event::create_function_event, graphics_event::create_set_event): Renamed from gh_manager::xxx equivalent methods, removed reference count increment. (gh_manager::do_post_event): Likewise. (gh_manager::do_post_event): Use graphics_event type. (gh_manager::do_post_function): Use graphics_event::event_fcn type. 2008-07-22 John W. Eaton * version.h (OCTAVE_VERSION): Now 3.1.51+. 2008-07-21 John W. Eaton * version.h (OCTAVE_VERSION): Now 3.1.51. (OCTAVE_RELEASE_DATE): Now 2008-07-21. * ov-class.cc (octave_class::subsasgn): Only do internal magic if rhs is not an octave_class object. * OPERATORS/op-struct.cc: Define concatenation operators for struct/matrix concatenation (valid if matrix is empty). * OPERATORS/op-cell.cc (install_cell_ops): Likewise, for cells. * DLD-FUNCTIONS/fltk_backend.cc: Don't include oct.h. Make compilation of entire file conditional on HAVE_FLTK. * gl-render.cc: Make compilation of entire file conditional on HAVE_OPENGL. * Makefile.in (GL_RENDER_SRC, FLTK_BACKEND_SRC): Delete variables. (DLD_XSRC): Always include fltk_backend.cc in the list. (DIST_SRC): Always include gl-render.cc in the list. 2008-07-19 John W. Eaton * version.h (OCTAVE_VERSION): Now 3.1.50+. (OCTAVE_API_VERSION): Now api-v33+. 2008-07-18 John W. Eaton * version.h (OCTAVE_VERSION): Now 3.1.50. (OCTAVE_API_VERSION): Now api-v33. (OCTAVE_RELEASE_DATE): Now 2008-07-18. (OCTAVE_COPYRIGHT): Update date to 2008. 2008-07-18 John W. Eaton * Makefile.in (__magick_read__.df): New rule. Append MAGICK_INCFLAGS to CPPFLAGS. * Makefile.in (EXTRAS): Add graphics-props.cc to the list. List graphics-props.cc as a target generated by genprops.awk. 2008-07-18 Carlo de Falco * gl-render.h: Conditionally include GL/gl.h or OpenGL/gl.h and GL/glu.h or OpenGL/glu.h 2008-07-17 John W. Eaton * symtab.cc (out_of_date_check_internal): New arg, dispatch_type. Use it to handle class methods. * toplev.h (octave_call_stack::do_caller): New function. (octave_call_stack::caller): Use it. 2008-07-17 Jaroslav Hajek * Makefile.in (convhulln.oct, __delaunayn__.oct, __voronoi__.oct, regexp.oct, urlwrite.oct, __glpk__.oct, fltk_backend.oct): Use OCT_LINK_DEPS instead of DL_LDFLAGS for target-specific dependencies. 2008-07-17 David Bateman * DLD-FUNCTION/__magick_read__.cc (F__magick_read__): Allow build without GraphicsMagick++ installed. 2008-07-16 John W. Eaton * graphics.h.in (gh_manager::autolock): Delete copy constructor and assignment definitions. 2008-07-16 Michael Goffioul * graphics.h.in (callback_property::execute): Remove static version. (base_properties::is_hittest, base_properties::is_interruptible, base_properties::is_selected, base_properties::is_selectionhighlight): New convenience property accessors. (base_graphics_object::get_handle, graphics_object::get_handle): Idem. (gh_manager::graphics_lock): New global mutex (gh_manager::lock, gh_manager::unlock, gh_manager::do_lock, gh_manager::do_unlock): Add accessors for it. (gh_manager::autolock): New class for easy locking of the graphics system. (gh_manager::event_data): New class for event management. (gh_manager::event_queue): New object to hold pending events. (gh_manager::callback_objects): New stack of callback objects. (gh_manager::execute_callback, gh_manager:post_callback, gh_manager::post_function, gh_manager::post_set, gh_manager::process_events, gh_manager::flush_events, gh_manager::restore_gcbo): New static methods for event management. (gh_manager::do_execute_callback, gh_manager::do_post_callback, gh_manager::do_post_function, gh_manager::do_post_set, gh_manager::do_process_events, gh_manager::do_post_event, gh_manager::do_restore_gcbo): New non-static versions. * graphics.cc (xreset_gcbo): Remove. (execute_callback): Likewise. (base_property::run_listeners, callback_property::execute): Use gh_manager::execute_callback. (class callback_event_data, class function_event_data, class set_event_data): New classes to implement various types of events. (gh_manager::event_data::create_callback_event, gh_manager::event_data::create_function_event, gh_manager::event_data::create_set_event): Implement event factory methods. (gh_manager::do_restore_gcbo, gh_manager::do_execute_callback, gh_manager::do_post_event, gh_manager::do_post_callback, gh_manager::do_post_function, gh_manager::do_post_set, gh_manager::do_process_events): New methods for event management. (Fishandle, Fset, Fget, F__get__, F__go_figure__, F__go_delete__, F__go_axes_init__, F__go_handles__, F__go_figure_handles__, Favailable_backends, Fdrawnow, Faddlistener, Faddproperty, get_property_from_handle, set_property_in_handle): Lock graphics system. (GO_BODY): Likewise. (Fdrawnow): Support single "expose" argument. 2008-07-15 John W. Eaton * DLD-FUNCTIONS/__convn__.cc (convn): Cast second arg to octave_idx_type in call to std::max. 2008-07-14 John W. Eaton * Makefile.in (convhulln.oct, __delaunayn__.oct, __voronoi__.oct, regexp.oct, urlwrite.oct, __glpk__.oct, fltk_backend.oct): Simplify with target-specific settings for DL_LDFLAGS. * DLD-FUNCTIONS/__magick_read__.cc: Delete "using namespace std" and "using namespace Magick" directives. Style fixes. * oct-conf.h.in (OCTAVE_CONF_MAGICK_INCFLAGS, OCTAVE_CONF_MAGICK_LIBS): Substitute here. * toplev.cc (octave_config_info): Include MAGICK_INCFLAGS and MAGICK_LIBS in the struct. * Makefile.in (DLD_XSRC): Add __magick_read__.cc to the list. (OCTAVE_LIBS): Add $(MAGICK_LIBS) to the list for static linking case. (__magick_read__.d, __magick_read__.o, pic/__magick_read__.o): Append MAGICK_INCFLAGS to CPPFLAGS. (__magick_read__.oct): Append MAGICK_LIBS to LDFLAGS. 2008-07-14 Thomas L. Scofield * DLD-FUNCTIONS/__magick_read__.cc: New file from Octave Forge. 2008-07-11 John W. Eaton * syscalls.cc (const_value): Delete arg NM. Change all uses. * DLD-FUNCTIONS/fft.cc (do_fft): Avoid GCC warning. * DLD-FUNCTIONS/fft2.cc (do_fft2): Likewise. * DLD-FUNCTIONS/fftn.cc (do_fftn): Likewise. * DLD-FUNCTIONS/qr.cc (Fqrshift): Likewise. * DLD-FUNCTIONS/lookup.cc (Flookup): Likewise. * gl-render.cc (opengl_renderer::draw): Likewise. * graphics.cc (axes::update_axis_limits, hggroup::update_axis_limits, Favailable_backends): Likewise. * pt-cmd.cc (tree_no_op_command::dup, tree_function_def::dup): Likewise. * pt-const.cc (tree_constant::dup): Likewise. * pt-id.cc (tree_identifier::dup): Likewise. * pt-jump.cc (tree_break_command::dup, tree_continue_command::dup, tree_return_command::dup): Likewise. * DLD-FUNCTIONS/colamd.cc: Style fixes. (tree_postorder): Rename from TreePostorder. (tree_postorder, coletree): Avoid GCC warnings. * DLD-FUNCTIONS/chol.cc (Fchol): Avoid GCC warnings. (Fcholdelete, Fcholshift): Delete unused arg nargout. * toplev.cc, toplev.h (octave_call_stack::caller_user_function, octave_call_stack::caller_user_script, octave_call_stack::do_caller_user_function, octave_call_stack::do_caller_user_script): Delete functions and decls. * defun.cc (print_usage): Call octave_call_stack::caller_user_code, not octave_call_stack::caller_user_function. * debug.cc (get_user_code): Likewise. * toplev.h (octave_call_stack::difference_type): Delete typedef. * toplev.cc, toplev.h (octave_call_stack::caller_user_code_line, octave_call_stack::do_caller_user_code_line, octave_call_stack::caller_user_code_column, octave_call_stack::do_caller_user_code_column, octave_call_stack::caller_script, octave_call_stack::do_caller_script, octave_call_stack::caller_user_function, octave_call_stack::do_caller_user_function, octave_call_stack::caller_user_code, octave_call_stack::do_caller_user_code): Delete unused difference_type arg. * ov-float.h, ov-flt-re-mat.cc, ov-range.h, ov-re-mat.h, ov-re-sparse.cc, ov-scalar.h: Check for NaN in bool_value and bool_array_value member functions to bool. * ops.h (DEFSCALARBOOLOP_OP): New macro. * OPERATORS/op-s-s.cc, OPERATORS/op-fs-fs.cc: Use it to define el_and and el_or ops. 2008-07-10 David Bateman * DLD-FUNCTIONS/lookup.cc (assign): Delete. (Flookup): Use new NDArray constructors rather than assign. * data.cc (Fsort): Use new NDArray constructors rather than directly assigning. * besselj.cc (int_array2_to_matrix, int_arrayn_to_array, int_array2_to_float_matrix, int_arrayn_to_float_array): Delete. (do-bessel): Use new NDArray constructors. * max.cc (MINMAX_SPARSE_BODY, MINMAX_INT_BODY, MINMAX_SINGLE_BODY, MINMAX_DOUBLE_BODY): Use new NDArray constructors. * ov-bool.h (array_value, float_array_value): Explictly cast boolean scalar to double before the assignment to avoid ambiguity. 2008-07-10 David Bateman * ls-mat4.cc (read_mat_binary_data, save_mat_binary_data): Add loading and saving of sparse matrices. 2008-07-10 Michael Goffioul * Makefile.in: Add OPENGL_LIBS to liboctinterp link command. Add GRAPHICS_CFLAGS to fltk_backend.cc compilation command. * data.cc: Define hypotf to _hypotf when not present. * gl-render.h: Replace OCTGRAPHICS_API with OCTINTERP_API. * gl-render.cc: Get rid of Array2. * OPERATORS/op-int.h: Use powf instead of pow when invoked with float arguments. 2008-07-09 John W. Eaton * input.cc (get_debug_input): Don't delete global_command here. * toplev.cc (main_loop): Undo previous change. * toplev.h (octave_call_stack::instance_ok): Push top scope when creating instance. * DLD-FUNCTIONS/inv.cc (Finv): Avoid GCC warning. * DLD-FUNCTIONS/expm.cc (Fexpm): Avoid GCC warning. * ov-fcn-inline.cc (octave_fcn_inline::load_ascii): Avoid GCC warning. 2008-07-09 Michael Goffioul * gl-render.cc (opengl_renderer::draw(figure)): Enable line smoothing according to __enhanced__ property. (opengl_renderer::draw_marker): Only draw markers with valid call lists ID. (opengl_renderer::make_marker_list): Do not produce filled marker call list for non-fillable markers. (opengl_renderer::draw(axes)): Do not antialias axes system. * gl-render.cc (opengl_renderer::set_polygon_offset): Also enable polygon offseting in GL_LINE mode. (opengl_renderer::draw_marker): Offset markers foward instead of backward (to draw them above lines). * Makefile.in: new substituted variables GL_RENDER_SRC and FLTK_BACKEND_SRC. * gl-render.cc (vertex_data::vertex_data_rep::vertex_data(void), vertex_data::vertex_data(void), vertex_data::vertex_data(...)): initialize reference counting correctly. 2008-07-09 John W. Eaton * toplev.cc (main_loop): Unwind-protect global_command. * input.cc (get_debug_input): Likewise. 2008-07-09 David Bateman * pt-id.cc (octave_value_list tree_identifier::rvalue (int), octave_lvalue tree_identifier::lvalue (void)): Remove MAYBE_DO_BREAKPOINT. 2008-07-08 John W. Eaton * graphics.h.in (axes::properties::keypos): Declare as any_property instead of double_property. 2008-06-28 John W. Eaton * debug.cc (push_dummy_call_stack_elt): Delete. (Fdbstack): Don't push dummy stack elt. Use nskip instead of nframes, and curr_frame instead of idx. Pass curr_frame to octave_call_stack::backtrace. * ls-mat5.cc (read_mat5_binary_element): Explicitly pass 0 for current_context in call to symbol_table::varref. * ov-fcn-handle.cc (octave_fcn_handle::load_ascii): Likewise. Fix test. * mex.cc (mexGetVariable, mexPutVariable): Use octave_call_stack methods to manipulate scope and context. * parse.y (source_file, Fassignin, Fevalin): Likewise. * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Call octave_call_stack::push after call to symbol_table::push_scope. Call unwind_protect::add with octave_call_stack::unwind_pop immediately after call to octave_call_stack::push. * symtab.cc (symbol_table::xcurrent_caller_scope): Delete definition. * symtab.h (symbol_table::xcurrent_caller_scope): Delete decl. Delete all uses. (xcurrent_context_this_table): Delete. Delete all uses. (symbol_table::current_caller_scope): Delete. * toplev.cc (octave_call_stack::do_num_user_code_frames): New function. (octave_call_stack::do_backtrace): New arg, curr_user_frame. Rename nframes arg to nskip. Correctly handle curr_frame not at end of stack. (octave_call_stack::do_goto_frame_relative): Rename n arg to nskip. Correctly handle curr_frame not at end of stack. (octave_call_stack::do_goto_caller_frame): New function. (octave_call_stack::do_goto_base_frame): New function. * toplev.h: Provide decls for new functions. (octave_call_stack::call_stack_elt::prev): New data member. Initialize it in constructor. (octave_call_stack::const_reverse_iterator, octave_call_stack::reverse_iterator): New typedefs. (octave_call_stack::symbol_table::scope_id current_scope, octave_call_stack::symbol_table::context_id current_context, octave_call_stack::num_user_code_frames, octave_call_stack::goto_caller_frame, octave_call_stack::goto_base_frame, octave_call_stack::do_num_user_code_frames, octave_call_stack::do_current_scope, octave_call_stack::do_current_context): New functions. (octave_call_stack::push): Default value for context arg is symbol_table::current_context, not 0. (octave_call_stack::do_push): Save previous frame. Always push new frame on back of stack. Call symbol_table::set_scope_and_context. (octave_call_stack::do_pop): Restore previous frame. Always pop frame from back of stack. Call symbol_table::set_scope_and_context. 2008-06-26 John W. Eaton * token.h: Omit "class symbol_table::symbol_record" decl; * lex.l (grab_block_comment): Use parens around || expression within && expression. 2008-06-23 John W. Eaton * debug.cc (Fdbstack): Avoid shadowed variable warning. 2008-06-23 Jaroslav Hajek * genprops.awk (emit_source): Avoid gensub for portability. (BEGIN): Ditto. 2008-06-20 Jaroslav Hajek * DLD-FUNCTIONS/regexp.cc (octregexp_list): Make "once" an output argument. (octregexp): Do not use cell arrays when "once" is requested. * ov.cc (make_vector_dims): New function. (vector_value, complex_vector_value, float_vector_value, float_complex_vector_value): Query N-d array values and simplify, avoid copying. (column_vector_value, complex_column_vector_value, float_column_vector_value, float_complex_column_vector_value, row_vector_value, complex_row_vector_value, float_row_vector_value, float_complex_row_vector_value): Simplify to trivial wrappers. (int_vector_value): Avoid conversions if integer type, query N-d array value, simplify. 2008-06-17 John W. Eaton * toplev.h, toplev.cc (class octave_call_stack): Push elements on and pop from back of queue. (octave_call_stack::do_push, octave_call_stack::do_pop): Always adjust curr_frame. (octave_call_stack::size, octave_call_stack::do_size): New functions. * pt-stmt.cc (tree_statement::eval): Also call octave_call_stack::set_statement when debugging. * debug.cc (push_dummy_call_stack_elt): New function. (Fdbstack): Omit dbstack from call stack by popping element rather than adjusting frame number. Correctly handle arg. 2008-06-12 David Bateman * DLD-FUNCTIONS/qr.cc (Fqrupdate, Fqrinsert, Fqrshift, Fqrdelete): Allow single precision arguments, add tests for single precision. 2008-06-11 John W. Eaton * ov-base.cc (octave_base_value::streamoff_value, octave_base_value::streamoff_array_value): Delete. * ov-base.h: Delete decls. (octave_base_value::is_streamoff): Delete. * ov-float.cc (octave_float_scalar::streamoff_value, octave_float_scalar::streamoff_array_value): Delete. * ov-float.h: Delete decls. * ov-flt-re-mat.cc (octave_float_matrix::streamoff_array_value): Delete. * ov-flt-re-mat.h: Delete decl. * ov-re-mat.cc (octave_matrix::streamoff_array_value): Delete. * ov-re-mat.h: Delete decl. * ov-re-sparse.cc (octave_sparse_matrix::streamoff_array_value): Delete. * ov-re-sparse.h: Delete decl. * ov-scalar.cc (octave_scalar::streamoff_value, octave_scalar::streamoff_array_value): Delete. * ov-scalar.h: Delete decls. * ov.cc (octave_value::octave_value (const streamoff_array&), octave_value::octave_value (const ArrayN&), octave_value::streamoff_value (void) const, octave_value::streamoff_array_value (void) const): Delete. * ov.h: Delete decls. (octave_value::is_streamoff): Delete. * ov.cc (install_types): Don't register streamoff type. * ov-streamoff.h, ov-streamoff.cc, OPERATORS/op-streamoff.cc: Delete. * Makefile.in: Delete them from the lists. * error.cc (verror): Restore newline in msg_string. Stripping "error: " prefix when buffering error messages is no longer neeed. 2008-06-25 David Bateman * pr-output.cc (Frats): Print usage if nargin == 0. 2008-06-10 John W. Eaton * mexproto.h (mxCreateLogicalScalar): Declar arg as mxLogical, not int. 2008-06-09 John W. Eaton * graphics.cc (execute_callback): Pass CB by const reference and explicitly make a copy. (xget_ancestor): Pass GO by const reference and explicitly make a copy. * error.cc (verror): Omit "name: " and "\a" from Vlast_error_msg. Save line and column information from user code. * toplev.cc (octave_call_stack::do_caller_user_code_line, octave_call_stack::do_caller_user_code_column): New functions. * toplev.h: Provide decls. (octave_call_stack::caller_user_code_line, octave_call_stack::caller_user_code_column): New functions. (octave_call_stack::current_line, octave_call_stack::current_column): Default return value is -1, not 0. 2008-06-06 John W. Eaton * ov.h (octave_value::erase_subfunctions): New function. * ov-base.h (octave_base_value::erase_subfunctions): New virtual function. * ov-usr-fcn.h (octave_user_function::erase_subfunctions): New function. * symtab.h (symbol_table::fcn_info::::erase_subfunction, symbol_table::fcn_info::fcn_info_rep::erase_subfunction, symbol_table::erase_subfunctions_in_scope): New functions. (symbol_table::fcn_info::fcn_info_rep::clear_user_function): Erase subfunctions here. * variables.cc (Fmlock): Doc fix. 2008-06-05 John W. Eaton * gl-render.cc (opengl_renderer::draw): Correctly avoid shadow warnings from gcc for xmin, xmax, ymin, ymax, zmin, and zmax. * graphics/ChangeLog, graphics/Makefile.in, graphics/Makerules.in, graphics/fltk_backend/Makefile.in, graphics/opengl/Makefile.in: Delete. * gl-render.cc, gl-render.h: Move here from src/graphics/opengl. * Makefile.in: Add them to the appropriate lists. (octave$(EXEEXT)): Also link with $(OPENGL_LIBS) * fltk_backend.cc: Move here from src/graphics/fltk_backend. * Makefile.in (DLD_XSRC): Add it to the list (fltk_backend.oct): Include special rules for linking with $(GRAPHICS_LIBS) and $(FT2_LIBS). * dynamic-ld.cc (octave_dynamic_loader::mex_mangler, octave_dynamic_loader::mex_uscore_mangler, octave_dynamic_loader::mex_f77_mangler): New functions. (octave_dynamic_loader::do_load_mex): Use them. (octave_dynamic_loader::do_remove_oct): Rename from octave_dynamic_loader::do_remove. (octave_dynamic_loader::do_remove_mex): New function. * dynamic-ld.h: Provide/fix decls. * graphics.cc (properties::update_normals): Style fixes. * graphics.h.in: Style fixes. ChangeLog entries for gl-render.h, gl-render.cc, and fltk_backend.cc before the move: 2008-06-05 John W. Eaton * opengl/gl-render.cc (xmin): New static function. * opengl/gl-render.h (opengl_renderer): Style fixes. * fltk_backend/fltk_backend.cc: Style fixes. 2008-04-26 Michael Goffioul * opengl/gl-render.h (opengl_renderer::draw(hggroup)): New method. * opengl/gl-render.cc (opengl_renderer::draw(hggroup)): Likewise. (opengl_renderer::draw(graphics_object)): Call it. 2008-03-17 Shai Ayal * fltk_backend/fltk_backend.cc (plot_window::resize, plot_window::draw): make canvas the size of figure.position 2008-03-09 Shai Ayal * fltk_backend/fltk_backend.cc (plot_window::handle): add zoom stack 2008-03-06 Shai Ayal * fltk_backend/fltk_backend.cc (plot_window::handle): Add handling of the 'a' and 'g' keys (plot_window: toggle_grid): New helper function (plot_window): Add new togglegrid button 2008-03-01 Shai Ayal * fltk_backend/fltk_backend.cc (OpenGL_fltk::draw_overlay, OpenGL_fltk::zoom, OpenGL_fltk::set_zoom_box): Added to support zoom box (plot_window::handle): Added zoom box code, B-3 now does autoscale (plot_window::axis_auto): New utility function to call axis("auto") (plot_window::button_press): "A" button now does autoscale * opengl/gl-render.cc (make_marker_list): Add the "+x*.^v><" markers 2008-02-27 Michael Goffioul * opengl/gl-render.cc (opengl_renderer::draw(patch), opengl_renderer::draw(surface)): Adapt to type change of facealpha and edgealpha, using double_radio_property class. 2008-02-26 Michael Goffioul * opengl/gl-render.h: Make sure windows.h is included before OpenGL headers. * fltk_backend/Makefile.in (FLTK_EXTRA_CXXFLAGS): Use $(srcdir) for includesion of OpenGL renderer headers. (Makeconf): Move inclusion of Makeconf later on, to avoid freezing MinGW make. * fltk_backend/Makefile.in (GRAPHICS_CFLAGS): New substituted variable. 2008-02-25 Shai Ayal * fltk_backend/fltk_backend.cc (class plot_window): Many changes to use figure::properties instead of figure handle to reference the figure (class figure_manager): ditto (__fltk_redraw__): moved most of functionality into the figure_manager class (plot_window::pixel2pos): Modified to use axes::pixel2coord (plot_window::pixel2staus): Modified to use pixel2pos (plot_window::handle): Added zoom with mouse 2008-02-24 Shai Ayal * fltk_backend/fltk_backend.cc (OpenGL_fltk::Draw): removed double buffer switch (OpenGL_fltk::setup_viewport): removed call to glOrtho -- gl-render takes care of all the transformations 2008-02-23 Shai Ayal * fltk_backend/fltk_backend.cc (plot_window::mark_modifed): mark the whole window as damaged (otherwise changing figure.postion does not have immediate effect) (plot_window::draw): New function, checks for window size (__fltk_maxtime__): New DEFUN to allow tweaking of fltk timeout (__fltk_redraw__): Use fltk_maxtime as timeout 2008-02-21 Michael Goffioul * opengl/gl-render.cc (opengl_renderer::patch_tesselator::combine): Protect against NULL vertex data. * opengl/gl-render.cc (opengl_renderer::draw(patch)): Add marker rendering of patch objects. 2008-02-21 Shai Ayal * opengl/gl-render.cc: remove OpenGL includes * opengl/gl-render.h: add OpenGL includes * fltk_backend/fltk_backend.cc: remove OpenGL includes (__fltk_redraw__): put figure handle into the figure's __plot_stream__ property for later (fltk_backend::close_figure): use argument as figure handle to close 2008-02-20 Shai Ayal * fltk_backend/Makefile.in: initial import * fltk_backend/fltk_backend.cc: initial import 2008-02-20 Michael Goffioul * opengl/gl-render.h (opengl_renderer::draw(patch)): New method to render patch objects. (class opengl_renderer::patch_tesselator): Forward declaration. * opengl/gl-render.cc (opengl_texture::create): Use RGB data format instead of RGBA. (class opengl_tesselator): New classes to abstract GLU tessellation process. (class opengl_renderer::patch_tesselator): New class to render opaque patch objects. (class vertex_data): New class to hold vertex data during tessellation of patch objects. (opengl_renderer::draw(patch)): New method to render patch objects (no transparency, no border, no marker yet). (opengl_renderer::draw(graphics_object)): Dispatch to it. * opengl/gl-render.cc (opengl_renderer::draw(patch)): Use patch color data and support face/vertex single color specification. * opengl/gl-render.cc (opengl_tesselator::begin_polygon): Set tessellation property also for non-filled polygons. (opengl_renderer::patch_tesselator::vertex): Protect against empty color matrices. (opengl_renderer::draw(patch)): Render patch border (no transparency yet). 2008-02-19 Michael Goffioul * opengl/gl-render.cc (opengl_texture::texture_rep::tex_coord, opengl_texture::tex_coord): New wrapper around glTexCoord2d. (opengl_renderer::draw(surface)): Use it for texturemap implementation. (opengl_renderer::draw(surface)): Fix indexing bug when creating clip matrix. (opengl_texture::operator=): Add assignment operator. (opengl_texture::create): New static opengl_texture creator. (opengl_texture::is_valid): New accessor. 2008-02-18 Michael Goffioul * opengl/gl-render.cc (class opengl_texture): New class to wrap texture operations in OpenGL. 2008-02-17 Michael Goffioul * opengl/gl-render.cc (opengl_renderer::draw(surface)): Set material color when rendering surface facets. * opengl/gl-render.cc (opengl_renderer::draw(surface)): Add rendering of mesh and markers. 2008-02-16 Michael Goffioul * opengl/gl-render.cc (opengl_renderer::draw(figure)): Initialize the OpenGL context correctly. (opengl_renderer::draw(surface)): Add missing glEnd call. 2008-02-14 Michael Goffioul * opengl/gl-render.h opengl/gl-render.cc: Add rendering interface for surface objects (actual implement still missing). 2008-02-14 Michael Goffioul * Makefile.in Makerules.in: Initial import * opengl/Makefile.in: Likewise. * opengl/gl-render.h opengl/gl-render.cc: Likewise. 2008-06-04 Shai Ayal * graphics.cc (axes::properties::set_defaults): Preserve position if mode is replace. (axes::properties::sync_positions): Use default_axes_postion for consistency. * graphics.h.in (axes::properties::sync_positions, axes::properties::update_position, axes::properties::update_outerposition): New functions to sync outerposition and position. * graphics.h.in (axes::properties::update_xlim, axes::properties::update_ylim, axes::properties::update_zlim): pass is_logscale flag to axes::properties::calc_ticks_and_lims * graphics.cc (axes::properties::calc_ticks_and_lims): Added support for log scale * graphics.h.in (axes::properities::fix_limits) : New method. (axes::properties::update_xlim, axes::properties::update_ylim, axes::properties::update_zlim): Use fix_limits. * graphics.cc (axes::properties::calc_ticks_and_lims): Make sure that lo <= hi. * graphics.h.in (axes::pixel2coord, axes::coord2pixel): New functions. * graphics.cc (convert_position): No longer static. * graphics.h.in: Provide decl. * graphics.cc (Favailable_backends): New function. * graphics.h.in (base_graphics_backend::available_backends_list): New function. * graphics.cc (axes::properties::calc_ticks_and_lims): Refactor. Adjust axes limits & tics together so that the result is consistent. (axes::properties::calc_tick_sep): Ditto. (axes::properties::get_axis_limits): Ditto. Now a member of axes::properties (magform): Now file-scope static function instead of axes::properties member function. * graphics.h.in (axes::properties::update_xlim): call the new axes::properties::calc_ticks_and_lims method (axes::properties::update_ylim): ditto (axes::properties::update_zlim): ditto 2008-06-04 Michael Goffioul * ov-fcn-inline.h (class octave_fcn_inline): Mark with OCTINTERP_API. * ov-fcn-handle.h (class Octave_fcn_handle): Likewise. * ls-oct-binary.h (save_binary_data, read_binary_data): Likewise. * genprops.awk (emit_source): Fix if-then-else statement generation when the first property is hidden. * graphics.h.in (base_properties::adopt): Call mark_modified. (class hggroup): New graphics object class. * graphics.cc (lookup_object_name, make_graphics_object_from_type, property_list::lookup, property_list::set, root_figure::init_factory_properties): Support hggroup as possible object type. (hggroup::update_axis_limits): New graphics object class. (make_graphics_object): Look for "parent" property in the arguments and use it as actual parent for the created object. (F__go_hggroup__): New function. (F__go_delete__): Set Vdrawnow_requested to true. * graphics.h.in (base_property::clone, string_property::clone, radio_property::clone, color_property::clone, double_property::clone, double_radio_property::clone, array_property::clone, row_vector_property::clone, bool_property::clone, handle_property::clone, callback_property::clone, any_property::clone, property::clone): New virtual method. (property::create): New static method to create dynamic properties. (base_properties::has_property): New method to check the existence of a property. (any_property::any_property, row_vector_property::row_vector_property, double_radio_property::double_radio_property): New copy constructors. * graphics.cc (lookup_object_name): New static utility function. (make_graphics_object_from_type): Likewise. (gh_manager::do_make_graphics_handle): Use it. (dprop_obj_map): New static map used for chaching purpose in dynamic property creation. (property::create): New static method to create dynamic properties. (base_properties::has_property): New method to check the existence of a property. (base_properties::override_defaults): Check parent validity. (Faddlistener): Documentation fix. (Faddproperty): New function to create dynamic properties. * genprops.awk (emit_get_array): Don't produce get_xxx_property accessors. * graphics.h.in (array_property::get_limits): New method to return the array limits. (base_properties::get_xdata_property, base_properties::get_ydata_property, base_properties::get_zdata_property, base_properties::get_ldata_property, base_properties::get_udata_property, base_properties::get_xldata_property, base_properties::get_xudata_property, base_properties::get_cdata_property): Remove methods, replaced with limit-based equivalent. (base_graphics_object::get_xdata_property, base_graphics_object::get_ydata_property, base_graphics_object::get_zdata_property, base_graphics_object::get_ldata_property, base_graphics_object::get_udata_property, base_graphics_object::get_xldata_property, base_graphics_object::get_xudata_property, base_graphics_object::get_cdata_property): Likewise. (graphics_object::get_xdata_property, graphics_object::get_ydata_property, graphics_object::get_zdata_property, graphics_object::get_ldata_property, graphics_object::get_udata_property, graphics_object::get_xldata_property, graphics_object::get_xudata_property, graphics_object::get_cdata_property): Likewise. (base_properties::get_xlim, base_properties::get_ylim, base_properties::get_zlim, base_properties::get_clim, base_properties::get_alim, base_properties::is_xliminclude, base_properties::is_yliminclude, base_properties::is_zliminclude, base_properties::is_climinclude, base_properties::is_aliminclude): New methods. (base_graphics_object::get_xlim, base_graphics_object::get_ylim, base_graphics_object::get_zlim, base_graphics_object::get_clim, base_graphics_object::get_alim, base_graphics_object::is_xliminclude, base_graphics_object::is_yliminclude, base_graphics_object::is_zliminclude, base_graphics_object::is_climinclude, base_graphics_object::is_aliminclude): Likewise. (graphics_object::get_xlim, graphics_object::get_ylim, graphics_object::get_zlim, graphics_object::get_clim, graphics_object::get_alim, graphics_object::is_xliminclude, graphics_object::is_yliminclude, graphics_object::is_zliminclude, graphics_object::is_climinclude, graphics_object::is_aliminclude): Likewise. (base_graphics_object::update_axis_limits): Provide default behavior by passing the call to the parent object. (line::properties::xdata, line::properties::ydata, line::properties::zdata, line::properties::ldata, line::properties::udata, line::properties::xldata, line::properties::xudata): Replace 'l' modifier with 'u'. (line::properties::xlim, line::properties::ylim, line::properties::zlim, line::properties::xliminclude, line::properties::yliminclude, line::properties::zliminclude): New hidden properties. (line::properties::update_xdata, line::properties::update_ydata, line::properties::update_zdata, line::properties::update_xldata, line::properties::update_xudata, line::properties::update_ldata, line::properties::update_udata): New updaters that update limit properties. (line::properties::compute_xlim, line::properties::compute_ylim): New method to compute actual limits taking into account x/y data and upper/lower bounds. (text::properties::position): Add 'u' modifier. (text::properties::xlim, text::properties::ylim, text::properties::zlim, text::properties::xliminclude, text::properties::yliminclude, text::properties::zliminclude): New hidden properties. (text::properties::update_position): New updater that updates limit properties. (image::properties::xdata, image::properties::ydata, image::properties::cdata): Replace 'l' modifier with 'u'. (image::properties::cdatamapping): Add 'l' modifier. (image::properties::xlim, image::properties::ylim, image::properties::clim, image::properties::xliminclude, image::properties::yliminclude, image::properties::climinclude): New hidden properties. (image::properties::get_climinclude, image::properties::is_climinclude): Provide specialized inline accessors. (image::properties::update_xdata, image::properties::update_ydata, image::properties::update_cdata): New updaters that update limit properties. (patch::properties::xdata, patch::properties::ydata, patch::properties::zdata, patch::properties::cdata): Replace 'l' modifier with 'u'. (patch::properties::cdatamapping): Add 'l' modifier. (patch::properties::alphadatamapping): New property. (patch::properties::xlim, patch::properties::ylim, patch::properties::zlim, patch::properties::clim, patch::properties::alim, patch::properties::xliminclude, patch::properties::yliminclude, patch::properties::zliminclude, patch::properties::climinclude, patch::properties::aliminclude: New hidden properties. (patch::properties::get_climinclude, patch::properties::is_climinclude, patch::properties::get_aliminclude, patch::properties::is_aliminclude): Provide specialized inline accessors. (patch::properties::update_xdata, patch::properties::update_ydata, patch::properties::update_zdata, patch::properties::update_cdata): New updaters that update limit properties. (surface::properties::xdata, surface::properties::ydata, surface::properties::zdata, surface::properties::cdata, surface::properties::alphadata): Replace 'l' modifier with 'u'. (surface::properties::cdatamapping, surface::properties::alphadatamapping): Add 'l' modifier. (surface::properties::xlim, surface::properties::ylim, surface::properties::zlim, surface::properties::clim, surface::properties::alim, surface::properties::xliminclude, surface::properties::yliminclude, surface::properties::zliminclude, surface::properties::climinclude, surface::properties::aliminclude: New hidden properties. (surface::properties::get_climinclude, surface::properties::is_climinclude, surface::properties::get_aliminclude, surface::properties::is_aliminclude): Provide specialized inline accessors. (surface::properties::update_xdata, surface::properties::update_ydata, surface::properties::update_zdata): Update limit properties. (surface::properties::update_cdata, surface::properties::update_alphadata): New updaters that update limit properties. * graphics.cc (base_properties::update_axis_limits): Simply call update_axis_limits in owning graphics_object. (base_graphics_object::update_axis_limits): Provide default behavior by passing the call to the parent object. (check_limits_vals(double&,double&,double&,const octave_value&)): New static method to work with new limit properties in graphics objects. (get_children_limits): New static method to compute the raw limits of a set of children, based on the new limit properties. (axes::update_axis_limits): Simplify and call get_children_limits. Add handling of alpha limits. (line::properties::compute_xlim, line::properties::compute_ylim): New methods to compute line limits taking into account upper/lower bounds. * graphics.cc (axes::properties::sync_positions): Update transformation data. * graphics.cc (Faddlistener): Rename from Fadd_listener. * graphics.h.in (axes::properties::pixel2coord): Center Z coordinate on x_zlim instead of 0. (axes::properties::zoom, axes::properties::unzoom, axes::properties::clear_zoom_stack): New methods to handle zoom stack. (axes::properties::zoom_stack): New field to hold zoom stack. (axes::properties::update_xlim, axes::properites::update_ylim): Additional do_clr_zoom argument to control whether the zoom stack will be cleared. (axes::properties::update_zlim): Clear zoom stack. * graphics.cc (axes::properties::zoom, axes::properties::unzoom, axes::properties::clear_zoom_stack): New methods to handle zoom stack. * genprops.awk (emit_source): Use all properties in factory defaults. * graphics.h.in (base_property::base_property): Set internal counter to 1 by default. (property::property): Adapt constructors to default counter value in base_property. * graphics.h.in (base_properties::get_property): Make virtual and remove const modifier. * graphics.cc (base_properties::get_property): Can return built-in properties. Generate an error if the property does not exist. (base_properties::add_listener): Use get_property. (Fadd_listener): Add documentation. * genprops.awk (emit_common_declarations, emit_source): Emit code for overloaded get_property method. * genprops.awk (emit_declarations): Run listeners in the property setter methods. * graphics.h.in (enum listener_mode): New enum type for listeners. (base_property::set): Make non-virtual and handle listeners execution. (base_property::listeners): New field holding a map of listeners. (base_property::add_listener, base_property::run_listeners, base_property::do_set): New methods to handle listeners. (property::add_listener, property::run_listeners): Likewise. (base_properties::add_listener): Likewise. (base_graphics_object::add_property_listener, graphics_object::add_property_listener): Likewise. (all property classes): Rename set to do_set and make it protected. * graphics.cc (base_property::run_listeners): New method to execute listeners. (color_property::set, double_radio_property::set, handle_property::set): Rename to do_set. (base_properties::add_listener): New method to handle listener additio. Only handle dynamic properties. (Fadd_listener): New octave interface to add property listeners to graphics object. * genprops.awk (emit_get_data): Remove. (emit_declarations): Treat row_vector_property as array_property and remove data_property references. * graphics.h.in (array_property::array_property(array_property)): Add copy constructor. (class data_property): Remove (replaced by array_property). (class base_graphics_backend, class graphics_backend): Replace data_property references with array_property. (line::properties::xdata, line::properties::ydata, line::properties::zdata, line::properties::ldata, line::properties::udata, line::properties::xldata, line::properties::xudata): Turn into row_vector_property. (image::properties::xdata, image::properties::ydata): Likewise. (image::properties::init): Add length constraints for xdata and ydata. (patch::properties::xdata, patch::properties::ydata, patch::properties::zdata, patch::properties::facevertexalphadata): Turn into array_property. (surface::properties::xdata, surface::properties::ydata, surface::properties::zdata): Likewise. (patch::properties::init): Add size constraints for xdata, ydata, zdata and facevertexalphadata. (surface::properties::init): Add size constraints for xdata, ydata and zdata. * graphics.cc (check_limit_vals): Remove override with data_property. (axes::update_axis_limits): Replace data_property references with array_property. * graphics.h.in (root_figure::get_default): Use factory defaults when no explicit default value exists. (figure::properties::set___backend__): Reset __plot_stream__ to empty value. * graphics.cc (gh_manager::gh_manager): Call graphics_backend::default_backend to make sure the default backend is initialized. * graphics.h.in (patch::properties::edgealpha, surface::properties::facealpha, surface::properties::edgealpha): Fix typos in property names. * graphics.h.in (class double_radio_property): New property class for holding face/edge alpha values. (patch::properties::facealpha, patch::properties::edgealpha, surface::properties::facealpha, surface::properties::edgealpha): Use double_radio_property class. * graphics.cc (double_radio_property::set): Implement new property class. * genprops.awk (emit_get_double_radio): New function to emit code for double_radio_property. (emit_declarations): Use it. * graphics.h.in (array_property::array_property(void)): New default constructor. (array_property::xmin, array_property:xmax, array_property::xminp, array_property::min_val, array_property::max_val, array_property::min_pos): New fields and accessors to hold min/max values of the array data. (array_property::get_data_limits): New method to compute min/max values of the array data. (base_properties::get_cdata_property, graphics_object::get_cdata_property): Return array_property. (image::properties::cdata, surface::properties::cdata, patch::properties::cdata, patch::properties::facevertexcdata): Turn into array_property type. (image::properties::init, surface::properties::init, patch::properties::init): Add constraint initialization for cdata and facevertexcdata (patch only). * genprops.awk (emit_get_array): New function to emit accessor for array_property. (emit_declarations): Use it. * graphics.cc (get_array_limits): New template function to compute min/max values of an Array object. (array_property::get_data_limits): New method to compute min/max values of the array data, using get_array_limits. (check_limit_vals): Overridden function with array_property. (axes::update_axis_limits): Turn cdata property into array_property. * graphics.h.in (patch::properties::get_color_data): New utility function to retrieve actual color data. * graphics.cc (patch::properties::get_color_data): Likewise. * graphics.h.in (base_scaler::is_linear, lin_scaler::is_linear, scaler::is_linear): New method to detect linear scales. (graphics_xform::scale(Matrix)): New method to scale 2D/3D coordinates directly. (patch::properties::facelighting): Set default value to "none". * graphics.h.in (axes::axes): Be sure to initialize transformation data correctly. * graphics.cc (xget_ancestor): Pass graphics_object argument by value instead of by reference. * graphics.h.in (surface::properties::xdata, surface::properties::ydata, surface::properties::zdata, surface::properties::normalmode, surface::properties::vertexnormals): Add 'u' modifier. (surface::properties::update_normals): New method to compute normals automatically. (surface::properties::update_xdata, surface::properties::update_ydata, surface::properties::update_zdata, surface::properties::update_normalmode, surface::properties::update_vertexnormals): New updaters to update normals automatically. * graphics.cc (surface::properties::update_normals): Likewise. (cross_product): New inlined utility function for cross product computation adn accumulation. * graphics.h.in (class base_scaler, class lin_scaler, class log_scaler, class scaler): Add scale method for NDArray. (log_scaler::do_scale): Factorize scaling code. * graphics.h.in (figure::properties::update_position): Re-remove. (figure::properties::facecolor): Re-add 'texturemap' value. (surface::properties::get_color_data): New method to compute actual surface color data from cdata. * graphics.cc (surface::properties::get_color_data): Likewise. (xget_ancestor): New utility function to retrieve an ancestor of a given type. (convert_cdata): New utility function to convert cdata property into actual color data. * graphics.h.in (surface::properties::facecolor): Add "texturemap" as possible value. (class surface::properties): New properties alphadata, alphadatmapping, ambientstrength, backfacelighting, diffusestrength, edgealpha, edgelighting, erasemode, facelighting, meshstyle, normalmode, specularcolorreflectance, specularexponent, specularstrength, vertexnormals. (surface::properties::init): Add constraints for alphadata, vertexnormals and cdata (the latter are commented until cdata has changed type). * graphics.h.in (base_properties::update_boundingbox): New method to handle object resize. (figure::properties::set_boundingbox): New method to set figure position from backend. (figure::properties::update_position): Remove method. (figure::properties::position): Remove 'u' modifier and add 'S' modifier. (axes::properties::update_boundingbox): Overload to recompute transformation when axes size changed. * graphics.cc (base_properties::update_boundingbox): New method. (figure::properties::set_boundingbox, figure::properties::set_position): Likewise. * genprops.awk: Add 'U' modifier to support extern updaters. * graphics.h.in (base_graphics_backend::gripe_invalid): New method to simplify error reporting. (class base_graphics_backend): Use it. (base_graphics_backend::set_figure_position): New backend method. (graphics_backend::set_figure_position): Likewise. (figure::properties::position): Mark property with updater. (figure::properties::update_position): New updater. * graphics.h.in (root_figure::properties::callbackobject): New root property. (root_figure::properties::cbo_stack): New field. * graphics.cc (xset_gcbo, xreset_gcbo): New utility functions. (execute_callback): Set callbackobject property in root object before executing a callback. (root_figure::properties::set_callbackobject): Implement accessor. * graphics.h.in (root_figure::properties::callbackobject): New root property. (root_figure::properties::cbo_stack): New field. * graphics.cc (xset_gcbo, xreset_gcbo): New utility functions. (execute_callback): Set callbackobject property in root object before executing a callback. (root_figure::properties::set_callbackobject): Implement accessor. * graphics.h.in (class root_figure::properties, class line::properties, class text::properties, class image::properties, class patch::properties, class surface::properties): Export classes with OCTINTERP_API. * graphics.cc (axes::properties::set_defaults): Use correct default values for gridlinestyle and minorgridlinestyle. 2008-06-03 Jaroslav Hajek * load-save.cc (Fload): Fix "-7" option. 2008-06-02 David Bateman * pt.cc (tree:last_break_function): Next pointer to last function with a breakpoint. * pt.h (tree:last_break_function): ditto. * debug.cc (Fdbstep): Use tree::break_function value of zero to signal to step into the next function. Set tree::last_break_function to indicate position of last breakpoint. (Fdbnext): Set tree::last_break_function to indicate position of last breakpoint. * pt-bp.h (MAYBE_DO_BREAKPOINT): Check tree::break_function value of zero as well. Only check tree::last_line if we are in teh same function as the last breakpoint. * input.cc (char Vfilemarker): New global variable. (Ffilemarker): New function to query and set Vfilemarker. * input.h (extern char Vfilemarker): Make Vfilemarker available. * util.cc (fcn_file_in_path): If the input argument contains Vfilemarker, strip the trailing part of string from this point when looking for function file. * toplev.cc (octave_call_stack::fo_backtrace): Mark subfunctions with the name of the parent function and Vfilemarker. * symtab.cc (symbol_table::find_function (const std::string&, tree_argument_list *, const string_vector&, octave_value_list*, bool&): If function name contains Vfilemarker, check in scope of specified parent function. * DLD-FUNCTIONS/betainc.cc: Move test code here. Add test code for single precision type. * DLD-FUNCTIONS/gammainc.cc: Ditto. * DLD-FUNCTIONS/gcd.cc (Fgcd): Support single precision. Move test code here. Add test code for single precision type. * data.cc: Move test code here and add tests for single precision type. Add tests for Fislogical. (NATIVE_REDUCTION): Support the 'double' argument. * mapper.cc: Move test code here and add tests for single precision type. * ov-float.cc (CD_SCALAR_MAPPER): Replace Complex with FloatComplex. (erf, erfc, abs, acos, asin, asinh, atan, atanh, ceil, cos, cosh, exp, expm1, floor, log10, log1p, sin, sinh, sqrt, tan, tanh): Use float version of base functions (ie. ::sinf and not ::sin) (lgamma, acosh, log, log2, log10, log1p): Use single precision infinity value. * ov-flt-complex.cc (erf, erfc, expm1, log1p): Use the float version of base functions. * ov-flt-cx-mat.cc (DARRY_MAPPER): Replace NDArray with FloatNDArray. (erf, erdc, gamma): Use FloatNDArray::dmapper and not NDArray::dmapper. * ov-flt-cx-mat.h (is_double_type): Delete. (is_single_type): New method. * ov-flt-re-mat.cc (lgamma, acosh, log, log2, log10, log1p, sqrt): Use single precision infinity value. * chol.cc (Fcholinv, Fchol2inv, Fcholupdate, Fcholinsert, Fcholdelete, Fcholshift): Allow single precision arguments. (Fchol): Move test code here. Add test code for single precision. (Fcholupdate, Fcholinsert, Fcholdelete, Fcholshift): Add test code for single precision. * conv2.cc (Fconv2): Add single precision test code. * det.cc (Fdet): For single values or empty matrices, return single precision arg for single precion input. Move test code here. Add single precision test code. * fft.cc (do_fft): For empty single precision arguments return a single precision value. Add single precision test code. Remove fft2 test code. * fft2.cc (do_fft2): For empty single precision arguments return a single precision value. Add single precision test code. Move fft2 test code here. * fftn.cc (do_fftn): For empty single precision arguments return a single precision value. * eig.cc (Feig): Move test code here. Add single precision test code. * expm.cc (Fexpm): Ditto. * find.cc (Ffind): Ditto. * hess.cc (Fhess): Ditto. * inv.cc (Finc): Ditto. * lu.cc (Flu): Ditto. * qr.cc (Fqr): Ditto. * schur.cc (Fschur): Ditto. * svd.cc (Fsvd): Ditto. * syl.cc (Fsyl): Ditto. * op-fcm-fcm.cc, op-fcm-fcs.cc, op-fcm-fm.cc, op-fcm-fs.cc, op-fcs-fcm.cc, op-fcs-fcs.cc, op-fcs-fm.cc, op-fcs-fs.cc, op-fm-fcm.cc, op-fm-fcs.cc, op-fm-fm.cc, op-fm-fs.cc, op-fs-fcm.cc, op-fs-fcs.cc, op-fs-fm.cc, op-fs-fs.cc: Add mixed double, single precision concatenation operators. * data.cc (Fall, Fany, Fdiag, Fcat, Fismatrix, Fones, Fzeros, Finf, FNaN, FNA, Feye, Flinspace, Freshape, Ftranspose, Fctranspose, Fsort). Move tests here. Add single precision tests. * mappers.cc (Ffinite, Fisinf, Fisna, Fisnan): Ditto. * ov-float.cc (octave_float_scalar:resize): single precision return value. * ov.cc (octave_value::octave_value (const FloatComplexDiagMatrix&)): Ditto. * data.cc (Fnorm): Add single precision. (do_cat): Disable fast return and skipping empty matrices, as they play a part in determining the return type. * ov.cc (octave_value do_cat_op (const octave_value&, const octave_value&, const Array&)): ditto. 2008-06-02 Jaroslav Hajek * ov-cell.cc (Fcellstr): For compatibility with Matlab, return {''} when given ''. 2008-05-26 Jaroslav Hajek * DLD-FUNCTIONS/fsolve.cc (fsolve_user_function, fsolve_user_jacobian): Reshape argument to original dims before passing. (Ffsolve): Save original dimensions of the starting guess and reshape on return. Fix tests. 2008-05-21 David Bateman * DLD-FUNCTIONS/quad.cc (quad_float_user_function): New function. (Fquad): Handle float type. New tests. 2008-05-21 Jaroslav Hajek * OPERATORS/op-fcm-fcm.cc (trans_mul, mul_trans, herm_mul, mul_herm): New functions. (install_fcm_fcm_ops): Install them. * OPERATORS/op-fm-fm.cc (trans_mul, mul_trans): New functions. (install_fm_fm_ops): Install them. * OPERATORS/op-sm-m.cc (trans_mul): New function. (install_sm_m_ops): Register it. * OPERATORS/op-m-sm.cc (mul_trans): New function. (install_m_sm_ops): Register it. * OPERATORS/op-scm-cm.cc (trans_mul, herm_mul): New function. (install_scm_cm_ops): Register it. * OPERATORS/op-cm-scm.cc (mul_trans, mul_herm): New function. (install_cm_scm_ops): Register it. * dMatrix.cc: Declare DSYRK. (xgemm): Call DSYRK if symmetric case detected. * CMatrix.cc: Declare ZSYRK, ZHERK. (xgemm): Call ZSYRK/ZHERK if symmetric/hermitian case detected. * ov.h (octave_value::compound_binary_op): New enum. (do_binary_op (octave_value::compound_binary_op, ...), octave_value::binary_op_fcn_name (compound_binary_op), octave_value::do_binary_op (compound_binary_op, ...)): New declarations. (OV_COMP_BINOP_FN): New macro (+ several expansions). * ov.cc (octave_value::binary_op_fcn_name (compound_binary_op), decompose_binary_op, do_binary_op (compound_binary_op, ...)): New functions. * ov-typeinfo.h (octave_value_typeinfo::register_binary_class_op (octave_value::compound_binary_op, ...), octave_value_typeinfo::register_binary_op (octave_value::compound_binary_op, ...), octave_value_typeinfo::do_register_binary_class_op (octave_value::compound_binary_op, ...), octave_value_typeinfo::do_register_binary_op (octave_value::compound_binary_op, ...), octave_value_typeinfo::do_lookup_binary_class_op (octave_value::compound_binary_op), octave_value_typeinfo::do_lookup_binary_op (octave_value::compound_binary_op, ...)): New declarations. (octave_value_typeinfo::lookup_binary_class_op (octave_value::compound_binary_op), (octave_value_typeinfo::lookup_binary_op (octave_value::compound_binary_op, ...)): New functions. (octave_value_typeinfo::compound_binary_class_ops, octave_value_typeinfo::compound_binary_ops): New fields. * ov-typeinfo.cc (octave_value_typeinfo::register_binary_class_op (octave_value::compound_binary_op, ...), octave_value_typeinfo::register_binary_op (octave_value::compound_binary_op, ...), octave_value_typeinfo::do_register_binary_class_op (octave_value::compound_binary_op, ...), octave_value_typeinfo::do_register_binary_op (octave_value::compound_binary_op, ...), octave_value_typeinfo::do_lookup_binary_class_op (octave_value::compound_binary_op), octave_value_typeinfo::do_lookup_binary_op (octave_value::compound_binary_op, ...)): New functions. (octave_value::do_register_type): Resize also compound_binary_ops field. * pt-exp.h (tree_expression::is_unary_expression): New virtual function. * pt-unop.h (tree_unary_expression::is_unary_expression): New virtual override. * pt-cbinop.h, pt-cbinop.cc: New files (implement tree_compound_binary_expression class). * pt-all.h: Include pt-cbinop.h. * Makefile.in (PT_INCLUDES, PT_SRC): Include them in the lists. * parse.y (make_binary_op): Call maybe_compound_binary_expression. * OPERATORS/op-m-m.cc (trans_mul, mul_trans): New operator handlers. (install_m_m_ops): Register them. * OPERATORS/op-cm-cm.cc (trans_mul, mul_trans, herm_mul, mul_herm): New operator handlers. (install_cm_cm_ops): Register them. * DLD-FUNCTIONS/matrix_type.cc: Fix tests relying on the older more optimistic hermitian check. 2008-05-21 David Bateman * DLD-FUNCTIONS/rcond.cc (Frcond): Add support for single precision. * DLD-FUNCTIONS/sqrt.m: Replace DBL_* with FLT_* for single precision types. * data.cc (static octave_value fill_matrix (const octave_value_list&, double, float, const char *)): Add function with additional argument to allow for different valid for double and single precision. (Finf, FNaN, FNA, Frealmax, Frealmin): Use it here. (Feps): Modify behavior for a single numerical argument to give difference to next largest value in the class of the type passed. 2008-05-21 John W. Eaton * pt-idx.h (tree_index_expression::tree_index_expression (int, int)): Delete default argument values. 2008-05-20 David Bateman * data.cc (Flog2): Handle single precision. * ov-float.h, ov.float.cc, ov-flt-complex.h, ov-flt-complex.cc, ov-flt-re-mat.h, ov-flt-re-mat.cc, ov-flt-cx-mat.h, ov-flt-cx-mat.cc: Provide single precision version of log2 mapper function. * DLD-FUNCTIONS/__convn__.cc, DLD-FUNCTIONS/__pchip_deriv__.cc, DLD-FUNCTIONS/besselj.cc, DLD-FUNCTIONS/betainc.cc, DLD-FUNCTIONS/conv2.cc, DLD-FUNCTIONS/gammainc.cc, DLD-FUNCTIONS/givens.cc, DLD-FUNCTIONS/kron.cc, DLD-FUNCTIONS/lookup.cc, DLD-FUNCTIONS/syl.cc, data.cc: Prefer demotion to single precision rather than promotion to double. * ov-float.cc, ov-float.h, ov-flt-complex.cc, ov-flt-complex.h, ov-flt-cx-mat.cc, ov-flt-cx-mat.h, ov-flt-re-mat.cc, ov-flt-re-mat.h (numeric_conversion_function (void) const): Remove method. * ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h, ov-re-mat.cc, ov-re-mat.h, ov-scalar.cc, ov-scalar.h (numeric_conversion_function (void) const): Add method for conversion to single precision. * DLD-FUNCTIONS/conv2.cc (Fconv2): Don't access third arg if we don't have one. * DLD-FUNCTIONS/balance.cc, DLD-FUNCTIONS/expm.cc, DLD-FUNCTIONS/find.cc, DLD-FUNCTIONS/hess.cc, DLD-FUNCTIONS/qr.cc: COnvert for use with single precision. * OPERATORS/op-int.h, OPERATORS/op-int-conv.cc, OPERATORS/op-int-concat.cc: Adapt for single precision. * OPERATORS/op-i8-i8.cc, OPERATORS/op-i16-i16.cc, OPERATORS/op-i32-i32.cc, OPERATORS/op-i64-i64.cc, OPERATORS/op-ui8-ui8.cc, OPERATORS/op-ui16-ui16.cc, OPERATORS/op-ui32-ui32.cc, OPERATORS/op-ui64-ui64.cc: Add includes for single precision types. * OPERATORS/op-b-b.cc, OPERATORS/op-b-bm.cc, OPERATORS/op-bm-b.cc, OPERATORS/op-fcm-fs.cc, OPERATORS/op-fcs-fs.cc, OPERATORS/op-fm-fs.cc, OPERATORS/op-fs-fcm.cc, OPERATORS/op-fs-fcs.cc, OPERATORS/op-fs-fm.cc, OPERATORS/op-fs-fs.cc, OPERATORS/op-int.h, ov.cc, ov-scalar.cc, ov-float.h, ov-flt-complex.cc, ov-float.cc, ov-flt-re-mat.cc, ov-flt-cx-mat.cc: Replace octave_float with octave_scalar_float * OPERATORS/op-fm-fm.cc, OPERATORS/op-fm-fs.cc, OPERATORS/op-fm-fcm.cc, OPERATORS/op-fm-fcs.cc, OPERATORS/op-fs-fm.cc, OPERATORS/op-fs-fs.cc, OPERATORS/op-fs-fcm.cc, OPERATORS/op-fs-fcs.cc, OPERATORS/op-fcm-fm.cc, OPERATORS/op-fcm-fs.cc, OPERATORS/op-fcm-fcm.cc, OPERATORS/op-fcm-fcs.cc, OPERATORS/op-fcs-fm.cc, OPERATORS/op-fcs-fs.cc, OPERATORS/op-fcs-fcm.cc, OPERATORS/op-fcs-fcs.cc, OPERATORS/op-m-m.cc, OPERATORS/op-m-s.cc, OPERATORS/op-m-cm.cc, OPERATORS/op-m-cs.cc, OPERATORS/op-s-m.cc, OPERATORS/op-s-s.cc, OPERATORS/op-s-cm.cc, OPERATORS/op-s-cs.cc, OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc, OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc, OPERATORS/op-cs-m.cc, OPERATORS/op-cs-s.cc, OPERATORS/op-cs-cm.cc, OPERATORS/op-cs-cs.cc: Add mixed single/double assign operators. * ov.h (numeric_demotion_function): New method for double to single demotion. * ov-base.h (numeric_demotion_function): Declare virtual version. * ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h, ov-re-mat.cc, ov-re-mat.h, ov-scalar.cc, ov-scalar.h (numeric_cdemote_function (void) const): Add method for conversion to single precision renamed from the method numeric_conversion_function * ov.cc (do_binary_op): Use demotion function seperately than the numeric conversion function so as to avoid isses like a=zeros(2,2);a(1,:)=1:2. * OPERATORS/op-fcm-fcm.cc, OPERATORS/op-fcm-fcs.cc, OPERATORS/op-fcm-fm.cc, OPERATORS/op-fcm-fs.cc, OPERATORS/op-fcs-fcm.cc, OPERATORS/op-fcs-fcs.cc, OPERATORS/op-fcs-fm.cc, OPERATORS/op-fcs-fs.cc, OPERATORS/op-fm-fcm.cc, OPERATORS/op-fm-fcs.cc, OPERATORS/op-fm-fm.cc, OPERATORS/op-fm-fs.cc, OPERATORS/op-fs-fcm.cc, OPERATORS/op-fs-fcs.cc, OPERATORS/op-fs-fm.cc, OPERATORS/op-fs-fs.cc, ov-float.cc, ov-float.h, ov-flt-complex.cc, ov-flt-complex.h, ov-flt-cx-mat.cc, ov-flt-cx-mat.h, ov-flt-re-mat.cc, ov-flt-re-mat.h: New files. * Makefile.in (OV_INCLUDES, OV_SRC, OP_XSRC. FLOAT_OP_XSRC, DOUBLE_OP_XSRC): Add them here. * DLD-FUNCTIONS/__convn__.cc, DLD-FUNCTIONS/__lin_interpn__.cc, DLD-FUNCTIONS/__pchip_deriv__.cc, DLD-FUNCTIONS/besselj.cc, DLD-FUNCTIONS/betainc.cc, DLD-FUNCTIONS/bsxfun.cc, DLD-FUNCTIONS/chol.cc, DLD-FUNCTIONS/conv2.cc, DLD-FUNCTIONS/det.cc, DLD-FUNCTIONS/eig.cc, DLD-FUNCTIONS/fft.cc, DLD-FUNCTIONS/fft2.cc, DLD-FUNCTIONS/fftn.cc, DLD-FUNCTIONS/fftw.cc, DLD-FUNCTIONS/filter.cc, DLD-FUNCTIONS/gammainc.cc, DLD-FUNCTIONS/givens.cc, DLD-FUNCTIONS/inv.cc, DLD-FUNCTIONS/kron.cc, DLD-FUNCTIONS/lookup.cc, DLD-FUNCTIONS/lu.cc, DLD-FUNCTIONS/matrix_type.cc, DLD-FUNCTIONS/max.cc, DLD-FUNCTIONS/pinv.cc, DLD-FUNCTIONS/schur.cc, DLD-FUNCTIONS/sqrtm.cc, DLD-FUNCTIONS/svd.cc, DLD-FUNCTIONS/syl.cc, DLD-FUNCTIONS/symbfact.cc, DLD-FUNCTIONS/typecast.cc, OPERATORS/op-b-b.cc, OPERATORS/op-b-bm.cc, OPERATORS/op-bm-b.cc, OPERATORS/op-bm-bm.cc, OPERATORS/op-cm-cm.cc, OPERATORS/op-cs-cs.cc, OPERATORS/op-m-m.cc, OPERATORS/op-range.cc, OPERATORS/op-s-s.cc, bitfcns.cc, data.cc, oct-stream.cc, ov-base.cc, ov-base.h, ov-bool-mat.cc, ov-bool-mat.h, ov-bool.h, ov-ch-mat.cc, ov-ch-mat.h, ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h, ov-intx.h, ov-range.cc, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-scalar.h, ov.cc, ov.h, pr-output.cc, pr-output.h, pt-mat.cc, utils.cc, utils.h, xdiv.cc, xdiv.h, xpow.cc, xpow.h: Allow single precision types. 2008-05-20 David Bateman * DLD-FUNCTIONS/rcond.cc: New function. * Makefile.in (DLD_XSRC): Add it here. * debug.cc (Fdbstop): If no line specified assume line 1. (Fdbstep, Fdbcont, Fdbnext): Move debugging functions to normal commands. (Fdbquit): New command to quit debugging mode and return to the prompt. (Fdbstep): Modify the dbstep command for compatibility. * input.cc (Vdebugging_current_line): Store current line being debugged for use in DEFCMD versions of debug commands. (match_sans_spaces_semi): Delete. (static void get_debug_input (const std;string&)): New function to parse input in debug mode using standard Octave parser. (static octave_value_list get_user_input (const octave_value_list&, int)): Remove debugging specialization. * input.h (Vdebugging_current_line): Store current line being debugged for use in DEFCMD versions of debug commands. * parse.y (make_return_command): Special handling in debug mode. * pt-bp.h (MAYBE_DO_BREAKPOINT): Support break in n lines needed to support "dbstep N". * pt.cc (tree::break_next): Convert to a down counter to support break in N lines. Breakpoint occure when tree::break_next is zero. * toplev.cc (octave_user_script * octave_call_stack::do_caller_user_script (difference_type) const): Support skipping the first N functions to support "dbstep out". (octave_user_function * octave_call_stack::do_caller_user_function (difference_type) const): Ditto. (octave_user_code * octave_call_stack::do_caller_user_code (difference_type) const): Ditto. * toplev.h (octave_user_script * octave_call_stack::do_caller_user_script (difference_type) const): Add difference_type argument. (octave_user_function * octave_call_stack::do_caller_user_function (difference_type) const): Ditto. (octave_user_code * octave_call_stack::do_caller_user_code (difference_type) const): Ditto. (static octave_user_script *caller_script (difference_type)): Ditto. (static octave_user_function *caller_user_function (difference_type q)): Ditto. (static octave_user_code *caller_user_code (difference_type q)): Ditto. 2008-05-20 Kim Hansen * load-path.cc (load_path::do_initialize): Include separator when appending sys_path. 2008-05-20 Bill Denney * file-io.cc (Ffgets, Fgets, Ffputs, Ffscanf): Doc fix (seealso). 2008-05-20 Thomas Weber * DLD-FUNCTIONS/rand.cc (Frandn): Doc fix. 2008-05-20 David Bateman * load-save.cc (do_load): Treat non verbose list_only output in the same manner as Fwho. * symtab.h (static void clear_variable_regexp (const std::string&): New method. (static std::list regexp (const std::string&)): Ditto. (static std::list regexp_variables (const std::string&)): Ditto. (static std::list regexp_global_variables (const std::string&)): Ditto, (static std::list regexp_variables (const string_vector&)): Ditto. (void do_clear_variable_regexp (const std::string&)): Ditto. (std::list do_regexp (const std::string&, bool) const): Ditto. (do_who): Accept the "-regexp" option. Use regexp versions of symbol table functions. (static inline bool name_match_any_pattern (const string_vector&, int, int, bool): Add regexp argument, and use regexp matching if true. (do_clear_variables): Add regexp option and pass to name_match_any_pattern. (Fclear): Accept the -regexp option. 2008-05-07 John W. Eaton * pt-arg-list.cc, pt-arg-list.h (tree_argument_list::dup): New arg, context. * pt-assign.cc, pt-assign.h (tree_simple_assignment::dup, tree_multi_assignment::dup): Likewise. * pt-binop.cc, pt-binop.h (tree_binary_expression::dup, tree_boolean_expression::dup): Likewise. * pt-cell.cc, pt-cell.h (tree_cell::dup): Likewise. * pt-cmd.cc, pt-cmd.h (tree_no_op_command::dup, tree_function_def::dup): Likewise. * pt-colon.cc, pt-colon.h (tree_colon_expression::dup): Likewise. * pt-const.cc, pt-const.h (tree_constant::dup): Likewise. * pt-decl.cc, pt-decl.h (tree_decl_elt::dup, tree_decl_init_list::dup, tree_global_command::dup, tree_static_command::dup): Likewise. * pt-except.cc, pt-except.h (tree_try_catch_command::dup, tree_unwind_protect_command::dup): Likewise. * pt-exp.h (tree_expression:dup): Likewise. * pt-fcn-handle.cc, pt-exp.h (tree_expression:dup): Likewise. * pt-fcn-handle.h (tree_fcn_handle::dup, tree_anon_fcn_handle::dup): Likewise. * pt-id.cc, pt-id.h (tree_identifier::dup): Likewise. * pt-idx.cc, pt-idx.h (tree_index_expression::dup): Likewise. * pt-jump.cc, pt-jump.h (tree_break_command::dup, tree_continue_command::dup, tree_return_command::dup): Likewise. * pt-loop.cc, pt-loop.h (tree_while_command::dup, tree_do_until_command::dup, tree_simple_for_command::dup, tree_complex_for_command::dup): Likewise. * pt-mat.cc, pt-mat.h (tree_matrix::dup): Likewise. * pt-misc.cc, pt-misc.h (tree_parameter_list::dup, tree_return_list::dup): Likewise. * pt-select.cc, pt-select.h (tree_if_clause::dup, tree_if_command_list::dup, tree_if_command::dup, tree_switch_case::dup, tree_switch_case_list::dup, tree_switch_command::dup, tree_statement::dup, tree_statement_list::dup, tree_prefix_expression::dup, tree_postfix_expression::dup): Likewise. * ov-fcn-handle.cc (octave_fcn_handle::save_ascii, octave_fcn_handle::save_binary, octave_fcn_handle::save_hdf5): Pass context to symbol_table::all_variables. * load-save.cc (dump_octave_core): Likewise. * ov-fcn-handle.cc (Ffunctions): Don't skip anonymous functions with the name set to the text of the function body. Pass context to symbol_table::all_variables and symbol_table::symbol_record::varval. * symtab.h (symbol_table::varref, symbol_table::do_varref, symbol_table::varval, symbol_table::do_varval, symbol_table::all_variables, symbol_table::do_all_variables, symbol_table::symbol_record::varref, symbol_table::symbol_record::varval, symbol_table::symbol_record::is_defined, symbol_table::symbol_record::is_variable, symbol_table::symbol_record::symbol_record_rep::varref, symbol_table::symbol_record::symbol_record_rep::varval, symbol_table::symbol_record::symbol_record_rep::is_defined, symbol_table::symbol_record::symbol_record_rep::is_variable, ): * symtab.h (symbol_table::do_inherit): New arg, donor_context. Look for value in donor_contxt. Set value in base context. * symtab.cc (symbol_table::symbol_record::symbol_record_rep::dump): Pass xcurrent_context to varval. 2008-05-06 David Bateman * ov-fcn-inline.cc (Finline): Also ignore NaN, Inf, pi, NA and eps. * bitfcns.cc (BITOP): Treat octave_bool types and octave_scalar. 2008-05-06 John W. Eaton * symtab.h (symbol_table::scope_id_cache): New class. Use it to replace scope_ids_in_use and scope_ids_free_list. (symbol_table::erase_scope): Call free_scope. (symbol_table::free_scope): Call scope_id_cache::free. * ov-fcn.h (octave_function::lock_subfunctions, octave_function::unlock_subfunctions): New virtual functions. (octave_function::lock_subfunctions): Call lock_subfunctions here. (octave_function::unlock_subfunctions): Call unlock_subfunctions here. * ov-usr-fcn.h (octave_user_function::lock_subfunctions, octave_user_function::unlock_subfunctions): New functions. * symtab.h (symbol_table::lock_subfunctions, symbol_table::lock_subfunctions, symbol_table::fcn_info::lock_subfunction, symbol_table::fcn_info::unlock_subfunction, symbol_table::fcn_info::fcn_info_rep::lock_subfunction, symbol_table::fcn_info::fcn_info_rep::unlock_subfunction): New functions. * symtab.h (symbol_table::set_scope, symbol_table::get_instance): Don't set instance unless allocation succeeds. (symbol_table::print_scope, symbol_table::do_print_scope): Delete. (symbol_table::free_scope): Avoid using invalid iterator. (symbol_table::erase_scope): Call free_scope here. * ov-fcn-handle.cc (octave_fcn_handle::load_ascii, octave_fcn_handle::load_binary, octave_fcn_handle::load_hdf5): Cache anonymous name here. (octave_fcn_handle::octave_fcn_handle): Move here from ov-fcn-handle.h. Cache name if function is user-defined. * pt-id.cc (tree_identifier::dup): Avoid shadow warning. * symtab.h (symbol_table::cache_name, symbol_table::do_cache_name): New functions. (symbol_table::get_instance): Cache top-level name here. * parse.y (finish_function): Call symbol_table::cache_name here. * symtab.cc (F__dump_symtab_info__): New function. * symtab.cc (symbol_table::dump, symbol_table::dump_global, symbol_table::dump_functions, symbol_table::do_dump, symbol_table::symbol_record::symbol_record_rep::dump, symobl_table::fcn_info::fcn_info_rep::dump): New functions. * symtab.h: Provide decls. (symtab::scopes, symbol_table::symbol_record::dump, symbol_table::fcn_info::dump): New functions. (symtab::get_instance): New arg, create; if false throw error if instance for given scope is not found. * ov-base.cc (octave_base_value::dump): New virtual function. * ov-base.h: Proivde decl. * ov.h (octave_value::dump): New function. * ov.h, ov.c (octave_value::function_value): New const version. * ov-base.h, ov-base.cc (octave_base_value::function_value): Likewise. * ov-builtin.h (octave_builtin::function_value): Likewise. * ov-fcn-handle.h (octave_fcn_handle::function_value): Likewise. * ov-mex-fcn.h (octave_mex_function::function_value): Likewise. * ov-usr-fcn.h (octave_user_script::function_value, octave_user_function): Likewise. * symtab.h, symtab.cc: Use consistent naming scheme for iterator typedefs. Change all uses. * variables.cc (F__print_symtab_info__, F__print_symbol_info__): Delete. * ov-cell.cc (Fstruct2cell): Handle structure arrays properly. 2008-05-05 David Bateman * sysdep.cc (Fputenv): Allow single arg. Alias to setenv. 2008-05-05 John W. Eaton * input.cc (Fre_read_readline_init_file): New function. 2008-05-04 John W. Eaton * ov-fcn-handle.cc (Ffunctions): Pass octave_value object instead of Cell in structure field assignment. * parse.y (frob_function): Don't install subfunctions here. (finish_function): Handle subfunctions here. Conditionally define tree_function_def object here. * symtab.h (symbol_table::fcn_info::fcn_info_rep::find_function): Initialize args_evaluated. * pt-id.cc (tree_identifier::rvalue): Likewise. * variables.cc (symbol_exist): Likewise. * pt-id.h (tree_identifier::tree_identifer): Delete useless statement. * variables.cc (get_global_value): Use symbol_table::global_varval instead of passing scope to symbol_table::varval. (set_global_value): Use symbol_table::global_varref instead of passing scope to symbol_table::varref. (do_who): Use symbol_table::glob_global_variables instead of passing scope to symbol_table::glob_variables. (do_clear_globals): Use symbol_table::global_variable_names and symbol_table::clear_global instead of passing scope to symbol_table::clear_variables. Use symbol_table::global_variable_names instead of passing scope to symbol_table::variable_names. * unwind-prot.cc (unwind_protect::save_size_t): New function. (saved_variable::restore_value): Handle size_t values. (saved_variable::saved_variable): New size_t constructor. (saved_variable::size_type): New var_type enum value. (saved_variable::ptr_to_size_t, saved_variable::size_t_value): New union elements. * unwind-prot.h (unwind_protect::save_size_t): Provide decl (unwind_protect_size_t): New macro. * toplev.cc (octave_call_stack::do_goto_frame, octave_call_stack::do_goto_frame_relative): New functions. (octave_call_stack::do_backtrace): Also return scope and context ids. * toplev.h (octave_call_stack::do_goto_frame, octave_call_stack::do_goto_frame_relative): Provide decls. (octave_call_stack::curr_frame): New data member. (octave_call_stack::octave_call_stack): Initialize it. (octave_call_stack::call_stack_elt::scope, (octave_call_stack::call_stack_elt::context): New data members., (octave_call_stack::current_frame, (octave_call_stack::do_current_frame octave_call_stack::do_goto_frame, octave_call_stack::do_goto_frame_relative): New functions. (octave_call_stack::push, octave_call_stack::do_push): New args, scope and context. (octave_call_stack::do_push, octave_call_stack::do_pop): Update curr_frame if debugging. * symtab.cc (symbol_table::global_table): New map for global values. (symbol_table::xcurrent_context): New variable for context info. * symtab.h: Provide decls. (symbol_table::global_varref, symbol_table::global_varval, symbol_table::current_context, symbol_table::set_scope_and_context, symbol_table::glob_global_variables, symbol_table::global_variable_names, symbol_table::top_leve_variable_names): New functions. (symbol_table::context_id, const_global_table_iterator, global_table_iterator): New typedefs. (symbol_table::xcurrent_context_this_table): New variable. (symbol_table::symbol_table): Initialize it. (symbol_table::set_scope): Use it. (symbol_table::symbol_record::find, symbol_table::do_find): Use symbol_table::global_varref instead of passing scope to symbol_table::varref. (symbol_table::symbol_record::symbol_record_rep::value_stack): Now a std::deque instead of a std::stack. (symbol_table::symbol_record::symbol_record_rep::push_context, symbol_table::symbol_record::symbol_record_rep::pop_context): Don't push or pop persistent of global variables. (symbol_table::symbol_record::symbol_record_rep::varval, Handle context here. Call symbol_table::global_varval instead of passing scope to symbol_table::varval. (symbol_table::symbol_record::symbol_record_rep::varref): Handle context here. Call symbol_table::global_varref instead of passing scope to symbol_table::varref. (symbol_table::symbol_record::varref, symbol_table::symbol_record::varval): No need to handle global values specially here. (symbol_table::symbol_record::push_context symbol_table::symbol_record::pop_context: No need to handle global or persistent values specially here. (symbol_table::get_instance): Don't return global scope. (symbol_table::do_push_context, symbol_table::do_pop_context): Increment/decrement xcurrent_context. (symbol_table::do_clear_global, symbol_table::do_clear_global_pattern): Use global_table instead of separate scope. * symtab.h, symtab.cc (symbol_table::fcn_info::fcn_info_rep::find, symbol_table::fcn_info::fcn_info_rep::find_function, symbol_table::fcn_info::find, symbol_table::fcn_info::find_function, symbol_table::find, symbol_table::find_function, symbol_table::do_find, symbol_table::insert, symbol_table::varref, symbol_table::varval, symbol_table::persistent_varref, symbol_table::persistent_varval, symbol_table::erase_persistent, symbol_table::is_variable, symbol_table::clear, symbol_table::clear_variables, symbol_table::clear_global, symbol_table::clear_variable, symbol_table::clear_global_pattern, symbol_table::clear_variable_pattern, symbol_table::push_context, symbol_table::pop_context, symbol_table::mark_hidden, symbol_table::mark_global, symbol_table::glob, symbol_table::glob_variables, symbol_table::variable_names, symbol_table::is_local_variable, symbol_table::is_global): Eliminate scope arg. Change all uses. (symbol_table::erase_scope, symbol_table::dup_scope): Require scope arg. * pt-stmt.cc (tree_statement::eval): Don't update statement info in octave_call_stack if debugging. * pt-id.h (tree_identifier::xsym): New function. (tree_identifier::rvalue, tree_identifier::lvalue, tree_identifier::dup, tree_identifier::is_defined, tree_identifier::is_variable, tree_identifier::mark_global, tree_identifier::mark_as_static, tree_identifier::do_lookup, tree_identifier::mark_as_formal_parameter): Use xsym to access symbol. (tree_identifier::scope): New data member. (tree_identifier::tree_identifier): Initialize it. * ov-usr-fcn.cc (octave_user_script::octave_user_script, octave_user_function::octave_user_function): Initialize call_depth to -1. (octave_user_script::do_multi_index_op): Fix comparison of call_depth with Vmax_recursion_depth. (octave_user_function::do_multi_index_op): Compare call depth > 0, instead of > 1. * ov-usr-fcn.h (octave_user_function::save_args_passed): Compare call depth > 0, instead of > 1. * input.cc (Vdebugging): New variable. (get_user_input): Eliminate DEBUG argument. Use global Vdebugging variable instead. Change all callers. (saved_frame): New static variable. (restore_frame): New function. (do_keyboard): Unwind-protect Vdebugging here and set it to TRUE. Save current frame. Use unwind_protect to restore it. (Fkeyboard): Save current frame. Use unwind_protect to restore it. Move up the call stack one frame before calling do_keyboard. * input.h (Vdebugging): Provide decl. * mex.cc (mexGetVariable): Handle global vars with get_global_value. (mexPutVariable): Likewise, with set_global_value. * octave.cc (intern_argv): Assert that we are at the top level. Don't pass scope to symbol_table::varref or symbol_table::mark_hidden. * load-save.cc (install_loaded_variable): Use symbol_table::global_varref instead of passing global scope to symbol_table::varref. * help.cc (make_name_list): Call symbol_table::global_variable_names and symbol_table::top_level_variable_names instead of passing scope to symbol_table::variable_names. * debug.cc (do_dbupdown, Fdbup, Fdbdown): New functions. (current_stack_frame): Delete static variable. (Fdbstack): Rename from F__dbstack__. Implement all of dbstack here instead of partially in dbstack.m. 2008-05-03 John W. Eaton * pt-arg-list.cc (F__end__): If there are more dimensions than indices, smash extra dimensions first. (num_indices): New static variable. (tree_argument_list::convert_to_const_vector): Save and set it. * parse.y (parse_fcn_file): Also temporarily set parser_end_of_input and get_input_from_eval_string to false while reading script files. 2008-05-01 John W. Eaton * parse.y (load_fcn_from_file): Expect * dynamic-ld.cc (octave_dynamic_loader::do_load_oct): Search currently loaded .oct files by file name. Don't search currently loaded files for functions. (octave_shlib_list::find_file, octave_shlib_list::do_find_file): New functions. (octave_shlib_list::search, octave_shlib_list::do_search): Delete. * dynamic-ld.cc (octave_dynamic_loader::do_load_oct): No need to do load_path lookups here. (octave_shlib_list::iterator, octave_shlib_list::const_iterator): New typedefs. (octave_shlib_list::do_remove, octave_shlib_list::do_search, octave_shlib_list::do_display): Use them. (octave_mex_file_list::iterator, octave_mex_file_list::const_iterator): New typedefs. (octave_mex_file_list::do_remove): Use them. 2008-05-03 Rafael Laboissiere * DLD-FUNCTIONS/time.cc, file_io.cc: Use ischar instead of deprecated isstr. 2008-04-30 John W. Eaton * dynamic-ld.cc (octave_dynamic_loader::do_load_oct): If function already exists, reload it anyway. Clear existing oct_file only if reloading a function from the same file. (octave_shlib_list::display): New static function. (octave_shlib_list::do_display): New function. * symtab.cc (out_of_date_check_internal): Better handling for functions found in files by relative file names. (load_out_of_date_fcn): New function. * ls-oct-ascii.cc (extract_keyword): Return early if first char is not a comment character. (read_ascii_data): Accept .nargin. and .nargout. as valid identifiers. * ov-fcn-handle.cc: Combine tests. Test saving and loading handles for built-in, .oct, and .m functions. (octave_fcn_handle::save_ascii, octave_fcn_handle::save_binary, octave_fcn_handle::save_hdf5, octave_fcn_handle::print): Avoid dereferencing invalid pointer. * data.cc: Fix tests. Use "%!assert", not "%! assert" for individual assert tests. 2008-04-30 Jaroslav Hajek * ov-base.cc, ov-base.h, ov-bool-mat.h, ov-bool-sparse.h, ov-bool.h, ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h, ov-cx-sparse.cc, ov-cx-sparse.h, ov-intx.h, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h, ov-scalar.cc, ov-scalar.h, ov.h: Provide log2 mapper function. * data.cc (Flog2): New function. 2008-04-25 John W. Eaton * pt-stmt.h (tree_statement_list::function_body): New data member. (tree_statement_list::tree_statement_list): Initialize it. (tree_statement_list::mark_as_script_body): New function. (tree_statement::maybe_echo_code, tree_statement::eval): Rename in_function_body argument to in_function_or_script_body. * pt-stmt.cc (tree_statement::eval): Only set statement in call stack if in_function_or_script_body is true. * pt-stmt.cc (tree_statement_list::eval): Call elt->eval with function_body || script_body. * ov-usr-fcn.cc (octave_user_script::octave_user_script): command list as script body here. (octave_user_function::octave_user_function): Mark command list as function body here. * parse.y (start_function, make_anon_fcn_handle): Not here. * toplev.h, toplev.cc (octave_call_stack::backtrace, octave_call_stack::do_backtrace): New arg, N. Skip innermost N stack frames. * debug.cc (F__dbstack__): New function. (current_stack_frame): New static variable. * error.cc (verror, pr_where): Use octave_call_stack instead of tree_statement stack to get line and column information. (pr_where): Use octave_call_stack instead of tree_statement stack to get current statement. * input.cc (get_user_input): Extract current line number from octave_call_stack instead of tree_statement_stack. * pt-stmt.cc (tree_statement::eval): Put current statement on octave_call_stack instead of tree_statement_stack. * pt-stmt.h, pt-stmt.cc (class tree_statement_stack): Delete. * toplev.h, toplev.cc (octave_call_stack::call_stack_elt): New nested struct. (octave_call_stack::cs): Now a deque of call_stack_elts. Change all uses. (octave_call_stack::current_statement, octave_call_stack::current_line, octave_call_stack::current_column, octave_call_stack::top_statement, octave_call_stack::set_statement, octave_call_stack::backtrace): New static functions. (octave_call_stack::do_current_line, octave_call_stack::do_current_column, octave_call_stack::do_top_statement, octave_call_stack::do_set_statement, octave_call_stack::do_backtrace): New member functions. 2008-04-24 John W. Eaton * toplev.h, toplev.cc (octave_call_stack::unwind_pop_script): Delete unused function. * ov-usr-fcn.cc: Move constructor definitions here, from ov-usr-fcn.h. * ov-usr-fcn.h (octave_user_script::octave_user_script): Also Initialize t_parsed and t_checked. 2008-04-24 Jaroslav Hajek * ov-usr-fcn.h (octave_user_script::octave_user_script): Initialize call_depth. 2008-04-24 John W. Eaton * file-io.cc (do_stream_open): Return -1 for directories. 2008-04-23 John W. Eaton * DLD-FUNCTIONS/__qp__.cc (qp): Avoid bounds error when removing constraint from active set. * lex.l (text_yyinput): New function. Use it in place of yyinput. (next_token_is_sep_op, scan_for_comments, eat_whitespace, have_continuation): No need to check for CR or CRLF. * parse.y (text_getc): Also return NL for single CR. 2008-04-32 Michael Goffioul * input.cc (get_input_from_file): Open file in binary mode. 2008-04-20 John W. Eaton * oct-stream.cc (octave_stream::read): Allow single data type specification but return double. 2008-04-18 John W. Eaton * lex.l, lex.h (process_comment): New arg, start_in_block. Call grab_block_comment if start_in_block is true. Change all uses. * lex.l (grab_block_comment): New function. (grab_comment_block): New arg, at_bol. Change all uses. Call grab_block_comment if we find the start of a block comment. (block_comment_nesting_level): New static variable. (^{S}*{CCHAR}\{{S}*{NL}): New rule. (<>): Warn about open block comments. (reset_parser): Set block_comment_nesting_level to zero. * parse.y (parse_fcn_file): Stash help text from gobble_leading_white_space after calling reset_parser. (text_getc): Keep track of input_line_number here. (skip_white_sapce): Don't increment input_line_number here. * lex.l (grab_comment_block): Or here. * lex.l (Vdisplay_tokens): New static variable. (F__display_tokens__): New function. (display_token): New function. (DISPLAY_TOK_AND_RETURN): New macro. (COUNT_TOK_AND_RETURN): Use DISPLAY_TOK_AND_RETURN. ([\"\'], "'", \"): Move handle_string outside of COUNT_TOK_AND_RETURN macro parameter list. (handle_identifier): Don't use macros to return token values here. ({S}*{COMMENT}{SNLCMT}*|{S}*{NL}{SNLCMT}*): Recognize block comments here. * pr-output.cc (Fdisp): If nargout > 0, produce an sq-string unless arg is a dq-string. 2008-04-17 John W. Eaton * parse.y (looks_like_copyright): Handle leading whitespace. (class stdio_stream_reader): New class. (skip_white_space): New function. (gobble_leading_white_space): New arg, EOF. Change all uses. Use skip_white_space and grab_comment_block to process comments. (process_leading_comments): Delete. (parse_fcn_file): Call gobble_leading_white_space instead of process_leading_comments. Skip parsing if gobble_leading_white_space detects EOF. * lex.l (process_comment): Delete CCHAR arg. Change all uses. ({CCHAR}): Unput comment character before calling process_comment. (grab_comment_block): Rename from grab_help_text. Don't discard spaces from comment text. Update input_line_number and current_input_column as characters are read. Warn only once about incompatible comment characters in a given block of comments. Use stream_reader class instead of accessing yyinput and yyunput directly. (class flex_stream_reader): New class. (process_comment): Use grab_comment_block to handle all comments. Don't call maybe_gripe_matlab_incompatible_comment. Always store comment text returned by grab_comment_block. * lex.h (grab_comment_block): Provide decl. (class stream_reader): New class. 2008-04-16 John W. Eaton * parse.y (Fautoload, Fmfilename): Call octave_call_stack::caller_user_code, not octave_call_stack::caller_user_script_or_function. * toplev.cc, toplev.h (octave_call_stack::caller_user_code): Rename from octave_call_stack::caller_user_script_or_function. (octave_call_stack::do_caller_user_code): Rename from octave_call_stack::do_caller_user_script_or_function. * ov-usr-fcn.h (class octave_user_code): New class, derived from octave_fucntion. (class octave_user_function, class octave_user_script): Derive from octave_user_code, not octave_function. (octave_user_script::user_code_value, octave_user_function::user_code_value): New functions. * ov.cc (octave_value::user_script_value, octave_value::user_code_value): New functions. * ov.h: Provide decls. (octave_value::is_user_code, octave_value::is_user_script): New functions. * ov-base.cc (octave_base_value::user_script_value, octave_base_value::user_code_value): New virutal functions. * ov-base.h: Provide decls. (octave_base_value::is_user_script, octave_base_value::is_user_code): New virtual functions. * error.cc (verror, pr_where, error_2, warning_1): Call octave_call_stack::caller_user_code instead of octave_call_stack::caller_user_script_or_function * input.cc (get_user_input): Likewise. * debug.h (bp_table::breakpoint_map): Use pointer to octave_user_code instead of octave_user_function. * debug.cc (get_user_code): Rename from get_user_function. Return pointer to octave_user_code instead of octave_user_function. Change all uses. (bp_table::do_add_breakpoint, bp_table::do_remove_breakpoint, bp_table::do_remove_all_breakpoints_in_file, bp_table::do_get_breakpoint_list): Avoid dereferencing invalid pointers. (parse_dbfunction_params): Call octave_call_stack::caller_user_code, not octave_call_stack::caller_user_script_or_function. * load-save.cc (Fsave): Fix continuation character in doc string. * pt-walk.h (tree_walker::visit_function_def): New function. * pt-pr-code.cc (tree_print_code::visit_function_def): New function. * pt-pr-code.h: Provide decl. * pt-bp.cc (tree_breakpoint::visit_function_def): New function. * pt-bp.h: Provide decl. * pt-check.cc (tree_checker::visit_function_def): New function. * pt-check.h: Provide decl. * parse.y (finish_function): Return ptr to tree_function_def object if curr_fcn_ptr is not defined. Avoid dereferencing invalid pointers. (frob_function): Set curr_fcn_ptr only when reading a function file. (function): Call finish function in both cases to generate value of production. * pt-cmd.h, pt-cmd.cc (tree_function_def): New class. * parse.y (parse_and_execute): Delete. * parse.h: Delete decl. * pt-pb.cc (tree_breakpoint::visit_octave_user_script): New function. * pt-pb.h: Provide decl. * pt-check.cc (tree_checker::visit_octave_user_script): New function. * pt-check.h: Provide decl. * pt-pr-code.cc (tree_print_code::visit_octave_user_script): New function. * pt-pr-code.h: Provide decl. * pt-walk.h (visit_octave_user_script): New pure virtual function. * parse.y (make_script, process_leading_comments, looking_at_function_keyword): New static functions. (SCRIPT): New token. (script): New non-terminal. (command): Handle script here. (parse_fcn_file): Eliminate EXEC_SCRIPT argument. Change all callers. Parse scripts and return an octave_user_script rather than executing them here. (load_fcn_from_file): Handle script and function files the same. (source_file): Call d_multi_index_op on object returned by parse_fcn_file. (is_function_file): Delete. (gobble_leading_white_space): Don't recurse. Simplify. Eliminate SKIP_CODE, IN_PARTS, and SAVE_COPYRIGHT arguments. Change all callers. (octave_function_ptr): Delete unused typedef. (get_help_from_file): If help text isn't found by gobble_leading_whitespace, parse file to find it. * lex.l (SCRIPT_FILE_BEGIN): New exclusive start state. (prep_lexer_for_script): New function. (grab_help_text): New arg, EOF. (process_comment): New function. ({CCHAR}): Use it. * lex.h (prep_lexer_for_script): Provide decl. * lex.h, lex.cc, parse.y (lexical_feedback::beginning_of_function): Delete data member and all uses. * ov-usr-fcn.cc (octave_user_script::~octave_user_script): Move destructor here from ov-usr-fcn.h. Delete cmd_list. (octave_user_script::subsref, octave_user_script::accept, octave_user_script::traceback_error): New functions. (octave_user_script::do_multi_index_op): Execute cmd_list instead of calling source_file. * ov-usr-fcn.h (octave_usr_script::cmd_list, octave_usr_script::t_parsed, octave_usr_script::t_checked, octave_usr_script::call_depth): New data members. (octave_usr_script::octave_usr_script): Initialize all data members. (octave_usr_script::octave_usr_script (const std::string&, const std::string&, tree_statement_list *, const std::string&)): New constructor. (octave_usr_script::function_value, octave_usr_script::user_script_value, mark_fcn_file_up_to_date, octave_usr_script::stash_fcn_file_time, octave_usr_script::time_parsed, octave_usr_script::time_checked, octave_usr_script::subsref, octave_usr_script::body): New functions. (octave_user_script::subsref, octave_user_script::accept, octave_user_script::traceback_error): Provide decls. 2008-04-14 Jaroslav Hajek * oct-stream.cc (octave_scan_1): Ensure digit following X is hex digit before reading number as hex. 2008-04-14 John W. Eaton * file-io.cc (Ffread): Allow SKIP arg to be omitted. (Ffwrite): Likewise. Handle args in a way consistent with Ffread. 2008-04-09 Michael Goffioul * DLD-FUNCTIONS/dispatch.cc: Replace system("echo '...'>...") calls with real file writing. 2008-04-07 Jaroslav Hajek * DLD-FUNCTIONS/qr.cc (Fqrshift): New function. * DLD-FUNCTIONS/chol.cc (Fcholinsert, Fcholdelete, Fcholshift): New functions. 2008-04-04 John W. Eaton * parse.y (make_constant): Handle escape sequences in dq-strings. 2008-04-03 John W. Eaton * parse.y (make_constant): Also stash original text for strings. * ov-fcn-handle.cc (octave_fcn_handle::subsref): Don't call next_subsref here. 2008-04-01 John W. Eaton * pt-id.h (do_lookup (bool&, bool)): Delete. (do_lookup (tree_argument_list *, const string_vector&, octave_value_list&, bool&)): Call MAYBE_DO_BREAKPOINT here. 2008-04-02 David Bateman * graphics.cc (void gnuplot_backend::close_figure (const octave_value&) const): Allow for an input and output stream. 2008-03-28 Jaroslav Hajek * DLD-FUNCTIONS/lookup.cc: New file. * Makefile.in (DLD_XSRC): Add it to the list. 2008-03-28 David Bateman * ov-complex.cc (SCALAR_MAPPER, CD_SCALAR_MAPPER): New macro for complex values with zero imaginary part. (erf, erfc, gamma, lgamma): Use the new mappers to define these mapper functions. * ov-complex.h (erf, erfc, gamma, lgamma): Declare them. * ov-cx-mat.cc (any_element_less_than, any_element_greater_than): New static functions (DARRAY_MAPPER, CD_ARRAY_MAPPER): New macro for complex values with zero imaginary part. (erf, erfc, gamma, lgamma): Use the new mappers to define these mapper functions. * ov-cx-mat.h (erf, erfc, gamma, lgamma): Declare them. * ov-cx-sparse.cc (any_element_less_than, any_element_greater_than): New static functions (DSPARSE_MAPPER, CD_SPARSE_MAPPER): New macro for complex values with zero imaginary part. (erf, erfc, gamma, lgamma): Use the new mappers to define these mapper functions. * ov-cx-sparse.h (erf, erfc, gamma, lgamma): Declare them. * ov-re-sparse.cc (CD_SPARSE_MAPPER): Use correct mapper functors. * mapper.cc: Add tests for the above cases. 2008-03-27 John W. Eaton * DLD-FUNCTIONS/max.cc: Rename from minmax.cc. * Makefile.in (DLD_XSRC): Rename minmax.cc to max.cc. * DLD-FUNCTIONS/__convn__.cc (convn): Use traits class and typedefs to allow all types to be deduced from argument types. 2008-03-27 Søren Hauberg * DLD-FUNCTIONS/__convn__.cc (Fconvn): Allow convolving real data with complex data. 2008-03-26 John W. Eaton * ov-range.h (octave_range::subsref (const std::string&, const std::list&, int)): Forward to simple subsref. * ov-base-sparse.h (octave_base_sparse::subsref (const std::string&, const std::list&, int)): Likewise. * ov-base-scalar.h (octave_base_sparse::subsref (const std::string&, const std::list&, int)): Likewise. * ov-base-matrix.h (octave_base_matrix::subsref (const std::string&, const std::list&, int)): Likewise. * ov-struct.cc, ov-cell.h (octave_cell::subsref (const std::string&, const std::list&, int)): Define nargout version of subsref instead of simple version. * ov-struct.cc, ov-struct.h (octave_struct::subsref (const std::string&, const std::list&, int)): Define nargout version of subsref instead of simple version. * ov-builtin.h (octave_builtin::subsref (const std::string&, const std::list&): Forward to nargout subsref. * ov-cell.h (octave_cell::subsref (const std::string&, const std::list&)): * ov-class.h (octave_class::subsref (const std::string&, const std::list&): Likewise. * ov-fcn-handle.h (octave_fcn_handle::subsref (const std::string&, const std::list&): Likewise. * ov-list.h (octave_list::subsref (const std::string&, const std::list&): Likewise. * ov-mex-fcn.h (octave_mex_function::subsref (const std::string&, const std::list&): Likewise. * ov-struct.h (octave_struct::subsref (const std::string&, const std::list&)): * ov-usr-fcn.h (octave_user_function::subsref (const std::string&, const std::list&): Likewise. * ov.cc (octave_value::subsref): Use value of nargout instead of is_constant method to decide which type of subsref method to call. (octave_value::assign): Always call simple subref method here. * DLD-FUNCTIONS/chol.cc, DLD-FUNCTIONS/det.cc, DLD-FUNCTIONS/getpwent.cc, DLD-FUNCTIONS/inv.cc, DLD-FUNCTIONS/qr.cc, DLD-FUNCTIONS/symrcm.cc, file-io.cc): Texinfo fixes. 2008-03-26 Søren Hauberg * DLD-FUNCTIONS/__convn__.cc (Fconvn): Call complex_array_value to extract N-d array. 2008-03-26 John W. Eaton * ov-base-sparse.cc (octave_base_sparse::print_raw): Also display percentage of elements that are nonzero. 2008-03-25 Søren Hauberg * DLD-FUNCTIONS/__convn__.cc: New file. * Makefile.in: Add __convn__.cc 2008-03-25 David Bateman * DLD-FUNCTIONS/hex2num.cc: New function * Makefile.in (DLD_XSRC): Add hex2num.cc. 2008-03-25 Jaroslav Hajek * mappers.cc (Fexpm1, Flog1p): New functions. * ov-base.cc, ov-base.h, ov-bool-mat.h, ov-bool-sparse.h, ov-bool.h, ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h, ov-cx-sparse.cc, ov-cx-sparse.h, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h, ov-scalar.cc, ov-scalar.h, ov.h: Provide expm1 and log1p functions. * mappers.cc (Froundb): New functions * ov-base.cc, ov-base.h, ov-bool-mat.h, ov-bool-sparse.h, ov-bool.h, ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h, ov-cx-sparse.cc, ov-cx-sparse.h, ov-intx.h, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h, ov-scalar.cc, ov-scalar.h, ov.h: Provide roundb mapper function. 2008-03-25 Jaroslav Hajek * load-save.cc (save_vars): Handle -struct modifier. (save_fields): New function. (Fsave): Document new feature. 2008-03-25 John W. Eaton * lex.h (lexical_feedback::looking_at_initializer_expression): New data member. * lex.l (lexical_feedback::init): Initialize it. (handle_identifier): Don't unconditionally force identifiers to be variables in the current scope. Don't call force_local_variable for symbols that appear in parameter initializer expressions. * parse.y (decl_param_init): New parser "subroutine". (decl2): Use it. Set lexer_flags.looking_at_initializer_expression to false after parsing initializer. 2008-03-24 David Bateman * data.cc (map_s_s): Fix for sparse/sparse mappers that resulted in an empty sparse matrix being returned. (Fhypot): New function based on the libm hypot function. 2008-03-24 Primozz Peterlin * variables.cc (Fexist): Doc fix. 2008-03-23 David Bateman * OPERATORS/op-int.h: Add el_div and el_ldiv operators to the binops that were missing them. Added elem_pow functions for mixed integer floating point cases. Initialize the mixed integer floating point cases. 2008-03-21 John W. Eaton * ov-cell.h (octave_cell::is_constant): Return true. * ov-cell.h, ov-cell.cc (octave_cell::subsref (const std::string&, const std::list&)): Define. (octave_cell::subsref (const std::string&, const std::list&, int)): Call panic_impossible. * ov-struct.h (octave_struct::is_constant): New function. * ov-struct.h, ov-struct.cc (octave_struct::subsref (const std::string&, const std::list&)): Define. (octave_struct::subsref (const std::string&, const std::list&, int)): Call panic_impossible. 2008-03-21 David Bateman * DLD-FUNCTIONS/amd.cc: New file. * Makefile.in (DLD_XSRC): Add amd.cc. 2008-03-20 David Bateman * Cell.cc (Cell Cell::diag (void) const): delete. (Cell Cell::diag (octave__idx_type) const):Rewrite in terms of template classes function. * Cell.h (Cell diag (void) const): delete. * ov.h (octave_value diag (octave_idx_type) const): New method. * ov-base.h (virtual octave_value diag (octave_idx_type) const): New virtual method. * ov-base.cc (octave_value octave_base_value::diag (octave_idx_type) const): New default method. * ov-base-mat.h (octave_value diag (octave_idx_type) const): New method. * ov-base-sparse.h (octave_value diag (octave_idx_type) const): New method. * ov-base-scalar.h (octave_value diag (octave_idx_type) const): New method. * ov-range.h (octave_value diag (octave_idx_type) const): New method. * data.cc (make_diag, make_spdiag): Delete. (Fdiag): Rewrite in terms of octave_value diag function. * data.cc (static octave_value make_diag (const Cell&, octave_idx_type)): New instantiation of template function. (static octave_value make_diag (const octave_value&, octave_idx_type)): Allow cell arrays. * Cell.cc (Cell Cell::diag (void) const, Cell Cell::diag (octave__idx_type)): New methods for diagonal matrices. * Cell.h (Cell Cell::diag (void) const, Cell Cell::diag (octave__idx_type)): Declare them. 2008-03-18 David Bateman * ov-re-mat.cc (lgamma): Convert to a allow negative arguments. * ov-re-sparse.cc (lgamma): ditto. * ov-scalar.cc (lgamma): ditto. * DLD-FUNCTIONS/minmax.cc: 64-bit indexing fix. 2008-03-13 John W. Eaton * ov-usr-fcn.cc (octave_user_function::octave_user_function): Handle num_named_args in initialization list instead of functinon body. * octave.gperf: Eliminate varargin and varargout keywords. * lex.l (is_keyword_token): Eliminate varargin_kw and varargout_kw from switch statement. * parse.y (return_list): Eliminate special cases for VARARGOUT. Call validate on tree_parameter_list object. (param_list1): Likewise, for VARARGIN. * pt-misc.cc (tree_parameter_list::validate): New function. (tree_parameter_list::mark_varargs_only): Now private. (tree_parameter_list::mark_varargs): Now private. * pt-misc.h (tree_parameter_list::validate): Provide decl. 2008-03-12 John W. Eaton * variables.cc (Vwhos_line_format): Omit print_dims parameter. Fix doc string in Vwhos_line_format DEVAR. (symbol_record_name_compare): Delete unused function. (whos_parameter::dimensions): Delete struct field. (symbol_info_list): New class. (dimensions_string_req_first_space, make_dimensions_string, dimensions_string_req_total_space): Delete. (parse_whos_line_format): Move functionality to new symbol_info_list class. (print_symbol_info_line): Move functionality to new symbol_info_list::struct symbol_info::displaly_line method. (do_who): Simplify with new symbol_info_list class. Handle index expressions in addition to symbol names. * DLD-FUNCTIONS/dlmread.cc (Fdlmread): Fix separator detection. 2008-03-11 John W. Eaton * DLD-FUNCTIONS/eig.cc (Feig): Handle possible error from EIG. * DLD-FUNCTIONS/qp.cc (qp, Fqp): Likewise. * xpow.cc (xpow): Likewise. 2008-03-11 John W. Eaton * DLD-FUNCTIONS/dlmread.cc: Style fixes. 2008-03-11 David Bateman * DLD-FUNCTIONS/dlmread.cc: Function ported from octave forge. Add spreadsheet style ranges. * Makefile.in (DLD_XSRC): Add dlmread.cc. 2008-03-10 John W. Eaton * mex.cc (mxCreateLogicalScalar): Argument is now mxLogical. * data.cc (Fisfloat): New function. * ov.h (octave_value::is_float_type): Ditto. * ov-base.h (octave_base_value::is_float_type): Ditto. * ov-complex.h (octave_complex): Ditto. * ov-cx-mat.h (octave_complex_matrix): Ditto. * ov-cx-sparse.h (octave_sparse_complex_matrix): Ditto. * ov-range.h (octave_range): Ditto. * ov-re-mat.h (octave_matrix): Ditto. * ov-re-sparse.h (octave_sparse_matrix): Ditto. * ov-scalar.h (octave_scalar): Ditto. * mxarray.h.in (mxLogical): Use unsigned char instead of int. From Antwerpen, G. (Gert) van . 2008-03-07 John W. Eaton * ov-struct.cc (octave_struct::print_raw): Don't print contents fo struct arrays that have more than one element. 2008-03-06 David Bateman * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Document that the initial interpretation of a positive definite return from matrix_type is that the matrix is "probably" positive definite and not certainly so. 2008-03-06 John W. Eaton * parse.y: Move tests here from test/test_eval.m. * DLD-FUNCTIONS/fft.cc: Move tests here from test/test_signal.m. * DLD-FUNCTIONS/dassl.cc: Move tests here from test/test_diffeq.m. * DLD-FUNCTIONS/lsode.cc: Move tests here from test/test_diffeq.m. * DLD-FUNCTIONS/quad.cc: Move tests here from test/test_quad.m. * DLD-FUNCTIONS/time.cc: Move tests here from test/test_system.m. 2008-03-06 Alexander Barth * DLD-FUNCTIONS/__lin_interpn__.cc (lookup): Handle decreasing coordinate values. 2008-03-05 Jaroslav Hajek * DLD-FUNCTIONS/chol.cc (Fcholupdate): Adjust code to meet Octave's coding guidelines. * DLD-FUNCTIONS/qr.cc (Fqrupdate, Fqrinsert, Fqrdelete): Adjust code to meet Octave's coding guidelines. * DLD-FUNCTIONS/qr.cc (Fqrdelete): Fix incorrect test. * DLD-FUNCTIONS/qr.cc (Fqrinsert, Fqrdelete): Modify to use 0-based indexing in liboctave's QR classes. 2008-03-04 Jaroslav Hajek * DLD-FUNCTIONS/chol.cc (Fcholupdate): New function. * DLD-FUNCTIONS/qr.cc (Fqrupdate, Fqrinsert, Fqrdelete): New functions. 2008-03-04 Ryan Rusaw * toplev.h (octave_call_stack::element): New static function. (octave_call_stack::cs): Now std::deque instead of std::list. * pt-stmt.cc (curr_statement, curr_caller_statement): Delete. * pt-stmt.h: Delete decls. * pt-stmt.h, pt-stmt.cc (tree_statement_stack): New class. * pt-stmt.cc (tree_statement::eval): Use tree_statement_stack instead of curr_statement variable. * ov-usr-func.cc (octave_user_function::do_multi_index_op): Don't set curr_caller_statement. * error.cc (verror, pr_where): Call tree_statement_stack::current_line and tree_statement_stack::current_column instead of instead of curr_statement->line and curr_statement->column. * input.cc (get_user_input): Likewise. 2008-02-27 John P. Swensen * debug.cc (get_user_function): Call symtab::find_function instead of symtab::find_user_function. 2008-02-27 John W. Eaton * oct-stream.cc (do_read): Stop reading if seek fails. 2008-02-26 John W. Eaton * ov-base-int.cc (octave_base_int_helper, octave_base_int_helper_traits): New templates and specializations. (octave_base_int_matrix::convert_to_str_internal, octave_base_int_matrix::convert_to_str_internal): Use them. * DLD-FUNCTIONS/rand.cc (do_rand): Pass name of calling function to octave_rand::state. * variables.cc (bind_ans): Handle cs-lists recursively. * ov-cs-list.h, ov-cs-list.cc (octave_cs_list::print, octave_cs_list::print_raw): Delete. 2008-02-25 John W. Eaton * Cell.cc (Cell::map): New function. * Cell.h (Cell::map): Declare. (xisalnum, xisalpha, xisascii, xiscntrl, xisdigit, xisgraph, xislower, xisprint, xispunct, xisspace, xisupper, xisxdigit, xtoascii, xtolower, xtoupper): New mapper functions. (ctype_mapper): New private typedef. * ov-cell.h (xisalnum, xisalpha, xisascii, xiscntrl, xisdigit, xisgraph, xislower, xisprint, xispunct, xisspace, xisupper, xisxdigit, xtoascii, xtolower, xtoupper): New mapper functions. 2008-02-25 Michael Goffioul * ov-scalar.cc (octave_scalar::round): Use xround instead of ::round in mapper implementation. 2008-02-25 John W. Eaton * ov-base.cc (UNDEFINED_MAPPER, STRING_MAPPER): New macros. Use them to define mapper functions. * mappers.cc (Fisalnum, Fisalpha, Fisascii, Fiscntrl, Fisdigit, Fisgraph, Fislower, Fisprint, Fispunct, Fisspace, Fisupper, Fisxdigit, Ftoascii, Ftolower, Ftoupper): Use DEFUNX to define ctype mapper functions. Use new function names. * ov-base.h, ov-base.cc, ov-str-mat.h, ov-str-mat.cc: Prepend x to ctype mapper function names. * graphics.h.in (row_vector_property::row_vector_property): Set default constraints here. (row_vector_property::add_constraint): New function. (row_vector_property::validate): Delete decl. (axes::properties::init): Use single-arg add_constraint function for xlim, ylim, zlim, clim, and alim properties. * graphics.cc (row_vector_property::validate): Delete. * graphics.cc (axes::properties::update_camera, axes::properties::update_aspectratios): Avoid shadow warnings from GCC. * graphics.h.in (base_properties::get_bounding_box): Avoid unused argument warning from GCC. * graphics.h.in (array_property::add_constraint): Arg is now const reference, not value. * graphics.h.in, graphics.cc (class row_vector_property): New class. (axes::properties): xlim, ylim, zlim, clim, alim, xtick, ytick, ztick properties are now row_vector_property objects instead of array_property objects. * genprops.awk: Special case row_vector_property in the same way as array_property. 2008-02-22 John W. Eaton * DLD-FUNCTIONS/ccolamd.cc, DLD-FUNCTIONS/colamd.cc, DLD-FUNCTIONS/convhulln.cc, DLD-FUNCTIONS/dmperm.cc, DLD-FUNCTIONS/qz.cc, DLD-FUNCTIONS/regexp.cc, DLD-FUNCTIONS/symbfact.cc, zfstream.h, zfstream.cc: Use 0 instead of NULL. 2008-02-22 David Bateman * DLD-FUNCTIONS/chol.c (Fchol, Fcholinv, Fchol2iinv): Treat sparse matrices. Add the "lower" and "vector" flags. * DLD-FUNCTIONS/inv.c (Finv): Treat sparse matrices. * DLD-FUNCTION/sparse.cc (static bool is_sparse (const octave_value&)): Remove and use arg.is_sparse_type () instead. (Fspcumprod, Fspcumsum, Fspprod, spsum, spsumsq, spdiag): Remove. * DLD-FUNCTIONS/splu.cc: Remove. * DLD-FUNCTIONS/lu.cc: Treat sparse matrices, Add "vector" flag. * DLD-FUNCTIONS/spchol.cc: Move to symbfact.cc * DLD-FUNCTIONS/symbfact.cc: Remove cholesky functions Fspchol, Fspcholinv, Fspchol2inv. * DLD-FUNCTIONS/luinc.cc: Modify for new sparse LU constructors. Ass the 'vector' flag. * DLD-FUNCTIONS/spparms.cc: Add the sum_tol flag. * Makifile.in (DLD_XSRC): Remove spchol.cc, splu.cc and add symbfact.cc * data.cc (NATIVE_REDUCTION): Treat sparse matrices (DATA_REDUCTION): Ditto. (template static octave_value make_spdiag (const T&, octave_idx_type)): New template function for sparse diag function. Instantiate it. (static octave_value make_diag (const octave_value&, octave_idx_type): Use make_spdiag for sparse matrice. (Fatan2): Compatibility fixes for mixed full/sparse matrices. 2008-02-21 John W. Eaton * DLD-FUNCTIONS/fsolve.cc (fsolve_user_jacobian): Check dimensions of user-supplied Jacobian matrix. (fsolve_user_function): Check for non-square systems. 2008-02-20 John W. Eaton * data.cc (map_d_m, map_m_d, map_m_m, Fatan2, Ffmod): Handle N-d arrays. * ov-bool-mat.h (octave_bool_matrix (const Array2&)): Delete. 2008-02-20 David Bateman * DLD-FUNCTIONS/det.cc, DLD-FUNCTIONS/find.cc, * DLD-FUNCTIONS/minmax.cc, DLD-FUNCTIONS/qr.cc: Treat sparse matrices. * DLD-FUNCTIONS/sparse.cc (Fspmin, Fspmax, Fatan2): Remove functions. * DLD-FUNCTIONS/dmperm.cc: Rename from spqr.cc. (Fspqr): Delete function. * DLD-FUNCTIONS/spqr.cc, DLD-FUNCTIONS/spdet.cc, DLD-FUNCTIONS/spfind.cc: Remove. * Makefile.in (DLD_XSRC): Add dmperm.cc to the list. Delete det.cc, find.cc, minmax.cc, and qr.cc from the list. * Makefile.in (OV_SRC): Remove ov-mapper.cc. (OV_INCLUDES): Remove ov-mapper.h. (DEFUN_PATTERN): No longer accept DEFUN_MAPPER as valid. * ov-mapper.cc, ov-mapepr.h: Delete, remove all includes of ov-mapper.h from all files. * op-b-sbm.cc, op-bm-sbm.cc, op-smb-b.cc, op-sbm-bm.cc: Include ov-bool-sparse.h. * defun-int.h (DEFUN_MAPPER_INTERNAL, install_builtin_mapper): Remove. * defun.cc (install_builtin_mapper): Ditto. * defun.h (DEFUN_MAPPER): Remove. * mappers.cc: Rewrite all mapper function using DEFUN and newly introduced octave_value mapper functions. (dummyp, xabs, xisalnum, xisascii, xiscntrl, xisdigit, xisgraph, xislower, xisprint, xispunct, xisspace, xisupper, xtoascii, xtolower, xtoupper, xconj, ximag, xreal): Remove static wrapper functions. * mkbuiltins (XDEFUN_MAPPER_INTERNAL, install_builtin_functions): Remove. * mkgendoc (XDEFUN_MAPPER_INTERNAL): Remove. * ov.cc (octave_mapper::register_type): Remove. * ov.h (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor, gamma, imag, isinf, isna, isnan, lgamma, log, log10, real, round, signum, sin, sinh, sqrt, tan, tanh, isalnum, isalpha, isascii, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit, toascii, tolower, toupper): New octave_value mapper functions. * ov-base.h (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor, gamma, imag, isinf, isna, isnan, lgamma, log, log10, real, round, signum, sin, sinh, sqrt, tan, tanh, isalnum, isalpha, isascii, iscntrl, isdigit, isgraph, slower, isprint, ispunct, isspace, isupper, isxdigit, toascii, tolower, toupper): New virtual mapper functions. * ov-base.cc (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor, gamma, imag, isinf, isna, isnan, lgamma, log, log10, real, round, signum, sin, sinh, sqrt, tan, tanh, isalnum, isalpha, isascii, iscntrl, isdigit, isgraph, slower, isprint, ispunct, isspace, isupper, isxdigit, toascii, tolower, toupper): Base versions of mapper functions. * ov-bool-mat.h (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor, gamma, imag, isinf, isna, isnan, lgamma, log, log10, real, round, signum, sin, sinh, sqrt, tan, tanh): Mapper function recast boolen matrix as double. * ov-bool.h (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor, gamma, imag, isinf, isna, isnan, lgamma, log, log10, real, round, signum, sin, sinh, sqrt, tan, tanh): Ditto. * ov-bool-sparse.h (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor, gamma, imag, isinf, isna, isnan, lgamma, log, log10, real, round, signum, sin, sinh, sqrt, tan, tanh): Ditto. (char_array_value): New method to convert to charNDArray. * ov-bool-sparse.cc (char_array_value): New method to convert to charNDArray. * ov-complex.cc (char_array_value): ditto. (xabs, ximag, xreal): Static wrapper functions. (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil, conj, cos, cosh, exp, finite, fix, floor, imag, isinf, isna, isnan, log, log10, real, round, signum, sin, sinh, sqrt, tan, tanh): New mapper methods. * ov-complex.h: Provide decls. * ov-cx-mat.cc (char_array_value): New method to convert to charNDArray. (xabs, ximag, xreal): Static wrapper functions. (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil, conj, cos, cosh, exp, finite, fix, floor, imag, isinf, isna, isnan, log, log10, real, round, signum, sin, sinh, sqrt, tan, tanh): New mapper methods. * ov-cx-mat.h: Provide decls. * ov-cx-sparse.cc (char_array_value): New method to convert to charNDArray. (xabs, ximag, xreal): Static wrapper functions. (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil, conj, cos, cosh, exp, finite, fix, floor, imag, isinf, isna, isnan, log, log10, real, round, signum, sin, sinh, sqrt, tan, tanh): New mapper methods. * ov-cx-sparse.h: Provide decls. * ov-intx.h (abs, signum, imag, ceil, conj, fix, floor, real, round, finite, isinf, isna, isnan): Define for both matrix and scalar classes. * ov-range.h (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor, gamma, imag, isinf, isna, isnan, lgamma, log, log10, real, round, signum, sin, sinh, sqrt, tan, tanh): New mapper functions. * ov-re-mat.cc (any_element_less_than): Static function to check if any elemet was less than a value, (any_element_greater_than): Ditto with greater than. (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor, gamma, imag, isinf, isna, isnan, lgamma, log, log10, real, round, signum, sin, sinh, sqrt, tan, tanh): New mapper functions. * ov-re-mat.h: Provide decls. * ov-scalar.cc (any_element_less_than): Static function to check if any elemet was less than a value, (any_element_greater_than): ditto with greater than. (abs acos acosh angle arg asin asinh atan atanh ceil conj cos cosh erf erfc exp finite fix floor gamma imag isinf isna isnan lgamma log log10 real round signum sin sinh sqrt tan tanh): New mapper functions. * ov-scalar.h: Provide decls. * ov-str-mat.cc (xisalnum, xisascii, xiscntrl, xisdigit, xisgraph, xislower, xisprint, xispunct, xisspace, xisupper, xtoascii, xtolower, xtoupper): New static wrapper functions. (isalnum, isalpha, isascii, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit, toascii, tolower, toupper): New mapper methods. * ov-str-mat.h: Provide decls. 2008-02-18 David Bateman * data.cc (Fatan2): Reject arguments that are integer types. 2008-02-19 Jaroslav Hajek * DLD-FUNCTIONS/qr.cc: Doc fix. 2008-02-18 John W. Eaton * symtab.h (symbol_table::fcn_info::fcn_info_rep::clear_unlocked_functions): symbol_table::fcn_info::fcn_info_rep::clear_cmdline_function, symbol_table::fcn_info::fcn_info_rep::clear_autoload_function): New functions. (symbol_table::fcn_info::fcn_info_rep::clear_user_function): Don't clear locked functions. (symbol_table::fcn_info::fcn_info_rep::clear_mex_function): Call clear_user_function instead of setting function_on_path directly. (symbol_table::fcn_info::fcn_info_rep::clear): Use new functions to do the real work. * ov.h (octave_value::lock, octave_value::unlock, octave_value::islocked): New functions. * ov-base.cc (octave_base_value::lock, octave_base_value::unlock): New functions. * ov-base.h Provide decls. (octave_base_value::islocked): New function. * ov-fcn.h (octave_function::islocked): Now const. 2008-02-15 John W. Eaton * ov-builtin.cc (octave_builtin::do_multi_index_op): Catch possible octave_execution_exception. * ov-mex-fcn.cc (octave_mex_function::do_multi_index_op): Likewise. * ov.cc (do_binary_op, do_cat_op, do_unary_op, octave_value::do_non_const_unary_op): Likewise. 2008-02-14 John W. Eaton * DLD-FUNCTIONS/balance.cc, DLD-FUNCTIONS/qz.cc: Don't check f77_exception_encountered. * sighandlers.cc (user_abort): If interrupting immediately, set octave_interrupt_state if it is not already set. * pt-stmt.cc (tree_statement::eval): Catch execution exceptions. * octave.cc (lo_error_handler): New static function. (initialize_error_handlers): Set liboctave_error_handler to lo_error_handler, not error. * DLD-FUNCTIONS/urlwrite.cc (urlget): Call octave_rethrow_exception instead of octave_throw_interrupt_exception. * utils.cc (BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE_FOR_VSNPRINTF): Likewise. 2008-02-12 David Bateman * graphics.h.in: Implement the cdatamapping property in patch and image objects. 2008-02-12 John W. Eaton * pt-loop.cc (tree_simple_for_command::eval): Compute range element with multiplication. 2008-02-11 John W. Eaton * Makefile.in ($(MAKEDEPS)): Skip dependencies if omit_deps is defined. 2008-02-09 John W. Eaton * pr-output.cc (set_range_format): Eliminate sign arg. Change all callers. 2008-02-08 John W. Eaton * ov-struct.cc (octave_struct::subsref): Allow Cell::index to resize. * input.cc (interactive_input): Eliminate debug arg. Change All uses. (get_user_input): Don't process input_buf if there is an error. Call reset_error_handler instead of setting error_state to 0. 2008-02-08 Michael Goffioul * graphics.h.in (callback_property::execute): New static helper method (useful to execute callbacks by name). * graphics.cc (callback_property::execute): Likewise. (execute_callback): Avoid undefined argument when executing callback. Do not use arguments when the callback is a string. 2008-02-07 John W. Eaton * ov-range.h (octave_range::sort): New functions. 2008-02-07 David Bateman * Makefile.in (DLD_XSRC): Delete spkron.cc. * DLD-FUNCTIONS/spkron.cc: Delete. * DLD-FUNCTIONS/kron.cc: Include here and dispatch to the sparse version if either argument is sparse. 2008-02-06 John W. Eaton * Makefile.in (parse.cc): Also use --defines option for bison. 2008-02-06 Michael Goffioul * graphics.cc (axes::properties::set_defaults): Set default axes color to white. 2008-02-06 John W. Eaton * Makefile.in (parse.cc): Use "-o $@" instead of renaming y.tab.c. (maintainer-clean): Don't remove y.tab.c. * Makefile.in (parse.cc : parse.y): Use mv instead of move-if-change. (stamp-prereq, stamp-liboctave-prereq): Eliminate. (clean): Don't remove stamp-prereq and stamp-liboctave-prereq. (OPT_BASE, OPT_IN, OPT_INC): New macros. (OPT_HANDLERS): Define in terms of OPT_BASE. ($(OPT_INC) : %.h : %.in): New pattern rule. (PREREQ): New macro. ($(MAKEDEPS)): Simplify with $(PREREQ). 2008-02-05 John W. Eaton * Makefile.in: Unconditionally include $(MAKEDEPS). Mark $(MAKEDEPS) as .PHONY targets if omit_deps is true. 2008-02-05 Michael Goffioul * graphics.h.in (base_properties::get_boundingbox): New method. (figure::properties::get_boundingbox): Overload method. (axes::properties::get_boundingbox): Likewise. * graphics.cc (figure::properties::get_boundingbox): Return a left-to-right/top-to-bottom bounding box rectangle. (axes::properties::get_boundingbox): Likewise. (axes::properties::update_camera): Remove backend access and use the new axes bounding box. 2008-02-04 Shai Ayal * graphics.h.in (axes::properties::update_xlim, axes::properties::update_ylim, axes::properties::update_zlim): New update methods. * graphics.cc (axes::properties::calc_ticks): New function. (axes::properties::magform): New function. (axes::update_axis_limits): Call update_{x,y,z}lims if appropriate. 2008-02-04 Michael Goffioul * graphics.h.in (base_graphics_backend::get_screen_size, graphics_backend::get_screen_size): New methods. (graphics_backend::available_backends): Export symbol. (class figure::properties, class axes::properties): Export classes. (figure::properties::get_boundingbox): New utility method. (figure::properties::position): Use valid default position. (axes::properties::gridlinestyle, axes::properties::minorgridlinestyle): Use dotted line style as default. * graphics.cc (default_figure_position): New static function. (gnuplot_backend::get_screen_size): New method. (figure::properties::get_boundingbox): New utility method. 2008-02-02 Shai Ayal * graphics.h.in (base_scaler::~base_scalar): New virtual destructor. * graphics.cc (axes::properties::update_camera): Tag abs with std. * graphics.h.in (graphics_backend::find_backend): New function. (class figure): Add __backend__ property and set method. 2008-02-02 John W. Eaton * help.cc (do_type): Don't print dyamically loaded function files. * ov-fcn.h (octave_function::is_dynamically_loaded_function): Delete. 2008-02-01 John W. Eaton * symtab.cc (Fset_variable, Fvariable_value): New functions, but commented out for now. 2008-01-30 Michael Goffioul * graphics.h.in (axes::properties::get_transform_matrix, axes::properties::get_inverse_transform_matrix, axes::properties::get_opengl_matrix_1, axes::properties::get_opengl_matrix_2, axes::properties::get_transform_zlim): New accessors. (base_properties::is_clipping): New accessor. (class graphics_xform): New class encapsulating axes transformation. (axes::properties::get_transform): New method returning a graphics_xform object. * graphics.cc (class graphics_xform): New class. 2008-01-31 David Bateman * ov.cc (octave_value::octave_value (const ArrayN&), octave_value::octave_value (const Sparse&, const MatrixType &), octave_value::octave_value (const ArrayN&)): New constructors. * ov.h: (octave_value (const ArrayN&), octave_value (const Sparse&, const MatrixType &), octave_value (const ArrayN&)): Declare them. (octave_value sort (octave_idx_type, sortmode) const, octave_value sort (Array &, octave_idx_type, sortmode) const): octave_value sort method. * ov-base.cc (sort): Base versions of teh octave_value sort methods. * ov-base.h (sort): Declare the octave_value sort methods * ov-base-scalar.h (sort): Simple sort methods for scalars. * ov-base-mat.h, ov-base-sparse.h (sort): Sort methods calling underlying array or sparse sort methods. * ov-str-mat.h (sort): String specific sort methods. * TEMPLATE-INST/Array-tc.cc: Instantiate the array sort methods. * ov-streamoff.h (sort): Sort versions returning and error. * oct-stream.cc, ov-typeinfo.cc, Array-os.cc: Null instantiation of array sort methods. * Makefile.in (DLD_XSRC): Remove sort.cc * DLD-FUNCTIONS/sort.cc: Remove * data.cc (Fsort): New function using octave_value sort methods for the sorting. Add tests. 2008-01-30 Thomas Weber * pager.cc (Fmore): Doc fix. 2008-01-28 Michael Goffioul * genprops.awk: Add update ('u') modifier and document the readonly ('r') modifier. * graphics.h.in (class base_scaler, class lin_scaler, class log_scaler, class scaler): New classes to make abstraction of the axis scale. (base_graphics_backend::get_screen_resolution, graphics_backend::get_screen_resolution): New methods. (axes::properties::sx, axes::properties::sy, axes::properties::sz): New scaler fields. (axes::properties::get_x_scaler, axes::properties::get_y_scaler, axes::properties::get_z_scaler): New accessors. (axes::properties::x_render, axes::properties::x_render_inv, axes::properties::x_gl_mat1, axes::properties::x_gl_mat2, axes::properties::x_zlim): New utility Matrix fields. (axes::properties::get_boundingbox, axes::properties::update_camera, axes::properites::update_aspectratios, axes::properties::update_transform, axes::properties::update_xscale, axes::properties::update_yscale, axes::properties::update_zscale, axes::properties::update_view, axes::properties::update_xdir, axes::properties::update_ydir, axes::properties::update_zdir): New updater methods. (axes::properties::init): Initialize sx, sy, sz and x_zlim correctly. (axes::properties::position): Use valid default position value. (axes::properties::xscale, axes::properties::yscale, axes::properties::zscale, axes::properties::xdir, axes::properties::ydir, axes::properties::zdir, axes::properties::view): Add updater ('u') property modifier. * graphics.cc (default_axes_position, default_axes_outerposition): New initializers. (convert_position): New utility function to convert position according to specified units. (gnuplot_backend::get_screen_resolution): New method. (axes::properties::set_defaults): Initilize recently added properties. (xform_matrix, xform_vector, transform, xform_scale, xform_translate, scale, translate, xform, normalize, dot, cross, unit_cube, cam2xform, xform2cam): New inline transformation utility functions. (axes::properties::update_camera, axes::properties::update_aspectratios, axes::properties::get_boundingbox): New updater methods for computing transformation matrices. (axes::update_axis_limits): Update transformation data. 2008-01-28 John W. Eaton * oct-stream.cc (BEGIN_CHAR_CLASS_CONVERSION): Handle width properly. (OCTAVE_SCAN) [__GNUG__ && ! CXX_ISO_COMPLIANT_LIBRARY]: Delete special case. 2008-01-25 David Bateman * DLD-FUNCTIONS/rand.cc (Frandp): Relax relative error on randp tests. 2008-01-25 Michael Goffioul * graphics.h.in (base_properties::get_backend, base_graphics_object::get_backend, graphics_backend::get_backend): New methods for convenient access to the backend. (figure::get_backend, figure::set_backend): Remove. * graphics.cc (base_properties::get_backend): New method. (Fdrawnow): Use graphics_object::get_backend to simplify code. 2008-01-24 Pascal Dupuis * mxarray.h.in: Include . 2008-01-22 John W. Eaton * graphics.cc (clear_drawnow_request): New function. (Fdrawnow): Add it to the unwind_protect stack. * input.cc (Vdrawnow_requested): No longer static. * input.h: Provide decl. * graphics.cc (Fdrawnow, Fset, make_graphics_object): Use Vdrawnow_requested directly. * toplev.cc (octave_add_atexit_function, octave_remove_atexit_function): New functions. (Fatexit): Use them. * graphics.cc (Fdrawnow): Call octave_add_atexit_function instead of using eval. * toplev.h (octave_add_atexit_function, octave_remove_atexit_function): Provide decls. 2008-01-22 Michael Goffioul * graphics.h.in (base_properties::is_visible, base_properties::set_modified): New accessors. (class base_graphics_backend, class graphics_backend): New classes for handling octave/backend interaction. (figure::properties::close): Add "pop" argument controlling whether the figure should be popped from the list of existing figures. (class figure::properties): New backend field and accessors, holding the graphics backend associated with the figure. * graphics.cc (class gnuplot_backend): New class for the default gnuplot backend. (figure::properties::close): Add "pop" argument and transfer the figure closing to the associated backend. (Fdrawnow): New builtin function, converted from drawnow.m. 2008-01-19 John W. Eaton * genprops.awk (emit_source): Use "pname" for property name argument. 2008-01-19 Shai Ayal * graphics.h.in (class figure::properties): New properties: alphamap, currentcharacter, currentobject, current_point, dockcontrols, doublebuffer, filename, integerhandle, inverthardcopy, keypressfcn, keyreleasefcn, menubar, mincolormap, name, numbertitle, paperunits, paperposition, paperpositionmode, papersize, papertype, pointer, pointershapecdata, pointershapehotspot, position, renderer, renderermode, resize, resizefcn, selectiontype, toolbar, units, windowbuttondownfcn, windowbuttonmotionfcn, windowbuttonupfcn, windowbuttonwheelfcn, windowstyle, wvisual, wvisualmode, xdisplay, xvisual, xvisualmode, buttondownfcn. 2008-01-19 Michael Goffioul * graphics.h.in (base_properties::beingdeleted, base_properties::is_beingdeleted, base_properties::get_beingdeleted, base_properties::set_beingdeleted): Add beingdeleted property and accessors. * graphics.cc (base_properties::get): Likewise. (gh_manager::free): Set beingdeleted to "on" when freeing an object. * genprops.awk: Skip C++-style comments in property declaration. * graphics.h.in (class axes::properties): New properties: alim, alimmode, xminortick, yminortick, zminortick, ambientlightcolor, cameraposition, cameratarget, cameraupvector, cameraviewangle, camerapositionmode, cameratargetmode, cameraupvectormode, cameraviewanglemode, currentpoint, drawmode, fontangle, fontname, fontsize, fontweight, fontunits, gridlinestyle, minorgridlinestyle, linestyleorder, linewidth, plotboxaspectratio, plotboxaspectratiomode, projection, tickdir, tickdirmode, ticklength, tightinset, units, x_viewtransform, x_projectiontransform, x_viewporttransform, x_normrendertransform, x_rendertransform. * genprops.awk: Handle new readonly modifier 'r'. 2008-01-18 Juhani Saastamoinen * genprops.awk: Avoid using "default" as a variable name. 2008-01-17 Michael Goffioul * graphics.h.in (data_property::get_data_limits): Reset min/max values. 2008-01-17 David Bateman * ov-fcn-inline.cc: Add tests for Finline. 2008-01-17 Ben Abbott * load-path.cc (F__pathorig__): Rename from Fpathdef. (Frestoredefaultpath): New function. 2008-01-16 John W. Eaton * pt-assign.cc (tree_simple_assignment::rvalue, tree_multi_assignment::rvalue): Handle assignment of comma-separated lists. 2008-01-15 John W. Eaton * mappers.cc (install_mapper_functions): Move test for asin here from test/test_arith.m. * graphics.h.in (class line::properties, class text::properties): Rename erase_mode property to erasemode. 2008-01-15 Michael Goffioul * graphics.h.in (base_properties::remove_child, base_properties::adopt, base_properties::update_axis_limits): Make virtual. (base_graphics_object::mark_modified, base_graphics_object::override-defaults, base_graphics_object::set_from_list, base_graphics_object::set, base_graphics_object::get, base_graphics_object::get_parent, base_graphics_object::remove_child, base_graphics_object::adopt, base_graphics_object::reparent, base_graphics_object::defaults, base_graphics_object::type): Add default implementation. (class root_figure, class figure, class axes, class line, class text, class image, class patch, class surface): Remove overloaded virtual methods whose implementation is identical to the default one. * genprops.awk: Handle 'h' modifier for hidden properties. Replace "get(void)" method with "get(bool all = false)" to allow access to hidden properties. * graphics.h.in (base_properties::get, base_graphics_object::get, graphics_object::get, root_figure::get, figure::get, axes::get, line::get, text::get, patch::get, surface::get, image::get): New arg, ALL, to access hidden properties. (gh_manager::do_get_object): Do not look for invalid handles. (figure::properties::__plot_stream__, figure::properties::__enhanced__, axes::properties::__colorbar__): Make properties hidden. (axes::properties, line::properties, text::properties, patch::properties, surface::properties): Remove obsolete 'a' property modifier. * graphics.cc (base_properties::get): New arg ALL, to access hidden properties. (base_properties::mark_modified): Call mark_modified only on valid parent object. (__get__): New internal function returning all properties, including the hidden ones. 2008-01-15 John W. Eaton * graphics.cc (properties::set_currentfigure, properties::set_currentaxes): Don't convert arg to double before passing to graphics_handle constructor. (base_properties::remove_child): Call mark_modified if list of children changes. 2008-01-15 Shai Ayal * graphics.h.in (class line::properties): New properties: displayname, erasemode. (class text::properties) New properties: backgroundcolor, displayname, edgecolor, erase_mode, editing, fontunits, linestyle, linewidth, margin, verticalalignment. 2008-01-14 John W. Eaton * load-path.cc (load_path::do_initialize): Start with sys_path empty. (maybe_add_path_elts): Omit path_sep_str if path is empty. * symtab.h (symbol_table::do_pop_context): Remove symbol_records which have no more context. (symbol_table::symbol_record::pop_context, (symbol_table::symbol_record::symbol_record_rep::pop_context): Return size of value_stack, or 1 if variable is persistent or global. 2008-01-14 Kai Habel * graphics.h.in (class patch::properties): New properties: cdatamapping, facevertexalphadata, facevertexcdata, vertexnormals, normalmode, facelighting, edgealpha, edgelighting, backfacelighting, ambientstrength, diffusestrength, specularstrength, specularexponent, specularcolorreflectance, erasemode. 2008-01-14 Michael Goffioul * graphics.h.in (gh_manager::do_make_graphics_handle, gh_manager::make_graphics_handle): New boolean parameter do_createfcn. * graphics.cc (xcreatefcn): New static function. (gh_manager::do_make_graphics_handle): New boolean parameter do_createfcn. Execute createfcn callback accordingly. (make_graphics_object, F__go_figure__): Use do_createfcn parameter and call xcreatefcn * genprops.awk (emit_get_callback): Pass user data to execute method. * graphics.cc (execute_callback): New static function. (callback_property::validate): Make it work. (callback_property::execute): Make it work. (gh_manager::do_free): Execute delete function here. * graphics.h.in (callback_property::execute): Fix decl. (base_properties::buttondownfcn, base_properties::createfcn, base_properties::deletefcn, base_properties::userdata): Default value is empty Matrix, not undefined octave_value object. (base_properties::execute_createfcn): New function. (base_properties::execute_deletefcn): New function. 2007-12-13 Shai Ayal * graphics.h.in, graphics.cc (class base_properties): New properties: busyaction, buttondownfcn, clipping, createfcn, deletefcn, handlevisibility, hittest, interruptible, selected, selectionhighlight, uicontextmenu, userdata, visible. (class figure): Delete visible property. 2008-01-13 Michael Goffioul * grahpics.h.in: Sprinkle with OCTINTERP_API as needed. (axes::properties::xaxislocation): Allow value of zero. (axes::properties::yaxislocation): Likewise. 2008-01-12 Michael Goffioul * Makefile.in (distclean): Delete graphics-props.cc. * genprops.awk: Handle new graphics property classes. * graphics.h.in, graphics.cc: Adapt for new specific property types. 2008-01-12 John W. Eaton * toplev.cc (octave_config_info): Add GNUPLOT to the struct. * oct-conf.h.in (OCTAVE_CONF_GNUPLOT): New macro. 2008-01-11 John W. Eaton * DLD-FUNCTIONS/__qp__.cc (qp): Undo part of change from 2007-09-04 (compute Y at each iteration). 2008-01-10 John W. Eaton * DLD-FUNCTIONS/fsolve.cc (Ffsolve): Doc fix. (hybrd_info_to_fsolve_info): Swap return values for -1 and -2 inputs. * DLD_FUNCTIONS/__gnuplot_raw__.l: Delete. * Makefile.in (DLD_XSRC): Remove it from the list. (BUILT_DISTFILES): Remove __gnuplot_raw__.cc from the list. (stamp-prereq): Don't depend on __gnuplot_raw__.cc. (maintainer-clean): Don't remove __gnuplot_raw__.cc. (__gnuplot_raw__.cc): Delete target. (__gnuplot_raw__.o, pic/__gnuplot_raw__.o): Delete targets. * mex.cc (calc_single_subscript_internal): New static function. (mxArray_octave_value::calc_single_subscript): Use it. (mxArray_matlab::calc_single_subscript): Use it. 2008-01-07 John W. Eaton * src/pt-except.cc (tree_try_catch_command::eval): Set Vdebug_on_error and Vdebug_on_warning to false while executing try block. * error.cc (Vdebug_on_error, Vdebug_on_warning): No longer static. * error.h: Provide decls. * gripes.cc (gripe_wrong_type_arg (const std::string&, const octave_value&, bool)): New function. * gripes.h: Provide decl. * oct-stream.cc (printf_value_cache::printf_value_cache): Reject structs, cells, objects, and lists. (octave_base_stream::do_printf): Quit early if printf_value_cache constructor fails. * parse.y (make_anon_fcn_handle): Don't attempt to convert expression to assignment to __retval__. 2008-01-07 Michael Goffioul * ov-builtin.h (octave_builtin): Tag with OCTINTERP_API. * ov-dld-fcn.h (octave_dld_function): Likewise. * ov-dld-fcn.cc (octave_dld_function::create): New function. * ov-dld-fcn.h: Provide decl. * defun.h (DEFINE_FUNX_INSTALLER_FUN3): Call it instead of creating a new octave_dld_function object directly. 2008-01-04 John Swensen * debug.cc (bp_table::do_remove_all_breakpoints_in_file): Avoid calling erase on invalid bp_map iterators. (bp_table::do_remove_breakpoint): Only try to delete breakpoints if some exist. Avoid calling erase on invalid bp_map iterators. (parse_dbfunction_params): Return early if ARGS is empty. New arg, WHO. Change all uses. Accept but do nothing with struct args. 2008-01-04 Thomas Weber * variables.cc (Fclear): Doc fix. 2008-01-04 John W. Eaton * symtab.h (symbol_table:pop_scope): Avoid accessing beyond end of scope_stack. 2008-01-04 David Bateman * ov-mapper.cc (SPARSE_MAPPER_LOOP_2): Use data method instead of elem in the case where F(0) is non-zero. 2007-12-28 John W. Eaton Merge changes from object branch: 2007-12-12 John W. Eaton * load-path.cc (load_path::dir_info::get_file_list, load_path::move_method_map, load_path::remove_method_map, load_path::do_find_fcn, load_path::do_find_private_fcn, load_path::do_find_method, load_path::do_find_file, load_path::do_find_first_of, load_path::do_find_all_first_of, load_path::do_display, load_path::add_to_method_map, genpath, execute_pkg_add_or_del): Use file_ops::concat. 2007-08-24 John W. Eaton * variables.cc (Fmislocked): return value for nargin == 0 case. 2007-07-27 John W. Eaton * pt-idx.cc (tree_index_expression::rvalue): Pass substring of type to subsref when doing partial evaluation. (tree_index_expression::lvalue): Likewise. 2007-06-29 John W. Eaton * ov-class.cc (is_built_in_class, set_class_relationship, Fsuperiorto, Finferiorto): New functions. (octave_class::in_class_method): New function. (octave_class::subsref, octave_class:subsasgn): Use it. 2007-06-28 John W. Eaton * src/ov-class.cc (sanitize): New function. (make_idx_args): Use it. 2007-06-28 John W. Eaton * src/ov-class.cc (octave_class::subsasgn): Expect and use only one return value from feval of subsasgn method. * ov.cc (octave_value::assign): Don't convert to struct if indexing a class object with ".". * pt-idx.cc (tree_index_expression::make_arg_struct): Use Cell instead of octave_value_list for subscripts. * ov-class.cc (make_idx_args): For "." index, subs field is string, not cell. 2007-06-27 John W. Eaton * ov-fcn-handle.cc (octave_fcn_handle::save_ascii, octave_fcn_handle::load_ascii, octave_fcn_handle::save_binary, octave_fcn_handle::load_binary, octave_fcn_handle::save_hdf5, octave_fcn_handle::load_hdf5): Adapt to new symbol table objects. * symtab.h (symbol_table::all_variables, symbol_table::do_all_variables): New arg, defined_only. 2007-06-26 John W. Eaton * ls-mat5.cc (read_mat5_binary_element): Adapt to new symbol table objects. * variables.cc (Vwhos_line_format): New static variable. (Fwhos_line_format): New function. (symbol_record_name_compare): Delete function. (symbol_record_name_compare, whos_parameter): New structs. (print_descriptor, dimensions_string_req_first_space, dimensions_string_req_total_space, make_dimensions_string, parse_whos_line_format, print_symbol_info_line): New static functions, adapted from old symbol table class. (do_who): Adapt to new symbol table objects. * symtab.h (symbol_table::glob_variables): New functions. (symbol_table::do_glob): New argument, vars_only. Change all uses. 2007-06-22 John W. Eaton * symtab.cc (symbol_table::fcn_info::fcn_info_rep::help_for_dispatch): New function. * symtab.h: Provide decl. (symbol_table::fcn_info::help_for_dispatch, symbol_table::help_for_dispatch): New functions. * help.cc (help_from_symbol_table): Call symbol_table::help_for_dispatch instead of extract_help_from_dispatch. * help.cc (extract_help_from_dispatch): Delete. * help.h: Delete decl. 2007-06-21 John W. Eaton * DLD-FUNCTIONS/dispatch.cc (class octave_dispatch): Delete class. (builtin, any_arg_is_magic_colon, dispatch_record): Delete functions. (Fbuiltin, Fdispatch): Adapt to new symbol table objects. * symtab.cc (symbol_table::fcn_info::fcn_info_rep::print_dispatch): New function. * symtab.h: Provide decl. (symbol_table::fcn_info::print_dispatch, symbol_table::print_dispatch): New functions. * symtab.h (symbol_table::fcn_info::fcn_info_rep::clear_dispatch, symbol_table::fcn_info::clear_dispatch, symbol_table::clear_dispatch): New functions. * symtab.h (symbol_table::fcn_info::fcn_info_rep::get_dispatch, symbol_table::fcn_info::get_dispatch, symbol_table::get_dispatch): New functions. * symtab.cc (symbol_table::fcn_info::fcn_info_rep::find): Use leftmost class argument as dispatch type, or first argument if there are no class arguments. 2007-06-20 John W. Eaton * ov-base.cc (Vprint_answer_id_name, Fprint_answer_id_name): Delete. (octave_base_value::print_with_name): Always print name. * ov-base.cc (Vsilent_functions): No longer static. * ov-base.h: Provide decl. * ov-class.cc (Fmethods): Define as command. * ov-class.cc (octave_class::print): Simply call print_raw. * ov-class.cc (octave_class::print_with_name): New function. * ov-class.h: Provide decl. 2007-06-19 John W. Eaton * ov.cc (octave_value::do_unary_op, octave_value::do_binary_op): Handle class methods. * ov.cc (octave_value::unary_op_fcn_name, octave_value::binary_op_fcn_name): New functions. * ov.h: Provide decls. * ov-typeinfo.cc (octave_value_typeinfo::register_unary_class_op, octave_value_typeinfo::register_binary_class_op, octave_value_typeinfo::do_register_unary_class_op, octave_value_typeinfo::do_register_binary_class_op, octave_value_typeinfo::do_lookup_unary_class_op, octave_value_typeinfo::do_lookup_binary_class_op): New functions. * ov-typeinfo.h: Provide decls. * ov-typeinfo.h (octave_value_typeinfo::unary_class_op_fcn, octave_value_typeinfo::binary_class_op_fcn): New typedefs. (octave_value_typeinfo::unary_class_ops, octave_value_typeinfo::binary_class_ops): New data members. (octave_value_typeinfo::octave_value_typeinfo): Initialize them. (octave_value_typeinfo::lookup_unary_class_op, octave_value_typeinfo::lookup_binary_class_op): New functions. * OPERATORS/op-class.cc: New file. * Makefile.in (OP_XSRC): Add it to the list. * ov.cc (install_types): Call octave_class::register_type here. * ov-class.h (octave_class): Implement by containing a map object instead of deriving from octave_struct. * ov-class.cc (octave_class::subsref, octave_class::subsasgn): Don't use octave_class implementation as default action. * ov.h, ov.cc (octave_value::octave_value (const Octave_map&, const std::string&)): New constructor. 2007-06-18 John W. Eaton * ov-class.cc (octave_class::subsref, octave_class::subsasgn): Handle dispatch to user-defined methods. * parse.y (load_fcn_from_file): New arg, dispatch_type. Change all uses. * ov-fcn.h (octave_function::is_class_constructor, octave_function::is_class_method, octave_function::dispatch_class): New virtual functions. * ov-usr-fcn.h (octave_user_function::dispatch_class, octave_usr_function::stash_dispatch_class): New functions. (octave_usr_fucntion::xdispatch_class): New data member. * parse.y (frob_function): Call stash_dispatch_class here. * ov-struct.cc (Ffieldnames): Also handle objects. * ov-class.cc (Fmethods): New function. * load-path.cc (load_path::do_methods): New function. * load-path.h (load_path::methods): New function. * ov.h (octave_value::is_object): New function. * ov-base.h (octave_base_value::is_object): New virtual function. * ov-class.h (octave_class::is_object): New function. * ov-class.cc (Fisobject): New function. 2007-06-15 John W. Eaton * ov-class.cc (octave_class::print): Call display method if found. * symtab.h (symbol_table::fcn_info::find_method): New function. (symbol_table::find_method): New function. (symbol_table::fcn_info::fcn_info_rep::find_method): Provide decl. * symtab.cc (symbol_table::fcn_info::fcn_info_rep::find_method): New function. (symbol_table::fcn_info::fcn_info_rep::find): Use it. 2007-06-14 John W. Eaton * symtab.h (symbol_table::clear_mex_functions): Make it work. (symbol_table::fcn_info::fcn_info_rep::clear_mex_function, symbol_table::fcn_info::clear_mex_function): New functions. 2007-06-08 John W. Eaton * defun.cc (Falias): Delete. * variables.cc (load_fcn_try_ctor): New function. (lookup): call load_fcn_try_ctor instead of load_fcn_from_file. * variables.cc, variables.h (at_top_level, lookup_by_name, lookup, initialize_symbol_tables, fcn_out_of_date, symbol_out_of_date, lookup_function, lookup_user_function, link_to_global_variable, link_to_builtin_or_function, force_link_to_function, Fdocument, is_local_variable, do_clear_all, do_clear_functions, do_clear_globals, do_clear_variables, do_clear_function, do_clear_global, do_clear_variable, do_clear_symbol, do_clear_function_pattern, do_clear_global_pattern, do_clear_variable_pattern, do_clear_symbol_pattern, clear_function, clear_variable, clear_symbol): Delete (some functionality moved to the new symtab.cc and some is no longer needed). (Fignore_function_time_stamp): Move to symtab.cc. * lex.l (lookup_identifier): Delete. * parse.y (is_function_file): New function. (load_fcn_from_file): Return pointer to octave_function, not bool. * ov-usr-fcn.h, ov-usr-fcn.cc (octave_user_function::argn_sr, octave_user_function::nargin_sr, octave_user_function::nargout_sr, octave_user_function::varargin_sr): Delete data members. (octave_user_function::install_automatic_vars): Delete. (octave_user_script::do_multi_index_op): New function. * ov-fcn.h (octave_function::locked, octave_function::my_dir_name): New data members. (octave_function::dir_name, octave_function::stash_dir_name, octave_function::lock, octave_function::unlock, octave_function::islocked): New functions. * of-fcn-handle.h, ov-fcn-handle.cc (octave_fcn_handle::subsref): Call out_of_date_check here to simplify time stamp checking. (octave_fcn_handle::reload_warning): Delete. * ov.h (octave_value::is_user_script, octave_value::is_user_function): New functions. * ov-base.h (octave_base_value::is_user_script, octave_base_value::is_user_function): New pure virtual functions. * ov-fcn.h (octave_function::is_user_script, octave_function::is_user_function): Delete. * load-save.cc (install_loaded_variable): Greatly simplify. * load-path.h, load-path.cc: Change private_fcn_file to private_file. (load_path::private_fcn_map): New data member. (load_path::do_add, load_path::do_remove, load_path::do_update): Also manage private_file_map here. (load_path::add_to_private_fcn_map): New function. (load_path::remove_private_fcn_map): New function. (load_path::do_find_private_fcn): Make it work. (get_file_list): New function. (load_path::do_display): Use it. Display private map. (load_path::find_method, load_path::find_fcn): Handle directory name. * token.cc, token.h, toplev.cc, debug.cc, defun.cc, defun-dld.h, defun-int.h, error.cc, help.cc, load-save.h, load-save.cc, mex.cc, octave.cc, ov-fcn-handle.cc, ov-usr-fcn.cc, parse.h, parse.y, lex.l, variables.cc: Adapt to new symbol table objects (my apologies for the lack of detail). * unwind-prot.h (unwind_protect::add): Set default value for ptr arg. * pt-stmt.cc (tree_statement::eval): Rework method for deciding whether to assign value to ans. * pt-idx.cc (tree_index_expression::rvalue): Looking up symbol may evaluaate first args now. * pt-id.h, pt-id.cc (tree_identifier::document, tree_identifier::is_defined, tree_identifier::define, tree_identifier::is_function, tree_identifier::lookup, tree_identifier::link_to_global): Delete. (tree_identifier::do_lookup): Simplify. (tree_identifier::rvalue): Looking up symbol can't execute script now. * pt-misc.cc (tree_parameter_list::initialize_undefined, tree_parameter_list::is_defined): Call is_variable for elt, not is_defined. * pt-fcn-handle.h (tree_anon_fcn_handle::fcn): Now pointer to octave_user_function, not value. Change all uses. * pt-decl.h (tree_decl_command::initialized): Delete data member. (tree_decl_elt::is_variable): New function. * pt-decl.cc: Fix all uses of tree_decl_command::initialized. * ls-hdf5.cc, ls-mat-ascii.cc, ls-mat4.cc, ls-mat5.cc, ls-oct-ascii.cc, ls-oct-binary.cc, input.cc: Don't include symtab.h. * dynamic-ld.h, dynamic-ld.cc (octave_dynamic_loader::load_oct, octave_dynamic_loader::load_mex, octave_dynamic_loader::do_load_oct, octave_dynamic_loader::do_load_mex): Adapt to new symbol table objects. Return pointer octave_function instead of bool. * DLD-FUNCTIONS/dispatch.cc (Fbuiltin): Disable for now. Disable code that works with old symbol tables. (Fbuiltin): Simply call symbol_table::add_dispatch. * pt-arg-list.cc, pt-arg-list.h, pt-assign.cc, pt-assign.h, pt-binop.cc, pt-binop.h, pt-bp.h, pt-cell.cc, pt-cell.h, pt-cmd.cc, pt-cmd.h, pt-colon.cc, pt-colon.h, pt-const.cc, pt-const.h, pt-decl.cc, pt-decl.h, pt-except.cc, pt-except.h, pt-exp.h, pt-fcn-handle.cc, pt-fcn-handle.h, pt-id.cc, pt-id.h, pt-idx.cc, pt-idx.h, pt-jump.cc, pt-jump.h, pt-loop.cc, pt-loop.h, pt-mat.cc, pt-mat.h, pt-misc.cc, pt-misc.h, pt-select.cc, pt-select.h, pt-stmt.cc, pt-stmt.h, pt-unop.cc, pt-unop.h: Adapt dup functions to use scope instead of symbol_table objects. * TEMPLATE-INST/Array-sym.cc: Delete. * Makefile.in (TI_XSRC): Remove it from the list. * symtab.h, symtab.cc: Replace with new versions. 2007-05-16 John W. Eaton * oct-lvalue.cc, oct-lvalue.h (octave_lvalue::chg_fcn): Delete. Fix all uses. 2007-05-15 John W. Eaton * load-path.cc (load_path::do_find_private_function): New function. * load-path.h (load_path::do_find_private_function): Provide decl. (load_path::find_private_function): New function. 2007-05-08 John W. Eaton * pt-idx.cc (tree_index_expression::rvalue): Handle dispatch here. * pt-id.cc (tree_identifier::is_variable, tree_identifier::lookup): New functions. * pt-id.cc: Provide decls. * parse.y (current_class_name): New global variable. * parse.h: Provide decl. * parse.y (load_fcn_from_file, parse_fcn_file): New arg, dispatch_type. (parse_fcn_file): Protect current_class_name and set it to dispatch_type before parsing function. (load_fcn_from_file): If dispatch_type is not empty, call load_path::find_method instead of load_path::find_fcn. * parse.h: Fix decls for extern functions. * lex.h (lexical_feedback::parsing_class_method): New data member. * lex.l (lexical_feedback::init): Initialize it. (lookup_identifier): Check it and set sym_name accordingly. * ov-usr-fcn.h (octave_user_function::mark_as_class_constructor, octave_user_function::is_class_constructor, octave_user_function::mark_as_class_method, octave_user_function::is_class_method): New functions. (octave_user_function::class_constructor, octave_user_function::class_method): New data members. * ov-usr-fcn.cc (octave_user_function::octave_user_function): Initialize them. * load-path.h, load-path.cc: Use typedefs to simplify template decls. Use fcn consistently instead of function. 2007-05-03 John W. Eaton * ov-class.cc (Fclass): Move here. * ov-typeinfo.cc: From here. * input.cc (octave_gets): Call load_path::update if user input contains something other than one of the characters " \t\n\r". * ov-class.cc, ov-class.h: New files. * Makefile.in: Add them to the appropriate lists. * load-path.cc (genpath): Skip directories beginning with "@". (load_path::dir_info::get_file_list): Don't return anything. Call get_private_function_map here. (load_path::dir_info::initialize): Not here. (load_path::dir_info_::get_method_file_map): New function. (load_path::method_map): New data member. (load_path::do_clear): Also clear method_map. (load_path::do_add): Also call add_to_method_map. (load_path::do_update): Also clear method_map and call (load_path::do_find_method): New function. (load_path::do_add_to_method_map): New function. (load_path::move_fcn_map, load_path::move_method_map): New functions. (load_path::move): Use them. (load_path::remove_fcn_map, load_path::remove_method_map): New functions. (load_path::remove): Use them. * load-path.h: Provide/fix decls. (load_path::find_method): New static function. * Makefile.in (%.df : %.cc): Use mv instead of $(simple-move-if-change-rule). 2007-12-21 John W. Eaton Version 3.0.0 released. * version.h (OCTAVE_VERSION): Now 3.0.0. (OCTAVE_API_VERSION): Now api-v32. (OCTAVE_RELEASE_DATE): Now 2007-12-21. 2007-12-19 Thomas Kasper * OPERATORS/op-scm-cs.cc (DEFBINOP (pow)): Extract complex value from second arg. 2007-12-12 David Bateman * DLD-FUNCTIONS/sparse.cc (Fsparse): Check for scalar arguments for 2 argument version. 2007-12-12 John W. Eaton * graphics.h.in (class axes) Add the layer property. * graphics.cc (class axes) Ditto. * graphics.cc (gh_manager::get_handle): Use ceil instead of trunc. 2007-12-11 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.19+. 2007-12-11 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.19. (OCTAVE_API_VERSION): Now api-v31. (OCTAVE_RELEASE_DATE): Now 2007-12-11. * graphics.cc (make_graphics_object): If successful, call __request_drawnow__. * input.cc (Vgud_mode): New static variable. (F__gud_mode__): New function. (get_user_input): If debug and Vgud_mode, print location info in format for Emacs GUD mode. 2007-12-11 David Bateman * OPERATORS/op-bm-sbm.cc, OPERATORS/op-b-sbm.cc, OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc, OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc, OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc, OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc: Privilege conversion to dense matrices for compatibility. * DLD-FUNCTIONS/sparse.cc (FSparse): Remove the mutate flag, as default bahavior is now to keep matrix sparse always. * graphics.cc (axes::properties::properties): Initialize xcolor, ycolor, and zcolor to (0, 0, 0). * graphics.h.in (gh_manager::next_handle): Now double. * graphics.cc (gh_manager::get_handle, gh_manager::gh_manager): Set fractional part of next_handle to a random value. 2007-12-10 John W. Eaton * ov-cell.cc (octave_cell::all_strings): Handle empty elements. Handle N-d cell arrays. * DLD-FUNCTIONS/fsolve.cc (Ffsolve): For compatibility, return [x, fval, info] instead of [x, info, msg]. Move tests here from test/test_nonlin.m. * OPERATORS/op-cm-s.cc: Define function for el_mul with DEFNDBINOP_OP, not DEFBINOP_OP. * OPERATORS/op-s-cm.cc: Define functions for el_and and el_or operators with DEFNDBINOP_FN. * oct-hist.cc (default_history_file): Use file_ops::concat. * load-path.cc (dir_info::initialize, dir_info::get_file_list, load_path::do_find_fcn, load_path::do_find_file, genpath, execute_pkg_add_or_del, load_path::do_find_first_of, load_path::do_find_all_first_of): Likewise. * help.cc (Flookfor): Avoid doubling directory separator. * dirfns.cc (Fmkdir): Likewise. * pt-mat.cc (tree_matrix::rvalue): Produce sq_string if any strings are sq_string objects. 2007-12-10 David Bateman * graphics.h.in (data_property::data): Declare as NDArray instead of Matrix. Change all uses. 2007-12-10 Shai Ayal * graphics.h.in (class figure) Add the color property. * graphics.cc (class figure) Ditto. 2007-12-07 David Bateman * data.cc (Fnorm): Don't return a scalar stored as a sparse matrix. Convert it to a scalar. * graphics.cc (check_limit_val): Delete. (check_limit_vals): Simplify and no longer use check_limit_val. 2007-12-05 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.18+. 2007-12-05 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.18. (OCTAVE_API_VERSION): Now api-v30. (OCTAVE_RELEASE_DATE): Now 2007-12-05. 2007-12-04 John W. Eaton * Makefile.in (INCLUDES): Add builtins.h to the list. * src/oct-hist.cc (default_history_file): Use += instead of push_back to append character to std::string object. * Makefile.in (LIBDLFCN): Delete all uses. * toplev.cc (octave_config_info): Remove LIBDLFCN and DLFCN_INCFLAGS from the list. * oct-conf.h.in (OCTAVE_CONF_DLFCN_INCFLAGS, OCTAVE_CONF_LIBDLFCN): Delete. * error.cc (Ferror): Handle error id. * load-save.cc (Fsave, Fload): Doc fixes. From Marco Caliari . 2007-12-04 Shai Ayal * graphics.h.in (base_properties::get_type base_properties::get___modified__, base_properties::get___myhandle__): New functions. 2007-12-04 Christoph Mayer . * toplev.h (clean_up_and_exit, recover_from_exception, do_octave_atexit, global_command, curr_parent_function): Tag with OCTINTERP_API. 2007-12-03 David Bateman * DLD-FUNCTIONS/luinc.cc: Make tests conditional on HAVE_UMFPACK. * DLD-FUNCTIONS/spqr.cc: Make tests conditional on HAVE_CXSPARSE. * DLD-FUNCTIONS/regexp.cc: Use "%!testif" blocks for conditional tests on PCRE. * graphics.cc (class axes): Add color and activepositionproperty properties to axis objects. * graphics.h.in (class axes): ditto. * DLD-FUNCTIONS/regexp.cc: Also include sys/types.h for regexp. 2007-11-30 John W. Eaton * DLD-FUNCTIONS/sort.cc (operator < (const Complex&, const Complex&), operator > (const Complex&, const Complex&)): Pass args by const reference, not value. * src/data.cc, src/matherr.c, src/pr-output.cc, src/sysdep.cc, src/DLD-FUNCTIONS/__dsearchn__.cc, src/DLD-FUNCTIONS/minmax.cc, src/DLD-FUNCTIONS/qz.cc, src/DLD-FUNCTIONS/sort.cc, src/DLD-FUNCTIONS/tsearch.cc: Include lo-math.h instead of cmath or math.h. 2007-11-30 Moritz Borgmann * ls-mat5.h (mat5_data_type): Delete trailing comma in enum decl. * oct-stream.cc (octave_base_stream::do_printf): Use OCTAVE_EMPTY_CPP_ARG to avoid annoying Sun compiler warning. * OPERATORS/op-sbm-sbm.cc (DEFDBLCONVFN): Delete useless macro invocation. * DLD-FUNCTIONS/typecast.cc (typecast): No longer static. 2007-11-30 John W. Eaton * graphics.cc (updating_axis_limits): New static variable. (check_limit_val, check_limit_vals, get_axis_limits): New functions. (axes::update_axis_limits): Make it work. * graphics.h.in (base_properties::get_children): New function. (base_properties::get_xdata, base_properties::get_ydata, base_properties::get_zdata, base_properties::get_ldata, base_properties::get_udata, base_properties::get_xldata, base_properties::get_xudata, base_properties::get_cdata, base_properties::get_properties (void) const): New virtual functions. (graphics_object::get_xdata, graphics_object::get_ydata, graphics_object::get_zdata, graphics_object::get_ldata, graphics_object::get_udata, graphics_object::get_xldata, graphics_object::get_xudata, graphics_object::get_cdata, graphics_object::get_properties (void) const, root_figure::get_properties (void) const, figure::get_properties (void) const, axes::get_properties (void) const, line::get_properties (void) const, text::get_properties (void) const, image::get_properties (void) const, patch::get_properties (void) const, surface::get_properties (void) const)): New functions. (radio_property::radio_property (const radio_values&)): Provide default value for argument. (radio_property::radio_property (const radio_values&, const std::string&)): Delete. (axes::xlimmode, axes::ylimmode, axes::zlimmode, axes::climmode, axes::xscale, axes::yscale, axes::zscale): Declare as radio_property instead of octave_value values. Adjust all uses. 2007-11-29 John W. Eaton * pr-output.cc (octave_print_internal_template (std::ostream&, const octave_int&, bool)): Rename from octave_print_internal. (PRINT_INT_SCALAR_INTERNAL): New macro. Use it to define non-template functions for printing scalar octave_int values. (octave_print_internal_template (std::ostream&, const intNDArray&, bool, int)): Rename from octave_print_internal. (PRINT_INT_ARRAY_INTERNAL): New macro. Use it to define non-template functions for printing scalar octave_int values. * pr-output.h: Declare non-template functions for printing octave_int scalar and array values. Delete declarations of template funtions for printing octave_int scalar and array values. 2007-11-28 John W. Eaton * graphics.cc (base_properties::update_axis_limits, axes::update_axis_limits): New functions. * graphics.h.in (class data_property): New class. (graphics_object::update_axis_limits): New function. (base_graphics_object::update_axis_limits): New virtual function. (base_properties::update_axis_limits, axes::update_axis_limits): Provide decls. (class line, class image, class patch, class surface): Use it instead of octave_value for data properties. Tag data properties with "l" modifier. (class axes): Tag scale properties with "l" modifier. * genprops.awk: Handle "l" modifier. * mkbuiltins: Emit #include "builtins.h" for the builtins.cc file. From Christoph Mayer . * TEMPLATE-INST/Array-tc.cc (resize_fill_value): Delete. * Cell.cc (Cell::Cell (const dim_vector&, const string_vector&, bool)): Initialize undefined values to resize_fill_value (). 2007-11-27 John W. Eaton * TEMPLATE-INST/Array-tc.cc (resize_fill_value): Tag inline. From Moritz Borgmann . * pt-bp.cc (tree_breakpoint::visit_decl_command): Also check line number of cmd. * pt-decl.cc (tree_global_command::eval, tree_static_command::eval): Insert MAYBE_DO_BREAKPOINT here. * error.cc (Fwarning): If setting state "all" to "error", leave Octave:matlab-incompatible and Octave:single-quote-string warning states unchanged. (warning_enabled): Allow individual warning states to override "warning error all". * octave.cc (execute_eval_option_code, execute_command_line_file): Handle interrupts. * toplev.cc (recover_from_exception): Now extern. * toplev.h (recover_from_exception): Provide decl. * pt-idx.cc (tree_index_expression::lvalue): Treat object == [] the same as undefined. 2007-11-26 John W. Eaton * oct-stream.cc (DO_DOUBLE_CONV): Always use long. * oct-stream.cc (do_write): Call float_value and double_value on octave_int objects instead of relying on conversion operators. * ls-mat5.cc (read_mat5_binary_element, OCTAVE_MAT5_INTEGER_READ): Call double_value on octave_int objects instead of relying on conversion operator. (read_mat5_binary_file_header): Call char_value on octave_int objects instead of relying on conversion operator. (read_mat5_binary_element): Call bool_value on octave_int objects instead of relying on conversion operator. * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::double_value, OCTAVE_VALUE_INT_MATRIX_T::scalar_value, OCTAVE_VALUE_INT_MATRIX_T::matrix_value, OCTAVE_VALUE_INT_MATRIX_T::complex_matrix_value, OCTAVE_VALUE_INT_MATRIX_T::array_value, OCTAVE_VALUE_INT_MATRIX_T::complex_array_value, OCTAVE_VALUE_INT_SCALAR_T::double_value, OCTAVE_VALUE_INT_SCALAR_T::scalar_value, OCTAVE_VALUE_INT_SCALAR_T::matrix_value, OCTAVE_VALUE_INT_SCALAR_T::complex_matrix_value, OCTAVE_VALUE_INT_SCALAR_T::array_value, OCTAVE_VALUE_INT_SCALAR_T::complex_array_value, Call double_value on octave_int objects instead of relying on conversion operator. (OCTAVE_VALUE_INT_MATRIX_T::bool_array_value, OCTAVE_VALUE_INT_SCALAR_T::bool_array_value): Call bool_value on octave_int objects instead of relying on conversion operator. (OCTAVE_VALUE_INT_MATRIX_T::char_array_value, OCTAVE_VALUE_INT_SCALAR_T::char_array_value): Call char_value on octave_int objects instead of relying on conversion operator. 2007-11-26 David Bateman * Sparse-op-defs.h (SPARSE_BASE_REDUCTION_OP): Check that the fill value is not zero before creating the matrices. * graphics.cc (class axes): Add the {x|y|z}color color property. * graphics.h.in (class axes): ditto. * ov-base.cc (Vsparse_auto_mutate, Fsparse_auto_mutate): New internal variable and built-in function to set it. * ov-base.h (extern bool Vsparse_auto_mutate): Export internal variable to other functions. * ov-re-sparse.cc (octave_sparse_matrix::try_narrowing_conversion (void)), ov-cx-sparse.cc (octave_sparse_complex_matrix::try_narrowing_conversion (void)), ov-bool-sparse.cc (octave_sparse_bool_matrix::try_narrowing_conversion (void)): Use Vsparse_auto_mutate flag to determine whether to convert sparse matrices to full matrices if that saves space. * DLD-FUNCTIONS/minmax.cc (MINMAX_DOUBLE_BODY): New version of MINMAX_BODY macro without the initialization. (MINMAX_INT_BODY): Macro for min/max for the integer types (MINMAX_BODY): New macro that calls the appropriate instantiation of the other two macros. * graphics.cc (class axes): Add __colorbar__ property. * graphics.h.in (class axes): ditto. * data.cc (Fnorm): Document the "inf" string argument for matrice and vectors and the "fro" argument for vectors. * graphics.h.in (class figure): Add __enhanced__ property to cache whether the terminal supports enhanced mode. Add interpreter property to all text classes, to determine the renderer for the text. * graphics.cc (class figure): ditto. 2007-11-26 Shai Ayal * graphics.cc (string_properties): delete class (property_name): rename class to caseless_str. (radio_values::possible_vals): change type to caseless_str. 2007-11-26 Michael Goffioul * builtins.h (install_builtins): Tag with OCTINTERP_API. * toplev.h (octave_interpreter_ready, octave_initialized): Likewise. 2007-11-14 John W. Eaton * mex.cc (mex::foreign_memlist): New data member. (mex::mark_foreign, mex::unmark_foreign): New functions. (mex::free): Don't warn about pointers found in foreign_memlist. (maybe_mark_foreign): New function. (mxArray_octave_value::get_data, mxArray_octave_value::get_ir, mxArray_octave_value::get_jc): Call maybe_mark_foreign on returned pointer. 2007-11-14 David Bateman * mex.cc (mxArray_sparse::mxArray_sparse (const mxArray_sparse&)): Also ensure that pr and pi are correctly copied. 2007-11-14 John W. Eaton * Makefile.in (@bsd_gcc_kluge_targets_frag@): Delete line for Makefrag.bsd substitution. * graphics.h.in (base_properties::tag): New property. (base_properties::get_tag, base_properties::set_tag): New functions. (root_figure::set, root_figure::get, figure::set, figure::get, axes::set, axes::get, line::set, line::get, text::set, text::get, patch::set, patch::get, surface::set, surface::get): Handle tag. 2007-11-14 Joseph P. Skudlarek * DLD-FUNCTIONS/regexp.cc: Undo previous change. 2007-11-14 John W. Eaton * mex.cc (mex::mark, mex::unmark): Now public. (mex::persistent): Delete. (mexMakeArrayPersistent): Call maybe_unmark_array instead of mex::persistent. (mexMakeMemoryPersistent): Call maybe_unmark instead of mex::persistent. (maybe_unmark (void *)): New function. (mxSetDimensions, mxSetPr, mxSetPi, mxSetData, mxSetImagData, mxSetIr, mxSetJc): Use it. From David Bateman. 2007-11-13 Joseph P. Skudlarek * DLD-FUNCTIONS/rand.cc (Frand): Update URL reference in doc string. 2007-11-12 David Bateman * graphics.h.in, graphics.cc (class text): Add the fontangle and fontweight properties. Add string_property class to handle the string radio values. 2007-11-12 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.17+. 2007-11-12 David Bateman * graphics.h.in, graphics.cc (class text): Add the fontname and fontsize properties. 2007-11-10 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.17. (OCTAVE_API_VERSION): Now api-v29. (OCTAVE_RELEASE_DATE): Now 2007-11-10. 2007-11-09 John W. Eaton * DLD-FUNCTIONS/__gnuplot_raw__.l: Don't add atexit ("closeplot") to PKG_ADD file. 2007-11-09 David Bateman * graphics.cc, graphics.h.in (class patch): Add the field "keylabel". * data.cc (Fcputime) [__WIN32__]: Correct scaling of sys and usr times. * graphics.cc (is_handle): Handle must be a real scalar. 2007-11-09 Joseph P. Skudlarek * data.cc (Fislogical): Fix typo in documentation entry. 2007-11-08 John W. Eaton * DLD-FUNCTIONS/__gnuplot_raw__.l (F__gnuplot_save_data__): Note obsolescence in doc string. (WARN_OBSOLETE): New macro (F__gnuplot_save_data__, Fgnuplot_command_plot, Fgnuplot_command_replot, Fgnuplot_command_splot, Fgnuplot_command_using, Fgnuplot_command_with, Fgnuplot_command_axes, Fgnuplot_command_title, Fgnuplot_command_end, Fgnuplot_use_title_option, F__clear_plot_window__, Fcloseplot, Fpurge_tmp_files, F__gnuplot_raw__, F__gnuplot_send_inline_data__, F__gnuplot_set__, F__gnuplot_show__, F__gnuplot_plot__, F__gnuplot_splot__, F__gnuplot_replot__): Use WARN_OBSOLETE. 2007-11-07 John W. Eaton * DLD-FUNCTIONS/regexp.cc: Handle HAVE_PCRE_PCRE_H. Check HAVE_PCRE_H instead of HAVE_PCRE to decide whether to include pcre.h. * DLD-FUNCTIONS/__gnuplot_raw__.l (Fgnuplot_command_plot, Fgnuplot_command_replot, Fgnuplot_command_splot, Fgnuplot_command_using, Fgnuplot_command_with, Fgnuplot_command_axes, Fgnuplot_command_title, Fgnuplot_command_end, Fgnuplot_use_title_option, F__clear_plot_window__, Fcloseplot, Fpurge_tmp_files, F__gnuplot_raw__, F__gnuplot_send_inline_data__, F__gnuplot_set__, F__gnuplot_show__, F__gnuplot_plot__, F__gnuplot_splot__, F__gnuplot_replot__): Note obsolescence in doc string. 2007-11-06 Kai Habel * graphics.h.in (class surface::properties): New properties, cdata, facecolor, facealpha, edgecolor, linestyle, linewidth, marker, markeredgecolor, markerfacecolor, markersize. * graphics.cc (surface::properties::properties, surface::properties::set, surface::properties::get, surface::properties::factory_defaults): Handle new properities. 2007-11-06 David Bateman * data.cc (DATA_REDUCTION): Handle the 'native' and 'double' arguments of the Fsum function. * OPERATORS/op-bm-bm.cc (matrix_to_bool_matrix, scalar_to_bool_matrix): New type conversion functions. (install_bm_bm_ops): Install new type conversions functions. 2007-11-06 Michael Goffioul * toplev.cc (Fsystem) [__WIN32__ && ! __CYGWIN__]: Quote the complete command. 2007-11-06 John W. Eaton * data.cc (Fnorm): New tests. * defun-int.h (DEFINE_FUNX_INSTALLER_FUN3): Don't install function if check_version produces an error. 2007-11-05 John W. Eaton * pt-idx.cc (tree_index_expression::lvalue): Try to do a better job of computing the number of elements in lvalue expressions when the last indexing element is ".". 2007-11-02 John W. Eaton * file-io.cc (fopen_mode_to_ios_mode): Use std::ios::app instead of std::ios::ate. 2007-11-02 Olli Saarela * input.cc, pr-output.cc, bitfcns.cc, DLD-FUNCTIONS/time.cc: Fix broken @examples in help texts. 2007-10-31 John W. Eaton * data.cc (Fnorm): Avoid warning about p_val possibly being used uninitialized. * version.h (OCTAVE_VERSION): Now 2.9.16+. 2007-10-31 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.16. (OCTAVE_API_VERSION): Now api-v28. (OCTAVE_RELEASE_DATE): Now 2007-10-31. 2007-10-31 Muthiah Annamalai * pt-assign.h (tree_simple_assignment::op_type, tree_multi_assignment::op_type): New functions. * pt-unop.h (tree_unary_expression::op_type): New function. 2007-10-31 John W. Eaton * graphics.cc (line::properties::get): Fix property name (markerface -> markerfacecolor). * Makefile.in (INCLUDES): Add debug.h to the list. 2007-10-30 John Swensen * debug.h: New file. * debug.cc (parse_dbfunction_params, do_find_bkpt_list, intmap_to_ov): New functions. (Fdbstop, Fdbclear): Use parse_dbfunction_params. Improve compatibility. (Fdbstatus): Improve compatibility. * help.cc (do_which): No longer static. * help.h: Provide decl. 2007-10-30 David Bateman * symtab.cc: Doc fixes for small book format. 2007-10-30 John W. Eaton * file-io.cc (fopen_mode_to_ios_mode): Handle 'W' as 'w' and 'R' as 'r', but warn about them. 2007-10-29 Thomas Treichl * data.cc: Include sytime.h, sys/types.h, and sys/resource.h. 2007-10-25 John W. Eaton * graphics.cc (figure::properties::set_currentaxes): Allow currentfigure to be NaN. 2007-10-25 Michael Goffioul * DLD-FUNCTIONS/__contourc__.cc: Use unsigned int instead of uint. (drawcn): Use 1 << k instead of pow (2, k). 2007-10-25 John W. Eaton * symtab.h (symbol_record::TYPE): Delete trailing comma in enum decl. * ov-base.h (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Use OCTAVE_EMPTY_CPP_ARG to avoid annoying Sun compiler warning. * Makefile.in (graphics.h): Use $(AWK) instead of awk. * DLD-FUNCTIONS/time.cc (Ftime, Fmktime): Avoid unnecessary cast. * data.cc (Ftic, Ftoc): Call double_value on octave_time objects instead of relying on conversion operator. * ov.cc (octave_value::octave_value (octave_time)): Likewise. * variables.cc (symbol_out_of_date): Use explicit conversion to time_t instead of relying on conversion operator. * ov-fcn-handle.cc (octave_fcn_handle::subsref): Likewise. * data.cc (tic_toc_timestamp): Rename from __tic_toc_timestamp__. Change all uses. 2007-10-24 David Bateman * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::OCTAVE_VALUE_INT_MATRIX_T (const ArrayN&)): New constructor. * ov.cc (octave_value::octave_value(const ArrayN) with T being octave_int8, octave_uint8, octave_int16, octave_uint16, octave_int32, octave_uint32, octave_int64, octave_uint64): New constructors. * ov.h (octave_value::octave_value(const ArrayN) with T being octave_int8, octave_uint8, octave_int16, octave_uint16, octave_int32, octave_uint32, octave_int64, octave_uint64): Declare them. * DLD-FUNCTIONS/sort.cc (template class octave_sort, template class vec_index, template class octave_sort *>, with T being octave_int8, octave_uint8, octave_int16, octave_uint16, octave_int32, octave_uint32, octave_int64, octave_uint64): New instantiations of sort template classes. (Fsort): Use them. 2007-10-24 John W. Eaton * graphics.cc (root_figure::properties::set_currentfigure): Allow currentfigure to be NaN. * pt-idx.cc (tree_index_expression::lvalue): Correctly compute number of elements in lvalue expression when last indexing element is ".". 2007-10-23 John W. Eaton * graphics.cc (is_handle (const graphics_handle&)): New function. (gh_manager::do_free, reparent, base_properties::set_parent, properties::get_title, properties::get_xlabel, properties::get_ylabel, properties::get_zlabel, properties::remove_child, make_graphics_object, F__go_figure__, F__go_delete__, __go_axes_init__): Call OK on graphics handle object instead of relying on implicit conversion operator. * graphics.h.in (graphics_handle::operator double ()): Delete. (graphics_handle::operator bool ()): Delete. (gh_manager::do_handle_list, gh_manager::do_figure_handle_list, base_properties::adopt): Call VALUE on graphics handle object instead of relying on implicit conversion operator. * ov-base.h (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Call DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2 with "( )" as arg list instead of "()". * mxarray.h.in (mxClassID): Delete trailing comma in enum decl. * symtab.h (symbol_table::symbol_table): Reduce default table size to 64. 2007-10-22 Kim Hansen * unwind-prot.cc: Include . 2007-10-22 David Bateman * data.cc (Ftic, Ftoc, Fcputime): New builtin versions of the benchmarking functions for speed. * oct-map.cc (Octave_map::squeeze, Octave_map::permute): New methods. (Octave_map::index (const octave_value_list&, bool)): Add resize_ok argument, define as const and use const_iterator internally. (Octave_map::index (idx_vector&, ...), Octave_map::index (Array &, ...)): New forms of the index function. * oct-map.h (squeeze, permute, indx (const octave_value_list&, bool), index (idx_vector&, ...), index (Array &, ...)): Add or update declaration. * ov-struct.cc (octave_struct::do_index_op (const octave_value_list&, bool)): New method. * ov-struct.h (do_index_op (const octave_value_list&, bool)): Declare it. (squeeze (void), permute (const Arra&, bool): New methods. 2007-10-19 Kai Habel * DLD-FUNCTIONS/__contourc__.cc (add_point): Rename from cl_add_point. Change all uses. (end_contour): Rename from cl_end_contour. Change all uses. (start_contour): Rename from cl_start_contour. Change all uses. (drawcn): Rename from cl_drawcn. New algorithm for locating contours. (mark_facets): New function. (cntr): Rename from cl_cntr. Change all uses. New algorithm for locating contours. 2007-10-19 John W. Eaton * ov-cell.cc (octave_cell::subsasgn): If RHS is cs-list, don't fail if shape of LHS is different. * ov-struct.cc (octave_struct::subsasgn): Likewise. 2007-10-19 Olli Saarela * help.cc (Flookfor): Call print_usage instead of usage. * DLD-FUNCTIONS/cellfun.cc (Fmat2cell): Likewise. 2007-10-17 John W. Eaton * DLD-FUNCTIONS/spchol.cc (Fsymbfact): Delete special code for METIS. 2007-10-17 Gabriele Pannocchia * DLD-FUNCTIONS/__qp__.cc (qp): Fix check for Wact(j). 2007-10-15 Søren Hauberg * error.cc (Ferror): Make text fit on pages when using smallbook. * load-save.cc (Fsave_header_format_string): Ditto. * ov-struct.cc (Fcell2struct): Ditto. * DLD-FUNCTIONS/besselj.cc (Fairy): Ditto. * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread): Ditto. 2007-10-15 David Bateman * graphics.cc (axes::properties::get): Fix typo. 2007-10-13 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.15+. 2007-10-13 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.15. (OCTAVE_API_VERSION): Now api-v27. (OCTAVE_RELEASE_DATE): Now 2007-10-13. 2007-10-13 David Bateman * graphics.h.in (class patch): Add the faces and vertices properties. * graphics.cc (patch::properties::properties): Initialize faces and vertices. (patch::properties::get): Also fetch faces and vertices. (patch::properties::factory_defaults): Set faces and vertices. 2007-10-12 John W. Eaton * Change copyright notices in all files that are part of Octave to GPLv3 or any later version. 2007-10-11 John W. Eaton * DLD-FUNCTIONS/urlwrite.cc (urlget): Disable use of EPSV mode. 2007-10-11 Brian Gough * DLD-FUNCTIONS/fftn.cc, DLD-FUNCTIONS/regexp.cc, dirfns.cc, input.cc: Spelling fixes. 2007-10-10 John W. Eaton * OPERATORS/op-sbm-sbm.cc (bool_matrix_to_double_matrix): New conversion function. (install_sbm_sbm_ops): Install it. * ov-re-mat.cc (double): Handle sparse as a special case. 2007-10-10 Olli Saarela * data.cc, debug.cc, dirfns.cc, error.cc, file-io.cc, help.cc, load-save.cc, ov-fcn-inline.cc, parse.y, pr-output.cc, symtab.cc, syscalls.cc, toplev.cc, variables.cc, DLD-FUNCTIONS/bsxfun.cc, DLD-FUNCTIONS/cellfun.cc, DLD-FUNCTIONS/fft.cc, DLD-FUNCTIONS/fft2.cc, DLD-FUNCTIONS/fftw.cc, DLD-FUNCTIONS/gcd.cc, DLD-FUNCTIONS/lsode.cc, DLD-FUNCTIONS/luinc.cc, DLD-FUNCTIONS/matrix_type.cc, DLD-FUNCTIONS/rand.cc, DLD-FUNCTIONS/regexp.cc, DLD-FUNCTIONS/sparse.cc, DLD-FUNCTIONS/spchol.cc, DLD-FUNCTIONS/splu.cc, DLD-FUNCTIONS/spparms.cc: Spelling fixes. 2007-10-10 Kim Hansen * DLD-FUNCTIONS/lpsolve.cc: Delete. * Makefile.in (DLD_XSRC): Remove it from the list. * data.cc (Fsqueeze): Document 2d behaviour. * ov-range.h (octave_range::squeeze): New function. 2007-10-09 John W. Eaton * DLD-FUNCTIONS/urlwrite.cc (urlget_cleanup): New function. (urlget): Protect call to curl_easy_perform with BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE and END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE. 2007-10-09 David Bateman * input.cc (accept_line): Drop this function and remove automatic insertion of closing quotes as the transpose operator confuses it. (initialize_command_input): Remove accept_line from here as well. 2007-10-09 John W. Eaton * ov-mapper.cc (octave_mapper::apply): If possible, use d_d_map_fcn to handle complex values which have imag(z) == 0. * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread) [! HAVE_CURL]: Throw error instead of returning empty string hiding error message in third return value. (progress_func): Delete. (Furlread): Don't set progress callback for curl. (write_data, form_query_string, urlget): Now static. 2007-10-08 David Bateman * input.cc (quoting_filename): Function to add a leading quote to a string if needed. (accept_line): Function to check if a string needs a closing quote before calling the rl_newline function. (initialize_command_input): Initialize completer_quote_characters, filename_quote_characters, quoting_function, user_accept_line_function. * data.cc (template static make_diag (...)): New template class version of make_diag. Make other make_diag functions depend on it. ( static octave_value make_diag (const octave_value&, octave_idx_type)): Treat all possible internal Octave types. 2007-10-08 John W. Eaton * load-save.cc (save_vars, dump_octave_core): Don't pass INFNAN_WARNED to do_save. (do_save): Delete unused arg, INFNAN_WARNED. Don't pass INFNAN_WARNED to save_ascii_data. * ls-oct-ascii.cc (save_ascii_data_for_plotting): Don't pass INFNAN_WARNED to save_ascii. (save_ascii_data): Delete unused arg, INFNAN_WARNED. * ov.h (octave_value::save_ascii): Delete unused arg, INFNAN_WARNED. * ov-base-int.cc (octave_base_int_matrix::save_ascii, octave_base_int_scalar::save_ascii): Likewise. * ov-base-sparse.cc (octave_base_sparse::save_ascii): Likewise. * ov-base.cc (octave_base_value::save_ascii): Likewise. * ov-bool-mat.cc (octave_bool_matrix::save_ascii): Likewise. * ov-bool.cc (octave_bool::save_ascii): Likewise. * ov-cell.cc (octave_cell::save_ascii): Likewise. * ov-fcn-handle.cc (octave_fcn_handle::save_ascii): Likewise. * ov-fcn-inline.cc (octave_fcn_inline::save_ascii): Likewise. * ov-list.cc (octave_list::save_ascii): Likewise. * ov-struct.cc (octave_struct::save_ascii): Likewise. * ov-str-mat.cc (octave_char_matrix_str::save_ascii): Likewise. * ov-range.cc (octave_range::save_ascii): Likewise. * ov-scalar.cc (octave_scalar::save_ascii): Remove warning about reloading inf/nan values. Delete unused arg, INFNAN_WARNED. * ov-complex.cc (octave_complex::save_ascii): Likewise. * ov-re-mat.cc (octave_matrix::save_ascii): Likewise. * ov-cx-mat.cc (octave_complex_matrix::save_ascii): Likewise. * ov-fcn-inline.cc (Finline): Use DEFUNX instead of DEFUN. 2007-10-08 Michael Goffioul * sighandlers.h (can_interrupt): Tag with OCTINERP_API. * sysdep.h (raw_mode, octave_popen, octave_pclose, same_file_internal): Likewise. 2007-10-06 John W. Eaton * oct-stream.cc (octave_base_stream::do_scanf): Always allow MVAL to re resized if NR > 0. (FINISH_CHARACTER_CONVERSION): Likewise. * mappers.cc (install_mapper_functions): Undo previous change. Fix doc string for lgamma. (xzlgamma): Delete. 2007-10-05 John W. Eaton * graphics.h.in (axes::properties): New property, colororder. * graphics.cc (default_colororder): New function. (axes::properties::properties, axes::properties::get, axes::properties::set_defaults, axes::properties::factory_defaults, ): Handle colororder. * mappers.cc (xzlgamma): New static function. (install_mapper_functions): Pass xzlgamma for c_c_map for lgamma mapper. Pass 1 for can_ret_cmplx_for_real and set hi to octave_Inf. 2007-10-04 John W. Eaton * DLD-FUNCTIONS/symrcm.cc: Move static functions to top of file to avoid forward decls. (Q_enq): Delete unused arg QH. Change all uses. (Q_deq): Delete unused arg QT. Change all uses. (find_starting_node): Delete unused local variable J. (H_heapify_min, H_insert, find_starting_node, Fsymrcm): Move local variable decls to point of first use. * OPERATORS/op-streamoff.cc (STREAMOFF_COMP_OP): Avoid control-reaches-end-of-non-void-function warning. * pt-const.cc (tree_constant::dup): Avoid unused parameter warning. * pr-output.cc (set_real_format, set_real_matrix_format, set_complex_format, set_complex_matrix_format): Delete unused arg, SIGN. Change uses. * oct-map.cc (Octave_map::Octave_map): Avoid shadow warning. * load-save.cc (write_header): Use reinterpret_cast to avoid old-style cast warning. * data.cc (do_permute): Delete unused arg, FNAME. Change all uses. * sysdep.cc (w32_set_octave_home, w32_set_quiet_shutdown, MINGW_signal_cleanup): Only define if defined (__WIN32__) && ! defined (_POSIX_VERSION). 2007-10-04 Jason Riedy * ls-mat5.cc (read_mat5_binary_data): Map miUTF16 to miUINT16, miUTF32 to miUINT32. The matfile format currently states that wide UTF formats are in the same byte order as the integers. (read_mat5_binary_element): Replace all UTF16 and UTF32 characters with the high bit set (value >127) by '?' and warn that we've done so. 2007-10-04 Michael Goffioul * sysdep.cc (w32_set_octave_home): Base OCTAVE_HOME location on octinterp, not the main exe. 2007-10-03 John W. Eaton * data.cc (Fnorm): New function. (F__vnorm__): Delete. 2007-10-03 Michael Goffioul * DLD-FUNCTIONS/typecast.cc: Include . 2007-10-03 John W. Eaton * oct-map.cc (Octave_map::Octave_map (const dim_vector&, const string_vector&)): Delete. (Octave_map::Octave_map (const dim_vector&, const Cell&)): New function. * ov-struct.cc (Fstruct): Allow creation of empty struct arrays with field names. 2007-10-01 Shai Ayal * graphics.cc ((color_property::color_property (const octave_value& val)): Undo change from 2007-09-26 (patch::properties::properties): use the "a" modifier to face_color & edge_color properties (patch::properties::set): Undo change from 2007-09-26 * graphics.h.in (color_property::color_property (const octave_value& val)): Undo change from 2007-09-26 2007-10-01 Michael Goffioul * octave.cc (octave_main): Add "--line-editing" option to force readline line editing. 2007-09-28 David Bateman * ov-range.h (int8_array_value, int16_array_value, int32_array_value, int64_array_value, uint8_array_value, uint16_array_value, int32_array_value, uint64_array_value): New methods 2007-09-28 Kai Habel * graphics.h.in (color_property::colormap_property (const Matrix&)): Use floating point math in calculation of colormap. 2007-09-26 David Bateman * graphics.cc (color_values::str2rgb): accept upper, lower and mixed-case versions of the string representing the color. Allow black defined as "k" and white as "w". (color_property::color_property (const octave_value& val, const radio_values &v)): Modify the constructor to also take a radio_values argument. Use it. (patch::properties::set): Change set_facecolor calls to initialize the color_property argument with the available radio_values. * graphics.h.in (color_property::color_property (const octave_value& val, const radio_values &v)): Also pass a radio_values argument. * ov-range.h (sparse_matrix_value, sparse_complex_matrix_value): New methods. * mk-pkg-add: Simplfy the autoload commands. * parse.y (Fautoload): Allow bare filename if file is in the same directory as the script from where the autoload command is run. 2007-09-25 Matthias Drochner * syscalls.cc (Fpopen2): Doc fix. Use "sort -r" instead of "sort -nr" in test. 2007-09-18 John W. Eaton * input.cc (input_event_hook, Finput_event_hook): Call command_editor::add_event_hook and command_editor::remove_event_hook intstead of command_editor::set_event_hook and command_editor::restore_event_hook. 2007-09-17 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.14+. 2007-09-17 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.14. (OCTAVE_API_VERSION): Now api-v26. (OCTAVE_RELEASE_DATE): Now 2007-09-17. * Makefile.in (DISTFILES): Add genprops.awk to the list. * ov-typeinfo.h (cat_op_fcn): Third arg in function pointer typedef is now Array instead of Array. * file-io.cc (do_stream_open): Use binary mode by default. 2007-09-14 Shai Ayal * genprop.awk: Handle "a" modifier. 2007-09-14 Kai Habel * graphics.h.in (radio_values::contains): New function. (radio_values::validate): Use it. * graphics.cc (color_property::operator =): Call it instead of validate here. 2007-09-13 John W. Eaton * DLD-FUNCTIONS/__glpk__.cc (glpk): Pass LPX_FX, not LB_DB, to lpx_set_col_bnds when lb[i] == ub[i]. From: Zhi Wang . * graphics.h.in (colormap_property::colormap_property): Use jet colormap as default. 2007-09-12 John W. Eaton * graphics.cc (text::properties::properties): Default color is black, not white. * graphics.h (text::properties::color): Declare as color_property, not octave_value. * graphics.h.in (root_figure::defaults, figure::defaults, axes::defaults, line::defaults, text::defaults, image::defaults, patch::defaults, surface::defaults): New functions. * gripes.cc (gripe_not_implemented): New function. * gripes.h: Provide decl. 2007-09-10 John W. Eaton * genprops.awk: Add missing newline character at end of file. From Alexander Klimov . 2007-09-10 David Bateman * data.cc (do_cat): Avoid invalid indexing into ra_idx vector. 2007-09-06 David Bateman * DLD-FUNCTIONS/__delaunay__.cc, DLD-FUNCRIONS/__voronoi__.cc, DLD-FUNCTIONS/convhulln.cc: Avoid variables in global scope 2007-09-06 David Bateman * Makefile.in (stamp-prereq): Add graphics.h to the dependency list. 2007-08-31 John W. Eaton * Makefile.in (INCLUDES): Remove graphics.h from the list. (DISTFILES): Include graphics.h.in in the list. (genprops.awk): New file. (graphics.h): New rule. (distclean): Remove graphics.h. * graphics.h.in: New file, from graphics.h. (graphics_handle): Now a class instead of typedef. Adapt all uses. (OCTAVE_GRAPHICS_PROPERTY_INTERNAL, OCTAVE_GRAPHICS_PROPERTY, OCTAVE_GRAPHICS_MUTABLE_PROPERTY): Delete macros. (class root_figure, class figure, class axes, class line, class text, class image, class patch, class surface): Use genprops.awk to generate property declarations and set/get functions. * graphics.h: Delete. * graphics.cc (nan_to_empty, empty_to_nan): Delete. (root_figure::properties::set, figure::properties::set, axes::properties::set, line::properties::set, text::properties::set, image::properties::set, patch::properties::set, surface::properties::set): Call type-specific set functions to set properties. (root_figure::properties::set_currentfigure, figure::properties::set_currentaxes, figure::properties::set_visible, axes::properties::get_title, axes::properties::get_xlabel, axes::properties::get_ylabel, axes::properties::get_zlabel, axes::properties::set_title, axes::properties::set_xlabel, axes::properties::set_ylabel, axes::properties::set_zlabel): Define custom versions. 2007-09-06 David Bateman * DLD-FUNCTIONS/bsxfun.cc: New function. * DLD-FUNCTIONS/typecast.cc: New function. * Makefile.in (DLD_XSRC): Add bsxfun.cc and typecast.cc. * ov.cc (do_cat_op): Modify use of Array to Array and adjust where necessary. * ov.h (do_cat_op): ditto. * data.cc (do_cat): ditto. * pt-mat.cc (tree_matrix::rvalue): ditto. 2007-09-05 Michael Goffioul * oct-stream.cc (octave_base_stream::do_printf): Ignore precision portion of format string if printing Inf, NaN, or NA values. 2007-09-05 David Bateman * DLD-FUNCTIONS/sort.cc (mx_sort_sparse, mx_sort_sparse_indexed): New template classes for sparse sort functions. (Fsort): Use them. * ov.h (octave_value (const Sparse&, const MatrixType&), octave_value (const Sparse&, const MatrixType&)): New constructors. * ov.cc (octave_value::octave_value (const Sparse&, const MatrixType&), octave_value::octave_value (const Sparse&, const MatrixType&)): Define them. * ov-re-sparse.h (octave_sparse_matrix (const MSparse&, const MatrixType&), octave_sparse_matrix (const Sparse&), octave_sparse_matrix (const Sparse&, const MatrixType&)): New constructors. * ov-cx-sparse.h (octave_sparse_complex_matrix (const MSparse&, const MatrixType&), octave_sparse_complex_matrix (const Sparse&), octave_sparse_complex_matrix (const Sparse&, const MatrixType&)): ditto. 2007-09-04 Gabriele Pannocchia * DLD-FUNCTIONS/__qp__.cc (qp): Use Wact(j) == i - n_eq when checking for blocking constraint. Don't resize lambda_tmp. Only compute Y = Aact.pseudo_inverse () if it is needed. 2007-08-31 Michael Goffioul * ls-mat-ascii.cc (get_lines_and_columns): Check beg variable for NPOS to avoid segmentation fault. * load-path.cc (load_path::do_find_file): Do not assume paths use forward slashes. 2007-08-30 John W. Eaton * sysdep.cc (Fpause): Doc fix. 2007-08-30 Gabriele Pannocchia * DLD-FUNCTIONS/__qp__.cc (qp): Resize Wact to n_act-neq, not n_act. 2007-08-29 John W. Eaton * graphics.cc (class root_figure::properties): Rename from root_figure::root_figure_properties. (class figure::properties): Rename from figure::figure_properties. (class axes::properties): Rename from axes::axes_properties. (class line::properties): Rename from line::line_properties. (class text::properties): Rename from text::text_properties. (class image::properties): Rename from image::image_properties. (class patch::properties): Rename from patch::patch_properties. (class surface::properties): Rename from surface::surface_properties. * base-list.h (octave_base_list::remove): Implement our own remove_if function here. 2007-08-28 John W. Eaton * graphics.h (base_properties): Move class definition before definition of base_graphics_object class. Provide forward declaration of base_graphics_object prior to definition of base_properties. (base_graphics_object::get_properties): New virtual function. (graphics_object::get_properties, root_figure::get_properties, figure::get_properties, axes::get_properties, line::get_properties, text::get_properties, image::get_properties, patch::get_properties, surface::get_properties): New functions. (root_figure::properties, figure::properties, axes::properties, line::properties, text::properties, image::properties, patch::properties, surface::properties): Data member now private. 2007-08-27 John W. Eaton * load-path.cc (load_path::do_find_file): Also files with non rooted relative names. * load-save.cc (find_file_to_load): Likewise. Also handle appending .mat to files with relative names. * graphics.cc (base_properties::mark_modified, base_properties::override_defaults, base_properties::delete_children, figure::get_default, axes::get_default): Move definitions here, from graphics.h. * graphics.h (class gh_manager): Move decl to end of file. * Cell.h (Cell::Cell (const octave_value_list&)): Create row vector instead of column vector. * pt-idx.cc (tree_index_expression::lvalue): Handle [x.a] = ... style assignments. * ov-struct.cc (octave_struct::subsasgn): Handle case of RHS as comma-separated list. * ov-cell.cc (gripe_failed_assignment): New function. (octave_cell::subsasgn): Call gripe_failed_assignment if assign methods fail. 2007-08-24 David Bateman * symtab.cc (void symbol_table::clear (void)): If the record in the symbol table to clear is a user function that is a sub function with a static parent or if the parent is the current parent function, don't delete the record. (void symbol_table::clear_functions (void)): ditto. (void symbol_table::clear (const std::string&)): ditto. (void symbol_table::clear_function (const std::string&)): ditto. * graphics.h (class text): Add property color. * graphics.cc (text::text_properties::text_properties) ditto. (text::text_properties::set): ditto. (text::text_properties::get): ditto. (text::text_properties::factory_defaults): ditto. 2007-08-24 John W. Eaton * mappers.cc (dummyp): New function. (install_mapper_functions): Use it to handle character data in finite, isinf, isna, and isnan functions. * load-path.cc (load_path::do_remove): Call remove_hook function before removing directory from list. 2007-08-24 David Bateman * ov-bool-sparse.cc (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Class is now logical. * ov-re-sparse.cc, ov-cx-sparse.cc (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Class is now double. * ov-mapper.cc (octave_mapper::apply): Use is_sparse_type method rather than comparing class name. * ls-mat5.cc (save_mat5_element_length, save_mat5_binary_element): ditto. * pt-mat.cc (tree_matrix:rvalue): sparse matrices are now of class "double" or "logical", create new single type concat clause for them. * mex.cc (get_class_id): No longer need to special case sparse matrices. * DLD-FUNCTIONS/__delaunayn__.cc, DLD-FUNCTIONS/convhulln.cc, DLD-FUNCTIONS/tsearch.cc, DLD-FUNCTIONS/__voronoi__.cc: New functions ported from octave-forge. * DLD-FUCTIONS/__dsearchn__.cc: New file. * DLD-FUNCTIONS/__voronoi__.cc: Return point at infinity and include it in the polygrons of the Voronoi diagram for compatibility. * Makefile.in: Add specific build targets for __delanayn__.cc, convhulln.cc and __voronoi__.cc to link to Qhull. (DLD_SRC): Add new functions. (OCTAVE_LIBS): Add QHULL_LIBS 2007-08-22 David Bateman * variables.cc (Fmunlock): Call munlock and not mlock. * symtab.cc (symbol_record::mark_as_formal_parameter): Typo. 2007-08-10 John W. Eaton * pt-idx.cc (tree_index_expression::get_struct_index): Improve error message. * ov-struct.cc (Fstruct, Fcell2struct): Trap invalid field names here. 2007-08-10 Peter A. Gustafson * graphics.h, graphics.cc (axes::axes_properties): New properties, xaxislocation and yaxislocation. 2007-08-10 Kai Habel * graphics.cc, graphics.h (patch): New class. (axes::axes_properties): New properties, clim and climmode. (surface::surface_properties::surface_properties): Handle patch. (F__go_patch__): New function. 2007-07-30 John W. Eaton * mex.cc (mxArray_number::mxArray_number (int, const char **)): First arg is now mwSize. (max_str_len): Return mwSize value, not int. * mxarray.h.in (mxArray::mxArray (int, const char **)): First arg is now mwSize. (mxArray::mxArray (mxClassID, mwSize, mwSize, int, mxComplexity)): Third arg is now mwSize. (mxArray::get_string (char *, int)): Second arg is now mwSize. 2007-07-26 John W. Eaton * DLD-FUNCTIONS/__glpk__.cc: Include glpk/glpk.h if HAVE_GLPK_GLPK_H is defined. 2007-07-26 David Bateman * pr-output.cc (Frats): Return character array with same number of rows as original value. 2007-07-26 John W. Eaton * pt-bp.h (MAYBE_DO_BREAKPOINT): Rename cur_fcn to xfcn. * version.h (OCTAVE_VERSION): Now 2.9.13+. 2007-07-25 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.13 (OCTAVE_API_VERSION): Now api-v25. (OCTAVE_RELEASE_DATE): Now 2007-07-25. * pt-bp.h (MAYBE_DO_BREAKPOINT): Rename fcn to curr_fcn. 2007-07-25 David Bateman * Makefile.in: Adjust DISTFILES to allow out of tree "make dist" to work. 2007-07-24 Shai Ayal * graphics.cc (color_property::operator = (const octave_value&)): New method. * graphics.h: Provide decl. 2007-07-24 Rafael Laboissiere * oct-conf.h.in (OCTAVE_CONF_RUNTEST): Delete definition. * toplevel.cc (Foctave_config_info): Remove RUNTEST from struct. 2007-07-23 David Bateman * pr-output.cc (rat_format, rat_string_len): Global variable controlling behavior of rational approximation. Use throughout. (class pr_rational_float): New class for rational approximation of floats, specifically with the << operator defined. (std::ostream& operator << (std::ostream&, const pr_rational_float&)): Operator to print rational approximations of double values. (std::string rational_approx (double, int)): Function to convert a double value to a string of maximum length giving the rational approximation. (pr_any_float): Include the output of rational approximations. (Fformat): Add the "rat" format as an option. (Frats): New function. 2007-07-23 Aquil H. Abdullah * mex.cc (mxCreateStructArray): Declare second arg as const. * mexproto.h (mxCreateStructArray): Ditto. 2007-07-20 David Bateman * zfstream.cc (BUFSIZE): Increase default buffer size to 256kB (gzfilebuf::underflow): Stash the last 16 characters read, so as to avoid calling pbackfail as much as possible. 2007-07-18 David Bateman * zfstream.cc (int_type gzfilebuf::pbackfail (int_type)): New method to putback a character when the putback position in the internal buffer doesn't exist. * zfstream.h (int_type pbackfail (int_type)): Declaration it. 2007-07-14 Michael Goffioul * src/ov-bool-sparse.cc (octave_sparse_bool_matrix:load_hdf5): Use OCTAVE_LOCAL_BUFFER for temporary boolean value. 2007-06-27 David Bateman * DLD-FUNCTIONS/sparse.cc (Fspdiag): Ensure spdiag(zeros(1,0)) returns 0x0 matrix. Doc update. * data.cc (Fdiag): Doc update. 2007-06-28 John W. Eaton * ov-cell.cc (octave_cell::subsasgn): Given x = {}, convert to struct for assignments like x(1).f = val; * oct-stream.cc (octave_scan_1): New function (octave_scan): Use it. Handle fmt.width. * graphics.h (axes::axes_properties::visible): New data member. * graphics.cc (axes::axes_properties::axes_properties, axes::axes_properties::set, axes::axes_properties::get, axes::axes_properties::factory_defaults): Handle visible property. 2007-06-27 Kai Habel * graphics.h (color_values::color_values): Arg is now std:string instead of char. Call str2rgb, not c2rgb. * graphics.h, graphics.cc: (color_values::str2rgb): Rename from c2rgb. Handle long color names, not just single char abbreviations. 2007-06-27 David Bateman * src/load-save.cc (Fsave): Ensure header is written for non existent file with "-append". * src/ls-hdf5.h: First steps towards having append work for hdf5. 2007-06-26 John W. Eaton * src/load-save.cc (Fsave): Open files correctly for -append. Don't write file headers if appending. Error for -append -hdf5. 2007-06-25 Olaf Till * oct-stream.h (octave_stream_list::list): Use std::map. (octave_stream_list::curr_len): Delete data member. (octave_stream_list::octave_stream_list): Fix initializations. * oct-stream.cc (octave_steam_list::do_insert, octave_steam_list::do_lookup, octave_steam_list::do_remove, octave_steam_list::do_clear, octave_steam_list::do_list_open_files, octave_steam_list::do_open_file_numbers, octave_steam_list::do_get_file_number): Use new octave_stream_list::list type. (octave_stream_list::do_insert): Insert octave_stream with key corresponding to file-descriptor. (octave_stream_list::do_insert, octave_steam_list::insert): Remove const qualifier of argument. 2007-06-18 Søren Hauberg * DLD-FUNCTIONS/__lin_interpn__.cc: Replace octave_NaN with octave_NA. 2007-06-15 Shai Ayal * graphics.h (OCTAVE_GRAPHICS_PROPERTY_INTERNAL, OCTAVE_GRAPHICS_PROPERTY, OCTAVE_GRAPHICS_MUTABLE_PROPERTY): New macros. Use them to declare individual properties and define accessor methods for each property in the property classes. 2007-06-15 Kai Habel * graphics.cc (Fget, Fset): Handle vectors of handles. 2007-06-14 John W. Eaton * sysdep.cc (octave_popen, octave_pclose): New functions. * sysdep.h: Provide decls. * oct-procbuf.cc (procbuf::open): Use octave_popen. (procbuf::close): Use octave_pclose. * oct-prcstrm.cc (octave_oprocstream::octave_oprocstream, octave_iprocstream::ictave_oprocstream): Likewise. * graphics.h (text::text_properties::rotation): New data member. * graphics.cc (text::text_properties::text_properties, text::text_properties::set, text::text_properties::get, text::text_properties::factory_defaults): Handle rotation property. 2007-06-14 Kai Habel * graphics.cc (color_values::c2rgb): Also accept 'k' for black. 2007-06-14 David Bateman * ov-ch-mat.h (idx_vector index_vector (void) const): Remove definition. * ov-ch-mat.cc (idx_vector index_vector (void) const): Move it here. Special case ":" case for compatibility. 2007-06-13 John W. Eaton * ov-re-mat.cc (octave_matrix::load_ascii): Do a better job of handling read errors and empty matrices. * ov-cx-mat.cc (octave_complex_matrix::load_ascii): Likewise. * ov-bool-mat.cc (octave_bool_matrix::load_ascii): Likewise. * ov-str-mat.cc (octave_char_matrix_str::load_ascii): Likewise. 2007-06-13 David Bateman * DLD-FUNCTIONS/minmax.cc (MINMAX_BODY): Don't treat as single argument if arg2 is empty and nargin=2. 2007-06-13 Shai Ayal * graphics.h, graphics.cc: Move class declarations to graphics.h. Move larger functions outside of class declarations in graphics.cc. 2007-06-12 Benjamin Lindner * DLD-FUNCTIONS/cellfun.cc: Use fullfile to generate filenames instead of assuming / will work as directory separator. 2007-06-12 David Bateman * DLD-FUNCTIONS/interpn.cc: Remove it. * DLD-FUNCTIONS/__lin_interpn__.cc: Move it. This is now a support function of interpn.m. * Makefile.in (DLD_XSRC): Remove interpn.cc and add __lin_interpn__.cc. 2007-06-07 David Bateman * ov-fcn-handles.cc (octave_fcn_handle::save_hdf5): More care that all open HDF5 descriptors are closed. (octave_fcn_handle::load_hdf5): Ditto. 2007-06-06 Benjamin Lindner * utils.cc [__MINGW32__]: Don't define HAVE_C99_VSNPRINTF. 2007-06-06 Michael Goffioul * defaults.h.in, ls-hdf5.h, ov-complex.h, ov-cx-mat.h, ov-intx.h, sysdep.h: Sprinkle with OCTINTERP_API as needed. 2007-06-05 John W. Eaton * help.h (raw_help): Tag with OCTINTERP_API. * Makefile.in (INCLUDES): Remove mxarray.h from the list so that it is not distributed. (EXTRAS): Add mxarray.h to the list so that it is installed. * sysdep.cc (same_file_internal) [OCTAVE_USE_WINDOWS_API]: Avoid leaking file handles. 2007-05-08 Michael Weitzel * DLD-FUNCTIONS/symrcm.cc: Fix for queuing error that might cause an infinite loop. 2007-06-04 John W. Eaton * data.cc (Fislogical): Rename from Fisbool. Make isbool an alias for islogical. 2007-06-03 David Bateman * Makefile.in (DISTFILES): Add mxarray.h.in (install-inc): Modify target so that mxarray.h is installed correctly. (distclean): Remove mxarray.h on distclean. * mex.cc: Use mwSize for dimensions and mwIndex for indexing throughout, with the exception of struct key indexes. * mexproto.h: ditto. * mxarray.h: remove. * mxarray.h.in: Copy here and define mwSize, mwIndex, and use throughout. * ov-bool-mat.cc (octave_bool_matrix::as_mxArray): Use mwSize and mwIndex. * ov-bool-sparse (octave_sparse_bool_matrix::as_mxArray): ditto. * ov-cell.cc (octave_cell:as_mxArray): ditto. * ov-ch-mat.cc (octave_char_matrix:as_mxArray): ditto. * ov-cx-mat.cc (octave_complex_matrix::as_mxArray): ditto. * ov-cx-sparse.cc (octave_sparse_complex_matrix::as_mxArray): ditto. * ov-int.h (as_mxArray): ditto. * ov-range.cc (octave_range:as_mxArray): ditto. * ov-re-mat.cc (octave_matrix:as_mxArray): ditto. * ov-re-sparse.cc (octave_sparse_matrix::as_mxArray): ditto. * ov-struct.cc (octave_struct::as_mxArray): ditto. 2007-06-02 David Bateman * graphics.cc (color_property class): g++ doesn't like anonymous enums. Give type to color_type enum. 2007-05-31 Shai Ayal * graphics.cc (radio_values, radio_property, color_values): New classes. (color_property class): Handle both color and radio values. 2007-05-31 John W. Eaton * toplev.cc (main_loop): Improve bad_alloc error message. * octave.cc (execute_command_line_file, execute_eval_option_code): Likewise. 2007-05-31 Michael Goffioul * toplev.cc (octave_atexit_functions): Now std::list instead of std::stack. (do_octave_atexit): Adapte to octave_atexit_functions as list. (Fatexit): Allow second arg of false to remove element from list. * DLD-FUNCTIONS/symrcm.cc: Use ! instead of "not". * sysdep.cc (same_file_internal) [OCTAVE_USE_WINDOWS_API]: Use INVALID_HANDLE_VALUE, not INVALID_FILE_HANDLE. 2007-05-28 G. D. McBain * ov-list.cc (append): Doc fix. 2007-05-28 John W. Eaton * pt-loop.cc (DO_ND_LOOP): Avoid parser problem with obsolete g++. 2007-05-23 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.12+. 2007-05-23 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.12. (OCTAVE_RELEASE_DATE): Now 2007-05-23. * parse.y (make_anon_fcn_handle): Don't build assignment expression. * ov-fcn-handle.cc (octave_fcn_handle::print_raw): Don't split assignment expression. * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Special case for inline function body evaluation. 2007-05-22 John W. Eaton * pt-fcn-handle.cc (tree_anon_fcn_handle::rvalue): Set current function as parent of anonymous function handle. * Makefile.in (uninstall): Also remove $(DESTDIR)$(octincludedir)/octave, $(DESTDIR)$(octincludedir), $(DESTDIR)$(octlibdir), and $(DESTDIR)$(octfiledir). 2007-05-22 Thomas Weber * debug.cc, error.cc, load-save.cc, oct-hist.cc, sighandlers.cc, symtab.cc: Fix typos. 2007-05-22 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.11+. 2007-05-22 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.11. (OCTAVE_API_VERSION): Now api-v24. (OCTAVE_RELEASE_DATE): Now 2007-05-22. 2007-05-21 David Bateman * debug.cc (Fdbstop): handle integer, vector and multiple line arguments. (Fdbclar): ditto. Eliminate extraneous debugging messages. 2007-05-21 Søren Hauberg * load-path.cc (Fpath, Frehash): Replace "LOADPATH" with "load path" in doc strings. * parse.y (Feval): Add example. 2007-05-21 David Bateman * error.cc (rethrow_error): Use NULL name so that "error:" is not added to the message (Frethrow): Correctly treat empty stack. 2007-05-21 John W. Eaton * oct-map.h (Octave_map::numel): Return number of array elements, not number of map elements. (Octave_map::nfields): Rename from length. (Octave_map::empty): Delete. Change all uses of empty to check nfields () == 0 instead. 2007-05-21 Søren Hauberg * help.cc (Fautoload): Doc fix. * variables.cc (Fiscommand): Doc fix. 2007-05-19 David Bateman * ov-fcn-inline.cc (Fvectorize): Doc fix. 2007-05-16 Søren Hauberg * ov.cc (Fsubsref, Fsubsasgn): Doc fix. 2007-05-16 John W. Eaton * load-path.h (load_path::sys_path): New static data member. (load_path::system_path): New static function. (load_path::do_system_path): New function. * load-path.cc (Vsystem_path): Delete. (load_path::do_initialize): Use sys_path, not Vsystem_path. (Fpathdef): Call load_path::system_path instead of using Vsystem_path. * ls-mat5.cc (read_mat5_binary_element): Likewise. * ov-fcn-handle.cc (octave_fcn_handle::set_fcn): Likewise. 2007-05-16 David Bateman * load_pathc.cc (std::string octave_system_path (void)): New function. * load-path.h (std::string octave_system_path (void)): Declare it. * load-save.cc (static load_save_format get_file_format (std::istream&, const std::string&)): Add filename argument, and pass it to read_mat5_binary_header. Use new format throughout file. (Fload): Don't allow gzip of matlab v7 files as the files themselves include compression. * ls-mat5.cc (arrayclsstype:MAT_FILE_WORKSPACE_CLASS): New class type. (read_mat5_binary_element): Workspaces, don't have dimensions, so don't read them. Implement read of matlab objects, but only use them for inline functions. Implement reading of function and workspace classes. (read_mat5_binary_header): Add filename argument. Read sub-system specific data block given as an offset in bytes 117 to 124. (save_mat5_binary_element): Include saving of inline functions. * ls-mat5.h (read_mat5_binary_header): Include filename. * ov-fcn-handle.cc (octave_fcn_handle_save_ascii, octave_fcn_handle::load_ascii, octave_fcn_handle::save_binary, octave_fcn_handle::load_binary, octave_fcn_handle::save_hdf5, octave_fcn_handle::load_hdf5): Save and reload the local symbol table of the user function associated with anonymous function handles. Save and load the absolute path and the exec_prefix for normal function handles and use then to find equivalent functions between different installations of Octave. Attempt to maintain backward and forward compatibility. (Ffunctions): Additional outputs, including the workspace of anonymous functions, and more compatiable outputs. * ov-fcn-handle.h (user_function_value): Expose the user function value of a function handle. * ov-fcn-inline.cc (Octave_map octave_fcn_inline::map_value (void) const): Return a structure compatiable with matlab's class implementation of inline functions. * ov-fcn-inline.h (map_value): Declare it. 2007-05-14 Bob Weigel * DLD-FUNCTIONS/svd.cc: Doc fix. 2007-05-14 Thomas Weber * DLD-FUNCTIONS/fft.cc (do_fft): Handle empty matrices. New tests. 2007-05-14 Søren Hauberg * toplev.cc (Fatexit): Simplify example in doc string. * help.cc (Flookfor): Doc fix. * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Reformat to avoid long lines in doc string example. 2007-05-13 Søren Hauberg * toplev.cc (Fquit): Doc fix. * help.cc (Fhelp): Doc fix. * oct-hist.cc (Fsaving_history): Doc fix. 2007-05-11 John W. Eaton * variables.cc (symbol_out_of_date): Always check for files that have gone missing. 2007-05-08 Michael Weitzel * DLD-FUNCTIONS/symrcm.cc: New function for Reverse Cuthill-McKee permutation. 2007-05-07 John W. Eaton * oct-map.cc (Octave_map::resize): Handle case of no keys. (keys_ok): Rename from equiv_keys. Return value is now status. Pass key names as string_vector reference arg. (Octave_map::assign (const octave_value_list&, const Octave_map&)): Call keys_ok, not equiv_keys. Handle case of no keys. 2007-04-30 John W. Eaton * Makefile.in (%.df : %.cc): Use mv instead of $(simple-move-if-change-rule). 2007-04-30 David Bateman * pt-loop.cc (DO_ND_LOOP): New args, CONV and ARG. Use octave_idx_type instead of int for loop counters. Remove redundant assignments to variable "quit" as it is always defined in quit_loop_now. Special case rows = 0 and 1 cases in loops over arrays. Include some of the code that was separate from the macro DO_ND_LOOP in the macro itself (tree_simple_for_command::eval): USE DO_ND_LOOP for all loops. (DO_LOOP): Delete. 2007-04-30 John W. Eaton * mex.cc (mex::cleanup): Don't call unmark for elements of the set inside the loop. From Laurent Mazet . 2007-04-30 David Bateman * OPERATORS/op-int-conv.cc: Define sq and dq string conversion operators. Delete old char_matrix_str conversions. * OPERATORS/op-int-conv.cc (install_int_conv_ops): Install them. 2007-04-27 Benjamin Lindner . * octave.cc (execute_startup_files): Call same_file to check for already executed init files. 2007-04-27 John W. Eaton * sysdep.cc (same_file_internal): New function. POSIX code from same_file in utils.cc. Windows code from Benjamin Lindner . Don't canonicalize file names. Also return false if stat calls fail. * sysdep.h: Provide decl. * utils.cc (same_file): Use same_file_internal. 2007-04-27 David Bateman * graphic.cc (get_property_form_handle, set_property_in_handle): New functions. * grahics.h: New file. * mex.cc (mexGet, mexSet): use the above to implement mexGet and mexSet. * Makefile.in (INCLUDES): Add graphics.h 2007-04-26 John W. Eaton * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Only deal with varargout if ret_list->takes_varargs () is true. 2007-04-26 Søren Hauberg * DLD-FUNCTIONS/urlwrite.cc: Doc fix. 2007-04-26 David Bateman * pt-loop.cc (tree_simple_for_command::eval (void)): Correct reshaping of dim_vector in for loop for multi-dimensional array. 2007-04-26 John W. Eaton * load-save.cc (find_file_to_load): Only consider regular files. 2007-04-24 Shai Ayal * graphics.cc (color_property): Eliminate alpha channel from RGB color spec. 2007-04-23 Shai Ayal * src/graphics.cc (color_property::color_property): New arg A for alpha channel. Set rgba instead of red, green, blue. (color_property::color_property (char)): New constructor. (color_propery::rgba): New data member. (color_property::red, color_property::green, color_property::blue): Delete. (color_property::validate): Use rgba. (color_property::c2rgba): New function. 2007-04-23 Søren Hauberg * data.cc (Fsize_equal): Allow more than two arguments. 2007-04-20 John W. Eaton * DLD-FUNCTIONS/__gnuplot_raw__.l (deftypefn): (Vautomatic_replot): Delete static variable. (Fautomatic_replot): Delete function. * toplev.cc (Fcasesen): Delete obsolete function. * DLD-FUNCTIONS/__gnuplot_raw__.l (gnuplot::makeplot): Check whether caller is "splot", not "gsplot". 2007-04-19 John W. Eaton * lex.l (is_keyword_token): Delete all_va_args_kw switch case. * octave.gperf: Remove all_va_args_kw from the list. 2007-04-19 Daniel J. Sebald * syscalls.cc: Fix popen2 test to stop trying after 100 times throught the loop. 2007-04-16 Geordie McBain * ov-fcn-inline.cc (Fargnames): Doc fix. 2007-04-13 Geordie McBain * DLD-FUNCTIONS/find.cc (Ffind): Doc fix. 2007-04-11 John W. Eaton * Makefile.in (DOCSTRINGS): Don't echo commands. (doc-files): Use mv, not $(simple-move-if-change-rule). * data.cc (Fnot, Fuplus, Fuminus, Ftranspose, Fctranspose, Fplus, Fminus, Fmtimes, Fmrdivide, Fmpower, Fmldivide, Flt, Fle, Feq, Fge, Fgt, Fne, Ftimes, Frdivide, Fpower, Fldivide, Fand, For): New functions. 2007-04-09 John W. Eaton * graphics.cc (line::line_properties::markeredgecolor, line::line_properties::markerfacecolor): New properties. 2007-04-06 John W. Eaton * data.cc (F__vnorm__): New function. * pt-fcn-handle.cc (tree_anon_fcn_handle::param_list, tree_anon_fcn_handle::cmd_list, tree_anon_fcn_handle::ret_list, tree_anon_fcn_handle::sym_tab): Delete. Remove all uses. (tree_anon_fcn_handle::fcn): New data member. (tree_anon_fcn_handle::tree_anon_fcn_handle): Initialize it. (tree_anon_fcn_handle::rvalue, tree_anon_fcn_handle::dup): Extract parameter list, return list, function body, and symbol table from fcn. (tree_anon_fcn_handle::parameter_list, tree_anon_fcn_handle::body): Forward request to fcn. * ov-usr-fcn.h (octave_user_function::local_sym_tab): Rename from sym_tab. Change all uses. (octave_user_function::sym_tab): New function. * octave.cc (execute_command_line_file): 2007-04-05 David Bateman * DLD-FUNCTIONS/regexp.cc (Fregexprep): Correct iteration over cell arrays so that the source and pattern are iterated seperately in the same manner as matlab. 2007-04-05 Laurent Mazet * mex.cc (mxArray_octave_value::get_string): Copy nel elements, not buflen elements. 2007-04-05 John W. Eaton * oct-stream.cc (DO_DOUBLE_CONV): New macro. (do_printf): Use it. 2007-04-04 John W. Eaton * input.cc (octave_yes_or_no): Force interactive_input to use readline. * octave.cc (execute_eval_option_code): Catch bad::alloc here. 2007-04-03 John W. Eaton * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread): Use && for logical, not &. * DLD-FUNCTIONS/qr.cc (Fqr): Clarify nargin check. * error.cc (Frethrow): Add braces to avoid ambiguous if/else. * oct-stream.cc (octave_scan<>): Likewise. * DLD-FUNCTIONS/colamd.cc (Fetree): Likewise. * DLD-FUNCTIONS/sort.cc (mx_sort, mx_sort_indexed): Likewise. * ov-fcn-handle.cc (make_fcn_handle): Pass ultimate parent function name to lookup_function. 2007-03-29 John W. Eaton * DLD-FUNCTIONS/filter.cc (filter): Fix typo in doc string. From Utkarsh Upadhyay . 2007-03-28 Rafael Laboissiere * DLD-FUNCTIONS/__glpk__.cc: Fix #ifdef logic around GLPK_PRE_4_14. 2007-03-27 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.10+ 2007-03-27 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.10. (OCTAVE_API_VERSION): Now api-v23. (OCTAVE_RELEASE_DATE): Now 2007-03-27. * version.h (OCTAVE_COPYRIGHT): Update for 2007. Add "and others". (X_OCTAVE_WARRANTY_STATEMENT): Rename from OCTAVE_WARRANTY_STATEMENT. Accept arg. (OCTAVE_WARRANTY_STATEMENT): Define using X_OCTAVE_WARRANTY_STATEMENT. (OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY): Define using X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY. (X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY): Rename from OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY. Accept arg and pass to X_OCTAVE_WARRANTY_STATEMENT. (OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY): Pass empty arg to X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS. (OCTAVE_STARTUP_MESSAGE): Put info about news last. 2007-03-27 John W. Eaton * Makefile.in (dist, conf-dist): Use ln, not $(LN_S). 2007-03-26 Juhani Saastamoinen * file-io.cc (do_stream_open) [! HAVE_ZLIB]: Call fopen with mode, not tmode. 2007-03-26 John W. Eaton * OPERATORS/op-str-str.cc (DEFCHARNDBINOP): New macro. Use it to define functions for eq and ne ops. Also define lt, le, ge, and gt ops. 2007-03-23 David Bateman * DLD-FUNCTIONS/rand.cc: Make more statistical tests optional. 2007-03-23 John W. Eaton * bitfcns.cc (Fbitshift): Error if third argument is not a scalar. 2007-03-23 David Bateman * DLD-FUNCTIONS/rand.cc: Make statistical tests optional and add tests for fixed sequences. 2007-03-22 John W. Eaton * graphics.cc (base_graphics_object::mark_modified): New virtual function. (base_properties::__modified__): New data member. (base_properties::base_properties): Initialize it. (graphics_object::mark_modified, base_properties::mark_modified, root_figure::mark_modified, figure::mark_modified, axes::mark_modified, line::mark_modified, text::mark_modified, image::mark_modified, surface::mark_modified, root_figure::root_figure_properties::mark_modified, figure::figure_properties::mark_modified, axes::axes_properties::mark_modified, line::line_properties::mark_modified, text::text_properties::mark_modified, image::image_properties::mark_modified, surface::surface_properties::mark_modified): New functions. (figure::figure_properties::set, figure::figure_properties::get, axes::axes_properties::set, axes::axes_properties::get, line::line_properties::set, line::line_properties::get, text::text_properties::set, text::text_properties::get, image::image_properties::set, image::image_properties::get, surface::surface_properties::set, surface::surface_properties::get): Handle __modified__ property. * parse.y (Fautoload): Use warning_with_id. 2007-03-21 John W. Eaton * DLD-FUNCTIONS/__qp__.cc (ABS): Delete. Use std::abs instead. (null): Set elements of retval with magnitudes less than eps to 0. * error.cc (Fwarning): Allow setting options with struct. If setting options, return previous state. * graphics.cc (axes::axes_properties::set_defaults): Reverse sense of mode test for setting outerposition property. (figure::figure_properties::set): If setting visible property, make this figure the current figure. (gh_manager::figure_handle_list, gh_manager::do_figure_handle_list): New functions. (F__go_figure_handles__): New function. * sysdep.cc (Fpause): Also call drawnow if nargin == 0. (Fkbhit, Fsleep, Fusleep): Also call drawnow here. 2007-03-20 David Bateman * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Correct for shape of return matrix for the case of UniformOutput being true. 2007-03-20 John W. Eaton * sysdep.cc (Fpause): Call drawnow. 2007-03-15 John W. Eaton * variables.cc (F__lock_global__): Delete. 2007-03-14 John W. Eaton * graphics.cc: New file. * Makefile.in (DIST_SRC): Add it to the list. 2007-03-13 John W. Eaton * file-io.cc (do_stream_open): Use binary mode if 't' is not specified in mode, but don't add 'b' if it is already present. 2007-03-09 David Bateman * data.cc (do_cat): Also treat case of all empty matrices. 2007-03-08 John W. Eaton * mex.cc (mxArray_octave_value::set_dimensions, mxArray_octave_value::set_m, mxArray_octave_value::set_n, mxArray_octave_value::set_class_name, mxArray_octave_value::set_ir, mxArray_octave_value::set_jc, mxArray_octave_value::remove_field, mxArray_octave_value::set_field_by_number): Don't panic; request mutation instead. (class mxArray_octave_value): * mxarray.h (mxArray::set_m, mxArray::set_n, mxArray::set_dimensions): Wrap method call call with DO_VOID_MUTABLE_METHOD. 2007-03-08 David Bateman * data.cc (do_cat): Ignore leading empty matrices. 2007-03-07 Bob Weigel * urlwrite.cc (urlget): Allow URL redirects. 2007-03-05 David Bateman * DLD-FUNCTIONS/md5sum.cc (Fmd5sum): Treat both files and strings. 2007-03-05 John W. Eaton * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Check GLPK_PRE_4_14, not GLPK_PRE_4_15. 2007-03-02 John W. Eaton * parse.y (Fautoload): Undo previous change. Warn if FILE is not an absolute file name. * utils.cc (make_absolute): Make copy of arg before 2007-03-01 John W. Eaton * ov-base-mat.h (octave_base_matrix::octave_base_matrix (const MT&), (octave_base_matrix::octave_base_matrix (const MT&, const MatrixType&)): Use common definition with default argument value. * ov-base-scalar.h (octave_base_scalar::typ): New data member. Initialize in constructors. (octave_base_scalar::matrix_type): New funtions. 2007-03-01 David Bateman * DLD-FUNCTIONS/md5sum.cc: New file. * Makefile.in (DLD_XSRC): Add md5sum.cc 2007-03-01 Olli Saarela * input.cc (FPS1): Fix @seealso. 2007-03-01 David Bateman * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Special case scalar types and always return "Full" matrix type. 2007-02-28 John W. Eaton * input.cc (interactive_input): Also call flush_octave_stdout after calling drawnow. 2007-02-27 John W. Eaton * Makefile.in (uninstall): Also remove octave-$(version)$(EXEEXT), oct-gperf.h, and all .oct files. Remove PKG_ADD. From Thomas Treichl . * load-path.h, (load_path::initialize, load_path::do_initialize): New arg, set_initial_path. * load-path.cc (load_path::do_initialize): Don't add system directories to apth if set_initial_path is false. * octave.cc (set_initial_path): New static variable. (NO_INITIAL_PATH_OPTION): New define. (usage_string): Include --no-initial-path in message. (long_opts): Include no-initial-path/NO_INITIAL_PATH_OPTION here. (octave_main): Handle NO_INITIAL_PATH_OPTION. Pass set_initial_path to load_path::initialize. * parse.y (Fautoload): Warn about duplicate entries. Only insert the first found. 2007-02-27 David Bateman * error.cc (Vlast_error_file, Vlast_erro_name, Vlast_error_row, Vlast_error_column): New static variables. (verror): Use them to store the location of last error. (rethrow_error, Frethrow, Flasterror): New functions. * DLD-FUNCTIONS/regexp.cc (octcellregexp): Wrapper to octregexp function for cases when string or pattern are cell arrays (Fregexp, Fregexpi): Use them. (octregexprep): New function with functionality of old Fregexprep. (Fregexprep): Treat cell arguments. 2007-02-26 Michael Goffioul * Makefile.in: Use $(LN_S) instead of ln or ln -s. * DLD-FUNCTIONS/getrusage.cc: Undef min after including windows.h. 2007-02-25 John W. Eaton * DLD-FUNCTIONS/interpn.cc: Include dNDArray.h, not dMatrix.cc. * error.h: Include cstdarg. From Juhani Saastamoinen . 2007-02-23 John W. Eaton * variables.cc (lookup_function): Don't dereference NULL curr_parent_fucntion pointer. * ov-fcn-handle.cc (make_fcn_handle): Call lookup_function with parent set to empty string if call_stack is empty. * DLD-FUNCTIONS/dispatch.cc (Fbuiltin): Also adjust argument list in calls to functions that are not overloaded. Call lookup_by_name to find function instead of searching fbi_symtab directly. * help.cc (do_which): Return empty string if file not found. 2007-02-22 John W. Eaton * mex.cc (mxArray_cell::mxArray_cell (const mxArray_cell&), mxArray_struct::mxArray_struct (const mxArray_struct&)): Avoid calling clone on 0 elements. * variables.cc (symbol_out_of_date): If checking nested function, look for file using parent function name. Delete unused variable NAMES. * src/oct-stream.cc (octave_stream::do_gets): If no limit or not at limit, read ahead one character at end of line for compatibility. (octave_stream::gets, octave_stream::getl): Set max_len to -1 if tc_max_len is not defined. * file-io.cc (Ffgets, Ffgetl): If no limit specified, pass undefined octave_value object as max_len in call to octave_stream::gets. 2007-02-21 John W. Eaton * mex.cc (mexErrMsgIdAndTxt, mexWarnMsgIdAndTxt): Handle second arg as format and accept variable number of arguments. * mexproto.h: Fix decls. * error.h, error.cc (vmessage, vusage, vwarning, verror, vparse_error, vmessage_with_id, vusage_with_id, vwarning_with_id, verror_with_id, vparse_error_with_id): Provide va_list versions of variadic error, warning, and message functions. (message, usage, warning, error, parse_error, message_with_id, usage_with_id, warning_with_id, error_with_id, parse_error_with_id): Call va_list versions. * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread): Return error code and message instead of throwing error if functionality is missing. * oct-obj.h (octave_value_list::splice): Set default for replacement list argument. 2007-02-20 Rafael Laboissiere * DLD-FUNCTIONS/__glpk__.cc: Adapt code for changes in the GLPK API for version 4.15 or later. 2007-02-20 John W. Eaton * mxarray.h (mxArray::get_scalar): New function. * mex.cc (mxArray_base::get_scalar): New pure virtual function. (mxArray_octave_value::get_scalar, mxArray_matlab::get_scalar, mxArray_number::get_scalar): New functions. (mxGetScalar): Call get_scalar here. * mex.cc (mxArray_octave_value::get_dimensions): Cache ndims here. (mxArray_octave_value::get_number_of_dimensions): Call get_dimensions here to cache both ndims and dims. 2007-02-17 John W. Eaton * variables.cc (symbol_out_of_date): Don't exit early if looking at nested function. 2007-02-16 John W. Eaton * dynamic-ld.cc (octave_dynamic_loader::do_load_oct): Clear function if original was loaded from relative path and the name can no longer be found in path. Mark files found from relative path as relative. (clear): Only warn if there is more than one function to clear. * variables.cc (symbol_out_of_date): Don't ignore return value in call to octave_env::make_absolute. (symbol_out_of_date): Clear symbol if original was loaded from relative path and name can no longer be found in path. * dynamic-ld.cc (octave_dynamic_loader::do_load_oct): Also check whether new file is same as the old file. * utils.cc (same_file): Move here from variables.cc. * utils.h: (same_file): Provide decl. * parse.y (frob_function): Stash parent function name if parsing nested function. * ov-fcn-handle.cc (make_fcn_handle): Pass current function name as parent in call to lookup_function. * ov-fcn.h (octave_function::parent_fcn_name): New virtual function. * ov-usr-fcn.h (octave_user_function::parent_name): New data member. (octave_user_function::stash_parent_function_name, octave_user_function::parent_function_name): New methods. * ov-usr-fcn.cc (octave_user_function::octave_user_function): Initialize parent_name. * variables.h, variables.cc (lookup_function): New arg, parent. If not empty, try this first for lookup. * dynamic-ld.cc (octave_dynamic_loader::do_load_mex): If doing path lookup, check relative status. Pass relative to oct_file_in_path. (octave_dynamic_loader::do_load_mex): Likewise, for mex_file_in_path * defun-int.h, defun.cc (install_mex_function): New arg, relative. (install_dld_function): Likewise. (octave_dld_fcn_installer): Likewise. (DEFINE_FUNX_INSTALLER_FUN3): Pass relative to install_dld_function. * dynamic-ld.h (octave_dynamic_loader::load_oct, octave_dynamic_loader::load_mex, octave_dynamic_loader::do_load_oct octave_dynamic_loader::do_load_mex): New arg, relative. * dirfns.h (Vcurrent_directory): Delete unused variable. * variables.cc (symbol_out_of_date): Also compare function time stamp to Vlast_chdir_time if function is from relative lookup. * dirfns.cc (Vlast_chdir_time): New variable. (octave_change_to_directory): Update it if chdir succeeds. * dirfns.h (Vlast_chdir_time): Provide decl. * ov-fcn.h (octave_function::relative): New data member. (octave_function::mark_relative, octave_function::is_relative): New functions. * parse.y (fcn_file_from_relative_lookup): New static variable. (load_fcn_from_file): Note whether function file was found from relative path element. (frob_function): Maybe mark function as relative. * parse.y (lookup_autoload): Don't call octave_env::make_absolute on return value. * variables.cc (symbol_out_of_date): Make name absolute after call to lookup_autoload. * input.cc (interactive_input): New arg, DEBUG. Don't call drawnow if debugging. (get_user_input): Pass DEBUG to interactive_input. 2007-02-16 Michael Goffioul * syscalls.cc (Fpopen2): New function. (pipe): Modify to return input and output file descriptor seperately rather than in a list. 2007-02-16 Muthiah Annamalai * debug.cc (Fdbtype): Improve compatibility. 2007-02-16 John W. Eaton * toplev.cc (wait_for_input): New function. (run_command_and_return_output): Use it instead of napping. * oct-procbuf.h (octave_procbuf::pid): Now const. * procstream.h (procstreambase::pid): Now const. (procstreambase::file_number): New function. 2007-02-15 John W. Eaton * mxarray.h (mxChar): Use char instead of unsigned short. * toplev.cc (Foctave_config_info): Remove OCTAVE_CONF_MKOCTFILE_INCFLAGS and OCTAVE_CONF_MKOCTFILE_LFLAGS from the list. * oct-conf.h.in (OCTAVE_CONF_MKOCTFILE_INCFLAGS, OCTAVE_CONF_MKOCTFILE_LFLAGS): Don't define. (OCTAVE_CONF_INCLUDEDIR, OCTAVE_CONF_OCTINCLUDEDIR, OCTAVE_CONF_OCTLIBDIR, OCTAVE_CONF_PREFIX): New definitions. 2007-02-14 Alexander Barth * DLD-FUNCTIONS/interpn.cc: New file. * Makefile.in (DLD_XSRC): Add it to the list. 2007-02-14 John W. Eaton * input.cc (interactive_input): Check error_state after call to feval. 2007-02-10 John W. Eaton * oct-stream.cc (octave_stream::rewind): Call seek (0, SEEK_SET) instead of rep->rewind. (octave_base_stream::rewind): Delete Function. * oct-stream.h (octave_base_stream::rewind): Delete decl. 2007-02-09 John W. Eaton * ls-mat5.cc (PAD): Adjust to change in write_mat5_tag. (TAGLENGTH): Delete unused macro. * ov-struct.cc (octave_struct::load_ascii, octave_struct::load_binary, octave_struct::load_hdf5): Delete obsolete attempt at backward compatibility. * ls-mat5.cc (read_mat5_binary_element): Don't attempt to read fieldnames if there are no fields. (write_mat5_tag): Don't use small data element format if bytes == 0. * ls-mat5.cc (read_mat5_binary_element): Always create a structure that is at least 1x1. * ov-struct.cc (octave_struct::load_ascii, octave_struct::load_binary, octave_struct::load_hdf5): Likewise. 2007-02-08 Michael Goffioul * DLD-FUNCTIONS/__glpk__.cc: Include glplib.h if glpk.h does not. Provide definitions for lib_set_fault_hook and lib_set_print_hook if they are not defined. 2007-02-07 John W. Eaton * defaults.cc (subst_octave_home): Only substitute at beginning of string. * ls-hdf5.cc (save_hdf5_empty): Use OCTAVE_LOCAL_BUFFER. * ov-bool-mat.cc (octave_bool_matrix::save_hdf5, octave_bool_matrix::load_hdf5): Likewise. * ov-bool-sparse.cc (octave_sparse_bool_matrix::save_hdf5, octave_sparse_bool_matrix::load_hdf5): Likewise. 2007-02-07 Michael Goffioul * ov-cell.cc (octave_cell::save_hdf5): Correct test for H5Dwrite return value. 2007-02-07 John W. Eaton * zfstream.cc (gzfilebuf::open_mode): Always append "b" to c_mode. * toplev.cc (Foctave_config_info): Use struct for conf_info. Call subst_octave_home on selected values when initializing map. * defaults.cc (subst_octave_home): Now extern. * defaults.h.in: Provide decl. 2007-02-05 John W. Eaton * mex.cc (mxArray_number::as_octave_value): Fake mxSINGLE_CLASS by returning double-precision values. (mxArray_sparse::as_octave_value): Clarify error message. * ov-complex.h (octave_complex): Use std instead of OCTAVE_STD since the latter was unconditionally defined to be std anyway. 2007-02-05 Michael Goffioul * ov-complex.h: Tag octave_complex class with OCTINTERP_API. 2007-01-30 John W. Eaton * Merge of changes from graphics-branch: 2007-01-26 John W. Eaton * DLD-FUNCTIONS/__contourc__.cc: New function. * Makefile.in (DLD_XSRC): Add it to the list. 2007-01-25 John W. Eaton * input.cc (Vdrawnow_requested): New static variable. (F__request_drawnow__): New function. (interactive_input): New function. Update Vlast_prompt_time here. (octave_gets, get_user_input, octave_yes_or_no): Call interactive_input instead of gnu_readline. * symtab.h (symbol_record::eternal): New data member. (symbol_record::symbol_record): Initialize it. (symbol_record::make_eternal, symbol_record::is_eternal): Don't forward to symbol_def functions. (symbol_record::symbol_def::make_eternal, symbol_record::symbol_def::is_eternal): Delete. (symbol_record::symbol_def::eternal): Delete data member. (symbol_record::symbol_def::symbol_def): Delete initialization. * pt-id.cc (tree_identifier::link_to_global): Include variable name in warning message. * variables.cc (F__lock_global__): New function. 2007-01-11 John W. Eaton * ls-oct-ascii.cc (save_ascii_data_for_plotting, save_three_d): Set precision to 6 instead of 4. 2007-01-29 David Bateman * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): Don't panic if nargout is greater than 3. 2007-01-24 John W. Eaton * pt-assgn.cc (former_built_in_variables): New static data. (maybe_warn_former_built_in_variable): New static function. (tree_simple_assignment::tree_simple_assignment, tree_multi_assignment::tree_multi_assignment): Move definition here from pt-assign.h Maybe warn about assignment to obsolete built-in variables. * version.h (OCTAVE_STARTUP_MESSAGE): Mention "news" function. * pt-stmt.cc (tree_statement::eval): Use dynamic_cast, not static_cast. * help.cc (help_from_file): Show .oct or .mex file name if one exists in the same directory as the .m file. 2007-01-23 Luis F. Ortiz * strfns.cc (Fstrncmp): New function. 2007-01-17 John W. Eaton * help.cc (help_from_file, help_from_symbol_table, help_from_list): Rewrite using raw_ versions. 2007-01-17 David Bateman * help.cc (raw_help, raw_help_from_file, raw_help_from_symbol_table, raw_help_from_list): New functions. * help.h (raw_help): Provide decl. 2007-01-16 John W. Eaton * DLD-FUNCTIONS/__pchip_deriv__.cc: Fix dpchim decl for --enable-64. (F__pchip_deriv__): Fix call to dpchim for --enable-64. * DLD-FUNCTIONS/fftw.cc: Delete decl for fftw_planner. 2007-01-11 Michael Goffioul * load-path.h (class load_path): Tag with OCTINTERP_API. * ls-oct-binary.cc (read_binary_data): Use unsigned char, not char, for reading flags and data types. 2007-01-10 Luis F. Ortiz * parse.y (load_fcn_from_file): Delete unused variable NAMES. If NM is absolute, strip directory and extension parts. 2007-01-10 Michael Goffioul * DLD-FUNCTIONS/getrusage.cc: Use #ifdef __WIN32__, not __MINGW32__. 2007-01-10 John W. Eaton * parse.y (load_fcn_from_file): Only compare last two characters when looking for ".m". 2007-01-06 John W. Eaton * version.h (OCTAVE_CONFIG_STATEMENT): New macro (OCTAVE_NAME_AND_VERSION): Remove config info. (OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY): Use OCTAVE_CONFIG_STATEMENT here. 2007-01-05 David Bateman * Makefile.in (DLD_XSRC): Add fftw.cc and remove fftw_wisdom.cc * DLD-FUNCTIONS/fftw.cc: New file. * DLD-FUNCTIONS/fftw_wisdom.cc: Delete. * defaults.cc (Vfftw_wisdom_program): Delete variable. (set_default_fftw_wisdom_prog): Delete function that sets it. (install_defaults): Delete set_default_fftw_prog from defaults. (Ffftw_wisdom_program): Delete. 2007-01-04 David Bateman * ov-fcn-handle.cc (octave_fcn_handle::load_ascii, octave_fcn_handle::load_binary): Throw error if handle can't be created. 2007-01-04 Luis F. Ortiz * mex.cc (mxArray_number::mxArray_number (int, const char **)): Correctly index LHS in assignment. 2007-01-03 John W. Eaton * data.cc (Fisinteger): New function. * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::is_integer_type, OCTAVE_VALUE_INT_SCALAR_T::is_integer_type): New function. * ov.h (octave_value::is_integer_type): New function. * ov-base.h (octave_base_value::is_integer_type): New virtual function. 2007-01-03 Michael Goffioul * toplev.cc (Fsystem): Handle async calls on Windows systems. 2007-01-03 David Bateman * (OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc, OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc, OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc, OPERATORS/op-scm-cm.cc, OPERATORS/op-scm-cs.cc, OPERATORS/op-scm-m.cc, OPERATORS/op-scm-s.cc, OPERATORS/op-scm-scm.cc, OPERATORS/op-scm-sm.cc, OPERATORS/op-sm-cm.cc, OPERATORS/op-sm-cs.cc, OPERATORS/op-sm-m.cc, OPERATORS/op-sm-s.cc, OPERATORS/op-sm-scm.cc, OPERATORS/op-sm-sm.cc, OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc): Modify div and ldiv functions so that scalars stored as sparse matrices are special cased. * ov-re-sparse.cc (double_value, complex_value): Scalar can be stored as a sparse matrix and so don't warn on implicit conversion to a scalar. * ov-cx-sparse.cc (double_value, complex_value): ditto. * ov-bool-sparse.cc (double_value, complex_value): ditto. 2007-01-03 John W. Eaton * dynamic-ld.cc (octave_dynamic_loader::do_load_mex): Also check for _mexFunction. 2006-12-30 John W. Eaton * ov-fcn-inline.cc: For compatibility, class id is "function_handle", not "inline function". 2006-12-27 John W. Eaton * Makefile.in (%.df : %.cc): Insert a "do not edit" notice in the .df files. * mex.cc (mxArray_matlab::get_class_name, mxArray_octave_value::get_class_id): Use "function_handle", not "function handle". 2006-12-14 John W. Eaton * pt-decl.cc (tree_decl_elt::eval): New function. * pt-decl.h (tree_decl_elt::eval): Provide decl. (tree_decl_elt::is_defined, tree_decl_elt::lvalue_ok, tree_decl_elt::mark_as_formal_parameter, tree_decl_elt::rvalue, tree_decl_elt::lvalue): New functions. * pt-misc.h (class tree_parameter_list): Derive from octave_base_list instead of octave_base_list. (tree_parameter_list::tree_parameter_list (tree_identifier *)): Delete. (tree_parameter_list::tree_parameter_list (tree_decl_elt *)): New function. * pt-misc.cc (tree_parameter_list::mark_as_formal_parameters, tree_parameter_list::initialize_undefined_elements, tree_parameter_list::undefine, tree_parameter_list::dup, tree_parameter_list::convert_to_const_vector, tree_parameter_list::is_defined): Handle argument list elements as tree_decl_list objects instead of tree_identifier objects. (tree_parameter_list::define_from_arg_vector): Likewise. Always process entire list, setting default values if possible. Accept ":" to mean "use default argument". * parse.y (param_list2): Use decl2 to recognize "identifier '=' expression" in addition to "identifier". * parse.y (return_list1, make_anon_fcn_handle, finish_function): Adapt to new definition of tree_parameter_list. * pt-bp.cc (tree_breakpoint::visit_parameter_list): Likewise. * pt-check.cc (tree_checker::visit_parameter_list): Likewise. * pt-pr-code.cc (tree_print_code::visit_parameter_list): Likewise. 2006-12-08 John W. Eaton * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::array_value, OCTAVE_VALUE_INT_MATRIX_T::complex_array_value, OCTAVE_VALUE_INT_MATRIX_T::bool_array_value, OCTAVE_VALUE_INT_MATRIX_T::char_array_value): Use fortran_vec to avoid expensive indexing operator. 2006-12-08 David Bateman * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::matrix_value, OCTAVE_VALUE_INT_SCALAR_T::complex_matrix_value, OCTAVE_VALUE_INT_MATRIX_T::matrix_value, OCTAVE_VALUE_INT_MATRIX_T::comlex_matrix_value): New functions. (OCTAVE_VALUE_INT_MATRIX_T::array_value, OCTAVE_VALUE_INT_MATRIX_T::comlex_array_value): Use octave_idx_type instead of int for indexing. 2006-12-04 David Bateman * xpow.cc (xpow (const Matrix&, double)): Add matrix type probing to matrix inverse. (xpow (const ComplexMatrix&, double)): ditto. * DLD-FUNCTIONS/inv.cc (Finv): Add matrix type probing. 2006-12-06 John W. Eaton * sysdep.cc: Include "Cell.h" here. * input.h: Include "oct-obj.h", not "ov-list.h". 2006-12-06 Michael Goffioul * mappers.cc (install_mapper_functions): Undefine isascii before the DEFUN_MAPPER for it. * input.cc (get_user_input): Prevent out of bounds array access when checking for EOL. 2006-12-05 John W. Eaton * ls-oct-ascii.cc (extract_keyword): If no match and looking for more, skip to end of line before trying another match. * pt-mat.cc (tm_row_const::empty): New function. (tm_const::init): Don't append anything if tmp tm_row_const object is empty. (tree_matrix::rvalue): Default return value is Matrix(). Don't do anything if tmp tm_const object is empty. * dirfns.cc (Fmkdir): Fix thinko in previous change. 2006-12-05 Paul Kienzle * DLD-FUNCTIONS/rand.cc: Test for Poisson generator with lambda > 1e8. 2006-12-04 David Bateman * data.cc (Fdata): If ndims is greater than nargout and nargout is greater than 1, then collect size of trailing dimensions into retval(end). * load-path.cc (load_path::do_find_fcn): Return empty string if tests fail. * ov-base-mat.cc (void octave_base_matrix::assign (const octave_value_list&, const MT&)): Invalidate matrix type on assignment. 2006-11-30 John W. Eaton * DLD-FUNCTIONS/fftw_wisdom.cc (Ffftw_wisdom): Accept "r" or "w" for second argument. 2006-11-29 John W. Eaton * DLD-FUNCTIONS/fftw_wisdom.cc (Ffftw_wisdom): Look in load-path if reading wisdom file, but not if writing. 2006-11-28 John W. Eaton * mex.cc (mxArray_struct::get_field_by_number): Return 0 if key_num is out of range. (mxArray_struct::set_field_by_number): Do nothing if key_num is out of range. (mxArray_cell::get_cell, mxArray_cell::set_cell): Avoid out-of-bounds indexing 2006-11-28 Luis F. Ortiz * mex.cc (mxArray_matlab::get_n, mxArray_octave_value::get_n): Return product of last N-1 dims. 2006-11-28 John W. Eaton * lex.l (eat_whitespace): Also handle CRLF as EOL. * dirfns.cc (Fmkdir): Handle "mkdir (parent, dir)". 2006-11-21 John W. Eaton * load-path.cc (load_path::do_find_file, load_path::do_find_first_of, load_path::do_find_all_first_of): Call rooted_pathname instead of absolute_pathname. * utils.cc (fcn_file_in_path, oct_file_in_path, mex_file_in_path): Likewise. 2006-11-16 Michael Goffioul * oct-hist.cc (default_history_file): Instead of appending "/.octave_hist", append directory separator (but only if necessary), then ".octave_hist". 2006-11-16 John W. Eaton * data.cc (Fresize): Fix doc string. 2006-11-15 John W. Eaton * DLD-FUNCTIONS/__gnuplot_raw__.l (write_data, write_inline_data): New functions. (save_in_tmp_file): Use write_data. (gnuplot::send_inline_data, gnuplot_do_send_inline_data): New functions. (F__gnuplot_send_inline_data__, F__gnuplot_save_data__): New functions. * ls-oct-ascii.cc (save_ascii_data_for_plotting): Call save_ascii_data with precision = 4. (save_three_d): Temporarily set precision to 4 for output stream. 2006-11-15 Michael Goffioul * Cell.h (Cell): Tag class with OCTINTERP_API. 2006-11-13 John W. Eaton * octave.cc (maximum_braindamage): Disable Octave:fopen-file-in-path and Octave:load-file-in-path warnings. * load-save.cc (find_file_to_load): New function. (Fload): Call find_file_to_load to search load path for file. * file-io.cc (Ffopen): Search load path for file. * load-path.cc (path::do_find_first_of, path::do_find_file): Break out of all loops once file is found, not just innermost one. * data.cc (Fsize_equal): New function. 2006-11-13 Michael Goffioul * ov.cc (check_subsref_elements, Fsubsref, Fsubsasgn): New functions. * ov-re-mat.h, ov-scalar.h, pr-output.h: Sprinkle with OCTINTERP_API as needed. 2006-11-11 John W. Eaton * Makefile.in (parse.cc): Avoid creating empty files. (%.df : %cc, builtins.cc, mkbuiltins, PKG_ADD, DOCSTRINGS, doc-files, gendoc.cc, ops.cc, $(OPT_HANDLERS), oct-errno.cc, oct-gperf.h): Use $(simple-move-if-change-rule) here. (lex.cc, __gnuplot_raw__.cc): Use $(destdir-move-if-change-rule) here. (ifndef omit_deps): Don't include stamp-prereq here. ($(DEF_FILES), $(MAKEDEPS)): Also depend on stamp-prereq. 2006-11-10 John W. Eaton * ov-str-mat.cc (octave_char_matrix_str::load_ascii, octave_char_matrix_str::load_binary): Use chMatrix as buffer instead of C string. 2006-11-09 John W. Eaton * ov-usr-fcn.h (octave_user_function::inline_function): New data member. (octave_user_function::mark_as_inline_function): Set it. (octave_user_function::is_inline_function): Check it. * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Also skip setting curr_parent_fucntion if evaluating an inline function. (octave_user_function::octave_user_function): Initialize inline_function. * pt-fcn-handle.cc (tree_anon_fcn_handle::rvalue): Mark user function as inline here. 2006-11-09 Michael Goffioul * load-path.cc (load_path::move): Don't use reference to file_info object that will be erased. 2006-11-07 John W. Eaton * utils.cc (file_in_path): Don't unconditionally return "". * pager.cc (default_pager): Don't append options here. (pager_command): New function. (do_sync): Use it. (VPAGER_FLAGS): New variable. (FPAGER_FLAGS): New function. 2006-11-06 John W. Eaton * oct-hist.cc (default_history_file): If env_file is not empty, just accept it rather than checking to see if it exists. 2006-11-03 Bill Denney * help.cc (keywords): Document try and unwind_protect. 2006-11-03 John W. Eaton * Makefile.in (DLL_CXXDEFS): Rename from XTRA_CXXDEFS. (DLL_CDEFS): Rename from XTRA_CDEFS. Substitute OCTINTERP_DLL_DEFS, not XTRA_OCTINTERP_DEFS. 2006-11-02 Michael Goffioul * sysdep.cc (MSVC_init): Also cal w32_sigint_init and w32_set_quiet_shutdown. 2006-11-01 John W. Eaton * ov.h (octave_value::idx_type_value): New function. * data.cc (fill_matrix, Flinspace, Freshape): Use idx_type_value instead of int_value to extract size args. 2006-10-31 John W. Eaton * ov-range.h (octave_range::empty_clone): Return octave_matrix object instead of octave_range. 2006-10-29 Juhani Saastamoinen * ls-mat5.cc (read_mat5_tag): Declare bytes as int32_t, not just int. 2006-10-28 John W. Eaton * toplev.cc (Fatexit): Push function names on the stack even if we don't have atexit or on_exit. 2006-10-28 Michael Goffioul * mappers.cc (install_mapper_functions): Undefine toascii before the DEFUN_MAPPER for it. 2006-10-27 John W. Eaton * mexproto.h: Include oct-dlldefs.h. * pr-output.cc (SPECIALIZE_UABS): New macro. Use it to generate specializations of abs for unsigned int types. Instantiate abs for signed int types. * load-path.cc (load_path::do_initialize): Use dir_path::path_sep_str instead of ":". Don't append ":::" to xpath when calling do_set. * dirfns.cc (Fls, cleanup_iprocstream): Delete. * sysdep.cc (Ftilde_expand): If arg is cellstr, return cellstr. * ov.h (octave_value::is_cellstr): New function. * ov-base.h (octave_base_value::is_cellstr): New function. * ov-cell.h (octave_cell::is_cellstr): New function. * ov-cell.cc (Fiscellstr): Implement with is_cellstr. * Cell.cc (Cell::Cell (const dim_vector&, const string_vector&, bool)): New constructor. (Cell::is_cellstr): New function. * Cell.h: Provide decls. * defaults.cc (subst_octave_home): If dir_sep_char is not '/', replace before returning. From Michael Goffioul . 2006-10-26 John W. Eaton * cutils.c (octave_strcasecmp, octave-strncasecmp): Move to liboctave/lo-cutils.c. * utils.h: Delete decls. * strcasecmp.c: Move to liboctave/strcasecmp.c. * strncase.c: Move to liboctave/strncase.c. * Makefile.in (DIST_SRC): Delete them from the list. * bitfcns.cc (bitshift): If A < 0, return -bitshift (-A, N, MASK). 2006-10-26 Michael Goffioul * help.cc (display_help_text): Quote sed patterns with ". * file-io.cc: Include file-io.h. * TEMPLATE-INST/Array-os.cc, TEMPLATE-INST/Array-sym.cc, TEMPLATE-INST/Array-tc.cc, defun-int.h, error.h, file-io.h, gripes.h, ls-oct-ascii.h, mexproto.h, oct-map.h, oct-obj.h, oct-stream.cc, oct-stream.h, octave.h, ov-base.h, ov-bool-sparse.cc, ov-bool-sparse.h, ov-cx-sparse.cc, ov-cx-sparse.h, ov-fcn.h, ov-re-sparse.cc, ov-re-sparse.h, ov-str-mat.h, ov-typeinfo.cc, ov-typeinfo.h, ov.h, pager.h, parse.h, pr-output.cc, pr-output.h, procstream.h, sighandlers.h, symtab.h, unwind-prot.h, utils.h, variables.h: Sprinkle with OCTINTERP_API as needed. 2006-10-26 John W. Eaton * ov-bool.h (octave_bool::sparse_matrix_value, octave_bool::sparse_complex_matrix_value octave_bool::sparse_bool_matrix_value): New functions. 2006-10-25 John W. Eaton * sighandlers.cc: Check defined (RETSIGTYPE_IS_VOID) instead of RETSIGTYPE == void. * oct-procbuf.cc (BUFSIZ): Define if not already defined. (octave_procbuf::open): Pass BUFSIZ as size argument to setvbuf. 2006-10-25 Michael Goffioul * Makefile.in (XTRA_CDEFS, XTRA_CXXDEFS): Substitute here. * oct-procbuf.cc [_MSC_VER]: Define W32POPEN and W32PCLOSE the same as for __MINGW32__. (octave_procbuf::open, octave_procbuf::close) [_MSC_VER]: Use the same code as for __MINGW32__ and __CYGWIN__. * oct-prcstrm.cc [_MSC_VER]: Define popen and pclose. 2006-10-25 John W. Eaton * sysdep.cc (w32_set_octave_home): Correctly initialize bin_dir. Fill it with '\0' instead of ' '. 2006-10-24 Michael Goffioul * Makefile.in: Filter out $(XTRA_CXXDEFS) from $(ALL_CXXFLAGS) for $(DLD_PICOBJ). 2006-10-24 John W. Eaton * sysdep.cc (MSC_init): New function. (sysdep_init): Call it. (w32_set_octave_home): New function, based on code from Michael Goffioul . (MINGW_init): Call w32_set_octave_home here too. 2006-10-23 John W. Eaton * symtab.cc (symbol_table::clear_mex_functions): New function. * symtab.h: Provide decl. * vriables.cc (clear_mex_functions): New function. * variables.h Provide decl. * toplev.cc: Call clear_mex_functions instead of delete_symbol_tables. * variables.cc (delete_symbol_tables): Delete. * variables.h: Delete decl. * mex.cc (mex::unmark_array): New function. (mex::persistent): Define with unmark_array. (maybe_unmark_array): New function. (mxArray_struct::set_field_by_number, mxArray_cell::set_cell): Call maybe_unmark_array on val to avoid freeing val twice on exit from mex function. (mxFree): Call xfree, not free. 2006-10-21 John W. Eaton * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::OCTAVE_TYPE_PREDICATE_FUNCTION, (OCTAVE_VALUE_INT_SCALAR_T::OCTAVE_TYPE_PREDICATE_FUNCTION): Function is now const, so it properly overloads method in base class. * mex.cc (mxArray_octave_value::is_uint32): Call val.is_uint32_type, not val.is_int32_type. (mxArray_octave_value::is_uint64): Call val.is_uint64_type, not val.is_int64_type. (mxArray_octave_value::is_uint8): Call val.is_uint8_type, not val.is_int8_type. 2006-10-20 Paul Kienzle * ov-mex-fcn.h (octave_mex_function::atexit): New function. (octave_mex_function::exit_fcn_ptr): New data member. * ov-mex-fcn.cc (octave_mex_function::exit_fcn_ptr): New data member. (octave_mex_function::octave_mex_function): Initialize it. (octave_mex_function::~octave_mex_function): If we have an exit function, call it. 2006-10-20 John W. Eaton * variables.cc (delete_symbol_tables): New function. * variables.h: Provide decl. * toplev.cc (do_octave_atexit): Call it. * mex.cc (mex::mex): New arg, a pointer to the current mex function. (mex::curr_mex_fcn): New data member. (mex::current_mex_function): New function. (mexAtExit): Set exit function pointer in current mex file object. 2006-10-20 Paul Kienzle * mex.cc (enum callstyle): Delete enum definition. (Fortran_mex, C_mex): Delete functions. (call_mex): First arg is now bool. * ov-mex-fcn.cc (call_mex): Fix decl to match new definition. (Fortran_mex, C_mex): Delete decls. (octave_mex_function::do_multi_index_op): Simplify call to call_mex. 2006-10-20 John W. Eaton * lex.l (handle_identifier): If a command name is found, skip starting command mode if parsing an object index. 2006-10-20 David Bateman * DLD-FUNCTION/spqr.cc (dmperm_internal): New function with core of Fdmperm. (Fdmperm): Call dmperm_internal rather then calculating loally. (Fsprank): New function to calculate the strutural rank also using dmperm_internal. 2006-10-19 John W. Eaton * ov-struct.cc (octave_struct::as_mxArrary): Use OCTAVE_LOCAL_BUFFER to allocate tempoarary array of field names. * mxarray.h (mxArray::persistent): Delete var and all uses. (mxArray::mark_persistent, mxArray::unmark_persistent, mxArray::is_persistent): Delete functions. * mex.cc (mex::function_name): Use mxArray::strsave, not strsave. (mex::mark_array): New function. (mex::make_value): Use it. (mex::free_value): Return true if we found ptr in arraylist. (mex::persistent (mxArray *)): Remove ptr from arraylist instead of marking it as persistent. (mxArray::malloc): Call ::malloc instead of malloc. (mxArray::calloc): Call ::calloc instead of calloc. (maybe_mark_array): New function. (mxCreateCellArray, mxCreateCellMatrix, mxCreateCharArray, mxCreateCharMatrixFromStrings, mxCreateDoubleMatrix, mxCreateDoubleScalar, mxCreateLogicalArray, mxCreateLogicalMatrix, mxCreateLogicalScalar, mxCreateNumericArray, mxCreateNumericMatrix, mxCreateSparse, mxCreateSparseLogicalMatrix, mxCreateString, mxCreateStructArray, mxCreateStructMatrix, mxDuplicateArray): Use it. (mxDestroyArray): No need to check persistence now. Also delete ptr if mex_context->free_value does not. (call_mex): No need to delete elements of argout now. 2006-10-18 John W. Eaton * dynamic-ld.cc (octave_shlib_list::remove, octave_shlib_list::do_remove, octave_mex_file_list::remove, octave_mex_file_list::do_remove): New arg, cl_hook. (octave_shlib_list::do_remove): Pass cl_hook to octave_shlib close function. (octave_dynamic_loader::do_load_oct): Don't call close on shl directly. Pass do_clear_function to octave_shlib_list::remove. * mex.cc (mexUnlock): Don't warn if unlocking a function that is not locked. * pt-fcn-handle.cc (tree_anon_fcn_handle::dup): Correctly duplicate symbol table info. 2006-10-17 Michael Goffioul * oct-map.h: Include . 2006-10-16 John W. Eaton * oct-stream.cc (octave_stream_list::do_remove): Handle "all" as a special case. 2006-10-13 Michael Goffioul * Makefile.in: Adapt rules to use $(LIBPRE). 2006-10-11 John W. Eaton * mex.h (UINT64_T, uint64_T, INT64_T, int64_T, UINT32_T, uint32_T, INT32_T, int32_T, UINT16_T, uint16_T, INT16_T, int16_T, UINT8_T, uint8_T, INT8_T, int8_T): Conditionally define. From Andy Adler . 2006-10-09 John W. Eaton * oct-conf.h.in (OCTAVE_CONF_CURL_LIBS): Substitute. * toplev.cc (octave_config_info): Add CURL_LIBS to the list. 2006-10-09 Alexander Barth * DLD-FUNCTIONS/urlwrite.cc: New file providing urlwrite and urlread. 2006-10-09 John W. Eaton * pt-mat.cc (tree_matrix::dup): Append new elements to new matrix. * pt-cell.cc (tree_cell::dup): Append new elements to new cell array. 2006-10-04 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.9+. * DLD-FUNCTIONS/__gnuplot_raw__.l (F__clear_plot_window__): Rename from Fclearplot. Only clear plot window. 2006-10-03 John W. Eaton * DLD-FUNCTIONS/luinc.cc (Fluinc): Avoid crash if SparseLU or SparseComplexLU constructor fails. * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): Delete unused variable. 2006-10-03 David Bateman * Makefile.in (OCT_LINK_DEPS) Include $(CAMD_LIBS) in the list. (octave$(EXEEXT)): Include $(CAMD_LIBS) in link command. 2006-10-02 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.9. (OCTAVE_API_VERSION): Now api-v22. (OCTAVE_RELEASE_DATE): Now 2006-10-02. * pr-output.cc (pr_plus_format): Use "inline" instead of "static inline" for template functions to avoid problems when not compiling with g++. * mex.cc (call_mex): Delete elements of argout. From Kai Labusch . 2006-09-29 John W. Eaton * DLD-FUNCTIONS/spfind.cc (sparse_find_non_zero_elem_idx): Leading dimension is NR, not NC. * Makefile.in (DEP_5): Include oct-errno.cc in the list. 2006-09-27 John W. Eaton * pr-output.cc (abs): New template function. Instantiate for unsigned types. 2006-09-27 David Bateman * file-io.cc (Fsprintf): If fmt is an sq_string, return an sq_string. * DLD-FUNCTIONS/sparse.cc (spfind, sparse_find): Delete. * DLD-FUNCTIONS/spfind.cc: New file implementating compatible sparse find function. * Makefile.in (DLD_XSRC): Add spfind.cc. 2006-09-26 Bill Denney * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx, Ffind): Handle direction and limit on number of elements to find. 2006-09-26 John W. Eaton * error.cc (warning_1): Call error_2, not error. 2006-09-15 John W. Eaton * ops.h (DEFSTRDBLCONVFN): New arg, TFROM. * OPERATORS/op-double-conv.cc: Declare and install sq_string conversions too. * ov-base-int.cc (octave_base_int_scalar::convert_to_str_internal, octave_base_int_matrix::convert_to_str_internal): New functions. * ov-base-int.h: Provide decls. 2006-09-15 Søren Hauberg . * data.cc (Fsize): If nargout > ndims, fill with 1. 2006-09-15 John W. Eaton * octave.cc: Fix xerbla decl. 2006-09-13 John W. Eaton * DLD-FUNCTIONS/cellfun.cc: Improve error message for uniform output case when results are not scalars. Avoid shadow decls. 2006-09-13 David Bateman * ov-scalar.h (octave_scalar::sparse_matrix_value, octave_scalar::sparse_complex_matrix_value): New extractor functions. * ov-complex.h (octave_complex::sparse_matrix_value, octave_complex::sparse_complex_matrix_value): Ditto. * DLD-FUNCTIONS/spkron.cc (Fspkron): Change example in help. 2006-09-12 David Bateman * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Allow matlab compatiable 'UniformOutput' and 'ErrorHandler' options. Change output when called with function handler or inline function to by default have 'UniformOutput' set to true. Allow functions with multiple inputs and outputs. Add test code. Replace some int with octave_idx_type. (Fnum2cell): Replace some int with octave_idx_type. Add test code. 2006-09-11 Yozo Hida * DLD-FUNCTIONS/gcd.cc (Fgcd): Extend range by using std::floor instead of converting to int. 2006-09-05 John W. Eaton * mex.cc (mxArray_sparse::as_octave_value): Cast nzmax to octave_idx_type for sparse matrix constructors. 2006-09-01 John W. Eaton * dirfns.cc: Don't handle nargout == 0 as a special case. (octave_change_to_directory): Perform tilde expansion on directory name here. 2006-08-30 John W. Eaton * load-save.cc (get_file_format): Fix misplaced #endif. 2006-08-29 John W. Eaton * load-path.cc (execute_pkg_add_or_del): Source PKG_ADD or PKG_DEL in base workspace. * parse.y (source_file): New optional arg, context. * parse.h (source_file): Fix decl. 2006-08-25 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.8+. 2006-08-24 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.8. (OCTAVE_API_VERSION): Now api-v21. (OCTAVE_RELEASE_DATE): Now 2006-08-24. 2006-08-23 John W. Eaton * ov.h (octave_value::save_ascii): Delete strip_nan_and_inf arg. * ov-base.h, ov-base.cc (octave_base_value::save_ascii): Likewise. * ov-base-int.h, ov-base-int.cc (octave_base_int_matrix::save_ascii, octave_base_int_scalar::save_ascii, ): Likewise. * ov-base-sparse.cc, ov-base-sparse.h (octave_base_sparse::save_ascii): Likewise. * ov-bool-mat.cc, ov-bool-mat.h (octave_bool_matrix::save_ascii): Likewise. * ov-bool.cc, ov-bool.h (octave_bool::save_ascii): Likewise. * ov-cell.cc, ov-cell.h (octave_cell::save_ascii): Likewise. * ov-complex.cc, ov-complex.h (octave_complex::save_ascii): Likewise. * ov-fcn-handle.cc, ov-fcn-handle.h (octave_fcn_handle::save_ascii): Likewise. * ov-fcn-inline.cc, ov-fcn-inline.h (octave_fcn_inline::save_ascii): Likewise. * ov-list.cc, ov-list.h (octave_list::save_ascii): Likewise. * ov-range.cc, ov-range.h (octave_range::save_ascii): Likewise. * ov-scalar.cc, ov-scalar.h (octave_scalar::save_ascii): Likewise. * ov-str-mat.cc, ov-str-mat.h (octave_char_matrix_str::save_ascii): Likewise. * ov-struct.cc, ov-struct.h (octave_struct::save_ascii): Likewise. * ov-re-mat.cc, ov-re-mat.cc (octave_matrix::save_ascii): Likewise. * ov-cx-mat.cc, ov-cx-mat.cc (octave_complex_matrix::save_ascii): Likewise. * ov-cx-mat.cc, ov-cx-mat.cc (octave_complex_matrix::save_ascii): Likewise. * ov-re-mat.cc, ov-re-mat.cc (octave_matrix::save_ascii): Likewise. * ls-oct-ascii.cc, ls-oct-ascii.h (save_ascii_data): Delete strip_nan_and_inf arg. (save_ascii_data_for_plotting): Delete strip_nan_and_inf arg from call to save_ascii_data. * DLD-FUNCTIONS/__gnuplot_raw__.l (handle_using): Accept "(EXPR)" as components of using clauses. (enum _toktype): New element DOLLAR. Accept "$" in lexer. * ls-oct-ascii.cc (save_ascii_data): Delete arg strip_nan_and_inf. Change all uses. * ls-oct-ascii.h (save_three_d): Provide decl. * load-save.h (save_ascii_data_for_plotting, save_three_d): Delete decls. 2006-08-22 John W. Eaton * ov.h (octave_value::save_ascii): strip_nan_and_inf is now int, not bool. * ov-base.h, ov-base.cc (octave_base_value::save_ascii): Likewise. * ov-base-int.h, ov-base-int.cc (octave_base_int_matrix::save_ascii, octave_base_int_scalar::save_ascii, ): Likewise. * ov-base-sparse.cc, ov-base-sparse.h (octave_base_sparse::save_ascii): Likewise. * ov-bool-mat.cc, ov-bool-mat.h (octave_bool_matrix::save_ascii): Likewise. * ov-bool.cc, ov-bool.h (octave_bool::save_ascii): Likewise. * ov-cell.cc, ov-cell.h (octave_cell::save_ascii): Likewise. * ov-complex.cc, ov-complex.h (octave_complex::save_ascii): Likewise. * ov-fcn-handle.cc, ov-fcn-handle.h (octave_fcn_handle::save_ascii): Likewise. * ov-fcn-inline.cc, ov-fcn-inline.h (octave_fcn_inline::save_ascii): Likewise. * ov-list.cc, ov-list.h (octave_list::save_ascii): Likewise. * ov-range.cc, ov-range.h (octave_range::save_ascii): Likewise. * ov-scalar.cc, ov-scalar.h (octave_scalar::save_ascii): Likewise. * ov-str-mat.cc, ov-str-mat.h (octave_char_matrix_str::save_ascii): Likewise. * ov-struct.cc, ov-struct.h (octave_struct::save_ascii): Likewise. * ov-re-mat.cc, ov-re-mat.cc (octave_matrix::save_ascii): Likewise. * ov-cx-mat.cc, ov-cx-mat.cc (octave_complex_matrix::save_ascii): Likewise. * ov-cx-mat.cc, ov-cx-mat.cc (octave_complex_matrix::save_ascii): Don't strip Inf and NaN here. Call ComplexMatrix::save_ascii to do the real work. * ov-re-mat.cc, ov-re-mat.cc (octave_matrix::save_ascii): Don't strip Inf and NaN here. Call Matrix::save_ascii to do the real work. * ov-re-mat.cc, ov-cx-mat.cc (strip_infnan): Delete. * ls-oct-ascii.cc, ls-oct-ascii.h (save_ascii_data): strip_nan_and_inf is now int, not bool. (strip_infnan): Delete. (save_ascii_data_for_plotting): Call save_ascii_data with strip_nan_and_inf = 2. * Makefile.in (INCLUDES): Remove matrix.h from the list. 2006-08-22 David Bateman * sparse-xpow.cc: Replace all uses of pow by std::pow. (elem_pow): Simplify for two sparse matrices arguments. 2006-08-22 John W. Eaton * ls-oct-ascii.cc: Increase default value of save_precision to 16. * ls-mat-ascii.cc (save_mat5_ascii_data): Use scientific format. 2006-08-21 John W. Eaton * ls-mat5.cc (read_mat5_binary_data, read_mat5_integer_data, write_mat5_array): Unconditionally enable code for 64-bit int types. * ov-fcn-handle.cc (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): For compatibility, set class to function_handle. 2006-08-18 John W. Eaton * pr-output.cc (set_real_matrix_format): Also always include space for sign if values are int, inf, or nan. (set_complex_format, set_complex_matrix_format): Always include space for sign in real format, but never in imaginary format. * gripes.cc (gripe_logical_conversion): New function. * gripes.h: Provide decl. * ov.h (octave_value::bool_value, octave_value::bool_matrix_value, octave_value::bool_array_value): New arg, warn. * ov-base.cc, ov-base.h (octave_base_value::bool_value, octave_base_value::bool_matrix_value, octave_base_value::bool_array_value): Likewise. * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::bool_array_value, OCTAVE_VALUE_INT_SCALAR_T::bool_array_value): Likewise. * ov-range.h (octave_range::bool_array_value): Likewise. * ov-re-mat.cc, ov-re-mat.h (octave_matrix::bool_array_value): Likewise. * ov-re-sparse.cc, ov-re-sparse.h (octave_sparse_matrix::bool_array_value): Likewise. * ov-scalar.h (octave_scalar::bool_value, octave_scalar::bool_array_value): Likewise. * OPERATORS/op-bm-b.cc (oct_assignop_conv_and_assign): Ask for warning from bool_array_value. * OPERATORS/op-bm-bm.cc (oct_assignop_conv_and_assign): Likewise. * ov-bool.h (octave_bool::bool_value, octave_bool::bool_matrix_value, octave_bool::bool_array_value): Likewise. * ov-bool-mat.h (octave_bool_matrix::bool_matrix_value, octave_bool_matrix::bool_array_value): Likewise. * ov-bool-sparse.cc, ov-bool-sparse.h (octave_sparse_bool_matrix::bool_matrix_value, octave_sparse_bool_matrix::bool_array_value): Likewise. 2006-08-18 Benjamin Lindner * ls-mat5.cc (read_mat5_tag): Declare type as int32_t, not int. (read_mat5_binary_element): Likewise, for len and element_length. 2006-08-18 John W. Eaton * load-save.h (enum load_save_format): New element, LS_MAT_ASCII_LONG. * load-save.cc (Fload, Fsave): Make -ascii Matlab compatible. (do_save): Handle LS_MAT_ASCII. * ls-mat-ascii.cc (save_mat_ascii_data): New function. * ls-mat-ascii.h: Provide decl. 2006-08-17 John W. Eaton * ls-mat5.cc (save_mat5_element_length): Correctly compute element length for character data. Handle N-d character data (save_mat5_binary_element): Handle N-d character data. 2006-08-16 John W. Eaton * parse.y (gobble_leading_white_space): New arg, SKIP_CODE. Change all uses. 2006-08-15 John W. Eaton * help.cc (help_from_file): Call get_help_from_file with new file arg. Print file info here. * parse.y (get_help_from_file): Delete include_file_info arg. Provide two versions, one that returns the file found in a reference arg and one that does not. * variables.cc (do_isglobal): New function. (Fisglobal): Use it. (Fis_global): New function. 2006-08-14 John W. Eaton * variables.cc (symbol_record_name_compare): Fix casts. * ov-cell.cc (octave_cell::subsasgn): Call empty_conv for 0x0 objects, not just empty objects. * oct-map.h (Octave_map::clear): Also clear key_list. * load-path.cc (load_path::find_dir_info, load_path::do_add, load_path::do_remove): Perform tilde expansion on directory here. 2006-07-29 John W. Eaton * matrix.h: Delete to avoid conflict with liboctave/Matrix.h on case-insensitive filesystems. * version.h (OCTAVE_VERSION): Now 2.9.7+. 2006-07-28 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.7. (OCTAVE_API_VERSION): Now api-v20. (OCTAVE_RELEASE_DATE): Now 2006-07-28. * load-path.cc (path::do_add): Warn for trailing "//". * strfns.cc: Comment out some tests for snapshot. 2006-07-27 John W. Eaton * defaults.cc (Vlocal_api_arch_lib_dir): New variable. (set_default_local_api_arch_lib_dir): New function. (install_defaults): Call it. (set_exec_path): Put Vlocal_api_arch_lib_dir in the list. * toplev.cc (localapiarchlibdir): Include it in the list. * defaults.h.in (OCTAVE_LOCALAPIARCHLIBDIR): Substitute here. 2006-07-26 John W. Eaton * mex.cc (mxArray::as_octave_value (mxArray *)): New static function. (call_mex, mexPutVariable, mexCallMATLAB, mxArray_cell::as_octave_value, mxArray_struct::as_octave_value): Use static version of as_octave_value here. (mxArray_sparse::mxArray_sparse (const mxArray_sparse&)): Check pr, ir, and jc before calling memcpy. (mxArray_number::mxArray_number): Check pr before calling memcpy * mxarray.h (mxArray::as_octave_value (mxArray *)): Provide decl. (mxArray::as_octave_value): Now protected. * file-io.cc (Ffeof, Fferror): Use DEFUNX instead of DEFUN. * mex.cc (xfree): New function. (mex::free): Use it. (mxArray_struct::~mxArray_struct, mxArray_cell::~mxArray_cell): Delete elements with delete, not mxDestroyArray. (mex::cleanup): Don't call mex::free or mex::free_value. (mex::free_value): Add debug warning. (mex::mark, mex::unmark): Fix debug warning. (call_mex): Use unwind_protect frame. (mexUnlock): Use iterator to remove item from mex_lock_count. * octave.cc (maximum_braindamage): Use disable_warning instead of bind_internal_variable to disable function-name-clash warning. * error.cc (disable_warning): No longer static. * error.h: Provide decl. 2006-07-25 David Bateman * mex.cc (mxArray_octave_value::get_class_id): Handle sparse. (class mxArray_sparse): Derive from mxArray_matlab, not mxArray_number. (mxArray_sparse::as_octave_value): Implement function. * ov-bool-sparse.cc (octave_sparse_bool_matrix::as_mxArray): Implement function. * ov-cx-sparse.cc (octave_sparse_complex_matrix::as_mxArray): Implement function. * ov-re-sparse.cc (octave_sparse_matrix::as_mxArray): Implement function. 2006-07-25 John W. Eaton * mex.cc (mxArray_struct::as_octave_value, call_mex, mexCallMATLAB, mxArray_cell::as_octave_value): Convert NULL mxArray* pointers to empty matrix values. (mxArray_octave_value:get_ir): Fix typo. 2006-07-22 John W. Eaton * mxarray.h: New file. * mex.h, mexproto.h, mex.cc: New implementation of mxArray and MEX interface. * ov.h (octave_value::mex_get_ir, octave_value::mex_get_jc): New functions. * ov-base.h (octave_base_value::mex_get_ir, octave_base_value::mex_get_jc): New virtual functions. * ov-base-sparse.h (octave_base_sparse::mex_get_ir, octave_base_sparse::mex_get_jc): New functions. * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::as_mxArray, OCTAVE_VALUE_INT_MATRIX_T::as_mxArray): New functions. * ov-int8.h, ov-int16.h, ov-int32.h, ov-int64.h, ov-uint8.h, ov-uint16.h, ov-uint32.h, ov-uint64.h: Define OCTAVE_INT_MX_CLASS before including ov-intx.h. Undef it after. * ov-range.cc (octave_range::as_mxArray): New function. * ov-range.h: Provide decl. * ov-scalar.cc (octave_scalar::as_mxArray): New function. * ov-scalar.h: Provide decl. * ov-complex.cc (octave_complex::as_mxArray): New function. * ov-complex.h: Provide decl. * ov-re-mat.cc (octave_matrix::as_mxArray): New function. * ov-re-mat.h: Provide decl. * ov-cx-mat.cc (octave_complex_matrix::as_mxArray): New function. * ov-cx-mat.h: Provide decl. * ov-ch-mat.cc (octave_char_matrix::as_mxArray): New function. * ov-ch-mat.h: Provide decl. * ov-bool-mat.cc (octave_bool_matrix::as_mxArray): New function. * ov-bool-mat.h: Provide decl. * ov-bool.cc (octave_bool::as_mxArray): New function. * ov-bool.h: Provide decl. * ov-struct.h (octave_struct::numel): New function. * ls-mat5.cc (arrayclasstype): Use "MAT_FILE_" instead of "mx" as prefix for element names. * ov.h (octave_value::as_mxArray): New function. * ov-base.cc (octave_base_value::as_mxArray): New function. * ov-base.h: Provide decl. * ov.h (octave_value::mex_get_data): New function. * ov-base.h (octave_base_value::mex_get_data): New function. * ov-base-scalar.h (octave_base_scalar::mex_get_data): New function. * ov-base-matrix.h (octave_base_matrix::mex_get_data): New function. * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::mex_get_data): New function. * ov.h (octave_value::nfields): New function. * ov-base.cc (octave_base_value::nfields): New virtual function. * ov-base.h: Provide decl. * ov-struct.h (octave_struct::nfields): New function. 2006-07-19 John W. Eaton * OPERATORS/op-bm-bm.cc (oct_assignop_conv_and_assign): New function. (install_bm_bm_ops): Install it for various types. * OPERATORS/op-bm-b.cc (oct_assignop_conv_and_assign): New function. (install_bm_b_ops): Install it for various types. * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::bool_array_value, OCTAVE_VALUE_INT_SCALAR_T::bool_array_value): New functions. * ov-range.h (octave_range::bool_array_value): New function. * ov-re-sparse.cc (octave_sparse_matrix::bool_array_value): New function. * ov-re-sparse.h: Provide decl. * ov-re-mat.cc (octave_matrix::bool_array_value): New function. * ov-re-mat.h: Provide decl. * ov-base.cc (octave_base_value::numeric_assign): Avoid memory leak when converting LHS. 2006-07-18 John W. Eaton * ov.h (octave_value::is_int8_type, octave_value::is_int16_type, octave_value::is_int32_type, octave_value::is_int64_type, octave_value::is_uint8_type, octave_value::is_uint16_type, octave_value::is_uint32_type, octave_value::is_uint64_type): New functions. * ov-base.h (octave_base_value::is_int8_type, octave_base_value::is_int16_type, octave_base_value::is_int32_type, octave_base_value::is_int64_type, octave_base_value::is_uint8_type, octave_base_value::is_uint16_type, octave_base_value::is_uint32_type, octave_base_value::is_uint64_type): New functions. * ov-int8.h, ov-int16.h, ov-int32.h, ov-int16.h, ov-uint8.h, ov-uint16.h, ov-uint32.h, ov-uint16.h: Define OCTAVE_BASE_INT_T. * ov-intx.h: Use OCTAVE_BASE_INT_T to define type-specific predicate. * ov.h (octave_value::is_double_type, octave_value::is_single_type): New functions. * ov-base.h (octave_base_value::is_double_type, octave_base_value::is_single_type): New functions. * ov-re-mat.h (octave_matrix::is_double_type): New function. * ov-cx-mat.h (octave_matrix::is_double_type): New function. * ov-scalar.h (octave_scalar::is_double_type): New function. * ov-complex.h (octave_complex::is_double_type): New function. * ov-range.h (octave_range::is_double_type): New function. * ov-re-sparse.h (octave_sparse_matrix::is_double_type): New function. * ov-cx-sparse.h (octave_sparse_complex_matrix::is_double_type): New function. 2006-07-15 John W. Eaton * ov-typeinfo.cc: Also instantiate arrays of assignany_ops. * oct-errno.cc.in (octave_errno::octave_errno): VALUE field in errno_struct no longer const. * DLD-FUNCTIONS/dispatch.cc (octave_dispatch::do_index_op): Declare resize_ok arg as bool, not int. Provide default value for resize_ok. 2006-07-14 John W. Eaton * oct-stream.cc (do_write): Include explicit instantiations. * ov-str-mat.h (octave_char_matrix_sq_str::resize): Include fill arg to match base class. * ov-struct.h (octave_struct::resize): Likewise. * ov-base-mat.cc, ov-base-mat.h, ov-base-sparse.cc, ov-base-sparse.h, ov-base.cc, ov-base.h, ov-bool.cc, ov-bool.h, ov-complex.cc, ov-complex.h, ov-intx.h, ov-list.cc, ov-list.h, ov-range.cc, ov-range.h, ov-scalar.cc, ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov.h (do_index_op): Declare resize_ok arg as bool, not int. Provide default value for resize_ok. * c-file-ptr-stream.h (c_file_ptr_stream::c_file_ptr_stream): Qualify init. 2006-07-13 John W. Eaton * oct-map.h (Octave_map::del): Add missing std:: qualifier to use of find template. 2006-07-07 John W. Eaton * ov.h (octave_value::is_bool_scalar): New function. * ov-base.h (octave_base_value::is_bool_scalar): New function. * ov-bool.h (octave_bool::is_bool_scalar): New function. * oct-map.cc (Octave_map::keys): Use assert. (Octave_map::assign): Avoid inserting new key in map unless assignment to cell succeeds. * oct-map.h (Octave_map::del): Only touch key_list if map contains key. Assert that key_list contains key. * oct-map.h (Octave_map::maybe_add_to_key_list): For efficiency, check map, not key_list. From Paul Kienzle . 2006-07-06 John W. Eaton * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Declare mrowsc volatile. * ov-struct.cc (octave_struct::print_raw): Print keys in key_list order. * oct-map.h (Octave_map::key_list): New data member. (Octave_map::maybe_add_to_key_list): New function. (Octave_map::key_list_iterator, Octave_map::const_key_list_iterator): New typedefs. (Octave_map::del): Also delete key from key_list. * oct-map.cc (Octave_map::keys): Compute return value from key_list instead of map. (Octave_map::assign, Octave_map::contents): Call maybe_add_to_key_list. * oct-map.h, oct-map.cc (Octave_map::Octave_map): Insert keys in key_list. * oct-map.h (Octave_map::Octave_map (const dim_vector&, const string_vector&)): New arg, key_list_arg. * oct-map.cc: Move definition here. 2006-07-05 John W. Eaton * mex.cc (mexGetVariable): Rename from mexGetArray, swap arguments. (mexGetVariablePtr): Rename from mexGetArrayPtr, swap arguments. (mexErrMsgIdAndTxt, mexWarnMsgIdAndTxt): New functions. * mexproto.h: Provide decls. Include decls for as yet unsupported functions. * mex.h: Add enum for class ids. (mexGetArray): Define using mexGetVariable. (mexGetArrayPtr): Define using mexGetVariablePtr. 2006-07-02 John W. Eaton * ov-str-mat.cc (CHAR_MATRIX_CONV): Omit "warn-" from label. * parse.y (maybe_warn_variable_switch_label): Likewise. 2006-07-01 John W. Eaton * parse.y (finish_cell): Use finish_matrix to do constant folding. 2006-06-30 John W. Eaton * ov-base.cc (octave_base_value::numeric_assign): Avoid memory leak when converting LHS. * oct-hist.cc (do_history, initialize_history, Fhistory_file): Don't perform tilde expansion on history file name. * syscalls.cc (Flstat, Fstat): Don't perform tilde expansion on arg. * input.cc (Fread_readline_init_file): Likewise. * dirfns.cc (Fcd, Freaddir): Likewise. * load-path.cc (genpath): Don't perform tilde expansion on name. (load_path::do_add): Don't warn about moving "." to front of list. 2006-06-28 John W. Eaton * load-path.cc (Faddpath): Don't treat "." specially here. Don't check directory status here. (Fpath): Handle all args. Don't treat "." specially here. (Faddpath, Frmpath): Delete unused variable xpath. (load_path::do_add): New function. (load_path::do_prepend, load_path::do_append): Use it. (load_path::do_remove): Really prevent removal of ".". (load_path::do_clear): Clearing doesn't remove ".". (load_path::append, load_path::prepend, load_path::do_append, load_path::do_prepend): New arg, warn. * load-path.h: Fix decls. * DLD-FUNCTIONS/regexp.cc (octregexp_list): Avoid bug in older versions of g++. 2006-06-27 John W. Eaton * Makefile.in (clean): Also remove $(DLD_OBJ). * sighandlers.cc (install_signal_handlers): Don't handle SIGPROF. From Geoffrey Knauth . 2006-06-25 John W. Eaton * mk-pkg-add: Avoid apparently non-portable sed patterns. 2006-06-21 John W. Eaton * variables.cc (do_who): Handle mex. * symtab.cc (SYMBOL_DEF::type_as_string, SYMBOL_DEF::which, symbol_table::clear_functions, table::clear_function, symbol_table::clear_function_pattern): Handle mex. * symtab.h (symbol_record::is_mex_function, symbol_record::symbol_def::is_mex_function): New functions. (symbol_record::TYPE): New value, MEX_FUNCTION. (symbol_record::is_function, symbol_table::user_function_name_list, SYMTAB_ALL_TYPES): Handle MEX_FUNCTION. * ov-fcn.h (octave_function::octave_function): Provide default for doc string arg. * defun.cc (install_mex_function): New function. * defun-int.h: Provide decl. * ov-builtin.cc (any_arg_is_magic_colon): Delete. (octave_builtin::do_multi_index_op): Call has_magic_colon method for args instead of any_arg_is_magic_colon. * ov-base.h (octave_base_value::is_mex_function): New function. * ov.h (octave_value::is_mex_function): New function. * ov-mex-fcn.h, ov-mex-fcn.cc: New files. * parse.y (load_fcn_from_file): Also handle .mex files. * dynamic-ld.cc (octave_dynamic_loader::load_oct): Rename from load. (octave_dynamic_loader::do_load_oct): Rename from do_load. * dynamic-ld.h: Fix decls. * utils.cc (mex_file_in_path): New function. * utils.h: Provide decl. * variables.cc (symbol_out_of_date): Also handle mex files. * load-path.cc (load_path::dir_info::get_file_list, load_path::dir_info::get_private_function_map, load_path::do_find_fcn, load_path::add_to_fcn_map, load_path::do_display): Also handle mex files. * load-path.h (load_path::find_mex_file): New static function. (load_path::MEX_FILE): New static data member. (load_path::do_find_fcn): By default, also look for mex files. * matrix.h, mex.h, mex.cc: New files from Octave Forge * mexproto.h: New file, extracted from mex.h. * Makefile.in: Add them to the appropriate lists. 2006-06-20 John W. Eaton * ov-re-mat.cc (octave_matrix::convert_to_str_internal): Don't lose empty dimensions on conversion to char. * strfns.cc (Fstrcmp): Handle comparison of cellstr and empty string. 2006-06-16 John W. Eaton * parse.y (%union): New type, anon_fcn_handle_type. (anon_fcn_handle): Now anon_fcn_handle_type, not tree_constant_type. (make_anon_fcn_handle): Return tree_anon_fcn_handle, not tree_constant. * comment-list.cc (octave_comment_list::dup): New function. * comment-list.h: Provide decl. * pt-cmd.cc (tree_no_op_command::dup): New function. * pt-cmd.h: Provide decl. (tree_command::dup): New pure virtual function. * pt-loop.cc (tree_while_command::dup, tree_do_until_command::dup, tree_simple_for_command::dup, tree_complex_for_command::dup): New functions. * pt-loop.h: Provide decls. * pt-jump.cc (tree_break_command::dup, tree_continue_command::dup, tree_return_command::dup): New functions. * pt-jump.h: Provide decls. * pt-except.cc (tree_try_catch_command::dup, tree_unwind_protect_command::dup): New functions. * pt-except.h: Provide decls. * pt-select.cc (tree_if_clause::dup, tree_if_command_list::dup, tree_if_command::dup, tree_switch_case::dup, tree_switch_case_list::dup, tree_switch_command::dup): New functions. * pt-select.h: Provide decls. * pt-decl.cc (tree_decl_elt::dup, tree_decl_init_list::dup, tree_global_command::dup, tree_static_command::dup): New functions. * pt-decl.h: Provide decls. * pt-exp.h (tree_expression::copy_base): New function. (tree_expression::dup): New pure virtual function. * pt-fcn-handle.cc, pt-fcn-handle.h (tree_anon_fcn_handle): New class. * pt-fcn-handle.cc (tree_function_handle::dup): New function. * pt-fcn-handle.h: Provide decl. * pt-colon.cc (tree_colon_expression::dup): New function. * pt-colon.h: Provide decl. (tree_colon_expression::tree_colon_expression (tree_expression *, tree_expression *, tree_expression *, int, int)): New constructor. * pt-const.cc (tree_constant::dup): New function. (tree_constant::tree_constant (const octave_value&, const std::string&, int, int)): New constructor. * pt-const.h: Provide decls. * pt-idx.cc (tree_index_expression::dup): New functoin. (tree_index_expression::tree_index_expression (int, int)): New constructor. * pt-idx.h: Provide decls. * pt-arg-list.cc (tree_argument_list::dup): New function. * pt-arg-list.h: Provide decl. * pt-id.cc (tree_identifier::dup): New function. * pt-id.h: Provide decl. * pt-cell.cc (tree_cell::dup): New function. * pt-cell.h: Provide decl. * pt-mat.cc (tree_matrix::dup): New function. * pt-mat.h: Provide decl. * pt-assign.cc (tree_simple_assignment::dup, tree_multi_assignment::dup): New functions. * pt-assign.h: Provide decls. * pt-binop.cc (tree_binary_expression::dup, tree_boolean_expression::dup): New functions. * pt-binop.h: Provide decls. * pt-unop.cc (tree_prefix_expression::dup, tree_postfix_expression::dup): New functions. * pt-unop.h: Provide decls. * pt-stmt.cc (tree_statement::dup, tree_statement_list::dup): New functions. * pt-stmt.h: Provide decls. * pt-misc.cc (tree_parameter_list::dup, tree_return_list::dup): New functions. * pt-misc.h: Provide decls. * symtab.cc (symbol_table::dup, symbol_table::inherit, symbol_record:is_automatic_variable): New functions. * symtab.h: Provide decls. (symbol_record::automatic_variable): New data member. (symbol_record::symbol_record): Initialize it. (symbol_record::mark_as_automatic_variable): New function. * pt-walk.h (tree_walker::visit_anon_fcn_handle): New pure virtual function. * pt-pr-code.cc (tree_print_code::visit_anon_fcn_handle): New function. * pt-pr-code.h: Provide decl. * pt-bp.cc (tree_breakpoint::visit_anon_fcn_handle): New function. * pt-bp.h: Provide decl. * pt-check.cc (tree_checker::visit_anon_fcn_handle): New function. * pt-check.h: Provide decl. 2006-06-13 John W. Eaton * pt-stmt.cc (tree_statement_list::eval): Revise previous change to preserve return-last-value-computed semantics. * DLD-FUNCTIONS/fsolve.cc (hybrd_info_to_fsolve_info): Warn about invalid values of INFO from MINPACK instead of calling panic_impossible. * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Don't assign values returned by evaluation of cmd_list to temporary variable. Delete unused variable last_computed_value. * pt-stmt.cc (tree_statement_list::eval): Clear retval before each statement is evaluated. 2006-06-12 John W. Eaton * unwind-prot.h (unwind_protect_fptr): New macro. * load-path.cc (load_path::do_set): Use it instead of unwind_protect_ptr when protecting add_hook function pointer. * dynamic-ld.cc (octave_dynamic_loader::do_load): Use FCN_PTR_CAST here instead of reinterpret_cast. 2006-06-09 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.6+. 2006-06-09 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.6. (OCTAVE_API_VERSION): Now api-v19. (OCTAVE_RELEASE_DATE): Now 2006-06-09. * ov-cell.cc (cell::save_hdf5): Use leading zeros to keep elements correctly sorted in the HDF file. From Stephen Fegan . 2006-06-08 John W. Eaton * ov-usr-fcn.cc (function::do_multi_index_op): Append contents of varargout to ret_list before calling convert_to_const_vector. * pt-arg-list.cc (tree_argument_list::convert_to_const_vector): No need to handle all_va_args here. * ov-va-args.h, ov-va-args.cc: Delete files. * Makefile.in (OV_INCLUDES, OV_SRC): Delete from the lists. * ov.cc (install_types): Don't register octave_all_va_args type. * ov.h, ov.cc (octave_value::octave_value (octave_value::all_va_args)): Delete. * ov.h (octave_value::is_all_va_args): Delete. (octave_value::enum all_va_args): Delete. * pt-pr-code.cc (tree_print_code::visit_octave_user_function_header): Print "varargout" and "varargin" instead of "...". * pt-misc.h, pt-misc.cc (tree_parameter_list::convert_to_const_vector): Arg is now const Cell& instead of tree_va_return_list*. * ov-usr-fcn.h, ov-usr-fcn.cc (octave_user_function::vr_list, octave_user_function::curr_va_arg_number): Delete variables and all uses. (octave_function::octave_va_start, octave_function::octave_va_arg, octave_function::octave_vr_val, octave_function::has_varargout): Delete functions and all uses. * ov-fcn.h (octave_function::octave_va_start, octave_function::octave_va_arg, octave_function::octave_vr_val, octave_function::has_varargout): Delete. * ov-usr-fcn.cc (Fva_arg, Fva_start, Fvr_val): Delete. * lex.l ({EL}): Don't handle "..." as varargin or varargout. * octave.gperf (all_va_args, ALL_VA_ARGS, all_va_args_kw): Delete. * parse.y (ALL_VA_ARGS): Delete token and all uses. * defaults.h.in (OCTAVE_DATAROOTDIR): Substitute here. * toplev.cc (octave_config_info): Add datarootdir to the struct. 2006-06-07 John W. Eaton * ov-cell.cc (octave_cell::subsasgn): Handle c-s list object on RHS if last index is '{'. * pt-assign.cc (tree_multi_assignment::rvalue): Compute all LHS lvalues before evaluating RHS. If LHS lvalue expects more than one output, pass octave_cs_list object to assign method. * pt-idx.cc (tree_index_expression::lvalue): Compute expected number of values if '{' index appears last. * pt-arg-list.cc (tree_argument_list::lvalue_list): New function. * pt-arg-list.h (tree_argument_list::lvalue_list): Provide decl. * oct-lvalue.h (octave_lvalue::nel): New data member. (octave_lvalue::numel): New functions * oct-obj.cc (octave_value_list::has_magic_colon): New function. * oct-obj.h (octave_value_list::has_magic_colon): Provide decl. * pt-arg-list.cc (tree_argument_list::nargout_count): Delete function. * pt-arg-list.h (tree_argument_list::nargout_count): Delete decl. 2006-06-06 John W. Eaton * sighandlers.cc (generic_sig_handler, sigint_handler): Use strsignal instead of accessing sys_siglist directly. * siglist.h: Use HAVE_DECL_SYS_SIGLIST instead of SYS_SIGLIST_DECLARED. * siglist.c: Update sys_siglist. (init_signals, strsignal): New functions. * octave.cc (octave_main): Call init_signals here. * toplev.cc (Foctave_config_info): Delete LIBPLPLOT from struct. 2006-06-05 John W. Eaton * pt-assign.cc (Vprint_rhs_assign_val): Delete variable. (Fprint_rhs_assign_val): Delete function. tree_simple_assignment::rvalue, tree_multi_assignment::rvalue): No special case for Vprint_rhs_assign_val. 2006-06-02 John W. Eaton * pt-arg-list.h (tree_argument_list::mark_as_simple_assign_lhs, tree_argument_list::is_simple_assign_lhs): New functions. (tree_argument_list::simple_assign_lhs): New data member. * parse.y (assign_lhs): Classify LHS here. (make_assign_op): Create simple or multi assign op based on classification of LHS, not its length. 2006-06-01 John W. Eaton * Makefile.in (DLD_XSRC): Add __pchip_deriv__.cc to the list. 2006-06-01 David Bateman * DLD-FUNCTIONS/__pchip_deriv__.cc: New file. 2006-05-31 John W. Eaton * load-path.h (load_path::set_command_line_path): Make it additive. 2006-05-26 John W. Eaton * load-path.cc (genpath, maybe_add_path_elts, Fgenpath, Frehash, Fpath, Fpathdef): Move here from defaults.cc. * load-path.cc, load-path.h: New files. * Makefile.in (INCLUDES, DIST_SRC): Add them to the lists. * help.cc (make_name_list, simple_help): Use load_path instead of octave_fcn_file_name_cache. (Flookfor): Use load_path instead of Vload_path_dir_path. * octave.cc (octave_main): Likewise. * parse.y (load_fcn_from_file): Likewise. * utils.cc (Ffile_in_loadpath, file_in_path, fcn_file_in_path, oct_file_in_path): Likewise. * variables.cc (symbol_exist, symbol_out_of_date): Likewise. * DLD-FUNCTIONS/fftw_wisdom.cc (Ffftw_wisdom): Likewise. * utils.cc (Ffind_first_of_in_loadpath): Delete. * input.cc (octave_gets): Call load_path::update here. * dirfns.cc (octave_change_to_directory): Likewise. * defaults.cc (VLOADPATH, VDEFAULT_LOADPATH, Vload_path_dir_path, maybe_add_or_del_packages, update_load_path_dir_path, execute_default_pkg_add_files, set_load_path): Delete. * defaults.h.in (Vload_path_dir_path, execute_default_pkg_add_files, maybe_add_default_load_path, set_load_path): Delete decls. * fn-cache.h, fn-cache.cc: Delete. * Makefile.in (INCLUDES, DIST_SRC): Remove them from the lists. * input.cc (octave_gets): Only update Vlast_prompt_time if we are interactive and actually printing a prompt. Don't print prompt if reading startup files or command line files. Initialize Vlast_prompt_time to 0. * pr-output.cc (set_format): Always include space for sign. 2006-05-23 John W. Eaton * load-save.cc (Fsave): Use tellp instead of pubseekoff to determine whether we are at beginning of file. * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::increment, OCTAVE_VALUE_INT_SCALAR_T::decrement, OCTAVE_VALUE_INT_MATRIX_T::increment, OCTAVE_VALUE_INT_MATRIX_T::decrement): New functions. * OPERATORS/op-int.h (OCTAVE_INSTALL_M_INT_UNOPS, OCTAVE_INSTALL_S_INT_UNOPS, OCTAVE_M_INT_UNOPS, OCTAVE_S_INT_UNOPS): Uncomment increment and decrement ops. 2006-05-19 John W. Eaton * symtab.cc (SYMBOL_DEF::document): If definition is a function, also pass doc string to function object. * ov-fcn.h (octave_function::document): New function. * defun.cc (print_usage (octave_function *)): New function. (print_usage (void)): New function. (print_usage (const std::string&)): Provide for backward compatibility. Ignore arg. (Fprint_usage): Don't accept arg. * defun-int.h (print_usage (void)): Provide decl. (print_usage (const std::string&)): Tag with GCC_ATTR_DEPRECATED. 2006-05-04 David Bateman * DLD-FUNCTIONS/conv2.cc: New file from Octave Forge. * Makefile.in (DLD_XSRC): Add it to the list 2006-05-17 Bill Denney * help.cc (keywords): Improve and Texinfoize. 2006-05-17 John W. Eaton * symtab.cc (Vwhos_line_format): Show class instead of type. (symbol_table::parse_whos_line_format): Use 't' for "Type" and 'c' for "Class". (symbol_record::print_symbol_info_line): Likewise. (maybe_list_cmp_fcn): Fix casts. 2006-05-11 John W. Eaton * octave.cc (IMAGE_PATH_OPTION): New macro. (usage_string, verbose_usage): Include --image-path option. (long_opts): Include --image-path. (octave_main): Handle IMAGE_PATH_OPTION. * toplev.cc (Foctave_config_info): Delete fcnfilepath, imagepath, localfcnfilepath, and localoctfilepath from the struct. * defaults.h.in (OCTAVE_FCNFILEPATH, OCTAVE_IMAGEPATH, OCTAVE_LOCALFCNFILEPATH, OCTAVE_LOCALOCTFILEPATH): Delete variables. * octave.cc (octave_main): Call set_exec_path and set_load_path instead of bind_internal_variable. * defaults.cc (Fpathdef): Rename from FDEFAULT_LOADPATH. Don't allow default path to be set. (Fpath): Rename from FLOADPATH. Make Matlab-compatible. (update_load_path_dir_path): No need to pass VDEFAULT_LOADPATH to dir_path constructor now. (update_exec_path, FDEFAULT_EXEC_PATH, set_default_default_exec_path, set_default_exec_path, maybe_add_default_load_path): Delete functions. (VDEFAULT_EXEC_PATH): Delete variable. (FEXEC_PATH): Leading and trailing colons no longer special. (set_exec_path, set_load_path, set_image_path, maybe_add_path_elts): New functions. (install_defaults): Call set_exec_path and set_load_path instead of set_default_exec_path and set_default_path. Don't call set_default_default_exec_path. Do call set_image_path. * defaults.cc (genpath, Fgenpath): New functions. (Vlocal_ver_oct_file_dir, Vlocal_api_oct_file_dir, Vlocal_oct_file_dir, Vlocal_ver_fcn_file_dir, Vlocal_api_fcn_file_dir, Vlocal_fcn_file_dir, Vimage_dir): New variables. (set_default_local_ver_oct_file_dir, set_default_local_api_oct_file_dir, set_default_local_oct_file_dir, set_default_local_ver_fcn_file_dir, set_default_local_api_fcn_file_dir, set_default_local_fcn_file_dir, set_default_image_dir): New functions. (install_defaults): Call them. * defaults.h.in (set_exec_path, set_load_path, set_image_path, Vlocal_ver_oct_file_dir, Vlocal_api_oct_file_dir, Vlocal_oct_file_dir, Vlocal_ver_fcn_file_dir, Vlocal_api_fcn_file_dir, Vlocal_fcn_file_dir, Vlocal_fcn_file_dir, Vimage_dir): Provide decls. 2006-05-10 John W. Eaton * ov-cell.cc (Fcellstr): Trim trailing blanks. * Cell.h (Cell::Cell (const string_vector&)): New arg, TRIM. * oct-hist.cc (initialize_history, Fhistory_size): Also call command_history::set_size here. * defun.cc (Fprint_usage): New function. * help.cc (display_usage_text): New function. 2006-05-09 Keith Goodman * DLD-FUNCTIONS/rand.cc: Doc string fix. 2006-05-09 Jorge Barros de Abreu * data.cc (FInf, FNaN): Fix typo in doc string. 2006-05-08 John W. Eaton * Makefile.in (DEFUN_PATTERN): Match DEFUNX_DLD. * mkbuiltins: Handle XDEFUNX_DLD_INTERNAL. * mkgendoc: Likewise. * mk-pkg-add: Likewise. Do all the matching with sed. * defun-int.h (DEFINE_FUNX_INSTALLER_FUN, DEFINE_FUNX_INSTALLER_FUN2, DEFINE_FUNX_INSTALLER_FUN3): New macros. (DEFINE_FUN_INSTALLER_FUN3): Define using DEFINE_FUNX_INSTALLER_FUN3. (DEFUNX_DLD_INTERNAL): New macro. * defun-dld.h (DEFUNX_DLD): New macro. * DLD-FUNCTIONS/__gnuplot_raw__.l: Mark __gnuplot_set__ as a command, not a rawcommand. * load-save.cc: No need to handle built-in variables. * help.cc (simple_help): No need to handle built-in variables. * variables.cc (is_builtin_variable, builtin_string_variable, builtin_real_scalar_variable, builtin_any_variable): Delete functions. (Fexist, Fdocument, do_who, Fwho, link_to_builtin_or_function): No need to handle built-in variables. * variables.h (is_builtin_variable, builtin_string_variable, builtin_real_scalar_variable, builtin_any_variable): Delete decls. * symtab.h (symbol_record::symbol_def::is_builtin_variable, symbol_record::is_builtin_variable): Delete. (symbol_record::TYPE): Remove BUILTIN_VARIABLE from enum. (symbol_record::symbol_def::is_variable, SYMTAB_ALL_TYPES, SYMTAB_VARIABLES): No need to handle built-in variables now. (symbol_record::define_builtin_variable, symbol_record::link_to_builtin_variable): Delete decls. * symtab.cc (record::define, SYMBOL_DEF::type, SYMBOL_DEF::type_as_string): No need to handle built-in variables. (symbol_record::define_builtin_variable): Delete. (symbol_record::variable_reference): No need to attemp to link to built-in variable. * utils.cc (check_preference, warn_old_style_preference): Delete. * utils.h (check_preference): Delete decl. * defun-int.h: Delete all DEFVAR macros. * Makefile.in, mkbuiltins: No need for VAR_FILES. * parse.y (current_script_file_name): Delete all uses. (clear_current_script_file_name): Delete function. * variables.cc (symbols_of_variables): Delete DEFVAR and function. (bind_ans): Lookup ans in curr_sym_tab, not fbi_sym_tab. SR is no longer static, so we insert value in local scope. * defun.cc (bind_builtin_variable): Delete function. * defun-int.h: Delete decl. * defaults.cc (fftw_wisdom_program): Rename from fftw_wisdom_prog. Change all uses. (VDEFAULT_LOADPATH): Rename from Vdefault_load_path. Change all uses. (VLOADPATH): Rename from Vload_path. Change all uses. (VDEFAULT_EXECPATH): Rename from Vdefault_exec_path. Change all uses. (VEXECPATH): Rename from Vexec_path. Change all uses. (VEDITOR): Rename from Veditor. Change all uses. (Ffftw_wisdom_program, FDEFAULT_LOADPATH, FLOADPATH, FDEFAULT_EXEC_PATH, FEXEC_PATH, FEDITOR, FIMAGEPATH): New functions. (fftw_wisdom_program, default_load_path, loadpath, default_exec_path, exec_path, editor, image_path): Delete functions. (symbols_of_defaults): Delete DEFVARs and function. * pr-output.cc (set_output_prec_and_fw): Set Voutput_precision and Voutput_max_field_width directly instead of calling bind_builtin_variable. * octave.cc (octave_main, maximum_braindamage): Call bind_internal_variable instead of bind_builtin_variable. * pager.cc (Fmore): Set Vpage_screen_output directly instead of calling bind_builtin_variable. * error.cc (Fwarning): Set Vdebug_on_warning directly instead of calling bind_builtin_variable. * error.cc (initialize_warning_options): Now static. (disable_warning, initialize_default_warning_state): New functions. * error.h (initialize_warning_options): Delete decl. (initialize_default_warning_state): Provide decl. * octave.cc (octave_main): Call initialize_default_warning_state instead initialize_warning_options. * lex.l (warn_matlab_incompatible, warn_separator_insert, warn_single_quote_string): Delete functions. (symbols_of_lex): Delete DEFVARS. (Vwarn_matlab_incompatible, Vwarn_separator_insert, Vwarn_single_quote_string): Delete variables. (maybe_warn_separator_insert, gripe_single_quote_string, gripe_matlab_incompatible): Call warning_with_id instead of warning. * variables.h (SET_NONEMPTY_INTERNAL_STRING_VARIABLE, SET_INTERNAL_VARIABLE_WITH_LIMITS): New macros. * ls-oct-ascii.cc (Fsave_precision): New function. (save_precision): Delete function. (symbols_of_ls_oct_ascii): Delete DEFVAR and function. * oct-hist.cc (initialize_history): New function. * oct-hist.h: Provide decl. * octave.cc (octave_main): Call initialize_history instead of command_history::read. * oct-hist.cc (Fhistory_size, Fhistory_file, Fhistory_timestamp_format_string, Fsaving_history): New functions. (history_size, history_file, history_timestamp_format_string, saving_history): Delete functions. (symbols_of_oct_hist): Delete DEFVARs and function. * pt-mat.cc (Fstring_fill_char): New function. (string_fill_char): Delete function. (symbols_of_pt_mat): Delete DEFVAR and function. * variables.cc (Fignore_function_time_stamp, ans): New functions. (ignore_function_time_stamp): Delete function. (symbols_of_variables): Delete DEFVARs and function. * oct-procbuf.cc: (Vkluge_procbuf_delay): Delete variable. (octave_procbuf::open): Never delay after fork. (kluge_procbuf_delay): Delete function. (symbols_of_oct_procbuf): Delete DEFVAR and function. * dirfns.cc (Fconfirm_recursive_rmdir): New function. (confirm_recursive_rmdir): Delete function. (symbols_of_dirfns): Delete DEFVAR and function. * error.cc (initialize_warning_options): Now extern. Rename from init_warning_options. * error.h: Provide decl. * octave.cc (octave_main): Call it here. * error.cc (Fbeep_on_error, Fdebug_on_error, Fdebug_on_warning): New functions. (beep_on_error, debug_on_error, debug_on_warning): Delete Functions. (symbols_of_error): Delete DEFVARs and function. * help.cc (Finfo_file, Finfo_program, Fmakeinfo_program, Fsuppress_verbose_help_message): New function. (info_file, info_program, makeinfo_program, suppress_verbose_help_message): Delete function. (symbols_of_help): Delete DEFVARs and function. (Vinfo_program): Rename from Vinfo_prog. Change all uses. * input.cc (FPS1, FPS2, FPS4, Fcompletion_append_char, Fecho_executing_commands): New functions. (ps1, ps2, ps4, completion_append_char, echo_executing_commands): Delete functions. (symbols_of_input): Delete DEFVARs and function. (VPS1, VPS2, VPS4): Rename from Vps1, Vps2, Vps4. Change all uses. (Fecho): Set Vecho_executing_commands directly. * load-save.cc (crash_dumps_octave_core, Fdefault_save_options, Foctave_core_file_limit, Foctave_core_file_name, Foctave_core_file_options, Fsave_header_format_string): New functions. (crash_dumps_octave_core, default_save_options, octave_core_file_limit, octave_core_file_name, octave_core_file_options, save_header_format_string): Delete functions. (symbols_of_load_save): Delete DEFVARs and function. * ov-base.cc (Fprint_answer_id_name, Fsilent_functions): New functions. (print_answer_id_name, silent_functions): Delete functions. (symbols_of_ov_base): Delete DEFVARs and function. * ov-usr-fcn.cc (Fmax_recursion_depth): New function. (max_recursion_depth): Delete function. (symbols_of_ov_usr_fcn): Delete DEFVAR for max_recursion_depth. Delete function. * pager.cc (Fpage_output_immediately, Fpage_screen_output, FPAGER): New functions. (page_output_immediately, page_screen_output, pager_binary): Delete functions. (symbols_of_pager): Delete DEFVARs and function. (VPAGER): Rename from Vpager_binary. Change all uses. * pr-output.cc (Ffixed_point_format, Fprint_empty_dimensions, Fsplit_long_rows, Foutput_max_field_width, Foutput_precision, Fstruct_levels_to_print): New functions. (fixed_point_format, print_empty_dimensions, split_long_rows, output_max_field_width, output_precision, struct_levels_to_print): Delete functions. (symbols_of_pr_output): Delete DEFVARs and function. * pt-assign.cc (Fprint_rhs_assign_val): New function. (print_rhs_assign_val): Delete function. (symbols_of_pt_assign): Delete DEFVAR. Delete function. * sighandlers.cc (Fdebug_on_interrupt, Fsighup_dumps_octave_core, Fsigterm_dumps_octave_core): New functions. (debug_on_interrupt, sighup_dumps_octave_core, sigterm_dumps_octave_core): Delete functions. (symbols_of_sighanlders): Delete DEFVARs. Delete function. * symtab.cc (Vdebug_symtab_lookups): Now bool. (Fdebug_symtab_lookups, Fwhos_line_format, Fvariables_can_hide_functions): New functions. (debug_symtab_lookups, whos_line_format, variables_can_hide_functions): Delete functions. (symbols_of_symtab): Delete DEFVARs and function. 2006-05-04 David Bateman * DLD-FUNCTIONS/sqqr (Fdmperm): Allow compilation with versions v2.0.0 of CXSparse or later. 2006-05-04 John W. Eaton * variables.cc (set_internal_variable): Move here from DLD-FUNCTIONS/__gnuplot_raw__.l. * variables.h (SET_INTERNAL_VARIABLE): Likewise. (set_internal_variable): Provide decls. * DLD-FUNCTIONS/__gnuplot_raw__.l: Convert all DEFVARs to DEFUN_DLDs. (gnuplot::init): Delete. (gnuplot::gnuplot): Don't call init here. (set_internal_variable): New functions. (SET_INTERNAL_VARIABLE): New macro. * Makefile.in: Undo changes of 2006-03-16. * DLD-FUNCTINS/__gnuplot_raw__.l: Move here from __gnuplot_raw__.l. Undo changes of 2006-03-16. 2006-05-03 David Bateman * ov-base-mat.h: Add caching of matrix type, and code to supply and copy matrix type. * ov-bool-mat.h: Add caching to constructor. * ov-re-mat.h: ditto. * ov-cx-mat.h: ditto. * ov.cc: Add to the BoolMatrix, Matrix and the ComplexMatrix octave_value constructors, the ability to specify the matrix type. * ov.h: Adapt declaration of above constructors. (MatrixType matrix_type(void) const, MatrixType matrix_type (const MatrixType&)): New functions for probing and setting matrix type. * ov-base.cc (virtual MatrixType matrix_type(void) const, virtual MatrixType matrix_type (const MatrixType&)): New default functions for probing and setting matrix type. * ov-base.h (virtual MatrixType matrix_type(void) const, virtual MatrixType matrix_type (const MatrixType&)): Declarations. * ov-base-sparse.h: Replace all uses of SparseType with MatrixType. Replace sparse_type function with matrix_type function. * ov-bool-sparse.h: Replace all uses of SparseType with MatrixType. * ov-cx-sparse.h: ditto. * ov-re-sparse.h: ditto. * sparse-xdiv.cc: ditto. * sparse-xdiv.h: ditto. * sparse-xpow.cc: ditto. * DLD-FUNCTIONS/luinc.cc: ditto. * DLD-FUNCTIONS/splu.cc: ditto. * xdiv.cc (xdiv, xleftdiv): Pass the matrix type, simplfy since the matrix solve function now calls lssolve if singular. * xdiv.h (xdvi, xleftdiv): Update the declarations * OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc, OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc, OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc, OPERATORS/op-cs-cm.cc, OPERATORS/op-cs-m.cc, OPERATORS/op-m-cm.cc, OPERATORS/op-m-cs.cc, OPERATORS/op-m-m.cc, OPERATORS/op-m-s.cc, OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc, OPERATORS/op-s-cm.cc, OPERATORS/op-s-m.cc, OPERATORS/op-scm-cm.cc, OPERATORS/op-scm-m.cc, OPERATORS/op-sm-cm.cc, OPERATORS/op-sm-m.cc: Update use of xdiv and xleftdiv functions to allow matrix type caching. * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Update to allow typing of Matrix, and ComplexMatrix types. Add new test code for this. * DLD-FUNCTIONS/cellfun.cc (Fmat2cell): new function. * DLD-FUNCTIONS/regexp.cc (class regexp_elem): New class to store matched element in a std::list. (octregexp_list): Take algorithm from octregexp and construct a list of matches. (octregexp): Rewrite to use linked list of matches. (Fregexprep): New function, working directly in linked list of matches. 2006-05-02 John W. Eaton * lex.l ({CCHAR}): Exit rawcommand mode if returning '\n' token. 2006-05-02 David Bateman * DLD-FUNCTIONS/rand.cc (do_rand): Require real scalar for seed. 2006-05-01 John W. Eaton * error.h (Vwarning_option): Delete. * variables.cc (looks_like_struct): Remove use from commented code. * gripes.cc, gripes.h (gripe_implicit_conversion): New arg, ID. Change all uses. * defaults.cc (set_local_site_defaults_file, set_site_defaults_file): Allow filenames to be set from the environment. * oct-map.cc (octave_map::resize): No longer const. * ov-struct.h (octave_struct::resize): Deal with it. * octave.cc (initialize_error_handlers): Also call set_liboctave_warning_with_id_handler. (execute_startup_files): Check that home_rc is not an empty string. (F__version_info__): Resize vinfo before assigining elements. * ov-base.cc (warn_num_to_str, warn_resize_on_range_error): Delete functions. (symbols_of_ov_base): Delete DEFVARS. (Vwarn_num_to_str, Vwarn_resize_on_range_error): Delete variables. (value::convert_to_str): Check state of warning ID Octave:num-to-str instead of using Vwarn_num_to_str. * OPERATORS/op-chm.cc: Likewise. * ov-base.h (Vwarn_num_to_str, Vwarn_resize_on_range_error): Delete decls. * ov-list.cc (octave_list::assign): Call warning_with_id instead of warning. * parse.y (warn_assign_as_truth_value, warn_associativity_change, warn_function_name_clash, warn_future_time_stamp, warn_missing_semicolon, warn_precedence_change, warn_variable_switch_label, symbols_of_parse): Delete DEFVARs and functions. (Vwarn_assign_as_truth_value, Vwarn_associativity_change, Vwarn_function_name_clash, Vwarn_future_time_stamp, Vwarn_missing_semicolon, Vwarn_precedence_change, Vwarn_variable_switch_label): Delete variables. * parse.h (Vwarn_future_time_stamp): Delete decl. * parse.y (fold): Check state of warning ID Octave:associativity-change and Octave:precedence-change instead of using Vwarn_associativity_change and Vwarn_precedence_change. (maybe_warn_associativity_change, maybe_warn_missing_semi, maybe_warn_assign_as_truth_value, make_binary_op, make_boolean_op, frob_function): Call warning_with_id instead of warning. * dynamic-ld.cc (octave_dynamic_loader::do_load): Likewise. * ov.cc (warn_fortran_indexing, warn_imag_to_real, symbols_of_ov): Delete DEFVARs and functions. (Vwarn_fortran_indexing, Vwarn_imag_to_real): Delete variables. * ov.cc (octave_value::vector_value, octave_value::int_vector_value, octave_value::complex_vector_value): Check state of warning ID Octave:fortran-indexing instead of using Vwarn_fortran_indexing. * ov-cx-sparse.cc (octave_sparse_complex_matrix::double_value, octave_sparse_complex_matrix::complex_value): Likewise. * ov-cx-mat.cc (octave_complex_matrix::matrix_value, octave_complex_matrix::complex_value): Likewise. * ov-re-mat.cc (octave_matrix::complex_value, octave_matrix::double_value): Likewise. * ov-streamoff.cc (octave_streamoff::streamoff_value): Likewise. * ov-re-sparse.cc (octave_sparse_matrix::complex_value, octave_sparse_matrix::double_value): Likewise. * ov-range.cc (octave_range::complex_value, octave_range::double_value): Likewise. * ov-ch-mat.cc (octave_char_matrix::complex_value, octave_char_matrix::double_value): Likewise. * ov-bool-sparse.cc (octave_sparse_bool_matrix::complex_value, octave_sparse_bool_matrix::double_value): Likewise. * ov-bool-mat.cc (octave_bool_matrix::complex_value, octave_bool_matrix::double_value): Likewise. * ov-cx-sparse.cc (octave_sparse_complex_matrix::double_value, octave_sparse_complex_matrix::matrix_value, octave_sparse_complex_matrix::sparse_matrix_value): Check state of warning ID Octave:imag-to-real instead of using Vwarn_imag_to_real. * ov-cx-mat.cc (octave_complex_matrix::double_value, octave_complex_matrix::matrix_value, octave_complex_matrix::complex_value, octave_complex_matrix::sparse_matrix_value): Likewise. * ov-complex.cc (octave_complex::double_value, octave_complex::matrix_value, octave_complex::array_value): Likewise. * ov.h (Vwarn_fortran_indexing, Vwarn_imag_to_real): Delete decls. * pt-mat.cc (warn_empty_list_elements, warn_string_concat): Delete functions. (symbols_of_pt_mat): Delete DEFVARs. (Vwarn_empty_list_elements, Vwarn_string_concat): Delete variables. (tm_row_const::tm_row_const_rep::eval_warning, tm_const::init, maybe_warn_string_concat): Call warning_with_id instead of warning. * ov-str-mat.cc (warn_str_to_num, symbols_of_ov_str_mat): Delete DEFVAR and functions. (Vwarn_str_to_num): Delete variable. (CHAR_MATRIX_CONV): Call warning_with_id instead of warning. * utils.cc (warn_neg_dim_as_zero, symbols_of_utils): Delete DEFVAR and functions. (Vwarn_neg_dim_as_zero): Delete variable. (check_dimensions): Call warning_with_id instead of warning. * pt-misc.cc (warn_undefined_return_values, symbols_of_pt_misc): Delete DEFVAR and functions. (Vwarn_undefined_return_values): Delete variable. (tree_parameter_list::initialize_undefined_elements): Call warning_with_id instead of warning. * dynamic-ld.cc (warn_reload_forces_clear, symbols_of_dynamic_ld): Delete DEFVAR and functions. (Vwarn_reload_forces_clear): Delete variable. (do_clear_function, octave_dynamic_loader::do_load): Call warning_with_id instead of warning. * error.cc (warning_enabled): Now extern. (Fwarning): If specific id is not found, return state of "all". * error.h: Provide decl. * gripes.cc (warn_divide_by_zero, symbols_of_gripes): Delete DEFVAR and functions. (gripe_divide_by_zero): Check whether warning is enabled, then call warning_with_id instead of warning. (Vwarn_divide_by_zero): Delete variable. 2006-04-27 John W. Eaton * variables.cc (Fexist): Fix doc string. * help.cc (simple_help): No need to handle built-in constants now. * variables.cc (do_who): Likewise. (symbol_exist): Likewise. (link_to_builtin_or_function): Likewise. * symtab.cc (SYMBOL_DEF::type_as_string): Likewise. (record::read_only_error): Likewise. (SYMBOL_DEF::type): Likewise. (record::variable_reference): Likewise. (symbol_record::define_builtin_const): Delete function. * symtab.h (symbol_record::define_builtin_const): Delete decl. (symbol_record::symbol_def::is_constant): Delete function. (symbol_record::symbol_def::is_builtin_constant): Delete function. (symbol_record::symbol_def::is_constant): Delete function. (symbol_record::is_builtin_constant): Delete function. (SYMTAB_ALL_TYPES): No need to handle builtin-constants now. (symbol_record::TYPE): Remove BUILTIN_CONSTANT from enum. * defun.cc (install_builtin_constant): Delete function. * defun-int.h (install_builtin_constant): Delete decl. * variables.cc (bind_builtin_constant): Delete function. * variables.h (bind_builtin_constant): Delete decl. * defun-int.h (DEFCONST, DEFCONSTX, DEFCONST_INTERNAL, DEFCONSTX_INTERNAL): Delete definitions. * sighandlers.cc (FSIG): New function to replace DEFCONST in symbols_of_sighandlers. * octave.cc (intern_argv): Set octave_argv instead of calling bind_builtin_variable here. (Fargv, Fprogram_invocation_name, Fprogram_name): New functions to replace DEFCONSTs in symbols_of_toplvev in toplev.cc. (octave_program_invocation_name, octave_program_name): New static variables. (execute_command_line_file): Use unwind_protect_str to protect octave_program_invocation_name, octave_program_name instead of using a restore function. (restore_program_name): Delete. * defaults.cc (FOCTAVE_HOME): New function to replace DEFCONST in symbols_of_defaults. 2006-04-27 David Bateman * DLD-FUNCTIONS/regexp.cc (octregexp): Fix for infinite loop in regexp. Include news regexp arguments, and associated tests. 2006-04-26 John W. Eaton * oct-stream.cc: Also instantiate do_read functions for boolNDArray. 2006-04-26 Bill Denney * pager.cc (Fterminal_size): Add list_in_columns to @seealso. 2006-04-26 John W. Eaton * dirfns.cc (Ffilesep): New function to replace DEFCONST in symbols_of_dirfns. (Fpathsep): New function. * defaults.cc (set_default_default_exec_path): Use dir_path::path_sep_str instead of std::string (SEPCHAR_STR). (set_default_exec_path): Likewise. (set_default_path): Likewise. (maybe_add_default_load_path): Likewise. Use dir_path::is_path_sep. 2006-04-18 John W. Eaton * DLD-FUNCTIONS/regexp.cc: Include , for transform decl. * DLD-FUNCTIONS/ccolamd.cc (Fccolamd, Fcsymamd): Always return something. * sighandlers.cc (octave_set_signal_handler, octave_set_interrupt_handler): New arg, restart_syscalls, with default value true. * sighandlers.h: Fix decls to match. * sysdep.cc (octave_kbhit): Disable restarting of system calls. * help.cc (Flookfor): Add std qualifier to transform function. Include , for transform decl. 2006-04-16 John W. Eaton * pager.h (octave_diary_buf, octave_pager_buf): Use std:stringbuf directly. * ls-mat-ascii.cc (read_mat_ascii_data): Use std::istringstream directly. * load-save.cc (parse_save_options): Likewise. * ls-mat5.cc (read_mat5_binary_element): Likewise. * oct-strstrm.h (octave_istrstream::is): Likewise. * __gnuplot_raw__.l (printrange, handle_using, gnuplot::do_open, gnuplot::do_set, gnuplot::do_show, gnuplot::makeplot, gnuplot::handle_title): Use std::ostringstream directly. * toplev.cc (run_command_and_return_output): Likewise. * symtab.h (symbol_table::symbol_table): Likewise. * strfns.cc (Flist_in_columns): Likewise. * pt.cc (tree::str_print_code): Likewise. * parse.y (yyerror, fold, finish_matrix): Likewise. * pr-output.cc (PRINT_ND_ARRAY, octave_print_internal, Fdisp): Likewise. * symtab.cc (symbol_table::print_descriptor): Likewise. * ov-list.cc (octave_list::print_raw, octave_list::save_ascii, octave_list::save_binary, octave_list::save_hdf5): Likewise. * ov-fcn-inline.cc (octave_fcn_inline::octave_fcn_inline, octave_fcn_inline::load_ascii, octave_fcn_inline::print_raw, Finline): Likewise. * ov-fcn-handle.cc (octave_fcn_handle::load_ascii, octave_fcn_handle::save_binary, octave_fcn_handle::save_hdf5): Likewise. * ov-cs-list.cc (octave_cs_list::print_raw): Likewise. * ov-cell.cc (octave_cell::print_raw, octave_cell::save_hdf5): Likewise. * oct-strstrm.h (octave_ostrstream::os, octave_ostrstream::str): Likewise. * oct-stream.h (scanf_format_list::buf, printf_format_list::buf): Likewise. * oct-stream.cc (scanf_format_list::scanf_format_list, printf_format_list::printf_format_list, octave_base_stream::do_gets, BEGIN_CHAR_CLASS_CONVERSION, octave_stream_list::do_list_open_files): Likewise. * ls-oct-ascii.h (extract_keyword): Likewise. * load-save.cc (do_load): Likewise. * lex.l (have_continuation, handle_string): Likewise. * input.cc (get_user_input): Likewise. * dirfns.cc (Fls): Likewise. * error.cc (error_message_buffer, vwarning, verror, pr_where): Likewise. * defun.cc (print_usage): Likewise. * help.cc (display_help_text, Ftype, first_help_sentence): Likewise. * ls-mat5.cc (save_mat5_binary_element): Likewise. * DLD-FUNCTIONS/regexp.cc (octregexp): Likewise. * DLD-FUNCTIONS/fftw_wisdom.cc (Ffftw_wisdom): Likewise. 2006-04-13 John W. Eaton * Makefile.in (lex.o parse.o __gnuplot_raw__.o, pic/parse.o pic/__gnuplot_raw__.o): Omit -Wold-style-cast from CXXFLAGS. * ls-mat5.cc (READ_INTEGER_DATA): Allocate local buffer to avoid pointer tricks. * DLD-FUNCTIONS/regexp.cc (octregexp): Use OCTAVE_LOCAL_BUFFER instead of allocting memory with malloc. * DLD-FUNCTIONS/sparse.cc (Fsparse): Use octave_value extractors instead of using get_rep. * DLD-FUNCTIONS/dispatch.cc (dispatch_record): Use dynamic_cast, not reinterpret_cast. * DLD-FUNCTIONS/besselj.cc (Fairy): Use int_value instead of double_value and cast to extract kind arg. (int_arrayN_to_array): Arg is ArrayN, not ArrayN. * OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc, OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc, OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc, OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc, OPERATORS/op-scm-cm.cc, OPERATORS/op-scm-cs.cc, OPERATORS/op-scm-m.cc, OPERATORS/op-scm-s.cc, OPERATORS/op-scm-scm.cc, OPERATORS/op-scm-sm.cc, OPERATORS/op-sm-cm.cc, OPERATORS/op-sm-cs.cc, OPERATORS/op-sm-m.cc, OPERATORS/op-sm-s.cc, OPERATORS/op-sm-scm.cc, OPERATORS/op-sm-sm.cc: No need to cast away const just to cache sparse type. * ov-base-sparse.h (octave_base_sparse::typ): Now mutable. (octave_base_sparse::sparse_type): Now const. * OPERATORS/op-cm-scm.cc (DEFBINOP(div)): Explicitly cast args here instead of using CAST_BINOP_ARGS. * OPERATORS/op-streamoff.cc (STREAMOFF_COMP_OP): Second arg to CAST_BINOP_ARGS is also const. * DLD-FUNCTIONS/chol.cc (Fcholinv, Fchol2inv): Eliminate nargout arg to avoid unused variable warnings. * unwind-prot.h, unwind-prot.cc (unwind_protect::save_bool, unwind_protect::save_int, unwind_protect::save_str, unwind_protect::save_ptr, unwind_protect::save_var): Pointer args now const. (unwind_protect_const_ptr): New macro. * symtab.cc (maybe_list_cmp_fcn): Use static_cast instead of X_CAST. * variables.cc (symbol_record_name_compare): Likewise. * ls-mat5.cc (MAT5_DO_WRITE, save_mat5_binary_element): Likewise. * ov-fcn-handle.cc (octave_fcn_handle::save_hdf5, octave_fcn_handle::load_hdf5): Eliminate unnecessary casts. * ov-fcn-inline.cc (octave_fcn_inline::save_hdf5, octave_fcn_inline::load_hdf5): Likewise. * ov-str-mat.cc (octave_char_matrix_str::save_hdf5, octave_char_matrix_str::load_hdf5): Likewise. * ov-bool-sparse.cc (octave_sparse_bool_matrix::save_hdf5, octave_sparse_bool_matrix::load_hdf5): Likewise. * ov-cx-sparse.cc (octave_sparse_complex_matrix::save_hdf5, octave_sparse_complex_matrix::load_hdf5): Likewise. * ov-re-sparse.cc (octave_sparse_matrix::save_hdf5, octave_sparse_matrix::load_hdf5): Likewise. * ov-str-mat.cc (octave_char_matrix_str::save_ascii, octave_char_matrix_str::load_ascii): Likewise. * mappers.cc (xtoascii): Likewise. * load-save.cc (read_binary_file_header, write_header): Likewise. * parse.y (get_help_from_file, parse_fcn_file): Likewise. * DLD-FUNCTIONS/rand.cc (do_rand): Likewise. * ls-hdf5.cc (read_hdf5_data, hdf5_add_attr, save_hdf5_empty, load_hdf5_empty add_hdf5_data): Likewise. * ls-mat4.cc (read_mat_binary_data): Likewise. * ls-mat5.cc (read_mat5_binary_element): Likewise. * oct-stream.cc (expand_char_class, octave_base_stream::do_gets): Use static_cast instead of C-style cast. * oct-procbuf.cc (kluge_procbuf_delay): Likewise. * parse.y (gobble_leading_white_space,: Likewise. * DLD-FUNCTIONS/besselj.cc (int_array2_to_matrix, int_arrayN_to_array): Likewise. * DLD-FUNCTIONS/colamd.cc (Fcolamd, Fsymamd): Likewise. * DLD-FUNCTIONS/ccolamd.cc (Fcsymamd): Likewise. * pt-pr-code.cc (tree_print_code::print_comment_elt): Likewise. * DLD-FUNCTIONS/besselj.cc (do_bessel): Likewise. * DLD-FUNCTIONS/spchol.cc (Fsymfact): Likewise. * DLD-FUNCTIONS/sparse.cc (sparse_find): Likewise. * DLD-FUNCTIONS/sort.cc (FloatFlip): Likewise. * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Likewise. * ls-mat5.cc (read_mat5_binary_element, OCTAVE_MAT5_INTEGER_READ, read_mat5_binary_element, save_mat5_binary_element): Likewise. * DLD-FUNCTIONS/splu.cc (Fspinv): Use dynamic_cast instead of C-style cast. * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Likewise. * DLD-FUNCTIONS/sort.cc (mx_sort): Use reinterpret_cast instead of C-style cast. * ls-mat5.cc (write_mat5_tag): Likewise. * ov-typeinfo.h (octave_value_typeinfo::octave_value_typeinfo): Eliminate unnecessary casts in constructor initializers. * ops.h (CAST_CONV_ARG, CAST_UNOP_ARG, CAST_BINOP_ARGS, DEFASSIGNANYOP_FN): Use C++ dynamic_cast instead of DYNAMIC_CAST macro. * unwind-prot.h (unwind_protect_ptr): Use combination of reinterpret_cast and const_cast instead of X_CAST. * dynamic-ld.cc (loader::do_load): Use reinterpret_cast instead of X_CAST. * ov-base-int.cc (octave_base_int_matrix::save_binary, octave_base_int_matrix::load_binary, octave_base_int_scalar::save_binary, octave_base_int_scalar::load_binary): Likewise. * ov-bool-mat.cc (octave_bool_matrix::save_binary, octave_bool_matrix::load_binary): Likewise. * ov-bool-sparse.cc (octave_sparse_bool_matrix::save_binary, octave_sparse_bool_matrix::load_binary): Likewise. * ov-bool.cc (octave_bool::save_binary, octave_bool::load_binary): Likewise. * ov-cell.cc (octave_cell::save_binary, octave_cell::load_binary): Likewise. * ov-complex.cc (octave_complex::save_binary, octave_complex::load_binary): Likewise. * ov-cx-mat.cc (octave_matrix::save_binary, octave_matrix::load_binary): Likewise. * ov-cx-sparse.cc (octave_sparse_complex_matrix::save_binary, octave_sparse_complex_matrix::load_binary): Likewise. * ov-fcn-handle.cc (octave_fcn_handle::save_binary, octave_fcn_handle::load_binary): Likewise. * ov-fcn-inline.cc (octave_fcn_inline::save_binary, octave_fcn_inline::load_binary): Likewise. * ov-list.cc (octave_list::save_binary, octave_list::load_binary): Likewise. * ov-range.cc (octave_range::save_binary, octave_range::load_binary): Likewise. * ov-re-mat.cc (octave_matrix::save_binary, octave_matrix::load_binary): Likewise. * ov-re-sparse.cc (octave_sparse_matrix::save_binary, octave_sparse_matrix::load_binary): Likewise. * ov-scalar.cc (octave_scalar::save_binary, octave_scalar::load_binary): Likewise. * ov-str-mat.cc (octave_char_matrix_str::save_binary, (octave_char_matrix_str::load_binary): Likewise. * ov-struct.cc (octave_struct::save_binary, octave_struct::load_binary): Likewise. * ls-oct-binary.cc (save_binary_data, read_binary_data): Likewise. * ls-mat4.cc (read_mat_file_header, save_mat_binary_data): Likewise. * ls-mat5.cc (read_mat5_tag, read_mat5_binary_element, read_mat5_binary_element, read_mat5_binary_file_header, MAT5_DO_WRITE, write_mat5_array, write_mat5_integer_data, save_mat5_binary_element, READ_INTEGER_DATA): Likewise. 2006-04-12 John W. Eaton * ov.h (OV_REP_TYPE): New macro. * DLD-FUNCTIONS/sparse.cc (MINMAX_BODY): No need to cast arg1 to const octave_sparse_matrix&. * ov-base.cc (print_answer_id_name, warn_resize_on_range_error, warn_num_to_str, silent_functions): Move here, from ov.cc. (Vwarn_resize_on_range_error, Vsilent_functions): Likewise. (Vprint_answer_id_name): Likewise. Now static. (symbols_of_ov_base): New function. Move DEFVARs for print_answer_id_name, warn_resize_on_range_error, warn_num_to_str, and silent_functions here from symbols_of_ov in ov.cc. * ov.h (Vprint_answer_id_name): Delete decl. * ov-base.h (Vwarn_resize_on_range_error, Vwarn_num_to_str): Move decls here from ov.h. * ov-str-mat.cc (warn_str_to_num): Move here, from ov.cc. (Vwarn_str_to_num): Likewise. Now static. (symbols_of_ov_str_mat): New function. Move DEFVAR for warn_str_to_num here from symbols_of_ov in ov.cc. * ov.h (Vwarn_str_to_num): Delete decl. * ov-struct.cc (octave_struct::load_ascii): Pass loop counter, not count, to read_ascii. * ov-list.cc (octave_list::load_ascii): Likewise. * ov-list.cc (octave_list::do_index_op): Allow index to extract multiple items. Result is always a list. * pr-output.cc (struct_levels_to_print): Move here from ov.cc. (Vstruct-levels_to_print): Likewise. (symbols_of_pr_output): Move DEFVAR for struct_levels_to_print here from symbols_of_ov in ov.cc. * pr-output.h (Vstruct_levels_to_print): Nove decl here from ov.h. * gripes.cc (warn_divide_by_zero): Move here from ov.cc. (Vwarn_divide_by_zero): Likewise. Now static. (symbols_of_gripes): New function. Move DEFVAR for warn_divide_by_zero here from symbols_of_ov in ov.cc. * ov.h (Vwarn_divide_by_zero): Delete decl. * load-save.cc (do_load): Declare count octave_idx_type, not int. * ls-oct-ascii.cc, ls-oct-ascii.h (read_ascii_data): Likewise. Rearrange octave_value class hierarchy so that rep is a pointer an octave_base_value object and the octave_base_value class stores the reference count. Virtualness now goes with the octave_base_value class, not the octave_value class. * ops.h, ov-base-int.cc, ov-base-int.h, ov-base-mat.h, ov-base-scalar.h, ov-base-sparse.h, ov-base.cc, ov-base.h, ov-bool-mat.cc, ov-bool-mat.h, ov-bool-sparse.cc, ov-bool-sparse.h, ov-bool.cc, ov-bool.h, ov-cell.cc, ov-cell.h, ov-ch-mat.h, ov-colon.h, ov-complex.cc, ov-complex.h, ov-cs-list.h, ov-cx-mat.cc, ov-cx-mat.h, ov-cx-sparse.cc, ov-cx-sparse.h, ov-fcn-handle.h, ov-fcn-inline.h, ov-fcn.cc, ov-fcn.h, ov-intx.h, ov-list.cc, ov-list.h, ov-range.cc, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h, ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov-streamoff.h, ov-struct.cc, ov-struct.h, ov-type-conv.h, ov-typeinfo.cc, ov-typeinfo.h, ov-va-args.h, ov.cc, ov.h, variables.cc, DLD-FUNCTIONS/matrix_type.cc, DLD-FUNCTIONS/splu.cc, OPERATORS/op-chm.cc: Cope with octave_value hierarchy changes (apologies for the lack of detail). * ov.cc (octave_value::nil_rep): Delete. * ov.h (octave_value::nil_rep): Delete decl. * ov-base.h (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA, DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA, DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2, DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Move macro definitions here from ov.h. (struct_indent, increment_struct_indent, decrement_struct_indent, list_indent, increment_list_indent, decrement_list_indent): Delete decls. * ov-base.cc. ov-base.h (do_index_op, ndims, all, any, convert_to_str, print_with_name, numeric_assign, reset_indent_level, increment_indent_level, decrement_indent_level, current_print_indent_level, newline, indent, reset): Move member functions here from octave_value class. (count, curr_print_indent_level, beginning_of_line): Move data members here from octave_value class. (gripe_indexed_assignment, gripe_assign_conversion_failed, gripe_no_conversion): Move here from ov.cc. * ov.h (class octave_xvalue): Delete. (octave_value::octave_value (const octave_xvalue&)): Delete. (anonymous union): Delete. (octave_value::rep): Now a pointer to octave_base_value instead of octave_value. (octave_value::internal_rep): Return pointer to octave_base_value, not octave_value. 2006-04-11 John W. Eaton * pt-assign.cc (tree_simple_assignment::rvalue, tree_multi_assignment::rvalue): Error if RHS is a comma-separated list. 2006-04-07 John W. Eaton * defaults.cc (FOCTAVE_VERSION): New function to replace corresponding DEFCONSTX macro in symbols_of_defaults. * file-io.cc (FP_tmpdir, FSEEK_SET, FSEEK_CUR, FSEEK_END, Fstdin, Fstdout, Fstderr): New functions to replace DEFCONSTX macros in symbols_of_file_io. (const_value): New static function. (symbols_of_file_io): Delete. * syscalls.cc (FF_DUPFD, FF_GETFD, FF_GETFL, FF_SETFD, FF_SETFL, FO_APPEND, FO_ASYNC, FO_CREAT, FO_EXCL, FO_NONBLOCK, FO_RDONLY, FO_RDWR, FO_SYNC, FO_TRUNC, FO_WRONLY, FWNOHANG, FWUNTRACED, FWCONTINUE): New functions to replace DEFCONSTX macros in symbols_of_syscalls. (const_value): New static function. (symbols_of_syscalls): Delete. * pr-output.cc (pr_max_internal, pr_min_internal): Return 0 if all values are Inf or NaN. Always leave space for sign when printing Inf or NaN values. * parse.y (Fmfilename): Don't let filenames like ../foo fake us out. * data.cc (fill_matrix): Create separate versions for int, bool, and double, and Complex values. (FInf, FNaN, Fe, Feps, Fpi, Frealmax, Frealmin, FI, FNA, Ffalse, Ftrue): New functions to replace DEFCONST and DEFCONSTX macros in symbols_of_data. Provide i, J, and j aliases for I. Provide nan alias for NaN. Provide inf alias for Inf. (symbols_of_data): Delete. 2006-04-06 John W. Eaton * parse.y (parse_and_execute, parse_fcn_file): Create octave_script_function object and push it on the call stack. * parse.y (Fmfilename): Check for script or user function file on call stack. * ov-builtin.cc (octave_builtin::do_multi_index_op): Use octave_call_stack instead of curr_function to save pointer to current function. * ov-mapper.cc (octave_mapper::do_multi_index_op): Likewise. * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Likewise. * pt-bp.h (MAYBE_DO_BREAKPOINT): Use octave_call_stack instead of curr_function to get pointer to current function. * pt-arg-list.cc (list::convert_to_const_vector): Likewise. * variables.cc (Fmlock, Fmunlock, Fmislocked): Likewise. * input.cc (get_user_input): Likewise. * error.cc (warning_1, error_2): Likewise. Only enter debug mode if there is a scripting language caller. * ov-usr-fcn.cc (Fva_arg, Fva_start, Fvr_val): Likewise. Check scripting language caller, not current function. * toplev.cc (curr_caller_function, curr_function): Delete. * toplev.h: Delete decls. * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Don't protect and set curr_caller_function. * ov-builtin.cc (octave_builtin::do_multi_index_op): Likewise. * ov-mapper.cc (octave_mapper::do_multi_index_op): Likewise. * variables.cc (do_who): Use octave_call_stack instead of curr_caller_function to get pointer to calling function. * input.cc (get_user_input): Likewise. * error.cc (pr_where): Likewise. No need for curr_function now. * parse.y (Fmfilename): Likewise. Check for scripting language caller, not any calling function. * ov-usr-fcn.h (octave_user_script): New class. * ov-fcn.h (octave_function::is_user_script): New virtual function. * toplev.h, toplev.cc (octave_call_stack): New class. * debug.cc (Fdbwhere): Use get_user_function here. 2006-04-05 John W. Eaton * Makefile.in (mk-pkg-add): Use mfilename to simplify. (PKG_ADD): Don't pass --prefix arg to mk-pkg-add. (PKG_ADD.inst): Delete target. (clean): Don't remove PKG_ADD.inst. (install-oct): Don't depend on PKG_ADD.inst. Install PKG_ADD, not PKG_ADD.inst. * parse.y (Fmfilename): New function. 2006-04-04 David Bateman * help.cc (Flookfor): Skip overloaded functions. Lookup help text of autoloaded function, not parent that contains the autoload. 2006-04-03 David Bateman * data.cc (Fresize): New function. * oct-map.cc, ov-base-mat.cc, ov-base-sparse.cc, ov-base.cc, ov-bool.cc, ov-complex.cc, ov-range.cc, ov-scalar.cc, ov-str-mat.cc (resize): Add boolean fill argument. * oct-map.h, ov-base-mat.h, ov-base-sparse.h, ov-base.h, ov-bool.h, ov-complex.h, ov-intx.h, ov-range.h, ov-scalar.h, ov-str-mat.h, ov.h (resize): Ditto. * DLD-FUNCTIONS/rand.cc (do_rand): Additional argument for gamma and poisson distributions. Change "state" and "seed" arguments so that they choose between generators. Add, poisson, gamma and exponential generators. (Frand, Frandn): Update docs for new generators, add tests. (Frande, Frandp, Frandg): New generators, with test code. * DLD-FUNCTIONS/daspk.cc (Fdaspk): Allow functions to be passed using function handles, inline functions, and cell arrays of strings, inline and function handles. * DLD-FUNCTIONS/dasrtk.cc (Fdasrt): Likewise. * DLD-FUNCTIONS/dassl.cc (Fdassl): Likewise. * DLD-FUNCTIONS/fsolve.cc (Ffsolve): Likewise. * DLD-FUNCTIONS/lsode.cc (Flsode): Likewise. * ls-hdf5.h (hdf5_fstreambase::open): Remove unused arg prot. 2006-03-30 Bill Denney * data.cc: Include numel in @seealso. 2006-03-30 David Bateman * DLD-FUNCTIONS/fftw_wisdom.cc: Don't attempt to save wisdom to an empty filename or invalid filename. 2006-03-28 John W. Eaton * DLD-FUNCTIONS/matrix_type.cc: Update copyright notice and FSF address. 2006-03-24 John W. Eaton * DLD-FUNCTIONS/spchol.cc (Fsymbfact): Use CHOLMOD_NAME to select proper version of row_subtree function. * ov-cell.cc (octave_cell::save_hdf5): Use OSSTREAM instead of fixed character buffer and sprintf. * ov-list.cc (octave_list::save_hdf5, octave_list::save_ascii, octave_list::save_binary): Likewise. * ov-cell.h (octave_cell::convert_to_str_internal): Undo previous change for pad arg. * ov-cell.cc (octave_cell::all_strings): Reinstate pad arg, pass it on to all_strings. * ov.h (octave_value::all_strings): Reinstate pad arg. * ov-base.cc (octave_base_value::all_strings): Likewise. * ov-str-mat.cc (octave_char_matrix_str::all_strings): Likewise. * ov.h, ov-base.h, ov-cell.h, ov-str-mat.h: Fix all_strings decls. 2005-10-25 David Bateman * data.cc (do_cat): With 1 arg, return [](0x0) for compatibility. 2006-03-23 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.5+. 2006-03-22 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.5. (OCTAVE_API_VERSION): Now api-v18. (OCTAVE_RELEASE_DATE): Now 2006-03-22. 2006-03-21 John W. Eaton * ov-cell.h (octave_cell::convert_to_str_internal): Ignore pad and force args. * ov-cell.cc (octave_cell::all_strings): Delete args. Never pad. * ov-base.cc (octave_base_value::all_strings): Delete args. Always force string conversion, never pad. * ov-str-mat.cc (octave_char_matrix_str::all_strings): Delete args. Don't strip whitespace. * ov.h, ov-base.h, ov-cell.h, ov-str-mat.h: Fix all_strings decls. * strfns.cc (Fchar): No args for all_strings. 2006-03-21 David bateman * DLD-FUNCTIONS/getrusage.cc (Fgetrusage): Use GetProcessTimes for MinGW to obtain user and system times. 2006-03-17 John W. Eaton * strfns.cc (F__list_in_columns__): New function. 2006-03-16 Bill Denney * DLD-FUNCTIONS/time.cc: Improve @seealso entries in doc strings. 2006-03-16 John W. Eaton * __gnuplot_raw__.l (F__gnuplot_show__): Temporarily use DEFCMD instead of DEFUN. (symbols_of___gnuplot_raw__): Temporarily mark __gnuplot_plot__, __gnuplot_set__, __gnuplot_splot__, and __gnuplot_replot__ as raw commands. * variables.cc (is_marked_as_rawcommand, unmark_rawcommand, mark_as_rawcommand): Temporarily not static. * variables.h: Temporarily Provide decls. 2006-03-16 David Bateman * sparse-xdiv.cc (result_ok): delete. (xdiv, xleftdiv): Simplify to use version of SpareMatrix::solve and SparseComplexMatrix::solve which internally treats rectangular and singular matrices. * DLD-FUNCTIONS/luinc.cc: Remove error test for singular matrix as QR solver now implemented. * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Paranoid check on error_state. Disable tests for the detection of underdetermined lower and over-determined upper matrix due to problems with non minimum norm solutions. * DLD-FUNCTIONS/spqr.cc: Warning for issue of use of Fspqr for under-determined problems. 2006-03-16 John W. Eaton * __gnuplot_raw__.l: Move here from DLD-FUNCTIONS/__gnuplot_raw__.l. Use DEFUN, not DEFUN_DLD. Include defun.h, not defun-dld.h. (gnuplot::do_init):Move guts to symbols_of___gnuplot_raw__. (symbols_of___gnuplot_raw__): New function. * Makefile.in (DLD_XSRC): Delete __gnuplot_raw__.l from the list. (DIST_SRC): Include __gnuplot_raw__.l in the list. (__gnuplot_raw__.cc): Depend on __gnuplot_raw__.l, not DLD-FUNCTIONS/__gnuplot_raw__.l * ls-oct-ascii.h (extract_keyword): Use std::string compare method instead of strncmp. * ls-oct-ascii.cc (extract_keyword): Likewise. 2006-03-15 William Poetra Yoga Hadisoeseno * src/data.cc (Frows, Fcolumns): New functions. * DLD-FUNCTIONS/time.cc (Fstrptime, Fstrftime): Fix docstring. * strfns.cc (Fstrcmp): Fixed docstring. 2006-03-15 John W. Eaton * pager.cc (Fterminal_size): New function. * help.cc (help_from_info): Simplify. (try_info): Use feval to call doc instead of executing info program. (additional_help_message): Point users to doc instead of help -i. From Søren Hauberg . * toplev.cc (Fsystem): Return output if nargout > 1, not 0. 2006-03-14 Keith Goodman * help.cc (Fhelp, Fwhich, Flookfor): Doc string fix. 2006-03-14 John W. Eaton * defun.cc (print_usage): New arg, extra_msg. * xpow.cc: Omit tests for now. * parse.y (QUOTE, TRANSPOSE): For compatibility, now have same precedence as POW and EPOW. 2006-03-14 Bill Denney * load-save.cc (Fload, Fsave): Update docstring for functional form. 2006-03-14 John W. Eaton * xpow.cc (elem_xpow): Undo previous change. 2006-03-14 Paul Kienzle * xpow.cc: New tests. 2006-03-13 John W. Eaton * variables.cc (fcn_out_of_date): No longer static. * ov-fcn-handle.cc (warn_reload): New function. (octave_fcn_handle::subsref): Implement basic logic for updating when pointed-to function changes. 2006-03-10 John W. Eaton * xpow.cc (elem_xpow): Only use complex pow if really necessary. * symtab.cc (symbol_table::glob, symbol_table::symbol_list, symbol_table::subsymbol_list): Force result to be a column vector. * oct-stream.h (octave_stream::stream_ok): Undo previous change. Eliminate who parameter. Change all callers. * variables.cc (do_who): Return more info in structure array for verbose output. * symtab.h (symbol_record::size, symbol_record::class_name, symbol_record::is_sparse_type, symbol_record::is_complex_type, symbol_record::size, symbol_record::symbol_def::class_name, symbol_record::symbol_def::is_sparse_type, symbol_record::symbol_def::is_complex_type): New functions. * ov.h (octave_value::size): New function. 2006-03-09 John W. Eaton * toplev.cc (run_command_and_return_output): Swap output and status for compatibility. * Makefile.in (defaults.h, oct-conf.h): Force updates. * defaults.h.in (OCTAVE_RELEASE): New macro. * octave.cc (F__version_info__): New arg, release. (initialize_version_info): Pass release arg to F__version_info__. * toplev.cc: Include api_version in the list. * Makefile.in (DIST_SRC): Include octave.cc here. (DISTFILES, DEP_5): Not here. * octave.cc (F__version_info__): New function. (initialize_version_info): New function. (octave_main): Call initialize_version_info just before reading init files. * version.h (OCTAVE_RELEASE_DATE): New macro. * ov-fcn-handle.h (octave_fcn_handle::dims): New function. 2006-03-08 John W. Eaton * oct-stream.cc (octave_stream::stream_ok): Move definition here, from oct-stream.h. New arg, warn. If warn is true and stream is invalid, print warning. (octave_stream::error): Always avoid warning message from stream_ok. Return "invalid stream object" if stream is not ok. 2006-03-08 David Bateman * ov-mapper.cc (SPARSE_MAPPER_LOOP_2): Change nnz to nz to remove shadowed variable warning. * DLD-FUNCTIONS/spqr.cc: Update for new upstream CXSPARSE release. 2006-03-06 John W. Eaton * help.cc (display_help_text): Force linebreak with @sp. 2006-03-06 Keith Goodman * bitfcns.cc, data.cc, debug.cc, file-io.cc, help.cc, load-save.cc, mappers.cc, ov-cell.cc, ov-fcn-inline.cc, ov-struct.cc, ov-usr-fcn.cc, ov.cc, pr-output.cc, utils.cc, variables.cc, DLD-FUNCTIONS/ccolamd.cc, DLD-FUNCTIONS/cellfun.cc, DLD-FUNCTIONS/colamd.cc, DLD-FUNCTIONS/daspk.cc, DLD-FUNCTIONS/dasrt.cc, DLD-FUNCTIONS/dassl.cc, DLD-FUNCTIONS/fft.cc, DLD-FUNCTIONS/fft2.cc, DLD-FUNCTIONS/fftn.cc, DLD-FUNCTIONS/fftw_wisdom.cc, DLD-FUNCTIONS/gammainc.cc, DLD-FUNCTIONS/gcd.cc, DLD-FUNCTIONS/luinc.cc, DLD-FUNCTIONS/sparse.cc, DLD-FUNCTIONS/spchol.cc, DLD-FUNCTIONS/splu.cc, DLD-FUNCTIONS/spqr.cc, DLD-FUNCTIONS/sqrtm.cc: Move @seealso inside @defXXX macro. Remove "and" from @seealso. 2006-03-04 John W. Eaton * help.cc (additional_help_message): Don't print "\n" before message. (help_from_symbol_table): If Vsuppress_verbose_help_message is true, don't print which info. 2006-03-03 John W. Eaton * dirfns.cc (Vconfirm_recursive_rmdir): New static variable. (symbols_of_dirfns): DEFVAR it. (confirm_recursive_rmdir): New function. (Frmdir): Maybe ask for confirmation for recursive removal. Require second arg to be "s". * input.cc (octave_yes_or_no): New function. (Fyes_or_no): New function. * input.h (octave_yes_or_no): Provide decl. 2006-03-02 John W. Eaton * dirfns.cc (Fmkdir, Frmdir): Now commands. 2006-02-20 David Bateman * ov.h (virtual bool is_sparse_type (bool)): New virtual function * ov-base.h (bool is_sparse_type (bool)): New function * ov-base-sparse.h (bool is_sparse_type (bool)): New function * DLD-FUNCTIONS/ccolamd.cc, DLD-FUNCTION/colamd.cc, DLD-FUNCTIONS/__glpk__.cc, DLD-FUNCTIONS/splu.cc, DLD-FUNCTIONS/sparse.cc, DLD-FUNCTIONS/matrix_type.cc, pt-mat.cc: Replace us of 'arg.class_name () == "sparse"' with 'arg.is_sparse_type ()' 2006-02-20 David Bateman * pt-mat.cc (class tm_row_const): Add any_sparse bool variable. (tm_row_const::tm_row_const_rep::do_init_element): Initialize any_sparse variable if any matrice is sparse. (class tm_const): Add any_sparse bool variable. (tm_const::init): Initialize any_sparse variable. (tree_matrix::rvalue): If any matrix is sparse use sparse matrix as initial matrix for concatenation * DLD-FUNCTIONS/matrix_type.cc: Add tests for new rectangular diagonal, permuted diagonal, triangular and permuted triangular matrices 2006-02-20 John W. Eaton * toplev.cc (__builtin_delete, __builtin_new): Use std::cerr for messages instead of std::cout. (main_loop, do_octave_atexit): Use octave_stdout, not std::cout. 2006-02-15 John W. Eaton * parse.y (Fautoload): Return struct array of autoload info if nargin == 0. 2006-02-15 Keith Goodman * help.cc (keywords): Doc string fix. 2006-02-15 John W. Eaton * oct-procbuf.cc (close): Use __CYGWIN__ instead of __CYGWIN32__. 2006-02-13 David Bateman * DLD_FUNCTIONS/regexp.cc (octregexp): Add matlab compatiable named tokens. Update the tests 2006-02-10 John W. Eaton * lex.l (\[{S}*): Maybe set lexer_flags.looking_at_return_list or lexer_flags.looking_at_matrix_or_assign_lhs here. * parse.y (return_list_beg): Don't use in_return_list here. (assign_lhs, matrix): Don't use in_matrix_or_assign_lhs here. (in_matrix_or_assign_lhs, in_return_list): Delete unused macros. (matrix): Clear lexer_flags.looking_at_matrix_or_assign_lhs in all cases. 2006-02-09 John W. Eaton * utils.cc (oct_file_in_path): Check len > 4, not len > 2. From Larrie Carr . 2006-02-09 David Bateman * DLD-FUNCTIONS/spqr.cc: New file for sparse QR and dmperm based on CSparse. * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): dintinguish between rectangular and singular matrices. Add tests. * DLD-FUNCTIONS/luinc.cc: Add tests. * DLD-FUNCTIONS/spkron.cc: Ditto. * Makefile.in (DLD_XSRC): Add spqr.cc. (OCT_LINK_DEPS): Add CSSPARSE_LIBS. * sparse-xdiv.h: Remove conditio of lssolve. 2006-02-08 John W. Eaton * parse.y (frob_function): Clear ID_NAME from top_level symbol table if we are defining a function at the top-level and a function with the same name is already in the top-level symbol table. 2006-01-31 John W. Eaton * ov-base-sparse.h (octave_base_sparse::nzmax): New function. * ov.h (octave_value::nzmax): New function. * ov-base.cc (octave_base_value::nzmax): New function. * ov-base.h: Provide decl. * data.cc (Fnzmax): New function. * DLD-FUNCTIONS/sparse.cc (Fnzmax): Delete. 2006-01-31 Kim Hansen * __glpk__.cc (F__glpk__): Fix for sparse matrices. 2006-01-30 John W. Eaton * gripes.cc (gripe_wrong_type_arg (const char*, const char*, bool)): New function. (gripe_wrong_type_arg (const char*, const std::string&, bool)): Define using const char*, const char*, bool version. (gripe_wrong_type_arg (const char*, const octave_value&, bool)): Define using const char*, const std::string&, bool version. * ov.h (octave_value::nnz): New function. * ov-base.cc (octave_base_value::nnz): New function. * ov-base.h: Provide decl. * ov-base-mat.h (octave_base_matrix::nnz): New function. * ov-base-scalar.h (octave_base_scalar::nnz): New function. * Cell.cc (Cell::nnz): New function. * Cell.h: Provide decl. * data.cc (Fnnz): New function. * DLD-FUNCTIONS/sparse.cc (Fnnz): Delete. 2006-01-13 John W. Eaton * ov-struct.cc (octave_struct::print_raw): Correctly print scalar structs and empty struct arrays. * DLD-FUNCTIONS/__gnuplot_raw__.l (Fclearplot): For compatibility, also turn off hold state for current figure. 2006-01-13 Bill Denney * dirfns.cc: Add @seealso{} to docstrings. 2006-01-13 John W. Eaton * help.cc (display_help_text): Use warning() to print raw Texinfo source. Don't redirect error output for makeinfo process. * DLD-FUNCTIONS/__gnuplot_raw__.l (F__gnuplot_init__): Delete function and PKG_ADD directive. (gnuplot::gnuplot): Call do_init here. (gnuplot::init): Delete static function. (gnuplot::close_all): New static function. (class gnuplot_X): New class. (gnpulot_X::X): New static instance. 2006-01-12 David Bateman * help.cc (make_name_list): Add autoload functions to list of available completions. (simple_help): Add autoloaded functions to functions listed (first_help_sentence): Avoid issue with single line help string that is not terminated in \n. (Flookfor): Check for string match in the keyword/function, etc name. Also look for string match in help of autoloaded functions. Load oct-files to be able to access their help string. * parse.y (string_vector autoloaded_functions (void)): New function to list all autloaded functions. (string_vector reverse_lookup_autoload (const std::string& nm)): Reverse lookup function to match file to autoloaded functions. * parse.h (autoloaded_functions, reverse_lookup_autoload): Declaration. * oct-map.cc (maybe_delete_elements): New function. * oct-map.h (maybe_delete_elements): Declare it. * ov-struct.cc (octave_struct::subsref): Handle indexing empty structure. (octave_struct::subsasgn): If rhs is [], delete elements. (octave_struct::print_raw): Handle printing empty structure. * ls-mat5.cc (read_mat5_binary_element): Allow reading of sparse elements when nnz doesn't equal nzmax. 2006-01-10 David Bateman * DLD-FUNCTIONS/sparse.cc (sparse_find): Use Sparse::nonzero() rather than Sparse::nnz(), due to possibility of overallocation of memory. 2006-01-06 John W. Eaton * oct-map.cc (Octave_map::transpose): Avoid GCC 3.3.x parse error. 2005-12-14 John W. Eaton * oct-stream.cc (octave_stream::invalid_stream_error): Delete. * oct-stream.h (octave_stream::stream_ok): Don't fail with error. 2005-12-14 David Bateman * DLD-FUNCTIONS/regexp.cc: New file. * DLD-FUNCTIONS/dispatch.cc: Update tests for string/sq_string differences. * error.cc (Vquiet_warning): New variable. (vwarning): Use Vquiet_warning to prevent warning output. (Fwarning): Include "quiet" option to Fwarning function. Assign retval when using "query". Typo in error message. (Flastwarn): Clear warning_state when using Flastwarn to probe warning message. * ov-struct.cc: Update Fstruct tests for change in error output. * Makefile.in: Include regexp when needed with appropriate libraries. 2005-12-13 David Bateman * Makefile.in: Change references to gplot.l to __gnuplot_raw__.l. * DLD-FUNCTIONS/__gnuplot_raw__.l: Rename from DLD-FUNCTIONS/gplot.l. Remove all references to deprecated gplot, gsplot, graw, gset and gshow functions. * help.cc (static help_list keywords[]): Remove gsplot and gplot. * ls-oct-ascii.cc (save_three_d): Don't strip Inf or NaN. (save_ascii_data_for_plotting): Ditto. 2005-12-13 John W. Eaton * oct-stream.cc (octave_stream_list::do_insert): Check open state of stream in list instead of whether stream state is OK. 2005-12-12 David Bateman * OPERATORS/op-struct.cc (transpose): New function. (install_struct_ops): Install it. * oct-map.cc (Octave_map::transpose): New function. * oct-map.h: Provide decl. 2005-12-08 John W. Eaton * Cell.cc (Cell::column): New function. * pt-loop.cc (DO_ND_LOOP): Simplify. (simple_for_loop_command::eval): Correctly handle N-d numeric and cell arrays when only the first dimension is 0. 2005-12-07 John W. Eaton * lex.l (NL): Also accept '\r'. * error.cc (Vbacktrace_on_warning, warning_options, Vlast_warning_id, Vlast_error_id): New file-scope variables. (Vwarning_frequency, Vwarning_option): Delete unused variables. (set_warning_option): Delete unused function. (Fwarning): Update for compatibility. Use DEFCMD, not DEFUN. (warning_enabled, check_state): New functions. (warning (const char *fmt, ...)): Use it. (init_warning_options): New function. (symbols_of_error): Call it. (vwarning, Flastwarn): Handle Vlast_warning_id. Improve compatibility. (handle_message): New arg, ID. Change all callers. (vwarning, verror, error_1): New arg, ID. Change all callers. (verror, Flasterr): Handle Vlast_error_id. Improve compatibility. * error.cc (message_with_id, usage_with_id, warning_with_id, error_with_id, parse_error_with_id): New functions. (error_2, warning_1, usage_1): New functions. * error.h (message_with_id, usage_with_id, warning_with_id, error_with_id, parse_error_with_id): Provide decls. 2005-11-30 John W. Eaton * DLD-FUNCTIONS/schur.cc (Fschur): Doc string fix. From Jorge Barros de Abreu . 2005-11-28 John W. Eaton * syscalls.cc (Funame): New function. 2005-11-21 John W. Eaton * pr-output.cc (pr_int): Fix thinko in byte-swapping for bit format. * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Use C++ static_cast instead of C-style casts. 2005-11-21 William Poetra Yoga H * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Docstring and error message fixes. 2005-11-17 John W. Eaton * DLD-FUNCTIONS/minmax.cc (MINMAX_BODY): Don't cast arg1 to const octave_complex_matrix&. 2005-11-16 John W. Eaton * Makefile.in (PKG_ADD.inst): New target. (install-oct): Depend on it. (clean): Remove it. * mk-pkg-add: New option --install. Don't use --prefix option. Delete obsolete comments. * Cell.cc (Cell::index): Indexing with () is a no-op, not an error. * oct-map.cc (Octave_map::index): Likewise. * ov-base-mat.cc (octave_base_matrix::do_index_op): Likewise. * ov-base-sparse.cc (octave_base_sparse::do_index_op): Likewise. * ov-str-mat.cc (octave_char_matrix_str::do_index_op_internal): Likewise. 2005-11-11 John W. Eaton * Makefile.in (install-oct): Fix thinko in previous change. * version.h (OCTAVE_VERSION): Now 2.9.4 (OCTAVE_API_VERSION): Now api-v17. * variables.cc (symbol_out_of_date): Check for autoloads here too. * Makefile.in (PKG_ADD): Depend on $(DLD_DEF_FILES), not $(DLD_SRC). (%.df : %.cc): Also insert PKG_ADD commands in .df files. (install-oct): Generate PKG_ADD file for install directory here. Don't depend on PKG-ADD. No need to make .oct file links. (clean): No need to delete links. (stamp-oct-links): Delete target. (distclean): No need to remove stamp-oct-links. (all): Depend on $(OCT_FILES), not stamp-oct-links. * mk-pkg-add: New file. * Makefile.in (DISTFILES): Add it to the list. * mk-oct-links: Delete. * Makefile.in (DISTFILES): Remove it from the list. 2005-11-10 John W. Eaton * ov-str-mat.h (octave_char_matrix_str::permute, octave_char_matrix_str::resize): New functions. (octave_char_matrix_sq_str::reshape, octave_char_matrix_sq_str::permute, octave_char_matrix_sq_str::resize): New functions. * OPERATORS/op-str-str.cc, OPERATORS/op-str-s.cc, OPERATORS/op-str-m.cc: Use DEFNDCHARCATOP_FN. * data.cc (do_cat): No need to handle character arrays specially here. * ops.h (DEFNDCHARCATOP_FN): New macro. * OPERATORS/op-int.h (OCTAVE_INT_CHAR_CONCAT_FN, OCTAVE_CHAR_INT_CONCAT_FN, OCTAVE_INSTALL_INT_CHAR_CONCAT_FN, OCTAVE_INSTALL_CHAR_INT_CONCAT_FN): New macros. * OPERATORS/op-int-concat.cc: Use them do define char/int op functions. (install_int_concat_ops): Install char/int concat ops. * ov-scalar.h (class octave_scalar): Provide extractors for all int array types and char array type. 2005-11-09 John W. Eaton * ov-bool-mat.h (class octave_bool_matrix): Provide extractors for all int array types and char array type. * ov-bool.h (class octave_bool): Likewise. * ov-intx.h (class OCTAVE_VALUE_INT_MATRIX_T): Provide extractors for all int array types and char array type. (class OCTAVE_VALUE_INT_SCALAR_T): Provide extractors for all int scalar and array types and char array type. * pt-mat.cc (tm_const::class_nm): New data member. (tm_const::tm_const): Initialize it. (tm_const::class_name): New function. (tm_row_const::tm_row_const_rep::class_nm): New data member. (tm_row_const::tm_row_const_rep::tm_row_const_rep): Initialize it. (tm_row_const::class_name): New function. (get_concat_class): New function. (tm_row_const::tm_row_const_rep::do_init_element): Use it. (tm_const::init): Use it. 2005-11-07 John W. Eaton * strfns.cc (Fstrcmp): If args are not strings or cell arrays of strings, return false. 2005-11-01 John W. Eaton * Makefile.in (oct-gperf.h): Avoid extra temporary file. (distclean): Delete oct-errno.cc here. From Quentin Spencer . 2005-11-01 Quentin Spencer * DLD-FUNCTIONS/spchol.cc: Use C++ true/false instead of preprocessor defined TRUE/FALSE. * Makefile.in (DISTFILES): Add mk-errno-list to the list. 2005-10-30 John W. Eaton * DLD-FUNCTIONS/gplot.l (gnuplot::set_gnuplot_exe, gnuplot::do_set_gnuplot_exe): New functions. (gnuplot_binary): Call gnuplot::set_gnuplot_exe here. * DLD-FUNCTIONS/gplot.l (gnuplot::set_gnuplot_use_title_option, gnuplot::do_set_gnuplot_use_title_option): New functions. (gnuplot_use_title_option): Call gnuplot::set_gnuplot_use_title_option here. 2005-10-27 James R. Van Zandt * mappers.cc: Doc fix for lgamma. * DLD-FUNCTIONS/gammainc.cc (Fgammainc): Doc fix. 2005-10-27 John W. Eaton * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Declare mrowsA volatile. * pt-mat.cc (tm_row_const::tm_row_const_rep::tm_row_const_rep): Ensure that we always have at least two dimensions here. (tm_const::tm_const): Likewise. (tm_const::rows, tm_const::columns): Simplify. (tm_row_const::rows, tm_row_const::columns)): Simplify. 2005-10-26 John W. Eaton * oct-procbuf.cc (octave_procbuf::open): Cast 0 to void * to avoid new g++ warning. * toplev.cc (Fsystem): Likewise. Changes for GCC 4.1, tip from Arno J. Klaassen : * ov.h (do_unary_op (octave_value::unary_op, const octave_value&)): Publish externally used friend function. (do_unary_op (octave_value::unary_op, const octave_value&, const octave_value&)): Likewise. 2005-10-25 David Bateman * data.cc (do_cat): called with 2 args, should return args(1) for compatibility. 2005-10-23 David Bateman * Makefile.in (DLD_XSRC): Add spchol.cc. * sparse-xpow.cc (xpow): Change call to sparse inverse to include SparseType. * DLD-FUNCTIONS/colamd.c (Fsymbfact): Remove. * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): 64-bit fixes and fix for permutation of upper/lower triangular matrices. * DLD-FUNCTIONS/splu.cc (Fspinv): Implemtation of sparse inverse function. * DLD-FUNCTIONS/spchol.cc (sparse_chol): Static function for core of the sparse cholesky factorization. (Fspchol): New function for sparse cholesky factorization R'R. (Fsplchol): New function for sparse cholesky factorization LL'. (Fspcholinv): New cholesky inverse function. (Fspchol2inv): New cholesky inverse function. (Fsymbfact): Implementation of symbolic factorization using cholmod. 2005-10-21 John W. Eaton * DLD-FUNCTIONS/gplot.l (read_until): Special case STRING. (handle_string): Restore function. ("'", "\""): Call handle string when matching these tokens.. 2005-10-20 John W. Eaton * pt-mat.cc (tm_row_const::all_real): New data member. (tm_row_const::all_real_p): New function. (tm_row_const::tm_row_const_rep::all_real): New data member. (tm_row_const::tm_row_const_rep::all_real_p): New function. (tm_row_const::tm_row_const_rep::init): Set all_real and all_cmplx to true here. (tm_row_const::all_cmplx): Rename from is_cmplx. (tm_row_const::all_complex_p): Rename from complex_p. (tm_row_const::tm_row_const_rep::all_cmplx): Rename from is_cmplx. (tm_row_const::tm_row_const_rep::all_complex_p): Rename from complex_p. (tm_row_const::tm_row_const_rep::init): Set all_real and all_cmplx to true here. (SINGLE_TYPE_CONCAT): New macro. (tree_matrix::rvalue): Use it for single type cases. * pt-mat.cc: Sprinkle with OCTAVE_QUIT. 2005-10-18 John W. Eaton * octave.cc (octave_main): If not embedded, call clean_up_and_exit instead of return to exit function. 2005-10-18 Arno J. Klaassen * DLD-FUNCTIONS/gplot.l (gnuplot::handle_title): Omit class name from declaration. 2005-10-17 Keith Goodman * DLD-FUNCTIONS/sort.cc: Doc string fix. 2005-10-17 John W. Eaton * oct-conf.h.in (OCTAVE_CONF_F77_FLOAT_STORE_FLAG): Substitute OCTAVE_CONF_F77_FLOAT_STORE_FLAG here. 2005-10-14 John W. Eaton * mk-errno-list: New script. * Makefile.in (oct-errno.cc): Use it. 2005-10-13 John W. Eaton * DLD-FUNCTIONS/gplot.l (F__gnuplot_raw__): Call print_usage with correct function name. 2005-10-12 John W. Eaton * DLD-FUNCTIONS/gplot.l: Major cleanup. Built-in variable gnuplot_has_frames no longer necessary. (gnuplot): New class to manage multiple gnuplot processes. (handle_string): Delete. It was only used for the case of __gnuplot_plot__ "file", which is no longer allowed. 2005-10-05 John W. Eaton * variables.cc (symbol_exist): Chekck for autoloaded functions. * parse.y (Fautoload): New function. (autoloading, autoload_map): New static variables. (load_fcn_from_file, frob_function): Handle autoloading. (lookup_autoload): New function. (get_help_from_file): New args, symbol_found and include_file_info. Change all callers. 2005-10-05 David Bateman * help.cc (try_info): format in command string for mingw. 2005-09-30 John W. Eaton * ov.cc (octave_value::~octave_value): No need to set rep to zero after deleting. 2005-09-29 John W. Eaton * syscalls.cc (mk_stat_map): Store mode too. (FS_ISREG, FS_ISDIR, FS_ISCHR, FS_ISBLK, FS_ISFIFO, FS_ISLNK, FS_ISSOCK): New functions. (Fstat): Fix docstring. 2005-09-28 John W. Eaton * oct-stream.cc (printf_value_cache::double_value): Force character strings to be converted to ASCII equivalents. * data.cc (Fcomplex): New function. * ov-type-conv.h (OCTAVE_TYPE_CONV_BODY3): Return arg unchanged if class name is same as name of conversion. * dirfns.cc (Frmdir, Fmkdir): For compatibility, return true for success and false for failure. Return third value, msgid. (Frmdir): Handle second arg for recursive behavior. 2005-09-23 John W. Eaton * parse.y (load_fcn_from_file): Don't look in path if file is absolute and has .oct or .m extension. * utils.cc (Ferrno_list): New function. * oct-errno.h, oct-errno.cc.in: New files. * Makefile.in: Add them to the appropriate lists. (oct-errno.cc): New rule. ($(OPT_HANDLERS)): Use $(PERL) instead of just perl. * utils.cc: Include oct-errno.h. (Ferrno): Rename from FERRNO. Allow errno to be set. Allow lookups of errno codes by name and access to structure containing all errno names and codes. 2005-09-19 John W. Eaton * pt-bp.cc (tree_breakpoint::visit_index_expression): Avoid dereferencing invalid pointer. 2005-09-19 David Bateman * Makefile.in (OCT_LINK_DEPS): Include UFsparse libraries. * DLD_FUNCTIONS/__glpk__.cc (F__glpk__): Replace isinf with xisinf. Allow sparse matrices as second argument. * syscalls.cc: Typos. * sysdep.cc: Typos. 2005-09-16 John W. Eaton * syscalls.cc (Fwaitpid): Doc fix. Expect WNOHANG, WUNTRACED, WCONTINUED as args instad of int values. Return values are now [pid, status, msg] instad of [pid, msg]. (WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED): New functions. (symbols_of_syscalls): DEFCONST WNOHANG, WUNTRACED, and WCONTINUE. * oct-procbuf.cc (octave_procbuf::close): Call octave_syscalls::waitpid here instead of calling waitpid directly. * sighandlers.cc (OCL_REP::wait): Likewise. * sysdep.h [__MINGW32__]: Don't define waitpid here. 2005-09-15 John W. Eaton * sysdep.h [__MINGW32__]: Move to definition of waitpid sysdep.h. * sysdep.cc, sighandlers.cc: Rename all win32_ symbols to w32. * sysdep.cc (w32_set_quiet_shutdown): New function. * sysdep.h: Provide decl. * sysdep.cc (MINGW_signal_cleanup): Use it. * sighandlers.cc (octave_catch_interrupts): Use it. * sysdep.h: Provide decl. (MINGW_SIGNAL_CLEANUP): New macro. (USE_W32_SIGINT): Move definition here. * sighandlers.cc: From here. * DLD-FUNCTIONS/cellfun.cc (Fnum2cell): Use print_usage, not usage. * DLD-FUNCTIONS/colamd.cc (Fcolamd, Fsymamd, Fetree): Likewise. (Fcolamd, Fsymamd) [! HAVE_COLAMD]: Return empty octave_value_list object. * sysdep.cc (sysdep_cleanup): New function. Move w32 clean up code here. * toplev.cc (clean_up_and_exit): From here. Call sysdep_cleanup here. 2005-09-15 David Bateman * Makefile.in (DLD_XSRC): Add ccolamd.cc (OCTAVE_LIBS): Add LIBGLOB. (OCT_LINK_DEPST, octave): Add AMD, COLAMD, CCOLAMD and CHOLMOD libraries. * default.cc (set_default_exec_path, set_default_path, maybe_add_default_load_path, LOADPATH): Use SEPCHAR_STR and SEPCHAR. * help.cc (display_help_text): Exclude /dev/null on mingw. * oct-procbuf.cc (W32POPEN, W32PCLOSE): Macros for cygwin/mingw. (octave_procbuf::open, octave_probuf::close): Use them. * sighandler.cc (user_abort): New function with core of old sigint_handler. (sigint_handler): Simplify and specialize for w32. (w32_sigint_handler): W32 version of sigint handler. (octave_catch_interrupts): Initialize w32 siginit handler. * sysdep.cc (MINGW_init): New function. (sysdep_init): Use it. * toplev.cc (clean_up_and_exit): Clean w32 signalling shutdown. * DLD-FUNCTIONS/cellfun.cc (Fnum2cell): New function. * DLD-FUNCTIONS/colamd.cc (Fcolamd, Fsymamd): Allow conditional build. Include oct-sparse.h rather than colamd.h. * DLD-FUNCTIONS/ccolamd.cc: New file with Fccolamd a Fcsymamd. 2005-09-14 John W. Eaton * ov-complex.cc (octave_complex::try_narrowing_conversion): Don't drop -0i. * ov-cx-mat.cc (octave_complex_matrix::try_narrowing_conversion): Likewise. 2005-09-14 Daniel * DLD-FUNCTIONS/besselj.cc, DLD-FUNCTIONS/chol.cc, DLD-FUNCTIONS/fft.cc, DLD-FUNCTIONS/fftw_wisdom.cc, utils.cc: Doc string fixes. From Jorge Barros de Abreu . 2005-09-14 David Bateman * help.cc (Flookfor, print_lookfor, first_help_sentence): New functions. 2005-09-07 Bill Denney * dirfns.cc (Fglob): Doc fix. 2005-09-07 John W. Eaton * ov-struct.cc (Fstruct): Allow struct (zeros (0, N)) to create a 0xN struct array. 2005-09-04 David Bateman * DLD-FUNCTIONS/colamd.c (COLAMD_NAME, SYMAMD_NAME): New macros (symetree, make_set, link, finf, etdfs, TreePostorder, coletree, Fcolamd, Fsymamd, Fetree): Update for 64-bit indexing and colamd versin 2.4. 2005-09-01 John W. Eaton * variables.cc (symbol_out_of_date): Don't check nested functions. 2005-08-31 John W. Eaton * oct-map.cc (Octave_map::index): Don't crash if index list is empty. * ov-str-mat.cc (octave_char_matrix_str::do_index_op_internal): Likewise. * oct-map.h (Octave_map::ndims): New function. 2005-08-30 John W. Eaton * ov-range.h (octave_range::permute): New function. * ov-struct.cc (octave_struct::load_ascii, octave_struct::load_binary, octave_struct::load_hdf5): Try harder to read old-style files correctly. 2005-08-25 David Bateman * OPERATORS/op-sm-m.cc, OPERATORS/op-sm-cm.cc, OPERATORS/op-scm-m.cc, OPERATORS/op-scm-cm.cc, OPERATORS/op-m-sm.cc, OPERATORS/op-m-scm.cc, OPERATORS/op-cm-sm.cc, OPERATORS/op-cm-scm.cc: Use mixed matrix/sparse multiply operator rather than casting sparse to matrix. 2005-07-18 John W. Eaton * strfns.cc (Fstrcmp): New function from Søren Hauberg and Tom Holroyd . Adapt to Octave conventions. 2005-07-11 David Bateman * ov-fc-inline.cc (Fvectorize): Allow string arguments 2005-07-08 John W. Eaton * DLD-FUNCTIONS/gplot.l (Fhold, Fishold): Delete. (clear_before_plotting): Delete static variable. Delete PKG_ADD line for hold. 2005-07-07 John W. Eaton * pr-output.cc (pr_plus_format): Delete "static" from template decl. * oct-stream.cc (octave_scan): Delete explicit instantiation of octave_scan since a specialization is provided. * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Include , for std::transform decl. Use std qualifier for transform and tolower. 2005-07-05 Antoine Moreau * DLD-FUNCTIONS/betainc.cc (Fbetainc): Fix doc string to match function definition.. 2005-07-05 Mats Jansson * file-io.cc (Fmkstemp): Check if second argument is true before marking file for deletion. 2005-07-05 John W. Eaton * ov-str-mat.cc (octave_char_matrix_str::do_index_op_internal): Rename from char_matrix_str::do_index_op. New arg, type. ov-str-mat.h (octave_char_matrix_str::do_index_op): Define using do_index_op_internal. (octave_char_matrix_sq_str::do_index_op): New function. 2005-07-01 John W. Eaton * parse.y (end_error): Also handle end_try_catch case. 2005-06-17 John W. Eaton * help.cc (help_from_list, help_from_symbol_table, help_from_file): New arg, symbol_found. (builtin_help): Use symbol_found arg to determine whether help text is empty or symbol is not available. * symtab.cc (symbol_record::print_info): Print more info. * DLD-FUNCTIONS/dispatch.cc (Fdispatch_help): Delete. (dispatch_record): Don't prepend "<>" to help text. (Fdispatch): Don't setup dispatched help. * help.cc (extract_help_from_dispatch): New function. (help_from_symbol_table): Use it. * defun.cc (print_usage): Use it. * toplev.cc (octave_config_info): Include localapifcnfiledir and localapioctfiledir in the list. * symtab.h (symbol_record::alias): New arg, mark_to_clear. (symbol_record::aliases_to_clear): New data member. (symbol_record::push_alias_to_clear): New function. * symtab.cc (symbol_record::alias): If mark_to_clear is true, push this pointer on aliases_to_clear stack for s. (symbol_record::clear): Also clear aliases_to_clear_stack. * defun.cc (install_dld_function): Create full file name alias in fbi_sym_tab and hide it from view. Don't call protect or make_eternal on sym_rec. * variables.cc (fcn_out_of_date): New function. (symbol_out_of_date): Also check for symbol using full function file name. * symtab.h (symbol_record::visible): New data member. (symbol_record::hide, symbol_record::show, symbol_record::is_visible): New functions. * symtab.h (symbol_record::maybe_delete_def): New private function. * symtab.cc (symbol_record::clear, symbol_record::alias, symbol_record::pop_context, symbol_record::define (octave_function *, unsigned int)): Use it. (symbol_table::symbol_list): Only include visible symbols in list. * parse.y (frob_function): Hide nested function names. * parse.y (frob_function): Create full file name alias in fbi_sym_tab and hide it from view. * defun.cc (install_dld_function): Likewise. 2005-06-16 John W. Eaton * ov-dld-fcn.cc (octave_dld_function): Check Voct_file_dir to see if function is system file, Vfcn_file_dir. * defaults.cc (set_default_oct_file_dir): New function. (install_defaults): Call it. (Voct_file_dir): New global variable. * defaults.h.in (Voct_file_dir): Provide decl. * variables.cc (function_out_of_date_internal): Use Vignore_function_time_stamp only to avoid calling stat. (symbol_out_of_date): Don't check Vignore_function_time_stamp here. (function_out_of_date): Rename from function_out_of_date_internal. * defaults.cc (loadpath): Don't do anything if value is unchanged. If loadpath changes, also update Vlast_prompt_time. 2005-06-14 John W. Eaton * pt-mat.cc (Vwarn_string_concat): Default value now false. (symbols_of_pt_mat): Change initial value here as well. * ls-mat5.cc, mappers.cc, oct-stream.cc, pr-output.cc: Change all uses of octave_is_NaN_or_NA to xisnan. 2005-06-14 Keith Goodman * input.cc (get_user_input): Renamed debug commands to dbnext, dbstep, and dbcont. * pt.cc: Renamed dbg_next to dbnext in comment string. * pt.h: Renamed dbg_next to dbnext in comment string. 2005-06-14 David Bateman * pt-arg-list.cc (F__end__): Return 1 for dimensions larger than ndim. 2005-06-14 John W. Eaton * ls-mat5.cc (save_mat5_array_length): Special case for NaN, NA, and Inf values. Only check if abs value is greater than FLT_MAX. 2005-06-09 David Bateman * ls-mat5.cc (save_mat5_element_length): 1 element strings will be saved in a compressed format, so calculate the length accordingly. 2005-05-30 David Bateman * ls-mat5.cc (read_mat5_binary_element): Don't convert to string if matrix is not of type mxCHAR_CLASS. 2005-05-23 John W. Eaton * file-io.cc (Ffopen): Don't fail with internal error message if we fail to create a valid stream object. (do_stream_open (const std::string&, const std::string&, const std::string&, int&): Always create octave_stream object, even if file pointer returne from fopen is 0. * load-save.cc (gripe_file_open): New function. (get_file_format, Fload, Fsave): Use it. * DLD-FUNCTIONS/sort.cc (mx_sort, mx_sort_indexed): Return appropriately sized empty values for empty args. * debug.cc (Fdbwhere, get_user_function): Look at curr_caller_function, not curr_function, since function is now set inside mapper, built-in (and therefore dld) functions too. 2005-05-21 John W. Eaton * pr-output.cc, pr-output.h (Vprint_empty_dimensions): Now extern. * ov-cell.cc (octave_cell::print_raw): Conditionally print dimensions of empty 2-d cell arrays. * DLD-FUNCTIONS/sort.cc (mx_sort, mx_sort_indexed): Return empty values for empty args. * lex.l (handle_string): If single-quote string, \ and . have no special meaning. 2005-05-18 John W. Eaton * pt-colon.cc (tree_colon_expression::make_range): Don't require scalars values as range components. * version.h (OCTAVE_VERSION): Now 2.9.3 (OCTAVE_API_VERSION): Now api-v16. * ov-base-sparse.cc (octave_base_sparse::print_raw): Make spacing of output consistent with other parts of Octave. * DLD-FUNCTIONS/rand.cc (do_rand): Chop trailing singelton dimensions before generating array. 2005-05-17 John W. Eaton * ov.cc (install_types): Don't call octave_stream::register_type. * ov.h, ov.cc (octave_value::octave_value (const octave_stream&, int): Delete constructor. (octave_value::is_stream, octave_value::stream_value, octave_value::stream_number): Delete functions. * ov-base.h (octave_base_value::is_stream): Delete function. * ov-base.h, ov-base.cc (octave_base_value::stream_value, octave_base_value::stream_number): Delete functions. * file-io.cc (Fisstream): Delete function. * op-file.h, op-file.cc, OPERATORS/op-fil-sbm.cc, OPERATORS/op-fil-scm.cc, OPERATORS/op-fil-sm.cc, * OPERATORS/op-fil-b.cc, OPERATORS/op-fil-bm.cc, OPERATORS/op-fil-cm.cc, OPERATORS/op-fil-cs.cc, OPERATORS/op-fil-m.cc, OPERATORS/op-fil-s.cc, OPERATORS/op-fil-lis.cc, OPERATORS/op-fil-rec.cc, OPERATORS/op-fil-str.cc: Delete files. * Makefile.in (OP_XSRC, SPARSE_OP_XSRC): Delete op-fil-*.cc from the lists. (OV_INCLUDES): Delete op-file.h from the list. (OV_SRC): Delete op-file.cc from the list. * oct-stream.cc, oct-stream.h (octave_stream_list::insert, octave_stream_list::do_insert): Return stream number instead of octave_value. 2005-05-16 David Bateman * ls-mat.cc (save_mat5_binary_element): Increase size of compression buffer. (load_mat5_binary_element): Allow ASCII encoded as UTF8, and give error messages for multi-byte UTF8 and UTF16 and UTF32 encodings. * ls-hdf5.h (H5T_NATIVE_IDX): New macro defining native indexing type for HDF5 files * ls-hdf5.cc (save_hdf5_empty, load_hdf5_empty): Use H5T_NATIVE_IDX to allow 64-bit indexing. * ov-bool-sparse.cc (save_hdf5, load_hdf5): ditto. * ov-re-sparse.cc (save_hdf5, load_hdf5): ditto. * ov-cx-sparse.cc (save_hdf5, load_hdf5): ditto. * ov-cell.cc (save_hdf5, load_hdf5): ditto. * load-save.cc (parse_save_options): Remove -nozip option. (Fsave): If user defines file format, ignore completely the default file format options. 2005-05-12 John W. Eaton * Makefile.in (oct-gperf.h): Try harder to cause Make to exit here if gperf is missing or fails to create a valid file. 2005-05-10 John W. Eaton * lex.l ({SNLCMT}*\]{S}*): If whitespace was gobbled, unput SPC before returning the token. ({SNLCMT}*\}{S}*): Likewise. 2005-05-09 John W. Eaton * parse.y (except_command): Make catch clause optional in try statements. * pt-except.cc (tree_try_catch_command::eval): Always buffer error messages. 2005-05-06 John W. Eaton * ov-struct.cc (octave_struct::save_ascii, octave_struct::save_binary, octave_sruct::save_hdf5): Always save cell array. (octave_struct::load_ascii, octave_struct::load_binary, octave_sruct::load_hdf5): Try to read old-style files correctly. * DLD-FUNCTIONS/__qp__.cc (qp): Use chol2inv to compute inverse from Cholesky factors. (cholinv): Delete. * DLD-FUNCTIONS/chol.cc (Fcholinv): New function. (Fchol2inv): New function. 2005-05-05 Keith Goodman * ov-usr-fcn.cc (Fnargout, Fnargin): Update doc strings. * help.cc (keywords): Update doc strings for varargin, varargout. 2005-05-05 John W. Eaton * oct-stream.cc (BEGIN_S_CONVERSION): Correctly handle width specifiers. 2005-05-04 John W. Eaton * ls-mat5.cc (read_mat5_binary_element): Implement reading of N-d structure arrays. * ov-struct.cc (octave_struct::load_hdf5, octave_struct::load_binary, octave_struct::load_ascii): Assign cell_value to map slot, not octave_value containing the cell. 2005-05-02 John W. Eaton * error.cc (Flasterr): Don't access argv if an error occurs when creating it. * mkgendoc (main): Print header message. 2005-05-02 Bill Denney * data.cc, defaults.cc, DLD-FUNCTIONS/qz.cc, file-io.cc, sighandlers.cc, syscalls.cc: Docstring fixes. 2005-05-02 John W. Eaton * pr-output.cc (octave_print_internal (std::ostream&, const Range&, bool, int)): Don't print newline at end of broken rows (that is handled by pr_col_num_header). From Keith Goodman . * Makefile.in (octave$(EXEEXT)): List $(UMFPACK_LIBS) ahead of $(BLAS_LIBS). (OCTAVE_LIBS): Include $(GLPK_LIBS) in the list if dynamic linking is not enabled. From Dmitri A. Sergatskov . 2005-05-02 John W. Eaton * oct-map.h, oct-map.cc (Octave_map::seek, Octave_map::contents): New non-const versions. (Octave_map::assign (const octave_value_list&, const std::string&, const Cell&)): Allow both tmp RHS and LHS to be resized. For clarity, always resize to new_dims. 2005-05-02 David Bateman * ov-re-sparse.cc, ov-cx-sparse.cc (load_binary): read save_type into one byte variable. 2005-04-29 John W. Eaton * oct-stream.cc (DO_LITERAL_CONVERSION): Cast fmt[i] to unsigned char for comparison. * c-file-ptr-stream.h (c_file_ptr_stream): New template class, converted from i_c_file_ptr_stream. (i_c_file_ptr_stream, o_c_file_ptr_stream, io_c_file_ptr_stream): Now typedefs. (i_c_zfile_ptr_stream, o_c_zfile_ptr_stream, io_c_zfile_ptr_stream): New typedefs. * c-file-ptr-stream.h, c-file-ptr-stream.cc (c_zfile_ptr_buf): New class. * oct-stdstrm.h (class octave_tstdiostream): New template class, converted from octave_stdiostream. (octave_stdiostream): Now a typedef. [HAVE_ZLIB] (octave_zstdiostream): New a typedef. * oct-stdstrm.cc: Delete. * Makefile.in (DIST_SRC): Remove it from the list. 2005-04-29 David Bateman * Makefile.in: Add matrix_type.cc and spkron.cc to DLD_XSRC. * ls.mat.cc (read_mat5_binary_element): Allow for endian change for compressed data elements. * ov-base-sparse.cc (assign): Invalidate matrix type. * ov-base-sparse.cc (SparseType sparse_type (void), SparseType sparse_type (const SparseType&): Functions to read and set sparse matrix type. * ov-bool-sparse.cc (load_binary): Remove third argument. (load_hdf5): Cast hsize_t comparisions with int to avoid warning. * ov-cx-sparse.cc (load_hdf5): Ditto. * ov-re-sparse.cc (load_hdf5): Ditto. * ov-re-sparse.cc (convert_to_str_internal): Add third argument for string type. * ov-re-sparse.h (convert_to_str_internal): Adject declaration. * sparse-xdiv.cc (xdiv, xleftdiv): Pass SparseType as third argument, use it and return it to allow caching of type. * sparse-xdiv.h (xdiv, xleftdiv): Change declarations for third argument of type SparseType. * DLD-FUNCTIONS/luinc.cc (Fluinc): Use type_name and not class_name to test for real/complex sparse matrices. Set matrix type. * DLD-FUNCTIONS/splu.cc (Fsplu): Set matrix type. * OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc, OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc, OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc, OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc, OPERATORS/op-scm-cm.cc, OPERATORS/op-scm-cs.cc, OPERATORS/op-scm-m.cc, OPERATORS/op-scm-s.cc, OPERATORS/op-scm-scm.cc, OPERATORS/op-scm-sm.cc, OPERATORS/op-sm-cm.cc, OPERATORS/op-sm-cs.cc, OPERATORS/op-sm-m.cc, OPERATORS/op-sm-s.cc, OPERATORS/op-sm-scm.cc, OPERATORS/op-sm-sm.cc (div, ldiv): Pass and recache SparseType wirh xdiv/xleftdiv. 2005-04-29 John W. Eaton * file-io.cc (maybe_warn_interface_change): Delete function. (fopen_mode_to_ios_mode): Don't call it. 2005-04-27 John W. Eaton * ov-fcn-handle.cc (octave_fcn_handle::subsref): Check whether function referenced by handle is out of date. (Ffunctions): Tag nameless user function as "command-line". * variables.cc (symbol_out_of_date (octave_fucntion *)): New function. (function_out_of_date): New function. * parse.y (load_fcn_from_file (const std::string&, bool)): New function. * DLD-FUNCTIONS/gplot.l (gnuplot_init): New function to handle initialization. If builtin variables have already been installed, simply update our cached values. (F__gnuplot_init__): Call gnuplot_init to do all the real work. (Fclearplot, Fcloseplot, Fhold, Fishold, Fpurge_tmp_files, F__gnuplot_raw__, F__gnuplot_set__, F__gnuplot_plot__, F__gnuplot_splot__, F__gnuplot_replot__, Fgplot, Fgsplot, Fgraw, Fgset, Fgshow): Call gnuplot_init before doing anything. * parse.y: (safe_fclose): Delete comment list to avoid memory leak. (parse_and_execute (FILE *)): Also save and restore global_command. 2005-04-26 John W. Eaton * mkbuiltins (VAR_FILES): Expect $(VAR_FILES) to have .df suffix. * Makefile.in (clean): Also remove $(DLD_PICOBJ). Use mk-oct-links --delete to remove links to .oct files. Remove $(DOC_FILES) not $(DEF_FILES) and $(VAR_FILES). * mk-oct-links (mk-oct-links): Handle --delete option. Rename -p option to be --print. Skip nonexistent .df files. 2005-04-25 John W. Eaton * oct-hist.cc (default_history_file, default_history_size): Now static. * oct-hist.h: Delete decls. * oct-hist.cc (default_history_timestamp_format, default_history_timestamp_format): New functions. (Vdefault_history_timestamp_format): New variable. (symbols_of_oct_hist): DEFVAR it. (octave_history_write_timestamp): New function. * oct-hist.h (octave_history_write_timestamp): Provide decl. * toplev.cc (): call octave_history_write_timestamp here. * octave.cc (maximum_braindamage): Bind history_timestamp_format_string here. 2005-04-22 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.9.2. (OCTAVE_API_VERSION): Now api-v15. * pager.cc (default_pager): Also append -X. * DLD-FUNCTIONS/dispatch.cc (Fdispatch): Dispatch help on "string" and "sq_string" types. (dispatch_record): Add extra space to force new paragraph after each dispatched function name if we are formatting with Texinfo. Force noindent of preceding "Overloaded function:" tag. 2005-04-21 John W Eaton * ls-mat5.cc (read_mat5_binary_element): Only read sparse matrix values if sizeof (int) == sizeof (octave_idx_type). * DLD-FUNCTIONS/colamd.cc: These functions only work if sizeof (int) == sizeof (octave_idx_type). * Makefile.in (parse.cc): Expect 14 shift/reduce conflicts. * parse.y (USING TITLE WITH AXES COLON OPEN_BRACE CLEAR): Delete unused tokens. * DLD-FUNCTIONS/__qp__.cc (qp): Use octave_idx_type where needed. * DLD-FUNCTIONS/__qp__.cc: New file. * Makefile.in (DLD_XSRC): Add it to the list. 2005-04-20 John W. Eaton * lex.l (IDENT): Allow $ in identifiers. * utils.cc (valid_identifier): Likewise. 2005-04-19 John W. Eaton * toplev.cc (Fsystem): Move enum exec_type declaration to file scope and rename system_exec_type. Change all uses. 2005-04-14 David Bateman * load-save.cc (Vdefault_save_format, Voctave_core_file_format): Delete variables. (Vdefault_save_options, Voctave_core_file_options): New variables. (get_save_format): Delete function. (parse_save_options (const string_vector&, ...), parse_save_options (const std::string&, ...)): New functions. (dump_octave_core): Allow save_as_floats to be used. (dump_octave_core): Parse save options. (Fsave): Split parsing of options, and default formats. (default_save_format): Delete function and DEFVAR. (default_save_options): New function. DEFVAR it. (octave_core_file_format): Delete function and DEFVAR. (octave_core_file_options): New function. DEFVAR it. * octave.cc (default_save_format): Delete binding (default_save_options): New bindings * Makefile.in: Add luinc.cc to DLD_XSRC. * DLD-FUNCTIONS/luinc.cc: New file for incomplete LU factorization. * ov-bool-sparse.h (index_vector): New function. * ov-re-sparse.cc (index_vector): Ditto. * ov-re-sparse.h (index_vector): Definition. * ov-mapper.cc (any_element_less_than, any_element_greater_than): New versions for SparseMatrix (SPARSE_MAPPER_LOOP_2, SPARSE_MAPPER_LOOP_1, SPARSE_MAPPER_LOOP): New macros. (octave_mapper::apply): Add special cases for sparse arguments to the mapper functions * ov-re-sparse.cc (streamoff_array_value): Use octave_idx_type. (convert_to_str_internal): New function. * ov-re-sparse.h (convert_to_str_internal): Definition. * DLD-FUNCTIONS/sparse.cc (Fsparse): More care for nargin=2 case. * DLD-FUNCTIONS/splu.cc (Fsplu): Use octave_idx_type. 2005-04-14 John W. Eaton * strfns.cc (Fchar): If arg is a dq string, return a dq string. * pt-mat.cc (Vwarn_string_concat): New static variable. (symbols_of_pt_mat): DEFVAR it. (warn_string_concat): New function. (maybe_warn_string_concat): New function. (tree_matrix::rvalue): If all args are single quoted strings, create a single quoted string object. If all args are strings (any type), create a double quoted string object. If a mixture of string types, maybe warn. (class tm_row_const, class tm_row_const_rep, class tm_const): Note whether all values are double or single quoted strings. * ov.h (octave_value::is_dq_string): New function. 2005-04-13 John W. Eaton * strfns.cc (Fchar): Create sq_string objects here. 2005-04-12 John W. Eaton * file-io.cc (Ffprintf, Fprintf, Fsprintf): Pass octave_value to octave_stream::printf for FMT. (Fscanf, Fsscanf): Likewise, for octave_stream::scanf and octave_stream::oscanf. * oct-stream.cc, oct-stream.h (octave_stream::printf, octave_stream::scanf, octave_stream::oscanf): New versions that accept an octave_value for FMT. (octave_stream::puts): New version that accepts octave_value for value to print. (octave_base_stream::do_scanf): If all_char_conv, force conversion to string to avoid warning. * ov-str-mat.h, ov-str-mat.cc (octave_char_matrix_sq_str): New class. (octave_char_matrix_dq_str): New typedef. * ov.h, ov.cc: All string constructors now take type argument. * ov.cc (install_types): Register octave_char_matrix_sq_str. * ov.h (octave_value::convert_to_str): New arg, type. (octave_value::convert_to_str_internal): Likewise. Change all derived classes. * ov.h (octave_value::is_sq_string): New predicate. * octave.gperf (__FILE__): Now a DQ_STRING. * ls-mat4.cc (read_mat_binary_data): Force sq strings here. * ls-mat5.cc (read_mat5_binary_element): And here. * lex.l ([\;\,]): Return SQ_STRING, not STRING. ([^#% \t\r\n\;\,\"\'][^ \t\r\n\;\,]*{S}*): Likewise. (handle_string): Type of string to return depends on delimeter. * parse.y (DQ_STRING, SQ_STRING): New token types. (STRING): Delete token type. (string): New non-terminal. (constant): Recognize string here instead of STRING. (word_list): Likewise. (opt_sep): Handle DQ_STRING and SQ_STRING. * OPERATORS/op-str-m.cc, OPERATORS/op-str-s.cc, OPERATORS/op-str-str.cc: Define operators for both sq and dq strings. 2005-04-08 John W. Eaton * Makefile.in (clean): Use exact filenames instead of *.xxx. Also remove PKG_ADD. (DISTFILES): Add gplot.cc to the list. (maintainer-clean): Remove gplot.cc here. * Initial merge of 64-bit changes from Clinton Chee: 2005-04-07 John W. Eaton * ls-oct-ascii.h, ls-oct-ascii.cc (extract_keyword): Now template functions defined in the header file. * ls-mat5.cc, ov-base-sparse.h, ov-base.h, ov-bool-sparse.cc ov-cx-sparse.cc, ov-re-sparse.cc, ov.cc, pt-loop.cc, sparse-xdiv.cc, sparse-xpow.cc, DLD-FUNCTIONS/sparse.cc, DLD-FUNCTIONS/spdet.cc: Use octave_idx_type instead of int where needed. 2005-03-31 Clinton Chee * Cell.cc, Cell.h, data.cc, defaults.cc, dirfns.cc, file-io.cc, gripes.cc, gripes.h, ls-mat-ascii.cc, ls-mat4.cc, ls-oct-ascii.cc, oct-map.cc, oct-map.h, oct-obj.cc, oct-obj.h, oct-stream.cc, oct-stream.h, octave.cc, ops.h, ov-base-mat.cc, ov-base.h, ov-bool-mat.cc, ov-cell.cc, ov-cs-list.cc, ov-cx-mat.cc, ov-intx.h, ov-list.cc, ov-mapper.cc, ov-range.cc, ov-range.h, ov-re-mat.cc, ov-scalar.h, ov-str-mat.cc, ov-struct.cc, ov.cc, ov.h, pr-output.cc, pt-arg-list.cc, pt-cell.cc, pt-loop.cc, pt-mat.cc, pt-select.cc, symtab.h, utils.cc, utils.h, xdiv.cc, xpow.cc: Use octave_idx_type instead of int where needed. 2005-04-01 John W. Eaton * toplev.cc (octave_config_info): Add USE_64_BIT_IDX_T to the list. * oct-conf.h.in (OCTAVE_CONF_USE_64_BIT_IDX_T): Substitute here. 2005-03-31 John W. Eaton * DLD-FUNCTIONS/sort.cc: Don't use unsigned int for index into dim_vector, or cast dim to unsigned int. (Fsort): No need to cast arg before asking for dims. * DLD-FUNCTIONS/gcd.cc (Fgcd): Use OCTAVE_LOCAL_BUFFER to allocate local array of NDArray objects. 2005-03-31 Clinton Chee * DLD-FUNCTIONS/balance.cc, DLD-FUNCTIONS/besselj.cc, DLD-FUNCTIONS/chol.cc, DLD-FUNCTIONS/colloc.cc, DLD-FUNCTIONS/daspk.cc, DLD-FUNCTIONS/dasrt.cc, DLD-FUNCTIONS/dassl.cc, DLD-FUNCTIONS/det.cc, DLD-FUNCTIONS/eig.cc, DLD-FUNCTIONS/expm.cc, DLD-FUNCTIONS/fft.cc, DLD-FUNCTIONS/fft2.cc, DLD-FUNCTIONS/fftn.cc, DLD-FUNCTIONS/fftw_wisdom.cc, DLD-FUNCTIONS/filter.cc, DLD-FUNCTIONS/find.cc, DLD-FUNCTIONS/fsolve.cc, DLD-FUNCTIONS/gcd.cc, DLD-FUNCTIONS/hess.cc, DLD-FUNCTIONS/inv.cc, DLD-FUNCTIONS/kron.cc, DLD-FUNCTIONS/lu.cc, DLD-FUNCTIONS/minmax.cc, DLD-FUNCTIONS/quad.cc, DLD-FUNCTIONS/qz.cc, DLD-FUNCTIONS/rand.cc, DLD-FUNCTIONS/schur.cc, DLD-FUNCTIONS/sort.cc, DLD-FUNCTIONS/sqrtm.cc, DLD-FUNCTIONS/svd.cc, DLD-FUNCTIONS/syl.cc: Use octave_idx_type instead of int where needed. 2005-04-06 David Bateman * Makefile.in: Link to UMFPACK_LIBS. Add zfstream.{cc,h} to build and dist files. * zfstream.cc: New file for C++ binding for fstream like class for zlib. * zfstream.h: Definition for fstream like C++ bindings to zlib. * load-save.cc (static bool check_gzip_magic (const std::string&)): New function to look for GZIP magic (static load_save_format get_file_format (const istream &file)): New function split from old get_file_format but passed istream to allow use with zlib istream. (static load_save_format get_file_format (const std::string&, const std::string&, bool)): Modify the test uncompressed file first, then compressed version (Fload) Allow -v6, -6, -v7 and -7 options. Split load code to allow use of zlib. (Fsave) Allow -zip, -z, -v6, -6, -v7 and -7 options. Split save code to allow use of zlib. * load-save.h: add LS_MAT7_BINARY to load_save_format enum * ls-mat5.cc (read_mat5_binary_element): Test for miCOMPRESSED flag for matlab v7 files, and decompress data in memory. Allow reading of matlab logical variables either in mxDOUBLE_CLASS or mxUINT8_CLASS. (int save_mat5_array_length(const double*, ...): New function to calculate number of bytes used to save NDArray. (int save_mat5_array_length(const Complex*, ...): New function to calculate number of bytes used to save ComplexNDArray. (int save_mat5_element_length): New function to find number of bytes needed to save data element. (save_mat5_binary_element): New input arguments, mat7_format and compressing, that define if we are in a matlab v7 format and where we are currently compressing the data element. If mat7_format use miCOMPRESSED flag for matlab v7 files, and compress data in memory. Add capability to save logical variables as mxUINT8_CLASS. If v7 format maximum variable length is 63 characters and not 31. Use the save_mat5_element_length function to pre-calculate the number of bytes taken by a variable rather than use a negative seek to correct after writing (zlib can't do negative seeking) * ls-mat5.h: Add to miCOMPRESSED, miUTF8, miUTF16 and miUTF32 flags to the enum mat5_data_type. (save_mat5_binary_element): Add args mat7_format and compressing to the definition. 2005-04-06 John W. Eaton * OPERATORS/op-scm-scm.cc: Delete #pragma implementation. 2005-04-05 John W. Eaton * ov-ch-mat.h (octave_char_matrix::index_vector): New function. * oct-stream.cc (BEGIN_C_CONVERSION): Clear stream state if we hit EOF after we read something. * pt-assign.cc (tree_multi_assignment::rvalue): Allow assignments of the form [a,b,c] = x{:}. 2005-03-30 John W. Eaton * mappers.cc (install_mapper_functions): Use std:: as needed. * defun-int.h (DEFUN_MAPPER_INTERNAL): Don't use X_CAST on function pointer args. * ov-complex.cc, ov-cx-mat.cc, xpow.cc, ls-mat5.cc: Use std:: for Complex functions instead of relying on wrappers from oct-cmplx.h. * oct-stream.cc (octave_scan): Initialize c1 to EOF. 2005-03-29 John W. Eaton * utils.cc (get_dimensions): Produce error instead of warning if given a matrix argument. * load-save.cc (Fload, Fsave): Also accept -V4 option. * ls-hdf5.h (hdf5_fstreambase::hdf5_fstreambase, hdf5_fstreambase::open): Use & instead of == to test whether mode is std::ios::in or std::ios::out. (hd5_ifstream::istream, hd5_ifstream::open, hd5_ofstream::istream, hd5_ofstream::open): Default mode now includes binary flag. 2005-03-28 John W. Eaton * oct-stream.cc (octave_stream::write): For compatibility, Write zeros instead of seeking if SKIP is nonzero. * DLD-FUNCTIONS/gplot.l (Fgraw): Recommend __gnuplot_raw__, not __gnuplot__raw__. (Fgshow): Recommend __gnuplot_show__, not __gnuplot__show__. Don't add "mark_as_rawcommand ("replot")" to PKG_ADD file. 2005-03-26 John W. Eaton * input.cc (gnu_readline): Don't wrap call to command_editor::readline with {BEGIN,END}_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE. 2005-03-25 John W. Eaton * toplev.cc (main_loop): Don't use octave_set_current_context here. * pt-loop.cc (simple_for_loop::eval): In for i = matrix ... end, skip loop if matrix is empty. Likewise for cell arrays. 2005-03-24 John W. Eaton * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Texinfoize doc string. * Makefile.in (install-oct): Always create $(octfiledir) and install PKG_ADD file there. * octave.cc (octave_main): Fix logic in test for exit after evaluating --eval option code. 2005-03-23 John W. Eaton * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Require 9 arguments. Print error messages and return early if value extractions fail. Default for message level now 0. Rename local variable error to be errnum. (glpk_fault_hook): Call message instead of writing to octave_stderr. (glpk_fault_hook): Call error instead of writing to octave_stderr. (glpk): Likewise. Declare mark static. Delete declaration of fperr. (glpk): Delete unnecessary casts. * DLD-FUNCTIONS/__glpk__.cc (OCTAVE_GLPK_GET_REAL_PARAM, OCTAVE_GLPK_GET_INT_PARAM): New macros. (F__glpk__): Use them. * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Accept lpsolver and save_pb in param arg instead of as separate args. Arg list now matches new interface for glpk.m. Don't return lambda and redcosts fields in extra if isMIP. * toplev.cc (do_octave_atexit): Call reset_error_handler before each call to feval. 2005-03-22 John W. Eaton * Makefile.in: Add special rule for __glpk__.oct. * toplev.cc (octave_config_info): Add GLPK_LIBS to the list. * oct-conf.h.in (OCTAVE_CONF_GLPK_LIBS): Substitute here. * DLD-FUNCTIONS/__glpk__.cc (F__glpk__, glpk): Adapt to Octave coding style. (glpk): Move decls closer to first use. (F__glpk__): Eliminate unnecessary loop seting inf values. Ensure that isMIP is initialized. Declare sense, nz, and isMIP volatile to avoid GCC warnings that these variables might be might be clobbered by `longjmp' or `vfork' * DLD-FUNCTIONS/__glpk__.cc: New file. * Makefile.in (DLD_XSRC): Add it to the list. 2005-03-21 John W. Eaton * octave.cc (maximum_braindamage): Don't set warn_matlab_incompatible to true. 2005-03-17 John W. Eaton * lex.l (class bracket_brace_paren_nesting_level): Use static const int members instead of anonymous enum. 2005-03-16 John W. Eaton * ov-struct.cc (octave_struct::save_ascii): Don't convert Cell object to cs-list. (octave_struct::save_binary): Likewise (octave_struct::save_hdf5): Likewise. * DLD-FUNCTIONS/gplot.l (Fset, Fshow): Delete. (F__gnuplot_plot__): Rename from Fgplot. (F__gnuplot_splot__): Rename from Fgsplot. (F__gnuplot_raw__): Rename from Fgraw. (F__gnuplot_set__): Rename from Fgset. (F__gnuplot_show__): Rename from Fgshow. (F__gnuplot_replot__): Rename from Freplot. (WARN_DEPRECATED, DEPRECATED_BODY): New macros. (Fgplot, Fgsplot, Fgraw, Fgset, Fgshow): New functions. 2005-03-15 John W. Eaton * lex.l ({NL}): Reset lexer_flags.doing_rawcommand state here. * version.h (OCTAVE_API_VERSION): Now 2.9.0. (OCTAVE_API_VERSION): Now api-v14. * Makefile.in (INCLUDES): Delete sparse-ops.h from the list. * cellfun.cc: New function from Octave-forge. Adapt to Octave coding standards. * Makefile.in (DLD_XSRC): Add it to the list. 2005-03-14 John W. Eaton * DLD-FUNCTIONS/dispatch.cc (Fbuiltin): Avoid crash if symbol lookup fails. 2005-03-10 John W. Eaton * toplev.cc (Foctave_config_info): Print error instead of crashing if struct does not contain field we are looking for. 2005-03-09 John W. Eaton * load-save.cc (Fload, Fsave): Accept -text as an alias for -ascii. Issue warning for future change in meaning of -ascii. * Makefile.in (bin-dist): Delete target. (BINDISTFILES, BINDISTLIBS): Delete variables. 2005-03-04 John W. Eaton * octave.cc (octave_main): Concatenate all --eval arguments. 2005-03-03 John W. Eaton * input.cc (input_from_command_line_file): Move definition here. * parse.y: From here. * input.h (input_from_command_line_file): Move decl here. * parse.h: From here. * input.cc (octave_gets): Don't save history if input is from command line file. * parse.y (parse_and_execute, parse_fcn_file, eval_string): Don't alter value of input_from_command_line_file here. (input_from_command_line_file): Default value is false. (eval_string): Turn off line editing here. * toplev.cc, toplev.h (main_loop): Delete fun_to_call arg and all uses. * octave.cc (fun_to_call): Delete static variable. (persist, code_to_eval): New static variables. (long_opts): Delete --funcall, add --eval and --persist. (usage_string, verbose_usage, octave_main): Likewise. (FUNCALL_OPTION): Delete. (EVAL_OPTION, PERSIST_OPTION): New macros. (maximum_braindamage): Set persist to true. (execute_eval_option_code): New function. (restore_program_name): New function. (execute_command_line_file): New function. (octave_main): Call execute_eval_option code and execute_command_line file. If persist, go interactive even after evaluating --eval code and/or command-line file. * ov-bool-sparse.h, ov-bool-sparse.cc (octave_sparse_bool_matrix::sparse_matrix_value, octave_sparse_bool_matrix::sparse_complex_matrix_value): Accept bool arg. * parse.y (looks_like_copyright): Check first 9 characters, not 14. 2005-03-02 John W. Eaton * oct-stream.cc (octave_scan (std::istream&, const scanf_format_elt&, double*)): New specialization to handle Inf, NaN, and NA. * parse.y (looks_like_copyright): Rename from looks_like_octave_copyright. Change all uses. Simply match "Copyright". 2005-03-01 John W. Eaton * DLD-FUNCTIONS/odessa.cc: Delete. * Makefile.in (DLD_XSRC): Remove it from the list. (OPT_HANDLERS): Remove ODESSA-opts.cc from the list. 2005-02-28 John W. Eaton * toplev.cc (octave_config_info): Remove LIBGLOB and GLOB_INCFLAGS from the list. * oct-conf.h.in (OCTAVE_CONF_LIBGLOB, OCTAVE_CONF_GLOB_INCFLAGS): Delete. * Makefile.in (OCTAVE_LIBS): Remove $(LIBGLOB) from the list. 2005-02-25 John W. Eaton Sparse merge. 2005-02-25 John W. Eaton * DLD-SRC/rand.cc (Frand): Accept "state" as an alias for "seed". * DLD-SRC/dispatch.cc: New file. * Makefile.in (DLD_XSRC): Add it to the list. 2005-02-13 David Bateman * ov-fcn-inline.h, DLD-FUNCTIONS/spparms.cc, DLD-FUNCTIONS/gcd.cc: Remove additional licensing clause, with authors permission * ov-base-sparse.h: New constructor to cache SparseType, not yet used * ov-re-sparse.h: likewise * ov-cx-sparse.h: likewise * ov.h: Likewise * sparse-xdiv.cc: Remove spparms umfpack flag * DLD-FUNCTIONS/spparms.cc: Warning that umfpack flag is ignored. 2005-01-16 David Bateman * ls-mat5.cc (read_mat5_integer_data): Change "T &m" to "T *m" and instantiate with values like octave_int8 rather than int8NDArray. Modify function to fit (read_mat5_binary_element): Use new form of read_mat_integer_data to read data directly into sparse matrix (write_mat5_integer_data): Change "const T &m" to "T *m", etc. New instantiation with int. (save_mat5_binary_element): Modify to save sparse data 2005-01-15 David Bateman * data.cc (do_cat): Use first non-empty matrix as base for concatenation. * pt-mat.cc (tree_matrix::rvalue): ditto. 2005-01-14 John W. Eaton * ov.cc (do_cat_op): When checking for empty args, use all_zero_dims, not numel. * ov.h (octave_value::all_zero_dims): New function. * ov-bool-sparse.cc (try_narrowing_conversion): Convert to bool_matrix, not matrix. 2005-01-13 David Bateman * data.cc (make_diag): Use numel not capacity to remove ambiguity. * ov.h (octave_value::capacity): New virtual funtion. * ov-base.h (octave_base_value::capacity): New function calls numel. * data.cc (Freshape): Use arg.numel() rather than arg.dims().numel() since sparse numel now consistent. * symtab.h (symbol_record::symbol_def::capacity, symbol_record::capacity): New methods. * symtab.cc (symbol_record::print_symbol_info_line, symbol_table::parse_whos_line_format, symbol_table::maybe_list): used capacity() and not numel() to properly assess size of sparse objects. * ov-base-sparse.h (octave_base_sparse::capacity): New function, (octave_base_sparse::numel): Delete. * ov-re-sparse.cc (octave_sparse_matrix::streamoff_array_value): Only fill from non-zero elements of sparse array. * DLD-FUNCTIONS/splu.cc (Fsplu): Change use of nelem to numel. * ov.cc (do_cat_op): Early return for concatenation with empty objects. 2005-01-12 John W. Eaton * DLD-FUNCTIONS/find.cc (Ffind): Make it work for character strings. 2005-01-11 John W. Eaton * OPERATORS/op-double-conv.cc: New conversions for sparse_matrix and sparse_bool_matrix to matrix. 2005-01-11 David Bateman * ov-base-sparse.h (octave_base_sparse::any, octave_base_sparse::all): Use new constructors, etc as pointed out by JWE. 2005-01-10 John W. Eaton * DLD-FUNCTIONS/sparse.cc (MINMAX_BODY, Fspatan2, make_spdiag): Write retval(0) = result instead of retval(0) = octave_value (result). * DLD-FUNCTIONS/splu.cc (Fsplu): Likewise. 2005-01-08 David Bateman * ls-mat5.cc (read_mat5_integer_data): Instantiate for Array (read_mat5_binary_element): Add code to read sparse matrices saved in matlab v5 format 2005-01-07 David Bateman * OPERATORS/op-bm-sbm.cc, OPERATORS/op-b-sbm.cc, OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc, OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc, OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc, OPERATORS/op-sbm-b.cc, OPERATORS/op-sbm-bm.cc, OPERATORS/op-sbm-sbm.cc, OPERATORS/op-scm-cm.cc, OPERATORS/op-scm-cs.cc, OPERATORS/op-scm-m.cc, OPERATORS/op-scm-s.cc, OPERATORS/op-scm-scm.cc, OPERATORS/op-scm-sm.cc, OPERATORS/op-sm-cm.cc, OPERATORS/op-sm-cs.cc, OPERATORS/op-sm-m.cc, OPERATORS/op-sm-s.cc, OPERATORS/op-sm-scm.cc, OPERATORS/op-sm-sm.cc, OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc: New octave_value constructors allow macros from ops.h to be used rather than sparse-ops.h. Remove other explicit uses of maybe_mutate. * sparse-ops.h: delete file. * colamd.cc (Fcolamd, Fsymamd, Fetree): Remove no longer needed use of get_rep() and use the sparse matrix conversion functions directly. * data.cc (Freshape): Use arg.dims().numel() rather than arg.numel() due to definition of numel for sparse matrices. * sparse.cc (Ffull, Fspfind, SPARSE_DIM_ARG_BODY, MINMAX_BODY, Fspatan2, make_spdiag): Convert to use new octave_value sparse constructors, sparse matrix conversion functions and remove maybe_mutate calls. (Fspreshape): Delete * splu.cc (Fsplu): Remove remaining explicit octave_value construction. * ov-base-sparse.h (do_index_op, resize, reshape, permute, squeeze): Move these methods from the derived classes. * ov-base-spase.cc (do_index_op): Move this method from the derived classes. * ov-bool-sparse.h (do_index_op, resize, reshape, permute, squeeze): delete. * ov-re-spase.cc (do_index_op): delete. * ov-cx-sparse.h (do_index_op, resize, reshape, permute, squeeze): delete. * ov-cx-spase.cc (do_index_op): delete. * ov-bool-spase.cc (do_index_op): delete. * ov-re-sparse.h (do_index_op, resize, reshape, permute, squeeze): delete. * DLD-FUNCTIONS/spdet.cc (Fspdet): Remove use of SparseDet and SparseComplexDET classes and use DET and ComplexDET classes. * DLD-FUNCTIONS/colamd.cc op-bm-sbm.cc OPERATORS/op-b-sbm.cc OPERATORS/op-cm-scm.cc OPERATORS/op-cm-sm.cc OPERATORS/op-cs-scm.cc OPERATORS/op-cs-sm.cc OPERATORS/op-fil-sbm.cc OPERATORS/op-fil-scm.cc OPERATORS/op-fil-sm.cc OPERATORS/op-m-scm.cc OPERATORS/op-m-sm.cc OPERATORS/op-sbm-b.cc OPERATORS/op-sbm-bm.cc OPERATORS/op-sbm-sbm.cc OPERATORS/op-scm-cm.cc OPERATORS/op-scm-cs.cc OPERATORS/op-scm-m.cc OPERATORS/op-scm-s.cc OPERATORS/op-scm-scm.cc OPERATORS/op-scm-sm.cc OPERATORS/op-sm-cm.cc OPERATORS/op-sm-cs.cc OPERATORS/op-sm-m.cc OPERATORS/op-sm-s.cc OPERATORS/op-sm-scm.cc OPERATORS/op-sm-sm.cc OPERATORS/op-s-scm.cc OPERATORS/op-s-sm.cc ov-base-sparse.cc ov-base-sparse.h ov-bool-sparse.cc ov-bool-sparse.h ov-cx-sparse.cc ov-cx-sparse.h ov-re-sparse.cc ov-re-sparse.h sparse-base-lu.cc sparse-base-lu.h DLD-FUNCTIONS/sparse.cc sparse-xdiv.cc sparse-xdiv.h sparse-xpow.cc sparse-xpow.h DLD-FUNCTIONS/spdet.cc DLD-FUNCTIONS/splu.cc DLD-FUNCTIONS/spparms.cc: Remove additional licensing clause with authors permission. 2005-01-05 David Bateman * DLD-FUNCTIONS/colamd.cc: Rename from colamdoct.cc. Base colamd.h now found in COLAMD/colamd.h. (Fcolamd): Return value is now used. (Fsymamd): ditto. * Makefile.in: include colamd.cc in DLD_XSRC. * ov.h (sparse_matrix_value, sparse_complex_matrix_value, sparse_bool_matrix_value): New virtual functions * ov-base.cc (octave_base_value::sparse_matrix_value, octave_base_value::sparse_complex_matrix_value, octave_base_value::sparse_bool_matrix_value): New default sparse matrix extraction functions. * ov-base.h (sparse_matrix_value, sparse_complex_matrix_value, sparse_bool_matrix_value): Declare them. * ov-re-mat.cc (octave_matrix::sparse_matrix_value, octave_matrix::sparse_complex_matrix_value): Conversion functions. * ov-re-mat.h (sparse_matrix_value, sparse_complex_matrix_value): Declare them. * ov-cx-mat.cc (octave_complex_matrix::sparse_matrix_value, octave_complex_matrix::sparse_complex_matrix_value): Conversion functions. * ov-cx-mat.h (sparse_matrix_value, sparse_complex_matrix_value): Declare them. * ov-bool-mat.h (sparse_matrix_value, sparse_complex_matrix_value, sparse_bool_matrix_value): Conversion functions. * DLD_FUNCTIONS/spdet.cc (Fspdet): Use the above constructors and conversion functions. * DLD_FUNCTIONS/splu.cc (Fsplu): ditto. 2004-12-30 John W. Eaton * DLD-FUNCTIONS/splu.cc (Fsplu): Avoid shadow warnings. * sparse-xpow.cc (elem_xpow): Delete unsed variables. * sparse-xdiv.cc (x_el_div): Likewise. * DLD-FUNCTIONS/det.cc (Fdet): Delete unused argument nargout. * DLD-FUNCTIONS/spdet.cc (Fspdet): Likewise. * DLD-FUNCTIONS/sparse.cc (Fnzmax): Return a value. * ov.cc, ov.h (octave_value::octave_value (const SparseMatrix&), (octave_value::octave_value (const SparseBoolMatrix&), (octave_value::octave_value (const SparseComplexMatrix&)): New constructors. 2004-12-29 John W. Eaton * DLD-FUNCTIONS/sparse.cc (SPARSE_DIM_ARG_BODY): Rename from DEFUN_DLD_SPARSE_DIM_ARG. Omit HELP arg. Omit DEFUN_DLD, so the macro only defines the function body. (Fspprod, Fspcumprod, Fspsum, Fspcumsum, Fspsumsq): Define with DEFUN_DLD, not DEFUN_DLD_SPARSE_DIM_ARG. Use SPARSE_DIM_ARG_BODY to define function body. * DLD-FUNCTIONS/sparse.cc (load_sparse_type, sparse_type_loaded): Delete function, variable, and all uses. * ov.cc: Include ov-bool-sparse.h, ov-re-sparse.h, ov-cx-sparse.h. (install_types): Register sparse types. Merge of sparse code from David Bateman and Andy Adler . * sparse-xdiv.cc, sparse-xpow.cc: New files. * Makefile.in (DIST_SRC): Add them to the list. * sparse-ops.h sparse-xdiv.h, sparse-xpow.h: New files. * Makefile.in (INCLUDES): Add them to the list. * DLD-FUNCTIONS/colamdoct.cc, DLD-FUNCTIONS/sparse.cc, DLD-FUNCTIONS/spdet.cc, DLD-FUNCTIONS/splu.cc, DLD-FUNCTIONS/spparms.cc: New files. * Makefile.in (DLD_XSRC): Add them to the list. * ov-base-sparse.cc, ov-base-sparse.h, ov-bool-sparse.cc, ov-bool-sparse.h, ov-cx-sparse.cc, ov-cx-sparse.h, ov-re-sparse.cc, ov-re-sparse.h: New files. * Makefile.in (OV_SPARSE_SRC, OV_SPARSE_INCLUDES): New lists. (OV_SRC): Add $(OV_SPARSE_SRC) to the list. (INCLUDES): Add $(OV_SPARSE_INCLUDES) to the list. * OPERATORS/op-bm-sbm.cc, OPERATORS/op-b-sbm.cc, OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc, OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc, OPERATORS/op-fil-sbm.cc, OPERATORS/op-fil-scm.cc, OPERATORS/op-fil-sm.cc, OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc, OPERATORS/op-sbm-b.cc, OPERATORS/op-sbm-bm.cc, OPERATORS/op-sbm-sbm.cc, OPERATORS/op-scm-cm.cc, OPERATORS/op-scm-cs.cc, OPERATORS/op-scm-m.cc, OPERATORS/op-scm-s.cc, OPERATORS/op-scm-scm.cc, OPERATORS/op-scm-sm.cc, OPERATORS/op-sm-cm.cc, OPERATORS/op-sm-cs.cc, OPERATORS/op-sm-m.cc, OPERATORS/op-sm-s.cc, OPERATORS/op-sm-scm.cc, OPERATORS/op-sm-sm.cc, OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc: New files. * Makefile.in (SPARSE_OP_XSRC): New list. (OP_XSRC): Add $(SPARSE_OP_XSRC) to the list. 2005-02-23 John W. Eaton * parse.y (fold (tree_binary_expression*)): Skip constant folding for some expressions to preserve warnings. (Vwarn_associativity_change): New static variable. (warn_associativity_change): New function. (symbols_of_parse): DEFVAR warn_associativity_change. (maybe_warn_associativity_change): New function. (make_binary_op): Use it. 2005-02-22 John W. Eaton * parse.y (POW, EPOW): Use %left associativity for compatibility. * ov-base-int.cc (octave_baes_int_matrix::load_binary): Handle arrays with only one dimension. * ov-bool-mat.cc (octave_bool_matrix::load_binary): Likewise. * ov-cell.cc (octave_cell::load_binary): Likewise. * ov-cell.cc (octave_complex_matrix::load_binary): Likewise. * ov-re-mat.cc (octave_matrix::load_binary): Likewise. * ov-str-mat.cc (octave_char_matrix_str::load_binary): Likewise. * ov-mapper.cc (octave_mapper::subsref): Return retval after calling next_subsref. * ov-mapper.cc (octave_builtin::subsref): If nargout is 0 and we have additional indexing to perform, set it to 1 before calling do_multi_index_op. * oct-map.cc (Octave_map::intfield, Octave_map::stringfield): New functions. * oct-map.h: Provide decls. * DLD-FUNCTIONS/time.cc (extract_tm): Use intfield and stringfield to access map elements. 2005-02-21 John W. Eaton * ov-builtin.cc (octave_builtin::subsref): If nargout is 0 and we have additional indexing to perform, set it to 1 before calling do_multi_index_op. * ov-usr-fcn.cc (octave_user_function::subsref): Likewise. * DLD-FUNCTIONS/gplot.l (send_to_plot_stream): Replot with no previous plot is a no-op. (makeplot): Likewise. (Vautomatic_replot): Don't use this variable in low-level functions. 2005-02-18 John W. Eaton * Makefile.in (oct-gperf.h): Remove -E from list of gperf options. * data.cc (do_permute): Use zero-based indexing for permutation vector that is passed to octave_value::permute method. Allow permutation vector longer than number of dimenensions of permuted matrix. 2005-02-17 John W. Eaton * version.h (OCTAVE_API_VERSION): Now 2.1.64-cvs. (OCTAVE_API_VERSION): Now api-v12-cvs. 2005-02-16 John W. Eaton * ov-base-mat.h (octave_base_matrix::squeeze): Explicitly convert result of matrix.squeeze() to MT. 2005-02-15 John W. Eaton * dirfns.cc (deftypefn): Don't print to octave_stdout if nargout > 0. * pt-mat.cc (tree_matrix::rvalue): Min size of ra_idx is 2. * file-io.cc (Ffclear): New function. * sighandlers.h: Define SIGCHLD if it is not already defined and SIGCLD is defined. * sighandlers.cc (octave_set_signal_handler): Request system calls restarted if interrupted by signals (except for SIGALRM). * dirfns.cc (Fls): Don't bother with sleeping or checking errno. 2005-02-11 John W. Eaton * sighandlers.cc (sigpipe_handler): Don't try to take action. Set octave_signal_caught and octave_signals_caught here. (sigchld_handler): Call octave_child_list::wait here. Set octave_signal_caught and octave_signals_caught here. (octave_signals_caught): New static file-scope variable. (sigint_handler): Also set octave_signal_caught. * sighandlers.cc (sigpipe_handler): * DLD-FUNCTIONS/gplot.l (plot_stream_event_handler): Rename from plot_stream_death_handler. Return true if plotter has exited. Call close_plot_stream with false arg. (plot_stream_pid): Delete static file-scope variable and all uses. (close_plot_stream): New arg, remove_from_child_list, with default value of true. Only call octave_child_list::remove if remove_from_child_list is true. * pager.cc (octave_pager_pid, saved_interrupt_handler, interrupt_handler_saved): Delete static file-scope variables and all uses. (clear_external_pager): Do nothing if external_pager is 0. (pager_event_handler): Rename from pager_death_handler. Improve warning message. Return true if pager has exited. (octave_pager_buf::do_sync): Check errno == EPIPE after write. (flush_octave_stdout): No need to check external_pager before calling clear_external_pager. * toplev.cc (recover_from_exception): Set octave_signal_caught to zero. (main_loop): Set octave_signal_hook to octave_signal_handler here. * sighandlers.cc (octave_signal_handler): New function. * sighanlders.h: Provide decl. * sighandlers.cc (install_signal_handlers): Initialize octave_signals_caught. * sighandlers.h (octave_child::status, have_status): New data members. (child_event_handler): Rename from dead_child_handler. Change all uses. (octave_child_list::reap, octave_child_list::wait): New functions. (octave_child_list::length, octave_child_list::do_length, octave_child_list::elem, octave_child_list::do_elem, octave_child_list::list, octave_child_list::curr_len): Delete. * sighandlers.h, sighandlers.cc (octave_child_list::octave_child_list_rep): New class. * input.cc (gnu_readline, octave_gets, get_user_input): Call OCTAVE_QUIT before doing anything. * base-list.h (octave_base_list::remove_if): New function. * TEMPLATE-INST/Array-oc.cc: Delete. * Makefile.in (TI_XSRC): Remove from list. 2005-02-10 Driss Ghaddab * cutils.c (octave_usleep) [HAVE_POLL]: Fix typo. 2005-02-10 John W. Eaton * variables.cc (symbol_exist): Don't search path if explicitly asked for a variable or builtin. From David Bateman . 2005-02-09 John W. Eaton * variables.cc (same_file): New static function. (symbol_out_of_date): Use it. * syscalls.cc (Fcanonicalize_file_name): New function. 2005-02-08 Walter Landry * symtab.h (symbol_record::mark_as_command): Avoid AIX compiler error. 2005-02-07 John W. Eaton * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): Return [] instead of [](1x0) for scalar arg of zero. 2005-02-06 John W. Eaton * DLD-FUNCTIONS/gplot.l (tmp_files): Delete. From Todd Neal . 2005-02-04 John W. Eaton * sighandlers.cc (octave_child_list::~octave_child_list): Move here. * sighandlers.h: From here. 2005-02-02 John W. Eaton * Makefile.in (parse.cc): Expect 12 shift/reduce conflicts. * parse.y (loop_command): Allow "for (k=1:10) ... endfor". 2005-01-27 David Bateman * ov-mapper.cc (octave_mapper::apply): Only work on real arguments if c_c_map_fcn or d_d_map_fcn or d_b_map_fcn is defined.xo 2005-01-26 Joel Andersson * help.cc (keywords): Document endswitch. 2005-01-21 John W. Eaton * DLD-FUNCTIONS/filter.cc (filter): Avoid slow Marray indexing ops. 2005-01-20 John W. Eaton * Makefile.in (EXTRAS): Move ov-base-mat.cc ov-base-scalar.cc here. (OV_SRC): From here. 2005-01-18 John W. Eaton * ov-complex.h (octave_complex::any): New function. * ov-scalar.h (octave_scalar::any): New function. * file-io.cc (Fmkstemp): Fix doc string. Error message belongs in third output value. From Mats Jansson . 2005-01-12 John W. Eaton * DLD-FUNCTIONS/find.cc (Ffind): Make it work for character strings. 2005-01-11 John W. Eaton * DLD-FUNCTIONS/gplot.l (UNOP): Avoid trailing comment. 2005-01-10 John W. Eaton * ls-oct-ascii.cc (extract_keyword (std::istream&, const string_vector&, std::string&, int&, const bool)): Remove duplicate definition. 2004-12-27 Martin Dalecki * Cell.cc, c-file-ptr-stream.cc, comment-list.cc, oct-map.cc, oct-obj.cc, ov-base.cc, ov-base-int.cc, ov-base-mat.cc, ov-base-scalar.cc, ov-bool.cc, ov-bool-mat.cc, ov-builtin.cc, ov.cc, ov-cell.cc, ov-ch-mat.cc, ov-colon.cc, ov-complex.cc, ov-cs-list.cc, ov-cx-mat.cc, ov-dld-fcn.cc, ov-fcn.cc, ov-fcn-handle.cc, ov-fcn-inline.cc, ov-file.cc, ov-int16.cc, ov-int32.cc, ov-int64.cc, ov-int8.cc, ov-list.cc, ov-mapper.cc, ov-range.cc, ov-re-mat.cc, ov-scalar.cc, ov-streamoff.cc, ov-str-mat.cc, ov-struct.cc, ov-typeinfo.cc, ov-uint16.cc, ov-uint32.cc, ov-uint64.cc, ov-uint8.cc, ov-usr-fcn.cc, ov-va-args.cc, procstream.cc, pt-arg-list.cc, pt-assign.cc, pt-binop.cc, pt-bp.cc, pt.cc, pt-cell.cc, pt-check.cc, pt-cmd.cc, pt-colon.cc, pt-const.cc, pt-decl.cc, pt-except.cc, pt-exp.cc, pt-fcn-handle.cc, pt-id.cc, pt-idx.cc, pt-jump.cc, pt-loop.cc, pt-mat.cc, pt-misc.cc, pt-pr-code.cc, pt-select.cc, pt-stmt.cc, pt-unop.cc, symtab.cc, token.cc, unwind-prot.cc: Delete #pragma implementation. * Cell.h, c-file-ptr-stream.h, comment-list.h, oct-map.h, oct-obj.h, ov-base.h, ov-base-int.h, ov-base-mat.h, ov-base-scalar.h, ov-bool.h, ov-bool-mat.h, ov-builtin.h, ov-cell.h, ov-ch-mat.h, ov-complex.h, ov-cs-list.h, ov-cx-mat.h, ov-dld-fcn.h, ov-fcn.h, ov-fcn-handle.h, ov-fcn-inline.h, ov-file.h, ov.h, ov-int16.h, ov-int32.h, ov-int64.h, ov-int8.h, ov-list.h, ov-mapper.h, ov-range.h, ov-re-mat.h, ov-scalar.h, ov-streamoff.h, ov-str-mat.h, ov-struct.h, ov-typeinfo.h, ov-uint16.h, ov-uint32.h, ov-uint64.h, ov-uint8.h, ov-usr-fcn.h, procstream.h, pt-arg-list.h, pt-assign.h, pt-binop.h, pt-bp.h, pt-cell.h, pt-check.h, pt-cmd.h, pt-colon.h, pt-const.h, pt-decl.h, pt-except.h, pt-exp.h, pt-fcn-handle.h, pt.h, pt-id.h, pt-idx.h, pt-jump.h, pt-loop.h, pt-mat.h, pt-misc.h, pt-pr-code.h, pt-select.h, pt-stmt.h, pt-unop.h, symtab.h, token.h, unwind-prot.h: Delete #pragma interface. 2004-12-27 John W. Eaton Merge of changes from Teemu Ikonen to remove gnuplot from main parser. * pt-plot.cc, pt-plot.h: Delete. * Makefile.in (PT_SRC, PT_INCLUDES): Delete them from the lists. * DLD-FUNCTIONS/gplot.l: New file. * Makefile.in: Include it in the DLD_XSRC list. * dirfns.cc (octave_change_to_directory): Don't call do_external_plotter_cd. * symtab.h (symbol_record::TYPE): New element, RAWCOMMAND. (symbol_record::symbol_def::mark_as_rawcommand, symbol_record::symbol_def::unmark_rawcommand, symbol_record::symbol_def::is_rawcommand): New functions. (symbol_record::symbol_def::symbol_type): Bitfield is now 9 bits wide. (symbol_record::mark_as_rawcommand, symbol_record::unmark_rawcommand, symbol_record::is_rawcommand): New functions. (SYMTAB_ALL_TYPES): Include RAWCOMMAND. * parse.y (make_plot_command): Delete function. (tree_plot_command_type, subplot_type, subplot_list_type, plot_limits_type, plot_range_type, subplot_using_type, subplot_style_type, subplot_axes_type): Delete non-terminal type decls. (PLOT, STYLE, AXES_TAG): Delete token types. (title, plot_command, plot_command2, plot_options, plot_command1, ranges, ranges1, using, using1, style, axes): Delete non-terminals. * toplev.cc (do_octave_atexit): Don't call close_plot_stream. * variables.cc (rawcommand_set): New static variable. (is_marked_as_rawcommand, mark_as_rawcommand, unmark_rawcommand, Fiscommand, Fmark_as_rawcommand, Funmark_rawcommand, Fisrawcommand, is_rawcommand_name): New functions. * variables.h: Provide decl for is_rawcommand_name. * pt-bp.cc, pt-bp.h, pt-check.cc, pt-check.h, pt-pr-code.cc, pt-pr-code.h, pt-walk.h: Delete all declarations, definitions, and uses of visit_subplot, visit_subplot_axes, visit_subplot_list, visit_subplot_style, and visit_subplot_using methods. * lex.h (lexer_flags): New field, doing_rawcommand. * lex.l ([\;\,]): Also handle raw commands here. (lexer_flags::init): Initialize doing_racommand to false. (handle_identifier): Recognize raw commands ere. (handle_string): Don't do string escape conversions on raw command strings. * octave.gperf: Delete gplot_kw, gsplot_kw, replot_kw. * lex.h (lexer_flags): Delete fields cant_be_identifier, doing_set, in_plot_range, in_plot_using, in_plot_style, in_plot_axes, past_plot_range, and plotting. * lex.l: Delete all uses of these lexer flags and remove all special cases for plotting. (plot_style_token, plot_axes_token, is_plot_keyword): Delete. * file-io.cc, file-io.h (tmp_files, mark_for_deletion, cleanup_tmp_files): Move here. * pt-plot.cc, pt-plot.h: From here. * Makefile.in (PKG_ADD): New target. (all): Depend on PKG_ADD. (install-oct): Depend on PKG_ADD. Install PKG_ADD file. (gplot.cc): New target. (stamp-prereq): Depend on gplot.cc. (VAR): Don't include $(DLD_SRC) here. (DLD_OBJ, DLD_DEF_FILES): Include .l files. * defun-int.h (DEFVAR, DEFCONST, DEFCONSTX): Move definition here. * defun.h: From here. 2004-12-22 John W. Eaton * ls-oct-ascii.cc (extract_keyword (std::istream&, const string_vector&, std::string&, int&, const bool): New function. * ls-oct-ascii.h: Provide decl. * ov-bool-mat.cc (octave_bool_matrix::load_ascii): Use new extract_keyword function to avoid calling tellg/seekg. * ov-cell.cc (octave_cell::load_ascii): Likewise. * ov-cx-mat.cc (octave_complex_matrix::load_ascii): Likewise. * ov-re-mat.cc (octave_matrix::load_ascii): Likewise. * ov-str-mat.cc (octave_char_matrix_str::load_ascii): Likewise. 2004-12-20 John W. Eaton * pt-idx.cc (tree_index_expression::has_magic_end): Return true if any argument list element has a magic end token. 2004-12-03 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.64. 2004-12-03 Teemu Ikonen * file-io.cc: Doc string fixes. 2004-12-02 David Bateman * input.cc (get_user_input): Only set nm and line for debugging if both debug is true and curr_caller_function is non-null. 2004-12-02 David Bateman * ls-mat5.cc (arrayclasstype): Add mxINT64_CLASS, mxUINT64_CLASS, mxFUNCTION_CLASS enum values. (read_mat5_integer_data): New template function. (OCTAVE_MAT5_INTEGER_READ): New macro. (read_mat5_binary_element): Handle reading integer types. Eliminate automatic conversion from int to double. (write_mat5_integer_data): New template function. Instantiate it for the 8 integer data types (save_mat5_binary_element): Handle integer data types. * load-save.cc (Fload): Check file existence here. If file does not exist, append ".mat" to name and try again. (get_file_format): Delete check for file existence. 2004-11-30 John W. Eaton * Makefile.in (oct-gperf.h): Use -L C++ instead of -L ANSI_C. Use -Z octave_kw_hash option, delete -H and -N options. * lex.l (is_keyword_token): Use octave_kw_hash::in_word_set instead of octave_kw_lookup. (is_keyword): Likewise. 2004-11-22 John W. Eaton * pt-arg-list.cc (tree_argument_list::convert_to_const_vector): Check to see whether object is a function or function handle instead of constant. 2004-11-19 John W. Eaton * ov-str-mat.cc (octave_char_matrix_str::do_index_op): Skip indexing operation if indices are invalid. * pr-output.cc (set_range_format, set_complex_matrix_format, set_complex_format, set_real_matrix_format, set_real_format): Also specify std::ios::fixed for bank format. 2004-11-17 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.63. (OCTAVE_API_VERSION): Now api-v12. 2004-11-17 David Bateman * pt-arg-list.cc (F__end__): Ask dv for the number of elements instead indexed_object. 2004-11-16 David Bateman * ov.h (octave_value::numel): Now virtual. Call rep->numel (). * ov.cc (octave_value::numel): Delete. * ov-base.h (octave_base_value::numel): New function. 2004-11-12 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.62. 2004-11-09 John W. Eaton * OPERATORS/op-int-concat.cc: New file for mixed integer/other concatentation operators. * Makefile.in (INTTYPE_OP_XSRC): Add it to the list. * ops.h (DEFNDCATOP_FN2): New macro. * OPERATORS/op-int.h (OCTAVE_CONCAT_FN2, OCTAVE_INSTALL_CONCAT_FN2, OCTAVE_DOUBLE_INT_CONCAT_FN, OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN, OCTAVE_INT_DOUBLE_CONCAT_FN, OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN): New macros. 2004-11-09 David Bateman * Cell.cc (concat): Delete. (Cell::concat): New method. * Cell.h: Provide decls. * oct-map.cc (concat): Delete (Octave_map::concat): New method. * oct-map.h: Provide decls. * ov.h (typedef octave_value (*cat_op_fcn) (octave_value&, const octave_value&, const Array&): Change definition of cat_op_fcn so first argument is not constant. * ops.h (CATOPDECL): First arg is no longer constant. (DEFCATOP_FN, DEFNDCATOP_FN): Change to use new concat methods. * OPERATORS/op-chm.cc, OPERATORS/op-str-m.cc, OPERATORS/op-str-s.cc, OPERATORS/op-str-str.cc (DEFCATOP): Change explicit concat functions to use new concatenation methods. 2004-11-05 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.61. * DLD-FUNCTIONS/det.cc (det): Always compute rcond so we can detect numerically singular matrices. 2004-11-04 John W. Eaton * pt-colon.cc (tree_colon_expression::line, tree_colon_expression::column): New functions. * pt-colon.h: Provide decls. * oct-stream.cc (octave_stream::seek (long, int)): Return error (but leave file position unchanged) for attempt to seek beyond end of file. * DLD-FUNCTIONS/inv.cc (Finv): Check rcond value returned from LAPACK routines, and be careful to avoid optimizing away the 1+rcond == 1.0 check. * DLD-FUNCTIONS/det.cc (Fdet): Likewise. 2004-11-03 John W. Eaton * data.cc (Fsize): Return 1 if requested dimension is larger than the number of dimensions of the given object. 2004-11-01 Claude Lacoursiere a * ls-hdf5.cc (read_hdf5_data): Expect num_obj to be in distinct group. * ov-cell.cc (octave_cell::load_hdf5): Likewise. * ov-list.cc (octave_list::load_hdf5): Likewise. * ov-struct.cc (octave_struct::load_hdf5): Likewise. 2004-11-01 David Bateman * DLD-FUNCTIONS/filter.cc (filter (MArray&, MArray&, MArrayN&, MArrayN&, int)): The variable si is now at least 2-D. (Ffilter): Force si to be 2-D, while allowing arbitrary vector orientation. 2004-11-01 John W. Eaton * data.cc (INSTANTIATE_EYE): New macro. Use it to instantiate identity matrix functions for various matrix types. * variables.cc (do_who): Fix typo in for loop. 2004-10-28 John W. Eaton * ls-mat5.cc (save_mat5_binary_element): Save structure elements in correct order. 2004-10-26 John W. Eaton * ov-fcn.h (octave_function::octave_va_arg): No longer const. 2004-10-22 John W. Eaton * DLD-FUNCTIONS/filter.cc: Remove some unnecessary parens. 2004-10-22 David Bateman * DLD-FUNCTIONS/filter.cc (filter (MArray&, MArray&, MArrayN&, MArrayN&, int)): If value to filter is dimensionality 2 it might still be a vector, use special case. 2004-10-21 John W. Eaton * ov-base.cc (INT_CONV_METHOD): Apply saturation semantics here too. 2004-10-19 John W. Eaton * ov-range.h (octave_range::write): New function. 2004-10-18 John W. Eaton * symtab.cc (symbol_record::dimensions_string_req_first_space, symbol_record::make_dimensions_string): Use dims() for all objects. 2004-10-18 Oyvind Kristiansen * symtab.cc (symbol_table::parse_whos_line_format): Handle size-of-parameter and center-specific format specifiers. 2004-10-18 John W. Eaton * pt-plot.cc (handle_plot_data): If plotting data from file, always use "using" clause. 2004-10-12 David Bateman * pt-mat.cc (tm_row_const::tm_row_const_rep::do_init_element, tm_const::init): Dimensionality of matrices not necessarily the same. Check before comparing. 2004-10-06 John W. Eaton * pt-fcn-handle.h (tree_fcn_handle::name): New function. 2004-10-01 John W. Eaton * ov-range.h (octave_range::valid_as_scalar_index): Ensure int value. (octave_range::valid_as_zero_index): Likewise. * ov-scalar.h (octave_scalar::valid_as_scalar_index): Ensure int value. (octave_scalar::valid_as_zero_index): Likewise. 2004-09-24 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.60. (OCTAVE_API_VERSION): Now api-v11. * OPERATORS/op-int.h (OCTAVE_MM_INT_OPS): Include missing matrix by int matrix ops. (OCTAVE_INSTALL_MM_INT_OPS): Install them. * OPERATORS/op-i64-i64.cc: Define and install missing int64 by matrix and scalar ops. 2004-09-24 David Bateman * ov-fcn-inline (Finline): Attempt better auto-detection of symbols that should be recognized as arguments. 2004-09-24 John W. Eaton * ov-str-mat.cc (default_numeric_conversion_function): Return scalar object if numel == 1. 2004-09-23 John W. Eaton * ops.h (DEFSTRDBLCONVFN): New macro. * OPERATORS/op-double-conv.cc: Use it to define new conversion op. Define new range to double matrix conversion. (install_int_conv_ops): Install new ops. * ops.h (DEFSTRINTCONVFN): New macro. * OPERATORS/op-int-conv.cc: Use it to define new conversion ops. (install_int_conv_ops): Install them. * (OCTAVE_SS_INT_OPS2, OCTAVE_SM_INT_OPS2, OCTAVE_MM_INT_OPS2, OCTAVE_INSTALL_SS_INT_OPS2, OCTAVE_INSTALL_SM_INT_OPS2, OCTAVE_INSTALL_MS_INT_OPS2, OCTAVE_INSTALL_MM_INT_OPS2): Delete unused macros. * OPERATORS/op-int.h (OCTAVE_SS_INT_BOOL_OPS): New args Z1 and Z2. (OCTAVE_SS_INT_OPS): Pass appropriately typed zero values to OCTAVE_SS_INT_BOOL_OPS. * OPERATORS/op-i64-i64.cc, OPERATORS/op-ui64-ui64.cc: Likewise. * pr-output.cc (pr_plus_format): Now template. Specialize for Complex. (octave_print_internal): Lookup print_conv_type using octave_int, not just T. * ov-struct.cc (octave_struct::subsref): Pass skip to next_subsref. * oct-stream.cc (do_read): Hitting EOF should not be an error. 2004-09-22 John W. Eaton * pt-plot.cc (send_to_plot_stream): Skip automatic replot if in multiplot mode. * variables.cc (get_global_value): New arg, silent. * variables.h (get_global_value): Default value for silent arg is false. 2004-09-22 David Bateman * ov-fcn-inline.cc (Finline): When called with a single arg, derive argument of inline function in a compatible manner. 2004-09-22 Federico Zenith * DLD-FUNCTIONS/qz.cc (Fqz): New @tex section(s) in doc string for better formating of printed documentation. Use @var in doc string. * DLD-FUNCTIONS/time.cc (Fstrftime): Fix typo in doc string. * error.cc (Flasterr, Flastwarn): Likewise. * mappers.cc (Farg, Fasinh, Fatanh, Ffinite, Fsin, Fsinh, Ftan): Likewise. * file-io.cc (Fmktemp): Likewise. * pt-plot.cc (symbols_of_pt_plot): Fix typos in doc string for gnuplot_has_frames. * input.cc (symbols_of_input): Replace --echo-input with new --echo-commands in PS4 doc string. * pt-assign.cc (symbols_of_pt_assign): Mark print_rhs_assign_val as built-in in doc string. * symtab.cc (symbols_of_symtab): Mark variables_can_hide_functions as built-in in doc string. 2004-09-21 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.59. * oct-fstrm.h (octave_fstream::octave_fstream, octave_fstream::create): Set default float format to actual native format, not flt_fmt_native. * oct-iostrm.h (octave_base_iostream::octave_base_iostream, octave_istream::octave_istream, octave_ostream::octave_ostream): Likewise. * oct-prcstrm.h (octave_iprocstream::octave_iprocstream, octave_oprocstream::octave_oprocstream, octave_iprocstream::create, octave_oprocstream::create): Likewise. * oct-stdstrm.h (octave_stdiostream::octave_stdiostream, octave_stdiostream::create): Likewise. * oct-stream.h (octave_base_stream::octave_base_stream): Likewise. * oct-strstrm.h (octave_base_strstream::octave_base_strstream, octave_istrstream::octave_istrstream, octave_istrstream::create): Likewise. 2004-09-21 David Bateman * data.cc (Freshape): Allow a single empty dimension argument to flag unknown dimension and calculate its value from the other dimensions. 2004-09-21 John W. Eaton * symtab.h (symbol_record::~symbol_record): Delete definition if count goes to zero. * symtab.cc (symbol_table::~symbol_table): Move here from symtab.h. Call delete on each symbol record in the table instead of just clearing them. 2004-09-17 David Bateman * DLD-FUNCTIONS/sort.cc (ascending_compare, descending_compare): Now templates (avoids g++ 3.4.x compile problems). Fix other uses of these functions to also treat them as templates. (mx_sort): For unsigned EIGHT_BYTE_INT versions correct the test for the position of NaN. Problems when mode was DESCENDING or UNDEFINED. Use static_cast (dim) rather than (unsigned int) dim. (IFloatFlip): Now static. 2004-09-17 David Bateman * DLD-FUNCTIONS/det.cc (Fdet): Only compute estimate of the condition number if requested as output. * DLD-FUNCTIONS/schur.cc (Fschur): Only compute unitary matrix if requested as output. 2004-09-17 John W. Eaton * ov-fcn-inline.cc (octave_fcn_inline::octave_fcn_inline): Call eval_string instead of feval ("eval", ...). Construct anonymous function handle to avoid going through the symbol table. * ov-fcn-handle.h (octave_fcn_handle::fcn_val): New function. (octave_fcn_handle::octave_fcn_handle (const std:string&)): New constructor. 2004-09-16 John W. Eaton * parse.y (frob_function): Clear id_name from curr_sym_tab, not top_level_sym_tab. * symtab.cc (maybe_list): Count sizes using size_t, not int. * variables.cc (symbol_out_of_date): Always look in LOADPATH. 2004-09-15 John W. Eaton * OPERATORS/op-int-conv.cc: Define and install bool to int conversions. * OPERATORS/op-double-conv.cc: Define and install bool to double conversions. * ov.cc (octave_value::assign): Handle subsref for containers. * oct-lvalue.cc (octave_lvale::value): Likewise. * DLD-FUNCTIONS/sort.cc (mx_sort): Return octave_value, not octave_value list. 2004-09-15 David Bateman * ov.cc (octave_value::octave_value (const ArrayN&, bool)): New Constructor . * ov.h: Provide decl. * DLD-FUNCTIONS/sort.cc (sortmode): New enum to define sort direction. (template class vec_index): New class to contain values and index for indexed sorts, replacing all previous struct versions. Instantiate for double, Complex, char and octave_value. (template static octave_value_list mx_sort (ArrayN &, int, sortmode)): New templated version of mx_sort replacing all previous versions, but specific to non indexed sorts. Instantiate for char and double if not IEEE754. (template <> static octave_value_list mx_sort (ArrayN &, int, sortmode)): Specialized function of mx_sort of IEEE754. (template static octave_value_list mx_sort_indexed (ArrayN &, int, sortmode)): New templated version of mx_sort for indexed sorts. Instantiate for double, Complex, char and octave_value. (ascending_compare, descending_compare): Comparison functions for double, char, vec_index *, vec_index *, vec_index *, vec_index. Fix Complex comparison operator to sort by arg of values if absolute values are equal. (Fsort): Update docs for new mode argument and for sorting of strings and cell arrays of strings. Implement mode argument to define ascending and descending sorts. Include sorting of cell arrays of strings. Adapt for new templated versions of the mx_sort function. 2004-09-15 John W. Eaton * ov-cell.cc (octave_cell::subsref): Pass nargout to next_subsref. * ov-builtin.cc (octave_builtin::subsref): Likewise. * ov-fcn-handle.cc (octave_fcn_handle::subsref): Likewise. * ov-list.cc (octave_list::subsref): Likewise. * ov-mapper.cc (octave_mapper::subsref): Likewise. * ov-struct.cc (octave_struct::subsref): Likewise. * ov-usr-fcn.cc (octave_user_function::subsref): Likewise. * ov-struct.cc, ov-struct.h (octave_struct::subsref (const std::string&, const std::list&, int)): Define this version. (octave_struct::subsref (const std::string&, const std::list&)): Panic in this version. * ov-list.cc, ov-list.h: Likewise. * ov-cell.cc, ov-cell.h: Likewise. * ov.cc (octave_value::subsref (int, const std::string&, const std::list&, size_t)): New function. * ov.h: Provide decl. * ov-cell.h (octave_cell::is_constant): Return false. * ov-struct.h (octave_struct::is_constant): Delete. * ov-list.h (octave_list::is_constant): Delete. 2004-09-14 David Bateman * DLD-FUNCTIONS/sort.cc (mx_sort (charNDArray&, bool, int)): New function to sort character strings. (Fsort): Handle character strings. 2004-09-11 John W. Eaton * ov-fcn-handle.cc (octave_fcn_handle::save_ascii): Write directly to OS. (octave_fcn_handle::load_ascii, octave_fcn_handle::load_binary, octave_fcn_handle::load_hdf5): Check parse status after calling eval_string. Don't dereference fh unless it is valid. 2004-09-11 David Bateman * ov-fcn-handle.cc (octave_fcn_handle::save_ascii, octave_fcn_handle::load_ascii, octave_fcn_handle::save_binary, octave_fcn_handle::load_binary, octave_fcn_handle::save_hdf5, octave_fcn_handle::load_hdf5): New functions. * ov-fcn-handle.h: Provide decls. * ov-fcn-inline.cc (octave_fcn_inline::load_ascii): Allow spaces in saved function. (octave_fcn_inline::save_hdf5): Properly close all HDF5 objects. * ls-oct-ascii.cc (read_ascii_data): Check return type of .load_ascii for errors reading the variables * variables.cc (lookup_function_handle, clear_variable, clear_symbol): New functions. * variables.h: Provide decls. 2004-09-10 John W. Eaton * ov-builtin.cc (octave_builtin::do_multi_index_op): Use unwind protect frame instead of a single unwind_protect::run. * ov-mapper.cc (octave_mapper::do_multi_index_op): Likewise. * data.cc (fill_matrix, identity_matrix): Also allow logical data type. 2004-09-10 David Bateman * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::double_value, OCTAVE_VALUE_INT_MATRIX_T::scalar_value, OCTAVE_VALUE_INT_SCALAR_T::double_value, OCTAVE_VALUE_INT_SCALAR_T::scalar_value): New functions. 2004-09-10 John W. Eaton * ov-base-scalar.h (octave_base_scalar::clone, octave_base_scalar::empty_clone): New functions. 2004-09-09 John W. Eaton * pt-pr-code.h (tree_print_code::newline): New optional arg, alt_nl. * pt-pr-code.cc (tree_print_code::newline): Use it if not printing newlines. (tree_print_code::visit_statement): If we printed ";", call newline with optional arg set to "". (tree_print_code::printing_newlines): New data member. (tree_print_code::tree_print_code): Initialize it. (tree_print_code::suspend_newline, tree_print_code::resume_newline): New functions. (tree_print_code::newline, tree_print_code::indent): Use it * ov-fcn-handle.cc (octave_fcn_handle::print_raw): Print code for anonymous function handles. 2004-09-08 John W. Eaton * ov-fcn-handle.cc (Ffunc2str, Ffunctions): Don't call substr(1) on fh_nm, since we no longer need to skip "@" in the name. * error.cc (pr_where): Do a better job of printing location info. * input.cc (get_user_input): Print location info before the debug prompt. From Keith Goodman . * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Save and set curr_caller_function and curr_caller_statement here. * ov-mapper.cc (octave_mapper::do_multi_index_op): Likewise. * ov-builtin.cc (octave_builtin::do_multi_index_op): Likewise. * pt-stmt.cc (curr_caller_statement): New variable. * pt-stmt.h: Provide decl. * toplev.cc (curr_caller_function): New variable. * toplev.h: Provide decl. * pt-arg-list.cc (convert_to_const_vector): Unwind-protect index_position before modifying it. Don't protect and set index_position unless stash_object is true. 2004-09-08 David Bateman * ov-fcn-inline.cc (octave_fcn_inline::save_ascii, octave_fcn_inline::load_ascii, octave_fcn_inline::save_binary, octave_fcn_inline::load_binary, octave_fcn_inline::save_hdf5, octave_fcn_inline::load_hdf5): New functions. * ov-fcn-inline.h: Provide decls. 2004-09-08 John W. Eaton * ov.h: Add octave_array_type_traits specialization for boolNDArray element type. 2004-09-07 John W. Eaton * oct-stream.cc: Instantiate octave_stream::write for Array. (octave_stream::read): Expand read_fptr_table to include dt_logical. * ov-bool.h (octave_bool::write): New function. * ov-bool-mat.h (octave_bool_matrix::write): New function. * ov-fcn-inline.h (octave_fcn_inline::octave_fcn_inline): New copy constructor. (octave_fcn_inline::clone, octave_fcn_inline::empty_clone): New functions. * ov-fcn-handle.h (octave_fcn_handle::octave_fcn_handle): New copy constructor. (octave_fcn_handle::clone, octave_fcn_handle::empty_clone): New functions. 2004-09-06 John W. Eaton * ov.cc (install_types): Call octave_fcn_inline::register_type. * version.h (OCTAVE_API_VERSION): Now api-v10. * OPERATORS/op-b-b.cc, OPERATORS/op-bm-bm.cc: Define and install unary plus and unary minus operators. * OPERATORS/op-int.h, OPERATORS/op-cm-cm.cc, OPERATORS/op-cs-cs.cc, OPERATORS/op-m-m.cc, OPERATORS/op-range.cc: Define and install unary plus operator. * ov.cc (unary_op_as_string): Handle op_uplus too. * parse.y (prefix_expr): Build unary plus op here instead of converting to no-op. (make_prefix_op): Accept op_uplus. 2004-09-03 John W. Eaton * OPERATORS/op-b-bm.cc (DEFCONV): Define bool scalar to bool matrix conversion. (install_b_bm_ops): Install it. Install conversion for assignment of bool matrix to indexed bool. * OPERATORS/op-b-b.cc (install_b_b_ops): Install conversion for assignment of bool to indexed bool. 2004-09-03 David Bateman * OPERATORS/op-b-b.cc, OPERATORS/op-b-bm.cc, OPERATORS/op-bm-b.cc, OPERATORS/op-bm-bm.cc: Modify concatenation between boolean types so that it returns a boolean. * ov-bool.cc (octave_bool::do_index_op): Return boolean matrix. * ov-intx.h (do_index_op (const octave_value_list&, int)): New function for indexed subsref of int types. 2004-09-03 John W. Eaton * OPERATORS/op-int.h (OCTAVE_SM_INT_OPS): Define int by double mixed comparison and bool ops. (OCTAVE_INSTALL_SM_INT_OPS): Install them. (OCTAVE_MS_INT_OPS): Define double by int mixed comparison and bool ops. (OCTAVE_INSTALL_MS_INT_OPS): Install them * OPERATORS/op-i8-i8.cc, OPERATORS/op-i16-i16.cc, OPERATORS/op-i32-i32.cc, OPERATORS/op-i64-i64.cc, OPERATORS/op-ui8-ui8.cc, OPERATORS/op-ui16-ui16.cc, OPERATORS/op-ui32-ui32.cc, OPERATORS/op-ui64-ui64.cc: Define and install various mixed-type operators. * OPERATORS/op-int.h (OCTAVE_MM_INT_OPS): Also define mixed int and double matrix comparison and bool ops. (OCTAVE_INSTALL_MM_INT_OPS): Install them. (OCTAVE_SS_INT_BOOL_OPS, OCTAVE_SM_INT_BOOL_OPS, OCTAVE_MS_INT_BOOL_OPS, OCTAVE_MM_INT_BOOL_OPS): Define logical AND and OR ops. (OCTAVE_INSTALL_SS_INT_BOOL_OPS, OCTAVE_INSTALL_SM_INT_BOOL_OPS, OCTAVE_INSTALL_MS_INT_BOOL_OPS, OCTAVE_INSTALL_MM_INT_BOOL_OPS): Install them. (OCTAVE_MM_INT_CMP_OPS, OCTAVE_MM_INT_BOOL_OPS): Accept prefix arg. (OCTAVE_MM_CONV): New macro. (OCTAVE_MM_INT_OPS): Use it to define complex matrix conversion. (OCTAVE_MIXED_INT_CMP_OPS, OCTAVE_MIXED_INT_BOOL_OPS): New macros. * OPERATORS/op-int.h (OCTAVE_MS_INT_OPS): Don't define indexed int matrix = complex scalar assignment ops. (OCTAVE_MS_INT_OPS): Don't define indexed int matrix = complex matrix assignment ops. (OCTAVE_SM_CONV): New macro. (OCTAVE_SM_INT_OPS): Use it to define int scalar -> (int|complex) matrix widening ops. (OCTAVE_RE_INT_ASSIGN_OPS, OCTAVE_CX_INT_ASSIGN_OPS): New macros. (OCTAVE_INT_OPS): Use them here. (OCTAVE_INSTALL_SS_INT_OPS): Install indexed int scalar = scalar and indexed int scalar = complex scalar assignment conversions. (OCTAVE_INSTALL_SM_INT_OPS): Install int scalar -> (int|complex) matrix widening ops. Install indexed int scalar = (int|real|complex) matrix assignment conversions. (OCTAVE_INSTALL_MS_INT_OPS): Install indexed int matrix = complex scalar assignment conversion. (OCTAVE_INSTALL_MM_INT_OPS): Install int matrix -> complex matrix widening op. Install indexed int matrix = complex matrix assignment conversion. (OCTAVE_INSTALL_RE_INT_ASSIGN_OPS, OCTAVE_INSTALL_CX_INT_ASSIGN_OPS): New macros. (OCTAVE_INSTALL_INT_OPS): Use them. * op-int.h: (OCTAVE_INSTALL_SM_INT_ASSIGNCONV): New macro. * OPERATORS/op-i8-i8.cc, OPERATORS/op-i16-i16.cc, OPERATORS/op-i32-i32.cc, OPERATORS/op-i64-i64.cc, OPERATORS/op-ui8-ui8.cc, OPERATORS/op-ui16-ui16.cc, OPERATORS/op-ui32-ui32.cc, OPERATORS/op-ui64-ui64.cc: Use it to define mixed size integer scalar/integer matrix assignment conversions. * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::complex_array_value, OCTAVE_VALUE_INT_SCALAR_T::complex_array_vale): New functions. 2004-09-02 John W. Eaton * DLD-FUNCTIONS/quad.cc (Fquad): Pass "__quad_fcn_" instead of "__quad_fcn__" to unique_symbol_name. * ov-fcn-inline.cc (octave_fcn_inline): Pass "__inline_" instead of "__inline__" to unique_symbol_name. * variables.cc (unique_symbol_name): Make better random symbol name. 2004-09-01 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.58. * Makefile.in (OP_INCLUDES): New variable. Include OPERATORS/op-int.h here. * Makefile.in (dist): Also link $(OP_INCLUDES). * Makefile.in (DISTFILES): Include $(EXTRAS) in the list. 2004-09-01 David Bateman * DLD-FUNCTION/quad.cc: Allow function handle and inline functions. Use a unique function name and delete it on exit. * ov.h (is_inline_function): New virtual function. * ov-fcn-inline.h (is_inline_function): New function. * ov-base.h (is_inline_function): New function. * ov-fcn-inline.cc (octave_fcn_handle::octave_fcn_handle): Use unique_symbol_name and clear_function instead of manipulating symbol table directly. * variables.cc (unique_symbol_name): New function. (clear_function): New function. * variables.h: Provide decls. * dynamic-ld.cc (do_clear_function): Rename from clear_function. 2004-09-01 John W. Eaton * OPERATORS/op-i8-i8.cc, OPERATORS/op-i16-i16.cc, OPERATORS/op-i32-i32.cc, OPERATORS/op-i64-i64.cc, OPERATORS/op-ui8-ui8.cc, OPERATORS/op-ui16-ui16.cc, OPERATORS/op-ui32-ui32.cc, OPERATORS/op-ui64-ui64.cc: Define and install mixed assignment ops. * op-int.h: Define mixed integer/double ops. Define simple division ops. * ov-complex.h (octave_complex_scalar): New typedef to simplify various macros where naming consistency matters. 2004-08-31 David Bateman * OPERATORS/op-int.h (ss_pow, ms_el_pow, mm_el_pow): New power functions. (sm_el_pow): Return correct type. (OCTAVE_SS_POW_OPS, OCTAVE_SM_POW_OPS, OCTAVE_MS_POW_OPS, OCTAVE_MM_POW_OPS): New macros to define the power operator over integer types. (OCTAVE_SS_INT_OPS, OCTAVE_SM_INT_OPS, OCTAVE_MS_INT_OPS, OCTAVE_MM_INT_OPS): Use the new macros for the power operators. (OCTAVE_INSTALL_SS_INT_OPS, OCTAVE_INSTALL_MS_INT_OPS, OCTAVE_INSTALL_MM_INT_OPS): Install new power functions. * OPERATORS/op-int-conv.cc (INT_CONV_FUNCTIONS): Correct return types for unsigned integer scalars and signed integer matrices. * ov-type-conv.h (OCTAVE_TYPE_CONV_BODY3): Conversion betwen same types returns the original value. * bitfcns.cc (BITOP): Fix for mixed scalar/matrix ops. Allow octave_range as an argument, by using class_name rather than type_id to test. 2004-08-31 John W. Eaton * pr-output.cc (pr_int): Also handle bank_format. (octave_print_internal (std::ostream& os, const intNDArray&, bool, int)): Likewise. 2004-08-31 David Bateman * pr-output.cc (pr_int(std::ostream, const T&, int)): New template function to print formatted integer types. Instantiate it for all of the integer types. (octave_print_internal (std::ostream, const intNDArray&, bool, int)): Use pr_int. Align output up in columns, and check for free_format or plus_format. (octave_print_internal (std::ostream, const octave_int&, bool)): Use pr_int. Check for free_format and plus_format. * ls-hdf5.cc (hdf5_read_next_data): When importing hdf5 files, allow structures and lists (for backward compatibility). Also allow importation of integer types into octave int and uint types. 2004-08-31 John W. Eaton * data.cc (fill_matrix, identity_matrix): Convert class name to oct_data_conv::data_type and switch on that. (identity_matrix (int, int)): New template. (identity_matrix (int, int, const std::string&)): Use it. * ov.h (octave_type_traits, octave_array_type_traits): Move here. * oct-stream.cc: From here. 2004-08-31 David Bateman * data.cc (Fzeros, Fones, Feye): Update help text for optional class argument. (static octave_value identity_matrix (int, int, const std::string&)): New function to create identity matrices with an arbitrary type. (Feye): Call new version of identity matrix function, even for scalars. (static octave_value fill_matrix (const octave_value_list&, double, const char *)): Update to allow arbitrary classes of matrices to be created. 2004-08-31 John W. Eaton * ls-mat5.cc (read_int): New function. * oct-stream.cc (octave_base_stream::do_read, octave_base_stream::read, octave_base_stream::write): Delete. * oct-stream.h: Delete decls. * oct-stream.cc (octave_stream::read): Handle block_size and separate input/output types. (octave_stream::write): Handle block_size and various input types. (octave_type_traits, octave_array_type_traits): New traits classes. (do_read): New templates to read data and perform type conversion. (octave_stream::write (const Array&, int, oct_data_conv::data_type, int, oct_mach_info::float_format), do_write, write_int): New templates to write ints and perform type conversion. Instantiate for various Octave types. * ov.cc (octave_value::write): New function. * ov.h: Provide decl. * ov-base.cc (octave_base_value::write): New function. * ov-base.h: Provide decl. * ov-complex.h (octave_complex::write): New function. * ov-cx-mat.h (octave_complex_matrix::write): New function. * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::write): New function. (OCTAVE_VALUE_INT_SCALAR_T::write): New function. * ov-re-mat.h (octave_matrix::write): New function. * ov-scalar.h (octave_scalar::write): New function. * ov-str-mat.h (octave_char_matrix_str::write): New function. * file-io.cc (Ffread): Handle block size, to/from format in precision argument. (Ffwrite): Handle block size in precision argument. 2004-08-25 David Bateman * ov-cell.cc (octave_cell::subsasgn): Delete elements of cell array when type is "(" and rhs is empty. 2004-08-09 John W. Eaton * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::index_vector, OCTAVE_VALUE_INT_SCALAR_T::index_vector): New functions. 2004-08-06 David Bateman * OPERATORS/op-struct.cc: New file. * ov-struct.h (octave_struct::resize (const dim_vector&)): New function. * oct-map.h (Octave_map::resize (const dim_vector&)): New function. * ov-map.cc (Octave_map::reshape): Correct return for same sized reshape. (Octave_map::resize (const dim_vector&)): New function. (concat (const Octave_map&, const Octave_map&, const Array&)): Complete concatenation function. * Makefile.in (OP_XSRC): Include op-struct.cc in the list. 2004-08-05 John W. Eaton * pt-stmt.h (tree_statement::set_command, (tree_statement::set_expression): New functions. * parse.y (param_list_beg): Handle pushing new symbol table context for anonymous function handle parameter lists here. (anon_fcn_handle): New non-terminal. (expression): Include anon_fcn_handle here. (make_anon_fcn_handle): New static function. 2004-08-05 David Bateman * ov.cc (octave_value::fcn_inline_value): New virtual function. * ov.h (octave_value::fcn_inline_value): Provide decl. * ov-base.cc (octave_base_value::fcn_inline_value): New function * ov-base.h (octave_base_value::fcn_inline_value): Provide decl. * ov-fcn-handle.cc (octave_fcn_handle::octave_fcn_handle (const std::string&, const string_vector&, const std::string&), octave_fcn_handle::convert_to_str_internal, Finline, Fargnames, Fformula, Fvectorize): Delete. (octave_fcn_handle::print_raw): Remove inline case. * ov-fcn-handle.h (octave_fcn_handle::fcn_type, octave_fcn_handle::octave_fcn_handle (const std::string&, const string_vector&, const std::string&), octave_fcn_handle::inline_fcn_name, octave_fcn_handle::inline_fcn_text, octave_fcn_handle::inline_fcn_arg_names, octave_fcn_handle::is_inline, octave_fcn_handle::convert_to_str_internal, octave_fcn_handle::typ, octave_fcn_handle::iftext, octave_fcn_handle::ifargs): Delete constructors, functions, and data members (moved to ov-fcn-inline.h). * Makefile.in: Include ov-fcn-inline.h and ov-fcn-inline.cc where appropriate. * ov-fcn-inline.h, ov-fcn-inline.cc: New class. 2004-08-05 John W. Eaton * ov-base-int.cc (octave_base_int_matrix::save_ascii, octave_base_int_matrix::load_ascii, octave_base_int_matrix::save_binary, octave_base_int_matrix::load_binary, octave_base_int_matrix::save_hdf5, octave_base_int_matrix::load_hdf5, octave_base_int_matrix::try_narrowing_conversion, octave_base_int_scalar::print_raw, octave_base_int_scalar::save_ascii, octave_base_int_scalar::load_ascii, octave_base_int_scalar::save_binary, octave_base_int_scalar::load_binary, octave_base_int_scalar::save_hdf5, octave_base_int_scalar::load_hdf5): Sprinkle with this-> as needed. * Makefile.in (EXTRAS): New macro. Move ov-base-int.cc here from OV_INTTYPE_SRC. (INCLUDES_FOR_INSTALL): New macro. (install-inc, uninstall): Use it instead of INCLUDES. * variables.h (symbol_exist): Default for type is now "any". 2004-08-05 David Bateman * ov-fcn-handle.cc (octave_fcn_handle (const std::string&, const string_vector&, const std::string&)): New constructor for inline function handles. (octave_fcn_handle::print_raw): Allow inline functions to be printed. (octave_fcn_handle::convert_to_str_internal): New function to allow Fchar to work on inlined function handles. (Finline, Fformula, Fargnames, Fvectorize): New functions. * ov-fcn-handle.h (octave_fcn_handle (const std::string&, const string_vector&, const std::string&)): Provide decl. (octave_fcn_handle::convert_to_str_internal): Provide decl. (fcn_type): New enum for the type of function handle. (octave_fcn_handle::inline_fcn_text, octave_fcn_handle::is_inline, octave_fcn_handle::inline_fcn_arg_names): New functions. (octave_fcn_handle::typ, octave_fcn_handle::iftext, octave_fcn_handle::ifargs): New private variables for inline functions. 2004-08-04 John W. Eaton * parse.y (fcn_handle): Recognize '@' FCN_HANDLE rather than just FCN_HANDLE. Decrement lexer_flags.looking_at_function_handle here. * lex.h (lexical_feedback::looking_at_function_handle): New data member. (lexical_feedback::init): Initialize it. * lex.l (handle_identifier): Only reject keywords if we are looking at a function handle. ("@"): Recognize this separately from what follows. Increment lexer_flags.looking_at_function_handle here. * ov-fcn-handle.h (octave_fcn_handle::octave_fcn_handle (octave_function*, const std::string)): Delete. * ov.h, ov.cc (octave_value::octave_value (octave_function *)): Delete. (octave_value::octave_value (octave_function *, const std::string)): Delete. * ov-fcn-handle.h (octave_fcn_handle::fcn): Now octave_value, not pointer to octave_function. (octave_fcn_handle::octave_fcn_handle (const octave_value&, const std::string)): New constructor. * variables.cc (lookup_function): Return octave_value, not pointer to octave_function. Change all uses. (lookup_user_function): Return octave_value, not pointer to octave_user_function. Change all uses. 2004-08-03 John W. Eaton * ov-usr-fcn.cc (octave_user_fcn::do_multi_index_op): Call install_automatic_vars here. (octave_user_fcn::octave_user_fcn): Not here. (install_automatic_vars): Don't mark argn_sr, nargin_sr, nargout_sr, or varargin_sr as static. * oct-stream.cc (octave_scan): Avoid need for pushing two characters back on the input stream. 2004-08-02 John W. Eaton * oct-stream.cc (octave_scan): For %i format, recognize numbers with leading 0x or 0X as hex and leading 0 as octal. * OPERATORS/op-fcn-handle.cc: Delete. * Makefile.in (OP_XSRC): Delete it from the list. * pr-output.cc (octave_print_internal (std::ostream&, const std::string&, bool, int): New function. * ov-fcn-handle.cc (octave_value::subsref): New function. * ov-fcn-handle.h (class fcn_handle_elt, class fcn_handle_array): Delete. (class octave_fcn_handle): Derive from octave_base_value, not octave_base_matrix. * ov-cx-mat.cc (try_narrowing_conversion): Also allow complex to real conversion for N-d arrays. 2004-07-30 John W. Eaton * lex.l ([^#% \t\r\n\;\,\"\'][^ \t\r\n\;\,]*{S}*): Also recognize \r as a word list separator. 2004-07-27 John W. Eaton * bitfcns.cc (DO_BITSHIFT): Pass mask to bitshift. (bitshift (double, int, EIGHT_BYTE_INT): New arg, mask. (DO_UBITSHIFT, DO_SBITSHIFT): Use bitshfit, not operator >>. Use nbits function from octave_int type to set bits_in_type. * ov-struct.cc (Fisfield): Only print usage message if number of arguments is incorrect. Return false for invalid arguments. From Andy Adler . 2004-07-27 David Bateman * Cell.cc (Cell::index): Quit early if an error occurs when creating index vector object. * ov-int8.cc, ov-int16.cc, ov-int32.cc, ov-int64.cc, ov-uint8.cc, ov-uint16.cc, ov-uint32.cc, ov-uint64.cc (HDF5_SAVE_TYPE): Define for HDF5 native format for the type. * ov-base-int.h (save_ascii, save_binary, load_binary, save_hdf5): Delete unused arguments. * ov-base-int.cc (octave_base_int_matrix::save_ascii, octave_base_int_matrix::save_binary, octave_base_int_scalar::save_ascii, octave_base_int_scalar::save_binary, octave_base_int_scalar::save_hdf5): Delete unused argument. * ov-base-int.cc (octave_base_int_matrix::save_binary, octave_base_int_matrix::load_binary, octave_base_int_matrix::save_hdf5, octave_base_int_matrix::load_hdf5, octave_base_int_scalar::save_ascii, octave_base_int_scalar::load_ascii, octave_base_int_scalar::save_binary, octave_base_int_scalar::load_binary, octave_base_int_scalar::save_hdf5, octave_base_int_scalar::load_hdf5): Implement missing functions. 2004-07-23 David Bateman * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::array_value, OCTAVE_VALUE_INT_SCALAR_T::array_value): new methods to extract array value from integer types. * bitfcns.cc (BITOPX): New Macro renamed from BITOP. (BITOP): Alter to allow different types and call BITOP appropriately. (DO_SBITSHIFT, DO_UBITSHIFT): New macros for signed, unsigned bitshifts. (DO_BITSHIFT): Test for shift of more bits than in type, which is undefined. Generalize to allow double args as well. (Fbitshift): Add int and double types. (Fbitmax): Return 53 bit value which conforms to IEEE754 double mantissa. (Fintmax, Fintmin): New functions. (Fbitget, Fbitset, Fbitcmp): Delete. * OPERATORS/op-int.h: Add sm_el_pow function * ops.h (CATOPDECL, DEFCATOPX, DEFCATOP, DEFCATOP_FB, DEFNDCATOP_FN, CATOP_NONCONFORMANT, INSTALL_CATOP): New macros. * OPERATORS/op-b-b.cc, OPERATORS/op-b-bm.cc, OPERATORS/op-bm-b.cc, OPERATORS/op-bm-bm.cc, OPERATORS/op-cell.cc, OPERATORS/op-chm.cc, OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc, OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc, OPERATORS/op-cs-cm.cc, OPERATORS/op-cs-cs.cc, OPERATORS/op-cs-m.cc, OPERATORS/op-cs-s.cc, OPERATORS/op-m-cm.cc, OPERATORS/op-m-cs.cc, OPERATORS/op-m-m.cc, OPERATORS/op-m-s.cc, OPERATORS/op-range.cc, OPERATORS/op-s-cm.cc, OPERATORS/op-s-cs.cc, OPERATORS/op-s-m.cc, OPERATORS/op-s-s.cc, OPERATORS/op-str-str.cc, OPERATORS/op-str-m.cc, OPERATORS/op-str-s.cc (CATOPDECL, DEFCATOPX, DEFCATOP, DEFCATOP_FB, DEFNDCATOP_FN, CATOP_NONCONFORMANT, INSTALL_CATOP): Use them to define concatenation functions. * OPERATORS/op-int.h (OCTAVE_CONCAT_FN, OCTAVE_INSTALL_CONCAT_FN): New macros to define and install concatentaion functions for int/uint types. * TEMPLATE-INST/Array-tc.cc (INSTANTIATE_ARRAY_CAT): Delete. * pt-mat.cc (tm_row_const::tm_row_const_rep::do_init_element): Also append empty elements to the list of elements to be parsed. (tree_matrix::rvalue): Use new concatenation binary operators. * data.cc (cat_add_dims): Delete (now dim_vector::concat). (do_cat): Use new concatenation binary operators. * ov-typeinfo.cc (cat_op_fcn): Instantiate the array of cat functions. (register_cat_op, do_register_cat_op, do_lookup_cat_op): New functions. (cat_ops): Lookup table of binary concatentaion operators. * ov-typeinfo.h (lookup_cat_op): New function. * ov.cc (gripe_cat_op, gripe_cat_op_conv, do_cat_op): New functions. * ov.h (cat_op_fcn): Definition. (resize, do_cat_op): New functions. * ov-intx.h (resize): New_function * version.h (OCTAVE_API_VERSION): Bump version to api-v9. * Cell.cc, Cell.h, oct-map.cc, oct-map.h (cat): Delete. (concat): New function. * Cell.cc, Cell.h (insert): New function * ov-base.cc, ov-base.h, ov-scalar.h, ov-complex.h, ov-bool.h, ov-range.h, ov-base-mat.h, (resize): New function. 2004-07-23 John W. Eaton * symtab.cc (whos_parameter): Move decl here, from symtab.h. 2004-07-23 Oyvind Kristiansen * symtab.cc (symbol_record::subsymbols_list): New method. (symbol_record::maybe_list): Call to subsymbols_list and merge result with the original list of symbols. * symtab.cc (symbol_record::make_dimensions_string): New method. (symbol_record::print_symbol_info_line): Print N-d info. Output for long format now under control of format string. (symbol_table::maybe_list): Headers to whos listing updated. Also print footer info. (symbol_table::print_descriptor): Method printing the header of whos listings. (symbol_table::parse_whos_line_format): New method. (whos_line_format, Vwhos_line_format): New built-in variables. (symbols_of_symtab): DEFVAR them. (symbol_record::nelem, symbol_record::symbol_def::nelem, symbol_record::byte_size, symbol_record::symbol_def::byte_size): New methods. (symbol_record::dimensions_string_req_first_space): New method. (symbol_record::dimensions_string_req_total_space): New method. * symtab.h (whos_parameter): New struct. Container for one parameter in whos_line_format. 2004-07-22 Paul Kienzle * DLD-FUNCTIONS/dassl.cc (Fdassl): Fix doc string. * ov-struct.cc (Fstruct): Likewise. * symtab.cc (Fdebug_symtab_lookups): Likewise. 2004-07-22 David Bateman * data.cc (Fsize): Return 1 for dimensions exceeding ndim. * ov.cc (octave_value::octave_value (const ArrayN)): New constructor. * ov.h: Provide decl. * ov-cx-mat.h (octave_complex_matrix (const ArrayN&)): New constructor. * ov-re-mat.h (octave_complex_matrix (const ArrayN&)): New constructor. * ov-re-mat.h (octave_matrix(const ArrayN&)): New constructor * pt-loop.cc (DO_ND_LOOP): New macro for use of NDArray in for loop. (tree_simple_for_command::eval): Use it, and allow iteration over cell arrays. 2004-07-12 John W. Eaton * ov-intx.h: N-d array and scalar extractor functions take no args. * ov.h (octave_value::int8_scalar_value, octave_value::int16_scalar_value, octave_value::int32_scalar_value, octave_value::int64_scalar_value, octave_value::uint8_scalar_value, octave_value::uint16_scalar_value, octave_value::uint32_scalar_value, octave_value::uint64_scalar_value): New functions. * ov-base.cc (octave_base_value::int8_scalar_value, octave_base_value::int16_scalar_value, octave_base_value::int32_scalar_value, octave_base_value::int64_scalar_value, octave_base_value::uint8_scalar_value, octave_base_value::uint16_scalar_value, octave_base_value::uint32_scalar_value, octave_base_value::uint64_scalar_value): New functions. * ov-base.h: Provide decls. * lex.l: (Vtoken_count): New static variable. (COUNT_TOK_AND_RETURN): New macro. Use it everywhere a token is returned to the parser. (F__token_count__): New function. 2004-06-25 John W. Eaton * OPERATORS/op-int-conv.cc: Add conversions for range type. 2004-06-17 John W. Eaton * bitfcns.cc (bitfcns): New file. * Makefile.in (DIST_SRC): Add it to the list. 2004-06-16 John W. Eaton * OPERATORS/op-int.h: New file. * OPERATORS/op-i16-i16.cc, OPERATORS/op-i8-i8.cc, OPERATORS/op-ui32-ui32.cc, OPERATORS/op-i32-i32.cc, OPERATORS/op-int-conv.cc, OPERATORS/op-ui64-ui64.cc, OPERATORS/op-i64-i64.cc, OPERATORS/op-ui16-ui16.cc, OPERATORS/op-ui8-ui8.cc: Use new macros from op-int.h. 2004-06-14 John W. Eaton * pr-output.h, pr-output.cc (octave_print_conv): New traits class. (template void octave_print_internal (std::ostream&, const intNDArray&, bool, int), (template void octave_print_internal (std::ostream&, const octave_int&, bool)): New template functions. Instantiate versions for new int types. * ov-typeinfo.h (octave_value_typeinfo::type_conv_ops): New data member. (octave_value_typeinfo::register_type_conv_op, octave_value_typeinfo::lookup_type_conv_op, octave_value_typeinfo::do_register_type_conv_op, octave_value_typeinfo::do_lookup_type_conv_op): New functions. * ov-re-mat.cc (Fdouble): New function. * ov-range.h (octave_range::reshape): Reshape array_value, not matrix_value. * ov-base-scalar.h (octave_base_scalar::all, octave_base_scalar::any, octave_base_scalar::is_true): Use ST() instead of 0.0. * ov-base-mat.h (octave_base_matrix::byte_size): New function. * ops.h (INSTALL_COLNVOP, DEFCONVFNX, DEFDBLCONVFN, DEFCONVFN, DEFCONVFN2): New macros. * DLD-FUNCTIONS/filter.cc (Ffilter): Kluge type conversions. * ov.cc (install_types): Register new integer types. * ov.h, ov.cc (octave_value::octave_value (const octave_int8&), octave_value::octave_value (const octave_uint8&), octave_value::octave_value (const octave_int16&), octave_value::octave_value (const octave_uint16&), octave_value::octave_value (const octave_int32&), octave_value::octave_value (const octave_uint32&), octave_value::octave_value (const octave_int64&), octave_value::octave_value (const octave_uint64&), octave_value::octave_value (const int8NDArray&), octave_value::octave_value (const uint8NDArray&), octave_value::octave_value (const int16NDArray&), octave_value::octave_value (const uint16NDArray&), octave_value::octave_value (const int32NDArray&), octave_value::octave_value (const uint32NDArray&), octave_value::octave_value (const int64NDArray&), octave_value::octave_value (const uint64NDArray&)): New constructors. * ov.h (octave_value::internal_rep): New function. (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Also define static_type_id, static_type_name, and static_class_name functions. * Cell.h (Cell::reshape (const dim_vector&)): New forwarding function for return type conversion. * ov-int16.cc, ov-int16.h, ov-int32.cc, ov-int32.h, ov-int64.cc, ov-int64.h, ov-int8.cc, ov-int8.h, ov-uint16.cc, ov-uint16.h, ov-uint32.cc, ov-uint32.h, ov-uint64.cc, ov-uint64.h, ov-uint8.cc, ov-uint8.h, ov-type-conv.h, ov-int-traits.h, OPERATORS/op-int-conv.cc, OPERATORS/op-double-conv.cc, OPERATORS/op-i16-i16.cc, OPERATORS/op-i32-i32.cc, OPERATORS/op-i64-i64.cc, OPERATORS/op-i8-i8.cc, OPERATORS/op-ui16-ui16.cc, OPERATORS/op-ui32-ui32.cc, OPERATORS/op-ui64-ui64.cc, OPERATORS/op-ui8-ui8.cc: New files. Makefile.in: Add them to the appropriate lists. 2004-06-03 John W. Eaton * ov-fcn-handle.h (octave_function_handle::is_matrix_type, octave_function_handle::is_numeric_type, octave_function_handle::is_constant, octave_function_handle::is_true): New functions. (octave_function_handle::is_defined): Delete (inherited version is OK). 2004-06-03 David Bateman * DLD-FUNCTIONS/filter.cc: Fix for length(a)=1 && length(b)=2 case. 2004-05-07 John W. Eaton * ov.cc (octave_value::print_with_name): Only print name tag if Vprint_answer_id_name is true. * octave.cc (intern_argv): Insert __nargin__ in top_level_sym_tab instead of making it a builtin variable. Mark it static. * ov-usr-fcn.cc (octave_user_function::install_automatic_vars): Mark local automatic variables static. 2004-04-30 John W. Eaton * oct-stream.cc (octave_base_stream::clearerr): New function. (octave_stream::clearerr): New function. (seek (long, int)): Call clearerr here. * oct-stdstrm.h (octave_stdiostream::clear): New function. * c-file-ptr-stream.h (c_file_ptr_buf::clear, i_c_file_ptr_stream::clear, o_c_file_ptr_stream::clear, io_c_file_ptr_stream::clear): New functions. 2004-04-29 David Bateman * load-save.cc (Fload, Fsave): Accept -mat as well as -mat-binary. 2004-04-27 David Bateman * DLD-FUNCTIONS/sort.cc: Add missing "class" keywords to template instantiations. 2004-04-22 John W. Eaton * pt-plot.cc (Fclearplot): Temporarily turn off automatic_replot. Clear display after resetting title, labels, etc. 2004-04-22 John W. Eaton * pt-colon.cc (tree_colon_expression::rvalue): Also check for error_state after evaluating each subexpression. 2004-04-22 David Bateman * ov-base-scalar.h (octave_base_scalar::permute): New function. * ov-base-mat.cc (octave_base_matrix::is_true): Make N-d aware. 2004-04-22 John W. Eaton * oct-stream.cc (printf_value_cache::curr_value): Now NDArray. (printf_value_cache::double_value): Extract N-d array, not Matrix. 2004-04-21 John W. Eaton * parse.y (function2): Pass id name to frob_function. Delete id. (frob_function): Accept function name instead of identifier. Don't try to rename symbol table entry. Lookup symbol record for function name here. Insert name in symbol table if needed. Operate on symbol record instead of identifier. 2004-04-21 David Bateman * DLD_FUNCTIONS/fft.cc(do_fft): Correctly initialize the variable dim for scalar arguments. * DLD-FUNCTIONS/minmax.cc: Handle single vector arg correctly. 2004-04-20 John W. Eaton * ls-mat-ascii.cc (read_mat_ascii_data): Prepend "X" to keywords. Only drop text after last "." in name. * lex.l (is_keyword): New function. (Fiskeyword): Use it. * lex.h: Provide decl. * lex.l (is_keyword_token): Rename from is_keyword. 2004-04-16 John W. Eaton * file-io.cc (maybe_warn_interface_change): New function. (fopen_mode_to_ios_mode): Use it. 2004-04-16 Paul Kienzle * file-io.cc (fopen_mode_to_ios_mode): Default to binary mode. (Ffopen): Document 't' and 'b' mode flags. 2004-04-16 John W. Eaton * Makefile.in (DLD_XSRC): Add gcd.cc to the list. 2004-04-16 David Bateman * DLD-FUNCTIONS/gcd.cc: New file. 2004-04-15 David Bateman * ov-ch-mat.h: convert_to_str_interal returns charNDArray. 2004-04-12 John W. Eaton * version.h (OCTAVE_BUGS_STATEMENT): Bug list is now bug@octave.org. 2004-04-08 John W. Eaton * ov-base-mat.cc (octave_base_matrix::do_index_op): Quit early if an error occurs when creating index vector object. * ov.cc (octave_value::numeric_assign): Always call maybe_mutate on return value. 2004-04-06 David Bateman * DLD_FUNCTIONS/sort.cc: Use the new template sort class, adapt for N-d arrays, and allow optional dim argument. * DLD_FUNCTIONS/fftn.cc: Save result of transpose operation. Check for failure of transpose. 2004-04-02 John W. Eaton * ov-bool.h (octave_bool::bool_array_value): New function. * ov-base-mat.cc (octave_base_matrix::subsasgn): Don't allow expressions like x(i)(j) or x(i){j} when x is empty. * load-save.cc (get_file_format): Error if file does not exist. (Fload): Also complain here if specific file type is specified and file does not exist. 2004-04-02 Quentin Spencer * parse.y: Use persistent instead of static in warnings messages. 2004-04-02 John W. Eaton * pt-decl.cc (tree_static_command::do_init): Initialize to empty matrix by default. 2004-04-02 David Bateman * ov-re-mat.cc (octave_matrix::convert_to_str_internal): Return charNDArray. * ov-bool-mat.cc (octave_bool_matrix::convert_to_str_internal): Call array_value. * DLD-FUNCTIONS/besselj.cc, DLD-FUNCTIONS/betainc.cc, DLD-FUNCTIONS/gammainc.cc, DLD-FUNCTIONS/minmax.cc, DLD-FUNCTIONS/filter.cc: Convert for N-d array, better Matlab compatibility. * load-save.cc (Fload): Better handling of non existent files. 2004-03-19 John W. Eaton * ov-list.cc (octave_list::subsref): Correctly create return value. Return comma-separate list if {-style indexing extracts more than one value. 2004-03-12 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.57. (OCTAVE_API_VERSION): Now api-v8. * ov-cell.cc (octave_cell::save_hdf5): Handle empty cells. (octave_cell::load_hdf5): Likewise. 2004-03-11 John W. Eaton * ov-base-mat.cc (octave_base_matrix::subsasgn): If empty, allow type conversion when indexing with "{" and ".". 2004-03-10 John W. Eaton * pr-output.cc (init_format_state): Also set compact_format. (pr_col_num_header): Print one newline character before column headers for compact format. 2004-03-09 John W. Eaton * version.h (OCTAVE_WWW_STATEMENT): New macro. (OCTAVE_STARTUP_MESSAGE): Include it here. (OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS): And here. * octave.cc (verbose_usage): Use OCTAVE_WWW_STATEMENT here. * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): If there are no nonzero elements, return [](0x1) or [](1x0), not [](0x0). Correctly preserve orientation for row vectors. 2004-03-08 Petter Risholm * data.cc (do_cat): Check for length of args before getting dimension. New arg, fname. Print usage message corresponding to fname. (Fcat): Pass "cat" as fname arg to do_cat. (Fhorzcat): Pass "horzcat" as fname arg to do_cat. (Fvertcat): Pass "vertcat" as fname arg to do_cat. 2004-03-05 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.56. (OCTAVE_API_VERSION): Now api-v7. 2004-03-04 John W. Eaton * ov-struct.cc (Frmfield): New function * oct-map.h (Octave_map::contains): Return bool, not int. * ov-cell.cc (Fiscellstr): No error if arg is not a cell array. (Fcellstr): Return arg if it is already a cell array of character strings. 2004-03-03 John W. Eaton * ov-bool.cc (octave_bool::load_hdf5, octave_bool::save_hdf5): Avoid unnecessary casts. * ov-bool-mat.cc (octave_bool_matrix::load_hdf5, octave_bool_matrix::save_hdf5): Likewise. * ov-cell.cc (octave_cell::load_hdf5, octave_cell::save_hdf5): Likewise. * ov-complex.cc (octave_complex::load_hdf5, octave_complex::save_hdf5): Likewise. * ov-cx-mat.cc (octave_complex_matrix::load_hdf5, octave_complex_matrix::save_hdf5): Likewise. * ov-range.cc (octave_range::load_hdf5, octave_range::save_hdf5): Likewise. * ov-re-mat.cc (octave_matrix::load_hdf5, octave_matrix::save_hdf5): Likewise. * ov-scalar.cc (octave_scalar::load_hdf5, octave_scalar::save_hdf5): Likewise. * ov-str-mat.cc (octave_char_matrix_str::load_hdf5, octave_char_matrix_str::save_hdf5): Likewise. 2004-03-03 David Bateman * ov-cell.cc (octave_cell::save_hdf5, octave_cell::load_hdf5): Make N-d aware. 2004-03-03 John W. Eaton * parse.y: Delete spaces surrounding = in %name-prefix directive. 2004-03-01 Petter Risholm * Cell.cc (Cell::cat): New function. * Cell.h: Provide decl. * oct-map.cc (Octave_map::cat): New function. * oct-map.h: Provide decl. * data.cc (Fcat): Speedup implementation. * data.cc (Fhorzcat, Fvertcat): New functions. * Array-tc.cc: Instantiate cat function. 2004-03-01 David Bateman * ls-hdf5.cc (save_hdf5_empty, load_hdf5_empty): New functions to save/load empty matrices keeping their dimensions. * ls-hdf5.h (save_hdf5_empty, load_hdf5_empty): Provide decls. * ov-re-mat.cc (save_hdf5, load_hdf5): Cleanup, check empty matrix. * ov-cx-mat.cc (save_hdf5, load_hdf5): Ditto. * ov-bool-mat.cc (save_hdf5, load_hdf5): Ditto. * ov-str-mat.cc (save_ascoo, load_ascii, save_binary, load_binary, save_hdf5, load_hdf5): Cleanup, check empty matrix, and save/load N-d arrays. 2004-02-27 John W. Eaton * octave.cc (execute_startup_files): Don't find current directory for absolute name of local_rc until after executing home_rc. 2004-02-24 John W. Eaton * input.cc (input_event_hook): Return type is now int. Return 0. * file-io.cc (do_stream_open): Don't call ::error if stream can't be created. Don't call ::fopen if arch is invalid. Set error state for stream if fopen fails. * oct-stream.h (octave_stream::error (const char *)): New function. (octave_stream::error (const std::string&)): Now public. 2004-02-23 John W. Eaton * file-io.cc (Fftell): Return long integer instead of streamoff_array. (do_stream_open): Create octave_stdiostream instead of octave_fstream. * oct-fstrm.cc (octave_fstream::seek, octave_fstream::tell): Always fail. Signatures now match C library functionsb. * oct-iostrm.cc (octave_base_iostream::seek, octave_base_iostream::tell): Likewise. * oct-strstrm.cc (octave_base_strstream::seek, octave_base_strstream::tell): Likewise. * oct-stream.cc (octave_stream::seek, octave_stream::tell): Signatures now match C-library functions. * oct-stdstrm.cc (octave_stdiostream::seek, octave_stdiostream::tell): Call io_c_file_ptr_stream::seek and tell. Signatures now match C-library functions. * c-file-ptr-stream.h (c_file_ptr_buf::seek, c_file_ptr_buf::tell): New functions. (i_c_file_ptr_stream::seek, i_c_file_ptr_stream::tell): Likewise. (o_c_file_ptr_stream::seek, o_c_file_ptr_stream::tell): Likewise. (io_c_file_ptr_stream::seek, io_c_file_ptr_stream::tell): Likewise. 2004-02-20 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.55. (OCTAVE_API_VERSION): Now api-v6. * sighandlers.cc (sigfpe_handler, sigpipe_handler): Don't increment octave_interrupt_state if it is less than 0. (sigint_handler): If octave_interrupt_state is less than zero, reset it. * pt-except.cc (do_catch_code): Call OCTAVE_QUIT here so the catch code won't run if an interrupt is pending. Don't run catch code if octave_interrupt_state is less than zero. 2004-02-20 Per Persson * Makefile.in (OCT_LINK_DEPS, OCTINTERP_LINK_DEPS): Include $(LIBS) in the list before $(FLIBS). 2004-02-20 John W. Eaton * pr-output.cc (octave_print_internal (std::ostream&, const Range&, bool, int)): Don't print values beyond the limits of the range. * sighandlers.cc (sigint_handler): Print message after two consecutive interrupts, dump core after three or more. * load-save.cc (dump_octave_core): Handle core size limit. Rename from save_user_variables. Change all callers. (Fload, dump_octave_core, Fsave): Open HDF5 fils in binary mode. (do_save): Extract switch over file types to separate function. * load-save.cc (Voctave_core_file_limit): New variable. (octave_core_file_limit): New function. (symbols_of_load_save): Add DEFVAR for octave_core_file_limit. * load-save.cc (Voctave_core_file_name): New variable. (octave_core_file_name): New function. (symbols_of_load_save): Add DEFVAR for octave_core_file_name. * load-save.cc (Voctave_core_file_format): Rename from Voctave_core_format. (octave_core_file_format): Rename from octave_core_format. (symbols_of_load_save): Fix DEFVAR to match. 2004-02-19 John W. Eaton * ov.cc (Fsizeof): New function. * ov.h (octave_value::byte_size): New function. * ov-base.h (octave_base_value::byte_size): New function. * ov-base-scalar.h (octave_base_scalar::byte_size): New function. * ov-bool-mat.h (octave_bool_matrix::byte_size): New function. * ov-ch-mat.h (octave_char_matrix::byte_size): New function. * ov-cx-mat.h (octave_complex_matrix::byte_size): New function. * ov-re-mat.h (octave_matrix::byte_size): New function. * ov-range.h (octave_range::byte_size): New function. * ov-cell.cc (octave_cell::byte_size): New function. * ov-cell.h: Provide decl. * ov-struct.cc (octave_struct::byte_size): New function. * ov-struct.h: Provide decl. * ov-streamoff.h (octave_streamoff::byte_size): New function. * ov-list.cc (octave_list::byte_size): New function. * ov-list.h: Provide decl. * xpow.cc (elem_xpow (const Matrix&, double)): Convert both operands to Complex if any element of A is negative. (elem_xpow (const NDArray&, double)): Likewise. 2004-02-18 John W. Eaton * load-save.cc (Voctave_core_format): New static_variable. (octave_core_format): New function. (symbols_of_load_save): Add DEFVAR for octave_core_format. (get_save_format): Rename from get_default_save_format. Pass name of format as arg. New optional arg, fallback_format. Change all uses. (save_user_variables): Use pass Voctave_core_format to get_save_format here. Pass LS_BINARY as fallback_format. * sighandlers.cc (my_friendly_exit): New optional arg, save_vars. Only call save_user_variables if save_vars is true. (sigint_handler): If interactive, offer to abort and save workspace after three consecutive interrupts. (sigint_handler, sigpipe_handler, sigfpe_handler): Increment octave_interrupt_handler instead of setting it to 1. 2004-02-16 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.54. (OCTAVE_API_VERSION): Now api-v5. * Makefile.in (DLD_XSRC): Always include fftw_wisdom.cc. * DLD-FUNCTIONS/fftw_wisdom.cc: Rename from DLD-FUNCTIONS/fft_wisdom.cc. (Vfftw_wisdom_prog): Delete extern decl. (Ffftw_wisdom): Rename from Ffft_wisdom. Use Vfftw_wisdom_prog instead of Vwisdom_prog. Always define function. Signal error if not configured to use FFTW3. * defaults.cc (symbols_of_defaults): Rename WISDOM_PROGRAM to be FFTW_WISDOM_PROGRAM. (Vfftw_wisdom_prog): Rename from Vwisdom_prog. (fftw_wisdom_program): Rename from wisdom_program. For simplicity, always define FFTW_WISDOM_PROGRAM even when not using fftw3. (set_default_wisdom_prog): Look for OCTAVE_FFTW_WISDOM_PROGRAM in the environment instead of OCTAVE_WISDOM_PROGRAM. (set_default_fftw_wisdom_prog): Rename from set_default_wisdom_prog. * defaults.h.in (Vfftw_wisdom_prog): Provide extern decl. 2004-02-16 David Bateman * DLD-FUNCTIONS/fft.cc: Adapt for Nd arrays, combine with ifft.cc. * DLD-FUNCTIONS/ifft.cc: Delete. * DLD-FUNCTIONS/fft2.cc: Adapt for Nd arrays, combine with ifft.cc. * DLD-FUNCTIONS/ifft2.cc: Delete. * DLD-FUNCTIONS/fftn.cc: New function for Nd FFT and inverse FFT. * DLD-FUNCTIONS/fft_wisdom.cc: New function to manipulate FFTW wisdom. * Makefile.in: Remove ifft.cc and ifft2.cc. Add fftn.cc and ifftn.cc. Make building of fft-wisdom.cc conditional on the value of FFTW_LIBS. * defaults.cc (Vwisdom_prog): New variable (set_default_wisdom_prog, wisdom_prog): New functions. (symbols_of_defaults): Add DEFVAR for wisdom_prog. 2004-02-16 John W. Eaton * ov-list.cc (octave_list::subsasgn): Call assign for Cell objects here, not the base octave_value::assign. 2004-02-15 John W. Eaton * lex.l (yywrap): Don't #undef this symbol. 2004-02-15 Petter Risholm * pt-mat.cc: Make [,] concatenation work for N-d arrays. 2004-02-15 John W. Eaton * data.cc (do_cat): Merge with Fcat. 2004-02-15 Petter Risholm * ov-cell.cc (Fstruct2cell): New function. 2004-02-14 John W. Eaton * Makefile.in (OCTINTERP_LINK_DEPS, OCT_LINK_DEPS): Always define. * oct-conf.h.in: Add OCTAVE_CONF_DL_LD, OCTAVE_CONF_DL_LDFLAGS, and OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS. Delete OCTAVE_CONF_MKOCTFILE_SH_LDFLAGS. * toplev.cc (octave_config_info): Delete MKOCTFILE_SH_LDFLAGS. Add DL_LD, DL_LDFLAGS, and MKOCTFILE_DL_LDFLAGS to the struct. 2004-02-14 Per Persson * Makefile.in (%.oct): Use DL_LD instead of SH_LD to build .oct files. 2004-02-14 John W. Eaton * ov-base-scalar.h (octave_base_scalar::squeeze): New function. 2004-02-13 Petter Risholm * data.cc (Fcat): New function. * data.cc (do_cat): New function. * data.cc (cat_add_dims): New function. 2004-02-13 John W. Eaton * toplev.cc (main_loop): Call octave_parse, not yyparse. * octave.cc (octave_main): Increment octave_debug, not yydebug. * parse.y (%name-prefix): New directive, set to "octave_". * parse.h: Provide declarations for octave_lex and octave_parse instead of yylex and yyparse. * lex.l (%option prefix): New directive, set to "_octave". Define yylval to be octave_lval. Move definitions of YY_INPUT, YY_FATAL_ERROR, TOK_RETURN, TOK_PUSH_AND_RETURN, BIN_OP_RETURN, XBIN_OP_RETURN here. * lex.h: From here. 2004-02-07 Petter Risholm * ov-struct.cc (Fcell2struct): New function. (cell2struct_check_args, cell2struct_construct_idx): Likewise. 2004-02-07 John W. Eaton * ov-scalar.h (octave_scalar::empty_clone): Return empty octave_matrix, not an octave_scalar object. * ov-complex.h (octave_complex::empty_clone): Return empty octave_complex_matrix, not an octave_complex object. 2004-02-06 John W. Eaton * ov-usr-fcn.h (octave_user_function::function_name): Delete. (octave_user_function::fcn_name): Delete unused data member. (octave_user_function::stash_function_name): Save name in tree_function::my_name instead of fcn_name. Change all uses of fcn_name to be my_name instead. * pt.h, pt.cc (tree::break_function): Now pointer to octave_function rather than octave_user_function object. * pt-bp.h (MAYBE_DO_BREAKPOINT): Use name instead of function_name to get name from curr_function. * pt-pr-code.cc (tree_print_code::visit_octave_user_function_header): likewise. * debug.cc (Fdbwhere, Fdbtype, ): Likewise * error.cc (pr_where): Likewise. * variables.cc (Fmlock, Fmunlock, Fmislocked): Likewise. (lookup_function, lookup_user_function, link_to_builtin_or_function): Likewise, for curr_parent_function. * debug.cc (get_user_function, Fdbwhere): Cast curr_function to pointer to octave_user_function. * ov-mapper.cc (octave_mapper::do_multi_index_op): Save and restore curr_function here. * ov-builtin.cc (octave_builtin::do_multi_index_op): Likewise. * toplev.h, toplev.cc (curr_function, curr_parent_function): Now pointers to octave_function rather than octave_user_function objects. * ov-usr-fcn.h (octave_user_function::is_user_function): New function. * ov-fcn.h (octave_function::takes_varargs, octave_function::octave_va_start, octave_function::octave_va_arg, octave_function::octave_all_va_args, octave_function::takes_var_return, octave_function::octave_vr_val, octave_function::is_user_function): New virtual functions. 2004-02-05 John W. Eaton * ov-struct.cc (Fstruct): Use new Octave_map constructor to create structures with specified sizes but no keys. * ov-struct.cc (Fstruct): New function, from Paul Kienzle and Petter Risholm . * oct-map.h (Octave_map::Octave_map): Allow dimension to be specified for map with no keys. * ov-struct.cc (fieldnames): Return 0x1 cell array if no fieldnames. 2004-02-05 Petter Risholm * ov-base-mat.cc (octave_base_matrix::do_index_op): Don't fail if number of indices is greater than 2. 2004-02-05 John W. Eaton * data.cc (Fsize): Update for N-d objects. * ls-mat5.cc (read_mat5_binary_element): Force conversion. * ov-base.cc (octave_base_value::char_matrix_value): Pass force arg to convert_to_str. * data.cc (Freshape): Chop trailing singletons from new dimensions. 2004-02-03 John W. Eaton * error.cc (defun_usage_message): Only accept one arg, a const std::string& object. Change all uses. Pass nul-terminated string to defun_message_1. (defun_usage_message_1): New function, equivalent to old defun_usage_message. * ov-base.cc (nint_value): Use fix, not NINT. (INT_CONV_METHOD): Likewise, use fix instead of just casting. * data.cc (make_diag): Use int_value instead of nint_value to extract k for Matlab compatibility. (Flinspace): Likewise, for npoints. (fill_matrix): Likewise, for extracting dims. (Fsize): Likewise, for extracting dim argument. Require int value. * utils.cc (get_dimensions): Likewise. Use fix, not NINT. 2004-02-02 John W. Eaton * error.cc (verror, error_1): New arg, os. Use this instead of always printing to std:cerr. Change all callers. * error.cc (defun_usage_message): New function. * error.h: Provide decl. * defun.cc (print_usage): Use it to display error message. * error.cc (verror): New arg, save_last_error. Change all callers. (usage): Set error_state after calling verror. * oct-map.cc (Octave_map::assign (const std::string, const Cell&)): Set dimensions to RHS dimensions, not 1x1. 2004-01-23 John W. Eaton * ov-bool.cc, ov-cx-mat.cc, ov-re-mat.cc, ov-str-mat.cc: Include . * file-io.cc, ls-hdf5.cc, ls-mat4.cc, ls-mat5.cc, ls-oct-binary.cc: Include , not for new defn of OCTAVE_LOCAL_BUFFER. * load-save.cc, ls-mat-ascii.cc, ls-oct-ascii.cc No need to include now. * DLD-FUNCTIONS/eig.cc (Feig): Use new optional arg for EIG to avoid computing eigenvectors if not requested. Based on a patch from David Bateman . 2004-01-23 John W. Eaton * ov-cell.cc (all_strings): Always compute total required length of retval. 2004-01-22 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.53. (OCTAVE_API_VERSION): Now api-v4. * error.cc (pr_where): New arg, print_code with default value true. (warning): Call pr_where with second arg false. * file-io.cc (Ffrewind): Only return value if nargout > 0. (Ffprintf): Likewise. (Fprintf): Likewise. * file-io.cc (Ffrewind): Return 0 for success, -1 for failure. Make docs match. * Makefile.in (distclean): Remove DOCSTRINGS. (maintainer-clean): Remove $(OPT_HANDLERS). 2004-01-21 John W. Eaton * ov-cell.cc (octave_cell::subsref): Make '{' case N-d aware. * ov-scalar.cc (streamoff_array_value): New function. * ov-scalar.h: Provide decl. * OPERATORS/op-streamoff.cc (STREAMOFF_COMP_OP): New maco. Use it to define streamoff by matrix, streamoff by scalar, scalar by streamoff, and matrix by streamoff comparison operators. (install_streamoff_ops): Install them. * Cell.h (Cell::operator ()): Delete (we inherit them from Array). (maybe_resize, elem_internal): Delete unused functions. * ls-mat5.cc (write_mat5_cell_array): Cell& arg is now const. 2004-01-20 John W. Eaton * variables.cc (is_valid_function): If warn, also print error message if arg is not a string. * ov-usr-fcn.cc (Fnargin, Fnargout): New functions. * octave.cc (intern_argv): Lookup __nargin__ instead of nargin. * ov-usr-fcn.cc (octave_user_function::install_automatic_vars): Lookup __nargin__ and __nargout__ instead of nargin and nargout. * variables.h (at_top_level): Now extern. (lookup_user_function): New function. * variables.cc: Provide decls. * ov.h, ov.cc (octave_value::user_function_value): New virtual function. * ov-base.h, ov-base.cc (octave_base_value::user_function_value): Provide default version. * ov-usr-fcn.h (octave_user_function::user_function_value): New function. * ov-re-mat.cc (complex_array_value): New function. * ov-re-mat.h: Provide decl. * ov-cell.cc (Fiscellstr): Don't return value on usage error. * error.cc: (symbols_of_error): Delete DEFVAR for error_text. Define __error_text__ and error_text as aliases for lasterr. * error.cc (bind_global_error_variable, clear_global_error_variable): Delete. * variables.h: Delete decls. * parse.y (Feval, Fevalin): Don't call bind_global_error_variable. Don't add clear_global_error_variable to the unwind_protect stack. Increment buffer_error_messages before evaluating "eval" code, decrement it before evaluating "catch" code. * pt-except.cc (do_catch_code): Don't call bind_global_error_variable. Don't add clear_global_error_variable to the unwind_protect stack. Decrement buffer_error_messages here. (tree_try_catch_command::eval): Increment buffer_error_messages here. * error.cc, error.h (buffer_error_messages): Now an int. 2004-01-16 John W. Eaton * toplev.cc (octave_config_info): Add float_format, words_big_endian, and words_little_endian to the struct. 2004-01-14 David Bateman * ov-cell.cc (octave_cell::load_hdf5): Fix for HDF5 version 1.6 handling of number of objects in a group. * ov-struct.cc (octave_struct::load_hdf5): Likewise. * ov-list.cc (octave_list::load_hdf5): Likewise. * ls-hdf5.cc (read_hdf5_data): Likewise. 2004-01-13 John W. Eaton * ls-hdf5.h: Surround contents with #if defined (HAVE_HDF5). 2004-01-10 John W. Eaton * oct-stream.cc (convert_to_valid_int, get_size): Use lo_ieee_is_NaN_or_NA instead of xisnan. (octave_base_stream::do_printf): Correct special case check for NA, NaN, Inf, or out of range integers. * dirfns.cc (Fglob): Always return list of files as a cell array. (Freaddir): Likewise. * dirfns.cc (Fls): If nargout > 0, return ls output. 2004-01-09 John W. Eaton * load-save.cc (Fload): Assume -force by default. * oct-stream.cc (octave_base_stream::write): Allow fwrite (fid, "some string") to work. * toplev.cc (Fcomputer): Delete. (octave_config_info): Add unix and windows fields to the struct. 2004-01-06 David Bateman * ls-hdf5.cc: Fix handle of old versus new format files. * ls-oct-binary.cc: Split the load/save functionality into the types themselves. Backward compatibility maintained. * ov-struct.cc (save_binary, load_binary): * ov-str-mat.cc (save_binary, load_binary): * ov-scalar.cc (save_binary, load_binary): * ov-re-mat.cc (save_binary, load_binary): * ov-range.cc (save_binary, load_binary): * ov-list.cc (save_binary, load_binary): * ov-cx-mat.cc (save_binary, load_binary): * ov-complex.cc (save_binary, load_binary): * ov-cell.cc (save_binary, load_binary): * ov-bool.cc (save_binary, load_binary): * ov-bool-mat.cc (save_binary, load_binary): New functions for loading and saving structures in octave binary format. * ov-str-mat.h (save_binary, load_binary): * ov-scalar.h (save_binary, load_binary): * ov-re-mat.h (save_binary, load_binary): * ov-range.h (save_binary, load_binary): * ov-list.h (save_binary, load_binary): * ov-cx-mat.h (save_binary, load_binary): * ov-complex.h (save_binary, load_binary): * ov-cell.h (save_binary, load_binary): * ov-bool.h (save_binary, load_binary): * ov-bool-mat.h (save_binary, load_binary): * ov-struct.h (save_binary, load_binary): Provide decls. * ov.h (save_binary, load_binary): New virtual functions. * ov-base.cc (save_binary, load_binary): New functions, for fallbacks with error message. * ov-base.h: Provide decls. * load-save.cc: Remove "-import" flag and make it the default. * load-save.h: Likewise. * ls-oct-ascii.cc: Split the load/save functionality into the types themselves. Save "string" variables with the name "string" rather than string array. Backward compatiability maintained in ov-cs-mat.cc. Include new version of extract_keyword that halts if the next value is invalid rather that searching for the next valid value. * ls-oct-ascii.h: Extract_keyword header updated. Include definition of OCT_RBV and CELL_ELT_TAG, since they are now used elsewhere. * ls-hdf5.cc: Split load/save functionality into the types themselves. The hdf5 format is changed so that each object is a group with a dataset "type" being a string with the octave_value type and the dataset or group "value" containing the value of the data, struct, etc. This allows extensibility. Backward compatibility is maintained. The "import" flag is now assumed to always be true and has been removed. * ov-struct.cc (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-str-mat.cc (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-scalar.cc (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-re-mat.cc (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-range.cc (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-list.cc (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-cx-mat.cc (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-complex.cc (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-cell.cc (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-bool.cc (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-bool-mat.cc (save_ascii, load_ascii, save_hdf5, load_hdf5): New functions for loading and saving structures in octave ascii and hdf5 formatted files. * ov-struct.h (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-str-mat.h (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-scalar.h (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-re-mat.h (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-range.h (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-list.h (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-cx-mat.h (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-complex.h (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-cell.h (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-bool.h (save_ascii, load_ascii, save_hdf5, load_hdf5): * ov-bool-mat.h (save_ascii, load_ascii, save_hdf5, load_hdf5): Provide decls. * ov-typeinfo.cc (octave_value_typeinfo::do_lookup_type): Include make_unique so that the stored type value is not used for all loaded variables. * ov.h: (save_ascii, load_ascii, save_hdf5 and load_hdf5): New virtual functions. * ov-base.cc (save_ascii, load_ascii, save_hdf5, load_hdf5): New functions, for fallbacks with error message. * ov-base.h: Provide decls. 2003-12-22 John W. Eaton * ov-cx-mat.cc (octave_complex_matrix::assign): RHS arg is N-d. * ov-cx-mat.h: Fix decl. * ops.h (DEFNDASSIGNOP_FN): New macro. * OPERATORS/op-bm-b.cc, OPERATORS/op-bm-bm.cc, OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc, OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc, OPERATORS/op-m-m.cc, OPERATORS/op-m-s.cc: Use it instead of DEFASSIGNOP_FN. 2003-12-19 John W. Eaton * xpow.cc (xpow (double, double)): Avoid apparent GNU libm bug. 2003-12-17 John W. Eaton * symtab.cc (symbol_record::print_symbol_info_line): Also check is_static to see if a symbol can be cleared. 2003-12-16 John W. Eaton * lex.l (is_keyword): Also allow varargout_kw if lexer_flags.looking_at_return_list is false provided that we are defining a function and we haven't seen the function name yet. * parse.y (return_list): Don't require [] around varargout. * DLD-FUNCTIONS/find.cc (DO_FIND_OP): Delete macro. (find_to_fortran_idx): Delete. Move guts of function to find_nonzero_elem_idx. (find_nonzero_elem_idx): Now a template function. Handle overall array index here too. Make it N-d aware. * pt-pr-code.cc (tree_print_code::visit_complex_for_command, tree_print_code::visit_octave_user_function_header, tree_print_code::visit_matrix, tree_print_code::visit_cell, tree_print_code::visit_multi_assignment): Keep track of nearest [, {, or ( nesting level. (tree_print_code::visit_index_expression): Likewise. Check nesting level to decide how to print index. (tree_print_code::reset): Also reset nesting level stack. * pt-pr-code.h (tree_print_code::nesting): New data member. (tree_print_code::tree_print_code): Initialize it. * ov-base-mat.h (octave_base_matrix::octave_base_matrix (const MT&)): If arg has no dimensions, resize to be 0x0. 2003-12-15 John W. Eaton * oct-map.cc (Octave_map::assign): Use Octave_map::contents member function instead of operator []. * ov-struct.cc (octave_struct::subsasgn): Likewise. * DLD-FUNCTIONS/time.cc (extract_tm): Likewise. * DLD-FUNCTIONS/time.cc (mk_tm_map): Use Octave_map::assign member function instead of operator []. * DLD-FUNCTIONS/getrusage.cc (Fgetrusage): Likewise. * DLD-FUNCTIONS/getgrent.cc (mk_gr_map): Likewise. * DLD-FUNCTIONS/getpwent.cc (mk_pw_map): Likewise. * load-save.cc (do_load): Likewise. * ls-hdf5.cc (hdf5_read_next_data): Likewise. * ls-mat5.cc (read_mat5_binary_element): Likewise. * oct-map.cc (Octave_map::reshape): Likewise. * oct-map.cc (Octave_map::index): Likewise. * ov-fcn-handle.cc (Ffunctions): Likewise. * pt-idx.cc (make_arg_struct): Likewise. * sighandlers.cc (make_sig_struct): Likewise. * syscalls.cc (mk_stat_map): Likewise. * toplev.cc (Foctave_config_info): Likewise. * ls-hdf5.cc (add_hdf5_data): Temporary Octave_map is now const. * ls-mat5.cc (save_mat5_binary_element): Likewise. * oct-map.cc (Octave_map::assign (const std::string&, const octave_value&)): New function. * oct-map.h: Provide decl. (Octave_map::contents (const std::string&)): New function. (Octave_map::operator [] (const std::string&) const): Delete. (Octave_map::operator [] (const std::string&)): Delete. 2003-12-09 John W. Eaton * OPERATORS/op-cell.cc: Allow transpose for cell arrays. * OPERATORS/op-m-m.cc, OPERATORS/op-cm-cm.cc, OPERATORS/op-bm-bm.cc, OPERATORS/op-streamoff.cc, OPERATORS/op-str-str.cc: Improve error message for attempt to transpose N-d object. 2003-11-27 John W. Eaton * pt-arg-list.cc (F__end__): Handle N-d objects. 2003-11-25 John W. Eaton * OPERATORS/op-b-bm.cc: New file. * OPERATORS/op-bm-b.cc (op_el_and, op_el_or): Define and install. * OPERATORS/op-bm-bm.cc (op_el_and, op_el_or, assign): Likewise. * ov-str-mat.cc (CHAR_MATRIX_CONV): New macro. * ov-str-mat.h (octave_char_matrix_str::double_value, octave_char_matrix_str::matrix_value, octave_char_matrix_str::array_value, octave_char_matrix_str::complex_value, octave_char_matrix_str::complex_matrix_value, (octave_char_matrix_str::complex_array_value): Use it. * ov-bool-mat.cc (default_numeric_conversion_function): Convert to NDArray, not Matrix. * ov-str-mat.cc (default_numeric_conversion_function): Likewise. * ov-range.h (octave_range::array_value): New function. (octave_range::complex_array_value): Likewise. * ov-ch-mat.h (charNDArray::array_value): New function. (charNDArray::complex_array_value): Likewise. * ov-str-mat.h (octave_char_matrix_str::array_value): Likewise. (octave_char_matrix_str::complex_value): Likewise. (octave_char_matrix_str::complex_matrix_value): Likewise. (octave_char_matrix_str::complex_array_value): Likewise. * mappers.cc (acosh, log, log10, sqrt): Use octave_Inf instead of DBL_MAX for range limit. 2003-11-24 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.52. (OCTAVE_API_VERSION): Now api-v3. * DLD-FUNCTIONS/rand.cc (do_rand): Pass function name from arg list in calls to error. * ov-cs-list.cc, ov-cs-list.h (octave_cs_list::octave_cs_list): Explicitly initialize base class in constructors. * ov.h (octave_value::all_strings): Pass second arg to rep function. * ov.h (octave_value::string_value): Pass arg to rep function. * DLD-FUNCTIONS/dasrt.cc (dasrt_user_f): Delete unused arg names. * DLD-FUNCTIONS/rand.cc (Frand, Frandn): Likewise. * ls-hdf5.h (hdf5_streambase::hdf5_streambase): Likewise. * ls-hdf5.cc (read_hdf5_data): Likewise. * ls-utils.cc (get_save_type): Likewise. * parse.y (Fassignin): Likewise. * utils.cc (empty_arg): Likewise. * ov-usr-fcn.h (octave_user_function::subsref): Likewise. * ov-base-mat.h (octave_base_matrix::subsref): Likewise. * ov-mapper.h (octave_mapper::subsref): Likewise. * ov-builtin.h (octave_builtin::subsref): Likewise. * ov-complex.cc (octave_complex::complex_array_value): Likewise. * ov-cell.h (octave_cell::subsref): Likewise. * ov-base-scalar.h (octave_base_scalar::subsref): Likewise. * ov-struct.h (octave_struct::subsref): Likewise. * ov-range.h (octave_range::subsref): Likewise. * ov-list.h (octave_list::subsref): Likewise. * ov-base.cc (octave_base_value::print_info): Likewise. * pt-check.cc (tree_checker::visit_subplot_axes): Likewise. * pr-output.cc (octave_print_internal (std::ostream&, double, bool), octave_print_internal (std::ostream&, const Complex&, bool), octave_print_internal (std::ostream&, const ArrayN&, bool, int): Likewise. * oct-stream.cc (octave_scan<> (std::istream&, const scanf_format_elt&, char*): Likewise * TEMPLATE-INST/Array-tc.cc (resize_fill_value): Likewise. * pt-bp.cc (tree_breakpoint::visit_octave_user_function, tree_breakpoint::visit_octave_user_function_header, tree_breakpoint::visit_octave_user_function_trailer, tree_breakpoint::visit_plot_limits, tree_breakpoint::visit_plot_range, tree_breakpoint::visit_subplot, tree_breakpoint::visit_subplot_axes, tree_breakpoint::visit_subplot_list, tree_breakpoint::visit_subplot_style, tree_breakpoint::visit_subplot_using): Likewise. * ov.cc (octave_value::column_vector_value, (octave_value::complex_column_vector_value, (octave_value::row_vector_value, octave_value::complex_row_vector_value, octave_value::do_non_const_unary_op): Likewise. * load-save.cc: Only include ls-hdf5.h if HAVE_HDF5 is defined. From Melqart . * pr-output.h (octave_fcn_handle::print_as_scalar): Delete. * pr-output.cc (octave_print_internal): New version for ArrayN objects. * pr-output.h: Provide decl. * ov-fcn-handle.cc (octave_fcn_handle::print_raw): Use it. * OPERATORS/op-fcn-handle.cc: New file. * Makefile.in (OP_XSRC): Add it to the list. * ov-fcn-handle.h, ov-fcn-handle.cc (octave_fcn_handle): Now an array of function handle objects. * ov.h, ov.cc (octave_value::octave_value (const fcn_handle_array&), (octave_value::octave_value (octave_function *f, const std::string&)): New constructors. (octave_value::octave_value (const octave_fcn_handle&)): Delete. * ov-base-mat.cc (octave_base_matrix::print_as_scalar): Check dims instead of rows and columns. * ov.h (octave_value::is_function_handle): New function. * ov-base.h (octave_base_value::is_function_handle): New function. 2003-11-23 John W. Eaton * ov-bool-mat.h (octave_bool_matrix::array_value): Construct return value directly from matrix data member, not matrix.matrix_value (). * ov-re-mat.h (octave_matrix::index_vector): Construct idx_vector from NDArray, not Matrix. * ov-bool-mat.h (octave_bool_matrix::index_vector): Construct idx_vector from boolNDArray, not boolMatrix. * ov.cc (install_types): Also register dld function type. * OPERATORS/op-streamoff.cc: Install increment and decrement operators. * ov-streamoff.h (octave_streamoff::increment, octave_streamoff::decrement): New functions. * ov-streamoff.h, ov-streamoff.cc: Move streamoff_array class to liboctave/so-array.h and liboctave/so-array.cc. * oct-stream.cc (octave_stream::seek): Extract std::streamoff from tc_offset instead of int. * ov-re-mat.cc (octave_matrix::double_value): Use numel, not length. * ov-re-mat.cc (octave_matrix::streamoff_array_value): New function. * ov-re-mat.h: Provide decl. * ov-scalar.cc (octave_scalar::streamoff_value): New function. * ov-scalar.h: Provide decl. * ov.cc (octave_value::streamoff_array_value, octave_value::streamoff_value): New functions. * ov.h: Provide decls. * ov-base.cc (octave_base_value::streamoff_array_value, octave_base_value::streamoff_value): New functions. * ov-base.h: Provide decls. * ov-usr-fcn.cc (install_automatic_vars): Don't do anything unless sym_tab is defined. * ov-streamoff.h, ov-streamoff.cc, OPERATORS/op-streamoff.cc: New files. * ov-cell.h (octave_value_cell::is_matrix_type): New function. * ov-mapper.h (octave_mapper::octave_mapper): No copying. * ov-fcn.h (octave_function::octave_function): Likewise. * ov-usr-fcn.h (octave_function::octave_function): Likewise. * ov-builtin.h (octave_builtin::octave_builtin): Likewise. * ov-dld-fcn.h (octave_dld_function::octave_dld_function): Likewise. 2003-11-22 John W. Eaton * ov-mapper.h (octave_mapper::octave_mapper): Make public. Provide copy constructor and assignment operator. * ov-fcn.h (octave_function::octave_function): Likewise. * ov-builtin.h (octave_builtin::octave_builtin): Likewise. * ov-dld-fcn.h (octave_dld_function::octave_dld_function): Likewise. * ov-typeinfo.cc (octave_value_typeinfo::register_type, octave_value_typeinfo::do_register_type): New arg, val. Save it in vals array. (octave_value_typeinfo::lookup_type, octave_value_typeinfo::do_lookup_type): New functions. * ov-typeinfo.h: Provide decl. (octave_value_typeinfo::vals): New data member. (octave_value_typeinfo::octave_value_typeinfo): Initialize it. * ov.h (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Pass * ov.h (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Define register_type here. Also pass an empty object of the to-be-registered type to register_type. (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Declare register_type here, but don't define it. 2003-11-21 John W. Eaton * ov-fcn-handle.h (octave_fcn_handle::octave_fcn_handle (void)): New constructor. * ov-usr-fcn.h (octave_user_function::octave_user_function): Delete decl for private constructor. * ov-str-mat.cc (octave_char_matrix_str::matrix_value): Conversion to matrix is an error unless explicitly forced. * ov-str-mat.cc (octave_char_matrix_str::double_value): New function. * ov-str-mat.h: Provide decl. * ov-file.cc (print_raw): Use parens around ?: conditional used on RHS of << output operator. * c-file-ptr-stream.cc (c_file_ptr_buf::seekoff, c_file_ptr_buf::seekpos): Can't use fseek here, so just fail (by returning -1) until we have a better solution. * oct-stream.cc (octave_stream::tell): Return std::streamoff, not long. * oct-iostrm.cc (octave_base_iostream::tell): Likewise. * oct-stdstrm.cc (octave_stdiostream::tell): Likewise. * oct-strstrm.cc (octave_base_strstream::tell): Likewise. * oct-stream.h, oct-iostrm.h, oct-stdstrm.h, oct-strstrm.h: Fix decls to match. 2003-11-20 John W. Eaton * ls-mat-ascii.cc (get_lines_and_columns): Delete second arg in call to istream::seekg. * ov-mapper.cc (MAPPER_LOOP_2, any_element_less_than, any_element_greater_than, octave_mapper::apply): Handle N-d arrays. 2003-11-19 John W. Eaton * ls-mat5.cc (read_mat5_binary_element, save_mat5_binary_element): Handle N-d arrays. * lex.l (next_token_is_index_op): New function. (handle_close_bracket): Use it. * ls-hdf5.cc, ls-mat-ascii.cc, ls-mat4.cc, ls-mat5.cc, ls-oct-ascii.cc, ls-oct-binary.cc, ls-utils.cc, ls-hdf5.h, ls-mat-ascii.h, ls-mat4.h, ls-mat5.h, ls-oct-ascii.h, ls-oct-binary.h, ls-utils.h: New files, extracted from load-save.cc. * Makefile.in: Add them to the appropriate lists. 2003-11-18 John W. Eaton * pr-output.cc (octave_print_internal): Don't indent rows for plus_format. Use pr_plus_format for Range type with plus_format. (plus_format_chars): New static variable. (set_format_style): Allow optional arg for plus format to set it. (pr_plus_format): Use it. * ov-bool.h (octave_bool::array_value, octave_bool::complex_array_value): New functions. * ov-base-mat.cc (octave_base_matrix::do_index_op): Ensure correct number of indices for Array indexing code. 2003-11-17 John W. Eaton * DLD-FUNCTIONS/qz.cc (qz): Use x.data()+offset instead of &a(i,j). First and third args for dlag2 are const. * DLD-FUNCTIONS/sort.cc (Fsort): Use const qualifier as appropriate. * DLD-FUNCTIONS/balance.cc (balance): Use data() instead of fortran_vec where appropriate in call to dggbak. * DLD-FUNCTIONS/dasrt.cc (dasrt_user_j): Simplify inserting x and xdot in arg vector. (dasrt_user_f): Likewise. (dasrt_user_cf): Likewise. * DLD-FUNCTIONS/dassl.cc (dassl_user_function): Likewise. (dassl_user_jacobian): Likewise. * DLD-FUNCTIONS/lsode.cc (lsode_user_function): Likewise. (lsode_user_jacobian): Likewise. * DLD-FUNCTIONS/daspk.cc (daspk_user_function): Likewise. (daspk_user_jacobian): Likewise. 2003-11-16 John W. Eaton * ov-range.h (octave_range::reshape): New function. 2003-11-15 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.51. (OCTAVE_API_VERSION): Now api-v2. * version.h (OCTAVE_BUGS_STATEMENT): Also tell people to look at http://www.octave.org/bugs.html. * oct-map.cc (Octave_map::assign): Use resize, not resize and fill. * ov-typeinfo.cc (octave_value_typeinfo::do_register_type): Likewise. * Cell.cc (Cell::Cell): Pass dim_vector to resize instead of two ints. 2003-11-14 John W. Eaton * Makefile.in (stamp-liboctave-prereq): New target. ($(DEF_FILES), $(MAKEDEPS)): Depend on it. (distclean): Remove it. * parse.y (cancel_obj_idx): New rule. (postfix_expr, prefix_expr): Use begin_obj_idx after every postfix_expr on RHS. Use cancel_obj_idx as soon as possible for cases where we are not working on an index expression. * lex.l (maybe_unput_comma, handle_close_bracket): Don't insert comma if we are looking at an object index and the closest nesting level is a brace. * parse.y (postfix_expr): Use begin_obj_idx between postfix_expr and the indexing delimiter rather than after it. * lex.h (lexical_feedback::braceflag): New member variable. * lex.l (lexical_feedback::init): Initialize braceflag. (\{{S}*): Increment lexer_flags.braceflag, not lexer_flags.bracketflag. (handle_close_bracket): Handle lexer_flags.braceflag and lexer_flags.bracketflag separately based on bracket_type. Delete unnecesary yyinput/yyunput. * lex.l (next_token_is_postfix_unary_op): Also recognize ++ and --. * ov-typeinfo.cc (octave_value_typeinfo::register_type, octave_value_typeinfo::do_register_type): New arg, c_name for class name. * ov-base.cc, ov-bool-mat.cc, ov-bool.cc, ov-builtin.cc, ov-cell.cc, ov-ch-mat.cc, ov-colon.cc, ov-complex.cc, ov-cs-list.cc, ov-cx-mat.cc, ov-dld-fcn.cc, ov-fcn-handle.cc, ov-file.cc, ov-list.cc, ov-mapper.cc, ov-range.cc, ov-re-mat.cc, ov-scalar.cc, ov-str-mat.cc, ov-struct.cc, ov-usr-fcn.cc, ov-va-args.cc: Pass class name to DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA. * ov.h (octave_value::class_name): New virtual function. (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Define c_name, for class name. Pass c_name to octave_value_typeinfo::register_type. (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Declare static member c_name for class name. Provide class_name member function. * ov-typeinfo.cc (Fclass): New function. 2003-11-13 John W. Eaton * utils.cc (Fisvarname): Pass correct name to make_argv. * ov-cell.cc (Fiscellstr): New function. * ov-file.h (octave_file::all, octave_file::any, octave_file::dims, octave_file::is_real_type, octave_file::ist_real_scalar): New functions. * lex.l (bracket_brace_paren_nesting_level::is_bracket_or_brace): New function. (handle_close_bracket): New arg, bracket_type. Change all uses. First arg is now bool. ({SNLCMT}*\}{S}*): New pattern. (maybe_unput_comma): Handle brace nesting level the same as brackets. (handle_close_brace): Likewise. ({S}+): Likewise. ({S}*{COMMENT}{SNLCMT}*): Likewise. ({S}*{NL}{SNLCMT}*): Likewise. ({NL}): Likewise. ({CCHAR}): Likewise. (")"): Likewise. (\{{S}*): Handle the same as \[{S}*. ("}"): Handle the same as \]. * Makefile.in (stamp-prereq): Add oct-gperf.h, parse.cc, and lex.cc to the list. 2003-11-12 John W. Eaton * ov-cell.cc (print_as_scalar): New function. * ov-cell.h: Provide decl. * ov-cell.cc (octave_cell::print_name_tag): Delete. * ov-cell.h: Delete decl. * ov-base-mat.cc (octave_base_matrix::print_name_tag): Delete. * ov-base-mat.h: Delete decl. * ov-base.cc (octave_base_value::print_name_tag): Use print_as_scalar here. * ov.h (octave_base_value::print_as_scalar): New virtual function. * ov-base.h (octave_base_value::print_as_scalar): New default implementation. * ov-base-mat.h (octave_base_matrix::pirnt_as_scalar): Don't declare as virtual here. * ov-struct.cc (octave_struct::print_raw): If only printing keys, also print dimensions of fields and overall array. * sysdep.cc (Fnative_float_format): New function. * input.cc (generate_possible_completions): Also append all possible filename completions here. 2003-11-11 John W. Eaton * oct-stream.cc: Explicitly instantiate octave_scan functions. * TEMPLATE-INST/Array-c.cc, TEMPLATE-INST/Array-os.cc, TEMPLATE-INST/Array-sym.cc, ov-typeinfo.cc: Use new INSTANTIATE_ARRAY macro. * data.cc (do_permute): New function. (Fpermute, Fipermute): Use it. * ov-base.cc (octave_base_value::permute): New function. * ov-base.h: Provide decl. * ov.h (octave_value::ipermute): New function. 2003-11-11 Petter Risholm * data.cc (Fpermute, Fipermute): New functions. * ov.h (octave_value::permute): New function. * ov-base-mat.h (octave_base_matrix::permute): New function. 2003-11-10 John W. Eaton * oct-obj.h (octave_value_list): Internal representation is now std::vector instead of Array. * ov-list.h, ov-list.cc: Internal representation is now Cell, not octave_value_list. (Flist): Print one-time warning. * ov.cc (octave_value::octave_value (const octave_value_list&, bool)): Cope with octave_cs_list not being derived from octave_list. * ov-cs-list.cc (octave_cs_list): Handle conversion of Cell array to octave_value_list here. * ov-cs-list.h (class octave_cs_list): Derive from octave_base_value, not octave_list. * ov-cs-list.h, ov-cs-list.cc: Remove commented-out code. * TEMPLATE-INST/Array-tc.cc (resize_fill_value): Use modern specialization syntax. * ov-cell.cc (octave_cell::print_raw): Use dim_vector::str. * Cell.cc, Cell.h, debug.cc, file-io.cc, load-save.cc, oct-fstrm.cc, oct-iostrm.cc, oct-iostrm.h, oct-map.cc, oct-map.h, oct-prcstrm.cc, oct-stdstrm.h, oct-stream.cc, oct-strstrm.h, octave.cc, ov-base.h, ov-cell.cc, ov.cc, ov.h, pt-cell.h, pt-mat.cc, pt-mat.h, pt-plot.cc, pt-stmt.cc, variables.cc, DLD-FUNCTIONS/rand.cc: Avoid -Wshadow warnings. 2003-11-01 John W. Eaton * ov.h (octave_base_value::is_bool_matrix): New virtual function. * ov-base.h (octave_base_value::is_bool_matrix): New function. 2003-10-31 John W. Eaton * ov.cc (octave_value::length): If any dim is zero, return 0. * ov-cell.cc (octave_cell::subsref): When indexing with '{', quit early if an error occurs in do_index_op. * ov.cc (octave_value::next_subsref): Don't do anything if error_state is true. * cutils.c (octave_usleep) [HAVE_SELECT]: Introduce new local scope for declaration of delay. [HAVE_POLL]: Likewise, for delay and pfd. * ov-base.cc (octave_base_value::bool_array_value): Function takes no args. * ov-base.h: Likewise, for decl. * ov-bool-mat.h (boolNDArray::bool_array_value): Likewise. * ov-fcn.cc, ov-fcn.h (octave_value::clone, octave_value::empty_clone): Return type is octave_value*, not octave_function*. 2003-10-29 John W. Eaton * ov-str-mat.h (octave_char_matrix_str::reshape): New function. Force result to be a string. 2003-10-29 Petter Risholm * data.cc (DATA_REDUCTION): Work on NDArray and ComplexNDArray objects instead of Matrix and ComplexMatrix objects. 2003-10-29 John W. Eaton * ov-bool-mat.h (octave_bool_matrix::NDArray, octave_bool_matrix::ComplexNDArray): New functions. * ov-complex.cc (octave_complex::array_value, octave_complex::complex_array_value): New functions. * ov-complex.h: Provide decls. * ov-scalar.cc (octave_scalar::array_value, octave_scalar::complex_array_value): New functions. * ov-scalar.h: Provide decls. * oct-map.cc (Octave_map::reshape): New function. * oct-map.h: Provide decl. * ov-struct.h (octave_struct::reshape): New function. * Cell.h (Cell:Cell (const Array&): New constructor. * data.cc (Freshape): New function. * ov.h (octave_value::reshape): New function. * ov-base-mat.h (octave_base_matrix::reshape): New function. * ov-base.cc (octave_base_value::reshape): New function. * ov-base.h: Provide decl. * DLD-FUNCTIONS/balance.cc: lscale and rscale args for dggbak are const. Use data() instead of fortran_vec where possible. * DLD-FUNCTIONS/qz.cc: Likewise. * data.cc (fill_matrix): Remove trailing singletons before allocating the result matrix. * input.cc (get_user_input): Don't forget about the diary here. 2003-10-28 John W. Eaton * ov-list.h (octave_list::nelem): Delete. (octave_list::dims): New function. * ov-range.h (octave_list::dims): New function. * ov-struct.h (octave_struct::dims): New function. * ov-base-scalar.h (octave_base_scalar::dims): New function. * ov.h (octave_value::rows): No longer virtual. * ov.cc (octave_value::rows): Provide common implementation. * ov-base.h (octave_base_value::rows): Delete. * ov-base-mat.h (octave_base_matrix::rows): Delete. * ov-base-scalar.h (octave_base_scalar::rows): Delete. * ov-struct.h (octave_struct::rows): Delete. * ov-range.h (octave_range::rows): Delete. * ov.h (octave_value::columns): No longer virtual. * ov.cc (octave_value::columns): Provide common implementation. * ov-base.h (octave_base_value::columns): Delete. * ov-base-mat.h (octave_base_matrix::columns): Delete. * ov-base-scalar.h (octave_base_scalar::columns): Delete. * ov-struct.h (octave_struct::columns): Delete. * ov-range.h (octave_range::columns): Delete. * ov.h (octave_value::numel): No longer virtual. * ov.cc (octave_value::numel): Provide common implementation. * ov-base.h (octave_base_value::numel): Delete. * ov-base-mat.h (octave_base_matrix::numel): Delete. * ov-base-scalar.h (octave_base_scalar::numel): Delete. * ov-struct.h (octave_struct::numel): Delete. * ov-cs-list.h (octave_cs_list::dims): New function. (octave_cs_list::length): Delete. * ov.h (octave_value::ndims): No longer virtual. * ov.cc (octave_value::ndims): Provide common implementation. * ov-base.h (octave_base_value::ndims): Delete. * ov-base-mat.h (octave_base_matrix::ndims): Delete. * ov-base-scalar.h (octave_base_scalar::ndims): Delete. * ov-struct.h (octave_struct::ndims): Delete. * ov-cell.cc (Fcell): Make it work for N-d cells. * Cell.h (Cell::Cell (const dim_vector&, const octave_value&)): New constructor. * ov.h (octave_value::length): No longer virtual. * ov.cc (octave_value::length): Provide common implementation. * ov-base.h (octave_base_value::length): Delete. * ov-base-mat.h (octave_base_matrix::length): Delete. * ov-base-scalar.h (octave_base_scalar::length): Delete. * ov-struct.h (octave_struct::length): Delete. * ov-cs-list.h (octave_cs_list::length): Delete. * ov-list.h (octave_list::length): Delete. * ov-range.h (octave_range::length): Delete. * load-save.cc (save_mat5_binary_element): Use numel instead of array_length. * ov-struct.cc (octave_struct::print_raw): Likewise. * pt-loop.cc (tree_complex_for_command::eval): Likewise. * oct-map.cc (Octave_map::numel): New function. * oct-map.h: Provide decl. * oct-map.cc, oct-map.h (Octave_map::array_length): Delete. (common_size): New static function. (Octave_map::assign): Make resizing work for N-d cell objects. * oct-map.cc (Octave_map::dims): New function. * oct-map.h: Provide decl. * pr-output.cc (print_empty_nd_array): New static function. (PRINT_ND_ARRAY): Use it. * ov.h (octave_value::is_empty): No longer virtual. Return value based on numel. * data.cc (Fisempty): Use it. (Fnumel): New function. * ov.h (octave_value::numel): New function. * ov-base.h (octave_base_value::numel): Likewise. * ov-base-mat.h (octave_base_matrix::numel): Likewise. * ov-base-scalar.h (octave_base_scalar::numel): Likewise. 2003-10-27 Petter Risholm * ov-base-mat.cc (octave_base_matrix::is_true): Only work for 2-dimensional objects. * data.cc (ANY_ALL (FCN)): Allow dim to take values large than 2. * ov.h (octave_value::ndims): New function. * ov-base.h (octave_base_value::ndims): Likewise. * ov-base-scalar.h (octave_base_scalar::ndims): Likewise. * ov-base-mat.cc (octave_base_matrix::ndims): New function. (octave_base_matrix::length): Move here from ov-base-mat.h. Make it work for N-d arrays. * ov-base-mat.h (octave_base_matrix::ndims): Provide decl. * data.cc (Fndims): New built-in function. 2003-10-27 John W. Eaton * DLD-FUNCTIONS/balance.cc, DLD-FUNCTIONS/qz.cc: Use new F77 arg macros in declarations of external Fortran subroutines and for calling them. * ops.h (DEFNDUNOP_OP, DEFNDUNOP_FN): New arg e, to name value extractor function prefix. * OPERATORS/op-bm-bm.cc, OPERATORS/op-cm-cm.cc, OPERATORS/op-m-m.cc: Change all uses. * ov-cx-mat.h (octave_complex_matrix::complex_array_value, octave_char_matrix::char_array_value, octave_bool_matrix::bool_array_value): Rename from array_value. * OPERATORS/op-bm-bm.cc, OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc, OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc, OPERATORS/op-cs-cm.cc, OPERATORS/op-m-cm.cc, OPERATORS/op-m-m.cc, OPERATORS/op-s-cm.cc: Use complex_array, char_array, and bool_array as appropriate (instead of just array). * ov-base.cc (octave_base_value::array_value, octave_base_value::bool_array_value, octave_base_value::complex_array_value, octave_base_value::char_array_value): Provide default implementations. * ov-base.h: Provide decls. * ov.h (octave_value::array_value, octave_value::bool_array_value, octave_value::complex_array_value, octave_value::char_array_value): New virtual functions. 2003-10-25 John W. Eaton * pt-idx.cc (make_subs_cell): Pass dim_vector object to resize. * ov-typeinfo.cc (octave_value_typeinfo::do_register_type): Use resize_and_fill for types. * oct-obj.h (octave_value_list::maybe_resize): Use resize_and_fill. (octave_value_list::resize (int, const octave_value&)): Likewise. * oct-map.cc (Octave_map::assign): Use resize_and_fill as needed. * Cell.h (Cell (void)): Default size is now 0x0. 2003-10-23 John W. Eaton * OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc, OPERATORS/op-cs-m.cc, OPERATORS/op-m-cm.cc, OPERATORS/op-s-cm.cc: Include headers for N-d operators. 2003-10-17 John W. Eaton * ops.h (DEFNDUNOP_OP, DEFNDUNOP_FN, DEFNDBINOP_OP, DEFNDBINOP_FN): New N-dimensional macros. * OPERATORS/op-bm-bm.cc, OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc, OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc, OPERATORS/op-cs-cm.cc, OPERATORS/op-cs-m.cc, OPERATORS/op-m-cm.cc, OPERATORS/op-m-cs.cc, OPERATORS/op-m-m.cc, OPERATORS/op-m-s.cc, OPERATORS/op-s-cm.cc, OPERATORS/op-s-m.cc: Use N-dimensional macros as appropriate. * DLD-FUNCTIONS/rand.cc (do_rand, Frand, Frandn): Handle N-dimensions. * xpow.cc (elem_xpow (double, const NDArray&), elem_xpow (double, const ComplexNDArray&), elem_xpow (const NDArray&, double), elem_xpow (const NDArray&, const NDArray&), elem_xpow (const NDArray&, const Complex&), elem_xpow (const NDArray&, const ComplexNDArray&), elem_xpow (const Complex&, const NDArray&), elem_xpow (const Complex&, const ComplexNDArray&), elem_xpow (const ComplexNDArray&, double), elem_xpow (const ComplexNDArray&, const NDArray&), elem_xpow (const ComplexNDArray&, const Complex&), elem_xpow (const ComplexNDArray&, const ComplexNDArray&): New functions. * xpow.h: Provide decls. * xdiv.cc (x_el_div (double, const NDArray&), x_el_div (double, const ComplexNDArray&), x_el_div (const Complex, const NDArray&), x_el_div (const Complex, const ComplexNDArray&)): New functions. * xdiv.h: Provide decls. * ov-bool-mat.h (boolNDArray::array_value): New function. * ov-ch-mat.h (charNDArray::array_value): New function. * ov-cx-mat.h (ComplexNDArray::array_value): New function. * ov-re-mat.h (NDArray::array_value): New function. (NDArray::double_nd_array_value): Delete. 2003-10-16 John W. Eaton * parse.y (text_getc): New static function. (gobble_leading_white_space): Use it to simplify EOL processing. 2003-10-15 John W. Eaton * file-io.cc (fopen_mode_to_ios_mode): Ignore "t" in mode string. * strfns.cc (Fischar): rename from Fisstr. 2003-10-09 John W. Eaton * pr-output.cc (PRINT_ND_ARRAY): New macro. (octave_print_internal): Use it. 2003-10-08 John W. Eaton * ov.cc (octave_value::octave_value (const ArrayN&, bool)): New constructor. * ov.h: Provide decl. * ov.h (octave_value::squeeze): New virtual function. * ov-base.cc (squeeze): Provide default implementation. * ov-base-mat.h (octave_base_matrix::squeeze): New function. * data.cc (Fsqueeze): New function. 2003-10-03 John W. Eaton * load-save.cc (make_valid_identifier): Return new string. Arg is now string, not char *. (ident_is_all_digits): New function. (hdf5_read_next_data): Use it. 2003-10-02 John W. Eaton * input.cc (input_event_hook): Clear the event hook if hook_fcn does not name a valid function. 2003-10-01 John W. Eaton * mappers.cc (xabs): New function. (install_mapper_functions): Use it instead of abs for complex args in Octave's abs mapper function. 2003-09-27 Joseph P. Skudlarek * DLD-FUNCTIONS/minmax.cc (min, max): Use @deftypefn machinery, doc missing semantics, and add more examples to texinfo strings. 2003-09-26 John W. Eaton * load-save.cc (read_mat5_binary_element): Return early if the miMATRIX element has length zero. 2003-09-24 John W. Eaton * ov-cell.cc (octave_cell::subsasgn): Also attempt empty conversion after extracting single element from cell array to allow things like x{i}.elt = rhs to work. 2003-09-19 John W. Eaton * ov.h (octave_value::dim_vector): New function. * ov.h, ov.cc (octave_value::octave_value (const Cell&)): New arg, is_cs_list. (octave_value::octave_value (const NDArray&)): Create octave_matrix object, not octave_double_nd_array object. (octave_value::octave_value (const ComplexNDArray&), octave_value::octave_value (const boolNDArray&), octave_value (const charNDArray&, bool)): New constructors. * ov.h, ov.cc (octave_value::nil_rep): New function. (octave_value::octave_value (void)): Use it to initialize empty octave_value objects. * ov-list.h, ov-list.cc (octave_list::octave_list (const Cell&)): New constructor. * ov-cs-list.h (octave_cs_list::octave_cs_list (const Cell&)): Likewise. * data.cc (Fsize): Handle N-d objects. * pr-output.cc (octave_print_internal): New versions for NDArray, ComplexNDArray, boolNDArray, and charNDArray objects. * pr-output.h: Provide decls. * ov-re-nd-array.h, ov-re-nd-array.cc: Delete. * Cell.h, Cell.cc, ov-base-mat.h, ov-base-mat.cc, ov-bool-mat.h, ov-bool-mat.cc, ov-ch-mat.h, ov-ch-mat.cc, ov-cx-mat.h, ov-cx-mat.cc, ov-re-mat.h, ov-re-mat.cc, ov-str-mat.h, ov-str-mat.cc: Now N-dimensional. * oct-map.h, oct-map.cc: Now based on Cell ojects instead of octave_value_list objects. Change all uses. * TEMPLATE-INST/Array-tc.cc: Also instantiate ArrayN objects. Don't instantiate assign funcitons for Array2 objects. 2003-09-11 John W. Eaton * pt-plot.cc (symbols_of_pt_plot): Default for automatic replot is now true. * pr-output.cc (Fformat): Doc fix. (current_output_max_field_width, current_output_precision): New functions. (float_format::float_format (int, int, int)): Use them to provide default values for field width and precision. (print_g): New static variable. (set_real_format, set_real_matrix_format, set_complex_format) (set_complex_matrix_format, set_range_format): Handle print_g. (pr_float, pr_complex): Don't scale if using print_g. (set_format_style): Accept new "g" and "G" modifiers for short and long formats and set print_g. Set default precision and width for short to 5, 10. Set default precision and width for long to 15, 20. 2003-09-10 John W. Eaton * OPERATORS/op-m-cs.cc (complex_matrix_conv): Delete function. (install_m_cs_ops): Don't install complex_matrix_conv here. * OPERATORS/op-s-cs.cc (complex_matrix_conv): Delete function. (install_s_cs_ops): Don't install complex_matrix_conv here. * OPERATORS/op-s-s.cc (matrix_conv): Delete function. (install_s_s_ops): Don't install matrix_conv here. * OPERATORS/op-cs-s.cc (complex_matrix_conv): Delete function. (install_cs_s_ops): Don't install complex_matrix_conv here. * OPERATORS/op-cs-m.cc (complex_matrix_conv): Delete function. (install_cs_m_ops): Don't install complex_matrix_conv here. * OPERATORS/op-cs-cs.cc (complex_matrix_conv): Delete function. (install_cs_cs_ops): Don't install complex_matrix_conv here. * ov-typeinfo.cc (do_register_unary_op, do_register_non_const_unary_op, do_register_binary_op, do_register_assign_op, do_register_assignany_op, do_register_pref_assign_conv, do_register_widening_op): Print warning if installing a duplicate function. 2003-09-10 Petter Risholm * data.cc, ov-base.cc, ov-base.h, ov.h, ov.cc, ov-re-mat.h, ov-scalar.h, ov-re-nd-array.h, ov-re-nd-array.cc: Use NDArray, not ArrayN. 2003-09-09 John W. Eaton * ov.h (octave_value::double_nd_array_value): New function. (octave_value::is_real_nd_array): New function. * ov-base.cc (octave_base_value::double_nd_array_value): New function. * ov-base.h: Provide decl. (octave_base_value::is_real_nd_array): New function. 2003-09-09 Petter Risholm * ov-re-mat.h (octave_matrix::double_nd_array_value): New function. * ov-scalar.h (octave_scalar::double_nd_array_value): New function. * ov-re-nd-array.cc (octave_double_nd_array::assign): New function. (octave_double_nd_array::try_narrowing_conversion): Likewise. (octave_double_nd_array::valid_as_scalar_index): Likewise. (octave_double_nd_array::double_value): Likewise. (octave_double_nd_array::matrix_value): Likewise. (octave_double_nd_array::complex_value): Likewise. (octave_double_nd_array::convert_slice_to_matrix): Likewise. * ov-re-nd-array.h: Provide decls. (octave_double_nd_array::is_real_nd_array): New function. (octave_double_nd_array::double_nd_array_value): New function. (octave_double_nd_array::double_nd_array_value): New function. * OPERATORS/op-m-nd.cc, OPERATORS/op-nd-m.cc, OPERATORS/op-nd-nd.cc, OPERATORS/op-nd-s.cc, OPERATORS/op-s-nd.cc: New files. * Makefile.in (OP_XSRC): Add them to the list. 2003-09-09 David Bateman * OPERATORS/op-cs-s.cc (DEFBINOP): First arg is complex, second is double. 2003-09-05 John W. Eaton * pt-cell.cc (tree_cell::rvalue): Don't assume that the number of elements in a tree_argument_list is the same as the number of objects it contains (cs-list objects expand to more than one). * pt-mat.cc (tm_row_const::tm_row_const_rep::do_init_element): New function, extracted from tm_row_const::tm_row_const_rep::init. (tm_row_const::tm_row_const_rep::init): Use it. Also handle cs-list objects. * ov-cs-list.cc (octave_cs_list::print_raw): New function. * ov-cs-list.h (octave_cs_list::print_raw): Provide decl. * ov-list.h (octave_list::lst): Now protected instead of private. 2003-09-04 John W. Eaton * pt-plot.cc (subplot_style::columns_ok): Allow boxes style to have 2 columns as well. 2003-08-28 John W. Eaton * dirfns.cc (Fls): Check EAGAIN to avoid losing output. * toplev.cc (run_command_and_return_output): Likewise. 2003-08-25 John W. Eaton * OPERATORS/op-str-s.cc, OPERATORS/op-str-m.cc: New files. * Makefile.in (OP_XSRC): Add them to the list. 2003-08-22 John W. Eaton * defaults.cc (maybe_add_or_del_packages): Use source_file instead of parse_and_execute. * parse.y (source_file): New function. (Fsource): Use it. * parse.h (source_file): Provide decl. 2003-08-21 John W. Eaton * utils.cc (octave_vsnprintf): Copy va_list to avoid using more than once. 2003-08-07 John W. Eaton * utils.cc (octave_vsnprintf): Call octave_raw_vsnprintf instead of calling vsnprintf directly. (octave_vsnprintf) [HAVE_C99_VSNPRINTF]: Declare nchars to be size_t. 2003-08-06 Heine Kolltveit * utils.cc (check_dimensions(Array&, char), get_dimensions(octave_value&, char, Array&): New functions. * utils.h (check_dimensions (Array&, char), get_dimensions (octave_value&, char, Array&)): Provide decl. * data.cc (fill_matrix): Also create N-d arrays. (Fones, Fzeros): Handle more than 2 args to create N-d arrays. 2003-07-30 John W. Eaton * data.cc (make_diag): Use std::abs instead of our own ABS macro. * utils.cc (identity_matrix): Move here from data.cc. (identity_matrix): Use std::min instead of our own MIN macro. * utils.h (identity_matrix): Provide decl. * DLD-FUNCTIONS/svd.cc (Fsvd): Improve handling of empty matrix arg. * ov.cc (octave_value(const ArrayN&)): New constructor. * ov.h (octave_value(const ArrayN&)): Provide decl. 2003-07-30 Heine Kolltveit * ov.cc (octave_value(const ArrayN&)): New constructor. * ov.h (octave_value(const ArrayN&)): Provide decl. 2003-07-30 John W. Eaton * ov.h (Vpropagate_empty_matrices): Delete decl. * ov.cc: (Vpropagate_empty_matrices): Delete. (propagate_empty_matrices): Delete. (symbols_of_ov): Delete DEFVAR for propagate_empty_matrices. * utils.cc (empty_arg): Behave as though propagate_empty_matrices is always 1. * ov-range.cc (octave_range::is_true): Likewise. * ov-base-mat.cc (octave_base_matrix::is_true): Likewise. * octave.cc (maximum_braindamage): Also set warn_matlab_incompatible to TRUE. * lex.l (Vwhitespace_in_literal_matrix): Delete. (whitespace_in_literal_matrix): Delete. (symbols_of_lex): Delete DEFVAR for whitespace_in_literal_matrix. ({S}*\,{S}*, {S}+, ({S}*{COMMENT}{SNLCMT}*, {S}*{NL}{SNLCMT}*, maybe_unput_comma): Behave as though old Vwhitespace_in_literal_matrix varaible is always 1. * octave.cc (maximum_braindamage): Don't set whitespace_in_literal_matrix. 2003-07-29 John W. Eaton * Makefile.in (install-lib): Use $(INSTALL), not $(INSTALL_PROGRAM) for $(SHLLIB) files. 2003-07-29 Paul Kienzle * Makefile.in: Don't need special system.c for Cygwin. * oct-procbuf.cc: Use popen rather than fork/exec for Windows. 2003-07-28 Paul Kienzle * sysdep.cc (CYGWIN_init): Convert TMPDIR to system agnostic path. 2003-07-25 Paul Kienzle * help.cc (try_info, display_help_text): Protect spaces in filenames with quotes. * oct-hist.cc (do_edit_history): Likewise. * pt-plot.cc (open_plot_stream): Likewise. 2003-07-15 John W. Eaton * oct-stream.cc (get_size, octave_base_stream::error, octave_base_stream::do_gets, octave_base_stream::getl, octave_base_stream::gets, octave_base_stream::do_scanf, octave_base_stream::scanf, octave_base_stream::do_oscanf, octave_base_stream::oscanf, do_printf_conv, octave_base_stream::do_printf, octave_base_stream::printf, octave_base_stream::puts, octave_base_stream::invalid_operation, octave_stream::getl, octave_stream::gets, octave_stream::scanf, octave_stream::oscanf, octave_stream::printf, octave_stream::puts, octave_stream::invalid_stream_error): Handle name of calling function for error messages as a std::string object. Change all callers. * file-io.cc (Fprintf, Fputs): New functions, so we can get function prefixes on error messages right. (Ffgetl, Ffgets, Ffprintf, Fsprintf, Fputs, Ffscanf, Fsscanf): Pass name of calling function to octave_stream method. * oct-stream.h (octave_base_stream::do_char_scanf, octave_base_stream::do_real_scanf): Delete unused decls. * load-save.cc (read_mat5_binary_element): Correctly read struct arrays. * pt-misc.cc (tree_parameter_list::initialize_undefined_elements): New args, warnfor and nargout. Change all callers. (symbols_of_pt_misc): New function. (warn_undefined_return_values): New function. * octave.cc (maximum_braindamage): Don't set define_all_return_values. * ov-usr-fcn.cc (ov_user_function::do_multi_index_op): Always intiialize undefined elements in ret_list to []. Never return last computed value. (Vreturn_last_computed_value, Vdefine_all_return_values): Delete. (return_last_computed_value, define_all_return_values): Delete. (symbols_of_ov_usr_fcn): Delete DEFVARs for return_last_computed_value, define_all_return_values, and default_return_value. 2003-07-14 John W. Eaton * pt-misc.cc (tree_parameter_list::convert_to_const_vector): Don't skip undefined elements. 2003-07-13 John W. Eaton * octave.cc (maximum_braindamage): Don't set default_global_variable_value or initialize_global_variables. * pt-decl.cc (Vinitialize_global_variables): Delete. (initialize_global_variables): Delete. (symbols_of_pt_decl): Delete. (tree_global_command::do_init): Default initial value is now always []. 2003-07-11 John W. Eaton * octave.cc (maximum_braindamage): Don't set default_eval_print_flag. * parse.y (Vdefault_eval_print_flag): Delete: (default_eval_print_flag): Delete. (symbols_of_parse): Delete DEFVAR for default_eval_print_flag. (Feval, Fevalin): Return empty octave_value_list and turn printing on in eval_string if nargout is zero. * ov-list.cc (octave_list::assign): Check Vwarn_resize_on_range_error, not Vresize_on_range_error. * ov.cc (Vwarn_resize_on_range_error): New variable. (warn_resize_on_range_error): New function. (symbols_of_ov): Add DEFVAR for warn_resize_on_range_error. * ov.cc (Vresize_on_range_error): Delete. (resize_on_range_error): Delete. (symbols_of_ov): Delete DEFVAR for resize_on_range_error. * pt-mat.cc (Vwarn_empty_list_elements): New variable. (warn_empty_list_elements): New function. (symbols_of_pt_mat): Add DEFVAR for warn_empty_list_elements. (tm_row_const::tm_row_const_rep::init, tm_const::init): Check Vwarn_empty_list_elements, not Vempty_list_elements_ok. * pt-mat.cc (Vempty_list_elements_ok): Delete. (empty_list_elements_ok): Delete. (symbols_of_pt_mat): Delete DEFVAR for empty_list_elements_ok. 2003-07-11 Russell Standish * TEMPLATE-INST/Array-tc.cc (resize_fill_value): Provide specialization. 2003-07-10 John W. Eaton * strfns.cc (Fchar): Force string conversions without warnings. * ov.h (octave_value::convert_to_str, octave_value::all_strings, octave_value::string_value, octave_value:convert_to_str_internal): New arg, force. Fix all derived classes to match. * strfns.cc (Fchar): Temporarily reset Vwarn_num_to_str to avoid warnings. * ov.cc (convert_to_str): New arg, force. * octave.cc (maximum_braindamage): Don't set treat_neg_dim_as_zero. * utils.cc (Vwarn_neg_dim_as_zero): New variable. (warn_neg_dim_as_zero): New function. (symbols_of_utils): Add DEFVAR for warn_neg_dim_as_zero. (check_dimensions): Check Vwarn_neg_dim_as_zero, not Vtreat_neg_dim_as_zero. * utils.cc (Vtreat_neg_dim_as_zero): Delete. (treat_neg_dim_as_zero): Delete. (symbols_of_utils): Delete DEFVAR for treat_neg_dim_as_zero. 2003-07-09 John W. Eaton * octave.cc (maximum_braindamage): Don't set prefer_column_vectors. * ov.cc (Vprefer_column_vectors): Delete. (prefer_column_vectors): Delete. (symbols_of_ov): Delete DEFVAR for prefer_column_vectors. * octave.cc (maximum_braindamage): Don't set do_fortran_indexing. * ov-re-mat.cc (octave_matrix::double_value, octave_matrix::complex_value): Use Vwarn_fortran_indexing, not Vdo_fortran_indexing. * ov-range.cc (octave_range::double_value, octave_range::complex_value): Likewise. * ov-cx-mat.cc (octave_complex_matrix::double_value, octave_complex_matrix::complex_value): Likewise. * ov-ch-mat.cc (octave_char_matrix::double_value, octave_char_matrix::complex_value): Likewise. * ov-bool-mat.cc (octave_bool_matrix::double_value, octave_bool_matrix::complex_value): Likewise. * ov.cc (Vwarn_fortran_indexing): New variable. (warn_fortran_indexing): New function. (symbols_of_ov): Add DEFVAR for warn_fortran_indexing. (octave_value::vector_value, octave_value::int_vector_value, (octave_value::complex_vector_value): Check Vwarn_fortran_indexing, not Vdo_fortran_indexing. * ov.h (Vwarn_fortran_indexing): Provide decl. * ov.cc (Vdo_fortran_indexing): Delete unused variable. (do_fortran_indexing): Delete unused function. (symbols_of_ov): Delete DEFVAR for do_fortran_indexing. * ov.h (Vdo_fortran_indexing): Delete decl. * ov.cc (octave_value::convert_to_str): Call convert_to_str_internal. (octave_value::convert_to_str_internal): New virtual function. Rename all derived class convert_to_str functions to match. * variables.cc (generate_struct_completions): Set discard_warning_messages, not Vwarning_option. Also protect warning_state. * parse.y (fold): Temporarily discard warning messages. Also protect warning_state. * error.cc (discard_warning_messages): New variable. (vwarning): Use it. (warning): Don't print backtrace if discard_warning_messages is true. * ov.cc (octave_value::convert_to_str): Handle type conversion warning here. * gripes.cc (gripe_implicit_conversion): New function accepting std::string args. * octave.cc (maximum_braindamage): Don't set implicit_num_to_str_ok or implicit_str_to_num_ok. * ov-base.cc (octave_base_value::char_matrix_value): Vimplicit_num_to_str_ok no longer exists. (octave_base_value::all_strings): Likewise. (octave_base_value::string_value): Likewise. * ov-str-mat.cc (octave_char_matrix_str::matrix_value): Warn based on Vwarn_str_to_num instead of Vimplicit_str_to_num_ok. * ov.cc (Vwarn_num_to_str, Vwarn_str_to_num): New variables. (warn_num_to_str, warn_str_to_num): New functions. (symbols_of_ov): Add DEFVARs for warn_num_to_str and Vwarn_str_to_num. * ov.h (Vwarn_num_to_str, Vwarn_str_to_num): Provide decl. * ov.cc (Vimplicit_num_to_str_ok, Vimplicit_str_to_num_ok): Delete unused variables. (implicit_num_to_str_ok, implicit_str_to_num_ok): Delete unused functions. (symbols_of_ov): Delete DEFVARs for implicit_num_to_str_ok and implicit_str_to_num_ok. * ov.h (Vimplicit_num_to_str_ok, Vimplicit_str_to_num_ok): Delete decls. * pt-mat.cc (tree_matrix::rvalue): Vimplicit_num_to_str_ok no longer exists. * ov.cc (Vwarn_imag_to_real): New variable. (warn_imag_to_real): New function. (symbols_of_ov): Add DEFVAR for warn_imag_to_real. * ov.h (Vwarn_imag_to_real): Provide decl. * ov.cc (Vok_to_lose_imaginary_part): Delete unused variable. (ok_to_lose_imaginary_part): Delete unused function. (symbols_of_ov): Delete DEFVAR for ok_to_lose_imaginary_part. * ov.h (Vok_to_lose_imaginary_part): Delete decl. * ov-complex.cc (octave_complex::double_value): Warn based on Vwarn_imag_to_real instead of Vok_to_lose_imaginary_part. (octave_complex::matrix_value): Likewise. * ov-cx-mat.cc (octave_complex_matrix::double_value): Likewise. (octave_complex_matrix::matrix_value): Likewise. * octave.cc (maximum_braindamage): Don't set ok_to_lose_imaginary_part. 2003-07-08 John W. Eaton * sighandlers.cc (sig_hup_or_term_handler): New function. (install_signal_handlers): Install sig_hup_or_term_handler for SIGHUP and SIGTERM instead of generic_sig_handler. (Vsighup_dumps_octave_core, Vsigterm_dumps_octave_core): New static variables. (sighup_dumps_octave_core, sigterm_dumps_octave_core): New static functions. (symbols_of_sighandlers): Add DEFVARs for sighup_dumps_octave_core and sigterm_dumps_octave_core. * defaults.h.in (OCTAVE_LOCALAPIFCNFILEDIR, OCTAVE_LOCALAPIOCTFILEDIR): Subsitute new variables. * defun.cc (check_version): Compare version to OCTAVE_API_VERSION, not OCTAVE_VERSION. Mismatch is now fatal. * defun-int.h (DEFINE_FUN_INSTALLER_FUN3): Pass OCTAVE_API_VERSION instead of OCTAVE_VERSION to check_version. * version.h (OCTAVE_API_VERSION): New macro, initial value api-v1. * defaults.cc (Vdefault_exec_path): New static variable. (set_default_default_exec_path): New function. (install_defaults): Call it. (exec_path): Use it. (default_exec_path): New function. (symbols_of_defaults): Add DEFVAR for DEFAULT_EXEC_PATH. 2003-07-07 John W. Eaton * defaults.h.in (OCTAVE_LOCALSTARTUPFILEDIR, OCTAVE_STARTUPFILEDIR): Set values directly instead of constructing them. 2003-06-28 Arno J. Klaassen * toplev.cc (octave_config_info): Key for OCTAVE_CONF_DEFS should be DEFS, not UGLY_DEFS. 2003-06-27 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.50. 2003-06-26 John W. Eaton * variables.cc (symbol_exist): Distinguish between user and dld functions loaded in memory. 2003-06-24 John W. Eaton * pt-mat.cc (tm_row_const::init, tm_const::init): Don't ignore empty matrices that have one non-zero dimension. * variables.cc (symbol_exist): Use dir_path::find_first_of to search for .oct and .m files. * ov-base.cc (octave_base_value::subsasgn): Also allow type conversion for empty numeric objects with more than one index. * ov-base-mat.cc (octave_base_matrix::subsasgn): Likewise. 2003-06-23 John W. Eaton * variables.cc (do_who): New arg, return_list. If return_list is true, return values in cell or struct arrays instead of printing. (Fwho, Fwhos): If nargout is 1, ask do_who to return lists of values. * oct-map.h (Octave_map (const std::string&, const octave_value_list&): New constructor. 2003-06-19 John W. Eaton * pt-idx.cc (tree_index_expression::rvalue): Correctly handle index expressions like x(end).f(end). (tree_index_expression::lvalue): Likewise. * pt-arg-list.cc (F__end__): Add nr, nc info to error messages. 2003-06-18 John W. Eaton * pr-output.cc (set_format (const Matrix&, int&, double&)): Ask any_element_is_negative to return true for negative zero as well. (set_format (const ComplexMatrix&, int&, int&, double&)): Likewise. 2003-06-16 John W. Eaton * toplev.cc (main_loop): Set octave_interrupt_hook and octave_bad_alloc_hook to unwind_protect::run_all here. (recover_from_exception): Don't call unwind_protect::run_all here. * pt-except.cc (do_catch_code): Return immediately if octave_interrupt_immediately is nonzero. * sighandlers.cc (sigint_handler): If jumping, don't set octave_interrupt_state. 2003-06-14 John W. Eaton * load-save.cc (get_save_type): Avoid all save types other than LS_DOUBLE to avoid apparent Matlab bugs. 2003-06-13 John W. Eaton * parse.y (frob_function, parse_fcn_file): Handle help_buf as stack of strings. * lex.l ({CCHAR}): Handle help_buf as stack of strings. Store text returned from grab_help_text in help_buf here. (reset_parser): Handle help_buf as stack of strings. (prep_for_nested_function): Push empty string onto help_buf stack. (grab_help_text): Return help text instead of storing it in help_buf. * parse.h, parse.y (help_buf): Now a stack of strings. * oct-stream.cc (printf_value_cache::string_value): Don't attempt to extract values when none are available. 2003-06-04 John W. Eaton * pt-plot.cc (Vgnuplot_has_multiplot): Delete variable. (gnuplot_has_multiplot): Delete. (symbols_of_pt_plot): Delete DEFVAR for gnuplot_has_multiplot. 2003-05-28 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.49. 2003-05-28 Teemu Ikonen * load-save.cc (save_mat5_binary_element, save_mat_binary_data): Allow saving of non-7-bit ASCII characters. 2003-05-28 John W. Eaton * oct-stream.cc (FINISH_CHARACTER_CONVERSION, octave_base_stream::do_scanf): Do a better job of resizing for charachter conversions. 2003-05-25 John W. Eaton * ov-cx-mat.cc (octave_complex_matrix::assign): Move definition here. * ov-cx-mat.h: From here. 2003-05-24 John W. Eaton * ov-range.cc (octave_range::try_narrowing_conversion): Convert to [](1x0) instead of [](0x0) if range is empty. 2003-05-14 John W. Eaton * Makefile.in: Handle DESTDIR. 2003-05-13 John W. Eaton * lex.l: Use yyunput (X, yytext) instead of unput (X) for newer versions of flex. 2003-05-06 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.48. 2003-05-02 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.47. 2003-05-01 John W. Eaton * load-save.cc (save_ascii_data): If saving a range with non-integer base, limit, or increment, save as matrix instead. (get_save_type): Avoid unsigned types. 2003-04-30 John W. Eaton * octave.cc (initialize_pathsearch): Don't save old and set new value of TEXMFDBS. * toplev.cc (restore_texmfdbs_envvar): Delete function. (Fsystem): Don't set and reset TEXMFDBS. * toplev.h, toplev.cc (octave_original_texmfdbs): Delete variable. 2003-04-25 John W. Eaton * DLD-FUNCTIONS/getpwent.cc (Fgetpwnam): Delete unnecessary c_str() method. 2003-04-22 John W. Eaton * file-io.cc: Include for auto_ptr. 2003-04-18 John W. Eaton * toplev.cc (octave_config_info): Delete LIBKPATHSEA from struct. * oct-conf.h.in: Don't substitute LIBKPATHSEA. * octave.cc (octave_main): Don't call dir_path::set_program_name. 2003-04-17 John W. Eaton * ov-file.h (octave_file::empty_clone): Create an octave_scalar object, not an octave_file object. 2003-04-01 John W. Eaton * load-save.cc (hdf5_read_next_data): Extract list before assigning to map element. (add_hdf5_data): Prefix faked names with '_' so they are valid identifiers. 2003-03-24 Mats Jansson * syscalls.cc (Fkill): Fixed docstring typo. 2003-03-18 John W. Eaton * ov-cell.h (octave_cell::is_matrix_type): New function. 2003-03-09 Duncan Temple Lang * octave.cc (octave_main): New arg, embedded. * octave.h: Fix decl. * main.c: Pass 0 for embedded here. 2003-03-03 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.46. * oct-conf.h.in: Undo previous change. * load-save.cc (read_mat5_binary_element): Handle structure arrays. (save_mat5_binary_element): Likewise. 2003-03-01 John W. Eaton * ov-cell.cc (octave_cell::subsasgn): Use make_unique in appropriate places to preserve copy on write semantics. * oct-conf.h.in: Substitute OCTAVE_CONF_KPATHSEA_INCFLAGS. * oct-stdstrm.h (octave_stdiostream::output_stream): Return stream if mode is out, not in. 2003-02-22 John W. Eaton * strfns.cc (Fchar): New function. * ov-cell.cc (octave_cell::all_strings): Allow elements to be string arrays. * ov.cc (octave_value::all_strings, octave_value::convert_to_str): New optional arg, pad. Change all derived classes. * ov-struct.cc (Ffieldnames, Fisfield): Move here from data.cc. * data.cc (Ffieldnames): Rename from Fstruct_elements. Return cell array instead of a string array. (Fisfield): Rename from struct_contains. 2003-02-22 Paul Kienzle * toplev.cc: Put config info in array of strings, then convert to map. 2003-02-22 John W. Eaton * variables.cc (symbol_exist): For names like foo.bar, don't omit the part after the dot. 2003-02-21 John W. Eaton * octave.cc (fun_to_call): New static variable. (octave_main): Pass it to main_loop. (long_opts): Accept --funcall. (usage_string, verbose_usage): Add --funcall. * toplev.cc (main_loop): New arg, fun_to_call. If non-empty, evaluate this function before continuing. 2003-02-21 Paul Kienzle * file-io.cc (Fmkstemp): Use OCTAVE_LOCAL_BUFFER instead of using std::auto_ptr directly. 2003-02-21 John W. Eaton * ov.h, ov.cc (octave_value (long long int)): New constructor. (octave_value (unsigned long long int)): Likewise. * oct-obj.h (octave_value_list::operator delete): Handle systems with or without placement delete. 2003-02-21 Paul Kienzle * utils.cc (octave_vsnprintf): Return value of vsnprintf is int, not size_t. Make sure there is some space left in the buffer for vsnprintf versions which return the number of characters written even when the buffer is too short. 2003-02-20 John W. Eaton * debug.cc (get_user_function): Use dynamic_cast, not static_cast. * ov-usr-fcn.cc (octave_user_function::traceback_error): Now const. * ov.cc (octave_value (const octave_fcn_handle&)): New constructor. (octave_value::fcn_handle_value): New virtual function. * ov-base.cc (octave_value::fcn_handle_value): Provide default. * ov-usr-fcn.cc (octave_user_function::stash_fcn_file_name): New arg, nm. Change all callers. * ov-fcn.h (octave_function::is_nested_function): New virtual function. * parse.y (get_feval_args): New function. (feval (octave_function *, const octave_value_list&, int)): Likewise. (feval (const octave_value_list&, int)): Allow the first arg to be a function handle as well as a string. * variables.cc (load_function): New function. * pt-walk.h, pt-pr-code.h, pt-pr-code.cc, pt-check.h, pt-check.cc, pt-bp.h, pt-bp.cc: Handle new tree_fcn_handle class. * pt-all.h: Include pt-fcn-handle.h. * pt-fcn-handle.h, pt-fcn-handle.cc, ov-fcn-handle.h, ov-fcn-handle.cc: New files. 2003-02-19 John W. Eaton * parse.y (FCN_HANDLE): New token type. (fcn_handle): New non-terminal. (primary_expr): Also accept fcn_handle. (tree_fcn_handle_type): New %type. (union): New field, tree_fcn_handle_type. (make_fcn_handle): New function. * lex.l (@{IDENT}): Recognize function handle syntax. (@): Don't recognize "@" as a single token. * load-save.cc (struct hdf5_callback_data): Provide constructor. (hdf5_callback_data::name, hdf5_callback_data::doc): Now std::string instead of char*. Change all uses. 2003-02-18 Roger Banks * load-save.cc (read_ascii_data, read_ascii_data, read_mat5_binary_element, save_mat5_binary_element, save_ascii_data): Handle cell arrays. (write_mat5_cell_array): New function. 2003-02-18 John W. Eaton * Makefile.in (DLD_XSRC): Delete log.cc from the list. Add sqrtm.cc to the list. * DLD-FUNCTIONS/log.cc: Delete. 2003-02-18 Paul Kienzle * DLD-FUNCTIONS/sqrtm.cc: New file. 2003-02-18 David Bateman * DLD-FUNCTIONS/lu.cc (Flu): Allow non-square matrices. 2003-02-17 John W. Eaton * load-save.cc (read_binary_file_header, do_load, do_save, write_header): No longer static. (load_save_format): Move enum decl to load-save.h. 2003-02-15 John W. Eaton * oct-stdstrm.h, oct-stdstrm.cc (octave_base_stdiostream, octave_iostdiostream, octave_istdiostram, octave_ostdiostream): Combine all functionality into one class, octave_stdiostream. Change all uses. * file-io.cc (Ftmpfile, Fmkstemp): New functions. * oct-stdstrm.h (octave_iostdiostream): New class. (octave_istdiostream::octave_istdiostream, octave_istdiostream::create, octave_ostdiostream::octave_ostdiostream, octave_ostdiostream::create, octave_iostdiostream::octave_iostdiostream, octave_iostdiostream::create): Make close function the last arg. Change all uses. * c-file-ptr-stream.h (io_c_file_ptr_stream): New class. 2003-02-14 John W. Eaton * octave.cc (maximum_braindamage): Set boolean built-in variables to true and false instead of 1.0 and 0.0. (octave_main): Likewise. * error.cc (Fwarning): Likewise. * pager.cc (Fmore): Make the no-arg case work too. * ov-str-mat.h (octave_char_matrix_str::is_real_type, octave_char_matrix_str::is_matrix_type, octave_char_matrix_str::is_numeric_type): Always return false. 2003-02-13 John W. Eaton * lex.l (): If we are parsing a command, reset start state. Use BEGIN (INITIAL) instead of BEGIN 0. Use parens around start state in BEGIN statements. 2003-02-13 Paul Kienzle * variables.cc (Fmlock, Fmunlock, Fmislocked): New functions. * variables.cc (mlock, munlock, mislocked): New functions. * variables.h: Provide decls. * symtab.h (symbol_record::unmark_static): New function. 2003-02-12 John W. Eaton * error.cc (reset_error_handler): New function. * toplev.cc (main_loop): Use it here. * lex.l (reset_parser): Don't set error_state and warning_state here. * parse.y (eval_string): Reset parser before calling yyparse. 2003-01-29 John W. Eaton * data.cc (Ffmod): New function. * c-file-ptr-stream.cc (c_file_ptr_buf::underflow_common): New function. * c-file-ptr-stream.h (c_file_ptr_buf::underflow, c_file_ptr_buf::uflow): Use it. (c_file_ptr_buf): Derive from std::streambuf, not OCTAVE_STD_FILEBUF. Don't cache file descriptor. 2003-01-28 John W. Eaton * DLD-FUNCTIONS/minmax.cc: Move min and max functions from here to liboctave/dMatrix.cc and liboctave/CMatrix.cc. 2003-01-24 John W. Eaton * DLD-FUNCTIONS/rand.cc: Rewrite to use new octave_rand functions. 2003-01-23 John W. Eaton * oct-stream.cc (octave_base_stream::do_printf): Handle values outside the range of integers in int conversions for compatibilitiy wtih Matlab. 2003-01-22 John W. Eaton * load-save.cc (get_mat_data_input_line): Handle lines with CR only as separator. * oct-stream.cc (octave_base_stream::do_printf): Handle Inf and NaN in int conversions for compatibility with Matlab. * data.cc (symbols_of_data): Doc fix for realmin. * cutils.c (octave_raw_vsnprintf): New function. * utils.cc (octave_snprintf): Move here from cutils.c. (octave_Vsnprintf): Likewise. Allow octave_raw_vsnprintf to be interrupted. * utils.h (octave_vsnprintf, octave_snprintf): No longer extern "C". 2003-01-21 John W. Eaton * pt-loop.cc (tree_complex_for_command::eval): Fix typo. 2003-01-16 Mumit Khan * mk-oct-links: Use $SED if set. * mkbuiltins: Likewise. * mkdefs: Likewise. * mkdocs: Likewise. * mkgendoc: Likewise. * mkops: Likewise. 2003-01-11 Paul Kienzle * Makefile.in (gendoc$(BUILD_EXEEXT)): Pass $(BUILD_CXXFLAGS) and $(BUILD_LDFLAGS) to compiler. 2003-01-11 John W. Eaton * parse.y (Fassignin): New function. 2003-01-10 John W. Eaton * sighandlers.cc (make_sig_struct): New function. (symbols_of_sighandlers): Add DEFCONST for SIG struct. * syscalls.cc (Fkill): New function. 2003-01-06 John W. Eaton * oct-stream.cc (get_size): If only one dimension is specified and it is zero, also set the other dimension to zero instead of one. 2003-01-04 John W. Eaton * sysdep.cc [__DECCXX]: Add a kluge for some missing template functions. 2003-01-03 John W. Eaton * ov-usr-fcn.cc (octave_vr_val): Assert vr_list != 0, not vr_list. * variables.cc (builtin_string_variable, builtin_any_variable, builtin_real_scalar_variable, bind_builtin_variable): Likewise. * TEMPLATE-INST/Array-tc.cc: Provide specialization of Array::resize_fill_value before instantiation of Array. * oct-obj.h (octave_value_list::operator delete): Define version of delete operator to correspond to placement new operator. * mkgendoc: In generated code, define __USE_STD_IOSTREAM if using Compaq C++. * Makefile.in (distclean): Also remove doc-files and gendoc.cc. * input.cc (initialize_command_input): Use const for initialization of char * from literal string. * pt-plot.cc (subplot::extract_plot_data): Call single_subsref, not subsref. * ov.h, ov.cc (single_subsref (const std::string&, const octave_value_list&)): Rename from subsref. * symtab.cc (symbol_table::rename): Explicitly convert C string to std::string so type of second arg of ?: matches third. (symbol_table::lookup): Likewise. * mappers.cc: Remove std:: qualifiers from C library names. 2003-01-03 John W. Eaton * pt-exp.h (tree_expression::has_magic_end): New pure virtual function. * pt-id.h (tree_identifier::has_magic_end): New function. * pt-colon.h (tree_colon_expression::has_magic_end): Likewise. * pt-idx.h (tree_index_expression::has_magic_end): Likewise. * pt-const.h (tree_constant::has_magic_end): Likewise. * pt-unop.h (tree_unary_expression::has_magic_end): Likewise. * pt-binop.h (tree_binary_expression::has_magic_end): Likewise. * pt-assign.h (tree_multi_assignment::has_magic_end): Likewise. (tree_simple_assignment::has_magic_end): Likewise. * pt-mat.cc (tree_matrix::has_magic_end): Likewise. * pt-arg-list.cc (tree_argument_list::has_magic_end): Likewise. * pt-arg-list.cc (tree_argument_list::append): Check all expression types for magic end token.. * file-io.cc (Ftmpnam): Improve error checking. (symbols_of_file_io): Move definition of P_tmpdir here from dirfns.cc. * dirfns.cc (symbols_of_dirfns): Install new built-in constant P_tmpdir. 2003-01-02 John W. Eaton * dirfns.cc (symbols_of_dirfns): New function. Install new built-in constant filesep. * utils.cc (Fisvaranme): New function. (valid_identifier): Identifiers can't start with digits! Doh! * lex.l (Fiskeyword): New function. * Makefile.in (INCLUDES): Don't forget base-list.h. * symtab.cc (symbol_record::define): If definition already exists, redefine it instead of replacing it. * variables.cc (symbol_exist): Don't use reference when handling sr->def (). * pt-plot.cc (save_in_tmp_file): octave_value arg is now const. * pt-misc.cc (tree_parameter_list::initialize_undefined_elements): Likewise. * symtab.cc (symbol_record::clear): Don't do anything if the symbol record is already undefined. 2003-01-01 John W. Eaton * pt-arg-list.cc (tree_argument_list::append): New function. (tree_argument_list::convert_to_const_vector): Don't save and set pointer to indexed object if list_includes_magic_end is false. * pt-arg-list.h (tree_argument_list::append): Provide decl. (tree_argument_list::list_includes_magic_end): New data member. (tree_argument_list::tree_argument_list): Initialize it. * ov-base.cc (octave_base_value::char_matrix_value, octave_base_value::all_strings, octave_base_value::string_value): Attempt conversions here if Vimplicit_num_to_num_ok is true. * ov.cc (Vimplicit_num_to_str_ok): Move here from pt-mat.cc and make extern. * ov.h: Provide decl. * oct-stream.cc (printf_value_cache::looking_at_string): Delete. (printf_value_cache::string_value): Just attempt conversion. (octave_base_stream::do_printf): When doing '%s' format, just attempt converstion. * file-io.cc (Ffread): Allow size to be omitted even when additional arguments are given. 2002-12-31 John W. Eaton * pt-arg-list.cc (F__end__): Fail if rows or columns is negative. (tree_argument_list::convert_to_const_vector): Only protect and save pointer to the indexed object if it is a constant. * syscalls.cc (Fmkfifo): Use long_value instead of cast. * ov.h (octave_value::short_value, octave_value::ushort_value, octave_value::uint_value, octave_value::long_value, octave_value::ulong_value): New functions. * syscalls.cc (mk_stat_map, Fgetegid, getgid, geteuid): Likewise. Delete unnecessary casts. * file-io.cc (Ffgetl, Ffgets, Fftell, Fsscanf): Likewise. * toplev.cc (Fsystem): Likewise. * ov-file.h (octave_file::double_value, octave_file::scalar_value): Delete unnecessry cast. * ov.cc (octave_value::octave_value): Add constructors for octave_time, short int, unsigned short int, unsigned int, long int, unsigned long int, * ov.h (octave_value::do_subsref (const std::string&, const octave_value_list&)): Rename from subsref. Change all derived classes. * input.cc (generate_completion): Delete unused variable prefix_len. * ov.h (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Delete volatile qualifier for decls of static_type_id and t_id. (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Likewise, for def of t_id. 2002-12-30 John W. Eaton * utils.cc (Ffile_in_path): Index args correctly. * utils.cc (Ffile_in_path): Call error, not print_usage, for invalid option error. (Ffile_in_loadpath): Likewise. * load-save.cc: Use OCTAVE_LOCAL_BUFFER instead of local automatic arrays or using new/delete. * lex.l (.): Try another approach to handling EOF here. * load-save.cc (read_mat_ascii_data): Use isalpha and isalnum, not ::isalpha and ::isalnum. * defaults.cc (maybe_add_or_del_packages): SCRIPT_FILE arg is now a const reference type. * ov.h (octave_value::subsref, octave_value::subsasgn, octave_value::assign, octave_value::do_non_const_unary_op, octave_value::numeric_assign): TYPE arg is now a const reference type. Change all derived classes. * ov.cc (octave_value::subsref (const std::string&, const octave_value_list&)): Move body here, from ov.h. * octave.cc (octave_main): Return 0 at end of function to avoid compiler warnings. 2002-12-30 Paul Kienzle * parse.y: Fix typo in doc string. 2002-12-29 John W. Eaton * DLD-FUNCTIONS/lpsolve.cc (Flpsolve): Rename from Flp_solve. (Flpsolve_options): Rename ffrom Flp_solve_options. 2002-12-27 John W. Eaton * parse.y (Fevalin): New function. * variables.cc (curr_caller_sym_tab): New global variable. * variables.h: Provide decl. (initialize_symbol_tables): Initialize it. * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Protect and set it here. 2002-12-26 John W. Eaton * utils.cc (search_path_for_file): Second arg now string_vector. Use find_first_of, not find. (search_path_for_all_files): Second arg now string_vector. Use find_all_first_of, not find_all. (Ffile_in_path): Accept cell array of strings as first argument. (Ffile_in_loadpath): Likewise. * dynamic-ld.cc (octave_dynamic_loader::load): New arg, file_name. (octave_dynamic_loader::do_load): Likewise. If file_name is not empty, use it instead of searching in path. * parse.y (load_fcn_from_file): Use find_first_of to perform search. * ov-cell.cc (octave_cell::all_strings): New function. * ov-cell.h: Provide decl. 2002-12-25 John W. Eaton * parse.y (function_end): If parsing a nested function, set lexer_flags.parsing_nested_function to -1. (frob_function): If lexer_flags.parsing_nested_function is negative, set it to zero. * lex.h (lexical_feedback::parsing_nested_function): Now int. Change uses as needed. * lex.l (NESTED_FUNCTION_BEGIN): Rename from NESTED_FUNCTION_START. Now an exclusive start state. (NESTED_FUNCTION_END): New exclusive start state. (is_keyword): When matching a new function keyword in a nested function context, explicitly return END and set start state to NESTED_FUNCTION_END. (.): Accept EOF here too. * variables.cc (link_to_builtin_or_function): Maybe prepend parent function name symbol name. * parse.y (parent_function_name): New variable. (fcn_name): New non-terminal. (function2): Use it. (parsed_fcn_name): Fold into fcn_name. (function_end): Don't call check_for_garbage_after_fcn_def. Set lexer_flags.parsing_nested_function on EOF. * parse.h: Provide decl for parent_function_name. * ov-usr-fcn.h (octave_user_function::mark_as_nested_function, (octave_user_funciton::is_nested_function): New functions. (octave_user_function::nested_function): New data member. (octave_user_function::do_multi_index_op): Maybe protect and set curr_parent_function pointer. * parse.y (frob_function): Maybe mark as nested function. * toplev.cc (curr_parent_function): New global variable. * toplev.h: Provide decl. * lex.l (check_for_garbage_after_fcn_def): Delete. * lex.h: Delete decl. * lex.l (prep_for_nested_function): New function. (): Use it here. (is_keyword): And here. (lookup_identifier): Maybe prepend parent function name. * variables.cc (initialize_symbol_tables): Give names to the three main symbol tables. * symtab.cc (symbol_table::lookup, symbol_table::rename): Print debugging info if Vdebug_symtab_lookups is nonzero. (debug_symtab_lookups): New function. (Vdebug_symtab_lookups): New static varaible. (symbols_of_symtab): DEFVAR it. * symtab.h (symbol_table::table_name): New member variable. (symtab_count): New static member variable. (symbol_table::symbol_table): Handle table name. 2002-12-24 John W. Eaton * parse.y (frob_function): Don't give nested functions the same name as the function file. * lex.h (lexical_feedback::parsing_nested_function): New data member. * lex.l (lexical_feedback::init): Initialize it to false. (): Set lexer_flags.parsing_nested_function to true. * parse.y (symtab_context): Now a stack. Change all uses. * lex.l (NESTED_FUNCTION_START): New start state to handle "function" keyword in a nested function context. (prep_for_function): New function. (is_keyword): Allow functions to be nested in function files. * lex.l (is_keyword): Maybe ignore END tokens. Increment and decrement end_tokens_expected as appropriate. (handle_identifier): If is_keyword returns -1, return immediately. ({IDENT}{S}*): Do nothing if handle_identifier returns -1. * parse.y (end_tokens_expected): New variable. (parse_fcn_file): Protect and set it. * parse.y (begin_obj_idx): Increment lexer_flags.looking_at_object_index. (postfix_expr): Decrement it as appropriate here. * lex.h (lexical_feedback::looking_at_object_index): Now int. * parse.y (postfix_expr): Reset lexer_flags.looking_at_object_index in () and {} cases too. 2002-12-21 John W. Eaton * pt-arg-list.cc (indexed_object, indexed_position): New file-scope static variables. (tree_argument_list::convert_to_const_vector): New arg, object. Protect and set indexed_object and indexed_position. (F__end__): New function. * octave-lvalue.h (octave_lvalue::object): New member function. * pt-idx.cc (make_value_list): New arg, object. Change all callers. Pass object to convert_to_const_vector. * lex.h (lexical_feedback.looking_at_object_index): New data member. * lex.l (lexical_feedback::init): Initialize it. (is_keyword): If looking at object index, end is not a keyword. (handle_identifier): If end is not a keyword, transform it to __end__. * parse.y (begin_obj_idx): New non-terminal. (postfix_expr): Use it. * defun.cc (install_builtin_function): New arg, can_hide_function. * defun-int.h: Fix decl. (DEFCONSTFUN_INTERNAL): New macro. * defun.h (DEFCONSTFUN): New macro. * mkbuiltins (XDEFCONSTFUN_INTERNAL): New macro. * mkgendoc: Likewise. * Makefile.in (DEFUN_PATTERN): Make it work for DEFCONSTFUN too. * symtab.h (symbol_record::can_hide_function): New data member. (symbol_record::symbol_record): Initialize it. * symtab.cc (symbol_record::variable_reference): Also check can_hide_function flag. 2002-12-20 John W. Eaton * DLD-FUNCTIONS/time.cc (extract_tm): Use int_value() instead of casting double_value() to int. * ov.cc (octave_value::next_subsref): Arg "skip" is now size_t. * oct-obj.h (octave_value_list::octave_value_list (double), octave_value_list::octave_value_list (const Matrix&), octave_value_list::octave_value_list (const DiagMatrix&), octave_value_list::octave_value_list (const RowVector&), octave_value_list::octave_value_list (const ColumnVector&), octave_value_list::octave_value_list (const Complex&), octave_value_list::octave_value_list (const ComplexMatrix&), octave_value_list::octave_value_list (const ComplexDiagMatrix&), octave_value_list::octave_value_list (const ComplexRowVector&), octave_value_list::octave_value_list (const ComplexColumnVector&), octave_value_list::octave_value_list (const char *), octave_value_list::octave_value_list (const std::string&), octave_value_list::octave_value_list (const string_vector&), octave_value_list::octave_value_list (double, double, double), octave_value_list::octave_value_list (const Range&): Delete. Adjust uses of octave_value/octave_value_list to handle this change. * ov.cc (octave_value::octave_value (int)): New constructor. * ov.h: Provide decl. In files that construct integer-valued octave_value objects, use ints instead of casing to double. 2002-12-19 John W. Eaton * load-save.cc (read_mat_ascii_data): Allow commas to separate values. Try harder to convert filenames to valid identifiers in a Matlab-compatible way. 2002-12-18 John W. Eaton * Makefile.in: No need to add $(LIBKPATHSEA) to LINK_DEPS, since it is not included in liboctave. 2002-12-18 JD Cole * pt-check.cc (tree_checker::visit_subplot_axes, tree_checker::visit_do_until_command): New functions. * pt-check.h: Provide decl. 2002-12-17 John W. Eaton * variables.cc (Fclear): Fix off-by-one error. * oct-stream.cc (octave_base_stream::do_gets): Correctly read last line of file even if it does not end with new line character. * pt-select.cc (equal): Don't look up == op, just try it and see whether it works. * oct-stream.cc (printf_format_list::printf_format_list): Handle empty format string. 2002-12-06 John W. Eaton * pt-mat.cc (class tm_row_const::tm_row_const_rep): Derive from octave_base_list instead of SLList. Fix tm_row_const member functions as needed, change all uses. (class tm_const): Derive from octave_base_list, not SLList. Fix member functions as needed, change all uses. * pt-mat.h (class tree_matrix): Derive from octave_base_list instead of including SLList object as data member. Fix member functions as needed, change all uses. * pt-idx.h (tree_index_expression::args, tree_index_expression::arg_nm, tree_index_expression::dyn_field): Now std::list, not SLList. Fix member functions as needed, change all uses. * oct-map.h (Octave_map::map): Now std::map instead of CHMap. Fix member functions as needed, change all uses. * oct-lvalue.h (octave_lvalue::idx): Now std::list instead of SLList object. Fix member functions as needed, change all uses. * dynamic-ld.cc (octave_shlib_list::lib_list): Now std::list instead of DLList object. Fix member functions as needed, change all uses. * ov.h (octave_value::subsref, octave_value::subsasgn): Index arg is not std::list, not SLList. Change all derived classes, all uses. * pt-stmt.h (tree_statement_list): Derive from base_octave_list object instead of including SLList object as data member. Fix member functions as needed, change all uses. * pt-select.h (tree_switch_case_list): Likewise. (tree_if_command_list): Likewise. * pt-misc.h (tree_parameter_list, tree_return_list, tree_va_return_list): Likewise. * pt-plot.h (subplot_list): Likewise. * pt-mat.h (tree_matrix): Likewise. * pt-decl.h (tree_decl_init_list): Likewise. * pt-arg-list.h (tree_argument_list): Likewise. * comment-list.h (octave_comment_list): Likewise. * BaseSLList.cc, DLList.cc, Map.cc, SLList.cc, SLStack.cc, Stack.cc: Delete. * Makefile.in (DIST_SRC): Delete them from the list. * BaseSLList.h, DLList.h, Map.h, Pix.h, SLList.h, SLStack.h, Stack.h: Delete * Makefile.in (INCLUDES): Delete them from the list. * Map-oct-obj.cc, SLList-expr.cc, SLList-misc.cc, SLList-plot.cc, SLList-tc.cc, SLList-tm.cc: Delete. * Makefile.in (TI_XSRC): Delete them from the list. * ov-base-mat.cc (octave_base_matrix::assign): Pass MT::resize_fill_value () as third arg for ::assign. * Cell.h (Cell::resize_fill_value): Use empty Matrix object, not undefined octave_value object. (Cell::Cell (int, int, const octave_value&)): Use resize_fill_value () as default value, not undefined octave_value object. 2002-12-05 John W. Eaton * Makefile.in (DEFUN_PATTERN): Make it work for DEFCMD too. * base-list.h: New file. 2002-12-04 John W. Eaton * toplev.cc (octave_interpreter_ready): New global variable. * toplev.h: Provide decl. * octave.cc (octave_main): Call execute_default_pkg_add_files just before executing startup files. Set octave_interpreter_ready to true before calling execute_default_pkg_add_files. * defaults.cc (maybe_add_or_del_packages, default_load_path, update_load_path_dir_path): New static functions. (set_default_path, loadpath): Call update_load_path_dir_path. (symbols_of_defaults): Use DEFVAR, not DEFCONST for DEFAULT_LOADPATH. (execute_default_pkg_add_files): New function. * defaults.h.in: Provide decl. * utils.cc (search_path_for_all_files): New function. (Ffile_in_loadpath, Ffile_in_path): Allow search to return all files in the path. * Cell.cc (Cell (const string_vector&)): New constructor. * oct-obj.cc (octave_value_list::assign): Allow optional fill value for resizing. * oct-map.cc (Octave_map::assign): Pass fill_value in initial assignment too. 2002-12-03 John W. Eaton * TEMPLATE-INST/Map-tc.cc, TEMPLATE-INST/Map-fnc.cc: Delete. * Makefile.in (TI_XSRC): Delete them from the list. * fn-cache.h (octave_fcn_file_name_cache::cache): Now std::map, not CHMap. * TEMPLATE-INST/SLStack-i.cc, TEMPLATE-INST/SLStack-ovl.cc, TEMPLATE-INST/SLStack-pc.cc, TEMPLATE-INST/SLStack-str.cc, TEMPLATE-INST/SLStack-sym.cc, TEMPLATE-INST/SLStack-tok.cc, TEMPLATE-INST/SLStack-ue.cc, TEMPLATE-INST/SLStack-ui.cc: Delete unnecessary files. * Makefile.in (TI_XSRC): Delete them from the list. * toplev.cc (octave_atexit_functions): Now std::stack, not SLStack. * pt-plot.cc (tmp_files): Likewise. * lex.l (token_stack): Likewise. (class bracket_brace_paren_nesting_level): Make context a data member instead of deriving from SLStack object. Use std::stack instead of SLStack. * ov-usr-fcn.h (octave_user_function::saved_args): Likewise. * symtab.h (symbol_record::context): Likewise. (symbol_record::global_link_context): Likewise. * unwind-prot.h (unwind_protect::elt_list): Rename from list. Now std::stack, not SLStack. * pt-stmt.h (tree_statement_list): Make list member data instead of deriving from SLList object. * pt-select.h (tree_switch_case_list): Likewise. (tree_if_command_list): Likewise. * pt-plot.h (subplot_list): Likewise. * pt-mat.h (tree_matrix): Likewise. * pt-decl.h (tree_decl_init_list): Likewise. * pt-arg-list.h (tree_argument_list): Likewise. * comment-list.h (octave_comment_list): Likewise. * defun.h (DEFCMD): Rename from DEFUN_TEXT. Provide DEFUN_TEXT as an alias for DEFCMD. Change all uses. * variables.cc (at_top_level): New function. (do_who, Fmark_as_command, Funmark_command): Use it. * lex.l (COMMAND_START): Rename from TEXT_FCN. Change all uses. (MATRIX_START): Rename from MATRIX. Change all uses. * variables.cc (command_function_set): Rename from text_function_set. (mark_as_command): Rename from mark_as_text_function. (is_marked_as_command): Rename from is_marked_as_text_function. (Fmark_as_command): Rename from Fmark_as_text_function. (Funmark_command): Rename from Funmark_text_function. (is_command_name): Rename from is_text_function_name. * symtab.h (symbol_record::COMMAND): Rename from TEXT_FUNCTION. (symbol_record::mark_as_command): Rename from mark_as_text_function. (symbol_record::unmark_command): Rename from symbol_record::unmark_text_function. (symbol_record::is_command): Rename from symbol_record::is_text_function. (symbol_record::symbol_def::mark_as_command): Rename from symbol_record::symbol_def::mark_as_text_function. (symbol_record::symbol_def::unmark_command): Rename from symbol_record::symbol_def::unmark_text_function. (symbol_record::symbol_def::is_command): Rename from symbol_record::symbol_def::is_text_function. * pt-jump.h, pt-jump.cc: Undo previous changes. * parse.y: Undo previous changes for brea, continue, and return. 2002-11-25 John W. Eaton * pt-stmt.cc (tree_statement::eval): Allow the lookup to execute script files. If script file has been executed, don't bother to call expr->rvalue (). 2002-11-22 John W. Eaton * Makefile.in (OCTINTERP_LINK_DEPS): Include $(FLIBS) in OCTINTERP_LINK_DEPS. * variables.cc (text_function_set): New static data. (mark_as_text_function, unmark_text_function, is_marked_as_text_function, Fmark_as_text_function, Funmark_text_function): New functions. (is_text_function_name): Handle functions marked as text functions in special list, not just those marked in the symbol record. * symtab.h (symbol_record::mark_as_text_function, symbol_record::unmark_text_function, symbol_record::symbol_def::mark_as_text_function, symbol_record::symbol_def::unmark_text_function): New functions. * oct-map.h (Octave_map::rows, Octave_map::columns): New functions. * ov-struct.h (octave_struct::rows, octave_struct::columns, octave_struct::length): New functions. 2002-11-21 John W. Eaton * oct-conf.h.in (OCTAVE_CONF_MKOCTFILE_SH_LDFLAGS): New macro. * toplev.cc (octave_config_info): Add it to the struct. * lex.l (): If yytext begins with # or %, don't recognize it as a string. * oct-map.h (Octave_map::operator[]): New const version. * oct-map.cc (equiv_keys): New function. (assign (const idx_vector&, const Octave_map&)): New function. * ov-struct.cc (octave_struct::subsasgn): Use it. 2002-11-20 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.40. * p-b-b.cc, op-bm-bm.cc, op-chm.cc, op-cm-cm.cc, op-cm-cs.cc, op-cm-m.cc, op-cm-s.cc, op-cs-cm.cc, op-cs-cs.cc, op-cs-m.cc, op-cs-s.cc, op-fil-b.cc, op-fil-bm.cc, op-fil-cm.cc, op-fil-cs.cc, op-fil-lis.cc, op-fil-m.cc, op-fil-rec.cc, op-fil-s.cc, op-fil-str.cc, op-list.cc, op-m-cm.cc, op-m-cs.cc, op-m-m.cc, op-m-s.cc, op-range.cc, op-s-cm.cc, op-s-cs.cc, op-s-m.cc, op-s-s.cc, op-str-str.cc, op-bm-b.cc, op-cell.cc, BaseSLList.cc, BaseSLList.h, ChangeLog, Map.cc, Map.h, SLList.cc, SLList.h, SLStack.cc, SLStack.h, Stack.cc, Stack.h, oct-map.cc, oct-map.h, oct-obj.cc, oct-obj.h, c-file-ptr-stream.cc, c-file-ptr-stream.h, ov-base-mat.cc, ov-base-scalar.cc, ov-base-scalar.h, ov-base.cc, ov-base.h, ov-bool-mat.cc, ov-bool-mat.h, ov-bool.cc, ov-bool.h, ov-builtin.cc, ov-builtin.h, ov-ch-mat.cc, ov-ch-mat.h, ov-colon.cc, ov-complex.cc, ov-complex.h, ov.h, ov-cx-mat.cc, ov-cx-mat.h, ov-fcn.cc, ov-fcn.h, ov-file.cc, ov-file.h, ov-list.cc, ov-list.h, ov-mapper.cc, ov-mapper.h, ov-range.cc, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-scalar.cc, ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov-struct.cc, ov-struct.h, ov-typeinfo.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov-usr-fcn.h, ov-va-args.cc, ov.cc, ov-base-mat.h, procstream.cc, procstream.h, pt-arg-list.cc, pt-arg-list.h, pt-binop.cc, pt-binop.h, pt-check.cc, pt-check.h, pt-cmd.cc, pt-cmd.h, pt-colon.cc, pt-colon.h, pt-const.cc, pt-const.h, pt-decl.cc, pt-decl.h, pt-except.cc, pt-except.h, pt-exp.cc, pt-exp.h, pt-id.cc, pt-id.h, pt-idx.cc, pt-idx.h, pt-jump.cc, pt-jump.h, pt-loop.cc, pt-loop.h, pt-mat.cc, pt-mat.h, pt-misc.cc, pt-misc.h, pt-pr-code.cc, pt-pr-code.h, pt-select.cc, pt-select.h, pt-stmt.cc, pt-stmt.h, pt-unop.cc, pt-unop.h, pt.cc, pt.h, symtab.h, token.cc, token.h, unwind-prot.cc, unwind-prot.h, ov-base-nd-array.cc, ov-re-nd-array.h, ov-re-nd-array.cc, ov-base-nd-array.h, comment-list.h, comment-list.cc, DLList.cc, DLList.h, ov-dld-fcn.h, ov-dld-fcn.cc, Cell.cc, Cell.h, pt-cell.h, pt-cell.cc, ov-cell.h, ov-cell.cc, pt-plot.cc, pt-plot.h, pt-assign.cc, pt-assign.h, pt-bp.cc, pt-bp.h, symtab.cc, ov-cs-list.h, ov-cs-list.cc: Use "defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)" instead of "! defined (NO_PRAGMA_INTERFACE_IMPLEMENTATION)". 2002-11-19 John W. Eaton * oct-obj.h (octave_value_list::~octave_value_list): New function. 2002-11-19 John W. Eaton * DLD-FUNCTIONS/odessa.cc (odessa_user_j): Put T in args(1), not args(0). 2002-11-18 John W. Eaton * parse.y (symtab_context): Now extern. * parse.h: Provide decl. * lex.l (reset_parser): Set it to 0. 2002-11-15 John W. Eaton * pt-bp.cc (octave_debug_on_interrupt_state): New global variable. * pt-bp.h: Provide decl. (MAYBE_DO_BREAKPOINT): Check it. * sighandlers.cc (sigint_handler): Handle debug_on_interrupt. (Vdebug_on_interrupt): New static variable. (symbols_of_sighandlers): New function. DEFVAR Vdebug_on_interrupt. (debug_on_interrupt): New function. * lex.h (YY_FATAL_ERROR): Use OCTAVE_QUIT here. * utils.cc (toplevel): Delete variable. * sighandlers.cc (OCTAVE_MEMORY_EXHAUSTED_ERROR): Delete. 2002-11-14 John W. Eaton * sighandlers.cc (octave_new_handler): Delete. (install_signal_handlers): Don't call set_new_handler. * toplev.cc (main_loop): Handle bad_alloc exception here. * sighandlers.cc (octave_new_handler): Allow return after OCTAVE_JUMP_TO_TOP_LEVEL. (sigfpe_handler): Likewise. 2002-11-13 John W. Eaton * variables.cc (is_variable): New static function. (generate_struct_completions): Only evaluate objects that look like variables. 2002-11-12 John W. Eaton * pt-jump.h, pt-jump.cc (tree_break_expression, tree_continue_expression, tree_return_expression): Rename from tree_break_command, tree_continue_command, tree_return_command. Implement as expressions that return TRUE instead of commands. Change all uses. * parse.y (make_break_expression, make_continue_expression, make_return_expression): Rename from make_break_command, make_continue_command, make_return_command. Change all uses. (jump_expr): Rename from jump_command, type is now expression. Use in simple_expr, not command. * toplev.cc (octave_initialized): New global variable. (main_loop): Set it to true here. * sighandlers.cc (sigint_handler): Exit immediately if we have not finished init process. * load-save.cc (extract_keyword): Return std::string, not char *. Change all uses. (read_ascii_data): Likewise. (read_binary_data): Likewise. (read_hdf5_data): Likewise. (read_mat_ascii_data): Likewise. (read_mat_binary_data): Likewise. (do_load): Name and doc are now std::string objects, not char *. (install_loaded_variable): Likewise. (read_hdf5_data): Doc is now std::string object, not char *&. (read_mat_ascii_data): Call OCTAVE_QUIT in strategic locations. (get_lines_and_columns): Likewise. * toplev.cc (main_loop): Call OCTAVE_QUIT after executing command. * parse.y (parse_and_execute (FILE *)): Likewise. 2002-11-12 Joseph P. Skudlarek * input.cc (match_sans_spaces_semi): Rename from match_sans_spaces. Ignore trailing semicolons too. Change all callers. 2002-11-11 John W. Eaton * octave.gperf: Allow "persistent" as a synonym for static. * defun-int.h (DEFUN_MAPPER_INTERNAL): Don't forget doc string when creating octave_mapper object. * sysdep.cc (BSD_init): Avoid failure if FP_X_DNML is not defined. 2002-11-08 John W. Eaton * cutils.c: Be sure to always return buf. Undo previous vnprintf changes. The portable snprintf I found does not handle floating point conversions... 2002-11-07 John W. Eaton * Makefile.in (liboctinterp.$(LIBEXT)): Include $(XERBLA) here. (octave.$(EXEEXT)): Not here. (liboctinterp.$(SHLEXT)): Include $(PIC_XERBLA) here. * main.c: Move decl for xerbla here from octave.cc. * cutils.c (octave_vsnprintf): Use portable_snprintf to avoid having to cope with all kinds of buggy implementations. * snprintf.c: New file. * Makefile.in (DISTFILES): Add it to the list. * oct-snprintf.h: New file. * Makefile.in (INCLUDES): Add it to the list. * oct-snprintf.c: New file. * Makefile.in (DIST_SRC): Add it to the list. * toplev.cc (main_loop): Use SET_OCTAVE_INTERRUPT_IMMEDIATELY instead of assigning octave_interrupt_immediately. 2002-11-06 John W. Eaton * utils.cc (jump_to_top_level): Delete. * toplev.cc (toplevel): Delete. (main_loop): Adapt to new signal/exception handling scheme. * sighandlers.cc (octave_signal_mask, octave_save_signal_mask, octave_restore_signal_mask): Move to libcruft/misc/quit.cc. (sigint_handler) [USE_EXCEPTIONS_FOR_INTERRUPTS]: set octave_interrupt_state. Only jump if octave_interrupt_immediately is true, and then only to enclosing context. * lex.h (YY_FATAL_ERROR): Use OCTAVE_JUMP_TO_TOP_LEVEL, not jump_to_top_level. * sighandlers.cc (octave_new_handler, sigfpe_handler, endif, sigpipe_handler): Likewise. * input.cc (gnu_readline): Surround call to command_editor::readline with BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE and END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE. * data.cc, oct-stream.cc, ov-cell.cc, ov-mapper.cc, ov-re-mat.cc, ov.cc, pr-output.cc, pt-loop.cc, pt-stmt.cc, xdiv.cc, xpow.cc, DLD-FUNCTIONS/balance.cc, DLD-FUNCTIONS/besselj.cc, DLD-FUNCTIONS/filter.cc, DLD-FUNCTIONS/find.cc, DLD-FUNCTIONS/kron.cc, DLD-FUNCTIONS/log.cc, DLD-FUNCTIONS/minmax.cc, DLD-FUNCTIONS/qz.cc, DLD-FUNCTIONS/rand.cc, DLD-FUNCTIONS/sort.cc: Sprinkle with OCTAVE_QUIT. * DLD-FUNCTIONS/odessa.cc (Fodessa): Correctly extract bsub from function arg. 2002-11-04 John W. Eaton * cutils.c (octave_vsnprintf): Handle C99 snprintf semantics. * oct-obj.h (octave_value_list::operator =): Copy names too. (octave_value_list::octave_value_list (const octave_value_list&)): Likewise. 2002-11-01 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.39. * variables.cc (generate_struct_completions): Temporarily reset discard_error_messages and error_state (looks_like_struct): Temporarily reset Vwarning option, error_state, and discard_error_messages. * pt-idx.cc (tree_index_expression::eval_error): Now const. (tree_index_expression::get_struct_index): Require valid identifier. (tree_index_expression::make_arg_struct, tree_index_expression::rvalue, tree_index_expression::lvalue): Handle possible error from get_struct_index. * utils.cc (valid_identifier): Move here from load-save.cc. * utils.h: Provide decl. * input.cc (generate_possible_completions): Call command_editor::filename_completion_desired here. (generate_possible_completions): Don't generate struct completions if text contains directory separator or "..". 2002-10-31 John W. Eaton * DLD-FUNCTIONS/odessa.cc (odessa_user_f, odessa_user_j, odessa_user_b): Reorder args for consistency with other solvers. (Fodessa): Use extract_function to set args. (odessa_user_j): Rename from odessa_user_mf. * DLD-FUNCTIONS/fsolve.cc (fsolve_user_function, fsolve_user_jacobian): Print warning if user returns complex value. * DLD-FUNCTIONS/quad.cc (quad_user_function): Likewise. * DLD-FUNCTIONS/lsode.cc (lsode_user_function, lsode_user_jacobian): Likewise. * DLD-FUNCTIONS/dassl.cc (dassl_user_function, dassl_user_jacobian): Likewise. * DLD-FUNCTIONS/dasrt.cc (dasrt_user_f, dasrt_user_cf, dasrt_user_j): Likewise. * DLD-FUNCTIONS/daspk.cc (daspk_user_function, daspk_user_jacobian): Likewise. * DLD-FUNCTIONS/daspk.cc (daspk_user_jacobian): New function. (Fdaspk): Handle extracting Jacobian from function argument. * DLD-FUNCTIONS/fsolve.cc (fsolve_user_function): New function. (Ffsolve): Handle extracting Jacobian from function argument. * Makefile.in (%.oct): Depend on octave$(EXEEXT) so that octave will be built before any .oct files. (all): Depend on stamp-oct-links. (octave$(EXEEXT)): Don't depend on stamp-oct-links. * ov-base.cc (octave_base_value::subsasgn): Handle default numeric case here. * ov-base-mat.cc (octave_base_matrix::subsasgn): Delete. 2002-10-30 John W. Eaton * Makefile.in (OCT_LINK_DEPS): Add $(BLAS_LIBS), $(FFTW_LIBS), and $(FLIBS). 2002-10-29 John W. Eaton * version.h (OCTAVE_VERSION): Now 2.1.38. * utils.cc (octave_vformat): Get return value from streambuf::vform. * DLD-FUNCTIONS/fsolve.cc (Ffsolve): Always return solution. Don't barf on nargout == 3. * pt-idx.h (tree_index_expression::dyn_field): New data member. * pt-idx.cc (tree_index_expression::tree_index_expression (tree_expression*, tree_expression*, int, int)): New constructor. (tree_index_expression::append (tree_expression*)): New function. (tree_index_expression::get_struct_index): New function. (tree_index_expression::make_arg_struct): Handle dynamic fields. (tree_index_expression::rvalue): Likewise. (tree_index_expression::lvalue): Likewise. * parse.y (make_indirect_ref (tree_expression*, tree_expression*)): New function. (indirect_ref_op): New non-terminal. (postfix_expr): Use it. Recognize dynamic struct field references. (parsing_indir): Delete unused non-terminal. * lex.l ("("): Set lexer_flags.looking_at_indirect_ref to false here. * pt-idx.cc (tree_index_expression::name): Simplify. 2002-10-28 John W. Eaton * oct-conf.h.in (OCTAVE_CONF_HAVE_DLOPEN_API, OCTAVE_CONF_HAVE_LOADLIBRARY_API, OCTAVE_CONF_HAVE_SHL_LOAD_API): Delete. * toplev.cc (octave_config_info): Delete them from the struct * load-save.cc (read_ascii_data): Use octave_read_double and octave_read_complex so that we handle Inf, NaN, and NA. (read_mat_ascii_data): Likewise. (save_ascii_data): Use octave_write_double andoctave_write_complex. 2002-10-25 John W. Eaton * toplev.cc (octave_config_info): Rename WITH_DYNAMIC_LINKING to ENABLE_DYNAMIC_LINKING. * oct-conf.h.in: Likewise. * mkbuiltins: Likewise. * fn-cache.cc (file_name_cache_elt::update): Likewise. * Makefile.in: Likewise. 2002-10-24 John W. Eaton * cutils.c (octave_vsnprintf): Buffer and buffer size now static. * utils.cc (octave_vformat): Don't free buffer returned from octave_vsnprintf here. * ov-usr-fcn.cc (va_arg, va_start, vr_val): Only print warning once per session. * ov-mapper.cc (octave_mapper::apply): Don't try real_type case if arg is a string and we have a ch_map_fcn. * Makefile.in: Add $(LIBKPATHSEA) to $(OCTAVE_LIBS) if $(INCLUDE_LINK_DEPS) is false, not if $(SHARED_LIBS) is false. 2002-10-23 John W. Eaton * DLD-FUNCTIONS/daspk.cc (daspk): Use set_options, not copy. * DLD-FUNCTIONS/dasrt.cc (dasrt): Likewise. * DLD-FUNCTIONS/dassl.cc (dassl): Likewise. * DLD-FUNCTIONS/fsolve.cc (fsolve): Likewise. * DLD-FUNCTIONS/lsode.cc (lsode): Likewise. * DLD-FUNCTIONS/odessa.cc (Fodessa): Likewise. * DLD-FUNCTIONS/quad.cc (Fquad): Likewise. 2002-10-22 John W. Eaton * oct-map.cc (Octave_map::assign): Fix typo in resizing. * pt-loop.cc (tree_complex_for_command::eval): Only return list for val if struct array has more than one element. (tree_simple_for_command::eval): Likewise. * ov-struct.cc (octave_struct::print_raw): Don't create octave_list directly, use octave_value (const octave_value_list&) constructor instead. Call print_with_name for tmp, not val(0). * version.h (OCTAVE_VERSION): Now 2.1.37. (OCTAVE_CONTRIB_STATEMENT): New macro. (OCTAVE_STARTUP_MESSAGE): Use it. 2002-10-17 John W. Eaton * data.cc (fill_matrix): If nargin is zero, use val, not 0.0. * main.c: New file. * octave.h: New file. * octave.cc (octave_main): Rename from main. Include octave.h. * Makefile.in (OBJECTS): Add octave.o, builtins.o, and ops.o to the list. (octave): Depend on and link main.o, not octave.o, builtins.o, and ops.o (they are now in liboctinterp). (DEP_5): Add main.c here. * oct-conf.h.in: No need to substitute OCTAVE_CONF_OCTAVE_LITE. * toplev.cc (octave_config_info): Likewise, don't include it in struct. * mkbuiltins: Remove check for OCTAVE_LITE, since it is now implied by WITH_DYNAMIC_LINKING. * Makefile.in: Likewise, replace tests for OCTAVE_LITE with tests for WITH_DYNAMIC_LINKING instead. * oct-conf.h.in: Use OCTAVE_CONF_HAVE_DLOPEN_API, OCTAVE_CONF_HAVE_LOADLIBRARY_API, and OCTAVE_CONF_HAVE_SHL_LOAD_API instead of OCTAVE_CONF_WITH_DL and OCTAVE_CONF_WITH_SHL. * toplev.cc (octave_config_info): Likewise. 2002-10-16 John W. Eaton * help.cc (display_help_text): Quote output file name for Cygwin. * Makefile.in (install-lib): Don't bother with versions for $(SHLBIN) files. * help.cc (display_help_text): Match zero or more comment characters instead of one or more. * Makefile.in (install-oct): Process files from $(DLD_DEF_FILES), not $(DLD_SRC). Look for them in current directory, not $(srcdir). 2002-10-15 John W. Eaton * ov-mapper.cc (octave_mapper::apply): Handle real and complex types first. If the arg is something else, try ch_map_fcn if it is defined. 2002-10-15 Paul Kienzle * Makefile.in: If building shared but not static libs, only set XERBLA to the location of the pic object file if FPICFLAG is defined. 2002-10-14 John W. Eaton * DLD-FUNCTIONS/minmax.cc, DLD-FUNCTIONS/getrusage.cc, data.cc, file-io.cc, ov-base.cc, ov-bool-mat.cc, ov-ch-mat.cc, ov-complex.cc, ov-cx-mat.cc, ov-range.cc, ov-re-mat.cc, ov-re-nd-array.cc: Change all uses of octave_Inf, octave_NA, and octave_NaN to be calls to lo_ieee_Inf_value, lo_ieee_NA_value, and lo_ieee_NaN_value instead of using the constants directly to avoid linking problem with Cygwin. * Makefile.in (install): No need to use cd to create links. 2002-10-14 Paul Kienzle * Makefile.in: Merge liboctave with liboct-readline and liboct-pathsearch. Use link dependencies for shared libs if INCLUDE_LINK_DEPS. (LIBRARIES): If doing shared libs, include versioned library in list. (liboctinterp.$(SHLEXT), liboctinterp.$(SHLEXT_VER)): Reverse actions -- build unversioned library, symbolic link adds version info. (install, uninstall): Handle link and load forms of the library separately. * toplev.cc (octave_config_info): Remove LIBOCT_READLINE and LIBOCT_PATHSEARCH, add LIBREADLINE. * oct-conf.h.in: Likewise. 2002-10-11 John W. Eaton * lex.l (handle_identifier): Don't enter token in local symbol table if the following token is a dot and it looks like a binary operator. (force_local_variable): If name is not a variable, clear it before defining. * oct-procbuf.cc (Vkluge_procbuf_delay): Make default 0 for all systems. * octave.cc (execute_startup_files, initialize_pathsearch): Use file_ops::dir_sep_str instead of OCTAVE_DIR_SEP_STR. (main): Use file_ops::dir_sep_chars instead of OCTAVE_DIR_SEP_CHARS. * ov-re-mat.cc (octave_matrix::convert_to_str): Warn for out of range conversions. For negative values, set to 0. * ov-scalar.cc (octave_scalar:convert_to_str): Likewise. * mappers.cc (xabs): New static function. (install_mapper_functions): Use it for abs for character matrices. Handle ch_map_flag separately from can_ret_cmplx_for_real in all uses of DEFUN_MAPPER. * defun.h (DEFUN_MAPPER): Handle ch_map_flag separately from can_ret_cmplx_for_real. * defun-int.h (DEFUN_MAPPER_INTERNAL): Likewise. * mkbuiltins: Likewise. * mkgendoc: Likewise. * ov-mapper.cc (octave_mapper::apply): Use ch_map_flag and can_ret_cmplx_for_real instead of flag. * ov-mapper.h (octave_mapper::ch_map_flag): Rename from flag. (octave_mapper::can_ret_cmplx_for_real): New data member. (octave_mapper::octave_mapper): Handle it here. 2002-10-10 John W. Eaton * octave.cc (execute_startup_files): Don't forget directory separator for local initfile. * move-if-change: Delete. * Makefile.in (DISTFILES): Delete it from the list. 2002-10-09 John W. Eaton * Makefile.in: Use $(EXEEXT) and $(BUILD_EXEEXT) as appropriate. * pt-plot.cc (Vgnuplot_binary): Use GNUPLOT_BINARY as default. * octave.cc (execute_startup_files): Use octave_env::getcwd instead of "./". Use OCTAVE_DIR_SEP_STR instead of "/". (initialize_pathsearch): Use OCTAVE_DIR_SEP_STR instead of /. (main): Look for OCTAVE_DIR_SEP_CHARS, not '/'. 2002-10-08 John W. Eaton * Makefile.in (gendoc): Use $(BUILD_CXX), not $(CXX). 2002-10-07 John W. Eaton * utils.cc (octave_sleep): Cast result of modf to unsigned int. 2002-10-07 Paul Kienzle * sighandlers.cc (my_friendly_exit): If kill is unavailable, use raise. 2002-10-06 John W. Eaton * sysdep.cc (CYGWIN_init): New function. (sysdep_init) [__CYGWIN__]: Call it. * pt-plot.cc (subplot::handle_plot_data): Surround file names in single quotes, not double (for Windows). (do_external_plotter_cd): Likewise. 2002-10-03 John W. Eaton * cutils.c (octave_usleep): Call octave_sleep, not sleep. * utils.cc (octave_sleep (double)): New function. * utils.h: Provide decl. * sysdep.cc (Fpause, Fsleep): Use it. * cutils.c (do_octave_usleep): Merge with octave_usleep. (octave_usleep): Make it work for Windows systems. From Paul Kienzle . 2002-10-03 Paul Kienzle * cutils.c (octave_usleep): Make it work for Windows systems. * toplev.cc (Fsystem): Error message if fork is not available. 2002-10-02 John W. Eaton * cutils.c (octave_sleep): Handle Windows, which may not have sleep, but should have Sleep. * oct-conf.h.in (OCTAVE_CONF_SED): Add an entry for SED. * toplev.cc (octave_config_info): Likewise. * Makefile.in (oct-gperf.h): Use $(SED), not sed. 2002-09-27 John W. Eaton * file-io.cc (fopen_mode_to_ios_mode): Set ios::ate instead of ios::app for "a+" mode. * oct-stream.cc (octave_stream::mode_as_string): Recognize ios::ate, not ios::app as "a+" mode. (octave_stream::mode_as_string): Use parens since | has lower precedence than ==. 2002-09-26 Paul Kienzle * sysdep.cc: Include conio.h if it exists. (octave_kbhit): Rename from kbhit. Implement with _kbhit if it exists. Change all callers. * cutils.c (octave_sleep): New function. Change all callers of sleep to use octave_sleep instead. 2002-09-26 John W. Eaton * BaseSLList.cc, BaseSLList.h, Cell.cc, Cell.h, DLList.cc, DLList.h, Map.cc, Map.h, OPERATORS/op-b-b.cc, OPERATORS/op-bm-b.cc, OPERATORS/op-bm-bm.cc, OPERATORS/op-cell.cc, OPERATORS/op-chm.cc, OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc, OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc, OPERATORS/op-cs-cm.cc, OPERATORS/op-cs-cs.cc, OPERATORS/op-cs-m.cc, OPERATORS/op-cs-s.cc, OPERATORS/op-fil-b.cc, OPERATORS/op-fil-bm.cc, OPERATORS/op-fil-cm.cc, OPERATORS/op-fil-cs.cc, OPERATORS/op-fil-lis.cc, OPERATORS/op-fil-m.cc, OPERATORS/op-fil-rec.cc, OPERATORS/op-fil-s.cc, OPERATORS/op-fil-str.cc, OPERATORS/op-list.cc, OPERATORS/op-m-cm.cc, OPERATORS/op-m-cs.cc, OPERATORS/op-m-m.cc, OPERATORS/op-m-s.cc, OPERATORS/op-range.cc, OPERATORS/op-s-cm.cc, OPERATORS/op-s-cs.cc, OPERATORS/op-s-m.cc, OPERATORS/op-s-s.cc, OPERATORS/op-str-str.cc, SLList.cc, SLList.h, SLStack.cc, SLStack.h, Stack.cc, Stack.h, c-file-ptr-stream.cc, c-file-ptr-stream.h, comment-list.cc, comment-list.h, oct-map.cc, oct-map.h, oct-obj.cc, oct-obj.h, ov-base-mat.cc, ov-base-mat.h, ov-base-nd-array.cc, ov-base-nd-array.h, ov-base-scalar.cc, ov-base-scalar.h, ov-base.cc, ov-base.h, ov-bool-mat.cc, ov-bool-mat.h, ov-bool.cc, ov-bool.h, ov-builtin.cc, ov-builtin.h, ov-cell.cc, ov-cell.h, ov-ch-mat.cc, ov-ch-mat.h, ov-colon.cc, ov-complex.cc, ov-complex.h, ov-cs-list.cc ov-cs-list.h, ov-cx-mat.cc, ov-cx-mat.h, ov-dld-fcn.cc, ov-dld-fcn.h, ov-fcn.cc, ov-fcn.h, ov-file.cc, ov-file.h, ov-list.cc, ov-list.h, ov-mapper.cc, ov-mapper.h, ov-range.cc, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-re-nd-array.cc, ov-re-nd-array.h, ov-scalar.cc, ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov-struct.cc, ov-struct.h, ov-typeinfo.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov-usr-fcn.h, ov-va-args.cc, ov.cc, ov.h, procstream.cc, procstream.h, pt-arg-list.cc, pt-arg-list.h, pt-assign.cc, pt-assign.h, pt-binop.cc, pt-binop.h, pt-bp.cc, pt-bp.h, pt-cell.cc, pt-cell.h, pt-check.cc, pt-check.h, pt-cmd.cc, pt-cmd.h, pt-colon.cc, pt-colon.h, pt-const.cc, pt-const.h, pt-decl.cc, pt-decl.h, pt-except.cc, pt-except.h, pt-exp.cc, pt-exp.h, pt-id.cc, pt-id.h, pt-idx.cc, pt-idx.h, pt-jump.cc, pt-jump.h, pt-loop.cc, pt-loop.h, pt-mat.cc, pt-mat.h, pt-misc.cc, pt-misc.h, pt-plot.cc, pt-plot.h, pt-pr-code.cc, pt-pr-code.h, pt-select.cc, pt-select.h, pt-stmt.cc, pt-stmt.h, pt-unop.cc, pt-unop.h, pt.cc, pt.h, symtab.cc, symtab.h, token.cc, token.h, unwind-prot.cc, unwind-prot.h: If __GNUG__, use pragma interface/implementation. Allow this to be turned off by defining NO_PRAGMA_INTERFACE_IMPLEMENTATION. 2002-09-26 Paul Kienzle * mappers.cc (install_mapper_functions): Install erf, not xerf. Install erfc, not xerfc. * pt-bp.cc (tree_breakpoint::visit_unwind_protect_command): Rename lst1 and lst2 to avoid dlgs.h conflict. * parse.y: Replace TEXT with STRING to avoid winnt.h conflict. * lex.l: Ditto. * sysdep.cc (raw_mode): Non-fatal warning if raw_mode is not supported. * sighandlers.cc: Don't define handlers for non-existent signals. * utils.cc: Don't include unneeded termio headers. 2002-09-19 John W. Eaton * BaseSLList.cc, BaseSLList.h, Cell.cc, Cell.h, DLList.cc, DLList.h, Map.cc, Map.h, OPERATORS/op-b-b.cc, OPERATORS/op-bm-b.cc, OPERATORS/op-bm-bm.cc, OPERATORS/op-cell.cc, OPERATORS/op-chm.cc, OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc, OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc, OPERATORS/op-cs-cm.cc, OPERATORS/op-cs-cs.cc, OPERATORS/op-cs-m.cc, OPERATORS/op-cs-s.cc, OPERATORS/op-fil-b.cc, OPERATORS/op-fil-bm.cc, OPERATORS/op-fil-cm.cc, OPERATORS/op-fil-cs.cc, OPERATORS/op-fil-lis.cc, OPERATORS/op-fil-m.cc, OPERATORS/op-fil-rec.cc, OPERATORS/op-fil-s.cc, OPERATORS/op-fil-str.cc, OPERATORS/op-list.cc, OPERATORS/op-m-cm.cc, OPERATORS/op-m-cs.cc, OPERATORS/op-m-m.cc, OPERATORS/op-m-s.cc, OPERATORS/op-range.cc, OPERATORS/op-s-cm.cc, OPERATORS/op-s-cs.cc, OPERATORS/op-s-m.cc, OPERATORS/op-s-s.cc, OPERATORS/op-str-str.cc, SLList.cc, SLList.h, SLStack.cc, SLStack.h, Stack.cc, Stack.h, c-file-ptr-stream.cc, c-file-ptr-stream.h, comment-list.cc, comment-list.h, oct-map.cc, oct-map.h, oct-obj.cc, oct-obj.h, ov-base-mat.cc, ov-base-mat.h, ov-base-nd-array.cc, ov-base-nd-array.h, ov-base-scalar.cc, ov-base-scalar.h, ov-base.cc, ov-base.h, ov-bool-mat.cc, ov-bool-mat.h, ov-bool.cc, ov-bool.h, ov-builtin.cc, ov-builtin.h, ov-cell.cc, ov-cell.h, ov-ch-mat.cc, ov-ch-mat.h, ov-colon.cc, ov-complex.cc, ov-complex.h, ov-cs-list.cc ov-cs-list.h, ov-cx-mat.cc, ov-cx-mat.h, ov-dld-fcn.cc, ov-dld-fcn.h, ov-fcn.cc, ov-fcn.h, ov-file.cc, ov-file.h, ov-list.cc, ov-list.h, ov-mapper.cc, ov-mapper.h, ov-range.cc, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-re-nd-array.cc, ov-re-nd-array.h, ov-scalar.cc, ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov-struct.cc, ov-struct.h, ov-typeinfo.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov-usr-fcn.h, ov-va-args.cc, ov.cc, ov.h, procstream.cc, procstream.h, pt-arg-list.cc, pt-arg-list.h, pt-assign.cc, pt-assign.h, pt-binop.cc, pt-binop.h, pt-bp.cc, pt-bp.h, pt-cell.cc, pt-cell.h, pt-check.cc, pt-check.h, pt-cmd.cc, pt-cmd.h, pt-colon.cc, pt-colon.h, pt-const.cc, pt-const.h, pt-decl.cc, pt-decl.h, pt-except.cc, pt-except.h, pt-exp.cc, pt-exp.h, pt-id.cc, pt-id.h, pt-idx.cc, pt-idx.h, pt-jump.cc, pt-jump.h, pt-loop.cc, pt-loop.h, pt-mat.cc, pt-mat.h, pt-misc.cc, pt-misc.h, pt-plot.cc, pt-plot.h, pt-pr-code.cc, pt-pr-code.h, pt-select.cc, pt-select.h, pt-stmt.cc, pt-stmt.h, pt-unop.cc, pt-unop.h, pt.cc, pt.h, symtab.cc, symtab.h, token.cc, token.h, unwind-prot.cc, unwind-prot.h: Use USE_PRAGMA_INTERFACE_IMPLEMENTATION instead of __GNUG__ to decide whether to use the interface/implementation pragmas. 2002-09-18 John W. Eaton * load-save.cc: Undo previous change. * ov-struct.cc (octave_struct::subsasgn): Ensure that indexed object is not shared before calling subsasgn. 2002-09-04 John W. Eaton * load-save.cc: Use % instead of # as comment character in ascii data files. 2002-08-17 Mumit Khan * c-file-ptr-stream.h (c_file_ptr_buf::c_file_ptr_buf): Add Intel C++ runtime support. * Cell.h, gripes.cc, ov-base-scalar.cc, ov-colon.cc, ov-fcn.cc, ov-file.cc, ov-mapper.h, ov-va-args.cc, token.cc, xpow.cc, OPERATORS/op-b-b.cc, OPERATORS/op-bm-b.cc, OPERATORS/op-bm-bm.cc, OPERATORS/op-cell.cc, OPERATORS/op-chm.cc, OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc, OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc, OPERATORS/op-cs-cm.cc, OPERATORS/op-cs-cs.cc, OPERATORS/op-cs-m.cc, OPERATORS/op-cs-s.cc, OPERATORS/op-fil-b.cc, OPERATORS/op-fil-bm.cc, OPERATORS/op-fil-cm.cc, OPERATORS/op-fil-cs.cc, OPERATORS/op-fil-lis.cc, OPERATORS/op-fil-m.cc, OPERATORS/op-fil-rec.cc, OPERATORS/op-fil-s.cc, OPERATORS/op-fil-str.cc, OPERATORS/op-list.cc, OPERATORS/op-m-cm.cc, OPERATORS/op-m-cs.cc, OPERATORS/op-m-m.cc, OPERATORS/op-m-s.cc, OPERATORS/op-range.cc, OPERATORS/op-s-cm.cc, OPERATORS/op-s-cs.cc, OPERATORS/op-s-m.cc, OPERATORS/op-s-s.cc, OPERATORS/op-str-str.cc, TEMPLATE-INST/Array-sym.cc, TEMPLATE-INST/Array-tc.cc, TEMPLATE-INST/Map-tc.cc, TEMPLATE-INST/SLList-expr.cc, TEMPLATE-INST/SLList-tc.cc, TEMPLATE-INST/SLList-tm.cc, TEMPLATE-INST/SLStack-sym.cc: Make the implementation of octave_value_list visibile for template instantiation. 2002-08-17 John W. Eaton * DLD-FUNCTIONS/dasrt.cc: Include not . * pager.h: Include lo-sstream.h and use macros instead of using strstreambuf class directly. * load-save.cc (read_mat_ascii_data): Handle istrstream here too. * procstream.h (procstream::procstream): Also accept std::string arg. (iprocstream::iprocstream, iprocstream::open): Likewise. (oprocstream::oprocstream, oprocstream::open): Likewise. (procstreambase::procstreambase, procstreambase::open): Likewise. * pt-plot.cc (gnuplot_terminal_type): Now std::string&, not char*. (send_to_plot_stream): Likewise, for cmd arg. * pt-plot.h, pt-plot.cc: Include lo-sstream.h and use macros instead of using strstream classes directly. * oct-strstrm.h: Likewise. * error.h, error.cc: Likewise. * oct-stream.h, oct-stream.cc: Likewise. * lex.l: Likewise. * toplev.cc: Likewise. * utils.cc: Likewise. * pt.cc: Likewise. * pr-output.cc: Likewise. * ov-list.cc: Likewise. * ov-cs-list.cc: Likewise. * ov-cell.cc: Likewise. * load-save.cc: Likewise. * help.cc: Likewise. * dirfns.cc: Likewise. 2002-08-15 Paul Kienzle * input.cc (octave_read): Do a better job of buffering. 2002-08-15 John W. Eaton * Makefile.in (DLD_DEF_FILES): New macro. (DEF_5): Delete. (DEF_4): Now only includes $(SOURCES). (DEF_FILES): Append $(DLD_DEF_FILES) here. (stamp-oct-links): Pass $(DLD_DEF_FILES) to mk-oct-links instead of a list of source files. * mk-oct-links: Work on .df files instead of .cc files. * parse.y (case_list): Allow it to be empty. * ov.cc, ov.h (octave_value::int_vector_value): New function. 2002-08-14 John W. Eaton * Makefile.in (OCTAVE_LIBS): Only include $(LIBKPATHSEA) if not using shared libraries. * ov.cc (octave_value::octave_value (const octave_value_list&, bool)): Don't forget to assign rep. 2002-08-12 John W. Eaton * lex.l: Warn for various Matlab-incompatibilities. No longer accept <> for NOTEQ. (gripe_matlab_incompatible): New function. (maybe_gripe_matlab_incompatible_comment): Likewise. (gripe_matlab_incompatible_continuation): Likewise. (gripe_matlab_incompatible_operator): Likewise. (warn_matlab_incompatible): New function. (Vwarn_matlab_incompatible): New static variable. (symbols_of_lex): Add a DEFVAR for it. * file-io.cc (fopen_mode_to_ios_mode): Default value is std::ios::in. Return std::ios::openmode instead of int. 2002-08-10 John W. Eaton * DLD-FUNCTIONS/dasrt.cc (DASRT_ABORT1, DASRT_ABORT2): "##" pastes tokens, not strings. * DLD-FUNCTIONS/odessa.cc: Add std:: qualifiers as needed. 2002-08-09 John W. Eaton * variables.cc (Fisglobal): Rename from Fis_global. * file-io.cc (Fisstream): Rename from Fis_stream. * data.cc (Fisbool): Rename from Fis_bool. (Fiscomplex): Rename from Fis_complex. (Fislist): Rename from Fis_list. (Fismatrix): Rename from Fis_matrix. (Fisstruct): Rename from Fis_struct. * parse.y (switch_case): Make list of command optional. 2002-08-08 John W. Eaton * pr-output.cc (pr_max_internal): Use octave_is_NaN_or_NA instead of xisnan. (pr_min_internal): Likewise. (output_max_field_width): Likewise. (output_precision): Likewise. (pr_any_float): Handle NA. * mappers.cc (Fisna, F_is_nan_or_na): New functions. * data.cc (symbols_of_data): New constant, NA. 2002-08-07 John W. Eaton * pt-binop.h (tree_binary_expression::is_binary_expression): New function, return true. (tree_boolean_expression::is_boolean_expression): New function, return true. * pt-exp.h (tree_expression::is_binary_expression): New function. (tree_expression::is_boolean_expression): Likewise. * parse.y (EXPR_OR_OR): Now lower precedence than EXPR_AND_AND. (EXPR_OR): Now lower precedence than EXPR_AND. (make_boolean_op): Maybe warn about change in precedence. (make_binary_op): Likewise. (Vwarn_precedence_change): New static variable. (warn_precedence_change): New function. (Vwarn_precedence_change): New DEFVAR. 2002-08-05 John W. Eaton * data.cc (ANY_ALL): Improve arg checks. 2002-08-04 John W. Eaton * ov.h (octave_value::assign_op): New enum values, op_pow_eq and op_el_pow_eq. * ov.cc (octave_value::assign_op_as_string): Handle them here. (ocatave_value::op_eq_to_binary_op): And here. * parse.y (POW_EQ, EPOW_EQ): New tokens. (assign_expr): Handle them here too. (make_assign_op): And here. * lex.l: Recognize {POW}= and {EPOW}=. 2002-08-02 John W. Eaton * ov-base-scalar.h (octave_base_scalar::all): New int arg. (octave_base_scalar::any): Likewise. * ov-range.h (octave_range::all): Likewise. (octave_range::any): Likewise. * Makefile.in (doc-files): Use mv, not move-if-change here. * variables.cc (symbol_exist): New function. (Fexist): Use it. Handle optional type arg. Make return codes more compatible with Matlab. * data.cc (ANY_ALL): New macro. (Fany, Fall): Replace guts with ANY_ALL. 2002-08-01 John W. Eaton * data.cc (Fall, Fany): Handle optional DIM argument. * ov.h (octave_value::any): New arg, dim. (octave_value::all): Likewise. * ov-base.h (octave_base_value::any): Likewise. (octave_base_value::all): Likewise. * ov-base-mat.h (octave_base_matrix::any): Likewise. (octave_base_matrix::all): Likewise. * Makefile.in: Use $@-t instead of $@.t. (doc-files): Use move-if-change when creating doc-files. * error.cc (warning): Don't print warning backtrace at top level. * ov-cell.cc (octave_cell::print_raw): Print empty dimensions too. (octave_cell::print_name_tag): Don't print new line if cell is empty. * octave.cc (intern_argv): Don't install __argv__. * defun-int.h (UNDERSCORIFY): Delete. (DEFCONST_INTERNAL): Don't install double underscore versions of constants since they aren't really needed. (DEFCONSTX_INTERNAL): Likewise. 2002-07-31 John W. Eaton * symtab.cc (symbol_table::clear (void)): Clear all records. (symbol_table::clear (const std::string&)): Delete second arg. Clear any symbol that matches, regardless of type. * symtab.h (symbol_table::variable_name_list): New function. (symbol_table::global_variable_name_list): Likewise. (symbol_table::user_function_name_list): Likewise. * symtab.h, symtab.cc (symbol_table::clear_variables): New function. (symbol_table::clear_functions): Likewise. (symbol_table::clear_globals): Likewise. (symbol_table::clear_variable): New function. (symbol_table::clear_function): Likewise. (symbol_table::clear_global): Likewise. (symbol_table::clear_variable_pattern): New function. (symbol_table::clear_function_pattern): Likewise. (symbol_table::clear_global_pattern): Likewise. * variables.cc (name_matches_any_pattern): Rename from var_matches_any_pattern. (is_local_variable): New static inline function. (maybe_warn_exclusive): Likewise. (do_clear_all): Likewise. (do_clear_functions): Likewise. (do_clear_globals): Likewise. (do_clear_variables): Likewise. (do_clear_function): Likewise. (do_clear_global): Likewise. (do_clear_variable): Likewise. (do_clear_symbol): Likewise. (do_clear_function_pattern): Likewise. (do_clear_global_pattern): Likewise. (do_clear_variable_pattern): Likewise. (do_clear_symbol_pattern): Likewise. (do_clear_functions): Likewise. (do_clear_functions): Likewise. (do_clear_globals): Likewise. (do_clear_variables): Likewise. (do_clear_symbols): Likewise. (do_matlab_compatible_clear): Likewise. (CLEAR_OPTION_ERROR): New macro. (Fclear): Rewrite for Matlab compatibility and to cope with new symbol table semantics. 2002-07-30 John W. Eaton * symtab.cc (symbol_table::clear): Simply clear everything. (symbol_table::clear_functions, symbol_table::clear_globals, symbol_table::clear_all): New functions. * symtab.h (symbol_record::symbol_def::next_elem): Delete. (symbol_record::symbol_def::symbol_def): Delete intializer. * symtab.h, symtab.cc (symbol_record::push_def): Delete. (symbol_record::remove_top_def): Delete. (symbol_record::replace_all_defs): Delete. (symbol_record::hides_fcn): Delete. (symbol_record::hides_builtin): Delete. * symtab.h (symbol_table::~symbol_table): Call clear before deleting the table. * variables.cc (initialize_symbol_tables): Create fbi_sym_tab too. (Fexist): Look in fbi_sym_tab, not global_sym_tab. * parse.y (function_symtab): Rename from global_symtab. Set curr_sym_tab to fbi_sym_tab, not global_sym_tab. Change all uses of global_symtab to be function_symtab instead. (frob_function): Rename and look for function name in fbi_sym_tab, not global_sym_tab. (parse_fcn_file): Clear function name from fbi_sym_tab, not global_sym_tab. * load-save.cc (save_vars): Look for built-in vars in fbi_sym_tab. * symtab.cc (symbol_record::link_to_builtin_variable): Likewise. * variables.cc (is_builtin_variable): Likewise. (bind_ans): Likewise. (bind_builtin_constant): Likewise. (bind_builtin_variable): Likewise. (builtin_string_variable): Likewise. (builtin_real_scalar_variable): Likewise. (builtin_any_variable): Likewise. (is_text_function_name): Likewise, for functions. (force_link_to_function): Likewise. (is_builtin_function_name): Likewise. (is_mapper_function_name): Likewise. (is_valid_function): Likewise. (Fclear): Likewise. (F__print_symtab_info__): Likewise. * defun.cc (print_usage): Likewise. (install_builtin_mapper): Likewise. (install_builtin_function): Likewise. (install_dld_function): Likewise. (Falias): Likewise. * dynamic-ld.cc (clear_function): Likewise. * variables.cc (do_who): Likewise, for built-ins and functions. (link_to_builtin_or_function): Likewise. * help.cc (LIST_SYMBOLS): Likewise. (make_name_list): Handle fbi_sym_tab too. * variables.cc (fbi_sym_tab): New symbol table. * variables.h (fbi_sym_tab): Provide decl. 2002-07-29 John W. Eaton * symtab.h (symbol_record::alias): Delete unused arg force. Change all callers. * variables.cc (link_to_global_variable): Give local variable global value. * pt-id.cc (tree_identifier::link_to_global): Warn about global variables that have been defined before being declared global. for a global variable to be used before it is declared global. * pt-decl.cc (tree_global_command::do_init): Handle possible error from tree_identifier::link_to_global. 2002-07-25 John W. Eaton * ov.cc (silent_functions, Vsilent_functions): Move here. (octave_value::print_with_name): Don't print anything if we are evaluating a function and Vsilent_functions is true. * pt-stmt.cc: From here. (symbols_of_pt_stmt): Delete. (tree_statement_list::eval): Don't bother with Vsilent_functions here. 2002-07-24 John W. Eaton * Makefile.in (OPT_HANDLERS): New targets. (doc-files): New target. (gendoc.cc): Depend on doc-files, not $(DOC_FILES). * DLD-FUNCTIONS/daspk.cc, DLD-FUNCTIONS/dasrt.cc, DLD-FUNCTIONS/dassl.cc, DLD-FUNCTIONS/fsolve.cc, DLD-FUNCTIONS/lsode.cc, DLD-FUNCTIONS/odessa.cc DLD-FUNCTIONS/quad.cc: Replace option handling code with include directive. 2002-07-22 John W. Eaton * pt-loop.cc (tree_simple_for_command::eval): Once we know the RHS is a matrix type check for real_type, not real_matrix. 2002-07-19 John W. Eaton * DLD-FUNCTIONS/quad.cc (quad): Cope with changes to Quad constructors. 2002-07-17 John W. Eaton * DLD-FUNCTIONS/daspk.cc (Fdaspk): Also return istate and error message. Only generate error if user is not at least requesting the istate output. * DLD-FUNCTIONS/dasrt.cc (Fdasrt): Likewise. * DLD-FUNCTIONS/dassl.cc (Fdassl): Likewise. * DLD-FUNCTIONS/lsode.cc (Fodessa): Likewise. 2002-07-16 John W. Eaton * DLD-FUNCTIONS/dasrt.cc (Fdasrt): No need to find ng here. (dasrt_user_j): New function. (Fdasrt): Handle Jacobian function. * DLD-FUNCTIONS/dassl.cc (dassl_user_jacobian): New function. (Fdassl): Handle Jacobian function. * DLD-FUNCTIONS/dasrt.cc: New file. * Makefile.in (DLD_XSRC): Add it to the list. 2002-07-12 John W. Eaton * lex.l (@): Handle new token. * parse.y (constant): Accept function handle syntax. (make_constant): Create function handles here. 2002-07-11 John W. Eaton * defun.cc (check_version): Improve error message. * error.cc (warning): Only print backtrace once per warning series. Print backtrace before warning messages. 2002-07-10 John W. Eaton * lex.l (maybe_unput_comma): Also handle '{' as an indexing op. * DLD-FUNCTIONS/odessa.cc: New file. * Makefile.in (DLD_XSRC): Add it to the list. 2002-07-05 John W. Eaton * pt-assign.cc (tree_multi_assignment::rvalue): Call lhs->nargout_count, not lhs->length. * pt-arg-list.cc (tree_argument_list::convert_to_const_vector): Handle cs-list objects here. (tree_argument_list::nargout_count): New function. * pt-arg-list.h: Provide decl. * ov-cs-list.h, ov-cs-list.cc: New files. * Makefile.in: Add them to the appropriate lists. * ov.cc: Include ov-cs-list.h. New arg, is_cs_list for constructor taking octave_value_list arg. (install_types): Register ov_cs_list. * ov.h (octave_value::is_cs_list): New function. * ov-base.h (octave_base_value::is_cs_list): Likewise. * ov-cell.cc (octave_cell::subsref): Return cs-list for "{" indexing. 2002-07-04 John W. Eaton * pt-mat.cc (Vempty_list_elements_ok): Default value is now 1. * octave.cc (maximum_braindamage): No longer need to set value here. * ov-usr-fcn.cc (Fva_arg, Fva_start, Fvr_val): Warn that these functions are deprecated. * lex.l (EL): Warn that `...' is deprecated. * ov-usr-fcn.cc (octave_user_function::varargout_to_vr_val, octave_user_function::has_varargout): New functions. (Fvr_val): Ensure varargout is not defined. (octave_user_function::do_multi_index_op): Copy values from varargout here. 2002-07-03 John W. Eaton * ov-usr-fcn.h (octave_user_function::varargin_sr): New data member. * ov-usr-fcn.cc (octave_user_function::octave_user_function): Initialize it. (bind_automatic_vars): Handle varargin. Change all callers. * octave.gperf: Handle varargin and varargout as keywords. * lex.l (is_keyword): Likewise. (IDENT): Move all actions into handle_identifier. (handle_identifier): Now takes no args. * lex.l (EL): Return VARARGIN or VARARGOUT, not ELLIPSIS. * parse.y (param_list): Use VARARGIN instead of ELLIPSIS. (return_list): Use VARARGOUT instead of ELLIPSIS. * data.cc (make_diag const octave_value&, const octave_value&): Allow first arg to be 1x0 or 0x1. 2002-07-02 John W. Eaton * defaults.cc (loadpath): Comment out previous change. * DLD-FUNCTIONS/fsolve.cc (Ffsolve): Return message too. Only generate error if user is not at least requesting the info output. * DLD-FUNCTIONS/lsode.cc (Flsode): Fix typos in setting return value. 2002-07-01 John W. Eaton * oct-stream.cc (printf_value_cache::double_value): If the current element is empty and there are no more elements in the value list, set curr_state to conversion_error. * input.cc (initialize_command_input): Include (, ), {, and } as word break characters. * variables.cc (looks_like_struct): Don't evaluate text if it is a function. From Ben Sapp . * symtab.h (symbol_record::is_function): Also return true if symbol is a text function or a mapper function. 2002-06-28 John W. Eaton * defaults.cc (loadpath): Warn if loadpath doesn't contain leading, trailing, or doubled colon. * pt-decl.cc (tree_static_command::eval, tree_global_command::eval): Call error for any non-zero value of error_state. * pt-select.cc (tree_if_command::eval): Likewise. * pt-loop.cc (tree_while_command::eval_error): Don't check error_state. (tree_do_until_command::eval_error): Likewise. (tree_simple_for_command::eval_error): Likewise. (tree_complex_for_command::eval_error): Likewise. * pt-assign.cc (tree_multi_assignment::eval_error): Likewise. (tree_simple_assignment::eval_error): Likewise. * pt-idx.cc (tree_index_expression::eval_error): Likewise. * pt-colon.cc (tree_colon_expression::eval_error): Likewise. (tree_colon_expression::rvalue): Delete rendundant error_state check. 2002-06-26 John W. Eaton * ov-mapper.cc (MAPPER_LOOP, MAPPER_LOOP_1, MAPPER_LOOP_2): New macros. (octave_mapper::apply): Use them to inline the mapper loops. * pt-unop.cc (tree_prefix_expression::rvalue): Ensure that the operand is defined for op_incr and op_decr. (tree_postfix_expression::rvalue): Likewise. From Ben Sapp . 2002-06-25 John W. Eaton * ov-mapper.cc (octave_mapper::apply): Exit loops on error. 2002-06-03 John W. Eaton * ov-struct.cc (octave_struct::print_raw): Print field names with data types if Vstruct_levels_to_print is 0. (octave_struct::print_name_tag): Don't emit newline if Vstruct_levels_to_print is negative. * ov.cc (struct_levels_to_print): Allow negative values too. 2002-05-24 John W. Eaton * DLD-FUNCTIONS/lsode.cc (Flsode): Also return istate and error message. Only generate error if user is not at least requesting the istate output. * load-save.cc (hdf5_import_multidim, hdf5_check_attr, hdf5_callback_data, hdf5_read_next_data, read_hdf5_data, add_hdf5_data): Use 0, not NULL in calls to HDF routines. * oct-procbuf.cc (octave_procbuf::open): Use NULL, not 0 as last arg in call to execl. * debug.cc (get_user_function): Initialise dbg_fcn to 0, not NULL. 2002-05-23 John W. Eaton * DLD-FUNCTIONS/lsode.cc (LSODE_options::da_set_opt_mf, LSODE_options::da_get_opt_mf): New typedefs. (LSODE_OPTIONS::da_set_fcn, LSODE_OPTIONS::da_get_fcn): New fields. (lsode_option_table): Fill them in. (set_lsode_option (const Array&)): New function. (print_lsode_option_list): Handle vector options. (show_lsode_option_list): Likewise. (Flsode_options): Likewise. * DLD-FUNCTIONS/lsode.cc (LSODE_options::s_set_opt_mf, LSODE_options::s_get_opt_mf): New typedefs. (LSODE_OPTIONS::s_set_fcn, LSODE_OPTIONS::s_get_fcn): New fields. (lsode_option_table): Fill them in. (set_lsode_option (const std::string&)): New function. (print_lsode_option_list): Handle string options. (show_lsode_option_list): Likewise. (Flsode_options): Likewise. 2002-05-22 John W. Eaton * c-file-ptr-stream.h (c_file_ptr_buf::fclose): New function. (c_file_ptr_buf::c_file_ptr_buf): Use it as default argument instead of extern "C" fclose function. (i_c_file_ptr_stream::i_c_file_ptr_stream): Likewise. (o_c_file_ptr_stream::o_c_file_ptr_stream): Likewise. * oct-stdstrm.h (octave_istdiostream::octave_istdiostream): Likewise. (octave_istdiostream::create): Likewise. * oct-stdstrm.h (octave_ostdiostream::octave_ostdiostream): Likewise. (octave_ostdiostream::create): Likewise. * oct-prcstrm.cc (cxx_pclose): New static function. (octave_iprocstream::octave_iprocstream): Pass it to octave_istdiostream constructor instead of extern "C" pclose function. (octave_oprocstream::octave_oprocstream): Pass it to octave_ostdiostream constructor instead of extern "C" pclose function. * debug.cc (Fdbtype): Use C++ strings, not C strings. 2002-05-22 Mumit Khan * debug.cc: Include cstdlib instead of stdlib.h. Include cstring. (dbtype): Use strchr instead of index. * TEMPLATE-INST/Array-tc.cc (Array::resize_fill_value): Fix template specialization syntax. 2002-05-17 Mumit Khan * c-file-ptr-stream.h (OCTAVE_STD_FILEBUF): New macro to handle various forms of extensions to std::filebuf. (c_file_ptr_buf::c_file_ptr_buf): Use. * pt-idx.cc (tree_index_expression::tree_index_expression): Remove default arguments are from definition. * symtab.cc (SYMBOL_DEF::print_info): Add std::. (symbol_record::print_info): Likewise. (symbol_table::print_info): Likewise. 2002-05-16 John W. Eaton * oct-map.cc (Octave_map::assign): Resize RHS if it is shorter than existing struct array. * ov-cell.cc (octave_cell::subsasgn): If an error has occurred, skip final assignment step. * ov-list.cc (octave_list::subsasgn): Likewise. * oct-lvalue.cc (octave_lvalue::assign): Add parens to clarify intent. (octave_lvalue::do_unary_op): Likewise. * parse.y (function_end): Also accept end of input as end of function if input is coming from an eval string. * pr-output.cc (pr_any_float): Don't convert -0 to 0. 2002-05-15 John W. Eaton * input.cc (generate_completion): If it looks like we are completing a struct, set completion append char to '\0'. * variables.cc (generate_struct_completions): Temporarily set warnings off here. * error.cc (warning): Don't do anything if Vdebug_option == "off". Only print backtrace if Vdebug_option == "backtrace". (handle_message): Now returns a string containing the text of the formatted message. Change all callers. (Fwarning): Now a text-style function. Handle Matlab-compatible warning options. (Flasterr, Flastwarn, set_warning_option): New functions. (Vlast_error_message, Vlast_warning_message, Vwarning_frequency, Vwarning_option): New static variables. (vwarning): Set Vlast_warning_message here too. (verror): Set Vlast_error_message here too. 2002-05-14 John W. Eaton * ov.h (octave_value::get_count): Now const. * ov.h, ov.cc (octave_value::do_non_const_unary_op, octave_value::assign): Idx is now a list of octave_value_list objects. * ov-base.cc, ov-base.h (octave_base_value::do_struct_elt_index_op, octave_base_value::struct_elt_ref): Delete. * ov-struct.cc, ov-struct.h (octave_sruct::do_struct_elt_index_op, octave_struct::struct_elt_ref): Delete. * ov.cc, ov.h (octave_value::do_struct_elt_index_op, octave_value::struct_elt_ref, octave_value::assign_struct_elt, octave_value::convert_and_assign, octave_value::try_assignment, octave_value::try_assignment_with_conversion, octave_value::simple_assign): Delete. * parse.y (make_index_expression): Type is now a single character. Change all callers. If expr is already an index expression, append index to it. (make_indirect_ref): Likewise. * pt-pr-code.cc (octave_print_internal (std::ostream&, const Cell&, bool, int)): Now just a dummy function, panic if called. * pt-idx.cc (tree_index_expression::make_arg_struct): New function. (tree_index_expression::type): Delete enum, rename from itype, now a string. (tree_index_expression::arg_nm): Now a list of string_vector objects. (tree_index_expression::idx): Now a list of tree_argument_list* objects. (tree_index_expression::is_index_expression): Always return true. (tree_index_expression::apend, make_value_list, make_subs_cell): New functions. * pt-pr-code.cc (visit_index_expression): Handle new definition of tree_index_expression object. * pt-check.cc (visit_index_expression): Likewise. * pt-bp.cc (visit_index_expression): Likewise. * ov-usr-fcn.h (octave_user_function::restore_args_passed): Clear args_passed even if nothing was saved. * ov-base.cc (octave_base_value::subsasgn, octave_base_value::map_keys, octave_base_value::print_info): New functions. * ov.h, ov.cc (octave_value::map_keys, octave_value::print_info, octave_value::subsref, octave_value::subsasgn, octave_value::numeric_assign, octave_value::next_subsref): New functions. (octave_value::empty_conv): New static function. (octave_value (octave_value *, int)): New arg, count. * ov-base-mat.cc (octave_base_matrix::subsref, octave_base_matrix::subsasgn): New functions. * ov-base-mat.h: Provide decls. * ov-builtin.cc (octave_builtin::subsref): New function. * ov-builtin.h: Provide decl. * ov-range.cc (octave_range::subsref): New function. * ov-range.h: Provide decl. * ov-cell.cc (octave_cell::subsref, octave_cell::subsasgn, octave_cell::list_value, octave_cell::print, octave_cell::print_raw, octave_cell::print_name_tag): New functions. * ov-cell.h: Provide decls. * ov-struct.cc (octave_struct::dotref, octave_struct::subsref, octave_struct::subsasgn, gripe_invalid_index, gripe_invalid_index_for_assignment, grip_invalid_index_type, gripe_failed_assignment): New functions. (octave_struct::numeric_conv): New static function. * ov-struct.h: Provide decls. (octave_struct::is_constant): Return true. (octave_struct::map_keys): New function. * ov-list.cc (octave_list::subsref, octave_list::subsasgn): New functions. * ov-list.h: Provide decls. * ov-usr-fcn.cc (octave_user_function::subsref, octave_user_function::print_symtab_info): New functions. * ov-usr-fcn.h: Provide decl. * ov-mapper.cc (octave_mapper::subsref): New function. * ov-mapper.h: Provide decl. * ov-base.cc (octave_base_value::subsref, octave_base_value::subsasgn): New functions. * ov-base.h: Provide decls. * ov-base.cc (octave_base_value::do_index_op): New arg, resize_ok. * ov-base-mat.cc (octave_base_matrix::do_index_op): Likewise. * ov-base-nd-array.cc (octave_base_nd_array::do_index_op): Ditto. * ov-bool-mat.cc (octave_bool::do_index_op): Ditto. * ov-str-mat.cc (octave_char_matrix_str::do_index_op): Ditto. * ov-range.cc (octave_range::do_index_op): Ditto. * ov-list.cc (octave_list::do_index_op): Ditto. * ov.cc (octave_value::do_index_op): Ditto. * ov-base-mat.cc (octave_base_matrix::print_info): New function. * ov-base-mat.h (octave_base_matrix::empty_clone): New function. * ov-base-nd-array.h (octave_base_nd_array::empty_clone): Ditto. * ov-base.h (octave_base_value::empty_clone): Ditto. * ov-bool-mat.h (octave_bool::empty_clone): Ditto. * ov-ch-mat.h (octave_char_matrix::empty_clone): Likewise. * ov-colon.h (octave_magic_colon::empty_clone): Likewise. * ov-complex.h (octave_complex::empty_clone): Likewise. * ov-cx-mat.h (octave_complex_matrix::empty_clone): Likewise. * ov-fcn.cc (octave_function::empty_clone): Likewise. * ov-file.h (octave_file::empty_clone): Likewise. * ov-range.h (octave_range::empty_clone): Likewise. * ov-list.h (octave_list::empty_clone): Likewise. * ov-re-mat.h (octave_matrix::empty_clone): Likewise. * ov-re-nd-array.h (octave_double_nd_array::empty_clone): Likewise. * ov-str-mat.h (octave_char_matrix_str::empty_clone): Likewise. * ov-struct.h (octave_struct::empty_clone): Likewise. * ov-va_args.h (octave_all_va_args::empty_clone): Likewise. * ov.h (octave_value::empty_clone): Likewise. * ov-base-mat.h (octave_base_matrix::clone): Now const. * ov-base-nd-array.h (octave_base_nd_array::clone): Likewise. * ov-base.h (octave_base_value::clone): Likewise. * ov-bool-mat.h (octave_bool::clone): Likewise. * ov-ch-mat.h (octave_char_matrix::clone): Likewise. * ov-colon.h (octave_magic_colon::clone): Likewise. * ov-complex.h (octave_complex::clone): Likewise. * ov-cx-mat.h (octave_complex_matrix::clone): Likewise. * ov-fcn.h (octave_function::clone): Likewise. * ov-file.h (octave_file::clone): Likewise. * ov-range.h (octave_range::clone): Likewise. * ov-list.h (octave_list::clone): Likewise. * ov-re-mat.h (octave_matrix::clone): Likewise. * ov-re-nd-array.h (octave_double_nd_array::clone): Likewise. * ov-str-mat.h (octave_char_matrix_str::clone): Likewise. * ov-struct.h (octave_struct::clone): Likewise. * ov-va_args.h (octave_all_va_args::clone): Likewise. * ov.h (octave_value::clone): Likewise. * oct-lvalue.cc (octave_lvalue::assign, octave_lvalue::set_index, octave_lvalue::do_unary_op): Idx is now a list of indices. Simplify. * oct-lvalue.h (octave_lvalue::value): Simplify. (octave_lvalue::struct_elt_names): Delete data member. (octave_lvalue::type): Now string Update decls. * pt-exp.h (tree_expression::is_indirect_ref): Delete virtual function. * pt-plot.cc (subplot::extract_plot_data): Use subsref, instead of do_index_op. * pt-stmt.cc (tree_statement::eval): Don't try to avoid binding ans for structure references. * symtab.cc (symbol_record::symbol_def::print_info): Rename from symbol_record::symbol_def::dump_symbol_info. (symbol_record::print_info): Rename from symbol_record::dump_symbol_info. Now const.. (symbol_record::print_symbol_info_line): Now const. (symbol_table::print_info): Rename from print_stats. Accept ostream arg. Now const. Print more info. * symtab.h: Update decls. * toplev.cc (octave_config_info): Indexing a map now returns a list, but we only want to return the first element. * variables.cc (generate_struct_completions, looks_like_struct): Simplify using eval_string. (F__print_symtab_info__): Rename from F__dump_symtab_info__. Handle "top-level" and individual function names in addition to "global". (F__print_symbol_info__): Rename from F___dump_symbol_info__. * octave.cc (intern_argv): Built-in variable argv is now a cell array. * ov-complex.cc (valid_scalar_indices): Delete. * ov-scalar.cc (valid_scalar_indices): Delete. * oct-obj.cc (octave_value_list::valid_scalar_indices): New function. (octave_value_list::index): New arg, resize_ok. * oct-obj.h: Provide decls. * oct-map.cc (Octave_map::keys): Rename from make_name_list. Change all uses. (Octave_map::assign, Octave_map::index): New functions. * oct-map.h: Provide decls. * data.cc (Fstruct_contains): Use map_value instead of do_struct_elt_index_op. * Cell.h (Cell (const Array2&, int, int)): New constructor. (Cell::resize_fill_value): New static function. * input.cc (initialize_command_input): Set basic and completer word break characters. 2002-05-07 John W. Eaton * ov.h (octave_value::subsref): New function. * ov-base.cc (octave_base_value::subsref): Likewise. * ov-struct.cc (octave_struct::print_raw): Print scalar struct arrays more compactly. * DLD-FUNCTIONS/time.cc (extract_tm): Handle new struct array def. * oct-map.cc (Octave_map::array_len): New data member. (Octave_map::operator[], Octave_map::contsnts): Return octave_value_list, not Octave_value. Change callers as necessary. (Octave_map::assign): New function. (Octave_map::array_length): New fucntion. * oct-obj.cc (octave_value_list::assign): New function. 2002-05-06 John W. Eaton * TEMPLATE-INST/Map-oct-obj.cc: New file. * Makefile.in (TI_XSRC): Add it to the list. * oct-map.h (Octave_map): Make CHMap a data member instead of deriving from CHMap, in preparation for structure arrays. * pt-indir.h, pt-indir.cc: Delete. * pt-all.h: Don't include pt-indir.h. * Makefile.in (PT_SRC): Delete pt-indir.cc from the list. (PT_INCLUDES): Delete pt-indir.h from the list. * pt-walk.h (tree_walker::visit_indirect_ref): Delete. * pt-pr-code.h, pt-pr-code.cc (tree_print_code::visit_indirect_ref): Likewise. * pt-check.h, pt-check.cc (tree_checker::visit_indirect_ref): Likewise. * pt-bp.h, pt-bp.cc (tree_breakpoint::visit_indirect_ref): Likewise. * pt-walk.h: Delete forward decl for tree_indirect_ref. * variables.h: Likewise. * parse.y (make_indirect_ref): Return tree_index_expression, not tree_indirect_ref. * pt-idx.h (tree_index_expression::struct_elt_name): New function. * pt-idx.cc (tree_index_expression::lvalue): Handle dot case too. (tree_index_expression::name): Likewise. (tree_index_expression rvalue (int)): Likewise. (tree_index_expression::eval_error): Likewise. * pt-pr-code.cc (visit_index_expression): Likewise. * pt-bp.cc (tree_breakpoint::visit_index_expression): Likewise. * pt-idx.h (tree_index_expression::dot): New type enum element. (tree_index_expression::expr_type): New function. (tree_index_expression::tree_index_expression (tree_expression*, const std::string&, int, int)): New constructor. (tree_index_expression::is_index_expression): Return value is now conditional on itype. (tree_index_expression::is_indirect_ref): New function. (tree_index_expression::lvalue_ok): Also return true if itype is dot. 2002-05-03 John W. Eaton * parse.y (ABORT_PARSE): Maybe restore symbol table context too. * pt-idx.h (tree_index_expression::type): New enum. (tree_index_expression::etype): New data member. * pt-idx.h (tree_index_expression::tree_index_expression): New arg, t, to set type of index. * parse.y (make_index_expression): Likewise. Change all callers. * ov-base.cc (cell_conv): New conversion function. (install_base_type_conversions): Install it. Install conversion for indexed assignment of octave_cells to undefined values. * TEMPLATE-INST/Array-tc.cc: Instantiate assign functions too. (Array::resize_fill_value (void)): Provide specialization for octave_value. * ov-cell.cc (octave_cell::assign (const octave_value_list&, const octave_value&)): New function. * Cell.h (Cell::Cell (const octave_value&)): New function. * OPERATORS/op-cell.cc (install_list_ops): Use DEFASSIGNANYOP_FN and INSTALL_ASSIGNANYOP, not DEFASSIGNOP_FN and INSTALL_ASSIGNOP. 2002-05-03 Cai Jianming * OPERATORS/op-cell.cc: New file. * Makefile.in (OP_XSRC): Include it in the list. * parse.y (cell): Return a cell type instead of Matrix type. * ov.cc (install_types): Install octave_cell type. * pr-output.cc (octave_print_internal): Handle Cells. * pr-output.h (octave_print_internal): Provide decl. * ov-cell.h (octave_cell): Derive from octave_base_matrix. * ov-cell.cc (do_index_op, assign, print, print_raw, print_name_tag): Delete. * Cell.cc (allocator, index): Delete. * Cell.h (Cell): Derive from Array2. Most functions removed since we can use those from Array2 instead. 2002-05-02 Cai Jianming * ov-base-mat.cc (octave_base_matrix::assign): New function. * ov-base-mat.h (octave_base_matrix::assign): Provide decl. * ov-bool-mat.cc (octave_bool_matrix::assign): Delete. * ov-bool-mat.h (octave_bool_matrix:assign): Delete decl * ov-cx-mat.cc (octave_complex_matrix::assign (const octave_value_list& idx, const ComplexMatrix&)): Delete. * ov-cx-mat.h (octave_complex_matrix:assign (const octave_value_list& idx, const ComplexMatrix&)): Replace decl with function. * ov-re-mat.cc (octave_bool_matrix::assign): Delete. * ov-re-mat.h (octave_bool_matrix:assign): Delete decl. 2002-05-02 Cai Jianming * OPERATORS/op-bm-b.cc: New file.x * Makefile.in (OP_XSRC): Add it to the list. 2002-04-30 John W. Eaton * octave.cc (print_version_and_exit): Use OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY, not OCTAVE_NAME_AND_VERSION. * octave.cc (verbose_usage): Use OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY, not OCTAVE_NAME_VERSION_AND_COPYRIGHT. * version.h (OCTAVE_COPYING_STATEMENT, OCTAVE_WARRANTY_STATEMENT, OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY, X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS, OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS, OCTAVE_BUGS_STATEMENT): New macros. (OCTAVE_STARTUP_MESSAGE): Define in terms of X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS to include bugs address and amplified warranty information. * DLD-FUNCTIONS/lsode.cc (Flsode): Delete unused variable nsteps. 2002-04-29 John W. Eaton * help.cc (additional_help_message): Use www.octave.org, not www.che.wisc.edu/octave/octave.html. * octave.cc (verbose_usage): Likewise. 2002-04-27 John W. Eaton * DLD-FUNCTIONS/daspk.cc: New file. * Makefile.in (DLD_XSRC): Add it to the list. 2002-04-25 Paul Kienzle * DLD-FUNCTIONS/kron.cc: New file. * Makefile.in (DLD_SRC): Add it to the list. 2002-04-22 John W. Eaton * parse.y (save_symtab): New non-terminal. Save current symbol table context here. (function_beg): Use it. (symtab_context): New file-scope variable. (recover_from_parsing_function): Restore symbol table context here. 2002-04-17 John W. Eaton * load-save.cc (get_lines_and_columns): Handle CRLF as line separator in addition to LF. 2002-04-11 John W. Eaton * load-save.cc (hdf5_ofstream::hdf5_ofstream): Explicitly List std::ostream(0) in constructor. (hdf5_ifstream::hdf5_ifstream): Explicitly List std::istream(0) in constructor. (hdf5_fstreambase::hdf5_fstreambase): Use std::ios::setstate, not set. (hdf5_fstreambase::close): Likewise. (hdf5_fstreambase::open): Likewise. 2002-04-10 Ben Sapp * pt-stmt.cc (delete_breakpoint): List breakpoints if line < 0. * debug.cc (get_user_function): Check symbol by name first. (Fdbstop): Rename from Fdbg_set. (Fdbclear): Rename from Fdbg_delete. (Fdbstatus): Rename from Fdbg_list. (Fdbg_where): Rename from Fdbwhere. (do_dbtype, Fdbtype): New functions. 2002-04-10 Peter Van Wieren * load-save.cc (save_mat5_binary_element): Save elements of 2d character matrices in proper order. 2002-04-09 Paul Kienzle * utils.cc (do_string_escapes): Handle \0 too. (undo_string_escape): Likewise. 2002-04-04 John W. Eaton * toplev.cc (octave_config_info): Define struct member EXEEXT, not EXE. * Makefile.in (install-bin): Use $(EXEEXT), not $(EXE). * oct-conf.h.in (OCTAVE_CONF_EXEEXT): Define and substitute OCTAVE_CONF_EXEEXT, not OCTAVE_CONF_EXE. 2002-04-03 Steven G. Johnson * DLD-FUNCTIONS/balance.cc: Use F77_FUNC instead of F77_FCN. * DLD-FUNCTIONS/qz.cc: Likewise. * DLD-FUNCTIONS/rand.cc: Likewise. * octave.cc: Likewise. * toplev.cc (Foctave_config_info): Delete use of FORTRAN_MAIN_FLAG. * oct-conf.h.in: Delete use of OCTAVE_CONF_FORTRAN_MAIN_FLAG. * syscalls.cc (mk_stat_map): Use HAVE_STRUCT_STAT_ST_RDEV instead of HAVE_ST_RDEV. Use HAVE_STRUCT_STAT_ST_BLKSIZE instead of HAVE_ST_BLKSIZE. Use HAVE_STRUCT_STAT_ST_BLOCKS instead of HAVE_ST_BLOCKS. 2002-04-02 John W. Eaton * lex.l, lex.h (parser_end_of_input): New global variable. (reset_parser): Reset it here. * parse.y (input): Set it to TRUE on EOF. (parse_and_executed): Save and restore it, check it to correctly break out of parse-execute loop. (parse_fcn_file): Likewise. (eval_string): Likewise. * toplev.cc (main_loop): Likewise. * parse.y (input): Call YYACCEPT for END_OF_INPUT. Return no-op command for bare newline. (parse_and_execute): Handle change in yyparse return value semantics. * toplev.cc (main_loop): Likewise. 2002-03-25 John W. Eaton * parse.y (parse_fcn_file): Call error if there is no input file. (parse_and_execute (FILE *): Protect get_input_from_eval_string. Set get_input_from_eval_string to false before calling yyparse. * lex.l (reset_parser): Also skip yyrestart (stdin) if reading_script_file is true. 2002-03-07 John W. Eaton * pt-loop.cc (evaluating_looping_command): New global. (tree_while_command::eval): Protect evaluating_looping_command. Set it to true while evaluating loop. (tree_do_until_command::eval): Ditto. (tree_simple_for_command::eval): Ditto. (tree_complex_for_command::eval): Ditto. * pt-loop.h (evaluating_looping_command): Provide decl. * parse.y (parse_fcn_file): Protect get_input_from_eval_string. Set get_input_from_eval_string to false before calling yyparse. (make_break_command): Also check evaluating_looping_command. (make_continue_command): Also check evaluating_looping_command. (eval_string (const std::string&, bool, int&, int)): Loop over yyparse to handle multi-line strings. Move call to unwind_protect::run_frame to end of function. Don't reset parser before calling yyparse. Correctly handle return, break, and continue. * input.cc (input_from_eval_string_pending): New global variable. (get_usr_input): Use it. * input.h (input_from_eval_string_pending): Provide decl. 2002-03-06 John W. Eaton * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Don't unwind_protect num_named_args (it doesn't change on recursive calls). Do re-initialize curr_va_arg_number to num_named_args after unwind_protecting. * ov-usr-fcn.h (octave_user_function::clear_args_passed): Delete. (octave_user_function::saved_args): New data member. (octave_user_function::save_args_passed): New function. (octave_user_function::restore_args_passed): Ditto. * ov-usr-fcn.cc (clear_args_passed): Delete. (restore_args_passed): New function. (octave_user_function::do_multi_index_op): Correctly save and restore args passed for recursive calls. * TEMPLATE-INST/SLStack-ovl.cc: New file. * Makefile.in: Add it to the list. 2002-02-22 John W. Eaton * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Handle define_all_return_values after function is evaluated. From Paul Kienzle . * ov-scalar.cc (convert_to_str): Use octave_value (std::string) constructor instead of octave_value (char *) constructor so that setstr (0) will work. * pager.cc (octave_pager_buf::sync): Set pointer to beginning of buffer after calling flush_currnt_contents_to_diary. (octave_diary_buf::sync): Call eback only once. 2002-01-03 John W. Eaton * lex.l (.): Remove test for EOF since it is already handled separately. 2001-12-05 John W. Eaton * load-save.cc (save_mat5_binary_element): Extract dimensions directly from tc. Handle ranges the same as real matrices. 2001-11-16 John W. Eaton * data.cc (DATA_REDUCTION): If no DIM arg, pass -1 to FCN. 2001-11-09 John W. Eaton * oct-conf.h.in (FFTW_LIBS, LD_CXX, LIBOCT_PATHSEARCH, LIBOCT_READLINE, MKOCTFILE_LFLAGS): Substitute. * toplev.cc (octave_config_info): Add them to the map. 2001-11-08 John W. Eaton * DLD-FUNCTIONS/lsode.cc (Flsode): Don't bother to give OUTPUT matrix a size before calling integration function. 2001-11-06 John W. Eaton Makefile.in (OCTAVE_LIBS): Add $(LIBOCT_READLINE) and $(LIBOCT_PATHSEARCH) to the list. 2001-10-08 John W. Eaton * DLD-FUNCTIONS/dassl.cc (dassl_user_function): Allow user supplied RES function to return IDID as second value. 2001-07-23 John W. Eaton * parse.y: Clear help_buf after documenting function. 2001-06-29 Mumit Khan * defun-int.h (DEFINE_FUN_INSTALLER_FUN{2,3}): New macros. (DEFINE_FUN_INSTALLER_FUN): Use. * dynamic-ld.cc ({STRINGIFY, STRINGIFY1}): New macros. (octave_dynamic_loader::mangle_name): Support dynamic linking for GNU v3 and Sun C++ ABI. 2001-06-26 Mumit Khan * c-file-ptr-stream.h (c_file_ptr_buf::c_file_ptr_buf): Add GCC3 libstdc++-v3 support. * load-save.cc (save_mat5_binary_element): Cast arguments to the correct type. (save_ascii_data): Eliminate compiler warning. * toplev.cc (system): Prefix std::. 2001-05-31 John W. Eaton * ov-cx-mat.cc: Deleve unnecessary instantiation of assign function. * ov-re-mat.cc: Likewise. * ov-re-nd-array.cc: Likewise. * ov-str-mat.cc: Likewise. * ov-bool-mat.cc: Likewise. * load-save.cc (save_ascii_data): When saving string data, get raw string value for matrix row since there may be embedded nuls. * pt-mat.cc (Vstring_fill_char): No longer static. * pt-mat.h: Provide declaration. 2001-05-17 John W. Eaton * octave.cc (initialize_pathsearch): Save initial value of the TEXMFDBS environment variable here. * toplev.cc (restore_texmfdbs_envvar): New function. (Fsystem): Set TEXMFDBS back to original value before running subprocesses. 2001-05-02 Mumit Khan * Makefile.in (octave): Add $(FFTW_LIBS). 2001-04-27 John W. Eaton * DLD-FUNCTIONS/sort.cc (mx_sort): Check for NaNs in comparisons. 2001-04-26 John W. Eaton * Makefile.in (OCTAVE_LIBS): Delete $(LIBREADLINE) from the list. (octave): Delete TERMLIBS from link command. * oct-conf.h.in: Delete references to LIBREADLINE, TERMLIBS. * toplev.cc (octave_config_info): Delete entries for LIBREADLINE, TERMLIBS. 2001-04-25 John W. Eaton * Makefile.in (install-lib): Don't use mk-libdir-link. (install-inc): Don't use mk-includedir-link. 2001-04-19 John W. Eaton * parse.y (fold (tree_binary_expression *)): Set discard_error_messages here instead of buffer_error_messages. Don't add clear_global_error_variable to the unwind_protect stack. (fold (tree_unary_expression *)): Likewise. (finish_colon_expression): Likewise. (finish_matrix): Likewise. * error.cc (panic): Set discard_error_messages to false here. (verror): Return immediately if discard_error_messages is true. * error.cc (discard_error_messages): New global variable. * error.h: Provide declaration. 2001-04-18 John W. Eaton * lex.l: If unexpected character is EOF, report EOF error instead of invalid character error. 2001-04-18 Mumit Khan * load-save.cc (read_mat5_binary_element): Cast arguments to the correct type when adding stream positions. * DLD-FUNCTIONS/det.cc (det): Explicity create a Complex value to work around a Sun C++ type conversion bug. 2001-04-17 John W. Eaton * symtab.cc (define_builtin_const): Don't call replace_all_defs here. * error.cc (error_message_buffer): Now static. * error.h (error_message_buffer): Delete extern declaration. 2001-03-29 John W. Eaton * DLD-FUNCTIONS/besselj.cc (besselh): Use K arg. From: Thomas Stuart . * oct-stream.cc (get_size): Don't allow [Inf, N] as a size specification for the read and scanf functions. (get_size): SIZE is now an Array instead of a Matrix object. (read): Likewise. Change all callers. (scanf): Likewise. Change all callers. 2001-03-26 John W. Eaton * DLD-FUNCTIONS/det.cc (Fdet): Only return rcond if nargout > 1. * DLD-FUNCTIONS/inv.cc (Finv): Only return rcond if nargout > 1. 2001-03-26 Paul Kienzle * DLD-FUNCTIONS/det.cc (Fdet): Suppress warning, but return rcond. * DLD_FUNCTIONS/inv.cc (Finv): Return rcond if requested. 2001-02-28 John W. Eaton * pt.h (tree::break_statement): New static member. (tree::break_function): Make const. * pt.cc (tree::break_statement): Initialize here. (tree::break_function): Make const. * pb-bp.h (break_statement): Delete global varaible declaration. * pt-bp.cc (break_statement): Delete global variable definition. * pt-bp.h (tree_breakpoint::bp_list): Rename from lst. * pt.h: Don't inlcude ov-usr-fcn.h. Provide forward declaration of octave_user_function class. 2001-02-28 Ben Sapp * debug.cc (get_user_function): Simplify by using curr_function. (Fdbg_where): New function. (Fdbg_list): Now DLD_TEXT instead of DLD_FCN. (Fdbg_set): Likewise. (Fdbg_delete): Likewise. * pt-bp.h (break_statement): New global variable. (MAYBE_DO_BREAKPOINT): Check for dbg_next and dbg_step. Print line, column, and current statement. * pt-bp.cc (break_statement): New global variable (tree_breakpoint::visit_do_until_command): Return immediately if we've already found the line. (tree_breakpoint::visit_colon_expression): Set breakpoint info here. (tree_breakpoint::visit_binary_expression): Recurse here when checking for breakpoints. * debug.cc: Move here from DLD-FUNCTIONS/debug.cc. * Makefile.in (DIST_SRC): Add it to the list. (DLD_XSRC): Delete it from the list. * pt.h (tree::last_line, tree::break_function): New static members. * pt.cc(tree::last_line, tree::break_function): Initialize them. * pt-cell.h (tree_cell::tree_cell): Accept line and column info. * pt-mat.h (tree_matrix::tree_matrix): Likewise. * ov-usr-fcn.h (octave_user_function::sym_tab): Delete. * input.cc (get_user_input): Handle dbg_next. Set tree:break_function and tree::last_line when doing dbg_step. 2001-02-28 John W. Eaton * lex.l (handle_string): Save line and column information in token. (is_keyword): Save line and column information for plot style and axes tokens. * toplev.cc (main_loop): Set retval to non-zero value if error occurs when not interactive. 2001-02-26 John W. Eaton * parse.y (gobble_leading_white_space): Handle CRLF here too. * lex.l (check_for_garbage_after_fcn_def): Likewise. * lex.l: Add numeric value of character to error message for unrecognized characters. 2001-02-22 John W. Eaton * DLD-FUNCTIONS/minmax.cc (EMPTY_RETURN_CHECK): For empty matrix args, make Octave's min and max behave like Matlab. 2001-02-18 John W. Eaton * OPERATORS/op-s-s.cc (el_or, el_and): Return bool value. 2001-02-14 John W. Eaton * pt-binop.cc (tree_boolean_expression::rvalue): Don't cast result to double. * OPERATORS/op-b-b.cc: Allow & and | operators to return bool values. 2001-02-09 John W. Eaton * data.cc (DATA_REDUCTION): Undo previous change. 2001-02-13 Matthew W. Roberts * load-save.cc (Fload): Accept -4 as an alias for -v4 and -mat4-binary. (Fsave): Likewise. 2001-02-13 John W. Eaton * lex.l (lexical_feedbac::init): Initialize looking_at_matrix_or_assign_lhs too. 2001-02-09 John W. Eaton * data.cc (DATA_REDUCTION): Allow FCN(x,0) to be equivalent to FCN(x). 2001-02-06 Mumit Khan * oct-stream.cc (octave_scan): Partially implement and specialize for char*. Delete the old template instantiations. (BEGIN_S_CONVERSION): Use strings instead of ostrstreambuf. (octave_base_stream::do_scanf): Pass correct parameter to do_scan_conv. 2001-02-05 Mumit Khan * pr-output.cc (set_format): Add std:: namespace qualifier as needed. * oct-stream.cc (octave_scan): Implement, and specialize for char*. Delete the old template instantiations. (BEGIN_S_CONVERSION): Use strings instead of ostrstreambuf. (octave_base_stream::do_scanf): Pass correct parameter to do_scan_conv. * Makefile.in (TEMPLATE_AR, TEMPLATE_ARFLAGS): Use to create archive libraries containing templates. * c-file-ptr-stream.h: Include . Use instead of (c_file_ptr_buf::int_type): Compat typedef for non-ISO libstdc++. (c_file_ptr_buf::{overflow, underflow, uflow, pbackfail): Use. (c_file_ptr_buf::c_file_ptr_buf): Handle various compilers. (c_file_ptr_buf::file_number): New member function. (c_file_ptr_buf::fd): New private data. (i_c_file_ptr_stream::i_c_file_ptr_stream): Initialize stream correctly. (o_c_file_ptr_stream::o_c_file_ptr_stream): Likewise. * c-file-ptr-stream.cc (c_file_ptr_buf::{overflow, underflow, uflow, pbackfail): Add ISO-compliant EOF handling. * oct-stream.cc (octave_base_stream::file_number): Use c_file_ptr_buf::file_number to get underlying file descriptor. * comment-list.cc: Add missing class qualifier. * file-io.cc, load-save.cc, mappers.cc, oct-fstrm.cc, oct-fstrm.h, oct-iostrm.cc, oct-iostrm.h, oct-stdstrm.cc, oct-stdstrm.h, oct-stream.cc, oct-stream.h, oct-strstrm.cc, oct-strstrm.h, ov-base-nd-array.cc, ov-base-scalar.h, ov-complex.cc, ov-cx-mat.cc, pager.cc, pr-output.cc, procstream.h, pt-bp.h, utils.cc: Add std:: namespace qualifier as needed, and replace deprecated or invalid libstdc++-v2 names with standard ones where appropriate. * DLD-FUNCTIONS/minmax.cc: Fix docstring. * oct-fstrm.cc (octave_fstream::octave_fstream): Maintain fix for libstdc++-v2. * oct-stdstrm.cc (octave_ostdiostream::create): Remove default parameter value in definition. * oct-stream.cc (octave_stream::mode_as_string): Don't assume std::iso::openmode is an integral quantity. * pager.cc, procstream.h: Initialize streams correctly. * utils.cc: Use CXX_ISO_COMPLIANT_LIBRARY guard. * ov-base-nd-array.cc (idx_list_to_idx_array): Inline. * ov-base-scalar.h (octave_base_scalar::octave_base_scalar): Use ``const ST& s'' instead of ST to workaround gcc3 complex bug. 2001-02-05 John W. Eaton * lex.l (next_token_is_bin_op): Remove Checks for spacing except for ops that begin with +, - but are not ++, --, +=, or -=. 2001-02-02 John W. Eaton * input.cc (get_user_input): Handle dbg_cont and dbg_step here. * debug.cc (Fdbg_cont): Delete. * pt-bp.h (MAYBE_DO_BREAKPOINT): Check tree::break_next here. * pt.h (tree::break_next): New static member. * pt.cc: Initialize it. * parse.h (feval (const octave_value_list&, int)): Set default value for nargout. (feval (const std::string&, const octave_value_list&, int)): Set default values for args and nargout. 2001-02-01 Ben Sapp * DLD-FUNCTIONS/debug.cc: New file. * pt-bp.h, pt-bp.cc: New files, for breakpoints. * Makefile.in: Add them to the appropriate lists. * pt-stmt.cc (tree_statement_list::set_breakpoint, tree_statement_list::delete_breakpoint, tree_statement_list::list_breakpoints): New functions. * pt.h (tree::break_point): New data member. (tree::set_breakpoint, tree::delete_breakpoint, tree::is_breakpoint): New virtual functions. * pt-mat.cc (tree_matrix::rvalue): Check for breakpoint here. * pt-unop.cc (tree_prefix_expression::rvalue): Likewise. (tree_postfix_expression::rvalue): Likewise. * pt-loop.cc (tree_do_until_command::eval): Likewise. (DO_LOOP): Likewise. (tree_simple_for_command::eval): Likewise. (tree_complex_for_command::eval): Likewise. * pt-assign.cc (tree_simple_assignment::rvalue): Likewise. * pt-binop.cc (tree_binary_expression::rvalue): Likewise. (tree_boolean_expression::rvalue): Likewise. * pt-cell.cc (tree_cell::rvalue): Likewise. * pt-colon.cc (tree_colon_expression::rvalue): Likewise. * pt-except.cc (tree_try_catch_command::eval): Likewise. (tree_unwind_protect_command::eval): Likewise. * pt-id.cc (tree_identifier::rvalue): Likewise. (tree_identifier::lvalue): Likewise. * pt-indir.cc (tree_indirect_ref::rvalue): Likewise. * pt-jump.cc (tree_break_command::eval): Likewise. (tree_continue_command::eval): Likewise. (tree_return_command::eval): Likewise. 2001-01-29 John W. Eaton * Map.h, Map.cc (CHMap::operator = (const CHMap&)): New function. (Map::operator = (const Map&)): Likewise. (Map (const Map&)): Likewise. * OPERATORS/op-cm-cs.cc, OPERATORS/op-cm-s.cc, OPERATORS/op-m-cs.cc, OPERATORS/op-m-s.cc: Make ldiv operator work for row vector by scalar ops. * OPERATORS/op-cs-cm.cc, OPERATORS/op-cs-m.cc, OPERATORS/op-s-cm.cc, OPERATORS/op-s-m.cc: Make div operator work for scalar by column vector ops. 2001-01-17 John W. Eaton * parse.y (safe_fclose): Discard comments at the end of a file. 2001-01-16 John W. Eaton * error.cc (pr_where): Call pr_where_1 with two args, not one, to avoid processing format escapes that might appear in formatted code. 2001-01-05 John W. Eaton * error.cc (vwarning): Write to output_buf, then send formatted message to diary and error streams. 2001-01-02 John W. Eaton * ov-cx-mat.cc (octave_complex_matrix::try_narrowing_conversion): Handle empty matrix dimensions correctly. 2000-12-14 John W. Eaton * pager.h (octave_pager_buf::diary_skip): New data member. (octave_pager_buf::octave_pager_buf): Initialize it. * pager.cc (octave_pager_buf::set_diary_skip): New function. (octave_pager_stream::set_diary_skip): New function. (octave_pager_buf::sync): Call flush_current_contents_to_diary instead of octave_diary.write. (octave_pager_buf::flush_current_contents_to_diary): Use diary_skip, reset when done. (open_diary_file): Call octave_stdout.set_diary_skip here. 2000-12-06 John W. Eaton * DLD-FUNCTIONS/minmax.cc (EMPTY_RETURN_CHECK): New macro. (min, max): Use it. * DLD-FUNCTIONS/minmax.cc (MINMAX_BODY): New macro. If single arg is empty, return empty matrix result and empty matrix for index. (Fmin, Fmax): Use MINMAX_BODY, so we have consistent definition for min and max functions. 2000-11-30 Joerg Specht * help.cc (display_help_text): Append new line at end of doc string. 2000-11-30 John W. Eaton * DLD-FUNCTIONS/lsode.cc (LSODE_ABORT1, LSODE_ABORT2): Omit `##' in macro definition since they are not needed to paste strings together and picky compilers choke on them. * DLD-FUNCTIONS/quad.cc (QUAD_ABORT1, QUAD_ABORT2): Likewise. * DLD-FUNCTIONS/fsolve.cc (FSOLVE_ABORT1, FSOLVE_ABORT2): Likewise. * DLD-FUNCTIONS/dassl.cc (DASSL_ABORT1, DASSL_ABORT2): Likewise. 2000-11-29 John W. Eaton * mkbuiltins (XDEFUNX_INTERNAL): New macro. * mkgendoc (XDEFUNX_INTERNAL): Likewise. * defun-int.h (DEFUNX_INTERNAL): Use it. * defun.h (DEFUNX): New macro. * defun-int.h (DEFUNX_INTERNAL, DECLARE_FUNX): New macro. (DECLARE_FUN): Define in terms of DECLARE_FUNX. * mkdefs: Read and print one line at a time, so we can force patterns to match only at the beginning of a line. * defun-int.h (UNDERSCORIFY): Omit `##' in macro definition since they are not needed to paste strings together and picky compilers choke on them. 2000-11-17 John W. Eaton * load-save.cc (save_ascii_data_for_plotting): New function. * pt-plot.cc (save_in_tmp_file): Use it instead of save_ascii_data. * load-save.cc (save_ascii_data): Warn if saving Inf or NaN values. New arg, infnan_warned. Use it to warn just once per set. Now static. (do_save): New arg, infnan_warned. Pass to save_ascii_data. (save_vars): Initialize infnan_warned here, pass to do_save. 2000-11-16 Paul Kienzle * file-io.cc (Ffprintf): If no file id parameter, don't return count of characters if nargout is 0 (for compatibility with Matlab). 2000-11-16 Ben Sapp * DLD-FUNCTIONS/rand.cc (do_rand): Declare loop counter as volatile int, not just volatile. 2000-10-31 John W. Eaton * load-save.cc (skip_comments): Allow % as comment character too. (extract_keyword): Likewise. * Makefile.in (oct-gperf.h): Remove -a, -g, and -p flags for gperf. 2000-10-30 John W. Eaton * load-save.cc (do_load): Allow result to be returned instead of inserting variables in the symbol table. Change patterned after patch by Kian Ming Adam Chai . 2000-10-27 John W. Eaton * Makefile.in (ops.cc): Don't substitute BLAS_LIBS and LIBS here. * oct-conf.h.in (OCTAVE_CONF_SPECIAL_MATH_LIB): Delete. (OCTAVE_CONF_BLAS_LIBS): Add. * toplev.cc (octave_config_info): Likewise, add BLAS_LIBS and remove SPECIAL_MATH_LIB from the struct. * parse.y (feval (const octave_value_list&, int)): Don't panic while processing arg names if arg.length() and arg_names.length() differ. 2000-10-12 Paul Kienzle * ov-cell.h (octave_cell::is_cell): New function. * pt-select.cc (equal): New static function. (tree_switch_case::label_matches): Use it to compare case label against arg. Handle cell arrays as case labels. 2000-10-12 John W. Eaton Change patterned after patch by Cai Jianming to support for DIM arg in 2.0.x sources. * data.cc (DATA_REDUCTION): New macro. Handle second DIM arg here. (Fcumprod): Replace function body with DATA_REDUCTION. (Fcumsum): Likewise. (Fprod): Likewise. (Fsum): Likewise. (Fsumsq): Likewise. 2000-10-10 John W. Eaton * error.cc (pr_where_2): New function. (pr_where_1): Use it instead of error_1 to avoid setting error_state. 2000-10-02 John W. Eaton * xdiv.cc (xdiv): Warn if execution falls through to lssolve. 2000-09-06 John W. Eaton * utils.cc (FERRNO): New function (currently commented out). * c-file-ptr-stream.cc (c_file_ptr_buf::close): Call flush here. (c_file_ptr_buf::~c_file_ptr_buf): Not here. * c-file-ptr-stream.h (c_fie_ptr_buf::close_fcn): New typedef. (c_file_ptr_buf::cf): New data member. Add default constructor arg. (class c_file_ptr_buf): Derive from filebuf, not streambuf. (i_c_file_ptr_stream, o_c_file_ptr_stream): Handle close function here. * oct-procstrm.cc (octave_iprocstream, octave_oprocstream): Likewise. (octave_iprocstream::do_close, octave_oprocstream::do_close): Delete. * oct-stdstrm.cc (octave_base_stdiostream::~octave_base_stdiostream): Don't do anything. (octave_istdiostream::create): Handle close function here. (octave_istdiostream::octave_istdiostream): Likewise. (octave_ostdiostream::create): Likewise. (octave_ostdiostream::octave_ostdiostream): Likewise. (class octave_base_stdiostream): Don't cache FILE pointer here. 2000-09-01 John W. Eaton * syscalls.cc (Ffcntl): Don't assume that the file id passed in is the same as the underlying system file id. 2000-08-22 John W. Eaton * parse.y: Use octave_time, not time. 2000-08-03 John W. Eaton * oct-stream.cc (printf_value_cache::double_value): Also set curr_stat to conversion_error if there are no values at all. 2000-08-02 John W. Eaton * dirfns.cc (Flink, Fsymlink, Freadlink): New functions. 2000-08-01 John W. Eaton * load-save.cc (Vsave_header_format_string): New variable. (symbols_of_load_save): DEFVAR it. (save_header_format, default_save_header_format): New functions. (write_header): Use Vsave_header_format_string here. 2000-07-28 John W. Eaton * pt-pr-code.h (tree_print_code::curr_print_indent_level, (tree_print_code::beginning_of_line): No longer static. (tree_print_code::tree_print_code): Initialize them here. * pt-pr-code.cc: Not here. * pt-stmt.cc (tree_statement::eval): Set curr_statement here. (tree_statement_list::eval): Not here. Debug-on-error stuff based on a patch submitted by Paul Kienzle for 2.0.x. * error.cc (Vdebug_on_warning): New static flag variable. (debug_on_warning): New function. (symbols_of_warning): DEFVAR debug_on_warning. (warning): Handle debug_on_warning here. * input.cc (do_keyboard): New function. (Fkeyboard): Use it to do the real work. * pt-stmt.cc (curr_statement): New static variable. (tree_statement::eval): Save and restore it here. * error.cc (Vdebug_on_error): New static flag variable. (debug_on_error): New function. (symbols_of_error): DEFVAR debug_on_error. (pr_where, pr_where_1): New functions. (error): Handle debug_on_error here. 2000-07-20 Joao Cardoso * Makefile.in (octave): Link with $(LD_CXX) instead of $(CXX) 2000-07-20 John W. Eaton * oct-stream.cc (octave_base_stream::oscanf): Advance to next format element before attempting to pick up any trailing stuff. 2000-07-17 John W. Eaton * lex.l (next_token_is_bin_op): Don't recognize `..' as a binary op. * load-save.cc (get_file_format): Call read_mat5_binary_file_header with third arg true instead of false, so we don't barf if the file is not a matlab v5 binary file. 2000-07-14 John W. Eaton * Makefile.in (octave): Link to ../libcruft/blas-xtra/xerbla.o here. * octave.cc (main): Remove kluge to attempt linking our version of xerbla. 2000-07-07 Steven G. Johnson * load-save.cc (have_h5giterate_bug): New file-scope variable. (hdf5_read_next_data): Only increment current_item if have_h5giterate_bug is true. (read_hdf5_data): Set have_h5giterate_bug here. Only increment hs.current_item if have_h5giterate_bug is true. 2000-07-05 John W. Eaton * c-file-ptr-stream.cc (c_file_ptr_buf::close): Return -1 if file pointer is NULL. Set file pointer to 0 after closing. (c_file_ptr_buf::~c_file_ptr_buf): Call close after flushing. 2000-07-05 Steven G. Johnson * Makefile.in (BLAS_LIBS): Substitute here. (octave): Use $(BLAS_LIBS) in the final link command. 2000-06-30 Steven G. Johnson * Makefile.in (octave): Link $(FLIBS) last. * octave.cc (main): Force our own xerbla to be linked instead of some system version. 2000-06-29 James R. Van Zandt * load-save.cc (load_save_format): New value, LS_MAT5_BINARY. (arrayclasstype, mat5_data_type): New enums. (read_mat5_binary_data): New function. (read_mat5_tag): New function. (read_mat5_binary_element): New function. (read_mat5_binary_file_header): New function. (get_file_format): Check for mat5 binary format too. (do_load): Handle mat5 binary format. (write_mat5_tag): New function. (write_mat5_array): New function. (class mat5_callback): New class. (save_mat5_binary_element): New functnon. (do_save): Handle mat5 binary format. (write_header): Handle LS_MAT5_BINARY case too. (save_user_variables): Handle LS_MAT5_BINARY case too. (Fsave): Handle LS_MAT5_BINARY case too. (Fload): Handle LS_MAT5_BINARY case too. 2000-06-29 Steven G. Johnson All of the following changes are protected by #ifdef HAVE_HDF5. * load-save.cc (load_save_format): New value, LS_HDF5. (make_valid_identifier): New function. (class hdf5_fstreambase, class hdf5_ifstream, class hdf5_ofstream): New classes for reading and writing hdf5 data. (hdf5_types_compatible): New function. (hdf5_import_multidim): New function. (hdf5_check_attr): New function. (hdf5_read_next_data): New function. (hdf5_make_complex_type): New function. (hdf5_make_range_type): New function. (read_hdf5_data): New function. (get_file_format): Handle HDF5 format. (do_load): Handle LS_HDF5 case. (Fload): Handle HDF5 format. (hdf5_add_attr): New function. (save_type_to_hdf5): New function. (add_hdf5_data): New function. (do_save): Handle HDF5 format. (get_default_save_format): Handle LS_HDF5 case. (write_header): Handle LS_HDF5 case. (save_user_variables): Handle HDF5 format. (Fsave): Handle HDF5 format. 2000-06-28 John W. Eaton * help.cc (display_help_text): If writing to filter fails, send unformatted text to output stream. 2000-06-27 John W. Eaton * OPERATORS/op-bm-bm.cc (eq): Define using mx_el_eq, not operator ==. (ne): Likewise, use mx_el_ne, not operator !=. * pr-output.cc (Fdisp): Delete. 2000-06-26 John W. Eaton * pr-output.cc (float_format::float_format): Set default values for width and precision to -1. (operator << (ostream&, pr_formatted_float&): Set width and precision if values are >= 0. (set_real_format, set_real_matrix_format, set_range_format, set_complex_format, set_complex_matrix_format): If we have all integers, infinities, or nans, set precision equal to field width. * load-save.cc (read_ascii_data): Allow empty strings and string vectors to be restored. * variables.cc (var_matches_any_pattern): New function. (Fclear): Use it to make exclusive clear work correctly. 2000-06-08 John W. Eaton * ov-range.h (octave_range::is_numeric_type): New function. * sysdep.cc (Fkbhit): Also ask for input if forced_interactive. 2000-06-07 John W. Eaton * Makefile.in (oct-gperf.h): Use $(GPERF) instead of gperf. 2000-05-31 John W. Eaton * DLD-FUNCTIONS/qz.cc (Fqz): When computing finite generalized eigenvalues, don't write past the end of the array. 2000-05-11 John W. Eaton * ov-base-nd-array.h, ov-base-nd-array.cc, ov-re-nd-array.h, ov-re-nd-array.h: New files. * Makefile.in: Add them to the appropriate lists. * pt-stmt.h, pt-stmt.cc (class tree_statement): Store comments associated with this parse tree element. * pt-select.h, pt-select.cc (class tree_if_clause, class tree_if_command, class tree_switch_case class tree_switch_command): Likewise. * pt-loop.h, pt-loop.cc (class tree_while_command, class tree_do_until_command, class tree_simple_for_command, class tree_complex_for_command): Likewise. * pt-except.h, pt-except.cc (class tree_try_catch_command, class tree_unwind_protect_command): Likewise. * ov-usr-fcn.h, ov-usr-fcn.cc (class octave_user_function): Likewise. * pt-pr-code.h, pt-pr-code.cc (tree_print_code::print_comment_elt, tree_print_code::print_comment_list, tree_print_code::print_indented_comment): New functions. (tree_print_code::visit_simple_for_command, tree_print_code::visit_complex_for_command, tree_print_code::visit_octave_user_function_header, tree_print_code::visit_octave_user_function_trailer, tree_print_code::visit_if_command, tree_print_code::visit_statement, tree_print_code::visit_switch_case, tree_print_code::visit_switch_command, tree_print_code::visit_try_catch_command, tree_print_code::visit_unwind_protect_command tree_print_code::visit_while_command, tree_print_code::visit_do_until_command): Handle comments. * lex.l, parse.y: Handle comments in parse trees. * comment-list.h, comment-list.cc: New files. * Makefile.in: Add them to the appropriate lists. 2000-04-23 etienne grossmann * pt-mat.cc (tm_row_const::tm_row_const_rep::eval_error): New args x and y, for dimension mismatch info. Change callers where appropriate. (tm_const::init): Report mismatched column dimensions. 2000-04-11 John W. Eaton * sysdep.cc (kbhit): Also clear cin if at EOF. 2000-04-11 Joao Cardoso * sysdep.cc (kbhit): New arg, wait. (raw_mode): Ditto. (Fkbhit): If given an arg, call kbhit with wait = false. * DLD-FUNCTIONS/minmax.cc (Fmax, Fmin): Fix doc string. 2000-04-04 John W. Eaton * dynamic-ld.cc (octave_dynamic_loader::do_load): Undo previous change. 2000-04-03 John W. Eaton * dynamic-ld.cc (octave_dynamic_loader::do_load): Also fail with error message if we don't find the mangled function name in the file. 2000-03-31 John W. Eaton * oct-stream.cc (printf_value_cache::string_value): Return string matrices in a Matlab-compatible way. (printf_value_cache): Redesign the way list_exhausted works. * oct-fstrm.cc (octave_fstream::do_close): New function. * oct-stdstrm.cc (octave_istdiostream::do_close): Ditto. (octave_ostdiostream::do_close): Ditto. * c-file-ptr-stream.cc (c_file_ptr_buf::close): Ditto. (i_c_file_ptr_stream::close): Ditto. (o_c_file_ptr_stream::close): Ditto. * oct-prcstrm.cc (octave_iprocstream::do_close): Ditto. (octave_oprocstream::do_close): Ditto. (octave_iprocstram::~octave_iprocstram): Call do_close here. (octave_iprocstram::~octave_oprocstram): Likewise. * oct-stream.h (octave_base_stream::do_close): New virtual function. (octave_base_stream::close): If stream is open, call do_close. * c-file-ptr-stream.cc (c_file_ptr_buf::flush): New function. (c_file_ptr_buf::~c_file_ptr_buf): Use it. (c_file_ptr_buf::overflow): Ditto. (c_file_ptr_buf::sync): Ditto. 2000-03-30 John W. Eaton * oct-procbuf.cc (octave_procbuf::open): Make output streams line buffered. 2000-03-24 John W. Eaton * sighandlers.cc (my_friendly_exit): Prefix failure messages with panic instead of error. * c-file-ptr-stream.cc (c_file_ptr_buf::~c_file_ptr_buf): Avoid dereferencing NULL pointer. * oct-stream.cc (printf_format_list::add_elt_to_list, printf_format_list::process_conversion, printf_format_list::finish_conversion): New args, flags, fw, and prec. (printf_format_list::printf_format_list): Save more complete info. (printf_format_list::printme): Print flags, fw, and prec. (octave_base_stream::printf): Simplify. (do_printf_conv): Delete have_arg arg, since it is always true now. (octave_base_stream::do_printf): Handle case of no args and % directly instead of using do_printf_conv. (printf_value_cache::exhausted): Rename from no_more_values. (DO_PCT_CONVERSION): New macro (octave_base_streain::do_scanf, octave_base_streain::do_oscanf): Use it. (scanf_format_list::finish_conversion): `%' counts as a conversion too. Also don't forget to set type for it. (OCTAVE_SCAN_0): Delete. (OCTAVE_SCAN): Rename from OCTAVE_SCAN_1. (octave_base_stream::scanf, octave_base_stream::oscanf): Don't special-case number of conversions here. (octave_base_stream::oscanf, octave_base_stream::do_oscanf): Only cycle through fmt elements if the number of conversions is greater than 0. * oct-stream.h (scanf_format_list::next): New arg, `cycle'. (printf_format_list::next): New arg, `cycle'. (printf_format_list::last_elt_p): New function. (printf_format_elt): New fields fw, prec, and flags. Define copy constructor and assignment operator. (scanf_format_elt): Define copy constructor and assignment operator. 2000-03-23 John W. Eaton * oct-stream.cc (OCTAVE_SCAN_0, OCTAVE_SCAN_1): New macros. (do_scanf_conv, BEGIN_S_CONVERSION, BEGIN_CHAR_CLASS_CONVERSION, do_scanf, scanf, do_oscanf, do_oscanf, oscanf): Use them instead of calling istream::scan directly. (octave_scan): New function. (do_scanf_conv): Second arg is now scanf_format_elt instead of char*. Change all callers. * oct-procbuf.h, oct-procbuf.cc (octave_procbuf): Derive from c_file_ptr_buf instead of filebuf. * oct-stream.cc (octave_base_stream::printf): Use octave_format instead of ostream::form. Return number of characters written. 2000-03-22 John W. Eaton * oct-stream.cc (do_printf_conv): Use octave_format instead of ostream::form. Return number of characters written. (octave_base_stream::do_printf): Return number of characters written. * error.cc (verror, vwarning): Use octave_format instead of ostream::vform. * utils.cc (octave_format, octave_vformat): New functions. * cutils.c (octave_snprintf, octave_vsnprintf): New functions. * oct-lvalue.h (dummy_val): New static variable. (octave_lvalue::octave_lvalue): Use it to initialize val. * variables.cc (is_valid_function): Look in the global symbol table for functions. 2000-03-21 John W. Eaton * Makefile.in (LIBRARIES): Conditionally define. (libraries): Depend on $(LIBRARIES). (octave): Depend on $(LIBRARIES), not libraries. Also depend on stamp-prereq and stamp-oct-links. (all): Don't depend on stamp-prereq or stamp-oct-links. (liboctinterp.$(LIBEXT), liboctinterp.$(SHELXT)): Delete target before rebuilding. 2000-03-21 Ben Sapp : * Makefile.in (libraries): Depend only on library targets, not archive members. 2000-03-17 John W. Eaton * Makefile.in (objects): New target * c_file_ptr_stream.h, c_file_ptr_stream.cc: New files. * oct-stdstrm.h, oct-stdstrm.cc, oct-prcstrm.cc: Use c_file_ptr_buf, i_c_file_ptr_stream, and o_c_fie_ptr_stream instead of stdiobuf, istdiostream, and ostdiostream. * pr-output.cc (set_real_format, set_real_matrix_format, set_complex_format, set_complex_matrix_format, set_range_format): Do the right thing again for int, NaN, and Inf values. 2000-03-14 John W. Eaton * pr-output.cc (pr_plus_format): Rename from do_plus_format. Change all callers. (pr_float, pr_complex): New arg, scale. Handle scaling here. (float_format): New class for managing details of formatting floats. Use it instead of character string formats and the nonstandard form() function from the GNU iostream library. 2000-02-23 John W. Eaton * Makefile.in (clean): Also delete gendoc. 2000-02-18 James R. Van Zandt * load-save.cc (Vcrash_dumps_octave_core): Fix comment for this var. 2000-02-18 John W. Eaton * lex.l (handle_number): Don't transorm `[Dd]' to `e' if reading hex. 2000-02-11 John W. Eaton * Makefile.in (install-inc): Install files in $(octincludedir)/octave. (uninstall): Remove them from the correct directory too. * defaults.h, defaults.cc (Vlocal_ver_arch_lib_dir): New variable. * defaults.cc (set_default_local_ver_arch_lib_dir): New function. (install_defaults): Call it. (exec_path): Prepend the versioned form of the local arch lib directory to the standard path. * defaults.h.in (OCTAVE_LOCALVERARCHLIBDIR, OCTAVE_LOCALVERFCNFILEDIR, OCTAVE_LOCALVEROCTFILEDIR): Substitute these too. * toplev.cc (Foctave_config_info): Add them to the struct. 2000-02-08 John W. Eaton * toplev.cc (Foctave_config_info): Add MKOCTFILE_INCFLAGS to the struct. * oct-conf.h.in (OCTAVE_CONF_MKOCTFILE_INCFLAGS): Define. 2000-02-07 John W. Eaton * DLD-FUNCTIONS/balance.cc (Fbalance): Explicitly request conversion from Matrix to ComplexMatrix. * DLD-FUNCTIONS/qz.cc (Fqz): Likewise. * ov-re-mat.h (octave_matrix::complex_matrix_value): Explicitly request conversion from Matrix type. * ov-ch-mat.h (octave_char_matrix::matrix_value): Explicitly request conversion from charMatrix type. (octave_char_matrix::complex_matrix_value): Likewise. * ov-bool-mat.h (octave_bool_matrix::matrix_value): Likewise. (octave_bool_matrix::complex_matrix_value): Likewise. * ov-range.h (octave_range::complex_matrix_value): Explicitly request conversion from Matrix type. * ov-cx-mat.h, ov-re-mat.h: Explicitly request conversions from diagonal matrix types in constructors. * mappers.cc (ximag, xreal): Return double, not Complex. * error.cc (panic): Turn off buffering of error messages. Don't call flush_octave_stdout here, verror will do it for us. (verror): Don't call flush_octave_stdout if buffering error messages. * pt-except.cc (tree_try_catch_command::eval): Only restore buffer_error_message value (by running the unwind_protect element for it) if it has been saved. * help.cc (Ftype): Return value if nargout is NOT equal to zero. Delete unnecessary unwind_protect::begin_frame(). * toplev.cc (octave_config_info): Stuff lots of new config info in the struct. * oct-conf.h.in: Delete TARGET_HOST_TYPE. 2000-02-04 John W. Eaton * siglist.c: Include . * lex.l (is_plot_keyword): Add minimum match length in call to almost_match. * Makefile.in (%.df : %.cc): Don't pass -c to compiler. 2000-02-03 John W. Eaton * ov-base-mat.cc: Include pr-output.h here. * DLD-FUNCTIONS/rand.cc (curr_rand_dist): Return const char * instead of char *. * oct-fstrm.cc (octave_fstream::seek, octave_fstream::tell): Call pubseekoff instead of seekoff. * DLD-FUNCTIONS/dassl.cc (print_dassl_option_list): Use stream manipulators instead of GNU iostream-specific form function. * DLD-FUNCTIONS/fsolve.cc (print_fsolve_option_list): Ditto. * DLD-FUNCTIONS/lsode.cc (print_lsode_option_list): Ditto. * DLD-FUNCTIONS/quad.cc (print_quad_option_list): Ditto. * pr-output.cc (pr_scale_header): Ditto. * sighandlers.h: Include signal.h here. * sighandlers.cc: Not here. * utils.cc: Include setjmp.h, not csetjmp. * toplev.cc: Ditto. * sighandlers.cc: Include signal.h, not csignal. * pt-plot.h: Don't include csignal. * toplev.cc: Ditto. * oct-hist.cc: Ditto. * octave.cc: Ditto. * pager.cc: Ditto. * input.cc: Ditto. * help.cc: Ditto. * pt-plot.cc (send_to_plot_stream): Use operator== and substr method to do limited-length string comparison. * input.cc (generate_completion): Likewise. * ov-dld-fcn.cc (octave_dld_function::octave_dld_function): Likewise. * ov-usr-fcn.cc (octave_user_function::mark_as_system_fcn_file): Likewise. * utils.cc (check_preference): Expect exact string matches. * variables.cc (ignore_function_time_stamp): Likewise. * lex.l (whitespace_in_literal_matrix): Likewise. * mappers.cc (xconj, ximag, xreal): New functions. Use them in DEFUN_MAPPER calls. * defun-int.h (DEFUN_MAPPER_INTERNAL): Cast function pointer args to octave_mapper constructor. 2000-02-02 John W. Eaton * procstream.cc (procstreambase::procstreambase, procstreambase::open, procstreambase::close): Call std::ios::setstate, not set. * lex.l (plot_axes_token): Declare plot_axes as const char *. Declare tmp const char **. * oct-procbuf.h: Include fstream, not streambuf.h. * load-save.cc (Fsave): Call pubseekoff instead of seekoff. * oct-strstrm.cc (octave_base_strstream::tell): Likewise. (octave_base_strstream::seek): Likewise. * oct-stream.cc (octave_base_stream::read): Rename count to char_count. (octave_base_stream::do_gets): Likewise. * octave-stream.cc (octave_base_stream::write): Rename flt_fmt to ffmt. (octave_base_stream::read): Likewise. * TEMPLATE-INST/SLStack-sym.cc: Delete meaningless `extern template' declarations. * TEMPLATE-INST/Array-tc.cc: Ditto. * TEMPLATE-INST/Map-fnc.cc: Don't try to instantiate goodCHptr or CHptr_to_index here. * TEMPLATE-INST/Map-tc.cc: Likewise. * Map.h (CHNode::goodCHptr, CHNode::CHptr_to_index): Now member functions. Change all callers. * load-save.cc (read_binary_file_header): Declare magic_len `const'. * token.h (token::token (const token&), token::operator=): Delete unnecessary definitions. * oct-stream.cc (octave_stream::mode_as_string): Use std::ios::binary, not std::ios::bin. * load-save.cc (Fsave, Fload, save_user_variables): Likewise. * DLD-FUNCTIONS/qz.cc (Fqz): Use Array class instead of trying to create automatic int array with variable size. * variables.cc (F__dump_symbol_info__): Fix continuation char. * mappers.cc (Ftoupper): Likewise. * DLD-FUNCTIONS/besselj.cc (Fairy, Fbesselj): Likewise. * DLD-FUNCTIONS/chol.cc (Fchol): Likewise. * DLD-FUNCTIONS/det.cc (Fdet): Likewise. * DLD-FUNCTIONS/eig.cc (Feig): Likewise. * DLD-FUNCTIONS/gammainc.cc (gammainc): Likewise. * DLD-FUNCTIONS/givens.cc (givens): Likewise. * DLD-FUNCTIONS/hess.cc (hess): Likewise. * DLD-FUNCTIONS/inv.cc (inv): Likewise. * DLD-FUNCTIONS/log.cc (logm): Likewise. * DLD-FUNCTIONS/lu.cc (lu): Likewise. * DLD-FUNCTIONS/qr.cc (qr): Likewise. * DLD-FUNCTIONS/schur.cc (schur): Likewise. * DLD-FUNCTIONS/balance.cc (balance): Likewise. * DLD-FUNCTIONS/svd.cc (svd): Likewise. * DLD-FUNCTIONS/syl.cc (syl): Likewise. * DLD-FUNCTIONS/expm.cc (Fexpm): Likewise. * token.h (token::token_type, token::end_tok_type, token::plot_tok_type): Delete extraneous comma from enum decls. * load-save.cc (load_save_format): Likewise. * pt-idx.cc (tree_index_expression::tree_index_expression): Delete default arg values. * oct-fstrm.cc (octave_fstream::octave_fstream): Likewise. * oct-stream.cc (octave_stream::octave_stream): Likewise. * siglist.h, siglist.c: New files. * Makefile.in: Add them to the appropriate lists. * siglist.c (sys_siglist): Move definition here from sighandlers.cc. * siglist.h (sys_siglist): Move declaration here from sighandlers.h. * ov.h, ov-bool.h, ov-bool-mat.h (bool_matrix_value): Delete unnecessary arg. * ov.h (octave_value::do_multi_index_op): Rename from do_index_op. * ov-fcn.h (octave_function::is_system_fcn_file): Now const. * Map.cc (index_to_CHptr): Now a macro. (CHMap::hash): Now a member function. * defun-int.h (UNDERSCORIFY): New macro. (DEFCONST_INTERNAL, DEFCONSTX_INTERNAL): Use it. * data.cc (Fis_list): Fix continuation char. * defaults.cc (IMAGEPATH): Likewise. * Map.cc (CHptr_to_index, goodCHptr): Delete static decl. * ov.h (unary_op, binary_op, assign_op): Prepend `op_' to elts. Change all usses * All source files: Sprinkle with std:: qualifier as needed. 2000-01-31 John W. Eaton * sighandlers.cc (install_signal_handlers): Add std:: qualifier for set_net_handler. * All source files: Include iostream, fstream, strstream, etc. as needed instead of using forward declarations for these classes. 2000-01-30 John W. Eaton * input.cc (input_event_hook, Finput_event_hook): New functions. (hook_fcn, user_data): New static variables. 2000-01-28 John W. Eaton * pt-except.cc (do_catch_code): Don't do anything special for tree_return_command::returning, or tree_break_command::breaking. * error.cc (vwarning): New function. (warning): Use it instead of calling verror. * oct-stream.cc (octave_base_stream::oscanf): Result is now always nconv+1 elements. Return count of successful conversions in last element. * file-io.cc (Ffscanf, Fsscanf, Fscanf): Fix doc string. * pt-except.cc (do_catch_code): Unwind-protect buffer_error_messages. Be sure to run all unwind-protects before returning. (tree_try_catch_command::eval): Add do_catch_code cleanup function to unwind-protect stack before resetting buffer_error_messages. Use unwind-protect to save and restore buffer_error_messages. If there is no catch code, discard the cleanup function and run the unwind-protect for buffer_error_messages. * error.cc (bind_global_error_variable): Avoid dereferencing error_message_buffer if it is NULL. * parse.y (evaluating_function_body): New global flag. * ov-usr-fcn.cc (octave_user_function::do_index_op): Protect and set it here. * parse.y (make_break_command, make_return_command): Check it here. * error.cc (warning_state): New global flag. (warning): Set it here. * lex.l (reset_parser): Clear it here. * parse.y (fold): Check it here. 2000-01-27 John W. Eaton * pt-walk.h (tree_walker::visit_do_until_command): New pure virtual. * pt-pr-code.cc (tree_print_code::visit_do_until_command): New function. * pt-loop.h (tree_do_until_command): New class. (tree_while_command::expr, tree_while_command::list): Now protected instead of private. * parse.y (make_do_until_command): New function. (loop_command): Recognize do-until statement. (DO, UNTIL): New tokens. * input.cc (match_sans_spaces): Require non-blank part of test string to match standard string exactly. 2000-01-26 John W. Eaton * oct-stream.h (scanf_format_elt::char_class): New struct elt. Add arg to constructor. (scanf_format_elt::special_conversion): New enum. * oct-stream.cc (scanf_format_list::add_elt_to_list): New arg, char_class. Pass it to scanf_format_elt constructor. (scanf_format_list::scanf_format_list): Create separate list elements for whitespace and literal conversions. (expand_char_class): New function. (scanf_format_list::finish_conversion): Extract character class (not including the delimiting brackets) and expand the list of characters. Pass the result to add_elt_to_list. (scanf_format_list::all_character_conversions): Also accept '^', scanf_format_elt::literal_conversion, and scanf_format_elt::whitespace_conversion types too. (DO_WHITESPACE_CONVERSION, BEGIN_CHAR_CLASS_CONVERSION, BEGIN_C_CONVERSION, BEGIN_S_CONVERSION, DO_LITERAL_CONVERSION): New macros. (octave_base_stream::do_scanf, octave_base_stream::do_oscanf): Use them to avoid code duplication. Handle whitespace, literal text, and character class conversions. (octave_base_stream::oscanf): Loop over all format list elements, not just the first nconv elements. Clear status flags on is for all streams. 2000-01-25 John W. Eaton * xdiv.cc (result_ok): Just check value of info. (solve_singularity_warning): New function. (xleftdiv, xdiv): Pass pointer to solve_singularity_warning to solve function. * lex.l (handle_identifier): Set next_tok_is_eq if we are looking at `=', but not if we are looking at `=='. * pt-pr-code.cc (tree_print_code::visit_unwind_protect_command): Print `unwind_protect_cleanup', not `cleanup_code'. * pager.cc (octave_pager_buf::flush_current_contents_to_diary): New function. (octave_pager_stream::flush_current_contents_to_diary): Ditto. (close_diary_file): Use the new octave_pager_stream function to try to flush the current buffer to the diary when it is closed. * variables.cc (Fexist): Return 6 for built-in constants. * pt-plot.cc (Fgshow): Don't append " " after last arg. (Fgset): Likewise. 2000-01-23 John W. Eaton * ov-base-mat.h (octave_base_matrix::length): Return 0 for empty arrays. 2000-01-20 John W. Eaton * DLD-FUNCTIONS/time.cc (Fstrptime): New function. * load-save.cc (Fsave): Add missing else. 2000-01-17 John W. Eaton * DLD-FUNCTIONS/gammainc.cc (Fgammainc): Texinfoize doc string. * ov-typeinfo.cc (Ftypeinfo): Ditto. * parse.y (Vwarn_future_time_stamp): Ditto. * DLD-FUNCTIONS/minmax.cc (Fmax, Fmin): Ditto. * ov-usr-fcn.cc (Fva_arg, Fva_start, Fvr_val): Ditto. * defaults.cc (VOCTAVE_HOME, Frehash): Ditto. * toplev.cc (Fwarranty, Fcasesen): Ditto. * utils.cc (Fdo_string_escapes, Ffile_in_loadpath): Ditto. * variables.cc (F__dump_symtab_info__, F__dump_symbol_info__): Ditto. * ov-list.cc (Flist, Fappend, Fnth, Freverse, Fsplice): Ditto. * input.cc (Fread_readline_init_file): Ditto. * file-io.cc (Fis_stream): Ditto. * ov-cell.cc (Fiscell, Fcell): Ditto. * pt-assign.cc (Vprint_rhs_assign_val): Ditto. * pt-decl.cc (Vinitialize_global_variables): Ditto. * symtab.cc (Vvariables_can_hide_functions): Ditto. * pt-plot.cc (Fgraw, Fgset, Fgshow, Vgnuplot_command_plot, Vgnuplot_command_replot, Vgnuplot_command_splot, Vgnuplot_command_using, Vgnuplot_command_with, Vgnuplot_command_axes, Vgnuplot_command_title, Vgnuplot_command_end): Texinfoize doc strings. * oct-procbuf.cc (__kluge_procbuf_delay__): Rename from kluge_procbuf_delay. Texinfoize doc string. 2000-01-13 John W. Eaton * parse.y (gobble_leading_whitespace): Discard first space character after consecutive comment characters. * lex.l (grab_help_text): Ditto. * lex.l (Vwhitespace_in_literal_matrix, Vwarn_separator_insert, Vwarn_single_quote_string): Texinfoize doc string. 2000-01-11 John W. Eaton * ov.h, ov.cc (octave_value::column_vector_value, octave_value::row_vector_value, octave_value::complex_column_vector_value, octave_value::complex_row_vector_value): New functions. (octave_value::vector_value): Now returns Array. (octave_value::complex_vector_value): Now returns Array. Sprinkle conversions where necessary. * ov.cc (Vprefer_column_vectors): Now static. * ov.h (octave_value (const ComplexRowVector&), octave_value (const ComplexColumnVector&), octave_value (const RowVector&), octave_value (const ColumnVector&)): Delete second arg. Change all callers. * oct-obj.h (octave_value_list (const RowVector&), octave_value_list (const ColumnVector&), octave_value_list (const ComplexRowVector&), octave_value_list (const ComplexColumnVector&)): Likewise. * ov-cx-mat.h, ov-cx-mat.cc (octave_complex_matrix (const ComplexRowVector&), (octave_complex_matrix (const ComplexColumnVector&)): Delete second arg, simply create object with orientation corresponding to vector arg. Move constructors to class decl. * ov-re-mat.h, ov-re-mat.cc (octave_matrix (const RowVector&), (octave_matrix (const ColumnVector&)): Delete second arg, simply create object with orientation corresponding to vector arg. Move constructors to class decl. 2000-01-07 Ben Sapp * mappers.cc (Fconj, Ferf, Ferfc, Fgamma, Fimag, Flgamma, Flog10, Freal, Fround): Add @seealso{...} to doc strings. 2000-01-06 John W. Eaton * oct-stream.cc (do_scanf): Do the right thing again for character conversions. * help.cc (display_help_text): Also strip out leading spaces before Texinfo @-commands before sending doc string to makeinfo. (display_help_text): Improve format of `See also' string. 2000-01-05 John W. Eaton * help.cc (display_help_text): Pass a definition for @seealso through the filter. 1999-12-22 John W. Eaton * lex.l (Vwarn_single_quote_string): New variable. (syms_of_lex): DEFVAR it. (warn_single_quote_string): New function. (gripe_single_quote_string): New function. Use new stuff to allow warnings for code that uses single quote characters to introduce string constants. 1999-12-20 John W. Eaton * mkbuiltins: Add #undef quad to generated file. 1999-12-15 John W. Eaton * lex.l (Vwarn_separator_insert): New variable. (syms_of_lex): DEFVAR it. (warn_separator_insert): New function. (maybe_warn_separator_insert): New function. Use new stuff to allow warnings for code that might result in auto-insertion of commas or semicolons, depending on the value of whitespace_in_literal_matrix. * parse.y (Fsource): Record function file name here too. 1999-12-13 John W. Eaton * variables.cc (link_to_global_variable): If the local symbol is not a variable, don't bother to clear it. Instead, just redefine it by aliasing to the global symbol. 1999-11-23 John W. Eaton * DLD-FUNCTIONS/balance.cc (Fbalance): Texinfoize doc string. * DLD-FUNCTIONS/det.cc (Fdet): Ditto. * DLD-FUNCTIONS/eig.cc (Feig): Ditto. * DLD-FUNCTIONS/givens.cc (Fgivens): Ditto. * DLD-FUNCTIONS/inv.cc (Finv): Ditto. * DLD-FUNCTIONS/chol.cc (Fchol): Ditto. * DLD-FUNCTIONS/hess.cc (Fhess): Ditto. * DLD-FUNCTIONS/lu.cc (Flu): Ditto. * DLD-FUNCTIONS/qr.cc (Fqr): Ditto. * DLD-FUNCTIONS/schur.cc (Fschur): Ditto. * DLD-FUNCTIONS/svd.cc (Fsvd): Ditto. * DLD-FUNCTIONS/expm.cc (Fexpm): Ditto. * DLD-FUNCTIONS/log.cc (Flogm, Fsqrtm): Ditto. * DLD-FUNCTIONS/syl.cc (Fsyl): Ditto. * DLD-FUNCTIONS/pinv.cc (Fpinv): Ditto. * DLD-FUNCTIONS/qz.cc (Fqz): Ditto. * DLD-FUNCTIONS/dassl.cc (Fdassl, Fdassl_options): Ditto. * DLD-FUNCTIONS/lsode.cc (Flsode, Flsode_options): Ditto. * data.cc (Flength, Fsize, Fisempty): Ditto. * sysdep.cc (Fkbhit): Ditto. * input.cc (Fkeyboard, Finput): Ditto. * variables.cc (ans): Ditto. * pr-output.cc (Fdisp, Fformat): Ditto. * ov.cc (Vprint_answer_id_name): Ditto. * defaults.cc (IMAGEPATH): Ditto. * error.cc (Ferror, Fwarning, Fusage, error_text, beep_on_error): Ditto. * load-save.cc (Fload, Fsave, Vdefault_save_format, Vsave_precision): Ditto. * file-io.cc (Ffflush, Ffopen, Ffclose, Ffputs, Ffgetl, Ffgets, Ffprintf, Fsprintf, Fscanf, Ffscanf, Fsscanf, Ffread, Ffwrite, Ffseek, Fftell, Ffeof, Fferror, Ffreport, Ftmpnam, Vstdin_file, Vstdout_file, Vstderr_file, SEEK_SET, SEEK_CUR, SEEK_END): Ditto. * pager.cc (Vpager_binary, Vpage_output_immediately, Vpage_screen_output, Fmore): Ditto. 1999-11-21 John W. Eaton * utils.cc (Vtreat_neg_dim_as_zero): Texinfoize doc string. * DLD-FUNCTIONS/find.cc (Ffind): Ditto. * DLD-FUNCTIONS/rand.cc (Frand, Frandn): Ditto. * DLD-FUNCTIONS/sort.cc (Fsort): Ditto. * mappers.cc (Fisinf, Fisnan, Ffinite): Ditto. * data.cc (Fall, Fany, Fdiag, Fones, Fzeros, Feye, Flinspace): Ditto. * defaults.cc (Vloadpath, Vdefault_loadpath): Ditto. * parse.y (Feval, Ffeval, Vdefault_eval_print_flag, Vwarn_missing_semicolon, Vwarn_function_name_clash, Fsource): Ditto. * ov-usr-fcn.cc (Vmax_recursion_depth, Vdefault_return_value, Vdefine_all_return_values, Vreturn_last_computed_value): Ditto. * ov.cc (Vok_to_lose_imaginary_part, Vdo_fortran_indexing, Vprefer_column_vectors, Vresize_on_range_error, Vwarn_divide_by_zero): Ditto. * pt-stmt.cc (Vsilent_functions): Ditto. * variables.cc (Vignore_function_time_stamp): Ditto. * dynamic-ld.cc (Vwarn_reload_forces_clear): Ditto. 1999-11-20 John W. Eaton * DLD-FUNCTIONS/fft.cc (Ffft): Texinfoize doc string. * DLD-FUNCTIONS/ifft.cc (Fifft): Ditto. * DLD-FUNCTIONS/fft2.cc (Ffft2): Ditto. * DLD-FUNCTIONS/ifft2.cc (Fifft2): Ditto. * DLD-FUNCTIONS/filter.cc (Ffilter): Ditto. * DLD-FUNCTIONS/quad.cc (Fquad, Fquad_options): Ditto. * DLD-FUNCTIONS/colloc.cc (Fcolloc): Ditto. * DLD-FUNCTIONS/fsolve.cc (Ffsolve, Ffsolve_options): Ditto. * defaults.cc (Veditor): Ditto. * pt-plot.cc (Vautomatic_replot, Vgnuplot_binary, Vgnuplot_has_frames, Vgnuplot_has_multiplot, Fclearplot, Fcloseplot, Fpurge_tmp_files, Fishold, Fhold): * Makefile.in (parse.cc): Expect 11 shift/reduce conflicts now. 1999-11-19 John W. Eaton * parse.y (Vwarn_assign_as_truth_value, Vwarn_variable_switch_label): Texinfoize doc strings. * DLD-FUNCTIONS/pinv.cc (Fpinv): Texinfoize doc string. * defun-int.h (DEFUN_DLD_INTERNAL): New macro. * defun-dld.h [MAKE_BUILTINS] (DEFUN_DLD): Simply expand to DEFUN_DLD_INTERNAL. * mkbuiltins: Generate code to define DEFUN_DLD_INTERNAL. * mkgendoc: Likewise. * Makefile.in (gendoc.o): Don't optimize when creating gendoc. (%.dc : %.cc): Delete rule. * pt-decl.cc (Vdefault_global_variable_value): Texinofize doc string. * variables.cc (Fclear, Fdocument, Fexist, Fis_global, Fwho): Ditto. * help.cc (Ftype, Fwhich): Ditto. * ov.cc (Vstruct_levels_to_print, Vimplicit_str_to_num_ok): Ditto. * data.cc (Fis_struct, Fstruct_elements, Fstruct_constains): Ditto. * strfns.cc (Fisstr, Fsetstr): Ditto. * pt-mat.cc: (Fimplicit_num_to_str_ok, Fstring_fill_char): Ditto. * utils.cc (Fundo_string_escapes): Ditto. * mappers.cc: (Fisalnum, Fisalpha, Fisascii, Fiscntrl, Fisdigit, Fisgraph, Fislower, Fisprint, Fispunct, Fisspace, Fisupper, Fisxdigit, Ftoascii, Ftolower, Ftoupper): Ditto. 1999-11-18 John W. Eaton * syscalls.cc (symbols_of_syscalls): Use DEFCONSTX to define Octave constants for C macros like O_WRONLY. * oct-lvalue.cc (octave_lvalue::set_index): Disallow expressions like x(i)(j) = rhs. 1999-11-17 John W. Eaton * symtab.cc (symbol_record::type_as_string): New function. * symtab.cc (symbol_record::which): New functions. * help.cc (do_which): New functions. (Fwhich): Use them. * help.cc (help_from_symbol_table, help_from_file): New functions. (builtin_help): Use them. * help.cc (do_type): New function. (symbol_record::type): New function. (Ftype): Use them. * help.cc (print_symbol_type): Delete. * symtab.cc (symbol_table::name_list): Delete count arg. (symbol_table::symbol_list): Likewise. (symbol_table::glob): Likewise. Also return Array instead of symbol_record **. Change all callers. * help.cc (names, display_symtab_names): Delete count arg. * help.cc (print_symbol_type, Ftype): No longer need to look up fcn_file_name in the loadpath. * help.cc (print_symbol_type): Handle dld functions. (help_from_symbol_table, help_from_file): New functions. (builtin_help): Use them. 1999-11-16 John W. Eaton * ov-cell.cc (Fiscell, Fcell): New Functions. (octave_cell::do_index_op): New function. * utils.cc (get_dimensions): Move here from data.cc and make extern. (Vtreat_neg_dim_as_zero, treat_neg_dim_as_zero): Likewise. (symbols_of_utils): New function. * data.cc (fill_matrix (const octave_value_list&, double, const char*)): New function. (Fones, Fzeros): Use it to avoid some code duplication. 1999-11-15 John W. Eaton * pt-cell.h, pt-cell.cc, ov-cell.h, ov-cell.cc, Cell.h, Cell.cc: New files. * Makefile.in: Add them to the appropriate lists. * pt-walk.h (visit_cell (tree_cell&): New pure virtual. * pt-pr-code.cc (tree_print_code::visit_cell (tree_cell&)): New function. * TEMPLATE-INST/Array-tc.cc: Instantiate 2D arrays of octave_value objects. * pt-all.h: Include pt-cell.h. * ov.h, ov.cc (octave_value::is_cell, octave_value::cell_value): New functions. * ov-base.h, ov-base.cc (octave_value::is_cell, octave_value::cell_value): Provide defaults. * lex.h, lex.l: Handle `{' and `}' tokens (for cell arrays). (bracketflag): Rename from braceflag. (handle_close_bracket): Rename from handle_close_brace. (class bracket_brace_paren_nesting_level): Rename from brace_paren_nesting_level. (bracket_brace_paren_nesting_level::bracket, bracket_brace_paren_nesting_level::is_bracket): New functions to keep count of nesting level for `[' and `]'. (bracket_brace_paren_nesting_level::brace, bracket_brace_paren_nesting_level::is_brace): Now keeps count of nesting level for `{' and `}'. * parse.y (tree_cell_type): New type. Give '{' the same precedence and associativity as '(' and '.' (matrix_rows, matrix_rows1): Rename from rows, rows1. (cell, cell_rows, cell_rows1): New non-terminals. (cell_or_matrix_row): Rename from matrix_row. (primary_expr): Accept cell here. (postfix_expr): Allow indexing using '{' arg_list '}'. (finish_cell): New function. 1999-11-12 John W. Eaton * utils.cc (jump_to_top_level): No longer declared extern "C". * cutils.c (octave_strcasecmp, octave_strncasecmp): New functions. * utils.cc (almost_match): Call octave_strncasecmp instead of calling strncasecmp directly. 1999-11-10 John W. Eaton * parse.y: Don't define warn_reload_forces_clear here. * Makefile.in (DISTFILES): Include DOCSTRINGS. 1999-11-05 John W. Eaton * sighandlers.cc (install_signal_handlers): Don't install sigwinch_handler. * oct-iostrm.h (octave_istream::eof, octave_ostream::eof): Provide implementation for these. * oct-stream.cc (octave_base_stream::do_scanf): The stdin stream is only special if we are interactive. (octave_base_stream::scanf): Ditto. (octave_base_stream::do_oscanf): Ditto. (octave_base_stream::oscanf): Ditto. * ov.h (octave_value::is_stream): New predicate. * ov-file.h (octave_file::is_stream): Return true. * file-io.cc (Fis_stream): New function. * ov-file.h (class octave_file): stream is now an object instead of pointer. * ov-file.cc (octave_file::print_raw): Handle stream as object instead of pointer. Also print stream status. * ov-base.cc (octave_base_value::stream_value): Return object instead of pointer. * ov.cc (octave_value::stream_value): Return object instead of pointer. (octave_value::octave_value (const octave_stream&)): Take const reference instead of pointer arg. * TEMPLATE-INST/Array-os.cc: Instantiate Arrays of octave_stream objects, not pointers to them. * OPERATORS/op-fil-b.cc: Cope with octave_stream class changes. * OPERATORS/op-fil-bm.cc: Likewise. * OPERATORS/op-fil-cm.cc: Likewise. * OPERATORS/op-fil-cs.cc: Likewise. * OPERATORS/op-fil-lis.cc: Likewise. * OPERATORS/op-fil-m.cc: Likewise. * OPERATORS/op-fil-rec.cc: Likewise. * OPERATORS/op-fil-s.cc: Likewise. * OPERATORS/op-fil-str.cc: Likewise. * file-io.cc: Likewise. * syscalls.cc (Fdup): Likewise. * oct-fstrm.cc, oct-fstrm.h, oct-iostrm.cc, oct-iostrm.h, oct-prcstrm.cc, oct-prcstrm.h, oct-stdstrm.cc, oct-stdstrm.h, oct-stream.cc, oct-stream.h, oct-strstrm.cc, oct-strstrm.h: Rewrite to allow octave_stream objects to be used like values instead of having to use pointers. 1999-11-03 John W. Eaton * oct-stream.cc (octave_base_stream::do_scanf): If it looks like we have a matching failure, then reset the failbit in the stream state. (octave_base_stream::do_oscanf): Likewise. 1999-11-02 Ben Sapp * help.cc (Fhelp): Texinfoize doc string. * input.cc (Fecho, Fcompletion_matches): Ditto. * oct-hist.cc (Fedit_history, Fhistory, Frun_history): Ditto. * pager.cc (Fdiary): Ditto. * sysdep.cc (Fclc): Ditto. * toplev.cc (Fquit, Fatexit): Ditto. 1999-11-02 John W. Eaton * lex.l (yywrap): No longer static. (have_continuation): Declare input character as int, not char, so comparison to EOF will work. 1999-11-01 John W. Eaton * defun.cc (print_usage): Use display_help_text instead of sending help message directly to octave_stdout. 1999-10-29 John W. Eaton * defun-dld.h (INSTALL_DLD_FCNS, INSTALL_DLD_FCN): Delete definitions. * DLD-FUNCTIONS/dassl.cc: Don't use INSTALL_DLD_FCN or INSTALL_DLD_FCNS macros. They are not necessary with the new code in dynamic-ld.cc. * DLD-FUNCTIONS/lsode.cc: Ditto. * DLD-FUNCTIONS/fsolve.cc: Ditto. * DLD-FUNCTIONS/quad.cc: Ditto. * DLD-FUNCTIONS/time.cc: Ditto. * DLD-FUNCTIONS/besselj.cc: Ditto. * DLD-FUNCTIONS/getgrent.cc: Ditto. * DLD-FUNCTIONS/getpwent.cc: Ditto. * DLD-FUNCTIONS/inv.cc: Ditto. * DLD-FUNCTIONS/log.cc: Ditto. * DLD-FUNCTIONS/minmax.cc: Ditto. * DLD-FUNCTIONS/rand.cc: Ditto. * dynamic-ld.cc, dynamic-ld.h: Major rewrite to allow reloading of dynamically linked functions. * symtab.cc (symbol_record::replace_all_defs): Don't allow top definition to be NULL. (symbol_table::clear): Allow dynamically linked functions to be cleared. * symtab.h (TYPE): New enum value, DLD_FUCTION. (symbol_type): Now 8 bits wide. (SYMTAB_ALL_TYPES): Include DLD_FUNCTION. (symbol_record::symbol_def::is_function): Also recognize dld functions. (symbol_record::symbol_def::is_dld_function): New function. (symbol_record::is_dld_function): Ditto. * defun.cc (install_dld_function): New function. * defun-int.h: Provide declaration here. (octave_dld_fcn_installer): New typedef. (DEFINE_FUN_INSTALLER_FUN): Installer function now takes an oct_shlib object as an arg. Allow installation of a function to happen more than once. * octave.cc (initialize_error_handlers): Call set_liboctave_warning_handler here too. * ov-builtin.h (is_builtin_function): Return true. Data member is now protected, not private. * ov-fcn.h (is_dynamically_loaded_function): New predicate. (unload): New function. Data members are now protected, not private. * ov.h (is_builtin_function, is_dld_function): New predicates. * ov-base.h (is_builtin_function, is_dld_function): Ditto. * parse.y (Vwarn_reload_forces_clear): New static flag. (warn_reload_forces_clear): New function. (symbols_of_parse): DEFVAR warn_reload_forces_clear. * variables.cc (Fclear): Look for dld functions too. * ov-dld-fcn.cc, ov-dld-fcn.h: New files. * Makefile.in (OV_INCLUDES, OV_SRC): Add them to the lists. * Makefile.in (DEFVAR_PATTERN): Also match DEFCONSTX. 1999-10-26 John W. Eaton * DLList.h, DLList.cc: New files. * Makefile.in (INCLUDES, DIST_SRC): Add them to the lists. * DLD-FUNCTIONS/lsode.cc (Flsode): Be sure to call unwind_protect::run_frame before returning. * DLD-FUNCTIONS/quad.cc (Fquad): Likewise. * DLD-FUNCTIONS/fsolve.cc (Ffsolve): Likewise. * DLD-FUNCTIONS/dassl.cc (Fdassl): Likewise. * load-save.cc (read_mat_ascii_data): When reading from tmp_stream, check its state, not the state of is. * defun-dld.h (INSTALL_DLD_FCN, INSTALL_DLD_FCNS): New macros. * DLD-FUNCTIONS/dassl.cc: Use them. * DLD-FUNCTIONS/lsode.cc: Ditto. * DLD-FUNCTIONS/fsolve.cc: Ditto. * DLD-FUNCTIONS/quad.cc: Ditto. * DLD-FUNCTIONS/time.cc: Ditto. * DLD-FUNCTIONS/besselj.cc: Ditto. * DLD-FUNCTIONS/getgrent.cc: Ditto. * DLD-FUNCTIONS/getpwent.cc: Ditto. * DLD-FUNCTIONS/inv.cc: Ditto. * DLD-FUNCTIONS/log.cc: Ditto. * DLD-FUNCTIONS/minmax.cc: Ditto. * DLD-FUNCTIONS/rand.cc: Ditto. * data.cc (Flinspace): Let linspace functions handle errors. * mkgendoc (print_doc_string): Handle quoted names. * file-io.cc (symbols_of_file_io): Use DEFCONSTX for SEEK_SET, SEEK_CUR, and SEEK_END. * defun.h (DEFCONST): Just pass name, defn, and doc to DEFCONST_INTERNAL. (DEFCONSTX): Likewise, pass name, defn, and doc to DEFCONSTX_INTERNAL. * defun-int.h [MKBUILTINS] (DEFCONST_INTERNAL): Likewise, pass name, defn, and doc to XDEFCONST_INTERNAL. [MKBUILTINS] (DEFCONSTX_INTERNAL): New macro. (INSTALL_CONST): New macro. [! MKBUILTINS] (DEFCONST_INTERNAL): Use it to handle details here. [! MKBUILTINS] (DEFCONSTX_INTERNAL): Ditto. * mkgendoc: Fix definition of XDEFCONST_INTERNAL to match. * mkbuiltins: Ditto. * mkdefs: Match spaces before BEGIN_INSTALL_BUILTIN. * Makefile.in (DEFUN_PATTERN): Also match DEFUN_MAPPER. 1999-10-26 Ben Sapp * data.cc (VI, VInf, VJ, VNaN, Ve, Veps, Vfalse, Vi, Vinf, Vj, Vnan, Vpi, Vrealmax, Vrealmin): Texinfoize doc strings. * mappers.cc (Fabs, Facos, Facosh, Fangle, Farg, Fasin, Fasinh, Fatan, Fatanh, Fceil, Fconj, Fcos, Fcosh, Ferf, Ferfc, Fexp, Ffinite, Ffix, Ffloor, Fgamma, Fimag, Flgamma, Flog, Flog10, Freal, Fround, Fsign, Fsin, Fsinh, Fsqrt, Ftan, Ftanh): Ditto. 1999-10-23 Ben Sapp * data.cc (Fis_matrix): Texinfoize doc string. * ov.cc (Vpropagate_empty_matrices): Ditto. * pt-mat.cc: (Vempty_list_elements_ok): Ditto. * pr-output.cc (Vfixed_point_format, Voutput_max_field_width, Voutput_precision, Vprint_empty_dimensions, Vsplit_long_rows): Ditto. 1999-10-22 John W. Eaton * ov-usr-fcn.cc (octave_user_function::do_index_op): If Vmax_recursion_depth is exceeded, call unwind_protect::run_frame before returning. 1999-10-21 John W. Eaton * cutils.c (do_octave_usleep): Handle useconds > 1e6. * variables.h (is_valid_function): Provide default values for the string argument. * symtab.cc (variable_reference): Maybe print warning (or error) about variables that hide functions of the same name. (symbol_record::define (const octave_value&, unsigned int)): Ditto. (Vvariables_can_hide_functions): New static variable. (variables_can_hide_functions, symbols_of_symtab): New functions. * cutils.c: New file. * Makefile.in (SOURCES): Add it to the list. * utils.h: Declare octave_usleep here. * dirfns.cc (Fls): Simply all octave_usleep. * oct-procbuf.cc (octave_procbuf::open): Ditto. * sysdep.cc (Fusleep): Ditto. * toplev.cc (run_command_and_return_output): Ditto. 1999-10-20 John W. Eaton * data.cc (make_diag (const octave_value&, const octave_value&)): Delete special cases for scalars and simply attempt conversion of first arg to a matrix value. If that fails, we will still see an error message. * Makefile.in (DISTFILES): Add mkgendoc to the list. 1999-10-19 John W. Eaton * Makefile.in (stmp-pic): New target. ($(PICOBJS)): Depend on stmp-pic, not pic. * ov.h (get_rep): New function. * help.cc (display_help_text): Pass definitions for VERSION, OCTAVE_HOME, and TARGETHOSTTYPE to makeinfo. * DLD-FUNCTIONS/getgrent.cc: Texinfoize all doc strings. * DLD-FUNCTIONS/getpwent.cc: Ditto. * DLD-FUNCTIONS/getrusage.cc: Ditto. * DLD-FUNCTIONS/time.cc: Ditto. * defaults.cc (EXEC_PATH, OCTAVE_VERSION): Texinfoize doc strings. * dirfns.cc (Fcd, Fls, Fpwd, Freaddir, Fmkdir, Frmdir, Frename, Fglob, Ffnmatch): Ditto. * file-io.cc (Fpopen, Fpclose, Fumask): Ditto. * sysdep.cc (Fgetenv, Fputenv, Fpause, Fsleep, Fusleep, Fisieee, Ftilde_expand): Ditto. * toplev.cc (Fcomputer, Fsystem, Foctave_config_info): Ditto. * utils.cc (Ffile_in_path): Ditto. * syscalls.cc (Fdup2, Fexec, Ffcntl, Ffork, Fgetpgrp, Fgetpid, Fgetppid, Fgetegid, Fgetgid, Fgeteuid, Fgetuid, Fmkfifo, Fpipe, Fstat, Funlink, Fwaitpid, F): Ditto. (Flstat): Refer to stat for doc. * help.cc (looks_like_texinfo): New function. (display_help_text): Use it to see if the doc string looks like Texinfo source. If so, use makeinfo to format the text before displaying it. * mkgendoc: New script. * Makefile.in: Use it to create gendoc.cc, which is compiled and run to create DOCSTRINGS file from sources. 1999-10-18 John W. Eaton * help.cc (help_from_info): Print `unable to find info' message if try_info returns 127; otherwise, print `not indexed' message. Don't sleep after printing `not indexed' message. 1999-10-14 John W. Eaton * parse.y (fold (tree_unary_expression *)): New function. (make_prefix_op, make_postfix_op): Use it. 1999-10-13 John W. Eaton * Makefile.in (oct-gperf.h): Ask for ANSI-C output from gperf (requires gperf-2.7 or later). * sighandlers.cc (sigwinch_handler): New function. (install_signal_handlers): Install it. Thu Sep 23 19:49:36 1999 John W. Eaton * toplev.cc (Fsystem): For async case, use execl instead of system, avoiding the need to exit after executing the subprocess. Thu Sep 9 17:09:23 1999 John W. Eaton * oct-stream.cc (get_size): Allow zero values. (get_size): New arg, one_elt_size_spec. (do_scanf_conv): New arg, `conv_count'. Change instantiation requests and all callers. (octave_base_stream::do_scanf): Improve scanning of strings. (octave_base_stream::do_oscanf): Remove size limit on %s conversions. * oct-stream.cc (scanf_format_list::all_character_conversions): Don't count %p as a character conversion. Tue Sep 7 08:31:04 1999 John W. Eaton * pr-output.cc (set_real_matrix_format, set_complex_matrix_format): Move check for fixed_point_format ahead of check for int_or_inf_or_nan. Thu Sep 2 11:54:51 1999 John W. Eaton * oct-obj.cc (make_argv): Correctly handle empty strings as args. Fri Aug 20 08:17:52 1999 John W. Eaton * DLD-FUNCTIONS/quad.cc (quad): Delete unused label. * unwind-prot.cc (saved_variable::~saved_variable): Don't try to delete gen_ptr_value here. Mon Aug 16 21:34:33 1999 John W. Eaton * lex.l (next_token_is_sep_op): New function. (handle_close_brace, maybe_unput_comma): Use it. (have_continuation): Also handle CRLF here. Wed Aug 11 16:06:57 1999 John W. Eaton * file-io.cc (Ffopen): Make fopen ("filename") work and imply that MODE = "r". Wed Jul 21 15:38:52 1999 John W. Eaton * help.cc (display_names_from_help_list): Sort names before listing them. (print_symbol_type, Ftype): Also handle built-in constants. (LIST_SYMBOLS): Correct call to symbol_table::name_list. (simple_help): List constants here too. List constants and variables before functions, not after. Sort names before listing them. * variables.cc (do_who): Display built-in constants in a separate section. * error.cc (bind_global_error_variable, clear_global_error_variable): Call bind_builtin_constant, not bind_builtin_variable to set __error_text__. * octave.cc (intern_argv): Likewise, for argv and __argv__. * defun.cc (install_builtin_constant): Move function guts to bind_builtin_constant in variables.cc. * variables.cc (bind_builtin_constant): New function. * symtab.cc (symbol_record::define, symbol_record::variable_reference): Handle constants the same as functions. (symbol_record::link_to_builtin_variable): New function. (symbol_record::define_builtin_const): New function. (symbol_record::define_as_fcn): Delete unused function. (symbol_record::read_only_error): Handle constants the same as variables. * symtab.h (symbol_record::BUILTIN_CONSTANT): New enum value. (symbol_record::symbol_type): Increase width to 7 bits. (symbol_record::symbol_def::is_constant): New function. (symbol_record::symbol_def::is_builtin_constant): New function. (symbol_record::is_constant): New function. (symbol_record::is_builtin_constant): New function. (SYMTAB_ALL_TYPES): Add symbol_record::BUILTIN_CONSTANT. * variables.cc (link_to_builtin_variable): Delete unused function. (link_to_builtin_or_function): Handle built-in constants here too. * defun.cc (install_builtin_variable): Delete inst_as_fcn arg. (install_builtin_constant): New function. (install_builtin_variable_as_function): Delete unused function. * defun.h (DEFVAR_INTERNAL): Delete inst_as_fcn arg. (DEFCONST_INTERNAL): New macro. * defun.h (DEFVAR): Delete inst_as_fcn arg. (DEFCONST, DEFCONSTX): Define using DEFCONST_INTERNAL instead of DEFVAR_INTERNAL. * data.cc, defaults.cc, error.cc, help.cc, input.cc, lex.l, load-save.cc, oct-hist.cc, oct-procbuf.cc, ov-fcn.h, ov-usr-fcn.cc, ov.cc, pager.cc, parse.y, pr-output.cc, pt-assign.cc, pt-decl.cc, pt-mat.cc, pt-plot.cc, pt-stmt.cc, toplev.cc, variables.cc: Change all invocations of DEFVAR to match new definition. * data.cc (symbols_of_data): Add DEFCONSTs for true and false. Thu Jul 15 10:59:42 1999 John W. Eaton * data.cc (Fis_bool, Fis_complex, Fisempty, Fisnumeric, Fis_list, Fis_map, Fis_struct): Return bool object. (Fisreal): New function. * ov-str-mat.h (octave_char_matrix_str): Only return true if Vimplicit_str_to_num_ok is also true. * DLD-FUNCTIONS/time.cc (Ftime): Print usage message if any arguments are supplied. * variables.cc (symbol_out_of_date): Call octave_time for time stamps. * fn-cache.h (octave_fcn_file_name_cache::timestamp): Now octave_time object. * strftime.c: Move to liboctave directory. * Makefile.in (DIST_SRC): Delete from list. * ov-usr-fcn.h (octave_user_function::t_parsed, octave_user_function::t_checked): Now octave_time objects. (octave_user_function::time_parsed, (octave_user_function::time_checked): Return value is now octave_time object. (octave_user_function::mark_fcn_file_up_to_date)): Arg is now octave_time object. * ov-fcn.h (octave_function::mark_fcn_file_up_to_date)): Arg is now octave_time object. (octave_function::time_parsed, octave_function::time_checked): Return value is now octave_time object. * input.cc (Vlast_prompt_time): Now an octave_time object. (octave_gets): Call octave_time::stamp() to set Vlast_prompt_time. * DLD-FUNCTIONS/time.cc (mk_tm_map, extract_tm, Ftime, Fgmtime, Flocaltime, Fmktime, Fstrftime): Use new classes defined in liboctave/oct-time.cc instead of accessing C functions directly. Wed Jul 14 17:38:46 1999 John W. Eaton * systime.h: Move to liboctave directory. * Makefile.in (INCLUDES): Delete it from the list Tue Jul 13 14:34:57 1999 John W. Eaton * sighandlers.cc (sigchld_handler): Only wait for processes in octave_child_list. * toplev.cc (cmd_status): Delete unused static variable. (cmd_death_handler): Delete unused function. (run_command_and_return_output): Don't add cmd_death_handler to octave_child_list. Simply extract command exit status from calling close() on the procstream object. Mon Jul 12 22:38:50 1999 John W. Eaton * defun.h (DEFUN_MAPPER): Handle new args, d_b_map and c_b_map. * defun-int.h (DEFUN_MAPPER_INTERNAL): Likewise. * mappers.cc (install_mapper_functions): Supply new args to all uses of DEFUN_MAPPER. * ov-mapper.cc (octave_mapper::apply): Handle mapper functions that return bool objects. * ov-mapper.h (octave_mapper::d_b_mapper, octave_mapper::c_b_mapper): New typedefs. (octave_mapper::octave_mapper): Handle new mapper function types. * DLD-FUNCTIONS/minmax.cc: Do a better job of handling NaNs. Sun Jul 11 13:15:17 1999 John W. Eaton * pr-output.cc (do_plus_format (ostream&, double)): New function. (octave_print_internal (ostream&, double, bool)): Use it. (octave_print_internal (ostream&, const Matrix&, bool, int)): Ditto. * pr-output.cc (do_plus_format (ostream&, const Complex&)): New function. (octave_print_internal (ostream&, const Complex&, bool)): Use it. (octave_print_internal (ostream&, const ComplexMatrix&, bool, int)): Ditto. Sun Jun 20 23:04:00 1999 John W. Eaton * sysdep.cc: Include sys/ioctl.h if available. Sat Jun 19 12:07:16 1999 John W. Eaton * variables.cc (do_who): Make pattern and multiple non-option arguments work. Mon Jun 7 09:54:51 1999 John W. Eaton * lex.l (next_token_is_bin_op, next_token_is_postfix_unary_op, handle_number): Delete yytext arg. Change all callers. (next_token_is_postfix_unary_op): Check the first character obtained from yyinput before calling it again. (next_token_is_bin_op): Do a more thorough check. (handle_identifier): Also enter token in local symbol table if the following token is a dot and it looks like a binary operator. (whitespace_in_literal_matrix): Now static. * lex.l: Always use unput, not yyunput. Fri May 28 11:02:37 1999 John W. Eaton * DLD-FUNCTIONS/chol.cc (Fchol): If two output arguments, never produce error message. Thu May 27 18:28:35 1999 John W. Eaton * DLD-FUNCTIONS/chol.cc (Fchol): Also return info as second output. * DLD-FUNCTIONS/minmax.cc (max (const ComplexMatrix&, const ComplexMatrix&)): Correct test for real columns only. (min (const ComplexMatrix&, const ComplexMatrix&)): Likewise. Wed Apr 14 12:54:25 1999 John W. Eaton * DLD-FUNCTIONS/dassl.cc (Fdassl): Prevent recursive calls. * DLD-FUNCTIONS/fsolve.cc (Ffsolve): Likewise. * DLD-FUNCTIONS/lsode.cc (Flsode): Likewise. * DLD-FUNCTIONS/quad.cc (Fquad): Likewise. * file-io.cc (Fsscanf, Ffscanf): Doc fix. Sat Mar 27 11:07:51 1999 John W. Eaton * ov.h (octave_value::count): New function. * symtab.cc (symbol_record::dump_symbol_info): New function. * symtab.cc (symbol_record::symbol_def::dump_symbol_info): Ditto. * variables.cc (F__dump_symbol_info__): Ditto. * pt-misc.cc (tree_parameter_list::clear): New function. * ov-usr-fcn.h (octave_user_function::clear_args_passed): Ditto. * ov-usr-fcn.cc (clear_param_list): New function. (clear_args_passed): New function. (octave_user_function::do_index_op): Use them to decrement reference counts on local variables. Fri Mar 26 00:51:53 1999 John W. Eaton * Makefile.in (libraries): Use the libfoo.a(objects) method of creating static libs. * defaults.cc (symbols_of_defaults): Initialize LOADPATH to Vload_path, not ":". Thu Mar 18 12:09:23 1999 John W. Eaton * data.cc (Fisnumeric): Fix typo. Thu Mar 4 02:17:04 1999 James Macnicol * file-io.cc (Ffread, Ffwrite): Add uint16 and uint32 data types to doc string. Wed Mar 3 11:55:17 1999 John W. Eaton * lex.l (handle_string): Allow "" to pass through unchanged if working on a gset command. Tue Mar 2 01:36:29 1999 John W. Eaton * variables.cc (Fexist): If a variable isn't defined, only go on to look for a global by the same name if we are at the top level. Fri Jan 29 02:18:36 1999 John W. Eaton * version.h (OCTAVE_NAME_AND_VERSION): Say `GNU Octave', not just Octave. Thu Jan 28 21:29:16 1999 John W. Eaton * toplev.cc (Fcomputer): Use CANONICAL_HOST_TYPE, not TARGET_HOST_TYPE. (octave_config_info): Likewise. * version.h: Ditto. * sysdep.cc (Fpause): Flush output before getting user input. Wed Jan 27 14:18:29 1999 John W. Eaton * Makefile.in (DEFFUN_PATTERN, DEFVAR_PATTERN): Use egrep again. Make the patterns work with stupid egreps that don't like empty elements in alternation patterns. Fri Jan 22 04:41:48 1999 John W. Eaton * load-save.cc (save_ascii_data): Check for string type first, then range, then the rest. (save_binary_data): Ditto. * pager.cc (more_than_a_screenful): Accept length as second arg. Handle long lines properly, assuming the terminal wraps long lines. (octave_pager_buf::do_sync): Accept length of data as second arg. Use write instead of << to put characters on output stream. (octave_pager_buf::sync): Don't assume data ends at first NUL. (octave_diary_buf::sync): Ditto. Thu Jan 21 22:15:23 1999 John W. Eaton * load-save.cc (save_mat_binary_data): Check for string type first, then range, then the rest. Wed Jan 20 12:01:14 1999 John W. Eaton * oct-stream.cc (octave_base_stream::do_scanf): Handle short and long ints correctly. Fri Jan 15 13:04:58 1999 John W. Eaton * parse.y (end_error): Handle case of endswitch too. * Makefile.in: Use basic regular expressions and grep instead of egrep to find files that contain DEFVAR, DEFCONST, or DEFUN. Wed Dec 9 14:14:11 1998 John W. Eaton * Makefile.in (octave): Add $(RDYNAMIC_FLAG) to link command. Fri Dec 4 20:26:33 1998 John W. Eaton * DLD-FUNCTIONS/time.cc (Fstrftime): Make it work even when not using the GNU version of strftime, which allows passing NULL for the buffer to determine the required size of the buffer. Wed Dec 2 22:38:40 1998 John W. Eaton * utils.cc (file_in_loadpath): Expect argc == 2, not 3. Tue Nov 24 23:38:19 1998 Eric Norum * mkbuiltins: Also strip off leading `./' from file names. * mkops: Ditto. Tue Nov 24 23:24:26 1998 John W. Eaton * strftime.c: Surround everything with #ifdef HAVE_STRFTIME / #endif. * lex.h (YY_FATAL_ERROR): Call yy_falta_error after jump_to_top_level to avoid gcc warning. Fri Nov 20 13:34:47 1998 John W. Eaton * ov-bool.h, ov-bool.cc (class octave_bool): Derive from octave_base_scalar and get common functions via derivation. * ov-scalar.h, ov-scalar.cc (class octave_scalar): Ditto. * ov-complex.h, ov-complex.cc (class octave_complex): Ditto. * ov-base-scalar.h, ov-base-scalar.cc (class octave_base_scalar): New files for new class definition. Put common scalar data type stuff here. * Makefile.in (OV_INCLUDES, OV_SRC): Add them to the lists. Thu Nov 19 14:30:25 1998 John W. Eaton * dynamic-ld.cc (octave_dynamic_loader::mangle_name): Prepend underscore here. (octave_dynamic_loader::load_fcn_from_dot_oct_file): Not here. * ov-re-mat.h (octave_matrix_value): Delete experimental code for handling structure references for things like .rows, .cols, etc. Wed Nov 18 01:18:46 1998 John W. Eaton * Makefile.in (VAR_FILES): Be more careful about matching. (DEF_FILES): Likewise. * ov-base-mat.h, ov-base-mat.cc, ov-bool-mat.h, ov-bool-mat.cc, ov-ch-mat.h, ov-ch-mat.cc, ov-cx-mat.h, ov-cx-mat.cc, ov-re-mat.h, ov-re-mat.cc: Move default definition of all, any, is_matrix_type, is_numeric_type, valid_as_zero_index, and do_index_op to base class. Provide definitions that override the defaults where necessary. * mappers.cc: Don't include lo-specfun.h. Tue Nov 17 14:35:56 1998 John W. Eaton * besselj.cc (Fbesselh, Fairy); New functions. (Fbesselj, Fbessely, Fbesselk, Fbesseli): Update doc strings. (do_bessel): Handle additional args. Fri Nov 13 14:47:11 1998 John W. Eaton * lex.l (NUMBER): Allow hexadecimal constants. (looks_like_hex): New function. (handle_number): Check for hexadecimal constants and convert them to unsigned integer values. Thu Nov 12 11:13:24 1998 John W. Eaton * input.cc (gnu_readline): Check for EOF from command_editor::readline. * ov-str-mat.h, ov-str-mat.cc (class octave_char_matrix_str): Get common functions via new derivation scheme. * ov-bool-mat.h, ov-bool-mat.cc (class octave_bool_matrix): Derive from octave_base_matrix and get common functions via derivation. * ov-ch-mat.h, ov-ch-mat.cc (class octave_char_matrix): Ditto. * ov-cx-mat.h, ov-cx-mat.cc (class octave_complex_matrix): Ditto. * ov-re-mat.h, ov-re-mat.cc (class octave_real_matrix): Ditto. * ov-base-mat.h, ov-base-mat.cc (class octave_base_matrix): New files for new class definition. Put common matrix data type stuff here. * ov-list.cc (Fnth): New function. * ov-list.cc (octave_list::do_index_op): Allow more complex indexing. * oct-obj.cc (octave_value_list::index): New function. (octave_value_list::octve_value_list (Array)): New private constructor. * ov-list.cc (Fsplice): Fix docstring to match. * oct-obj.cc (octave_value_list::splice): Allow special case splice (x, length(x)+1, 0, y) to be equivalent to append (x, y). * ov-list.cc (Fappend): If an arg is a list, concatenate the lists instead of appending arg as a single element. Wed Nov 11 14:07:27 1998 John W. Eaton * load-save.cc (get_mat_data_input_line): New function. (get_lines_and_columns): Use it here. (read_mat_ascii_data): And here and do our own reading instead of using Matrix::operator<<. Tue Nov 10 16:12:25 1998 John W. Eaton * parse.y (make_constant): Initialize retval to 0. * toplev.h (clean_up_and_exit (void)): Delete declaration. * toplev.cc (do_octave_atexit): Move guts of clean_up_for_exit here, but ensure that the actions are only executed once. * octave.cc (main): Don't register cleanup_tmp_files with atexit. * ov.h, ov.cc (class octave_value): Use DECLARE_OCTAVE_ALLOCATOR and DEFINE_OCTAVE_ALLOCATOR for uniform declaration and definition of allocator functions. Use DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA and DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA for uniform declaration and definition of type id functions and data. * ov-usr-fcn.h, ov-usr-fcn.cc (class octave_user_function): Ditto. * ov-scalar.h, ov-scalar.cc (class octave_scalar): Ditto. * ov-re-mat.h ov-re-mat.cc (class octave_matrix): Ditto. * ov-range.h, ov-range.cc (class octave_range): Ditto. * ov-mapper.h, ov-mapper.cc (class octave_mapper): Ditto. * ov-list.h, ov-list.cc (class octave_list): Ditto. * ov-file.h, ov-file.cc (class octave_file): Ditto. * ov-fcn.h, ov-fcn.cc (class octave_function): Ditto. * ov-cx-mat.h, ov-cx-mat.cc (class octave_complex_matrix): Ditto. * ov-complex.h, ov-complex.cc (class octave_complex): Ditto. * ov-ch-mat.h, ov-ch-mat.cc (octave_char_matrix): Ditto. * ov-builtin.h, ov-builtin.cc (class octave_builtin): Ditto. * ov-bool.h, ov-bool.cc (class octave_bool): Ditto. * ov-bool-mat.h, ov-bool-mat.cc (octave_bool_matrix): Ditto. * ov.h (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): New macro. (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Ditto. Mon Nov 9 16:12:37 1998 John W. Eaton * pr-output.cc (octave_print_internal): Reorder default args for charMatrix version. (octave_print_internal): New function for boolMatrix. * version.h (OCTAVE_STARTUP_MESSAGE): Note that this is a development release. * toplev.cc (do_octave_atexit): Call flush_octave_stdout here. (clean_up_for_exit): And here. Mon Nov 9 15:20:53 1998 John W. Eaton * input.cc (get_user_input): Check retval.length(), not retval.length. Sun Nov 8 19:30:33 1998 John W. Eaton * pt-assign.cc (tree_simple_assignment::rvalue): If etype is asn_eq, don't evaluate ult again because retval is just rhs value. (tree_multi_assignment::rvalue): Likewise. Fri Nov 6 12:14:29 1998 John W. Eaton * pt-loop.cc (tree_for_command::eval): Move code for string RHS outside if clause for matrix types. * pt-idx.cc: Don't forget to define arg_nm. Move contstructor here. * pt-idx.h: From here. * data.cc (Fisempty): Also return true for empty strings. Wed Nov 4 17:21:41 1998 John W. Eaton * ov-base.cc (octave_base_value::rows, octave_base_value::columns, octave_base_value::length): Delete. * ov-base.h (octave_base_value::rows, octave_base_value::columns, octave_base_value::length): Define here. All return -1 if not defined in a derived class. * data.cc (Fis_matrix): Also return true if the arg is a range. Tue Nov 3 09:40:24 1998 John W. Eaton * data.cc (Fis_bool): New function. Also add alias for islogical. * ov.h (octave_value::is_bool_type): New function. * ov-base.h (octave_base_value::is_bool_type): Likewise. * ov-bool.h (octave_bool::is_bool_type): Likewise. * ov-bool-mat.h (octave_bool_matrix::is_bool_type): Likewise. Mon Nov 2 13:36:04 1998 John W. Eaton * lex.l (handle_close_brace): Also handle case of ']' followed by other assignment ops (+=, -=, ...). * pt-assign.cc (tree_simple_assignment::rvalue): Correctly handle return value and printing for operators other than `='. (tree_multi_assignment::rvalue): Likewise. * pt-assign.h (tree_multi_assignment::etype): New data member. * pt-assign.cc (tree_multi_assignment::rvalue): Use it instead of assuming `='. (tree_multi_assignment::oper): New function. * pt-pr-code.cc (tree_print_code::visit_multi_assignment): Use it instead of always printing `='. * parse.y (make_assign_op): Pass expression type to tree_multi_assignment constructor. * Makefile.in (stmp-pic): New target. ($(PICOBJ)): Depend on stmp-pic, not pic. (clean): Delete stmp-pic. Sun Nov 1 23:24:55 1998 John W. Eaton * mappers.cc (install_mapper_functions): Add alias for isfinite. Sat Oct 31 08:46:55 1998 John W. Eaton * data.cc (Fisnumeric): New function. Fri Oct 30 08:39:30 1998 John W. Eaton * oct-lvalue.cc (octave_lvalue::do_unary_op): Make it work for indexed ops too. * ov.cc (octave_value::unary_op_to_assign_op): New function. (octave_value::do_non_const_unary_op): New function for indexed ops. * parse.y (LEFTDIV_EQ, ELEFTDIV_EQ): New tokens. (assign_expr): Add rules for them. (make_assign_op): Handle them here too. * lex.l: Recognize them. * ov.h (octave_value::assign_op): Add ldiv_eq and el_ldiv_eq. * ov.cc (octave_value::assign_op_as_string): Ditto. (octave_value::op_eq_to_binary_op): Ditto. (octave_value::assign): Handle OP= style operators with brute force. (octave_value::simple_assign): New function. * parse.y (matrix): Dont' forget to reset lexer_flags.looking_at_matrix_or_assign_lhs. * oct-lvalue.cc (octave_lvalue::assign): Don't call change function if error occurs. (octave_lvalue::do_unary_op): If we have an index, fail with message. Thu Oct 29 09:27:04 1998 John W. Eaton * ov.cc (do_binary_op): Protect against invalid type conversions. (try_assignment_with_conversion): Likewise. (do_unary_op): Likewise. * ov.h (OV_UNOP_FN, OV_UNOP_OP, OV_UNOP_FN_OP): New macros. Use them to define not, uminus, transpose, hermitian functions and operators ! and -. (OV_BINOP_FN, OV_BINOP_OP, OV_BINOP_FN_OP): New macros. Use them to define add, sub, mul, div, pow, ldiv, lshift, rshift, lt, le, eq, ge, gt, ne, el_mul, el_div, el_pow, el_ldiv, el_and, el_or, struct_ref, functions and operators <, <=, ==, >=, >, !=, +, -, *, and /. * ops.h (CONVDECLX): New macro. * ov-base.cc (matrix_conv, complex_matrix_conv, string_conv): Use it to declare these functions. * ops.h (CONVDECL, INSTALL_WIDENOP): Prefix function name with `oct_conv_'. (INSTALL_BINOP, BINOPDECL): Prefix function name with `oct_binop_'. (INSTALL_ASSIGNOP, INSTALL_ASSIGNANYOP, ASSIGNOPDECL): Prefix function name with `oct_assignop_'. (UNOPDECL, DEFNCUNOP_METHOD, INSTALL_UNOP, INSTALL_NCUNOP): Prefix function name with `oct_unop_'. * ov-str-mat.cc (default_numeric_conversion_function): Return 0 if conversion fails. * parse.y (make_prefix_op, make_postfix_op): Use octave_value::unary_op enum. * pt-unop.cc (tree_prefix_expression::rvalue): Use new unary_op functions from octave_value and octave_lvalue classes. (tree_prefix_expression::rvalue): Likewise. * pt-unop.cc (tree_unary_expression::oper): Move here. (tree_prefix_expression::oper, tree_postfix_expression): From here. * pt-unop.h (tree_prefix_expression, tree_postfix_expression): Delete enums. (tree_unary_expression): Use octave_value::unary_op enum. * parse.y (make_prefix_op, make_postfix_op): Likewise. * oct-lvalue.h (octave_lvalue::do_unary_op): New function. (octave_lvalue::increment, octave_lvalue::decrement): Delete. * ov-typeinfo.h (octave_value_typeinfo::non_const_unary_ops): New data member. * ov-typeinfo.h (octave_value_typeinfo::lookup_non_const_unary_op): New function. * ov-typeinfo.cc (octave_value_typeinfo::register_non_const_unary_op): New function. (octave_value_typeinfo::do_register_non_const_unary_op): Ditto. (octave_value_typeinfo::do_lookup_non_const_unary_op): Ditto. * ov.cc (octave_value::do_non_const_unary_op): New function. * Makefile.in (OP_XSRC): Add op-chm.cc and op-range.cc to the list. * OPERATORS/op-str-str.cc: Define string matrix unary operators here. (install_str_str_ops): Install them here. * ov-bool-mat.h (octave_bool_matrix::transpose, octave_bool_matrix_value::hermitian): Delete. * OPERATORS/op-chm.cc: New file. Define char matrix unary operators. (install_chm_ops): Install them here. * ov-ch-mat.h (octave_char_matrix::transpose, octave_char_matrix_value::hermitian): Delete. * ops.cc (install_ops): Call install_chm_ops. * OPERATORS/op-bm-bm.cc: Define bool matrix unary operators here. (install_bm_bm_ops): Install them here. * ov-bool-mat.h (octave_bool_matrix::transpose, octave_bool_matrix_value::hermitian): Delete. * ov-bool.h (octave_bool::not, octave_bool::uminus, octave_bool::transpose, octave_bool::hermitian): Delete. * OPERATORS/op-cs-cs.cc: Define complex scalar unary operators here. (install_cs_cs_ops): Install them here. * ov-complex.h (octave_complex::not, octave_complex::uminus, octave_complex::transpose, octave_complex::hermitian): Delete. * OPERATORS/op-cm-cm.cc: Define complex matrix unary operators here. (install_cm_cm_ops): Install them here. * ov-cx-mat.h (octave_complex_matrix::not, octave_complex_matrix::uminus, octave_complex_matrix::transpose, octave_complex_matrix::hermitian): Delete. * OPERATORS/op-m-m.cc: Define matrix unary operators here. (install_m_m_ops): Install them here. * ov-re-mat.h (octave_matrix::not, octave_matrix::uminus, octave_matrix::transpose, octave_matrix::hermitian): Delete. * OPERATORS/op-range.cc: New file. Define range unary operators. (install_range_ops): Install them here. * ov-range.h (octave_range::not, octave_range::uminus, octave_range::transpose, octave_range::hermitian): Delete. * ops.cc (install_ops): Call install_range_ops. * OPERATORS/op-s-s.cc: Define scalar unary operators here. (install_s_s_ops): Install them here. * ov-scalar.h (octave_scalar::not, octave_scalar::uminus, octave_scalar::transpose, octave_scalar::hermitian): Delete. * ops.h (INSTALL_UNOP, CAST_UNOP_ARG, UNOPDECL, DEFUNOPX, DEFUNOP, DEFUNOP_OP, DEFUNOP_FN): New macros. * ov.h (unary_op_fcn): New typedef. (octave_value::unary_op): New enum. * ov.cc (octave_value::octave_value): New function. * ov.h (octave_value::not, octave_value::uminus, octave_value::transpose, octave_value::hermitian, octave_value::increment, octave_value::decrement): Delete. * ov-base.cc (octave_base_value::not, octave_base_value::uminus, octave_base_value::transpose, octave_base_value::hermitian, octave_base_value::increment, octave_base_value::decrement): Delete. * ov.cc (gripe_unary_op): New function. (do_unary_op): New function. * ov-typeinfo.h (octave_value_typeinfo::unary_ops): New data member. * ov-typeinfo.cc (octave_value_info::register_unary_op, octave_value_info::do_register_unary_op, octave_value_info::lookup_unary_op, octave_value_info::do_lookup_unary_op): New functions. * ov-list.cc (Fsplice): Use new octave_value::int_value function here. (octave_list::do_index_op): Likewise. (octave_list::assign): Likewise. * toplev.cc (Fquit): Likewise. * syscalls.cc (Fwaitpid): Likewise. (Ffcntl): Likewise. * file-io.cc (do_fread): Likewise. (do_fwrite): Likewise. * data.cc (make_diag): Likewise. (Fsize): Likewise. (get_dimensions): Likewise. (Flinspace): * ov-base.cc (octave_base_value::int_value): New function. (octave_base_value::nint_value): Ditto. * ov.h (octave_value::int_value): Ditto. (octave_value::nint_value): Ditto. * ov-list.cc (octave_list::assign): Fix off-by-one error. Wed Oct 28 11:01:37 1998 John W. Eaton * load-save.cc (read_mat_ascii_data): Try harder to convert file name to valid variable name. * data.cc (Fisempty, Fis_matrix): New functions. * ov-str-mat.h (octave_char_matrix_str::is_matrix_type): New function. * OPERATORS/op-list.cc: New file. * Makefile.in (OP_XSRC): Add it to the list. * ov-list.cc (octave_list::assign): New function. * ov-typeinfo.h (octave_value_typeinfo::assignany_ops): New data member. * ov-typeinfo.cc (octave_value_info::register_assignany_op, octave_value_info::do_register_assignany_op, octave_value_info::lookup_assignany_op, octave_value_info::do_lookup_assignany_op): New functions. * ov.cc (octave_value::try_assignment (octave_value::assign_op, const octave_value_list&, const octave_value&)): If no assignment operator for particular RHS type exists, try finding one for generic octave_value as RHS type. * ops.h (DEFASSIGNANYOP_FN): New macro. * ov-list.cc (Fsplice): New function. * oct-obj.cc (octave_value_list::splice): New function. * ov.cc (Vresize_on_range_error): No longer static. * ov.h (Vresize_on_range_error): Provide extern declaration. * oct-procbuf.cc (symbols_of_oct_procbuf): Don't declare static. * data.cc (Flength): New function. * ov.h (octave_value::length): New virtual function. * ov-base.cc (octave_base_value::length): New function. (octave_base_value::rows, octave_base_value::columns): Move definitions here, from ov-base.h. Don't return -1. Instead, gripe about wrong argument type. * ov-bool-mat.h (octave_bool_matrix::length): New function. * ov-bool.h (octave_bool::length): Ditto. * ov-ch-mat.h (octave_char_matrix::length): Ditto. * ov-complex.h (octave_complex::length): Ditto. * ov-cx-mat.h (octave_complex_matrix::length): Ditto. * ov-list.h (octave_list::length): Ditto. * ov-range.h (octave_range::length): Ditto. * ov-re-mat.h (octave_matrix::length): Ditto. * ov-scalar.h (octave_scalar::length): Ditto. Tue Oct 27 22:19:24 1998 John W. Eaton * ov-list.cc (octave_list::print_raw): Handle case of empty list. (octave_list::print_name_tag): Likewise. * octave.cc (intern_argv): Built-in variable argv is now a list of strings instead of a string vector. Always bind argv, making it an empty list if there are no args. Mon Oct 26 08:41:46 1998 John W. Eaton * xdiv.cc (mx_leftdiv_conform): Explicitly declare args to be passed as references to const objects. Fix explicit instantiation requests to match. (mx_div_conform): Likewise. * pt-unop.h (tree_prefix_expression): Reorder constructor args to put those with default values last. (tree_postfix_expression): Likewise. * parse.y: Change all callers. Fri Oct 23 12:07:32 1998 John W. Eaton * utils.cc (Ffile_in_loadpath): New function. * defaults.cc (Vload_path, Vdefault_load_path): Now static. * help.cc (simple_help): Use Vload_path_dir_path here instead of trying to reconstruct it from Vload_path. * fn-cache.cc (octave_fcn_file_name_cache::do_list): Likewise. (octave_fcn_file_name_cache::update): Likewise. * defaults.cc (octave_loadpath): Construct Vload_path_dir_path using Vdefault_load_path. (set_default_path): Likewise. * defaults.h, defaults.cc (maybe_add_default_load_path): Delete. * defaults.cc (Vdefault_load_path): New static variable. (set_default_path): Set it. (maybe_add_default_load_path): Use it. (symbols_of_defaults): Add DEFCONST for DEFAULT_LOADPATH. Thanks to Rafael Laboissiere . * defaults.cc (set_default_path): If OCTAVE_PATH is set in the environment, call maybe_add_default_load_path on it. Tue Oct 20 20:58:04 1998 John W. Eaton * defaults.cc (maybe_add_default_load_path): If LOADPATH contains an embedded "::", insert the default path there too. Fri Oct 16 00:52:15 1998 John W. Eaton * parse.y (in_matrix_or_assign_lhs): New subroutine for lexical feedback. (matrix): Use it. (assign_lhs): Ditto. * lex.h (lexical_feedback::looking_at_matrix_or_assign_lhs): New data member. * lex.l (handle_identifier): Use it to handle keywords like `cd' as variables in contexts like [ab, cd] = foo (). * ov-str-mat.h (octave_char_matrix_str::octave_char_matrix_str (char c)): New constructor. * ov-ch-mat.h (octave_char_matrix::octave_char_matrix (char c)): New constructor. * ov.cc (octave_value::octave_value (char c): New constructor. * pt-loop.cc (tree_simple_for_command::eval): Handle case of RHS as string. Thu Oct 15 00:56:47 1998 John W. Eaton * DLD-FUNCTIONS/rand.cc: Declare Fortran subroutines as returning int, not int*. Wed Oct 14 23:51:31 1998 Georg Thimm * load-save.cc (Vcrash_dumps_octave_core): New static variable. (save_user_variables): Only save variables if Vcrash_dumps_octave_core is true. (symbols_of_load_save): Add DEFVAR for it here. (crash_dumps_octave_core): New function. * octave.cc (maximum_braindamage): Bind crash_dumps_octave_core to 0.0 here. Tue Oct 13 22:05:55 1998 John W. Eaton * input.cc (read_readline_init_file): New function. Thu Oct 8 13:47:55 1998 John W. Eaton * oct-procbuf.h (octave_procbuf::wstatus): New data member. Initialize in constructors. (octave_procbuf::wait_status): New member function. * oct-procbuf.cc (octave_procbuf::sys_close): Use class data member wstatus, not local variable. * procstream.cc (procstreambase::close): Don't call sys_close directly. Get subprocess exit status by calling wait_status for our procbuf. * pt-plot.cc (close_plot_stream): Send "quit" command to gnuplot before deleting plot_stream. Thu Oct 1 22:39:44 1998 John W. Eaton * data.cc (Fis_complex): New function. Fri Sep 25 11:50:44 1998 John W. Eaton * load-save.cc (write_header): Rename from write_binary_header. Also write header for Octave ASCII files. * load-save.cc (Fsave): Implement -append option. * defaults.cc (Frehash): New function. Fri Sep 25 11:50:44 1998 John W. Eaton * help.cc (help_from_info): Improve error message in case that info doesn't work. Thu Sep 24 10:48:12 1998 John W. Eaton * Makefile.in (DLD_XSRC): Replace qzval.cc with qz.cc * DLD-FUNCTIONS/balance.cc: Update from A. S. Hodel . * DLD-FUNCTIONS/qz.cc: New file. * DLD-FUNCTIONS/qzval.cc: Delete. * parse.y (plot_command1): Don't allow it to be empty. (plot_command): Handle simple `PLOT' and `PLOT ranges' as special cases here. Wed Sep 23 21:10:08 1998 John W. Eaton * lex.l: Change {SNLCMT}*\n{SNLCMT}* pattern to {S}*{COMMENT}{SNLCMT}* | {S}*{NL}{SNLCMT}*. Fri Sep 4 10:50:00 1998 John W. Eaton * file-io.cc (Ffwrite): Fix doc string. Wed Sep 2 16:22:23 1998 John W. Eaton * input.cc (match_sans_spaces): Make it work. * toplev.cc (quit): Require nargout == 0. * input.cc (get_user_input): Only try matching "exit", "quit", and "return" if debugging. Tue Sep 1 12:50:24 1998 John W. Eaton * octave.cc: Use -H as single character equivalent of --no-history. Sat Aug 29 12:23:12 1998 John W. Eaton * oct-obj.cc (octave_value_list::make_argv): If some values are string vectors, insert all the elements, not just the first. Tue Aug 18 16:39:50 1998 John W. Eaton * oct-stream.cc (octave_base_stream::do_gets): Accept last line of file even if it doesn't end in a newline character. Tue Aug 18 16:25:49 1998 Mumit Khan * xdiv.cc (mx_leftdiv_conform, mx_div_conform): Instantiate correct templates. Thu Jul 30 00:37:43 1998 John W. Eaton * pt-loop.cc (tree_for_command::eval): Check for range first. If error occurs when extracting matrix value, return early. Don't bother to check for string type. * ov-ch-mat.h (octave_char_matrix::is_real_matrix): New function. Tue Jun 23 15:09:54 1998 John W. Eaton * parse.y (clear_current_script_file_name): New function. (parse_fcn_file): Bind current_script_file_name while script is executing. Use unwind_protect to clear it once the script is finished. * pt-plot.cc (Fgraw): New function. Mon Jun 22 22:13:38 1998 John W. Eaton * variables.cc (is_valid_function): Provide version that takes function name as string. * parse.y (binary_expr): Fix thinko that resulted in incorrect evaluation of -x^y. Thanks to Richard Allan Holcombe . (feval): Don't attempt to copy nonexistent arg names. Mon Jun 22 21:35:50 1998 Richard Allan Holcombe * xpow.cc (xpow): Improve efficiency for matrix^(scalar int) case. Thu Jun 4 12:42:46 1998 John W. Eaton * ov-usr-fcn.cc (octave_user_function::octave_all_va_args): If num_args_passed < num_named_args, create zero length list. Thu May 14 16:23:15 1998 John W. Eaton * DLD-FUNCTIONS/getrusage.cc: Include sys/types.h too. Mon May 11 00:38:45 1998 John W. Eaton * pager.cc (Fdiary): Don't forget to set write_to_diary file if just given a file name. * input.cc (octave_gets): Only send new line character to octave_diary if current_input_line is empty or doesn't already end with a new line character.. Don't send input from function files or scripts to octave_diary. Sun May 3 19:54:38 1998 John W. Eaton * lex.l (reset_parser): Also call yyrestart if forced_interactive is true, but not if input_from_startup_file is true. Tue Apr 28 14:06:20 1998 John W. Eaton * oct-procbuf.cc (Vkluge_procbuf_delay): New static variable. (kluge_procbuf_delay): New function. (symbols_of_oct_procbuf): New function. (octave_procbuf::open): Delay Vkluge_procbuf_delay microseconds after forking. Thu Apr 23 15:41:08 1998 John W. Eaton * defaults.cc (Vload_path_dir_path): New variable. * utils.cc (file_in_path): Use it. * utils.cc (search_path_for_file): Undo previous change. (file_in_path): Undo previous change. * defaults.cc (loadpath): Undo previous change. Tilde expansion is once again handled correctly by the code in liboctave/pathsearch.cc. Mon Apr 20 21:50:34 1998 John W. Eaton * data.cc (get_dimensions): Allow zeros ([], 3) to work, for compatibility with Matlab. * dynamic-ld.cc [WITH_DL && ! HAVE_DLFCN_H]: Add declarations for dlopen, dlerror, dlsym, and dlclose. * octave.gperf: Handle __FILE__ and __LINE__. * lex.l (is_keyword): Likewise. * Makefile.in (oct-gperf.h): Pass -D option to gperf. Postprocess output of gperf to convert name of static variable from lookup to gperf_lookup, to avoid conflict with our function of the same name defined in variables.cc. Sat Apr 18 20:17:10 1998 John W. Eaton * help.cc (USE_GNU_INFO): Delete uses of this macro. Thu Apr 16 01:00:12 1998 John W. Eaton * dynamic-ld.cc: Only include dlfcn.h if HAVE_DLFCN_H. Wed Apr 15 01:03:05 1998 John W. Eaton * input.cc (Vlast_prompt_time): New global variable. (octave_gets): Set it. * ov-fcn.h (octave_function::time_checked): New virtual function (octave_function::mark_fcn_file_up_to_date): Ditto. * ov-usr-fcn.h (octave_user_function::time_checked): New function. (octave_user_function::mark_fcn_file_up_to_date): Ditto. (octave_user_function::t_checked): New data member. * variables.cc (symbol_out_of_date): Only check file time stamp if a prompt has been printed since the last time check. * pt-plot.h, pt-plot.cc (subplot_axes): New class. (subplot): Handle axes. (Vgnuplot_command_axes): New static variable. (gnuplot_command_axes): New function. (symbols_of_pt_plot): DEFVAR gnuplot_command_axes. * pt-walk.h (tree_walker::visit_subplot_axes): New virtual function. * parse.y (plot_options): Handle axes. * lex.l (plot_axes_token): New function. (is_keyword): Use it. (is_plot_keyword): Recognize "axes" and "axis". * lex.h (class lexical_feedback): New field, in_plot_axes. (lexical_feedback::init): Reset it. Tue Apr 14 23:32:27 1998 John W. Eaton * parse.y (parse_fcn_file): New arg, force_script. Change callers. Fri Apr 10 11:01:27 1998 John W. Eaton * help.cc (type): Also print values of variables. Wed Apr 8 01:00:58 1998 John W. Eaton * pr-output.cc (set_format): Set scale to 1.0 if all elements are int or inf or nan. * parse.y (Vwarn_future_time_stamp): New variable. (symbols_of_parse): Add DEFVAR for it. (warn_future_time_stamp): New function. (frob_function_def): Maybe warn about files with future time stamps. Thu Apr 2 20:43:45 1998 John W. Eaton * pt-arg-list.cc (tree_argument_list::convert_to_const_vector): In error messages, print element numbers starting with 1, not 0. Sat Mar 28 15:25:44 1998 John W. Eaton * toplev.cc (clean_up_for_exit): New function. (clean_up_and_exit): Use it. * sighandlers.cc (my_friendly_exit): Call it instead of clean_up_and_exit, then do default action for signal. * sighandlers.cc (octave_new_handler): Call my_friendly_exit with signal set to SIGABRT if it is defined, or -1 otherwise. * error.cc (verror): Fix thinko in attempt to skip `error: ' tag when buffering error messages. * pt-except.cc (tree_try_catch::eval): Reset buffer_error_messages here if just discarding unwind_protect frame. Wed Mar 18 12:35:18 1998 John W. Eaton * xpow.cc (elem_xpow): For real-scalar .^ matrix case, result is complex only if real-scalar is negative and matrix has some non-integer values. Tue Mar 17 17:47:50 1998 John W. Eaton * pt-plot.cc (Vgnuplot_command_plot, Vgnuplot_command_replot, Vgnuplot_command_splot, Vgnuplot_command_using, Vgnuplot_command_with, Vgnuplot_command_title, Vgnuplot_command_end): New static variables. (symbols_of_pt_plot): DEFVAR them. (gnuplot_command_plot, gnuplot_command_replot, gnuplot_command_splot, gnuplot_command_using, gnuplot_command_with, gnuplot_command_title, gnuplot_command_end): New functions. (open_plot_stream, send_to_plot_stream, tree_plot_command::eval, subplot_using::print, subplot_style::print, subplot::print, do_external_plotter_cd, Fgset, Fgshow): Use them instead of the GPLOT_CMD_PLOT, GPLOT_CMD_REPLOT, GPLOT_CMD_SPLOT, GPLOT_CMD_USING, GPLOT_CMD_WITH, GPLOT_CMD_TITLE, and GPLOT_CMD_END macros. Fri Feb 27 12:25:27 1998 John W. Eaton * help.cc (additional_help_message): Fix www address. Tue Feb 24 00:42:59 1998 John W. Eaton * help.cc (simple_help): Put additional help message first. (additional_help_message): Add information about web site and mailing list. Fri Feb 20 00:41:06 1998 John W. Eaton * pt-plot.cc (GPLOT_CMD_REPLOT): Clear before replot. * Makefile.in: Better handling of lib flags for linking. Thu Feb 19 21:14:30 1998 John W. Eaton * pt-decl.cc (Vinitialize_global_values): New static variable. (initialize_global_variables): New function. (symbols_of_pt_decl): New function. DEFVAR Vinitialize_global_values and initialize_global_variables. (tree_global_command::do_init): If initialize_global_variables is not true and the variable doesn't have an explicit initializer, don't initialize it. If we are giving it a default value, use the value of the variable defualt_global_variable_value. * octave.cc (maximum_braindamage): Set default_global_variable_value and initialize_global_variables to Matlab-compatible values. Wed Feb 18 04:35:31 1998 John W. Eaton * DLD-FUNCTIONS/besselj.cc: Rename from bessel.cc. * Makefile.in (DLD_XSRC): Likewise. * syscalls.cc (Fvfork): Delete. * oct-procbuf.cc: Just use fork. * parse.y (feval): Provide version that takes function name separate from other args. * parse.h: Declare it. * oct-procbuf.cc (octave_procbuf::open): Move declaration of child_std_end outside of child scope and declare volatile. Mon Feb 16 15:04:28 1998 John W. Eaton * parse.y: Include cstdio, for SEEK_SET. Thu Feb 12 22:07:00 1998 John W. Eaton * system.c: New file. * Makefile.in (SOURCES): Add it to the list. Fri Feb 6 01:23:18 1998 John W. Eaton * oct-stream.cc (octave_base_stream::file_number): Rename from fileno. Change all uses. * fsolve.cc (fsolve_option_table): Add missing & to function names. Thu Feb 5 02:27:18 1998 John W. Eaton * dirfns.cc (Fls): If first attempt at reading process output fails, sleep once and try again. * toplev.cc (run_command_and_return_output): Likewise. * oct-procbuf.cc (octave_procbuf::open): Use vfork if it is available. * syscalls.cc (Fvfork): New function. * ov-bool-mat.cc: Only declare assign function if CXX_NEW_FRIEND_TEMPLATE_DECL is not defined. * ov-base.h, ov-bool-mat.h, ov-bool.h, ov-ch-mat.h, ov-complex.h, ov-cx-mat.h, ov-range.h, ov-re-mat.h, ov-scalar.h: Handle default args for *_value functions consistently. * symtab.cc (maybe_list_cmp_fcn): Declare args as void*, not void**, then use X_CAST. * OPERATORS/op-s-cm.cc: Include mx-cm-s.h. * defun-int.h: Include ov-builtin.h, ov-mapper.h, and symtab.h. (install_builtin_mapper, install_builtin_function, install_builtin_variable) Use specific types rather than void * in declaration. * defun.cc (install_builtin_mapper, install_builtin_function, install_builtin_variable): Likewise. Eliminate casts. * load-save.cc (read_binary_data, read_mat_file_header, save_binary_data): Use X_CAST, not static_cast. * unwind-prot.h (unwind_protect::save_ptr): Likewise. * Map.cc (goodCHptr, index_to_CHptr, CHptr_to_index): Likewise. * dynamic-ld.cc (octave_dlopen_dynamic_loder::resolve_reference): Likewise. * pt-mat.cc (tm_const::operator bool ()): (tm_row_const::operator bool ()): Likewise. * oct-stream.cc (printf_value_cache::operator bool ()): Likewise. (scanf_format_list::operator bool ()): Likewise. (printf_format_list::operator bool ()): Likewise. (octave_stream::operator bool ()): Likewise. Wed Feb 4 13:08:29 1998 John W. Eaton * DLD-FUNCTIONS/minmax.cc: Include cmath, not oct-math.h. * syscalls.cc (Fdup2): Convert stream to actual system file id. * oct-stream.cc (octave_base_stream::fileno, octave_stream::fileno): New functions. Tue Feb 3 00:24:44 1998 John W. Eaton * defaults.cc (exec_path): Append Vbin_dir to std_path. * octave.cc (initialize_pathsearch): Set TEXMFDBS, not TEXMF. Look for OCTAVE_DB_PATH in environment. Simplify using Vdata_dir and Vlibexec_dir. * defaults.h.in (Vdata_dir, Vlibexecdir): Declare new vars. defaults.cc: Define them. (set_default_data_dir, set_default_libexecdir): New functions. (install_defaults): Call them. * defaults.h.in (OCTAVE_LIBEXECDIR): Define. Mon Feb 2 02:43:16 1998 John W. Eaton * Makefile.in (install, uninstall): Use $(octlibdir), not $(libdir). Use mk-libdir-link. * defaults.h.in (OCTAVE_OCTLIBDIR): Substitute value. (Vlib_dir): Delete declaration. * defaults.cc (Vlib_dir): Delete. (set_default_lib_dir): Delete. (install_defaults): Don't call set_default_lib_dir. (set_default_info_prog): If oct_info_prog is empty, set default to "info" -- we expect it to be somewhere in the user's path. * defun.h (DEFCONST, DEFCONSTX): Eliminate inst_as_fcn and chg_fcn args. Always pass true for inst_as_fcn and 0 for chg_fcn to DEFVAR when creating built-in values like `e' or `stderr' that can be redefined. Change all uses. * help.cc (Ftype): Handle script files too. (Fwhich): Likewise. Sat Jan 31 00:00:26 1998 John W. Eaton * ov-ch-mat.cc (octave_char_matrix::is_true): Make it work. * ov-str-mat.h, ov-str-mat.cc (octave_char_matrix_str::is_true): Delete. * load-save.cc (read_ascii_data): Allow strings of length 0. If we don't find data on the first call, fail with error message. (do_load): Pass count of items read to read_ascii_data. Allow `load foo xyz' to work when foo contains only numbers. Fri Jan 30 23:46:42 1998 John W. Eaton * ov-str-mat.h (octave_char_matrix_str::all): Delete. (octave_char_matrix_str::any): Delete. * ov-ch-mat.h (octave_char_matrix::all, octave_char_matrix::any): Call charMatrix::all, charMatrix::any. Thu Jan 29 16:25:46 1998 John W. Eaton * load-save.cc (read_mat_binary_data): Handle third digit of MOPT as flag indicating row or column major ordering. Wed Jan 28 00:18:17 1998 John W. Eaton * DLD-FUNCTIONS/dassl.cc (lsode_option_table): Add missing & to function names. * DLD-FUNCTIONS/lsode.cc (lsode_option_table): Likewise. * DLD-FUNCTIONS/quad.cc (quad_option_table): Likewise. * Makefile.in (oct-gperf.h): Add -G option to gperf. * load-save.cc (get_save_type): Add `UL' and `L' suffixes to large constant values. For LS_INT, use <= and >= for comparison. Mon Jan 26 13:17:59 1998 John W. Eaton * ov-usr-fcn.cc (Vmax_recursion_depth): New static variable. (max_recursion_depth): New fucnction (symbols_of_ov_usr_fcn): DEFVAR max_recursion_depth. (octave_user_function::do_index_op): Check Vmax_recursion_depth. Thu Jan 22 13:45:26 1998 John W. Eaton * dynamic-ld.cc (make_dynamic_loader): Fix typo. Tue Jan 20 17:02:19 1998 John W. Eaton * variables.cc (Fexist): If local symbol is undefined, check global table. * pr-output.cc (pr_max_internal): Initial value for result is -DBL_MAX, not DBL_MIN. Thu Jan 8 11:54:33 1998 John W. Eaton * xpow.cc (elem_xpow): If second arg of pow is complex, make sure first arg is also complex. * symtab.cc (symbol_table::rename): Properly insert new item at the front of the list to avoid losing the rest of the items. Thu Dec 11 23:30:03 1997 John W. Eaton * variables.cc (Fclear): Increment index to skip -x arg. Tue Dec 9 02:45:35 1997 John W. Eaton * Makefile.in (INCLUDES): Don't forget Pix.h. * BaseSLList.cc: Don't include nonstandard libg++ header files. Sun Nov 30 14:58:56 1997 John W. Eaton * pr-output.cc: Include cmath, not oct-math. * sysdep.cc: Likewise. * DLD-FUNCTIONS/bessel.cc: New file. * Makefile.in (DLD_XSRC): Add it to the list. Thu Nov 27 23:28:59 1997 John W. Eaton * lex.l (handle_string): Constructor for string class takes (size_t, char) args, not (char, size_t). Wed Nov 26 00:39:34 1997 John W. Eaton * Makefile.in (OCTAVE_LIBS): Include $(SPECIAL_MATH_LIB) just ahead of -lcruft. Thu Nov 20 15:16:22 1997 John W. Eaton * octave.cc (maximum_braindamage): Bind implicit_num_to_str_ok to 1. * pt-mat.cc (Vimplicit_num_to_str_ok): New static variable. (implicit_num_to_str_ok): New function. (symbols_of_pt_mat): DEFVAR implicit_num_to_str_ok. (tm_row_const::some_str): New data member. (tm_row_const::some_strings_p): New function. (tm_row_const::init): Set some_str. (tm_const::some_str): New data member. (tm_const::some_strings_p): New function. (tm_const::init): Set some_str. (tree_matrix::eval): If Vimplicit_num_to_str_ok is true and some of the elements are strings, force a string conversion before returning. * parse.y (fold, finish_colon_expression, finish_matrix): If an error occurs, return the original expression. Use unwind_protect to restore error_state. * ov-ch-mat.h (octave_char_matrix::convert_to_str): Result is char_matrix_str, not just char_matrix. Wed Nov 19 02:05:40 1997 Mumit Khan * DLD-FUNCTIONS/filter.cc: Don't include extern template decls if CXX_NEW_FRIEND_TEMPLATE_DECL is defined. * ov-cx-mat.cc: Likewise. * ov-re-mat.cc: Likewise. * ov-str-mat.cc: Likewise. * ov-cx-mat.h (octave_complex_matrix::decrement, octave_complex_matrix): Use explicit Complex constructor. Wed Nov 19 00:08:13 1997 John W. Eaton * pt-decl.cc (tree_global_command::do_init): Initialize global values to `[]'. Only perform explicit initialization once. Tue Nov 18 04:27:55 1997 John W. Eaton * pr-output.cc (Vfixed_point_format): New variable. (fixed_point_format): New fucntion. (symbols_of_pr_output): Add DEFVAR for fixed_point_format. (set_real_matrix_format): Handle fixed point format (set_complex_matrix_format): Handle fixed point format (set_format): New arg, scale in Matrix, ComplexMatrix, Range versions. (pr_scale_header): New function. (octave_print_internal): Handle fixed point format in Matrix, ComplexMatrix, and Range versions. * octave.cc (maximum_braindamage): Set fixed_point_format to 1.0. * utils.cc (do_string_escapes): Move here, from lex.l. Arg is now const string& instead of char*. Return new string object instead of modifying arg in place. (Fdo_string_escapes): New function. * lex.l (handle_string): Use new version of do_string_escapes. * lex.l (Vbackslash_escapes): Delete. (backslash_escapes): Delete. (do_string_escapes): Undo previous change. (eat_whitespace, eat_continuation): Undo previous change. (handle_string): Undo previous change. (symbols_of_lex): Undo previous change. * octave.cc (maximum_braindamage): Undo previous change. Fri Nov 14 01:53:13 1997 John W. Eaton * parse.y (eval_string (const string&, bool, int&, int)): No longer static. * parse.h: Provide declaration. * input.cc (get_user_input (const octave_value_list&, bool, int)): New arg, nargout. Pass it to eval_string. (keyboard): Pass nargout = 0 to get_user_input. (input): Pass nargout to get_user_input. * input.cc (get_user_input (const octave_value_list&, bool)): Return octave_value_list() if user enters `quit', `exit', or `return'. If debugging, let eval_string handle the printing chores and reset error_state before asking for more input. * input.cc (Fkeyboard): Unconditionally turn on history here. * lex.l (have_continuation, have_ellipsis_continuation): Declare arg as bool, not int. Change callers. * lex.l (Vbackslash_escapes): New static variable. (backslash_escapes): New function. (do_string_escapes): Return immediately if ! Vbackslash_escapes. (eat_whitespace, eat_continuation): Only call have_continuation if Vbackslash_escapes. (handle_string): Backslash is only special if Vbackslash_escapes. (symbols_of_lex): Add DEFVAR for backslash_escapes. * octave.cc (maximum_braindamage): Set backslash_escapes to 0. Thu Nov 13 16:20:40 1997 John W. Eaton * variables.cc (Fexist): Also return 2 if NAME is a regular file somewhere in the LOADPATH. * data.cc (sumsq): Fix doc string. * parse.y (Fsource): Call parse_fcn_file, not parse_and_execute. Tue Oct 7 16:51:01 1997 John W. Eaton * defun-int.h (DEFINE_FUN_INSTALLER_FUN): Set installed to true after installing the function. Thu Sep 25 10:17:26 1997 John W. Eaton * DLD-FUNCTIONS/filter.cc (Ffilter): Return second output value even when called with only 3 arguments. Mon Sep 22 16:44:27 1997 John W. Eaton * DLD-FUNCTIONS/rand.cc (do_rand): Print error if first of two args is a string but doesn't match "seed". (Frand, Frandn): Fix doc string. Mon Aug 25 10:42:07 1997 John W. Eaton * input.cc (get_user_input): Return an empty string if the user just types RET. Thu Jul 31 22:59:04 1997 John W. Eaton * lex.l : Ensure that we handle words that begin with single or double quotes as strings. Thu Jul 17 13:06:48 1997 Klaus Gebhardt * DLD-FUNCTIONS/rand.cc (Frand): Use F77_XFCN to call getsd, setsd, setall, setcgn, dgenunf, and dgennor since they can call XSTOPX. Mon Jul 14 12:54:23 1997 John W. Eaton * dynamic-ld.cc (octave_dynamic_loader::load_fcn_from_dot_oct_file): If first attempt to load function fails, prepend and underscore and try again. * Makefile.in (install-inc): If defaults.h, oct-conf.h, or oct-gperf.h don't exist in the current directory, look in $(srcdir). Mon Jul 7 21:14:07 1997 John W. Eaton * DLD-FUNCTIONS/qr.cc (Fqr): Correctly handle nargout == 0. Wed Jul 2 16:47:09 1997 John W. Eaton * matherr.c: New file. Move matherr function here. * sysdep.cc: From here. * Makefile.in (DIST_SRC): Add matherr.c to the list. * error.cc (handle_message): Avoid bug in g++ snapshot. Thu Jun 26 22:04:09 1997 John W. Eaton * utils.cc (file_in_path): Add default load path to PATH arg if it begins or ends with a colon. Wed Jun 25 13:31:06 1997 John W. Eaton * oct-lvalue.h (octave_lvalue::struct_elt_ref): Ensure val is unique. Fri Jun 20 12:33:35 1997 John W. Eaton * toplev.cc (cmd_death_handler): New function. (run_command_and_return_output): Insert pid of command in octave_child_list along with pointer to cmd_death_handler so we can get the exit status without having to block SIGCHLD. (cleanup_iprocstream): Remove pid of command from octave_child_list. Sun Jun 15 16:11:13 1997 John W. Eaton * OPERATORS/op-cs-s.cc (ldiv): Doh, v1 is complex, v2 is real. * Makefile.in (DISTFILES): Add mkops to the list. (dist): Correctly link files in DLD-FUNCTIONS, OPERATORS, and TEMPLATE-INST subdirectories. Fri Jun 6 04:30:57 1997 John W. Eaton * DLD-FUNCTIONS/npsol.cc, DLD-FUNCTIONS/qpsol.cc, DLD-FUNCTIONS/fsqp.cc: Delete. * Makefile.in (DLD_XSRC): Remove them from the list. * utils.cc (search_path_for_file): New arg, do_tilde_expansion. If TRUE, perform tilde expansion on path before searching. (file_in_path): Call search_path_for_file with do_tilde_expansion set to false, since we've already performed tilde expansion on the load path. * defaults.cc (loadpath): Perform tilde expansion here. Thu Jun 5 01:42:39 1997 John W. Eaton * Makefile.in: Make building of static library optional. (liboctave.$(SHLEXT_VER)): Add $(SONAME_FLAGS) to command. * dynamic-ld.cc (octave_shl_load_dynamic_loader::resolve_reference): Call shl_findsym with type set to TYPE_UNDEFINED. * Makefile.in (stamp-picdir): Delete. (pic): New target. Don't worry so much about creating pic directory only when it is really needed. (stamp-interp): Delete. (libraries): New target. Depend on shared library directly. Wed Jun 4 00:09:42 1997 John W. Eaton * octave.cc (main): Call dir_path::set_program_name here. Tue Jun 3 16:47:34 1997 John W. Eaton * variables.cc (symbol_out_of_date): Make it work again. * parse.y (parse_and_execute): Move here from toplev.cc (default_eval_print_flag): Likewise. (safe_fclose): Likewise. (eval_string): Likewise. (Fsource): Likewise. (Ffeval): Likewise. (feval): Likewise. (Feval): Likewise. (symbols_of_parse): Define default_eval_print_flag here instead of in varaibles.cc. (looks_like_octave_copyright): Move here from variables.cc (gobble_leading_whitespace): Likeiwse. (is_function_file): Likewise. (restore_input_stream): Likewise. (parse_fcn_file): Likewise. (load_fcn_from_file): Likewise. (get_help_from_file): Likewise. * toplev.cc (syms_of_toplev): Define argv, program_name, and program_invocation_name here instead of in variables.cc. * parse.h (line_editing): Move here from toplev.h. Now bool, not int. (reading_startup_message_printed) Likewise. (input_from_startup_file): Likewise. (input_from_command_line_file): Likewise. * load-save.cc: Use bool instead of int where appropriate. * input.h (enum echo_state): Move here from variables.h. (Vecho_executing_commands): Likewise. Now bool, not int. * input.cc (echo_executing_commands): Move here from variables.cc. (symbols_of_input): Define echo_executing_commands here instead of in variables.cc. * octave.cc (program_invocation_name): Don't define. (intern_argv): Don't set program_invocation_name here. (main): Call octave_env::set_program_name here, not in intern_argv. * toplev.cc (quitting_gracefully): Move here from octave.h and make static bool instead of extern int. * error.cc (bind_global_error_variable, clear_global_error_variable): Move here from variables.cc. (symbols_of_error): Define error_text here instead of in variables.cc. * pager.cc (write_to_diary_file): Now bool, not int. (really_flush_to_pager): Likewise. (flushing_to_pager): Likewise. * sighandlers.h (can_interrupt): Likewise. * error.h (buffer_error_messages): Likewise. * oct-hist.h (input_from_tmp_history_file, Vsaving_history): Likewise. * input.h (forced_interactive): Likewise. (get_input_from_eval_string): Likeiwse. (reading_script_file): Likeiwse. (reading_fcn_file): Likeiwse. (interactive): Likewise. * unwind-prot.cc (saved_variable::saved_variable (bool *, bool)): Set type_tag to boolean, not int. Mon Jun 2 00:40:10 1997 John W. Eaton * variables.h (Octave_builtin_fcn): Delete typedef. * help.cc (make_name_list): Move here from variables.cc. (keyword_help, names): Now static. (struct help_list): Move declaration here from help.h. * oct-hist.cc (Vhistory_file, Vhistory_size, Vsaving_history): Move here from variables.cc. (symbols_of_oct_hist): New function. * version.h: Protect against multiple inclusion. * defun.cc (check_version): New function. * defun-int.h (DEFINE_FUN_INSTALLER_FUN): Use it. * help.h, help.cc (additional_help_message): Now extern. (operator_help): Now static. * defun.cc (print_usage): Move here from help.cc * DLD-FUNCTIONS/*.cc, data.cc, dirfns.cc, file-io.cc, input.cc, load-save.cc, octave.cc, ov-list.cc, ov-typeinfo.cc, ov-usr-fcn.cc, pager.cc, pr-output.cc, pt-plot.cc, strfns.cc, syscalls.cc, sysdep.cc, utils.cc, toplev.cc: Don't include help.h. * TEMPLATE-INST/Array-sym.cc: New file. * load-save.cc (do_load): Don't use ostream::form. * pr-output.cc: Likewise, at least where it is easy to do so. * oct-stream.cc: Ditto. * symtab.h (symbol_record::symbol_def::rows): New function. (symbol_record::symbol_def::columns): Ditto. (symbol_record::symbol_def::type_name): Ditto. (symbol_record::rows): Ditto (symbol_record::columns): Ditto (symbol_record::type_name): Ditto * symtab.h, symtab.cc (symbol_record::hides_fcn): New function. (symbol_record::hides_builtin): Ditto. (symbol_record::print_symbol_info_line): Ditto. (symbol_table::long_list): Delete. (symbol_table::symbol_list): New function. (symbol_table::maybe_list): Delete argc arg. (symbol_table::name_list): Rename from symbol_table::list. Change all callers. * symtab.h, symtab.cc (class symbol_record_info): Delete. * symtab.cc (matches_patterns): Use vector form of glob_match. Sun Jun 1 14:04:26 1997 John W. Eaton * pt-check.h, pt-check.cc: New files, for semantic checking of parse trees. * symtab.h (class symbol_def): Now nested in symbol_record class. (enum TYPE): Move from symbol_def to symbol record class. Change all uses. * symtab.h, symtab.cc (symbol_table::maybe_list): New function, from variables.cc. Change all uses. * pt-idx.h (tree_identifier::lvalue_ok): New function. * pt-id.h (tree_index_expression::lvalue_ok): Likewise. * pt-indir.h (tree_indirect_ref::lvalue_ok): Likewise. * pt-pr-code.h, pt-pr-code.cc (tree_print_code::visit_oct_obj): Delete. * pt-walk.h (tree_walker::visit_oct_obj): Delete declaration. * lex.h (class lexical_feedback): Delete maybe_screwed_again. * lex.l (lexical_feedback::init): Don't set it. Fri May 30 16:07:22 1997 John W. Eaton * mappers.cc: Include here. Tue May 27 10:08:43 1997 John W. Eaton * toplev.cc (eval_string): Don't index tmp if it is empty. Sat May 24 00:18:41 1997 John W. Eaton * load-save.cc (valid_identifier): Move here and make static. * symtab.h, symtab.cc (valid_identifier): Delete declaration and definition. Fri May 23 22:54:28 1997 John W. Eaton * symtab.h (symbol_def::symbol_def): Use initializer list instead of calling init_state. (symbol_def::init_state): Delete. * symtab.cc (symbol_table::print_stats): New function. * variables.cc (F__dump_symtab_info__): New function. * symtab.h, symtab.cc (symbol_table::hash): Return masked value. (symbol_table::table_size): New data member. (symbol_table::symbol_table): Set size of table in constructor. (HASH_TABLE_SIZE): Replace uses with table_size. (HASH_MASK): Delete. * variables.cc (initialize_symbol_tables): Set top-level and global symbol table sizes here. Thu May 22 13:32:55 1997 John W. Eaton * dynamic-ld.cc (octave_shl_load_dynamic_loader::resolve_reference): Call shl_findsym with type set to TYPE_PROCEDURE. Pass the address of the pointer we want to define. Wed May 21 16:30:25 1997 John W. Eaton * DLD-FUNCTIONS/time.cc (extract_tm): Avoid memory leak in dealing with time zone. * Makefile.in (install-in): Use new mk-includedir-link macro. (install-lib): Install in $octlibdir. Use new mk-libdir-link macro. Tue May 20 01:24:11 1997 John W. Eaton * ov-list.cc (Flist): Rename from Fmake_list. Mon May 19 14:45:58 1997 John W. Eaton * octave.cc (maximum_braindamage): Set default_eval_print_flag to 0. Sat May 17 16:32:23 1997 John W. Eaton * defaults.cc (set_default_editor): Default is now Emacs, not vi. Fri May 16 00:07:11 1997 John W. Eaton * pt-idx.cc (tree_index_expression::name): New function. * pt.cc (tree::str_print_code): New file, new convenience function. * pt-arg-list.cc (tree_argument_list::get_arg_names): Use it. * pt-assign.cc (tree_simple_assignment::rvalue): Likewise. (tree_multi_assignment::rvalue): Likewise. * pt-colon.h (tree_colon_expression::save_base): New data memmber. (tree_colon_expression::preserve_base): New function. * parse.y (finish_colon_expression): When converting to a simple expression, be sure to delete the original colon expression but not the base value. * pt-mat.cc (tree_matrix::~tree_matrix): Actually do something. * pt-all.h: New file. * parse.y, lex.l, pt-pr-code.cc: Use it. * pt.h: Rename from pt-base.h. * All parse tree classes: Add private copy constructors and assignment operators to prevent copying. * pt-base.cc: Delete. * unwind-prot.h, unwind-prot.cc: Make a bit more object-oriented. Change all uses of unwind_protect stuff to match. * pt-jump.h, pt-jump.cc (breaking, continuing, returning): Make these flags static members of the corresponding class. Change all uses. * pt-assign.cc (tree_simple_assignment_expression::eval, tree_multi_assignment_expression::eval): Clear lvalue index here. * oct-lvalue.cc (octave_lvalue::assign): Don't clear index here. * oct-lvalue.h (octave_lvalue::clear_index): New function. (octave_lvalue::set_index): Rename from octave_lvalue::index. Change all callers. Thu May 15 11:48:10 1997 John W. Eaton * pt-select.h, pt-select.cc (class tree_if_command_list, class tree_if_clause, class tree_switch_case_list, class tree_switch_case): Move here from pt-misc.h, pt-misc.cc. * pt-decl.h, pt-decl.cc (class tree_decl_init_list, class tree_decl_elt): Move here from pt-mist.h, pt-misc.cc * pt-arg-list.h, pt-stmt.h: New files, extracted from pt-misc.h. * pt-arg-list.cc, pt-stmt.cc: New files, extracted from pt-misc.cc. * pt-decl.h, pt-except.h, pt-jump.h, pt-loop.h, pt-select.h: New files, extraced from pt-cmd.h. * pt-decl.cc, pt-except.cc, pt-jump.cc, pt-loop.cc, pt-select.cc: New files, extraced from pt-cmd.cc. * pt-unop.h, pt-binop.h, pt-colon.h, pt-idx.h, pt-assign.h: New files, extracted from pt-exp.h * pt-unop.cc, pt-binop.cc, pt-colon.cc, pt-idx.cc, pt-assign.cc: New files, extracted from pt-exp.cc * pt-exp.h, pt-exp.cc: Rename from pt-exp-base.h, pt-exp-base.cc. * oct-lvalue.h: Rename from oct-var-ref.h. Rename class from octave_variable_reference to octave_lvalue. Change all uses. * oct-lvalue.cc: Rename from oct-var-ref.cc. * variables.cc (bind_ans): Only bind ans and print result if value is defined. * defun.cc: New file. Move functions for installing objects in the symbol table here from variables.cc. * oct-obj.h, oct-obj.cc: Add custom allocator, fwiw. * toplev.cc (main_loop): Correctly increment command number. * TEMPLATE-INST/SLList-tm.cc: Don't instantiate lists of pointers to tree_matrix_row objects. * TEMPLATE-INST/SLList-misc.cc: Do instantiate lists of pointers to tree_argument_list objects. * DLD-FUNCTIONS/dassl.cc: Update to use new octave_function interface to user-supplied functions. * DLD-FUNCTIONS/fsolve.cc: Likewise. * DLD-FUNCTIONS/lsode.cc: Likewise. * DLD-FUNCTIONS/npsol.cc: Likewise. * DLD-FUNCTIONS/quad.cc: Likewise. * dynamic-ld.h, dynamic-ld.cc (builtin_fcn_installer typedef): Rename from builtin_fcn. (octave_dynamic_loader::load_fcn_from_dot_oct_file): Simplify by using new installer function defined by DEFUN_DLD. * defun-dld.h (DEFUN_DLD): Use DEFINE_FUN_INSTALLER_FUN instead of DEFINE_FUN_STRUCT_FUN. * defun.h (DEFUN_MAPPER): Use DEFUN_MAPPER_INTERNAL. * defun-int.h (DEFVAR_INTERNAL): Rename from DEFVAR_INT and move here from defun.h. Change all uses. (DEFUN_MAPPER_INTERNAL): New macro. (DEFINE_FUN_INSTALLER_FUN): New macro to define function that the dynamic loader calls to do all the work of installing a new function. (DEFINE_FUN_STRUCT_FUN): Delete. * parse.y: Rewrite to handle more general expressions. * lex.l: Corresponding changes. * pt-walk.h, pt-pr-code.h, pt-pr-code.cc: Cope with new parse tree object structure. * pt-misc.cc (class tree_for_command): Split into tree_simple_for_command and tree_complex_for_command classes. * pt-misc.h, pt-misc.cc (tree_statement::eval): Handle identifier lookup and printing and binding ans here. (tree_statement_list::eval): Simplify. (tree_argument_list::all_elements_are_constant): New function. (class tree_decl_elt): Now contains id and expr, not an assignment expression. * pt-exp-base.h pt-exp.h pt-id.h pt-indir.h pt-mat.h pt-const.h, pt-exp-base.cc pt-exp.cc pt-id.cc pt-indir.cc pt-mat.cc pt-const.cc: Replace eval functions with rvalue and lvalue functions. Change all uses. (lvalue_ok, rvalue_ok): New functions, for future compile-time semantic checks. * oct-var-ref.h (is_defined, is_map): New functions. * pt-exp.h (class tree_oct_obj): Delete. * variables.cc (extract_function, is_valid_function): Return pointer to octave_function, not octave_symbol. (link_to_global_variable): Rewrite. Handle errors in symbol_record::mark_as_linked_to_global. * symtab.h, symtab.cc (class symbol_def, class symbol_record): Symbols are now stored as octave_value objects only. * ov.cc (install_types): Register function types here. * ov-fcn.h, ov-fcn.cc, ov-builtin.h, ov-builtin.cc, ov-mapper.h, ov-mapper.cc, ov-usr-fcn.h, ov-usr-fcn.cc: New classes for functions as values. * ov.h (class octave_value): Don't derive from octave_symbol. * oct-fcn.h, oct-fcn.cc, oct-builtin.h, oct-builtin.cc, oct-mapper.h, oct-mapper.cc, oct-usr-fcn.h, oct-usr-fcn.cc, oct-sym.h, oct-sym.cc: Delete. Sun May 11 17:51:22 1997 John W. Eaton * help.cc (Ftype): Make it work again for functions. * pt-pr-code.cc (tree_print_code::print_parens): New function. Use it in other tree_print_code functions to handle printing all the parens that we found when parsing the expression, not just one pair. * pt-exp-base.h (tree_expression::paren_count): Rename from is_in_parens. * parse.y (maybe_warn_assign_as_truth_value): Use new name. * parse.y (constant): New non-terminal. (simple_expr1): Use it. * parse.y (make_unary_op): Delete. (simple_expr1): Where appropriate, use make_prefix_op and make_postfix_op instead of make_unary_op. Allow increment and decrement ops to work on expressions, not just identifiers. (make_prefix_op, make_postfix_op): Arg is expression, not identifier. Handle old unary_op cases too. (fold (tree_unary_expression *)): Delete. * pt-exp.h, pt-exp.cc (tree_prefix_expression::eval): Handle unary minus and not here. (tree_postfix_expression::eval): Likewise, for transpose and hermitian. (class tree_prefix_expression, class tree_postfix_expression): Derive from tree_unary_expression. Delete identifier member. Delete ident member function. (tree_unary_expression): Don't handle evaluation here. * pt-exp-base.h (mark_in_parens): No longer virtual. Return this. (reference): New virtual function. (class tree_expression): Don't handle expression type here. * pt-mvr-base.h (tree_multi_val_ret::tree_multi_val_ret): Likewise. * pt-mvr.h, pt-mvr.cc (tree_multi_assignment_expression): Likewise. * pt-walk.h (visit_unary_expression): Delete declaration. * pt-pr-code.h, pt-pr-code.cc (visit_unary_expression): Delete. (visit_prefix_expression): Use operand(), not ident(). new, visit_postfix_expression): * pt-id.h, pt-id.cc (increment, decrement): Delete. * pt-misc.cc (tree_parameter_list::define_from_arg_vector): Get a reference to each element and use the assignment operator instead of tree_identifier::define. * pt-id.h, pt-id.cc (tree_identifier::define): Delete versions that take octave_value and octave_symbol args. Sat May 10 23:32:13 1997 John W. Eaton * pt-indir.h, pt-indir.cc (tree_indirect_reference::value): Delete. * oct-var-ref.cc (octave_variable_ref::assign): Clear idx after assignment. * octave_value classes: Add is_constant, is_function, and function_value functions. * ov.h, ov.cc (assign): Return void, not reference to octave_value. (do_index_op): Rename, from index. (do_struct_elt_index_op): Rename, from struct_elt_val. Add version that accepts index arg. Change all uses and derived classes to match. * pt-const.h (index): Delete. * oct-var-ref.h, oct-var-ref.cc (value): Handle indexed structure ops here too. Fri May 9 07:40:59 1997 John W. Eaton * pt-exp.cc (print_rhs_assign_val, symbols_of_pt_exp): New functions. (Vprint_rhs_assign_val): New static variable. (tree_simple_assignment_expression::eval): Use it to optionally allow the rhs (which is the result) of an assignment to be printed instead of the left. * pt-exp.cc (tree_simple_assignment_expression::eval): Use new octave_variabl_reference::index function to handle indexing. * oct-var-ref.h, oct-var-ref.cc (idx): New data member. (octave_variable_reference::index): Set it. (octave_variable_reference::assign): Handle indexing here. Delete version of this function htat takes index arg. * variables.h (struct builtin_varaible): Delete. * variables.cc (install_builtin_variable): Take all elts of builtin_variable struct directly. * defun.h (DEFVAR_INT): Call install_builtin_variable directly. * symtab.h, defun-int.h: Don't include variables.h. * symtab.h (symbol_record::sv_function): Move typedef here. * variables.h: From here. * oct-var-ref.h, oct-var-ref.cc: New files for octave_variable_reference class, extracted from variables.h and variables.cc * Makefile.in: Add them to the appropriate lists. * oct-obj.h (octave_value_list::empty): New function. * variables.h (class octave_variable_reference): Rewrite to work as a proxy class to store a pointer to octave_value and, optionally, the change function to call and the name of the structure element we are referencing. Handle assignment, increment, decrement, and value operations. Thu May 8 23:40:59 1997 John W. Eaton * ov-re-mat.h, ov-re-mat.cc (struct_elt_ref, struct_elt_val, assign_struct_elt): Provide functions for looking up and setting matrix dimensions. * symtab.cc (symbol_record::define): Don't call sv_fcn here. Don't save and restore value here. (symbol_record::define_builtin_var): Do call sv_fcn here. (symbol_record::variable_reference): Don't make value unique here. Return pointer to sv_fcn in octave_variable_reference. * pt-misc.cc (tree_parameter_list::initialize_undefined_elements): Simplify. * pt-id.h, pt-id.cc (tree_identifier::reference): Return octave_variable_reference, not octave_value&. * symtab.h, symtab.cc (symbol_record::variable_reference): Ditto. * pt-indir.h, pt-indir.cc (tree_indirect_ref::reference): Ditto. Simplify too. * pt-const.h (tree_constant::reference, tree_constant::value, tree_constant::assign): Delete unnecessary functions. * pt-id.h, pt-id.cc (tree_identifier::assign): Ditto. * pt-cmd.cc (tree_for_command::do_for_loop_once): Simplify. * ov.h, ov.cc, ov-base.h, ov-base.cc, ov-struct.h, ov-struct.cc (struct_elt_ref): New arg, octave_value* parent. Allow deferred lookup. Return octave_variable_reference, not octave_value&. * ov.h, ov.cc, ov-re-mat.h, ov-re-mat.cc (assign_struct_elt): New virtual functions. * ov.h, ov.cc (Vresize_on_range_error): Now static. * pt-mvr.cc (tree_index_expression::eval): Delete redundant check of error_state. Wed May 7 21:17:00 1997 John W. Eaton * input.cc (generate_completion): Rename from command_generator. Use string objects instead of char*. (generate_possible_completions): Let qsort also make matches unique. (initialize_command_input): Register generate_completion with the command_editor class. (completion_matches): Simplify using generate_completion. * pt-pr-code.cc (tree_print_code::visit_constant): For val, call print_raw, not print. * oct-usr-fcn.h (octave_user_function::argn_sr): New data member. (octave_user_function::install_automatic_vars): Rename from install_nargin_and_nargout. (octave_user_function::bind_automatic_vars): Rename from bind_nargin_and_nargout. * oct-usr-fcn.cc (octave_user_function::eval): Extract arg names from args vector and bind them to argn. * oct-obj.h (octave_value_list::names): New data member. * oct-obj.cc (octave_value_list::stash_name_tags): New function. (octave_value_list::name_tags): Ditto. * pt-const.h, pt-const.cc (tree_constant::print_raw): New function. * pt-misc.h, pt-misc.cc (tree_argument_list::get_arg_names): New function. * pt-mvr.h, pt-mvr.cc (class index_expression): Cache arg names. * toplev.cc (feval): Now static. Handle arg names. * mkops: Cope with moving files defining operators to OPERATORS subdirectory. Tue May 6 00:48:59 1997 John W. Eaton * DLD-FUNCTIONS/getgrent.cc: Use new octave_group class. * DLD-FUNCTIONS/getpwent.cc: Use new octave_passwd class. * syscalls.cc: Simplify by using new functions defined in liboctave/oct-syscalls.cc. * file-io.cc (Ftmpnam): Accept DIR and PREFIX args. Mon May 5 00:54:03 1997 John W. Eaton * ov-str-mat.cc (octave_char_matrix_str::print_name_tag): Print empty strings on one line. * DLD-FUNCTIONS, OPERATORS, and TEMPLATE-INST: New subdirectories. Move appropriate files to new directories. * Makefile.in: Add DLD-FUNCTIONS, OPERATORS, and TEMPLATE-INST directories to VPATH. Fix rules to work with new directory structure. Sun May 4 22:40:45 1997 John W. Eaton * input.cc (initialize_command_input): Rename from initialize_readline. (gnu_readline, octave_gets, get_user_input): Simplify, return string, not char *. * Many of other files: Miscellaneous changes to go along with the changes described in the liboctave/ChangeLog for May 4. More code moved from here to liboctave. Fri May 2 19:50:33 1997 John W. Eaton * pathlen.h: Move to ../liboctave. Thu May 1 21:50:44 1997 John W. Eaton * variables.cc (get_struct_elts): New fucntion. (looks_like_struct, generate_struct_completions): Move here from input.cc, rewrite, and make work again. Wed Apr 30 00:24:05 1997 John W. Eaton * ov-base.h, ov-bool-mat.cc, ov-bool-mat.h, ov-bool.cc, ov-bool.h, ov-ch-mat.cc, ov-ch-mat.h, ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h, ov-file.cc, ov-file.h, ov-list.cc, ov-range.cc, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-scalar.cc, ov-scalar.h, ov-str-mat.cc, ov-struct.cc, ov.h (scalar_value): New function. Same as double_value, but name is consistent with octave_scalar class. * op-fil-b.cc, op-fil-cm.cc, op-fil-lis.cc, op-fil-rec.cc, op-fil-str.cc, op-fil-bm.cc, op-fil-cs.cc, op-fil-m.cc, op-fil-s.cc: New files. * ops.h (ASSIGNOPDECL, DEFASSIGNOP, DEFASSIGNOP_FN, CONVDECL, DEFCONV, BINOPDECL, DEFBINOPX, DEFBINOP, DEFBINOP_OP, DEFBINOP_FN, BINOP_NONCONFORMANT): New macros. * op-b-b.cc, op-bm-bm.cc, op-cm-cm.cc, op-cm-cs.cc, op-cm-m.cc, op-cm-s.cc, op-cs-cm.cc, op-cs-cs.cc, op-cs-m.cc, op-cs-s.cc, op-m-cm.cc, op-m-cs.cc, op-m-m.cc, op-m-s.cc, op-s-cm.cc, op-s-cs.cc, op-s-m.cc, op-s-s.cc, op-str-str.cc: Use them. * Makefile.in (octave): Also depend on ops.o. * builtins.h: Delete. * octave.cc: Add extern declaration here. * mappers.h: Delete. * Makefile.in (INCLUDES): Delete from list. * mkbuiltins: Add extern declaration in builtins.cc. * mkops: New file. * ops.cc: Delete. * Makefile.in (SOURCES): Delete from the list. (ops.cc): New target. (OP_SOURCES): New list. Move all op-*.cc files here from SOURCES. Add $(OP_SOURCES) to SOURCES list. * variables.cc (symbols_of_variables): No longer static. * ov.cc (symbols_of_ov): Rename from symbols_of_value. * ov-base.h: Delete declaration for install_base_type_conversions. * op-b-b.h, op-bm-bm.h, op-cm-cm.h, op-cm-cs.h, op-cm-m.h, op-cm-s.h, op-cs-cm.h, op-cs-cs.h, op-cs-m.h, op-cs-s.h, op-m-cm.h, op-m-cs.h, op-m-m.h, op-m-s.h, op-s-cm.h, op-s-cs.h, op-s-m.h, op-s-s.h, op-str-str.h: Delete. * Makefile.in (INCLUDES): Delete them from the list. Tue Apr 29 22:27:49 1997 John W. Eaton * variables.h, variables.cc (install_builtin_variables): Delete. * mkbuiltins: Also generate install_builtin_variables function. * Makefile.in: Fix rule to call mkbuiltins with correct args. (clean): Also delete def-files and var-files. * defaults.h.in, dirfns.h, error.h, file-io.h, help.h, input.h, lex.h, load-save.h, oct-usr-fcn.h, pager.h, parse.h, pr-output.cc, pr-output.h, pt-mat.h, pt-misc.h, pt-plot.h, toplev.h: Delete declarations of symbols_of_* functions. * data.h, syscalls.h: Delete. * pr-output.cc (octave_print_internal): Leave printing of final new line up to the caller. * ov.h, ov.cc (reset_indent_level, increment_indent_level, decrement_indent_level, newline, indent, reset, curr_print_indent_level, beginning_of_line): New functions and static data to manage indent level for printing. (print_as_scalar): Delete. (print, print_with_name): Always require stream arg. Change all callers. * oct-stream.h (octave_stream::input_stream): Make publicly available. (octave_stream::output_stream): Likewise. * ov-base.h, ov-base.cc, ov.h, ov.cc, ov-file.h ov-base.h (is_file, stream_value, stream_number): New functions. * ov-file.h, ov-file.cc: New files for value class to manage files. * file-io.cc (symbols_of_file_io): Define stdin, stdout, and stderr as octve_file objects, not just integers. (Ffopen, Fpopen): Return octave_file objects, not integer file ids. * syscalls.cc (Fpipe): Likewise. * oct-stream.h, oct-stream.cc (octave_stream_list::insert): Return octave_file object, not integer file id. * ov-base.cc, ov-bool-mat.cc, ov-bool.cc, ov-ch-mat.cc, ov-complex.cc, ov-cx-mat.cc, ov-file.cc, ov-list.cc, ov-range.cc, ov-re-mat.cc, ov-scalar.cc, ov-str-mat.cc, ov-struct.cc, ov.cc (print_name_tag, print_raw): New functions. * help.cc (Ftype): Don't cast symbol definition to tree_constant *. * variables.cc (link_to_global_variable): Don't try to define symbol with tree_constant objects. (bind_ans): Call symbol_record::define directly and then octave_value::print_with_name instead of creating a temporary assignment expression. * pt-pr-code.cc (tree_print_code::indent): Don't use ostream::form. * pt-exp-base.h, pt-exp.h, pt-exp.cc (oper): Return string, not char *. Change all where necessary. Mon Apr 28 16:33:49 1997 John W. Eaton * ov.h (octave_value binary_op enum): Add lshift and rshift. (octave_value assign_op enum): Add lshift_eq and rshift_eq. * ov.cc (assign_op_as_string, binary_op_as_string): Include them. * parse.y (LSHIFT_EQ RSHIFT_EQ LSHIFT RSHIFT): New tokens. Add them to the precedence list. (simple_expr): Add new operators. (make_assign_op, make_binary_op): Handle new operators. * lex.l: Recognize new operators. * lex.l: Recognize them. Sun Apr 27 20:17:49 1997 John W. Eaton * pt-misc.cc (Vsilent_functions, silent_functions): Move here from oct-usr-fcn.cc. (symbols_of_pt_misc): New function. DEFVAR silent_functions. (tree_statement_list::eval): Handle Vsilent_functions here instead of in octave_user_function::eval. (tree_statement::eval): New functions. (tree_statement_list::eval): Use them. Change print flag arg to silent flag. Change all callers. * variables.cc (install_builtin_variables): Call symbols_of_pt_misc. * toplev.cc (parse_and_execute): Delete print arg. Change all callers. (eval_string): Change print flag arg to silent flag. Change callers. * dynamic-ld.h, dynamic-ld.cc: Rewrite to use singleton class. * variables.cc (load_fcn_from_file): Use new dynamic linking class. * dynamic-ld.h (Octave_builtin_fcn): Delete typedef. * dynamic-ld.cc: Simplify via the magic of function pointers. * pt-fcn.h pt-fcn.cc pt-fvc.h pt-fvc.cc pt-fvc-base.h pt-fvc-base.cc: Delete obsolete files. * Makefile.in: Remove them from various lists. * pt-walk.h (visit_octave_user_function): Rename from visit_function. (visit_builtin): Delete. * pt-pr-code.h, pt-pr-code.cc (visit_octave_user_function): Rename from visit_function. (visit_octave_user_function_header): Rename from visit_function_header. (visit_octave_user_function_trailer): Rename from visit_function_trailer. * ov.h, ov.cc (eval): New functions. * dassl.cc, fsolve.cc, lsode.cc, npsol.cc, qpsol.cc, quad.cc: Declare user-defined functions as a pointer to an octave_symbol object, not as a pointer to a tree_fvc object. * symtab.h, symtab.cc: Use new octave_symbol class. * variables.cc (install_builtin_function, install_builtin_mapper, install_builtin_variable, install_builtin_variable_as_function): Make work with new octave_symbol class and symbol table structure. * variables.h: Delete declaration of builtin_function struct. * defun-dld.h (DEFUN_DLD): Simplify. * defun-int.h (DEFINE_FUN_STRUCT): Delete. (DEFINE_FUN_STRUCT_FUN): Rewrite to not use static builtin_function object. * mappers.h: Delete declaration of builtin_mapper_function struct. * mappers.cc: Declare wrapper functions static. * defun.h (DEFUN_MAPPER): Simplify. * oct-sym.h: New file. Declare base class for Octave symbols. * ov.h: Derive octave_value class from octave_symbol. * oct-fcn.h, oct-fcn.cc: New files to declare and define base class for functions. * oct-builtin.h, oct-builtin.cc: New files to declare and define class for built-in functions. * oct-mapper.h, oct-mapper.cc: New files to declare and define class for mapper functions. * oct-usr-fcn.h, oct-usr-fcn.cc: New files to declare and define base class for user-defined functions. * Makefile.in: Add new files to appropriate lists. * pt-id.h, pt-id.cc: Move tree_identifier class here. * pt-fvc.h, pt-fvc.cc: From here. * pt-indir.h, pt-indir.cc: Move tree_indirect_ref class here. * pt-fvc.h, pt-fvc.cc: From here. Thu Apr 24 03:58:16 1997 John W. Eaton * parse.y (magic_colon): New nonterminal. (arg_list): Simplify using magic_colon. * lex.h (class lexical_feedback): Delete maybe_screwed field. New field, parsed_function name. * lex.l (lexical_feedback::init): Initialize it. (handle_identifier): Don't return SCREW. Handle switching symbol table context properly for `function f ()' vs `function x ='. (is_keyword): If looking at function keyword, don't set current symbol table to point to the local table. * parse.y (recover_from_parsing_function): New function. (finish_function_def): Use identifier, not token. Simplify parsing of functions. * ov-list.h, ov-list.cc: New files to implement generic list type. * ov.cc (list_indent): New global variable. (increment_list_indent, decrement_list_indent): New functions. (install_types): Register octave_list type. * ov-base.cc (octave_base_value::is_list): New function. * oct-sym.h: New file. * ov.h (class octave_value): Derive from octave_symbol class. * pt-const.h, pt-const.cc: Delete lots of old useless cruft. * pt-exp.h, pt-exp.cc (tree_binary_expression): Use type codes for operators from octave_value instead of repeating them here. * pt-fvc-base.cc (tree_fvc::increment, tree_fvc::decrement): Delete. * pt-fvc.cc (tree_identifier::increment): Get reference to value and increment that instead of using virutal tree_fvc::increment function. * lex.l: Handle +=, -=, *=, /=, .+=, .-=, .*=, ./=, &=, and |= ops. * parse.y (make_assign_op): Rename from make_simple_assignment and handle different op types. (simple_expr1): Do new ops. * pt-misc.cc (initialize_undefined_elements): Pass op to assign. * pt-cmd.cc (tree_for_command::do_for_command_once): Likewise. * pt-fvc.cc (tree_identifier::assign): Pass op. * pt-exp.cc (tree_simple_assignment_expression): Handle new ops. * variables.cc (octave_variable_reference::assign): Likewise. * ov.h (class octave_value): Likewise. * ov.cc (octave_value::assign_op_as_string): New function. (octave_value::assign, octave_value::convert_and_assign, octave_value::try_assignment_with_conversion, octave_value::try_assignment): Pass op. * pt-pr-code.cc (tree_print_code::visit_simple_assignment_expression): Use expr.oper() instead of printing "=". * op-cm-cm.cc, op-cm-cs.cc, op-cm-m.cc, op-cm-s.cc, op-m-m.cc, op-m-s.cc, op-str-str.cc: Pass op to INSTALL_ASSIGNOP. * ops.h (INSTALL_ASSIGNOP): Pass op. * ov-typeinfo.cc (do_register_assign_op): Include op type in table. (do_lookup_assign_op): Use op in lookup. * ops.h (INSTALL_UNOP): Delete. * input.cc (generate_struct_completions, looks_like_struct): Disable, since they don't work now anyway. * help.cc (Ftype): Work with octave_value instead of a pointer to tree_constant. * symtab.cc (symbol_record_info::symbol_record_info): Likewise. Tue Apr 22 22:59:55 1997 John W. Eaton * file-io.cc (Ffprintf): If first arg is a string, assume FID = 1. Fri Apr 18 20:16:34 1997 John W. Eaton * oct-obj.h, oct-obj.cc: Implement octave_value_list with Array as a data member, not as a class derived from Array. (octave_value_list::length, octave_value_list::resize, octave_value_list::prepend, octave_value_list::append, octave_value_list::reverse): New functions. * op-cm-cm.cc, op-cm-cs.cc, op-cm-m.cc, op-cm-s.cc, op-cs-cm.cc, op-cs-m.cc, op-m-cm.cc, op-m-cs.cc, op-m-m.cc, op-m-s.cc, op-s-cm.cc, op-s-m.cc: Use new bool ops from liboctave instead of the macros defined in ops.h. Thu Apr 17 13:12:22 1997 John W. Eaton * parse.y (ABORT_PARSE): Handle forced_interactive the same as interactive. Mon Apr 14 01:46:50 1997 John W. Eaton * input.cc (octave_read): Don't forget to free input buffer if it exists and has zero length. (gnu_readline): Free buf if fgets returns 0. Wed Apr 9 00:03:57 1997 John W. Eaton * time.cc (mk_tm_map): Only set zone field if HAVE_TM_ZONE or HAVE_TZNAME are defined. Tue Apr 8 12:39:21 1997 John W. Eaton * time.cc (extract_tm): Set tm.tm_zone if HAVE_TM_ZONE is defined, not if HAVE_TMZONE is defined. * Makefile.in (%.oct : %.o): Use $(SH_LD), not $(CXX). Wed Apr 2 21:32:16 1997 John W. Eaton * dynamic-ld.cc, dynamic-ld.h (init_dynamic_linker): Delete function and declaration. * octave.cc (main): Don't call it. Mon Mar 31 00:37:48 1997 John W. Eaton * pt-base-exp.h (tree_expression::eval): Give arg a default value. * pt-const.h (tree_constant::eval): Likewise. * pt-exp.h (tree_prefix_expression::eval, tree_colon_expression::eval, tree_postfix_expression::eval, tree_unary_expression::eval, tree_binary_expression::eval, tree_boolean_expression::eval, tree_simple_assignment_expression::eval): Likewise. * pt-fcn.h (tree_function::eval): Likewise. * pt-fvc.h (tree_identifier::eval, tree_indirect_ref::eval, tree_builtin::eval): Likewise. * pt-mat.h (tree_matrix::eval): Likewise. * pt-misc.h (tree_statement_list::eval): Likewise. * pt-mvr-base.h (tree_multi_val_ret::eval): Likewise. * pt-mvr.h (tree_oct_obj::eval, tree_index_expression::eval, tree_multi_assignment_expression::eval): Likewise. * dassl.cc, fsolve.cc, load-save.cc, lsode.cc, npsol.cc, parse.y, pt-cmd.cc, pt-exp-base.cc, pt-exp.cc, pt-fvc.cc, pt-mat.cc, pt-misc.cc, pt-mvr.cc, pt-plot.cc, quad.cc, toplev.cc, variables.cc: Change callers of eval() to use bool instead of int and to make use of default argument value. * toplev.h, toplev.cc (parse_and_execute, eval_string): Flag args are now bool instead of int. * symtab.h, symtab.cc: Use bool instead of int in more places. * variables.h, variables.cc: Likewise. * lex.h, lex.l: Likewise. * parse.y: Likewise. * help.cc, input.cc, lex.l, load-save.cc, parse.y, pt-fcn.cc: Change callers of symbol_table::lookup to use bool instead of int, and to make use of default arguments. Fri Mar 28 15:33:11 1997 John W. Eaton * parse.y (Vwarn_comma_in_declaration): Delete. (symbols_of_parse): Delete DEFVAR for warn_comma_in_declaration. (decl1): Don't allow commas in declarations. * lsode.cc (struct LSODE_OPTIONS): Handle integer options. (print_lsode_option_list, set_lsode_option, show_lsode_option): Ditto. (lsode_option_table): Add element for step limit. (lsode_user_jacobian): New function. (Flsode): Allow function name arg to be a 2-element string array specifying the function and jacobian function. * variables.cc (get_global_value, set_global_value): New functions. Wed Mar 26 17:08:27 1997 John W. Eaton Implement static variable declaration: * lex.l (is_keyword): Handle static. * octave.gperf: Likewise. * parse.y (Vwarn_comma_in_declaration): Rename from Vwarn_comma_in_global_decl. Handle new static command. * pt-cmd.h, pt-cmd.cc (class tree_decl_command): New base class for static and global declaration commands. (class tree_global_command): Derive from tree_decl_command. (class tree_static_command): New class, derived from tree_decl_command. * pt-fvc.cc, pt-fvc.h (tree_identifier::mark_as_static): New function. * pt-misc.h, pt-misc.h (class tree_decl_elt): Rename from tree_global. (class tree_decl_init_list): Rename from tree_global_init_list. * pt-pr-code.cc, pt-pr-code.h (tree_print_code::visit_decl_command): Rename from visit_global_command. (tree_print_code::visit_decl_elt): Rename from visit_global. (tree_print_code::visit_decl_init_list): Rename from visit_global_init_list. * pt-walk.h (tree_walker::visit_decl_command): Rename from visit_global_command. (tree_walker::visit_decl_elt): Rename from visit_tree_global. (tree_walker::visit_decl_init_list): Rename from visit_global_init_list. * variables.cc (link_to_global_variable): Trying to make a static variable global is an error. * SLList-misc.cc: Instantiate lists of pointers to tree_decl_elt objects, not tree_global objects. * symtab.h, symtab.cc (symbol_record::tagged_static): New field. (symbol_record::mark_as_static, symbol_record::is_static): New functions. * symtab.cc (symbol_record::init_state): Initialize tagged_static. (symbol_record::clear): Don't clear static variables. * symtab.cc (push_context): Don't do anything for static variables. Tue Mar 25 17:17:17 1997 John W. Eaton * ov-bool-mat.cc, ov-bool-mat.h, ov-bool.cc, ov-bool.h: New files. * defaults.cc (symbols_of_defaults): DEFCONST OCTAVE_HOME. * toplev.cc (octave_config_info): Delete use of CXXLIBS. * oct-conf.h.in: Ditto. * octave.cc (maximum_braindamage): Don't bind prefer_zero_one_indexing. * ov.h: Don't declare Vprefer_zero_one_indexing. * ov.cc: Don't define Vprefer_zero_one_indexing. (prefer_zero_one_indexing): Delete. (symbols_of_value): Delete DEFVAR for prefer_zero_one_indexing. * ov.h, ov.cc, ov-base.h, ov-base.cc: Add constructors and extractors for bool and boolMatrix types. * ov.cc (install_types): Register octave_bool and octave_bool_matrix types. * op-cm-cm.cc, op-cm-cs.cc, op-cm-m.cc, op-cm-s.cc, op-cs-cm.cc, op-cs-m.cc, op-m-cm.cc, op-m-cs.cc, op-m-m.cc, op-m-s.cc, op-s-cm.cc, op-s-m.cc, op-s-s.cc, ov-re-mat.cc: Return boolMatrix instead of Matrix object. * ops.h (BOOL_OP3, MX_MX_BOOL_OP): Likewise. * op-b-b.h, op-b-b.cc, op-bm-bm.h, op-bm-bm.cc: New files. * Makefile.in: Add them to the lists. * ops.cc: Include header files here. (install_ops): Call install_b_b_ops() and install_bm_bm_ops() here. * variables.cc (symbols_of_variables): Don't rely on default conversion from int to double for value returned from default_history_size(). * pr-output.cc: Include cstdio. * parse.y (param_list_end): Fix typo in last change. * quad.cc (quad): Cast integer return values to double. * npsol.cc (show_npsol_option): Likewise. * qpsol.cc (show_qpsol_option): Likewise. * file-io.cc (Fsprintf, Ffwrite): Likewise. Mon Mar 24 13:11:47 1997 John W. Eaton * ov-typeinfo.cc (typeinfo): If invoked with an argument, return the type of the argument as a string. Fix doc string. Thu Mar 20 14:47:49 1997 John W. Eaton * mk-oct-links (links_dir): Don't use -h option for grep. It's not needed since we are working on one file at a time anyway. Mon Mar 17 10:53:29 1997 John W. Eaton * lex.l (handle_identifier): When handling indirect_ref, set lexer_flags.quote_is_transpose to 1 so that a.b' to work as expected. * parse.y (param_list_beg, param_list_end): New nonterminals. (param_list, param_list1): Use them. Wed Mar 12 16:57:28 1997 John W. Eaton * Makefile.in (install-strip): New target. Mon Mar 10 22:38:16 1997 John W. Eaton * Makefile.in (clean): Delete .oct files too. * toplev.cc (Vdefault_eval_print_flag): New static variable. (eval_string): New arg, print. (Feval): Pass Vdefault_eval_print_flag to eval_string. (default_eval_print_flag): New function. (symbols_of_toplev): New function. * variables.cc (install_builtin_variables): Call it. * pt-exp.h, pt-exp.cc (class tree_boolean_expression): Rename enum fields `and' and `or' to `bool_and' and `bool_or'. (tree_unary_expression): Rename enum field `not' to `unot'. (class tree_binary_expression): Rename enum fields `and' and `or' to `el_and' and `el_or'. * parse.y: Change all uses. * time.cc (extract_tm): Truncate field values instead of rounding. (gmtime, localtime): Likewise, for timeval. * ov.h (class octave_value): Delete unused variable freeptr. * mappers.cc: Delete functions that are already in liboctave/lo-mappers.cc. * oct-strstrm.cc (octave_base_strstream::tell): Use const_cast, not static_cast. * help.cc (help_from_list): Add missing const qualifiers. * help.h (struct help_list): Likewise. * lex.l (match_any, plot_style_token): Likewise. * load-save.cc (extract_keyword, ascii_save_type): Likewise. * oct-hist.cc (mk_tmp_hist_file): Likewise. * octave.cc (execute_startup_files): Likewise. * octave.gperf (struct octave_kw): Likewise. * pr-output.cc (pr_any_float): Likewise. * pt-mvr.cc (tree_index_expression::eval_error): Likewise. * pt-exp-base.h, pt-exp.h, pt-exp.cc: Likewise. * parse.y: Likewise. Sun Mar 9 03:46:45 1997 John W. Eaton * pt-exp-base.h (tree_expression): Delete extra comma at end of list. * dirfns.cc error.cc file-io.cc fsolve.cc input.cc load-save.cc npsol.cc pt-fcn.cc qpsol.cc quad.cc syscalls.cc toplev.cc variables.cc: Eliminate embedded newlines in string constants. * Map.cc, data.cc, dirfns.cc, dynamic-ld.cc, file-io.cc, fsolve.cc, getgrent.cc, getpwent.cc, getrusage.cc, help.cc, input.cc, load-save.cc, mappers.cc, minmax.cc, npsol.cc, oct-fstrm.cc, oct-procbuf.h, oct-stdstrm.cc, oct-stdstrm.h, oct-stream.cc, oct-stream.h, oct-strstrm.cc, octave.cc, ov-base.h, ov-range.cc, ov-typeinfo.cc, ov.cc, pr-output.cc, pt-cmd.cc, pt-exp.cc, pt-fcn.cc, pt-fvc.cc, pt-mat.cc, pt-misc.cc, pt-plot.cc, qpsol.cc, quad.cc, sort.cc, strfns.cc, symtab.cc, syscalls.cc, sysdep.cc, time.cc, toplev.cc, unwind-prot.cc, unwind-prot.h, variables.cc, xpow.cc: Use `static_cast (val)' instead of old C-style `(T) val' casts. Sat Mar 8 02:35:13 1997 John W. Eaton * load-save.cc (save_ascii_data, save_three_d): Where appropriate, use bool instead of int. (save_binary_data, save_mat_binary_data, save_ascii_data): Print warning instead of error for wrong type arg. * gripes.cc (gripe_wrong_type_arg): New arg, is_error. * pt-plot.cc (save_in_tmp_file): Call save_ascii_data with bool arg, not int. Fri Mar 7 00:56:16 1997 John W. Eaton * dassl.cc (show_dassl_option): For values that are determined automatically, return a string instead of a magic value (-1.0). * fsolve.cc (show_fsolve_option): Likewise. * lsode.cc (show_lsode_option): Likewise. * npsol.cc (show_npsol_option): Likewise. * qpsol.cc (show_qpsol_option): Likewise. * variables.cc (extract_function): New function. * dassl.cc (Fdassl): Use it instead of is_valid_function. * fsolve.cc (Ffsolve): Likewise. * npsol.cc (Fnpsol): Likewise. * qpsol.cc (Fqpsol): Likewise. * quad.cc (Fquad): Likewise. Thu Mar 6 20:07:24 1997 John W. Eaton * sighandlers.cc (my_friendly_exit, octave_new_handler, sigfpe_handler, sigpipe_handler): Don't all error() or warning(). * pager.cc (pager_death_handler): Don't try to clear pager, just print message to cerr. (do_sync): If the status of the pager is bad or it looks like it is dead, restore the interrupt handler. * load-save.cc (extract_keyword (istream&, char*, int&)): Move declaration of buf inside loop, to avoid deleting its guts and then trying to reuse it. (extract_keyword (istream&, char*)): Likewise. Tue Mar 4 20:36:53 1997 John W. Eaton * pt-fcn.cc (tree_function::eval): Protect function from being redefined while it is being evaluated. (unprotect_function): New function, for use with unwind_protect stuff. * pt-fcn.h (tree_function::symtab_entry): New data member. (tree_function::init): Initialize it to 0. (tree_function::stash_symtab_ptr): New function. * parse.y (frob_function_def): Stash pointer to function's symbol_record in the function definition. * symtab.cc (symbol_record::read_only_error): New argument, action. Change all callers. (symbol_record::rename): Don't allow read-only symbols to be renamed. * variables.cc (Fexist): Don't let files with `.' in their names confuse us. * symtab.cc (valid_identifier (const string&)): New function. Sat Mar 1 15:23:14 1997 John W. Eaton * Version 2.0.5 released. Sat Mar 1 01:34:08 1997 John W. Eaton * Makefile.in (stamp-oct-links): New target. Make links in build directory too, so that the tests will work. * quad.cc: If quad is defined, undefine it. * octave.cc: If WITH_KPATHSEARCH is defined, don't define program_invocation_name or program_invocation_short_name. * strftime.c: Update to current version from FSF. * time.cc (Fstrftime): Call strftime with buf = 0 to get buffer size, then call again to actually format the time struct. Fri Feb 28 01:49:48 1997 John W. Eaton Implement switch statement: * parse.y (Vwarn_variable_switch_label): New static variable. (warn_variable_switch_label): New function. (symbols_of_parse): Provide warn_variable_switch_label as Octave variable here. (make_switch_case, finish_switch_command): New functions. (maybe_warn_variable_switch_label): New function. (end_error): Handle endswitch. (switch_command, case_list, case_list1, switch_case, default_case): New nonterminals. (command): Add switch_command here. * lex.l (is_keyword): Handle switch, case, otherwise, and endswitch. * octave_gperf: Recognize switch, case, otherwise, and endswitch. * token.h (end_tok_type): New item, switch_end. * pt-cmd.cc (tree_switch_command): New class. * pt-misc.cc (tree_switch_case, tree_switch_case_list): New classes. * pt-pr-code.cc (tree_print_code::visit_switch_case, tree_print_code::visit_switch_case_list, tree_print_code::visit_switch_command): New functions. * pt-walk.h (tree_walker::visit_switch_case, tree_walker::visit_switch_case_list, tree_walker::visit_switch_command): New pure virtual declarations. Implement new switch statement. * SLList-misc.cc: Instantiate lists of pointers to tree_switch_case objects too. * lex.h, lex.l, parse.y: Delete all references to lexer_flags::iffing. * syswait.h: Include sys/wait.h on NeXT systems, but don't use the WIFEXTED, WEXITSTATUS, and WIFSIGNALLED macros defined there. Also define waitpid in terms of wait4. From Rex A. Dieter . Wed Feb 26 16:43:31 1997 John W. Eaton * oct-stream.cc (octave_base_stream::do_scanf): Don't report an error if a conversion fails or we reach EOF. Tue Feb 25 22:21:05 1997 John W. Eaton * time.cc (strftime): increase initial buffer size. Mon Feb 24 17:49:21 1997 John W. Eaton * pt-fvc.cc (tree_builtin::eval): Enable checking for max number of arguments. * error.cc (handle_message): Don't fail if args is empty. Sun Feb 23 22:42:52 1997 John W. Eaton * lex.h (lexical_feedback::looking_at_return_list): New field. (lexical_feedback::looking_at_parameter_list): Ditto. * lex.l (lexical_feedback::init): Initialize them. (handle_identifier): Use them. * parse.y: Likewise. Fri Feb 21 15:35:18 1997 John W. Eaton * lex.l: Require flex 2.5 or later (we really want 2.5.4 or later, but there seems to be no good way to check the patchlevel). * oct-stream.cc (octave_base_stream::oscanf): Instead of returning an error, just quit processing after a conversion fails. Thu Feb 20 02:58:05 1997 John W. Eaton * Version 2.0.4 released. Wed Feb 19 10:30:14 1997 John W. Eaton * sighandlers.cc (octave_ignore_interrupts, octave_catch_interrupts, octave_set_interrupt_handler): Return old value, not pointer to static data. Fix all uses. * sighandlers.h (octave_interrupt_handler): Move declaration here. * sighandlers.cc: From here. * toplev.cc: Undo previous change. * lex.l (handle_identifier): Allow commands like ls, save, etc. to also be used as simple variable names. Also make it possible to use the normal function call syntax to invoke them. Tue Feb 18 09:22:04 1997 John W. Eaton * Makefile.in (%.oct:%.o, %.oct:pic/%.o): Use $(SH_LDFLAGS) here. * Version 2.0.3 released. Tue Feb 18 00:27:49 1997 John W. Eaton * toplev.cc (run_command_and_return_output): Block SIGCHLD while running subprocess. (cleanup_iprocstream): Unblock it here. * sighandlers.h (BLOCK_SIGNAL, BLOCK_CHILD, UNBLOCK_CHILD): Move here. * sighandlers.cc: From here. * toplev.cc (system): Shift then mask exit status. * help.cc (try_info): Shift first, then mask exit status. * toplev.cc (octave_config_info): Handle option argument. Fri Feb 14 16:23:30 1997 John W. Eaton * oct-stream.cc (octave_base_stream::do_scanf): Don't forget to check to see if the result matrix needs resizing! * Makefile.in (bin-dist): Don't write empty strings to LIBRARIES. Thu Feb 13 03:02:08 1997 John W. Eaton * Makefile.in (stamp-prereq): Depend on stamp-picdir. (all): Don't depend on stamp-prereq or stamp-picdir. (stamp-tinst, stamp-interp, libtinst.a, liboctinterp.a): Do depend on stamp-prereq. (stamp-picdir): Silence noise about making pic. (stamp-tinst, stamp-interp): Use $(SH_LD) $(SH_LDFLAGS) instead of $(CXX) -shared. * oct-conf.h.in: Reinstate RLD_FLAG. * toplev.cc (octave_config_info): Likewise. * data.cc (map_d_m, map_m_d, map_m_m): Rename from map. (Fatan2): Use new function names. * pt-fvc.cc (apply_mapper_fcn): Use member function map() instead of friend function. * gripes.cc (gripe_wrong_type_arg (const char*, const string&)): New function. Wed Feb 12 17:27:53 1997 John W. Eaton * syscalls.cc (symbols_of_syscalls): Add O_ASYNC and O_SYNC. Mon Feb 10 01:22:27 1997 John W. Eaton * dirfns.cc (Freaddir, Fmkdir, Frmdir, Frename): Also return status and error message. * syscalls.cc (Fdup2, Fexec, Ffork, Ffcntl, Funlink, Fmkfifo, Fpipe, Fwaitpid): Also return error message. Sat Feb 8 17:16:09 1997 John W. Eaton * pt-exp.cc (tree_simple_assignment_expression::eval): Return value of RHS, but (if printing) print complete value of LHS. * pr-output.cc (octave_print_internal): Print a new line for empty string matrices. Wed Feb 5 14:30:44 1997 John W. Eaton * oct-stream.cc (scanf_format_list::process_conversion): Accept but don't actually use h, l, and L modifiers. Always insert l modifier for floating point conversions. Fri Jan 31 13:55:10 1997 John W. Eaton * pager.cc (do_sync): Always flush the cout stream after writing. Wed Jan 29 08:25:29 1997 John W. Eaton * defaults.cc (exec_path): Don't include bin_dir in std_path. * pager.cc (do_sync): Flush the cout stream after writing if running in interactive or forced_interactive mode. * mk-oct-links: Rename from mk-oct-links.in. Don't use symbolic links. * Makefile.in: Distribute mk-oct-links, not mk-oct-links.in (mk-oct-links): Delete target. (install-oct, bin-dist): Don't depend on mk-oct-links. Run $(srcdir)/mk-oct-links, not ./mk-oct-links. * qr.cc (qr): Doc fix. Tue Jan 28 10:48:28 1997 John W. Eaton * Makefile.in (install-inc): Create a relative symbolic link. (install-bin): Create a relative symbolic link. Mon Jan 27 12:12:03 1997 John W. Eaton * Version 2.0.2 released. * Makefile.in (CXXFLAGS_NO_PT_FLAGS): Rename from XALL_CXXFLAGS. Substitute bsd_gcc_kluge_targets_frag. * sysdep.cc (Fsleep): New function. (Fusleep): New function. * toplev.cc (octave_config_info): Don't include RLD_FLAG. * oct-conf.h.in: Don't define RLD_FLAG Sun Jan 26 19:41:48 1997 John W. Eaton * sighandlers.cc (sigchld_handler): Block SIGCHLD while sigchld_hander is running. Sat Jan 25 22:36:39 1997 John W. Eaton * Makefile.in (bin-dist): Update for 2.x. Fri Jan 24 10:05:00 1997 John W. Eaton * mk-oct-links.in: New arg, -p, to just print list of files to link. * lex.l (handle_number): Convert `D' or `d' exponents to `e' before scanning. Thu Jan 23 10:00:00 1997 John W. Eaton * pt-pr-code.h, pt-pr-code.cc (tree_print_code::visit_no_op_command): New function. * pt-cmd.h, pt-cmd.cc (tree_no_op_command): New class. * parse.y (make_break_command, make_continue_command, make_return_command): Where they don't really make sense, turn these commands into no-ops. Accept return and break if reading a script file. * toplev.cc (parse_and_execute): Handle return and break in script files. Quit executing commands if an error occurs when reading a script file. Set global_command to 0 after deleting it. (main_loop): If not interactive or forced_interactive, handle break and return, and quit executing commands if an error occurs. Set global_command to 0 after deleting it. * error.cc (Ferror): Doc fix. * pt-walk.h (tree_walker): Add declaration for visit_no_op_command. Wed Jan 22 20:54:12 1997 John W. Eaton * input.cc (gnu_readline): If not using readline, flush rl_outstream after printing prompt. (octave_gets): Also call flush_octave_stdout() if forced_interactive, not just if interactive. (do_input_echo): If forced_interactive, only echo prompt and command line if also reading a script file. Tue Jan 21 23:02:34 1997 John W. Eaton * SLList.h: Include "BaseSLList.h", not . Mon Jan 20 11:11:12 1997 John W. Eaton * lex.l (token_stack): Don't declare static. * pt-plot.cc (tmp_files): Likewise. * toplev.cc (octave_atexit_functions): Likewise. * unwind-prot.cc (unwind_protect_list): Likewise. * ops.h (MX_MX_BOOL_OP): Correctly handle case of one or both arguments being empty. Change all callers. * oct-stream.cc (printf_value_cache::looking_at_string): Handle empty strings correctly now that they are 0x0. * file-io.cc: Don't include "syswait.h" here. Sun Jan 19 22:38:45 1997 John W. Eaton * oct-stream.h (octave_base_stream::seek): Declare offset arg as streamoff, not streampos. (octave_stream::seek): Likewise. * oct-strstrm.h (octave_base_strstream::seek): Likewise. * oct-stdstrm.h (octave_base_stdiostream::seek): Likewise. * oct-iostrm.h (octave_base_iostream::seek): Likewise. * oct-fstrm.h (octave_fstream::seek): Likewise. Fri Jan 17 18:13:10 1997 John W. Eaton * file-io.cc (Ffflush): Handle stdout as a special case. * oct-stream.cc (octave_stream_list::do_get_file_number): Do the work for octave_stream::get_file_number. (octave_stream_list::get_file_number): Convert to static function. Wed Jan 8 11:42:44 1997 John W. Eaton * log.cc (sqrtm): For complex arg case, compute sqrt, not log. Tue Jan 7 00:16:41 1997 John W. Eaton * Version 2.0.1 released. Mon Jan 6 00:00:07 1997 John W. Eaton * pt-mat.cc (tm_row_const_rep::all_mt): New variable. (tm_row_const::all_empty): New function. (tm_row_const::tm_row_const_rep::init): Set all_mt here. (tm_const::all_mt): New variable. (tm_const::all_emtpy): New function. (tm_const::init): Set all_mt here. (tree_matrix::eval): Return an empty matrix if the list contains only empty elements. If it contains only empty strings, return an empty string. Sun Jan 5 12:50:25 1997 John W. Eaton * ops.h (SC_MX_BOOL_OP, MX_SC_BOOL_OP): New arg, empty_result. * op-cm-cm.cc, op-cm-cs.cc, op-cm-m.cc, op-cm-s.cc, op-cs-cm.cc, op-cs-m.cc, op-m-cm.cc, op-m-cs.cc, op-m-m.cc, op-m-s.cc, op-s-cm.cc, op-s-m.cc, op-str-str.cc: Change all uses of SC_MX_BOOL_OP and MX_SC_BOOL_OP macros. Return correct results for empty matrix cases. * pt-fcn.cc (tree_function::eval): If Vdefine_all_return_values is true, initialize return values before evaluating function, for compatibility with Matlab. * oct-stream.cc (get_size): Correctly set size when arg is scalar. Thu Jan 2 12:40:10 1997 John W. Eaton * Makefile.in (install-oct): Quote $(OCT_FILES) in for loop to avoid syntax error from ksh. * pr-output.cc (octave_print_internal): Avoid unused parameter warning from gcc. Thu Dec 19 12:13:42 1996 John W. Eaton * oct-stream.cc (octave_base_stream::do_scanf): Don't treat %l{e,f,g} differently from %{e,f,g}. (octave_base_stream::do_oscanf): Likewise. * sighandlers.cc (sigchld_handler): Fix typos. Wed Dec 18 20:17:23 1996 John W. Eaton * file-io.cc (Ffgetl, Ffgets): Also return number of characters read. * ov-range.cc (octave_range::not): New function. * ov-range.h (octave_range::uminus): New function. * BaseSLList.cc: Include error.h. (BaseSLList::error): Call ::error() to process error message. Fri Dec 13 02:38:19 1996 John W. Eaton * ov.cc (octave_value::convert_and_assign): Preserve lhs value if assignment fails. Wed Dec 11 12:33:16 1996 John W. Eaton * pt-plot.cc (GPLOT_CMD_END): Don't put semicolons at the end of each plot command; it causes trouble with gnuplot 3.5. Tue Dec 10 00:31:13 1996 John W. Eaton * Version 2.0 released. * pr-output.cc (set_format_style): Don't try to access argv unless argc > 1. * SLList-expr.cc SLList-misc.cc SLList-plot.cc SLList-str.cc SLList-tc.cc SLList-tm.cc SLList.h SLStack-i.cc SLStack-pc.cc SLStack-str.cc SLStack-sym.cc SLStack-tok.cc SLStack-ue.cc SLStack-ui.cc, pt-mat.cc: Include Stack.h, Stack.cc, SLStack.cc, and SLList.cc as necessary. * Stack.cc, SLStack.cc, SLList.cc: New files. * Makefile.in (SOURCES): Add them to the list. Mon Dec 9 12:03:45 1996 John W. Eaton * Makefile.in (install-bin): Use $(EXE) suffix so install will find the right file on cygwin32 systems. * ov.h: Declare proper form of do_binary_op as friend to octave_value class. Sat Dec 7 22:00:10 1996 John W. Eaton * oct-stream.cc (do_printf_conv, do_scanf_conv, do_oscanf_num_conv, do_oscanf_str_conv): Convert to real functions instead of CPP macros, using templates where necessary. (do_oscanf_num_conv, do_oscanf_str_conv): Correctly handle discarded values. Fri Dec 6 00:20:25 1996 John W. Eaton * Version 1.94. * Map-*.cc, SLList-*.cc, SLStack-*.cc: Include config.h. * ov.h: Don't include SLList.h. * SLStack.cc: Delete. Move everything to SLStack.h. * BaseSLList.h, BaseSLList.cc: New files. Split out the non-template base class parts of SLList. * Makefile.in (TEMPLATE_SRC): Delete. Move files to SOURCES. * Map.h, Map.cc: Add #pragma interface/implementation. * SLStack.h, SLStack.cc: Add #pragma interface/implementation. * SLList.h, SLList.cc: New files, from libg++, but with #pragma interface/implementation. * Makefile.in (SOURCES): Add SLList.cc. (INCLUDES): Add SLList.h. Thu Dec 5 18:36:44 1996 John W. Eaton * octave.cc: Don't include sun-utils.h. Tue Dec 3 23:47:09 1996 John W. Eaton * op-str-str.cc (eq, ne): Handle operations with scalars. Thu Nov 21 12:30:36 1996 John W. Eaton * ov-str-mat.h (octave_char_matrix_str): Provide transpose and hermitian operators. * ov-ch-mat.h (octave_char_matrix): Likewise. Wed Nov 20 00:35:57 1996 John W. Eaton * sighandlers.h (struct octave_interrupt_handler): Provide forward declaration here. * sighandlers.cc (octave_interrupt_handler): New struct. (octave_catch_interrupts): Rename from catch_interrupts. (octave_ignore_interrupts, octave_set_interrupt_handler): New functions. * help.cc, oct-hist.cc, pager.cc, toplev.cc: Use new functions for handling interrupts so that we can hide the details of whether or not we have to deal with SIGBREAK. * pt-plot.cc [! HAVE_POSIX_SIGNALS] (open_plot_stream): Simply ignore and restore the interrupt handler here. * sighandlers.cc (MAYBE_REINSTALL_SIGHANDLER): New macro. Use it instead of always checking MUST_REINSTALL_SIGHANDLERS everywhere. (sigchld_handler): If octave_child_list is empty, wait for any child, but don't hang, and don't collect status info. [__EMX__] (sigchld_handler): Save and restore handlers for SIGINT, SIGBREAK, and SIGCHLD. Ignore them while waiting on children. (install_signal_handlers): If SIGBREAK exists, handle it like SIGINT. * toplev.cc [USE_READLINE] (clean_up_and_exit): Call rl_deprep_terminal() to restore terminal settings. * sysdep.cc [__EMX__ && OS2] (Fextproc): New command. [__EMX__ && OS2] (FEXTPROC): Alias for Fextproc. * Version 1.93. * sysdep.cc (octave_chdir): [__EMX__]: Make copy of string before converting to upper case. * getgrent.cc (mk_gr_map): Only set the passwd field if HAVE_GR_PASSWD is defined. Tue Nov 19 12:01:13 1996 John W. Eaton * sysdep.cc (OS2_init): New function. [__EMX__] (sysdep_init): Call it. * lex.l (plot_style_token): Add new plot styles for gnuplot 3.6. * pt-plot.cc (subplot_style::columns_ok): Rename from subplot_style::errorbars. Recognize more styles and do a better job of diagnosing column number/style mismatches. * sighandlers.cc (my_friendly_exit): If we are called twice, try to remove the signal handler for SIGABRT and the call abort (). * help.cc (Ftype): If a function is defined from a file and transformed text has not been requested, just print the contents of the file. * parse.y (fold): New functions for constant folding for binary and unary expressions. Keep track of original text even when transformations occur. (make_binary_op, make_boolean_op, make_unary_op): Use them. (finish_colon_expression, finish_matrix): Keep track of original text even when transformations occur. * help.cc (Ftype): Don't mess with Vps4. Handle new option `-transformed'. * pt-const.h, pt-const.cc (tree_constant::print): New arg, pr_orig_text. * pt-exp.h, pt-exp.cc (tree_colon_expression::is_range_constant): Delete. * pt-exp-base.h (tree_expression::original_text): New virtual function. pt-exp-base.cc (tree_expression::original_text): Default version. * pt-pr-code.h (tree_print_code::print_original_text, tree_print_code::prefix): New fields. * pt-pr-code.cc (tree_print_code::visit_constant): Pass print_original_text to tree_constant::print(). (tree_print_code::indent): Use prefix instead of Vps4. * pt-fcn.cc (tree_function::print_function_header, tree_function::print_function_trailer): Pass Vps4 to tree_print_code_constructor for prefix. * pt-misc.cc (tree_statement::maybe_echo_code): Pass Vps4 to tree_print_code_constructor for prefix. * pt-mat.h, pt-mat.cc (tree_matrix::all_elements_are_constant): Rename from is_matrix_constant. (tree_matrix_row::all_elements_are_constant): Likewise. Change all callers. Mon Nov 18 14:13:32 1996 John W. Eaton * Makefile.in (install-inc): Try harder to create the link from include/octave to include/octave-VERSION. Sun Nov 17 14:14:48 1996 John W. Eaton * Makefile.in (parse.cc): Expect 13 shift/reduce conflicts. * parse.y (set_stmt_print_flag): New function. (sep_type): New member for bison %union declaration. Simplify rules for statement lists keeping track of the type of the first separator in the values associated with the nonterminals for the separators. * lex.l (handle_identifier): Set lexer_flags.doing_set if the token is "gset", not "set". Sat Nov 16 21:41:26 1996 John W. Eaton * Makefile.in (parse.cc, lex.cc): Add special rules for these files. Delete pattern rules for .y and .l files. Fri Nov 15 13:48:02 1996 John W. Eaton * pt-plot.cc: Put semicolons at the ends of all plot commands. * defaults.cc (subst_octave_home): Start subsequent searchs from the end of the replaced text. * pr-output.cc (pr_any_float): Kluge for SCO systems. * pr-output.cc (pr_any_float, pr_complex): Don't declare inline. * mappers.cc: Include lo-ieee.h, for isinf and isnan on SCO systems. Thu Nov 14 00:06:19 1996 John W. Eaton * pt-plot.cc (Fgset, Fgshow): New commands. (Fshow): Print warning and call gshow. (Fset): Print warning and call gset. * variables.cc (parse_fcn_file): Add unwind-protect for file pointer, so the file is always closed. (get_help_from_file): Likewise. * toplev.cc (parse_and_execute): Likewise. * Makefile.in (install-oct): Depend on mk-oct-links. (mk-oct-links): New target. * Version 1.92. Wed Nov 13 11:13:22 1996 John W. Eaton * sighandlers.cc (sys_siglist): [__EMX__]: Add definitions. * octave.cc (execute_startup_files): Allow init file name ot be specified by an environment variable. * dirfns.cc (make_absolute): [__EMX__]: Path is already absolute if it begins with any character followed by a colon. * load-save.cc (read_mat_ascii_matrix, get_lines_and_columns, get_complete_line): New functions, for reading headless text files. (load_save_format): Add LS_MAT_ASCII, for headless text files. (do_load): Handle LS_MAT_ASCII files. Thanks to Mel Melchner for initial version of this code. * sysdep.cc: Conditionally include ieeefp.h. (BSD_init, SCO_init): New functions. (sysdep_init): Conditionally call them here. Tue Nov 12 00:14:56 1996 John W. Eaton * pt-plot.cc (open_plot_stream): Don't block SIGCHLD. * load-save.cc (read_binary_data): When reading string arrays, be sure to create an octave_char_matrix_str object, not just an octave_char_matrix object. (read_ascii_data): Likewise. Mon Nov 11 22:52:58 1996 John W. Eaton * load-save.cc (read_binary_data): Don't forget teminating NUL for string that we plan to insert. (read_ascii_data): Likewise. Sun Nov 10 16:58:07 1996 John W. Eaton * dirfns.cc (Ffnmatch): New function. * octave.cc (intern_argv): Use new string_vector constructor. * ov-str-mat.cc (octave_char_matrix_str::all_strings): Have charMatrix::row_as_string() strip trailing whitespace. * dirfns.cc (Fglob): new function. * sysdep.cc (oct_tilde_expand): Provide version that works on string vectors too. (Ftilde_expand): Work on string vector args. * load-save.cc (save_binary_data): Call char_matrix_value() to extract charMatrix from octave_value object, not all_strings(). (save_ascii_data): Likewise. * pt-mat.cc (tree_matrix::eval): Likewise. * ov.h (octave_value::all_strings): Return string_vector, not charMatrix. * ov-base.cc (octave_base_value::all_strings): Likewise. * ov-str-mat.h, ov-str-mat.cc (octave_char_matrix_str::all_strings): Likewise. Fri Nov 8 09:54:59 1996 John W. Eaton * defaults.cc, dynamic-ld.cc, fn-cache.cc, help.cc, oct-hist.cc, octave.cc, pager.cc, pt-fcn.cc, toplev.cc, utils.cc, variables.cc, lex.l: Change #include "" to #include <> for defaults.h, oct-conf.h, oct-gperf.h, y.tab.h, and version.h, to avoid getting them from $srcdir when we really want the version from the build directory. (Maybe this should be done for all the include files, not just those that are auto-generated? Hmm.) * defaults.h.in (CXXLIB_LIST, CXXLIB_PATH, FLIB_LIST, FLIB_PATH): Delete. * Makefile.in (install-oct): Use $(INSTALL_PROGRAM) for .oct files. Thu Nov 7 07:59:07 1996 John W. Eaton * variables.cc (gobble_leading_white_space): New arg, update_pos. * (is_function_file): Don't update file position information here. * Version 1.91. * pt-fvc.cc (tree_indirect_ref::reference): If the lhs object is not a map, convert it to one. * ov-typeinfo.h (init_tab_sz): New static member. * ov-struct.cc, ov-struct.h: Add hooks for custom memory management. * ov-scalar.cc, ov-scalar.h: Likewise. * ov-re-mat.cc, ov-re-mat.h: Likewise. * ov-range.cc, ov-range.h: Likewise. * ov-cx-mat.cc, ov-cx-mat.h: Likewise. * ov-complex.cc, ov-complex.h: Likewise. * ov-ch-mat.cc, ov-ch-mat.h: Likewise. Wed Nov 6 12:32:48 1996 John W. Eaton * pager.cc (do_sync): Don't call clear_external_pager() here. * pt-const.h (tree_constant::allocator) New static member. (tree_constant::operator new, tree_constant::operator delete): Implement with custom allocator. * syscalls.cc (Fgetgid, Fgetegid): New functions. * sighandlers.cc (sigchld_handler): If necessary, reinstall handler after call to waitpid(). * pager.cc (pager_death_handler): Don't use warning() to print message. * getgrent.cc: New file. * Makefile.in (DLD_SRC): Add it. * ov.cc (octave_value::print_with_name): Call is_map() instead of print_as_structure(). * ov-struct.cc (octave_struct::print): Likewise. * ov.h, ov.cc, pt-const.h: Delete force_numeric(), make_numeric(), convert_to_matrix_type(), print_as_structure() member functions. * variables.cc (is_function_file): Call gobble_leading_whitespace here to strip all leading whitespace and comments. (parse_fcn_file): If reading a function file, call gobble_leading_whitespace again after resetting parser state to grab help text. Tue Nov 5 13:00:35 1996 John W. Eaton * syscalls.cc (Fgeteuid, Fgetuid): New functions. * getpwent.cc: Use gripe_not_supported from gripes.cc, instead of local gripe_not_implemented function. * input.cc, sysdep.cc, variables.cc: Only include readline.h and history.h if USE_READLINE is defined. * help.cc: Make it compile without warnings even if USE_GNU_INFO is not defined. * sighandlers.h (octave_child_list): Don't define HAVE_POSIX_SIGNALS HERE. * sighandlers.cc (SIGHANDLER_RETURN): New macro. (generic_sig_handler, sigchld_handler, sigfpe_handler, sigint_handler, sigpipe_handler): Use it. (sigchld_handler, sigfpe_handler, sigint_handler, sigpipe_handler): Only reinstall signal handler if MUST_REINSTALL_SIGHANDLER is defined. Sun Nov 3 00:45:30 1996 John W. Eaton * pt-const.cc (tree_constant::print): Just call val.print(). * ov-base.cc, ov-ch-mat.cc, ov-colon.cc, ov-complex.cc, ov-cx-mat.cc, ov-range.cc, ov-re-mat.cc, ov-scalar.cc, ov-str-mat.cc, ov-struct.cc ov-va-args.cc, ov.cc (print): Handle pr_as_read_syntax arg. * defaults.cc (subst_octave_home): Search for prefix repeatedly in retval, not s. * gripes.h: Make declaration of gripes_not_supported match definition. * mk-oct-links.in: In sed command, match "DEFUN_DLD *( *", not "DEFUN_DLD_BUILTIN *( *". * chol.cc, colloc.cc, dassl.cc, det.cc, eig.cc, expm.cc, fft.cc, fft2.cc, filter.cc, find.cc, fsolve.cc, fsqp.cc, getpwent.cc, getrusage.cc, givens.cc, hess.cc, ifft.cc, ifft2.cc, inv.cc, log.cc, lpsolve.cc, lsode.cc, lu.cc, minmax.cc, npsol.cc, pinv.cc, qpsol.cc, qr.cc, quad.cc, qzval.cc, rand.cc, schur.cc, sort.cc, svd.cc, syl.cc, time.cc: Change all uses of DEFUN_DLD_BUILTIN to be just DEFUN_DLD. * defun-dld.h: Eliminate DEFUN_DLD_BUILTIN. * syswait.h: Use #ifdef HAVE_SYS_WAIT_H, not #if HAVE_SYS_WAIT_H to decide whether to include sys/wait.h. * pt-exp-base.h (tree_expression): Declare oper() here as a virtual member function. * pt-pr-code.cc (tree_print_code::visit_constant): Check for string before checking for char_matrix. * ov-ch-mat.cc (octave_char_matrix::print): Supply correct number of args to octave_print_internal(). Sat Nov 2 20:44:55 1996 John W. Eaton * file-io.cc (Ftmpnam): Rename from Foctave_temp_file_name. * Makefile.in (DLD_SRC): Move time.cc and getrusage.cc here from SOURCES. Add getpwent.cc. * getrusage.cc: Rename from resource.cc. Make getrusage a loadable function. * time.cc: Rename from timefns.cc. Make time functions loadable. * getpwent.cc: New file. Wed Oct 30 01:06:19 1996 John W. Eaton * Version 1.90. * Makefile.in (DISTFILES): Add ChangeLog. * ov-range.cc (octave_range::convert_to_str): New function. * ov-str-mat.h (octave_char_matrix_str::char_matrix_value): Delete function. Already handled by octave_char_matrix class. * ov-ch-mat.h (octave_char_matrix::convert_to_str): New function. * pager.cc (Fmore): Set page_screen_output to 1.0 or 0.0, not "true" or "false". * ov-ch-mat.cc, ov-struct.cc, ov-struct.h, pr-output.cc, pt-cmd.cc, pt-const.cc, pt-const.h, pt-fcn.cc, pt-fvc-base.cc, pt-fvc-base.h, pt-fvc.cc, pt-fvc.h, rand.cc, sighandlers.cc, variables.cc, variables.h: Delete unused code. * octave.cc: Only include pwd.h if HAVE_PWD_H. * oct-strstrm.h: Include , not . * defaults.cc, dirfns.cc, file-io.cc, help.cc, input.cc, oct-hist.cc, oct-procbuf.cc, oct-procbuf.h, octave.cc, pager.h, procstream.h, pt-misc.cc, pt-plot.cc, sighandlers.cc, strftime.c, syscalls.cc, sysdep.cc, syswait.h, toplev.cc, utils.cc, variables.cc: Only include sys/types.h if HAVE_SYS_TYPES_H. * error.h (panic): Use GCC_ATTR_NORETURN macro, not NORETURN. * toplev.h (clean_up_and_exit): Likewise. * utils.h (jump_to_top_level): Likewise. * derfaults.h.in, defaults.cc (local_arch_lib_dir): New variable. * defaults.cc (set_default_local_arch_lib_dir): New function. (install_defaults): Call it. (exec_path): Use Vlocal_arch_lib_dir here. * toplev.cc (octave_config_info): Add localarchlibdir to structure. Tue Oct 29 15:54:27 1996 John W. Eaton * Makefile.in (install-oct): Don't do anything if $(OCT_FILES) is empty. * ov-range.cc (octave_range::index): New Function. (octave_range::all, octave_range::any, octave_range::is_true): Make these functions work. * ov.cc (octave_value::try_assignment_with_conversion): Remove left over debugging print statements. Mon Oct 28 10:49:03 1996 John W. Eaton * strftime.c: Add missing #endif for previous change. Sun Oct 27 14:06:44 1996 John W. Eaton * oct-hist.cc (do_history): Rewite option parsing to avoid (probably bogus) errors from g++ on cygwin32 system. * strftime.c: Use autoconf macros TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H to decide which time.h files to include. * oct-stream.h, oct-stream.cc (octave_stream::error, octave_base_stream::error): Rename errno => err_num. Sat Oct 26 10:40:05 1996 John W. Eaton * oct-hist.cc (do_history): Move declaration of file inside conditional. * defun.h (DEFVAR_INT): Set eternal flag with (svc_fcn != 0) instead of (sv_fcn ? 1 : 0) Fri Oct 25 01:10:51 1996 John W. Eaton * ov-ch-mat.h (octave_char_matrix::any): Return 0.0 instead of false. (octave_char_matrix::all): Likewise. * input.cc (Fecho): When binding value of echo_executing_commands, cast ECHO_* to double. * sighandlers.cc (octave_child_list::do_remove): Delete unused variable `enlarge'. * pt-const.h (tree_constant::tree_constant (const tree_constant&)): Don't pass arg to tree_fvc constructor. * resource.cc (getrusage): [HAVE_GETRUSAGE && RUSAGE_TIMES_ONLY]: Only fill in time values. Thu Oct 24 20:37:28 1996 John W. Eaton * parse.y: Comment out the %expect declaration so byacc can compile this file. (if_cmd_list): Add missing semicolon. Include for getenv if using byacc. * ov.h: Move typedefs outside of octave_value class scope to avoid problem with cygwin32 beta16 compiler. Fri Oct 18 13:44:33 1996 John W. Eaton * ov.h (octave_value::index): Undo previous change. * ov.cc (octave_value constructors): Call maybe_mutate() in most cases. * ov-complex.cc (octave_complex::index): Avoid implicit type conversion back to scalar type. * ov-scalar.cc (octave_scalar::index): Likewise. * ov.h (octave_value::index): Call maybe_mutate() on retval before returning it. Wed Oct 16 12:00:11 1996 John W. Eaton * ov.h (octave_value::struct_elt_val): New optional arg, silent. * ov-base.h, ov-base.cc, ov-struct.h, ov-struct.cc: Likewise, but for the derived classes the arg is required. * data.cc (Fstruct_contains): Require arguments to be struct and string, respectively. Call octave_value::struct_elt_val with silent flag set. * pt-mat.cc (tm_row_const::tm_row_const_rep::eval_error, tm_row_const::tm_row_const_rep::eval_warning): New functions. (tm_row_const::tm_row_const (const tree_matrix_row&): Use them to give better error messages. * pt-fvc.cc (tree_identifier::eval): Avoid dereferencing null object_to_eval. Tue Oct 15 11:35:51 1996 John W. Eaton * op-cs-cm.cc, op-cs-cs.cc, op-cs-m.cc, op-cs-s.cc (complex_matrix_conv): New functions. Install preferred assignment conversion and widening ops. * op-s-cm.cc, op-s-cs.cc (complex_matrix_conv): New functions. Install preferred assignment conversion and widening ops. * op-s-m.cc, op-s-s.cc (matrix_conv): New functions. Install preferred assignment conversion and widening ops. * ov.cc (octave_value::try_assignment_with_conversion, octave_value::convert_and_assign, octave_value::try_assignment): New functions. (octave_value::assign): Use them to implement twisted logic for type conversions in assigments. * pt-const.h (tree_constant::maybe_mutate): New function. * ov.h (octave_value::maybe_mutate): New function. (octave_value::try_narrowing_conversion): New function. Use just one typedef for widening_op_fcn and numeric_conv_fcn. Change all uses. * ov-base.h, ov-complex.h, ov-complex.cc, ov-cx-mat.h, ov-cx-mat.cc, ov-range.h, ov-range.cc, ov-re-mat.h, ov-re-mat.cc, Provide derived class versions of try try_narrowing_conversion(). * pr-output.cc (octave_print_internal): Don't bother handing off to scalar/real versions, even when it would seem appropriate. * symtab.cc (symbol_def::define (tree_constant *)): Call maybe_mutate on constants here. Mon Oct 14 11:05:24 1996 John W. Eaton * pt-fvc.cc (tree_identifier::eval): If retval is undefined and the object to eval is a constant, print error message. * Makefile (distclean): Remove *.oct too. * defun-int.h: Include variables.h here. Sun Oct 13 10:52:28 1996 John W. Eaton * variables.cc (print_symbol_info_line): Never print negative diminsions. * symtab.h (octave_symbol_record_info): Store const_type as string. (octave_symbol_record_info::init): Delete. Fix constructors. (octave_symbol_record_info::type_name): Handle const_type as string. * octave.cc (maximum_braindamage): Replace "true" with 1.0 and "false" with 0.0 in calls to bind_builtin_variable(). Include sun-utils.h here. (intern_argv): Also bind __argv__. Sat Oct 12 13:40:21 1996 John W. Eaton * Makefile.in (distclean): Also delete mk-oct-links. Fri Oct 11 13:13:13 1996 John W. Eaton Changes for Octave's new type system: * arith-ops.cc: Delete. * pt-const.h, pt-const.cc: Massive changes. Most functionality moved to ov.h, ov.cc, and derived classes. * variables.h, variables.cc (octave_variable_reference): New class for getting references to variables and structure elements used in assignments or value contexts. * symtab.h, symtab.cc (symbol_record::define (const octave_value&), symbol_record::variable_value, symbol_record::variable_reference): New functions. (symbol_record_info::type_name): Rename from type_as_string. * pt-fvc-base.h, pt-fvc-base.cc (tree_fvc::increment, tree_fvc::decrement): New functions to replace tree_fvc::bump_value. #if 0 assign and lookup_map_element functions. * pt-mvr.cc (tree_multi_assignment_expression::eval): Generated RHS value is now a tree_constant. * pt-exp.h, pt-exp.cc (tree_boolean_expression): New class. (tree_unary_expression, tree_binary_expression, tree_boolean_expression): Move codes here from tree_expression. (tree_simple_assignment_expression): Cope with changes to way of doing assignments. * pt-exp-base.h, pt-exp-base.cc (enum type): Delete codes for unary and binary ops. (tree_expression::expression_type): Delete. (tree_expression::is_logically_true): Hand off to octave_value::is_true to do real work. * pr-output.h, pr-output.cc (any_element_is_inf_or_nan, all_elements_are_ints): Delete. Call member new functions for these operations. (free_format, plus_format, bank_format, hex_format, compact_format, print_e, print_big_e): Use bool, not int. (octave_print_internal): Hand off to scalar/real versions when appropriate. * octave.cc (main): Call initialize_types() and install_ops(). (verbose_usage): Add WWW address to output. * parse.y (indirect_ref): Handle by making a tree instead of a list using new version of tree_indirect_ref class. * parse.y (make_boolean_op): New function. Use it instead of make_binary_op to create trees for && and || ops. (make_binary_op): Codes come from tree_binary_expression now, instead of tree_expression. (make_unary_op): Codes come from tree_unary_expression now, instead of tree_expression. (make_boolean_op): Codes come from tree_boolean_expression. *parse.y (tree_constant_type): Change type to tree_constant* from octave_value*, and rename from octave_value_type. Change uses. * defun.h (DEFVAR_INT): Pass octave_value not pointer to octave_value for defn when creating builtin_variable. * gripes.h, gripes.cc (gripe_invalid_conversion): Args are strings, not char*. (gripe_implicit_conversion, gripe_divide_by_zero): New extern gripe functions. * mkbuiltins: For each file, create a separate static function to install builtins, then create another single extern function to call all of them. * pt-fcn.cc (tree_function::bind_nargin_and_nargout): Just pass doubles and let symbol_record::define handle creating new value. * pt-pr-code.cc, pt-pr-code.h (visit_constant): Renamed from visit_octave_value. (visit_unary_expression): Use tree_expression::is_prefix_op() instead of switch on op types. * pt-walk.h (visit_constant): Renamed from visit_octave_value. * pt-misc.cc (initialize_undefined_elements): Get reference to tmp, then assign. * pt-cmd.cc (do_for_loop_once): Likewise, for loop identifier. * input.cc (generate_struct_completions, looks_like_struct): Cast tmp_fvc to tree_constant*, not octave_value*. (get_user_input): Call print() on retval, not eval(1). * help.cc (Ftype): Cast defn to tree_constant*, not octave_value*. * balance.cc: Fix docstring. * dassl.cc, fsolve.cc, load-save.cc, lsode.cc, npsol.cc, qpsol.cc, quad.cc: Include pt-fvc.h. * data.cc (Fstruct_contains): call octave_value::struct_elt_val, not octave_value::lookup_map_element. * dirfns.cc (Fcd): Pass directory name as string directly to bind_builtin_variable instead of creating new octave_value. * toplev.cc: Include pt-fvc.h and lo-mappers.h * data.cc, error.cc, file-io.cc, load-save.cc, pager.cc, pt-mat.cc, pt-plot.cc, syscalls.cc, toplev.cc: Include variables.h. * Array-tc.cc, Map-tc.cc, SLList-misc.cc SLList-tc.cc, data.cc, defaults.cc, dynamic-ld.cc, error.cc, gripes.cc, lex.l, octave.cc, oct-map.h, oct-map.cc, oct-obj.h, pt-cmd.cc, pt-exp.cc, pt-fcn.cc, pt-fvc-base.cc, pt-mat.cc, pt-misc.cc, pt-mvr-base.cc, pt-mvr.h, resource.cc, strfns.cc, sysdep.cc, timefns.cc, toplev.cc: Include ov.h instead of pt-const.h. * xpow.cc (any_element_is_negative): Delete. (xpow and elem_xpow functions): Check conformance here. * xdiv.cc (mx_leftdiv_conform, mx_div_conform): Now template-based, taking Matrices instead of dimensions as args. Change all callers. * op-cm-cm.cc, op-cm-cm.h, op-cm-cs.cc, op-cm-cs.h, op-cm-m.cc, op-cm-m.h, op-cm-s.cc, op-cm-s.h, op-cs-cm.cc, op-cs-cm.h, op-cs-cs.cc, op-cs-cs.h, op-cs-m.cc, op-cs-m.h, op-cs-s.cc, op-cs-s.h, op-m-cm.cc, op-m-cm.h, op-m-cs.cc, op-m-cs.h, op-m-m.cc, op-m-m.h, op-m-s.cc, op-m-s.h, op-s-cm.cc, op-s-cm.h, op-s-cs.cc, op-s-cs.h, op-s-m.cc, op-s-m.h, op-s-s.cc, op-s-s.h, op-str-str.cc, op-str-str.h, ops.cc, ops.h, ov-base.cc, ov-base.h, ov-ch-mat.cc, ov-ch-mat.h, ov-colon.cc, ov-colon.h, ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h, ov-range.cc, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-scalar.cc, ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov-struct.cc, ov-struct.h, ov-typeinfo.cc, ov-typeinfo.h, ov-va-args.cc, ov-va-args.h, ov.cc, ov.h: New files for Octave's new type system. * Makefile.in: Add them to the appropriate lists. Sat Sep 14 21:58:33 1996 John W. Eaton * mkbuiltins: Use .df instead of .def. Write one function for each .df file, then call them all in install_builtin_functions(). * Makefile.in: Handle .df instead of .def. * balance.cc (balance): Fix typo in doc string. Wed Aug 28 21:01:49 1996 John W. Eaton * octave.cc (verbose_usage): Include WWW address and bug-octave mailing list address. Tue Aug 20 17:41:19 1996 John W. Eaton * Makefile.in: Only define pattern rules for making .oct files if OCTAVE_LITE is true. Only add pic/ to $(TI_OBJ) if $(SHARED_LIBS) is true. (stamp-picdir): Only create a pic subdirectory if SHARED_LIBS or OCTAVE_LITE is true AND CPICFLAG or CXXPICFLAG is not empty. * minmax.cc (Fmin, Fmax): Deal with changes to Matrix class min/max methods. Thu Jul 25 01:42:38 1996 John W. Eaton * input.cc (generate_possible_completions): Force the names to be unique. * load-save.cc (read_mat_binary_data): Expect to read terminating NUL character in the variable name. (save_mat_binary_data): Likewise, save it here. Wed Jul 24 05:08:07 1996 John W. Eaton * lsode.cc (Flsode): Don't set the return value if an error occurred during integration. * dassl.cc (Fdassl): Likewise. * file-io.cc (symbols_of_file_io): Redefine values of SEEK_SET, SEEK_CUR, and SEEK_END for Matlab compatibility. * oct-stream.cc (seek): Check for compatible values of ORIGIN arg. Also handle "bof", "cof", and "eof". Fri Jul 19 15:24:36 1996 John W. Eaton * pt-const.cc: When creating octave_value_reps from ComplexMatrix values, check to see if all the elements are actually real. Tue Jul 16 10:53:42 1996 John W. Eaton * input.cc (decode_prompt_string): Swap meanings of \h and \H. Mon Jul 15 16:01:51 1996 John W. Eaton * toplev.cc (run_command_and_return_output): Renamed from do_system. (Fsystem): Make `system ("emacs")' work as one would expect. Sun Jul 14 17:34:33 1996 John W. Eaton * file-io.cc (Ffopen, Ffread, Ffwrite): Update doc strings, correctly handle default architecture and precision args. * load-save.cc (mopt_digit_to_float_format): Rename from get_floating_point_format. (float_format_to_mopt_digit): New function. * oct-stream.cc (octave_base_stream::read, octave_base_stream::write): Simplify by calling Matrix::read and Matrix::write to do real work of reading, writing, and format conversion. * oct-stream.h (octave_base_stream): Move data_type enum to liboctave/data-conv.h. Use float_format from liboctave/mach-info.h instead of arch_type enum. * sysdep.h, sysdep.cc (octave_words_big_endian, ten_little_endians): Delete. Now part of oct_mach_info class in liboctave. Tue Jul 9 11:18:59 1996 John W. Eaton * arith-ops.cc, balance.cc, dassl.cc, data.cc, filter.cc, find.cc, fsolve.cc, load-save.cc, log.cc, lsode.cc, minmax.cc, npsol.cc, oct-obj.cc, oct-stream.cc, pr-output.cc, pt-cmd.cc, pt-const.cc, pt-fvc.cc, pt-plot.cc, quad.cc, rand.cc, sighandlers.cc, sort.cc, syscalls.cc, unwind-prot.cc, xdiv.cc, xpow.cc: When indexing arrays, use operator() instead of elem() so that bounds checking can be done consistently. Mon Jun 24 02:13:27 1996 John W. Eaton * Makefile.in (install-oct): Use INSTALL_PROGRAM, instead of INSTALL_DATA for installing shared libraries. * lex.l (grab_help_text): Ignore all initial comment characters, not just the first. * variables.cc (gobble_leading_white_space): Likewise. Sat Jun 22 22:43:45 1996 John W. Eaton * input.h, input.cc (octave_completion_matches_called): New varaible. (Fcompletion_matches): Set it to true on a successful call. * toplev.cc (main_loop): If octave_completion_matches_called is true, don't increment current_command_number. Thu Jun 13 03:52:19 1996 John W. Eaton * variables.cc (is_mapper_function_name, is_builtin_function_name): New functions. (Fdocument): Use them. Define as regular function, not a text style function. Thu Jun 6 00:09:25 1996 John W. Eaton * pt-plot.cc: Handle new built-in variable `gnuplot_has_frames'. Wed Jun 5 14:45:04 1996 John W. Eaton * input.cc (decode_prompt_string): \h now means the whole host name and \H is the host name up to the first `.'. Thu May 30 23:41:51 1996 John W. Eaton * fn-cache.cc (octave_fcn_file_name_cache::do_list): Always recompute the lists of function files instead of trying to cache them. Tue May 28 12:05:24 1996 John W. Eaton * utils.cc (warn_old_style_preference): New function. (check_preference): Use it. * fn-cache.h: Include here. Fri May 24 00:57:14 1996 John W. Eaton * input.cc (completion_matches): Don't return empty string_vectors. * octave.cc (long_opts): Add braindead. Thu May 23 01:49:33 1996 John W. Eaton * input.cc (gnu_readline): New optional arg, force_readline. (get_user_input): Use it. * pt-const.cc (OCT_VAL_REP::assign): If converting the rhs to a numeric value, convert a copy, not the actual object. (OCT_VAL_REP::do_index): Prevent s([]) from resulting in a string with zero rows. * mappers.cc: Handle toascii here. * strfns.cc: Not here. * mappers.cc: Handle tolower and toupper here. * mappers.h: Rename can_return_complex_for_real to flag and overload meaning for ch_mapper. * pt-fvc.cc (apply_mapper_fcn): Handle overloaded meaning. * syscalls.cc (stat): Return 3 values instead of just 1. (lstat): Likewise. Wed May 22 02:34:20 1996 John W. Eaton * pt-const.cc (OCT_VAL_REP::make_numeric): For string to number conversions, correctly set type tag before calling force_numeric. (do_binary_op): Force string to number conversion if both args are strings and we are doing some sort of comparison operation. * Makefile.in (stamp-tinst, stamp-interp): Use SH_TERMLIBS and SH_LIBS instead of TERMLIBS and LIBS. * pt-const.cc (do_unary_op): Add special case to handle transposing strings. * pt-mat.cc (Vstring_fill_char): New variable. (symbols_of_pt_mat): DEFVAR it. * input.cc (generate_struct_completions, generate_possible_completions): Return string_vector, not char **. Change all callers. * pt-const.cc (lookup_map_element): Use substr() correctly. Tue May 21 21:37:17 1996 John W. Eaton * oct.h: New file. * Makefile.in (INCLUDES): Add it to the list. * octave.cc: New args --no-site-file and --no-init-file. Delete --ignore-init-file. The flag --norc (-f) implies both --no-site-file and --no-init-file. Fri May 17 01:54:51 1996 John W. Eaton * input.cc (Fcompletion_matches): New function. * utils.cc (get_fcn_file_names): Delete. * help.cc (simple_help): Use new file name cache instead of calling get_fcn_file_names. * variables.cc (make_name_list): Likewise. * fn-cache.h, fn-cache.cc, Map-fnc.cc: New files. * Makefile.in: Add them to the lists. * Makefile.in (uninstall): Install in octincludedir, not includedir. * pt-plot.h: Include here. Thu May 16 10:52:51 1996 John W. Eaton * oct-stream.cc (octave_stream::oscanf, octave_base_stream::oscanf, octave_base_stream::do_oscanf): New functions for backward compatibility with older versions of Octave. (scanf_format_elt, scanf_format_list): Keep track of width specifier. * file-io.cc (Fscanf): New function. (Fscanf, Ffscanf, Fsscanf): Handle compatibility arg. Wed May 15 01:00:12 1996 John W. Eaton * oct-stream.cc (do_scanf): If doing '%c' conversion, unset ios::skipws on input stream. * sighandlers.h, sighandlers.cc (octave_child, octave_child_list): New classes for keeping track of the child processes we create. (sigchld_handler): Check in octave_child_list to see if there is anything we can do for the child that died. * pager.cc: Register child pager process. * pt-plot.cc: Likewise, for the plotter. * Array-oc.cc: New file * Makefile.in (TI_SRC): Add it to the list. * pager.cc (do_sync): Don't check error_state. (flushing_output_to_pager): New static variable. (flush_octave_stdout): Use it to avoid doing anything if already flushing output. * sighandlers.cc (sigchld_handler): Call warning instead of writing directly to cerr. (sigpipe_handler): Call warning instead of message. * octave.cc (main): Call install_signal_handlers, initialize_file_io, initialize_symbol_tables, and install_builtins before parsing command line options. * user-prefs.h, user-prefs.cc: Delete. * utils.cc (check_preference): Move here. * user-prefs.cc: From here. * defaults.cc: New file. Move initialization stuff from variables.cc. Move DEFVARS for EDITOR, EXEC_PATH, LOADPATH, IMAGEPATH, and OCTAVE_VERSION here. * user-prefs.h, user-prefs.cc: Delete all stuff related to INFO_FILE and INFO_PROGRAM. * help.cc: Move all of that here. (symbols_of_help): Add DEFVARS for INFO_FILE and INFO_PROGRAM. Tue May 14 00:23:06 1996 John W. Eaton * pager.cc (do_sync): Be more defensive about sending stuff to the external pager. * sighandlers.cc (sigchld_handler): For now, only wait for octave_pager_pid. Don't call error(). Do set octave_pager_pid to -1 if the pager process no longer exists. * user-prefs.h, user-prefs.cc: Delete all stuff related to PWD. * dirfns.cc: Move all of that here. (symbols_of_dirfns): New function. * variables.cc (install_builtin_variables): Call it. * user-prefs.h, user-prefs.cc: Delete all stuff related to default_save_format and save_precision. * load-save.cc: Move all of that here. (symbols_of_load_save): New function. * variables.cc (install_builtin_variables): Call it. * user-prefs.h, user-prefs.cc: Delete all stuff related to warn_divide_by_zero. * arith-ops.cc: Move all of that here. (symbols_of_arith_ops): New function. * variables.cc (install_builtin_variables): Call it. * mappers.cc: Add wrappers for ctype is* functions so that they will work on systems that only define them as macros. Mon May 13 00:27:08 1996 John W. Eaton * user-prefs.h, user-prefs.cc: Delete all stuff related to suppress_verbose_help_message. * help.cc: Move all of that here. (symbols_of_help): New function. * variables.cc (install_builtin_variables): Call it. * user-prefs.h, user-prefs.cc: Delete all stuff related to treat_neg_dim_as_zero. * pt-const.cc: Move all of that here. * pager.cc (octave_pager_stream::do_sync): Don't return early if not interactive. * data.h: New file. * Makefile.in (INCLUDES): Add it to the list. * data.cc (symbols_of_data): New function. Move definition of I, Inf, J, NaN, e, eps, i, inf, j, nan, pi, realmin, and realmax here. * variables.cc: From here. (install_builtin_variables): Call symbols_of_data. * file-io.cc (symbols_of_file_io): New function. Move definition of SEEK_CUR, SEEK_END, SEEK_SET, stdin, stdout, stderr here. * variables.cc: From here. (install_builtin_variables): Call symbols_of_file_io. * user-prefs.h, user-prefs.cc: Delete all stuff related to do_fortran_indexing, implicit_str_to_num_ok, ok_to_lose_imaginary_part, prefer_column_vectors, prefer_zero_one_indexing, print_answer_id_name, propagate_empty_matrices, resize_on_range_error, and struct_levels_to_print. * pt-const.cc: Move all of that here. (symbols_of_pt_const): New function. * variables.cc (install_builtin_variables): Call it. * pt-fvc.cc (tree_identifier::assign): Use Vresize_on_range_error instead of user_pref.resize_on_range_error here. * load-save.cc (save_mat_binary_data): Use Vimplicit_str_to_num_ok instead of user_pref.implicit_str_to_num_ok here. * utils.cc (empty_arg): Use Vpropagate_empty_matrices instead of user_pref.propagate_empty_matrices here. * pt-exp-base.cc (tree_expression::is_logically_true): Likewise.. * pt-fcn.cc (symbols_of_pt_fcn): Also move DEFVAR for default_return_value here. * user-prefs.h, user-prefs.cc: Delete all stuff related to ps1, ps2, ps4, and completion_append_char. * input.cc: Move all of that here. (symbols_of_input): New function. * variables.cc (install_builtin_variables): Call it. * pt-pr-code.cc (indent): Use Vps4 instead of user_pref.ps4 here. * help.cc (Ftype): Also here. * user-prefs.h, user-prefs.cc: Delete all stuff related to automatic_replot, gnuplot_binary, and gnuplot_has_multiplot. * pt-plot.cc: Move all of that here. (symbols_of_pt_plot): New function. * variables.cc (install_builtin_variables): Call it. * user-prefs.h, user-prefs.cc: Delete all stuff related to beep_on_error. * error.cc: Move all of that here. (symbols_of_error): New function. * variables.cc (install_builtin_variables): Call it. * user-prefs.h, user-prefs.cc: Delete all stuff related to empty_list_elements_ok. * pt-mat.cc: Move all of that here. (symbols_of_pt_mat): New function. * variables.cc (install_builtin_variables): Call it. * user-prefs.h, user-prefs.cc: Delete all stuff related to define_all_return_values, return_last_computed_value, and silent_functions. * pt-fcn.cc: Move all of that here. (symbols_of_pt_fcn): New function. * variables.cc (install_builtin_variables): Call it. * user-prefs.h, user-prefs.cc: Delete all stuff related to whitespace_in_literal_matrix. * lex.l: Move all of that here. (symbols_of_lex): New function. * variables.cc (install_builtin_variables): Call it. * user-prefs.h, user-prefs.cc: Delete all stuff related to warn_assign_as_truth_value, warn_comma_in_global_decl, warn_function_name_clash, and warn_missing_semicolon. * parse.y: Move all of that here. (symbols_of_parse): New function. * variables.cc (install_builtin_variables): Call it. * user-prefs.h, user-prefs.cc: Delete all stuff related to output_precision, output_max_field_width, print_empty_dimensions, and split_long_rows. * pr-output.cc: Move all of that here. (symbols_of_pr_output): New function. * variables.cc (install_builtin_variables): Call it. * user-prefs.h, user-prefs.cc: Delete all stuff related to page_screen_output, page_output_immediately, and pager_binary. * pager.cc: Move all of that here. * user-prefs.h (check_preference): Provide declaration. * user-prefs.cc (check_preference): Make external. * toplev.cc (Foctave_config_info): New function. * oct-conf.h.in: New file * Makefile.in (oct-conf.h): New target. Add it to the appropriate lists. * sighandlers.cc (sigchld_handler): Don't complain about wait returning a negative value. * file-io.cc (Fsscanf, Fsprintf): Pass true for second arg of octave_stream constructor. * oct-stream.h (octave_stream): New field, preserve. (octave_stream::~octave_stream): If preserve, don't delete rep. * pager.cc (symbols_of_pager): Set default for page_output_immediately to 0. * toplev.cc (do_system): Correctly handle return_output. Append ends to output_buf before calling str(). * variables.cc: If M_PI and M_E are available, use them. * mk-oct-links.in (links_dir): If old link exists, delete it first. Sun May 12 01:46:07 1996 John W. Eaton * Makefile.in (DISTFILES): List defaults.h.in and oct-gperf.h here. (INCLUDES): Not here. (install-inc): New target. (uninstall): Also delete libraries and include files. (install-inc): If linkdir is a directory, leave it alone. (TERMLIBS, LIBPLPLOT, LIBDLFCN): Don't substitute here (now in Makeconf). * oct-stream.cc (octave_base_stream::do_read): Provide initial value for tmp var. * pt-walk.h, pt-pr-code.h, pt-pr-code.cc: New tree-walking classes. * Makefile.in: Add them to the appropriate lists. * pt-fvc-base.h, pt-exp-base.cc, pt-fvc-base.cc, pt-mvr-base.cc, pt-base.cc, pt-mvr.cc, pt-mat.h, pt-mat.cc, pt-fvc.cc, pt-const.cc, pt-cmd.cc, pt-const.h, pt-misc.cc, pt-plot.cc, pt-fcn.cc, pt-plot.h, pt-mvr.h, pt-mvr-base.h, pt-misc.h, pt-fcn.h, pt-exp.h, pt-exp.cc, pt-exp-base.h, pt-fvc.h, pt-cmd.h, pt-base.h: Replace print_code stuff with accept() functions. Add member access functions where necessary. * help.cc (Ftype): Update to use new method of walking trees to print text representation of user-defined functions. * file-io.cc (Ffscanf): Update doc string. (Fsscanf): Likewise. * oct-stream.cc (octave_base_stream::do_read): Correctly set max_size. Pad mval with zeros on final resize. (octave_base_stream::do_scanf): Likewise. (do_scanf_conv): Correctly resize mval. Sat May 11 05:14:09 1996 John W. Eaton * pager.cc (octave_pager_buf::sync): Correctly set bypass_pager. * lex.l ({SNLCMT}*\]{S}*): Match SNLCMT, not just SNL. Fri May 3 11:05:30 1996 John W. Eaton * pt-const.cc (OCT_VAL_REP::set_index): Complain if type can't be indexed. * input.cc (get_user_input): Don't increment input line number if input is coming from eval string. * user-prefs.cc: Allow empty strings for prompts. Thu May 2 10:50:29 1996 John W. Eaton * pt-mvr.h (class tree_oct_obj): Declare values data member const. Sun Apr 28 03:16:52 1996 John W. Eaton * user-prefs.h (user_preferences): New field, `page_output_immediately'. * user-prefs.cc (init_user_prefs): Initialize it. (page_output_immediately): New function. * pager.cc (syms_of_pager): Add DEFVAR. (really_flush_to_pager): New file-scope variable. (flush_octave_stdout): Set and restore it. (octave_pager_buf::sync): Check it, user_pref.page_screen_output, and user_pref.page_output_immediately to decide when to really flush output. (more_than_a_screenful): New function. If paging but not immediately, then check this too. * pager.cc (default_pager): Move here from variables.cc. If pager is less and LESS is not in the environment, append useful flags. (symbols_of_pager): New function. * variables.cc (install_builtin_variables): Call it. Delete pager-related DEFVARs. * syswait.h (WIFSIGNALLED): Define if sys/wait.h doesn't. * sighandlers.cc: Handle SIGCHLD. * pager.cc, pager.h: Rewrite. * pt-mvr.cc, pt-misc.cc, pt-fcn.cc, pt-const.cc, oct-hist.cc, file-io.cc, help.cc, variables.cc, qpsol.cc, dassl.cc, quad.cc, npsol.cc, lsode.cc, fsolve.cc, load-save.cc, dirfns.cc, octave.cc, toplev.cc, error.cc, input.cc: Write to octave_stdout and octave_diary instead of calling maybe_page_output() or maybe_write_to_diary_file(). * oct-procbuf.h, oct-procbuf.cc: New files. * procstream.h (class procstreambase): Use octave_procbuf instead of procbuf from libg++, so we can get pids of subprocesses. Fri Apr 26 01:21:29 1996 John W. Eaton * pt-const.cc (OCT_VAL_REP::do_index): Call maybe_mutate() before returning. * mappers.h (struct Mapper_fcn): Delete. (struct builtin_mapper_function): New field ch_mapper. * pt-fvc.h (tree_builtin): Convert type of mapper_fcn from Mapper_fcn to builtin_mapper_function. * variables.cc (install_builtin_mapper): Likewise, for arg. Simplify, since we don't have to do the copying ourselves now. * pt-fvc.cc (apply_mapper_function): Handle ch_mapper case. * defun.h (DEFUN_MAPPER): Likewise. * mappers.cc (install_builtin_mappers): Likewise. Add ctype is* functions here. Thu Apr 25 00:57:06 1996 John W. Eaton * arith-ops.h, defun-int.h, defun.h, dynamic-ld.h, gripes.h, load-save.h, oct-map.h, oct-obj.h, oct-stream.h, pt-cmd.h, pt-const.h, pt-exp-base.h, pt-exp.h, pt-fcn.h, pt-fvc-base.h, pt-fvc.h, pt-mat.h, pt-misc.h, pt-mvr-base.h, pt-mvr.h, pt-plot.h, symtab.h, toplev.h, utils.h, variables.h, xpow.h, Array-tc.cc, Map-i.cc, Map-tc.cc, SLList-tc.cc, arith-ops.cc, balance.cc, bogus.cc, chol.cc, colloc.cc, dassl.cc, data.cc, det.cc, dirfns.cc, eig.cc, error.cc, expm.cc, fft.cc, fft2.cc, file-io.cc, filter.cc, find.cc, fsolve.cc, fsqp.cc, givens.cc, gripes.cc, help.cc, hess.cc, ifft.cc, ifft2.cc, input.cc, inv.cc, load-save.cc, log.cc, lpsolve.cc, lsode.cc, lu.cc, minmax.cc, npsol.cc, oct-hist.cc, oct-obj.cc, oct-stream.cc, pager.cc, pinv.cc, pr-output.cc, pt-cmd.cc, pt-const.cc, pt-exp-base.cc, pt-exp.cc, pt-fcn.cc, pt-fvc-base.cc, pt-fvc.cc, pt-mat.cc, pt-misc.cc, pt-mvr-base.cc, pt-mvr.cc, pt-plot.cc, qpsol.cc, qr.cc, quad.cc, qzval.cc, rand.cc, resource.cc, schur.cc, sort.cc, strfns.cc, svd.cc, syl.cc, symtab.cc, syscalls.cc, sysdep.cc, timefns.cc, toplev.cc, utils.cc, variables.cc, xpow.cc, parse.y: Rename tree_constant -> octave_value. Rename Octave_object -> octave_value_list. Wed Apr 24 22:15:34 1996 John W. Eaton * toplev.cc (Fsystem): Merge functionality of async_system and sync_system. * oct-fstrm.h, oct-iostrm.h, oct-prcstrm.h, oct-stdstrm.h, oct-stream.h, oct-strstrm.h, oct-fstrm.cc, oct-iostrm.cc, oct-prcstrm.cc, oct-stdstrm.cc, oct-stream.cc, oct-strstrm.cc, Array-os.cc: New files. * Makefile.in: Add them to the appropriate lists. * file-io.cc: Rewrite to use new stream classes. Tue Apr 23 18:59:25 1996 John W. Eaton * gripes.cc (gripe_not_supported): New function. * toplev.cc (do_octave_atexit, Fatexit): New functions. (octave_atexit_functions): New file-scope variable. * octave.cc (main): Register do_octave_atexit with atexit. * variables.cc (install_builtin_variables): Call symbols_of_syscalls here. * syscalls.h, syscalls.cc: New files. Mon Apr 22 21:14:01 1996 John W. Eaton * syscalls.cc: New file. (Flstat, Fmkfifo, Fstat, Funlink, Fwait, Fwaitpid): Move here. * file-io.cc: From here. * Makefile.in (SOURCES): Add syscalls.cc to the list. Wed Apr 17 18:34:10 1996 John W. Eaton * file-info.h, file-info.cc: Delete files. * Makefile.in: Remove from lists. * toplev.cc (Fquit): Accept exit status argument. (Fflops): Delete (now a function file). Thu Apr 11 16:20:20 1996 John W. Eaton * lex.l: Recognize `.'. Update current_input_column even for unrecognized characters. Return LEXICAL_ERROR for unrecognized characters. Mon Apr 8 19:59:01 1996 John W. Eaton * variables.cc (install_builtin_variables): Split into several functions to make compiling with g++ go faster and consume less memory. Sun Apr 7 16:25:35 1996 John W. Eaton * load-save.cc (Fsave): Print usage if i == argc. (Fload): Likewise. Sat Apr 6 21:26:49 1996 John W. Eaton * Makefile.in (clean): Also delete pic/*.o (maintainer-clean, distclean): Also remove stamp-picdir, stamp-tinst, stamp-interp, and pic directory. (stamp-prereq): New target. Wed Apr 3 11:19:30 1996 Rick Niles * resource.cc: Don't make including sys/resource.h and sys/times.h mutually exclusive. Fri Mar 29 13:43:37 1996 John W. Eaton * Makefile.in (distclean): Delete so_locations, which is created on DEC Alpha systems. Thu Mar 28 02:53:48 1996 John W. Eaton * utils.h (undo_string_escape): Provide extern declaration here. * lex.l (NL): Allow \r\n as new line character. (.): Complain if invalid character is found on input Fri Mar 22 03:47:52 1996 John W. Eaton * resource.cc (getrusage): If getrusage is missing, try using times to at least fill in the cpu time values. If neither one is available, return 0 for cpu times instead of NaN. * sighandlers.cc (octave_signal_mask): New file-scope variable. (octave_save_signal_mask, octave_restore_signal_mask): New functions. * toplev.cc (main_loop): Use them. Wed Mar 20 01:21:28 1996 John W. Eaton * utils.cc (get_fcn_file_names (const string&, int)): Resize retval to value of k, not i. (get_fcn_file_names (int)): In loop for copying names to retval, don't increment j twice. Mon Mar 18 22:27:19 1996 John W. Eaton * Makefile.in ($(MAKEDEPS)): Depend on oct-gperf.h. Fri Mar 1 18:15:52 1996 John W. Eaton * fsolve.cc (fsolve_options): Delete unused argument nargout. * filter.cc: Use MArray instead of Array so that automatic conversions will work again. Tue Feb 27 04:49:51 1996 John W. Eaton * variables.cc (looks_like_octave_copyright): Make the strings that we are trying to match both have length 29. * Makefile.in (install-bin): Use $(INSTALL_PROGRAM), not $(INSTALL). * load-save.cc (read_mat_binary_data): Make sure name is NUL terminated. Mon Feb 26 18:18:45 1996 John W. Eaton * variables.cc (whos): Make argv from tmp_args, not args. * defun.h (DEFCONSTX): Don't stringify name. Sat Feb 24 01:12:59 1996 John W. Eaton * Makefile.in (install-oct): Make mk-oct-links executable. * mk-oct-links.in (links_dir): Update to match new format of DEFUN_DLD_BUILTIN macro. Use LN_S, not just LN. (links_dir): * pr-output.cc (octave_print_internal): New arg, extra_indent, for versions of this function that take matrices and ranges. * pt-const.cc (TC_REP::print (ostream&)): Fix printing of structures. Pass struct_indent to octave_print_internal as appropriate. (print_with_name (ostream&, const string&, bool)): Handle spacing around `=' differently for structures. Fri Feb 23 04:51:04 1996 John W. Eaton * token.cc (token (double, const string&, int, int)): Store orig_text. Tue Feb 20 20:36:01 1996 John W. Eaton * variables.cc (Fclear): Fix off-by-one error. Sat Feb 17 16:54:02 1996 John W. Eaton * oct-hist.cc (default_history_file): Append "/.octave_hist" to return value, not to home_directory. Fri Feb 16 18:10:46 1996 John W. Eaton * utils.cc: (NINT, D_NINT): Move to liboctave. * sysdep.cc (octave_ieee_init): Move to liboctave. * procstream.h, procstream.cc: Rewrite. * pager.cc (cleanup_oprocstream): New static function. * toplev.cc (cleanup_iprocstream): Likewise. * dirfns.cc (cleanup_iprocstream): Likewise. * unwind-prot.cc (matrix_cleanup, complex_matrix_cleanup): Delete. Thu Feb 15 22:03:28 1996 John W. Eaton * oct-obj.cc, oct-obj.h: Move most code to the header. * oct-obj.cc (make_argv, all_strings): New member functions. * utils.cc: Moved from here. * load-save.cc: Move byte swapping stuff to liboctave. Move float format conversion stuff to liboctave. (all_parts_int, too_large_for_float): Move to liboctave. * symtab.cc (valid_identifier): Move here. * load-save.cc: From here. * sysdep.cc: Move floating-point format stuff to liboctave. * pr-output.cc: Include float-fmt.h here. Wed Feb 14 01:49:20 1996 John W. Eaton * defun.h, defun-dld.h, defun-int.h: Simplify interface for DEFUN, DEFUN_DLD, DEFVAR, and DEFCONST macros. Change all uses. * qzval.cc: Move guts to liboctave. Tue Feb 13 10:28:27 1996 John W. Eaton * variables.cc (parse_fcn_file): Also avoid saving history if input is from a script file. * help.cc (Ftype): Call unwind_protect_str for user_pref.ps4. * npsol.cc (nonlinear_constraints_ok): Now static. * npsol.cc (linear_constraints_ok): Now static. * qpsol.cc (linear_constraints_ok): Duplicate here. * data.cc (Flinspace): Don't print usage message if nargin == 2. Sun Feb 11 14:20:32 1996 John W. Eaton * mk-oct-links.in: Rename from mk-oct-links. (LN_S): Use this variable instead of ln. Set -e option for shell. Exit with status of last command. Print message when making link. * Makefile.in (DISTFILES): Add mk-oct-links.in to the list. (install-oct): Run ./mk-oct-links, not $(srcdir)/mk-oct-links. * variables.cc (install_builtin_variables): Restore accidentally deleted DEFVAR for save_precision. Fri Feb 9 11:24:32 1996 John W. Eaton * Makefile.in (INCLUDES): Delete statdefs.h from the list (it's now in the liboctave directory). * toplev.cc (toplevel): Define here. * octave.cc (toplevel): Not here. * toplev.cc (main_loop): New function. * octave.cc (main): Call it here instead of doing main loop actions here. * user-prefs.cc (do_fortran_indexing): Also set liboctave_dfi_flag. (prefer_column_vectors): Also set liboctave_pcv_flag. (prefer_zero_one_indexing): Also set liboctave_pzo_flag. (resize_on_range_error): Also set liboctave_rre_flag. * variables.cc (restore_command_history): New function. (parse_fcn_file): Use it here in unwind_protect. * dynamic-ld.cc (load_octave_oct_file): Reverse sense of test. (load_octave_builtin): Delete. (mangle_octave_oct_file_name): Delete. * pt-fvc.cc (tree_builtin::eval): Don't try to dynamically load functions here. * pr-output.cc (set_format_style): Decrement argc for first arg too. * input.cc (gnu_readline): If readline returns an empty string, convert it to a string containing a single newline character. * octave.cc (octave_argv): Now a static string_vector. (intern_argv): Use string_vector ops, not charMatrix ops. * toplev.cc (octave_argv): Delete definition. * toplev.h (octave_argv): Delete declaration. Thu Feb 8 10:58:24 1996 John W. Eaton * Makefile.in (conf-dist): New target. Tue Feb 6 10:59:45 1996 John W. Eaton * help.cc (Ftype): Correctly handle structure names. Sun Feb 4 02:02:20 1996 John W. Eaton * qpsol.cc (Fqpsol): Call set_options(), not copy() to set options for QPSOL objects. * npsol.cc (Fnpsol): Call set_options(), not copy() to set options for NPSOL objects. * quad.cc (Fquad): Call set_options(), not copy() to set options for Quad objects. * dynamic-ld.cc (load_octave_builtin): Don't call destructor on string. (load_octave_oct_file): Likewise. Check oct_file.empty(), not just oct_file. * fsolve.cc (Ffsolve): Call set_options(), not copy() to set options for NLEqn object. * variables.cc (do_who): Properly set match patterns from argument vector for call to maybe_list. Sat Feb 3 03:29:33 1996 John W. Eaton * octave.cc (long_opts): Properly set second field using new enum. * lsode.cc: Change ODE to LSODE where appropriate. Use LSODE_options, not ODE_options. * dassl.cc: Change DAE to DASSL where appropriate. Use DASSL_options, not ODE_options. Fri Feb 2 01:41:37 1996 John W. Eaton * dirfns.cc: Include unistd.h. * parse.y, lex.l: Handle matrix lists without ml or mlnm stacks. * pt-mat.h, pt-mat.cc (tree_matrix): Rewrite to use SLList instead of home brew list. * SLList-tm.cc: New file * Makefile.in: Add it to the lists. * SLStack-tm.cc: Delete. * Makefile.in: Delete it from the lists. * All pt-* files: Use bool instead of int where appropriate. * Makefile.in (DEP_SOURCES_3): Add octave.cc. * pt-const.h (class tree_constant::tree_constant_rep): Make everything in this class public, then it doesn't need to declare the tree_constant class as a friend. Thu Feb 1 01:42:45 1996 John W. Eaton * lex.h, lex.l, parse.h, parse.y (class lexical_feedback): New class for lexer flags. Replace lots of global vars with members of this class. * lex.l (class brace_paren_nesting_level): New class to replace nesting_level stack. nesting_level is now an instance of this class. * lex.l (yum_yum): New typedef. (ATE_NOTHING): New global var. (ATE_SPACE_OR_TAB, ATE_NEWLINE): Don't #define these, declare them as const yum_yum. (eat_whitespace, eat_continuation): Return yum_yum, not int. * lex.l (SHORT_CIRCUIT_LOGICALS): Delete. Always do this for || and && tokens. (yy_flex_alloc, yy_flex_realloc, yy_flex_free, next_char_is_space): Delete. * toplev.cc (verbose_flag): Delete definition. * toplev.h (verbose_flag): And declaration. * octave.cc (verbose_flag): Now static. * lex.l (lookup_identifier): Arg is now string, not char*. (handle_identifier, is_plot_keyword, is_keyword): Likewise. (strip_trailing_whitespace): Return value is now string, not char*. (plot_style_token): Likewise, for both arg and return value. * input.cc (octave_gets_line): Delete. (gnu_readline, octave_gets, octave_read): Properly handle input when using_readline is either true or false. Don't limit length of input lines to flex buffer size. (get_user_input): New function. * octave.cc (main): Handle --no-line-editing. * toplev.h (using_readline): Provide external declaration here. * input.h: Not here. * toplev.cc (using_readline): Define here. * input.cc: Not here. * toplev.h (no_line_editing): Delete declaration. * input.cc (no_line_editing): Delete definition. Wed Jan 31 05:28:45 1996 John W. Eaton * input.cc (DEFAULT_ARRAY_SIZE, PROMPT_GROWTH): Delete definitions of unused macros. (read_octal): Now static. * givens.cc (Fgivens): Use new functions from matrix classes instead of calling Fortran functions directly. * syl.cc (Fsyl): Likewise. * expm.cc (Fexpm): Likewise. Mon Jan 29 00:00:48 1996 John W. Eaton * octave.cc: Use new prog_args class instead of calling getopt directly. * getopt.h, getopt.c, getopt1.c: Move to liboctave directory. * Makefile: Remove from lists. * utils.cc (strconcat, read_until, discard_until): Delete. * pager.cc (terminal_columns, terminal_rows): Move to liboctave/oct-term.cc. * pager.cc, pr-output.cc: Include oct-term.h. * utils.cc (list_in_columns): Moved to liboctave/str-vec.cc. Change all callers to use new member function syntax. * dirfns.cc (absolute_program): Now static. (absolute_pathname): Delete. * pt-plot.cc (save_in_tmp_file): Call oct_tempnam, not octave_tmp_file_name. Include file-ops.h. * file-io.cc (do_scanf, Foctave_tmp_file_name): Likewise. * oct-hist.cc (mk_tmp_hist_file): Likewise. * file-io.cc (Foctave_tmp_file_name): Move here. * utils.cc: From here. * utils.cc (octave_tmp_file_name): Move to liboctave/file-ops.cc. * tempname.c, tempnam.c: Move to liboctave directory. * Makefile.in: Remove from lists. Sun Jan 28 19:00:52 1996 John W. Eaton * xdiv.cc (all xdiv functions): Return Matrix or ComplexMatrix, not tree_constant. * oct-hist.h, oct-hist.cc, toplev.cc, octave.cc, input.cc, file-io.cc, user-prefs.cc: Rewrite to use new command_history class instead of calling readline history functions directly. * utils.cc (get_fcn_file_names): Delete num arg. Thu Jan 25 20:33:54 1996 John W. Eaton * load-save.cc (matches_patterns): Use new glob_match class instead of calling fnmatch directly. * symtab.cc (matches_patterns, symbol_table::glob): Likewise. * variables.cc (Fclear): Likewise. Wed Jan 24 02:05:22 1996 John W. Eaton * fnmatch.h fnmatch.c: Delete. * Makefile.in: Add glob stuff in the appropriate places, remove fnmatch.h and fnmatch.c from lists. * octave.cc (program_invocation_name, program_invocation_short_name): Maybe declare. (initialize_globals): Maybe initialize them. * octave.cc (initialize_pathsearch): Define here, not in pathsearch.cc. * pathsearch.h, pathsearch.cc: Remove files. * Makefile.in: Remove them from the lists. * help.cc (simple_help): Ignore directories that don't have any .m or .oct files. * utils.cc (search_path_for_file): Use new dir_path class instead of calling kpathsea routines directly. (get_fcn_file_names): Likewise. * help.cc (simple_help): Likewise. * dirfns.cc (make_absolute): Don't convert empty arg to "./". * sysdir.h: Move to liboctave directory. * Makefile.in: Remove from lists. * dirfns.cc (Freaddir): Use new dir_entry class instead of calling readdir directly. Include dir-ops.h, not sysdir.h. * utils.cc (get_fcn_file_names): Likewise. Delete unnecessary first arg, change all callers. Tue Jan 23 00:43:12 1996 John W. Eaton * safe-xstat.hin, safe-xstat.cin, statdefs.h, file-ops.h, file-ops.cc, filemode.c, mkdir.c, rmdir.c, rename.c: Files moved to liboctave directory. * Makefile.in: Remove them from lists. Move appropriate rules. * acosh.c, asinh.c, atanh.c, erf.c, erfc.c, gamma.c, lgamma.c: Files moved to liboctave directory. * Makefile.in: Remove them from lists. * missing-math.h: Deleted. * pr-output.cc, sysdep.cc, minmax.cc, mappers.cc, expm.cc, arith-ops.cc: Include oct-math.h, not cmath or missing-math.h. Mon Jan 22 19:33:05 1996 John W. Eaton * variables.cc (Fexist): Use file_stat instead of calling stat directly. Include file-ops.h, not statdefs.h. * octave.cc (execute_startup_files): Likewise. * file-io.cc (file_io_get_file, fopen_internal, popen_internal, Fstat): Likewise. (mk_stat_map): Likewise, use file_stat object, not struct stat. * oct-hist.cc (do_history): Likewise. * file-ops.h, file-stat.cc: New files. * Makefile.in: Include them. * dirfns.cc: Delete is_newer. Don't include statdefs.h. * toplev.cc: Don't include statdefs.h. Sun Jan 21 22:48:03 1996 John W. Eaton * pt-mvr.h, pt-fvc.h, Map.cc, Map.h, dynamic-ld.h, pt-fvc-base.cc, SLList-str.cc, pt-fcn.h, pt-fvc-base.h, SLStack-str.cc, pt-mvr.cc, pt-exp.cc, token.h, token.cc, user-prefs.h, pt-base.cc, user-prefs.cc, dirfns.h, sysdep.h, sysdep.cc, input.h, parse.h, lex.l, parse.y, defun.h, mappers.h, pt-fvc.cc, pt-plot.h, load-save.h, octave.cc, defun-int.h, help.h, variables.h, oct-map.h, oct-obj.h, oct-obj.cc, pt-const.cc, oct-map.cc, input.cc, symtab.h, pt-const.h, pathsearch.cc, pr-output.h, pr-output.cc, toplev.h, timefns.cc, schur.cc, pt-plot.cc, pager.cc, load-save.cc, dynamic-ld.cc, dirfns.cc, data.cc, file-info.h, file-info.cc, colloc.cc, utils.h, qpsol.cc, quad.cc, npsol.cc, lsode.cc, fsolve.cc, dassl.cc, file-io.cc, help.cc, utils.cc, oct-hist.h, oct-hist.cc, symtab.cc, toplev.cc, pt-fcn.cc, unwind-prot.h, unwind-prot.cc, variables.cc: Most functions in these files that deal with character strings have been converted to use the string class insatead of char*. If you want more detailed information, you'll have to figure it out for yourself. Sat Jan 20 18:19:12 1996 John W. Eaton * dynamic-ld.cc [WITH_DL]: Define RTLD_LAZY to be 1 if it is not already defined. Sun Jan 14 07:48:05 1996 John W. Eaton * pt-const.cc (print_as_scalar, print_as_structure): Make these member functions. (tree_constant::print_with_name): New function, moved here from old tree-expr.cc file (where it was called print_constant) and converted to member function. Change all callers. Fri Jan 12 01:54:49 1996 John W. Eaton * octave.cc (initialize_globals): Don't do kpathsearch stuff here. (main): Call initialize_pathsearch() here. * pathsearch.cc: New file. * Makefile.in (SOURCES): Add it to the list * oct-hist.h: Rename from octave-hist.h. * oct-hist.cc: Rename from octave-hist.cc. * Makefile.in, parse.y, other .cc files: Cope with it. * dynamic-ld.cc: Avoid warnings if !WITH_DYNAMIC_LINKING. * load-save.cc (save_ascii_data): string::data() returns const char*. * utils.h: Don't provide forward declaration for tree_constant. * oct-obj.h: Don't include mx-base.h or provide forward declarations for Matrix and Range types. * file-info.h: Don't include oct-obj.h. Do include cstdio. * symtab.h: Don't provide forward declaration for ostream. * variables.h: Don't provide forward declarations for istream, ostrstream, tree, builtin_function, or builtin_variable objects. * balance.cc, chol.cc, colloc.cc, dassl.cc, det.cc, eig.cc, expm.cc, fft.cc, fft2.cc, filter.cc, find.cc, fsolve.cc, fsqp.cc, givens.cc, hess.cc, ifft.cc, ifft2.cc, inv.cc, log.cc, lpsolve.cc, lsode.cc, lu.cc, minmax.cc, npsol.cc, pinv.cc, qpsol.cc, qr.cc, quad.cc, qzval.cc, rand.cc, schur.cc, sort.cc, svd.cc, syl.cc: Clean up #include statements. * pt-const.h: Don't include oct-obj.h or tree-base.h. Provide forward declaration of Octave_object here. * pt-const.cc: Include oct-obj.h here. * pt-mat.h, pt-fcn.h, pt-const.h, pt-misc.h, pt-plot.h, pt-exp-base.h, pt-cmd.h, pt-fvc-base.h, pt-mvr-base.h, pt-exp.h, pt-mvr.h, pt-fvc.h: New files, split from tree-expr.h and/or renamed from other tree-*.h files (pt == parse tree). * pt-base.cc, pt-const.cc, pt-exp.cc, pt-fvc-base.cc, pt-mat.cc, pt-mvr-base.cc, pt-plot.cc, pt-cmd.cc, pt-exp-base.cc, pt-fcn.cc, pt-fvc.cc, pt-misc.cc, pt-mvr.cc: Likewse, split from tree-expr.cc and/or other tree-*.cc files. * Makefile.in: Include them in the appropriate lists. * All: Fix #include statements to match. * Array-tc.cc: Don't instantiate ArrayRep objects. Thu Jan 11 02:35:19 1996 John W. Eaton * tree-const.cc (tree_constant::eval (int, int, const Octave_object&)): Define here instead of in tree-const.h. Wed Jan 10 04:34:20 1996 John W. Eaton * tree-const.h (tree_constant::tree_constant (const string&): * tree-const.cc (TC_REP::tree_constant_rep (const string&)): New constructor. Tue Jan 9 04:10:29 1996 John W. Eaton * rand.cc (do_rand): Use string_value() result directly instead of c_str() conversion. * balance.cc (Fbalance): Likewise. * tree-const.cc (TC_REP::string_value()): Handle new definition of charMatrix::row_as_string() * load-save.cc (save_ascii_data): Ditto. (save_binary_data): Ditto. * pr-output.cc (octave_print_internal): Ditto. * balance.cc (Fbalance): Handle new definition of TC_REP::string_value() * colloc.cc (Fcolloc): Ditto. * dassl.cc (Fdassl_options): Ditto. * data.cc (Fstruct_contains): Ditto. * dirfns.cc (Fmkdir): Ditto. (Freaddir): Ditto. (Frmdir): Ditto. (Frename): Ditto. * error.cc (handle_message): Ditto. * file-io.cc (process_printf_format): Ditto. (fopen_internal): Ditto. (file_io_get_file): Ditto. (return_valid_file): Ditto. (Flstat): Ditto. (Fstat): Ditto. (unlink_internal): Ditto. (mkfifo_internal): Ditto. (async_system_internal): Ditto. (sync_system_internal): Ditto. (execute_internal): Ditto. (popen_internal): Ditto. (fwrite_internal): Ditto. (fread_internal): Ditto. (do_printf): Ditto. (do_scanf): Ditto. * input.cc (get_user_input): Ditto. * lsode.cc (Flsode_options): Ditto. * npsol.cc (Fnpsol_options):Ditto. * qpsol.cc (Fqpsol_options):Ditto. * quad.cc (Fquad_options): Ditto. * rand.cc (do_rand): Ditto. * schur.cc (Fschur): Ditto. * sysdep.cc (Fputenv): Ditto. (Fgetenv): Ditto. * timefns.cc (extract_tm): Ditto. (Fstrftime): Ditto. * toplev.cc (Fsource): Ditto. (eval_string): Ditto. (Fsystem): Ditto. * tree-plot.cc (subplot::handle_plot_data): Ditto. * variables.cc (is_valid_function): Ditto. (Fis_global): Ditto. (Fexist): Ditto. (builtin_string_variable): Ditto. * utils.cc (make_argv): Ditto. (Fundo_string_escapes): Ditto. Mon Jan 8 01:54:50 1996 John W. Eaton * Makefile.in (install-bin): Use $(LN_S), not just ln. * variables.cc (octave_fcn_file_dir): New function. * tree-expr.cc (mark_as_system_fcn_file): Use it instead of octave_lib_dir. * Makefile.in (clean): If $(SHARED_LIBS), also remove shared libs. * pr-output.cc (set_format (const ComplexMatrix&, int&, int&)): Unconditionally call all_elements_are_int_or_inf_or_nan(). (set_format (const Matrix&, int&, int&)): Likewise. Sun Jan 7 19:12:39 1996 John W. Eaton * utils.cc (oct_putenv): New function. * sysdep.cc (Fputenv): Use oct_putenv. * octave.cc (initialize_globals): Likewise. Sat Jan 6 23:22:37 1996 John W. Eaton * sysdep.cc (Fputenv): New function. * input.cc (initialize_readline): Call rl_initialize() here. * octave.cc: Conditionally define atexit to be on_exit here. * toplev.cc: Not here. Fri Jan 5 14:01:02 1996 John W. Eaton * toplev.cc: Don't include here. * octave-hist.cc, tree-plot.cc, utils.cc: Do include "sysdep.h". * dirfns.cc, file-io.cc, help.cc, load-save.cc, octave.cc, octave-hist.cc, tree-plot.cc, utils.cc: Don't include . * sysdep.h: Do include it here. * tree-const.cc (TC_REP::assign (tree_constant&, Octave_object&)): If we have a matrix or range, call maybe_mutate before returning. Sun Dec 31 15:56:18 1995 John W. Eaton * npsol.cc (Fnpsol): Improve doc string. * qpsol.cc (Fqpsol): Likewise. Fri Dec 29 21:46:58 1995 John W. Eaton * defun-dld.h: Make work again for OCTAVE_LITE and WITH_DYNAMIC_LINKING. * Makefile.in: Handle shared libraries. Wed Dec 27 17:47:51 1995 John W. Eaton * mk-oct-links: New file. * Makefile.in (install-oct): Use it. * f-*.cc: Rename to *.cc. * Makefile.in (install-bin, install-lib, install-oct): New targets. (install): Use them. Tue Dec 26 21:38:22 1995 John W. Eaton * toplev.cc (reading_startup_message_printed): Move initialization here and make extern. * dirfns.cc, dynamic-ld.cc, help.cc, input.cc, octave-hist.cc, octave.cc, sighandlers.cc, sysdep.cc, tree-expr.cc, tree-misc.cc, utils.cc, variables.cc, parse.y, lex.l: Include toplev.h instead of octave.h. * toplev.h: rename from octave.h. * octave.cc (main): Delete unused variable saved_sigint_handler. Sun Dec 24 00:26:54 1995 John W. Eaton * dynamic-ld.cc: Massive re-write to handle dlopen/dlsym and shl_load/shl_findsym methods of dynamic linking. * utils.cc (get_fcn_file_names): Check for .oct files if WITH_DYNAMIC_LINKING, not WITH_DLD. * Makefile.in (LIB, TERMLIBS): Substitute values. (octave): Add $(LIBS) to link command and use $(TERMLIBS) instead of -ltermcap. Sat Dec 23 21:56:12 1995 John W. Eaton * dynamic-ld.h, dynamic-ld.cc: Remove old unused code. * variables.cc (load_fcn_from_file): Always call load_octave_oct_file. Wed Dec 20 00:56:57 1995 John W. Eaton * pr-output.cc (set_real_format, set_real_matrix_format, set_complex_format, set_complex_matrix_format, set_range_format): New functions. Ensure the count of the digits to the right of the decimal point is positive. * xpow.cc (xpow (const Matrix&, double)): Print warning if inverting singular matrix (but return value anyway, in the name of compatibility). xpow (const ComplexMatrix&, double)): Likewise. * f-inv.cc (Finv): If matrix is singular, return result anyway, in the name of compatibility. * symtab.cc (symbol_record::pop_context): Don't assert (! context.empty ()). * tree-const.cc (TC_REP::char_matrix_value): Don't complain about type conversion if object is an empty matrix.f (TC_REP::assign): If rhs is a string, don't convert to numeric type if rhs is empty or "". Only widen if rhs is not empty. Don't return 0x0 char_matrix if it is supposed to be a string. * arith-ops.h, mappers.h, pr-output.h, xdiv.h, xpow.h: Include oct-cmplx.h in place of forward declaration for class Complex. * pr-output.cc, mappers.cc, arith-ops.cc, xdiv.cc, xpow.cc, utils.cc: Include "oct-cmplx.h" instead of . * octave.cc (initialize_error_handlers): Don't call set_Complex_error_handler(). (octave_Complex_error_handler): Delete unused function. Delete declaration for set_Complex_error_handler(). * sighandlers.cc (catch_interrupts): New function. * octave.cc (main): Call catch_interrupts() instead of calling octave_set_signal_handler() directly. Tue Dec 19 03:22:37 1995 John W. Eaton * variables.cc (looks_like_octave_copyright): Also recognize the string " This program is free software". Thu Dec 14 01:54:06 1995 John W. Eaton * octave-hist.cc (clean_up_history): Only write history file if user_pref.saving_history. * octave-hist.cc (initialize_history, clean_up_history, do_history): Perform tilde expansion on history file name. * octave.cc (main): Check `defined (HAVE_ON_EXIT)' not just `(HAVE_ON_EXIT)'. * user-prefs.h (user_preferences): New fields, `history_file' and `history_size'. * user-prefs.cc (init_user_prefs): Initialize them. (sv_history_file, history_size): New functions. * variables.cc (install_builtin_variables): Initialize user-level variables history_file and history_size. * octave-hist.cc (default_history_size): Now extern. (default_history_file): Likewise. (octave_hist_size, octave_hist_file): Use user preference variables instead. * octave.cc (main): Call initialize_history after execute_startup_files. Fri Dec 8 15:53:59 1995 John W. Eaton * user-prefs.h (user_preferences): New field, `saving_history'. * user-prefs.cc (init_user_prefs): Initialize it. (saving_history): New function. * variables.cc (install_builtin_variables): Initialize user-level variable saving_history. * octave.cc (parse_and_execute): Don't reset value of saving_history here. (main) Use user_pref.saving_history instead of saving_history. * variables.cc (parse_fcn_file): Likewise. * octave-hist.cc (maybe_save_history): Likewise. Don't save history if input_from_startup_file. Mon Nov 27 23:05:52 1995 John W. Eaton * resource.cc: Include systime.h before . Tue Nov 14 14:09:40 1995 John Eaton * error.cc: Include cstring. * tree-expr.cc (print_code): Decrement indent level after printing function body. * Makefile.in: Remove references to oct-str.cc, oct-str.h, and Array-string.cc. * tree-const.h: Don't include oct-str.h. Mon Nov 6 11:16:49 1995 John Eaton * parse.y (make_plot_command, finish_colon_expression, make_unwind_protect, make_try_command, make_for_command, make_break_command, make_continue_command, make_return_command, start_if_command, finish_if_command, make_elseif_clause, make_simple_assignment, make_multi_val_ret, start_function_def, frob_function_def, finish_function_def, start_matrix, finish_matrix): New functions. Use them in the grammar to clean things up a bit. Possibly convert matrix lists, colon expressions, binary expressions, and unary expressions to constant values. (tree_matrix_type): Delete. (simple_expr1): Handle all expression stuff here, including assignments. (simple_expr): Just check to see that simple_expr1 produced something useful. * tree-plot.cc, tree-plot.h: Move most simple constructors to the header file. * tree-expr.h (tree_expression::is_constant): Move virtual function definition here. (tree_fvc::is_constant): From here. (tree_expression::is_matrix_constant): New virtual function. (tree_expression::is_range_constant): New virtual function. * tree-expr.cc (tree_matrix::is_matrix_constant): New function. * tree-expr.cc (tree_colon_expression::is_range_constant): New function. Fri Nov 3 03:42:04 1995 John Eaton * utils.cc, utils.h (jump_to_top_level): Declare as extern "C". * tree-const.h (tree_constant::eval ()): Only mutate if printing. * tree-const.cc (TC_REP::tree_constant_rep (const Complex&), TC_REP::tree_constant_rep (const ComplexMatrix&), TC_REP::tree_constant_rep (const ComplexDiagMatrix&), TC_REP::tree_constant_rep (const ComplexRowVector&), TC_REP::tree_constant_rep (const ComplexColumnVector&)): Also check to see if we can convert to scalar_constant, not just complex_scalar_constant. * user-prefs.h (user_preferences): New field, `exec_path'. * user-prefs.cc (init_user_prefs): Initialize it. (sv_exec_path): New function. * variables.cc (install_builtin_variables): Add DEFUN for EXEC_PATH. (default_exec_path): New function. * octave.cc (exec_path): New global variable. Don't set and putenv() exec path here. (long_opts): Add --exec-path option. (main): Handle it. (initialize_globals): Set default value here. * user-prefs.h (user_preferences): New field, `info_prog'. * user-prefs.cc (init_user_prefs): Initialize it. (sv_info_prog): New function. * variables.cc (install_builtin_variables): Add DEFUN for INFO_PROGRAM. (default_info_prog): New function. * octave.cc (info_prog): New global variable. (initialize_globals): Set default value here. (long_opts): Add --info-prog option. (main): Handle it. * help.cc (try_info): Use user_pref.info_prog here. * octave.cc (initialize_globals): Put arch_dir and bin_dir ahead of shell_path when resetting PATH. Thu Nov 2 04:30:13 1995 John Eaton * f-rand.cc (Frandn): New function. (do_initialization): New function. (do_rand): New function for doing the real work. (Frand): Use it. * octave.cc (parse_and_execute): New arg, warn_for. If given, print message if file cannot be opened. Set curr_fcn_file_full_name here. (Fsource): Pass extra arg to parse_and_execute to get warning message. * tree-const.h: Handle line and column info for double, Complex, and char* constants. * parse.y (maybe_convert_to_ans_assign): Pass along line and column info from expression. * parse.y (make_constant): New function. (simple_expr1, word_list): Use it. * input.cc, input.h (curr_fcn_file_full_name): New global. * variables.cc (load_fcn_from_file): Set it here. * parse.y (func_def2, yyerror, maybe_warn_missing_semi): Use it. (func_def2): If !reading_fcn_file, don't call strcmp if curr_fcn_file_name is 0. * octave.cc (Fsource): New function. (parse_and_execute): Declare file name const char *. * input.cc (get_input_from_file): Likewise. Wed Nov 1 13:54:34 1995 John Eaton * f-filter.cc: New file. * Makefile.in (DLD_SRC): Add it to the list. * sysdep.h (gethostname): Change declaration to match definition in sysdep.cc. * resource.cc: Include sysdep.h here, for octave_NaN. Tue Oct 31 02:12:18 1995 John Eaton * tree-const.cc (TC_REP::assign): After converting rhs to a numeric type, use the converted value, not the original. * dirfns.cc (Fpwd): If nargout == 0, print the directory name instead of returning it. * pager.cc (maybe_page_output): Call maybe_write_to_diary_file here. (flush_output_to_pager): Not here. Mon Oct 30 23:39:43 1995 John Eaton * variables.cc (install_builtin_commands): Add DEFVAR for echo_executing_commands. * octave-hist.cc (do_edit_history): Handle new echo stuff. * variables.cc (parse_fcn_file): Likewise. * octave.cc (parse_and_execute): Likewise. (main): Likewise. * input.cc (do_input_echo): (Fecho): New function. * tree-expr.cc (tree_function::print_code_function_header, tree_function::print_code_function_trailer): New functions. (tree_function::print_code): Use them. (tree_function::eval): Likewise, if echoing commands. * tree-misc.cc (tree_statement::maybe_echo_code): New function. * user-prefs.h (user_preferences): New field, echo_executing_commands. (echo_state): New enum, for various types of echoing we do. * user-prefs.cc (echo_executing_commands): New function. * tree-base.cc (print_code_indent): Print PS4 as line prefix. * help.cc (Ftype): Add unwind_protect for ps4 and set it to "" before printing code. * tree-misc.h (tree_statement_list): New field, function_body. (tree_statement_list::mark_as_function_body): New function. * parse.y (func_def3): Mark function bodies. * pr-output.cc (octave_print_internal): Undo string escapes when printing charMatrix as strings. Sat Oct 28 17:38:29 1995 John Eaton * utils.h (undo_string_escapes): Add missing const in declaration. Fri Oct 27 03:49:44 1995 John Eaton * file-io.cc (next_available_file_number): New stack for keeping track of next available file number. (get_next_avail_file_num): New function. (fopen_file_for_user, fopen_internal, popen_internal, execute_internal): Use it. Mon Oct 23 07:00:09 1995 John Eaton * tree-const.cc (TC_REP::convert_to_matrix_type, tree_constant::convert_to_matrix_type): New arg, make_complex. (TC_REP::set_index): New arg, rhs_is_complex. Pass it to convert_to_matrix_type. (TC_REP::assign): Pass rhs.is_complex_type() to set_index. Thu Oct 19 00:38:38 1995 John Eaton * xpow.cc: Include . * sysdep.cc (Fpause): Do pause even if not interactive. * tree-const.cc (TC_REP::assign): Don't make RHS numeric if both RHS and LHS are strings. Wed Oct 18 22:19:16 1995 John Eaton * f-expm.cc (Fexpm): Avoid taking log of negative number. Also, don't unnecessarily divide the input matrix by 1.0. * input.cc (decode_prompt_string): Recognize \[ and \] too. (initialize_readline): Bind M-p to history-search-backward and M-n to history-search-forward. Tue Oct 17 04:31:06 1995 John Eaton * xpow.cc (xpow): Handle integer powers better for complex^double. (elem_xpow): Likewise. * lex.l ({CCHAR}): If nesting_level.top() is BRACE, return ';', not '\n'. Mon Oct 16 19:03:45 1995 John Eaton * help.cc (Fwhich): Fix doc string. * variables.cc (Fexist): Update doc string. Sun Oct 15 22:19:16 1995 John Eaton * Another massive set of changes to support character matrices with indexing. The Octave_str_object class is no longer used. Anything having to do with Octave_str_object in the following files has been changed to use charMatrix instead: octave.h, load-save.cc, octave.cc, strfns.cc, data.cc, pr-output.h, pr-output.cc, tree-const.h, dirfns.cc, tree-const.cc, tree-expr.cc. Sat Oct 14 22:28:18 1995 John Eaton * f-sort.cc (mx_sort): Don't attempt to sort vectors that have only one element, or matrices that have only one row. Thu Oct 12 02:16:58 1995 John Eaton * mappers.cc (install_mapper_functions): Add gammaln as an alias for lgamma. * tree-const.h, tree-const.cc: Massive overhaul of indexing and indexed assignment functions. * tc-inlines.h, tc-rep.h: Remove files. * Makefile.in: Remove mention of them here too. * Makefile.in: Include $(TI_SRC) in DEP_SOURCES_3, not $(TI_SOURCES). Include $(DLD_SRC) in DEP_SOURCES_3. Include $(TI_SRC) in DEF_FILES_5. Wed Oct 11 01:26:18 1995 John Eaton * Makefile.in (INCLUDES): Remove tc-inlines.h and tc-rep.h from the list. Mon Oct 9 08:31:04 1995 John Eaton * lex.l (next_token_is_bin_op): Do match `.+', `.*', etc. Sun Oct 8 18:19:56 1995 John Eaton * idx-vector.h, idx-vector.cc: Delete files. * Makefile.in (SOURCES, INCLUDES): Remove them from lists. Fri Oct 6 00:52:06 1995 John Eaton * f-svd.cc (Fsvd): If nargout == 0 or nargout == 1, don't ask for U and V. Wed Oct 4 00:04:57 1995 John Eaton * f-npsol.cc (Fnpsol, Fnpsol_options): Avoid unused variable warnings if NPSOL_MISSING. * f-qpsol.cc (Fqpsol, Fqpsol_options): Likewise for QPSOL_MISSING. * Makefile.in (DISTFILES): Add octave.gperf. * lex.l (next_token_is_bin_op): Don't ever return true for `.' since that causes problems with things like [ .1 .1 ]. Tue Oct 3 05:30:24 1995 John Eaton * variables.cc (is_valid_function): Avoid setting error_state if argument is not a string. * parse.y (maybe_warn_missing_semi): New function. (list1, list): Call it if statement not terminated by semicolon. * tree-misc.h (tree_statement::line, tree_statement::column): New functions. * octave.cc (input_from_command_line_file): New global variable. (main): Set it. (parse_and_execute): Unwind-protect it and set it to zero. (eval_string): Likewise. * variables.cc (parse_fcn_file): Likewise. * user-prefs.cc (warn_missing_semicolon): New function. * user-prefs.h (user_preferences): New field, warn_missing_semicolon. * variables.cc (install_builtin_variables): DEFVAR it. * tree-expr.cc (tree_expression::is_logically_true): Actually use argument. Mon Oct 2 19:55:48 1995 John Eaton * variables.cc (install_builtin_variables): Reduce the default value of save_precision to 15. * variables.cc (builtin_real_scalar_variable): Return 1 for success, 0 for failure. * user-prefs.cc (struct_levels_to_print, set_save_precision, set_output_max_field_width, set_output_precision): Change sense of test for builtin_real_scalar_variable return value. (check_preference): Rename from check_str_pref. Change all callers. Accept value of 0 to be the same as "false" and nonzero to be the same as "true". Delete val to avoid memory leak. * variables.cc (install_builtin_variables): Change initial values from "true" to 1, "false" to 0. * variables.cc (install_builtin_variables): Add DEFVAR for gnuplot_has_multiplot. * user-prefs.h (user_preferences): New field, `gnuplot_has_multiplot'. * user-prefs.cc (init_user_prefs): Initialize it. (gnuplot_has_multiplot): New function. Sat Sep 30 16:52:57 1995 John Eaton * oct-gperf.h, octave.gperf: Newfiles. * Makefile.in (DISTFILES): Add octave.gperf. (INCLUDES): Add oct-gperf.h. (oct-gperf.h): New rule. (local-dist, dist): Depend on oct-gperf.h. * lex.l (is_keyword): Use perfect hash function to lookup keywords. Fri Sep 29 04:36:04 1995 John Eaton * version.h (OCTAVE_NAME_AND_VERSION): Add TARGET_HOST_TYPE to this. Thu Sep 28 00:03:51 1995 John Eaton * tree-expr.cc (tree_expression::is_logically_true): New function. * tree-cmd.cc (tree_while_command::eval): Use it instead of handling the test directly here. * tree-misc.cc (tree_if_clause::eval): Likewise * tree-const.cc (TC_REP::force_numeric): Don't try to print value of str_obj with %s. * error.cc (buffer_error_messages): Rename from suppress_octave_error_messages. (error_message_buffer): New global variable. (verror): Handle buffering of messages. (handle_message): New function. (Ferror, Fwarning, Fusage): Use it instead of duplicating code. * octave.cc (Feval): Buffer error messages instead of supressing them. * lex.l (is_keyword): Recognize `try', `catch', and `end_try_catch'. * parse.y (TRY, CATCH): New tokens. (command): Recognize try-catch block. (end_error): Add cases for unwind_protect_end and try_catch_end. * token.h (end_tok_type): New field, try_catch_end. * tree-cmd.h, tree-cmd.cc (tree_try_catch): New class. * variables.cc (bind_global_error_variable): New Function. (clear_global_error_variable): Likewise. (install_builtin_variables): Add DEFCONST for __error_text__. * help.cc (keywords): Add `try', `catch', and `end_try_catch'. * tree-cmd.cc (tree_unwind_protect::eval): Undo previous change. * dirfns.cc (Freaddir, Fmkdir, Frmdir): Do tilde expansion on the argument. Tue Sep 26 00:10:29 1995 John Eaton * f-dassl.cc, f-fsolve.cc, f-lsode.cc, f-npsol.cc, f-quad.cc: Don't try to figure out if the user-supplied functions take the correct number of arguments. Simply let the call fail. * variables.cc (takes_correct_nargs): Delete unused function. * tree-expr.cc (tree_builtin::eval): Don't complain for too many arguments to mapper functions. * tree-expr.h, tree-expr.cc (tree_builtin, tree_function, tree_fvc): Delete unused function max_expected_args. * defun.h (DEFUN): Delete unnecessary args nargin_min and nargout_max. New arg unused_arg_flags. (DEFUN_TEXT): Likewise. * defun-dld.h (DEFUN_DLD_BUILTIN): Likewise. * defun-int.h (DEFUN_INTERNAL, DECLARE_FUN, DEFINE_FUN_STRUCT): Do the real work. * data.cc, dirfns.cc, dynamic-ld.cc, error.cc, f-balance.cc, f-chol.cc, f-colloc.cc, f-dassl.cc, f-det.cc, f-eig.cc, f-expm.cc, f-fft.cc, f-fft2.cc, f-find.cc, f-fsolve.cc, f-fsqp.cc, f-givens.cc, f-hess.cc, f-ifft.cc, f-ifft2.cc, f-inv.cc, f-log.cc, f-lpsolve.cc, f-lsode.cc, f-lu.cc, f-minmax.cc, f-npsol.cc, f-pinv.cc, f-qpsol.cc, f-qr.cc, f-quad.cc, f-qzval.cc, f-rand.cc, f-schur.cc, f-sort.cc, f-svd.cc, f-syl.cc, file-io.cc, help.cc, input.cc, lex.l, load-save.cc, mappers.cc, octave-hist.cc, octave.cc, octave.h, pager.cc, pr-output.cc, resource.cc, sighandlers.cc, strfns.cc, sysdep.cc, timefns.cc, token.cc, tree-const.cc, tree-expr.cc, tree-expr.h, tree-plot.cc, unwind-prot.cc, unwind-prot.h, utils.cc, variables.cc, variables.h, version.h, xdiv.cc: Avoid unused variable warnings. * tree-expr.h (tree_oct_obj::print_value (ostream&)): Delete name of unused arg. (tree_fvc::save (ostream&, int, int): Likewise. * tree-const.h (tree_constant::tree_constant (magic_colon)): Delete name of unused arg. (tree_constant::tree_constant (all_va_args)): Likewise (ColumnVector vector_value (int, int)): Likewise. (ComplexColumnVector vector_value (int, int)): Likewise. (Octave_object::eval (int, int, const Octave_object&): Likewise. * octave.cc (execute_startup_files): Look for octaverc first in site/m, then in $(version)/m. * variables.cc (get_local_site_defaults): New function. * defaults.h.in (OCTAVE_LOCALFCNFILEDIR, OCTAVE_LOCALSTARTUPFILEDIR): New macros. * Makefile.in (defaults.h): Also substitute ${localfcndir}. Mon Sep 25 17:01:03 1995 John Eaton * variables.cc (install_builtin_variables): Add DEFCONST for "e". Fri Sep 22 02:18:45 1995 John Eaton * dirfns.cc (Fls): Delete ls_command after using it, not before. * input.h, input.cc (gnu_readline): Don't declare gnu_readline `extern "C"'. * sysdep.h: Only declare gethostname if it is missing, then don't declare it `extern "C"'. * dirfns.cc: Don't declare strerror(). * input.cc (command_generator): Use malloc, not xmalloc. Don't declare xmalloc. (gnu_readline): Don't declare this `extern "C"'. * octave-hist.cc: Don't declare history_get(). It is now in readline/history.h. * input.cc: Don't declare history_get(). It is now in readline/readline.h. * resource.cc: Don't surround include of sys/resource.h in `extern "C" { }'. * fnmatch.h [__cplusplus]: Surround contents in `extern "C" { }'. * load-save.cc, symtab.cc, variables.cc: Don't surround fnmatch.h include in `extern "C" { }'. * help.cc: Don't #undef __FUNCTION_DEF before including readline/tilde.h. * dirfuns.cc, file-io.cc, help.cc, load-save.cc, octave-hist.cc, sysdep.cc, tree-plot.cc, utils.cc, variables.cc: Don't surround readline includes in `extern "C" { }'. * sysdep.cc: Move all include statements to top of file. Tue Sep 19 01:58:21 1995 John Eaton * octave.cc (Fsystem): Use iprocstream *, and unwind_protect it. * pager.cc (flush_output_to_pager): Likewise. * dirfns.cc (Fls): Likewise. * tree-plot.cc (plot_stream): Now a pointer. (open_plot_stream): Deal with it. (send_to_plot_stream, cleanup_tmp_files, do_external_plotter_cd): Likewise. * procstream.cc (cleanup_iprocstream, cleanup_oprocstream): New functions. * procstream.h, procstream.cc (class iprocstream, class oprocstream): Keep track of pbuf. Initialize it to 0 in default constructors, delete it in destructor. Don't call close in destructor. * sighandlers.cc (octave_set_signal_handler): New function. Use this name instead of signal everywhere. * help.cc (try_info): Likewise. * pager.cc (flush_output_to_pager): Likewise. * octave.cc (main): Likewise. * octave-hist.cc (do_edit_history): Likewise. * input.cc (initialize_readline): Set rl_paren_string_delimiters to avoid treating single quotes as string delimiters when doing paren matching. * Makefile.in (SOURCES): Don't list Map.cc or SLStack.cc here. * tree-const.cc: Do include utils.h. * sysdep.cc: Don't surround terminal includes in extern "C". Include them before readline.h. * Map.h: Don't include utils.h. (CHNode::CHNode (const char*, const C&, CHNode *t): Do strsave() inline. * input.cc (generate_possible_completions): Generate name list even when text == 0. (operate_and_get_next): Don't declare history_stifled, call history_is_stifled () instead. Don't declare history_length, or max_input_history either. Check (where >= history_length - 1) too, as in recent versions of bash. * user-prefs.h (user_prefs): New field, `completion_append_char'. * user-prefs.cc (init_user_prefs): Initialize it. (sv_completion_append_char): New function. * variables.cc (install_builtin_variables): Install completion_append_char. * input.cc (command_generator): Use it. * SLList-expr.cc, SLList-misc.cc, SLList-plot.cc, SLList-tc.cc, DLList-fi.cc: Include config.h. * DLList-fi.cc: Include file-info.h, not file-io.h. Mon Sep 18 11:01:24 1995 John Eaton * octave.h (clean_up_and_exit): Tag with NORETURN instead of using typedef trick. * error.h (panic): Likewise. * utils.h (jump_to_top_level): Likewise. * file-io.h: Protect from multiple includes with octave_file_io, not octave_files. * file-info.h (class file_info): Convert to using std C++ string class from char *. * file-info.cc: Likewise. Don't include utils.h. * file-io.cc (return_valid_file, fopen_file_for_user, fflush_internal, do_scanf): Use operator ==, not strcmp. (close_files): Call error with file.name ().data (), not file.name (). (freport_internal): Call form with file.mode ().data () and file.name ().data (). * file-io.cc, file-io.h: Extract file_info class. * file-info.cc, file-info.h: New files for file_info class. * user-prefs.h (user_prefs): New field, `beep_on_error'. * user-prefs.cc (init_user_prefs): Initialize it. (beep_on_error): New function. * variables.cc (install_builtin_variables): Install beep_on_error. * octave.cc (maximum_braindamage): Set beep_on_error to "true". * error.cc (verror): Conditionally beep. (error): Don't reset error_state until after verror is called. Sun Sep 17 16:41:25 1995 John Eaton * load-save.cc (read_mat_binary_data, read_ascii_data, save_ascii_data, read_binary_data, save_binary_data): Handle string arrays. Fri Sep 15 00:24:19 1995 John Eaton * user-prefs.cc (struct_levels_to_print, set_output_max_field_width, set_output_precision, set_save_precision): Eliminate unecessary kludge variable. * variables.cc (gobble_leading_white_space): New arg, in_parts. Change all callers. * lex.l (HELP_FCN): Delete start state. The `help' command is now handled the same as any other text-style function. * gripes.cc (gripe_invalid_value_specified): New function * user-prefs.cc: Use it. * sysdep.cc (octave_words_big_endian): New global variable. (ten_little_endians): New function. (sysdep_init): Call it. * load-save.cc (words_big_endian): Use this at run-time instead of depending on WORDS_BIGENDIAN at compile-time. * symtab.h (SYMTAB_VARIABLES): New macro. * variables.cc (Fclear): Use it instead of just symbol_def::USER_VARIABLE when looking for variables. * octave.cc (main): If there is a file to execute, set program_invocation_name and program_name to the name of the file and argv to the remaining args. (intern_argv): Only define argv if there are some remaining arguments. * defun.h (DEFVAR_INT): New macro. (DEFVAR): Define in terms of DEFVAR_INT. Delete args protect and eternal. (DEFCONST): New macro. * variables.cc (install_builtin_variables): Use DEFCONST where appropriate, change uses of DEFVAR to match new definition. * variables.cc (bind_builtin_variable): New variant that accepts const tree_constant& value. (install_builtin_variables): Properly alphabetize DEFVAR for this. * octave.cc (short_opts): Prefix with `+' to prevent argv permutation. (main): Don't use readline if forced_interactive. (traditional): New file-scope variable. (long_opts, usage_string, verbose_usage): Add `--traditional'. (maximum_braindamage): New function. (main): Call it if --traditional. * input.cc (do_input_echo): Print prompt correctly when forced_interactive is either true or false. Thu Sep 14 00:54:06 1995 John Eaton * data.cc (Fstruct_elements): New function. * file-io.cc (Fumask): New function. * dirfns.cc (Fmkdir, Frmdir, Frename): New functions. * Makefile.in: Add rules and dependencies for building safe-stat.o and safe-lstat.o. * mkdir.c, rename.c, rmdir.c: New files. * Makefile.in (SOURCES): Include them in the list. * safe-xstat.hin, safe-xstat.cin: New files * Makefile.in (DISTFILES): Include them in the list. * sighandlers.cc (octave_new_handler): Try to continue on memory exhausted errors. (sigfpe_handler): Improve error message. * Makefile.in: Use `ifndef omit_deps', not `ifndef $(omit_deps)'. * dirfns.cc (Freaddir): New function. * f-sort.cc: Complete rewrite. Now uses stable sort algorithm and correctly handles complex matrices containing columns of all real numbers. Wed Sep 13 03:16:40 1995 John Eaton * arith-ops.cc: Unconditionally #define DIVIDE_BY_ZERO_ERROR. * variables.cc (install_builtin_variables): Unconditionally install NaN and nan. * mappers.cc (xisinf): Don't do bogus things if isinf, isnan, or finite are missing. (xfinite): Likewise. * sysdep.cc (octave_ieee_init): Don't set octave_NaN and octave_Inf if values are not available. * resource.cc (mk_ru_map): Don't use ru_ or tv_ as prefixes to Octave names for the structure members. Tue Sep 12 02:04:16 1995 John Eaton * procstream.h, procstream.cc: Rewrite. Mon Sep 11 18:42:05 1995 John Eaton * filemode.c: New file, from Emacs. * Makefile.in (SOURCES): Add it to the list. * file-io.cc (Fstat, Flstat, mk_stat_map): New functions. * timefns.cc (mk_tm_map): Don't use tm_ as prefix to Octave names for these structure members. (extract_tm): Likewise. (Flocaltime): Fix doc string to match. Thu Sep 7 02:04:27 1995 John Eaton * load-save.cc (save_user_variables): New function. * sighandlers.cc (my_friendly_exit): Call it before exiting. (sigfpe_handler): New function. (install_signal_handlers) [__alpha__]: Install it. Wed Sep 6 14:35:10 1995 John Eaton * tree-cmd.cc (tree_unwind_protect::eval): Ignore errors and suppress error messages while executing first block of unwind_protect commands. * parse.y (end_error): Add missing case for unwind_protect_end. * tree-expr.cc (tree_builtin::eval): Complain if no arguments given for mapper functions. (tree_fvc::lookup_map_element): Print error message for invalid structure reference. Tue Sep 5 02:04:12 1995 John Eaton * file-io.cc, input.cc, load-save.cc, octave.cc, sysdep.cc, variables.cc, octave-hist.cc, utils.cc, f-schur.cc, f-rand.cc, f-quad.cc, f-qpsol.cc, f-npsol.cc, f-lsode.cc, f-fsolve.cc, f-dassl.cc, f-colloc.cc, f-balance.cc, error.cc, data.cc: Add const qualifiers where appropriate. * dirfns.h: Include , for time_t. * tempname.c, file-io.cc, help.cc, input.cc, octave-hist.cc, octave.cc, sighandlers.cc, sysdep.cc, tree-expr.cc, tree-misc.cc, tree-plot.cc, utils.cc, variables.cc, sysdir.h: Move #include inside #ifdef HAVE_UNISTD_H. * syswait.h: New file. * Makefile.in (INCLUDES): Add it to the list. * file-io.cc, sighandlers.cc: Use it instead of including sys/wait.h directly. * octave.cc: Include statdefs.h, not sys/stat.h. * sysdir.h: New file. * Makefile.in (INCLUDES): Add it to the list. * dirfns.cc, utils.cc: Use it instead of including the headers directly. * pathlen.h: New file. * Makefile.in (INCLUDES): Add it to the list. * dirfns.cc, input.cc: Use it instead of including sys/param.h directly. * utils.cc: Don't include sys/param.h Sun Sep 3 18:52:59 1995 John Eaton * tree-const.cc (TC_REP::string_value): Return const char*, not char *. * All .cc, .y, .l, .y files: Include , not , and so on for all new C++ versions of these standard C headers. Thu Aug 31 17:09:38 1995 John Eaton * pathsearch.h: Also hide `string'. * oct-str.cc, oct-str.h: New files. * Makefile.in: Add to the appropriate lists. * tc-rep.h: Change char* to Octave_string* in anonymous union. * tree-expr.cc (tree_matrix::eval): Handle multiple element strings. * strfns.cc (toascii): Likewise. * tree-const.cc (print_as_string): Likewise. (TC_REP::force_numeric, TC_REP::rows, TC_REP::columns, TC_REP::double_value, TC_REP::complex_value, TC_REP::matrix_value, TC_REP::complex_matrix_value, TC_REP::convert_to_str): Likewise. (TC_REP::print): Call octave_print_internal for string case. (all_strings): New function. Fix constructors to use new data structure. * pr-output.cc (octave_print_internal): Add version for strings. * Array-string.cc: New file. * octave.cc (octave_argv): New global variable. (intern_argv): New function. (main): Fix argument parsing to do the right thing for arguments to executable scripts. * variables.cc: Add DEFUNs for argv, program_invocation_name, and program_name. * defun.h (DEFVAR): Fix comment. Thu Aug 24 00:02:00 1995 John Eaton * file-io.cc (fgets_internal): Make second arg optional. Add optional arg `strip_final_newline'. (Ffgets): Change to match new definition of fgets_internal. (Ffgetl): Implement using the new fgets_internal. * f-rand.cc (Frand): Update code for sizing return value to match that used by ones, zeros, and eye. Wed Aug 23 19:52:45 1995 John Eaton * tree-const.cc (do_vector_assign): Don't crash for A(range) = scalar, or A(matrix) = scalar. * f-dassl.cc (set_dassl_option): Rename from do_dassl_option. (show_dassl_option): New function. (Fdassl_options): Handle single arg. * f-fsolve.cc (set_fsolve_option): Rename from do_fsolve_option. (show_fsolve_option): New function. (Ffsolve_options): Handle single arg. * f-fsqp.cc (set_fsqp_option): Rename from do_fsqp_option. (show_fsqp_option): New function. (Ffsqp_options): Handle single arg. * f-lpsolve.cc (set_lpsolve_option): Rename from do_lpsolve_option. (show_lpsolve_option): New function. (Flpsolve_options): Handle single arg. * f-lsode.cc (set_lsode_option): Rename from do_lsode_option. (show_lsode_option): New function. (Flsode_options): Handle single arg. * f-npsol.cc (set_npsol_option): Rename from do_npsol_option. (show_npsol_option): New function. (Fnpsol_options): Handle single arg. * f-qpsol.cc (set_qpsol_option): Rename from do_qpsol_option. (show_qpsol_option): New function. (Fqpsol_options): Handle single arg. * f-quad.cc: (set_quad_option): Rename from do_quad_option. (show_quad_option): New function. (Fquad_options): Handle single arg. (Fquad): Doc fix. Tue Aug 22 00:38:05 1995 John Eaton * tree-plot.cc (do_external_plotter_cd): New function. * dirfns.cc (octave_change_to_directory): New function. If cd is successful, also call do_external_plotter_cd(). (Fcd): Call octave_change_to_directory(), not change_to_directory(). * pr-output.cc (pr_any_float): Change declaration of counter to size_t to avoid gcc warnings. * idx-vector.cc, octave-hist.cc, tree-const.cc, tree-expr.cc, tree-misc.cc, utils.cc, xpow.cc, Map.cc: Update for change in for loop variable scope for gcc 2.7.0. Mon Aug 21 19:34:53 1995 John Eaton * tree-const.cc (fortran_style_matrix_assignment): Properly handle case of complex LHS, real RHS. * Makefile.in: Only include dependency files if $(omit_deps) is not set. Wed Jul 5 00:03:58 1995 John Eaton * sysdep.cc: Explicitly include string.h. Sun Jun 25 00:18:10 1995 John Eaton * load-save.cc (too_large_for_float (const Matrix&)): Extract elements as doubles, not Complex. Sat Jun 24 22:59:15 1995 John Eaton * pr-output.cc (any_element_is_inf_or_nan): Declare extern, not static. * f-svd.cc (Fsvd): Call here to avoid trying to take SVD of matrix containing Inf or NaN values. * pr-output.cc (bit_format): New file-scope variable. (set_format, pr_any_float): Handle bit_format. (octave_print_internal): Handle bit_format like bank_format. (init_format_state): Initialize bit_format. (set_format_style): Allow `format bit' and `format native-bit'. Thu Jun 8 15:20:26 1995 John Eaton * mappers.cc (arg, imag, signum): If arg is NaN, return NaN. Mon May 15 14:47:04 1995 John Eaton * pager.cc (Fdiary): Initialize diary_file here, not in the file-scope declaration. * tree-expr.cc (tree_index_expression::eval): Handle nargin == 0 the same as other cases. Tue May 2 10:02:23 1995 John Eaton * load-save.cc (do_double_format_conversion): Add missing breaks. (do_float_format_conversion): Likewise. Mon May 1 13:50:24 1995 John Eaton * Makefile.in (OCTAVE_LIBS): Add @LIBPLPLOT@ to the list. * timefns.cc (Ftime): Handle GETTIMEOFDAY_NO_TZ. * Makefile.in (SOURCES): Delete tc-rep.cc, tc-rep-ass.cc, and tc-rep-idx.cc from the list. * tree-const.h: Add #pragma interface. * tree-const.cc: Add contents of tc-rep.cc, tc-rep-ass.cc, and tc-idx.cc to this file. Add #pragma implementation. This makes tree-const.cc large, but makes the final binary smaller. * unwind-prot.h unwind-prot.cc token.cc token.h procstream.cc procstream.h idx-vector.cc idx-vector.h symtab.cc symtab.h oct-map.cc oct-map.h oct-obj.cc oct-obj.h tree-plot.h tree-plot.cc tree-misc.cc tree-misc.h tree-expr.cc tree-expr.h tree-cmd.cc tree-cmd.h tree-base.cc tree-base.h: Add #pragma interface/implementation. * Makefile.in (OCTAVE_LIBS): Delete @LIBINFO@ from list. * help.cc: Don't include info headers or extern declarations for functions from info. (try_info): Call info as a subprocess. Delete second arg. Handle SIGINT here, not in help_from_info(). (help_from_info): Complain if info doesn't work. * defun-dld.h (DEFUN_DLD_BUILTIN) [OCTAVE_LITE && MAKE_BUILTINS]: If ! WITH_DLD, simply emit a character string constant. Fri Apr 28 15:23:06 1995 John Eaton * lex.l ({IDENT}{S}*): Don't delete tok. That's handled by strip_trailing_whitespace() now. ([^ \t\n]*{S}*|[^ \t\n\;\,]*{S}*): Ditto. * pathsearch.h: Include kpathsea/progname.h. * octave.cc (initialize_globals): Call kpse_set_progname(). * token.h: Declare copy constructor and operator = private. * token.cc: Abort if copy constructor or operator = is used. Thu Apr 27 13:54:39 1995 John Eaton * tree-expr.cc (lookup_map_element): Don't list default argument values here too. * pr-output.cc (hex_format): New file-scope variable. (set_format, pr_any_float): Handle hex_format. (octave_print_internal): Handle hex_format like bank_format. (init_format_state): Initialize hex_format. (set_format_style): Allow `format hex' and `format native-hex'. * variables.cc (bind_ans): Create ans_id each time with new and ask tree_simple_assignment_expression to handle cleaning it up. This apparently plugs a memory leak. * help.cc (Ftype): Don't try to print map constants. Handle references to structure members. Wed Apr 26 12:40:59 1995 John Eaton * input.cc (generate_struct_completions): New function. (generate_possible_completions): Likewise. (looks_like_struct): Likewise. (command_generator): Handle completion of struct variables. * tree-expr.h, tree-expr.cc (tree_fvc::lookup_map_element): Add insert and silent args. * oct-map.cc: New file. * Makefile.in (SOURCES): Add it to the list. Mon Apr 24 09:41:02 1995 John Eaton * variables.cc (Fexist): Handle structure references too. * tree-const.cc (lookup_map_element (const char*, int, int): New function. (lookup_map_element (SLList&, int, int): New arg, silent. * tc-rep.cc (lookup_map_element): New arg, silent. If nonzero, don't call error(). * tc-rep.h (is_empty): Define here. * tree-const.h (is_empty): Hand off to TC_REP::is_empty(). * data.cc (Fstruct_contains): Call lookup_map_element on args(0) instead of extracting the map and calling contains() on it. * parse.y (EPLUS, EMINUS): New tokens. (simple_expr): Handle EPLUS, EMINUS the same as `+' and `-'. * lex.l (".+", ".-"): New patterns. Match these separately to disallow using them as unary operators. * lex.l (next_token_is_bin_op): Simplify by noting that spacing only matters for those tokens that can also be unary ops. Fri Apr 21 14:34:45 1995 John Eaton * load-save.cc (read_ascii_data): Allow reading of empty matrices. * tc-rep-ass.cc (vector_assignment): Only assert that we are not doing fortran-style indexing and that nr <= 1 || nc <= 1. (do_vector_assign): Handle assignment of [] when one dimension is zero and the other is anything. Thu Apr 20 13:56:21 1995 John Eaton * tc-rep-ass.cc (delete_rows, delete_columns): Simply return if num_to_delete is 0. * lex.l (handle_identifier): Don't match plot option keywords inside parentheses or braces. * variables.cc (parse_fcn_file): Also delete tmp_help_txt if running a script. * tree-cmd.h (tree_command): Add destructor. * tree-expr.h tree_simple_assignment_expression (lhs_idx_expr): Hang on to idx_expr, not just its parts so it can be deleted. (init): Initialize it. * tree-expr.cc (~tree_simple_assignment_expression): Delete it. * tree-expr.h (tree_multi_val_ret, tree_oct_obj, tree_fvc, tree_identifier, tree_builtin, tree_function): Add destructors. * tree-expr.cc (tree_function::~tree_function): Delete some stuff. * tree-misc.h (tree_va_return_list): Add destructor. * octave.cc (__builtin_new, __builtin_delete): Provide our own, for debugging. * utils.cc (strconcat): Don't depend on the return value from strcat. (file_in_path): Simplify logic. * parse.y (maybe_convert_to_ans_assign): Create ans_id each time with new and ask tree_simple_assignment_expression to handle cleaning it up. This apparently plugs a memory leak. * lex.l (strip_trailing_whitespace): Declare retval static. Delete it before saving next string. * error.cc (Ferror): Do call error() for empty string args. (error_1): Don't print anything if fmt is "" or "\n", but do set the error state appropriately. * tree-cmd.cc (tree_unwind_protect::eval): Handle return and break in the `try' part of the statement. Mon Apr 10 19:29:44 1995 John Eaton * f-expm.cc, f-givens.cc, f-qzval.cc, f-syl.cc, f-rand.cc: Where appropriate, declare Fortran functions to take reference instead of pointer args. Change callers. * mappers.cc: Declare Fortran functions to take reference instead of pointer args. Change callers. * gamma.c, lgamma.c, erfc.c, erf.c, atanh.c, asinh.c, acosh.c: Declare Fortran functions to take reference instead of pointer args. Sun Apr 9 19:38:53 1995 John Eaton * file-io.cc (Fpopen, Fpclose, Fexecute, Fsync_system, Fasync_system, Fwaitpid, Fmkfifo, Funlink): New functions. * sighandlers.cc (sigchld_handler): New function. (install_signal_handlers): Add call to install sigchld_handler. (This is #if 0'd out, waiting for code to help determine which child exited and what to do about it). * tree-expr.h (tree_oct_obj): New class. * tree-expr.h (tree_multi_assignment_expression::preserve): New data member. Add arg with default value to constructors. Change callers as necessary. * tree-expr.cc (~tree_multi_assignment_expression): Conditionally delete lhs. * parse.y (make_multi_val_ret): Pass matrix instead of getting it from the global matrix list. (expression): Extract matrix from matrix list before calling make_multi_val_ret(). * parse.y (command): Handle new for loop syntax for structures. * tree-plot.h (subplot_list): Include tree_print_code() in initializer lists for constructors. * tree-expr.h (tree_statement_list, tree_argument_list, tree_parameter_list, tree_return_list, tree_global_init_list, tree_if_command_list, ): Likewise. * tree-cmd.h (tree_for_command::id_list): New data member. (tree_for_command (tree_return_list*, tree_expression*, tree_statement_list*, int, int)): Likewise. * tree-cmd.cc (tree_for_command::eval): Handle for loops with structures. (do_for_loop_once (tree_return_list*, Octave_object&, int&)): New form for handling for loops with structures. * sysdep.cc (octave_ieee_init): Determine floating point format here. (native_float_format): New global variable. (Fisieee): Compute return value from native_float_format, not by using preprocessor macros. * sysdep.h (enum floating_point_format): Move declaration here. * load-save.cc: From here. Always define all floating point format conversion routines. (do_double_format_conversion, do_float_format_conversion): Use native_float_format instead of preprocessor macros. Sat Apr 8 15:41:35 1995 John Eaton * Makefile (TEMPLATE_SRC): New variable. (DISTFILES): Add $(TEMPLATE_SRC). (SOURCES): Delete Map.cc and SLStack.cc from here. * variables.cc (install_builtin_variables): Use OCTAVE_VERSION instead of version_string to initialize OCTAVE_VERSION. * version.h (version_string): Delete. * getopt.c (_getopt_internal): Initialize indfound to avoid warning. Fri Apr 7 15:29:41 1995 John Eaton * tc-inlines.h (REP_RHS_MATRIX): Just check to see if tc is real or complex. If conversion fails, return. Thu Apr 6 00:10:47 1995 John Eaton * data.cc (Fstruct_contains): New function. * tc-rep.cc (print_code): Add extra parens around while condition to avoid warning. * utils.cc (undo_string_escapes): Likewise. * input.cc (decode_prompt_string): Likewise. Also rewrite if statement to avoid warning. Tue Apr 4 22:54:17 1995 John Eaton * tree-expr.cc (tree_multi_assignment_expression::eval, tree_simple_assignment_expression::eval): Call print_constant even if user_pref.print_answer_id_name is false. Mon Apr 3 17:57:14 1995 John Eaton * tc-inlines.h (TC_REP): Avoid redefinition. * tree-const.h (do_binary_op, do_unary_op): Declare as friends of tree_constant class too. * tree-plot.h (subplot_using::have_values): Delete data member. * tree-plot.cc (subplot_using::eval): Always recompute values. Fri Mar 31 10:18:32 1995 John Eaton * tc-rep.cc (print): Print open brace for structures here. * tree-expr.cc (print_constant): Not here. * symtab.cc (define): Don't delete arg if sv_fcn fails. * tree-const.cc (print): New function. Create ostrstream buffer and pass it to rep->print(). * tree-const.h (eval (int)): Call print(), not rep->print(). * tc-rep.cc (structure_indent_level): New file-scope variable. (print): New arg, output_buf, is stream to print to. Print values of structure elements too. * user-prefs.h (user_preferences): New field, struct_levels_to_print. * user-prefs.cc (struct_levels_to_print): New function. * variables.cc (install_builtin_variables): Add DEFVAR for new variable struct_levels_to_print. * tree-const.cc (print_as_scalar, print_as_structure): Move here from tree-expr.cc and make extern. * tree-expr.cc (print_as_structure): New function. (print_constant): Use it. * tree-expr.cc (print_constant): New arg, print_padding. (tree_simple_assignment_expression::eval): Use print_constant instead of duplicating code here. (tree_multi_assignment_expression::eval): Likewise. Thu Mar 30 13:24:11 1995 John Eaton * Makefile.in (SOURCES): Add resource.cc. * resource.cc: New file, extracted from timefns.cc. (Fgetrusage): New function. * timefns.cc (cputime): Delete (now implemented in a function file using new getrusage function). Wed Mar 29 22:52:42 1995 John Eaton * Makefile.in (SOURCES): Add strftime.c. * strftime.c: New file, from sh-utils distribution. * timefns.cc (mk_tm_map, extract_tm, Ftime, Fgmtime, Flocaltime, Fmktime, Fstrftime): New basic time functions. (Fclock, Fdate): Delete (now implemented in function files using new time functions). Tue Mar 28 17:51:51 1995 John Eaton * file-io.cc (return_valid_file, do_printf, do_scanf, fclose_internal, feof_internal, ferror_internal, fflush_internal, fgets_internal, fopen_internal, fread_internal, freport_internal, frewind_internal, fseek_internal, ftell_internal, fwrite_internal): Declare static. * file-io.h: Delete extern declarations for them. Fri Mar 24 09:52:50 1995 John Eaton * pr-output.cc (pr_col_num_header): New function. (compact_format): New file-scope variable. (set_format_style): Handle loose and compact formats. (octave_print_internal (ostream&, const ComplexMatrix&, int)): Replace duplicate code with call to pr_col_num_header(). (octave_print_internal (ostream&, const Matrix&, int): Likewise. (octave_print_internal (ostream&, const Range&, int): Likewise. Tue Mar 21 08:44:48 1995 John Eaton * mappers.cc (xgamma): Always use Slatec library function. * (xlgamma): Likewise. * Makefile.in (SOURCES): Don't include lgamma.c. Fri Mar 17 22:38:39 1995 John Eaton * tc-rep.cc (TC_REP::new): Don't try to keep track of newlist_tail. Explicitly initialize newlist to zero. * tree-const.cc (tree_constant::operator new): Likewise. Fri Mar 10 12:40:24 1995 John Eaton * tree-cmd.cc (quit_loop_now): Declare inline. (tree_for_command::do_for_loop_once): Split into two versions, one for the general case and one for when the loop variable is a simple identifier. (DO_LOOP): New macro. Move tests outside of loop. (tree_for_command::eval): Speed up by checking to see if loop variable is a simple identifier and by using DO_LOOP. * tree-const.h: New union of rep and freeptr. The freeptr element is used for our custom memory management functions. * tc-rep.h: Add freeptr element to anonymous union (for our custom memory management functions). * tree-const.cc (newlist, newlist_grow_size, newlist_tail): New static variables. (tree_constant::operator new): Always define to allow more efficient allocation of single tree_constants. (tree_constant::operator delete): Likewise, handle deletion of the memory we allocate. * tc-rep.cc (newlist, newlist_grow_size, newlist_tail): New static variables. (tree_constant::operator new): Always define to allow more efficient allocation of single tree_constants. (tree_constant::operator delete): Likewise, handle deletion of the memory we allocate. Fri Mar 3 14:00:08 1995 John Eaton * error.cc (verror): Terminate output_buf with ends. * statdefs.h: Use C-style comment in first line instead of C++-style comment. Mon Feb 27 10:11:18 1995 John Eaton * parse.y (maybe_convert_to_ans_assign): Only lookup ans once. * variables.cc (bind_ans): New function. * tree-expr.cc (tree_identifier::eval (int)): Use it here. (tree_identifier::eval (int, int, const Octave_object&): And here. * tree-expr.cc (install_nargin_and_nargout): New function. * tree-expr.h (tree_function::tree_function (tree_statement_list *, symbol_table *, int, int)): Call it. * tree-expr.cc (tree_function::bind_nargin_and_nargout): New function. (tree_function::eval): Call it insead of the one from variables.cc. * variables.cc (bind_nargin_and_nargout): #if 0 out. Sun Feb 26 00:17:06 1995 John Eaton * load-save.cc (Fload, Fsave): Free fname returned by tilde_expand(). * dirfns.cc (Fls): Likewise. * tree-expr.cc (tree_multi_assignment_expression::eval (int, int, const Octave_object&)): Call tree_return_list::operator () (Pix) explicitly. * octave.cc (initialize_globals): Put TEXMF in the environment for kpthsea. * Makefile.in (OCTAVE_LIBS): Use @LIBINFO@ and @LIBREADLINE@, substituted by configure. Use kpathsea.a, not libkpathsea, so we don't have to modify the kpathsea Makefile. Sat Feb 25 18:59:26 1995 John Eaton * pathsearch.cc: New file. * pathsearch.h: New file. * Makefile.in (INCLUDES): Include it in the list. * dynamic-ld.cc, help.cc, utils.cc: Use it instead of repeating identical code multiple times. * variables.cc (install_builtin_variables): Only DEFVAR suppress_verbose_help_message if USE_GNU_INFO. * help.cc (Fhelp): Only handle -i if USE_GNU_INFO. (additional_help_message): Only print message if USE_GNU_INFO. (builtin_help): New function. (help_from_info): New function. Print warning if not USE_GNU_INFO. See ChangeLog.1 in the top level directory for earlier changes.