1 2009-07-03 Jaroslav Hajek <highegg@gmail.com>
3 * pt-eval.cc (do_unwind_protect_cleanup_code): Add missing
6 2009-07-02 Jaroslav Hajek <highegg@gmail.com>
8 * help.cc (do_which): Also look for files.
10 2009-07-02 Jaroslav Hajek <highegg@gmail.com>
12 * Cell.cc (Cell::index): Use proper resize_fill_value.
14 2008-07-01 David Bateman <dbateman@free.fr>
16 * pr-output.cc (static inline std::string rational_approx (double,
17 int)): Test for underflow of fractional part of rational approximation
20 2009-07-01 Joe Rothweiler <octaveuser@sensicomm.com>
22 * input.cc (raw_mode): Use TCSADRAIN if no wait.
24 2009-06-30 Jaroslav Hajek <highegg@gmail.com>
26 * symtab.h (force_variable): Remove assertion.
28 2009-06-26 John W. Eaton <jwe@octave.org>
30 * load-path.cc (Faddpath): Preserve order of prepended elements.
32 2009-06-24 Thorsten Meyer <thorsten.meyier@gmx.de>
34 * oct-map.cc (Octave_map::squeeze, Octave_map::permute,
35 Octave_map::transpose, Octave_map::reshape, Octave_map::concat,
36 Octave_map::index): Add tests for preservation of key order in
39 2009-06-24 Jaroslav Hajek <highegg@gmail.com>
41 * pt-mat.cc (get_concat_class): Use empty string as zero value.
42 (tm_row_const_rep::tm_row_const_rep): Initialize class_nm to empty
44 (tm_const::tm_const): Ditto.
46 2009-06-24 John W. Eaton <jwe@octave.org>
48 * pt-assign.cc (former_built_in_variables): Remove "ans" from the list.
50 2009-06-24 Jaroslav Hajek <highegg@gmail.com>
52 * pt-eval.cc (do_unwind_protect_cleanup_code):
53 Workaround sig_atomic_t != int.
55 2009-06-23 Jaroslav Hajek <highegg@gmail.com>
57 * quit.h (octave_quit_exception): Delete.
58 (exit_status, quitting_gracefully): New globals.
59 * quit.cc: Initialize them.
60 (Fquit): Set the globals, simulate interrupt.
61 (main_loop): Handle exit properly.
62 * octave.cc (execute_eval_option_code): Ditto.
63 (execute_command_line_file): Ditto.
64 * pt-eval.cc (do_unwind_protect_cleanup_code):
65 Fix order of unwind_protect calls.
67 2009-06-23 John W. Eaton <jwe@octave.org>
69 * oct-map.cc (Octave_map::squeeze, Octave_map::permute,
70 Octave_map::transpose, Octave_map::reshape, Octave_map::concat):
73 2009-06-22 Jaroslav Hajek <highegg@gmail.com>
75 * ov-cell.cc (octave_cell::all_strings): Avoid duplicate conversions.
77 2009-06-20 Jaroslav Hajek <highegg@gmail.com>
79 * ov.cc (Fsubsasgn): Uniquify shared value before assigning to it.
81 2009-06-17 John W. Eaton <jwe@octave.org>
83 * mex.cc (mxArray_octave_value::get_data):
84 If octave_value::mex_get_data returns a valid pointer, mark it as
85 foreign and return it instead of enumerating the types that can be
88 * ov-re-mat.h (octave_matrix::mex_get_data): New function.
89 * ov-bool-mat.h (octave_bool_matrix::mex_get_data): Ditto.
90 * ov-flt-re-mat.h (octave_float_matrix::mex_get_data): Ditto.
91 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::mex_get_data): Ditto.
92 * ov-base-mat.h (octave_base_matrix::mex_get_data): Delete.
94 2009-06-16 Jaroslav Hajek <highegg@gmail.com>
96 * symtab.h (symbol_table::set_scope_and_context): Avoid checking
97 error_state for setting context.
99 2009-06-12 Kai NODA <nodakai@gmail.com>
101 * ls-mat4.h: Fix include guard
102 * ov-type-conv.h: Add missing include guard.
104 2009-06-12 Jaroslav Hajek <highegg@gmail.com>
106 * ov-cell.cc (octave_cell::sort (Array<octave_idx_type>&)): Simplify.
108 2009-06-10 John W. Eaton <jwe@octave.org>
110 * pt-fcn-handle.cc (tree_anon_fcn_handle::dup): Don't convert to
111 tree_constant object here. Do inherit from current symbol table
112 scope and context. New test.
114 * lex.l (handle_identifier): Set lexer_flags.looking_for_object_index
115 false if identifier is a keyword.
116 ({IDENT}{S}*): Don't set lexer_flags.looking_for_object_index here.
118 2009-06-09 Jaroslav Hajek <highegg@gmail.com>
120 * octave.cc (octave_main): Call initialize_command_input
121 conditionally. Move line_editing update in front of it.
122 Call command_editor::force_default_editor if not line_editing.
124 2009-06-09 Jaroslav Hajek <highegg@gmail.com>
126 * data.cc (Flog2): Fix tests.
128 2009-06-08 John W. Eaton <jwe@octave.org>
130 * variables.cc (symbol_exist): Returnn 1 for function handles and
131 inline function objects.
133 2009-06-08 Jaroslav Hajek <highegg@gmail.com>
135 * symtab.h (symbol_table::do_clear_global,
136 symbol_table::do_clear_global_pattern): Properly erase from both local
139 2009-06-08 Jaroslav Hajek <highegg@gmail.com>
141 * variables.cc (Fclear): Clear also globals when called without
144 2009-06-07 Jaroslav Hajek <highegg@gmail.com>
146 * graphics.cc (color_property::do_set): Allow a wider range of types.
148 2009-06-07 Jaroslav Hajek <highegg@gmail.com>
150 * DLD-FUNCTIONS/find.cc (Ffind): Fix docs. Improve second argument
151 handling. Add regression tests.
153 2009-06-06 Rik <rdrider0-list@yahoo.com>
155 * data.cc: Update documentation for 'complex' function
157 2009-06-06 Rik <rdrider0-list@yahoo.com>
159 * load-save.cc: Update documentation for NA and isna functions
161 2009-06-06 Rik <rdrider0-list@yahoo.com>
163 * load-save.cc: Update documentation for load and save
165 2009-06-06 Rik <rdrider0-list@yahoo.com>
167 * pr-output.cc: Update documentation for 'format'
169 2009-06-05 Rik <rdrider0-list@yahoo.com>
171 * variables.cc: Update documentation for 'who' family of functions
173 2009-06-03 Rik <rdrider0-list@yahoo.com>
175 * input.cc: Correct documentation for keyboard function
177 2009-05-25 Jaroslav Hajek <highegg@gmail.com>
179 Version 3.2.0 released.
181 2009-06-02 Rob Mahurin <rob@utk.edu>
183 * Makefile.in: Add CARBON_LIBS to OCTINTERP_LINK_DEPS.
184 From Bernard Desgraups <bdesgraupes@orange.fr>.
186 2009-06-02 Jaroslav Hajek <highegg@gmail.com>
188 * ov-base.cc (octave_base_value::numeric_assign): Gripe when no index
190 * ov-cell.cc (octave_cell::subsasgn): Ditto.
191 * ov-struct.cc (octave_struct::subsasgn): Ditto.
192 * ov-list.cc (octave_list::subsasgn): Ditto.
194 2009-05-28 John W. Eaton <jwe@octave.org>
196 * load-path.cc (load_path::do_files): Avoid shadow warning from GCC.
198 2009-05-27 John W. Eaton <jwe@octave.org>
200 * DLD-FUNCTIONS/__magick_read__.cc (write_image):
201 Bail out if given indexed image.
203 2009-05-27 Jaroslav Hajek <highegg@gmail.com>
205 * DLD-FUNCTIONS/__magick_read__.cc (encode_map): Fix RGB color
208 2009-05-26 John W. Eaton <jwe@octave.org>
210 * load-path.h, load-path.cc (load_path::files, load_path::do_files):
212 * help.cc (F__list_functions__): Call load_path::files with
213 omit_exts set to true.
216 (symbol_table::symbol_record::symbol_record_rep::is_variable):
217 Use "! is_local ()" instead of storage_class != local.
218 (symbol_table::do_variable_names): Only add variables to the list.
219 (symbol_table::unmark_forced_variables): New static function
220 * variables.cc (do_who): Use is_variable instead of is_defined.
221 Also limit output to variables when using regexp pattern.
222 * octave.cc (unmark_forced_vars): Delete.
223 (execute_eval_option_code): Don't add unmark_forced_vars to
224 unwind_protect stack here.
225 * toplev.cc (main_loop): Add symbol_table::unmark_forced_variables
226 to the unwind_protect stack here.
227 * input.cc (get_debug_input): Likewise.
228 * parse.y (parse_fcn_file, eval_string): Likewise.
230 2009-05-25 Jaroslav Hajek <highegg@gmail.com>
232 * toplev.h (quit_allowed): New global variable.
233 * toplev.cc (quit_allowed): Declare it.
234 (Fquit): Raise error if quitting is not allowed.
235 * octave.cc (octave_main): if running as embedded, disable quit by
238 2009-05-25 Jaroslav Hajek <highegg@gmail.com>
240 * variables.cc (do_who): Only output symbols with a defined value.
242 2009-05-22 Michael Goffioul <michael.goffioul@gmail.com>
244 * toplev.h (main_loop): Tag with OCTINTERP_API.
245 * input.h (octave_read, get_input_from_file, get_input_from_stdin):
247 * lex.h (create_buffer, current_buffer, switch_to_buffer,
248 delete_buffer, restore_input_buffer, delete_input_buffer): Ditto.
250 2009-05-22 Robert T. Short <octave@phaselockedsystems.com>
252 * ov-class.h, ov-class.cc (octave_class::clear_exemplar_map):
254 * symtab.h (symbol_record::clear_objects,
255 symbol_record::do_clear_objects): New functions.
256 * variables.cc (do_matlab_compatible_clear, clear):
257 Handle -classes option.
259 2009-05-22 Jaroslav Hajek <highegg@gmail.com>
261 * src/ov-base-mat.cc (octave_base_matrix<MT>::assign (const
262 octave_value_list, typename MT::element_type)): Avoid out of bounds
265 2009-05-21 Michael Goffioul <michael.goffioul@gmail.com>
267 * graphics.cc (figure::properties::get_boundingbox,
268 figure::properties::set_boundingbox): Get screen size from root
270 (convert_position): Get screen resolution from root object and remove
271 unneeded "backend" argument.
272 (axes::properties::get_boundingbox,
273 figure::properties::get_boundingbox,
274 figure::properties::set_boundingbox): Remove unneeded backend argument
275 to convert_position call.
277 * debug.h (class bp_table): Tag with OCTINTERP_API.
278 * input.h (Vdebugging): Ditto.
279 * pt-eval.h (class tree_evaluator): Ditto.
280 * toplev.h (class octave_call_stack): Ditto.
282 * file-io.cc (mkstemp): Add mktemp-based implementation of mkstemp on
283 platforms that do not have it (mkstemp is required by the new help
286 * TEMPLATE-INST/Array-os.cc: Add "extern template" declaration for
287 Array<octave_idx_type> to avoid implicit instantiation (and duplicate
288 symbols at link-time) [Win32]
290 2009-05-20 John W. Eaton <jwe@octave.org>
292 * pt-assign.cc (maybe_warn_former_built_in_variable):
293 Set initialized to true when done initializing vars set.
294 From Michael Goffioul <michael.goffioul@gmail.com>.
296 2009-05-20 Jaroslav Hajek <highegg@gmail.com>
299 (octave_value_typeinfo::unary_class_ops,
300 octave_value_typeinfo::unary_ops,
301 octave_value_typeinfo::non_const_unary_ops,
302 octave_value_typeinfo::binary_class_ops,
303 octave_value_typeinfo::binary_ops,
304 octave_value_typeinfo::compound_binary_class_ops,
305 octave_value_typeinfo::compound_binary_ops,
306 octave_value_typeinfo::cat_ops,
307 octave_value_typeinfo::assign_ops,
308 octave_value_typeinfo::assignany_ops,
309 octave_value_typeinfo::pref_assign_conv,
310 octave_value_typeinfo::type_conv_ops,
311 octave_value_typeinfo::widening_ops): Declare as Array<void *>.
312 * ov-typeinfo.cc: Reflect changes.
314 2009-05-20 Jaroslav Hajek <highegg@gmail.com>
316 * toplev.h (octave_exit_func): New typedef.
317 (octave_exit): Change to octave_exit_func.
319 2009-05-20 Jaroslav Hajek <highegg@gmail.com>
321 * ov-typeinfo.cc: Don't include oct-obj.h.
323 2009-05-20 Jaroslav Hajek <highegg@gmail.com>
325 * toplev.h (octave_quit_exception): New class.
326 (octave_exit): New global variable.
327 * toplev.cc (octave_exit): Initialize to ::exit.
328 (clean_up_and_exit): Call octave_exit if set.
329 (Fquit): Raise octave_quit_exception to quit.
330 (main_loop): Catch octave_quit_exception.
331 * octave.cc (execute_command_line_file): Ditto.
332 (execute_eval_option_code): Ditto.
334 2009-05-19 John W. Eaton <jwe@octave.org>
336 * DLD-FUNCTIONS/fltk_backend.cc (F__fltk_redraw__): New function.
337 (F__init_fltk__): Call add_input_event_hook with feval to add
338 __fltk_redraw__ to the list of even hook functions to call.
339 Call mlock when initializing.
340 (F__remove_fltk__): Call remove_input_event_hook with feval to
341 remove __fltk_redraw__ from the list of event hook functions.
342 Unlock __init_fltk__ when shutting down.
344 * input.cc (Finput_event_hook): Delete.
345 (input_event_hook): Handle set of functions instead of just one.
346 (Fadd_input_event_hook, Fremove_input_event_hook): New functions.
348 2009-05-19 Jaroslav Hajek <highegg@gmail.com>
350 * Makefile.in: Add X11_LIBS to OCTINTERP_LINK_DEPS.
352 2009-05-17 Jaroslav Hajek <highegg@gmail.com>
354 * TEMPLATE-INST/Array-tc.cc: Change #include.
356 2009-05-15 Robert T. Short <octave@phaselockedsystems.com>
358 * ov-class.cc (octave_class::exemplar_info): Fix typo in error message.
359 * ov-class.cc (Fmethods): Methods returns cell array.
360 * ls-mat5.cc (read_mat5_binary_element):
361 Construct exemplar array and ensure inheritance is correct.
363 2009-05-15 John W. Eaton <jwe@octave.org>
365 * error.cc (Ferror): Handle error struct argument.
367 * ls-mat5.cc (save_mat5_binary_element): Avoid multiple calls to
368 contents method. From David Bateman <dbateman@free.fr>.
369 (save_mat5_element_length): Use const Cell to avoid making copies
372 2009-05-15 Jaroslav Hajek <highegg@gmail.com>
374 * oct-stream.cc: Don't instantiate Array2<read_fptr>.
375 (octave_stream::read): Make read_fptr_table a static 2d array.
376 (FILL_TABLE_ROW): Update.
378 2009-05-12 Jaroslav Hajek <highegg@gmail.com>
380 * data.cc (F__accumarray_sum__): Optimize the constant range case.
382 2009-05-11 John W. Eaton <jwe@octave.org>
384 * sparse-xdiv.cc (do_rightdiv_sm_dm, do_leftdiv_dm_sm):
385 Avoid apparent MSVC bug with typedef.
387 * Makefile.in (install-lib): Remove
388 $(DESTDIR)$(octlibdir)/$(SHLLIBPRE)octinterp.$(SHLLIB_VER), not
389 $(DESTDIR)$(octlibdir)/$(SHLPRE)octinterp.$(SHLEXT_VER).
391 2009-05-08 Carsten Clark <tantumquantum+gnuoctave@gmail.com>
393 * data.cc (Fissorted): Fix typo in documentation entry.
395 2009-05-07 Robert T. Short <octave@phaselockedsystems.com>
397 * ov-class.h, ov-class.cc (octave_class::reconstruct_exemplar):
399 * ov-class.cc (octave_class::load_binary, octave_class::load_hdf5,
400 octave_class::load_ascii): Construct exemplar table and ensure
401 inheritance is correct.
402 * ov-struct.cc (struct): Return struct from object.
404 2009-05-07 John W. Eaton <jwe@octave.org>
406 * graphics.h.in (base_graphics_object::set): Undo previous change.
407 (base_properties::set (const caseless_str&, const octave_value&):
408 New virtual function.
409 (base_properties::set (const caseless_str&, const std::string&,
410 const octave_value&)): No longer virtual.
412 * toplev.cc (octave_config_info): Remove F2C and F2CFLAGS from the
414 * oct-conf.h.in (OCTAVE_CONF_F2CFLAGS, OCTAVE_CONF_F2C):
417 2009-05-07 Marco Atzeri <marco_atzeri@yahoo.it>
419 * Makefile.in: (SHLPRE): Rename from SHLLIBPRE.
421 2009-05-07 John W. Eaton <jwe@octave.org>
423 * genprops.awk (emit_declarations): Emit decls for static
424 has_property functions.
425 (emit_source): Add class name argument to base_properties::set
426 function. Pass class name to set_dynamic and
427 base_properties::set. Emit definitions for has_property
429 * graphics.h.in, graphics.cc
430 (base_properties::set, base_properties::set_dynamic):
432 (base_properties::all_dynamic_properties): New static data member.
433 (base_properties::has_dynamic_property): New static function.
434 (base_graphics_object::set): Pass class name to
435 base_properties::set function.
436 (property_list::set): Check for invalid property names.
438 2009-05-06 Jaroslav Hajek <highegg@gmail.com>
440 * ov-re-mat.cc (Fdouble): Fix order of branches.
442 2009-05-05 John Swensen <jpswensen@comcast.net>
444 * debug.h, debug.cc (breakpoints): Rename from bp_map, use a
445 std::set instead of a std::map object. Change all uses.
446 (bp_table::do_get_breakpoint_list): Simplify.
448 2009-05-05 Robert T. Short <octave@phaselockedsystems.com>
450 * ov-class.h, ov-class.cc (octave_class::reconstruct_parents):
452 * ov-class.cc (octave_class::load_binary, octave_class::load_hdf5):
453 Contstruct parent list.
454 (get_current_method_class): Clean up method class extraction.
456 2009-05-05 John W. Eaton <jwe@octave.org>
458 * graphics.cc (array_property::validate): Require object to be any
459 numeric type, not necessarily a double precision value.
461 * variables.cc (set_internal_variable): Pass NM in call to error.
463 2009-05-04 Peter O'Gorman <pogma@thewrittenword.com>
465 * utils.cc: Don't define HAVE_C99_VSNPRINTF here.
467 2009-05-01 John W. Eaton <jwe@octave.org>
469 * error.cc (Vlast_error_file, Vlast_error_name, Vlast_error_line,
470 Vlast_error_column): Delete.
471 (Vlast_error_stack): New static variable.
472 (initialize_last_error_stack): New static function.
473 (verror, Frethrow, Flasterror): Set or use Vlast_error_stack, not
474 Vlast_error_file, etc.
476 2009-04-27 John W. Eaton <jwe@octave.org>
478 * ov-class.cc (octave_class::dotref): Handle empty parent class.
479 (octave_class::get_current_method_class): Allow result to be empty.
480 (called_from_builtin): New static function.
481 (octave_class::subsref, octave_class::subsasgn): Use it.
483 2009-04-23 John W. Eaton <jwe@octave.org>
485 * ov-class.cc (Fclass): Check newly constructed classes against
486 the first constructed object of the class.
488 * ov-class.h, ov-class.cc (octave_class::exmplar_info): New class.
489 (exemplar_map): New static data member.
490 (exemplar_iterator, exemplar_const_iterator): New typedefs.
492 * ov-class.h (octave_class::nparents,
493 octave_class::parent_class_name_list): New functions.
494 * ov.h (octave_base_value::nparents,
495 octave_base_value::parent_class_name_list): New functions.
496 * ov-base.h, ov-base.cc (octave_base_value::nparents,
497 octave_base_value::parent_class_name_list): New functions.
498 (parent_class_names): Error if called for wrong type argument.
500 * symtab.cc (load_out_of_date_fcn): New arg, dispatch_type.
501 (out_of_date_check_internal): Pass dispatch type to
502 load_out_of_date_fcn.
504 2009-04-22 John W. Eaton <jwe@octave.org>
506 * ov-base-int.cc (octave_base_int_helper<T, false,
507 false>::char_value_out_of_range): Correct result for specialization.
509 * ov-class.cc (octave_class::dotref, octave_class::subsasgn):
510 Protect against possibly invalid octave_value -> string conversions.
512 2009-04-22 Robert T. Short <octave@phaselockedsystems.com>
514 * variables.cc (symbol_exist): Also return 1 for objects.
515 * ov-base.h (octave_base_value::assign): New virtual function.
516 * ov-class.h (octave_class::assign): New function.
517 * ov-class.cc (octave_class::find_parent_class): Simplify.
518 (octave_class::octave_class): Don't allow duplicate parent classes.
519 (octave_class::subsasgn): Allow cls = method (cls, value) to work
520 properly when method is a parent-class method.
521 (get_method_class): New static function.
522 (octave_class:subsasgn, octave_class::dotref): Use it.
523 (F__isa_parent__): New function.
525 2009-04-22 Jaroslav Hajek <highegg@gmail.com>
527 * ov-range.cc (octave_range::char_array_value): New virtual function
529 * ov-range.h: Declare it.
531 2009-04-22 Jaroslav Hajek <highegg@gmail.com>
533 * pt-mat.cc (tm_row_const::tm_row_const_rep::do_init_element):
534 Update class name even for all-zeros elements.
535 (get_concat_class): Update the default value if possible.
537 2009-04-21 John W. Eaton <jwe@octave.org>
539 * parse.y (Fassignin): Add missing unwind_protect frame.
541 * toplev.h (push (symbol_table::scope_id, symbol_table::context_id)):
544 * toplev.cc (main_loop): Don't call symbol_table::reset_scope.
546 * mex.cc (mexGetVariable, mexPutVariable): Use unwind_protect to
547 restore call stack and scope.
549 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
550 Don't use symbol_table::push_scope.
551 * variablees.cc (do_who): Likewise. Use octave_call_stack and
552 unwind_protect to manage change in scope.
553 * ov-fcn-handle.cc (octave_fcn_handle::load_ascii,
554 octave_fcn_handle::load_binary, octave_fcn_handle::load_hdf5):
556 * ls-mat5.cc (read_mat5_binary_element): Likewise.
558 * symtab.h (erase_scope (void*)): New function, for unwind_protect.
559 (symbol_table::push_scope, symbol_table::pop_scope,
560 symbol_table::reset_scope): Delete.
561 (symbol_table::scope_stack): Delete static member.
562 * symtab.cc (symbol_table::scope_stack): Delete definition.
564 2009-04-17 Jaroslav Hajek <highegg@gmail.com>
566 * oct-map.h (Octave_map::contents (const_iterator) const,
567 Octave_map::contents (iterator)): Simplify.
569 2009-04-17 Jaroslav Hajek <highegg@gmail.com>
571 * oct-map.cc (Octave_map::assign (const octave_value_list&, const
572 std::string&, const Cell&)): Fix & simplify.
573 (common_size): Remove.
575 2009-04-16 Jaroslav Hajek <highegg@gmail.com>
577 * pt-idx.cc (make_value_list): Gripe on magic end query for undefined
580 2009-04-16 Jaroslav Hajek <highegg@gmail.com>
582 * xpow.cc (same_sign): New helper function.
583 (elem_xpow (double, const Range&), elem_xpow (const Complex&, const Range&)):
584 Only optimize monotonic-magnitude integer ranges, start always from
587 2008-04-11 David Bateman <dbateman@free.fr>
589 * ov-cell.cc (Fstruct2cell): Treat possible trailing singleton for
590 creation of cell array from column structure vector.
592 2009-04-09 Jaroslav Hajek <highegg@gmail.com>
594 * ov-cell.cc (octave_cell::subsasgn): Fix reference counting
597 2009-04-08 John W. Eaton <jwe@octave.org>
599 * load-path.cc (rehash_internal): New function.
601 (Fpath, Faddpath, Frmpath): Call rehash_internal if path is modified.
603 2009-04-08 Jaroslav Hajek <highegg@gmail.com>
605 * xpow.cc (elem_xpow (double, const Range&),
606 elem_xpow (const Complex&, const Range&)): New functions.
607 * xpow.h: Declare them.
608 * OPERATORS/op-range.cc: Define scalar .^ range and complex .^ range &
611 2009-04-04 Jaroslav Hajek <highegg@gmail.com>
613 * ov-struct.cc (octave_struct::subsasgn): Fix reference counting
616 2008-04-03 David Bateman <dbateman@free.fr>
618 * DLD-FUNCTIONS/max.cc (MINMAX_SPARSE_BODY): Allow sparse boolean
621 2009-04-01 Jaroslav Hajek <highegg@gmail.com>
623 * ov-str-mat.cc (default_numeric_conversion_function):
624 Create an octave_scalar if possible.
626 2009-03-29 John W. Eaton <jwe@octave.org>
628 * DLD-FUNCTIONS/fltk_backend.cc (plot_window::button_press):
629 Don't pass arbitrary input to fl_message as a format string.
631 2009-03-29 Jaroslav Hajek <highegg@gmail.com>
633 * pt-eval.cc (do_unwind_protect_cleanup_code): Protect also
634 octave_interrupt_state.
636 2009-03-29 Jaroslav Hajek <highegg@gmail.com>
638 * DLD-FUNCTIONS/cellfun.cc (Fcellslices): Index n-d arrays along the
641 2009-03-27 Jaroslav Hajek <highegg@gmail.com>
643 * DLD-FUNCTIONS/balance.cc (Fbalance): Fix order of output args.
645 2009-03-26 Jaroslav Hajek <highegg@gmail.com>
647 * DLD-FUNCTIONS/find.cc
648 (find_nonzero_elem_idx (const Array<T>&, ...)): Move dimensions
651 2009-03-26 Jaroslav Hajek <highegg@gmail.com>
653 * DLD-FUNCTIONS/find.cc
654 (find_nonzero_elem_idx (const Array<T>&, ...)): Simplify.
655 Instantiate for bool and octave_int types.
656 (find_nonzero_elem_idx (const Sparse<T>&, ...)):
657 Instantiate for bool.
658 (Ffind): Handle bool and octave_int cases.
660 2009-03-25 John W. Eaton <jwe@octave.org>
662 * version.h (OCTAVE_VERSION): Now 3.1.55+.
663 (OCTAVE_API_VERSION): Now api-v37+.
665 * version.h (OCTAVE_VERSION): Now 3.1.55.
666 (OCTAVE_API_VERSION): Now api-v37.
667 (OCTAVE_RELEASE_DATE): Now 2009-03-25.
669 * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): Also return
670 [](0x0) if the array has 0 rows and it is not a column vector.
672 * oct-stream.cc (octave_stream::write (const Array<T>&,
673 octave_idx_type, oct_data_conv::data_type, octave_idx_type,
674 oct_mach_info::float_format)): Seek to skip if still inside bounds
675 of existing file. Otherwise, write NUL to skip.
677 * Makefile.in (%.df : %.cc): Write source file name to output,
678 wrapped in XDEFUN_FILE_NAME macro.
679 * mkbuiltins: Provide definition for XDEFUN_FILE_NAME.
680 * mkgendoc: Likeiwse.
681 (XDEFUN_DLD_INTERNAL, XDEFUNX_DLD_INTERNAL, XDEFUN_INTERNAL,
682 XDEFCONSTFUN_INTERNAL, XDEFUNX_INTERNAL, XDEFVAR_INTERNAL,
683 XDEFCONST_INTERNAL): Pass file_name to print_doc_string.
684 (print_doc_string): New arg, FILE_NAME. Print file name as
687 2009-03-24 John W. Eaton <jwe@octave.org>
689 * ov-class.cc (F__parent_classes__): New function.
691 2009-03-24 Robert T. Short <octave@phaselockedsystems.com>
693 * ov-class.h, ov-class.cc (octave_class::octave_class (const
694 Octave_map&, const std::string&, const octave_value_list&)):
696 (octave_class::find_parent_class, octave_class::parent_classes):
698 (octave_class::dotref): Also look in parent class.
699 (Fclass): Handle parent class arguments.
701 * ov-base.h (octave_base_value::get_parent_list,
702 octave_base_value::parent_classes): New virtual functions.
704 * load-path.h, load-path.cc (load_path::parent_map): New data member.
705 (load_path::add_to_parent_map): New static function.
706 (load_path::do_add_to_parent_map): New member function.
707 (load_path::do_find_method): Also look in parent classes for methods.
708 (load_path::parent_map_type, load_path::const_parent_map_iterator,
709 load_path::parent_map_iterator): New typedefs.
711 2009-03-23 John W. Eaton <jwe@octave.org>
714 (symbol_table::symbol_record::symobl_recoord_rep::is_variable):
715 Also return true if symbol is tagged as a variable.
716 (symbol_table::symbol_record::symobl_recoord_rep::force_variable):
717 Don't set variable value.
718 (symbol_table::symbol_record::symobl_recoord_rep::clear_forced,
719 symbol_table::symbol_record::clear_forced): Delete.
720 (symbol_table::unmark_forced_variables): Rename from
721 symbol_table::clear_forced_variables.
722 (symbol_table::do_unmark_forced_variables): Rename from
723 symbol_table::do_clear_forced_variables.
724 * parse.y (make_script, finish_function): Call
725 symbol_table::unmark_forced_variables instead of
726 symbol_table::clear_forced_variables.
727 * octave.cc (unmark_forced_vars): New function.
728 (execute_eval_option_code): Add it to the unwind-protect stack.
730 2009-03-22 Jaroslav Hajek <highegg@gmail.com>
732 * pt-eval.cc (tree_evaluator::visit_simple_for_command):
733 Remove struct branch, handle structs by the generic code.
734 (tree_evaluator::visit_complex_for_command):
735 Add missing const qualifiers.
737 2009-03-21 Jaroslav Hajek <highegg@gmail.com>
739 * ov-base-diag.cc: Add missing include.
740 * sparse-xdiv.cc: Ditto.
741 * DLD-FUNCTIONS/__glpk__.cc: Ditto.
742 * DLD-FUNCTIONS/__lin_interpn__.cc: Ditto.
743 * DLD-FUNCTIONS/__voronoi__.cc: Ditto.
745 2009-03-20 Jaroslav Hajek <highegg@gmail.com>
747 * ov-re-mat.cc (octave_matrix::load_ascii): Simplify.
748 * ov-flt-re-mat.cc (octave_float_matrix::load_ascii): Simplify.
749 * ov-cx-mat.cc (octave_complex_matrix::load_ascii): Simplify.
750 * ov-flt-cx-mat.cc (octave_float_complex_matrix::load_ascii): Simplify.
752 2009-03-20 Jaroslav Hajek <highegg@gmail.com>
754 * ov-re-mat.cc (octave_matrix::isnan, octave_matrix::isinf,
755 octave_matrix::finite): Simplify.
756 * ov-flt-re-mat.cc (octave_float_matrix::isnan,
757 octave_float_matrix::isinf, octave_float_matrix::finite): Simplify.
758 * ov-cx-mat.cc (octave_complex_matrix::isnan,
759 octave_complex_matrix::isinf, octave_complex_matrix::finite):
761 * ov-flt-cx-mat.cc (octave_float_complex_matrix::isnan,
762 octave_float_complex_matrix::isinf,
763 octave_float_complex_matrix::finite): Simplify.
765 2009-03-19 Benjamin Lindner <lindnerb@users.sourceforge.net>
767 * ls-oct-ascii.cc (extract_keyword): Replace loop with call to
768 read_until_newline to avoid leaving stray '\r' in stream when
769 reading files with CRLF line endings.
771 2009-03-18 Jaroslav Hajek <highegg@gmail.com>
773 * DLD-FUNCTIONS/cellfun.cc
774 (scalar_col_helper, scalar_col_helper_def, scalar_col_helper_nda,
775 scalar_query_helper): New classes.
776 (make_col_helper): New function.
777 (Fcellfun): Use col_helper classes for UniformOutput. Avoid copying by
778 using const variables.
780 2009-03-17 Jaroslav Hajek <highegg@gmail.com>
782 * OPERATORS/op-b-bm.cc: Add missing INSTALL_BINOPs.
783 * OPERATORS/op-bm-b.cc: Ditto.
784 * OPERATORS/op-fm-fm.cc: Ditto.
785 * OPERATORS/op-m-m.cc: Ditto.
787 2009-03-17 Jaroslav Hajek <highegg@gmail.com>
789 * ov.cc (octave_value::octave_value): Move to ov.h
790 * ov.h (octave_value::octave_value): Implement fast inline constructor
793 2009-03-15 Jaroslav Hajek <highegg@gmail.com>
795 * DLD-FUNCTIONS/cellfun.cc (Fcellslices): New DLD function.
797 2009-03-13 Jaroslav Hajek <highegg@gmail.com>
799 * ov.h (octave_value::compound_binary_op): Support bool compound ops.
800 * ov.cc (do_binary_op, decompose_binary_op, binary_op_fcn_name):
802 * pt-cbinop.cc (strip_not, simplify_and_or_op): New funcs.
803 (maybe_compound_binary_expression): Support bool compound ops.
804 * OPERATORS/op-int.h: Support bool compound ops.
805 * OPERATORS/op-b-bm.cc: Ditto.
806 * OPERATORS/op-bm-b.cc: Ditto.
807 * OPERATORS/op-bm-bm.cc: Ditto.
808 * OPERATORS/op-fm-fm.cc: Ditto.
809 * OPERATORS/op-m-m.cc: Ditto.
811 2009-03-13 Jaroslav Hajek <highegg@gmail.com>
813 * xpow.cc (xpow (const NDArray&, double), xpow (const ComplexNDArray&, double),
814 xpow (const FloatNDArray&, float), xpow (const FloatComplexNDArray&,
815 float)): Use xisint for testing ints. Optimize w.r.t int exponents.
817 2009-03-13 John W. Eaton <jwe@octave.org>
819 * parse.y (maybe_warn_assign_as_truth_value, make_binary_op,
820 maybe_warn_variable_switch_label, maybe_warn_associativity_change):
821 Print file and line number info if available.
822 * lex.l (gripe_matlab_incompatible): Likewise.
824 * error.cc (pr_where): Use octave_call_stack::backtrace to print
825 complete stack trace at once. Don't attempt to print code.
826 (error_2): Set error_state to 0 before calling pr_where.
827 (warning_1): Switch sense of test on symbol_table::at_top_level.
828 Call pr_where after printing primary warning message.
830 2009-03-13 Jaroslav Hajek <highegg@gmail.com>
832 * ov-range.h (octave_range::octave_range (const Range&)): Allow
833 constructing from invalid range op result.
834 * ov-range.cc (octave_range::try_narrowing_conversion): Validate
835 invalid range op results.
836 * data.cc (fill_matrix): Return packed form (zero-step range) if
839 2009-03-10 Jason Riedy <jason@acm.org>
841 * DLD-FUNCTIONS/lu.cc (lu): Call fact.Pr_mat () and fact.Pc_mat ()
842 to return permutation matrices in the sparse case.
844 2009-03-12 John W. Eaton <jwe@octave.org>
846 * ls-mat-ascii.cc (get_mat_data_input_line): If we are looking at
847 '\r' or '\n', skip current line ending instead of skipping until
850 2009-03-12 Ben Abbott <bpabbott@mac.com>
852 * graphics.cc: Fix default "papersize" property value.
854 2009-03-12 Jaroslav Hajek <highegg@gmail.com>
856 * ov-flt-perm.h, ov-flt-perm.cc: Remove sources.
857 * ov.h, ov.cc (octave_value::octave_value (const PermMatrix&)): Remove
858 use "single" argument.
859 * ov.cc (install_types): Update.
860 * xpow.cc, xpow.h (xpow (PermMatrix, float)): Remove.
861 * ov-base-diag.cc (octave_base_diag::do_index_op): Remove permutation
863 * ov-re-diag.cc (octave_diag_matrix::do_index_op): Move it here.
864 * ov-re-diag.h (octave_diag_matrix::do_index_op): New decl.
866 * DLD-FUNCTIONS/det.cc (Fdet): Update.
867 * DLD-FUNCTIONS/inv.cc (Finv): Update.
868 * DLD-FUNCTIONS/pinv.cc (Fpinv): Update.
870 * OPERATORS/op-fcm-pm.cc <-- OPERATORS/op-fcm-fpm.cc
871 * OPERATORS/op-fcm-pm.cc: Update.
872 * OPERATORS/op-fm-pm.cc <-- OPERATORS/op-fm-fpm.cc
873 * OPERATORS/op-fm-pm.cc: Update.
874 * OPERATORS/op-pm-fcm.cc <-- OPERATORS/op-fpm-fcm.cc
875 * OPERATORS/op-pm-fcm.cc: Update.
876 * OPERATORS/op-pm-fm.cc <-- OPERATORS/op-fpm-fm.cc
877 * OPERATORS/op-pm-fm.cc: Update.
878 * OPERATORS/op-pm-pm.cc: Update.
879 * OPERATORS/op-pm-template.cc: Update.
881 2009-03-11 Jaroslav Hajek <highegg@gmail.com>
883 * xpow.cc (xpow (const PermMatrix&, double), xpow (const PermMatrix&,
884 float)): New functions.
885 * xpow.h: Declare them.
886 * DLD-FUNCTIONS/op-pm-pm.cc: Support permutation matrix ^ scalar.
887 * DLD-FUNCTIONS/op-fpm-fpm.cc: Ditto.
889 2009-03-11 Jaroslav Hajek <highegg@gmail.com>
891 * ov-ch-mat.cc (octave_char_matrix::double_value,
892 octave_char_matrix::float_value, octave_char_matrix::complex_value,
893 octave_char_matrix::float_complex_value): Cast to unsigned char.
895 2009-03-10 Jason Riedy <jason@acm.org>
897 * OPERATORS/op-pm-sm.cc (mul_pm_sm): New Octave binding for
899 (ldiv_pm_sm): New Octave binding for perm \ sparse.
900 (mul_sm_pm): New Octave binding for sparse * perm.
901 (div_sm_pm): New Octave binding for sparse / perm.
902 (install_pm_sm_ops): Install the above bindings.
904 * OPERATORS/op-pm-scm.cc (mul_pm_scm): New Octave binding for
905 perm * sparse complex.
906 (ldiv_pm_scm): New Octave binding for perm \ sparse complex.
907 (mul_scm_pm): New Octave binding for sparse complex * perm.
908 (div_scm_pm): New Octave binding for sparse complex / perm.
909 (install_pm_scm_ops): Install the above bindings.
911 * Makefile.in (PERM_OP_XSRC): Add op-pm-sm.cc and op-pm-scm.cc for
912 operations between permutations and sparse matrices.
914 2009-03-10 Jason Riedy <jason@acm.org>
916 * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): New override
917 for find on PermMatrix.
918 (find): Add a branch testing arg.is_perm_matrix () and calling the
921 2009-03-10 John W. Eaton <jwe@octave.org>
923 * c-file-ptr-stream.cc, dynamic-ld.cc, error.cc, lex.l, pager.cc,
924 zfstream.cc: Include <iostream>.
925 * zfstream.h: Include <iosfwd> instead of <istream> and <ostream>.
926 * c-file-ptr-stream.h, help.h, load-path.h, load-save.h,
927 ls-ascii-helper.h, oct-iostrm.h, oct-stream.h, ov-base-diag.h,
928 ov-base-int.h, ov-base-mat.h, ov-base-scalar.h, ov-base-sparse.h,
929 ov-base.h, ov-bool-mat.h, ov-bool-sparse.h, ov-bool.h, ov-cell.h,
930 ov-ch-mat.h, ov-class.h, ov-colon.h, ov-complex.h, ov-cs-list.h,
931 ov-cx-mat.h, ov-cx-sparse.h, ov-fcn-handle.h, ov-fcn-inline.h,
932 ov-float.h, ov-flt-complex.h, ov-flt-cx-mat.h, ov-flt-re-mat.h,
933 ov-intx.h, ov-list.h, ov-range.h, ov-re-mat.h, ov-re-sparse.h,
934 ov-scalar.h, ov-str-mat.h, ov-struct.h, ov.h, pager.h,
935 pr-output.h, procstream.h, pt-assign.h, pt-cell.h, pt-const.h,
936 pt-fcn-handle.h, pt-id.h, pt-mat.h, pt.h, utils.h:
937 Include <iosfwd> instead of <iosstream>.
939 2009-03-10 Jaroslav Hajek <highegg@gmail.com>
941 * data.cc (Fsize_equal): Allow single argument call.
942 * DLD-FUNCTIONS/max.cc (Fcummin, Fcummax): Update docs.
944 2009-03-09 Benjamin Lindner <lindnerb@users.sourceforge.net>
946 * ls-ascii-helper.h, ls-ascii-helper.cc: New files.
947 * Makefile.in: Add them to the appropriate lists.
948 * load-save.cc (Fload): Open all files in binary mode.
949 * ov-range.cc (load_ascii): Explicitly handle CR and CRLF line endings.
950 * ov-fcn-handle.cc (load_ascii): Likewise.
951 * ov-fcn-inline.cc (load_ascii): Likewise.
952 * ov-str-mat.cc (load_ascii): Likewise.
953 * ls-mat-ascii.cc (get_mat_data_input_line): Likewise.
954 * ls-oct-ascii.cc (extract_keyword, read_ascii_data): Likewise.
955 * ls-oct-ascii.h (extract_keyword): Likewise.
957 2009-03-09 John W. Eaton <jwe@octave.org>
959 * graphics.h.in (OCTAVE_DEFAULT_FONTNAME): New macro, defaults to "*".
960 (axes::properties, text::properties): Use it to set default fontname.
961 * graphics.cc (axes::properties::set_defaults): Likewise.
963 2009-03-09 Rafael Laboissiere <rafael@debian.org>
965 * Makefile.in (maintainer-clean): Remove y.tab.h here.
966 (distclean): Not here.
968 2009-03-09 Jason Riedy <jason@acm.org>
970 * OPERATORS/op-dm-sm.cc (add_dm_sm): Octave binding for diag + sparse.
971 (sub_dm_sm): Octave binding for diag - sparse.
972 (add_sm_dm): Octave binding for diag + sparse.
973 (sub_sm_dm): Octave binding for diag - sparse.
974 (install_dm_sm_ops): Install above bindings.
976 * OPERATORS/op-dm-scm.cc (add_cdm_sm): Octave binding for diag + sparse.
977 (add_dm_scm): Octave binding for diag + sparse.
978 (add_cdm_scm): Octave binding for diag + sparse.
979 (sub_cdm_sm): Octave binding for diag - sparse.
980 (sub_dm_scm): Octave binding for diag - sparse.
981 (sub_cdm_csm): Octave binding for diag - sparse.
982 (add_sm_cdm): Octave binding for diag + sparse.
983 (add_scm_dm): Octave binding for diag + sparse.
984 (add_scm_cdm): Octave binding for diag + sparse.
985 (sub_sm_cdm): Octave binding for diag - sparse.
986 (sub_scm_dm): Octave binding for diag - sparse.
987 (sub_scm_cdm): Octave binding for diag - sparse.
988 (install_dm_scm_ops): Install above bindings.
990 2009-03-08 Jason Riedy <jason@acm.org>
992 * sparse-xdiv.h (xleftdiv): Declare overrides for
993 xleftdiv (diagonal, sparse), both real and complex.
994 (xdiv): Declare overrides for xdiv (sparse, diagonal), both real
997 * sparse-xdiv.cc (do_rightdiv_sm_dm): New template function.
998 Implementation for xdiv (sparse, diagonal).
999 (xdiv): Call do_rightdiv_sm_dm to implement overrides, real and
1001 (do_leftdiv_dm_sm): New template function. Implementation for
1002 xleftdiv (diagonal, sparse).
1003 (xleftdiv): Call do_leftdiv_dm_sm to implement overrides, real and
1006 * OPERATORS/op-dm-sm.cc (ldiv_dm_sm): Octave binding for real left
1007 division, diagonal into sparse.
1008 (div_sm_dm): Octave binding for real right division, sparse by
1010 (install_dm_sm_ops): Install above bindings.
1012 * OPERATORS/op-dm-scm.cc (ldiv_dm_scm): Octave binding for real
1013 diagonal \ complex sparse.
1014 (ldiv_cdm_sm): Octave binding for complex diagonal \ real sparse.
1015 (ldiv_cdm_scm): Octave binding for complex diagonal \ complex sparse.
1016 (div_scm_dm): Octave binding for complex sparse / real diagonal.
1017 (div_sm_cdm): Octave binding for real sparse / complex diagonal.
1018 (div_scm_cdm): Octave binding for complex sparse / complex diagonal.
1019 (install_dm_scm_ops): Install above bindings.
1021 2009-03-08 Jason Riedy <jason@acm.org>
1023 * OPERATORS/op-dm-scm.cc: New file. Implement multiplication
1024 between diagonal matrices (both real and complex) and complex
1026 * OPERATORS/op-dm-sm.cc: New file. Implement multiplication
1027 between diagonal matrices and sparse matrices, all real.
1028 * Makefile.in (DIAG_OP_XSRC): Add op-dm-sm.cc and op-dm-scm.cc.
1030 2009-03-09 Jaroslav Hajek <highegg@gmail.com>
1032 * data.cc (F__accumarray_sum__): New function.
1033 (do_accumarray_sum): New helper template function.
1035 2009-03-07 Jaroslav Hajek <highegg@gmail.com>
1037 * xdiv.cc (mdm_div_impl, dmm_lelftdiv_impl, dmdm_div_impl,
1038 dmdm_leftdiv_impl): Optimize.
1040 2009-03-07 John W. Eaton <jwe@octave.org>
1042 * pr-output.cc (octave_print_internal (std::ostream&,
1043 const PermMatrix&, bool, int)): Delete unused variable SCALE.
1045 * utils.cc (octave_vsnprintf): Avoid uninitialized variable
1048 * DLD-FUNCTIONS/qz.cc (Fqz): Avoid "maybe clobbered by vfork"
1051 * version.h (OCTAVE_VERSION): Now 3.1.54.
1052 (OCTAVE_API_VERSION): Now api-v36.
1053 (OCTAVE_RELEASE_DATE): Now 2009-03-07.
1055 * octave.cc (verbose_usage): Include --doc-cache-file in option list.
1057 2009-03-06 Jaroslav Hajek <highegg@gmail.com>
1059 * ov.h (octave_value::diag_matrix_value,
1060 octave_value::complex_diag_matrix_value,
1061 octave_value::float_diag_matrix_value,
1062 octave_value::float_complex_diag_matrix_value,
1063 octave_value::perm_matrix_value): New methods.
1065 * ov-base.cc (octave_base_value::diag_matrix_value,
1066 octave_base_value::complex_diag_matrix_value,
1067 octave_base_value::float_diag_matrix_value,
1068 octave_base_value::float_complex_diag_matrix_value,
1069 octave_base_value::perm_matrix_value): New virtual methods.
1071 * ov-base.h: Declare them.
1073 * ov-base-diag.h (octave_base_diag::diag_matrix_value,
1074 octave_base_diag::complex_diag_matrix_value,
1075 octave_base_diag::float_diag_matrix_value,
1076 octave_base_diag::float_complex_diag_matrix_value,
1077 octave_base_diag::perm_matrix_value): Remove declarations.
1079 * DLD-FUNCTIONS/inv.cc (Finv): Simplify handling diag & perm matrices.
1080 * DLD-FUNCTIONS/pinv.cc (Fpinv): Ditto.
1081 * DLD-FUNCTIONS/det.cc (Fdet): Ditto.
1083 2009-03-05 Jaroslav Hajek <highegg@gmail.com>
1085 * ls-hdf5.cc (add_hdf5_data): Handle diag & perm matrices.
1087 2009-03-05 John W. Eaton <jwe@octave.org>
1089 * pt-cell.cc, pt-cell.h (tree_cell::dup): Now const.
1090 * comment-list.cc, comment-list.h (octave_comment_list::dup): Ditto.
1091 * pt-arg-list.cc, pt-arg-list.h (tree_argument_list::dup): Ditto.
1092 * pt-assign.cc, pt-assign.h (tree_simple_assignment::dup,
1093 tree_multi_assignment::dup): Ditto.
1094 * pt-binop.cc, pt-binop.h (tree_binary_expression::dup,
1095 tree_boolean_expression::dup): Ditto.
1096 * pt-cmd.cc, pt-cmd.h (tree_no_op_command::dup,
1097 tree_function_def::dup): Ditto.
1098 * pt-colon.cc, pt-colon.h (tree_colon_expression::dup): Ditto.
1099 * pt-const.cc, pt-const.h (tree_constant::dup): Ditto.
1100 * pt-decl.cc, pt-decl.h (tree_decl_elt::dup, tree_decl_init_list::dup,
1101 tree_global_command::dup, tree_static_command::dup): Ditto.
1102 * pt-except.cc, pt-except.h (tree_try_catch_command::dup,
1103 tree_unwind_protect_command::dup): Ditto.
1104 * pt-fcn-handle.cc, pt-fcn-handle.h (tree_fcn_handle::dup,
1105 tree_anon_fcn_handle::dup): Ditto.
1106 * pt-id.cc, pt-id.h (tree_identifier::dup): Ditto.
1107 * pt-idx.cc, pt-idx.h (tree_index_expression::dup): Ditto.
1108 * pt-jump.cc, pt-jump.h (tree_break_command::dup,
1109 tree_continue_command::dup, tree_return_command::dup): Ditto.
1110 * pt-loop.cc, pt-loop.h (tree_while_command::dup,
1111 tree_do_until_command::dup, tree_simple_for_command::dup,
1112 tree_complex_for_command::dup): Ditto.
1113 * pt-mat.cc, pt-mat.h (tree_matrix::dup): Ditto.
1114 * pt-misc.cc, pt-misc.h (tree_parameter_list::dup,
1115 tree_return_list::dup): Ditto.
1116 * pt-select.cc, pt-select.h (tree_if_clause::dup,
1117 tree_if_command_list::dup, tree_if_command::dup,
1118 tree_switch_case::dup, tree_switch_case_list::dup,
1119 tree_switch_command::dup): Ditto.
1120 * pt-stmt.cc, pt-stmt.h (tree_statement::dup,
1121 tree_statement_list::dup): Ditto.
1122 * pt-unop.cc, pt-unop.h (tree_prefix_expression::dup,
1123 tree_postfix_expression::dup): Ditto.
1124 * pt-fcn-handle.h (tree_anon_fcn_handle::parameter_list,
1125 tree_anon_fcn_handle::return_list, tree_anon_fcn_handle::body,
1126 tree_anon_fcn_handle::scope): Ditto.
1128 2009-03-05 Jason Riedy <jason@acm.org>
1130 * ov-base-int.cc (convert_to_str_internal): Replace elt_type with
1131 element_type throughout.
1133 2009-03-05 Jaroslav Hajek <highegg@gmail.com>
1135 * DLD-FUNCTIONS/sparse.cc (Fsparse): Handle diagonal and permutation
1138 2009-03-03 John W. Eaton <jwe@octave.org>
1140 * ov-struct.cc (octave_struct::save_ascii,
1141 octave_struct::save_binary, octave_struct::save_hdf5):
1142 Preserve order of structure fields.
1143 * ls-mat5.cc (save_mat5_binary_element): Likewise.
1145 * symtab.h (symbol_table::do_inherit): Only inherit values for
1146 symbols from the donor_scope that already exist in the table.
1147 (symbol_table::symbol_record::symbol_record_rep::dup): Now const.
1148 (symbol_table::symbol_record::operator=): Decrement rep->count and
1150 (symbol_table::fcn_info::operator=): Likewise.
1152 * pt-fcn-handle.cc: (tree_anon_fcn_handle::dup): Transform
1153 tree_anon_fcn_handle objects to tree_constant objects containing
1154 octave_fcn_handle objects. New tests.
1156 * pt-assign.cc (tree_simple_assignment::rvalue1): Assign result of
1157 call to rhs->rvalue1() to an octave_value object, not an
1158 octave_value_list object.
1160 2009-03-03 Jaroslav Hajek <highegg@gmail.com>
1162 * oct-stream.h (octave_stream_list::lookup_cache): New member field.
1163 (octave_stream_list::octave_stream_list): Initialize it.
1164 (octave_stream_list::do_lookup): Use it.
1165 (octave_stream_list::clear): Make flush optional. Do physically erase
1166 entries from the map. Close files.
1167 (octave_stream_list::do_remove): Call clear on "all". Do erase deleted
1170 2009-03-02 John W. Eaton <jwe@octave.org>
1172 * graphics.cc (Fget, F__get__): Return a column vector of property
1173 values, not a row vector.
1175 2009-03-01 John W. Eaton <jwe@octave.org>
1177 * OPERATORS/op-fcm-fcm.cc (DEFNDASSIGNOP_FN (dbl_assign)):
1178 LHS type is float_complex_matrix, not complex_matrix. RHS value
1179 function is float_complex_array, not complex_array.
1181 2009-03-01 Jaroslav Hajek <highegg@gmail.com>
1183 * ov-perm.cc (octave_perm_matrix::print_raw): Call
1184 octave_print_internal.
1185 (octave_perm_matrix::print_raw): Call print_raw.
1186 * pr-output.cc (octave_print_internal (...,const DiagMatrix&,...)):
1187 Indicate diagonal matrix.
1188 (octave_print_internal (...,const ComplexDiagMatrix&,...)): Ditto.
1189 (octave_print_internal (...,const PermMatrix&,...)): New function.
1190 * pr-output.h: Declare it.
1192 2009-02-27 Jaroslav Hajek <highegg@gmail.com>
1194 * OPERATORS/op-dms-template.cc (gripe_if_zero): New template static
1196 (dmsdiv, sdmldiv): Call it.
1198 2009-02-26 John W. Eaton <jwe@octave.org>
1200 * symtab.h (symbol_table::symbol_record::symbol_record_rep::forced):
1201 New static constant.
1202 (symbol_table::symbol_record::symbol_record_rep::force_variable,
1203 symbol_table::symbol_record::force_variable): New functions.
1204 (symbol_table::symbol_record::symbol_record_rep::is_forced,
1205 symbol_table::symbol_record::symbol_record_rep::mark_forced,
1206 symbol_table::symbol_record::symbol_record_rep::unmark_forced,
1207 symbol_table::symbol_record::symbol_record_rep::clear_forced,
1208 symbol_table::symbol_record::is_forced,
1209 symbol_table::symbol_record::mark_forced,
1210 symbol_table::symbol_record::clear_forced,
1211 symbol_table::symbol_record::unmark_forced): New fucntions.
1212 * lex.h, lex.l (force_local_variable): Delete.
1213 (handle_identifier): Call symbol_table::force_variable instead of
1214 force_local_variable.
1215 * parse.y (make_script): Call symbol_table:clear_forced_variables
1216 after defining script.
1217 (finish_function): Call symbol_table::clear_forced_variables
1218 instead of symbol_table::clear_variables.
1220 * DLD-FUNCTIONS/chol.cc: Correct spelling of CHOLMOD in tests.
1222 * version.h (OCTAVE_VERSION): Now 3.1.53+.
1223 (OCTAVE_API_VERSION): Now api-v35+.
1225 2009-02-25 John W. Eaton <jwe@octave.org>
1227 * version.h (OCTAVE_VERSION): Now 3.1.53.
1228 (OCTAVE_API_VERSION): Now api-v35.
1229 (OCTAVE_RELEASE_DATE): Now 2009-02-25.
1230 (OCTAVE_COPYRIGHT): Update year.
1232 * Makefile.in (distclean): Remove tags TAGS y.tab.h y.output
1233 yy.lex.c here, not in maintainer-clean target. Also remove
1236 * DLD-FUNCTIONS/rand.cc: Note that the tests for the old random
1237 number generator will fail if using 64-bit indexing.
1239 2009-02-25 Jaroslav Hajek <highegg@gmail.com>
1241 * DLD-FUNCTIONS/lu.cc (maybe_set_triangular): New function.
1243 * DLD-FUNCTIONS/qr.cc (maybe_set_triangular): New function.
1246 2009-02-25 John W. Eaton <jwe@octave.org>
1248 * DLD-FUNCTIONS/chol.cc: Fix tests for missing cholmod.
1250 * input.cc (get_debug_input): Write debugging location info
1251 directly to std::cerr instead of calling message.
1252 * pt-eval.cc (tree_evaluator::do_breakpoint): Write debugging
1253 location info directly to std::cerr, not octave_stdout.
1255 * defaults.h.in (OCTAVE_DOC_CACHE_FILE): New macro.
1256 * defaults.cc (set_default_doc_cache_file): New function.
1257 (install_defaults): Call it.
1259 * help.cc (__list_functions__): Simplify
1261 * input.cc (get_debug_input): Don't pass arbitrary input to
1262 message as a format string.
1264 2009-02-24 John W. Eaton <jwe@octave.org>
1266 * help.cc, help.h (Vdoc_cache_file): New global variable.
1267 (Fdoc_cache_file): New function.
1268 * octave.cc (DOC_CACHE_FILE_OPTION): New option tag.
1269 (long_opts): Include doc-cache-file in the list.
1270 (octave_main): Handle DOC_CACHE_FILE_OPTION.
1272 2009-02-24 Jaroslav Hajek <highegg@gmail.com>
1275 (octave_scalar::int8_scalar_value): New method.
1276 (octave_scalar::int16_scalar_value): New method.
1277 (octave_scalar::int32_scalar_value): New method.
1278 (octave_scalar::int64_scalar_value): New method.
1279 (octave_scalar::uint8_scalar_value): New method.
1280 (octave_scalar::uint16_scalar_value): New method.
1281 (octave_scalar::uint32_scalar_value): New method.
1282 (octave_scalar::uint64_scalar_value): New method.
1285 (octave_float_scalar::int8_scalar_value): New method.
1286 (octave_float_scalar::int16_scalar_value): New method.
1287 (octave_float_scalar::int32_scalar_value): New method.
1288 (octave_float_scalar::int64_scalar_value): New method.
1289 (octave_float_scalar::uint8_scalar_value): New method.
1290 (octave_float_scalar::uint16_scalar_value): New method.
1291 (octave_float_scalar::uint32_scalar_value): New method.
1292 (octave_float_scalar::uint64_scalar_value): New method.
1294 * OPERATORS/op-s-s.cc (scalar_to_float): Remove duplicate conversion.
1295 * OPERATORS/op-range.cc (range_to_float_matrix): Ditto.
1297 2009-02-24 John W. Eaton <jwe@octave.org>
1299 * OPERATORS/op-float-conv.cc: New file.
1300 * Makefile.in (FLOAT_OP_XSRC): Add it to the list.
1301 (DOUBLE_OP_XSRC): Move op-double-conv.cc here from INTTYPE_OP_XSRC.
1302 * ops.h (DEFFLTCONVFN, DEFSTRFLTCONVFN): New macros.
1304 2009-02-23 John W. Eaton <jwe@octave.org>
1306 * ov-base-sparse.cc (octave_base_sparse<T>::print_raw):
1307 Remove extra ")" from output.
1309 * DLD-FUNCTIONS/eigs.cc (Feigs): If sigma argument is not a
1310 string, try extraction as complex value and check for error
1311 instead of inquiring about type first.
1313 * pt-eval.cc (tree_evaluator::visit_break_command,
1314 tree_evaluator::visit_return_command,
1315 tree_evaluator::visit_global_command,
1316 tree_evaluator::visit_static_command): Handle breakpoint.
1317 (tree_evaluator::visit_simple_for_command,
1318 tree_evaluator::visit_complex_for_command): Handle breakpoint once
1319 at beginning of loop.
1320 (tree_evaluator::visit_if_command_list): Don't call do_breakpoint
1322 (tree_evaluator::visit_no_op_command): Handle breakpoint if no-op
1323 command is end of function or script.
1324 (tree_evaluator::visit_statement): Handle breakpoint for
1325 expressions but not commands.
1326 (tree_evaluator::visit_while_command,
1327 tree_evaluator::visit_do_until_command):
1328 Check for breakpoint set on cmd, not expr.
1329 (tree_evaluator::visit_do_until_command): Handle breakpoint
1330 between check for breaking out of loop and loop control
1333 * pt-cmd.h (tree_no_op_command::eof): New data member
1334 (tree_no_op_command::tree_no_op_command): Initialize it.
1335 (tree_no_op_command::is_end_of_fcn_or_script): New function.
1336 * pt-stmt.cc (tree_statement::is_end_of_fcn_or_script):
1337 Call is_end_of_fcn_or_script instead of looking at original text
1340 * pt-select.h, pt-select.cc (tree_if_command::set_breakpoint,
1341 tree_if_command::delete_breakpoint): New functions.
1342 (tree_switch_command::set_breakpoint,
1343 tree_switch_command::delete_breakpoint): New functions.
1344 * pt-stmt.h, pt-stmt.cc (tree_statement::set_breakpoint,
1345 tree_statement::delete_breakpoint, tree_statement::is_breakpoint):
1346 Delegate real work to cmd or expr.
1347 (tree_statement::bp): Delete data member.
1348 (tree_statement::tree_statement): Don't initialize bp.
1349 (tree_statement::dup): Don't copy bp.
1351 * pt.h (tree::line (int), tree:column (int)): New functions.
1352 (tree:set_breakpoint, tree::delete_breakpoint): Now virtual.
1354 * parse.y (finish_if_command): Also store line and column info for
1355 if statement in first element of list.
1356 (finish_switch_command): Likewise, for switch.
1358 * input.cc (last_debugging_command): New static variable.
1359 (octave_gets): Set it here. Don't insert repeated debugging
1360 commands in the history list.
1362 2009-02-23 Jaroslav Hajek <highegg@gmail.com>
1364 * DLD-FUNCTIONS/pinv.cc: Support diagonal and permutation matrices.
1366 2008-02-21 David Bateman <dbateman@free.fr>
1368 * OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc, OPERATORS/op-s-scm.cc,
1369 OPERATORS/op-s-sm.cc, OPERATORS/op-scm-cs.cc, OPERATORS/op-scm-s.cc,
1370 OPERATORS/op-sm-cs.cc, OPERATORS/op-sm-s.cc: Don't perform any
1371 narrowing to full matrices.
1373 2009-02-20 Jaroslav Hajek <highegg@gmail.com>
1375 * ov-base-diag.h (octave_base_diag::sqrt): Remove.
1376 * ov-re-diag.cc (octave_diag_matrix::sqrt): New method.
1377 * ov-re-diag.h: Declare it.
1378 * ov-flt-re-diag.cc (octave_float_diag_matrix::sqrt): New method.
1379 * ov-flt-re-diag.h: Declare it.
1380 * ov-cx-diag.cc (octave_complex_diag_matrix::sqrt): New method.
1381 * ov-cx-diag.h: Declare it.
1382 * ov-flt-cx-diag.cc (octave_float_complex_diag_matrix::sqrt): New method.
1383 * ov-flt-cx-diag.h: Declare it.
1385 2009-02-20 John W. Eaton <jwe@octave.org>
1387 * dynamic-ld.cc (octave_dynamic_loader::do_load_mex): Clear and
1388 reload mex file if it is out of date. Don't check path for file.
1390 * pt-bp.cc (tree_breakpoint::visit_octave_user_script,
1391 tree_breakpoint::visit_octave_user_function):
1392 Don't panic. Call accept on command list if it exists.
1394 2009-02-20 Jaroslav Hajek <highegg@gmail.com>
1396 * ov-base-mat.cc (octave_base_matrix<MT>::do_index_op):
1397 Correctly compute all-scalar index.
1398 * ov-cell.cc (octave_cell::is_sorted, octave_cell::is_sorted_rows):
1400 (octave_cell::octave_cell (const Array<std::string>&)): New
1402 * ov-cell.h: Declare them.
1403 * ov-cell.cc (octave_cell::sort): Create result already with
1405 * strfns.cc (Fstrcmp): Use special code when dealing with
1408 2009-02-20 John W. Eaton <jwe@octave.org>
1410 * ov-base-mat.cc (octave_base_matrix<MT>::assign):
1411 Correctly compute all-scalar index.
1413 * symbtab.cc (symbol_table::stash_dir_name_for_subfunctions):
1415 * symtab.h: Provide decl.
1416 * parse.y (load_fcn_from_file): Call it after parsing a function.
1418 2009-02-19 Jaroslav Hajek <highegg@gmail.com>
1420 * ov-cell.h (octave_cell::cellstr_cache): New field.
1421 (octave_cell::clear_cellstr_cache, octave_cell::make_cellstr_cache,
1422 octave_cell::assign, octave_cell::delete_elements,
1423 octave_cell::mex_get_data): New methods.
1424 (octave_cell::is_cellstr): Reuse cellstr cache if possible, create if
1426 (octave_cell::cellstr_value): Reuse cellstr cache if possible.
1427 (octave_cell::subsasgn): Clear cellstr cache.
1429 2009-02-19 Jaroslav Hajek <highegg@gmail.com>
1431 * DLD-FUNCTIONS/lookup.cc (Flookup): Use Array<T>::lookup if possible.
1432 Do not compare octave_values directly. Properly check for iscellstr.
1434 2009-02-19 John W. Eaton <jwe@octave.org>
1436 * data.cc, graphics.cc, help.cc, lex.l, load-path.cc, parse.y:
1437 Consistent doc strings for internal functions.
1439 2009-02-18 John W. Eaton <jwe@octave.org>
1441 * ov.cc (convert_to_octave_idx_type_array): New static function.
1442 (octave_value::octave_idx_type_vector_value): New function.
1443 * ov.h (octave_value::octave_idx_type_vector_value): Provide decl.
1444 * DLD-FUNCTIONS/qr.cc (Fqrdelete, Fqrinsert): Use it to convert
1445 octave_value object to array of octave_idx_type values.
1447 * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): Likewise.
1448 * DLD-FUNCTIONS/time.cc (strptime): Likewise.
1449 * DLD-FUNCTIONS/quad.cc (Fquad): Eliminate unnecessary cast.
1450 * toplev.cc (run_command_and_return_output): Likewise.
1452 * strfns.cc (Fstrvcat): Use octave_idx_type and size_t instead of
1454 (Fstrcmp, Fstrncmp): Use octave_idx_type instead of int as needed.
1456 * DLD-FUNCTIONS/hex2num.cc (Fhex2num, Fnum2hex):
1457 Use union to avoid reinterpret_cast and GCC warning.
1459 * mex.cc (call_mex): Declare local nargout variable volatile to
1460 avoid "maybe clobbered by vfork" warning from GCC.
1462 * ov-cx-mat.cc (xabs): Comment out unused static function.
1463 * ov-flt-cx-mat.cc (xabs): Ditto.
1465 * c-file-ptr-stream.cc (c_file_ptr_buf::seekoff,
1466 c_file_ptr_buf::seepos, c_zfile_ptr_buf::seekoff,
1467 c_zfile_ptr_buf::seepos): Avoid unused paramter warnings.
1469 2009-02-18 Jaroslav Hajek <highegg@gmail.com>
1471 * data.cc (Fresize): Allow arbitrary number of parameters. Improve
1474 2009-02-17 Benjamin Lindner <lindnerb@users.sourceforge.net>
1476 * file-io.cc: (Fmkstemp): Use mkstemps if it is available and
1479 2009-02-17 Olaf Till <olaf.till@uni-jena.de>
1481 * DLD-FUNCTIONS/lsode.cc, DLD-FUNCTIONS/daspk.cc,
1482 DLD-FUNCTIONS/dassl.cc, DLD-FUNCTIONS/dasrt.cc: Documentation fixes.
1484 2009-02-17 Kai Habel <kai.habel@gmx.de>
1486 * DLD-FUNCTIONS/convhulln.cc (Fconvhulln): Compute convex hull
1487 volume and return it as second output. New tests.
1489 2009-02-17 John W. Eaton <jwe@octave.org>
1491 * ov-fcn.h (octave_function::octave_function): Initialize data members.
1492 (octave_function::dispatch_class): No longer virtual.
1493 Replace with version from ov-usr-fcn.h.
1494 (octave_function::xdispatch_class,
1495 octave_function::stash_dispatch_class): Move here from ov-usr-fcn.h.
1496 (octave_function::mark_as_private_function,
1497 octave_function::is_private_function,
1498 octave_function::is_private_function_of_class): New functions.
1499 (octave_function::private_function): New data member.
1500 * ov-usr-fcn.h (octave_user_function::xdispatch_class,
1501 octave_user_function::stash_dispatch_class,
1502 octave_user_function::dispatch_class): Delete.
1503 * ov-usr-fcn.cc (octave_user_function::octave_user_function):
1504 Don't initialize xdispatch_type.
1507 (symbol_table::fcn_info::fcn_info_rep::load_private_function):
1508 If private directory is subdirectory of class directory, qmark
1509 function as a private directory of the class.
1511 * ov-class.cc (octave_class::in_class_method): Also return true
1512 for functions that are private to a class.
1513 (octave_class::subsasgn): If not in class method, look for
1514 subsasgn method. If not found, or if not in a class method,
1515 perform default struct-style subscripted indexing.
1517 * ov-class.h (octave_class::empty_clone):
1518 Preserve fields and class name.
1519 * oct-map.h (Octave_map::Octave_map (const string_vector&):
1522 * ov-class.cc (octave_class::subsref): If indexing directly and
1523 result is map, return class object, not simple struct.
1526 (symbol_table::fcn_info::fcn_info_rep::load_private_function):
1527 Pass dir_name to load_fcn_from_file.
1529 2009-02-17 Jaroslav Hajek <highegg@gmail.com>
1531 * DLD-FUNCTIONS/data.cc (NATIVE_REDUCTION): Add BOOL_FCN argument.
1532 (NATIVE_REDUCTION_1): Check integer overflow flags and possibly gripe.
1533 (Fsum): Reflect change.
1534 (Fcumsum): USE NATIVE_REDUCTION.
1535 * gripes.cc (gripe_native_integer_math_truncated): New function.
1537 2009-02-17 Jaroslav Hajek <highegg@gmail.com>
1539 * DLD-FUNCTIONS/max.cc (Fcummin, Fcummax): Improve inline docs.
1541 2009-02-17 Jaroslav Hajek <highegg@gmail.com>
1543 * DLD-FUNCTIONS/max.cc (MINMAX_DOUBLE_SBODY): New macro.
1544 (MINMAX_DOUBLE_BODY): Move part of code to MINMAX_DOUBLE_SBODY.
1545 (MINMAX_SINGLE_SBODY): New macro.
1546 (MINMAX_SINGLE_BODY): Move part of code to MINMAX_DOUBLE_SBODY.
1547 (MINMAX_INT_SBODY): New macro.
1548 (MINMAX_INT_BODY): Move part of code to MINMAX_DOUBLE_SBODY.
1549 (CUMMINMAX_BODY): New macro.
1550 (Fcummin, Fcummax): New DLD functions.
1552 2009-02-17 John W. Eaton <jwe@octave.org>
1554 * octave.gperf: Eliminate whitespace to allow gperf 2.7.2 to work.
1556 * file-io.cc (Ffscanf, Fsscanf): Check error_state after call to
1557 octave_stream::scanf.
1558 (Ffgetl): Check error state after call to octave_stream::getl.
1559 (Ffgets): Check error state after call to octave_stream::gets.
1561 * oct-stream.cc (octave_base_stream::do_gets,
1562 octave_base_stream::do_scanf):
1563 Disallow reading from stdin when running interactively.
1565 * toplev.cc (octave_config_info): Add CARBON_LIBS, X11_INCFLAGS,
1566 and X11_LIBS to the struct.
1567 * oct-conf.h.in (OCTAVE_CONF_CARBON_LIBS,
1568 OCTAVE_CONF_X11_INCFLAGS, OCTAVE_CONF_X11_LIBS): New macros.
1570 2009-02-17 Thomas Treichl <Thomas.Treichl@gmx.net>
1572 * Makefile.in (octave$(EXEEXT)): Link with CARBON_LIBS.
1574 2009-02-16 John W. Eaton <jwe@octave.org>
1576 * lex.l (next_token_can_follow_bin_op):
1577 Push all characters read on to buffer stack.
1579 * genprops.awk (emit_source): Don't use + to concatenate strings.
1581 2009-02-16 Jaroslav Hajek <highegg@gmail.com>
1583 * data.cc (NATIVE_REDUCTION): Use boolNDArray::any for native bool
1584 summation, boolNDArray::sum for double-valued.
1586 2009-02-16 Jaroslav Hajek <highegg@gmail.com>
1588 * ov-base-mat.cc (octave_base_matrix<MT>::assign (const octave_value_list&,
1589 typename MT::element_type): Fix invalid index.
1590 * ov-re-mat.cc (default_numeric_demotion_function): Use
1591 float_array_value instead of float_matrix_value.
1593 2009-02-16 John W. Eaton <jwe@octave.org>
1595 * input.cc (gnu_readline): Use fputs instead of fprintf.
1597 2009-02-15 John W. Eaton <jwe@octave.org>
1599 * defun.cc, defun-int.h, defun-dld.h (DEFUN_INTERNAL,
1600 DEFCONSTFUN_INTERNAL, DEFUNX_INTERNAL, DEFUN_DLD_INTERNAL,
1601 DEFUNX_DLD_INTERNAL, install_builtin_function,
1602 install_dld_function, install_mex_function):
1603 Delete IS_TEXT_FCN arg. Fix all uses.
1604 (DEFMD, DEFUN_TEXT): Delete.
1605 * mkbuiltins, mkgendoc: Adapt to DEFUN macro changes.
1607 * lex.h, lex.l (lexer_flags::at_beginning_of_statement):
1608 New data member. Set it as needed in rules.
1610 Handle lexer_flags::at_beginning_of_statement.
1611 (next_token_can_follow_bin_op, looks_like_command_arg): New functions.
1612 (handle_identifier): Use them to determine
1613 Don't check is_command_name or is_rawcommand_name.
1614 * parse.y (statement): Recognize word_list_cmd here.
1615 (expression): Not here.
1617 * lex.l (handle_string): Delete arg TEXT_STYLE.
1618 (BIN_OP_RETURN, XBIN_OP_RETURN): New arg, BOS. Change all uses.
1620 * lex.h, lex.l (lexer_flags::doing_raw_command): Delete data
1621 member and all uses.
1623 * debug.cc, dirfns.cc, error.cc, input.cc, lex.l, load-path.cc,
1624 load-save.cc, oct-hist.cc, ov-class.cc, pager.cc, parse.y,
1625 pr-output.cc, sysdep.cc, utils.cc, variables.cc:
1626 Replace all uses of DEFCMD with DEFUN.
1628 * variables.cc (command_set, rawcommand_set): Delete static variables.
1629 (mark_as_command, unmark_command, is_command_name,
1630 mark_as_rawcommand, unmark_raw_command, is_rawcommand_name): Delete.
1631 (Fmark_as_command, Funmark_command, Fiscommand,
1632 Fmark_as_rawcommand, Funmark_rawcommand, Fisrawcommand):
1633 Convert to .m files and move to scripts/deprecated.
1634 * variables.h (mark_as_command, is_command_name,
1635 is_marked_as_rawcommand, mark_as_rawcommand, unmark_rawcommand,
1636 is_rawcommand_name): Delete decls.
1638 * lex.h, lex.l (lexer_flags.looking_at_object_index): Now a
1639 std::list<bool> object instead of an int.
1640 Push TRUE to list at start of object index. Push FALSE at
1641 beginning of matrix list. Pop value at end of object index or
1643 (lexer_flags.looking_for_object_index): New data member.
1644 Set it as needed in rules.
1645 (inside_any_object_index): New function.
1646 * parse.y (begin_obj_idx, cancel_obj_idx): Delete non-terminals
1649 2009-02-13 Ben Abbott <bpabott@mac.com>
1651 * graphics.h.in (class axes::properties): Initialize ticklength.
1652 * graphics.cc (default_axes_ticklength): New function.
1654 2009-02-13 John W. Eaton <jwe@octave.org>
1656 * oct-stream.cc (octave_base_stream::do_gets): Handle CRLF and CR.
1658 * toplev.cc (do_octave_atexit): Only save history if
1659 Vsaving_history is true.
1661 2009-02-12 John W. Eaton <jwe@octave.org>
1663 * data.cc, ov-base-diag.h, ov-base-mat.h, ov-base-scalar.h,
1664 ov-base-sparse.h, ov-base.cc, ov-base.h, ov-perm.h, ov-range.h,
1665 ov.h: Rename internal issorted and issorted_rows functions to
1666 is_sorted and is_sorted_rows.
1668 * ov-base-diag.h, ov-base-mat.h, ov-base-scalar.h, ov-base.h,
1669 ov-cell.h, ov-perm.h, ov-range.h, ov.h, data.cc, ov-base.cc,
1670 ov-cell.cc: Rename all uses of sortrows_idx to sort_rows_idx.
1672 * TEMPLATE-INST/Array-tc.cc: Don't instantiate sort functions for
1673 Arrays of octave_value objects.
1674 (octave_sort<octave_value>::ascending_compare,
1675 octave_sort<octave_value>::descending_compare): Delete.
1677 * ov.h (octave_value::cellstr_value): New function.
1678 * ov-base.cc, ov-base.h (octave_base_value::cellstr_value):
1680 * ov-cell.h (octave_cell::cellstr_value, octave_cell::sort,
1681 octave_cell::sortrows_idx): New functions
1682 * Cell.h, Cell.cc (Cell::Cell (Array<std::string>)): New constructor.
1684 * TEMPLATE-INST/Array-tc.cc: Undo previous change.
1685 (octave_sort<octave_value>::ascending_compare,
1686 octave_sort<octave_value>::descending_compare):
1687 Pass args by const reference instead of value.
1689 * version.h (OCTAVE_VERSION): Now 3.1.52+.
1690 (OCTAVE_API_VERSION): Now api-v34+.
1692 * TEMPLATE-INST/Array-tc.cc
1693 (octave_sort<octave_value>::ascending_compare,
1694 octave_sort<octave_value>::descending_compare):
1695 Delete unused template specializations.
1696 Use NO_INSTANTIATE_ARRAY_SORT instead of INSTANTIATE_ARRAY_SORT
1699 2009-02-11 Thomas Treichl <Thomas.Treichl@gmx.net>
1701 * gl-render.h: Use HAVE_FRAMEWORK_OPENGL.
1702 * gl-render.cc (opengl_tesselator, opengl_renderer::draw,
1703 opengl_renderer::init_marker): Use HAVE_FRAMEWORK_OPENGL.
1705 2009-02-11 Jaroslav Hajek <highegg@gmail.com>
1707 * ov.h (octave_value::issorted, octave_value::sortrows_idx,
1708 octave_value::issorted_rows): New methods.
1709 * ov.cc (octave_base_value::issorted, octave_base_value::sortrows_idx,
1710 octave_base_value::issorted_rows): New methods.
1711 * ov.cc: Declare them.
1713 * ov-base-mat.h (octave_base_matrix::issorted, octave_base_matrix::sortrows_idx,
1714 octave_base_matrix::issorted_rows): New methods.
1716 * ov-base-diag.h (octave_base_diag::issorted, octave_base_diag::sortrows_idx,
1717 octave_base_diag::issorted_rows): New methods.
1719 * ov-perm.h (octave_perm_matrix::issorted, octave_perm_matrix::sortrows_idx,
1720 octave_perm_matrix::issorted_rows): New methods.
1722 * ov-range.h (octave_range::issorted, octave_range::sortrows_idx,
1723 octave_range::issorted_rows): New methods.
1725 * data.cc (F__sortrows_idx__, Fissorted): New defuns.
1727 2009-02-11 John W. Eaton <jwe@octave.org>
1729 * toplev.cc (octave_config_info): Add octetcdir to the struct.
1730 * defaults.h.in (OCTAVE_OCTETCDIR): New macro.
1732 2009-02-10 Jaroslav Hajek <highegg@gmail.com>
1734 * DLD-FUNCTIONS/__pchip_deriv__.cc (F__pchip_deriv__):
1735 Add support for computing pchip derivatives along rows of matrix.
1736 Eliminate redundant copying by using const args where appropriate.
1738 2009-02-09 John W. Eaton <jwe@octave.org>
1740 * version.h (OCTAVE_VERSION): Now 3.1.52.
1741 (OCTAVE_RELEASE_DATE): Now 2009-02-09.
1742 (OCTAVE_COPYRIGHT): Update year.
1744 * load-path.cc (dir_info::update, dir_info::initialize):
1745 Likewise, to allow some functionality if getcwd fails.
1747 * toplev.cc (main_loop): Also catch octave_execution_exception.
1749 * DLD-FUNCTIONS/dispatch.cc: Comment out troublesome tests.
1751 * DLD-FUNCTIONS/eigs.cc: Increase tolerance to 1e-11 on all tests.
1753 * lex.l (lexical_feedback::looking_at_decl_list): New data member.
1754 * lex.l (lexical_feedback::init): Initialize it.
1755 (handle_identifier): Also force local variable if looking_at_decl_list.
1756 * parse.y (parsing_decl_list): New non-terminal.
1757 (declaration): Use it. Set lexer_flags.looking_at_decl_list to
1758 false after parsing the declaration.
1760 2009-02-09 Jaroslav Hajek <highegg@gmail.com>
1762 * TEMPLATE-INST/Array-tc.cc: Reflect changes in octave_sort.
1764 2009-02-08 John W. Eaton <jwe@octave.org>
1766 * octave.cc (initialize_pathsearch): Delete.
1767 (octave_main): Don't call initialize_pathsearch.
1769 2009-02-07 John W. Eaton <jwe@octave.org>
1771 * parse.y (eval_string): Use the one true evaluator.
1773 2009-02-06 John W. Eaton <jwe@octave.org>
1775 * Makefile.in (INCLUDES): Include oct-hdf5.h in the list.
1777 * Makefile.in (oct-gperf.h): Don't use pipeline to process gperf
1780 2009-02-05 John W. Eaton <jwe@octave.org>
1782 * symtab.cc (symbol_table::fcn_info::cn_info_rep::xfind):
1784 (symbol_table::fcn_info::cn_info_rep::find):
1785 Use it to avoid recursive call.
1787 * graphics.cc (Fdrawnow): Return after errors. Don't strip
1788 trailing directory separator from name used in call to file_stat.
1790 * DLD-FUNCTIONS/eigs.cc (Feigs): Avoid warnings about ambiguous
1791 else. Style fixes. Return after errors.
1793 2009-02-05 Jaroslav Hajek <highegg@gmail.com>
1795 * oct-map.cc (Octave_map::index): Optimize.
1797 2009-02-05 Jaroslav Hajek <highegg@gmail.com>
1799 * OPERATORS/op-cm-cs.cc: Use scalar_value in scalar-to-matrix
1800 indexed assignments.
1801 * OPERATORS/op-fcm-fcs.cc: Ditto.
1802 * OPERATORS/op-fm-fs.cc: Ditto.
1803 * OPERATORS/op-m-s.cc: Ditto.
1804 * OPERATORS/op-int.h (OCTAVE_MS_INT_ASSIGN_OPS): Use homogeneous
1805 integer scalar-to-matrix assignment.
1806 (OCTAVE_MM_INT_ASSIGN_OPS): Use homogeneous integer matrix-to-matrix
1809 * Cell.h (Cell::index): Remove direct idx_vector overloads.
1810 (Cell::assign): Remove direct idx_vector overloads.
1811 (Cell::delete_elements): Remove direct idx_vector overloads.
1812 * Cell.cc (Cell::index (const octave_value_list&)): Call
1813 ArrayN<octave_value>::index.
1815 * oct-map.h (Octave_map::index): Remove direct idx_vector overloads.
1816 * oct-map.cc (Octave_map::index): Ditto.
1817 * ov-base-mat.cc (octave_base_mat::do_index_op): Optimize scalar
1819 (octave_base_mat::assign (const octave_value_list&, const MT&)):
1820 Specialize variable argument number.
1821 (octave_base_mat::assign (const octave_value_list&, const
1822 typename MT::element_type&)):
1823 New method overload with optimized scalar indexing case.
1825 * ov-cell.cc (octave_base_matrix<Cell>::do_index_op,
1826 octave_base_matrix<Cell>::assign,
1827 octave_base_matrix<Cell>::delete_elements): Specialize.
1828 (octave_cell::assign (const_octave_value_list, const octave_value&):
1830 * ov-cell.h: Reflect change.
1832 * ov-cx-mat.cc (octave_complex_matrix::assign): Delete overloads.
1833 * ov-cx-mat.h: Reflect changes.
1834 * ov-flt-cx-mat.cc (octave_float_complex_matrix::assign): Delete overloads.
1835 * ov-flt-cx-mat.h: Reflect changes.
1836 * ov-list.cc (octave_list::do_index_op): Simplify.
1837 * ov-struct.cc (octave_struct::do_index_op): Simplify.
1838 * pt-eval.cc (tree_evaluator::visit_simple_for_command): Optimize
1839 traversing a row vector.
1841 2009-02-05 John W. Eaton <jwe@octave.org>
1843 * variables.cc (Vignore_function_time_stamp):
1844 Eliminate unused static variable.
1846 * debug.cc (get_file_line): Override default precedence in logical
1849 * ov-null-mat.cc (default_null_str_numeric_conversion_function,
1850 default_null_sq_str_numeric_conversion_function,
1851 default_null_matrix_numeric_conversion_function):
1852 Avoid unused variable warning.
1854 * ov-flt-re-diag.cc (octave_float_diag_matrix::save_binary):
1855 Avoid unused parameter warning.
1856 * pt-eval.cc (tree_evaluator::visit_if_clause): Likewise.
1857 * ov-typeinfo.cc (octave_value_typeinfo::do_register_type): Likewise.
1858 * ov-base.cc (octave_base_value::subsref (const std::string&,
1859 const std::list<octave_value_list>&, bool): Likewise.
1860 * ov-flt-cx-diag.cc (octave_float_complex_diag_matrix::save_binary):
1863 * oct-hdf5.h: New file.
1864 * ls-hdf5.cc, ov-base.h, ov.h: Include oct-hdf5.h instead of hdf5.h.
1865 * ls-hdf5.h: Include oct-hdf5.h.
1866 * load-save.cc: Include ls-hdf5.h instead of hdf5.h.
1867 * ov-base-sparse.cc, load-save.cc:
1868 Don't protect #include "ls-hdf5.h" with #ifdef.
1870 2009-02-04 Kai Habel <kai.habel@gmx.de>
1872 * gl-render.cc (opengl_renderer::draw (surface::properties)):
1873 Normalize surface normals. Correct calculation of diffuse lighting.
1874 * gl-render.cc (opengl_renderer::draw (patch::properties)):
1875 Correct calculation of diffuse lighting.
1877 2009-02-04 John W. Eaton <jwe@octave.org>
1879 * help.cc (do_which): If NAME is not in the symbol table, look for
1880 a function file in the load path.
1881 (raw_help_from_file): Unwind-protect and set reading_script_file.
1883 * pt-loop.h, pt-loop.cc (evaluating_looping_command):
1884 Delete global variable and all uses.
1885 * parse.y, parse.h (evaluating_function_body): Delete global
1886 variable and all uses.
1887 (make_break_command, make_continue_command, make_return_command):
1888 Use tree_evaluator::in_fcn_or_script_body and
1889 tree_evaluator::in_loop_command instead of
1890 evaluating_function_body and evaluating_looping_command.
1892 * pt-eval.h (tree_evaluator::in_function_or_script_body):
1893 Delete member variable and all uses.
1894 (tree_evaluator::reset): Delete function and all uses.
1896 * pt-eval.cc, pt-eval.h (tree_evaluator::in_fcn_or_script_body,
1897 tree_evaluator::in_loop_command): New static variables.
1898 (tree_evaluator::visit_simple_for_command,
1899 tree_evaluator::visit_complex_for_command,
1900 tree_evaluator::visit_while_command,
1901 tree_evaluator::visit_do_until_command): Unwind-protect and set
1902 tree_evaluator::in_loop_command instead of
1903 evaluating_looping_command.
1904 (tree_evaluator::visit_statement): Only call echo_code if
1905 evaluating function or script and (Vecho_executing_commands &
1906 ECHO_FUNCTIONS). Use tree_evaluator::in_fcn_or_script_body
1907 instead of evaluating_function_body.
1909 * ov-usr-fcn.cc (octave_user_script::do_multi_index_op):
1910 octave_user_function::do_multi_index_op): Unwind-protect and set
1911 tree_evaluator::in_fcn_or_script_body.
1913 * pt-stmt.cc, pt-stmt.h (tree_statement::echo_code):
1914 Rename from maybe_echo_code. Simplify.
1916 2009-02-04 Jaroslav Hajek <highegg@gmail.com>
1918 * pt-loop.h (tree_simple_for_command::do_for_loop_once,
1919 tree_complex_for_command::do_for_loop_once): Remove obsolete decls.
1920 * pt-loop.cc (quit_loop_now): Remove obsolete method.
1921 * pt-eval.cc (DO_ND_LOOP): Delete macro.
1922 (tree_evaluator::visit_simple_for_command): Use the generic
1923 do_index_op for iterating matrices.
1925 2009-02-04 John W. Eaton <jwe@octave.org>
1927 New evaluator and debugger derived from tree-walker class.
1929 * pt-eval.h, pt-eval.cc: New files. Parse tree evaluator code
1930 adapted from eval member functions in classes derived from
1932 * Makefile.in (PT_INCLUDES, PT_SRC): Add them to the lists
1934 * pt-cmd.cc (tree_function_def::eval): Delete.
1935 * pt-cmd.h: Delete decl.
1936 (tree_command::eval): Delete pure virtual function.
1937 (tree_no_op_command::eval): Delete.
1938 (tree_function_def::function): Return octave_value, instead of
1939 pointer to octave_function. Change all uses.
1941 * pt-except.cc (do_catch_code, tree_try_catch_command::eval,
1942 do_unwind_protect_cleanup_code,
1943 tree_unwind_protect_command::eval): Delete.
1944 * pt-except.h: Delete decls.
1946 * pt-jump.cc (tree_break_command::eval, tree_return_command::eval,
1947 tree_continue_command::eval): Delete.
1948 * pt-jump.h: Delete decls.
1950 * pt-loop.cc (DO_ND_LOOP): Delete macro.
1951 (tree_while_command::eval, tree_do_until_command::eval,
1952 tree_simple_for_command::do_for_loop_once,
1953 tree_simple_for_command::eval,
1954 tree_complex_for_command::do_for_loop_once,
1955 tree_complex_for_command::eval):
1956 * pt-loop.h: Delete decls.
1958 * pt-select.cc (tree_if_clause::eval, tree_if_command_list::eval,
1959 tree_if_command::eval, tree_switch_case::eval,
1960 tree_switch_case_list::eval, tree_switch_command::eval): Delete.
1961 * pt-select.h: Delete decls.
1962 (class tree_if_clause, class tree_switch_case): Derive from tree.
1963 Handle line and column in constructors.
1965 * pt-stmt.cc (tree_statement::eval): Delete
1966 * pt-stmt.h: Delete decl.
1968 * pt-stmt.cc, pt-stmt.h (tree_statement::is_command,
1969 tree_statement::is_expression, tree_statement::line,
1970 tree_statement::column): Now const.
1972 * pt-stmt.cc (tree_statement::set_print_flag,
1973 tree_statement::is_end_of_fcn_or_script): New functions.
1974 * pt-stmt.h: Provide decl.
1975 (set_breakpoint, delete_breakpoint, is_breakpoint): New function.
1976 (bp): New member variable.
1977 (print_result): Delete member variable.
1978 (tree_statement_list::anon_function_body): New member variable.
1979 (tree_statement_list::mark_as_anon_function_body,
1980 tree_statement_list::is_anon_function_body,
1981 tree_statement_list::is_script_body): New functions.
1983 * pt-decl.cc (tree_decl_init_list::eval,
1984 tree_decl_command::accept, tree_global_command::do_init,
1985 tree_global_command::eval, tree_static_command::do_init,
1986 tree_static_command::eval): Delete.
1987 * pt-decl.h: Delete decls.
1988 (tree_decl_elt::eval_fcn): Delete typedef.
1990 * pt-decl.cc (tree_global_command::accept,
1991 tree_static_command::accept): New functions.
1993 * pt-stmt.cc (tree_statement::print_result): Move here from
1994 pt-stmt.h. Return true if expr is printable.
1996 * ov-base.cc (Vsilent_functions): Delete.
1997 (octave_base_value::print_with_name): Don't check
1998 evaluating_function_body && Vsilent_functions here.
1999 * ov-class.cc (octave_class::print_with_name): Likewise.
2000 * ov-base.h (Vsilent_functions): Delete decl.
2001 * pt-eval.cc (Fsilent_functions): Move here from ov-base.cc.
2002 (Vsilent_functions): New static variable.
2004 * sighandlers.cc (user_abort): Set tree_evaluator::debug_mode here.
2006 * pt.h (tree::bp): Rename from tree::break_point.
2007 (tree::set_breakpoint, tree::delete_breakpoint, tree::is_breakpoint):
2010 * input.cc (get_debug_input): Use current_evaluator and
2011 tree-walker to evaluate command.
2012 * ov-usr-fcn.cc (octave_user_script::do_multi_index_op): Likewise.
2013 * toplev.cc (main_loop): Likewise.
2014 * parse.y (eval_string):
2016 * input.h, input.cc (Vdebugging_current_line): Delete.
2017 (get_debug_input): Use tree_evaluator::debug_line instead of
2018 Vdebugging_current_line.
2020 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
2021 Handle inline functions and anonymous functions as single
2023 * parse.y (eval_string): Likewise.
2025 * parse.y (make_do_until_command): Rename first argument from
2026 do_tok to until_tok.
2027 (loop_command): Pass UNTIL token instead of DO token to
2028 make_do_until_command.
2029 (make_elseif_clause): New arg, elseif_tok. Pass line and column
2030 info to tree_if_clause constructor.
2031 (elseif_clause): Pass ELSEIF token to make_elseif_clause.
2032 (make_switch_case): New arg, case_tok. Pass line and column info
2033 to tree_switch_case constructor.
2034 (switch_case): Pass CASE token to make_switch_case.
2035 (make_script): New arg end_script. Append it to cmds.
2036 (script): Create no-op command for end of script and pass it to
2038 (start_function): New arg, end_function. Append it to body.
2039 (function2): Pass end_function to start_function.
2040 (make_end): New function.
2041 (function_end): Declare as tree_statement_type.
2042 Create no-op command for end of script.
2043 (make_anon_fcn_handle): Mark body as anonymous function.
2044 (set_stmt_print_flag): Set print flag for all separator types
2046 * parse.y (fold (tree_binary_expression*),
2047 fold (tree_unary_expression *), finish_colon_expression,
2048 finish_matrix): Call rvalue1 instead of rvalue.
2049 Stash line number in new tree_constant object.
2051 * debug.h (bp_table::have_breakpoints): New static function.
2052 (bp_table::do_have_breakpoints): New member function.
2053 * debug.cc (bp_table::do_add_breakpoint,
2054 bp_table::do_remove_breakpoint,
2055 bp_table::do_remove_all_breakpoints_in_file,
2056 bp_table::do_remove_all_breakpoints): Call
2057 bp_table::have_breakpoints to set tree_evaluator::debug_mode.
2058 (Fdbnext): Delete function. Alias to dbstep.
2059 (Fdbquit, Fdbcont): Set tree_evaluator::dbstep_flag to zero.
2060 (Fdbstep): Rewrite to use tree_evaluator::dbstep_flag instead of
2061 tree::break_next, tree::last_line, tree::break_function, and
2062 tree::last_break_function.
2063 (Fdbwhere): Use tree_evaluator::debug_line and
2064 tree_evaluator::debug_column to get current line and column info.
2065 Don't print column if it is less than zero.
2066 * pt.cc, pt.h (tree::break_next, tree::last_line,
2067 tree::last_break_function, tree::break_function,
2068 tree::break_statement): Delete.
2070 * pt-bp.cc (tree_breakpoint::visit_global_command,
2071 tree_breakpoint::visit_static_command,
2072 tree_breakpoint::take_action (tree_statement&)): New functions.
2073 * pt-bp.h: Provide decls.
2075 * pt-bp.h (tree_walker::visit_global_command,
2076 tree_walker::visit_static_command): New pure virtual functions.
2077 (tree_walker::visit_decl_command): Delete.
2079 * pt-bp.cc (tree_breakpoint::visit_decl_command): Delete.
2080 * pt-bp.h: Delete decl.
2081 (MAYBE_DO_BREAKPOINT): Delete macro and all uses.
2083 * pt-bp.cc (tree_breakpoint::visit_no_op_command): Do nothing.
2084 (tree_breakpoint::visit_argument_list,
2085 tree_breakpoint::visit_binary_expression,
2086 tree_breakpoint::visit_colon_expression,
2087 tree_breakpoint::visit_decl_elt,
2088 tree_breakpoint::visit_decl_init_list,
2089 tree_breakpoint::visit_octave_user_script,
2090 tree_breakpoint::visit_octave_user_function,
2091 tree_breakpoint::visit_octave_user_function_header,
2092 tree_breakpoint::visit_octave_user_function_trailer,
2093 tree_breakpoint::visit_identifier,
2094 tree_breakpoint::visit_index_expression,
2095 tree_breakpoint::visit_matrix, tree_breakpoint::visit_cell,
2096 tree_breakpoint::visit_multi_assignment,
2097 tree_breakpoint::visit_anon_fcn_handle,
2098 tree_breakpoint::visit_constant,
2099 tree_breakpoint::visit_fcn_handle,
2100 tree_breakpoint::visit_parameter_list,
2101 tree_breakpoint::visit_postfix_expression,
2102 tree_breakpoint::visit_prefix_expression,
2103 tree_breakpoint::visit_return_list,
2104 tree_breakpoint::visit_simple_assignment): Call panic_impossible
2105 since breakpoints aren't set on expressions.
2106 (tree_breakpoint::visit_if_clause): Fold into visit_if_command_list.
2107 (tree_breakpoint::visit_switch_case): Fold into visit_switch_case_list.
2108 (tree_breakpoint::visit_try_catch_command,
2109 tree_breakpoint::visit_unwind_protect_command):
2110 Don't set breakpoint on command itself, the the statements it
2112 (tree_breakpoint::visit_global_command,
2113 tree_breakpoint::visit_static_command): Call do_decl_command to do
2115 (tree_breakpoint::visit_while_command,
2116 tree_breakpoint::visit_do_until_command,
2117 tree_breakpoint::visit_simple_for_command,
2118 tree_breakpoint::visit_complex_for_command,
2119 tree_breakpoint::visit_statement,
2120 tree_breakpoint::visit_statement_list,
2121 tree_breakpoint::visit_switch_case_list): Set breakpoints at
2124 * pt-pr-code.h, pt-pr-code.cc (tree_print_code::visit_global_command,
2125 tree_print_code::visit_static_command,
2126 tree_print_code::do_decl_command): New functions.
2127 (tree_print_code::visit_decl_command): Delete.
2129 * pt-check.h, pt-check.cc (tree_checker::visit_global_command,
2130 tree_checker::visit_static_command, tree_checker::do_decl_command):
2132 (tree_checker::visit_decl_command): Delete.
2134 * pt-select.cc (tree_switch_case::label_matches): Call rvalue1
2137 * pt-exp.h, pt-exp.cc (tree_expression::rvalue1): New function.
2138 (tree_expression::rvalue (void)): Delete.
2139 (tree_expression::is_logically_true): Call rvalue1 instead of rvalue.
2141 * pt-fcn-handle.h, pt-fcn-handle.cc (tree_fcn_handle::rvalue1,
2142 tree_anon_fcn_handle::rvalue1): New functions.
2143 (tree_fcn_handle:rvalue (void),
2144 tree_anon_fcn_handle::rvalue1 (void)): Delete.
2145 (tree_fcn_handle::rvalue (int), tree_anon_fcn_handle_rvalue (int)):
2146 Call rvalue1 instead of rvalue.
2148 * pt-idx.h, pt-idx.cc (tree_index_expression::rvalue1): New function.
2149 (tree_index_expression::rvalue (void)): Delete.
2150 (tree_index_expression::get_struct_index,
2151 tree_index_expression::rvalue (int)): Call rvalue1 instead of rvalue.
2153 * pt-mat.h, pt-mat.cc (tree_matrix::rvalue1): New function.
2154 (tree_matrix::rvalue (void)): Delete.
2155 (tm_row_const::tm_row_const_rep::init,
2156 tree_matrix::rvalue (int)): Call rvalue1 instead of rvalue.
2158 * pt-misc.cc (tree_parameter_list::convert_to_const_vector):
2159 Call rvalue1 instead of rvalue.
2160 * pt-arg-list.cc (tree_argument_list::convert_to_const_vector):
2163 * pt-unop.h, pt-unop.cc (tree_prefix_expression::rvalue1,
2164 tree_postfix_expression::rvalue1): New functions.
2165 (tree_prefix_expression::rvalue (void),
2166 tree_postfix_expression::rvalue (void)): Delete.
2167 (tree_prefix_expression::rvalue (int),
2168 tree_postfix_expression::rvalue (int)):
2169 Call rvalue1 instead of rvalue.
2171 * pt-id.h, pt-id.cc (tree_identifier::rvalue1): New function.
2172 (tree_identifier::rvalue (void)): Delete.
2174 * pt-assign.h, pt-assign.cc (tree_simple_assignment::rvalue1,
2175 tree_multi_assignment::rvalue1): New functions.
2176 (tree_simple_assignment::rvalue (void),
2177 tree_multi_assignment::rvalue (void): Delete.
2178 (tree_simple_assignment::rvalue (int)):
2179 Call rvalue1 instead of rvalue.
2181 * pt-binop.h, pt-binop.cc (tree_binary_expression::rvalue1,
2182 tree_boolean_expression::rvalue1): New functions.
2183 (tree_binary_expression::rvalue (void),
2184 tree_boolean_expression::rvalue (void)): Delete.
2185 (tree_binary_expression::rvalue (int),
2186 tree_boolean_expression::rvalue (int)):
2187 Call rvalue1 instead of rvalue.
2189 * pt-cbinop.h, pt-cbinop.cc
2190 (tree_compound_binary_expression::rvalue1): New function.
2191 (tree_compound_binary_expression::rvalue (void)): Delete.
2193 * pt-cell.h, pt-cell.cc (tree_cell::rvalue1): New function.
2194 (tree_cell::rvalue (void)): Delete.
2195 (tree_cell::rvalue (int)): Call rvalue1 instead of rvalue.
2197 * pt-colon.h, pt-colon.cc (tree_colon_expression::rvalue1):
2199 (tree_colon_expression::rvalue (void)): Delete.
2200 (tree_colon_expression::rvalue (int)):
2201 Call rvalue1 instead of rvalue.
2203 * pt-const.h, pt-const.cc (tree_constant::rvalue1): New function.
2204 (tree_constant::rvalue (void)): Delete.
2205 (tree_constant::rvalue (int)): Call rvalue1 instead of rvalue.
2207 * pt-decl.h, pt-decl.cc (tree_decl_elt::ravlue1): New function.
2208 (tree_decl_elt::ravlue (void)): Delete.
2209 (tree_decl_elt::eval): Call rvalue1 instead of rvalue.
2211 2009-02-03 Jaroslav Hajek <highegg@gmail.com>
2213 * TEMPLATE-INST/Array-tc.cc: Replace vec_index by pointers.
2215 2009-02-02 Jaroslav Hajek <highegg@gmail.com>
2217 * ov-re-mat.cc (octave_matrix::abs, octave_matrix::real,
2218 octave_matrix::imag, octave_matrix::conj): Use special code.
2219 * ov-flt-re-mat.cc (octave_float_matrix::abs, octave_float_matrix::real,
2220 octave_float_matrix::imag, octave_float_matrix::conj): Use special code.
2221 * ov-cx-mat.cc (octave_complex_matrix::abs, octave_complex_matrix::real,
2222 octave_complex_matrix::imag, octave_complex_matrix::conj): Use special code.
2223 * ov-flt-cx-mat.cc (octave_float_complex_matrix::abs, octave_float_complex_matrix::real,
2224 octave_float_complex_matrix::imag, octave_float_complex_matrix::conj): Use special code.
2226 2009-01-30 Jaroslav Hajek <highegg@gmail.com>
2228 * DLD-FUNCTIONS/lookup.cc (Flookup): Add missing check.
2230 2009-01-29 John W. Eaton <jwe@octave.org>
2232 * pt-stmt.cc (tree_statement::eval): Check
2233 in_function_or_script_body instead of symbol_table::at_top_level ()
2234 to decide whether to call octave_call_stack::set_statement.
2236 * graphics.cc (properties::set_defaults): Also set
2237 horizontalalignment, verticalalignmnt, and rotation properties for
2238 new label objects here.
2240 * ov-base-scalar.cc (octave_base_scalar<ST>::is_true (void) const):
2241 Error if scalar is NaN.
2242 * ov-base-mat.cc (octave_base_matrix<MT>::is_true (void) const):
2243 Likewise, if any element of matrix is NaN.
2244 * ov-cell.cc (octave_cell::is_true): New function.
2245 * Cell.h (Cell::any_element_is_nan): New function.
2247 2009-01-29 Jaroslav Hajek <highegg@gmail.com>
2250 (void octave_print_internal (..., const DiagMatrix& m,...),
2251 (void octave_print_internal (..., const ComplexDiagMatrix& m,...),
2252 (void octave_print_internal (..., const FloatDiagMatrix& m,...),
2253 (void octave_print_internal (..., const FloatComplexDiagMatrix& m,...)):
2255 * pr-output.h: Declare them.
2256 * ov-base-diag.cc (octave_base_diag::print_raw): Call
2257 octave_print_internal.
2259 2009-01-28 John W. Eaton <jwe@octave.org>
2261 * Makefile.in (install, uninstall): Handle SHLLIBPRE and SHLBINPRE
2262 library prefixes. From Marco Atzeri <marco_atzeri@yahoo.it>.
2264 2008-01-28 David Bateman <dbateman@free.fr>
2266 * DLD-FUNCTIONS/regexp.cc (octregexp_list): Don't break for zero
2267 length match, but rather advance the index by one character and
2270 2009-01-28 Jaroslav Hajek <highegg@gmail.com>
2272 * DLD-FUNCTIONS/lookup.cc (Flookup): Fix doc string.
2274 2009-01-27 John W. Eaton <jwe@octave.org>
2276 * load-path.cc (Fcommand_line_path): Rename from Fcommandlinepath.
2278 2009-01-27 Ben Abbott <bpabbott@mac.com>
2280 * graphics.cc (convert_position): Handle character units.
2281 (default_axes_tick, default_figure_papersize,
2282 default_figure_paperposition): New functions.
2283 * graphics.h.in (class figure::properties): Use them to
2284 initialize papersize, paperposition, xtick, ytick, and ztick
2287 2009-01-27 Jaroslav Hajek <highegg@gmail.com>
2289 * DLD-FUNCTIONS/qr.cc (Fqr): Treat empty matrices correctly.
2291 2009-01-26 Thomas Treichl <Thomas.Treichl@gmx.net>
2293 * display.cc (display_info::init): Use double instead of CGFloat.
2294 Use HAVE_FRAMEWORK_CARBON instead of OCTAVE_USE_OS_X_API.
2296 2009-01-26 John W. Eaton <jwe@octave.org>
2298 * load-path.cc (load_path::do_find_fcn): Handle @foo/bar.
2300 2009-01-24 Jaroslav Hajek <highegg@gmail.com>
2302 * pt-cell.cc (tree_cell::rvalue): Optimize the single row case.
2304 2009-01-24 Jaroslav Hajek <highegg@gmail.com>
2306 * ov-struct.cc (octave_struct::subsasgn): Reshape cs-list on rhs
2307 according to the index expression.
2308 * ov-cell.cc (octave_cell::subsasgn): Ditto.
2310 2008-12-25 Ben Abbott <bpabbott@mac.com>
2312 * load-path.cc (Fcommandlinepath): New function.
2313 * load-path.h (load_path::get_command_line_path,
2314 load_path::do_get_command_line_path): New functions.
2316 2009-01-24 Ben Abbott <bpabbott@mac.com>
2318 * DLD-FUNCTIONS/eigs.cc: eigs.cc: skip tests if ARPACK is missing.
2320 2009-01-25 Søren Hauberg <hauberg@gmail.com>
2322 * help.cc (do_get_help_text, raw_help_from_symbol_table): new output to
2323 flag the a function is found but not documented.
2325 2009-01-25 Søren Hauberg <hauberg@gmail.com>
2327 * help.cc (raw_help_from_file): No longer search for files called
2328 'Contents.m', as this is moved to 'script/help.m'.
2331 2009-01-23 John W. Eaton <jwe@octave.org>
2333 * toplev.cc (octave_call_stack::do_goto_caller_frame):
2334 Also allow caller frame to be base frame, not just user code.
2336 2009-01-23 Jaroslav Hajek <highegg@gmail.com>
2338 * gripes.cc (gripe_indexed_cs_list, gripe_invalid_inquiry_subscript):
2340 * gripes.h: Declare them.
2341 * pt-idx.cc: Remove definitions of the above funcs.
2342 * ov-cell.cc (octave_cell::subsref): Declare constants as const.
2343 (octave_cell::subsasgn): Remove dead branch, declare constants as const.
2344 (octave_cell::list_value): Optimize.
2346 (octave_struct::subsref): Declare constants as const.
2347 (octave_struct::subsasgn): Remove dead branch, declare constants as const.
2348 * ov-cs-list.cc (octave_cs_list::octave_cs_list (const Cell&)):
2350 * oct-obj.cc (octave_value_list::octave_value_list (const
2351 std::list<octave_value_list>&)): New constructor.
2352 * oct-obj.h: Declare it.
2353 * pt-arg-list.cc (convert_to_const_vector): Optimize.
2354 * symtab.cc (symbol_table::fcn_info::fcn_info_rep::find): Use const
2355 reference to avoid redundant copy.
2356 * ov-usr-fcn.cc (octave_user_function::bind_automatic_vars): Optimize.
2357 (octave_user_function::octave_all_va_args): Optimize.
2359 2009-01-22 Jaroslav Hajek <highegg@gmail.com>
2361 * Cell.h (Cell::Cell (octave_value_list)): Only declare.
2362 (Cell::index (*)): Change resize_ok type to bool.
2363 * Cell.cc (Cell::Cell (octave_value_list)): Redefine.
2364 * oct-obj.h, oct-obj.cc: Change octave_value_list::data to
2365 Cell variable, reflect changes.
2367 2009-01-22 John W. Eaton <jwe@octave.org>
2369 * help.cc (do_which (std::ostream&, const std::string&), Fwhich):
2371 (do_which (const std::string&, std::string&), F__which__):
2373 * do_which (const std::string&):
2374 Call do_which (const std::string&, std::string&) to do the work.
2376 2009-01-22 Søren Hauberg <hauberg@gmail.com>
2378 * defun-int.h (print_usage): No longer mark as deprecated.
2379 * defun.cc (print_usage): Simply call feval to execute print_usage.m.
2380 * help.cc (additional_help_message, display_names_from_help_list,
2381 display_symtab_names, simple_help, try_info, help_from_info,
2382 display_help_text, display_usage_text, raw_help_from_list,
2383 help_from_list, help_from_symbol_table, help_from_file,
2384 builtin_help, Fhelp, display_file, do_type, Ftype,
2385 first_help_sentence, print_lookfor, Flookfor): Delete.
2386 (looks_like_html, raw_help_from_map, raw_help, do_get_help_text,
2387 F__operators__, F__keywords__, F__builtins__,
2388 file_is_in_dir, F__list_functions__): New functions.
2389 (pair_type, map_iter): New typedefs.
2390 (operators, keywords): Use pair_type for elements of list.
2391 (names): Use map for (keyword, doc) lists.
2392 (make_name_list): Sprinkle with const.
2393 * help.h (display_help_text, display_usage_text,
2394 additional_help_message): Delete decls.
2396 2009-01-22 John W. Eaton <jwe@octave.org>
2398 * toplev.cc (octave_config_info): Check OCTAVEUSE_OS_X_API instead
2399 of __APPLE__ && __MACH__.
2401 * display.cc (display_info::init): Get info for Windows and OS X
2404 2009-01-22 Jaroslav Hajek <highegg@gmail.com>
2406 * pt-idx.cc (tree_index_expression::lvalue): Correct tmpi when seeing
2407 a plain struct component.
2408 * ov-struct.cc (octave_struct::subsasgn): Use proper type substr in
2411 2009-01-22 Jaroslav Hajek <highegg@gmail.com>
2413 * DLD-FUNCTIONS/qr.cc: Remove HAVE_QRUPDATE check.
2414 * DLD-FUNCTIONS/chol.cc: Ditto.
2416 2009-01-21 John W. Eaton <jwe@octave.org>
2418 * Makefile.in (display.o): Add X11_INCFLAGS to CPPFLAGS.
2419 (octave$(EXEEXT)): Link with X11_LIBS.
2421 * display.h, display.cc: New files.
2422 * graphics.cc (default_screendepth, default_screensize,
2423 default_screenpixelsperinch): New functions.
2424 * graphics.h.in (class root_figure::properties): New property,
2425 screendepth. Use default_screensize to initialize screensize
2426 property. Use default_screenpixelsperinch to initialize
2427 screenpixelsperinch property.
2429 * graphics.cc (properties::init): Set default xlabel, ylabel,
2430 zlabel, and title properties that differ from default text
2433 2009-01-21 Jaroslav Hajek <highegg@gmail.com>
2435 * OPERATORS/op-range.cc: Define & register range-scalar ops.
2437 2009-01-21 Jaroslav Hajek <highegg@gmail.com>
2439 * ov.h (octave_value::subsref (..., bool auto_add)): New method.
2440 (octave_value::next_subsref (bool auto_add, ...)): New method.
2441 * ov.cc (octave_value::next_subsref (bool auto_add, ...)): New method.
2442 * ov-base.h (octave_base_value::subsref (..., bool auto_add)): New
2444 * ov-base.cc (octave_base_value::subsref (..., bool auto_add)): New
2446 * ov-cell.cc (octave_cell::subsref (..., bool auto_add)): New virtual
2448 * ov-cell.h (octave_cell::subsref (..., bool auto_add)): Declare it.
2449 * ov-struct.cc (octave_struct::subsref (..., bool auto_add)): New
2451 (octave_struct::subsref (const std::string& type, const
2452 std::list<octave_value_list>& idx)): Do not allow resizing.
2453 * ov-struct.h (octave_struct::subsref (..., bool auto_add)): Declare
2455 * ov-struct.cc (octave_struct::dotref (..., bool auto_add)): New
2457 * ov-struct.h (octave_struct::dotref (..., bool auto_add)): Declare it.
2458 * pt-idx.cc (tree_index_expression::rvalue): Do not reevaluate already
2459 evaluated part of the index chain.
2460 (tree_index_expression::rvalue): Do not reevaluate already evaluated
2461 part of the index chain. Do not actually perform trailing indexing.
2462 Do not allow indexing cs-lists.
2464 2009-01-20 John W. Eaton <jwe@octave.org>
2466 * file-io.cc (Ffstat): New function.
2468 2009-01-17 Jaroslav Hajek <highegg@gmail.com>
2470 * DLD-FUNCTIONS/qr.cc (Fqrupdate, Fqrinsert, Fqrdelete, Fqrshift):
2471 Reflect changes in liboctave.
2472 * DLD-FUNCTIONS/chol.cc (Fcholupdate, Fcholinsert):
2473 Reflect changes in liboctave.
2475 2009-01-19 Jaroslav Hajek <highegg@gmail.com>
2477 * ov.h (octave_value::make_unique (int)): New method.
2478 * oct-obj.h (octave_value_list::octave_value_list (const Cell&)): New
2480 * ov-cell.cc (octave_cell::subsasgn): Allow composed {} indexing
2481 in multi-assignments. Optimize.
2482 * ov-struct.cc (octave_struct::subsasgn): Correct composed {} indexing
2483 in multi-assignments. Optimize & fix bugs.
2484 * pt-idx.cc (tree_index_expression::lvalue): Rewrite to allow
2485 specifying cs-list anywhere in index chain, be more robust.
2487 2009-01-19 John W. Eaton <jwe@octave.org>
2489 * lex.l (grab_comment_block): If not reading input from a file,
2490 bail out at first newline inside a comment.
2492 * lex.l (lexer_debug_flag): New static variable.
2493 (F__lexer_debug_flag__): New function.
2494 (LEXER_DEBUG): New macro. Use it in all patterns.
2495 (DISPLAY_TOK_AND_RETURN): Also display token if lexer_debug_flag
2497 (process_comment): Display comment if lexer_debug_flag is set.
2498 (display_character, display_state, lexer_debug): New static functions.
2499 (xunput): Display character if lexer_debug_flag is set.
2501 2009-01-17 Jaroslav Hajek <highegg@gmail.com>
2503 * ov.h: Describe usage of storable_value and make_storable_value.
2504 * ov.cc: Remove FIXME comment.
2506 2009-01-15 John W. Eaton <jwe@octave.org>
2508 * data.cc (Freshape): Include mismatched dimensions in error message.
2509 From Robert Millan <rmh@aybabtu.com>.
2511 2009-01-14 Jaroslav Hajek <highegg@gmail.com>
2513 * ov.cc (octave_value::maybe_economize): New method.
2514 (octave_value::non_null_value): rename to storable_value.
2515 (octave_value::make_non_null_value): rename to make_storable_value.
2516 * ov-base.h (octave_base_value::maybe_economize): New method.
2517 * ov-base-mat.h (octave_base_mat::maybe_economize): New override.
2518 * oct-obj.cc (octave_value_list::normalize_null_values):
2519 Rename to make_storable_values, use make_storable_value.
2521 * ov-builtin.cc: non_null_value -> storable_value.
2522 * ov-cell.cc: Ditto.
2523 * ov-struct.cc: Ditto.
2526 2009-01-15 Søren Hauberg <hauberg@gmail.com>
2528 * DLD-FUNCTIONS/__magick_read__.cc (encode_uint_image):
2529 Initialize bitdepth.
2531 2009-01-14 Søren Hauberg <hauberg@gmail.com>
2533 * DLD-FUNCTIONS/betainc.cc, DLD-FUNCTIONS/chol.cc,
2534 DLD-FUNCTIONS/daspk.cc, DLD-FUNCTIONS/dasrt.cc,
2535 DLD-FUNCTIONS/dassl.cc, DLD-FUNCTIONS/filter.cc,
2536 DLD-FUNCTIONS/gammainc.cc, DLD-FUNCTIONS/gcd.cc,
2537 DLD-FUNCTIONS/givens.cc, DLD-FUNCTIONS/hess.cc,
2538 DLD-FUNCTIONS/lsode.cc, DLD-FUNCTIONS/qr.cc, DLD-FUNCTIONS/qz.cc,
2539 DLD-FUNCTIONS/schur.cc, DLD-FUNCTIONS/svd.cc,
2540 DLD-FUNCTIONS/syl.cc, data.cc, mappers.cc:
2541 Use ifnottex instead of ifinfo.
2543 2009-01-14 John W. Eaton <jwe@octave.org>
2545 * load-path.cc (load_path::do_set): Call do_clear after disabling
2548 2009-01-13 Jaroslav Hajek <highegg@gmail.com>
2550 * dirfns.cc (Freadddir): qsort -> sort.
2551 * graphics.cc (maybe_set_children): Ditto.
2552 * help.cc (simple_help): Ditto.
2553 * input.cc (generate_possible_completions): Ditto.
2554 * oct_map.cc (keys_ok): Ditto.
2555 * ov-fcn-inline.cc (Finline): Ditto.
2556 * variables.cc (Fisrawcommand): Ditto.
2558 2009-01-12 John W. Eaton <jwe@octave.org>
2560 * octave.cc (maximum_braindamage): Set confirm_recursive_rmdir to
2563 * strfns.cc (Fstrcmp, Fstrncmp): Simplify by initializing all
2564 elements of output to false with constructor argument.
2566 2009-01-12 Thorsten Meyer <thorsten.meyier@gmx.de>
2568 * strfns.cc (Fstrncmp): New test.
2570 2009-01-12 John W. Eaton <jwe@octave.org>
2572 * pt-stmt.h (tree_statement::is_null_statement): New function.
2573 * parse.y (set_stmt_print_flag): Return list. Remove trailing
2574 null statements from list.
2575 (list, simple_list): Simplify action.
2576 (make_statement, make_statement_list, append_statement_list):
2577 Always create statements and them to the list.
2579 * base-list.h (octave_base_list::push_front,
2580 octave_base_list::push_back, octave_base_list::pop_front,
2581 octave_base_list::pop_back): New functions.
2583 * DLD-FUNCTIONS/qr.cc (Fqrupdate, Fqrinsert, Fqrdelete, Fqrshift):
2584 Require args to be numeric, not necessarily matrix objects.
2586 2009-01-12 Ben Abbott <bpabbott@mac.com>
2588 * graphics.h.in (text::properties::fontunits): Fix typo in list of
2591 2009-01-12 John W. Eaton <jwe@octave.org>
2593 * strfns.cc (Fstrvcat, Fchar): Use queue to avoid duplicate calls
2596 2009-01-12 Thorsten Meyer <thorsten.meyier@gmx.de>
2598 * strfns.cc (Fstrvcap): New function.
2600 2008-11-29 Thorsten Meyer <thorsten.meyier@gmx.de>
2602 * strfns.cc (Fchar, Fischar, Fstrncmp, Flist_in_columns):
2603 Improve documentation strings. Add examples and tests.
2605 2009-01-12 Jaroslav Hajek <highegg@gmail.com>
2607 * ov-perm.cc (octave_perm_matrix::do_index_op): Return shallow copy
2608 when indexed by (:,:).
2609 * ov-base-mat.cc (octave_base_diag::do_index_op): Return shallow copy
2610 when indexed by (:,:). Optimize indexing equivalent to resizing.
2611 * data.cc: Fix tests.
2612 * mappers.cc: Fix tests.
2614 2009-01-12 Jaroslav Hajek <highegg@gmail.com>
2616 * ov-base-diag.h, ov-base-mat.h, ov-base-scalar.h, ov-base-sparse.h,
2617 ov-base.cc, ov-base.h, ov-perm.h, ov-range.h, ov.h: Add full_value
2618 methods to octave_value, octave_base_value and its relevant
2620 * data.cc (Ffull): New DEFUN.
2621 * DLD-FUNCTIONS/sparse.cc (Ffull): move to data.cc.
2622 2009-01-11 Jaroslav Hajek <highegg@gmail.com>
2624 * ov.h (octave_value::is_copy_of): New method.
2625 * ov-struct.cc (numeric_conv): Add output parameter orig.
2626 (octave_struct::subsasgn): Temporarily erase duplicate lhs value prior
2629 2009-01-11 Jaroslav Hajek <highegg@gmail.com>
2631 * oct-obj.cc (octave_value_list::all_scalars): New method.
2632 * oct-obj.h: Declare it.
2633 * ov-cell.cc (octave_cell::subsasgn): Disable assigning
2634 to non-scalar {}-indexed cell, unless in a multi-assignment.
2636 2009-01-10 Jaroslav Hajek <highegg@gmail.com>
2638 * DLD-FUNCTIONS/sparse.cc (Ffull): Convert diagonal & permutation
2639 matrices, leave other classes untouched.
2641 2009-01-09 Jaroslav Hajek <highegg@gmail.com>
2643 * OPERATORS/op-cdm-cdm.cc: Install missing widening op.
2644 * OPERATORS/op-dm-dm.cc: Ditto.
2645 * OPERATORS/op-fcdm-fcdm.cc: Ditto.
2646 * OPERATORS/op-fdm-fdm.cc: Ditto.
2647 * OPERATORS/op-pm-pm.cc: Ditto.
2648 * OPERATORS/op-fpm-fpm.cc: Ditto.
2650 2009-01-09 Jaroslav Hajek <highegg@gmail.com>
2652 * ov-cell.cc (octave_cell::subsasgn): Put erased copy back after
2653 make_unique has been called.
2655 2009-01-09 Kai Habel <kai.habel@gmx.de>
2657 * graphics.cc: Calculate normals for surface boundaries, use
2658 more neighboring points to calculate interior normals
2660 2009-01-09 John W. Eaton <jwe@octave.org>
2662 * input.cc (get_user_input (void)): Don't increment input_line_number.
2663 * lex.l (xunput): New function. Use it in place of yyunput
2664 anywhere a newline character may be put back on the input stream.
2665 Increment input_line_number in all rules that consume newlines
2667 (text_yyinput): Increment input_line_number
2668 (fixup_column_count): Increment input_line_number.
2669 (prep_for_function): Set input_line_number to 1, not 0.
2670 (reset_parser): Set input_line_number to current_command_number,
2671 not current_command_number-1.
2672 (flex_stream_reader::ungetc): Call xunput, not yyunput.
2673 * parse.y (input_line_number): Initialize to 1, not 0.
2674 (text_getc): Increment input_line_number correctly.
2675 (stdio_stream_reader::ungetc): Decrement input_line_number if
2676 putting back a newline character.
2677 (parse_fcn_file): Set input_line_number to 1, not 0.
2678 (eval_string): Unwind-protect input_line_number and
2679 current_input_column.
2681 * parse.y (make_statement): New function.
2682 (statement): Use it.
2683 (make_statement_list, append_statement_list): New functions.
2684 (simple_list1, list1): Use them.
2686 2009-01-08 Jaroslav Hajek <highegg@gmail.com>
2688 * ov-cell.cc (octave_cell::subsasgn): Erase duplicate lhs value
2689 prior to assignment to avoid a redundant copy.
2691 2008-12-26 Thorsten Meyer <thorsten.meyier@gmx.de>
2693 * mappers.cc (Ftoascii), mappers.cc (Ftolower), mappers.cc
2694 (Ftoupper), DLD-FUNCTIONS/regexp.cc (Fregexp),
2695 DLD-FUNCTIONS/regexp.cc (Fregexpi), DLD-FUNCTIONS/regexp.cc
2696 (Fregexprep): Add references.
2698 2008-12-27 Jaroslav Hajek <highegg@gmail.com>
2700 * oct-obj.h, oct-obj.cc (octave_value_list::valid_scalar_indices): Remove.
2701 * ov-base-diag.cc, ov-base-diag.h, ov-base-scalar.cc, ov-base.h,
2702 ov-bool-mat.cc, ov-bool-mat.h, ov-bool-sparse.cc, ov-bool-sparse.h,
2703 ov-bool.cc, ov-bool.h, ov-ch-mat.cc, ov-ch-mat.h, ov-colon.h,
2704 ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h,
2705 ov-cx-sparse.cc, ov-cx-sparse.h, ov-float.cc, ov-float.h,
2706 ov-flt-complex.cc, ov-flt-complex.h, ov-flt-cx-mat.cc,
2707 ov-flt-cx-mat.h, ov-flt-re-mat.cc, ov-flt-re-mat.h, ov-intx.h,
2708 ov-perm.cc, ov-perm.h, ov-range.h, ov-re-mat.cc, ov-re-mat.h,
2709 ov-re-sparse.cc, ov-re-sparse.h, ov-scalar.cc, ov-scalar.h,
2710 ov-str-mat.cc, ov-str-mat.h, ov.h:
2711 Remove valid_as_scalar_index and valid_as_zero_index methods
2712 from octave_value, octave_base_value and all of its subclasses.
2714 2008-12-26 Francesco Potortì <pot@gnu.org>
2716 * data.cc (resize): Add cross reference to postpad.
2718 2008-12-25 Jaroslav Hajek <highegg@gmail.com>
2720 * load-save.h (load_save_format_type, load_save_format_options): New
2722 (load_save_format): Convert to a class.
2723 * load-save.cc (do_save(..., const octave_value&,...)): Use fmt.type
2724 in switch. Use options of LS_MAT_ASCII.
2725 (do_load, write_header): Use format.type in switch.
2726 * ls-mat-ascii.h (save_mat_ascii_data): Add tabs option.
2727 * ls-mat-ascii.cc (save_mat_ascii_data): Implement it.
2729 2008-12-24 Ben Abbott <bpabbott@mac.com>
2731 * DLD-FUNCTIONS/chol.cc: Compare results to 0 in tests.
2732 Delete spurious function calls in test block.
2734 2008-12-24 John W. Eaton <jwe@octave.org>
2736 * DLD-FUNCTIONS/eigs.cc: Use "testif HAVE_ARPACK" to skip tests if
2737 ARPACK is not available.
2739 * Makefile.in (DLD_XSRC): Add eigs.cc to the list.
2741 * load-save.cc (parse_save_options): Handle -double.
2743 2008-12-23 David Bateman <dbateman@free.fr>
2745 * DLD-FUNCTIONS/eigs.cc: New file.
2746 * Makefile.in (DLD_XSRC): Add it here.
2748 2008-12-22 David Bateman <dbateman@free.fr>
2750 * DLD-FUNCTIONS/__voronoi__.cc (F__voronoi__): Resize AtInf array
2751 before returning it.
2753 2008-12-12 David Bateman <dbateman@free.fr>
2755 * DLD-FUNCTIONS/chol.cc (Fcholinv): Add test.
2757 2008-12-12 Jaroslav Hajek <highegg@gmail.com>
2759 * ls-hdf5.cc (add_hdf5_data): Check for diagonal & permutation
2760 matrices and convert them to full prior to saving.
2762 2008-12-11 Jaroslav Hajek <highegg@gmail.com>
2764 * ov-re-mat.cc (Fdouble): Handle diagonal & perm matrices.
2765 * ov-flt-re-mat.cc (Fsingle): Handle diagonal & perm matrices.
2767 2008-12-11 Jaroslav Hajek <highegg@gmail.com>
2769 * ov-base-diag.cc (octave_base_diag<DMT,MT>::subsasgn): New method.
2770 * ov-base-diag.h (octave_base_diag<DMT,MT>::subsasgn): Declare it.
2771 (octave_base_diag<DMT,MT>::chk_valid_scalar): New method decl.
2773 * ov-re-diag.cc (octave_diag_matrix::chk_valid_scalar): New method
2775 * ov-re-diag.h: Declare it.
2776 * ov-flt-re-diag.cc (octave_float_diag_matrix::chk_valid_scalar): New
2778 * ov-flt-re-diag.h: Declare it.
2779 * ov-cx-diag.cc (octave_complex_diag_matrix::chk_valid_scalar): New
2781 * ov-cx-diag.h: Declare it.
2782 * ov-flt-cx-diag.cc (octave_float_complex_diag_matrix::chk_valid_scalar):
2783 New method override.
2784 * ov-flt-cx-diag.h: Declare it.
2786 2008-12-10 Jaroslav Hajek <highegg@gmail.com>
2788 * DLD-FUNCTIONS/expm.cc: Remove.
2789 * Makefile.in: Update.
2791 2008-12-10 Jaroslav Hajek <highegg@gmail.com>
2793 * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::empty_clone): Construct an
2794 empty matrix instead of zero.
2796 2008-12-07 Thorsten Meyer <thorsten.meyier@gmx.de>
2798 * mappers.cc (Ftolower): Make lower alias of tolower, add tests
2799 * mappers.cc (Ftoupper): Make upper alias of toupper, add tests
2801 2008-12-09 Jaroslav Hajek <highegg@gmail.com>
2803 * DLD-FUNCTIONS/balance.cc (Fbalance): Exploit the new AEPBAL functionality.
2805 2008-12-08 Jaroslav Hajek <highegg@gmail.com>
2807 * xpow.cc ( xpow (const DiagMatrix& a, double b),
2808 xpow (const DiagMatrix& a, const Complex& b),
2809 xpow (const ComplexDiagMatrix& a, double b),
2810 xpow (const ComplexDiagMatrix& a, const Complex& b),
2811 xpow (const FloatDiagMatrix& a, float b),
2812 xpow (const FloatDiagMatrix& a, const FloatComplex& b),
2813 xpow (const FloatComplexDiagMatrix& a, float b),
2814 xpow (const FloatComplexDiagMatrix& a, const FloatComplex& b)):
2816 * xpow.h: Declare them.
2817 * OPERATORS/op-dms-template.cc: Support diagonal matrix ^ scalar.
2819 2008-12-08 Jaroslav Hajek <highegg@gmail.com>
2821 * ov-re-diag.cc (octave_diag_matrix::save_binary,
2822 octave_diag_matrix::load_binary): New methods.
2823 * ov-re-diag.h: Declare them.
2824 * ov-flt-re-diag.cc (octave_float_diag_matrix::save_binary,
2825 octave_float_diag_matrix::load_binary): New methods.
2826 * ov-flt-re-diag.h: Declare them.
2827 * ov-cx-diag.cc (octave_complex_diag_matrix::save_binary,
2828 octave_complex_diag_matrix::load_binary): New methods.
2829 * ov-cx-diag.h: Declare them.
2830 * ov-flt-cx-diag.cc (octave_float_complex_diag_matrix::save_binary,
2831 octave_float_complex_diag_matrix::load_binary): New methods.
2832 * ov-flt-cx-diag.h: Declare them.
2833 * ov-perm.cc (octave_perm_matrix::save_binary,
2834 octave_perm_matrix::load_binary): New methods.
2835 * ov-perm.h: Declare them.
2837 2008-12-06 Jaroslav Hajek <highegg@gmail.com>
2839 * ov-fcn-handle.cc (octave_fcn_handle::load_binary): Call istream::get
2840 rather than istream::read to supply null terminating character.
2842 2008-10-29 Jaroslav Hajek <highegg@gmail.com>
2843 * file-io.cc, gl-render.cc, load-save.cc, ls-hdf5.cc, ls-mat4.cc,
2844 ls-mat5.cc, ls-oct-binary.cc, mex.cc, oct.h, ov-base-int.cc,
2845 ov-bool-mat.cc, ov-bool-sparse.cc, ov-cell.cc, ov-class.cc,
2846 ov-cx-mat.cc, ov-cx-sparse.cc, ov-fcn-handle.cc, ov-fcn-inline.cc,
2847 ov-flt-cx-mat.cc, ov-flt-re-mat.cc, ov-re-mat.cc, ov-re-sparse.cc,
2848 ov-str-mat.cc, ov-struct.cc, toplev.cc,
2849 DLD-FUNCTIONS/__lin_interpn__.cc, DLD-FUNCTIONS/amd.cc,
2850 DLD-FUNCTIONS/ccolamd.cc, DLD-FUNCTIONS/cellfun.cc,
2851 DLD-FUNCTIONS/colamd.cc, DLD-FUNCTIONS/gcd.cc,
2852 DLD-FUNCTIONS/matrix_type.cc, DLD-FUNCTIONS/regexp.cc,
2853 DLD-FUNCTIONS/symbfact.cc, DLD-FUNCTIONS/symrcm.cc:
2854 Include oct-locbuf.h.
2856 2008-12-05 Jaroslav Hajek <highegg@gmail.com>
2858 * ov-base-diag.cc (save_ascii, load_ascii): Save natively.
2859 * ov-base-diag.h (load_ascii): Declare.
2860 * ov-perm.cc (save_ascii, load_ascii): Save natively.
2861 * ov-perm.h (load_ascii): Declare.
2864 2008-12-04 Thorsten Meyer <thorsten.meyier@gmx.de>
2866 * strfns.cc (Fchar): Add test from str2mat.m
2868 2008-12-04 Jaroslav Hajek <highegg@gmail.com>
2870 * ov.h (octave_value::is_perm_matrix): New method.
2871 * ov-base.h (octave_base_value::is_perm_matrix): New method.
2872 * ov-perm.h (octave_perm_matrix::is_perm_matrix): New method.
2873 * DLD-FUNCTIONS/inv.cc (Finv): Handle permutation matrices specially,
2874 compute rcond for diagonal matrices.
2875 * DLD-FUNCTIONS/det.cc (Fdet): Handle permutation & diagonal matrices
2878 2008-12-03 Jaroslav Hajek <highegg@gmail.com>
2880 * ov-perm.h: New source.
2881 * ov-perm.cc: New source.
2882 * ov-flt-perm.h: New source.
2883 * ov-flt-perm.cc: New source.
2884 * ov-base-diag.cc (octave_base_diag<DMT, MT>::do_index_op):
2885 If subscripting an identity matrix by permutation(s), return a
2886 permutation matrix object.
2887 * ov.cc (octave_value::octave_value (const PermMatrix&)): New
2889 * ov.cc (octave_value::octave_value (const PermMatrix&)): Declare it.
2890 * op-cm-pm.cc: New source.
2891 * op-fcm-fpm.cc: New source.
2892 * op-fm-fpm.cc: New source.
2893 * op-fpm-fcm.cc: New source.
2894 * op-fpm-fm.cc: New source.
2895 * op-fpm-fpm.cc: New source.
2896 * op-m-pm.cc: New source.
2897 * op-pm-cm.cc: New source.
2898 * op-pm-m.cc: New source.
2899 * op-pm-pm.cc: New source.
2900 * op-pm-template.cc: New source.
2901 * Makefile.in: Include new sources.
2902 * DLD-FUNCTIONS/qr.cc (Fqr): Reflect interface changes of QR classes.
2904 2008-12-03 John W. Eaton <jwe@octave.org>
2906 * debug.cc (bp_table::do_get_breakpoint_list): Style fixes.
2908 2008-12-01 Jaroslav Hajek <highegg@gmail.com>
2910 * ov-base.h (octave_base_value::is_diag_matrix): New virtual method.
2911 * ops.h (CONCAT2, CONCAT3): New macros. Use CONCAT macros instead of
2912 direct token pasting to avoid disabling argument prescan.
2913 * xdiv.cc, xdiv.h: Implement xdiv and xleftdiv overloads for diagonal
2914 and mixed dense-diagonal operands.
2916 * ov-re-diag.h: New source.
2917 * ov-re-diag.cc: New source.
2918 * ov-flt-re-diag.h: New source.
2919 * ov-flt-re-diag.cc: New source.
2920 * ov-base-diag.h: New source.
2921 * ov-base-diag.cc: New source.
2922 * OPERATORS/op-m-dm.cc: New source.
2923 * OPERATORS/op-m-cdm.cc: New source.
2924 * OPERATORS/op-fm-fdm.cc: New source.
2925 * OPERATORS/op-fm-fcdm.cc: New source.
2926 * OPERATORS/op-fdm-fs.cc: New source.
2927 * OPERATORS/op-fdm-fm.cc: New source.
2928 * OPERATORS/op-fdm-fdm.cc: New source.
2929 * OPERATORS/op-fdm-fcs.cc: New source.
2930 * OPERATORS/op-fdm-fcm.cc: New source.
2931 * OPERATORS/op-fdm-fcdm.cc: New source.
2932 * OPERATORS/op-fcm-fdm.cc: New source.
2933 * OPERATORS/op-fcm-fcdm.cc: New source.
2934 * OPERATORS/op-fcdm-fs.cc: New source.
2935 * OPERATORS/op-fcdm-fm.cc: New source.
2936 * OPERATORS/op-fcdm-fdm.cc: New source.
2937 * OPERATORS/op-fcdm-fcs.cc: New source.
2938 * OPERATORS/op-fcdm-fcm.cc: New source.
2939 * OPERATORS/op-fcdm-fcdm.cc: New source.
2940 * OPERATORS/op-dms-template.cc: New source.
2941 * OPERATORS/op-dm-template.cc: New source.
2942 * OPERATORS/op-dm-s.cc: New source.
2943 * OPERATORS/op-dm-m.cc: New source.
2944 * OPERATORS/op-dm-dm.cc: New source.
2945 * OPERATORS/op-dm-cs.cc: New source.
2946 * OPERATORS/op-dm-cm.cc: New source.
2947 * OPERATORS/op-dm-cdm.cc: New source.
2948 * OPERATORS/op-cm-dm.cc: New source.
2949 * OPERATORS/op-cm-cdm.cc: New source.
2950 * OPERATORS/op-cdm-s.cc: New source.
2951 * OPERATORS/op-cdm-m.cc: New source.
2952 * OPERATORS/op-cdm-dm.cc: New source.
2953 * OPERATORS/op-cdm-cs.cc: New source.
2954 * OPERATORS/op-cdm-cm.cc: New source.
2955 * OPERATORS/op-cdm-cdm.cc: New source.
2956 * Makefile.in: Include them.
2958 * ov-re-mat.cc (octave_matrix::diag): New method override.
2959 * ov-re-mat.h: Declare it.
2960 * ov-cx-mat.cc: Likewise with octave_complex_matrix.
2961 * ov-cx-mat.h: Likewise with octave_complex_matrix.
2962 * ov-flt-re-mat.cc: Likewise with octave_float_matrix.
2963 * ov-flt-re-mat.h: Likewise with octave_float_matrix.
2964 * ov-flt-cx-mat.cc: Likewise with octave_float_complex_matrix.
2965 * ov-flt-cx-mat.h: Likewise with octave_float_complex_matrix.
2966 * ov.cc (octave_value::octave_value (const DiagMatrix&))
2967 (octave_value::octave_value (const FloatDiagMatrix&))
2968 (octave_value::octave_value (const ComplexDiagMatrix&))
2969 (octave_value::octave_value (const FloatComplexDiagMatrix&)):
2970 Construct a diagonal matrix object.
2971 * data.cc (Fdiag): Support explicit dimensions. Fix tests.
2972 (Feye): Return diagonal matrix objects if possible. Fix tests.
2973 * mappers.cc (Freal, Fimag): Fix tests.
2974 * DLD-FUNCTIONS/inv.cc (Finv): Handle diagonal matrix objects.
2975 * ov-range.h (octave_range::diag): Declare only.
2976 * ov-range.cc (octave_range::diag): Return DiagMatrix if possible.
2978 2008-11-25 Jaroslav Hajek <highegg@gmail.com>
2979 * ov.cc (octave_value::is_equal): New member function.
2981 * pt-select.cc (tree_switch_case::label_matches): Call
2982 octave_value::is_equal.
2984 2008-12-04 Thomas Treichl <Thomas.Treichl@gmx.net>
2986 * DLD-FUNCTIONS/cellfun.cc: Added more tests for cellfun.
2988 2008-11-25 Jaroslav Hajek <highegg@gmail.com>
2990 * ov-base.h (octave_base_value::type_conv_info): New class.
2991 * ov-base.h, ov-bool-mat.cc, ov-bool-mat.h, ov-bool-sparse.cc,
2992 ov-bool-sparse.h, ov-bool.cc, ov-bool.h, ov-complex.cc, ov-complex.h,
2993 ov-cx-mat.cc, ov-cx-mat.h, ov-null-mat.cc, ov-null-mat.h,
2994 ov-range.cc, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-scalar.cc,
2995 ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov.h:
2996 Return type_conv_info instead of type_conv_fcn from
2997 numeric_conversion_function and numeric_demotion_function
2999 * ov-base.cc (octave_base_value::numeric_assign): Try biased conversion
3001 * ov.cc (do_binary_op): Likewise. Also, search recursively.
3002 * ov.cc (do_cat_op): Likewise.
3004 2008-11-24 David Bateman <dbateman@free.fr>
3006 * graphics.cc (F__go_delete__): Check validity of handles before
3007 deleting them to avoid issues with callback function also deleting
3010 2008-11-21 John Swensen <jpswensen@comcast.net>
3012 * debug.cc (bp_table::do_get_breakpoint_list): Avoid modifying
3013 bp_map while iterating over it.
3015 2008-11-21 Jarkko Kaleva <d3roga@gmail.com>
3017 * DLD-FUNCTIONS/eig.cc (Feig): Handle generalized eigenvalues and
3020 2008-11-19 Jaroslav Hajek <highegg@gmail.com>
3022 * DLD_FUNCTIONS/det.cc: Include only DET.h. Retrieve & matrix type &
3023 store it after calculation if possible.
3025 2008-11-17 John W. Eaton <jwe@octave.org>
3027 * load-path.cc (load_path::dir_info::update): Simplify previous
3030 * load-path.h (load_path::dir_info::abs_dir_name): New data member.
3031 (load_path::dir_info::dir_info, load_path::dir_info::operator =):
3033 (load_path::abs_dir_cache_type, load_path::dir_cache_iterator,
3034 load_path::const_dir_cache_iterator): New typedefs.
3035 (load_path::abs_dir_cache): New static data member.
3036 (load_path::dir_info:dir_info): New constructor.
3037 * load-path.cc (load_path::abs_dir_cache): Define new static data
3039 (load_path::dir_info::update): Look in abs_dir_cache for relative
3041 (load_path::dir_info::initialize): Update abs_dir_cache here.
3043 2008-11-13 John W. Eaton <jwe@octave.org>
3045 * ov-int8.h, ov-int16.h, ov-int32.h, ov-int64.h, ov-uint8.h,
3046 ov-uint16.h, ov-uint32.h, ov-uint64.h: Don't define
3047 OCTAVE_INT_NDARRAY_T.
3048 * ov-intx.h (class OCTAVE_VALUE_INT_MATRIX_T,
3049 class OCTAVE_VALUE_INT_SCALAR_T): Use intNDArray<OCTAVE_INT_T>
3050 instead of OCTAVE_INT_NDARRAY_T.
3051 (OCTAVE_VALUE_INT_MATRIX_T::increment,
3052 OCTAVE_VALUE_INT_MATRIX_T::decrement,
3053 OCTAVE_VALUE_INT_SCALAR_T::increment,
3054 OCTAVE_VALUE_INT_SCALAR_T::decrement): Convert 1 to OCTAVE_INT_T.
3056 2008-11-15 Thorsten Meyer <thorsten.meyier@gmx.de>
3058 * strfns.cc (Fchar): adapt to conserve empty strings, add tests
3060 2008-11-12 Michael Goffioul <michael.goffioul@gmail.com>
3062 * dirfcn.cc (Ffilesep): Make it return all file separators when 'all'
3063 is given as argument.
3065 * DLD-FUNCTIONS/getrusage.cc: Undefine min/max.
3066 * TEMPLATE-INST/Array-os.cc: Declare Array<bool> as extern template.
3068 2008-11-12 David Bateman <dbateman@free.fr>
3070 * OPERATORS/op-cell.cc (op_catop_matrix_cell): Cast args in the correct
3072 * OPERATORS/op-struct.cc (op_catop_matrix_struct): Ditto.
3074 2008-11-11 Jaroslav Hajek <highegg@gmail.com>
3076 * pt-assign.cc: Fix handling of empty cs-lists in assignment LHS.
3078 2008-11-11 John W. Eaton <jwe@octave.org>
3080 * lex.l (<MATRIX_START>{S}+): Don't insert separator if next token
3083 * parse.y (F__parser_debug_flag__): New function.
3085 2008-10-31 Jaroslav Hajek <highegg@gmail.com>
3087 * xnorm.cc: New source.
3088 * xnorm.h: New header file.
3089 * Makefile.in: Include xnorm.cc in the build process.
3090 * data.cc (Fnorm): Call xnorm, xcolnorms, xrownorms or xfrobnorm
3091 to do the actual work.
3094 2008-10-31 David Bateman <dbateman@free.fr>
3096 * ov-base-scalar.h (octave_value octave_base_scalar::reshape
3097 (const dim_vector&) const): New method.
3099 2008-10-30 John W. Eaton <jwe@octave.org>
3101 * oct-map.cc (Octave_map::index): Copy key_list.
3103 2008-10-31 David Bateman <dbateman@free.fr>
3105 * graphics.h.in (void image::init (void)): Add a constraint for
3108 * graphics.h.in (base_property::delete_listener): New method.
3109 (property::delete_listener): New method.
3110 (base_graphics_object::delete_listener): New method.
3111 (base_graphics_object::delete_property_listener): New method.
3112 (base_graphics_object::remove_all_listeners): New method.
3113 (graphics_object::delete_property_listener): New method.
3114 (axes::set_defaults): Call remove_all_listeners.
3115 * graphics.cc (void base_properties::delete_listener): New method
3116 (void base_graphics_object::remove_all_listeners (void)): New method
3117 (Fdellistener): New command to remove listener functions associated
3120 2008-10-30 David Bateman <dbateman@free.fr>
3122 * graphics.h.in (axes::properties): Add keyreverse property.
3123 * graphics.cc (axes::properties::set_defaults): Initialize
3124 keyreverse property.
3126 2008-10-28 Jaroslav Hajek <highegg@gmail.com>
3128 * Cell.h (Cell::assign (const Array<idx_vector>&, ...),
3129 Cell::delete_elements (const Array<idx_vector>&, ...)):
3130 New member functions.
3131 * Cell.cc (Cell::assign (const octave_value_list&, ...),
3132 Cell::delete_elements (const octave_value_list&, ...)):
3133 Call Array<T>::assign.
3134 * DLD-FUNCTIONS/dlmread.cc: Call Array<T>::resize_fill.
3135 * ov-base-mat.cc (octave_base_matrix::assign): Call Array<T>::assign.
3136 (octave_base_matrix::delete_elements):: Call Array<T>::delete_elements.
3137 * ov-cell.cc (Fcell): Call Array<T>::chop_trailing_singletons,
3139 * ov-cx-mat.cc (octave_complex_matrix::assign): Call Array<T>::assign.
3140 * ov-flt-cx-mat.cc (octave_float_complex_matrix::assign): Call
3142 * ov-list.cc (octave_list::subsasgn): Call Array<T>::assign.
3143 * pr-output.cc (PRINT_ND_ARRAY): Use zero-based indices.
3146 2008-10-29 Thorsten Meyer <thorsten.meyier@gmx.de>
3148 * data.cc (Fcolumns): Remove "and" from @seealso string.
3149 * mappers.cc (Fgamma, Flgamma): Replace @seealso reference to
3150 deprecated gammai by gammainc.
3151 * DLD-FUNCTIONS/sqrtm.cc (Fsqrtm): Remove reference to Octave
3152 Forge function funm.
3153 * DLD-FUNCTIONS/qz.cc (Fqz): removed @seealso reference to Octave
3154 Forge function dare.
3155 * DLD-FUNCTIONS/rcond.cc (Frcond): removed @seealso reference to
3157 * debug.cc (Fdbstop): Fix @seealso references and function name in
3158 docstring of dbnext.
3159 * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Remove @seealso reference
3161 * syscalls.cc (Fwaitpid): Replace WCONTINUED by WCONTINUE.
3162 * oct-hist.cc (Fhistory_size, Fsaving_history): Fix @seealso
3163 references to history_timestamp_format_string.
3164 * DLD-FUNCTIONS/luinc.cc (Fluinc): Remove reference to missing
3167 2008-10-29 Jaroslav Hajek <highegg@gmail.com>
3169 * DLD-FUNCTIONS/qr.cc (Fcholinsert, Fcholdelete, Fcholshift): Fix
3172 2008-10-28 John W. Eaton <jwe@octave.org>
3174 * parse.y (finish_function): Clear local variables in function scope.
3175 * symtab.h (symbol_table::clear_variables): New argument, scope.
3177 2008-10-28 Brian Gough <bjg@gnu.org>
3179 * DLD-FUNCTIONS/besselj.cc: Added tests.
3181 2008-10-23 John W. Eaton <jwe@octave.org>
3183 * oct-hist.c (initialize_history): New arg, read_history_file)
3184 * oct-hist.h: Fix decl.
3185 * octave.cc (octave_main): Set read_history_file to false if
3186 --no-history option is specified. Pass read_history_file to
3189 * DLD-FUNCTIONS/fltk_backend.cc: Update initialization comment.
3191 2008-10-22 John W. Eaton <jwe@octave.org>
3193 * DLD-FUNCTIONS/fltk_backend.cc (figure_manager::do_close_all):
3194 Rename from close_all. Now private.
3195 (figure_manager::do_new_window): Rename from new_window.
3197 (figure_manager::do_delete_window): Rename from delete_window.
3199 (figure_manager::do_mark_modified): Rename from mark_modified.
3201 (figure_manager::do_get_size): Rename from get_size. Now private.
3202 (figure_manager::close_all, figure_manager::do_new_window,
3203 figure_manager::do_delete_window,
3204 figure_manager::do_mark_modified, figure_manager::do_get_size):
3205 New static functions.
3206 (figure_manager::instance_ok): New function.
3207 (figure_manager::Instance): Delete. Eliminate all uses in favor
3208 of static methods that call instance_ok and forward to private
3210 (figure_manager::instance): New static data member.
3211 (figure_manager::hnd2idx, figure_manager::figprops2idx,
3212 figure_manager::figprops2idx, figure_manager::str2idx): Now static.
3214 * DLD-FUNCTIONS/fltk_backend.cc (figure_manager::default_size):
3215 Increase default window size.
3217 * graphics.cc (figure::properties::remove_child): New function.
3218 * graphics.h.in: Provide decl.
3220 * gl-render.cc (opengl_renderer::draw): Get all children.
3222 * DLD-FUNCTIONS/fltk_backend.cc (__fltk_redraw__):
3223 Check for "root" object, not "root_figure".
3225 * graphics.h.in (base_properties::get_all_children): New function.
3227 2008-10-22 David Bateman <dbateman@free.fr>
3229 * graphics.h.in (line::properties, surface::properties): Add data
3232 2008-10-21 John W. Eaton <jwe@octave.org>
3234 * graphics.h.in (axes::properties::delete_children): Delete decl.
3236 * graphics.h.in (gh_manager::is_handle_visible): New function.
3237 (axes::properites): Move title property after label properties.
3238 (graphics_object::is_handle_visible): New function.
3239 (base_properties::is_handle_visible): New function.
3240 (base_properties): Mark children property with G.
3241 * graphics.cc (axes::properties::set_text_child): New function.
3242 (axes::properties::set_title, axes::properties::set_xlabel,
3243 axes::properties::set_ylabel, axes::properties::set_zlabel): Use it.
3244 (base_property::get_children): New function. Only
3245 return handles that are visible.
3246 (axes::properties::delete_text_child): Set handlevisibility to
3247 "off" for newly created object and add it to the list of children.
3248 Call base_properties::remove_child on previous handle value.
3249 (axes::properties::set_defaults): Don't explicitly delete xlabel,
3250 ylabel, zlabel, and title handles. Reinitialize them after
3252 (axes::properties::remove_child): Don't explicitly delete xlabel,
3253 ylabel, zlabel, and title handles.
3254 (axes::properties::init): Move here from graphics.h.in. Set
3255 handlevisibility to "off" for xlabel, ylabel, zlabel, and title
3256 and add them to the list of children.
3257 (axes::properties::delete_children): Delete.
3259 * genprops.awk: Allow whitespace between BEGIN_PROPERTIES and
3260 opening paren. Accept optional second argument for graphics
3262 * graphics.h.in (root_figure properties): Pass "root" as second
3263 arg to BEGIN_PROPERTIES.
3265 2008-10-16 John W. Eaton <jwe@octave.org>
3267 * graphics.cc (make_handle_fraction): New static function.
3268 (gh_manager::get_handle): Use it.
3269 (gh_manager::do_free): Call make_handle_fraction to replace
3270 fractional part of non-figure handles.
3272 * graphics.cc (base_properties::remove_child): Handle children as
3273 a column vector instead of a row vector.
3275 * utils.cc (Fis_absolute_filename, Fis_rooted_relative_filename,
3276 Fmake_absolute_filename, Ffind_dir_in_path): New functions.
3278 2008-10-16 David Bateman <dbateman@free.fr>
3280 * graphics.cc (void axes::properties::set_defaults
3281 (base_graphics_object&, const std::string&)): Preserve font
3282 and position properties if the axis is "replaced".
3284 2008-10-16 John W. Eaton <jwe@octave.org>
3286 * graphics.h.in (class axes::properties): New property: interpreter.
3288 2008-10-15 David Bateman <dbateman@free.fr>
3290 * ov-class.c (Fsuperiorto, Finferiorto): Allow more than one class
3291 to be defined at a time.
3293 2008-10-12 David Bateman <dbateman@free.fr>
3295 * pt-colon.cc (octave_value tree_colon_expression::make_range
3296 (const octave_value&, const octave_value&, const octave_value&)):
3297 Treating class overloading of colon operator.
3298 (octave_value tree_colon_expression::rvalue (void)): Ditto.
3300 2008-10-10 John W. Eaton <jwe@octave.org>
3302 * graphics.h.in (base_properties::adopt): Place new child at front
3303 of list, not end. Make list of children a column vector instead
3306 * graphics.cc (gh_manager::do_free): Set the beingdeleted
3307 property, then delete the children, then execute the deletefcn.
3308 (axes::properties::set_defaults, axes::properties::remove_child,
3309 axes::properites::delete_children): Call delete_text_child to
3310 manage the title, xlabel, ylabel, and zlabel properties.
3311 (axes::properties::get_title, axes::properties::get_xlabel,
3312 axes::properties::get_ylabel, axes::properties::get_zlabel): Delete.
3314 * graphics.h.in (axes::properites::title,
3315 axes::properites::xlabel, axes::properites::ylabel,
3316 axes::properites::zlabel): No longer mutable. Don't generate
3317 factory default values or custom get functions for these
3320 * graphics.cc (axes::properties::delete_text_child): New function.
3321 * graphics.h.in: Provide decl.
3323 * graphics.h.in (graphics_object::type): New function.
3325 2008-10-10 David Bateman <dbateman@free.fr>
3327 * graphics.h.in (radio_property axes::properties::__colorbar__):
3329 * graphics.cc (void axes::properties::sync_positions (void)):
3330 Disable code synchronizing outerposiiton and position.
3331 (void axes::properties::set_defaults (base_graphics_object&,
3332 const std::string&): Remove __colorbar__.
3333 (F__go_delete__): Don't delete if already being deleting to avoid
3334 recursion in callback functions.
3335 (F__go_axes_init__): Flag error if handle is deleted during
3338 2008-10-09 David Bateman <dbateman@free.fr>
3340 * ov-class.cc (Octave_map octave_class::map_value (void) const):
3342 (bool octave_class::save_ascii (std::ostream&),
3343 bool octave_class::load_ascii (std::istream&),
3344 bool octave_class::save_binary (std::ostream&, bool&),
3345 bool octave_class::save_binary (std::ostream&, bool&),
3346 bool octave_class::save_hdf5 (hid_t, const char *, bool),
3347 bool octave_class::load_hdf5 (hid_t, const char *, bool)):
3348 Allow saving and reloading of classes.
3349 * ov-class. (Octave_map octave_class::map_value (void) const):
3351 * ls-mat.cc (std::string read_mat5_binary_element (std::istream&,
3352 const std::string&, bool, bool&, octave_value&),
3353 int save_mat5_element_length (const octave_value&, const std::string&,
3354 bool, bool)): Allow saving and loading of classes.
3355 * ls-oct-ascii.h (template <class T> bool extract_keyword
3356 (std::istream&, const char *, T&, const bool)): Initialize value with
3357 null constructor rather than 0.
3359 2008-10-07 David Bateman <dbateman@free.fr>
3361 * graphics.cc (F__go_delete__): Allow arrays of graphic handles.
3363 2008-10-01 Jaroslav Hajek <highegg@gmail.com>
3365 * OPERATORS/op-i64-i64.cc: Instantiate all 64-bit operations.
3366 * OPERATORS/op-ui64-ui64.cc: Instantiate all unsigned 64-bit operations.
3368 2008-10-06 John W. Eaton <jwe@octave.org>
3370 * ov-type-conv.h (octave_type_conv_body): Avoid shadow warning
3373 2008-10-06 David Bateman <dbateman@free.fr>
3375 * graphics.cc (static bool is_handle (const octave_value&)): Delete.
3376 (static octave_value is_handle (const octave_value&)): New function.
3378 2008-10-03 Jaroslav Hajek <highegg@gmail.com>
3380 * Cell.cc (Cell::delete_elements): Don't pass second arg to
3381 Array<T>::maybe_delete_elements.
3382 * ov-base-mat.cc (octave_base_matrix<MT>::delete_elements): Ditto.
3384 2008-10-02 Jaroslav Hajek <highegg@gmail.com>
3386 * Cell.h (Cell::delete_elements): Declare new member function.
3387 * Cell.h (Cell::delete_elements): Define it.
3388 * oct-map.cc (Octave_map::maybe_delete_elements): Call delete_elements
3389 instead of assign with empty Cell.
3391 2008-10-02 John W. Eaton <jwe@octave.org>
3393 * pt-arg-list.cc (tree_argument_list::convert_to_const_vector):
3394 Don't insert undefined elements in return list.
3396 2008-09-30 Jaroslav Hajek <highegg@gmail.com>
3398 * ov-str-mat.h (octave-char-matrix-str::assign): Remove declaration.
3399 * ov-str-mat.cc (octave-char-matrix-str::assign): Remove definition.
3401 2008-09-30 John W. Eaton <jwe@octave.org>
3403 * DLD-FUNCTIONS/__magick_read__.cc: Only define
3404 magick_to_octave_value if HAVE_MAGICK is defined.
3406 2008-09-29 John W. Eaton <jwe@octave.org>
3408 * symtab.cc (symbol_table::fcn_info::fcn_info_rep::load_class_method):
3409 Call load_class_constructor if name and dispatch_type are the same.
3411 2008-09-29 David Bateman <dbateman@free.fr>
3413 * symtab.cc (octave_value symbol_table::find_function
3414 (const std::string&, tree_argument_list *, const string_vector&,
3415 octave_value_list&, bool&)): If first character of function name
3416 is "@" then look for class specific method.
3418 2008-09-26 John W. Eaton <jwe@octave.org>
3420 * symtab.cc (out_of_date_check_internal):
3421 Fix order of arguments in call to load_path::find_method.
3423 2008-09-26 David Bateman <dbateman@free.fr>
3425 * ov-class.h (idx_vector index_vector (void) const): Declare new
3427 * ov-class.cc (idx_vector index_vector (void) const): Define new
3429 * (Fismethod): New function.
3431 2008-09-26 John W. Eaton <jwe@octave.org>
3433 * DLD-FUNCTIONS/urlwrite.cc (urlwrite_cleanup_file) New function.
3434 (urlwrite_delete_file, urlwrite_filename): New static variables.
3435 (Furlwrite): Only return filename if urlget succeeds. Use
3436 unwind_protect to delete files we create if download fails.
3438 2008-09-26 Jaroslav Hajek <highegg@gmail.com>
3440 * ov-null-mat.h: New header file.
3441 * ov-null-mat.cc: New source.
3442 * ov.h (octave_value::is_null_value, octave_value::non_null_value,
3443 octave_value::make_non_null_value):
3444 Declare new member functions.
3445 * ov.cc (octave_value:non_null_value, octave_value::make_non_null_value):
3447 (octave_value::assign (assign_op op, const octave_value& rhs)):
3448 (register_types): Register null types.
3449 Call non_null_value ().
3450 * oct-obj.cc (octave_value_list::normalize_null_values): New member
3452 * oct-obj.h (octave_value_list::normalize_null_values): Declare it.
3453 * ov-base.h (is_null_value): New virtual member function.
3454 * ops.h (NULLASSIGNOPDECL, DEFNULLASSIGNOP_FN): New macros.
3455 * ov-base-mat.cc (octave_base_mat<MT>::delete_elements): New member func.
3456 * ov-base-mat.h: Declare it.
3457 * ov-base-sparse.cc (octave_base_sparse<MT>::delete_elements): New member func.
3458 * ov-base-sparse.h: Declare it.
3459 * ov-cell.cc (octave_cell:subsasgn): Handle null values.
3460 * ov-struct.cc (octave_cell:subsasgn): Handle null values.
3461 * ov-builtin.cc (octave_builtin::do_multi_index_op): Normalize return
3463 * pt-misc.cc (tree_parameter_list::define_from_arg_vector): Call
3464 octave_lvalue::define instead of octave_lvalue::assign.
3465 * pt-decl.h (tree_decl_elt::rvalue): Call non_null_value ().
3466 * OPERATORS/op-int.h (OCTAVE_INT_NULL_ASSIGN_OPS,
3467 OCTAVE_INSTALL_INT_NULL_ASSIGN_OPS): New macros.
3468 * OPERATORS/op-m-m.cc: Install & define assignment & conversion operators.
3469 * OPERATORS/op-bm-bm.cc: Ditto.
3470 * OPERATORS/op-cell.cc: Ditto.
3471 * OPERATORS/op-cm-cm.cc: Ditto.
3472 * OPERATORS/op-cs-cs.cc: Ditto.
3473 * OPERATORS/op-fcm-fcm.cc: Ditto.
3474 * OPERATORS/op-fcs-fcs.cc: Ditto.
3475 * OPERATORS/op-fm-fm.cc: Ditto.
3476 * OPERATORS/op-fs-fs.cc: Ditto.
3477 * OPERATORS/op-int.h: Ditto.
3478 * OPERATORS/op-m-m.cc: Ditto.
3479 * OPERATORS/op-range.cc: Ditto.
3480 * OPERATORS/op-s-s.cc: Ditto.
3481 * OPERATORS/op-scm-scm.cc: Ditto.
3482 * OPERATORS/op-sm-sm.cc: Ditto.
3483 * OPERATORS/op-str-str.cc: Ditto.
3484 * OPERATORS/op-i16-i16.cc: Ditto.
3485 * OPERATORS/op-i32-i32.cc: Ditto.
3486 * OPERATORS/op-i64-i64.cc: Ditto.
3487 * OPERATORS/op-i8-i8.cc: Ditto.
3488 * OPERATORS/op-ui16-ui16.cc: Ditto.
3489 * OPERATORS/op-ui32-ui32.cc: Ditto.
3490 * OPERATORS/op-ui64-ui64.cc: Ditto.
3491 * OPERATORS/op-ui8-ui8.cc: Ditto.
3493 2008-09-25 David Bateman <dbateman@free.fr>
3495 * pt-mat.cc (class tm_row_const): Add any_class test
3496 (class tm_const): Ditto.
3497 (octave_value tree_matrix::rvalue (void)): If any object to
3498 concatenate is a class object, dispatch to the appropriate
3499 vertcat/horzcat function.
3501 2008-09-25 John W. Eaton <jwe@octave.org>
3503 * symtab.cc (symbol_table::do_find): Don't set evaluated_args and
3504 args_evaluated here, prior to call to symbol_table::fcn_info::find.
3506 2008-09-24 Søren Hauberg <hauberg@gmail.com>
3508 * DLD-FUNCTIONS/__magick_read__.cc (magick_to_octave_value): New
3509 template function with specializations for various
3510 GraphicsMagick++ types.
3511 (F__magick_finfo__): New function.
3513 2008-09-24 John W. Eaton <jwe@octave.org>
3515 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
3516 Add symbol_table::clear_variables cleanup function to the
3517 unwind_protect stack after the parameter list cleanup functions.
3519 * load-path.cc (load_path::do_initialize): Check for OCTAVE_PATH
3520 in the environment, not OCTAVE_LOADPATH.
3522 2008-09-24 Thomas Weber <thomas.weber.mail@gmail.com>
3524 * DLD-FUNCTIONS/regexp.cc (octregexp_list): Retry if match limit
3527 2008-09-24 John W. Eaton <jwe@octave.org>
3529 * genprops.awk (emit_declarations): Emit call to set_mode before
3532 2008-09-23 John W. Eaton <jwe@octave.org>
3534 * pt-arg-list.cc (F__end__): Dispatch to user-defined end
3535 function for classes if one is defined.
3536 * lex.l (is_keyword_token): Allow "end" as a functon name.
3538 2008-09-23 David Bateman <dbateman@free.fr>
3540 * variables.cc (static octave_value do_who (int, const string_vector&,
3541 bool, bool, std::string): Add final message argument and simple
3542 treatment of the "-file" option.
3544 2008-09-22 David Bateman <dbateman@free.fr>
3546 * debug.cc (static octave_user_code * get_user_code
3547 (const std::string&)): Only check user code as break points can't
3548 be set in builtins or oct-files.
3549 (bp_table::intmap bp_table::do_remove_all_breakpoints_in_file
3550 (const std::string&, bool)): Add flag to silence the error message
3551 from this function if a user code with breakpoints is not found.
3552 (bp_table::fname_line_map bp_table::do_get_breakpoint_list (const
3553 octave_value_list&)): Do an ourt of date check on the function
3554 before checking the breakpoints.
3555 * debug.h (do_remove_all_breakpoints_in_file,
3556 remove_all_breakpoints_in_file): Add flag to silence error
3558 * symtab.cc (out_of_date_check_internal): Clear breakpoints in
3559 function if out_of_date. split into two versions taking the
3560 octave_function pointer seperately or not.
3561 * symtab.h (bool out_of_date_check (octave_function*)): New function.
3563 2008-09-18 David Bateman <dbateman@free.fr>
3565 * DLD-FUNCTIONS/fftw.cc (Ffftw): Clarify the documentation.
3567 2008-09-17 Krzesimir Nowak <qdlacz@gmail.com>
3569 * debug.cc (Fisdebugmode): New function.
3571 2008-09-17 David Bateman <dbateman@free.fr>
3573 * data.cc (do_cat): Chopping trailing singleton dimensions.
3575 * data.cc (SINGLE_TYPE_CONCAT, DO_SINGLE_TYPE_CONCAT): New macros
3576 (do_cat): Special case single type concatenations for speed.
3577 * pt.mat.cc (std::string get_concat_class (const std::string&,
3578 const std::string&), void maybe_warn_string_concat (bool, bool)):
3579 Remove static declaration.
3580 * pt-mat.h (std::string get_concat_class (const std::string&,
3581 const std::string&), void maybe_warn_string_concat (bool, bool)):
3584 * DLD-FUNCTIONS/sparse.cc (Fsparse): Clarify the help string.
3586 2008-09-10 John W. Eaton <jwe@octave.org>
3588 * octave.cc (octave_main): Make all command-line arguments
3589 available to startup scripts and PKG_ADD files.
3591 2008-09-09 David Bateman <dbateman@free.fr>
3593 * DLD-FUNCTIONS/regexp.cc (octregexp_list): Distinguish between
3594 matlab named tokens and perl lookbehind expressions. For
3595 lookbehind expression replace "*" and "+" with a limited number of
3596 fixed length expressions to simulate arbitrary length look behind.
3598 2008-09-08 Michael Goffioul <michael.goffioul@gmail.com>
3600 * DLD-FUNCTIONS/__magick_read__.cc (encode_uint_image): Resolve "pow"
3603 * graphics.cc (base_properties::get_dynamic,
3604 base_properties::set_dynamic, base_propertyes::get_property_dynamic):
3605 Add the 3rd template parameter to std::map, corresponding to all_props
3608 2008-09-08 John W. Eaton <jwe@octave.org>
3610 * ls-oct-ascii.cc (std::string extract_keyword (std::istream&,
3611 const char *, const bool)): Also accept \r as line ending character.
3612 * ls-oct-ascii.h (template <class T> bool extract_keyword
3613 (std::istream&, const char *, T&, const bool)): Likewise.
3614 (template <class T> bool extract_keyword (std::istream&, const
3615 string_vector&, std::string&, T&, const bool)): Likewise.
3617 2008-09-03 Ben Abbott <bpabott@mac.com>
3619 * mappers.cc: Use eps(single) as tolerance for single precesion test.
3621 2008-09-03 John W. Eaton <jwe@octave.org>
3623 * variables.cc (mlock): Lock current function on the call stack.
3624 (Fmlock): Lock caller.
3626 * symtab.cc (out_of_date_check_internal): If dispatch type is set,
3627 check for method. If that fails, check for regular function.
3629 2008-09-02 Michael Goffioul <michael.goffioul@gmail.com>
3631 * graphics.cc (hggroup::update_axis_limits): Also reacts on
3632 [xyzac]liminclude changes.
3634 2008-08-31 Michael Goffioul <michael.goffioul@gmail.com>
3636 * DLD-FUNCTIONS/fltk_backend.cc (fltk_backend::redraw_figure,
3637 fltk_backend::print_figure): Change graphics_handle argument to
3640 2008-08-29 David Bateman <dbateman@free.fr>
3642 * src/graphics.cc: Replace int by octave_idx_type in multiple
3644 (array_property::is_equal): In macro CHECK_ARRAY_EQUAL, special
3645 case scalar case and keep copy of array value to avoid early
3646 destruction of converted array values.
3648 2008-08-28 David Bateman <dbateman@free.fr>
3650 * graphics.h.in (root_figure::properties::showhiddenhandles):
3653 2008-08-27 Jaroslav Hajek <highegg@gmail.com>
3655 * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Initialize output vectors
3658 2008-08-26 Ben Abbott <bpabott@mac.com>
3660 * mappers.cc: Adjust tolerance for single precesion tests.
3662 * DLD-FUNCTIONS/chol.cc: Double tolerance.
3664 2008-08-26 Jaroslav Hajek <highegg@gmail.com>
3666 * parse.y (Fassignin): Use default scope when calling varref.
3668 2008-08-26 Michael Goffioul <michael.goffioul@gmail.com>
3670 * genprops.awk (emit_declarations): Call updaters/listeners only when
3671 'set' method returned true.
3672 * graphics.h.in (base_property::set, base_property::do_set):
3674 (property::set): Likewise.
3675 (string_property::do_set): Check value change and return bool value.
3676 (radio_property::do_set, double_property::do_set,
3677 array_property::do_set): Likewise.
3678 (color_property::do_set, double_radio_property::do_set,
3679 row_vector_property::do_set, bool_property::do_set,
3680 handle_property::do_set): Return bool value.
3681 (any_property::do_set, callback_property::do_set): Return always true.
3682 (color_values::operator==, color_values::operator!=): Add.
3683 (array_property::is_equal): Add.
3684 * graphics.cc (base_property::set): Executes listeners/notifiers only
3685 when do_set returns true. Return bool value.
3686 (color_property::do_set, double_radio_property::do_set): Check value
3687 change and return bool value.
3688 (array_property::is_equal): Add.
3690 * genprops.awk (emit_declarations, emit_source): Change code emission
3691 when emitting base_properties code (base is 1).
3692 (BEGIN): Initialize pcount to 0.
3693 (BEGIN_PROPERTIES): Initialize base to 0.
3694 (BEGIN_BASE_PROPERTIES): New statement.
3695 (main): Add support for 'f' modifier. Add support for non xxx_property
3697 * graphics.h.in (base_properties::base_properties): Remove
3699 (base_properties::get_tag, base_properties::get_parent,
3700 base_properties::get_type, base_properties::get___myhandle__,
3701 base_properties::get_busyaction, base_properties::get_buttondownfcn,
3702 base_properties::is_clipping, base_properties::get_clipping,
3703 base_properties::execute_createfcn, base_properties::get_createfcn,
3704 base_properties::execute_deletefcn, base_properties::get_deletefcn,
3705 base_properties::get_handlevisibility, base_properties::is_hittest,
3706 base_properties::get_hittest, base_properties::is_interruptible,
3707 base_properties::get_interruptible, base_properties::is_selected,
3708 base_properties::get_selected, base_properties::is_selectionhighlight,
3709 base_properties::get_selectionhighlight,
3710 base_properties::get_uicontextmenu, base_properties::get_userdata,
3711 base_properties::is_visible, base_properties::get_visible,
3712 base_properties::is_beingdeleted, base_properties::get_beingdeleted,
3713 base_properties::set_busyaction, base_properties::set_buttondownfcn,
3714 base_properties::set_clipping, base_properties::set_createfcn,
3715 base_properties::set_deletefcn, base_properties::set_handlevisibility,
3716 base_properties::set_hittest, base_properties::set_interruptible,
3717 base_properties::set_selected,
3718 base_properties::set_selectionhighlight,
3719 base_properties::set_uicontextmenu, base_properties::set_userdata,
3720 base_properties::set_visible, base_properties::set_beingdeleted,
3721 base_properties::get_children): Remove (now auto-generated).
3722 (base_properties::enum): Likewise.
3723 (base_properties::is_modified): Call is___modified__.
3724 (base_properties::set_modified): Call set___modified__.
3725 (base_properties::set_children): Add.
3726 (base_properties::set_dynamic, base_properties::get_dynamic,
3727 base_properties::get_property_dynamic): New methods.
3728 (class base_properties): Surround properties declaration with
3729 BEGIN_BASE_PROPERTIES/END_PROPERTIES pair.
3730 * graphics.cc (base_properties::get, base_properties::set,
3731 base_properties::get_property): Remove (now auto-generated).
3732 (base_properties::set_dynamic, base_properties::get_dynamic,
3733 base_properties::get_property_dynamic): New methods.
3734 (base_properties::set_children): Likewise.
3736 * DLD_FUNCTIONS/fltk_backend.cc (F__fltk_redraw__): Make static.
3737 (F__init_fltk__): Protect from mutliple invocations.
3738 (F__remove_fltk__): Likewise.
3739 (F__init_fltk__): Register input event hook.
3740 (F__remove_fltk__): Unregister input event hook.
3742 * DLD_FUNCTIONS/fltk_backend.cc (fltk_backend::close_figure): Remove.
3743 (fltk_backend::object_destroyed, fltk_backend::property_changed): New
3745 * genprops.awk (emit_declarations): Generate "enum" property fields.
3746 (emit_sources): Emit set_id calls.
3747 * graphics.h.in (base_property::id): New field.
3748 (base_property::base_property): Initialize it.
3749 (base_property::get_id, base_property::set_id): Add accessors.
3750 (property::get_id, property::set_id): Likewise.
3751 (base_graphics_backend::close_figure, graphics_backend::close_figure):
3753 (base_graphics_backend::redraw_figure,
3754 base_graphics_backend::print_figure, graphics_backend::redraw_figure,
3755 graphics_backend::print_figure): Change graphics_handle argument into
3757 (base_graphics_backend::property_changed,
3758 base_graphics_backend::object_created,
3759 base_graphics_backend::object_destroyed,
3760 graphics_backend::property_changed, graphics_backend::object_created,
3761 graphics_backend::object_destroyed): New signature with
3762 graphics_object argument.
3763 (base_properties::base_properties): Add set_id calls.
3764 (class base_properties): Add "enum" property fields.
3765 (root_figure::properties::remove_child): Add overloaded method.
3766 (figure::properties::close): Remove.
3767 (figure::properties::set_backend): Call object_destroyed instead of
3769 (figure::~figure): Remove close call.
3770 (figure::properties::get_title): New method.
3771 * graphics.cc (base_property::set): Call property_changed only for
3772 valid id (>=0); Use graphics_object argument.
3773 (gh_manager::do_free): Call object_destroyed with graphics_object
3775 (base_graphics_backend::property_changed,
3776 base_graphics_backend::object_created,
3777 base_graphics_object::object_destroyed): Implement wrappers for
3778 graphics_handle argument case.
3779 (gnuplot_backend::close_figure): Remove.
3780 (gnuplot_backend::object_destroyed,
3781 gnuplot_backend::property_changed): New methods.
3782 (gnuplot_backend::redraw_figure, gnuplot_backend::print_figure):
3783 Change graphics_handle argument to graphics_object.
3784 (root_figure::properties::remove_child): Add.
3785 (figure::properties::close): Remove.
3786 (figure::properties::set_position): Do not call set_figure_position.
3787 (figure::properties::get_title): New method.
3788 (gh_manager::do_make_graphics_handle): Call object_created with
3789 a graphics_object argument.
3790 (gh_manager::do_make_figure_handle): Likewise.
3791 (Fdrawnow): Call redraw_figure and print_figure with a graphics_object
3794 2008-08-26 Maciek Gajewski <maciej.gajewski0@gmail.com>
3796 * graphics.h.in (base_property::set): Remove inline implementation.
3797 (base_graphics_backend::property_changed,
3798 base_graphics_backend::object_created,
3799 base_graphics_backend::object_destroyed): New method.
3800 (graphics_backend::property_changed, graphics_backend::object_created,
3801 graphics_backend::object_destroyed): Likewise.
3802 * graphics.cc (base_property::set): Moved from header file.
3803 (gh_manager::do_free): Add backend notification.
3804 (gh_manager::do_make_graphics_handle): Likewise.
3805 (gh_manager::do_make_figure_handle): Likewise.
3807 2008-08-25 Thomas L. Scofield <scofield@calvin.edu>
3809 * DLD-FUNCTIONS/__magick_read__.cc: Untabify.
3810 (jpg_settings, encode_bool_image, encode_uint_image, encode_map):
3812 (write_image): Use them to handle various image types.
3814 2008-08-25 David Bateman <dbateman@free.fr>
3816 * graphics.cc (void gh_manager::do_execute_callback
3817 (const graphics_handle&, const octave_value&, const
3818 octave_value&)): Don't pass the function handle as first arg of
3819 property listener functions
3821 * graphics.h.in (class base_properties): Add functor for caseless
3822 string comparison. Use it in the property map, so that user added
3823 properties are found in a case insensitive fashion.
3825 2008-08-22 John W. Eaton <jwe@octave.org>
3827 * symtab.h (symbol_table::inherit): Pass reference to symbol table
3828 to do_inherit instead of scope.
3829 (symbol_table::do_inherit): First arg is now reference to
3830 symbol_table, not scope id. Insert all variables from donor scope.
3832 2008-08-21 Thomas Treichl <Thomas.Treichl@gmx.net>
3834 * mappers.cc: Increase test script tolerance.
3836 2008-08-20 John W. Eaton <jwe@octave.org>
3838 * help.cc (builtin_help): Go to next symbol name on error.
3839 (do_type, do_which): Omit separate path search for files.
3840 (help_from_symbol_table): Only insert Texinfo markup if it looks
3841 like the help message is already in Texinfo.
3843 2008-08-19 David Bateman <dbateman@free.fr>
3845 * load-path.cc (load-path::do_find_dir (const std:string&) const)):
3846 Method to find a directory on the load-path corresponding to the
3848 * load-path.h (load-path::do_find_dir (const std:string&) const),
3849 load-path::find_dir (const std::string&) const): New methods.
3850 * utils.cc (std::string contents_file_in_path (const std::string&)):
3852 * utils.h (std::string contents_file_in_path (const std::string&)):
3854 * help.cc (static bool raw_help_from_file (const std::string&,
3855 std::string&, std::string&, bool&)): Also check is requested
3856 argument is a directory and contains the file Contents.m.
3858 * OPERATORS/op-int-conv.cc (DEFINTCONVFN): New macro that warn
3859 for integer conversion issues. Use it to replace DEFCONVFN.
3860 * OPERATORS/op-int.h (DEFINTBINOP_OP, DEFINTNDBINOP_OP,
3861 DEFINTBINOP_FN, DEFINTNDBINOP_FN): New macros that warn for
3862 integer truncation issues. Use them to replace the corresponding
3863 macros in the integer arithmetic macros. Update other integer
3864 arithmetic functions that don't use these macros individually.
3865 * error.cc (initialize_default_warning_state (void)): Initialize
3866 the default warning state for the integer warnings to be off.
3867 * gripes.cc (void gripe_binop_integer_math_truncated (const char *,
3868 const char *, const char *), void gripe_unop_integer_math_truncated
3869 (const char *, const char *), void gripe_non_integer_conversion
3870 (const char *, const char *), void gripe_nan_conversion (const char *,
3871 const char *)): Warning functions for integer conversion and math
3873 * gripes.h (void gripe_binop_integer_math_truncated (const char *,
3874 const char *, const char *), void gripe_unop_integer_math_truncated
3875 (const char *, const char *), void gripe_non_integer_conversion
3876 (const char *, const char *), void gripe_nan_conversion (const char *,
3877 const char *)): Declare them.
3878 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::convert_gripe,
3879 OCTAVE_VALUE_INT_SCALAR_T::convert_gripe): Adapt for new means of
3880 flagging integer truncation.
3881 (OCTAVE_VALUE_INT_MATRIX_T::decrement,
3882 OCTAVE_VALUE_INT_MATRIX_T::increment,
3883 OCTAVE_VALUE_INT_SCALAR_T::decrement,
3884 OCTAVE_VALUE_INT_SCALAR_T::increment): Check for integer
3886 * ov.cc (convert_to_int_array): Adapt for new means of
3887 flagging integer truncation.
3889 2008-08-19 Jaroslav Hajek <highegg@gmail.com>
3891 * pt-assign.h (tree_simple_assignment::first_execution): New
3893 (tree_simple_assignment::first_execution): Ditto.
3894 * pt-assign.cc (tree_simple_assignment::tree_simple_assignment):
3895 Initialize first_execution.
3896 (tree_multi_assignment::tree_multi_assignment): Ditto.
3897 (tree_simple_assignment::rvalue): Check for obsolete built-in
3898 variables only at first execution.
3899 (tree_multi_assignment::rvalue): Ditto.
3901 * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Checks whether LB and UB are
3904 * oct-obj.cc, oct-obj.h (octave_value_list::make_argv):
3905 Allow calling without fcn_name.
3906 * load-save.cc (parse_save_options (const string_vector&, ...)):
3907 Return string_vector with parsed arguments removed instead.
3908 (parse_save_options (const std::string&, ...)): Ditto.
3909 (Fsave): Fix calls to parse_save_options.
3911 2008-08-19 John W. Eaton <jwe@octave.org>
3913 * parse.y (Feval): Return value produced by evaluating CATCH string.
3915 2008-08-12 John W. Eaton <jwe@octave.org>
3917 * pt-fcn-handle.cc (tree_anon_fcn_handle::rvalue):
3918 Call stash_parent_function_scope for user function.
3919 * ov-fcn-inline.cc (octave_fcn_inline::octave_fcn_inline):
3922 * ov-struct.cc (octave_struct::subsref): Don't allow resizing for
3925 2008-08-07 John W. Eaton <jwe@octave.org>
3927 * ov.cc (octave_value::idx_type_value): Don't include default
3928 argument values in definition.
3930 * src/glrender.h, src/zfstream.h: Don't include config.h.
3932 * oct-errno.h: Include <cerrno>.
3934 * Cell.cc, DLD-FUNCTIONS/regexp.cc, DLD-FUNCTIONS/dlmread.cc,
3935 debug.cc, error.cc, file-io.cc, graphics.cc, help.cc, input.cc,
3936 lex.l, load-path.cc, load-save.cc, ls-mat-ascii.cc,
3937 ls-oct-ascii.cc, oct-stream.cc, octave.cc, variables.cc,
3938 ov-fcn-handle.cc, parse.y, pr-output.cc, symtab.cc, sysdep.cc,
3939 utils.cc, graphics.h.in: Replace all uses of NPOS with
3942 * ov.cc (octave_value::idx_type_value): Move definition here.
3945 * DLD-FUNCTIONS/fsolve.cc (override_options): Don't fail if
3946 options_map does not contain an expected keyword.
3947 Fix typo in warning identifier.
3948 (make_unimplemented_options): Use CamelCase names here.
3950 2008-08-06 Søren Hauberg <hauberg@gmail.com>
3952 * error.cc (Ferror): Update format of error messages in exmple.
3953 * parse.y: (Feval): Likewise.
3955 2008-08-06 John W. Eaton <jwe@octave.org>
3957 * DLD-FUNCTIONS/fsolve.cc (hybrd_info_to_fsolve_info):
3958 Update INFO values to be compatible with Matlab's current fsolve.
3959 (make_unimplemented_options, override_options): New functions.
3960 (Ffsolve): Handle optimset options. Update doc string.
3962 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op,
3963 octave_user_script::do_multi_index_op):
3964 Call octave_call_stack::backtrace_error_message.
3965 * toplev.h (octave_call_stack::do_pop): Don't call
3966 backtrace_error_message here.
3967 * toplev.cc, toplev.h (octave_call_stack::do_backtrace_error_message):
3968 Rename from octave_call_stack::backtrace_error_message.
3969 * toplev.h (octave_call_stack::backtrace_error_message):
3970 New public static function.
3972 2008-08-05 John W. Eaton <jwe@octave.org>
3974 * gripes.cc (gripe_truncated_conversion,
3975 gripe_logical_conversion): Don't declare as extern here.
3976 * utils.cc (octave_format, octave_vformat): Likewise.
3977 * pr-output.cc (octave_print_internal (std::ostream&, const Cell&,
3978 bool, int, bool)): Likewise.
3980 * toplev.cc (octave_call_stack::backtrace_error_message): New
3982 * toplev.h: Provide decl.
3983 (octave_call_stack::do_pop): Call backtrace_error_message if
3984 error_state is nonzero.
3986 * pt-unop.cc (tree_prefix_expression::eval_error,
3987 tree_postfix_expression::eval_error): Delete. Eliminate all uses.
3988 * pt-unop.h: Delete decls.
3990 * pt-select.cc (tree_switch_case::eval_error,
3991 tree_switch_command::eval_error): Delete. Eliminate all uses.
3992 (tree_if_command::eval): Omit "evaluating if command" message.
3993 * pt-select.h: Delete decls.
3995 * pt-loop.cc (tree_while_command::eval_error,
3996 tree_complex_for_command::eval_error,
3997 tree_simple_for_command::eval_error,
3998 tree_do_until_command::eval_error): Delete. Eliminate all uses.
3999 * pt-loop.h: Delete decls.
4001 * pt-exp.cc (tree_expression::is_logically_true): Omit "evaluating
4002 conditional expression" error message.
4004 * pt-decl.cc (tree_global_command::eval): Omit "evaluating global
4005 command" error message.
4006 (tree_static_command::eval): Omit "evaluating static command"
4009 * pt-colon.cc (tree_colon_expression::eval_error): Omit
4010 "evaluating colon expression" error message.
4011 * pt-colon.h (tree_colon_expression::eval_error): Eliminate
4012 default argument value.
4014 * pt-idx.cc (tree_index_expression::eval_error): Delete.
4016 * pt-idx.h: Delete decl.
4018 * pt-binop.cc (tree_binary_expression::eval_error): Delete.
4019 * pt-binop.cc, pt-cbinop.cc: Eliminate all uses of eval_error.
4020 * pt-binop.h: Delete decl.
4022 * pt-assign.cc (tree_simple_assignment::eval_error,
4023 tree_multi_assignment::eval_error): Delete. Eliminate all uses.
4024 * pt-assign.h: Delete decls.
4026 * ov-usr-fcn.cc (octave_user_script::traceback_error,
4027 octave_user_function::traceback_error): Delete. Eliminate all uses.
4028 * ov-usr-fcn.h: Delete decls.
4030 * ov-builtin.cc (octave_builtin::do_multi_index_op): Call
4031 gripe_library_exectuion_error on octave_execution_exception.
4032 * ov-mex-fcn.cc (octave_mex_function::do_multi_index_op): Likewise.
4033 * ov.cc (do_binary_op, do_cat_op, do_unary_op,
4034 do_non_const_unary_op): Likewise.
4035 * pt-stmt.cc (tree_statement::eval): Likewise.
4037 * gripes.cc (gripe_library_execution_error): New function.
4038 * gripes.h: Provide decl.
4040 * dirfns.cc (Fpathsep): Fix usage of dir_path::path_sep_str.
4041 * defaults.cc (set_exec_path, set_image_path): Likewise.
4042 * load-path.h (load_path::set_command_line_path): Likewise.
4043 * load-path.cc (maybe_add_path_elts, load_path::do_initialize,
4044 load_path::do_path, genpath, Fpath): Likewise.
4045 (split_path): Fix usage of dir_path::path_sep_char.
4047 2008-08-04 John W. Eaton <jwe@octave.org>
4049 * symtab.cc (symbol_table::fcn_info::fcn_info_rep::find_autoload):
4050 Fix usage of file_ops::dir_sep_chars.
4051 * variables.cc (looks_like_struct):
4053 * ov-fcn-handle.cc (octave_fcn_handle::set_fcn): Likewise.
4054 * octave.cc (execute_command_line_file): Likewise.
4055 * ls-mat5.cc (read_mat5_binary_element): Likewise.
4056 * load-save.cc (find_file_to_load): Likewise.
4057 * load-path.cc (load_path::do_find_file): Likewise.
4058 * graphics.cc (drawnow): Likewise.
4059 * parse.y (frob_function): Likewise.
4061 * octave.cc (initialize_pathsearch): Fix usage of
4062 file_ops::dir_sep_str.
4063 * help.cc (Flookfor): Likewise.
4064 * dirfns.cc (Ffilesep): Likewise.
4065 (Fautoload): Likewise.
4067 * defaults.cc (subst_octave_home): Fix usage of
4068 file_ops::dir_sep_char.
4069 (Fmfilename): Likewise.
4071 2008-07-31 John W. Eaton <jwe@octave.org>
4073 * parse.y (assign_lhs): Call force_local_variable on all elements
4074 of lexer_flags.pending_local_variables here, then clear the set.
4075 (matrix): Clear lexer_flags.pending_local_variable here.
4076 * lex.l (lexical_feedback::init): Clear it.
4077 (force_local_variable): No longer static.
4078 (is_variable): Also return true for names in the
4079 lexer_flags.pending_local_variables.
4080 (handle_identifier): If we are parsing a matrix list, mark
4081 identifiers as pending local variables rather than forcing them to
4082 be local variables immediately.
4083 * lex.h (lexical_feedback::pending_local_variables): New data member.
4084 (force_local_variable): Provide decl.
4086 2008-07-30 John W. Eaton <jwe@octave.org>
4088 * ov-intx.h, ov.cc: Style fixes.
4090 * gripes.cc (gripe_truncated_conversion): Use the warning ID
4091 Octave:int-convert-overflow.
4093 2008-07-30 Jaroslav Hajek <highegg@gmail.com>
4095 * gripes.cc (gripe_truncated_conversion): New function.
4096 * gripes.h (gripe_truncated_conversion): Declare it.
4097 * ops.h (DEFCONVFNX2): New macro.
4098 (DEFCONVFN, DEFCONVFN2): Call DEFCONVFNX2 instead of DEFCONVFNX.
4099 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::convert_gripe): New member
4101 (OCTAVE_VALUE_INT_MATRIX_T::int*_array_value): Call convert_gripe.
4102 (OCTAVE_VALUE_INT_SCALAR_T::convert_gripe): New member function.
4103 (OCTAVE_VALUE_INT_SCALAR_T::int*_scalar_value): Call convert_gripe.
4104 (OCTAVE_VALUE_INT_SCALAR_T::int*_array_value): Call int*_scalar_value.
4105 * ov.cc (convert_to_int_array): New function.
4106 (int_vector_value): Call convert_to_int_array.
4108 2008-07-30 John W. Eaton <jwe@octave.org>
4110 * defun-dld.h (DEFUNX_DLD): Eliminate fsname arg.
4111 * defun-int.h (DEFINE_FUN_INSTALLER_FUN2,
4112 DEFINE_FUN_INSTALLER_FUN3, DEFINE_FUNX_INSTALLER_FUN2): Delete.
4113 (DEFINE_FUNX_INSTALLER_FUN): Rename from DEFINE_FUNX_INSTALLER_FUN3.
4114 Don't emit fsname function. Don't append cxx_abi to gname.
4115 (DEFINE_FUN_INSTALLER_FUN): Define in terms of
4116 DEFINE_FUNX_INSTALLER_FUN, not DEFINE_FUN_INSTALLER_FUN2.
4117 * dynamic-ld.cc (octave_dynamic_loader::name_mangler,
4118 octave_dynamic_loader::name_uscore_mangler): New functions.
4119 (octave_dynamic_loader::mangle_name,
4120 octave_dynamic_loader::xmangle_name): Delete.
4121 (octave_dynamic_loader::do_load_oct): Search for function with
4122 name_mangler then name_uscore_mangler.
4124 * oct-stream.cc (do_read): New arg, do_NA_conv.
4125 Perform NA translation if do_NA_conv is true.
4126 (DO_READ_VAL_TEMPLATE, read_fptr): Include the new arg for do_read
4128 (octave_stream::read): Pass do_NA_conv to do_read.
4130 2008-07-29 David Bateman <dbateman@free.fr>
4132 * data.cc (FNA): Add tests for conversion of single to double NA
4135 * ov-flt-re-mat.cc (Fsingle): Documentation fix.
4137 2008-07-28 David Bateman <dbateman@free.fr>
4139 * error.cc (last_error_id, last_error_message, last_warning_id,
4140 last_warning_message): New functions to return the error/warning
4141 message and id without exposing the internal values.
4142 * error.h (last_error_id, last_error_message, last_warning_id,
4143 last_warning_message): Declare them.
4144 * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Use them to pass the error
4145 to the ErrorHandler function.
4147 2008-07-28 John W. Eaton <jwe@octave.org>
4149 * error.cc (Flasterror, Flasterr): Unwind-protect error_state.
4151 * DLD-FUNCTIONS/__magick_read__.cc (F__magick_write__, write_image):
4154 2008-07-25 John W. Eaton <jwe@octave.org>
4156 * DLD-FUNCTIONS/det.cc (Fdet): Return calculated determinant for
4157 numerically singular matrices, not 0.
4159 * symtab.cc (get_dispatch_type): New function.
4160 (symbol_table::fcn_info::fcn_info_rep::find): Use it.
4162 * ov-class.cc (set_class_relationship): Delete static function.
4163 (Fsuperiorto, Finferiorto): Warn about precedence conflicts.
4164 Call symbol_table::set_class_relationship instead of local static
4166 * symtab.h (symbol_table::class_precedence_table): New data member.
4167 (symbol_table::set_class_relationship, symbol_table::is_superiorto):
4168 New static functions.
4170 2008-07-24 John W. Eaton <jwe@octave.org>
4172 * load-path.h (load_path::dir_info::class_info): New struct.
4173 (load_path::dir_info::method_file_map_type): Now a map from
4174 class name to a to a class_info object. Change all uses.
4175 * load-path.cc (load_path::dir_info::get_method_file_map):
4176 Also look for private functions in the class directory.
4177 (load_path::add_to_method_map): Also add private functions from
4178 class directories to private_fcn_map.
4180 * dirfns.cc (Fmkdir): If directory already exists, return status =
4181 true, but also set error message.
4183 2008-07-23 John W. Eaton <jwe@octave.org>
4185 * ov-usr_fcn.cc (octave_user_function::do_multi_index_op):
4186 Don't unwind_protect and set curr_parent_function here.
4187 * toplev.cc (curr_parent_function): Delete definition.
4188 * toplev.h: (curr_parent_function): Delete declaration.
4190 * ov-usr-fcn.h (octave_user_function::parent_scope): New data member.
4191 (octave_user_function::parent_fcn_scope,
4192 octave_user_function::stash_parent_fcn_scope): New functions.
4193 * ov-usr_fcn.cc (octave_user_function::octave_user_function):
4194 Initialize parent_scope.
4195 * symtab.cc (symbol_table::fcn_info::fcn_info_rep::find):
4196 Check parent of current function by looking at call stack, not
4197 global curr_parent_function variable.
4198 * parse.y (frob_function): If parsing nested function, stash
4199 current parent function scope.
4200 * ov-fcn.h (octave_function::parent_fcn_scope): New virtual function.
4202 2008-07-22 Michael Goffioul <michael.goffioul@gmail.com>
4204 * graphics.cc (F__go_execute_callback__): New function.
4206 * DLD-FUNCTIONS/fltk_backend.cc: Undefine min/max after FLTK headers
4209 * graphics.h.in (class base_graphics_event, class graphics_event): New
4210 classes (replace gh_manager::event_data).
4211 (class gh_manager::event_data): Remove.
4212 (gh_manager::post_function, gh_manager::do_post_function): Use
4213 graphics_event::event_fcn type.
4214 (gh_manager::event_queue, gh_manager::do_post_event): Use
4215 graphics_event type.
4216 * graphics.cc (class callback_event, class function_event, class
4217 set_event): Renamed from xxx_data classes.
4218 (graphics_event::create_callback_event,
4219 graphics_event::create_function_event,
4220 graphics_event::create_set_event): Renamed from gh_manager::xxx
4221 equivalent methods, removed reference count increment.
4222 (gh_manager::do_post_event): Likewise.
4223 (gh_manager::do_post_event): Use graphics_event type.
4224 (gh_manager::do_post_function): Use graphics_event::event_fcn type.
4226 2008-07-22 John W. Eaton <jwe@octave.org>
4228 * version.h (OCTAVE_VERSION): Now 3.1.51+.
4230 2008-07-21 John W. Eaton <jwe@octave.org>
4232 * version.h (OCTAVE_VERSION): Now 3.1.51.
4233 (OCTAVE_RELEASE_DATE): Now 2008-07-21.
4235 * ov-class.cc (octave_class::subsasgn): Only do internal magic if
4236 rhs is not an octave_class object.
4238 * OPERATORS/op-struct.cc: Define concatenation operators for
4239 struct/matrix concatenation (valid if matrix is empty).
4240 * OPERATORS/op-cell.cc (install_cell_ops): Likewise, for cells.
4242 * DLD-FUNCTIONS/fltk_backend.cc: Don't include oct.h.
4243 Make compilation of entire file conditional on HAVE_FLTK.
4245 * gl-render.cc: Make compilation of entire file conditional on
4248 * Makefile.in (GL_RENDER_SRC, FLTK_BACKEND_SRC): Delete variables.
4249 (DLD_XSRC): Always include fltk_backend.cc in the list.
4250 (DIST_SRC): Always include gl-render.cc in the list.
4252 2008-07-19 John W. Eaton <jwe@octave.org>
4254 * version.h (OCTAVE_VERSION): Now 3.1.50+.
4255 (OCTAVE_API_VERSION): Now api-v33+.
4257 2008-07-18 John W. Eaton <jwe@octave.org>
4259 * version.h (OCTAVE_VERSION): Now 3.1.50.
4260 (OCTAVE_API_VERSION): Now api-v33.
4261 (OCTAVE_RELEASE_DATE): Now 2008-07-18.
4262 (OCTAVE_COPYRIGHT): Update date to 2008.
4264 2008-07-18 John W. Eaton <jwe@octave.org>
4266 * Makefile.in (__magick_read__.df): New rule.
4267 Append MAGICK_INCFLAGS to CPPFLAGS.
4269 * Makefile.in (EXTRAS): Add graphics-props.cc to the list.
4270 List graphics-props.cc as a target generated by genprops.awk.
4272 2008-07-18 Carlo de Falco <carlo.defalco@gmail.com>
4274 * gl-render.h: Conditionally include GL/gl.h or OpenGL/gl.h
4275 and GL/glu.h or OpenGL/glu.h
4277 2008-07-17 John W. Eaton <jwe@octave.org>
4279 * symtab.cc (out_of_date_check_internal): New arg, dispatch_type.
4280 Use it to handle class methods.
4282 * toplev.h (octave_call_stack::do_caller): New function.
4283 (octave_call_stack::caller): Use it.
4285 2008-07-17 Jaroslav Hajek <highegg@gmail.com>
4287 * Makefile.in (convhulln.oct, __delaunayn__.oct, __voronoi__.oct,
4288 regexp.oct, urlwrite.oct, __glpk__.oct, fltk_backend.oct):
4289 Use OCT_LINK_DEPS instead of DL_LDFLAGS for target-specific
4292 2008-07-17 David Bateman <dbateman@free.fr>
4294 * DLD-FUNCTION/__magick_read__.cc (F__magick_read__): Allow build
4295 without GraphicsMagick++ installed.
4297 2008-07-16 John W. Eaton <jwe@octave.org>
4299 * graphics.h.in (gh_manager::autolock): Delete copy constructor
4300 and assignment definitions.
4302 2008-07-16 Michael Goffioul <michael.goffioul@gmail.com>
4304 * graphics.h.in (callback_property::execute): Remove static version.
4305 (base_properties::is_hittest, base_properties::is_interruptible,
4306 base_properties::is_selected, base_properties::is_selectionhighlight):
4307 New convenience property accessors.
4308 (base_graphics_object::get_handle, graphics_object::get_handle): Idem.
4309 (gh_manager::graphics_lock): New global mutex
4310 (gh_manager::lock, gh_manager::unlock, gh_manager::do_lock,
4311 gh_manager::do_unlock): Add accessors for it.
4312 (gh_manager::autolock): New class for easy locking of the graphics
4314 (gh_manager::event_data): New class for event management.
4315 (gh_manager::event_queue): New object to hold pending events.
4316 (gh_manager::callback_objects): New stack of callback objects.
4317 (gh_manager::execute_callback, gh_manager:post_callback,
4318 gh_manager::post_function, gh_manager::post_set,
4319 gh_manager::process_events, gh_manager::flush_events,
4320 gh_manager::restore_gcbo): New static methods for event management.
4321 (gh_manager::do_execute_callback, gh_manager::do_post_callback,
4322 gh_manager::do_post_function, gh_manager::do_post_set,
4323 gh_manager::do_process_events, gh_manager::do_post_event,
4324 gh_manager::do_restore_gcbo): New non-static versions.
4325 * graphics.cc (xreset_gcbo): Remove.
4326 (execute_callback): Likewise.
4327 (base_property::run_listeners, callback_property::execute): Use
4328 gh_manager::execute_callback.
4329 (class callback_event_data, class function_event_data, class
4330 set_event_data): New classes to implement various types of events.
4331 (gh_manager::event_data::create_callback_event,
4332 gh_manager::event_data::create_function_event,
4333 gh_manager::event_data::create_set_event): Implement event factory
4335 (gh_manager::do_restore_gcbo, gh_manager::do_execute_callback,
4336 gh_manager::do_post_event, gh_manager::do_post_callback,
4337 gh_manager::do_post_function, gh_manager::do_post_set,
4338 gh_manager::do_process_events): New methods for event management.
4339 (Fishandle, Fset, Fget, F__get__, F__go_figure__, F__go_delete__,
4340 F__go_axes_init__, F__go_handles__, F__go_figure_handles__,
4341 Favailable_backends, Fdrawnow, Faddlistener, Faddproperty,
4342 get_property_from_handle, set_property_in_handle): Lock graphics
4344 (GO_BODY): Likewise.
4345 (Fdrawnow): Support single "expose" argument.
4347 2008-07-15 John W. Eaton <jwe@octave.org>
4349 * DLD-FUNCTIONS/__convn__.cc (convn): Cast second arg to
4350 octave_idx_type in call to std::max.
4352 2008-07-14 John W. Eaton <jwe@octave.org>
4354 * Makefile.in (convhulln.oct, __delaunayn__.oct, __voronoi__.oct,
4355 regexp.oct, urlwrite.oct, __glpk__.oct, fltk_backend.oct):
4356 Simplify with target-specific settings for DL_LDFLAGS.
4358 * DLD-FUNCTIONS/__magick_read__.cc: Delete "using namespace std"
4359 and "using namespace Magick" directives. Style fixes.
4361 * oct-conf.h.in (OCTAVE_CONF_MAGICK_INCFLAGS,
4362 OCTAVE_CONF_MAGICK_LIBS): Substitute here.
4363 * toplev.cc (octave_config_info): Include MAGICK_INCFLAGS and
4364 MAGICK_LIBS in the struct.
4365 * Makefile.in (DLD_XSRC): Add __magick_read__.cc to the list.
4366 (OCTAVE_LIBS): Add $(MAGICK_LIBS) to the list for static linking case.
4367 (__magick_read__.d, __magick_read__.o, pic/__magick_read__.o):
4368 Append MAGICK_INCFLAGS to CPPFLAGS.
4369 (__magick_read__.oct): Append MAGICK_LIBS to LDFLAGS.
4371 2008-07-14 Thomas L. Scofield <scofield@calvin.edu>
4373 * DLD-FUNCTIONS/__magick_read__.cc: New file from Octave Forge.
4375 2008-07-11 John W. Eaton <jwe@octave.org>
4377 * syscalls.cc (const_value): Delete arg NM. Change all uses.
4379 * DLD-FUNCTIONS/fft.cc (do_fft): Avoid GCC warning.
4380 * DLD-FUNCTIONS/fft2.cc (do_fft2): Likewise.
4381 * DLD-FUNCTIONS/fftn.cc (do_fftn): Likewise.
4382 * DLD-FUNCTIONS/qr.cc (Fqrshift): Likewise.
4383 * DLD-FUNCTIONS/lookup.cc (Flookup): Likewise.
4384 * gl-render.cc (opengl_renderer::draw): Likewise.
4385 * graphics.cc (axes::update_axis_limits,
4386 hggroup::update_axis_limits, Favailable_backends):
4388 * pt-cmd.cc (tree_no_op_command::dup, tree_function_def::dup):
4390 * pt-const.cc (tree_constant::dup): Likewise.
4391 * pt-id.cc (tree_identifier::dup): Likewise.
4392 * pt-jump.cc (tree_break_command::dup, tree_continue_command::dup,
4393 tree_return_command::dup): Likewise.
4395 * DLD-FUNCTIONS/colamd.cc: Style fixes.
4396 (tree_postorder): Rename from TreePostorder.
4397 (tree_postorder, coletree): Avoid GCC warnings.
4399 * DLD-FUNCTIONS/chol.cc (Fchol): Avoid GCC warnings.
4400 (Fcholdelete, Fcholshift): Delete unused arg nargout.
4402 * toplev.cc, toplev.h (octave_call_stack::caller_user_function,
4403 octave_call_stack::caller_user_script,
4404 octave_call_stack::do_caller_user_function,
4405 octave_call_stack::do_caller_user_script):
4406 Delete functions and decls.
4408 * defun.cc (print_usage): Call octave_call_stack::caller_user_code,
4409 not octave_call_stack::caller_user_function.
4410 * debug.cc (get_user_code): Likewise.
4412 * toplev.h (octave_call_stack::difference_type): Delete typedef.
4413 * toplev.cc, toplev.h (octave_call_stack::caller_user_code_line,
4414 octave_call_stack::do_caller_user_code_line,
4415 octave_call_stack::caller_user_code_column,
4416 octave_call_stack::do_caller_user_code_column,
4417 octave_call_stack::caller_script,
4418 octave_call_stack::do_caller_script,
4419 octave_call_stack::caller_user_function,
4420 octave_call_stack::do_caller_user_function,
4421 octave_call_stack::caller_user_code,
4422 octave_call_stack::do_caller_user_code):
4423 Delete unused difference_type arg.
4425 * ov-float.h, ov-flt-re-mat.cc, ov-range.h, ov-re-mat.h,
4426 ov-re-sparse.cc, ov-scalar.h: Check for NaN in bool_value and
4427 bool_array_value member functions to bool.
4429 * ops.h (DEFSCALARBOOLOP_OP): New macro.
4430 * OPERATORS/op-s-s.cc, OPERATORS/op-fs-fs.cc: Use it to define
4431 el_and and el_or ops.
4433 2008-07-10 David Bateman <dbateman@free.fr>
4435 * DLD-FUNCTIONS/lookup.cc (assign): Delete.
4436 (Flookup): Use new NDArray constructors rather than assign.
4437 * data.cc (Fsort): Use new NDArray constructors rather than
4439 * besselj.cc (int_array2_to_matrix, int_arrayn_to_array,
4440 int_array2_to_float_matrix, int_arrayn_to_float_array): Delete.
4441 (do-bessel): Use new NDArray constructors.
4442 * max.cc (MINMAX_SPARSE_BODY, MINMAX_INT_BODY, MINMAX_SINGLE_BODY,
4443 MINMAX_DOUBLE_BODY): Use new NDArray constructors.
4444 * ov-bool.h (array_value, float_array_value): Explictly cast
4445 boolean scalar to double before the assignment to avoid ambiguity.
4447 2008-07-10 David Bateman <dbateman@free.fr>
4449 * ls-mat4.cc (read_mat_binary_data, save_mat_binary_data): Add
4450 loading and saving of sparse matrices.
4452 2008-07-10 Michael Goffioul <michael.goffioul@gmail.com>
4454 * Makefile.in: Add OPENGL_LIBS to liboctinterp link command. Add
4455 GRAPHICS_CFLAGS to fltk_backend.cc compilation command.
4456 * data.cc: Define hypotf to _hypotf when not present.
4457 * gl-render.h: Replace OCTGRAPHICS_API with OCTINTERP_API.
4458 * gl-render.cc: Get rid of Array2<vertex_data>.
4459 * OPERATORS/op-int.h: Use powf instead of pow when invoked
4460 with float arguments.
4462 2008-07-09 John W. Eaton <jwe@octave.org>
4464 * input.cc (get_debug_input): Don't delete global_command here.
4465 * toplev.cc (main_loop): Undo previous change.
4467 * toplev.h (octave_call_stack::instance_ok): Push top scope when
4470 * DLD-FUNCTIONS/inv.cc (Finv): Avoid GCC warning.
4472 * DLD-FUNCTIONS/expm.cc (Fexpm): Avoid GCC warning.
4474 * ov-fcn-inline.cc (octave_fcn_inline::load_ascii): Avoid GCC warning.
4476 2008-07-09 Michael Goffioul <michael.goffioul@gmail.com>
4478 * gl-render.cc (opengl_renderer::draw(figure)): Enable line smoothing
4479 according to __enhanced__ property.
4480 (opengl_renderer::draw_marker): Only draw markers with valid call
4482 (opengl_renderer::make_marker_list): Do not produce filled marker call
4483 list for non-fillable markers.
4484 (opengl_renderer::draw(axes)): Do not antialias axes system.
4486 * gl-render.cc (opengl_renderer::set_polygon_offset): Also enable
4487 polygon offseting in GL_LINE mode.
4488 (opengl_renderer::draw_marker): Offset markers foward instead of
4489 backward (to draw them above lines).
4491 * Makefile.in: new substituted variables GL_RENDER_SRC and
4494 * gl-render.cc (vertex_data::vertex_data_rep::vertex_data(void),
4495 vertex_data::vertex_data(void), vertex_data::vertex_data(...)):
4496 initialize reference counting correctly.
4498 2008-07-09 John W. Eaton <jwe@octave.org>
4500 * toplev.cc (main_loop): Unwind-protect global_command.
4501 * input.cc (get_debug_input): Likewise.
4503 2008-07-09 David Bateman <dbateman@free.fr>
4505 * pt-id.cc (octave_value_list tree_identifier::rvalue (int),
4506 octave_lvalue tree_identifier::lvalue (void)): Remove
4507 MAYBE_DO_BREAKPOINT.
4509 2008-07-08 John W. Eaton <jwe@octave.org>
4511 * graphics.h.in (axes::properties::keypos): Declare as
4512 any_property instead of double_property.
4514 2008-06-28 John W. Eaton <jwe@octave.org>
4516 * debug.cc (push_dummy_call_stack_elt): Delete.
4517 (Fdbstack): Don't push dummy stack elt. Use nskip instead of
4518 nframes, and curr_frame instead of idx. Pass curr_frame to
4519 octave_call_stack::backtrace.
4521 * ls-mat5.cc (read_mat5_binary_element): Explicitly pass 0 for
4522 current_context in call to symbol_table::varref.
4523 * ov-fcn-handle.cc (octave_fcn_handle::load_ascii): Likewise.
4526 * mex.cc (mexGetVariable, mexPutVariable): Use octave_call_stack
4527 methods to manipulate scope and context.
4528 * parse.y (source_file, Fassignin, Fevalin): Likewise.
4530 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
4531 Call octave_call_stack::push after call to symbol_table::push_scope.
4532 Call unwind_protect::add with octave_call_stack::unwind_pop
4533 immediately after call to octave_call_stack::push.
4535 * symtab.cc (symbol_table::xcurrent_caller_scope): Delete definition.
4536 * symtab.h (symbol_table::xcurrent_caller_scope): Delete decl.
4538 (xcurrent_context_this_table): Delete. Delete all uses.
4539 (symbol_table::current_caller_scope): Delete.
4541 * toplev.cc (octave_call_stack::do_num_user_code_frames):
4543 (octave_call_stack::do_backtrace): New arg, curr_user_frame.
4544 Rename nframes arg to nskip. Correctly handle curr_frame not at
4546 (octave_call_stack::do_goto_frame_relative): Rename n arg to nskip.
4547 Correctly handle curr_frame not at end of stack.
4548 (octave_call_stack::do_goto_caller_frame): New function.
4549 (octave_call_stack::do_goto_base_frame): New function.
4550 * toplev.h: Provide decls for new functions.
4551 (octave_call_stack::call_stack_elt::prev): New data member.
4552 Initialize it in constructor.
4553 (octave_call_stack::const_reverse_iterator,
4554 octave_call_stack::reverse_iterator): New typedefs.
4555 (octave_call_stack::symbol_table::scope_id current_scope,
4556 octave_call_stack::symbol_table::context_id current_context,
4557 octave_call_stack::num_user_code_frames,
4558 octave_call_stack::goto_caller_frame,
4559 octave_call_stack::goto_base_frame,
4560 octave_call_stack::do_num_user_code_frames,
4561 octave_call_stack::do_current_scope,
4562 octave_call_stack::do_current_context): New functions.
4564 (octave_call_stack::push): Default value for context arg is
4565 symbol_table::current_context, not 0.
4566 (octave_call_stack::do_push): Save previous frame. Always push
4567 new frame on back of stack. Call symbol_table::set_scope_and_context.
4568 (octave_call_stack::do_pop): Restore previous frame. Always pop
4569 frame from back of stack. Call symbol_table::set_scope_and_context.
4571 2008-06-26 John W. Eaton <jwe@octave.org>
4573 * token.h: Omit "class symbol_table::symbol_record" decl;
4575 * lex.l (grab_block_comment): Use parens around || expression
4576 within && expression.
4578 2008-06-23 John W. Eaton <jwe@octave.org>
4580 * debug.cc (Fdbstack): Avoid shadowed variable warning.
4582 2008-06-23 Jaroslav Hajek <highegg@gmail.com>
4584 * genprops.awk (emit_source): Avoid gensub for portability.
4587 2008-06-20 Jaroslav Hajek <highegg@gmail.com>
4589 * DLD-FUNCTIONS/regexp.cc (octregexp_list): Make "once" an output
4591 (octregexp): Do not use cell arrays when "once" is requested.
4593 * ov.cc (make_vector_dims): New function.
4594 (vector_value, complex_vector_value, float_vector_value,
4595 float_complex_vector_value): Query N-d array values and simplify,
4597 (column_vector_value, complex_column_vector_value,
4598 float_column_vector_value, float_complex_column_vector_value,
4599 row_vector_value, complex_row_vector_value,
4600 float_row_vector_value, float_complex_row_vector_value):
4601 Simplify to trivial wrappers.
4602 (int_vector_value): Avoid conversions if integer type, query N-d array
4605 2008-06-17 John W. Eaton <jwe@octave.org>
4607 * toplev.h, toplev.cc (class octave_call_stack):
4608 Push elements on and pop from back of queue.
4609 (octave_call_stack::do_push, octave_call_stack::do_pop):
4610 Always adjust curr_frame.
4611 (octave_call_stack::size, octave_call_stack::do_size): New functions.
4612 * pt-stmt.cc (tree_statement::eval):
4613 Also call octave_call_stack::set_statement when debugging.
4614 * debug.cc (push_dummy_call_stack_elt): New function.
4615 (Fdbstack): Omit dbstack from call stack by popping element rather
4616 than adjusting frame number. Correctly handle arg.
4618 2008-06-12 David Bateman <dbateman@free.fr>
4620 * DLD-FUNCTIONS/qr.cc (Fqrupdate, Fqrinsert, Fqrshift, Fqrdelete):
4621 Allow single precision arguments, add tests for single precision.
4623 2008-06-11 John W. Eaton <jwe@octave.org>
4625 * ov-base.cc (octave_base_value::streamoff_value,
4626 octave_base_value::streamoff_array_value): Delete.
4627 * ov-base.h: Delete decls.
4628 (octave_base_value::is_streamoff): Delete.
4629 * ov-float.cc (octave_float_scalar::streamoff_value,
4630 octave_float_scalar::streamoff_array_value): Delete.
4631 * ov-float.h: Delete decls.
4632 * ov-flt-re-mat.cc (octave_float_matrix::streamoff_array_value): Delete.
4633 * ov-flt-re-mat.h: Delete decl.
4634 * ov-re-mat.cc (octave_matrix::streamoff_array_value): Delete.
4635 * ov-re-mat.h: Delete decl.
4636 * ov-re-sparse.cc (octave_sparse_matrix::streamoff_array_value): Delete.
4637 * ov-re-sparse.h: Delete decl.
4638 * ov-scalar.cc (octave_scalar::streamoff_value,
4639 octave_scalar::streamoff_array_value): Delete.
4640 * ov-scalar.h: Delete decls.
4641 * ov.cc (octave_value::octave_value (const streamoff_array&),
4642 octave_value::octave_value (const ArrayN<std::streamoff>&),
4643 octave_value::streamoff_value (void) const,
4644 octave_value::streamoff_array_value (void) const): Delete.
4645 * ov.h: Delete decls.
4646 (octave_value::is_streamoff): Delete.
4647 * ov.cc (install_types): Don't register streamoff type.
4648 * ov-streamoff.h, ov-streamoff.cc, OPERATORS/op-streamoff.cc: Delete.
4649 * Makefile.in: Delete them from the lists.
4651 * error.cc (verror): Restore newline in msg_string. Stripping
4652 "error: " prefix when buffering error messages is no longer neeed.
4654 2008-06-25 David Bateman <dbateman@free.fr>
4656 * pr-output.cc (Frats): Print usage if nargin == 0.
4658 2008-06-10 John W. Eaton <jwe@octave.org>
4660 * mexproto.h (mxCreateLogicalScalar): Declar arg as mxLogical, not int.
4662 2008-06-09 John W. Eaton <jwe@octave.org>
4664 * graphics.cc (execute_callback): Pass CB by const reference and
4665 explicitly make a copy.
4666 (xget_ancestor): Pass GO by const reference and explicitly make a copy.
4668 * error.cc (verror): Omit "name: " and "\a" from Vlast_error_msg.
4669 Save line and column information from user code.
4670 * toplev.cc (octave_call_stack::do_caller_user_code_line,
4671 octave_call_stack::do_caller_user_code_column): New functions.
4672 * toplev.h: Provide decls.
4673 (octave_call_stack::caller_user_code_line,
4674 octave_call_stack::caller_user_code_column): New functions.
4675 (octave_call_stack::current_line, octave_call_stack::current_column):
4676 Default return value is -1, not 0.
4678 2008-06-06 John W. Eaton <jwe@octave.org>
4680 * ov.h (octave_value::erase_subfunctions):
4682 * ov-base.h (octave_base_value::erase_subfunctions):
4683 New virtual function.
4684 * ov-usr-fcn.h (octave_user_function::erase_subfunctions):
4686 * symtab.h (symbol_table::fcn_info::::erase_subfunction,
4687 symbol_table::fcn_info::fcn_info_rep::erase_subfunction,
4688 symbol_table::erase_subfunctions_in_scope):
4690 (symbol_table::fcn_info::fcn_info_rep::clear_user_function):
4691 Erase subfunctions here.
4693 * variables.cc (Fmlock): Doc fix.
4695 2008-06-05 John W. Eaton <jwe@octave.org>
4697 * gl-render.cc (opengl_renderer::draw): Correctly avoid shadow
4698 warnings from gcc for xmin, xmax, ymin, ymax, zmin, and zmax.
4700 * graphics/ChangeLog, graphics/Makefile.in, graphics/Makerules.in,
4701 graphics/fltk_backend/Makefile.in, graphics/opengl/Makefile.in:
4704 * gl-render.cc, gl-render.h: Move here from src/graphics/opengl.
4705 * Makefile.in: Add them to the appropriate lists.
4706 (octave$(EXEEXT)): Also link with $(OPENGL_LIBS)
4708 * fltk_backend.cc: Move here from src/graphics/fltk_backend.
4709 * Makefile.in (DLD_XSRC): Add it to the list
4710 (fltk_backend.oct): Include special rules for linking with
4711 $(GRAPHICS_LIBS) and $(FT2_LIBS).
4713 * dynamic-ld.cc (octave_dynamic_loader::mex_mangler,
4714 octave_dynamic_loader::mex_uscore_mangler,
4715 octave_dynamic_loader::mex_f77_mangler): New functions.
4716 (octave_dynamic_loader::do_load_mex): Use them.
4717 (octave_dynamic_loader::do_remove_oct): Rename from
4718 octave_dynamic_loader::do_remove.
4719 (octave_dynamic_loader::do_remove_mex): New function.
4720 * dynamic-ld.h: Provide/fix decls.
4722 * graphics.cc (properties::update_normals): Style fixes.
4723 * graphics.h.in: Style fixes.
4725 ChangeLog entries for gl-render.h, gl-render.cc, and
4726 fltk_backend.cc before the move:
4728 2008-06-05 John W. Eaton <jwe@octave.org>
4730 * opengl/gl-render.cc (xmin): New static function.
4732 * opengl/gl-render.h (opengl_renderer): Style fixes.
4733 * fltk_backend/fltk_backend.cc: Style fixes.
4735 2008-04-26 Michael Goffioul <michael.goffioul@gmail.com>
4737 * opengl/gl-render.h (opengl_renderer::draw(hggroup)): New method.
4738 * opengl/gl-render.cc (opengl_renderer::draw(hggroup)): Likewise.
4739 (opengl_renderer::draw(graphics_object)): Call it.
4741 2008-03-17 Shai Ayal <shaiay@users.sourceforge.net>
4743 * fltk_backend/fltk_backend.cc (plot_window::resize,
4744 plot_window::draw): make canvas the size of figure.position
4746 2008-03-09 Shai Ayal <shaiay@users.sourceforge.net>
4748 * fltk_backend/fltk_backend.cc (plot_window::handle): add zoom
4751 2008-03-06 Shai Ayal <shaiay@users.sourceforge.net>
4753 * fltk_backend/fltk_backend.cc (plot_window::handle): Add handling
4754 of the 'a' and 'g' keys
4755 (plot_window: toggle_grid): New helper function
4756 (plot_window): Add new togglegrid button
4758 2008-03-01 Shai Ayal <shaiay@users.sourceforge.net>
4760 * fltk_backend/fltk_backend.cc (OpenGL_fltk::draw_overlay,
4761 OpenGL_fltk::zoom, OpenGL_fltk::set_zoom_box): Added to support
4763 (plot_window::handle): Added zoom box code, B-3 now does autoscale
4764 (plot_window::axis_auto): New utility function to call axis("auto")
4765 (plot_window::button_press): "A" button now does autoscale
4767 * opengl/gl-render.cc (make_marker_list): Add the "+x*.^v><"
4770 2008-02-27 Michael Goffioul <michael.goffioul@gmail.com>
4772 * opengl/gl-render.cc (opengl_renderer::draw(patch),
4773 opengl_renderer::draw(surface)): Adapt to type change of facealpha and
4774 edgealpha, using double_radio_property class.
4776 2008-02-26 Michael Goffioul <michael.goffioul@gmail.com>
4778 * opengl/gl-render.h: Make sure windows.h is included before OpenGL
4780 * fltk_backend/Makefile.in (FLTK_EXTRA_CXXFLAGS): Use $(srcdir) for
4781 includesion of OpenGL renderer headers.
4782 (Makeconf): Move inclusion of Makeconf later on, to avoid freezing
4785 * fltk_backend/Makefile.in (GRAPHICS_CFLAGS): New substituted
4788 2008-02-25 Shai Ayal <shaiay@users.sourceforge.net>
4790 * fltk_backend/fltk_backend.cc (class plot_window): Many changes
4791 to use figure::properties instead of figure handle to reference
4793 (class figure_manager): ditto
4794 (__fltk_redraw__): moved most of functionality into the
4795 figure_manager class
4796 (plot_window::pixel2pos): Modified to use axes::pixel2coord
4797 (plot_window::pixel2staus): Modified to use pixel2pos
4798 (plot_window::handle): Added zoom with mouse
4800 2008-02-24 Shai Ayal <shaiay@users.sourceforge.net>
4802 * fltk_backend/fltk_backend.cc (OpenGL_fltk::Draw): removed double
4804 (OpenGL_fltk::setup_viewport): removed call to glOrtho --
4805 gl-render takes care of all the transformations
4807 2008-02-23 Shai Ayal <shaiay@users.sourceforge.net>
4809 * fltk_backend/fltk_backend.cc (plot_window::mark_modifed): mark
4810 the whole window as damaged (otherwise changing figure.postion
4811 does not have immediate effect)
4812 (plot_window::draw): New function, checks for window size
4813 (__fltk_maxtime__): New DEFUN to allow tweaking of fltk timeout
4814 (__fltk_redraw__): Use fltk_maxtime as timeout
4816 2008-02-21 Michael Goffioul <michael.goffioul@gmail.com>
4818 * opengl/gl-render.cc (opengl_renderer::patch_tesselator::combine):
4819 Protect against NULL vertex data.
4821 * opengl/gl-render.cc (opengl_renderer::draw(patch)): Add marker
4822 rendering of patch objects.
4824 2008-02-21 Shai Ayal <shaiay@users.sourceforge.net>
4826 * opengl/gl-render.cc: remove OpenGL includes
4827 * opengl/gl-render.h: add OpenGL includes
4828 * fltk_backend/fltk_backend.cc: remove OpenGL includes
4829 (__fltk_redraw__): put figure handle into the figure's
4830 __plot_stream__ property for later
4831 (fltk_backend::close_figure): use argument as figure handle to
4834 2008-02-20 Shai Ayal <shaiay@users.sourceforge.net>
4836 * fltk_backend/Makefile.in: initial import
4838 * fltk_backend/fltk_backend.cc: initial import
4841 2008-02-20 Michael Goffioul <michael.goffioul@gmail.com>
4843 * opengl/gl-render.h (opengl_renderer::draw(patch)): New method to
4844 render patch objects.
4845 (class opengl_renderer::patch_tesselator): Forward declaration.
4846 * opengl/gl-render.cc (opengl_texture::create): Use RGB data format
4848 (class opengl_tesselator): New classes to abstract GLU tessellation
4850 (class opengl_renderer::patch_tesselator): New class to render opaque
4852 (class vertex_data): New class to hold vertex data during tessellation
4854 (opengl_renderer::draw(patch)): New method to render patch objects (no
4855 transparency, no border, no marker yet).
4856 (opengl_renderer::draw(graphics_object)): Dispatch to it.
4858 * opengl/gl-render.cc (opengl_renderer::draw(patch)): Use patch color
4859 data and support face/vertex single color specification.
4861 * opengl/gl-render.cc (opengl_tesselator::begin_polygon): Set
4862 tessellation property also for non-filled polygons.
4863 (opengl_renderer::patch_tesselator::vertex): Protect against empty
4865 (opengl_renderer::draw(patch)): Render patch border (no transparency
4868 2008-02-19 Michael Goffioul <michael.goffioul@gmail.com>
4870 * opengl/gl-render.cc (opengl_texture::texture_rep::tex_coord,
4871 opengl_texture::tex_coord): New wrapper around glTexCoord2d.
4872 (opengl_renderer::draw(surface)): Use it for texturemap
4874 (opengl_renderer::draw(surface)): Fix indexing bug when creating clip
4876 (opengl_texture::operator=): Add assignment operator.
4877 (opengl_texture::create): New static opengl_texture creator.
4878 (opengl_texture::is_valid): New accessor.
4880 2008-02-18 Michael Goffioul <michael.goffioul@gmail.com>
4882 * opengl/gl-render.cc (class opengl_texture): New class to wrap
4883 texture operations in OpenGL.
4885 2008-02-17 Michael Goffioul <michael.goffioul@gmail.com>
4887 * opengl/gl-render.cc (opengl_renderer::draw(surface)): Set material
4888 color when rendering surface facets.
4890 * opengl/gl-render.cc (opengl_renderer::draw(surface)): Add rendering
4891 of mesh and markers.
4893 2008-02-16 Michael Goffioul <michael.goffioul@gmail.com>
4895 * opengl/gl-render.cc (opengl_renderer::draw(figure)): Initialize the
4896 OpenGL context correctly.
4897 (opengl_renderer::draw(surface)): Add missing glEnd call.
4899 2008-02-14 Michael Goffioul <michael.goffioul@gmail.com>
4901 * opengl/gl-render.h opengl/gl-render.cc: Add rendering
4902 interface for surface objects (actual implement still
4905 2008-02-14 Michael Goffioul <michael.goffioul@gmail.com>
4907 * Makefile.in Makerules.in: Initial import
4908 * opengl/Makefile.in: Likewise.
4909 * opengl/gl-render.h opengl/gl-render.cc: Likewise.
4911 2008-06-04 Shai Ayal <shaiay@users.sourceforge.net>
4913 * graphics.cc (axes::properties::set_defaults): Preserve position
4915 (axes::properties::sync_positions): Use default_axes_postion for
4918 * graphics.h.in (axes::properties::sync_positions,
4919 axes::properties::update_position,
4920 axes::properties::update_outerposition): New functions to sync
4921 outerposition and position.
4923 * graphics.h.in (axes::properties::update_xlim,
4924 axes::properties::update_ylim, axes::properties::update_zlim):
4925 pass is_logscale flag to axes::properties::calc_ticks_and_lims
4926 * graphics.cc (axes::properties::calc_ticks_and_lims): Added
4927 support for log scale
4929 * graphics.h.in (axes::properities::fix_limits) : New method.
4930 (axes::properties::update_xlim, axes::properties::update_ylim,
4931 axes::properties::update_zlim): Use fix_limits.
4933 * graphics.cc (axes::properties::calc_ticks_and_lims): Make sure
4936 * graphics.h.in (axes::pixel2coord, axes::coord2pixel): New functions.
4938 * graphics.cc (convert_position): No longer static.
4939 * graphics.h.in: Provide decl.
4941 * graphics.cc (Favailable_backends): New function.
4942 * graphics.h.in (base_graphics_backend::available_backends_list):
4945 * graphics.cc (axes::properties::calc_ticks_and_lims): Refactor.
4946 Adjust axes limits & tics together so that the result is consistent.
4947 (axes::properties::calc_tick_sep): Ditto.
4948 (axes::properties::get_axis_limits): Ditto. Now a member of
4950 (magform): Now file-scope static function instead of
4951 axes::properties member function.
4953 * graphics.h.in (axes::properties::update_xlim): call the new
4954 axes::properties::calc_ticks_and_lims method
4955 (axes::properties::update_ylim): ditto
4956 (axes::properties::update_zlim): ditto
4958 2008-06-04 Michael Goffioul <michael.goffioul@gmail.com>
4960 * ov-fcn-inline.h (class octave_fcn_inline): Mark with OCTINTERP_API.
4961 * ov-fcn-handle.h (class Octave_fcn_handle): Likewise.
4962 * ls-oct-binary.h (save_binary_data, read_binary_data): Likewise.
4964 * genprops.awk (emit_source): Fix if-then-else statement generation
4965 when the first property is hidden.
4966 * graphics.h.in (base_properties::adopt): Call mark_modified.
4967 (class hggroup): New graphics object class.
4968 * graphics.cc (lookup_object_name, make_graphics_object_from_type,
4969 property_list::lookup, property_list::set,
4970 root_figure::init_factory_properties): Support hggroup as possible
4972 (hggroup::update_axis_limits): New graphics object class.
4973 (make_graphics_object): Look for "parent" property in the arguments
4974 and use it as actual parent for the created object.
4975 (F__go_hggroup__): New function.
4976 (F__go_delete__): Set Vdrawnow_requested to true.
4978 * graphics.h.in (base_property::clone, string_property::clone,
4979 radio_property::clone, color_property::clone, double_property::clone,
4980 double_radio_property::clone, array_property::clone,
4981 row_vector_property::clone, bool_property::clone,
4982 handle_property::clone, callback_property::clone, any_property::clone,
4983 property::clone): New virtual method.
4984 (property::create): New static method to create dynamic properties.
4985 (base_properties::has_property): New method to check the existence of
4987 (any_property::any_property, row_vector_property::row_vector_property,
4988 double_radio_property::double_radio_property): New copy constructors.
4989 * graphics.cc (lookup_object_name): New static utility function.
4990 (make_graphics_object_from_type): Likewise.
4991 (gh_manager::do_make_graphics_handle): Use it.
4992 (dprop_obj_map): New static map used for chaching purpose in dynamic
4994 (property::create): New static method to create dynamic properties.
4995 (base_properties::has_property): New method to check the existence of
4997 (base_properties::override_defaults): Check parent validity.
4998 (Faddlistener): Documentation fix.
4999 (Faddproperty): New function to create dynamic properties.
5001 * genprops.awk (emit_get_array): Don't produce get_xxx_property
5003 * graphics.h.in (array_property::get_limits): New method to return the
5005 (base_properties::get_xdata_property,
5006 base_properties::get_ydata_property,
5007 base_properties::get_zdata_property,
5008 base_properties::get_ldata_property,
5009 base_properties::get_udata_property,
5010 base_properties::get_xldata_property,
5011 base_properties::get_xudata_property,
5012 base_properties::get_cdata_property): Remove methods, replaced with
5013 limit-based equivalent.
5014 (base_graphics_object::get_xdata_property,
5015 base_graphics_object::get_ydata_property,
5016 base_graphics_object::get_zdata_property,
5017 base_graphics_object::get_ldata_property,
5018 base_graphics_object::get_udata_property,
5019 base_graphics_object::get_xldata_property,
5020 base_graphics_object::get_xudata_property,
5021 base_graphics_object::get_cdata_property): Likewise.
5022 (graphics_object::get_xdata_property,
5023 graphics_object::get_ydata_property,
5024 graphics_object::get_zdata_property,
5025 graphics_object::get_ldata_property,
5026 graphics_object::get_udata_property,
5027 graphics_object::get_xldata_property,
5028 graphics_object::get_xudata_property,
5029 graphics_object::get_cdata_property): Likewise.
5030 (base_properties::get_xlim, base_properties::get_ylim,
5031 base_properties::get_zlim, base_properties::get_clim,
5032 base_properties::get_alim, base_properties::is_xliminclude,
5033 base_properties::is_yliminclude, base_properties::is_zliminclude,
5034 base_properties::is_climinclude, base_properties::is_aliminclude):
5036 (base_graphics_object::get_xlim, base_graphics_object::get_ylim,
5037 base_graphics_object::get_zlim, base_graphics_object::get_clim,
5038 base_graphics_object::get_alim, base_graphics_object::is_xliminclude,
5039 base_graphics_object::is_yliminclude,
5040 base_graphics_object::is_zliminclude,
5041 base_graphics_object::is_climinclude,
5042 base_graphics_object::is_aliminclude): Likewise.
5043 (graphics_object::get_xlim, graphics_object::get_ylim,
5044 graphics_object::get_zlim, graphics_object::get_clim,
5045 graphics_object::get_alim, graphics_object::is_xliminclude,
5046 graphics_object::is_yliminclude, graphics_object::is_zliminclude,
5047 graphics_object::is_climinclude, graphics_object::is_aliminclude):
5049 (base_graphics_object::update_axis_limits): Provide default behavior
5050 by passing the call to the parent object.
5051 (line::properties::xdata, line::properties::ydata,
5052 line::properties::zdata, line::properties::ldata,
5053 line::properties::udata, line::properties::xldata,
5054 line::properties::xudata): Replace 'l' modifier with 'u'.
5055 (line::properties::xlim, line::properties::ylim,
5056 line::properties::zlim, line::properties::xliminclude,
5057 line::properties::yliminclude, line::properties::zliminclude): New
5059 (line::properties::update_xdata, line::properties::update_ydata,
5060 line::properties::update_zdata, line::properties::update_xldata,
5061 line::properties::update_xudata, line::properties::update_ldata,
5062 line::properties::update_udata): New updaters that update limit
5064 (line::properties::compute_xlim, line::properties::compute_ylim): New
5065 method to compute actual limits taking into account x/y data and
5067 (text::properties::position): Add 'u' modifier.
5068 (text::properties::xlim, text::properties::ylim,
5069 text::properties::zlim, text::properties::xliminclude,
5070 text::properties::yliminclude, text::properties::zliminclude): New
5072 (text::properties::update_position): New updater that updates limit
5074 (image::properties::xdata, image::properties::ydata,
5075 image::properties::cdata): Replace 'l' modifier with 'u'.
5076 (image::properties::cdatamapping): Add 'l' modifier.
5077 (image::properties::xlim, image::properties::ylim,
5078 image::properties::clim, image::properties::xliminclude,
5079 image::properties::yliminclude, image::properties::climinclude): New
5081 (image::properties::get_climinclude,
5082 image::properties::is_climinclude): Provide specialized inline
5084 (image::properties::update_xdata, image::properties::update_ydata,
5085 image::properties::update_cdata): New updaters that update limit
5087 (patch::properties::xdata, patch::properties::ydata,
5088 patch::properties::zdata, patch::properties::cdata): Replace 'l'
5090 (patch::properties::cdatamapping): Add 'l' modifier.
5091 (patch::properties::alphadatamapping): New property.
5092 (patch::properties::xlim, patch::properties::ylim,
5093 patch::properties::zlim, patch::properties::clim,
5094 patch::properties::alim, patch::properties::xliminclude,
5095 patch::properties::yliminclude, patch::properties::zliminclude,
5096 patch::properties::climinclude, patch::properties::aliminclude: New
5098 (patch::properties::get_climinclude,
5099 patch::properties::is_climinclude, patch::properties::get_aliminclude,
5100 patch::properties::is_aliminclude): Provide specialized inline
5102 (patch::properties::update_xdata, patch::properties::update_ydata,
5103 patch::properties::update_zdata, patch::properties::update_cdata): New
5104 updaters that update limit properties.
5105 (surface::properties::xdata, surface::properties::ydata,
5106 surface::properties::zdata, surface::properties::cdata,
5107 surface::properties::alphadata): Replace 'l' modifier with 'u'.
5108 (surface::properties::cdatamapping,
5109 surface::properties::alphadatamapping): Add 'l' modifier.
5110 (surface::properties::xlim, surface::properties::ylim,
5111 surface::properties::zlim, surface::properties::clim,
5112 surface::properties::alim, surface::properties::xliminclude,
5113 surface::properties::yliminclude, surface::properties::zliminclude,
5114 surface::properties::climinclude, surface::properties::aliminclude: New
5116 (surface::properties::get_climinclude,
5117 surface::properties::is_climinclude,
5118 surface::properties::get_aliminclude,
5119 surface::properties::is_aliminclude): Provide specialized inline
5121 (surface::properties::update_xdata, surface::properties::update_ydata,
5122 surface::properties::update_zdata): Update limit properties.
5123 (surface::properties::update_cdata,
5124 surface::properties::update_alphadata): New updaters that update limit
5126 * graphics.cc (base_properties::update_axis_limits): Simply call
5127 update_axis_limits in owning graphics_object.
5128 (base_graphics_object::update_axis_limits): Provide default behavior
5129 by passing the call to the parent object.
5130 (check_limits_vals(double&,double&,double&,const octave_value&)): New
5131 static method to work with new limit properties in graphics objects.
5132 (get_children_limits): New static method to compute the raw limits of
5133 a set of children, based on the new limit properties.
5134 (axes::update_axis_limits): Simplify and call get_children_limits. Add
5135 handling of alpha limits.
5136 (line::properties::compute_xlim, line::properties::compute_ylim): New
5137 methods to compute line limits taking into account upper/lower bounds.
5139 * graphics.cc (axes::properties::sync_positions): Update
5140 transformation data.
5142 * graphics.cc (Faddlistener): Rename from Fadd_listener.
5144 * graphics.h.in (axes::properties::pixel2coord): Center Z coordinate
5145 on x_zlim instead of 0.
5146 (axes::properties::zoom, axes::properties::unzoom,
5147 axes::properties::clear_zoom_stack): New methods to handle zoom stack.
5148 (axes::properties::zoom_stack): New field to hold zoom stack.
5149 (axes::properties::update_xlim, axes::properites::update_ylim):
5150 Additional do_clr_zoom argument to control whether the zoom stack will
5152 (axes::properties::update_zlim): Clear zoom stack.
5153 * graphics.cc (axes::properties::zoom, axes::properties::unzoom,
5154 axes::properties::clear_zoom_stack): New methods to handle zoom stack.
5156 * genprops.awk (emit_source): Use all properties in factory defaults.
5158 * graphics.h.in (base_property::base_property): Set internal counter
5160 (property::property): Adapt constructors to default counter value in
5163 * graphics.h.in (base_properties::get_property): Make virtual and
5164 remove const modifier.
5165 * graphics.cc (base_properties::get_property): Can return built-in
5166 properties. Generate an error if the property does not exist.
5167 (base_properties::add_listener): Use get_property.
5168 (Fadd_listener): Add documentation.
5169 * genprops.awk (emit_common_declarations, emit_source): Emit code for
5170 overloaded get_property method.
5172 * genprops.awk (emit_declarations): Run listeners in the property
5174 * graphics.h.in (enum listener_mode): New enum type for listeners.
5175 (base_property::set): Make non-virtual and handle listeners execution.
5176 (base_property::listeners): New field holding a map of listeners.
5177 (base_property::add_listener, base_property::run_listeners,
5178 base_property::do_set): New methods to handle listeners.
5179 (property::add_listener, property::run_listeners): Likewise.
5180 (base_properties::add_listener): Likewise.
5181 (base_graphics_object::add_property_listener,
5182 graphics_object::add_property_listener): Likewise.
5183 (all property classes): Rename set to do_set and make it protected.
5184 * graphics.cc (base_property::run_listeners): New method to execute
5186 (color_property::set, double_radio_property::set,
5187 handle_property::set): Rename to do_set.
5188 (base_properties::add_listener): New method to handle listener
5189 additio. Only handle dynamic properties.
5190 (Fadd_listener): New octave interface to add property listeners to
5193 * genprops.awk (emit_get_data): Remove.
5194 (emit_declarations): Treat row_vector_property as array_property and
5195 remove data_property references.
5196 * graphics.h.in (array_property::array_property(array_property)): Add
5198 (class data_property): Remove (replaced by array_property).
5199 (class base_graphics_backend, class graphics_backend): Replace
5200 data_property references with array_property.
5201 (line::properties::xdata, line::properties::ydata,
5202 line::properties::zdata, line::properties::ldata,
5203 line::properties::udata, line::properties::xldata,
5204 line::properties::xudata): Turn into row_vector_property.
5205 (image::properties::xdata, image::properties::ydata): Likewise.
5206 (image::properties::init): Add length constraints for xdata and ydata.
5207 (patch::properties::xdata, patch::properties::ydata,
5208 patch::properties::zdata, patch::properties::facevertexalphadata):
5209 Turn into array_property.
5210 (surface::properties::xdata, surface::properties::ydata,
5211 surface::properties::zdata): Likewise.
5212 (patch::properties::init): Add size constraints for xdata, ydata,
5213 zdata and facevertexalphadata.
5214 (surface::properties::init): Add size constraints for xdata, ydata and
5216 * graphics.cc (check_limit_vals): Remove override with data_property.
5217 (axes::update_axis_limits): Replace data_property references with
5220 * graphics.h.in (root_figure::get_default): Use factory defaults when
5221 no explicit default value exists.
5222 (figure::properties::set___backend__): Reset __plot_stream__ to empty
5224 * graphics.cc (gh_manager::gh_manager): Call
5225 graphics_backend::default_backend to make sure the default backend is
5228 * graphics.h.in (patch::properties::edgealpha,
5229 surface::properties::facealpha, surface::properties::edgealpha): Fix
5230 typos in property names.
5232 * graphics.h.in (class double_radio_property): New property class for
5233 holding face/edge alpha values.
5234 (patch::properties::facealpha, patch::properties::edgealpha,
5235 surface::properties::facealpha, surface::properties::edgealpha): Use
5236 double_radio_property class.
5237 * graphics.cc (double_radio_property::set): Implement new property
5239 * genprops.awk (emit_get_double_radio): New function to emit code for
5240 double_radio_property.
5241 (emit_declarations): Use it.
5243 * graphics.h.in (array_property::array_property(void)): New default
5245 (array_property::xmin, array_property:xmax, array_property::xminp,
5246 array_property::min_val, array_property::max_val,
5247 array_property::min_pos): New fields and accessors to hold min/max
5248 values of the array data.
5249 (array_property::get_data_limits): New method to compute min/max
5250 values of the array data.
5251 (base_properties::get_cdata_property,
5252 graphics_object::get_cdata_property): Return array_property.
5253 (image::properties::cdata, surface::properties::cdata,
5254 patch::properties::cdata, patch::properties::facevertexcdata): Turn
5255 into array_property type.
5256 (image::properties::init, surface::properties::init,
5257 patch::properties::init): Add constraint initialization for cdata and
5258 facevertexcdata (patch only).
5259 * genprops.awk (emit_get_array): New function to emit accessor for
5261 (emit_declarations): Use it.
5262 * graphics.cc (get_array_limits): New template function to compute
5263 min/max values of an Array<T> object.
5264 (array_property::get_data_limits): New method to compute min/max
5265 values of the array data, using get_array_limits.
5266 (check_limit_vals): Overridden function with array_property.
5267 (axes::update_axis_limits): Turn cdata property into array_property.
5269 * graphics.h.in (patch::properties::get_color_data): New utility
5270 function to retrieve actual color data.
5271 * graphics.cc (patch::properties::get_color_data): Likewise.
5273 * graphics.h.in (base_scaler::is_linear, lin_scaler::is_linear,
5274 scaler::is_linear): New method to detect linear scales.
5275 (graphics_xform::scale(Matrix)): New method to scale 2D/3D coordinates
5277 (patch::properties::facelighting): Set default value to "none".
5279 * graphics.h.in (axes::axes): Be sure to initialize transformation
5282 * graphics.cc (xget_ancestor): Pass graphics_object argument by value
5283 instead of by reference.
5285 * graphics.h.in (surface::properties::xdata,
5286 surface::properties::ydata, surface::properties::zdata,
5287 surface::properties::normalmode, surface::properties::vertexnormals):
5289 (surface::properties::update_normals): New method to compute normals
5291 (surface::properties::update_xdata, surface::properties::update_ydata,
5292 surface::properties::update_zdata,
5293 surface::properties::update_normalmode,
5294 surface::properties::update_vertexnormals): New updaters to update
5295 normals automatically.
5296 * graphics.cc (surface::properties::update_normals): Likewise.
5297 (cross_product): New inlined utility function for cross product
5298 computation adn accumulation.
5300 * graphics.h.in (class base_scaler, class lin_scaler, class
5301 log_scaler, class scaler): Add scale method for NDArray.
5302 (log_scaler::do_scale): Factorize scaling code.
5304 * graphics.h.in (figure::properties::update_position): Re-remove.
5305 (figure::properties::facecolor): Re-add 'texturemap' value.
5306 (surface::properties::get_color_data): New method to compute actual
5307 surface color data from cdata.
5308 * graphics.cc (surface::properties::get_color_data): Likewise.
5309 (xget_ancestor): New utility function to retrieve an ancestor of a
5311 (convert_cdata): New utility function to convert cdata property into
5314 * graphics.h.in (surface::properties::facecolor): Add "texturemap"
5316 (class surface::properties): New properties alphadata,
5317 alphadatmapping, ambientstrength, backfacelighting, diffusestrength,
5318 edgealpha, edgelighting, erasemode, facelighting, meshstyle,
5319 normalmode, specularcolorreflectance, specularexponent,
5320 specularstrength, vertexnormals.
5321 (surface::properties::init): Add constraints for alphadata,
5322 vertexnormals and cdata (the latter are commented until cdata
5325 * graphics.h.in (base_properties::update_boundingbox): New method
5326 to handle object resize.
5327 (figure::properties::set_boundingbox): New method to set figure
5328 position from backend.
5329 (figure::properties::update_position): Remove method.
5330 (figure::properties::position): Remove 'u' modifier and add 'S'
5332 (axes::properties::update_boundingbox): Overload to recompute
5333 transformation when axes size changed.
5334 * graphics.cc (base_properties::update_boundingbox): New method.
5335 (figure::properties::set_boundingbox,
5336 figure::properties::set_position): Likewise.
5338 * genprops.awk: Add 'U' modifier to support extern updaters.
5339 * graphics.h.in (base_graphics_backend::gripe_invalid): New method
5340 to simplify error reporting.
5341 (class base_graphics_backend): Use it.
5342 (base_graphics_backend::set_figure_position): New backend method.
5343 (graphics_backend::set_figure_position): Likewise.
5344 (figure::properties::position): Mark property with updater.
5345 (figure::properties::update_position): New updater.
5347 * graphics.h.in (root_figure::properties::callbackobject):
5349 (root_figure::properties::cbo_stack): New field.
5350 * graphics.cc (xset_gcbo, xreset_gcbo): New utility functions.
5351 (execute_callback): Set callbackobject property in root object
5352 before executing a callback.
5353 (root_figure::properties::set_callbackobject): Implement accessor.
5355 * graphics.h.in (root_figure::properties::callbackobject):
5357 (root_figure::properties::cbo_stack): New field.
5358 * graphics.cc (xset_gcbo, xreset_gcbo): New utility functions.
5359 (execute_callback): Set callbackobject property in root object
5360 before executing a callback.
5361 (root_figure::properties::set_callbackobject): Implement accessor.
5363 * graphics.h.in (class root_figure::properties,
5364 class line::properties, class text::properties,
5365 class image::properties, class patch::properties,
5366 class surface::properties): Export classes with
5369 * graphics.cc (axes::properties::set_defaults): Use correct
5370 default values for gridlinestyle and minorgridlinestyle.
5372 2008-06-03 Jaroslav Hajek <highegg@gmail.com>
5374 * load-save.cc (Fload): Fix "-7" option.
5376 2008-06-02 David Bateman <dbateman@free.fr>
5378 * pt.cc (tree:last_break_function): Next pointer to last function
5380 * pt.h (tree:last_break_function): ditto.
5381 * debug.cc (Fdbstep): Use tree::break_function value of zero to
5382 signal to step into the next function. Set tree::last_break_function
5383 to indicate position of last breakpoint.
5384 (Fdbnext): Set tree::last_break_function to indicate position of
5386 * pt-bp.h (MAYBE_DO_BREAKPOINT): Check tree::break_function value
5387 of zero as well. Only check tree::last_line if we are in teh same
5388 function as the last breakpoint.
5389 * input.cc (char Vfilemarker): New global variable.
5390 (Ffilemarker): New function to query and set Vfilemarker.
5391 * input.h (extern char Vfilemarker): Make Vfilemarker available.
5392 * util.cc (fcn_file_in_path): If the input argument contains
5393 Vfilemarker, strip the trailing part of string from this point
5394 when looking for function file.
5395 * toplev.cc (octave_call_stack::fo_backtrace): Mark subfunctions
5396 with the name of the parent function and Vfilemarker.
5397 * symtab.cc (symbol_table::find_function (const std::string&,
5398 tree_argument_list *, const string_vector&, octave_value_list*,
5399 bool&): If function name contains Vfilemarker, check in scope of
5400 specified parent function.
5402 * DLD-FUNCTIONS/betainc.cc: Move test code here. Add test code for
5403 single precision type.
5404 * DLD-FUNCTIONS/gammainc.cc: Ditto.
5405 * DLD-FUNCTIONS/gcd.cc (Fgcd): Support single precision. Move test
5406 code here. Add test code for single precision type.
5407 * data.cc: Move test code here and add tests for single precision
5408 type. Add tests for Fislogical.
5409 (NATIVE_REDUCTION): Support the 'double' argument.
5410 * mapper.cc: Move test code here and add tests for single precision
5412 * ov-float.cc (CD_SCALAR_MAPPER): Replace Complex with
5414 (erf, erfc, abs, acos, asin, asinh, atan, atanh, ceil, cos, cosh,
5415 exp, expm1, floor, log10, log1p, sin, sinh, sqrt, tan, tanh): Use
5416 float version of base functions (ie. ::sinf and not ::sin)
5417 (lgamma, acosh, log, log2, log10, log1p): Use single precision
5419 * ov-flt-complex.cc (erf, erfc, expm1, log1p): Use the float
5420 version of base functions.
5421 * ov-flt-cx-mat.cc (DARRY_MAPPER): Replace NDArray with FloatNDArray.
5422 (erf, erdc, gamma): Use FloatNDArray::dmapper and not
5424 * ov-flt-cx-mat.h (is_double_type): Delete.
5425 (is_single_type): New method.
5426 * ov-flt-re-mat.cc (lgamma, acosh, log, log2, log10, log1p,
5427 sqrt): Use single precision infinity value.
5429 * chol.cc (Fcholinv, Fchol2inv, Fcholupdate, Fcholinsert,
5430 Fcholdelete, Fcholshift): Allow single precision arguments.
5431 (Fchol): Move test code here. Add test code for single precision.
5432 (Fcholupdate, Fcholinsert, Fcholdelete, Fcholshift): Add test code
5433 for single precision.
5434 * conv2.cc (Fconv2): Add single precision test code.
5435 * det.cc (Fdet): For single values or empty matrices, return
5436 single precision arg for single precion input. Move test code
5437 here. Add single precision test code.
5438 * fft.cc (do_fft): For empty single precision arguments return a
5439 single precision value. Add single precision test code. Remove
5441 * fft2.cc (do_fft2): For empty single precision arguments return a
5442 single precision value. Add single precision test code. Move fft2
5444 * fftn.cc (do_fftn): For empty single precision arguments return a
5445 single precision value.
5446 * eig.cc (Feig): Move test code here. Add single precision test
5448 * expm.cc (Fexpm): Ditto.
5449 * find.cc (Ffind): Ditto.
5450 * hess.cc (Fhess): Ditto.
5451 * inv.cc (Finc): Ditto.
5452 * lu.cc (Flu): Ditto.
5453 * qr.cc (Fqr): Ditto.
5454 * schur.cc (Fschur): Ditto.
5455 * svd.cc (Fsvd): Ditto.
5456 * syl.cc (Fsyl): Ditto.
5458 * op-fcm-fcm.cc, op-fcm-fcs.cc, op-fcm-fm.cc, op-fcm-fs.cc,
5459 op-fcs-fcm.cc, op-fcs-fcs.cc, op-fcs-fm.cc, op-fcs-fs.cc,
5460 op-fm-fcm.cc, op-fm-fcs.cc, op-fm-fm.cc, op-fm-fs.cc,
5461 op-fs-fcm.cc, op-fs-fcs.cc, op-fs-fm.cc, op-fs-fs.cc: Add mixed
5462 double, single precision concatenation operators.
5464 * data.cc (Fall, Fany, Fdiag, Fcat, Fismatrix, Fones, Fzeros,
5465 Finf, FNaN, FNA, Feye, Flinspace, Freshape, Ftranspose,
5466 Fctranspose, Fsort). Move tests here. Add single precision tests.
5467 * mappers.cc (Ffinite, Fisinf, Fisna, Fisnan): Ditto.
5468 * ov-float.cc (octave_float_scalar:resize): single precision
5470 * ov.cc (octave_value::octave_value (const
5471 FloatComplexDiagMatrix&)): Ditto.
5472 * data.cc (Fnorm): Add single precision.
5473 (do_cat): Disable fast return and skipping empty matrices, as they
5474 play a part in determining the return type.
5475 * ov.cc (octave_value do_cat_op (const octave_value&, const
5476 octave_value&, const Array<octave_idx_type>&)): ditto.
5478 2008-06-02 Jaroslav Hajek <highegg@gmail.com>
5480 * ov-cell.cc (Fcellstr): For compatibility with Matlab, return {''}
5483 2008-05-26 Jaroslav Hajek <highegg@gmail.com>
5485 * DLD-FUNCTIONS/fsolve.cc (fsolve_user_function,
5486 fsolve_user_jacobian): Reshape argument to original dims before
5488 (Ffsolve): Save original dimensions of the starting guess and reshape
5489 on return. Fix tests.
5491 2008-05-21 David Bateman <dbateman@free.fr>
5493 * DLD-FUNCTIONS/quad.cc (quad_float_user_function): New function.
5494 (Fquad): Handle float type.
5497 2008-05-21 Jaroslav Hajek <highegg@gmail.com>
5499 * OPERATORS/op-fcm-fcm.cc (trans_mul, mul_trans, herm_mul, mul_herm):
5501 (install_fcm_fcm_ops): Install them.
5502 * OPERATORS/op-fm-fm.cc (trans_mul, mul_trans): New functions.
5503 (install_fm_fm_ops): Install them.
5505 * OPERATORS/op-sm-m.cc (trans_mul): New function.
5506 (install_sm_m_ops): Register it.
5507 * OPERATORS/op-m-sm.cc (mul_trans): New function.
5508 (install_m_sm_ops): Register it.
5509 * OPERATORS/op-scm-cm.cc (trans_mul, herm_mul): New function.
5510 (install_scm_cm_ops): Register it.
5511 * OPERATORS/op-cm-scm.cc (mul_trans, mul_herm): New function.
5512 (install_cm_scm_ops): Register it.
5514 * dMatrix.cc: Declare DSYRK.
5515 (xgemm): Call DSYRK if symmetric case detected.
5516 * CMatrix.cc: Declare ZSYRK, ZHERK.
5517 (xgemm): Call ZSYRK/ZHERK if symmetric/hermitian case detected.
5519 * ov.h (octave_value::compound_binary_op): New enum.
5520 (do_binary_op (octave_value::compound_binary_op, ...),
5521 octave_value::binary_op_fcn_name (compound_binary_op),
5522 octave_value::do_binary_op (compound_binary_op, ...)):
5524 (OV_COMP_BINOP_FN): New macro (+ several expansions).
5525 * ov.cc (octave_value::binary_op_fcn_name (compound_binary_op),
5526 decompose_binary_op, do_binary_op (compound_binary_op, ...)):
5528 * ov-typeinfo.h (octave_value_typeinfo::register_binary_class_op
5529 (octave_value::compound_binary_op, ...),
5530 octave_value_typeinfo::register_binary_op
5531 (octave_value::compound_binary_op, ...),
5532 octave_value_typeinfo::do_register_binary_class_op
5533 (octave_value::compound_binary_op, ...),
5534 octave_value_typeinfo::do_register_binary_op
5535 (octave_value::compound_binary_op, ...),
5536 octave_value_typeinfo::do_lookup_binary_class_op
5537 (octave_value::compound_binary_op),
5538 octave_value_typeinfo::do_lookup_binary_op
5539 (octave_value::compound_binary_op, ...)):
5541 (octave_value_typeinfo::lookup_binary_class_op
5542 (octave_value::compound_binary_op),
5543 (octave_value_typeinfo::lookup_binary_op
5544 (octave_value::compound_binary_op, ...)):
5546 (octave_value_typeinfo::compound_binary_class_ops,
5547 octave_value_typeinfo::compound_binary_ops):
5549 * ov-typeinfo.cc (octave_value_typeinfo::register_binary_class_op
5550 (octave_value::compound_binary_op, ...),
5551 octave_value_typeinfo::register_binary_op
5552 (octave_value::compound_binary_op, ...),
5553 octave_value_typeinfo::do_register_binary_class_op
5554 (octave_value::compound_binary_op, ...),
5555 octave_value_typeinfo::do_register_binary_op
5556 (octave_value::compound_binary_op, ...),
5557 octave_value_typeinfo::do_lookup_binary_class_op
5558 (octave_value::compound_binary_op),
5559 octave_value_typeinfo::do_lookup_binary_op
5560 (octave_value::compound_binary_op, ...)):
5562 (octave_value::do_register_type): Resize also compound_binary_ops
5564 * pt-exp.h (tree_expression::is_unary_expression): New virtual
5566 * pt-unop.h (tree_unary_expression::is_unary_expression): New virtual
5568 * pt-cbinop.h, pt-cbinop.cc: New files (implement
5569 tree_compound_binary_expression class).
5570 * pt-all.h: Include pt-cbinop.h.
5571 * Makefile.in (PT_INCLUDES, PT_SRC): Include them in the lists.
5572 * parse.y (make_binary_op): Call maybe_compound_binary_expression.
5573 * OPERATORS/op-m-m.cc (trans_mul, mul_trans): New operator handlers.
5574 (install_m_m_ops): Register them.
5575 * OPERATORS/op-cm-cm.cc (trans_mul, mul_trans, herm_mul, mul_herm):
5576 New operator handlers.
5577 (install_cm_cm_ops): Register them.
5579 * DLD-FUNCTIONS/matrix_type.cc: Fix tests relying on the
5580 older more optimistic hermitian check.
5582 2008-05-21 David Bateman <dbateman@free.fr>
5584 * DLD-FUNCTIONS/rcond.cc (Frcond): Add support for single precision.
5586 * DLD-FUNCTIONS/sqrt.m: Replace DBL_* with FLT_* for single
5588 * data.cc (static octave_value fill_matrix (const
5589 octave_value_list&, double, float, const char *)): Add function
5590 with additional argument to allow for different valid for double
5591 and single precision.
5592 (Finf, FNaN, FNA, Frealmax, Frealmin): Use it here.
5593 (Feps): Modify behavior for a single numerical argument to give
5594 difference to next largest value in the class of the type passed.
5596 2008-05-21 John W. Eaton <jwe@octave.org>
5598 * pt-idx.h (tree_index_expression::tree_index_expression (int, int)):
5599 Delete default argument values.
5601 2008-05-20 David Bateman <dbateman@free.fr>
5603 * data.cc (Flog2): Handle single precision.
5604 * ov-float.h, ov.float.cc, ov-flt-complex.h, ov-flt-complex.cc,
5605 ov-flt-re-mat.h, ov-flt-re-mat.cc, ov-flt-cx-mat.h,
5606 ov-flt-cx-mat.cc: Provide single precision version of log2 mapper
5609 * DLD-FUNCTIONS/__convn__.cc, DLD-FUNCTIONS/__pchip_deriv__.cc,
5610 DLD-FUNCTIONS/besselj.cc, DLD-FUNCTIONS/betainc.cc,
5611 DLD-FUNCTIONS/conv2.cc, DLD-FUNCTIONS/gammainc.cc,
5612 DLD-FUNCTIONS/givens.cc, DLD-FUNCTIONS/kron.cc,
5613 DLD-FUNCTIONS/lookup.cc, DLD-FUNCTIONS/syl.cc, data.cc:
5614 Prefer demotion to single precision rather than promotion to double.
5616 * ov-float.cc, ov-float.h, ov-flt-complex.cc, ov-flt-complex.h,
5617 ov-flt-cx-mat.cc, ov-flt-cx-mat.h, ov-flt-re-mat.cc,
5618 ov-flt-re-mat.h (numeric_conversion_function (void) const):
5621 * ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h,
5622 ov-re-mat.cc, ov-re-mat.h, ov-scalar.cc, ov-scalar.h
5623 (numeric_conversion_function (void) const): Add method for
5624 conversion to single precision.
5626 * DLD-FUNCTIONS/conv2.cc (Fconv2): Don't access third arg if we
5629 * DLD-FUNCTIONS/balance.cc, DLD-FUNCTIONS/expm.cc,
5630 DLD-FUNCTIONS/find.cc, DLD-FUNCTIONS/hess.cc,
5631 DLD-FUNCTIONS/qr.cc: COnvert for use with single precision.
5633 * OPERATORS/op-int.h, OPERATORS/op-int-conv.cc,
5634 OPERATORS/op-int-concat.cc: Adapt for single precision.
5636 * OPERATORS/op-i8-i8.cc, OPERATORS/op-i16-i16.cc,
5637 OPERATORS/op-i32-i32.cc, OPERATORS/op-i64-i64.cc,
5638 OPERATORS/op-ui8-ui8.cc, OPERATORS/op-ui16-ui16.cc,
5639 OPERATORS/op-ui32-ui32.cc, OPERATORS/op-ui64-ui64.cc:
5640 Add includes for single precision types.
5642 * OPERATORS/op-b-b.cc, OPERATORS/op-b-bm.cc, OPERATORS/op-bm-b.cc,
5643 OPERATORS/op-fcm-fs.cc, OPERATORS/op-fcs-fs.cc,
5644 OPERATORS/op-fm-fs.cc, OPERATORS/op-fs-fcm.cc,
5645 OPERATORS/op-fs-fcs.cc, OPERATORS/op-fs-fm.cc,
5646 OPERATORS/op-fs-fs.cc, OPERATORS/op-int.h, ov.cc, ov-scalar.cc,
5647 ov-float.h, ov-flt-complex.cc, ov-float.cc, ov-flt-re-mat.cc,
5648 ov-flt-cx-mat.cc: Replace octave_float with octave_scalar_float
5650 * OPERATORS/op-fm-fm.cc, OPERATORS/op-fm-fs.cc,
5651 OPERATORS/op-fm-fcm.cc, OPERATORS/op-fm-fcs.cc,
5652 OPERATORS/op-fs-fm.cc, OPERATORS/op-fs-fs.cc,
5653 OPERATORS/op-fs-fcm.cc, OPERATORS/op-fs-fcs.cc,
5654 OPERATORS/op-fcm-fm.cc, OPERATORS/op-fcm-fs.cc,
5655 OPERATORS/op-fcm-fcm.cc, OPERATORS/op-fcm-fcs.cc,
5656 OPERATORS/op-fcs-fm.cc, OPERATORS/op-fcs-fs.cc,
5657 OPERATORS/op-fcs-fcm.cc, OPERATORS/op-fcs-fcs.cc,
5658 OPERATORS/op-m-m.cc, OPERATORS/op-m-s.cc,
5659 OPERATORS/op-m-cm.cc, OPERATORS/op-m-cs.cc,
5660 OPERATORS/op-s-m.cc, OPERATORS/op-s-s.cc,
5661 OPERATORS/op-s-cm.cc, OPERATORS/op-s-cs.cc,
5662 OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc,
5663 OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc,
5664 OPERATORS/op-cs-m.cc, OPERATORS/op-cs-s.cc,
5665 OPERATORS/op-cs-cm.cc, OPERATORS/op-cs-cs.cc:
5666 Add mixed single/double assign operators.
5668 * ov.h (numeric_demotion_function): New method for double to
5670 * ov-base.h (numeric_demotion_function): Declare virtual version.
5672 * ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h,
5673 ov-re-mat.cc, ov-re-mat.h, ov-scalar.cc, ov-scalar.h
5674 (numeric_cdemote_function (void) const): Add method for
5675 conversion to single precision renamed from the method
5676 numeric_conversion_function
5678 * ov.cc (do_binary_op): Use demotion function seperately than the
5679 numeric conversion function so as to avoid isses like
5680 a=zeros(2,2);a(1,:)=1:2.
5682 * OPERATORS/op-fcm-fcm.cc, OPERATORS/op-fcm-fcs.cc,
5683 OPERATORS/op-fcm-fm.cc, OPERATORS/op-fcm-fs.cc,
5684 OPERATORS/op-fcs-fcm.cc, OPERATORS/op-fcs-fcs.cc,
5685 OPERATORS/op-fcs-fm.cc, OPERATORS/op-fcs-fs.cc,
5686 OPERATORS/op-fm-fcm.cc, OPERATORS/op-fm-fcs.cc,
5687 OPERATORS/op-fm-fm.cc, OPERATORS/op-fm-fs.cc,
5688 OPERATORS/op-fs-fcm.cc, OPERATORS/op-fs-fcs.cc,
5689 OPERATORS/op-fs-fm.cc, OPERATORS/op-fs-fs.cc, ov-float.cc,
5690 ov-float.h, ov-flt-complex.cc, ov-flt-complex.h, ov-flt-cx-mat.cc,
5691 ov-flt-cx-mat.h, ov-flt-re-mat.cc, ov-flt-re-mat.h: New files.
5692 * Makefile.in (OV_INCLUDES, OV_SRC, OP_XSRC. FLOAT_OP_XSRC,
5693 DOUBLE_OP_XSRC): Add them here.
5695 * DLD-FUNCTIONS/__convn__.cc, DLD-FUNCTIONS/__lin_interpn__.cc,
5696 DLD-FUNCTIONS/__pchip_deriv__.cc, DLD-FUNCTIONS/besselj.cc,
5697 DLD-FUNCTIONS/betainc.cc, DLD-FUNCTIONS/bsxfun.cc,
5698 DLD-FUNCTIONS/chol.cc, DLD-FUNCTIONS/conv2.cc,
5699 DLD-FUNCTIONS/det.cc, DLD-FUNCTIONS/eig.cc, DLD-FUNCTIONS/fft.cc,
5700 DLD-FUNCTIONS/fft2.cc, DLD-FUNCTIONS/fftn.cc,
5701 DLD-FUNCTIONS/fftw.cc, DLD-FUNCTIONS/filter.cc,
5702 DLD-FUNCTIONS/gammainc.cc, DLD-FUNCTIONS/givens.cc,
5703 DLD-FUNCTIONS/inv.cc, DLD-FUNCTIONS/kron.cc,
5704 DLD-FUNCTIONS/lookup.cc, DLD-FUNCTIONS/lu.cc,
5705 DLD-FUNCTIONS/matrix_type.cc, DLD-FUNCTIONS/max.cc,
5706 DLD-FUNCTIONS/pinv.cc, DLD-FUNCTIONS/schur.cc,
5707 DLD-FUNCTIONS/sqrtm.cc, DLD-FUNCTIONS/svd.cc,
5708 DLD-FUNCTIONS/syl.cc, DLD-FUNCTIONS/symbfact.cc,
5709 DLD-FUNCTIONS/typecast.cc, OPERATORS/op-b-b.cc,
5710 OPERATORS/op-b-bm.cc, OPERATORS/op-bm-b.cc, OPERATORS/op-bm-bm.cc,
5711 OPERATORS/op-cm-cm.cc, OPERATORS/op-cs-cs.cc, OPERATORS/op-m-m.cc,
5712 OPERATORS/op-range.cc, OPERATORS/op-s-s.cc, bitfcns.cc, data.cc,
5713 oct-stream.cc, ov-base.cc, ov-base.h, ov-bool-mat.cc,
5714 ov-bool-mat.h, ov-bool.h, ov-ch-mat.cc, ov-ch-mat.h,
5715 ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h, ov-intx.h,
5716 ov-range.cc, ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-scalar.h,
5717 ov.cc, ov.h, pr-output.cc, pr-output.h, pt-mat.cc, utils.cc,
5718 utils.h, xdiv.cc, xdiv.h, xpow.cc, xpow.h:
5719 Allow single precision types.
5721 2008-05-20 David Bateman <dbateman@free.fr>
5723 * DLD-FUNCTIONS/rcond.cc: New function.
5724 * Makefile.in (DLD_XSRC): Add it here.
5726 * debug.cc (Fdbstop): If no line specified assume line 1.
5727 (Fdbstep, Fdbcont, Fdbnext): Move debugging functions
5729 (Fdbquit): New command to quit debugging mode and return to the
5731 (Fdbstep): Modify the dbstep command for compatibility.
5732 * input.cc (Vdebugging_current_line): Store current line being
5733 debugged for use in DEFCMD versions of debug commands.
5734 (match_sans_spaces_semi): Delete.
5735 (static void get_debug_input (const std;string&)): New function to
5736 parse input in debug mode using standard Octave parser.
5737 (static octave_value_list get_user_input (const
5738 octave_value_list&, int)): Remove debugging specialization.
5739 * input.h (Vdebugging_current_line): Store current line being
5740 debugged for use in DEFCMD versions of debug commands.
5741 * parse.y (make_return_command): Special handling in debug mode.
5742 * pt-bp.h (MAYBE_DO_BREAKPOINT): Support break in n lines needed
5743 to support "dbstep N".
5744 * pt.cc (tree::break_next): Convert to a down counter to support
5745 break in N lines. Breakpoint occure when tree::break_next is zero.
5746 * toplev.cc (octave_user_script *
5747 octave_call_stack::do_caller_user_script (difference_type) const):
5748 Support skipping the first N functions to support "dbstep out".
5749 (octave_user_function * octave_call_stack::do_caller_user_function
5750 (difference_type) const): Ditto.
5751 (octave_user_code * octave_call_stack::do_caller_user_code
5752 (difference_type) const): Ditto.
5753 * toplev.h (octave_user_script *
5754 octave_call_stack::do_caller_user_script (difference_type) const):
5755 Add difference_type argument.
5756 (octave_user_function * octave_call_stack::do_caller_user_function
5757 (difference_type) const): Ditto.
5758 (octave_user_code * octave_call_stack::do_caller_user_code
5759 (difference_type) const): Ditto.
5760 (static octave_user_script *caller_script (difference_type)):
5762 (static octave_user_function *caller_user_function
5763 (difference_type q)): Ditto.
5764 (static octave_user_code *caller_user_code (difference_type q)):
5767 2008-05-20 Kim Hansen <kimhanse@gmail.com>
5769 * load-path.cc (load_path::do_initialize):
5770 Include separator when appending sys_path.
5772 2008-05-20 Bill Denney <bill@denney.ws>
5774 * file-io.cc (Ffgets, Fgets, Ffputs, Ffscanf): Doc fix (seealso).
5776 2008-05-20 Thomas Weber <thomas.weber.mail@gmail.com>
5778 * DLD-FUNCTIONS/rand.cc (Frandn): Doc fix.
5780 2008-05-20 David Bateman <dbateman@free.fr>
5782 * load-save.cc (do_load): Treat non verbose list_only output in
5783 the same manner as Fwho.
5784 * symtab.h (static void clear_variable_regexp (const
5785 std::string&): New method.
5786 (static std::list<symbol_record> regexp (const std::string&)): Ditto.
5787 (static std::list<symbol_record> regexp_variables (const
5788 std::string&)): Ditto.
5789 (static std::list<symbol_record> regexp_global_variables (const
5790 std::string&)): Ditto,
5791 (static std::list<symbol_record> regexp_variables (const
5792 string_vector&)): Ditto.
5793 (void do_clear_variable_regexp (const std::string&)): Ditto.
5794 (std::list<symbol_record> do_regexp (const std::string&, bool)
5796 (do_who): Accept the "-regexp" option. Use regexp versions of
5797 symbol table functions.
5798 (static inline bool name_match_any_pattern (const string_vector&,
5799 int, int, bool): Add regexp argument, and use regexp matching if
5801 (do_clear_variables): Add regexp option and pass to
5802 name_match_any_pattern.
5803 (Fclear): Accept the -regexp option.
5805 2008-05-07 John W. Eaton <jwe@octave.org>
5807 * pt-arg-list.cc, pt-arg-list.h (tree_argument_list::dup):
5809 * pt-assign.cc, pt-assign.h (tree_simple_assignment::dup,
5810 tree_multi_assignment::dup): Likewise.
5811 * pt-binop.cc, pt-binop.h (tree_binary_expression::dup,
5812 tree_boolean_expression::dup): Likewise.
5813 * pt-cell.cc, pt-cell.h (tree_cell::dup): Likewise.
5814 * pt-cmd.cc, pt-cmd.h (tree_no_op_command::dup,
5815 tree_function_def::dup): Likewise.
5816 * pt-colon.cc, pt-colon.h (tree_colon_expression::dup): Likewise.
5817 * pt-const.cc, pt-const.h (tree_constant::dup): Likewise.
5818 * pt-decl.cc, pt-decl.h (tree_decl_elt::dup, tree_decl_init_list::dup,
5819 tree_global_command::dup, tree_static_command::dup): Likewise.
5820 * pt-except.cc, pt-except.h (tree_try_catch_command::dup,
5821 tree_unwind_protect_command::dup): Likewise.
5822 * pt-exp.h (tree_expression:dup): Likewise.
5823 * pt-fcn-handle.cc, pt-exp.h (tree_expression:dup): Likewise.
5824 * pt-fcn-handle.h (tree_fcn_handle::dup,
5825 tree_anon_fcn_handle::dup): Likewise.
5826 * pt-id.cc, pt-id.h (tree_identifier::dup): Likewise.
5827 * pt-idx.cc, pt-idx.h (tree_index_expression::dup): Likewise.
5828 * pt-jump.cc, pt-jump.h (tree_break_command::dup,
5829 tree_continue_command::dup, tree_return_command::dup): Likewise.
5830 * pt-loop.cc, pt-loop.h (tree_while_command::dup,
5831 tree_do_until_command::dup, tree_simple_for_command::dup,
5832 tree_complex_for_command::dup): Likewise.
5833 * pt-mat.cc, pt-mat.h (tree_matrix::dup): Likewise.
5834 * pt-misc.cc, pt-misc.h (tree_parameter_list::dup,
5835 tree_return_list::dup): Likewise.
5836 * pt-select.cc, pt-select.h (tree_if_clause::dup,
5837 tree_if_command_list::dup, tree_if_command::dup,
5838 tree_switch_case::dup, tree_switch_case_list::dup,
5839 tree_switch_command::dup, tree_statement::dup,
5840 tree_statement_list::dup, tree_prefix_expression::dup,
5841 tree_postfix_expression::dup): Likewise.
5843 * ov-fcn-handle.cc (octave_fcn_handle::save_ascii,
5844 octave_fcn_handle::save_binary, octave_fcn_handle::save_hdf5):
5845 Pass context to symbol_table::all_variables.
5846 * load-save.cc (dump_octave_core): Likewise.
5847 * ov-fcn-handle.cc (Ffunctions): Don't skip anonymous functions
5848 with the name set to the text of the function body.
5849 Pass context to symbol_table::all_variables and
5850 symbol_table::symbol_record::varval.
5852 * symtab.h (symbol_table::varref, symbol_table::do_varref,
5853 symbol_table::varval, symbol_table::do_varval,
5854 symbol_table::all_variables, symbol_table::do_all_variables,
5855 symbol_table::symbol_record::varref,
5856 symbol_table::symbol_record::varval,
5857 symbol_table::symbol_record::is_defined,
5858 symbol_table::symbol_record::is_variable,
5859 symbol_table::symbol_record::symbol_record_rep::varref,
5860 symbol_table::symbol_record::symbol_record_rep::varval,
5861 symbol_table::symbol_record::symbol_record_rep::is_defined,
5862 symbol_table::symbol_record::symbol_record_rep::is_variable,
5864 * symtab.h (symbol_table::do_inherit): New arg, donor_context.
5865 Look for value in donor_contxt. Set value in base context.
5866 * symtab.cc (symbol_table::symbol_record::symbol_record_rep::dump):
5867 Pass xcurrent_context to varval.
5869 2008-05-06 David Bateman <dbateman@free.fr>
5871 * ov-fcn-inline.cc (Finline): Also ignore NaN, Inf, pi, NA and eps.
5873 * bitfcns.cc (BITOP): Treat octave_bool types and octave_scalar.
5875 2008-05-06 John W. Eaton <jwe@octave.org>
5877 * symtab.h (symbol_table::scope_id_cache): New class. Use it to
5878 replace scope_ids_in_use and scope_ids_free_list.
5879 (symbol_table::erase_scope): Call free_scope.
5880 (symbol_table::free_scope): Call scope_id_cache::free.
5882 * ov-fcn.h (octave_function::lock_subfunctions,
5883 octave_function::unlock_subfunctions): New virtual functions.
5884 (octave_function::lock_subfunctions): Call lock_subfunctions here.
5885 (octave_function::unlock_subfunctions): Call unlock_subfunctions here.
5886 * ov-usr-fcn.h (octave_user_function::lock_subfunctions,
5887 octave_user_function::unlock_subfunctions): New functions.
5889 * symtab.h (symbol_table::lock_subfunctions,
5890 symbol_table::lock_subfunctions,
5891 symbol_table::fcn_info::lock_subfunction,
5892 symbol_table::fcn_info::unlock_subfunction,
5893 symbol_table::fcn_info::fcn_info_rep::lock_subfunction,
5894 symbol_table::fcn_info::fcn_info_rep::unlock_subfunction):
5897 * symtab.h (symbol_table::set_scope, symbol_table::get_instance):
5898 Don't set instance unless allocation succeeds.
5899 (symbol_table::print_scope, symbol_table::do_print_scope): Delete.
5900 (symbol_table::free_scope): Avoid using invalid iterator.
5901 (symbol_table::erase_scope): Call free_scope here.
5903 * ov-fcn-handle.cc (octave_fcn_handle::load_ascii,
5904 octave_fcn_handle::load_binary, octave_fcn_handle::load_hdf5):
5905 Cache anonymous name here.
5906 (octave_fcn_handle::octave_fcn_handle): Move here from
5907 ov-fcn-handle.h. Cache name if function is user-defined.
5909 * pt-id.cc (tree_identifier::dup): Avoid shadow warning.
5911 * symtab.h (symbol_table::cache_name, symbol_table::do_cache_name):
5913 (symbol_table::get_instance): Cache top-level name here.
5914 * parse.y (finish_function): Call symbol_table::cache_name here.
5916 * symtab.cc (F__dump_symtab_info__): New function.
5918 * symtab.cc (symbol_table::dump, symbol_table::dump_global,
5919 symbol_table::dump_functions, symbol_table::do_dump,
5920 symbol_table::symbol_record::symbol_record_rep::dump,
5921 symobl_table::fcn_info::fcn_info_rep::dump): New functions.
5922 * symtab.h: Provide decls.
5923 (symtab::scopes, symbol_table::symbol_record::dump,
5924 symbol_table::fcn_info::dump): New functions.
5925 (symtab::get_instance): New arg, create; if false throw error if
5926 instance for given scope is not found.
5928 * ov-base.cc (octave_base_value::dump): New virtual function.
5929 * ov-base.h: Proivde decl.
5930 * ov.h (octave_value::dump): New function.
5932 * ov.h, ov.c (octave_value::function_value): New const version.
5933 * ov-base.h, ov-base.cc (octave_base_value::function_value): Likewise.
5934 * ov-builtin.h (octave_builtin::function_value): Likewise.
5935 * ov-fcn-handle.h (octave_fcn_handle::function_value): Likewise.
5936 * ov-mex-fcn.h (octave_mex_function::function_value): Likewise.
5937 * ov-usr-fcn.h (octave_user_script::function_value,
5938 octave_user_function): Likewise.
5940 * symtab.h, symtab.cc: Use consistent naming scheme for iterator
5941 typedefs. Change all uses.
5943 * variables.cc (F__print_symtab_info__, F__print_symbol_info__):
5946 * ov-cell.cc (Fstruct2cell): Handle structure arrays properly.
5948 2008-05-05 David Bateman <dbateman@free.fr>
5950 * sysdep.cc (Fputenv): Allow single arg. Alias to setenv.
5952 2008-05-05 John W. Eaton <jwe@octave.org>
5954 * input.cc (Fre_read_readline_init_file): New function.
5956 2008-05-04 John W. Eaton <jwe@octave.org>
5958 * ov-fcn-handle.cc (Ffunctions): Pass octave_value object instead
5959 of Cell in structure field assignment.
5961 * parse.y (frob_function): Don't install subfunctions here.
5962 (finish_function): Handle subfunctions here.
5963 Conditionally define tree_function_def object here.
5965 * symtab.h (symbol_table::fcn_info::fcn_info_rep::find_function):
5966 Initialize args_evaluated.
5967 * pt-id.cc (tree_identifier::rvalue): Likewise.
5968 * variables.cc (symbol_exist): Likewise.
5970 * pt-id.h (tree_identifier::tree_identifer): Delete useless statement.
5972 * variables.cc (get_global_value): Use symbol_table::global_varval
5973 instead of passing scope to symbol_table::varval.
5974 (set_global_value): Use symbol_table::global_varref
5975 instead of passing scope to symbol_table::varref.
5976 (do_who): Use symbol_table::glob_global_variables
5977 instead of passing scope to symbol_table::glob_variables.
5979 Use symbol_table::global_variable_names and
5980 symbol_table::clear_global instead of passing scope to
5981 symbol_table::clear_variables.
5982 Use symbol_table::global_variable_names instead of passing scope
5983 to symbol_table::variable_names.
5985 * unwind-prot.cc (unwind_protect::save_size_t): New function.
5986 (saved_variable::restore_value): Handle size_t values.
5987 (saved_variable::saved_variable): New size_t constructor.
5988 (saved_variable::size_type): New var_type enum value.
5989 (saved_variable::ptr_to_size_t, saved_variable::size_t_value):
5991 * unwind-prot.h (unwind_protect::save_size_t): Provide decl
5992 (unwind_protect_size_t): New macro.
5994 * toplev.cc (octave_call_stack::do_goto_frame,
5995 octave_call_stack::do_goto_frame_relative): New functions.
5996 (octave_call_stack::do_backtrace): Also return scope and context ids.
5997 * toplev.h (octave_call_stack::do_goto_frame,
5998 octave_call_stack::do_goto_frame_relative): Provide decls.
5999 (octave_call_stack::curr_frame): New data member.
6000 (octave_call_stack::octave_call_stack): Initialize it.
6001 (octave_call_stack::call_stack_elt::scope,
6002 (octave_call_stack::call_stack_elt::context): New data members.,
6003 (octave_call_stack::current_frame,
6004 (octave_call_stack::do_current_frame
6005 octave_call_stack::do_goto_frame,
6006 octave_call_stack::do_goto_frame_relative): New functions.
6007 (octave_call_stack::push, octave_call_stack::do_push):
6008 New args, scope and context.
6009 (octave_call_stack::do_push, octave_call_stack::do_pop): Update
6010 curr_frame if debugging.
6012 * symtab.cc (symbol_table::global_table): New map for global values.
6013 (symbol_table::xcurrent_context): New variable for context info.
6014 * symtab.h: Provide decls.
6015 (symbol_table::global_varref, symbol_table::global_varval,
6016 symbol_table::current_context,
6017 symbol_table::set_scope_and_context,
6018 symbol_table::glob_global_variables,
6019 symbol_table::global_variable_names,
6020 symbol_table::top_leve_variable_names):
6022 (symbol_table::context_id, const_global_table_iterator,
6023 global_table_iterator): New typedefs.
6024 (symbol_table::xcurrent_context_this_table): New variable.
6025 (symbol_table::symbol_table): Initialize it.
6026 (symbol_table::set_scope): Use it.
6027 (symbol_table::symbol_record::find, symbol_table::do_find):
6028 Use symbol_table::global_varref instead of passing scope to
6029 symbol_table::varref.
6030 (symbol_table::symbol_record::symbol_record_rep::value_stack):
6031 Now a std::deque instead of a std::stack.
6032 (symbol_table::symbol_record::symbol_record_rep::push_context,
6033 symbol_table::symbol_record::symbol_record_rep::pop_context):
6034 Don't push or pop persistent of global variables.
6035 (symbol_table::symbol_record::symbol_record_rep::varval,
6036 Handle context here. Call symbol_table::global_varval instead of
6037 passing scope to symbol_table::varval.
6038 (symbol_table::symbol_record::symbol_record_rep::varref):
6039 Handle context here. Call symbol_table::global_varref instead of
6040 passing scope to symbol_table::varref.
6041 (symbol_table::symbol_record::varref,
6042 symbol_table::symbol_record::varval): No need to handle global
6043 values specially here.
6044 (symbol_table::symbol_record::push_context
6045 symbol_table::symbol_record::pop_context: No need to handle global
6046 or persistent values specially here.
6047 (symbol_table::get_instance): Don't return global scope.
6048 (symbol_table::do_push_context, symbol_table::do_pop_context):
6049 Increment/decrement xcurrent_context.
6050 (symbol_table::do_clear_global, symbol_table::do_clear_global_pattern):
6051 Use global_table instead of separate scope.
6053 * symtab.h, symtab.cc (symbol_table::fcn_info::fcn_info_rep::find,
6054 symbol_table::fcn_info::fcn_info_rep::find_function,
6055 symbol_table::fcn_info::find, symbol_table::fcn_info::find_function,
6056 symbol_table::find, symbol_table::find_function,
6057 symbol_table::do_find, symbol_table::insert, symbol_table::varref,
6058 symbol_table::varval, symbol_table::persistent_varref,
6059 symbol_table::persistent_varval, symbol_table::erase_persistent,
6060 symbol_table::is_variable, symbol_table::clear,
6061 symbol_table::clear_variables, symbol_table::clear_global,
6062 symbol_table::clear_variable, symbol_table::clear_global_pattern,
6063 symbol_table::clear_variable_pattern, symbol_table::push_context,
6064 symbol_table::pop_context, symbol_table::mark_hidden,
6065 symbol_table::mark_global, symbol_table::glob,
6066 symbol_table::glob_variables, symbol_table::variable_names,
6067 symbol_table::is_local_variable, symbol_table::is_global):
6068 Eliminate scope arg. Change all uses.
6069 (symbol_table::erase_scope, symbol_table::dup_scope):
6072 * pt-stmt.cc (tree_statement::eval): Don't update statement info
6073 in octave_call_stack if debugging.
6075 * pt-id.h (tree_identifier::xsym): New function.
6076 (tree_identifier::rvalue, tree_identifier::lvalue,
6077 tree_identifier::dup, tree_identifier::is_defined,
6078 tree_identifier::is_variable, tree_identifier::mark_global,
6079 tree_identifier::mark_as_static, tree_identifier::do_lookup,
6080 tree_identifier::mark_as_formal_parameter):
6081 Use xsym to access symbol.
6082 (tree_identifier::scope): New data member.
6083 (tree_identifier::tree_identifier): Initialize it.
6085 * ov-usr-fcn.cc (octave_user_script::octave_user_script,
6086 octave_user_function::octave_user_function):
6087 Initialize call_depth to -1.
6088 (octave_user_script::do_multi_index_op): Fix comparison of
6089 call_depth with Vmax_recursion_depth.
6090 (octave_user_function::do_multi_index_op):
6091 Compare call depth > 0, instead of > 1.
6092 * ov-usr-fcn.h (octave_user_function::save_args_passed):
6093 Compare call depth > 0, instead of > 1.
6095 * input.cc (Vdebugging): New variable.
6096 (get_user_input): Eliminate DEBUG argument. Use global Vdebugging
6097 variable instead. Change all callers.
6098 (saved_frame): New static variable.
6099 (restore_frame): New function.
6100 (do_keyboard): Unwind-protect Vdebugging here and set it to TRUE.
6101 Save current frame. Use unwind_protect to restore it.
6102 (Fkeyboard): Save current frame. Use unwind_protect to restore it.
6103 Move up the call stack one frame before calling do_keyboard.
6104 * input.h (Vdebugging): Provide decl.
6106 * mex.cc (mexGetVariable): Handle global vars with get_global_value.
6107 (mexPutVariable): Likewise, with set_global_value.
6109 * octave.cc (intern_argv): Assert that we are at the top level.
6110 Don't pass scope to symbol_table::varref or symbol_table::mark_hidden.
6112 * load-save.cc (install_loaded_variable): Use
6113 symbol_table::global_varref instead of passing global scope to
6114 symbol_table::varref.
6116 * help.cc (make_name_list): Call symbol_table::global_variable_names
6117 and symbol_table::top_level_variable_names instead of passing
6118 scope to symbol_table::variable_names.
6120 * debug.cc (do_dbupdown, Fdbup, Fdbdown): New functions.
6121 (current_stack_frame): Delete static variable.
6122 (Fdbstack): Rename from F__dbstack__. Implement all of dbstack
6123 here instead of partially in dbstack.m.
6125 2008-05-03 John W. Eaton <jwe@octave.org>
6127 * pt-arg-list.cc (F__end__): If there are more dimensions than
6128 indices, smash extra dimensions first.
6129 (num_indices): New static variable.
6130 (tree_argument_list::convert_to_const_vector): Save and set it.
6132 * parse.y (parse_fcn_file): Also temporarily set parser_end_of_input
6133 and get_input_from_eval_string to false while reading script files.
6135 2008-05-01 John W. Eaton <jwe@octave.org>
6137 * parse.y (load_fcn_from_file): Expect
6138 * dynamic-ld.cc (octave_dynamic_loader::do_load_oct):
6139 Search currently loaded .oct files by file name. Don't search
6140 currently loaded files for functions.
6141 (octave_shlib_list::find_file, octave_shlib_list::do_find_file):
6143 (octave_shlib_list::search, octave_shlib_list::do_search): Delete.
6145 * dynamic-ld.cc (octave_dynamic_loader::do_load_oct): No need to
6146 do load_path lookups here.
6147 (octave_shlib_list::iterator, octave_shlib_list::const_iterator):
6149 (octave_shlib_list::do_remove, octave_shlib_list::do_search,
6150 octave_shlib_list::do_display): Use them.
6151 (octave_mex_file_list::iterator, octave_mex_file_list::const_iterator):
6153 (octave_mex_file_list::do_remove): Use them.
6155 2008-05-03 Rafael Laboissiere <rafael@debian.org>
6157 * DLD-FUNCTIONS/time.cc, file_io.cc: Use ischar instead of
6160 2008-04-30 John W. Eaton <jwe@octave.org>
6162 * dynamic-ld.cc (octave_dynamic_loader::do_load_oct):
6163 If function already exists, reload it anyway. Clear existing
6164 oct_file only if reloading a function from the same file.
6165 (octave_shlib_list::display): New static function.
6166 (octave_shlib_list::do_display): New function.
6168 * symtab.cc (out_of_date_check_internal): Better handling for
6169 functions found in files by relative file names.
6170 (load_out_of_date_fcn): New function.
6172 * ls-oct-ascii.cc (extract_keyword): Return early if first char is
6173 not a comment character.
6174 (read_ascii_data): Accept .nargin. and .nargout. as valid identifiers.
6176 * ov-fcn-handle.cc: Combine tests. Test saving and loading
6177 handles for built-in, .oct, and .m functions.
6178 (octave_fcn_handle::save_ascii, octave_fcn_handle::save_binary,
6179 octave_fcn_handle::save_hdf5, octave_fcn_handle::print):
6180 Avoid dereferencing invalid pointer.
6182 * data.cc: Fix tests. Use "%!assert", not "%! assert" for
6183 individual assert tests.
6185 2008-04-30 Jaroslav Hajek <highegg@gmail.com>
6187 * ov-base.cc, ov-base.h, ov-bool-mat.h, ov-bool-sparse.h,
6188 ov-bool.h, ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h,
6189 ov-cx-sparse.cc, ov-cx-sparse.h, ov-intx.h, ov-range.h,
6190 ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h,
6191 ov-scalar.cc, ov-scalar.h, ov.h:
6192 Provide log2 mapper function.
6193 * data.cc (Flog2): New function.
6195 2008-04-25 John W. Eaton <jwe@octave.org>
6197 * pt-stmt.h (tree_statement_list::function_body): New data member.
6198 (tree_statement_list::tree_statement_list): Initialize it.
6199 (tree_statement_list::mark_as_script_body): New function.
6200 (tree_statement::maybe_echo_code, tree_statement::eval):
6201 Rename in_function_body argument to in_function_or_script_body.
6202 * pt-stmt.cc (tree_statement::eval): Only set statement in call
6203 stack if in_function_or_script_body is true.
6205 * pt-stmt.cc (tree_statement_list::eval): Call elt->eval with
6206 function_body || script_body.
6207 * ov-usr-fcn.cc (octave_user_script::octave_user_script):
6208 command list as script body here.
6209 (octave_user_function::octave_user_function):
6210 Mark command list as function body here.
6211 * parse.y (start_function, make_anon_fcn_handle): Not here.
6213 * toplev.h, toplev.cc (octave_call_stack::backtrace,
6214 octave_call_stack::do_backtrace): New arg, N. Skip innermost N
6217 * debug.cc (F__dbstack__): New function.
6218 (current_stack_frame): New static variable.
6220 * error.cc (verror, pr_where): Use octave_call_stack instead of
6221 tree_statement stack to get line and column information.
6222 (pr_where): Use octave_call_stack instead of tree_statement stack
6223 to get current statement.
6224 * input.cc (get_user_input): Extract current line number from
6225 octave_call_stack instead of tree_statement_stack.
6226 * pt-stmt.cc (tree_statement::eval): Put current statement on
6227 octave_call_stack instead of tree_statement_stack.
6228 * pt-stmt.h, pt-stmt.cc (class tree_statement_stack): Delete.
6230 * toplev.h, toplev.cc (octave_call_stack::call_stack_elt):
6232 (octave_call_stack::cs): Now a deque of call_stack_elts.
6234 (octave_call_stack::current_statement,
6235 octave_call_stack::current_line,
6236 octave_call_stack::current_column,
6237 octave_call_stack::top_statement,
6238 octave_call_stack::set_statement, octave_call_stack::backtrace):
6239 New static functions.
6240 (octave_call_stack::do_current_line,
6241 octave_call_stack::do_current_column,
6242 octave_call_stack::do_top_statement,
6243 octave_call_stack::do_set_statement,
6244 octave_call_stack::do_backtrace): New member functions.
6246 2008-04-24 John W. Eaton <jwe@octave.org>
6248 * toplev.h, toplev.cc (octave_call_stack::unwind_pop_script):
6249 Delete unused function.
6251 * ov-usr-fcn.cc: Move constructor definitions here, from ov-usr-fcn.h.
6252 * ov-usr-fcn.h (octave_user_script::octave_user_script):
6253 Also Initialize t_parsed and t_checked.
6255 2008-04-24 Jaroslav Hajek <highegg@gmail.com>
6257 * ov-usr-fcn.h (octave_user_script::octave_user_script):
6258 Initialize call_depth.
6260 2008-04-24 John W. Eaton <jwe@octave.org>
6262 * file-io.cc (do_stream_open): Return -1 for directories.
6264 2008-04-23 John W. Eaton <jwe@octave.org>
6266 * DLD-FUNCTIONS/__qp__.cc (qp): Avoid bounds error when removing
6267 constraint from active set.
6269 * lex.l (text_yyinput): New function. Use it in place of yyinput.
6270 (next_token_is_sep_op, scan_for_comments, eat_whitespace,
6271 have_continuation): No need to check for CR or CRLF.
6272 * parse.y (text_getc): Also return NL for single CR.
6274 2008-04-32 Michael Goffioul <michael.goffioul@gmail.com>
6276 * input.cc (get_input_from_file): Open file in binary mode.
6278 2008-04-20 John W. Eaton <jwe@octave.org>
6280 * oct-stream.cc (octave_stream::read): Allow single data type
6281 specification but return double.
6283 2008-04-18 John W. Eaton <jwe@octave.org>
6285 * lex.l, lex.h (process_comment): New arg, start_in_block. Call
6286 grab_block_comment if start_in_block is true. Change all uses.
6287 * lex.l (grab_block_comment): New function.
6288 (grab_comment_block): New arg, at_bol. Change all uses.
6289 Call grab_block_comment if we find the start of a block comment.
6290 (block_comment_nesting_level): New static variable.
6291 (^{S}*{CCHAR}\{{S}*{NL}): New rule.
6292 (<<EOF>>): Warn about open block comments.
6293 (reset_parser): Set block_comment_nesting_level to zero.
6294 * parse.y (parse_fcn_file): Stash help text from
6295 gobble_leading_white_space after calling reset_parser.
6296 (text_getc): Keep track of input_line_number here.
6297 (skip_white_sapce): Don't increment input_line_number here.
6298 * lex.l (grab_comment_block): Or here.
6300 * lex.l (Vdisplay_tokens): New static variable.
6301 (F__display_tokens__): New function.
6302 (display_token): New function.
6303 (DISPLAY_TOK_AND_RETURN): New macro.
6304 (COUNT_TOK_AND_RETURN): Use DISPLAY_TOK_AND_RETURN.
6305 (<COMMAND_START>[\"\'], "'", \"): Move handle_string outside of
6306 COUNT_TOK_AND_RETURN macro parameter list.
6307 (handle_identifier): Don't use macros to return token values here.
6308 (<MATRIX_START>{S}*{COMMENT}{SNLCMT}*|<MATRIX_START>{S}*{NL}{SNLCMT}*):
6309 Recognize block comments here.
6311 * pr-output.cc (Fdisp): If nargout > 0, produce an sq-string
6312 unless arg is a dq-string.
6314 2008-04-17 John W. Eaton <jwe@octave.org>
6316 * parse.y (looks_like_copyright): Handle leading whitespace.
6317 (class stdio_stream_reader): New class.
6318 (skip_white_space): New function.
6319 (gobble_leading_white_space): New arg, EOF. Change all uses.
6320 Use skip_white_space and grab_comment_block to process comments.
6321 (process_leading_comments): Delete.
6322 (parse_fcn_file): Call gobble_leading_white_space instead of
6323 process_leading_comments.
6324 Skip parsing if gobble_leading_white_space detects EOF.
6325 * lex.l (process_comment): Delete CCHAR arg. Change all uses.
6326 ({CCHAR}): Unput comment character before calling process_comment.
6327 (grab_comment_block): Rename from grab_help_text. Don't discard
6328 spaces from comment text. Update input_line_number and
6329 current_input_column as characters are read. Warn only once about
6330 incompatible comment characters in a given block of comments.
6331 Use stream_reader class instead of accessing yyinput and yyunput
6333 (class flex_stream_reader): New class.
6334 (process_comment): Use grab_comment_block to handle all comments.
6335 Don't call maybe_gripe_matlab_incompatible_comment.
6336 Always store comment text returned by grab_comment_block.
6337 * lex.h (grab_comment_block): Provide decl.
6338 (class stream_reader): New class.
6340 2008-04-16 John W. Eaton <jwe@octave.org>
6342 * parse.y (Fautoload, Fmfilename): Call
6343 octave_call_stack::caller_user_code, not
6344 octave_call_stack::caller_user_script_or_function.
6345 * toplev.cc, toplev.h (octave_call_stack::caller_user_code):
6346 Rename from octave_call_stack::caller_user_script_or_function.
6347 (octave_call_stack::do_caller_user_code): Rename from
6348 octave_call_stack::do_caller_user_script_or_function.
6349 * ov-usr-fcn.h (class octave_user_code): New class, derived from
6351 (class octave_user_function, class octave_user_script): Derive
6352 from octave_user_code, not octave_function.
6353 (octave_user_script::user_code_value,
6354 octave_user_function::user_code_value): New functions.
6355 * ov.cc (octave_value::user_script_value,
6356 octave_value::user_code_value): New functions.
6357 * ov.h: Provide decls.
6358 (octave_value::is_user_code, octave_value::is_user_script):
6360 * ov-base.cc (octave_base_value::user_script_value,
6361 octave_base_value::user_code_value): New virutal functions.
6362 * ov-base.h: Provide decls.
6363 (octave_base_value::is_user_script, octave_base_value::is_user_code):
6364 New virtual functions.
6365 * error.cc (verror, pr_where, error_2, warning_1):
6366 Call octave_call_stack::caller_user_code instead of
6367 octave_call_stack::caller_user_script_or_function
6368 * input.cc (get_user_input): Likewise.
6369 * debug.h (bp_table::breakpoint_map): Use pointer to
6370 octave_user_code instead of octave_user_function.
6371 * debug.cc (get_user_code): Rename from get_user_function.
6372 Return pointer to octave_user_code instead of octave_user_function.
6374 (bp_table::do_add_breakpoint, bp_table::do_remove_breakpoint,
6375 bp_table::do_remove_all_breakpoints_in_file,
6376 bp_table::do_get_breakpoint_list):
6377 Avoid dereferencing invalid pointers.
6378 (parse_dbfunction_params): Call
6379 octave_call_stack::caller_user_code, not
6380 octave_call_stack::caller_user_script_or_function.
6382 * load-save.cc (Fsave): Fix continuation character in doc string.
6384 * pt-walk.h (tree_walker::visit_function_def): New function.
6385 * pt-pr-code.cc (tree_print_code::visit_function_def): New function.
6386 * pt-pr-code.h: Provide decl.
6387 * pt-bp.cc (tree_breakpoint::visit_function_def): New function.
6388 * pt-bp.h: Provide decl.
6389 * pt-check.cc (tree_checker::visit_function_def): New function.
6390 * pt-check.h: Provide decl.
6392 * parse.y (finish_function): Return ptr to tree_function_def object
6393 if curr_fcn_ptr is not defined. Avoid dereferencing invalid pointers.
6394 (frob_function): Set curr_fcn_ptr only when reading a function file.
6395 (function): Call finish function in both cases to generate value
6398 * pt-cmd.h, pt-cmd.cc (tree_function_def): New class.
6400 * parse.y (parse_and_execute): Delete.
6401 * parse.h: Delete decl.
6403 * pt-pb.cc (tree_breakpoint::visit_octave_user_script): New function.
6404 * pt-pb.h: Provide decl.
6405 * pt-check.cc (tree_checker::visit_octave_user_script): New function.
6406 * pt-check.h: Provide decl.
6407 * pt-pr-code.cc (tree_print_code::visit_octave_user_script):
6409 * pt-pr-code.h: Provide decl.
6410 * pt-walk.h (visit_octave_user_script): New pure virtual function.
6412 * parse.y (make_script, process_leading_comments,
6413 looking_at_function_keyword): New static functions.
6414 (SCRIPT): New token.
6415 (script): New non-terminal.
6416 (command): Handle script here.
6417 (parse_fcn_file): Eliminate EXEC_SCRIPT argument. Change all
6418 callers. Parse scripts and return an octave_user_script rather
6419 than executing them here.
6420 (load_fcn_from_file): Handle script and function files the same.
6421 (source_file): Call d_multi_index_op on object returned by
6423 (is_function_file): Delete.
6424 (gobble_leading_white_space): Don't recurse. Simplify. Eliminate
6425 SKIP_CODE, IN_PARTS, and SAVE_COPYRIGHT arguments. Change all
6427 (octave_function_ptr): Delete unused typedef.
6428 (get_help_from_file): If help text isn't found by
6429 gobble_leading_whitespace, parse file to find it.
6431 * lex.l (SCRIPT_FILE_BEGIN): New exclusive start state.
6432 (prep_lexer_for_script): New function.
6433 (grab_help_text): New arg, EOF.
6434 (process_comment): New function.
6436 * lex.h (prep_lexer_for_script): Provide decl.
6438 * lex.h, lex.cc, parse.y (lexical_feedback::beginning_of_function):
6439 Delete data member and all uses.
6441 * ov-usr-fcn.cc (octave_user_script::~octave_user_script):
6442 Move destructor here from ov-usr-fcn.h. Delete cmd_list.
6443 (octave_user_script::subsref, octave_user_script::accept,
6444 octave_user_script::traceback_error): New functions.
6445 (octave_user_script::do_multi_index_op):
6446 Execute cmd_list instead of calling source_file.
6447 * ov-usr-fcn.h (octave_usr_script::cmd_list,
6448 octave_usr_script::t_parsed, octave_usr_script::t_checked,
6449 octave_usr_script::call_depth): New data members.
6450 (octave_usr_script::octave_usr_script): Initialize all data members.
6451 (octave_usr_script::octave_usr_script (const std::string&, const
6452 std::string&, tree_statement_list *, const std::string&)):
6454 (octave_usr_script::function_value,
6455 octave_usr_script::user_script_value, mark_fcn_file_up_to_date,
6456 octave_usr_script::stash_fcn_file_time,
6457 octave_usr_script::time_parsed, octave_usr_script::time_checked,
6458 octave_usr_script::subsref, octave_usr_script::body): New functions.
6459 (octave_user_script::subsref, octave_user_script::accept,
6460 octave_user_script::traceback_error): Provide decls.
6462 2008-04-14 Jaroslav Hajek <highegg@gmail.com>
6464 * oct-stream.cc (octave_scan_1): Ensure digit following X is hex
6465 digit before reading number as hex.
6467 2008-04-14 John W. Eaton <jwe@octave.org>
6469 * file-io.cc (Ffread): Allow SKIP arg to be omitted.
6470 (Ffwrite): Likewise. Handle args in a way consistent with Ffread.
6472 2008-04-09 Michael Goffioul <michael.goffioul@gmail.com>
6474 * DLD-FUNCTIONS/dispatch.cc: Replace system("echo '...'>...") calls
6475 with real file writing.
6477 2008-04-07 Jaroslav Hajek <highegg@gmail.com>
6479 * DLD-FUNCTIONS/qr.cc (Fqrshift): New function.
6480 * DLD-FUNCTIONS/chol.cc (Fcholinsert, Fcholdelete, Fcholshift):
6483 2008-04-04 John W. Eaton <jwe@octave.org>
6485 * parse.y (make_constant): Handle escape sequences in dq-strings.
6487 2008-04-03 John W. Eaton <jwe@octave.org>
6489 * parse.y (make_constant): Also stash original text for strings.
6491 * ov-fcn-handle.cc (octave_fcn_handle::subsref):
6492 Don't call next_subsref here.
6494 2008-04-01 John W. Eaton <jwe@octave.org>
6496 * pt-id.h (do_lookup (bool&, bool)): Delete.
6497 (do_lookup (tree_argument_list *, const string_vector&,
6498 octave_value_list&, bool&)): Call MAYBE_DO_BREAKPOINT here.
6500 2008-04-02 David Bateman <dbateman@free.fr>
6502 * graphics.cc (void gnuplot_backend::close_figure (const
6503 octave_value&) const): Allow for an input and output stream.
6505 2008-03-28 Jaroslav Hajek <highegg@gmail.com>
6507 * DLD-FUNCTIONS/lookup.cc: New file.
6508 * Makefile.in (DLD_XSRC): Add it to the list.
6510 2008-03-28 David Bateman <dbateman@free.fr>
6512 * ov-complex.cc (SCALAR_MAPPER, CD_SCALAR_MAPPER): New macro for
6513 complex values with zero imaginary part.
6514 (erf, erfc, gamma, lgamma): Use the new mappers to define these
6516 * ov-complex.h (erf, erfc, gamma, lgamma): Declare them.
6517 * ov-cx-mat.cc (any_element_less_than, any_element_greater_than):
6518 New static functions
6519 (DARRAY_MAPPER, CD_ARRAY_MAPPER): New macro for complex values
6520 with zero imaginary part.
6521 (erf, erfc, gamma, lgamma): Use the new mappers to define these
6523 * ov-cx-mat.h (erf, erfc, gamma, lgamma): Declare them.
6524 * ov-cx-sparse.cc (any_element_less_than, any_element_greater_than):
6525 New static functions
6526 (DSPARSE_MAPPER, CD_SPARSE_MAPPER): New macro for complex values
6527 with zero imaginary part.
6528 (erf, erfc, gamma, lgamma): Use the new mappers to define these
6530 * ov-cx-sparse.h (erf, erfc, gamma, lgamma): Declare them.
6531 * ov-re-sparse.cc (CD_SPARSE_MAPPER): Use correct mapper functors.
6532 * mapper.cc: Add tests for the above cases.
6534 2008-03-27 John W. Eaton <jwe@octave.org>
6536 * DLD-FUNCTIONS/max.cc: Rename from minmax.cc.
6537 * Makefile.in (DLD_XSRC): Rename minmax.cc to max.cc.
6539 * DLD-FUNCTIONS/__convn__.cc (convn): Use traits class and
6540 typedefs to allow all types to be deduced from argument types.
6542 2008-03-27 Søren Hauberg <hauberg@gmail.com>
6544 * DLD-FUNCTIONS/__convn__.cc (Fconvn): Allow convolving real data with
6547 2008-03-26 John W. Eaton <jwe@octave.org>
6549 * ov-range.h (octave_range::subsref (const std::string&,
6550 const std::list<octave_value_list>&, int)):
6551 Forward to simple subsref.
6552 * ov-base-sparse.h (octave_base_sparse<T>::subsref (const std::string&,
6553 const std::list<octave_value_list>&, int)): Likewise.
6554 * ov-base-scalar.h (octave_base_sparse<T>::subsref (const std::string&,
6555 const std::list<octave_value_list>&, int)): Likewise.
6556 * ov-base-matrix.h (octave_base_matrix<T>::subsref (const std::string&,
6557 const std::list<octave_value_list>&, int)): Likewise.
6559 * ov-struct.cc, ov-cell.h (octave_cell::subsref (const
6560 std::string&, const std::list<octave_value_list>&, int)):
6561 Define nargout version of subsref instead of simple version.
6562 * ov-struct.cc, ov-struct.h (octave_struct::subsref (const
6563 std::string&, const std::list<octave_value_list>&, int)):
6564 Define nargout version of subsref instead of simple version.
6566 * ov-builtin.h (octave_builtin::subsref (const std::string&,
6567 const std::list<octave_value_list>&): Forward to nargout subsref.
6568 * ov-cell.h (octave_cell::subsref (const std::string&,
6569 const std::list<octave_value_list>&)):
6570 * ov-class.h (octave_class::subsref (const std::string&,
6571 const std::list<octave_value_list>&): Likewise.
6572 * ov-fcn-handle.h (octave_fcn_handle::subsref (const std::string&,
6573 const std::list<octave_value_list>&): Likewise.
6574 * ov-list.h (octave_list::subsref (const std::string&,
6575 const std::list<octave_value_list>&): Likewise.
6576 * ov-mex-fcn.h (octave_mex_function::subsref (const std::string&,
6577 const std::list<octave_value_list>&): Likewise.
6578 * ov-struct.h (octave_struct::subsref (const std::string&,
6579 const std::list<octave_value_list>&)):
6580 * ov-usr-fcn.h (octave_user_function::subsref (const std::string&,
6581 const std::list<octave_value_list>&): Likewise.
6583 * ov.cc (octave_value::subsref): Use value of nargout instead of
6584 is_constant method to decide which type of subsref method to call.
6585 (octave_value::assign): Always call simple subref method here.
6587 * DLD-FUNCTIONS/chol.cc, DLD-FUNCTIONS/det.cc,
6588 DLD-FUNCTIONS/getpwent.cc, DLD-FUNCTIONS/inv.cc,
6589 DLD-FUNCTIONS/qr.cc, DLD-FUNCTIONS/symrcm.cc, file-io.cc):
6592 2008-03-26 Søren Hauberg <hauberg@gmail.com>
6594 * DLD-FUNCTIONS/__convn__.cc (Fconvn):
6595 Call complex_array_value to extract N-d array.
6597 2008-03-26 John W. Eaton <jwe@octave.org>
6599 * ov-base-sparse.cc (octave_base_sparse<T>::print_raw):
6600 Also display percentage of elements that are nonzero.
6602 2008-03-25 Søren Hauberg <hauberg@gmail.com>
6604 * DLD-FUNCTIONS/__convn__.cc: New file.
6605 * Makefile.in: Add __convn__.cc
6607 2008-03-25 David Bateman <dbateman@free.fr>
6609 * DLD-FUNCTIONS/hex2num.cc: New function
6610 * Makefile.in (DLD_XSRC): Add hex2num.cc.
6612 2008-03-25 Jaroslav Hajek <highegg@gmail.com>
6614 * mappers.cc (Fexpm1, Flog1p): New functions.
6615 * ov-base.cc, ov-base.h, ov-bool-mat.h, ov-bool-sparse.h,
6616 ov-bool.h, ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h,
6617 ov-cx-sparse.cc, ov-cx-sparse.h, ov-range.h, ov-re-mat.cc,
6618 ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h, ov-scalar.cc,
6620 Provide expm1 and log1p functions.
6622 * mappers.cc (Froundb): New functions
6623 * ov-base.cc, ov-base.h, ov-bool-mat.h, ov-bool-sparse.h,
6624 ov-bool.h, ov-complex.cc, ov-complex.h, ov-cx-mat.cc, ov-cx-mat.h,
6625 ov-cx-sparse.cc, ov-cx-sparse.h, ov-intx.h, ov-range.h,
6626 ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h,
6627 ov-scalar.cc, ov-scalar.h, ov.h:
6628 Provide roundb mapper function.
6630 2008-03-25 Jaroslav Hajek <highegg@gmail.com>
6632 * load-save.cc (save_vars): Handle -struct modifier.
6633 (save_fields): New function.
6634 (Fsave): Document new feature.
6636 2008-03-25 John W. Eaton <jwe@octave.org>
6638 * lex.h (lexical_feedback::looking_at_initializer_expression):
6640 * lex.l (lexical_feedback::init): Initialize it.
6641 (handle_identifier): Don't unconditionally force identifiers to be
6642 variables in the current scope. Don't call force_local_variable
6643 for symbols that appear in parameter initializer expressions.
6644 * parse.y (decl_param_init): New parser "subroutine".
6645 (decl2): Use it. Set lexer_flags.looking_at_initializer_expression
6646 to false after parsing initializer.
6648 2008-03-24 David Bateman <dbateman@free.fr>
6650 * data.cc (map_s_s): Fix for sparse/sparse mappers that resulted
6651 in an empty sparse matrix being returned.
6652 (Fhypot): New function based on the libm hypot function.
6654 2008-03-24 Primozz Peterlin <primozz.peterlin@gmail.com>
6656 * variables.cc (Fexist): Doc fix.
6658 2008-03-23 David Bateman <dbateman@free.fr>
6660 * OPERATORS/op-int.h: Add el_div and el_ldiv operators to the
6661 binops that were missing them. Added elem_pow functions for mixed
6662 integer floating point cases. Initialize the mixed integer
6663 floating point cases.
6665 2008-03-21 John W. Eaton <jwe@octave.org>
6667 * ov-cell.h (octave_cell::is_constant): Return true.
6668 * ov-cell.h, ov-cell.cc (octave_cell::subsref (const std::string&,
6669 const std::list<octave_value_list>&)): Define.
6670 (octave_cell::subsref (const std::string&,
6671 const std::list<octave_value_list>&, int)): Call panic_impossible.
6673 * ov-struct.h (octave_struct::is_constant): New function.
6674 * ov-struct.h, ov-struct.cc (octave_struct::subsref (const std::string&,
6675 const std::list<octave_value_list>&)): Define.
6676 (octave_struct::subsref (const std::string&,
6677 const std::list<octave_value_list>&, int)): Call panic_impossible.
6679 2008-03-21 David Bateman <dbateman@free.fr>
6681 * DLD-FUNCTIONS/amd.cc: New file.
6682 * Makefile.in (DLD_XSRC): Add amd.cc.
6684 2008-03-20 David Bateman <dbateman@free.fr>
6686 * Cell.cc (Cell Cell::diag (void) const): delete.
6687 (Cell Cell::diag (octave__idx_type) const):Rewrite in terms of
6688 template classes function.
6689 * Cell.h (Cell diag (void) const): delete.
6691 * ov.h (octave_value diag (octave_idx_type) const): New method.
6692 * ov-base.h (virtual octave_value diag (octave_idx_type) const):
6694 * ov-base.cc (octave_value octave_base_value::diag
6695 (octave_idx_type) const): New default method.
6697 * ov-base-mat.h (octave_value diag (octave_idx_type) const): New
6699 * ov-base-sparse.h (octave_value diag (octave_idx_type) const): New
6701 * ov-base-scalar.h (octave_value diag (octave_idx_type) const): New
6703 * ov-range.h (octave_value diag (octave_idx_type) const): New
6706 * data.cc (make_diag, make_spdiag): Delete.
6707 (Fdiag): Rewrite in terms of octave_value diag function.
6709 * data.cc (static octave_value make_diag (const Cell&,
6710 octave_idx_type)): New instantiation of template function.
6711 (static octave_value make_diag (const octave_value&,
6712 octave_idx_type)): Allow cell arrays.
6714 * Cell.cc (Cell Cell::diag (void) const, Cell Cell::diag
6715 (octave__idx_type)): New methods for diagonal matrices.
6716 * Cell.h (Cell Cell::diag (void) const, Cell Cell::diag
6717 (octave__idx_type)): Declare them.
6719 2008-03-18 David Bateman <dbateman@free.fr>
6721 * ov-re-mat.cc (lgamma): Convert to a allow negative arguments.
6722 * ov-re-sparse.cc (lgamma): ditto.
6723 * ov-scalar.cc (lgamma): ditto.
6725 * DLD-FUNCTIONS/minmax.cc: 64-bit indexing fix.
6727 2008-03-13 John W. Eaton <jwe@octave.org>
6729 * ov-usr-fcn.cc (octave_user_function::octave_user_function):
6730 Handle num_named_args in initialization list instead of functinon body.
6732 * octave.gperf: Eliminate varargin and varargout keywords.
6733 * lex.l (is_keyword_token): Eliminate varargin_kw and varargout_kw
6734 from switch statement.
6735 * parse.y (return_list): Eliminate special cases for VARARGOUT.
6736 Call validate on tree_parameter_list object.
6737 (param_list1): Likewise, for VARARGIN.
6738 * pt-misc.cc (tree_parameter_list::validate): New function.
6739 (tree_parameter_list::mark_varargs_only): Now private.
6740 (tree_parameter_list::mark_varargs): Now private.
6741 * pt-misc.h (tree_parameter_list::validate): Provide decl.
6743 2008-03-12 John W. Eaton <jwe@octave.org>
6745 * variables.cc (Vwhos_line_format): Omit print_dims parameter.
6746 Fix doc string in Vwhos_line_format DEVAR.
6747 (symbol_record_name_compare): Delete unused function.
6748 (whos_parameter::dimensions): Delete struct field.
6749 (symbol_info_list): New class.
6750 (dimensions_string_req_first_space, make_dimensions_string,
6751 dimensions_string_req_total_space): Delete.
6752 (parse_whos_line_format): Move functionality to new
6753 symbol_info_list class.
6754 (print_symbol_info_line): Move functionality to new
6755 symbol_info_list::struct symbol_info::displaly_line method.
6756 (do_who): Simplify with new symbol_info_list class.
6757 Handle index expressions in addition to symbol names.
6759 * DLD-FUNCTIONS/dlmread.cc (Fdlmread): Fix separator detection.
6761 2008-03-11 John W. Eaton <jwe@octave.org>
6763 * DLD-FUNCTIONS/eig.cc (Feig): Handle possible error from EIG.
6764 * DLD-FUNCTIONS/qp.cc (qp, Fqp): Likewise.
6765 * xpow.cc (xpow): Likewise.
6767 2008-03-11 John W. Eaton <jwe@octave.org>
6769 * DLD-FUNCTIONS/dlmread.cc: Style fixes.
6771 2008-03-11 David Bateman <dbateman@free.fr>
6773 * DLD-FUNCTIONS/dlmread.cc: Function ported from octave forge. Add
6774 spreadsheet style ranges.
6775 * Makefile.in (DLD_XSRC): Add dlmread.cc.
6777 2008-03-10 John W. Eaton <jwe@octave.org>
6779 * mex.cc (mxCreateLogicalScalar): Argument is now mxLogical.
6781 * data.cc (Fisfloat): New function.
6782 * ov.h (octave_value::is_float_type): Ditto.
6783 * ov-base.h (octave_base_value::is_float_type): Ditto.
6784 * ov-complex.h (octave_complex): Ditto.
6785 * ov-cx-mat.h (octave_complex_matrix): Ditto.
6786 * ov-cx-sparse.h (octave_sparse_complex_matrix): Ditto.
6787 * ov-range.h (octave_range): Ditto.
6788 * ov-re-mat.h (octave_matrix): Ditto.
6789 * ov-re-sparse.h (octave_sparse_matrix): Ditto.
6790 * ov-scalar.h (octave_scalar): Ditto.
6792 * mxarray.h.in (mxLogical): Use unsigned char instead of int.
6793 From Antwerpen, G. (Gert) van <gert.vanantwerpen@tno.nl>.
6795 2008-03-07 John W. Eaton <jwe@octave.org>
6797 * ov-struct.cc (octave_struct::print_raw): Don't print contents fo
6798 struct arrays that have more than one element.
6800 2008-03-06 David Bateman <dbateman@free.fr>
6802 * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Document that
6803 the initial interpretation of a positive definite return from
6804 matrix_type is that the matrix is "probably" positive definite and
6807 2008-03-06 John W. Eaton <jwe@octave.org>
6809 * parse.y: Move tests here from test/test_eval.m.
6810 * DLD-FUNCTIONS/fft.cc: Move tests here from test/test_signal.m.
6811 * DLD-FUNCTIONS/dassl.cc: Move tests here from test/test_diffeq.m.
6812 * DLD-FUNCTIONS/lsode.cc: Move tests here from test/test_diffeq.m.
6813 * DLD-FUNCTIONS/quad.cc: Move tests here from test/test_quad.m.
6814 * DLD-FUNCTIONS/time.cc: Move tests here from test/test_system.m.
6816 2008-03-06 Alexander Barth <barth.alexander@gmail.com>
6818 * DLD-FUNCTIONS/__lin_interpn__.cc (lookup):
6819 Handle decreasing coordinate values.
6821 2008-03-05 Jaroslav Hajek <highegg@gmail.com>
6823 * DLD-FUNCTIONS/chol.cc (Fcholupdate): Adjust code to meet
6824 Octave's coding guidelines.
6826 * DLD-FUNCTIONS/qr.cc (Fqrupdate, Fqrinsert, Fqrdelete): Adjust
6827 code to meet Octave's coding guidelines.
6828 * DLD-FUNCTIONS/qr.cc (Fqrdelete): Fix incorrect test.
6830 * DLD-FUNCTIONS/qr.cc (Fqrinsert, Fqrdelete): Modify to use
6831 0-based indexing in liboctave's QR classes.
6833 2008-03-04 Jaroslav Hajek <highegg@gmail.com>
6835 * DLD-FUNCTIONS/chol.cc (Fcholupdate): New function.
6837 * DLD-FUNCTIONS/qr.cc (Fqrupdate, Fqrinsert, Fqrdelete):
6840 2008-03-04 Ryan Rusaw <rrusaw@gmail.com>
6842 * toplev.h (octave_call_stack::element): New static function.
6843 (octave_call_stack::cs): Now std::deque instead of std::list.
6845 * pt-stmt.cc (curr_statement, curr_caller_statement): Delete.
6846 * pt-stmt.h: Delete decls.
6848 * pt-stmt.h, pt-stmt.cc (tree_statement_stack): New class.
6850 * pt-stmt.cc (tree_statement::eval): Use tree_statement_stack
6851 instead of curr_statement variable.
6853 * ov-usr-func.cc (octave_user_function::do_multi_index_op):
6854 Don't set curr_caller_statement.
6856 * error.cc (verror, pr_where): Call tree_statement_stack::current_line
6857 and tree_statement_stack::current_column instead of
6858 instead of curr_statement->line and curr_statement->column.
6859 * input.cc (get_user_input): Likewise.
6861 2008-02-27 John P. Swensen <jpswensen@gmail.com>
6863 * debug.cc (get_user_function): Call symtab::find_function instead
6864 of symtab::find_user_function.
6866 2008-02-27 John W. Eaton <jwe@octave.org>
6868 * oct-stream.cc (do_read): Stop reading if seek fails.
6870 2008-02-26 John W. Eaton <jwe@octave.org>
6872 * ov-base-int.cc (octave_base_int_helper,
6873 octave_base_int_helper_traits): New templates and specializations.
6874 (octave_base_int_matrix<T>::convert_to_str_internal,
6875 octave_base_int_matrix<T>::convert_to_str_internal): Use them.
6877 * DLD-FUNCTIONS/rand.cc (do_rand): Pass name of calling function
6878 to octave_rand::state.
6880 * variables.cc (bind_ans): Handle cs-lists recursively.
6882 * ov-cs-list.h, ov-cs-list.cc (octave_cs_list::print,
6883 octave_cs_list::print_raw): Delete.
6885 2008-02-25 John W. Eaton <jwe@octave.org>
6887 * Cell.cc (Cell::map): New function.
6888 * Cell.h (Cell::map): Declare.
6889 (xisalnum, xisalpha, xisascii, xiscntrl, xisdigit,
6890 xisgraph, xislower, xisprint, xispunct, xisspace, xisupper,
6891 xisxdigit, xtoascii, xtolower, xtoupper): New mapper functions.
6892 (ctype_mapper): New private typedef.
6894 * ov-cell.h (xisalnum, xisalpha, xisascii, xiscntrl, xisdigit,
6895 xisgraph, xislower, xisprint, xispunct, xisspace, xisupper,
6896 xisxdigit, xtoascii, xtolower, xtoupper): New mapper functions.
6898 2008-02-25 Michael Goffioul <michael.goffioul@gmail.com>
6900 * ov-scalar.cc (octave_scalar::round): Use xround instead of ::round
6901 in mapper implementation.
6903 2008-02-25 John W. Eaton <jwe@octave.org>
6905 * ov-base.cc (UNDEFINED_MAPPER, STRING_MAPPER): New macros. Use
6906 them to define mapper functions.
6908 * mappers.cc (Fisalnum, Fisalpha, Fisascii, Fiscntrl, Fisdigit,
6909 Fisgraph, Fislower, Fisprint, Fispunct, Fisspace, Fisupper,
6910 Fisxdigit, Ftoascii, Ftolower, Ftoupper):
6911 Use DEFUNX to define ctype mapper functions.
6912 Use new function names.
6914 * ov-base.h, ov-base.cc, ov-str-mat.h, ov-str-mat.cc:
6915 Prepend x to ctype mapper function names.
6917 * graphics.h.in (row_vector_property::row_vector_property):
6918 Set default constraints here.
6919 (row_vector_property::add_constraint): New function.
6920 (row_vector_property::validate): Delete decl.
6921 (axes::properties::init): Use single-arg add_constraint function
6922 for xlim, ylim, zlim, clim, and alim properties.
6924 * graphics.cc (row_vector_property::validate): Delete.
6926 * graphics.cc (axes::properties::update_camera,
6927 axes::properties::update_aspectratios):
6928 Avoid shadow warnings from GCC.
6930 * graphics.h.in (base_properties::get_bounding_box):
6931 Avoid unused argument warning from GCC.
6933 * graphics.h.in (array_property::add_constraint): Arg is now const
6934 reference, not value.
6936 * graphics.h.in, graphics.cc (class row_vector_property): New class.
6937 (axes::properties): xlim, ylim, zlim, clim, alim, xtick, ytick,
6938 ztick properties are now row_vector_property objects instead of
6939 array_property objects.
6941 * genprops.awk: Special case row_vector_property in the same way
6944 2008-02-22 John W. Eaton <jwe@octave.org>
6946 * DLD-FUNCTIONS/ccolamd.cc, DLD-FUNCTIONS/colamd.cc,
6947 DLD-FUNCTIONS/convhulln.cc, DLD-FUNCTIONS/dmperm.cc,
6948 DLD-FUNCTIONS/qz.cc, DLD-FUNCTIONS/regexp.cc,
6949 DLD-FUNCTIONS/symbfact.cc, zfstream.h, zfstream.cc:
6950 Use 0 instead of NULL.
6952 2008-02-22 David Bateman <dbateman@free.fr>
6954 * DLD-FUNCTIONS/chol.c (Fchol, Fcholinv, Fchol2iinv): Treat
6955 sparse matrices. Add the "lower" and "vector" flags.
6956 * DLD-FUNCTIONS/inv.c (Finv): Treat sparse matrices.
6957 * DLD-FUNCTION/sparse.cc (static bool is_sparse (const
6958 octave_value&)): Remove and use arg.is_sparse_type () instead.
6959 (Fspcumprod, Fspcumsum, Fspprod, spsum, spsumsq, spdiag): Remove.
6960 * DLD-FUNCTIONS/splu.cc: Remove.
6961 * DLD-FUNCTIONS/lu.cc: Treat sparse matrices, Add "vector" flag.
6962 * DLD-FUNCTIONS/spchol.cc: Move to symbfact.cc
6963 * DLD-FUNCTIONS/symbfact.cc: Remove cholesky functions Fspchol,
6964 Fspcholinv, Fspchol2inv.
6965 * DLD-FUNCTIONS/luinc.cc: Modify for new sparse LU
6966 constructors. Ass the 'vector' flag.
6967 * DLD-FUNCTIONS/spparms.cc: Add the sum_tol flag.
6969 * Makifile.in (DLD_XSRC): Remove spchol.cc, splu.cc and add
6971 * data.cc (NATIVE_REDUCTION): Treat sparse matrices
6972 (DATA_REDUCTION): Ditto.
6973 (template <class T> static octave_value make_spdiag (const T&,
6974 octave_idx_type)): New template function for sparse diag
6975 function. Instantiate it.
6976 (static octave_value make_diag (const octave_value&,
6977 octave_idx_type): Use make_spdiag for sparse matrice.
6978 (Fatan2): Compatibility fixes for mixed full/sparse matrices.
6980 2008-02-21 John W. Eaton <jwe@octave.org>
6982 * DLD-FUNCTIONS/fsolve.cc (fsolve_user_jacobian):
6983 Check dimensions of user-supplied Jacobian matrix.
6984 (fsolve_user_function): Check for non-square systems.
6986 2008-02-20 John W. Eaton <jwe@octave.org>
6988 * data.cc (map_d_m, map_m_d, map_m_m, Fatan2, Ffmod):
6991 * ov-bool-mat.h (octave_bool_matrix (const Array2<bool>&)): Delete.
6993 2008-02-20 David Bateman <dbateman@free.fr>
6995 * DLD-FUNCTIONS/det.cc, DLD-FUNCTIONS/find.cc,
6996 * DLD-FUNCTIONS/minmax.cc, DLD-FUNCTIONS/qr.cc:
6997 Treat sparse matrices.
6999 * DLD-FUNCTIONS/sparse.cc (Fspmin, Fspmax, Fatan2): Remove functions.
7001 * DLD-FUNCTIONS/dmperm.cc: Rename from spqr.cc.
7002 (Fspqr): Delete function.
7004 * DLD-FUNCTIONS/spqr.cc, DLD-FUNCTIONS/spdet.cc,
7005 DLD-FUNCTIONS/spfind.cc: Remove.
7007 * Makefile.in (DLD_XSRC): Add dmperm.cc to the list.
7008 Delete det.cc, find.cc, minmax.cc, and qr.cc from the list.
7010 * Makefile.in (OV_SRC): Remove ov-mapper.cc.
7011 (OV_INCLUDES): Remove ov-mapper.h.
7012 (DEFUN_PATTERN): No longer accept DEFUN_MAPPER as valid.
7013 * ov-mapper.cc, ov-mapepr.h: Delete, remove all includes of
7014 ov-mapper.h from all files.
7016 * op-b-sbm.cc, op-bm-sbm.cc, op-smb-b.cc, op-sbm-bm.cc: Include
7019 * defun-int.h (DEFUN_MAPPER_INTERNAL, install_builtin_mapper):
7021 * defun.cc (install_builtin_mapper): Ditto.
7022 * defun.h (DEFUN_MAPPER): Remove.
7024 * mappers.cc: Rewrite all mapper function using DEFUN and newly
7025 introduced octave_value mapper functions.
7026 (dummyp, xabs, xisalnum, xisascii, xiscntrl, xisdigit,
7027 xisgraph, xislower, xisprint, xispunct, xisspace, xisupper,
7028 xtoascii, xtolower, xtoupper, xconj, ximag, xreal): Remove
7029 static wrapper functions.
7031 * mkbuiltins (XDEFUN_MAPPER_INTERNAL, install_builtin_functions):
7033 * mkgendoc (XDEFUN_MAPPER_INTERNAL): Remove.
7035 * ov.cc (octave_mapper::register_type): Remove.
7037 * ov.h (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh,
7038 ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor, gamma,
7039 imag, isinf, isna, isnan, lgamma, log, log10, real, round, signum,
7040 sin, sinh, sqrt, tan, tanh, isalnum, isalpha, isascii, iscntrl,
7041 isdigit, isgraph, islower, isprint, ispunct, isspace, isupper,
7042 isxdigit, toascii, tolower, toupper):
7043 New octave_value mapper functions.
7045 * ov-base.h (abs, acos, acosh, angle, arg, asin, asinh, atan,
7046 atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor,
7047 gamma, imag, isinf, isna, isnan, lgamma, log, log10, real, round,
7048 signum, sin, sinh, sqrt, tan, tanh, isalnum, isalpha, isascii,
7049 iscntrl, isdigit, isgraph, slower, isprint, ispunct, isspace,
7050 isupper, isxdigit, toascii, tolower, toupper):
7051 New virtual mapper functions.
7052 * ov-base.cc (abs, acos, acosh, angle, arg, asin, asinh, atan,
7053 atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor,
7054 gamma, imag, isinf, isna, isnan, lgamma, log, log10, real, round,
7055 signum, sin, sinh, sqrt, tan, tanh, isalnum, isalpha, isascii,
7056 iscntrl, isdigit, isgraph, slower, isprint, ispunct, isspace,
7057 isupper, isxdigit, toascii, tolower, toupper):
7058 Base versions of mapper functions.
7060 * ov-bool-mat.h (abs, acos, acosh, angle, arg, asin, asinh, atan,
7061 atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor,
7062 gamma, imag, isinf, isna, isnan, lgamma, log, log10, real, round,
7063 signum, sin, sinh, sqrt, tan, tanh):
7064 Mapper function recast boolen matrix as double.
7065 * ov-bool.h (abs, acos, acosh, angle, arg, asin, asinh, atan,
7066 atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor,
7067 gamma, imag, isinf, isna, isnan, lgamma, log, log10, real, round,
7068 signum, sin, sinh, sqrt, tan, tanh): Ditto.
7069 * ov-bool-sparse.h (abs, acos, acosh, angle, arg, asin, asinh,
7070 atan, atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix,
7071 floor, gamma, imag, isinf, isna, isnan, lgamma, log, log10, real,
7072 round, signum, sin, sinh, sqrt, tan, tanh): Ditto.
7073 (char_array_value): New method to convert to charNDArray.
7074 * ov-bool-sparse.cc (char_array_value): New method to convert to
7076 * ov-complex.cc (char_array_value): ditto.
7077 (xabs, ximag, xreal): Static wrapper functions.
7078 (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil,
7079 conj, cos, cosh, exp, finite, fix, floor, imag, isinf, isna,
7080 isnan, log, log10, real, round, signum, sin, sinh, sqrt, tan,
7081 tanh): New mapper methods.
7082 * ov-complex.h: Provide decls.
7084 * ov-cx-mat.cc (char_array_value): New method to convert to
7086 (xabs, ximag, xreal): Static wrapper functions.
7087 (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil,
7088 conj, cos, cosh, exp, finite, fix, floor, imag, isinf, isna,
7089 isnan, log, log10, real, round, signum, sin, sinh, sqrt, tan,
7090 tanh): New mapper methods.
7091 * ov-cx-mat.h: Provide decls.
7093 * ov-cx-sparse.cc (char_array_value): New method to convert to
7095 (xabs, ximag, xreal): Static wrapper functions.
7096 (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil,
7097 conj, cos, cosh, exp, finite, fix, floor, imag, isinf, isna,
7098 isnan, log, log10, real, round, signum, sin, sinh, sqrt, tan,
7099 tanh): New mapper methods.
7100 * ov-cx-sparse.h: Provide decls.
7102 * ov-intx.h (abs, signum, imag, ceil, conj, fix, floor, real,
7103 round, finite, isinf, isna, isnan): Define for both matrix and
7106 * ov-range.h (abs, acos, acosh, angle, arg, asin, asinh, atan,
7107 atanh, ceil, conj, cos, cosh, erf, erfc, exp, finite, fix, floor,
7108 gamma, imag, isinf, isna, isnan, lgamma, log, log10, real, round,
7109 signum, sin, sinh, sqrt, tan, tanh): New mapper functions.
7111 * ov-re-mat.cc (any_element_less_than): Static function to check if
7112 any elemet was less than a value,
7113 (any_element_greater_than): Ditto with greater than.
7114 (abs, acos, acosh, angle, arg, asin, asinh, atan, atanh, ceil,
7115 conj, cos, cosh, erf, erfc, exp, finite, fix, floor, gamma, imag,
7116 isinf, isna, isnan, lgamma, log, log10, real, round, signum, sin,
7117 sinh, sqrt, tan, tanh): New mapper functions.
7118 * ov-re-mat.h: Provide decls.
7120 * ov-scalar.cc (any_element_less_than): Static function to check if
7121 any elemet was less than a value,
7122 (any_element_greater_than): ditto with greater than.
7123 (abs acos acosh angle arg asin asinh atan atanh
7124 ceil conj cos cosh erf erfc exp finite fix floor gamma imag
7125 isinf isna isnan lgamma log log10 real round signum sin sinh
7126 sqrt tan tanh): New mapper functions.
7127 * ov-scalar.h: Provide decls.
7129 * ov-str-mat.cc (xisalnum, xisascii, xiscntrl, xisdigit,
7130 xisgraph, xislower, xisprint, xispunct, xisspace, xisupper,
7131 xtoascii, xtolower, xtoupper): New static wrapper functions.
7132 (isalnum, isalpha, isascii, iscntrl, isdigit, isgraph, islower,
7133 isprint, ispunct, isspace, isupper, isxdigit, toascii, tolower,
7134 toupper): New mapper methods.
7135 * ov-str-mat.h: Provide decls.
7137 2008-02-18 David Bateman <dbateman@free.fr>
7139 * data.cc (Fatan2): Reject arguments that are integer types.
7141 2008-02-19 Jaroslav Hajek <highegg@gmail.com>
7143 * DLD-FUNCTIONS/qr.cc: Doc fix.
7145 2008-02-18 John W. Eaton <jwe@octave.org>
7148 (symbol_table::fcn_info::fcn_info_rep::clear_unlocked_functions):
7149 symbol_table::fcn_info::fcn_info_rep::clear_cmdline_function,
7150 symbol_table::fcn_info::fcn_info_rep::clear_autoload_function):
7152 (symbol_table::fcn_info::fcn_info_rep::clear_user_function):
7153 Don't clear locked functions.
7154 (symbol_table::fcn_info::fcn_info_rep::clear_mex_function):
7155 Call clear_user_function instead of setting function_on_path directly.
7156 (symbol_table::fcn_info::fcn_info_rep::clear):
7157 Use new functions to do the real work.
7159 * ov.h (octave_value::lock, octave_value::unlock,
7160 octave_value::islocked): New functions.
7161 * ov-base.cc (octave_base_value::lock, octave_base_value::unlock):
7163 * ov-base.h Provide decls.
7164 (octave_base_value::islocked): New function.
7165 * ov-fcn.h (octave_function::islocked): Now const.
7167 2008-02-15 John W. Eaton <jwe@octave.org>
7169 * ov-builtin.cc (octave_builtin::do_multi_index_op):
7170 Catch possible octave_execution_exception.
7171 * ov-mex-fcn.cc (octave_mex_function::do_multi_index_op): Likewise.
7172 * ov.cc (do_binary_op, do_cat_op, do_unary_op,
7173 octave_value::do_non_const_unary_op): Likewise.
7175 2008-02-14 John W. Eaton <jwe@octave.org>
7177 * DLD-FUNCTIONS/balance.cc, DLD-FUNCTIONS/qz.cc:
7178 Don't check f77_exception_encountered.
7180 * sighandlers.cc (user_abort): If interrupting immediately, set
7181 octave_interrupt_state if it is not already set.
7183 * pt-stmt.cc (tree_statement::eval): Catch execution exceptions.
7185 * octave.cc (lo_error_handler): New static function.
7186 (initialize_error_handlers): Set liboctave_error_handler to
7187 lo_error_handler, not error.
7189 * DLD-FUNCTIONS/urlwrite.cc (urlget): Call octave_rethrow_exception
7190 instead of octave_throw_interrupt_exception.
7191 * utils.cc (BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE_FOR_VSNPRINTF):
7194 2008-02-12 David Bateman <dbateman@free.fr>
7196 * graphics.h.in: Implement the cdatamapping property in patch and
7199 2008-02-12 John W. Eaton <jwe@octave.org>
7201 * pt-loop.cc (tree_simple_for_command::eval): Compute range
7202 element with multiplication.
7204 2008-02-11 John W. Eaton <jwe@octave.org>
7206 * Makefile.in ($(MAKEDEPS)): Skip dependencies if omit_deps is defined.
7208 2008-02-09 John W. Eaton <jwe@octave.org>
7210 * pr-output.cc (set_range_format): Eliminate sign arg.
7213 2008-02-08 John W. Eaton <jwe@octave.org>
7215 * ov-struct.cc (octave_struct::subsref): Allow Cell::index to resize.
7217 * input.cc (interactive_input): Eliminate debug arg. Change All uses.
7218 (get_user_input): Don't process input_buf if there is an error.
7219 Call reset_error_handler instead of setting error_state to 0.
7221 2008-02-08 Michael Goffioul <michael.goffioul@gmail.com>
7223 * graphics.h.in (callback_property::execute): New static
7224 helper method (useful to execute callbacks by name).
7225 * graphics.cc (callback_property::execute): Likewise.
7226 (execute_callback): Avoid undefined argument when executing
7227 callback. Do not use arguments when the callback is a string.
7229 2008-02-07 John W. Eaton <jwe@octave.org>
7231 * ov-range.h (octave_range::sort): New functions.
7233 2008-02-07 David Bateman <dbateman@free.fr>
7235 * Makefile.in (DLD_XSRC): Delete spkron.cc.
7236 * DLD-FUNCTIONS/spkron.cc: Delete.
7237 * DLD-FUNCTIONS/kron.cc: Include here and dispatch to the sparse
7238 version if either argument is sparse.
7240 2008-02-06 John W. Eaton <jwe@octave.org>
7242 * Makefile.in (parse.cc): Also use --defines option for bison.
7244 2008-02-06 Michael Goffioul <michael.goffioul@gmail.com>
7246 * graphics.cc (axes::properties::set_defaults): Set default axes
7249 2008-02-06 John W. Eaton <jwe@octave.org>
7251 * Makefile.in (parse.cc): Use "-o $@" instead of renaming y.tab.c.
7252 (maintainer-clean): Don't remove y.tab.c.
7254 * Makefile.in (parse.cc : parse.y): Use mv instead of move-if-change.
7255 (stamp-prereq, stamp-liboctave-prereq): Eliminate.
7256 (clean): Don't remove stamp-prereq and stamp-liboctave-prereq.
7257 (OPT_BASE, OPT_IN, OPT_INC): New macros.
7258 (OPT_HANDLERS): Define in terms of OPT_BASE.
7259 ($(OPT_INC) : %.h : %.in): New pattern rule.
7260 (PREREQ): New macro.
7261 ($(MAKEDEPS)): Simplify with $(PREREQ).
7263 2008-02-05 John W. Eaton <jwe@octave.org>
7265 * Makefile.in: Unconditionally include $(MAKEDEPS).
7266 Mark $(MAKEDEPS) as .PHONY targets if omit_deps is true.
7268 2008-02-05 Michael Goffioul <michael.goffioul@gmail.com>
7270 * graphics.h.in (base_properties::get_boundingbox): New method.
7271 (figure::properties::get_boundingbox): Overload method.
7272 (axes::properties::get_boundingbox): Likewise.
7273 * graphics.cc (figure::properties::get_boundingbox): Return a
7274 left-to-right/top-to-bottom bounding box rectangle.
7275 (axes::properties::get_boundingbox): Likewise.
7276 (axes::properties::update_camera): Remove backend access and
7277 use the new axes bounding box.
7279 2008-02-04 Shai Ayal <shaiay@users.sourceforge.net>
7281 * graphics.h.in (axes::properties::update_xlim,
7282 axes::properties::update_ylim, axes::properties::update_zlim):
7285 * graphics.cc (axes::properties::calc_ticks): New function.
7286 (axes::properties::magform): New function.
7287 (axes::update_axis_limits): Call update_{x,y,z}lims if
7290 2008-02-04 Michael Goffioul <michael.goffioul@gmail.com>
7292 * graphics.h.in (base_graphics_backend::get_screen_size,
7293 graphics_backend::get_screen_size): New methods.
7294 (graphics_backend::available_backends): Export symbol.
7295 (class figure::properties, class axes::properties): Export classes.
7296 (figure::properties::get_boundingbox): New utility method.
7297 (figure::properties::position): Use valid default position.
7298 (axes::properties::gridlinestyle,
7299 axes::properties::minorgridlinestyle):
7300 Use dotted line style as default.
7301 * graphics.cc (default_figure_position): New static function.
7302 (gnuplot_backend::get_screen_size): New method.
7303 (figure::properties::get_boundingbox): New utility method.
7305 2008-02-02 Shai Ayal <shaiay@users.sourceforge.org>
7307 * graphics.h.in (base_scaler::~base_scalar): New virtual destructor.
7308 * graphics.cc (axes::properties::update_camera): Tag abs with std.
7310 * graphics.h.in (graphics_backend::find_backend): New function.
7311 (class figure): Add __backend__ property and set method.
7313 2008-02-02 John W. Eaton <jwe@octave.org>
7315 * help.cc (do_type): Don't print dyamically loaded function files.
7317 * ov-fcn.h (octave_function::is_dynamically_loaded_function): Delete.
7319 2008-02-01 John W. Eaton <jwe@octave.org>
7321 * symtab.cc (Fset_variable, Fvariable_value):
7322 New functions, but commented out for now.
7324 2008-01-30 Michael Goffioul <michael.goffioul@gmail.com>
7326 * graphics.h.in (axes::properties::get_transform_matrix,
7327 axes::properties::get_inverse_transform_matrix,
7328 axes::properties::get_opengl_matrix_1,
7329 axes::properties::get_opengl_matrix_2,
7330 axes::properties::get_transform_zlim): New accessors.
7331 (base_properties::is_clipping): New accessor.
7332 (class graphics_xform): New class encapsulating axes transformation.
7333 (axes::properties::get_transform): New method returning a
7334 graphics_xform object.
7335 * graphics.cc (class graphics_xform): New class.
7337 2008-01-31 David Bateman <dbateman@free.fr>
7339 * ov.cc (octave_value::octave_value (const ArrayN<bool>&),
7340 octave_value::octave_value (const Sparse<bool>&, const MatrixType &),
7341 octave_value::octave_value (const ArrayN<std::streamoff>&)): New
7343 * ov.h: (octave_value (const ArrayN<bool>&),
7344 octave_value (const Sparse<bool>&, const MatrixType &),
7345 octave_value (const ArrayN<std::streamoff>&)): Declare them.
7346 (octave_value sort (octave_idx_type, sortmode) const, octave_value
7347 sort (Array<octave_idx_type> &, octave_idx_type, sortmode) const):
7348 octave_value sort method.
7351 * ov-base.cc (sort): Base versions of teh octave_value sort methods.
7352 * ov-base.h (sort): Declare the octave_value sort methods
7353 * ov-base-scalar.h (sort): Simple sort methods for scalars.
7354 * ov-base-mat.h, ov-base-sparse.h (sort): Sort methods calling
7355 underlying array or sparse sort methods.
7356 * ov-str-mat.h (sort): String specific sort methods.
7358 * TEMPLATE-INST/Array-tc.cc: Instantiate the array sort methods.
7359 * ov-streamoff.h (sort): Sort versions returning and error.
7360 * oct-stream.cc, ov-typeinfo.cc, Array-os.cc: Null instantiation
7361 of array sort methods.
7363 * Makefile.in (DLD_XSRC): Remove sort.cc
7364 * DLD-FUNCTIONS/sort.cc: Remove
7365 * data.cc (Fsort): New function using octave_value sort methods
7366 for the sorting. Add tests.
7368 2008-01-30 Thomas Weber <thomas.weber.mail@gmail.com>
7370 * pager.cc (Fmore): Doc fix.
7372 2008-01-28 Michael Goffioul <michael.goffioul@gmail.com>
7374 * genprops.awk: Add update ('u') modifier and document the
7375 readonly ('r') modifier.
7376 * graphics.h.in (class base_scaler, class lin_scaler, class
7377 log_scaler, class scaler): New classes to make abstraction of the
7379 (base_graphics_backend::get_screen_resolution,
7380 graphics_backend::get_screen_resolution): New methods.
7381 (axes::properties::sx, axes::properties::sy,
7382 axes::properties::sz): New scaler fields.
7383 (axes::properties::get_x_scaler, axes::properties::get_y_scaler,
7384 axes::properties::get_z_scaler): New accessors.
7385 (axes::properties::x_render, axes::properties::x_render_inv,
7386 axes::properties::x_gl_mat1, axes::properties::x_gl_mat2,
7387 axes::properties::x_zlim): New utility Matrix fields.
7388 (axes::properties::get_boundingbox,
7389 axes::properties::update_camera,
7390 axes::properites::update_aspectratios,
7391 axes::properties::update_transform,
7392 axes::properties::update_xscale, axes::properties::update_yscale,
7393 axes::properties::update_zscale, axes::properties::update_view,
7394 axes::properties::update_xdir, axes::properties::update_ydir,
7395 axes::properties::update_zdir): New updater methods.
7396 (axes::properties::init): Initialize sx, sy, sz and x_zlim correctly.
7397 (axes::properties::position): Use valid default position value.
7398 (axes::properties::xscale, axes::properties::yscale,
7399 axes::properties::zscale, axes::properties::xdir,
7400 axes::properties::ydir, axes::properties::zdir,
7401 axes::properties::view): Add updater ('u') property modifier.
7402 * graphics.cc (default_axes_position, default_axes_outerposition):
7404 (convert_position): New utility function to convert position
7405 according to specified units.
7406 (gnuplot_backend::get_screen_resolution): New method.
7407 (axes::properties::set_defaults): Initilize recently added properties.
7408 (xform_matrix, xform_vector, transform, xform_scale,
7409 xform_translate, scale, translate, xform, normalize, dot, cross,
7410 unit_cube, cam2xform, xform2cam): New inline transformation
7412 (axes::properties::update_camera,
7413 axes::properties::update_aspectratios,
7414 axes::properties::get_boundingbox): New updater methods for
7415 computing transformation matrices.
7416 (axes::update_axis_limits): Update transformation data.
7418 2008-01-28 John W. Eaton <jwe@octave.org>
7420 * oct-stream.cc (BEGIN_CHAR_CLASS_CONVERSION): Handle width properly.
7421 (OCTAVE_SCAN) [__GNUG__ && ! CXX_ISO_COMPLIANT_LIBRARY]:
7422 Delete special case.
7424 2008-01-25 David Bateman <dbateman@free.fr>
7426 * DLD-FUNCTIONS/rand.cc (Frandp): Relax relative error on randp
7429 2008-01-25 Michael Goffioul <michael.goffioul@gmail.com>
7431 * graphics.h.in (base_properties::get_backend,
7432 base_graphics_object::get_backend, graphics_backend::get_backend):
7433 New methods for convenient access to the backend.
7434 (figure::get_backend, figure::set_backend): Remove.
7435 * graphics.cc (base_properties::get_backend): New method.
7436 (Fdrawnow): Use graphics_object::get_backend to simplify code.
7438 2008-01-24 Pascal Dupuis <Pascal.Dupuis@worldonline.be>
7440 * mxarray.h.in: Include <cstring>.
7442 2008-01-22 John W. Eaton <jwe@octave.org>
7444 * graphics.cc (clear_drawnow_request): New function.
7445 (Fdrawnow): Add it to the unwind_protect stack.
7447 * input.cc (Vdrawnow_requested): No longer static.
7448 * input.h: Provide decl.
7449 * graphics.cc (Fdrawnow, Fset, make_graphics_object):
7450 Use Vdrawnow_requested directly.
7452 * toplev.cc (octave_add_atexit_function,
7453 octave_remove_atexit_function): New functions.
7454 (Fatexit): Use them.
7455 * graphics.cc (Fdrawnow): Call octave_add_atexit_function instead
7457 * toplev.h (octave_add_atexit_function,
7458 octave_remove_atexit_function): Provide decls.
7460 2008-01-22 Michael Goffioul <michael.goffioul@gmail.com>
7462 * graphics.h.in (base_properties::is_visible,
7463 base_properties::set_modified): New accessors.
7464 (class base_graphics_backend, class graphics_backend): New classes
7465 for handling octave/backend interaction.
7466 (figure::properties::close): Add "pop" argument controlling
7467 whether the figure should be popped from the list of existing figures.
7468 (class figure::properties): New backend field and accessors, holding
7469 the graphics backend associated with the figure.
7470 * graphics.cc (class gnuplot_backend): New class for the default
7472 (figure::properties::close): Add "pop" argument and transfer the
7473 figure closing to the associated backend.
7474 (Fdrawnow): New builtin function, converted from drawnow.m.
7476 2008-01-19 John W. Eaton <jwe@octave.org>
7478 * genprops.awk (emit_source): Use "pname" for property name argument.
7480 2008-01-19 Shai Ayal <shaiay@users.sourceforge.net>
7482 * graphics.h.in (class figure::properties): New properties:
7483 alphamap, currentcharacter, currentobject, current_point,
7484 dockcontrols, doublebuffer, filename, integerhandle,
7485 inverthardcopy, keypressfcn, keyreleasefcn, menubar, mincolormap,
7486 name, numbertitle, paperunits, paperposition, paperpositionmode,
7487 papersize, papertype, pointer, pointershapecdata,
7488 pointershapehotspot, position, renderer, renderermode, resize,
7489 resizefcn, selectiontype, toolbar, units, windowbuttondownfcn,
7490 windowbuttonmotionfcn, windowbuttonupfcn, windowbuttonwheelfcn,
7491 windowstyle, wvisual, wvisualmode, xdisplay, xvisual, xvisualmode,
7494 2008-01-19 Michael Goffioul <michael.goffioul@gmail.com>
7496 * graphics.h.in (base_properties::beingdeleted,
7497 base_properties::is_beingdeleted,
7498 base_properties::get_beingdeleted,
7499 base_properties::set_beingdeleted):
7500 Add beingdeleted property and accessors.
7501 * graphics.cc (base_properties::get): Likewise.
7502 (gh_manager::free): Set beingdeleted to "on" when freeing an object.
7503 * genprops.awk: Skip C++-style comments in property declaration.
7505 * graphics.h.in (class axes::properties): New properties: alim,
7506 alimmode, xminortick, yminortick, zminortick, ambientlightcolor,
7507 cameraposition, cameratarget, cameraupvector, cameraviewangle,
7508 camerapositionmode, cameratargetmode, cameraupvectormode,
7509 cameraviewanglemode, currentpoint, drawmode, fontangle, fontname,
7510 fontsize, fontweight, fontunits, gridlinestyle,
7511 minorgridlinestyle, linestyleorder, linewidth, plotboxaspectratio,
7512 plotboxaspectratiomode, projection, tickdir, tickdirmode,
7513 ticklength, tightinset, units, x_viewtransform,
7514 x_projectiontransform, x_viewporttransform, x_normrendertransform,
7516 * genprops.awk: Handle new readonly modifier 'r'.
7518 2008-01-18 Juhani Saastamoinen <juhani@cs.joensuu.fi>
7520 * genprops.awk: Avoid using "default" as a variable name.
7522 2008-01-17 Michael Goffioul <michael.goffioul@gmail.com>
7524 * graphics.h.in (data_property::get_data_limits): Reset min/max values.
7526 2008-01-17 David Bateman <dbateman@free.fr>
7528 * ov-fcn-inline.cc: Add tests for Finline.
7530 2008-01-17 Ben Abbott <bpabbott@mac.com>
7532 * load-path.cc (F__pathorig__): Rename from Fpathdef.
7533 (Frestoredefaultpath): New function.
7535 2008-01-16 John W. Eaton <jwe@octave.org>
7537 * pt-assign.cc (tree_simple_assignment::rvalue,
7538 tree_multi_assignment::rvalue): Handle assignment of
7539 comma-separated lists.
7541 2008-01-15 John W. Eaton <jwe@octave.org>
7543 * mappers.cc (install_mapper_functions): Move test for asin here
7544 from test/test_arith.m.
7546 * graphics.h.in (class line::properties, class text::properties):
7547 Rename erase_mode property to erasemode.
7549 2008-01-15 Michael Goffioul <michael.goffioul@gmail.com>
7551 * graphics.h.in (base_properties::remove_child,
7552 base_properties::adopt, base_properties::update_axis_limits):
7554 (base_graphics_object::mark_modified,
7555 base_graphics_object::override-defaults,
7556 base_graphics_object::set_from_list, base_graphics_object::set,
7557 base_graphics_object::get, base_graphics_object::get_parent,
7558 base_graphics_object::remove_child, base_graphics_object::adopt,
7559 base_graphics_object::reparent, base_graphics_object::defaults,
7560 base_graphics_object::type): Add default implementation.
7561 (class root_figure, class figure, class axes, class line,
7562 class text, class image, class patch, class surface):
7563 Remove overloaded virtual methods whose implementation is
7564 identical to the default one.
7566 * genprops.awk: Handle 'h' modifier for hidden properties.
7567 Replace "get(void)" method with "get(bool all = false)" to allow
7568 access to hidden properties.
7570 * graphics.h.in (base_properties::get, base_graphics_object::get,
7571 graphics_object::get, root_figure::get, figure::get, axes::get,
7572 line::get, text::get, patch::get, surface::get, image::get):
7573 New arg, ALL, to access hidden properties.
7574 (gh_manager::do_get_object): Do not look for invalid handles.
7575 (figure::properties::__plot_stream__,
7576 figure::properties::__enhanced__, axes::properties::__colorbar__):
7577 Make properties hidden.
7578 (axes::properties, line::properties, text::properties,
7579 patch::properties, surface::properties): Remove obsolete 'a'
7581 * graphics.cc (base_properties::get): New arg ALL, to access
7583 (base_properties::mark_modified): Call mark_modified only on valid
7585 (__get__): New internal function returning all properties,
7586 including the hidden ones.
7588 2008-01-15 John W. Eaton <jwe@octave.org>
7590 * graphics.cc (properties::set_currentfigure,
7591 properties::set_currentaxes): Don't convert arg to double
7592 before passing to graphics_handle constructor.
7593 (base_properties::remove_child): Call mark_modified if list of
7596 2008-01-15 Shai Ayal <shaiay@users.sourceforge.net>
7598 * graphics.h.in (class line::properties): New properties:
7599 displayname, erasemode.
7600 (class text::properties) New properties: backgroundcolor,
7601 displayname, edgecolor, erase_mode, editing, fontunits, linestyle,
7602 linewidth, margin, verticalalignment.
7604 2008-01-14 John W. Eaton <jwe@octave.org>
7606 * load-path.cc (load_path::do_initialize): Start with sys_path empty.
7607 (maybe_add_path_elts): Omit path_sep_str if path is empty.
7609 * symtab.h (symbol_table::do_pop_context): Remove symbol_records
7610 which have no more context.
7611 (symbol_table::symbol_record::pop_context,
7612 (symbol_table::symbol_record::symbol_record_rep::pop_context):
7613 Return size of value_stack, or 1 if variable is persistent or global.
7615 2008-01-14 Kai Habel <kai.habel@gmx.de>
7617 * graphics.h.in (class patch::properties): New properties:
7618 cdatamapping, facevertexalphadata, facevertexcdata, vertexnormals,
7619 normalmode, facelighting, edgealpha, edgelighting,
7620 backfacelighting, ambientstrength, diffusestrength,
7621 specularstrength, specularexponent, specularcolorreflectance,
7624 2008-01-14 Michael Goffioul <michael.goffioul@gmail.com>
7626 * graphics.h.in (gh_manager::do_make_graphics_handle,
7627 gh_manager::make_graphics_handle): New boolean parameter
7629 * graphics.cc (xcreatefcn): New static function.
7630 (gh_manager::do_make_graphics_handle): New boolean parameter
7631 do_createfcn. Execute createfcn callback accordingly.
7632 (make_graphics_object, F__go_figure__): Use do_createfcn
7633 parameter and call xcreatefcn
7635 * genprops.awk (emit_get_callback): Pass user data to execute method.
7636 * graphics.cc (execute_callback): New static function.
7637 (callback_property::validate): Make it work.
7638 (callback_property::execute): Make it work.
7639 (gh_manager::do_free): Execute delete function here.
7640 * graphics.h.in (callback_property::execute): Fix decl.
7641 (base_properties::buttondownfcn, base_properties::createfcn,
7642 base_properties::deletefcn, base_properties::userdata): Default
7643 value is empty Matrix, not undefined octave_value object.
7644 (base_properties::execute_createfcn): New function.
7645 (base_properties::execute_deletefcn): New function.
7647 2007-12-13 Shai Ayal <shaiay@users.sourceforge.net>
7649 * graphics.h.in, graphics.cc (class base_properties): New
7650 properties: busyaction, buttondownfcn, clipping, createfcn,
7651 deletefcn, handlevisibility, hittest, interruptible, selected,
7652 selectionhighlight, uicontextmenu, userdata, visible.
7653 (class figure): Delete visible property.
7655 2008-01-13 Michael Goffioul <michael.goffioul@gmail.com>
7657 * grahpics.h.in: Sprinkle with OCTINTERP_API as needed.
7658 (axes::properties::xaxislocation): Allow value of zero.
7659 (axes::properties::yaxislocation): Likewise.
7661 2008-01-12 Michael Goffioul <michael.goffioul@gmail.com>
7663 * Makefile.in (distclean): Delete graphics-props.cc.
7665 * genprops.awk: Handle new graphics property classes.
7667 * graphics.h.in, graphics.cc: Adapt for new specific property types.
7669 2008-01-12 John W. Eaton <jwe@octave.org>
7671 * toplev.cc (octave_config_info): Add GNUPLOT to the struct.
7672 * oct-conf.h.in (OCTAVE_CONF_GNUPLOT): New macro.
7674 2008-01-11 John W. Eaton <jwe@octave.org>
7676 * DLD-FUNCTIONS/__qp__.cc (qp): Undo part of change from
7677 2007-09-04 (compute Y at each iteration).
7679 2008-01-10 John W. Eaton <jwe@octave.org>
7681 * DLD-FUNCTIONS/fsolve.cc (Ffsolve): Doc fix.
7682 (hybrd_info_to_fsolve_info): Swap return values for -1 and -2 inputs.
7684 * DLD_FUNCTIONS/__gnuplot_raw__.l: Delete.
7685 * Makefile.in (DLD_XSRC): Remove it from the list.
7686 (BUILT_DISTFILES): Remove __gnuplot_raw__.cc from the list.
7687 (stamp-prereq): Don't depend on __gnuplot_raw__.cc.
7688 (maintainer-clean): Don't remove __gnuplot_raw__.cc.
7689 (__gnuplot_raw__.cc): Delete target.
7690 (__gnuplot_raw__.o, pic/__gnuplot_raw__.o): Delete targets.
7692 * mex.cc (calc_single_subscript_internal): New static function.
7693 (mxArray_octave_value::calc_single_subscript): Use it.
7694 (mxArray_matlab::calc_single_subscript): Use it.
7696 2008-01-07 John W. Eaton <jwe@octave.org>
7698 * src/pt-except.cc (tree_try_catch_command::eval):
7699 Set Vdebug_on_error and Vdebug_on_warning to false while executing
7702 * error.cc (Vdebug_on_error, Vdebug_on_warning): No longer static.
7703 * error.h: Provide decls.
7705 * gripes.cc (gripe_wrong_type_arg (const std::string&, const
7706 octave_value&, bool)): New function.
7707 * gripes.h: Provide decl.
7709 * oct-stream.cc (printf_value_cache::printf_value_cache):
7710 Reject structs, cells, objects, and lists.
7711 (octave_base_stream::do_printf): Quit early if printf_value_cache
7714 * parse.y (make_anon_fcn_handle): Don't attempt to convert
7715 expression to assignment to __retval__.
7717 2008-01-07 Michael Goffioul <michael.goffioul@gmail.com>
7719 * ov-builtin.h (octave_builtin): Tag with OCTINTERP_API.
7720 * ov-dld-fcn.h (octave_dld_function): Likewise.
7722 * ov-dld-fcn.cc (octave_dld_function::create): New function.
7723 * ov-dld-fcn.h: Provide decl.
7724 * defun.h (DEFINE_FUNX_INSTALLER_FUN3): Call it instead of
7725 creating a new octave_dld_function object directly.
7727 2008-01-04 John Swensen <jpswensen@comcast.net>
7729 * debug.cc (bp_table::do_remove_all_breakpoints_in_file):
7730 Avoid calling erase on invalid bp_map iterators.
7731 (bp_table::do_remove_breakpoint): Only try to delete breakpoints
7732 if some exist. Avoid calling erase on invalid bp_map iterators.
7733 (parse_dbfunction_params): Return early if ARGS is empty.
7734 New arg, WHO. Change all uses.
7735 Accept but do nothing with struct args.
7737 2008-01-04 Thomas Weber <thomas.weber.mail@gmail.com>
7739 * variables.cc (Fclear): Doc fix.
7741 2008-01-04 John W. Eaton <jwe@octave.org>
7743 * symtab.h (symbol_table:pop_scope): Avoid accessing beyond end of
7746 2008-01-04 David Bateman <dbateman@free.fr>
7748 * ov-mapper.cc (SPARSE_MAPPER_LOOP_2): Use data method instead of
7749 elem in the case where F(0) is non-zero.
7751 2007-12-28 John W. Eaton <jwe@octave.org>
7753 Merge changes from object branch:
7755 2007-12-12 John W. Eaton <jwe@octave.org>
7757 * load-path.cc (load_path::dir_info::get_file_list,
7758 load_path::move_method_map, load_path::remove_method_map,
7759 load_path::do_find_fcn, load_path::do_find_private_fcn,
7760 load_path::do_find_method, load_path::do_find_file,
7761 load_path::do_find_first_of, load_path::do_find_all_first_of,
7762 load_path::do_display, load_path::add_to_method_map, genpath,
7763 execute_pkg_add_or_del): Use file_ops::concat.
7765 2007-08-24 John W. Eaton <jwe@octave.org>
7767 * variables.cc (Fmislocked): return value for nargin == 0 case.
7769 2007-07-27 John W. Eaton <jwe@octave.org>
7771 * pt-idx.cc (tree_index_expression::rvalue):
7772 Pass substring of type to subsref when doing partial evaluation.
7773 (tree_index_expression::lvalue): Likewise.
7775 2007-06-29 John W. Eaton <jwe@octave.org>
7777 * ov-class.cc (is_built_in_class, set_class_relationship,
7778 Fsuperiorto, Finferiorto): New functions.
7779 (octave_class::in_class_method): New function.
7780 (octave_class::subsref, octave_class:subsasgn): Use it.
7782 2007-06-28 John W. Eaton <jwe@octave.org>
7784 * src/ov-class.cc (sanitize): New function.
7785 (make_idx_args): Use it.
7787 2007-06-28 John W. Eaton <jwe@octave.org>
7789 * src/ov-class.cc (octave_class::subsasgn): Expect and use only
7790 one return value from feval of subsasgn method.
7792 * ov.cc (octave_value::assign): Don't convert to struct if
7793 indexing a class object with ".".
7795 * pt-idx.cc (tree_index_expression::make_arg_struct):
7796 Use Cell instead of octave_value_list for subscripts.
7798 * ov-class.cc (make_idx_args): For "." index, subs field is
7801 2007-06-27 John W. Eaton <jwe@octave.org>
7803 * ov-fcn-handle.cc (octave_fcn_handle::save_ascii,
7804 octave_fcn_handle::load_ascii, octave_fcn_handle::save_binary,
7805 octave_fcn_handle::load_binary, octave_fcn_handle::save_hdf5,
7806 octave_fcn_handle::load_hdf5): Adapt to new symbol table objects.
7808 * symtab.h (symbol_table::all_variables,
7809 symbol_table::do_all_variables): New arg, defined_only.
7811 2007-06-26 John W. Eaton <jwe@octave.org>
7813 * ls-mat5.cc (read_mat5_binary_element): Adapt to new symbol table
7816 * variables.cc (Vwhos_line_format): New static variable.
7817 (Fwhos_line_format): New function.
7818 (symbol_record_name_compare): Delete function.
7819 (symbol_record_name_compare, whos_parameter): New structs.
7820 (print_descriptor, dimensions_string_req_first_space,
7821 dimensions_string_req_total_space, make_dimensions_string,
7822 parse_whos_line_format, print_symbol_info_line): New static
7823 functions, adapted from old symbol table class.
7824 (do_who): Adapt to new symbol table objects.
7826 * symtab.h (symbol_table::glob_variables): New functions.
7827 (symbol_table::do_glob): New argument, vars_only. Change all uses.
7829 2007-06-22 John W. Eaton <jwe@octave.org>
7831 * symtab.cc (symbol_table::fcn_info::fcn_info_rep::help_for_dispatch):
7833 * symtab.h: Provide decl.
7834 (symbol_table::fcn_info::help_for_dispatch,
7835 symbol_table::help_for_dispatch): New functions.
7837 * help.cc (help_from_symbol_table): Call
7838 symbol_table::help_for_dispatch instead of
7839 extract_help_from_dispatch.
7841 * help.cc (extract_help_from_dispatch): Delete.
7842 * help.h: Delete decl.
7844 2007-06-21 John W. Eaton <jwe@octave.org>
7846 * DLD-FUNCTIONS/dispatch.cc (class octave_dispatch): Delete class.
7847 (builtin, any_arg_is_magic_colon, dispatch_record): Delete functions.
7848 (Fbuiltin, Fdispatch): Adapt to new symbol table objects.
7850 * symtab.cc (symbol_table::fcn_info::fcn_info_rep::print_dispatch):
7852 * symtab.h: Provide decl.
7853 (symbol_table::fcn_info::print_dispatch, symbol_table::print_dispatch):
7856 * symtab.h (symbol_table::fcn_info::fcn_info_rep::clear_dispatch,
7857 symbol_table::fcn_info::clear_dispatch, symbol_table::clear_dispatch):
7860 * symtab.h (symbol_table::fcn_info::fcn_info_rep::get_dispatch,
7861 symbol_table::fcn_info::get_dispatch, symbol_table::get_dispatch):
7864 * symtab.cc (symbol_table::fcn_info::fcn_info_rep::find):
7865 Use leftmost class argument as dispatch type, or first argument if
7866 there are no class arguments.
7868 2007-06-20 John W. Eaton <jwe@octave.org>
7870 * ov-base.cc (Vprint_answer_id_name, Fprint_answer_id_name): Delete.
7871 (octave_base_value::print_with_name): Always print name.
7873 * ov-base.cc (Vsilent_functions): No longer static.
7874 * ov-base.h: Provide decl.
7876 * ov-class.cc (Fmethods): Define as command.
7878 * ov-class.cc (octave_class::print): Simply call print_raw.
7880 * ov-class.cc (octave_class::print_with_name): New function.
7881 * ov-class.h: Provide decl.
7883 2007-06-19 John W. Eaton <jwe@octave.org>
7885 * ov.cc (octave_value::do_unary_op, octave_value::do_binary_op):
7886 Handle class methods.
7888 * ov.cc (octave_value::unary_op_fcn_name,
7889 octave_value::binary_op_fcn_name): New functions.
7890 * ov.h: Provide decls.
7892 * ov-typeinfo.cc (octave_value_typeinfo::register_unary_class_op,
7893 octave_value_typeinfo::register_binary_class_op,
7894 octave_value_typeinfo::do_register_unary_class_op,
7895 octave_value_typeinfo::do_register_binary_class_op,
7896 octave_value_typeinfo::do_lookup_unary_class_op,
7897 octave_value_typeinfo::do_lookup_binary_class_op): New functions.
7898 * ov-typeinfo.h: Provide decls.
7900 * ov-typeinfo.h (octave_value_typeinfo::unary_class_op_fcn,
7901 octave_value_typeinfo::binary_class_op_fcn): New typedefs.
7902 (octave_value_typeinfo::unary_class_ops,
7903 octave_value_typeinfo::binary_class_ops): New data members.
7904 (octave_value_typeinfo::octave_value_typeinfo): Initialize them.
7905 (octave_value_typeinfo::lookup_unary_class_op,
7906 octave_value_typeinfo::lookup_binary_class_op): New functions.
7908 * OPERATORS/op-class.cc: New file.
7909 * Makefile.in (OP_XSRC): Add it to the list.
7911 * ov.cc (install_types): Call octave_class::register_type here.
7913 * ov-class.h (octave_class): Implement by containing a map object
7914 instead of deriving from octave_struct.
7915 * ov-class.cc (octave_class::subsref, octave_class::subsasgn):
7916 Don't use octave_class implementation as default action.
7918 * ov.h, ov.cc (octave_value::octave_value (const Octave_map&, const
7919 std::string&)): New constructor.
7921 2007-06-18 John W. Eaton <jwe@octave.org>
7923 * ov-class.cc (octave_class::subsref, octave_class::subsasgn):
7924 Handle dispatch to user-defined methods.
7926 * parse.y (load_fcn_from_file): New arg, dispatch_type.
7929 * ov-fcn.h (octave_function::is_class_constructor,
7930 octave_function::is_class_method, octave_function::dispatch_class):
7931 New virtual functions.
7933 * ov-usr-fcn.h (octave_user_function::dispatch_class,
7934 octave_usr_function::stash_dispatch_class): New functions.
7935 (octave_usr_fucntion::xdispatch_class): New data member.
7936 * parse.y (frob_function): Call stash_dispatch_class here.
7938 * ov-struct.cc (Ffieldnames): Also handle objects.
7940 * ov-class.cc (Fmethods): New function.
7941 * load-path.cc (load_path::do_methods): New function.
7942 * load-path.h (load_path::methods): New function.
7944 * ov.h (octave_value::is_object): New function.
7945 * ov-base.h (octave_base_value::is_object): New virtual function.
7946 * ov-class.h (octave_class::is_object): New function.
7947 * ov-class.cc (Fisobject): New function.
7949 2007-06-15 John W. Eaton <jwe@octave.org>
7951 * ov-class.cc (octave_class::print): Call display method if found.
7953 * symtab.h (symbol_table::fcn_info::find_method): New function.
7954 (symbol_table::find_method): New function.
7955 (symbol_table::fcn_info::fcn_info_rep::find_method): Provide decl.
7956 * symtab.cc (symbol_table::fcn_info::fcn_info_rep::find_method):
7958 (symbol_table::fcn_info::fcn_info_rep::find): Use it.
7960 2007-06-14 John W. Eaton <jwe@octave.org>
7962 * symtab.h (symbol_table::clear_mex_functions): Make it work.
7963 (symbol_table::fcn_info::fcn_info_rep::clear_mex_function,
7964 symbol_table::fcn_info::clear_mex_function): New functions.
7966 2007-06-08 John W. Eaton <jwe@octave.org>
7968 * defun.cc (Falias): Delete.
7970 * variables.cc (load_fcn_try_ctor): New function.
7971 (lookup): call load_fcn_try_ctor instead of load_fcn_from_file.
7973 * variables.cc, variables.h (at_top_level, lookup_by_name, lookup,
7974 initialize_symbol_tables, fcn_out_of_date, symbol_out_of_date,
7975 lookup_function, lookup_user_function, link_to_global_variable,
7976 link_to_builtin_or_function, force_link_to_function, Fdocument,
7977 is_local_variable, do_clear_all, do_clear_functions,
7978 do_clear_globals, do_clear_variables, do_clear_function,
7979 do_clear_global, do_clear_variable, do_clear_symbol,
7980 do_clear_function_pattern, do_clear_global_pattern,
7981 do_clear_variable_pattern, do_clear_symbol_pattern,
7982 clear_function, clear_variable, clear_symbol):
7983 Delete (some functionality moved to the new symtab.cc and some is
7985 (Fignore_function_time_stamp): Move to symtab.cc.
7987 * lex.l (lookup_identifier): Delete.
7989 * parse.y (is_function_file): New function.
7990 (load_fcn_from_file): Return pointer to octave_function, not bool.
7992 * ov-usr-fcn.h, ov-usr-fcn.cc (octave_user_function::argn_sr,
7993 octave_user_function::nargin_sr, octave_user_function::nargout_sr,
7994 octave_user_function::varargin_sr): Delete data members.
7995 (octave_user_function::install_automatic_vars): Delete.
7996 (octave_user_script::do_multi_index_op): New function.
7998 * ov-fcn.h (octave_function::locked, octave_function::my_dir_name):
8000 (octave_function::dir_name, octave_function::stash_dir_name,
8001 octave_function::lock, octave_function::unlock,
8002 octave_function::islocked): New functions.
8004 * of-fcn-handle.h, ov-fcn-handle.cc (octave_fcn_handle::subsref):
8005 Call out_of_date_check here to simplify time stamp checking.
8006 (octave_fcn_handle::reload_warning): Delete.
8008 * ov.h (octave_value::is_user_script, octave_value::is_user_function):
8010 * ov-base.h (octave_base_value::is_user_script,
8011 octave_base_value::is_user_function): New pure virtual functions.
8012 * ov-fcn.h (octave_function::is_user_script,
8013 octave_function::is_user_function): Delete.
8015 * load-save.cc (install_loaded_variable): Greatly simplify.
8017 * load-path.h, load-path.cc: Change private_fcn_file to private_file.
8018 (load_path::private_fcn_map): New data member.
8019 (load_path::do_add, load_path::do_remove, load_path::do_update):
8020 Also manage private_file_map here.
8021 (load_path::add_to_private_fcn_map): New function.
8022 (load_path::remove_private_fcn_map): New function.
8023 (load_path::do_find_private_fcn): Make it work.
8024 (get_file_list): New function.
8025 (load_path::do_display): Use it. Display private map.
8026 (load_path::find_method, load_path::find_fcn): Handle directory name.
8028 * token.cc, token.h, toplev.cc, debug.cc, defun.cc, defun-dld.h,
8029 defun-int.h, error.cc, help.cc, load-save.h, load-save.cc, mex.cc,
8030 octave.cc, ov-fcn-handle.cc, ov-usr-fcn.cc, parse.h, parse.y,
8031 lex.l, variables.cc: Adapt to new symbol table objects (my
8032 apologies for the lack of detail).
8034 * unwind-prot.h (unwind_protect::add): Set default value for ptr arg.
8036 * pt-stmt.cc (tree_statement::eval): Rework method for deciding
8037 whether to assign value to ans.
8039 * pt-idx.cc (tree_index_expression::rvalue):
8040 Looking up symbol may evaluaate first args now.
8042 * pt-id.h, pt-id.cc (tree_identifier::document,
8043 tree_identifier::is_defined, tree_identifier::define,
8044 tree_identifier::is_function, tree_identifier::lookup,
8045 tree_identifier::link_to_global): Delete.
8046 (tree_identifier::do_lookup): Simplify.
8047 (tree_identifier::rvalue): Looking up symbol can't execute script now.
8049 * pt-misc.cc (tree_parameter_list::initialize_undefined,
8050 tree_parameter_list::is_defined): Call is_variable for elt, not
8053 * pt-fcn-handle.h (tree_anon_fcn_handle::fcn): Now pointer to
8054 octave_user_function, not value. Change all uses.
8056 * pt-decl.h (tree_decl_command::initialized): Delete data member.
8057 (tree_decl_elt::is_variable): New function.
8058 * pt-decl.cc: Fix all uses of tree_decl_command::initialized.
8060 * ls-hdf5.cc, ls-mat-ascii.cc, ls-mat4.cc, ls-mat5.cc,
8061 ls-oct-ascii.cc, ls-oct-binary.cc, input.cc: Don't include symtab.h.
8063 * dynamic-ld.h, dynamic-ld.cc (octave_dynamic_loader::load_oct,
8064 octave_dynamic_loader::load_mex, octave_dynamic_loader::do_load_oct,
8065 octave_dynamic_loader::do_load_mex): Adapt to new symbol table
8066 objects. Return pointer octave_function instead of bool.
8068 * DLD-FUNCTIONS/dispatch.cc (Fbuiltin): Disable for now.
8069 Disable code that works with old symbol tables.
8070 (Fbuiltin): Simply call symbol_table::add_dispatch.
8072 * pt-arg-list.cc, pt-arg-list.h, pt-assign.cc, pt-assign.h,
8073 pt-binop.cc, pt-binop.h, pt-bp.h, pt-cell.cc, pt-cell.h,
8074 pt-cmd.cc, pt-cmd.h, pt-colon.cc, pt-colon.h, pt-const.cc,
8075 pt-const.h, pt-decl.cc, pt-decl.h, pt-except.cc, pt-except.h,
8076 pt-exp.h, pt-fcn-handle.cc, pt-fcn-handle.h, pt-id.cc, pt-id.h,
8077 pt-idx.cc, pt-idx.h, pt-jump.cc, pt-jump.h, pt-loop.cc, pt-loop.h,
8078 pt-mat.cc, pt-mat.h, pt-misc.cc, pt-misc.h, pt-select.cc,
8079 pt-select.h, pt-stmt.cc, pt-stmt.h, pt-unop.cc, pt-unop.h:
8080 Adapt dup functions to use scope instead of symbol_table objects.
8082 * TEMPLATE-INST/Array-sym.cc: Delete.
8083 * Makefile.in (TI_XSRC): Remove it from the list.
8085 * symtab.h, symtab.cc: Replace with new versions.
8087 2007-05-16 John W. Eaton <jwe@octave.org>
8089 * oct-lvalue.cc, oct-lvalue.h (octave_lvalue::chg_fcn): Delete.
8092 2007-05-15 John W. Eaton <jwe@octave.org>
8094 * load-path.cc (load_path::do_find_private_function): New function.
8095 * load-path.h (load_path::do_find_private_function): Provide decl.
8096 (load_path::find_private_function): New function.
8098 2007-05-08 John W. Eaton <jwe@octave.org>
8100 * pt-idx.cc (tree_index_expression::rvalue): Handle dispatch here.
8102 * pt-id.cc (tree_identifier::is_variable, tree_identifier::lookup):
8104 * pt-id.cc: Provide decls.
8106 * parse.y (current_class_name): New global variable.
8107 * parse.h: Provide decl.
8109 * parse.y (load_fcn_from_file, parse_fcn_file):
8110 New arg, dispatch_type.
8111 (parse_fcn_file): Protect current_class_name and set it to
8112 dispatch_type before parsing function.
8113 (load_fcn_from_file): If dispatch_type is not empty, call
8114 load_path::find_method instead of load_path::find_fcn.
8115 * parse.h: Fix decls for extern functions.
8117 * lex.h (lexical_feedback::parsing_class_method): New data member.
8118 * lex.l (lexical_feedback::init): Initialize it.
8119 (lookup_identifier): Check it and set sym_name accordingly.
8121 * ov-usr-fcn.h (octave_user_function::mark_as_class_constructor,
8122 octave_user_function::is_class_constructor,
8123 octave_user_function::mark_as_class_method,
8124 octave_user_function::is_class_method): New functions.
8125 (octave_user_function::class_constructor,
8126 octave_user_function::class_method): New data members.
8127 * ov-usr-fcn.cc (octave_user_function::octave_user_function):
8130 * load-path.h, load-path.cc: Use typedefs to simplify template decls.
8131 Use fcn consistently instead of function.
8133 2007-05-03 John W. Eaton <jwe@octave.org>
8135 * ov-class.cc (Fclass): Move here.
8136 * ov-typeinfo.cc: From here.
8138 * input.cc (octave_gets): Call load_path::update if user input
8139 contains something other than one of the characters " \t\n\r".
8141 * ov-class.cc, ov-class.h: New files.
8142 * Makefile.in: Add them to the appropriate lists.
8144 * load-path.cc (genpath): Skip directories beginning with "@".
8145 (load_path::dir_info::get_file_list): Don't return anything.
8146 Call get_private_function_map here.
8147 (load_path::dir_info::initialize): Not here.
8148 (load_path::dir_info_::get_method_file_map): New function.
8149 (load_path::method_map): New data member.
8150 (load_path::do_clear): Also clear method_map.
8151 (load_path::do_add): Also call add_to_method_map.
8152 (load_path::do_update): Also clear method_map and call
8153 (load_path::do_find_method): New function.
8154 (load_path::do_add_to_method_map): New function.
8155 (load_path::move_fcn_map, load_path::move_method_map): New functions.
8156 (load_path::move): Use them.
8157 (load_path::remove_fcn_map, load_path::remove_method_map):
8159 (load_path::remove): Use them.
8160 * load-path.h: Provide/fix decls.
8161 (load_path::find_method): New static function.
8163 * Makefile.in (%.df : %.cc): Use mv instead of
8164 $(simple-move-if-change-rule).
8166 2007-12-21 John W. Eaton <jwe@octave.org>
8168 Version 3.0.0 released.
8170 * version.h (OCTAVE_VERSION): Now 3.0.0.
8171 (OCTAVE_API_VERSION): Now api-v32.
8172 (OCTAVE_RELEASE_DATE): Now 2007-12-21.
8174 2007-12-19 Thomas Kasper <ThomasKasper@gmx.net>
8176 * OPERATORS/op-scm-cs.cc (DEFBINOP (pow)): Extract complex value
8179 2007-12-12 David Bateman <dbateman@free.fr>
8181 * DLD-FUNCTIONS/sparse.cc (Fsparse): Check for scalar arguments
8182 for 2 argument version.
8184 2007-12-12 John W. Eaton <jwe@octave.org>
8186 * graphics.h.in (class axes) Add the layer property.
8187 * graphics.cc (class axes) Ditto.
8189 * graphics.cc (gh_manager::get_handle): Use ceil instead of trunc.
8191 2007-12-11 John W. Eaton <jwe@octave.org>
8193 * version.h (OCTAVE_VERSION): Now 2.9.19+.
8195 2007-12-11 John W. Eaton <jwe@octave.org>
8197 * version.h (OCTAVE_VERSION): Now 2.9.19.
8198 (OCTAVE_API_VERSION): Now api-v31.
8199 (OCTAVE_RELEASE_DATE): Now 2007-12-11.
8201 * graphics.cc (make_graphics_object):
8202 If successful, call __request_drawnow__.
8204 * input.cc (Vgud_mode): New static variable.
8205 (F__gud_mode__): New function.
8206 (get_user_input): If debug and Vgud_mode, print location info in
8207 format for Emacs GUD mode.
8209 2007-12-11 David Bateman <dbateman@free.fr>
8211 * OPERATORS/op-bm-sbm.cc, OPERATORS/op-b-sbm.cc,
8212 OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc,
8213 OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc,
8214 OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc,
8215 OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc: Privilege
8216 conversion to dense matrices for compatibility.
8218 * DLD-FUNCTIONS/sparse.cc (FSparse): Remove the mutate flag, as
8219 default bahavior is now to keep matrix sparse always.
8221 * graphics.cc (axes::properties::properties):
8222 Initialize xcolor, ycolor, and zcolor to (0, 0, 0).
8224 * graphics.h.in (gh_manager::next_handle): Now double.
8225 * graphics.cc (gh_manager::get_handle, gh_manager::gh_manager):
8226 Set fractional part of next_handle to a random value.
8228 2007-12-10 John W. Eaton <jwe@octave.org>
8230 * ov-cell.cc (octave_cell::all_strings): Handle empty elements.
8231 Handle N-d cell arrays.
8233 * DLD-FUNCTIONS/fsolve.cc (Ffsolve):
8234 For compatibility, return [x, fval, info] instead of [x, info, msg].
8235 Move tests here from test/test_nonlin.m.
8237 * OPERATORS/op-cm-s.cc: Define function for el_mul with
8238 DEFNDBINOP_OP, not DEFBINOP_OP.
8240 * OPERATORS/op-s-cm.cc: Define functions for el_and and el_or
8241 operators with DEFNDBINOP_FN.
8243 * oct-hist.cc (default_history_file): Use file_ops::concat.
8244 * load-path.cc (dir_info::initialize, dir_info::get_file_list,
8245 load_path::do_find_fcn, load_path::do_find_file, genpath,
8246 execute_pkg_add_or_del, load_path::do_find_first_of,
8247 load_path::do_find_all_first_of): Likewise.
8249 * help.cc (Flookfor): Avoid doubling directory separator.
8250 * dirfns.cc (Fmkdir): Likewise.
8252 * pt-mat.cc (tree_matrix::rvalue): Produce sq_string if any
8253 strings are sq_string objects.
8255 2007-12-10 David Bateman <dbateman@free.fr>
8257 * graphics.h.in (data_property::data): Declare as NDArray instead
8258 of Matrix. Change all uses.
8260 2007-12-10 Shai Ayal <shaiay@users.sourceforge.net>
8262 * graphics.h.in (class figure) Add the color property.
8263 * graphics.cc (class figure) Ditto.
8265 2007-12-07 David Bateman <dbateman@free.fr>
8267 * data.cc (Fnorm): Don't return a scalar stored as a sparse
8268 matrix. Convert it to a scalar.
8270 * graphics.cc (check_limit_val): Delete.
8271 (check_limit_vals): Simplify and no longer use check_limit_val.
8273 2007-12-05 John W. Eaton <jwe@octave.org>
8275 * version.h (OCTAVE_VERSION): Now 2.9.18+.
8277 2007-12-05 John W. Eaton <jwe@octave.org>
8279 * version.h (OCTAVE_VERSION): Now 2.9.18.
8280 (OCTAVE_API_VERSION): Now api-v30.
8281 (OCTAVE_RELEASE_DATE): Now 2007-12-05.
8283 2007-12-04 John W. Eaton <jwe@octave.org>
8285 * Makefile.in (INCLUDES): Add builtins.h to the list.
8287 * src/oct-hist.cc (default_history_file): Use += instead of
8288 push_back to append character to std::string object.
8290 * Makefile.in (LIBDLFCN): Delete all uses.
8292 * toplev.cc (octave_config_info): Remove LIBDLFCN and
8293 DLFCN_INCFLAGS from the list.
8294 * oct-conf.h.in (OCTAVE_CONF_DLFCN_INCFLAGS, OCTAVE_CONF_LIBDLFCN):
8297 * error.cc (Ferror): Handle error id.
8299 * load-save.cc (Fsave, Fload): Doc fixes.
8300 From Marco Caliari <caliari@sci.univr.it>.
8302 2007-12-04 Shai Ayal <shaiay@users.sourceforge.net>
8304 * graphics.h.in (base_properties::get_type
8305 base_properties::get___modified__,
8306 base_properties::get___myhandle__): New functions.
8308 2007-12-04 Christoph Mayer <Christoph.Mayer@dlr.de>.
8310 * toplev.h (clean_up_and_exit, recover_from_exception,
8311 do_octave_atexit, global_command, curr_parent_function):
8312 Tag with OCTINTERP_API.
8314 2007-12-03 David Bateman <dbateman@free.fr>
8316 * DLD-FUNCTIONS/luinc.cc: Make tests conditional on HAVE_UMFPACK.
8317 * DLD-FUNCTIONS/spqr.cc: Make tests conditional on HAVE_CXSPARSE.
8319 * DLD-FUNCTIONS/regexp.cc: Use "%!testif" blocks for conditional
8322 * graphics.cc (class axes): Add color and activepositionproperty
8323 properties to axis objects.
8324 * graphics.h.in (class axes): ditto.
8326 * DLD-FUNCTIONS/regexp.cc: Also include sys/types.h for regexp.
8328 2007-11-30 John W. Eaton <jwe@octave.org>
8330 * DLD-FUNCTIONS/sort.cc (operator < (const Complex&, const Complex&),
8331 operator > (const Complex&, const Complex&)):
8332 Pass args by const reference, not value.
8334 * src/data.cc, src/matherr.c, src/pr-output.cc, src/sysdep.cc,
8335 src/DLD-FUNCTIONS/__dsearchn__.cc, src/DLD-FUNCTIONS/minmax.cc,
8336 src/DLD-FUNCTIONS/qz.cc, src/DLD-FUNCTIONS/sort.cc,
8337 src/DLD-FUNCTIONS/tsearch.cc: Include lo-math.h instead of cmath
8340 2007-11-30 Moritz Borgmann <octave@moriborg.de>
8342 * ls-mat5.h (mat5_data_type): Delete trailing comma in enum decl.
8343 * oct-stream.cc (octave_base_stream::do_printf): Use
8344 OCTAVE_EMPTY_CPP_ARG to avoid annoying Sun compiler warning.
8345 * OPERATORS/op-sbm-sbm.cc (DEFDBLCONVFN): Delete useless macro
8348 * DLD-FUNCTIONS/typecast.cc (typecast): No longer static.
8350 2007-11-30 John W. Eaton <jwe@octave.org>
8352 * graphics.cc (updating_axis_limits): New static variable.
8353 (check_limit_val, check_limit_vals, get_axis_limits): New functions.
8354 (axes::update_axis_limits): Make it work.
8355 * graphics.h.in (base_properties::get_children): New function.
8356 (base_properties::get_xdata, base_properties::get_ydata,
8357 base_properties::get_zdata, base_properties::get_ldata,
8358 base_properties::get_udata, base_properties::get_xldata,
8359 base_properties::get_xudata, base_properties::get_cdata,
8360 base_properties::get_properties (void) const):
8361 New virtual functions.
8362 (graphics_object::get_xdata, graphics_object::get_ydata,
8363 graphics_object::get_zdata, graphics_object::get_ldata,
8364 graphics_object::get_udata, graphics_object::get_xldata,
8365 graphics_object::get_xudata, graphics_object::get_cdata,
8366 graphics_object::get_properties (void) const,
8367 root_figure::get_properties (void) const,
8368 figure::get_properties (void) const,
8369 axes::get_properties (void) const,
8370 line::get_properties (void) const,
8371 text::get_properties (void) const,
8372 image::get_properties (void) const,
8373 patch::get_properties (void) const,
8374 surface::get_properties (void) const)): New functions.
8375 (radio_property::radio_property (const radio_values&)):
8376 Provide default value for argument.
8377 (radio_property::radio_property (const radio_values&, const
8378 std::string&)): Delete.
8379 (axes::xlimmode, axes::ylimmode, axes::zlimmode, axes::climmode,
8380 axes::xscale, axes::yscale, axes::zscale): Declare as
8381 radio_property instead of octave_value values. Adjust all uses.
8383 2007-11-29 John W. Eaton <jwe@octave.org>
8385 * pr-output.cc (octave_print_internal_template (std::ostream&,
8386 const octave_int<T>&, bool)): Rename from octave_print_internal.
8387 (PRINT_INT_SCALAR_INTERNAL): New macro. Use it to define
8388 non-template functions for printing scalar octave_int values.
8389 (octave_print_internal_template (std::ostream&, const intNDArray<T>&,
8390 bool, int)): Rename from octave_print_internal.
8391 (PRINT_INT_ARRAY_INTERNAL): New macro. Use it to define
8392 non-template functions for printing scalar octave_int values.
8393 * pr-output.h: Declare non-template functions for printing
8394 octave_int scalar and array values.
8395 Delete declarations of template funtions for printing octave_int
8396 scalar and array values.
8398 2007-11-28 John W. Eaton <jwe@octave.org>
8400 * graphics.cc (base_properties::update_axis_limits,
8401 axes::update_axis_limits): New functions.
8402 * graphics.h.in (class data_property): New class.
8403 (graphics_object::update_axis_limits): New function.
8404 (base_graphics_object::update_axis_limits): New virtual function.
8405 (base_properties::update_axis_limits, axes::update_axis_limits):
8407 (class line, class image, class patch, class surface): Use it
8408 instead of octave_value for data properties. Tag data properties
8410 (class axes): Tag scale properties with "l" modifier.
8411 * genprops.awk: Handle "l" modifier.
8413 * mkbuiltins: Emit #include "builtins.h" for the builtins.cc file.
8414 From Christoph Mayer <Christoph.Mayer@dlr.de>.
8416 * TEMPLATE-INST/Array-tc.cc (resize_fill_value<octave_value>):
8419 * Cell.cc (Cell::Cell (const dim_vector&, const string_vector&, bool)):
8420 Initialize undefined values to resize_fill_value ().
8422 2007-11-27 John W. Eaton <jwe@octave.org>
8424 * TEMPLATE-INST/Array-tc.cc (resize_fill_value<octave_value>):
8425 Tag inline. From Moritz Borgmann <octave@moriborg.de>.
8427 * pt-bp.cc (tree_breakpoint::visit_decl_command): Also check line
8429 * pt-decl.cc (tree_global_command::eval, tree_static_command::eval):
8430 Insert MAYBE_DO_BREAKPOINT here.
8432 * error.cc (Fwarning): If setting state "all" to "error", leave
8433 Octave:matlab-incompatible and Octave:single-quote-string warning
8435 (warning_enabled): Allow individual warning states to override
8436 "warning error all".
8438 * octave.cc (execute_eval_option_code, execute_command_line_file):
8440 * toplev.cc (recover_from_exception): Now extern.
8441 * toplev.h (recover_from_exception): Provide decl.
8443 * pt-idx.cc (tree_index_expression::lvalue): Treat object == []
8444 the same as undefined.
8446 2007-11-26 John W. Eaton <jwe@octave.org>
8448 * oct-stream.cc (DO_DOUBLE_CONV): Always use long.
8450 * oct-stream.cc (do_write): Call float_value and double_value on
8451 octave_int<T> objects instead of relying on conversion operators.
8453 * ls-mat5.cc (read_mat5_binary_element, OCTAVE_MAT5_INTEGER_READ):
8454 Call double_value on octave_int<T> objects
8455 instead of relying on conversion operator.
8456 (read_mat5_binary_file_header):
8457 Call char_value on octave_int<T> objects
8458 instead of relying on conversion operator.
8459 (read_mat5_binary_element):
8460 Call bool_value on octave_int<T> objects
8461 instead of relying on conversion operator.
8463 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::double_value,
8464 OCTAVE_VALUE_INT_MATRIX_T::scalar_value,
8465 OCTAVE_VALUE_INT_MATRIX_T::matrix_value,
8466 OCTAVE_VALUE_INT_MATRIX_T::complex_matrix_value,
8467 OCTAVE_VALUE_INT_MATRIX_T::array_value,
8468 OCTAVE_VALUE_INT_MATRIX_T::complex_array_value,
8469 OCTAVE_VALUE_INT_SCALAR_T::double_value,
8470 OCTAVE_VALUE_INT_SCALAR_T::scalar_value,
8471 OCTAVE_VALUE_INT_SCALAR_T::matrix_value,
8472 OCTAVE_VALUE_INT_SCALAR_T::complex_matrix_value,
8473 OCTAVE_VALUE_INT_SCALAR_T::array_value,
8474 OCTAVE_VALUE_INT_SCALAR_T::complex_array_value,
8475 Call double_value on octave_int<T> objects
8476 instead of relying on conversion operator.
8477 (OCTAVE_VALUE_INT_MATRIX_T::bool_array_value,
8478 OCTAVE_VALUE_INT_SCALAR_T::bool_array_value):
8479 Call bool_value on octave_int<T> objects
8480 instead of relying on conversion operator.
8481 (OCTAVE_VALUE_INT_MATRIX_T::char_array_value,
8482 OCTAVE_VALUE_INT_SCALAR_T::char_array_value):
8483 Call char_value on octave_int<T> objects
8484 instead of relying on conversion operator.
8486 2007-11-26 David Bateman <dbateman@free.fr>
8488 * Sparse-op-defs.h (SPARSE_BASE_REDUCTION_OP): Check that the fill
8489 value is not zero before creating the matrices.
8491 * graphics.cc (class axes): Add the {x|y|z}color color property.
8492 * graphics.h.in (class axes): ditto.
8494 * ov-base.cc (Vsparse_auto_mutate, Fsparse_auto_mutate): New
8495 internal variable and built-in function to set it.
8496 * ov-base.h (extern bool Vsparse_auto_mutate): Export internal
8497 variable to other functions.
8498 * ov-re-sparse.cc (octave_sparse_matrix::try_narrowing_conversion
8499 (void)), ov-cx-sparse.cc
8500 (octave_sparse_complex_matrix::try_narrowing_conversion (void)),
8502 (octave_sparse_bool_matrix::try_narrowing_conversion (void)):
8503 Use Vsparse_auto_mutate flag to determine whether to convert
8504 sparse matrices to full matrices if that saves space.
8506 * DLD-FUNCTIONS/minmax.cc (MINMAX_DOUBLE_BODY): New version of
8507 MINMAX_BODY macro without the initialization.
8508 (MINMAX_INT_BODY): Macro for min/max for the integer types
8509 (MINMAX_BODY): New macro that calls the appropriate instantiation
8510 of the other two macros.
8512 * graphics.cc (class axes): Add __colorbar__ property.
8513 * graphics.h.in (class axes): ditto.
8515 * data.cc (Fnorm): Document the "inf" string argument for matrice
8516 and vectors and the "fro" argument for vectors.
8518 * graphics.h.in (class figure): Add __enhanced__ property to cache
8519 whether the terminal supports enhanced mode. Add interpreter
8520 property to all text classes, to determine the renderer for the
8522 * graphics.cc (class figure): ditto.
8524 2007-11-26 Shai Ayal <shaiay@users.sourceforge.net>
8526 * graphics.cc (string_properties): delete class
8527 (property_name): rename class to caseless_str.
8528 (radio_values::possible_vals): change type to caseless_str.
8530 2007-11-26 Michael Goffioul <michael.goffioul@gmail.com>
8532 * builtins.h (install_builtins): Tag with OCTINTERP_API.
8533 * toplev.h (octave_interpreter_ready, octave_initialized): Likewise.
8535 2007-11-14 John W. Eaton <jwe@octave.org>
8537 * mex.cc (mex::foreign_memlist): New data member.
8538 (mex::mark_foreign, mex::unmark_foreign): New functions.
8539 (mex::free): Don't warn about pointers found in foreign_memlist.
8540 (maybe_mark_foreign): New function.
8541 (mxArray_octave_value::get_data, mxArray_octave_value::get_ir,
8542 mxArray_octave_value::get_jc):
8543 Call maybe_mark_foreign on returned pointer.
8545 2007-11-14 David Bateman <dbateman@free.fr>
8547 * mex.cc (mxArray_sparse::mxArray_sparse (const mxArray_sparse&)):
8548 Also ensure that pr and pi are correctly copied.
8550 2007-11-14 John W. Eaton <jwe@octave.org>
8552 * Makefile.in (@bsd_gcc_kluge_targets_frag@): Delete line for
8553 Makefrag.bsd substitution.
8555 * graphics.h.in (base_properties::tag): New property.
8556 (base_properties::get_tag, base_properties::set_tag): New functions.
8557 (root_figure::set, root_figure::get, figure::set, figure::get,
8558 axes::set, axes::get, line::set, line::get, text::set, text::get,
8559 patch::set, patch::get, surface::set, surface::get): Handle tag.
8561 2007-11-14 Joseph P. Skudlarek <Jskud@Jskud.com>
8563 * DLD-FUNCTIONS/regexp.cc: Undo previous change.
8565 2007-11-14 John W. Eaton <jwe@octave.org>
8567 * mex.cc (mex::mark, mex::unmark): Now public.
8568 (mex::persistent): Delete.
8569 (mexMakeArrayPersistent): Call maybe_unmark_array instead of
8571 (mexMakeMemoryPersistent): Call maybe_unmark instead of
8573 (maybe_unmark (void *)): New function.
8574 (mxSetDimensions, mxSetPr, mxSetPi, mxSetData, mxSetImagData,
8575 mxSetIr, mxSetJc): Use it. From David Bateman.
8577 2007-11-13 Joseph P. Skudlarek <Jskud@Jskud.com>
8579 * DLD-FUNCTIONS/rand.cc (Frand): Update URL reference in doc string.
8581 2007-11-12 David Bateman <dbateman@free.fr>
8583 * graphics.h.in, graphics.cc (class text): Add the fontangle and
8584 fontweight properties. Add string_property class to handle the
8585 string radio values.
8587 2007-11-12 John W. Eaton <jwe@octave.org>
8589 * version.h (OCTAVE_VERSION): Now 2.9.17+.
8591 2007-11-12 David Bateman <dbateman@free.fr>
8593 * graphics.h.in, graphics.cc (class text): Add the fontname and
8594 fontsize properties.
8596 2007-11-10 John W. Eaton <jwe@octave.org>
8598 * version.h (OCTAVE_VERSION): Now 2.9.17.
8599 (OCTAVE_API_VERSION): Now api-v29.
8600 (OCTAVE_RELEASE_DATE): Now 2007-11-10.
8602 2007-11-09 John W. Eaton <jwe@octave.org>
8604 * DLD-FUNCTIONS/__gnuplot_raw__.l: Don't add atexit ("closeplot")
8607 2007-11-09 David Bateman <dbateman@free.fr>
8609 * graphics.cc, graphics.h.in (class patch): Add the field "keylabel".
8611 * data.cc (Fcputime) [__WIN32__]: Correct scaling of sys and usr times.
8613 * graphics.cc (is_handle): Handle must be a real scalar.
8615 2007-11-09 Joseph P. Skudlarek <Jskud@Jskud.com>
8617 * data.cc (Fislogical): Fix typo in documentation entry.
8619 2007-11-08 John W. Eaton <jwe@octave.org>
8621 * DLD-FUNCTIONS/__gnuplot_raw__.l (F__gnuplot_save_data__):
8622 Note obsolescence in doc string.
8623 (WARN_OBSOLETE): New macro
8624 (F__gnuplot_save_data__, Fgnuplot_command_plot,
8625 Fgnuplot_command_replot, Fgnuplot_command_splot,
8626 Fgnuplot_command_using, Fgnuplot_command_with,
8627 Fgnuplot_command_axes, Fgnuplot_command_title,
8628 Fgnuplot_command_end, Fgnuplot_use_title_option,
8629 F__clear_plot_window__, Fcloseplot, Fpurge_tmp_files,
8630 F__gnuplot_raw__, F__gnuplot_send_inline_data__, F__gnuplot_set__,
8631 F__gnuplot_show__, F__gnuplot_plot__, F__gnuplot_splot__,
8632 F__gnuplot_replot__): Use WARN_OBSOLETE.
8634 2007-11-07 John W. Eaton <jwe@octave.org>
8636 * DLD-FUNCTIONS/regexp.cc: Handle HAVE_PCRE_PCRE_H. Check
8637 HAVE_PCRE_H instead of HAVE_PCRE to decide whether to include pcre.h.
8639 * DLD-FUNCTIONS/__gnuplot_raw__.l (Fgnuplot_command_plot,
8640 Fgnuplot_command_replot, Fgnuplot_command_splot,
8641 Fgnuplot_command_using, Fgnuplot_command_with,
8642 Fgnuplot_command_axes, Fgnuplot_command_title,
8643 Fgnuplot_command_end, Fgnuplot_use_title_option,
8644 F__clear_plot_window__, Fcloseplot, Fpurge_tmp_files,
8645 F__gnuplot_raw__, F__gnuplot_send_inline_data__, F__gnuplot_set__,
8646 F__gnuplot_show__, F__gnuplot_plot__, F__gnuplot_splot__,
8647 F__gnuplot_replot__): Note obsolescence in doc string.
8649 2007-11-06 Kai Habel <kai.habel@gmx.de>
8651 * graphics.h.in (class surface::properties): New properties,
8652 cdata, facecolor, facealpha, edgecolor, linestyle,
8653 linewidth, marker, markeredgecolor, markerfacecolor, markersize.
8654 * graphics.cc (surface::properties::properties,
8655 surface::properties::set, surface::properties::get,
8656 surface::properties::factory_defaults): Handle new properities.
8658 2007-11-06 David Bateman <dbateman@free.fr>
8660 * data.cc (DATA_REDUCTION): Handle the 'native' and 'double'
8661 arguments of the Fsum function.
8662 * OPERATORS/op-bm-bm.cc (matrix_to_bool_matrix,
8663 scalar_to_bool_matrix): New type conversion functions.
8664 (install_bm_bm_ops): Install new type conversions functions.
8666 2007-11-06 Michael Goffioul <michael.goffioul@gmail.com>
8668 * toplev.cc (Fsystem) [__WIN32__ && ! __CYGWIN__]:
8669 Quote the complete command.
8671 2007-11-06 John W. Eaton <jwe@octave.org>
8673 * data.cc (Fnorm): New tests.
8675 * defun-int.h (DEFINE_FUNX_INSTALLER_FUN3): Don't install function
8676 if check_version produces an error.
8678 2007-11-05 John W. Eaton <jwe@octave.org>
8680 * pt-idx.cc (tree_index_expression::lvalue): Try to do a better
8681 job of computing the number of elements in lvalue expressions when
8682 the last indexing element is ".".
8684 2007-11-02 John W. Eaton <jwe@octave.org>
8686 * file-io.cc (fopen_mode_to_ios_mode): Use std::ios::app instead
8689 2007-11-02 Olli Saarela <Olli.Saarela@kcl.fi>
8691 * input.cc, pr-output.cc, bitfcns.cc, DLD-FUNCTIONS/time.cc:
8692 Fix broken @examples in help texts.
8694 2007-10-31 John W. Eaton <jwe@octave.org>
8696 * data.cc (Fnorm): Avoid warning about p_val possibly being used
8699 * version.h (OCTAVE_VERSION): Now 2.9.16+.
8701 2007-10-31 John W. Eaton <jwe@octave.org>
8703 * version.h (OCTAVE_VERSION): Now 2.9.16.
8704 (OCTAVE_API_VERSION): Now api-v28.
8705 (OCTAVE_RELEASE_DATE): Now 2007-10-31.
8707 2007-10-31 Muthiah Annamalai <muthuspost@gmail.com>
8709 * pt-assign.h (tree_simple_assignment::op_type,
8710 tree_multi_assignment::op_type): New functions.
8711 * pt-unop.h (tree_unary_expression::op_type): New function.
8713 2007-10-31 John W. Eaton <jwe@octave.org>
8715 * graphics.cc (line::properties::get): Fix property name
8716 (markerface -> markerfacecolor).
8718 * Makefile.in (INCLUDES): Add debug.h to the list.
8720 2007-10-30 John Swensen <jpswensen@comcast.net>
8722 * debug.h: New file.
8723 * debug.cc (parse_dbfunction_params, do_find_bkpt_list,
8724 intmap_to_ov): New functions.
8725 (Fdbstop, Fdbclear): Use parse_dbfunction_params.
8726 Improve compatibility.
8727 (Fdbstatus): Improve compatibility.
8729 * help.cc (do_which): No longer static.
8730 * help.h: Provide decl.
8732 2007-10-30 David Bateman <dbateman@free.fr>
8734 * symtab.cc: Doc fixes for small book format.
8736 2007-10-30 John W. Eaton <jwe@octave.org>
8738 * file-io.cc (fopen_mode_to_ios_mode): Handle 'W' as 'w' and 'R'
8739 as 'r', but warn about them.
8741 2007-10-29 Thomas Treichl <Thomas.Treichl@gmx.net>
8743 * data.cc: Include sytime.h, sys/types.h, and sys/resource.h.
8745 2007-10-25 John W. Eaton <jwe@octave.org>
8747 * graphics.cc (figure::properties::set_currentaxes):
8748 Allow currentfigure to be NaN.
8750 2007-10-25 Michael Goffioul <michael.goffioul@gmail.com>
8752 * DLD-FUNCTIONS/__contourc__.cc: Use unsigned int instead of uint.
8753 (drawcn): Use 1 << k instead of pow (2, k).
8755 2007-10-25 John W. Eaton <jwe@octave.org>
8757 * symtab.h (symbol_record::TYPE): Delete trailing comma in enum decl.
8759 * ov-base.h (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Use
8760 OCTAVE_EMPTY_CPP_ARG to avoid annoying Sun compiler warning.
8762 * Makefile.in (graphics.h): Use $(AWK) instead of awk.
8764 * DLD-FUNCTIONS/time.cc (Ftime, Fmktime): Avoid unnecessary cast.
8766 * data.cc (Ftic, Ftoc): Call double_value on octave_time objects
8767 instead of relying on conversion operator.
8768 * ov.cc (octave_value::octave_value (octave_time)): Likewise.
8770 * variables.cc (symbol_out_of_date): Use explicit conversion to
8771 time_t instead of relying on conversion operator.
8772 * ov-fcn-handle.cc (octave_fcn_handle::subsref): Likewise.
8774 * data.cc (tic_toc_timestamp): Rename from __tic_toc_timestamp__.
8777 2007-10-24 David Bateman <dbateman@free.fr>
8779 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::OCTAVE_VALUE_INT_MATRIX_T
8780 (const ArrayN<OCTAVE_INT_T>&)): New constructor.
8781 * ov.cc (octave_value::octave_value(const ArrayN<T>) with T being
8782 octave_int8, octave_uint8, octave_int16, octave_uint16,
8783 octave_int32, octave_uint32, octave_int64, octave_uint64): New
8785 * ov.h (octave_value::octave_value(const ArrayN<T>) with T being
8786 octave_int8, octave_uint8, octave_int16, octave_uint16,
8787 octave_int32, octave_uint32, octave_int64, octave_uint64):
8789 * DLD-FUNCTIONS/sort.cc (template class octave_sort<T>,
8790 template class vec_index<T>, template class
8791 octave_sort<vec_index<T> *>, with T being
8792 octave_int8, octave_uint8, octave_int16, octave_uint16,
8793 octave_int32, octave_uint32, octave_int64, octave_uint64): New
8794 instantiations of sort template classes.
8797 2007-10-24 John W. Eaton <jwe@octave.org>
8799 * graphics.cc (root_figure::properties::set_currentfigure):
8800 Allow currentfigure to be NaN.
8802 * pt-idx.cc (tree_index_expression::lvalue): Correctly compute
8803 number of elements in lvalue expression when last indexing
8806 2007-10-23 John W. Eaton <jwe@octave.org>
8808 * graphics.cc (is_handle (const graphics_handle&)): New function.
8809 (gh_manager::do_free, reparent, base_properties::set_parent,
8810 properties::get_title, properties::get_xlabel,
8811 properties::get_ylabel, properties::get_zlabel,
8812 properties::remove_child, make_graphics_object, F__go_figure__,
8813 F__go_delete__, __go_axes_init__): Call OK on graphics handle
8814 object instead of relying on implicit conversion operator.
8815 * graphics.h.in (graphics_handle::operator double ()): Delete.
8816 (graphics_handle::operator bool ()): Delete.
8817 (gh_manager::do_handle_list, gh_manager::do_figure_handle_list,
8818 base_properties::adopt): Call VALUE on graphics handle object
8819 instead of relying on implicit conversion operator.
8821 * ov-base.h (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Call
8822 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2 with "( )" as arg list
8825 * mxarray.h.in (mxClassID): Delete trailing comma in enum decl.
8827 * symtab.h (symbol_table::symbol_table): Reduce default table size
8830 2007-10-22 Kim Hansen <kimhanse@gmail.com>
8832 * unwind-prot.cc: Include <cstring>.
8834 2007-10-22 David Bateman <dbateman@free.fr>
8836 * data.cc (Ftic, Ftoc, Fcputime): New builtin versions of the
8837 benchmarking functions for speed.
8838 * oct-map.cc (Octave_map::squeeze, Octave_map::permute): New methods.
8839 (Octave_map::index (const octave_value_list&, bool)): Add resize_ok
8840 argument, define as const and use const_iterator internally.
8841 (Octave_map::index (idx_vector&, ...), Octave_map::index (Array
8842 <idx_vector>&, ...)): New forms of the index function.
8843 * oct-map.h (squeeze, permute, indx (const octave_value_list&, bool),
8844 index (idx_vector&, ...), index (Array <idx_vector>&, ...)): Add
8845 or update declaration.
8846 * ov-struct.cc (octave_struct::do_index_op (const octave_value_list&,
8848 * ov-struct.h (do_index_op (const octave_value_list&, bool)): Declare
8850 (squeeze (void), permute (const Arra<int>&, bool): New methods.
8852 2007-10-19 Kai Habel <kai.habel@gmx.de>
8854 * DLD-FUNCTIONS/__contourc__.cc (add_point): Rename from
8855 cl_add_point. Change all uses.
8856 (end_contour): Rename from cl_end_contour. Change all uses.
8857 (start_contour): Rename from cl_start_contour. Change all uses.
8858 (drawcn): Rename from cl_drawcn. New algorithm for locating contours.
8859 (mark_facets): New function.
8860 (cntr): Rename from cl_cntr. Change all uses. New algorithm for
8863 2007-10-19 John W. Eaton <jwe@octave.org>
8865 * ov-cell.cc (octave_cell::subsasgn): If RHS is cs-list, don't
8866 fail if shape of LHS is different.
8867 * ov-struct.cc (octave_struct::subsasgn): Likewise.
8869 2007-10-19 Olli Saarela <Olli.Saarela@kcl.fi>
8871 * help.cc (Flookfor): Call print_usage instead of usage.
8872 * DLD-FUNCTIONS/cellfun.cc (Fmat2cell): Likewise.
8874 2007-10-17 John W. Eaton <jwe@octave.org>
8876 * DLD-FUNCTIONS/spchol.cc (Fsymbfact): Delete special code for METIS.
8878 2007-10-17 Gabriele Pannocchia <g.pannocchia@ing.unipi.it>
8880 * DLD-FUNCTIONS/__qp__.cc (qp): Fix check for Wact(j).
8882 2007-10-15 Søren Hauberg <hauberg@gmail.com>
8884 * error.cc (Ferror): Make text fit on pages when using smallbook.
8885 * load-save.cc (Fsave_header_format_string): Ditto.
8886 * ov-struct.cc (Fcell2struct): Ditto.
8887 * DLD-FUNCTIONS/besselj.cc (Fairy): Ditto.
8888 * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread): Ditto.
8890 2007-10-15 David Bateman <dbateman@free.fr>
8892 * graphics.cc (axes::properties::get): Fix typo.
8894 2007-10-13 John W. Eaton <jwe@octave.org>
8896 * version.h (OCTAVE_VERSION): Now 2.9.15+.
8898 2007-10-13 John W. Eaton <jwe@octave.org>
8900 * version.h (OCTAVE_VERSION): Now 2.9.15.
8901 (OCTAVE_API_VERSION): Now api-v27.
8902 (OCTAVE_RELEASE_DATE): Now 2007-10-13.
8904 2007-10-13 David Bateman <dbateman@free.fr>
8906 * graphics.h.in (class patch): Add the faces and vertices properties.
8907 * graphics.cc (patch::properties::properties): Initialize faces
8909 (patch::properties::get): Also fetch faces and vertices.
8910 (patch::properties::factory_defaults): Set faces and vertices.
8912 2007-10-12 John W. Eaton <jwe@octave.org>
8914 * Change copyright notices in all files that are part of Octave to
8915 GPLv3 or any later version.
8917 2007-10-11 John W. Eaton <jwe@octave.org>
8919 * DLD-FUNCTIONS/urlwrite.cc (urlget): Disable use of EPSV mode.
8921 2007-10-11 Brian Gough <bjg@network-theory.co.uk>
8923 * DLD-FUNCTIONS/fftn.cc, DLD-FUNCTIONS/regexp.cc, dirfns.cc,
8924 input.cc: Spelling fixes.
8926 2007-10-10 John W. Eaton <jwe@octave.org>
8928 * OPERATORS/op-sbm-sbm.cc (bool_matrix_to_double_matrix):
8929 New conversion function.
8930 (install_sbm_sbm_ops): Install it.
8932 * ov-re-mat.cc (double): Handle sparse as a special case.
8934 2007-10-10 Olli Saarela <Olli.Saarela@kcl.fi>
8936 * data.cc, debug.cc, dirfns.cc, error.cc, file-io.cc, help.cc,
8937 load-save.cc, ov-fcn-inline.cc, parse.y, pr-output.cc, symtab.cc,
8938 syscalls.cc, toplev.cc, variables.cc, DLD-FUNCTIONS/bsxfun.cc,
8939 DLD-FUNCTIONS/cellfun.cc, DLD-FUNCTIONS/fft.cc,
8940 DLD-FUNCTIONS/fft2.cc, DLD-FUNCTIONS/fftw.cc,
8941 DLD-FUNCTIONS/gcd.cc, DLD-FUNCTIONS/lsode.cc,
8942 DLD-FUNCTIONS/luinc.cc, DLD-FUNCTIONS/matrix_type.cc,
8943 DLD-FUNCTIONS/rand.cc, DLD-FUNCTIONS/regexp.cc,
8944 DLD-FUNCTIONS/sparse.cc, DLD-FUNCTIONS/spchol.cc,
8945 DLD-FUNCTIONS/splu.cc, DLD-FUNCTIONS/spparms.cc: Spelling fixes.
8947 2007-10-10 Kim Hansen <kimhanse@gmail.com>
8949 * DLD-FUNCTIONS/lpsolve.cc: Delete.
8950 * Makefile.in (DLD_XSRC): Remove it from the list.
8952 * data.cc (Fsqueeze): Document 2d behaviour.
8953 * ov-range.h (octave_range::squeeze): New function.
8955 2007-10-09 John W. Eaton <jwe@octave.org>
8957 * DLD-FUNCTIONS/urlwrite.cc (urlget_cleanup): New function.
8958 (urlget): Protect call to curl_easy_perform with
8959 BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE and
8960 END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE.
8962 2007-10-09 David Bateman <dbateman@free.fr>
8964 * input.cc (accept_line): Drop this function and remove automatic
8965 insertion of closing quotes as the transpose operator confuses it.
8966 (initialize_command_input): Remove accept_line from here as well.
8968 2007-10-09 John W. Eaton <jwe@octave.org>
8970 * ov-mapper.cc (octave_mapper::apply): If possible, use
8971 d_d_map_fcn to handle complex values which have imag(z) == 0.
8973 * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread) [! HAVE_CURL]:
8974 Throw error instead of returning empty string hiding error message
8975 in third return value.
8976 (progress_func): Delete.
8977 (Furlread): Don't set progress callback for curl.
8978 (write_data, form_query_string, urlget): Now static.
8980 2007-10-08 David Bateman <dbateman@free.fr>
8982 * input.cc (quoting_filename): Function to add a leading quote to
8984 (accept_line): Function to check if a string needs a closing quote
8985 before calling the rl_newline function.
8986 (initialize_command_input): Initialize completer_quote_characters,
8987 filename_quote_characters, quoting_function,
8988 user_accept_line_function.
8990 * data.cc (template <class T> static make_diag (...)): New
8991 template class version of make_diag. Make other make_diag
8992 functions depend on it.
8993 ( static octave_value make_diag (const octave_value&,
8994 octave_idx_type)): Treat all possible internal Octave types.
8996 2007-10-08 John W. Eaton <jwe@octave.org>
8998 * load-save.cc (save_vars, dump_octave_core):
8999 Don't pass INFNAN_WARNED to do_save.
9000 (do_save): Delete unused arg, INFNAN_WARNED.
9001 Don't pass INFNAN_WARNED to save_ascii_data.
9002 * ls-oct-ascii.cc (save_ascii_data_for_plotting):
9003 Don't pass INFNAN_WARNED to save_ascii.
9004 (save_ascii_data): Delete unused arg, INFNAN_WARNED.
9006 * ov.h (octave_value::save_ascii): Delete unused arg, INFNAN_WARNED.
9007 * ov-base-int.cc (octave_base_int_matrix<T>::save_ascii,
9008 octave_base_int_scalar<T>::save_ascii): Likewise.
9009 * ov-base-sparse.cc (octave_base_sparse<T>::save_ascii): Likewise.
9010 * ov-base.cc (octave_base_value::save_ascii): Likewise.
9011 * ov-bool-mat.cc (octave_bool_matrix::save_ascii): Likewise.
9012 * ov-bool.cc (octave_bool::save_ascii): Likewise.
9013 * ov-cell.cc (octave_cell::save_ascii): Likewise.
9014 * ov-fcn-handle.cc (octave_fcn_handle::save_ascii): Likewise.
9015 * ov-fcn-inline.cc (octave_fcn_inline::save_ascii): Likewise.
9016 * ov-list.cc (octave_list::save_ascii): Likewise.
9017 * ov-struct.cc (octave_struct::save_ascii): Likewise.
9018 * ov-str-mat.cc (octave_char_matrix_str::save_ascii): Likewise.
9019 * ov-range.cc (octave_range::save_ascii): Likewise.
9021 * ov-scalar.cc (octave_scalar::save_ascii): Remove warning about
9022 reloading inf/nan values. Delete unused arg, INFNAN_WARNED.
9023 * ov-complex.cc (octave_complex::save_ascii): Likewise.
9024 * ov-re-mat.cc (octave_matrix::save_ascii): Likewise.
9025 * ov-cx-mat.cc (octave_complex_matrix::save_ascii): Likewise.
9027 * ov-fcn-inline.cc (Finline): Use DEFUNX instead of DEFUN.
9029 2007-10-08 Michael Goffioul <michael.goffioul@gmail.com>
9031 * sighandlers.h (can_interrupt): Tag with OCTINERP_API.
9032 * sysdep.h (raw_mode, octave_popen, octave_pclose,
9033 same_file_internal): Likewise.
9035 2007-10-06 John W. Eaton <jwe@octave.org>
9037 * oct-stream.cc (octave_base_stream::do_scanf):
9038 Always allow MVAL to re resized if NR > 0.
9039 (FINISH_CHARACTER_CONVERSION): Likewise.
9041 * mappers.cc (install_mapper_functions): Undo previous change.
9042 Fix doc string for lgamma.
9045 2007-10-05 John W. Eaton <jwe@octave.org>
9047 * graphics.h.in (axes::properties): New property, colororder.
9048 * graphics.cc (default_colororder): New function.
9049 (axes::properties::properties, axes::properties::get,
9050 axes::properties::set_defaults,
9051 axes::properties::factory_defaults, ): Handle colororder.
9053 * mappers.cc (xzlgamma): New static function.
9054 (install_mapper_functions): Pass xzlgamma for c_c_map for lgamma
9055 mapper. Pass 1 for can_ret_cmplx_for_real and set hi to
9058 2007-10-04 John W. Eaton <jwe@octave.org>
9060 * DLD-FUNCTIONS/symrcm.cc: Move static functions to top of file to
9061 avoid forward decls.
9062 (Q_enq): Delete unused arg QH. Change all uses.
9063 (Q_deq): Delete unused arg QT. Change all uses.
9064 (find_starting_node): Delete unused local variable J.
9065 (H_heapify_min, H_insert, find_starting_node, Fsymrcm):
9066 Move local variable decls to point of first use.
9068 * OPERATORS/op-streamoff.cc (STREAMOFF_COMP_OP):
9069 Avoid control-reaches-end-of-non-void-function warning.
9071 * pt-const.cc (tree_constant::dup): Avoid unused parameter warning.
9073 * pr-output.cc (set_real_format, set_real_matrix_format,
9074 set_complex_format, set_complex_matrix_format):
9075 Delete unused arg, SIGN. Change uses.
9077 * oct-map.cc (Octave_map::Octave_map): Avoid shadow warning.
9079 * load-save.cc (write_header): Use reinterpret_cast to avoid
9080 old-style cast warning.
9082 * data.cc (do_permute): Delete unused arg, FNAME. Change all uses.
9084 * sysdep.cc (w32_set_octave_home, w32_set_quiet_shutdown,
9085 MINGW_signal_cleanup):
9086 Only define if defined (__WIN32__) && ! defined (_POSIX_VERSION).
9088 2007-10-04 Jason Riedy <jason@acm.org>
9090 * ls-mat5.cc (read_mat5_binary_data): Map miUTF16 to miUINT16,
9091 miUTF32 to miUINT32. The matfile format currently states that
9092 wide UTF formats are in the same byte order as the integers.
9093 (read_mat5_binary_element): Replace all UTF16 and UTF32
9094 characters with the high bit set (value >127) by '?' and warn
9097 2007-10-04 Michael Goffioul <michael.goffioul@gmail.com>
9099 * sysdep.cc (w32_set_octave_home): Base OCTAVE_HOME location on
9100 octinterp, not the main exe.
9102 2007-10-03 John W. Eaton <jwe@octave.org>
9104 * data.cc (Fnorm): New function.
9105 (F__vnorm__): Delete.
9107 2007-10-03 Michael Goffioul <michael.goffioul@gmail.com>
9109 * DLD-FUNCTIONS/typecast.cc: Include <algorithm>.
9111 2007-10-03 John W. Eaton <jwe@octave.org>
9113 * oct-map.cc (Octave_map::Octave_map (const dim_vector&,
9114 const string_vector&)): Delete.
9115 (Octave_map::Octave_map (const dim_vector&, const Cell&)):
9117 * ov-struct.cc (Fstruct): Allow creation of empty struct arrays
9120 2007-10-01 Shai Ayal <shaiay@users.sourceforge.net>
9122 * graphics.cc ((color_property::color_property (const
9123 octave_value& val)): Undo change from 2007-09-26
9124 (patch::properties::properties): use the "a" modifier to
9125 face_color & edge_color properties
9126 (patch::properties::set): Undo change from 2007-09-26
9127 * graphics.h.in (color_property::color_property
9128 (const octave_value& val)): Undo change from 2007-09-26
9130 2007-10-01 Michael Goffioul <michael.goffioul@gmail.com>
9132 * octave.cc (octave_main): Add "--line-editing" option to force
9133 readline line editing.
9135 2007-09-28 David Bateman <dbateman@free.fr>
9137 * ov-range.h (int8_array_value, int16_array_value, int32_array_value,
9138 int64_array_value, uint8_array_value, uint16_array_value,
9139 int32_array_value, uint64_array_value): New methods
9141 2007-09-28 Kai Habel <kai.habel@gmx.de>
9143 * graphics.h.in (color_property::colormap_property (const Matrix&)):
9144 Use floating point math in calculation of colormap.
9146 2007-09-26 David Bateman <dbateman@free.fr>
9148 * graphics.cc (color_values::str2rgb): accept upper, lower and
9149 mixed-case versions of the string representing the color. Allow
9150 black defined as "k" and white as "w".
9151 (color_property::color_property (const octave_value& val,
9152 const radio_values &v)): Modify the constructor to also take a
9153 radio_values argument. Use it.
9154 (patch::properties::set): Change set_facecolor calls to initialize
9155 the color_property argument with the available radio_values.
9156 * graphics.h.in (color_property::color_property
9157 (const octave_value& val, const radio_values &v)): Also pass a
9158 radio_values argument.
9160 * ov-range.h (sparse_matrix_value, sparse_complex_matrix_value):
9163 * mk-pkg-add: Simplfy the autoload commands.
9164 * parse.y (Fautoload): Allow bare filename if file is in the same
9165 directory as the script from where the autoload command is run.
9167 2007-09-25 Matthias Drochner <m.drochner@fz-juelich.de>
9169 * syscalls.cc (Fpopen2): Doc fix.
9170 Use "sort -r" instead of "sort -nr" in test.
9172 2007-09-18 John W. Eaton <jwe@octave.org>
9174 * input.cc (input_event_hook, Finput_event_hook): Call
9175 command_editor::add_event_hook and
9176 command_editor::remove_event_hook intstead of
9177 command_editor::set_event_hook and
9178 command_editor::restore_event_hook.
9180 2007-09-17 John W. Eaton <jwe@octave.org>
9182 * version.h (OCTAVE_VERSION): Now 2.9.14+.
9184 2007-09-17 John W. Eaton <jwe@octave.org>
9186 * version.h (OCTAVE_VERSION): Now 2.9.14.
9187 (OCTAVE_API_VERSION): Now api-v26.
9188 (OCTAVE_RELEASE_DATE): Now 2007-09-17.
9190 * Makefile.in (DISTFILES): Add genprops.awk to the list.
9192 * ov-typeinfo.h (cat_op_fcn): Third arg in function pointer
9193 typedef is now Array<octave_idx_type> instead of Array<int>.
9195 * file-io.cc (do_stream_open): Use binary mode by default.
9197 2007-09-14 Shai Ayal <shaiay@users.sourceforge.net>
9199 * genprop.awk: Handle "a" modifier.
9201 2007-09-14 Kai Habel <kai.habel@gmx.de>
9203 * graphics.h.in (radio_values::contains): New function.
9204 (radio_values::validate): Use it.
9205 * graphics.cc (color_property::operator =): Call it instead of
9208 2007-09-13 John W. Eaton <jwe@octave.org>
9210 * DLD-FUNCTIONS/__glpk__.cc (glpk): Pass LPX_FX, not LB_DB, to
9211 lpx_set_col_bnds when lb[i] == ub[i].
9212 From: Zhi Wang <zcwang@umich.edu>.
9214 * graphics.h.in (colormap_property::colormap_property):
9215 Use jet colormap as default.
9217 2007-09-12 John W. Eaton <jwe@octave.org>
9219 * graphics.cc (text::properties::properties): Default color is
9221 * graphics.h (text::properties::color): Declare as color_property,
9224 * graphics.h.in (root_figure::defaults, figure::defaults,
9225 axes::defaults, line::defaults, text::defaults, image::defaults,
9226 patch::defaults, surface::defaults): New functions.
9227 * gripes.cc (gripe_not_implemented): New function.
9228 * gripes.h: Provide decl.
9230 2007-09-10 John W. Eaton <jwe@octave.org>
9232 * genprops.awk: Add missing newline character at end of file.
9233 From Alexander Klimov <alserkli@inbox.ru>.
9235 2007-09-10 David Bateman <dbateman@free.fr>
9237 * data.cc (do_cat): Avoid invalid indexing into ra_idx vector.
9239 2007-09-06 David Bateman <dbateman@free.fr>
9241 * DLD-FUNCTIONS/__delaunay__.cc, DLD-FUNCRIONS/__voronoi__.cc,
9242 DLD-FUNCTIONS/convhulln.cc: Avoid variables in global scope
9244 2007-09-06 David Bateman <dbateman@free.fr>
9246 * Makefile.in (stamp-prereq): Add graphics.h to the dependency list.
9248 2007-08-31 John W. Eaton <jwe@octave.org>
9250 * Makefile.in (INCLUDES): Remove graphics.h from the list.
9251 (DISTFILES): Include graphics.h.in in the list.
9252 (genprops.awk): New file.
9253 (graphics.h): New rule.
9254 (distclean): Remove graphics.h.
9255 * graphics.h.in: New file, from graphics.h.
9256 (graphics_handle): Now a class instead of typedef. Adapt all uses.
9257 (OCTAVE_GRAPHICS_PROPERTY_INTERNAL, OCTAVE_GRAPHICS_PROPERTY,
9258 OCTAVE_GRAPHICS_MUTABLE_PROPERTY): Delete macros.
9259 (class root_figure, class figure, class axes, class line, class
9260 text, class image, class patch, class surface): Use genprops.awk
9261 to generate property declarations and set/get functions.
9262 * graphics.h: Delete.
9263 * graphics.cc (nan_to_empty, empty_to_nan): Delete.
9264 (root_figure::properties::set, figure::properties::set,
9265 axes::properties::set, line::properties::set,
9266 text::properties::set, image::properties::set,
9267 patch::properties::set, surface::properties::set): Call
9268 type-specific set functions to set properties.
9269 (root_figure::properties::set_currentfigure,
9270 figure::properties::set_currentaxes, figure::properties::set_visible,
9271 axes::properties::get_title, axes::properties::get_xlabel,
9272 axes::properties::get_ylabel, axes::properties::get_zlabel,
9273 axes::properties::set_title, axes::properties::set_xlabel,
9274 axes::properties::set_ylabel, axes::properties::set_zlabel):
9275 Define custom versions.
9277 2007-09-06 David Bateman <dbateman@free.fr>
9279 * DLD-FUNCTIONS/bsxfun.cc: New function.
9280 * DLD-FUNCTIONS/typecast.cc: New function.
9281 * Makefile.in (DLD_XSRC): Add bsxfun.cc and typecast.cc.
9282 * ov.cc (do_cat_op): Modify use of Array<int> to
9283 Array<octave_idx_type> and adjust where necessary.
9284 * ov.h (do_cat_op): ditto.
9285 * data.cc (do_cat): ditto.
9286 * pt-mat.cc (tree_matrix::rvalue): ditto.
9288 2007-09-05 Michael Goffioul <michael.goffioul@gmail.com>
9290 * oct-stream.cc (octave_base_stream::do_printf): Ignore precision
9291 portion of format string if printing Inf, NaN, or NA values.
9293 2007-09-05 David Bateman <dbateman@free.fr>
9295 * DLD-FUNCTIONS/sort.cc (mx_sort_sparse, mx_sort_sparse_indexed):
9296 New template classes for sparse sort functions.
9298 * ov.h (octave_value (const Sparse<double>&, const MatrixType&),
9299 octave_value (const Sparse<Complex>&, const MatrixType&)): New
9301 * ov.cc (octave_value::octave_value (const Sparse<double>&,
9302 const MatrixType&), octave_value::octave_value (const
9303 Sparse<Complex>&, const MatrixType&)): Define them.
9304 * ov-re-sparse.h (octave_sparse_matrix (const MSparse<double>&,
9305 const MatrixType&), octave_sparse_matrix (const Sparse<double>&),
9306 octave_sparse_matrix (const Sparse<double>&, const MatrixType&)):
9308 * ov-cx-sparse.h (octave_sparse_complex_matrix (const MSparse<double>&,
9309 const MatrixType&), octave_sparse_complex_matrix (const
9310 Sparse<double>&), octave_sparse_complex_matrix (const
9311 Sparse<double>&, const MatrixType&)): ditto.
9313 2007-09-04 Gabriele Pannocchia <g.pannocchia@ing.unipi.it>
9315 * DLD-FUNCTIONS/__qp__.cc (qp): Use Wact(j) == i - n_eq when
9316 checking for blocking constraint. Don't resize lambda_tmp. Only
9317 compute Y = Aact.pseudo_inverse () if it is needed.
9319 2007-08-31 Michael Goffioul <michael.goffioul@gmail.com>
9321 * ls-mat-ascii.cc (get_lines_and_columns): Check beg variable for
9322 NPOS to avoid segmentation fault.
9324 * load-path.cc (load_path::do_find_file): Do not assume paths
9325 use forward slashes.
9327 2007-08-30 John W. Eaton <jwe@octave.org>
9329 * sysdep.cc (Fpause): Doc fix.
9331 2007-08-30 Gabriele Pannocchia <g.pannocchia@ing.unipi.it>
9333 * DLD-FUNCTIONS/__qp__.cc (qp): Resize Wact to n_act-neq, not n_act.
9335 2007-08-29 John W. Eaton <jwe@octave.org>
9337 * graphics.cc (class root_figure::properties):
9338 Rename from root_figure::root_figure_properties.
9339 (class figure::properties): Rename from figure::figure_properties.
9340 (class axes::properties): Rename from axes::axes_properties.
9341 (class line::properties): Rename from line::line_properties.
9342 (class text::properties): Rename from text::text_properties.
9343 (class image::properties): Rename from image::image_properties.
9344 (class patch::properties): Rename from patch::patch_properties.
9345 (class surface::properties): Rename from surface::surface_properties.
9347 * base-list.h (octave_base_list::remove): Implement our own
9348 remove_if function here.
9350 2007-08-28 John W. Eaton <jwe@octave.org>
9352 * graphics.h (base_properties): Move class definition before
9353 definition of base_graphics_object class. Provide forward
9354 declaration of base_graphics_object prior to definition of
9356 (base_graphics_object::get_properties): New virtual function.
9357 (graphics_object::get_properties, root_figure::get_properties,
9358 figure::get_properties, axes::get_properties,
9359 line::get_properties, text::get_properties, image::get_properties,
9360 patch::get_properties, surface::get_properties): New functions.
9361 (root_figure::properties, figure::properties, axes::properties,
9362 line::properties, text::properties, image::properties,
9363 patch::properties, surface::properties): Data member now private.
9365 2007-08-27 John W. Eaton <jwe@octave.org>
9367 * load-path.cc (load_path::do_find_file): Also files with non
9368 rooted relative names.
9369 * load-save.cc (find_file_to_load): Likewise. Also handle
9370 appending .mat to files with relative names.
9372 * graphics.cc (base_properties::mark_modified,
9373 base_properties::override_defaults,
9374 base_properties::delete_children, figure::get_default,
9375 axes::get_default): Move definitions here, from graphics.h.
9376 * graphics.h (class gh_manager): Move decl to end of file.
9378 * Cell.h (Cell::Cell (const octave_value_list&)): Create row
9379 vector instead of column vector.
9381 * pt-idx.cc (tree_index_expression::lvalue): Handle [x.a] =
9382 ... style assignments.
9383 * ov-struct.cc (octave_struct::subsasgn): Handle case of RHS as
9384 comma-separated list.
9386 * ov-cell.cc (gripe_failed_assignment): New function.
9387 (octave_cell::subsasgn): Call gripe_failed_assignment if assign
9390 2007-08-24 David Bateman <dbateman@free.fr>
9392 * symtab.cc (void symbol_table::clear (void)): If the record in
9393 the symbol table to clear is a user function that is a sub
9394 function with a static parent or if the parent is the current
9395 parent function, don't delete the record.
9396 (void symbol_table::clear_functions (void)): ditto.
9397 (void symbol_table::clear (const std::string&)): ditto.
9398 (void symbol_table::clear_function (const std::string&)): ditto.
9400 * graphics.h (class text): Add property color.
9401 * graphics.cc (text::text_properties::text_properties) ditto.
9402 (text::text_properties::set): ditto.
9403 (text::text_properties::get): ditto.
9404 (text::text_properties::factory_defaults): ditto.
9406 2007-08-24 John W. Eaton <jwe@octave.org>
9408 * mappers.cc (dummyp): New function.
9409 (install_mapper_functions): Use it to handle character data in
9410 finite, isinf, isna, and isnan functions.
9412 * load-path.cc (load_path::do_remove): Call remove_hook function
9413 before removing directory from list.
9415 2007-08-24 David Bateman <dbateman@free.fr>
9417 * ov-bool-sparse.cc (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Class
9419 * ov-re-sparse.cc, ov-cx-sparse.cc
9420 (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Class is now double.
9421 * ov-mapper.cc (octave_mapper::apply): Use is_sparse_type method
9422 rather than comparing class name.
9423 * ls-mat5.cc (save_mat5_element_length, save_mat5_binary_element):
9425 * pt-mat.cc (tree_matrix:rvalue): sparse matrices are now of class
9426 "double" or "logical", create new single type concat clause for
9428 * mex.cc (get_class_id): No longer need to special case sparse
9431 * DLD-FUNCTIONS/__delaunayn__.cc, DLD-FUNCTIONS/convhulln.cc,
9432 DLD-FUNCTIONS/tsearch.cc, DLD-FUNCTIONS/__voronoi__.cc: New
9433 functions ported from octave-forge.
9434 * DLD-FUCTIONS/__dsearchn__.cc: New file.
9435 * DLD-FUNCTIONS/__voronoi__.cc: Return point at infinity and
9436 include it in the polygrons of the Voronoi diagram for
9438 * Makefile.in: Add specific build targets for __delanayn__.cc,
9439 convhulln.cc and __voronoi__.cc to link to Qhull.
9440 (DLD_SRC): Add new functions.
9441 (OCTAVE_LIBS): Add QHULL_LIBS
9443 2007-08-22 David Bateman <dbateman@free.fr>
9445 * variables.cc (Fmunlock): Call munlock and not mlock.
9446 * symtab.cc (symbol_record::mark_as_formal_parameter): Typo.
9448 2007-08-10 John W. Eaton <jwe@octave.org>
9450 * pt-idx.cc (tree_index_expression::get_struct_index): Improve
9452 * ov-struct.cc (Fstruct, Fcell2struct): Trap invalid field names here.
9454 2007-08-10 Peter A. Gustafson <petegus@umich.edu>
9456 * graphics.h, graphics.cc (axes::axes_properties): New properties,
9457 xaxislocation and yaxislocation.
9459 2007-08-10 Kai Habel <kai.habel@gmx.de>
9461 * graphics.cc, graphics.h (patch): New class.
9462 (axes::axes_properties): New properties, clim and climmode.
9463 (surface::surface_properties::surface_properties): Handle patch.
9464 (F__go_patch__): New function.
9466 2007-07-30 John W. Eaton <jwe@octave.org>
9468 * mex.cc (mxArray_number::mxArray_number (int, const char **)):
9469 First arg is now mwSize.
9470 (max_str_len): Return mwSize value, not int.
9471 * mxarray.h.in (mxArray::mxArray (int, const char **)):
9472 First arg is now mwSize.
9473 (mxArray::mxArray (mxClassID, mwSize, mwSize, int, mxComplexity)):
9474 Third arg is now mwSize.
9475 (mxArray::get_string (char *, int)): Second arg is now mwSize.
9477 2007-07-26 John W. Eaton <jwe@octave.org>
9479 * DLD-FUNCTIONS/__glpk__.cc: Include glpk/glpk.h if
9480 HAVE_GLPK_GLPK_H is defined.
9482 2007-07-26 David Bateman <dbateman@free.fr>
9484 * pr-output.cc (Frats): Return character array with same number of
9485 rows as original value.
9487 2007-07-26 John W. Eaton <jwe@octave.org>
9489 * pt-bp.h (MAYBE_DO_BREAKPOINT): Rename cur_fcn to xfcn.
9491 * version.h (OCTAVE_VERSION): Now 2.9.13+.
9493 2007-07-25 John W. Eaton <jwe@octave.org>
9495 * version.h (OCTAVE_VERSION): Now 2.9.13
9496 (OCTAVE_API_VERSION): Now api-v25.
9497 (OCTAVE_RELEASE_DATE): Now 2007-07-25.
9499 * pt-bp.h (MAYBE_DO_BREAKPOINT): Rename fcn to curr_fcn.
9501 2007-07-25 David Bateman <dbateman@free.fr>
9503 * Makefile.in: Adjust DISTFILES to allow out of tree "make dist"
9506 2007-07-24 Shai Ayal <shaiay@users.sourceforge.net>
9508 * graphics.cc (color_property::operator = (const octave_value&)):
9510 * graphics.h: Provide decl.
9512 2007-07-24 Rafael Laboissiere <rafael@debian.org>
9514 * oct-conf.h.in (OCTAVE_CONF_RUNTEST): Delete definition.
9515 * toplevel.cc (Foctave_config_info): Remove RUNTEST from struct.
9517 2007-07-23 David Bateman <dbateman@free.fr>
9519 * pr-output.cc (rat_format, rat_string_len): Global variable
9520 controlling behavior of rational approximation. Use throughout.
9521 (class pr_rational_float): New class for rational approximation of
9522 floats, specifically with the << operator defined.
9523 (std::ostream& operator << (std::ostream&, const
9524 pr_rational_float&)): Operator to print rational approximations of
9526 (std::string rational_approx (double, int)): Function to convert a
9527 double value to a string of maximum length giving the rational
9529 (pr_any_float): Include the output of rational approximations.
9530 (Fformat): Add the "rat" format as an option.
9531 (Frats): New function.
9533 2007-07-23 Aquil H. Abdullah <aquil.abdullah@gmail.com>
9535 * mex.cc (mxCreateStructArray): Declare second arg as const.
9536 * mexproto.h (mxCreateStructArray): Ditto.
9538 2007-07-20 David Bateman <dbateman@free.fr>
9540 * zfstream.cc (BUFSIZE): Increase default buffer size to 256kB
9541 (gzfilebuf::underflow): Stash the last 16 characters read, so as
9542 to avoid calling pbackfail as much as possible.
9544 2007-07-18 David Bateman <dbateman@free.fr>
9546 * zfstream.cc (int_type gzfilebuf::pbackfail (int_type)): New
9547 method to putback a character when the putback position in the
9548 internal buffer doesn't exist.
9549 * zfstream.h (int_type pbackfail (int_type)): Declaration it.
9551 2007-07-14 Michael Goffioul <michael.goffioul@swing.be>
9553 * src/ov-bool-sparse.cc (octave_sparse_bool_matrix:load_hdf5):
9554 Use OCTAVE_LOCAL_BUFFER for temporary boolean value.
9556 2007-06-27 David Bateman <dbateman@free.fr>
9558 * DLD-FUNCTIONS/sparse.cc (Fspdiag): Ensure spdiag(zeros(1,0)) returns
9559 0x0 matrix. Doc update.
9560 * data.cc (Fdiag): Doc update.
9562 2007-06-28 John W. Eaton <jwe@octave.org>
9564 * ov-cell.cc (octave_cell::subsasgn): Given x = {}, convert to
9565 struct for assignments like x(1).f = val;
9567 * oct-stream.cc (octave_scan_1): New function
9568 (octave_scan): Use it. Handle fmt.width.
9570 * graphics.h (axes::axes_properties::visible): New data member.
9571 * graphics.cc (axes::axes_properties::axes_properties,
9572 axes::axes_properties::set, axes::axes_properties::get,
9573 axes::axes_properties::factory_defaults): Handle visible property.
9575 2007-06-27 Kai Habel <kai.habel@gmx.de>
9577 * graphics.h (color_values::color_values): Arg is now std:string
9578 instead of char. Call str2rgb, not c2rgb.
9579 * graphics.h, graphics.cc: (color_values::str2rgb): Rename from
9580 c2rgb. Handle long color names, not just single char abbreviations.
9582 2007-06-27 David Bateman <dbateman@free.fr>
9584 * src/load-save.cc (Fsave): Ensure header is written for non
9585 existent file with "-append".
9586 * src/ls-hdf5.h: First steps towards having append work for hdf5.
9588 2007-06-26 John W. Eaton <jwe@octave.org>
9590 * src/load-save.cc (Fsave): Open files correctly for -append.
9591 Don't write file headers if appending. Error for -append -hdf5.
9593 2007-06-25 Olaf Till <i7tiol@t-online.de>
9595 * oct-stream.h (octave_stream_list::list): Use std::map.
9596 (octave_stream_list::curr_len): Delete data member.
9597 (octave_stream_list::octave_stream_list): Fix initializations.
9599 * oct-stream.cc (octave_steam_list::do_insert,
9600 octave_steam_list::do_lookup, octave_steam_list::do_remove,
9601 octave_steam_list::do_clear, octave_steam_list::do_list_open_files,
9602 octave_steam_list::do_open_file_numbers,
9603 octave_steam_list::do_get_file_number):
9604 Use new octave_stream_list::list type.
9605 (octave_stream_list::do_insert): Insert octave_stream with key
9606 corresponding to file-descriptor.
9607 (octave_stream_list::do_insert, octave_steam_list::insert):
9608 Remove const qualifier of argument.
9610 2007-06-18 Søren Hauberg <hauberg@gmail.com>
9612 * DLD-FUNCTIONS/__lin_interpn__.cc: Replace octave_NaN with octave_NA.
9614 2007-06-15 Shai Ayal <shaiay@users.sourceforge.net>
9616 * graphics.h (OCTAVE_GRAPHICS_PROPERTY_INTERNAL,
9617 OCTAVE_GRAPHICS_PROPERTY, OCTAVE_GRAPHICS_MUTABLE_PROPERTY):
9618 New macros. Use them to declare individual properties and define
9619 accessor methods for each property in the property classes.
9621 2007-06-15 Kai Habel <kai.habel@gmx.de>
9623 * graphics.cc (Fget, Fset): Handle vectors of handles.
9625 2007-06-14 John W. Eaton <jwe@octave.org>
9627 * sysdep.cc (octave_popen, octave_pclose): New functions.
9628 * sysdep.h: Provide decls.
9630 * oct-procbuf.cc (procbuf::open): Use octave_popen.
9631 (procbuf::close): Use octave_pclose.
9632 * oct-prcstrm.cc (octave_oprocstream::octave_oprocstream,
9633 octave_iprocstream::ictave_oprocstream): Likewise.
9635 * graphics.h (text::text_properties::rotation): New data member.
9636 * graphics.cc (text::text_properties::text_properties,
9637 text::text_properties::set, text::text_properties::get,
9638 text::text_properties::factory_defaults): Handle rotation property.
9640 2007-06-14 Kai Habel <kai.habel@gmx.de>
9642 * graphics.cc (color_values::c2rgb): Also accept 'k' for black.
9644 2007-06-14 David Bateman <dbateman@free.fr>
9646 * ov-ch-mat.h (idx_vector index_vector (void) const): Remove
9648 * ov-ch-mat.cc (idx_vector index_vector (void) const): Move it
9649 here. Special case ":" case for compatibility.
9651 2007-06-13 John W. Eaton <jwe@octave.org>
9653 * ov-re-mat.cc (octave_matrix::load_ascii):
9654 Do a better job of handling read errors and empty matrices.
9655 * ov-cx-mat.cc (octave_complex_matrix::load_ascii): Likewise.
9656 * ov-bool-mat.cc (octave_bool_matrix::load_ascii): Likewise.
9657 * ov-str-mat.cc (octave_char_matrix_str::load_ascii): Likewise.
9659 2007-06-13 David Bateman <dbateman@free.fr>
9661 * DLD-FUNCTIONS/minmax.cc (MINMAX_BODY): Don't treat as single
9662 argument if arg2 is empty and nargin=2.
9664 2007-06-13 Shai Ayal <shaiay@users.sourceforge.net>
9666 * graphics.h, graphics.cc: Move class declarations to graphics.h.
9667 Move larger functions outside of class declarations in graphics.cc.
9669 2007-06-12 Benjamin Lindner <lindnerben@gmx.net>
9671 * DLD-FUNCTIONS/cellfun.cc: Use fullfile to generate filenames
9672 instead of assuming / will work as directory separator.
9674 2007-06-12 David Bateman <dbateman@free.fr>
9676 * DLD-FUNCTIONS/interpn.cc: Remove it.
9677 * DLD-FUNCTIONS/__lin_interpn__.cc: Move it. This is now a support
9678 function of interpn.m.
9679 * Makefile.in (DLD_XSRC): Remove interpn.cc and add __lin_interpn__.cc.
9681 2007-06-07 David Bateman <dbateman@free.fr>
9683 * ov-fcn-handles.cc (octave_fcn_handle::save_hdf5): More care that
9684 all open HDF5 descriptors are closed.
9685 (octave_fcn_handle::load_hdf5): Ditto.
9687 2007-06-06 Benjamin Lindner <lindnerben@gmx.net>
9689 * utils.cc [__MINGW32__]: Don't define HAVE_C99_VSNPRINTF.
9691 2007-06-06 Michael Goffioul <michael.goffioul@swing.be>
9693 * defaults.h.in, ls-hdf5.h, ov-complex.h, ov-cx-mat.h, ov-intx.h,
9694 sysdep.h: Sprinkle with OCTINTERP_API as needed.
9696 2007-06-05 John W. Eaton <jwe@octave.org>
9698 * help.h (raw_help): Tag with OCTINTERP_API.
9700 * Makefile.in (INCLUDES): Remove mxarray.h from the list so that
9701 it is not distributed.
9702 (EXTRAS): Add mxarray.h to the list so that it is installed.
9704 * sysdep.cc (same_file_internal) [OCTAVE_USE_WINDOWS_API]:
9705 Avoid leaking file handles.
9707 2007-05-08 Michael Weitzel <michael.weitzel@uni-siegen.de>
9709 * DLD-FUNCTIONS/symrcm.cc: Fix for queuing error that might cause
9712 2007-06-04 John W. Eaton <jwe@octave.org>
9714 * data.cc (Fislogical): Rename from Fisbool.
9715 Make isbool an alias for islogical.
9717 2007-06-03 David Bateman <dbateman@free.fr>
9719 * Makefile.in (DISTFILES): Add mxarray.h.in
9720 (install-inc): Modify target so that mxarray.h is installed
9722 (distclean): Remove mxarray.h on distclean.
9723 * mex.cc: Use mwSize for dimensions and mwIndex for indexing
9724 throughout, with the exception of struct key indexes.
9725 * mexproto.h: ditto.
9726 * mxarray.h: remove.
9727 * mxarray.h.in: Copy here and define mwSize, mwIndex, and use
9729 * ov-bool-mat.cc (octave_bool_matrix::as_mxArray): Use mwSize and
9731 * ov-bool-sparse (octave_sparse_bool_matrix::as_mxArray): ditto.
9732 * ov-cell.cc (octave_cell:as_mxArray): ditto.
9733 * ov-ch-mat.cc (octave_char_matrix:as_mxArray): ditto.
9734 * ov-cx-mat.cc (octave_complex_matrix::as_mxArray): ditto.
9735 * ov-cx-sparse.cc (octave_sparse_complex_matrix::as_mxArray): ditto.
9736 * ov-int.h (as_mxArray): ditto.
9737 * ov-range.cc (octave_range:as_mxArray): ditto.
9738 * ov-re-mat.cc (octave_matrix:as_mxArray): ditto.
9739 * ov-re-sparse.cc (octave_sparse_matrix::as_mxArray): ditto.
9740 * ov-struct.cc (octave_struct::as_mxArray): ditto.
9742 2007-06-02 David Bateman <dbateman@free.fr>
9744 * graphics.cc (color_property class): g++ doesn't like anonymous
9745 enums. Give type to color_type enum.
9747 2007-05-31 Shai Ayal <shaiay@users.sourceforge.net>
9749 * graphics.cc (radio_values, radio_property, color_values):
9751 (color_property class): Handle both color and radio values.
9753 2007-05-31 John W. Eaton <jwe@octave.org>
9755 * toplev.cc (main_loop): Improve bad_alloc error message.
9757 * octave.cc (execute_command_line_file, execute_eval_option_code):
9760 2007-05-31 Michael Goffioul <michael.goffioul@swing.be>
9762 * toplev.cc (octave_atexit_functions):
9763 Now std::list instead of std::stack.
9764 (do_octave_atexit): Adapte to octave_atexit_functions as list.
9765 (Fatexit): Allow second arg of false to remove element from list.
9767 * DLD-FUNCTIONS/symrcm.cc: Use ! instead of "not".
9769 * sysdep.cc (same_file_internal) [OCTAVE_USE_WINDOWS_API]:
9770 Use INVALID_HANDLE_VALUE, not INVALID_FILE_HANDLE.
9772 2007-05-28 G. D. McBain <geordie_mcbain@yahoo.com.au>
9774 * ov-list.cc (append): Doc fix.
9776 2007-05-28 John W. Eaton <jwe@octave.org>
9778 * pt-loop.cc (DO_ND_LOOP): Avoid parser problem with obsolete g++.
9780 2007-05-23 John W. Eaton <jwe@octave.org>
9782 * version.h (OCTAVE_VERSION): Now 2.9.12+.
9784 2007-05-23 John W. Eaton <jwe@octave.org>
9786 * version.h (OCTAVE_VERSION): Now 2.9.12.
9787 (OCTAVE_RELEASE_DATE): Now 2007-05-23.
9789 * parse.y (make_anon_fcn_handle): Don't build assignment expression.
9790 * ov-fcn-handle.cc (octave_fcn_handle::print_raw):
9791 Don't split assignment expression.
9792 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
9793 Special case for inline function body evaluation.
9795 2007-05-22 John W. Eaton <jwe@octave.org>
9797 * pt-fcn-handle.cc (tree_anon_fcn_handle::rvalue):
9798 Set current function as parent of anonymous function handle.
9800 * Makefile.in (uninstall): Also remove
9801 $(DESTDIR)$(octincludedir)/octave, $(DESTDIR)$(octincludedir),
9802 $(DESTDIR)$(octlibdir), and $(DESTDIR)$(octfiledir).
9804 2007-05-22 Thomas Weber <thomas.weber.mail@gmail.com>
9806 * debug.cc, error.cc, load-save.cc, oct-hist.cc, sighandlers.cc,
9807 symtab.cc: Fix typos.
9809 2007-05-22 John W. Eaton <jwe@octave.org>
9811 * version.h (OCTAVE_VERSION): Now 2.9.11+.
9813 2007-05-22 John W. Eaton <jwe@octave.org>
9815 * version.h (OCTAVE_VERSION): Now 2.9.11.
9816 (OCTAVE_API_VERSION): Now api-v24.
9817 (OCTAVE_RELEASE_DATE): Now 2007-05-22.
9819 2007-05-21 David Bateman <dbateman@free.fr>
9821 * debug.cc (Fdbstop): handle integer, vector and multiple line
9823 (Fdbclar): ditto. Eliminate extraneous debugging messages.
9825 2007-05-21 Søren Hauberg <hauberg@gmail.com>
9827 * load-path.cc (Fpath, Frehash): Replace "LOADPATH" with "load
9828 path" in doc strings.
9830 * parse.y (Feval): Add example.
9832 2007-05-21 David Bateman <dbateman@free.fr>
9834 * error.cc (rethrow_error): Use NULL name so that "error:" is not
9835 added to the message
9836 (Frethrow): Correctly treat empty stack.
9838 2007-05-21 John W. Eaton <jwe@octave.org>
9840 * oct-map.h (Octave_map::numel): Return number of array elements,
9841 not number of map elements.
9842 (Octave_map::nfields): Rename from length.
9843 (Octave_map::empty): Delete.
9844 Change all uses of empty to check nfields () == 0 instead.
9846 2007-05-21 Søren Hauberg <soren@hauberg.org>
9848 * help.cc (Fautoload): Doc fix.
9849 * variables.cc (Fiscommand): Doc fix.
9851 2007-05-19 David Bateman <dbatemna@free.fr>
9853 * ov-fcn-inline.cc (Fvectorize): Doc fix.
9855 2007-05-16 Søren Hauberg <soren@hauberg.org>
9857 * ov.cc (Fsubsref, Fsubsasgn): Doc fix.
9859 2007-05-16 John W. Eaton <jwe@octave.org>
9861 * load-path.h (load_path::sys_path): New static data member.
9862 (load_path::system_path): New static function.
9863 (load_path::do_system_path): New function.
9864 * load-path.cc (Vsystem_path): Delete.
9865 (load_path::do_initialize): Use sys_path, not Vsystem_path.
9866 (Fpathdef): Call load_path::system_path instead of using Vsystem_path.
9867 * ls-mat5.cc (read_mat5_binary_element): Likewise.
9868 * ov-fcn-handle.cc (octave_fcn_handle::set_fcn): Likewise.
9870 2007-05-16 David Bateman <dbateman@free.fr>
9872 * load_pathc.cc (std::string octave_system_path (void)): New
9874 * load-path.h (std::string octave_system_path (void)): Declare it.
9876 * load-save.cc (static load_save_format get_file_format
9877 (std::istream&, const std::string&)): Add filename argument, and
9878 pass it to read_mat5_binary_header. Use new format throughout file.
9879 (Fload): Don't allow gzip of matlab v7 files as the files
9880 themselves include compression.
9882 * ls-mat5.cc (arrayclsstype:MAT_FILE_WORKSPACE_CLASS): New class
9884 (read_mat5_binary_element): Workspaces, don't have dimensions, so
9885 don't read them. Implement read of matlab objects, but only use
9886 them for inline functions. Implement reading of function and
9888 (read_mat5_binary_header): Add filename argument. Read sub-system
9889 specific data block given as an offset in bytes 117 to 124.
9890 (save_mat5_binary_element): Include saving of inline functions.
9892 * ls-mat5.h (read_mat5_binary_header): Include filename.
9894 * ov-fcn-handle.cc (octave_fcn_handle_save_ascii,
9895 octave_fcn_handle::load_ascii, octave_fcn_handle::save_binary,
9896 octave_fcn_handle::load_binary, octave_fcn_handle::save_hdf5,
9897 octave_fcn_handle::load_hdf5): Save and reload the local symbol
9898 table of the user function associated with anonymous function
9899 handles. Save and load the absolute path and the exec_prefix for
9900 normal function handles and use then to find equivalent functions
9901 between different installations of Octave. Attempt to maintain
9902 backward and forward compatibility.
9903 (Ffunctions): Additional outputs, including the workspace of
9904 anonymous functions, and more compatiable outputs.
9906 * ov-fcn-handle.h (user_function_value): Expose the user function
9907 value of a function handle.
9909 * ov-fcn-inline.cc (Octave_map octave_fcn_inline::map_value
9910 (void) const): Return a structure compatiable with matlab's class
9911 implementation of inline functions.
9913 * ov-fcn-inline.h (map_value): Declare it.
9915 2007-05-14 Bob Weigel <rweigel@gmu.edu>
9917 * DLD-FUNCTIONS/svd.cc: Doc fix.
9919 2007-05-14 Thomas Weber <thomas.weber.mail@gmail.com>
9921 * DLD-FUNCTIONS/fft.cc (do_fft): Handle empty matrices. New tests.
9923 2007-05-14 Søren Hauberg <soren@hauberg.org>
9925 * toplev.cc (Fatexit): Simplify example in doc string.
9926 * help.cc (Flookfor): Doc fix.
9927 * DLD-FUNCTIONS/cellfun.cc (Fcellfun):
9928 Reformat to avoid long lines in doc string example.
9930 2007-05-13 Søren Hauberg <soren@hauberg.org>
9932 * toplev.cc (Fquit): Doc fix.
9933 * help.cc (Fhelp): Doc fix.
9934 * oct-hist.cc (Fsaving_history): Doc fix.
9936 2007-05-11 John W. Eaton <jwe@octave.org>
9938 * variables.cc (symbol_out_of_date):
9939 Always check for files that have gone missing.
9941 2007-05-08 Michael Weitzel <michael.weitzel@uni-siegen.de>
9943 * DLD-FUNCTIONS/symrcm.cc: New function for Reverse Cuthill-McKee
9946 2007-05-07 John W. Eaton <jwe@octave.org>
9948 * oct-map.cc (Octave_map::resize): Handle case of no keys.
9949 (keys_ok): Rename from equiv_keys. Return value is now status.
9950 Pass key names as string_vector reference arg.
9951 (Octave_map::assign (const octave_value_list&, const Octave_map&)):
9952 Call keys_ok, not equiv_keys. Handle case of no keys.
9954 2007-04-30 John W. Eaton <jwe@octave.org>
9956 * Makefile.in (%.df : %.cc): Use mv instead of
9957 $(simple-move-if-change-rule).
9959 2007-04-30 David Bateman <dbateman@free.fr>
9961 * pt-loop.cc (DO_ND_LOOP): New args, CONV and ARG.
9962 Use octave_idx_type instead of int for loop counters.
9963 Remove redundant assignments to variable "quit" as it is
9964 always defined in quit_loop_now.
9965 Special case rows = 0 and 1 cases in loops over arrays.
9966 Include some of the code that was separate from the macro
9967 DO_ND_LOOP in the macro itself
9968 (tree_simple_for_command::eval): USE DO_ND_LOOP for all loops.
9971 2007-04-30 John W. Eaton <jwe@octave.org>
9973 * mex.cc (mex::cleanup): Don't call unmark for elements of the set
9974 inside the loop. From Laurent Mazet <laurent.mazet@motorola.com>.
9976 2007-04-30 David Bateman <dbateman@free.fr>
9978 * OPERATORS/op-int-conv.cc: Define sq and dq string conversion
9979 operators. Delete old char_matrix_str conversions.
9980 * OPERATORS/op-int-conv.cc (install_int_conv_ops): Install them.
9982 2007-04-27 Benjamin Lindner <lindnerb@users.sourceforge.net>.
9984 * octave.cc (execute_startup_files): Call same_file to check for
9985 already executed init files.
9987 2007-04-27 John W. Eaton <jwe@octave.org>
9989 * sysdep.cc (same_file_internal): New function. POSIX code
9990 from same_file in utils.cc. Windows code from
9991 Benjamin Lindner <lindnerb@users.sourceforge.net>.
9992 Don't canonicalize file names.
9993 Also return false if stat calls fail.
9994 * sysdep.h: Provide decl.
9995 * utils.cc (same_file): Use same_file_internal.
9997 2007-04-27 David Bateman <dbateman@free.fr>
9999 * graphic.cc (get_property_form_handle, set_property_in_handle):
10001 * grahics.h: New file.
10002 * mex.cc (mexGet, mexSet): use the above to implement mexGet
10004 * Makefile.in (INCLUDES): Add graphics.h
10006 2007-04-26 John W. Eaton <jwe@octave.org>
10008 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
10009 Only deal with varargout if ret_list->takes_varargs () is true.
10011 2007-04-26 Søren Hauberg <soren@hauberg.org>
10013 * DLD-FUNCTIONS/urlwrite.cc: Doc fix.
10015 2007-04-26 David Bateman <dbateman@free.fr>
10017 * pt-loop.cc (tree_simple_for_command::eval (void)): Correct
10018 reshaping of dim_vector in for loop for multi-dimensional array.
10020 2007-04-26 John W. Eaton <jwe@octave.org>
10022 * load-save.cc (find_file_to_load): Only consider regular files.
10024 2007-04-24 Shai Ayal <shaiay@users.sourceforge.net>
10026 * graphics.cc (color_property): Eliminate alpha channel from RGB
10029 2007-04-23 Shai Ayal <shaiay@users.sourceforge.net>
10031 * src/graphics.cc (color_property::color_property):
10032 New arg A for alpha channel. Set rgba instead of red, green, blue.
10033 (color_property::color_property (char)): New constructor.
10034 (color_propery::rgba): New data member.
10035 (color_property::red, color_property::green, color_property::blue):
10037 (color_property::validate): Use rgba.
10038 (color_property::c2rgba): New function.
10040 2007-04-23 Søren Hauberg <soren@hauberg.org>
10042 * data.cc (Fsize_equal): Allow more than two arguments.
10044 2007-04-20 John W. Eaton <jwe@octave.org>
10046 * DLD-FUNCTIONS/__gnuplot_raw__.l (deftypefn):
10047 (Vautomatic_replot): Delete static variable.
10048 (Fautomatic_replot): Delete function.
10050 * toplev.cc (Fcasesen): Delete obsolete function.
10052 * DLD-FUNCTIONS/__gnuplot_raw__.l (gnuplot::makeplot): Check
10053 whether caller is "splot", not "gsplot".
10055 2007-04-19 John W. Eaton <jwe@octave.org>
10057 * lex.l (is_keyword_token): Delete all_va_args_kw switch case.
10058 * octave.gperf: Remove all_va_args_kw from the list.
10060 2007-04-19 Daniel J. Sebald <daniel.sebald@ieee.org>
10062 * syscalls.cc: Fix popen2 test to stop trying after 100 times
10065 2007-04-16 Geordie McBain <geordie.mcbain@aeromech.usyd.edu.au>
10067 * ov-fcn-inline.cc (Fargnames): Doc fix.
10069 2007-04-13 Geordie McBain <geordie.mcbain@aeromech.usyd.edu.au>
10071 * DLD-FUNCTIONS/find.cc (Ffind): Doc fix.
10073 2007-04-11 John W. Eaton <jwe@octave.org>
10075 * Makefile.in (DOCSTRINGS): Don't echo commands.
10076 (doc-files): Use mv, not $(simple-move-if-change-rule).
10078 * data.cc (Fnot, Fuplus, Fuminus, Ftranspose, Fctranspose, Fplus,
10079 Fminus, Fmtimes, Fmrdivide, Fmpower, Fmldivide, Flt, Fle, Feq,
10080 Fge, Fgt, Fne, Ftimes, Frdivide, Fpower, Fldivide, Fand, For):
10083 2007-04-09 John W. Eaton <jwe@octave.org>
10085 * graphics.cc (line::line_properties::markeredgecolor,
10086 line::line_properties::markerfacecolor): New properties.
10088 2007-04-06 John W. Eaton <jwe@octave.org>
10090 * data.cc (F__vnorm__): New function.
10092 * pt-fcn-handle.cc (tree_anon_fcn_handle::param_list,
10093 tree_anon_fcn_handle::cmd_list, tree_anon_fcn_handle::ret_list,
10094 tree_anon_fcn_handle::sym_tab): Delete. Remove all uses.
10095 (tree_anon_fcn_handle::fcn): New data member.
10096 (tree_anon_fcn_handle::tree_anon_fcn_handle): Initialize it.
10097 (tree_anon_fcn_handle::rvalue, tree_anon_fcn_handle::dup):
10098 Extract parameter list, return list, function body, and symbol
10100 (tree_anon_fcn_handle::parameter_list, tree_anon_fcn_handle::body):
10101 Forward request to fcn.
10103 * ov-usr-fcn.h (octave_user_function::local_sym_tab): Rename from
10104 sym_tab. Change all uses.
10105 (octave_user_function::sym_tab): New function.
10107 * octave.cc (execute_command_line_file):
10109 2007-04-05 David Bateman <dbateman@free.fr>
10111 * DLD-FUNCTIONS/regexp.cc (Fregexprep): Correct iteration over
10112 cell arrays so that the source and pattern are iterated seperately
10113 in the same manner as matlab.
10115 2007-04-05 Laurent Mazet <laurent.mazet@motorola.com>
10117 * mex.cc (mxArray_octave_value::get_string): Copy nel elements,
10118 not buflen elements.
10120 2007-04-05 John W. Eaton <jwe@octave.org>
10122 * oct-stream.cc (DO_DOUBLE_CONV): New macro.
10123 (do_printf): Use it.
10125 2007-04-04 John W. Eaton <jwe@octave.org>
10127 * input.cc (octave_yes_or_no): Force interactive_input to use readline.
10129 * octave.cc (execute_eval_option_code): Catch bad::alloc here.
10131 2007-04-03 John W. Eaton <jwe@octave.org>
10133 * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread):
10134 Use && for logical, not &.
10136 * DLD-FUNCTIONS/qr.cc (Fqr): Clarify nargin check.
10138 * error.cc (Frethrow): Add braces to avoid ambiguous if/else.
10139 * oct-stream.cc (octave_scan<>): Likewise.
10140 * DLD-FUNCTIONS/colamd.cc (Fetree): Likewise.
10141 * DLD-FUNCTIONS/sort.cc (mx_sort, mx_sort_indexed): Likewise.
10143 * ov-fcn-handle.cc (make_fcn_handle): Pass ultimate parent
10144 function name to lookup_function.
10146 2007-03-29 John W. Eaton <jwe@octave.org>
10148 * DLD-FUNCTIONS/filter.cc (filter): Fix typo in doc string.
10149 From Utkarsh Upadhyay <musically.ut@gmail.com>.
10151 2007-03-28 Rafael Laboissiere <rafael@debian.org>
10153 * DLD-FUNCTIONS/__glpk__.cc: Fix #ifdef logic around GLPK_PRE_4_14.
10155 2007-03-27 John W. Eaton <jwe@octave.org>
10157 * version.h (OCTAVE_VERSION): Now 2.9.10+
10159 2007-03-27 John W. Eaton <jwe@octave.org>
10161 * version.h (OCTAVE_VERSION): Now 2.9.10.
10162 (OCTAVE_API_VERSION): Now api-v23.
10163 (OCTAVE_RELEASE_DATE): Now 2007-03-27.
10165 * version.h (OCTAVE_COPYRIGHT): Update for 2007. Add "and others".
10166 (X_OCTAVE_WARRANTY_STATEMENT): Rename from OCTAVE_WARRANTY_STATEMENT.
10168 (OCTAVE_WARRANTY_STATEMENT): Define using X_OCTAVE_WARRANTY_STATEMENT.
10169 (OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY): Define using
10170 X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY.
10171 (X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY): Rename
10172 from OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY.
10173 Accept arg and pass to X_OCTAVE_WARRANTY_STATEMENT.
10174 (OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY): Pass empty
10175 arg to X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS.
10176 (OCTAVE_STARTUP_MESSAGE): Put info about news last.
10178 2007-03-27 John W. Eaton <jwe@octave.org>
10180 * Makefile.in (dist, conf-dist): Use ln, not $(LN_S).
10182 2007-03-26 Juhani Saastamoinen <juhani@cs.joensuu.fi>
10184 * file-io.cc (do_stream_open) [! HAVE_ZLIB]:
10185 Call fopen with mode, not tmode.
10187 2007-03-26 John W. Eaton <jwe@octave.org>
10189 * OPERATORS/op-str-str.cc (DEFCHARNDBINOP): New macro. Use it to
10190 define functions for eq and ne ops. Also define lt, le, ge, and
10193 2007-03-23 David Bateman <dbateman@free.fr>
10195 * DLD-FUNCTIONS/rand.cc: Make more statistical tests optional.
10197 2007-03-23 John W. Eaton <jwe@octave.org>
10199 * bitfcns.cc (Fbitshift): Error if third argument is not a scalar.
10201 2007-03-23 David Bateman <dbateman@free.fr>
10203 * DLD-FUNCTIONS/rand.cc: Make statistical tests optional and
10204 add tests for fixed sequences.
10206 2007-03-22 John W. Eaton <jwe@octave.org>
10208 * graphics.cc (base_graphics_object::mark_modified):
10209 New virtual function.
10210 (base_properties::__modified__): New data member.
10211 (base_properties::base_properties): Initialize it.
10212 (graphics_object::mark_modified, base_properties::mark_modified,
10213 root_figure::mark_modified, figure::mark_modified,
10214 axes::mark_modified, line::mark_modified, text::mark_modified,
10215 image::mark_modified, surface::mark_modified,
10216 root_figure::root_figure_properties::mark_modified,
10217 figure::figure_properties::mark_modified,
10218 axes::axes_properties::mark_modified,
10219 line::line_properties::mark_modified,
10220 text::text_properties::mark_modified,
10221 image::image_properties::mark_modified,
10222 surface::surface_properties::mark_modified): New functions.
10223 (figure::figure_properties::set, figure::figure_properties::get,
10224 axes::axes_properties::set, axes::axes_properties::get,
10225 line::line_properties::set, line::line_properties::get,
10226 text::text_properties::set, text::text_properties::get,
10227 image::image_properties::set, image::image_properties::get,
10228 surface::surface_properties::set, surface::surface_properties::get):
10229 Handle __modified__ property.
10231 * parse.y (Fautoload): Use warning_with_id.
10233 2007-03-21 John W. Eaton <jwe@octave.org>
10235 * DLD-FUNCTIONS/__qp__.cc (ABS): Delete. Use std::abs instead.
10236 (null): Set elements of retval with magnitudes less than eps to 0.
10238 * error.cc (Fwarning): Allow setting options with struct.
10239 If setting options, return previous state.
10241 * graphics.cc (axes::axes_properties::set_defaults): Reverse sense
10242 of mode test for setting outerposition property.
10243 (figure::figure_properties::set): If setting visible property,
10244 make this figure the current figure.
10245 (gh_manager::figure_handle_list, gh_manager::do_figure_handle_list):
10247 (F__go_figure_handles__): New function.
10249 * sysdep.cc (Fpause): Also call drawnow if nargin == 0.
10250 (Fkbhit, Fsleep, Fusleep): Also call drawnow here.
10252 2007-03-20 David Bateman <dbateman@free.fr>
10254 * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Correct for shape of return
10255 matrix for the case of UniformOutput being true.
10257 2007-03-20 John W. Eaton <jwe@octave.org>
10259 * sysdep.cc (Fpause): Call drawnow.
10261 2007-03-15 John W. Eaton <jwe@octave.org>
10263 * variables.cc (F__lock_global__): Delete.
10265 2007-03-14 John W. Eaton <jwe@octave.org>
10267 * graphics.cc: New file.
10268 * Makefile.in (DIST_SRC): Add it to the list.
10270 2007-03-13 John W. Eaton <jwe@octave.org>
10272 * file-io.cc (do_stream_open): Use binary mode if 't' is not
10273 specified in mode, but don't add 'b' if it is already present.
10275 2007-03-09 David Bateman <dbateman@free.fr>
10277 * data.cc (do_cat): Also treat case of all empty matrices.
10279 2007-03-08 John W. Eaton <jwe@octave.org>
10281 * mex.cc (mxArray_octave_value::set_dimensions,
10282 mxArray_octave_value::set_m, mxArray_octave_value::set_n,
10283 mxArray_octave_value::set_class_name,
10284 mxArray_octave_value::set_ir, mxArray_octave_value::set_jc,
10285 mxArray_octave_value::remove_field,
10286 mxArray_octave_value::set_field_by_number):
10287 Don't panic; request mutation instead.
10288 (class mxArray_octave_value):
10290 * mxarray.h (mxArray::set_m, mxArray::set_n,
10291 mxArray::set_dimensions): Wrap method call call with
10292 DO_VOID_MUTABLE_METHOD.
10294 2007-03-08 David Bateman <dbateman@free.fr>
10296 * data.cc (do_cat): Ignore leading empty matrices.
10298 2007-03-07 Bob Weigel <rweigel@gmu.edu>
10300 * urlwrite.cc (urlget): Allow URL redirects.
10302 2007-03-05 David Bateman <dbateman@free.fr>
10304 * DLD-FUNCTIONS/md5sum.cc (Fmd5sum): Treat both files and strings.
10306 2007-03-05 John W. Eaton <jwe@octave.org>
10308 * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Check GLPK_PRE_4_14, not
10311 2007-03-02 John W. Eaton <jwe@octave.org>
10313 * parse.y (Fautoload): Undo previous change.
10314 Warn if FILE is not an absolute file name.
10316 * utils.cc (make_absolute): Make copy of arg before
10318 2007-03-01 John W. Eaton <jwe@octave.org>
10320 * ov-base-mat.h (octave_base_matrix::octave_base_matrix (const MT&),
10321 (octave_base_matrix::octave_base_matrix (const MT&, const MatrixType&)):
10322 Use common definition with default argument value.
10323 * ov-base-scalar.h (octave_base_scalar<T>::typ): New data member.
10324 Initialize in constructors.
10325 (octave_base_scalar<T>::matrix_type): New funtions.
10327 2007-03-01 David Bateman <dbateman@free.fr>
10329 * DLD-FUNCTIONS/md5sum.cc: New file.
10330 * Makefile.in (DLD_XSRC): Add md5sum.cc
10332 2007-03-01 Olli Saarela <Olli.Saarela@kcl.fi>
10334 * input.cc (FPS1): Fix @seealso.
10336 2007-03-01 David Bateman <dbateman@free.fr>
10338 * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Special case scalar
10339 types and always return "Full" matrix type.
10341 2007-02-28 John W. Eaton <jwe@octave.org>
10343 * input.cc (interactive_input): Also call flush_octave_stdout
10344 after calling drawnow.
10346 2007-02-27 John W. Eaton <jwe@octave.org>
10348 * Makefile.in (uninstall): Also remove octave-$(version)$(EXEEXT),
10349 oct-gperf.h, and all .oct files. Remove PKG_ADD.
10350 From Thomas Treichl <Thomas.Treichl@gmx.net>.
10352 * load-path.h, (load_path::initialize, load_path::do_initialize):
10353 New arg, set_initial_path.
10354 * load-path.cc (load_path::do_initialize): Don't add system
10355 directories to apth if set_initial_path is false.
10356 * octave.cc (set_initial_path): New static variable.
10357 (NO_INITIAL_PATH_OPTION): New define.
10358 (usage_string): Include --no-initial-path in message.
10359 (long_opts): Include no-initial-path/NO_INITIAL_PATH_OPTION here.
10360 (octave_main): Handle NO_INITIAL_PATH_OPTION.
10361 Pass set_initial_path to load_path::initialize.
10363 * parse.y (Fautoload): Warn about duplicate entries. Only insert
10366 2007-02-27 David Bateman <dbateman@free.fr>
10368 * error.cc (Vlast_error_file, Vlast_erro_name, Vlast_error_row,
10369 Vlast_error_column): New static variables.
10370 (verror): Use them to store the location of last error.
10371 (rethrow_error, Frethrow, Flasterror): New functions.
10373 * DLD-FUNCTIONS/regexp.cc (octcellregexp): Wrapper to octregexp
10374 function for cases when string or pattern are cell arrays
10375 (Fregexp, Fregexpi): Use them.
10376 (octregexprep): New function with functionality of old Fregexprep.
10377 (Fregexprep): Treat cell arguments.
10379 2007-02-26 Michael Goffioul <michael.goffioul@swing.be>
10381 * Makefile.in: Use $(LN_S) instead of ln or ln -s.
10383 * DLD-FUNCTIONS/getrusage.cc: Undef min after including windows.h.
10385 2007-02-25 John W. Eaton <jwe@octave.org>
10387 * DLD-FUNCTIONS/interpn.cc: Include dNDArray.h, not dMatrix.cc.
10389 * error.h: Include cstdarg.
10390 From Juhani Saastamoinen <juhani@cs.joensuu.fi>.
10392 2007-02-23 John W. Eaton <jwe@octave.org>
10394 * variables.cc (lookup_function): Don't dereference NULL
10395 curr_parent_fucntion pointer.
10396 * ov-fcn-handle.cc (make_fcn_handle): Call lookup_function with
10397 parent set to empty string if call_stack is empty.
10399 * DLD-FUNCTIONS/dispatch.cc (Fbuiltin): Also adjust argument list
10400 in calls to functions that are not overloaded. Call
10401 lookup_by_name to find function instead of searching fbi_symtab
10404 * help.cc (do_which): Return empty string if file not found.
10406 2007-02-22 John W. Eaton <jwe@octave.org>
10408 * mex.cc (mxArray_cell::mxArray_cell (const mxArray_cell&),
10409 mxArray_struct::mxArray_struct (const mxArray_struct&)):
10410 Avoid calling clone on 0 elements.
10412 * variables.cc (symbol_out_of_date): If checking nested function,
10413 look for file using parent function name. Delete unused
10416 * src/oct-stream.cc (octave_stream::do_gets): If no limit or not
10417 at limit, read ahead one character at end of line for compatibility.
10418 (octave_stream::gets, octave_stream::getl): Set max_len to -1 if
10419 tc_max_len is not defined.
10420 * file-io.cc (Ffgets, Ffgetl): If no limit specified, pass
10421 undefined octave_value object as max_len in call to
10422 octave_stream::gets.
10424 2007-02-21 John W. Eaton <jwe@octave.org>
10426 * mex.cc (mexErrMsgIdAndTxt, mexWarnMsgIdAndTxt): Handle second
10427 arg as format and accept variable number of arguments.
10428 * mexproto.h: Fix decls.
10430 * error.h, error.cc (vmessage, vusage, vwarning, verror,
10431 vparse_error, vmessage_with_id, vusage_with_id, vwarning_with_id,
10432 verror_with_id, vparse_error_with_id): Provide va_list versions of
10433 variadic error, warning, and message functions.
10434 (message, usage, warning, error, parse_error, message_with_id,
10435 usage_with_id, warning_with_id, error_with_id,
10436 parse_error_with_id): Call va_list versions.
10438 * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread): Return error
10439 code and message instead of throwing error if functionality is
10442 * oct-obj.h (octave_value_list::splice): Set default for
10443 replacement list argument.
10445 2007-02-20 Rafael Laboissiere <rafael@laboissiere.net>
10447 * DLD-FUNCTIONS/__glpk__.cc: Adapt code for changes in the GLPK
10448 API for version 4.15 or later.
10450 2007-02-20 John W. Eaton <jwe@octave.org>
10452 * mxarray.h (mxArray::get_scalar): New function.
10453 * mex.cc (mxArray_base::get_scalar): New pure virtual function.
10454 (mxArray_octave_value::get_scalar, mxArray_matlab::get_scalar,
10455 mxArray_number::get_scalar): New functions.
10456 (mxGetScalar): Call get_scalar here.
10458 * mex.cc (mxArray_octave_value::get_dimensions): Cache ndims here.
10459 (mxArray_octave_value::get_number_of_dimensions):
10460 Call get_dimensions here to cache both ndims and dims.
10462 2007-02-17 John W. Eaton <jwe@octave.org>
10464 * variables.cc (symbol_out_of_date): Don't exit early if looking
10465 at nested function.
10467 2007-02-16 John W. Eaton <jwe@octave.org>
10469 * dynamic-ld.cc (octave_dynamic_loader::do_load_oct): Clear
10470 function if original was loaded from relative path and the name
10471 can no longer be found in path. Mark files found from relative
10473 (clear): Only warn if there is more than one function to clear.
10475 * variables.cc (symbol_out_of_date): Don't ignore return value in
10476 call to octave_env::make_absolute.
10477 (symbol_out_of_date): Clear symbol if original was loaded from
10478 relative path and name can no longer be found in path.
10480 * dynamic-ld.cc (octave_dynamic_loader::do_load_oct):
10481 Also check whether new file is same as the old file.
10483 * utils.cc (same_file): Move here from variables.cc.
10484 * utils.h: (same_file): Provide decl.
10486 * parse.y (frob_function): Stash parent function name if parsing
10489 * ov-fcn-handle.cc (make_fcn_handle): Pass current function name
10490 as parent in call to lookup_function.
10492 * ov-fcn.h (octave_function::parent_fcn_name): New virtual function.
10494 * ov-usr-fcn.h (octave_user_function::parent_name): New data member.
10495 (octave_user_function::stash_parent_function_name,
10496 octave_user_function::parent_function_name): New methods.
10497 * ov-usr-fcn.cc (octave_user_function::octave_user_function):
10498 Initialize parent_name.
10500 * variables.h, variables.cc (lookup_function): New arg, parent.
10501 If not empty, try this first for lookup.
10503 * dynamic-ld.cc (octave_dynamic_loader::do_load_mex): If doing
10504 path lookup, check relative status. Pass relative to oct_file_in_path.
10505 (octave_dynamic_loader::do_load_mex): Likewise, for mex_file_in_path
10507 * defun-int.h, defun.cc (install_mex_function): New arg, relative.
10508 (install_dld_function): Likewise.
10509 (octave_dld_fcn_installer): Likewise.
10510 (DEFINE_FUNX_INSTALLER_FUN3): Pass relative to install_dld_function.
10512 * dynamic-ld.h (octave_dynamic_loader::load_oct,
10513 octave_dynamic_loader::load_mex,
10514 octave_dynamic_loader::do_load_oct
10515 octave_dynamic_loader::do_load_mex): New arg, relative.
10517 * dirfns.h (Vcurrent_directory): Delete unused variable.
10519 * variables.cc (symbol_out_of_date): Also compare function time
10520 stamp to Vlast_chdir_time if function is from relative lookup.
10522 * dirfns.cc (Vlast_chdir_time): New variable.
10523 (octave_change_to_directory): Update it if chdir succeeds.
10524 * dirfns.h (Vlast_chdir_time): Provide decl.
10526 * ov-fcn.h (octave_function::relative): New data member.
10527 (octave_function::mark_relative, octave_function::is_relative):
10530 * parse.y (fcn_file_from_relative_lookup): New static variable.
10531 (load_fcn_from_file): Note whether function file was found from
10532 relative path element.
10533 (frob_function): Maybe mark function as relative.
10535 * parse.y (lookup_autoload): Don't call octave_env::make_absolute
10537 * variables.cc (symbol_out_of_date): Make name absolute after call
10538 to lookup_autoload.
10540 * input.cc (interactive_input): New arg, DEBUG. Don't call
10541 drawnow if debugging.
10542 (get_user_input): Pass DEBUG to interactive_input.
10544 2007-02-16 Michael Goffioul <michael.goffioul@swing.be>
10546 * syscalls.cc (Fpopen2): New function.
10547 (pipe): Modify to return input and output file descriptor
10548 seperately rather than in a list.
10550 2007-02-16 Muthiah Annamalai <muthuspost@gmail.com>
10552 * debug.cc (Fdbtype): Improve compatibility.
10554 2007-02-16 John W. Eaton <jwe@octave.org>
10556 * toplev.cc (wait_for_input): New function.
10557 (run_command_and_return_output): Use it instead of napping.
10559 * oct-procbuf.h (octave_procbuf::pid): Now const.
10560 * procstream.h (procstreambase::pid): Now const.
10561 (procstreambase::file_number): New function.
10563 2007-02-15 John W. Eaton <jwe@octave.org>
10565 * mxarray.h (mxChar): Use char instead of unsigned short.
10567 * toplev.cc (Foctave_config_info): Remove
10568 OCTAVE_CONF_MKOCTFILE_INCFLAGS and OCTAVE_CONF_MKOCTFILE_LFLAGS
10570 * oct-conf.h.in (OCTAVE_CONF_MKOCTFILE_INCFLAGS,
10571 OCTAVE_CONF_MKOCTFILE_LFLAGS): Don't define.
10572 (OCTAVE_CONF_INCLUDEDIR, OCTAVE_CONF_OCTINCLUDEDIR,
10573 OCTAVE_CONF_OCTLIBDIR, OCTAVE_CONF_PREFIX): New definitions.
10575 2007-02-14 Alexander Barth <abarth@marine.usf.edu>
10577 * DLD-FUNCTIONS/interpn.cc: New file.
10578 * Makefile.in (DLD_XSRC): Add it to the list.
10580 2007-02-14 John W. Eaton <jwe@octave.org>
10582 * input.cc (interactive_input): Check error_state after call to feval.
10584 2007-02-10 John W. Eaton <jwe@octave.org>
10586 * oct-stream.cc (octave_stream::rewind): Call seek (0, SEEK_SET)
10587 instead of rep->rewind.
10588 (octave_base_stream::rewind): Delete Function.
10589 * oct-stream.h (octave_base_stream::rewind): Delete decl.
10591 2007-02-09 John W. Eaton <jwe@octave.org>
10593 * ls-mat5.cc (PAD): Adjust to change in write_mat5_tag.
10594 (TAGLENGTH): Delete unused macro.
10596 * ov-struct.cc (octave_struct::load_ascii,
10597 octave_struct::load_binary, octave_struct::load_hdf5):
10598 Delete obsolete attempt at backward compatibility.
10600 * ls-mat5.cc (read_mat5_binary_element): Don't attempt to read
10601 fieldnames if there are no fields.
10602 (write_mat5_tag): Don't use small data element format if bytes == 0.
10604 * ls-mat5.cc (read_mat5_binary_element): Always create a structure
10605 that is at least 1x1.
10606 * ov-struct.cc (octave_struct::load_ascii,
10607 octave_struct::load_binary, octave_struct::load_hdf5): Likewise.
10609 2007-02-08 Michael Goffioul <michael.goffioul@swing.be>
10611 * DLD-FUNCTIONS/__glpk__.cc: Include glplib.h if glpk.h does not.
10612 Provide definitions for lib_set_fault_hook and lib_set_print_hook
10613 if they are not defined.
10615 2007-02-07 John W. Eaton <jwe@octave.org>
10617 * defaults.cc (subst_octave_home):
10618 Only substitute at beginning of string.
10620 * ls-hdf5.cc (save_hdf5_empty): Use OCTAVE_LOCAL_BUFFER.
10621 * ov-bool-mat.cc (octave_bool_matrix::save_hdf5,
10622 octave_bool_matrix::load_hdf5): Likewise.
10623 * ov-bool-sparse.cc (octave_sparse_bool_matrix::save_hdf5,
10624 octave_sparse_bool_matrix::load_hdf5): Likewise.
10626 2007-02-07 Michael Goffioul <michael.goffioul@swing.be>
10628 * ov-cell.cc (octave_cell::save_hdf5): Correct test for H5Dwrite
10631 2007-02-07 John W. Eaton <jwe@octave.org>
10633 * zfstream.cc (gzfilebuf::open_mode): Always append "b" to c_mode.
10635 * toplev.cc (Foctave_config_info): Use struct for conf_info.
10636 Call subst_octave_home on selected values when initializing map.
10637 * defaults.cc (subst_octave_home): Now extern.
10638 * defaults.h.in: Provide decl.
10640 2007-02-05 John W. Eaton <jwe@octave.org>
10642 * mex.cc (mxArray_number::as_octave_value): Fake mxSINGLE_CLASS
10643 by returning double-precision values.
10644 (mxArray_sparse::as_octave_value): Clarify error message.
10646 * ov-complex.h (octave_complex): Use std instead of OCTAVE_STD
10647 since the latter was unconditionally defined to be std anyway.
10649 2007-02-05 Michael Goffioul <michael.goffioul@swing.be>
10651 * ov-complex.h: Tag octave_complex class with OCTINTERP_API.
10653 2007-01-30 John W. Eaton <jwe@octave.org>
10655 * Merge of changes from graphics-branch:
10657 2007-01-26 John W. Eaton <jwe@octave.org>
10659 * DLD-FUNCTIONS/__contourc__.cc: New function.
10660 * Makefile.in (DLD_XSRC): Add it to the list.
10662 2007-01-25 John W. Eaton <jwe@octave.org>
10664 * input.cc (Vdrawnow_requested): New static variable.
10665 (F__request_drawnow__): New function.
10666 (interactive_input): New function. Update Vlast_prompt_time here.
10667 (octave_gets, get_user_input, octave_yes_or_no):
10668 Call interactive_input instead of gnu_readline.
10670 * symtab.h (symbol_record::eternal): New data member.
10671 (symbol_record::symbol_record): Initialize it.
10672 (symbol_record::make_eternal, symbol_record::is_eternal):
10673 Don't forward to symbol_def functions.
10674 (symbol_record::symbol_def::make_eternal,
10675 symbol_record::symbol_def::is_eternal): Delete.
10676 (symbol_record::symbol_def::eternal): Delete data member.
10677 (symbol_record::symbol_def::symbol_def): Delete initialization.
10679 * pt-id.cc (tree_identifier::link_to_global): Include variable
10680 name in warning message.
10682 * variables.cc (F__lock_global__): New function.
10684 2007-01-11 John W. Eaton <jwe@octave.org>
10686 * ls-oct-ascii.cc (save_ascii_data_for_plotting, save_three_d):
10687 Set precision to 6 instead of 4.
10689 2007-01-29 David Bateman <dbateman@free.fr>
10691 * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): Don't panic if
10692 nargout is greater than 3.
10694 2007-01-24 John W. Eaton <jwe@octave.org>
10696 * pt-assgn.cc (former_built_in_variables): New static data.
10697 (maybe_warn_former_built_in_variable): New static function.
10698 (tree_simple_assignment::tree_simple_assignment,
10699 tree_multi_assignment::tree_multi_assignment):
10700 Move definition here from pt-assign.h
10701 Maybe warn about assignment to obsolete built-in variables.
10703 * version.h (OCTAVE_STARTUP_MESSAGE): Mention "news" function.
10705 * pt-stmt.cc (tree_statement::eval): Use dynamic_cast, not
10708 * help.cc (help_from_file): Show .oct or .mex file name if one
10709 exists in the same directory as the .m file.
10711 2007-01-23 Luis F. Ortiz <lortiz@interactivesupercomputing.com>
10713 * strfns.cc (Fstrncmp): New function.
10715 2007-01-17 John W. Eaton <jwe@octave.org>
10717 * help.cc (help_from_file, help_from_symbol_table, help_from_list):
10718 Rewrite using raw_ versions.
10720 2007-01-17 David Bateman <dbateman@free.fr>
10722 * help.cc (raw_help, raw_help_from_file,
10723 raw_help_from_symbol_table, raw_help_from_list): New functions.
10724 * help.h (raw_help): Provide decl.
10726 2007-01-16 John W. Eaton <jwe@octave.org>
10728 * DLD-FUNCTIONS/__pchip_deriv__.cc: Fix dpchim decl for --enable-64.
10729 (F__pchip_deriv__): Fix call to dpchim for --enable-64.
10731 * DLD-FUNCTIONS/fftw.cc: Delete decl for fftw_planner.
10733 2007-01-11 Michael Goffioul <michael.goffioul@swing.be>
10735 * load-path.h (class load_path): Tag with OCTINTERP_API.
10737 * ls-oct-binary.cc (read_binary_data): Use unsigned char, not
10738 char, for reading flags and data types.
10740 2007-01-10 Luis F. Ortiz <lortiz@interactivesupercomputing.com>
10742 * parse.y (load_fcn_from_file): Delete unused variable NAMES.
10743 If NM is absolute, strip directory and extension parts.
10745 2007-01-10 Michael Goffioul <michael.goffioul@swing.be>
10747 * DLD-FUNCTIONS/getrusage.cc: Use #ifdef __WIN32__, not __MINGW32__.
10749 2007-01-10 John W. Eaton <jwe@octave.org>
10751 * parse.y (load_fcn_from_file): Only compare last two characters
10752 when looking for ".m".
10754 2007-01-06 John W. Eaton <jwe@octave.org>
10756 * version.h (OCTAVE_CONFIG_STATEMENT): New macro
10757 (OCTAVE_NAME_AND_VERSION): Remove config info.
10758 (OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY):
10759 Use OCTAVE_CONFIG_STATEMENT here.
10761 2007-01-05 David Bateman <dbateman@free.fr>
10763 * Makefile.in (DLD_XSRC): Add fftw.cc and remove fftw_wisdom.cc
10764 * DLD-FUNCTIONS/fftw.cc: New file.
10765 * DLD-FUNCTIONS/fftw_wisdom.cc: Delete.
10766 * defaults.cc (Vfftw_wisdom_program): Delete variable.
10767 (set_default_fftw_wisdom_prog): Delete function that sets it.
10768 (install_defaults): Delete set_default_fftw_prog from defaults.
10769 (Ffftw_wisdom_program): Delete.
10771 2007-01-04 David Bateman <dbateman@free.fr>
10773 * ov-fcn-handle.cc (octave_fcn_handle::load_ascii,
10774 octave_fcn_handle::load_binary):
10775 Throw error if handle can't be created.
10777 2007-01-04 Luis F. Ortiz <lortiz@interactivesupercomputing.com>
10779 * mex.cc (mxArray_number::mxArray_number (int, const char **)):
10780 Correctly index LHS in assignment.
10782 2007-01-03 John W. Eaton <jwe@octave.org>
10784 * data.cc (Fisinteger): New function.
10785 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::is_integer_type,
10786 OCTAVE_VALUE_INT_SCALAR_T::is_integer_type): New function.
10787 * ov.h (octave_value::is_integer_type): New function.
10788 * ov-base.h (octave_base_value::is_integer_type): New virtual function.
10790 2007-01-03 Michael Goffioul <michael.goffioul@swing.be>
10792 * toplev.cc (Fsystem): Handle async calls on Windows systems.
10794 2007-01-03 David Bateman <dbateman@free.fr>
10796 * (OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc,
10797 OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc,
10798 OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc,
10799 OPERATORS/op-scm-cm.cc, OPERATORS/op-scm-cs.cc,
10800 OPERATORS/op-scm-m.cc, OPERATORS/op-scm-s.cc,
10801 OPERATORS/op-scm-scm.cc, OPERATORS/op-scm-sm.cc,
10802 OPERATORS/op-sm-cm.cc, OPERATORS/op-sm-cs.cc,
10803 OPERATORS/op-sm-m.cc, OPERATORS/op-sm-s.cc,
10804 OPERATORS/op-sm-scm.cc, OPERATORS/op-sm-sm.cc,
10805 OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc):
10806 Modify div and ldiv functions so that scalars stored as sparse
10807 matrices are special cased.
10809 * ov-re-sparse.cc (double_value, complex_value): Scalar can be
10810 stored as a sparse matrix and so don't warn on implicit conversion
10812 * ov-cx-sparse.cc (double_value, complex_value): ditto.
10813 * ov-bool-sparse.cc (double_value, complex_value): ditto.
10815 2007-01-03 John W. Eaton <jwe@octave.org>
10817 * dynamic-ld.cc (octave_dynamic_loader::do_load_mex): Also check
10820 2006-12-30 John W. Eaton <jwe@octave.org>
10822 * ov-fcn-inline.cc: For compatibility, class id is
10823 "function_handle", not "inline function".
10825 2006-12-27 John W. Eaton <jwe@octave.org>
10827 * Makefile.in (%.df : %.cc): Insert a "do not edit" notice in the
10830 * mex.cc (mxArray_matlab::get_class_name,
10831 mxArray_octave_value::get_class_id): Use "function_handle", not
10834 2006-12-14 John W. Eaton <jwe@octave.org>
10836 * pt-decl.cc (tree_decl_elt::eval): New function.
10837 * pt-decl.h (tree_decl_elt::eval): Provide decl.
10838 (tree_decl_elt::is_defined, tree_decl_elt::lvalue_ok,
10839 tree_decl_elt::mark_as_formal_parameter, tree_decl_elt::rvalue,
10840 tree_decl_elt::lvalue): New functions.
10842 * pt-misc.h (class tree_parameter_list): Derive from
10843 octave_base_list<tree_decl_elt *> instead of
10844 octave_base_list<tree_identifier *>.
10845 (tree_parameter_list::tree_parameter_list (tree_identifier *)): Delete.
10846 (tree_parameter_list::tree_parameter_list (tree_decl_elt *)):
10848 * pt-misc.cc (tree_parameter_list::mark_as_formal_parameters,
10849 tree_parameter_list::initialize_undefined_elements,
10850 tree_parameter_list::undefine, tree_parameter_list::dup,
10851 tree_parameter_list::convert_to_const_vector,
10852 tree_parameter_list::is_defined): Handle argument list elements
10853 as tree_decl_list objects instead of tree_identifier objects.
10854 (tree_parameter_list::define_from_arg_vector): Likewise.
10855 Always process entire list, setting default values if possible.
10856 Accept ":" to mean "use default argument".
10858 * parse.y (param_list2): Use decl2 to recognize
10859 "identifier '=' expression" in addition to "identifier".
10861 * parse.y (return_list1, make_anon_fcn_handle, finish_function):
10862 Adapt to new definition of tree_parameter_list.
10863 * pt-bp.cc (tree_breakpoint::visit_parameter_list): Likewise.
10864 * pt-check.cc (tree_checker::visit_parameter_list): Likewise.
10865 * pt-pr-code.cc (tree_print_code::visit_parameter_list): Likewise.
10867 2006-12-08 John W. Eaton <jwe@octave.org>
10869 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::array_value,
10870 OCTAVE_VALUE_INT_MATRIX_T::complex_array_value,
10871 OCTAVE_VALUE_INT_MATRIX_T::bool_array_value,
10872 OCTAVE_VALUE_INT_MATRIX_T::char_array_value):
10873 Use fortran_vec to avoid expensive indexing operator.
10875 2006-12-08 David Bateman <dbateman@free.fr>
10877 * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::matrix_value,
10878 OCTAVE_VALUE_INT_SCALAR_T::complex_matrix_value,
10879 OCTAVE_VALUE_INT_MATRIX_T::matrix_value,
10880 OCTAVE_VALUE_INT_MATRIX_T::comlex_matrix_value): New functions.
10881 (OCTAVE_VALUE_INT_MATRIX_T::array_value,
10882 OCTAVE_VALUE_INT_MATRIX_T::comlex_array_value):
10883 Use octave_idx_type instead of int for indexing.
10885 2006-12-04 David Bateman <dbateman@free.fr>
10887 * xpow.cc (xpow (const Matrix&, double)): Add matrix type probing
10889 (xpow (const ComplexMatrix&, double)): ditto.
10890 * DLD-FUNCTIONS/inv.cc (Finv): Add matrix type probing.
10892 2006-12-06 John W. Eaton <jwe@octave.org>
10894 * sysdep.cc: Include "Cell.h" here.
10895 * input.h: Include "oct-obj.h", not "ov-list.h".
10897 2006-12-06 Michael Goffioul <michael.goffioul@swing.be>
10899 * mappers.cc (install_mapper_functions): Undefine isascii before
10900 the DEFUN_MAPPER for it.
10902 * input.cc (get_user_input): Prevent out of bounds array access
10903 when checking for EOL.
10905 2006-12-05 John W. Eaton <jwe@octave.org>
10907 * ls-oct-ascii.cc (extract_keyword): If no match and looking for
10908 more, skip to end of line before trying another match.
10910 * pt-mat.cc (tm_row_const::empty): New function.
10911 (tm_const::init): Don't append anything if tmp tm_row_const object
10913 (tree_matrix::rvalue): Default return value is Matrix().
10914 Don't do anything if tmp tm_const object is empty.
10916 * dirfns.cc (Fmkdir): Fix thinko in previous change.
10918 2006-12-05 Paul Kienzle <pkienzle@users.sf.net>
10920 * DLD-FUNCTIONS/rand.cc: Test for Poisson generator with lambda > 1e8.
10922 2006-12-04 David Bateman <dbateman@free.fr>
10924 * data.cc (Fdata): If ndims is greater than nargout and
10925 nargout is greater than 1, then collect size of trailing
10926 dimensions into retval(end).
10928 * load-path.cc (load_path::do_find_fcn): Return empty string if
10931 * ov-base-mat.cc (void octave_base_matrix<MT>::assign (const
10932 octave_value_list&, const MT&)): Invalidate matrix type on
10935 2006-11-30 John W. Eaton <jwe@octave.org>
10937 * DLD-FUNCTIONS/fftw_wisdom.cc (Ffftw_wisdom):
10938 Accept "r" or "w" for second argument.
10940 2006-11-29 John W. Eaton <jwe@octave.org>
10942 * DLD-FUNCTIONS/fftw_wisdom.cc (Ffftw_wisdom): Look in load-path
10943 if reading wisdom file, but not if writing.
10945 2006-11-28 John W. Eaton <jwe@octave.org>
10947 * mex.cc (mxArray_struct::get_field_by_number):
10948 Return 0 if key_num is out of range.
10949 (mxArray_struct::set_field_by_number):
10950 Do nothing if key_num is out of range.
10951 (mxArray_cell::get_cell, mxArray_cell::set_cell):
10952 Avoid out-of-bounds indexing
10954 2006-11-28 Luis F. Ortiz <lortiz@interactivesupercomputing.com>
10956 * mex.cc (mxArray_matlab::get_n, mxArray_octave_value::get_n):
10957 Return product of last N-1 dims.
10959 2006-11-28 John W. Eaton <jwe@octave.org>
10961 * lex.l (eat_whitespace): Also handle CRLF as EOL.
10963 * dirfns.cc (Fmkdir): Handle "mkdir (parent, dir)".
10965 2006-11-21 John W. Eaton <jwe@octave.org>
10967 * load-path.cc (load_path::do_find_file,
10968 load_path::do_find_first_of, load_path::do_find_all_first_of):
10969 Call rooted_pathname instead of absolute_pathname.
10970 * utils.cc (fcn_file_in_path, oct_file_in_path, mex_file_in_path):
10973 2006-11-16 Michael Goffioul <michael.goffioul@swing.be>
10975 * oct-hist.cc (default_history_file): Instead of appending
10976 "/.octave_hist", append directory separator (but only if
10977 necessary), then ".octave_hist".
10979 2006-11-16 John W. Eaton <jwe@octave.org>
10981 * data.cc (Fresize): Fix doc string.
10983 2006-11-15 John W. Eaton <jwe@octave.org>
10985 * DLD-FUNCTIONS/__gnuplot_raw__.l (write_data, write_inline_data):
10987 (save_in_tmp_file): Use write_data.
10988 (gnuplot::send_inline_data, gnuplot_do_send_inline_data):
10990 (F__gnuplot_send_inline_data__, F__gnuplot_save_data__):
10993 * ls-oct-ascii.cc (save_ascii_data_for_plotting):
10994 Call save_ascii_data with precision = 4.
10995 (save_three_d): Temporarily set precision to 4 for output stream.
10997 2006-11-15 Michael Goffioul <michael.goffioul@swing.be>
10999 * Cell.h (Cell): Tag class with OCTINTERP_API.
11001 2006-11-13 John W. Eaton <jwe@octave.org>
11003 * octave.cc (maximum_braindamage): Disable
11004 Octave:fopen-file-in-path and Octave:load-file-in-path warnings.
11006 * load-save.cc (find_file_to_load): New function.
11007 (Fload): Call find_file_to_load to search load path for file.
11009 * file-io.cc (Ffopen): Search load path for file.
11011 * load-path.cc (path::do_find_first_of, path::do_find_file):
11012 Break out of all loops once file is found, not just innermost one.
11014 * data.cc (Fsize_equal): New function.
11016 2006-11-13 Michael Goffioul <michael.goffioul@swing.be>
11018 * ov.cc (check_subsref_elements, Fsubsref, Fsubsasgn):
11021 * ov-re-mat.h, ov-scalar.h, pr-output.h:
11022 Sprinkle with OCTINTERP_API as needed.
11024 2006-11-11 John W. Eaton <jwe@octave.org>
11026 * Makefile.in (parse.cc): Avoid creating empty files.
11027 (%.df : %cc, builtins.cc, mkbuiltins, PKG_ADD, DOCSTRINGS,
11028 doc-files, gendoc.cc, ops.cc, $(OPT_HANDLERS), oct-errno.cc,
11029 oct-gperf.h): Use $(simple-move-if-change-rule) here.
11030 (lex.cc, __gnuplot_raw__.cc):
11031 Use $(destdir-move-if-change-rule) here.
11032 (ifndef omit_deps): Don't include stamp-prereq here.
11033 ($(DEF_FILES), $(MAKEDEPS)): Also depend on stamp-prereq.
11035 2006-11-10 John W. Eaton <jwe@octave.org>
11037 * ov-str-mat.cc (octave_char_matrix_str::load_ascii,
11038 octave_char_matrix_str::load_binary):
11039 Use chMatrix as buffer instead of C string.
11041 2006-11-09 John W. Eaton <jwe@octave.org>
11043 * ov-usr-fcn.h (octave_user_function::inline_function):
11045 (octave_user_function::mark_as_inline_function): Set it.
11046 (octave_user_function::is_inline_function): Check it.
11047 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
11048 Also skip setting curr_parent_fucntion if evaluating an inline
11050 (octave_user_function::octave_user_function):
11051 Initialize inline_function.
11052 * pt-fcn-handle.cc (tree_anon_fcn_handle::rvalue):
11053 Mark user function as inline here.
11055 2006-11-09 Michael Goffioul <michael.goffioul@swing.be>
11057 * load-path.cc (load_path::move): Don't use reference to file_info
11058 object that will be erased.
11060 2006-11-07 John W. Eaton <jwe@octave.org>
11062 * utils.cc (file_in_path): Don't unconditionally return "".
11064 * pager.cc (default_pager): Don't append options here.
11065 (pager_command): New function.
11067 (VPAGER_FLAGS): New variable.
11068 (FPAGER_FLAGS): New function.
11070 2006-11-06 John W. Eaton <jwe@octave.org>
11072 * oct-hist.cc (default_history_file): If env_file is not empty,
11073 just accept it rather than checking to see if it exists.
11075 2006-11-03 Bill Denney <denney@seas.upenn.edu>
11077 * help.cc (keywords): Document try and unwind_protect.
11079 2006-11-03 John W. Eaton <jwe@octave.org>
11081 * Makefile.in (DLL_CXXDEFS): Rename from XTRA_CXXDEFS.
11082 (DLL_CDEFS): Rename from XTRA_CDEFS.
11083 Substitute OCTINTERP_DLL_DEFS, not XTRA_OCTINTERP_DEFS.
11085 2006-11-02 Michael Goffioul <michael.goffioul@swing.be>
11087 * sysdep.cc (MSVC_init): Also cal w32_sigint_init and
11088 w32_set_quiet_shutdown.
11090 2006-11-01 John W. Eaton <jwe@octave.org>
11092 * ov.h (octave_value::idx_type_value): New function.
11093 * data.cc (fill_matrix, Flinspace, Freshape): Use idx_type_value
11094 instead of int_value to extract size args.
11096 2006-10-31 John W. Eaton <jwe@octave.org>
11098 * ov-range.h (octave_range::empty_clone): Return octave_matrix
11099 object instead of octave_range.
11101 2006-10-29 Juhani Saastamoinen <juhani@cs.joensuu.fi>
11103 * ls-mat5.cc (read_mat5_tag): Declare bytes as int32_t, not just int.
11105 2006-10-28 John W. Eaton <jwe@octave.org>
11107 * toplev.cc (Fatexit): Push function names on the stack even if we
11108 don't have atexit or on_exit.
11110 2006-10-28 Michael Goffioul <michael.goffioul@swing.be>
11112 * mappers.cc (install_mapper_functions): Undefine toascii before
11113 the DEFUN_MAPPER for it.
11115 2006-10-27 John W. Eaton <jwe@octave.org>
11117 * mexproto.h: Include oct-dlldefs.h.
11119 * pr-output.cc (SPECIALIZE_UABS): New macro.
11120 Use it to generate specializations of abs for unsigned int types.
11121 Instantiate abs for signed int types.
11123 * load-path.cc (load_path::do_initialize):
11124 Use dir_path::path_sep_str instead of ":".
11125 Don't append ":::" to xpath when calling do_set.
11127 * dirfns.cc (Fls, cleanup_iprocstream): Delete.
11129 * sysdep.cc (Ftilde_expand): If arg is cellstr, return cellstr.
11131 * ov.h (octave_value::is_cellstr): New function.
11132 * ov-base.h (octave_base_value::is_cellstr): New function.
11133 * ov-cell.h (octave_cell::is_cellstr): New function.
11134 * ov-cell.cc (Fiscellstr): Implement with is_cellstr.
11135 * Cell.cc (Cell::Cell (const dim_vector&, const string_vector&, bool)):
11137 (Cell::is_cellstr): New function.
11138 * Cell.h: Provide decls.
11140 * defaults.cc (subst_octave_home): If dir_sep_char is not '/',
11141 replace before returning.
11142 From Michael Goffioul <michael.goffioul@swing.be>.
11144 2006-10-26 John W. Eaton <jwe@octave.org>
11146 * cutils.c (octave_strcasecmp, octave-strncasecmp):
11147 Move to liboctave/lo-cutils.c.
11148 * utils.h: Delete decls.
11149 * strcasecmp.c: Move to liboctave/strcasecmp.c.
11150 * strncase.c: Move to liboctave/strncase.c.
11151 * Makefile.in (DIST_SRC): Delete them from the list.
11153 * bitfcns.cc (bitshift): If A < 0, return -bitshift (-A, N, MASK).
11155 2006-10-26 Michael Goffioul <michael.goffioul@swing.be>
11157 * help.cc (display_help_text): Quote sed patterns with ".
11159 * file-io.cc: Include file-io.h.
11161 * TEMPLATE-INST/Array-os.cc, TEMPLATE-INST/Array-sym.cc,
11162 TEMPLATE-INST/Array-tc.cc, defun-int.h, error.h, file-io.h,
11163 gripes.h, ls-oct-ascii.h, mexproto.h, oct-map.h, oct-obj.h,
11164 oct-stream.cc, oct-stream.h, octave.h, ov-base.h,
11165 ov-bool-sparse.cc, ov-bool-sparse.h, ov-cx-sparse.cc,
11166 ov-cx-sparse.h, ov-fcn.h, ov-re-sparse.cc, ov-re-sparse.h,
11167 ov-str-mat.h, ov-typeinfo.cc, ov-typeinfo.h, ov.h, pager.h,
11168 parse.h, pr-output.cc, pr-output.h, procstream.h, sighandlers.h,
11169 symtab.h, unwind-prot.h, utils.h, variables.h:
11170 Sprinkle with OCTINTERP_API as needed.
11172 2006-10-26 John W. Eaton <jwe@octave.org>
11174 * ov-bool.h (octave_bool::sparse_matrix_value,
11175 octave_bool::sparse_complex_matrix_value
11176 octave_bool::sparse_bool_matrix_value): New functions.
11178 2006-10-25 John W. Eaton <jwe@octave.org>
11180 * sighandlers.cc: Check defined (RETSIGTYPE_IS_VOID) instead of
11181 RETSIGTYPE == void.
11183 * oct-procbuf.cc (BUFSIZ): Define if not already defined.
11184 (octave_procbuf::open): Pass BUFSIZ as size argument to setvbuf.
11186 2006-10-25 Michael Goffioul <michael.goffioul@swing.be>
11188 * Makefile.in (XTRA_CDEFS, XTRA_CXXDEFS): Substitute here.
11190 * oct-procbuf.cc [_MSC_VER]: Define W32POPEN and W32PCLOSE the
11191 same as for __MINGW32__.
11192 (octave_procbuf::open, octave_procbuf::close) [_MSC_VER]:
11193 Use the same code as for __MINGW32__ and __CYGWIN__.
11195 * oct-prcstrm.cc [_MSC_VER]: Define popen and pclose.
11197 2006-10-25 John W. Eaton <jwe@octave.org>
11199 * sysdep.cc (w32_set_octave_home): Correctly initialize bin_dir.
11200 Fill it with '\0' instead of ' '.
11202 2006-10-24 Michael Goffioul <michael.goffioul@swing.be>
11204 * Makefile.in: Filter out $(XTRA_CXXDEFS) from $(ALL_CXXFLAGS) for
11207 2006-10-24 John W. Eaton <jwe@octave.org>
11209 * sysdep.cc (MSC_init): New function.
11210 (sysdep_init): Call it.
11211 (w32_set_octave_home): New function, based on code from Michael
11212 Goffioul <michael.goffioul@swing.be>.
11213 (MINGW_init): Call w32_set_octave_home here too.
11215 2006-10-23 John W. Eaton <jwe@octave.org>
11217 * symtab.cc (symbol_table::clear_mex_functions): New function.
11218 * symtab.h: Provide decl.
11219 * vriables.cc (clear_mex_functions): New function.
11220 * variables.h Provide decl.
11221 * toplev.cc: Call clear_mex_functions instead of delete_symbol_tables.
11223 * variables.cc (delete_symbol_tables): Delete.
11224 * variables.h: Delete decl.
11226 * mex.cc (mex::unmark_array): New function.
11227 (mex::persistent): Define with unmark_array.
11228 (maybe_unmark_array): New function.
11229 (mxArray_struct::set_field_by_number, mxArray_cell::set_cell):
11230 Call maybe_unmark_array on val to avoid freeing val twice on exit
11232 (mxFree): Call xfree, not free.
11234 2006-10-21 John W. Eaton <jwe@octave.org>
11237 (OCTAVE_VALUE_INT_MATRIX_T::OCTAVE_TYPE_PREDICATE_FUNCTION,
11238 (OCTAVE_VALUE_INT_SCALAR_T::OCTAVE_TYPE_PREDICATE_FUNCTION):
11239 Function is now const, so it properly overloads method in base
11242 * mex.cc (mxArray_octave_value::is_uint32):
11243 Call val.is_uint32_type, not val.is_int32_type.
11244 (mxArray_octave_value::is_uint64):
11245 Call val.is_uint64_type, not val.is_int64_type.
11246 (mxArray_octave_value::is_uint8):
11247 Call val.is_uint8_type, not val.is_int8_type.
11249 2006-10-20 Paul Kienzle <pkienzle@users.sf.net>
11251 * ov-mex-fcn.h (octave_mex_function::atexit): New function.
11252 (octave_mex_function::exit_fcn_ptr): New data member.
11253 * ov-mex-fcn.cc (octave_mex_function::exit_fcn_ptr): New data member.
11254 (octave_mex_function::octave_mex_function): Initialize it.
11255 (octave_mex_function::~octave_mex_function):
11256 If we have an exit function, call it.
11258 2006-10-20 John W. Eaton <jwe@octave.org>
11260 * variables.cc (delete_symbol_tables): New function.
11261 * variables.h: Provide decl.
11262 * toplev.cc (do_octave_atexit): Call it.
11264 * mex.cc (mex::mex): New arg, a pointer to the current mex function.
11265 (mex::curr_mex_fcn): New data member.
11266 (mex::current_mex_function): New function.
11267 (mexAtExit): Set exit function pointer in current mex file object.
11269 2006-10-20 Paul Kienzle <pkienzle@users.sf.net>
11271 * mex.cc (enum callstyle): Delete enum definition.
11272 (Fortran_mex, C_mex): Delete functions.
11273 (call_mex): First arg is now bool.
11274 * ov-mex-fcn.cc (call_mex): Fix decl to match new definition.
11275 (Fortran_mex, C_mex): Delete decls.
11276 (octave_mex_function::do_multi_index_op): Simplify call to call_mex.
11278 2006-10-20 John W. Eaton <jwe@octave.org>
11280 * lex.l (handle_identifier): If a command name is found, skip
11281 starting command mode if parsing an object index.
11283 2006-10-20 David Bateman <dbateman@free.fr>
11285 * DLD-FUNCTION/spqr.cc (dmperm_internal): New function with core
11287 (Fdmperm): Call dmperm_internal rather then calculating loally.
11288 (Fsprank): New function to calculate the strutural rank also using
11291 2006-10-19 John W. Eaton <jwe@octave.org>
11293 * ov-struct.cc (octave_struct::as_mxArrary):
11294 Use OCTAVE_LOCAL_BUFFER to allocate tempoarary array of field names.
11296 * mxarray.h (mxArray::persistent): Delete var and all uses.
11297 (mxArray::mark_persistent, mxArray::unmark_persistent,
11298 mxArray::is_persistent): Delete functions.
11299 * mex.cc (mex::function_name): Use mxArray::strsave, not strsave.
11300 (mex::mark_array): New function.
11301 (mex::make_value): Use it.
11302 (mex::free_value): Return true if we found ptr in arraylist.
11303 (mex::persistent (mxArray *)): Remove ptr from arraylist instead
11304 of marking it as persistent.
11305 (mxArray::malloc): Call ::malloc instead of malloc.
11306 (mxArray::calloc): Call ::calloc instead of calloc.
11307 (maybe_mark_array): New function.
11308 (mxCreateCellArray, mxCreateCellMatrix, mxCreateCharArray,
11309 mxCreateCharMatrixFromStrings, mxCreateDoubleMatrix,
11310 mxCreateDoubleScalar, mxCreateLogicalArray, mxCreateLogicalMatrix,
11311 mxCreateLogicalScalar, mxCreateNumericArray,
11312 mxCreateNumericMatrix, mxCreateSparse,
11313 mxCreateSparseLogicalMatrix, mxCreateString, mxCreateStructArray,
11314 mxCreateStructMatrix, mxDuplicateArray): Use it.
11315 (mxDestroyArray): No need to check persistence now.
11316 Also delete ptr if mex_context->free_value does not.
11317 (call_mex): No need to delete elements of argout now.
11319 2006-10-18 John W. Eaton <jwe@octave.org>
11321 * dynamic-ld.cc (octave_shlib_list::remove,
11322 octave_shlib_list::do_remove, octave_mex_file_list::remove,
11323 octave_mex_file_list::do_remove): New arg, cl_hook.
11324 (octave_shlib_list::do_remove): Pass cl_hook to octave_shlib close
11326 (octave_dynamic_loader::do_load_oct): Don't call close on shl
11327 directly. Pass do_clear_function to octave_shlib_list::remove.
11329 * mex.cc (mexUnlock): Don't warn if unlocking a function that is
11332 * pt-fcn-handle.cc (tree_anon_fcn_handle::dup):
11333 Correctly duplicate symbol table info.
11335 2006-10-17 Michael Goffioul <michael.goffioul@swing.be>
11337 * oct-map.h: Include <algorithm>.
11339 2006-10-16 John W. Eaton <jwe@octave.org>
11341 * oct-stream.cc (octave_stream_list::do_remove): Handle "all" as a
11344 2006-10-13 Michael Goffioul <michael.goffioul@swing.be>
11346 * Makefile.in: Adapt rules to use $(LIBPRE).
11348 2006-10-11 John W. Eaton <jwe@octave.org>
11350 * mex.h (UINT64_T, uint64_T, INT64_T, int64_T, UINT32_T, uint32_T,
11351 INT32_T, int32_T, UINT16_T, uint16_T, INT16_T, int16_T, UINT8_T,
11352 uint8_T, INT8_T, int8_T): Conditionally define.
11353 From Andy Adler <adler@site.uottawa.ca>.
11355 2006-10-09 John W. Eaton <jwe@octave.org>
11357 * oct-conf.h.in (OCTAVE_CONF_CURL_LIBS): Substitute.
11358 * toplev.cc (octave_config_info): Add CURL_LIBS to the list.
11360 2006-10-09 Alexander Barth <abarth@marine.usf.edu>
11362 * DLD-FUNCTIONS/urlwrite.cc: New file providing urlwrite and urlread.
11364 2006-10-09 John W. Eaton <jwe@octave.org>
11366 * pt-mat.cc (tree_matrix::dup): Append new elements to new matrix.
11367 * pt-cell.cc (tree_cell::dup): Append new elements to new cell array.
11369 2006-10-04 John W. Eaton <jwe@octave.org>
11371 * version.h (OCTAVE_VERSION): Now 2.9.9+.
11373 * DLD-FUNCTIONS/__gnuplot_raw__.l (F__clear_plot_window__):
11374 Rename from Fclearplot. Only clear plot window.
11376 2006-10-03 John W. Eaton <jwe@octave.org>
11378 * DLD-FUNCTIONS/luinc.cc (Fluinc): Avoid crash if SparseLU or
11379 SparseComplexLU constructor fails.
11381 * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx):
11382 Delete unused variable.
11384 2006-10-03 David Bateman <dbateman@free.fr>
11386 * Makefile.in (OCT_LINK_DEPS) Include $(CAMD_LIBS) in the list.
11387 (octave$(EXEEXT)): Include $(CAMD_LIBS) in link command.
11389 2006-10-02 John W. Eaton <jwe@octave.org>
11391 * version.h (OCTAVE_VERSION): Now 2.9.9.
11392 (OCTAVE_API_VERSION): Now api-v22.
11393 (OCTAVE_RELEASE_DATE): Now 2006-10-02.
11395 * pr-output.cc (pr_plus_format): Use "inline" instead of "static
11396 inline" for template functions to avoid problems when not
11397 compiling with g++.
11399 * mex.cc (call_mex): Delete elements of argout.
11400 From Kai Labusch <labusch@inb.uni-luebeck.de>.
11402 2006-09-29 John W. Eaton <jwe@octave.org>
11404 * DLD-FUNCTIONS/spfind.cc (sparse_find_non_zero_elem_idx):
11405 Leading dimension is NR, not NC.
11407 * Makefile.in (DEP_5): Include oct-errno.cc in the list.
11409 2006-09-27 John W. Eaton <jwe@octave.org>
11411 * pr-output.cc (abs): New template function. Instantiate for
11414 2006-09-27 David Bateman <dbateman@free.fr>
11416 * file-io.cc (Fsprintf): If fmt is an sq_string, return an sq_string.
11418 * DLD-FUNCTIONS/sparse.cc (spfind, sparse_find): Delete.
11419 * DLD-FUNCTIONS/spfind.cc: New file implementating compatible
11420 sparse find function.
11421 * Makefile.in (DLD_XSRC): Add spfind.cc.
11423 2006-09-26 Bill Denney <bill@givebillmoney.com>
11425 * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx, Ffind):
11426 Handle direction and limit on number of elements to find.
11428 2006-09-26 John W. Eaton <jwe@octave.org>
11430 * error.cc (warning_1): Call error_2, not error.
11432 2006-09-15 John W. Eaton <jwe@octave.org>
11434 * ops.h (DEFSTRDBLCONVFN): New arg, TFROM.
11435 * OPERATORS/op-double-conv.cc: Declare and install sq_string
11438 * ov-base-int.cc (octave_base_int_scalar<T>::convert_to_str_internal,
11439 octave_base_int_matrix<T>::convert_to_str_internal):
11441 * ov-base-int.h: Provide decls.
11443 2006-09-15 Søren Hauberg <soren@hauberg.org>.
11445 * data.cc (Fsize): If nargout > ndims, fill with 1.
11447 2006-09-15 John W. Eaton <jwe@octave.org>
11449 * octave.cc: Fix xerbla decl.
11451 2006-09-13 John W. Eaton <jwe@octave.org>
11453 * DLD-FUNCTIONS/cellfun.cc: Improve error message for uniform
11454 output case when results are not scalars. Avoid shadow decls.
11456 2006-09-13 David Bateman <dbateman@free.fr>
11458 * ov-scalar.h (octave_scalar::sparse_matrix_value,
11459 octave_scalar::sparse_complex_matrix_value): New extractor functions.
11460 * ov-complex.h (octave_complex::sparse_matrix_value,
11461 octave_complex::sparse_complex_matrix_value): Ditto.
11462 * DLD-FUNCTIONS/spkron.cc (Fspkron): Change example in help.
11464 2006-09-12 David Bateman <dbateman@free.fr>
11466 * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Allow matlab compatiable
11467 'UniformOutput' and 'ErrorHandler' options. Change output when
11468 called with function handler or inline function to by default have
11469 'UniformOutput' set to true. Allow functions with multiple inputs
11470 and outputs. Add test code. Replace some int with octave_idx_type.
11471 (Fnum2cell): Replace some int with octave_idx_type. Add test code.
11473 2006-09-11 Yozo Hida <yozo@cs.berkeley.edu>
11475 * DLD-FUNCTIONS/gcd.cc (Fgcd): Extend range by using std::floor
11476 instead of converting to int.
11478 2006-09-05 John W. Eaton <jwe@octave.org>
11480 * mex.cc (mxArray_sparse::as_octave_value): Cast nzmax to
11481 octave_idx_type for sparse matrix constructors.
11483 2006-09-01 John W. Eaton <jwe@octave.org>
11485 * dirfns.cc: Don't handle nargout == 0 as a special case.
11486 (octave_change_to_directory): Perform tilde expansion on directory
11489 2006-08-30 John W. Eaton <jwe@octave.org>
11491 * load-save.cc (get_file_format): Fix misplaced #endif.
11493 2006-08-29 John W. Eaton <jwe@octave.org>
11495 * load-path.cc (execute_pkg_add_or_del):
11496 Source PKG_ADD or PKG_DEL in base workspace.
11497 * parse.y (source_file): New optional arg, context.
11498 * parse.h (source_file): Fix decl.
11500 2006-08-25 John W. Eaton <jwe@octave.org>
11502 * version.h (OCTAVE_VERSION): Now 2.9.8+.
11504 2006-08-24 John W. Eaton <jwe@octave.org>
11506 * version.h (OCTAVE_VERSION): Now 2.9.8.
11507 (OCTAVE_API_VERSION): Now api-v21.
11508 (OCTAVE_RELEASE_DATE): Now 2006-08-24.
11510 2006-08-23 John W. Eaton <jwe@octave.org>
11512 * ov.h (octave_value::save_ascii): Delete strip_nan_and_inf arg.
11513 * ov-base.h, ov-base.cc (octave_base_value::save_ascii): Likewise.
11514 * ov-base-int.h, ov-base-int.cc (octave_base_int_matrix<T>::save_ascii,
11515 octave_base_int_scalar<T>::save_ascii, ): Likewise.
11516 * ov-base-sparse.cc, ov-base-sparse.h
11517 (octave_base_sparse<T>::save_ascii): Likewise.
11518 * ov-bool-mat.cc, ov-bool-mat.h (octave_bool_matrix::save_ascii):
11520 * ov-bool.cc, ov-bool.h (octave_bool::save_ascii): Likewise.
11521 * ov-cell.cc, ov-cell.h (octave_cell::save_ascii): Likewise.
11522 * ov-complex.cc, ov-complex.h (octave_complex::save_ascii): Likewise.
11523 * ov-fcn-handle.cc, ov-fcn-handle.h (octave_fcn_handle::save_ascii):
11525 * ov-fcn-inline.cc, ov-fcn-inline.h (octave_fcn_inline::save_ascii):
11527 * ov-list.cc, ov-list.h (octave_list::save_ascii): Likewise.
11528 * ov-range.cc, ov-range.h (octave_range::save_ascii): Likewise.
11529 * ov-scalar.cc, ov-scalar.h (octave_scalar::save_ascii): Likewise.
11530 * ov-str-mat.cc, ov-str-mat.h (octave_char_matrix_str::save_ascii):
11532 * ov-struct.cc, ov-struct.h (octave_struct::save_ascii): Likewise.
11533 * ov-re-mat.cc, ov-re-mat.cc (octave_matrix::save_ascii): Likewise.
11534 * ov-cx-mat.cc, ov-cx-mat.cc (octave_complex_matrix::save_ascii):
11536 * ov-cx-mat.cc, ov-cx-mat.cc (octave_complex_matrix::save_ascii):
11538 * ov-re-mat.cc, ov-re-mat.cc (octave_matrix::save_ascii): Likewise.
11540 * ls-oct-ascii.cc, ls-oct-ascii.h (save_ascii_data):
11541 Delete strip_nan_and_inf arg.
11542 (save_ascii_data_for_plotting): Delete strip_nan_and_inf arg from
11543 call to save_ascii_data.
11545 * DLD-FUNCTIONS/__gnuplot_raw__.l (handle_using): Accept "(EXPR)"
11546 as components of using clauses.
11547 (enum _toktype): New element DOLLAR.
11548 Accept "$" in lexer.
11550 * ls-oct-ascii.cc (save_ascii_data): Delete arg strip_nan_and_inf.
11553 * ls-oct-ascii.h (save_three_d): Provide decl.
11554 * load-save.h (save_ascii_data_for_plotting, save_three_d):
11557 2006-08-22 John W. Eaton <jwe@octave.org>
11559 * ov.h (octave_value::save_ascii): strip_nan_and_inf is now int,
11561 * ov-base.h, ov-base.cc (octave_base_value::save_ascii): Likewise.
11562 * ov-base-int.h, ov-base-int.cc (octave_base_int_matrix<T>::save_ascii,
11563 octave_base_int_scalar<T>::save_ascii, ): Likewise.
11564 * ov-base-sparse.cc, ov-base-sparse.h
11565 (octave_base_sparse<T>::save_ascii): Likewise.
11566 * ov-bool-mat.cc, ov-bool-mat.h (octave_bool_matrix::save_ascii):
11568 * ov-bool.cc, ov-bool.h (octave_bool::save_ascii): Likewise.
11569 * ov-cell.cc, ov-cell.h (octave_cell::save_ascii): Likewise.
11570 * ov-complex.cc, ov-complex.h (octave_complex::save_ascii): Likewise.
11571 * ov-fcn-handle.cc, ov-fcn-handle.h (octave_fcn_handle::save_ascii):
11573 * ov-fcn-inline.cc, ov-fcn-inline.h (octave_fcn_inline::save_ascii):
11575 * ov-list.cc, ov-list.h (octave_list::save_ascii): Likewise.
11576 * ov-range.cc, ov-range.h (octave_range::save_ascii): Likewise.
11577 * ov-scalar.cc, ov-scalar.h (octave_scalar::save_ascii): Likewise.
11578 * ov-str-mat.cc, ov-str-mat.h (octave_char_matrix_str::save_ascii):
11580 * ov-struct.cc, ov-struct.h (octave_struct::save_ascii): Likewise.
11581 * ov-re-mat.cc, ov-re-mat.cc (octave_matrix::save_ascii): Likewise.
11582 * ov-cx-mat.cc, ov-cx-mat.cc (octave_complex_matrix::save_ascii):
11585 * ov-cx-mat.cc, ov-cx-mat.cc (octave_complex_matrix::save_ascii):
11586 Don't strip Inf and NaN here. Call ComplexMatrix::save_ascii to
11588 * ov-re-mat.cc, ov-re-mat.cc (octave_matrix::save_ascii):
11589 Don't strip Inf and NaN here. Call Matrix::save_ascii to do the
11592 * ov-re-mat.cc, ov-cx-mat.cc (strip_infnan): Delete.
11593 * ls-oct-ascii.cc, ls-oct-ascii.h (save_ascii_data):
11594 strip_nan_and_inf is now int, not bool.
11595 (strip_infnan): Delete.
11596 (save_ascii_data_for_plotting): Call save_ascii_data with
11597 strip_nan_and_inf = 2.
11599 * Makefile.in (INCLUDES): Remove matrix.h from the list.
11601 2006-08-22 David Bateman <dbateman@free.fr>
11603 * sparse-xpow.cc: Replace all uses of pow by std::pow.
11604 (elem_pow): Simplify for two sparse matrices arguments.
11606 2006-08-22 John W. Eaton <jwe@octave.org>
11608 * ls-oct-ascii.cc: Increase default value of save_precision to 16.
11610 * ls-mat-ascii.cc (save_mat5_ascii_data): Use scientific format.
11612 2006-08-21 John W. Eaton <jwe@octave.org>
11614 * ls-mat5.cc (read_mat5_binary_data, read_mat5_integer_data,
11615 write_mat5_array): Unconditionally enable code for 64-bit int types.
11617 * ov-fcn-handle.cc (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA):
11618 For compatibility, set class to function_handle.
11620 2006-08-18 John W. Eaton <jwe@octave.org>
11622 * pr-output.cc (set_real_matrix_format): Also always include space
11623 for sign if values are int, inf, or nan.
11624 (set_complex_format, set_complex_matrix_format): Always include
11625 space for sign in real format, but never in imaginary format.
11627 * gripes.cc (gripe_logical_conversion): New function.
11628 * gripes.h: Provide decl.
11629 * ov.h (octave_value::bool_value, octave_value::bool_matrix_value,
11630 octave_value::bool_array_value): New arg, warn.
11631 * ov-base.cc, ov-base.h (octave_base_value::bool_value,
11632 octave_base_value::bool_matrix_value,
11633 octave_base_value::bool_array_value): Likewise.
11634 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::bool_array_value,
11635 OCTAVE_VALUE_INT_SCALAR_T::bool_array_value): Likewise.
11636 * ov-range.h (octave_range::bool_array_value): Likewise.
11637 * ov-re-mat.cc, ov-re-mat.h (octave_matrix::bool_array_value):
11639 * ov-re-sparse.cc, ov-re-sparse.h
11640 (octave_sparse_matrix::bool_array_value): Likewise.
11641 * ov-scalar.h (octave_scalar::bool_value,
11642 octave_scalar::bool_array_value): Likewise.
11643 * OPERATORS/op-bm-b.cc (oct_assignop_conv_and_assign):
11644 Ask for warning from bool_array_value.
11645 * OPERATORS/op-bm-bm.cc (oct_assignop_conv_and_assign): Likewise.
11646 * ov-bool.h (octave_bool::bool_value,
11647 octave_bool::bool_matrix_value, octave_bool::bool_array_value):
11649 * ov-bool-mat.h (octave_bool_matrix::bool_matrix_value,
11650 octave_bool_matrix::bool_array_value): Likewise.
11651 * ov-bool-sparse.cc, ov-bool-sparse.h
11652 (octave_sparse_bool_matrix::bool_matrix_value,
11653 octave_sparse_bool_matrix::bool_array_value): Likewise.
11655 2006-08-18 Benjamin Lindner <lindnerben@gmx.net>
11657 * ls-mat5.cc (read_mat5_tag): Declare type as int32_t, not int.
11658 (read_mat5_binary_element): Likewise, for len and element_length.
11660 2006-08-18 John W. Eaton <jwe@octave.org>
11662 * load-save.h (enum load_save_format): New element, LS_MAT_ASCII_LONG.
11663 * load-save.cc (Fload, Fsave): Make -ascii Matlab compatible.
11664 (do_save): Handle LS_MAT_ASCII.
11665 * ls-mat-ascii.cc (save_mat_ascii_data): New function.
11666 * ls-mat-ascii.h: Provide decl.
11668 2006-08-17 John W. Eaton <jwe@octave.org>
11670 * ls-mat5.cc (save_mat5_element_length): Correctly compute element
11671 length for character data. Handle N-d character data
11672 (save_mat5_binary_element): Handle N-d character data.
11674 2006-08-16 John W. Eaton <jwe@octave.org>
11676 * parse.y (gobble_leading_white_space): New arg, SKIP_CODE.
11679 2006-08-15 John W. Eaton <jwe@octave.org>
11681 * help.cc (help_from_file): Call get_help_from_file with new file
11682 arg. Print file info here.
11684 * parse.y (get_help_from_file): Delete include_file_info arg.
11685 Provide two versions, one that returns the file found in a
11686 reference arg and one that does not.
11688 * variables.cc (do_isglobal): New function.
11689 (Fisglobal): Use it.
11690 (Fis_global): New function.
11692 2006-08-14 John W. Eaton <jwe@octave.org>
11694 * variables.cc (symbol_record_name_compare): Fix casts.
11696 * ov-cell.cc (octave_cell::subsasgn): Call empty_conv for 0x0
11697 objects, not just empty objects.
11699 * oct-map.h (Octave_map::clear): Also clear key_list.
11701 * load-path.cc (load_path::find_dir_info, load_path::do_add,
11702 load_path::do_remove): Perform tilde expansion on directory here.
11704 2006-07-29 John W. Eaton <jwe@octave.org>
11706 * matrix.h: Delete to avoid conflict with liboctave/Matrix.h on
11707 case-insensitive filesystems.
11709 * version.h (OCTAVE_VERSION): Now 2.9.7+.
11711 2006-07-28 John W. Eaton <jwe@octave.org>
11713 * version.h (OCTAVE_VERSION): Now 2.9.7.
11714 (OCTAVE_API_VERSION): Now api-v20.
11715 (OCTAVE_RELEASE_DATE): Now 2006-07-28.
11717 * load-path.cc (path::do_add): Warn for trailing "//".
11719 * strfns.cc: Comment out some tests for snapshot.
11721 2006-07-27 John W. Eaton <jwe@octave.org>
11723 * defaults.cc (Vlocal_api_arch_lib_dir): New variable.
11724 (set_default_local_api_arch_lib_dir): New function.
11725 (install_defaults): Call it.
11726 (set_exec_path): Put Vlocal_api_arch_lib_dir in the list.
11727 * toplev.cc (localapiarchlibdir): Include it in the list.
11728 * defaults.h.in (OCTAVE_LOCALAPIARCHLIBDIR): Substitute here.
11730 2006-07-26 John W. Eaton <jwe@octave.org>
11732 * mex.cc (mxArray::as_octave_value (mxArray *)): New static function.
11733 (call_mex, mexPutVariable, mexCallMATLAB,
11734 mxArray_cell::as_octave_value, mxArray_struct::as_octave_value):
11735 Use static version of as_octave_value here.
11736 (mxArray_sparse::mxArray_sparse (const mxArray_sparse&)):
11737 Check pr, ir, and jc before calling memcpy.
11738 (mxArray_number::mxArray_number): Check pr before calling memcpy
11740 * mxarray.h (mxArray::as_octave_value (mxArray *)): Provide decl.
11741 (mxArray::as_octave_value): Now protected.
11743 * file-io.cc (Ffeof, Fferror): Use DEFUNX instead of DEFUN.
11745 * mex.cc (xfree): New function.
11746 (mex::free): Use it.
11747 (mxArray_struct::~mxArray_struct, mxArray_cell::~mxArray_cell):
11748 Delete elements with delete, not mxDestroyArray.
11749 (mex::cleanup): Don't call mex::free or mex::free_value.
11750 (mex::free_value): Add debug warning.
11751 (mex::mark, mex::unmark): Fix debug warning.
11752 (call_mex): Use unwind_protect frame.
11753 (mexUnlock): Use iterator to remove item from mex_lock_count.
11755 * octave.cc (maximum_braindamage): Use disable_warning instead of
11756 bind_internal_variable to disable function-name-clash warning.
11757 * error.cc (disable_warning): No longer static.
11758 * error.h: Provide decl.
11760 2006-07-25 David Bateman <dbateman@free.fr>
11762 * mex.cc (mxArray_octave_value::get_class_id): Handle sparse.
11763 (class mxArray_sparse): Derive from mxArray_matlab, not
11765 (mxArray_sparse::as_octave_value): Implement function.
11766 * ov-bool-sparse.cc (octave_sparse_bool_matrix::as_mxArray):
11767 Implement function.
11768 * ov-cx-sparse.cc (octave_sparse_complex_matrix::as_mxArray):
11769 Implement function.
11770 * ov-re-sparse.cc (octave_sparse_matrix::as_mxArray):
11771 Implement function.
11773 2006-07-25 John W. Eaton <jwe@octave.org>
11775 * mex.cc (mxArray_struct::as_octave_value, call_mex,
11776 mexCallMATLAB, mxArray_cell::as_octave_value):
11777 Convert NULL mxArray* pointers to empty matrix values.
11778 (mxArray_octave_value:get_ir): Fix typo.
11780 2006-07-22 John W. Eaton <jwe@octave.org>
11782 * mxarray.h: New file.
11783 * mex.h, mexproto.h, mex.cc: New implementation of mxArray and MEX
11786 * ov.h (octave_value::mex_get_ir, octave_value::mex_get_jc):
11788 * ov-base.h (octave_base_value::mex_get_ir,
11789 octave_base_value::mex_get_jc): New virtual functions.
11790 * ov-base-sparse.h (octave_base_sparse<T>::mex_get_ir,
11791 octave_base_sparse<T>::mex_get_jc): New functions.
11793 * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::as_mxArray,
11794 OCTAVE_VALUE_INT_MATRIX_T::as_mxArray): New functions.
11795 * ov-int8.h, ov-int16.h, ov-int32.h, ov-int64.h, ov-uint8.h,
11796 ov-uint16.h, ov-uint32.h, ov-uint64.h: Define OCTAVE_INT_MX_CLASS
11797 before including ov-intx.h. Undef it after.
11798 * ov-range.cc (octave_range::as_mxArray): New function.
11799 * ov-range.h: Provide decl.
11800 * ov-scalar.cc (octave_scalar::as_mxArray): New function.
11801 * ov-scalar.h: Provide decl.
11802 * ov-complex.cc (octave_complex::as_mxArray): New function.
11803 * ov-complex.h: Provide decl.
11804 * ov-re-mat.cc (octave_matrix::as_mxArray): New function.
11805 * ov-re-mat.h: Provide decl.
11806 * ov-cx-mat.cc (octave_complex_matrix::as_mxArray): New function.
11807 * ov-cx-mat.h: Provide decl.
11808 * ov-ch-mat.cc (octave_char_matrix::as_mxArray): New function.
11809 * ov-ch-mat.h: Provide decl.
11810 * ov-bool-mat.cc (octave_bool_matrix::as_mxArray): New function.
11811 * ov-bool-mat.h: Provide decl.
11812 * ov-bool.cc (octave_bool::as_mxArray): New function.
11813 * ov-bool.h: Provide decl.
11815 * ov-struct.h (octave_struct::numel): New function.
11817 * ls-mat5.cc (arrayclasstype): Use "MAT_FILE_" instead of "mx" as
11818 prefix for element names.
11820 * ov.h (octave_value::as_mxArray): New function.
11821 * ov-base.cc (octave_base_value::as_mxArray): New function.
11822 * ov-base.h: Provide decl.
11824 * ov.h (octave_value::mex_get_data): New function.
11825 * ov-base.h (octave_base_value::mex_get_data): New function.
11826 * ov-base-scalar.h (octave_base_scalar<ST>::mex_get_data): New function.
11827 * ov-base-matrix.h (octave_base_matrix<MT>::mex_get_data): New function.
11828 * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::mex_get_data): New function.
11830 * ov.h (octave_value::nfields): New function.
11831 * ov-base.cc (octave_base_value::nfields): New virtual function.
11832 * ov-base.h: Provide decl.
11833 * ov-struct.h (octave_struct::nfields): New function.
11835 2006-07-19 John W. Eaton <jwe@octave.org>
11837 * OPERATORS/op-bm-bm.cc (oct_assignop_conv_and_assign): New function.
11838 (install_bm_bm_ops): Install it for various types.
11839 * OPERATORS/op-bm-b.cc (oct_assignop_conv_and_assign): New function.
11840 (install_bm_b_ops): Install it for various types.
11841 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::bool_array_value,
11842 OCTAVE_VALUE_INT_SCALAR_T::bool_array_value): New functions.
11843 * ov-range.h (octave_range::bool_array_value): New function.
11844 * ov-re-sparse.cc (octave_sparse_matrix::bool_array_value):
11846 * ov-re-sparse.h: Provide decl.
11847 * ov-re-mat.cc (octave_matrix::bool_array_value): New function.
11848 * ov-re-mat.h: Provide decl.
11850 * ov-base.cc (octave_base_value::numeric_assign):
11851 Avoid memory leak when converting LHS.
11853 2006-07-18 John W. Eaton <jwe@octave.org>
11855 * ov.h (octave_value::is_int8_type, octave_value::is_int16_type,
11856 octave_value::is_int32_type, octave_value::is_int64_type,
11857 octave_value::is_uint8_type, octave_value::is_uint16_type,
11858 octave_value::is_uint32_type, octave_value::is_uint64_type):
11860 * ov-base.h (octave_base_value::is_int8_type,
11861 octave_base_value::is_int16_type,
11862 octave_base_value::is_int32_type,
11863 octave_base_value::is_int64_type,
11864 octave_base_value::is_uint8_type,
11865 octave_base_value::is_uint16_type,
11866 octave_base_value::is_uint32_type,
11867 octave_base_value::is_uint64_type): New functions.
11868 * ov-int8.h, ov-int16.h, ov-int32.h, ov-int16.h, ov-uint8.h,
11869 ov-uint16.h, ov-uint32.h, ov-uint16.h: Define OCTAVE_BASE_INT_T.
11870 * ov-intx.h: Use OCTAVE_BASE_INT_T to define type-specific predicate.
11872 * ov.h (octave_value::is_double_type, octave_value::is_single_type):
11874 * ov-base.h (octave_base_value::is_double_type,
11875 octave_base_value::is_single_type): New functions.
11876 * ov-re-mat.h (octave_matrix::is_double_type): New function.
11877 * ov-cx-mat.h (octave_matrix::is_double_type): New function.
11878 * ov-scalar.h (octave_scalar::is_double_type): New function.
11879 * ov-complex.h (octave_complex::is_double_type): New function.
11880 * ov-range.h (octave_range::is_double_type): New function.
11881 * ov-re-sparse.h (octave_sparse_matrix::is_double_type): New function.
11882 * ov-cx-sparse.h (octave_sparse_complex_matrix::is_double_type):
11885 2006-07-15 John W. Eaton <jwe@octave.org>
11887 * ov-typeinfo.cc: Also instantiate arrays of assignany_ops.
11889 * oct-errno.cc.in (octave_errno::octave_errno): VALUE field in
11890 errno_struct no longer const.
11892 * DLD-FUNCTIONS/dispatch.cc (octave_dispatch::do_index_op):
11893 Declare resize_ok arg as bool, not int.
11894 Provide default value for resize_ok.
11896 2006-07-14 John W. Eaton <jwe@octave.org>
11898 * oct-stream.cc (do_write): Include explicit instantiations.
11900 * ov-str-mat.h (octave_char_matrix_sq_str::resize):
11901 Include fill arg to match base class.
11902 * ov-struct.h (octave_struct::resize): Likewise.
11904 * ov-base-mat.cc, ov-base-mat.h, ov-base-sparse.cc,
11905 ov-base-sparse.h, ov-base.cc, ov-base.h, ov-bool.cc,
11906 ov-bool.h, ov-complex.cc, ov-complex.h, ov-intx.h, ov-list.cc,
11907 ov-list.h, ov-range.cc, ov-range.h, ov-scalar.cc, ov-scalar.h,
11908 ov-str-mat.cc, ov-str-mat.h, ov.h (do_index_op):
11909 Declare resize_ok arg as bool, not int.
11910 Provide default value for resize_ok.
11912 * c-file-ptr-stream.h (c_file_ptr_stream::c_file_ptr_stream):
11915 2006-07-13 John W. Eaton <jwe@octave.org>
11917 * oct-map.h (Octave_map::del): Add missing std:: qualifier to use
11920 2006-07-07 John W. Eaton <jwe@octave.org>
11922 * ov.h (octave_value::is_bool_scalar): New function.
11923 * ov-base.h (octave_base_value::is_bool_scalar): New function.
11924 * ov-bool.h (octave_bool::is_bool_scalar): New function.
11926 * oct-map.cc (Octave_map::keys): Use assert.
11927 (Octave_map::assign): Avoid inserting new key in map unless
11928 assignment to cell succeeds.
11930 * oct-map.h (Octave_map::del): Only touch key_list if map contains key.
11931 Assert that key_list contains key.
11933 * oct-map.h (Octave_map::maybe_add_to_key_list): For efficiency,
11934 check map, not key_list. From Paul Kienzle <pkienzle@users.sf.net>.
11936 2006-07-06 John W. Eaton <jwe@octave.org>
11938 * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Declare mrowsc volatile.
11940 * ov-struct.cc (octave_struct::print_raw): Print keys in key_list
11943 * oct-map.h (Octave_map::key_list): New data member.
11944 (Octave_map::maybe_add_to_key_list): New function.
11945 (Octave_map::key_list_iterator, Octave_map::const_key_list_iterator):
11947 (Octave_map::del): Also delete key from key_list.
11948 * oct-map.cc (Octave_map::keys): Compute return value from
11949 key_list instead of map.
11950 (Octave_map::assign, Octave_map::contents): Call maybe_add_to_key_list.
11951 * oct-map.h, oct-map.cc (Octave_map::Octave_map):
11952 Insert keys in key_list.
11954 * oct-map.h (Octave_map::Octave_map (const dim_vector&,
11955 const string_vector&)): New arg, key_list_arg.
11956 * oct-map.cc: Move definition here.
11958 2006-07-05 John W. Eaton <jwe@octave.org>
11960 * mex.cc (mexGetVariable): Rename from mexGetArray, swap arguments.
11961 (mexGetVariablePtr): Rename from mexGetArrayPtr, swap arguments.
11962 (mexErrMsgIdAndTxt, mexWarnMsgIdAndTxt): New functions.
11963 * mexproto.h: Provide decls.
11964 Include decls for as yet unsupported functions.
11965 * mex.h: Add enum for class ids.
11966 (mexGetArray): Define using mexGetVariable.
11967 (mexGetArrayPtr): Define using mexGetVariablePtr.
11969 2006-07-02 John W. Eaton <jwe@octave.org>
11971 * ov-str-mat.cc (CHAR_MATRIX_CONV): Omit "warn-" from label.
11972 * parse.y (maybe_warn_variable_switch_label): Likewise.
11974 2006-07-01 John W. Eaton <jwe@octave.org>
11976 * parse.y (finish_cell): Use finish_matrix to do constant folding.
11978 2006-06-30 John W. Eaton <jwe@octave.org>
11980 * ov-base.cc (octave_base_value::numeric_assign):
11981 Avoid memory leak when converting LHS.
11983 * oct-hist.cc (do_history, initialize_history, Fhistory_file):
11984 Don't perform tilde expansion on history file name.
11986 * syscalls.cc (Flstat, Fstat): Don't perform tilde expansion on arg.
11987 * input.cc (Fread_readline_init_file): Likewise.
11988 * dirfns.cc (Fcd, Freaddir): Likewise.
11990 * load-path.cc (genpath): Don't perform tilde expansion on name.
11991 (load_path::do_add): Don't warn about moving "." to front of list.
11993 2006-06-28 John W. Eaton <jwe@octave.org>
11995 * load-path.cc (Faddpath): Don't treat "." specially here.
11996 Don't check directory status here.
11997 (Fpath): Handle all args. Don't treat "." specially here.
11998 (Faddpath, Frmpath): Delete unused variable xpath.
11999 (load_path::do_add): New function.
12000 (load_path::do_prepend, load_path::do_append): Use it.
12001 (load_path::do_remove): Really prevent removal of ".".
12002 (load_path::do_clear): Clearing doesn't remove ".".
12003 (load_path::append, load_path::prepend, load_path::do_append,
12004 load_path::do_prepend): New arg, warn.
12006 * load-path.h: Fix decls.
12008 * DLD-FUNCTIONS/regexp.cc (octregexp_list):
12009 Avoid bug in older versions of g++.
12011 2006-06-27 John W. Eaton <jwe@octave.org>
12013 * Makefile.in (clean): Also remove $(DLD_OBJ).
12015 * sighandlers.cc (install_signal_handlers): Don't handle SIGPROF.
12016 From Geoffrey Knauth <geoff@knauth.org>.
12018 2006-06-25 John W. Eaton <jwe@octave.org>
12020 * mk-pkg-add: Avoid apparently non-portable sed patterns.
12022 2006-06-21 John W. Eaton <jwe@octave.org>
12024 * variables.cc (do_who): Handle mex.
12026 * symtab.cc (SYMBOL_DEF::type_as_string, SYMBOL_DEF::which,
12027 symbol_table::clear_functions, table::clear_function,
12028 symbol_table::clear_function_pattern):
12030 * symtab.h (symbol_record::is_mex_function,
12031 symbol_record::symbol_def::is_mex_function): New functions.
12032 (symbol_record::TYPE): New value, MEX_FUNCTION.
12033 (symbol_record::is_function, symbol_table::user_function_name_list,
12034 SYMTAB_ALL_TYPES): Handle MEX_FUNCTION.
12036 * ov-fcn.h (octave_function::octave_function):
12037 Provide default for doc string arg.
12039 * defun.cc (install_mex_function): New function.
12040 * defun-int.h: Provide decl.
12042 * ov-builtin.cc (any_arg_is_magic_colon): Delete.
12043 (octave_builtin::do_multi_index_op): Call has_magic_colon method
12044 for args instead of any_arg_is_magic_colon.
12046 * ov-base.h (octave_base_value::is_mex_function): New function.
12047 * ov.h (octave_value::is_mex_function): New function.
12049 * ov-mex-fcn.h, ov-mex-fcn.cc: New files.
12051 * parse.y (load_fcn_from_file): Also handle .mex files.
12053 * dynamic-ld.cc (octave_dynamic_loader::load_oct): Rename from load.
12054 (octave_dynamic_loader::do_load_oct): Rename from do_load.
12055 * dynamic-ld.h: Fix decls.
12057 * utils.cc (mex_file_in_path): New function.
12058 * utils.h: Provide decl.
12060 * variables.cc (symbol_out_of_date): Also handle mex files.
12062 * load-path.cc (load_path::dir_info::get_file_list,
12063 load_path::dir_info::get_private_function_map,
12064 load_path::do_find_fcn, load_path::add_to_fcn_map,
12065 load_path::do_display): Also handle mex files.
12066 * load-path.h (load_path::find_mex_file): New static function.
12067 (load_path::MEX_FILE): New static data member.
12068 (load_path::do_find_fcn): By default, also look for mex files.
12070 * matrix.h, mex.h, mex.cc: New files from Octave Forge
12071 * mexproto.h: New file, extracted from mex.h.
12072 * Makefile.in: Add them to the appropriate lists.
12074 2006-06-20 John W. Eaton <jwe@octave.org>
12076 * ov-re-mat.cc (octave_matrix::convert_to_str_internal):
12077 Don't lose empty dimensions on conversion to char.
12079 * strfns.cc (Fstrcmp): Handle comparison of cellstr and empty string.
12081 2006-06-16 John W. Eaton <jwe@octave.org>
12083 * parse.y (%union): New type, anon_fcn_handle_type.
12084 (anon_fcn_handle): Now anon_fcn_handle_type, not tree_constant_type.
12085 (make_anon_fcn_handle): Return tree_anon_fcn_handle, not tree_constant.
12087 * comment-list.cc (octave_comment_list::dup): New function.
12088 * comment-list.h: Provide decl.
12090 * pt-cmd.cc (tree_no_op_command::dup): New function.
12091 * pt-cmd.h: Provide decl.
12092 (tree_command::dup): New pure virtual function.
12094 * pt-loop.cc (tree_while_command::dup, tree_do_until_command::dup,
12095 tree_simple_for_command::dup, tree_complex_for_command::dup):
12097 * pt-loop.h: Provide decls.
12099 * pt-jump.cc (tree_break_command::dup, tree_continue_command::dup,
12100 tree_return_command::dup): New functions.
12101 * pt-jump.h: Provide decls.
12103 * pt-except.cc (tree_try_catch_command::dup,
12104 tree_unwind_protect_command::dup): New functions.
12105 * pt-except.h: Provide decls.
12107 * pt-select.cc (tree_if_clause::dup, tree_if_command_list::dup,
12108 tree_if_command::dup, tree_switch_case::dup,
12109 tree_switch_case_list::dup, tree_switch_command::dup):
12111 * pt-select.h: Provide decls.
12113 * pt-decl.cc (tree_decl_elt::dup, tree_decl_init_list::dup,
12114 tree_global_command::dup, tree_static_command::dup): New functions.
12115 * pt-decl.h: Provide decls.
12117 * pt-exp.h (tree_expression::copy_base): New function.
12118 (tree_expression::dup): New pure virtual function.
12120 * pt-fcn-handle.cc, pt-fcn-handle.h (tree_anon_fcn_handle): New class.
12122 * pt-fcn-handle.cc (tree_function_handle::dup): New function.
12123 * pt-fcn-handle.h: Provide decl.
12125 * pt-colon.cc (tree_colon_expression::dup): New function.
12126 * pt-colon.h: Provide decl.
12127 (tree_colon_expression::tree_colon_expression (tree_expression *,
12128 tree_expression *, tree_expression *, int, int)): New constructor.
12130 * pt-const.cc (tree_constant::dup): New function.
12131 (tree_constant::tree_constant (const octave_value&, const
12132 std::string&, int, int)): New constructor.
12133 * pt-const.h: Provide decls.
12135 * pt-idx.cc (tree_index_expression::dup): New functoin.
12136 (tree_index_expression::tree_index_expression (int, int)):
12138 * pt-idx.h: Provide decls.
12140 * pt-arg-list.cc (tree_argument_list::dup): New function.
12141 * pt-arg-list.h: Provide decl.
12143 * pt-id.cc (tree_identifier::dup): New function.
12144 * pt-id.h: Provide decl.
12146 * pt-cell.cc (tree_cell::dup): New function.
12147 * pt-cell.h: Provide decl.
12149 * pt-mat.cc (tree_matrix::dup): New function.
12150 * pt-mat.h: Provide decl.
12152 * pt-assign.cc (tree_simple_assignment::dup,
12153 tree_multi_assignment::dup): New functions.
12154 * pt-assign.h: Provide decls.
12156 * pt-binop.cc (tree_binary_expression::dup,
12157 tree_boolean_expression::dup): New functions.
12158 * pt-binop.h: Provide decls.
12160 * pt-unop.cc (tree_prefix_expression::dup,
12161 tree_postfix_expression::dup): New functions.
12162 * pt-unop.h: Provide decls.
12164 * pt-stmt.cc (tree_statement::dup, tree_statement_list::dup):
12166 * pt-stmt.h: Provide decls.
12168 * pt-misc.cc (tree_parameter_list::dup,
12169 tree_return_list::dup): New functions.
12170 * pt-misc.h: Provide decls.
12172 * symtab.cc (symbol_table::dup, symbol_table::inherit,
12173 symbol_record:is_automatic_variable): New functions.
12174 * symtab.h: Provide decls.
12175 (symbol_record::automatic_variable): New data member.
12176 (symbol_record::symbol_record): Initialize it.
12177 (symbol_record::mark_as_automatic_variable): New function.
12179 * pt-walk.h (tree_walker::visit_anon_fcn_handle):
12180 New pure virtual function.
12181 * pt-pr-code.cc (tree_print_code::visit_anon_fcn_handle): New function.
12182 * pt-pr-code.h: Provide decl.
12183 * pt-bp.cc (tree_breakpoint::visit_anon_fcn_handle): New function.
12184 * pt-bp.h: Provide decl.
12185 * pt-check.cc (tree_checker::visit_anon_fcn_handle): New function.
12186 * pt-check.h: Provide decl.
12188 2006-06-13 John W. Eaton <jwe@octave.org>
12190 * pt-stmt.cc (tree_statement_list::eval): Revise previous change
12191 to preserve return-last-value-computed semantics.
12193 * DLD-FUNCTIONS/fsolve.cc (hybrd_info_to_fsolve_info):
12194 Warn about invalid values of INFO from MINPACK instead of calling
12197 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
12198 Don't assign values returned by evaluation of cmd_list to
12199 temporary variable. Delete unused variable last_computed_value.
12201 * pt-stmt.cc (tree_statement_list::eval):
12202 Clear retval before each statement is evaluated.
12204 2006-06-12 John W. Eaton <jwe@octave.org>
12206 * unwind-prot.h (unwind_protect_fptr): New macro.
12207 * load-path.cc (load_path::do_set): Use it instead of
12208 unwind_protect_ptr when protecting add_hook function pointer.
12209 * dynamic-ld.cc (octave_dynamic_loader::do_load): Use FCN_PTR_CAST
12210 here instead of reinterpret_cast.
12212 2006-06-09 John W. Eaton <jwe@octave.org>
12214 * version.h (OCTAVE_VERSION): Now 2.9.6+.
12216 2006-06-09 John W. Eaton <jwe@octave.org>
12218 * version.h (OCTAVE_VERSION): Now 2.9.6.
12219 (OCTAVE_API_VERSION): Now api-v19.
12220 (OCTAVE_RELEASE_DATE): Now 2006-06-09.
12222 * ov-cell.cc (cell::save_hdf5): Use leading zeros to keep elements
12223 correctly sorted in the HDF file.
12224 From Stephen Fegan <sfegan@astro.ucla.edu>.
12226 2006-06-08 John W. Eaton <jwe@octave.org>
12228 * ov-usr-fcn.cc (function::do_multi_index_op): Append contents of
12229 varargout to ret_list before calling convert_to_const_vector.
12231 * pt-arg-list.cc (tree_argument_list::convert_to_const_vector):
12232 No need to handle all_va_args here.
12234 * ov-va-args.h, ov-va-args.cc: Delete files.
12235 * Makefile.in (OV_INCLUDES, OV_SRC): Delete from the lists.
12237 * ov.cc (install_types): Don't register octave_all_va_args type.
12238 * ov.h, ov.cc (octave_value::octave_value (octave_value::all_va_args)):
12240 * ov.h (octave_value::is_all_va_args): Delete.
12241 (octave_value::enum all_va_args): Delete.
12243 * pt-pr-code.cc (tree_print_code::visit_octave_user_function_header):
12244 Print "varargout" and "varargin" instead of "...".
12246 * pt-misc.h, pt-misc.cc (tree_parameter_list::convert_to_const_vector):
12247 Arg is now const Cell& instead of tree_va_return_list*.
12249 * ov-usr-fcn.h, ov-usr-fcn.cc (octave_user_function::vr_list,
12250 octave_user_function::curr_va_arg_number):
12251 Delete variables and all uses.
12252 (octave_function::octave_va_start, octave_function::octave_va_arg,
12253 octave_function::octave_vr_val, octave_function::has_varargout):
12254 Delete functions and all uses.
12256 * ov-fcn.h (octave_function::octave_va_start,
12257 octave_function::octave_va_arg, octave_function::octave_vr_val,
12258 octave_function::has_varargout): Delete.
12260 * ov-usr-fcn.cc (Fva_arg, Fva_start, Fvr_val): Delete.
12262 * lex.l ({EL}): Don't handle "..." as varargin or varargout.
12263 * octave.gperf (all_va_args, ALL_VA_ARGS, all_va_args_kw): Delete.
12264 * parse.y (ALL_VA_ARGS): Delete token and all uses.
12266 * defaults.h.in (OCTAVE_DATAROOTDIR): Substitute here.
12267 * toplev.cc (octave_config_info): Add datarootdir to the struct.
12269 2006-06-07 John W. Eaton <jwe@octave.org>
12271 * ov-cell.cc (octave_cell::subsasgn): Handle c-s list object on
12272 RHS if last index is '{'.
12273 * pt-assign.cc (tree_multi_assignment::rvalue): Compute all LHS
12274 lvalues before evaluating RHS. If LHS lvalue expects more than
12275 one output, pass octave_cs_list object to assign method.
12276 * pt-idx.cc (tree_index_expression::lvalue): Compute expected
12277 number of values if '{' index appears last.
12278 * pt-arg-list.cc (tree_argument_list::lvalue_list): New function.
12279 * pt-arg-list.h (tree_argument_list::lvalue_list): Provide decl.
12280 * oct-lvalue.h (octave_lvalue::nel): New data member.
12281 (octave_lvalue::numel): New functions
12282 * oct-obj.cc (octave_value_list::has_magic_colon): New function.
12283 * oct-obj.h (octave_value_list::has_magic_colon): Provide decl.
12284 * pt-arg-list.cc (tree_argument_list::nargout_count): Delete function.
12285 * pt-arg-list.h (tree_argument_list::nargout_count): Delete decl.
12287 2006-06-06 John W. Eaton <jwe@octave.org>
12289 * sighandlers.cc (generic_sig_handler, sigint_handler):
12290 Use strsignal instead of accessing sys_siglist directly.
12291 * siglist.h: Use HAVE_DECL_SYS_SIGLIST instead of SYS_SIGLIST_DECLARED.
12292 * siglist.c: Update sys_siglist.
12293 (init_signals, strsignal): New functions.
12294 * octave.cc (octave_main): Call init_signals here.
12296 * toplev.cc (Foctave_config_info): Delete LIBPLPLOT from struct.
12298 2006-06-05 John W. Eaton <jwe@octave.org>
12300 * pt-assign.cc (Vprint_rhs_assign_val): Delete variable.
12301 (Fprint_rhs_assign_val): Delete function.
12302 tree_simple_assignment::rvalue, tree_multi_assignment::rvalue):
12303 No special case for Vprint_rhs_assign_val.
12305 2006-06-02 John W. Eaton <jwe@octave.org>
12307 * pt-arg-list.h (tree_argument_list::mark_as_simple_assign_lhs,
12308 tree_argument_list::is_simple_assign_lhs): New functions.
12309 (tree_argument_list::simple_assign_lhs): New data member.
12310 * parse.y (assign_lhs): Classify LHS here.
12311 (make_assign_op): Create simple or multi assign op based on
12312 classification of LHS, not its length.
12314 2006-06-01 John W. Eaton <jwe@octave.org>
12316 * Makefile.in (DLD_XSRC): Add __pchip_deriv__.cc to the list.
12318 2006-06-01 David Bateman <dbateman@free.fr>
12320 * DLD-FUNCTIONS/__pchip_deriv__.cc: New file.
12322 2006-05-31 John W. Eaton <jwe@octave.org>
12324 * load-path.h (load_path::set_command_line_path): Make it
12327 2006-05-26 John W. Eaton <jwe@octave.org>
12329 * load-path.cc (genpath, maybe_add_path_elts, Fgenpath, Frehash,
12330 Fpath, Fpathdef): Move here from defaults.cc.
12331 * load-path.cc, load-path.h: New files.
12332 * Makefile.in (INCLUDES, DIST_SRC): Add them to the lists.
12333 * help.cc (make_name_list, simple_help): Use load_path instead of
12334 octave_fcn_file_name_cache.
12335 (Flookfor): Use load_path instead of Vload_path_dir_path.
12336 * octave.cc (octave_main): Likewise.
12337 * parse.y (load_fcn_from_file): Likewise.
12338 * utils.cc (Ffile_in_loadpath, file_in_path, fcn_file_in_path,
12339 oct_file_in_path): Likewise.
12340 * variables.cc (symbol_exist, symbol_out_of_date): Likewise.
12341 * DLD-FUNCTIONS/fftw_wisdom.cc (Ffftw_wisdom): Likewise.
12342 * utils.cc (Ffind_first_of_in_loadpath): Delete.
12343 * input.cc (octave_gets): Call load_path::update here.
12344 * dirfns.cc (octave_change_to_directory): Likewise.
12345 * defaults.cc (VLOADPATH, VDEFAULT_LOADPATH, Vload_path_dir_path,
12346 maybe_add_or_del_packages, update_load_path_dir_path,
12347 execute_default_pkg_add_files, set_load_path): Delete.
12348 * defaults.h.in (Vload_path_dir_path,
12349 execute_default_pkg_add_files, maybe_add_default_load_path,
12350 set_load_path): Delete decls.
12352 * fn-cache.h, fn-cache.cc: Delete.
12353 * Makefile.in (INCLUDES, DIST_SRC): Remove them from the lists.
12355 * input.cc (octave_gets): Only update Vlast_prompt_time if we are
12356 interactive and actually printing a prompt. Don't print prompt if
12357 reading startup files or command line files. Initialize
12358 Vlast_prompt_time to 0.
12360 * pr-output.cc (set_format): Always include space for sign.
12362 2006-05-23 John W. Eaton <jwe@octave.org>
12364 * load-save.cc (Fsave): Use tellp instead of pubseekoff to
12365 determine whether we are at beginning of file.
12367 * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::increment,
12368 OCTAVE_VALUE_INT_SCALAR_T::decrement,
12369 OCTAVE_VALUE_INT_MATRIX_T::increment,
12370 OCTAVE_VALUE_INT_MATRIX_T::decrement): New functions.
12371 * OPERATORS/op-int.h (OCTAVE_INSTALL_M_INT_UNOPS,
12372 OCTAVE_INSTALL_S_INT_UNOPS, OCTAVE_M_INT_UNOPS,
12373 OCTAVE_S_INT_UNOPS): Uncomment increment and decrement ops.
12375 2006-05-19 John W. Eaton <jwe@octave.org>
12377 * symtab.cc (SYMBOL_DEF::document): If definition is a function,
12378 also pass doc string to function object.
12379 * ov-fcn.h (octave_function::document): New function.
12380 * defun.cc (print_usage (octave_function *)): New function.
12381 (print_usage (void)): New function.
12382 (print_usage (const std::string&)): Provide for backward
12383 compatibility. Ignore arg.
12384 (Fprint_usage): Don't accept arg.
12385 * defun-int.h (print_usage (void)): Provide decl.
12386 (print_usage (const std::string&)): Tag with GCC_ATTR_DEPRECATED.
12388 2006-05-04 David Bateman <dbateman@free.fr>
12390 * DLD-FUNCTIONS/conv2.cc: New file from Octave Forge.
12391 * Makefile.in (DLD_XSRC): Add it to the list
12393 2006-05-17 Bill Denney <bill@givebillmoney.com>
12395 * help.cc (keywords): Improve and Texinfoize.
12397 2006-05-17 John W. Eaton <jwe@octave.org>
12399 * symtab.cc (Vwhos_line_format): Show class instead of type.
12400 (symbol_table::parse_whos_line_format):
12401 Use 't' for "Type" and 'c' for "Class".
12402 (symbol_record::print_symbol_info_line): Likewise.
12403 (maybe_list_cmp_fcn): Fix casts.
12405 2006-05-11 John W. Eaton <jwe@octave.org>
12407 * octave.cc (IMAGE_PATH_OPTION): New macro.
12408 (usage_string, verbose_usage): Include --image-path option.
12409 (long_opts): Include --image-path.
12410 (octave_main): Handle IMAGE_PATH_OPTION.
12412 * toplev.cc (Foctave_config_info): Delete fcnfilepath, imagepath,
12413 localfcnfilepath, and localoctfilepath from the struct.
12414 * defaults.h.in (OCTAVE_FCNFILEPATH, OCTAVE_IMAGEPATH,
12415 OCTAVE_LOCALFCNFILEPATH, OCTAVE_LOCALOCTFILEPATH): Delete variables.
12417 * octave.cc (octave_main): Call set_exec_path and set_load_path
12418 instead of bind_internal_variable.
12420 * defaults.cc (Fpathdef): Rename from FDEFAULT_LOADPATH.
12421 Don't allow default path to be set.
12422 (Fpath): Rename from FLOADPATH. Make Matlab-compatible.
12423 (update_load_path_dir_path): No need to pass VDEFAULT_LOADPATH to
12424 dir_path constructor now.
12425 (update_exec_path, FDEFAULT_EXEC_PATH,
12426 set_default_default_exec_path, set_default_exec_path,
12427 maybe_add_default_load_path): Delete functions.
12428 (VDEFAULT_EXEC_PATH): Delete variable.
12429 (FEXEC_PATH): Leading and trailing colons no longer special.
12430 (set_exec_path, set_load_path, set_image_path,
12431 maybe_add_path_elts): New functions.
12432 (install_defaults): Call set_exec_path and set_load_path instead
12433 of set_default_exec_path and set_default_path. Don't call
12434 set_default_default_exec_path. Do call set_image_path.
12435 * defaults.cc (genpath, Fgenpath): New functions.
12436 (Vlocal_ver_oct_file_dir, Vlocal_api_oct_file_dir,
12437 Vlocal_oct_file_dir, Vlocal_ver_fcn_file_dir,
12438 Vlocal_api_fcn_file_dir, Vlocal_fcn_file_dir, Vimage_dir):
12440 (set_default_local_ver_oct_file_dir,
12441 set_default_local_api_oct_file_dir,
12442 set_default_local_oct_file_dir,
12443 set_default_local_ver_fcn_file_dir,
12444 set_default_local_api_fcn_file_dir,
12445 set_default_local_fcn_file_dir, set_default_image_dir):
12447 (install_defaults): Call them.
12448 * defaults.h.in (set_exec_path, set_load_path, set_image_path,
12449 Vlocal_ver_oct_file_dir, Vlocal_api_oct_file_dir,
12450 Vlocal_oct_file_dir, Vlocal_ver_fcn_file_dir,
12451 Vlocal_api_fcn_file_dir, Vlocal_fcn_file_dir,
12452 Vlocal_fcn_file_dir, Vimage_dir): Provide decls.
12454 2006-05-10 John W. Eaton <jwe@octave.org>
12456 * ov-cell.cc (Fcellstr): Trim trailing blanks.
12457 * Cell.h (Cell::Cell (const string_vector&)): New arg, TRIM.
12459 * oct-hist.cc (initialize_history, Fhistory_size):
12460 Also call command_history::set_size here.
12462 * defun.cc (Fprint_usage): New function.
12463 * help.cc (display_usage_text): New function.
12465 2006-05-09 Keith Goodman <kwgoodman@gmail.com>
12467 * DLD-FUNCTIONS/rand.cc: Doc string fix.
12469 2006-05-09 Jorge Barros de Abreu <ficmatin01@solar.com.br>
12471 * data.cc (FInf, FNaN): Fix typo in doc string.
12473 2006-05-08 John W. Eaton <jwe@octave.org>
12475 * Makefile.in (DEFUN_PATTERN): Match DEFUNX_DLD.
12476 * mkbuiltins: Handle XDEFUNX_DLD_INTERNAL.
12477 * mkgendoc: Likewise.
12478 * mk-pkg-add: Likewise. Do all the matching with sed.
12479 * defun-int.h (DEFINE_FUNX_INSTALLER_FUN, DEFINE_FUNX_INSTALLER_FUN2,
12480 DEFINE_FUNX_INSTALLER_FUN3): New macros.
12481 (DEFINE_FUN_INSTALLER_FUN3): Define using DEFINE_FUNX_INSTALLER_FUN3.
12482 (DEFUNX_DLD_INTERNAL): New macro.
12483 * defun-dld.h (DEFUNX_DLD): New macro.
12485 * DLD-FUNCTIONS/__gnuplot_raw__.l: Mark __gnuplot_set__ as a
12486 command, not a rawcommand.
12488 * load-save.cc: No need to handle built-in variables.
12489 * help.cc (simple_help): No need to handle built-in variables.
12491 * variables.cc (is_builtin_variable, builtin_string_variable,
12492 builtin_real_scalar_variable, builtin_any_variable):
12494 (Fexist, Fdocument, do_who, Fwho, link_to_builtin_or_function):
12495 No need to handle built-in variables.
12496 * variables.h (is_builtin_variable, builtin_string_variable,
12497 builtin_real_scalar_variable, builtin_any_variable): Delete decls.
12499 * symtab.h (symbol_record::symbol_def::is_builtin_variable,
12500 symbol_record::is_builtin_variable): Delete.
12501 (symbol_record::TYPE): Remove BUILTIN_VARIABLE from enum.
12502 (symbol_record::symbol_def::is_variable, SYMTAB_ALL_TYPES,
12503 SYMTAB_VARIABLES): No need to handle built-in variables now.
12504 (symbol_record::define_builtin_variable,
12505 symbol_record::link_to_builtin_variable): Delete decls.
12506 * symtab.cc (record::define, SYMBOL_DEF::type,
12507 SYMBOL_DEF::type_as_string): No need to handle built-in variables.
12508 (symbol_record::define_builtin_variable): Delete.
12509 (symbol_record::variable_reference): No need to attemp to link to
12512 * utils.cc (check_preference, warn_old_style_preference): Delete.
12513 * utils.h (check_preference): Delete decl.
12515 * defun-int.h: Delete all DEFVAR macros.
12517 * Makefile.in, mkbuiltins: No need for VAR_FILES.
12519 * parse.y (current_script_file_name): Delete all uses.
12520 (clear_current_script_file_name): Delete function.
12522 * variables.cc (symbols_of_variables): Delete DEFVAR and function.
12523 (bind_ans): Lookup ans in curr_sym_tab, not fbi_sym_tab.
12524 SR is no longer static, so we insert value in local scope.
12526 * defun.cc (bind_builtin_variable): Delete function.
12527 * defun-int.h: Delete decl.
12529 * defaults.cc (fftw_wisdom_program): Rename from fftw_wisdom_prog.
12531 (VDEFAULT_LOADPATH): Rename from Vdefault_load_path. Change all uses.
12532 (VLOADPATH): Rename from Vload_path. Change all uses.
12533 (VDEFAULT_EXECPATH): Rename from Vdefault_exec_path. Change all uses.
12534 (VEXECPATH): Rename from Vexec_path. Change all uses.
12535 (VEDITOR): Rename from Veditor. Change all uses.
12536 (Ffftw_wisdom_program, FDEFAULT_LOADPATH, FLOADPATH,
12537 FDEFAULT_EXEC_PATH, FEXEC_PATH, FEDITOR, FIMAGEPATH): New functions.
12538 (fftw_wisdom_program, default_load_path, loadpath,
12539 default_exec_path, exec_path, editor, image_path): Delete functions.
12540 (symbols_of_defaults): Delete DEFVARs and function.
12542 * pr-output.cc (set_output_prec_and_fw): Set Voutput_precision and
12543 Voutput_max_field_width directly instead of calling
12544 bind_builtin_variable.
12546 * octave.cc (octave_main, maximum_braindamage):
12547 Call bind_internal_variable instead of bind_builtin_variable.
12549 * pager.cc (Fmore): Set Vpage_screen_output directly instead of
12550 calling bind_builtin_variable.
12552 * error.cc (Fwarning): Set Vdebug_on_warning directly instead of
12553 calling bind_builtin_variable.
12555 * error.cc (initialize_warning_options): Now static.
12556 (disable_warning, initialize_default_warning_state): New functions.
12558 * error.h (initialize_warning_options): Delete decl.
12559 (initialize_default_warning_state): Provide decl.
12560 * octave.cc (octave_main): Call initialize_default_warning_state
12561 instead initialize_warning_options.
12563 * lex.l (warn_matlab_incompatible, warn_separator_insert,
12564 warn_single_quote_string): Delete functions.
12565 (symbols_of_lex): Delete DEFVARS.
12566 (Vwarn_matlab_incompatible, Vwarn_separator_insert,
12567 Vwarn_single_quote_string): Delete variables.
12568 (maybe_warn_separator_insert, gripe_single_quote_string,
12569 gripe_matlab_incompatible): Call warning_with_id instead of warning.
12571 * variables.h (SET_NONEMPTY_INTERNAL_STRING_VARIABLE,
12572 SET_INTERNAL_VARIABLE_WITH_LIMITS): New macros.
12574 * ls-oct-ascii.cc (Fsave_precision): New function.
12575 (save_precision): Delete function.
12576 (symbols_of_ls_oct_ascii): Delete DEFVAR and function.
12578 * oct-hist.cc (initialize_history): New function.
12579 * oct-hist.h: Provide decl.
12580 * octave.cc (octave_main): Call initialize_history instead of
12581 command_history::read.
12583 * oct-hist.cc (Fhistory_size, Fhistory_file,
12584 Fhistory_timestamp_format_string, Fsaving_history): New functions.
12585 (history_size, history_file, history_timestamp_format_string,
12586 saving_history): Delete functions.
12587 (symbols_of_oct_hist): Delete DEFVARs and function.
12589 * pt-mat.cc (Fstring_fill_char): New function.
12590 (string_fill_char): Delete function.
12591 (symbols_of_pt_mat): Delete DEFVAR and function.
12593 * variables.cc (Fignore_function_time_stamp, ans): New functions.
12594 (ignore_function_time_stamp): Delete function.
12595 (symbols_of_variables): Delete DEFVARs and function.
12597 * oct-procbuf.cc: (Vkluge_procbuf_delay): Delete variable.
12598 (octave_procbuf::open): Never delay after fork.
12599 (kluge_procbuf_delay): Delete function.
12600 (symbols_of_oct_procbuf): Delete DEFVAR and function.
12602 * dirfns.cc (Fconfirm_recursive_rmdir): New function.
12603 (confirm_recursive_rmdir): Delete function.
12604 (symbols_of_dirfns): Delete DEFVAR and function.
12606 * error.cc (initialize_warning_options): Now extern.
12607 Rename from init_warning_options.
12608 * error.h: Provide decl.
12609 * octave.cc (octave_main): Call it here.
12611 * error.cc (Fbeep_on_error, Fdebug_on_error, Fdebug_on_warning):
12613 (beep_on_error, debug_on_error, debug_on_warning): Delete Functions.
12614 (symbols_of_error): Delete DEFVARs and function.
12616 * help.cc (Finfo_file, Finfo_program, Fmakeinfo_program,
12617 Fsuppress_verbose_help_message): New function.
12618 (info_file, info_program, makeinfo_program,
12619 suppress_verbose_help_message): Delete function.
12620 (symbols_of_help): Delete DEFVARs and function.
12621 (Vinfo_program): Rename from Vinfo_prog. Change all uses.
12623 * input.cc (FPS1, FPS2, FPS4, Fcompletion_append_char,
12624 Fecho_executing_commands): New functions.
12625 (ps1, ps2, ps4, completion_append_char, echo_executing_commands):
12627 (symbols_of_input): Delete DEFVARs and function.
12628 (VPS1, VPS2, VPS4): Rename from Vps1, Vps2, Vps4. Change all uses.
12629 (Fecho): Set Vecho_executing_commands directly.
12631 * load-save.cc (crash_dumps_octave_core, Fdefault_save_options,
12632 Foctave_core_file_limit, Foctave_core_file_name,
12633 Foctave_core_file_options, Fsave_header_format_string):
12635 (crash_dumps_octave_core, default_save_options,
12636 octave_core_file_limit, octave_core_file_name,
12637 octave_core_file_options, save_header_format_string):
12639 (symbols_of_load_save): Delete DEFVARs and function.
12641 * ov-base.cc (Fprint_answer_id_name, Fsilent_functions): New functions.
12642 (print_answer_id_name, silent_functions): Delete functions.
12643 (symbols_of_ov_base): Delete DEFVARs and function.
12645 * ov-usr-fcn.cc (Fmax_recursion_depth): New function.
12646 (max_recursion_depth): Delete function.
12647 (symbols_of_ov_usr_fcn): Delete DEFVAR for max_recursion_depth.
12650 * pager.cc (Fpage_output_immediately, Fpage_screen_output, FPAGER):
12652 (page_output_immediately, page_screen_output, pager_binary):
12654 (symbols_of_pager): Delete DEFVARs and function.
12655 (VPAGER): Rename from Vpager_binary. Change all uses.
12657 * pr-output.cc (Ffixed_point_format, Fprint_empty_dimensions,
12658 Fsplit_long_rows, Foutput_max_field_width, Foutput_precision,
12659 Fstruct_levels_to_print): New functions.
12660 (fixed_point_format, print_empty_dimensions, split_long_rows,
12661 output_max_field_width, output_precision, struct_levels_to_print):
12663 (symbols_of_pr_output): Delete DEFVARs and function.
12665 * pt-assign.cc (Fprint_rhs_assign_val): New function.
12666 (print_rhs_assign_val): Delete function.
12667 (symbols_of_pt_assign): Delete DEFVAR. Delete function.
12669 * sighandlers.cc (Fdebug_on_interrupt, Fsighup_dumps_octave_core,
12670 Fsigterm_dumps_octave_core): New functions.
12671 (debug_on_interrupt, sighup_dumps_octave_core,
12672 sigterm_dumps_octave_core): Delete functions.
12673 (symbols_of_sighanlders): Delete DEFVARs. Delete function.
12675 * symtab.cc (Vdebug_symtab_lookups): Now bool.
12676 (Fdebug_symtab_lookups, Fwhos_line_format,
12677 Fvariables_can_hide_functions): New functions.
12678 (debug_symtab_lookups, whos_line_format,
12679 variables_can_hide_functions): Delete functions.
12680 (symbols_of_symtab): Delete DEFVARs and function.
12682 2006-05-04 David Bateman <dbateman@free.fr>
12684 * DLD-FUNCTIONS/sqqr (Fdmperm): Allow compilation with versions
12685 v2.0.0 of CXSparse or later.
12687 2006-05-04 John W. Eaton <jwe@octave.org>
12689 * variables.cc (set_internal_variable): Move here from
12690 DLD-FUNCTIONS/__gnuplot_raw__.l.
12691 * variables.h (SET_INTERNAL_VARIABLE): Likewise.
12692 (set_internal_variable): Provide decls.
12694 * DLD-FUNCTIONS/__gnuplot_raw__.l: Convert all DEFVARs to DEFUN_DLDs.
12695 (gnuplot::init): Delete.
12696 (gnuplot::gnuplot): Don't call init here.
12697 (set_internal_variable): New functions.
12698 (SET_INTERNAL_VARIABLE): New macro.
12700 * Makefile.in: Undo changes of 2006-03-16.
12701 * DLD-FUNCTINS/__gnuplot_raw__.l: Move here from __gnuplot_raw__.l.
12702 Undo changes of 2006-03-16.
12704 2006-05-03 David Bateman <dbateman@free.fr>
12706 * ov-base-mat.h: Add caching of matrix type, and code to supply
12707 and copy matrix type.
12708 * ov-bool-mat.h: Add caching to constructor.
12709 * ov-re-mat.h: ditto.
12710 * ov-cx-mat.h: ditto.
12711 * ov.cc: Add to the BoolMatrix, Matrix and the ComplexMatrix
12712 octave_value constructors, the ability to specify the matrix type.
12713 * ov.h: Adapt declaration of above constructors.
12714 (MatrixType matrix_type(void) const, MatrixType matrix_type (const
12715 MatrixType&)): New functions for probing and setting matrix type.
12716 * ov-base.cc (virtual MatrixType matrix_type(void) const, virtual
12717 MatrixType matrix_type (const MatrixType&)): New default functions
12718 for probing and setting matrix type.
12719 * ov-base.h (virtual MatrixType matrix_type(void) const, virtual
12720 MatrixType matrix_type (const MatrixType&)): Declarations.
12721 * ov-base-sparse.h: Replace all uses of SparseType with
12722 MatrixType. Replace sparse_type function with matrix_type function.
12723 * ov-bool-sparse.h: Replace all uses of SparseType with MatrixType.
12724 * ov-cx-sparse.h: ditto.
12725 * ov-re-sparse.h: ditto.
12726 * sparse-xdiv.cc: ditto.
12727 * sparse-xdiv.h: ditto.
12728 * sparse-xpow.cc: ditto.