1 2009-03-18 Benjamin Lindner <lindnerb@users.sourceforge.net>
3 * ls-oct-ascii.cc (extract_keyword): fix leaving stray '\r' in stream
4 when reading from CRLF data file by replacing loop with call to
7 2009-03-03 Benjamin Lindner <lindnerb@users.sourceforge.net>
9 * ls-ascii-helper.h ls-ascii-helper.cc: New files, provide helper
10 functions skip_until_newline(), skip_preceeding_newline() and
11 read_until_newline() that take care of CR/LF handling.
12 * Makefile.in: add new files
13 * load-save.cc: Open files always in binary mode in Fload
14 * ls-mat-ascii.cc (get_mat_data_input_line), ls-oct-ascii.cc
15 (extract_keyword, read_ascii_data), ls-oct-ascii.h (extract_keyword),
16 ov-fcn-handle.cc, ov-fcn-inline.cc, ov-range.cc, ov-str-mat.cc
17 (load_ascii): Use helper functions
19 2009-02-25 Marco Caliari <marco.caliari@univr.it>
21 * graphics.cc (base_properties::remove_child): Fix order of dims.
23 2009-02-13 John W. Eaton <jwe@octave.org>
25 * oct-stream.cc (octave_base_stream::do_gets): Handle CRLF and CR.
27 2009-01-23 Jaroslav Hajek <highegg@gmail.com>
29 * DLD-FUNCTIONS/ranpd.cc: Use relative tolerance for randp tests.
31 2008-12-26 Francesco Potortì <pot@gnu.org>
33 * data.cc (resize): Add cross reference to postpad.
35 2008-10-28 Brian Gough <bjg@gnu.org>
37 * DLD-FUNCTIONS/besselj.cc: Added tests.
39 2008-10-16 John W. Eaton <jwe@octave.org>
41 * graphics.cc (make_handle_fraction): New static function.
42 (gh_manager::get_handle): Use it.
43 (gh_manager::do_free): Call make_handle_fraction to replace
44 fractional part of non-figure handles.
46 * graphics.cc (base_properties::remove_child): Handle children as
47 a column vector instead of a row vector.
49 2008-12-08 Jaroslav Hajek <highegg@gmail.com>
51 * pt-select.cc (equal): Make empty matrices match.
53 2008-11-12 David Bateman <dbateman@free.fr>
55 * OPERATORS/op-cell.cc (op_catop_matrix_cell): Cast args in the correct
57 * OPERATORS/op-struct.cc (op_catop_matrix_struct): Ditto.
59 2008-10-31 David Bateman <dbateman@free.fr>
61 * ov-base-scalar.h (octave_value octave_base_scalar::reshape
62 (const dim_vector&) const): New method.
64 2008-10-30 John W. Eaton <jwe@octave.org>
66 * oct-map.cc (Octave_map::index): Copy key_list.
68 2008-10-17 John W. Eaton <jwe@octave.org>
70 * DLD-FUNCTIONS/__qp__.cc (qp): Undo part of change from
71 2007-09-04 (compute Y at each iteration).
73 2008-10-02 John W. Eaton <jwe@octave.org>
75 * pt-arg-list.cc (tree_argument_list::convert_to_const_vector):
76 Don't insert undefined elements in return list.
78 2008-09-24 Jaroslav Hajek <highegg@gmail.com>
80 Version 3.0.3 released.
82 2008-09-24 Thomas Weber <thomas.weber.mail@gmail.com>
84 * DLD-FUNCTIONS/regexp.cc (octregexp_list): Retry if match limit
87 2008-09-24 John W. Eaton <jwe@octave.org>
89 * load-path.cc (load_path::do_initialize): Check for OCTAVE_PATH
90 in the environment, not OCTAVE_LOADPATH.
92 2008-09-18 David Bateman <dbateman@free.fr>
94 * DLD-FUNCTIONS/fftw.cc (Ffftw): Clarify the documentation.
96 2008-09-19 David Bateman <dbateman@free.fr>
98 * debug.cc (static octave_user_function *get_user_function
99 (const std::string&)): Function lookup to force out of date check.
100 (bp_table::intmap bp_table::do_remove_all_breakpoints_in_file
101 (const std::string&, bool)): Add flag to silence the error message
102 from this function if a user code with breakpoints is not found.
103 (bp_table::fname_line_map bp_table::do_get_breakpoint_list (const
104 octave_value_list&)): Do an out of date check on the function
105 before checking the breakpoints.
106 * debug.h (do_remove_all_breakpoints_in_file,
107 remove_all_breakpoints_in_file): Add flag to silence error
109 * variables.cc (static bool symbol_out_of_date (symbol_record*)):
110 If symbol out of date clear breakpoints.
113 * data.cc (SINGLE_TYPE_CONCAT, DO_SINGLE_TYPE_CONCAT): New macros
114 (do_cat): Special case single type concatenations for speed.
115 * pt.mat.cc (std::string get_concat_class (const std::string&,
116 const std::string&), void maybe_warn_string_concat (bool, bool)):
117 Remove static declaration.
118 * pt-mat.h (std::string get_concat_class (const std::string&,
119 const std::string&), void maybe_warn_string_concat (bool, bool)):
122 2008-09-19 Jaroslav Hajek <highegg@gmail.com>
124 * load-path.cc: Fix errors from earlier transplant changeset.
125 * utils.cc: Likewise.
127 2008-09-10 John W. Eaton <jwe@octave.org>
129 * octave.cc (octave_main): Make all command-line arguments
130 available to startup scripts and PKG_ADD files.
132 2008-05-20 Kim Hansen <kimhanse@gmail.com>
134 * load-path.cc (load_path::do_initialize):
135 Include separator when appending sys_path.
137 2008-09-09 David Bateman <dbateman@free.fr>
139 * DLD-FUNCTIONS/regexp.cc (octregexp_list): Distinguish between
140 matlab named tokens and perl lookbehind expressions. For
141 lookbehind expression replace "*" and "+" with a limited number of
142 fixed length expressions to simulate arbitrary length look behind.
144 2008-09-08 John W. Eaton <jwe@octave.org>
146 * ls-oct-ascii.cc (std::string extract_keyword (std::istream&,
147 const char *, const bool)): Also accept \r as line ending character.
148 * ls-oct-ascii.h (template <class T> bool extract_keyword
149 (std::istream&, const char *, T&, const bool)): Likewise.
150 (template <class T> bool extract_keyword (std::istream&, const
151 string_vector&, std::string&, T&, const bool)): Likewise.
153 2008-08-27 Jaroslav Hajek <highegg@gmail.com>
155 * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Initialize output vectors
158 2008-05-20 Thomas Weber <thomas.weber.mail@gmail.com>
160 * DLD-FUNCTIONS/rand.cc: Doc fix.
162 2008-08-19 David Bateman <dbateman@free.fr>
164 * load-path.cc (load-path::do_find_dir (const std:string&) const)):
165 Method to find a directory on the load-path corresponding to the
167 * load-path.h (load-path::do_find_dir (const std:string&) const),
168 load-path::find_dir (const std::string&) const): New methods.
169 * utils.cc (std::string contents_file_in_path (const std::string&)):
171 * utils.h (std::string contents_file_in_path (const std::string&)):
173 * help.cc (static bool raw_help_from_file (const std::string&,
174 std::string&, std::string&, bool&)): Also check is requested
175 argument is a directory and contains the file Contents.m.
177 2008-08-19 Jaroslav Hajek <highegg@gmail.com>
179 * pt-assign.h (tree_simple_assignment::first_execution): New
181 (tree_simple_assignment::first_execution): Dtto.
182 * pt-assign.cc (tree_simple_assignment::tree_simple_assignment):
183 Initialize first_execution.
184 (tree_multi_assignment::tree_multi_assignment): Dtto.
185 (tree_simple_assignment::rvalue): Check for obsolete built-in
186 variables only at first execution.
187 (tree_multi_assignment::rvalue): Dtto.
189 * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Checks whether LB and UB are
192 * oct-obj.cc, oct-obj.h (octave_value_list::make_argv):
193 Allow calling without fcn_name.
194 * load-save.cc (parse_save_options (const string_vector&, ...)):
195 Return string_vector with parsed arguments removed instead.
196 (parse_save_options (const std::string&, ...)): Dtto.
197 (Fsave): Fix calls to parse_save_options.
199 2008-08-19 John W. Eaton <jwe@octave.org>
201 * parse.y (Feval): Return value produced by evaluating CATCH string.
203 2008-08-19 Jaroslav Hajek <highegg@gmail.com>
205 Version 3.0.2 released.
207 2008-08-19 Jaroslav Hajek <highegg@m61s04>
209 * DLD-FUNCTIONS/rand.cc (Frandp): Fix typo in a test.
211 2008-08-12 John W. Eaton <jwe@octave.org>
213 * ov-struct.cc (octave_struct::subsref): Don't allow resizing for
216 2008-08-08 Tatsuro MATSUOKA <tmacchant@yahoo.co.jp>
218 * A patch fntests for rand.cc for octave for windows (cygwin, mingw ,msvc)
220 2008-08-01 Francesco Potorti <Potorti@isti.cnr.it>
222 * graphics.cc (axes::properties::properties,
223 axes::properties::set_defaults, axes::properties::factory_defaults):
224 Exchange xaxislocation and yaxislocation property values.
226 2008-07-28 John W. Eaton <jwe@octave.org>
228 * error.cc (Flasterror, Flasterr): Unwind-protect error_state.
230 2008-07-24 John W. Eaton <jwe@octave.org>
232 * dirfns.cc (Fmkdir): If directory already exists, return status =
233 true, but also set error message.
235 2008-07-21 John W. Eaton <jwe@octave.org>
237 * OPERATORS/op-struct.cc: Define concatenation operators for
238 struct/matrix concatenation (valid if matrix is empty).
239 * OPERATORS/op-cell.cc (install_cell_ops): Likewise, for cells.
241 2008-06-25 David Bateman <dbateman@free.fr>
243 * pr-output.cc (Frats): Print usage if nargin == 0.
245 2008-06-20 Jaroslav Hajek <highegg@gmail.com>
247 * DLD-FUNCTIONS/regexp.cc (octregexp_list): Make "once" an output
249 (octregexp): Do not use cell arrays when "once" is requested.
251 2008-06-10 John W. Eaton <jwe@octave.org>
253 * mexproto.h (mxCreateLogicalScalar): Declar arg as mxLogical, not int.
255 2008-06-03 Jaroslav Hajek <highegg@gmail.com>
257 * load-save.cc (Fload): Fix "-7" option.
259 2008-06-02 Jaroslav Hajek <highegg@gmail.com>
261 * ov-cell.cc (Fcellstr): For compatibility with Matlab, return {''}
264 2008-05-06 David Bateman <dbateman@free.fr>
266 * ov-fcn-inline.cc (Finline): Also ignore NaN, Inf, pi, NA and eps.
268 * bitfcns.cc (BITOP): Treat octave_bool types and octave_scalar.
270 2008-05-06 John W. Eaton <jwe@octave.org>
272 * ov-cell.cc (Fstruct2cell): Handle structure arrays properly.
274 2008-05-05 David Bateman <dbateman@free.fr>
276 * sysdep.cc (Fputenv): Allow single arg. Alias to setenv.
278 2008-05-04 John W. Eaton <jwe@octave.org>
280 * ov-fcn-handle.cc (Ffunctions): Pass octave_value object instead
281 of Cell in structure field assignment.
283 2008-04-23 John W. Eaton <jwe@octave.org>
285 * DLD-FUNCTIONS/__qp__.cc (qp): Avoid bounds error when removing
286 constraint from active set.
288 2008-04-21 John W. Eaton <jwe@octave.org>
290 Version 3.0.1 released.
292 * version.h (OCTAVE_VERSION): Now 3.0.1.
293 (OCTAVE_RELEASE_DATE): Now 2008-04-21.
294 (OCTAVE_COPYRIGHT): Update year.
296 2008-04-20 John W. Eaton <jwe@octave.org>
298 * oct-stream.cc (octave_stream::read): Allow single data type
299 specification but return double.
301 2008-04-18 John W. Eaton <jwe@octave.org>
303 * pr-output.cc (Fdisp): If nargout > 0, produce an sq-string
304 unless arg is a dq-string.
306 2008-04-14 Jaroslav Hajek <highegg@gmail.com>
308 * oct-stream.cc (octave_scan_1): Ensure digit following X is hex
309 digit before reading number as hex.
311 2008-04-14 John W. Eaton <jwe@octave.org>
313 * file-io.cc (Ffread): Allow SKIP arg to be omitted.
314 (Ffwrite): Likewise. Handle args in a way consistent with Ffread.
316 2008-04-09 Michael Goffioul <michael.goffioul@gmail.com>
318 * DLD-FUNCTIONS/dispatch.cc: Replace system("echo '...'>...") calls
319 with real file writing.
321 2008-04-04 John W. Eaton <jwe@octave.org>
323 * parse.y (make_constant): Handle escape sequences in dq-strings.
325 2008-04-03 John W. Eaton <jwe@octave.org>
327 * parse.y (make_constant): Also stash original text for strings.
329 * ov-fcn-handle.cc (octave_fcn_handle::subsref):
330 Don't call next_subsref here.
332 2008-04-03 Jaroslav Hajek <highegg@gmail.com>
334 * DLD-FUNCTIONS/sort.cc (xabs, ascending_compare, operator <,
335 descending_compare, operator >): Move definitions ahead of
336 #include "oct-sort.cc".
338 2008-04-02 John W. Eaton <jwe@octave.org>
340 * graphics.cc, graphics.h.in (class axes):
341 New properties, tickdir and tickdirmode.
343 2008-03-27 John W. Eaton <jwe@octave.org>
345 * DLD-FUNCTIONS/max.cc: Rename from minmax.cc.
346 * Makefile.in (DLD_XSRC): Rename minmax.cc to max.cc.
348 2008-03-08 Primozz Peterlin <primozz.peterlin@gmail.com>
350 * variables.cc (Fexist): Doc fix.
352 2008-03-23 David Bateman <dbateman@free.fr>
354 * OPERATORS/op-int.h: Add el_div and el_ldiv operators to the
355 binops that were missing them. Added elem_pow functions for mixed
356 integer floating point cases. Initialize the mixed integer
357 floating point cases.
359 2008-03-18 David Bateman <dbateman@free.fr>
361 * DLD-FUNCTIONS/minmax.cc: 64-bit indexing fix.
363 2008-03-11 John W. Eaton <jwe@octave.org>
365 * graphics.cc, graphics.h.in (class axes): New property, linewidth.
367 * DLD-FUNCTIONS/eig.cc (Feig): Handle possible error from EIG.
368 * DLD-FUNCTIONS/qp.cc (qp, Fqp): Likewise.
369 * xpow.cc (xpow): Likewise.
371 2008-03-10 John W. Eaton <jwe@octave.org>
373 * mex.cc (mxCreateLogicalScalar): Argument is now mxLogical.
375 * mxarray.h.in (mxLogical): Use unsigned char instead of int.
376 From Antwerpen, G. (Gert) van <gert.vanantwerpen@tno.nl>.
378 2008-03-06 David Bateman <dbateman@free.fr>
380 * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Document that
381 the initial interpretation of a positive definite return from
382 matrix_type is that the matrix is "probably" positive definite and
385 2008-03-06 John W. Eaton <jwe@octave.org>
387 * graphics.cc (line::properties::properties,
388 line::properties::factory:defaults, patch::properties::properties,
389 patch::properties::factory:defaults,
390 surface::properties::properties,
391 surface::properties::factory:defaults):
392 Set markersize to 6 by default.
394 2008-03-06 Alexander Barth <barth.alexander@gmail.com>
396 * DLD-FUNCTIONS/__lin_interpn__.cc (lookup):
397 Handle decreasing coordinate values.
399 2008-02-27 John W. Eaton <jwe@octave.org>
401 * oct-stream.cc (do_read): Stop reading if seek fails.
403 2008-02-26 John W. Eaton <jwe@octave.org>
405 * DLD-FUNCTIONS/rand.cc (do_rand): Pass name of calling function
406 to octave_rand::state.
408 2008-02-21 John W. Eaton <jwe@octave.org>
410 * DLD-FUNCTIONS/fsolve.cc (fsolve_user_jacobian):
411 Check dimensions of user-supplied Jacobian matrix.
412 (fsolve_user_function): Check for non-square systems.
414 2008-02-12 David Bateman <dbateman@free.fr?
416 * graphics.h.in: Implement the cdatamapping property in patch,
417 surface and image objects.
418 * graphics.cc: ditto.
420 2008-02-12 John W. Eaton <jwe@octave.org>
422 * pt-loop.cc (tree_simple_for_command::eval): Compute range
423 element with multiplication.
425 2008-02-08 John W. Eaton <jwe@octave.org>
427 * ov-struct.cc (octave_struct::subsref): Allow Cell::index to resize.
429 2008-02-07 David Bateman <dbateman@free.fr>
431 * ov-range.h (octave_range::sort): New functions.
433 2008-01-30 Thomas Weber <thomas.weber.mail@gmail.com>
435 * variables.cc (Fclear): Doc fix.
437 2008-01-30 Thomas Weber <thomas.weber.mail@gmail.com>
439 * pager.cc (Fmore): Doc fix.
441 2008-01-28 John W. Eaton <jwe@octave.org>
443 * oct-stream.cc (BEGIN_CHAR_CLASS_CONVERSION): Handle width properly.
444 (OCTAVE_SCAN) [__GNUG__ && ! CXX_ISO_COMPLIANT_LIBRARY]:
447 2008-01-28 David Bateman <dbateman@free.fr>
449 * ov-mapper.cc (SPARSE_MAPPER_LOOP_2): Use data method instead of
450 elem in the case where F(0) is non-zero.
452 * DLD-FUNCTIONS/sort.cc (ascending_compare, descending_compare):
453 Always instantiate the specialized double versions of these
454 functions so that the NaN values are correctly sorted in the
457 2008-01-24 Pascal Dupuis <Pascal.Dupuis@worldonline.be>
459 * mxarray.h.in: Include <cstring>.
461 2008-01-14 John W. Eaton <jwe@octave.org>
463 * load-path.cc (load_path::do_initialize): Start with sys_path empty.
464 (maybe_add_path_elts): Omit path_sep_str if path is empty.
466 2008-01-10 John W. Eaton <jwe@octave.org>
468 * DLD-FUNCTIONS/fsolve.cc (Ffsolve): Doc fix.
469 (hybrd_info_to_fsolve_info): Swap return values for -1 and -2 inputs.
471 * mex.cc (calc_single_subscript_internal): New static function.
472 (mxArray_octave_value::calc_single_subscript): Use it.
473 (mxArray_matlab::calc_single_subscript): Use it.
475 2008-01-07 John W. Eaton <jwe@octave.org>
477 * src/pt-except.cc (tree_try_catch_command::eval):
478 Set Vdebug_on_error and Vdebug_on_warning to false while executing
481 * error.cc (Vdebug_on_error, Vdebug_on_warning): No longer static.
482 * error.h: Provide decls.
484 2008-01-04 John Swensen <jpswensen@comcast.net>
486 * debug.cc (bp_table::do_remove_all_breakpoints_in_file):
487 Avoid calling erase on invalid bp_map iterators.
488 (bp_table::do_remove_breakpoint): Only try to delete breakpoints
489 if some exist. Avoid calling erase on invalid bp_map iterators.
490 (parse_dbfunction_params): Return early if ARGS is empty.
491 New arg, WHO. Change all uses.
492 Accept but do nothing with struct args.
494 2007-12-21 John W. Eaton <jwe@octave.org>
496 Version 3.0.0 released.
498 * version.h (OCTAVE_VERSION): Now 3.0.0.
499 (OCTAVE_API_VERSION): Now api-v32.
500 (OCTAVE_RELEASE_DATE): Now 2007-12-21.
502 2007-12-19 Thomas Kasper <ThomasKasper@gmx.net>
504 * OPERATORS/op-scm-cs.cc (DEFBINOP (pow)): Extract complex value
507 2007-12-12 David Bateman <dbateman@free.fr>
509 * DLD-FUNCTIONS/sparse.cc (Fsparse): Check for scalar arguments
510 for 2 argument version.
512 2007-12-12 John W. Eaton <jwe@octave.org>
514 * graphics.h.in (class axes) Add the layer property.
515 * graphics.cc (class axes) Ditto.
517 * graphics.cc (gh_manager::get_handle): Use ceil instead of trunc.
519 2007-12-11 John W. Eaton <jwe@octave.org>
521 * version.h (OCTAVE_VERSION): Now 2.9.19+.
523 2007-12-11 John W. Eaton <jwe@octave.org>
525 * version.h (OCTAVE_VERSION): Now 2.9.19.
526 (OCTAVE_API_VERSION): Now api-v31.
527 (OCTAVE_RELEASE_DATE): Now 2007-12-11.
529 * graphics.cc (make_graphics_object):
530 If successful, call __request_drawnow__.
532 * input.cc (Vgud_mode): New static variable.
533 (F__gud_mode__): New function.
534 (get_user_input): If debug and Vgud_mode, print location info in
535 format for Emacs GUD mode.
537 2007-12-11 David Bateman <dbateman@free.fr>
539 * OPERATORS/op-bm-sbm.cc, OPERATORS/op-b-sbm.cc,
540 OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc,
541 OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc,
542 OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc,
543 OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc: Privilege
544 conversion to dense matrices for compatibility.
546 * DLD-FUNCTIONS/sparse.cc (FSparse): Remove the mutate flag, as
547 default bahavior is now to keep matrix sparse always.
549 * graphics.cc (axes::properties::properties):
550 Initialize xcolor, ycolor, and zcolor to (0, 0, 0).
552 * graphics.h.in (gh_manager::next_handle): Now double.
553 * graphics.cc (gh_manager::get_handle, gh_manager::gh_manager):
554 Set fractional part of next_handle to a random value.
556 2007-12-10 John W. Eaton <jwe@octave.org>
558 * ov-cell.cc (octave_cell::all_strings): Handle empty elements.
559 Handle N-d cell arrays.
561 * DLD-FUNCTIONS/fsolve.cc (Ffsolve):
562 For compatibility, return [x, fval, info] instead of [x, info, msg].
563 Move tests here from test/test_nonlin.m.
565 * OPERATORS/op-cm-s.cc: Define function for el_mul with
566 DEFNDBINOP_OP, not DEFBINOP_OP.
568 * OPERATORS/op-s-cm.cc: Define functions for el_and and el_or
569 operators with DEFNDBINOP_FN.
571 * oct-hist.cc (default_history_file): Use file_ops::concat.
572 * load-path.cc (dir_info::initialize, dir_info::get_file_list,
573 load_path::do_find_fcn, load_path::do_find_file, genpath,
574 execute_pkg_add_or_del, load_path::do_find_first_of,
575 load_path::do_find_all_first_of): Likewise.
577 * help.cc (Flookfor): Avoid doubling directory separator.
578 * dirfns.cc (Fmkdir): Likewise.
580 * pt-mat.cc (tree_matrix::rvalue): Produce sq_string if any
581 strings are sq_string objects.
583 2007-12-10 David Bateman <dbateman@free.fr>
585 * graphics.h.in (data_property::data): Declare as NDArray instead
586 of Matrix. Change all uses.
588 2007-12-10 Shai Ayal <shaiay@users.sourceforge.net>
590 * graphics.h.in (class figure) Add the color property.
591 * graphics.cc (class figure) Ditto.
593 2007-12-07 David Bateman <dbateman@free.fr>
595 * data.cc (Fnorm): Don't return a scalar stored as a sparse
596 matrix. Convert it to a scalar.
598 * graphics.cc (check_limit_val): Delete.
599 (check_limit_vals): Simplify and no longer use check_limit_val.
601 2007-12-05 John W. Eaton <jwe@octave.org>
603 * version.h (OCTAVE_VERSION): Now 2.9.18+.
605 2007-12-05 John W. Eaton <jwe@octave.org>
607 * version.h (OCTAVE_VERSION): Now 2.9.18.
608 (OCTAVE_API_VERSION): Now api-v30.
609 (OCTAVE_RELEASE_DATE): Now 2007-12-05.
611 2007-12-04 John W. Eaton <jwe@octave.org>
613 * Makefile.in (INCLUDES): Add builtins.h to the list.
615 * src/oct-hist.cc (default_history_file): Use += instead of
616 push_back to append character to std::string object.
618 * Makefile.in (LIBDLFCN): Delete all uses.
620 * toplev.cc (octave_config_info): Remove LIBDLFCN and
621 DLFCN_INCFLAGS from the list.
622 * oct-conf.h.in (OCTAVE_CONF_DLFCN_INCFLAGS, OCTAVE_CONF_LIBDLFCN):
625 * error.cc (Ferror): Handle error id.
627 * load-save.cc (Fsave, Fload): Doc fixes.
628 From Marco Caliari <caliari@sci.univr.it>.
630 2007-12-04 Shai Ayal <shaiay@users.sourceforge.net>
632 * graphics.h.in (base_properties::get_type
633 base_properties::get___modified__,
634 base_properties::get___myhandle__): New functions.
636 2007-12-04 Christoph Mayer <Christoph.Mayer@dlr.de>.
638 * toplev.h (clean_up_and_exit, recover_from_exception,
639 do_octave_atexit, global_command, curr_parent_function):
640 Tag with OCTINTERP_API.
642 2007-12-03 David Bateman <dbateman@free.fr>
644 * DLD-FUNCTIONS/luinc.cc: Make tests conditional on HAVE_UMFPACK.
645 * DLD-FUNCTIONS/spqr.cc: Make tests conditional on HAVE_CXSPARSE.
647 * DLD-FUNCTIONS/regexp.cc: Use "%!testif" blocks for conditional
650 * graphics.cc (class axes): Add color and activepositionproperty
651 properties to axis objects.
652 * graphics.h.in (class axes): ditto.
654 * DLD-FUNCTIONS/regexp.cc: Also include sys/types.h for regexp.
656 2007-11-30 John W. Eaton <jwe@octave.org>
658 * DLD-FUNCTIONS/sort.cc (operator < (const Complex&, const Complex&),
659 operator > (const Complex&, const Complex&)):
660 Pass args by const reference, not value.
662 * src/data.cc, src/matherr.c, src/pr-output.cc, src/sysdep.cc,
663 src/DLD-FUNCTIONS/__dsearchn__.cc, src/DLD-FUNCTIONS/minmax.cc,
664 src/DLD-FUNCTIONS/qz.cc, src/DLD-FUNCTIONS/sort.cc,
665 src/DLD-FUNCTIONS/tsearch.cc: Include lo-math.h instead of cmath
668 2007-11-30 Moritz Borgmann <octave@moriborg.de>
670 * ls-mat5.h (mat5_data_type): Delete trailing comma in enum decl.
671 * oct-stream.cc (octave_base_stream::do_printf): Use
672 OCTAVE_EMPTY_CPP_ARG to avoid annoying Sun compiler warning.
673 * OPERATORS/op-sbm-sbm.cc (DEFDBLCONVFN): Delete useless macro
676 * DLD-FUNCTIONS/typecast.cc (typecast): No longer static.
678 2007-11-30 John W. Eaton <jwe@octave.org>
680 * graphics.cc (updating_axis_limits): New static variable.
681 (check_limit_val, check_limit_vals, get_axis_limits): New functions.
682 (axes::update_axis_limits): Make it work.
683 * graphics.h.in (base_properties::get_children): New function.
684 (base_properties::get_xdata, base_properties::get_ydata,
685 base_properties::get_zdata, base_properties::get_ldata,
686 base_properties::get_udata, base_properties::get_xldata,
687 base_properties::get_xudata, base_properties::get_cdata,
688 base_properties::get_properties (void) const):
689 New virtual functions.
690 (graphics_object::get_xdata, graphics_object::get_ydata,
691 graphics_object::get_zdata, graphics_object::get_ldata,
692 graphics_object::get_udata, graphics_object::get_xldata,
693 graphics_object::get_xudata, graphics_object::get_cdata,
694 graphics_object::get_properties (void) const,
695 root_figure::get_properties (void) const,
696 figure::get_properties (void) const,
697 axes::get_properties (void) const,
698 line::get_properties (void) const,
699 text::get_properties (void) const,
700 image::get_properties (void) const,
701 patch::get_properties (void) const,
702 surface::get_properties (void) const)): New functions.
703 (radio_property::radio_property (const radio_values&)):
704 Provide default value for argument.
705 (radio_property::radio_property (const radio_values&, const
706 std::string&)): Delete.
707 (axes::xlimmode, axes::ylimmode, axes::zlimmode, axes::climmode,
708 axes::xscale, axes::yscale, axes::zscale): Declare as
709 radio_property instead of octave_value values. Adjust all uses.
711 2007-11-29 John W. Eaton <jwe@octave.org>
713 * pr-output.cc (octave_print_internal_template (std::ostream&,
714 const octave_int<T>&, bool)): Rename from octave_print_internal.
715 (PRINT_INT_SCALAR_INTERNAL): New macro. Use it to define
716 non-template functions for printing scalar octave_int values.
717 (octave_print_internal_template (std::ostream&, const intNDArray<T>&,
718 bool, int)): Rename from octave_print_internal.
719 (PRINT_INT_ARRAY_INTERNAL): New macro. Use it to define
720 non-template functions for printing scalar octave_int values.
721 * pr-output.h: Declare non-template functions for printing
722 octave_int scalar and array values.
723 Delete declarations of template funtions for printing octave_int
724 scalar and array values.
726 2007-11-28 John W. Eaton <jwe@octave.org>
728 * graphics.cc (base_properties::update_axis_limits,
729 axes::update_axis_limits): New functions.
730 * graphics.h.in (class data_property): New class.
731 (graphics_object::update_axis_limits): New function.
732 (base_graphics_object::update_axis_limits): New virtual function.
733 (base_properties::update_axis_limits, axes::update_axis_limits):
735 (class line, class image, class patch, class surface): Use it
736 instead of octave_value for data properties. Tag data properties
738 (class axes): Tag scale properties with "l" modifier.
739 * genprops.awk: Handle "l" modifier.
741 * mkbuiltins: Emit #include "builtins.h" for the builtins.cc file.
742 From Christoph Mayer <Christoph.Mayer@dlr.de>.
744 * TEMPLATE-INST/Array-tc.cc (resize_fill_value<octave_value>):
747 * Cell.cc (Cell::Cell (const dim_vector&, const string_vector&, bool)):
748 Initialize undefined values to resize_fill_value ().
750 2007-11-27 John W. Eaton <jwe@octave.org>
752 * TEMPLATE-INST/Array-tc.cc (resize_fill_value<octave_value>):
753 Tag inline. From Moritz Borgmann <octave@moriborg.de>.
755 * pt-bp.cc (tree_breakpoint::visit_decl_command): Also check line
757 * pt-decl.cc (tree_global_command::eval, tree_static_command::eval):
758 Insert MAYBE_DO_BREAKPOINT here.
760 * error.cc (Fwarning): If setting state "all" to "error", leave
761 Octave:matlab-incompatible and Octave:single-quote-string warning
763 (warning_enabled): Allow individual warning states to override
766 * octave.cc (execute_eval_option_code, execute_command_line_file):
768 * toplev.cc (recover_from_exception): Now extern.
769 * toplev.h (recover_from_exception): Provide decl.
771 * pt-idx.cc (tree_index_expression::lvalue): Treat object == []
772 the same as undefined.
774 2007-11-26 John W. Eaton <jwe@octave.org>
776 * oct-stream.cc (DO_DOUBLE_CONV): Always use long.
778 * oct-stream.cc (do_write): Call float_value and double_value on
779 octave_int<T> objects instead of relying on conversion operators.
781 * ls-mat5.cc (read_mat5_binary_element, OCTAVE_MAT5_INTEGER_READ):
782 Call double_value on octave_int<T> objects
783 instead of relying on conversion operator.
784 (read_mat5_binary_file_header):
785 Call char_value on octave_int<T> objects
786 instead of relying on conversion operator.
787 (read_mat5_binary_element):
788 Call bool_value on octave_int<T> objects
789 instead of relying on conversion operator.
791 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::double_value,
792 OCTAVE_VALUE_INT_MATRIX_T::scalar_value,
793 OCTAVE_VALUE_INT_MATRIX_T::matrix_value,
794 OCTAVE_VALUE_INT_MATRIX_T::complex_matrix_value,
795 OCTAVE_VALUE_INT_MATRIX_T::array_value,
796 OCTAVE_VALUE_INT_MATRIX_T::complex_array_value,
797 OCTAVE_VALUE_INT_SCALAR_T::double_value,
798 OCTAVE_VALUE_INT_SCALAR_T::scalar_value,
799 OCTAVE_VALUE_INT_SCALAR_T::matrix_value,
800 OCTAVE_VALUE_INT_SCALAR_T::complex_matrix_value,
801 OCTAVE_VALUE_INT_SCALAR_T::array_value,
802 OCTAVE_VALUE_INT_SCALAR_T::complex_array_value,
803 Call double_value on octave_int<T> objects
804 instead of relying on conversion operator.
805 (OCTAVE_VALUE_INT_MATRIX_T::bool_array_value,
806 OCTAVE_VALUE_INT_SCALAR_T::bool_array_value):
807 Call bool_value on octave_int<T> objects
808 instead of relying on conversion operator.
809 (OCTAVE_VALUE_INT_MATRIX_T::char_array_value,
810 OCTAVE_VALUE_INT_SCALAR_T::char_array_value):
811 Call char_value on octave_int<T> objects
812 instead of relying on conversion operator.
814 2007-11-26 David Bateman <dbateman@free.fr>
816 * Sparse-op-defs.h (SPARSE_BASE_REDUCTION_OP): Check that the fill
817 value is not zero before creating the matrices.
819 * graphics.cc (class axes): Add the {x|y|z}color color property.
820 * graphics.h.in (class axes): ditto.
822 * ov-base.cc (Vsparse_auto_mutate, Fsparse_auto_mutate): New
823 internal variable and built-in function to set it.
824 * ov-base.h (extern bool Vsparse_auto_mutate): Export internal
825 variable to other functions.
826 * ov-re-sparse.cc (octave_sparse_matrix::try_narrowing_conversion
827 (void)), ov-cx-sparse.cc
828 (octave_sparse_complex_matrix::try_narrowing_conversion (void)),
830 (octave_sparse_bool_matrix::try_narrowing_conversion (void)):
831 Use Vsparse_auto_mutate flag to determine whether to convert
832 sparse matrices to full matrices if that saves space.
834 * DLD-FUNCTIONS/minmax.cc (MINMAX_DOUBLE_BODY): New version of
835 MINMAX_BODY macro without the initialization.
836 (MINMAX_INT_BODY): Macro for min/max for the integer types
837 (MINMAX_BODY): New macro that calls the appropriate instantiation
838 of the other two macros.
840 * graphics.cc (class axes): Add __colorbar__ property.
841 * graphics.h.in (class axes): ditto.
843 * data.cc (Fnorm): Document the "inf" string argument for matrice
844 and vectors and the "fro" argument for vectors.
846 * graphics.h.in (class figure): Add __enhanced__ property to cache
847 whether the terminal supports enhanced mode. Add interpreter
848 property to all text classes, to determine the renderer for the
850 * graphics.cc (class figure): ditto.
852 2007-11-26 Shai Ayal <shaiay@users.sourceforge.net>
854 * graphics.cc (string_properties): delete class
855 (property_name): rename class to caseless_str.
856 (radio_values::possible_vals): change type to caseless_str.
858 2007-11-26 Michael Goffioul <michael.goffioul@gmail.com>
860 * builtins.h (install_builtins): Tag with OCTINTERP_API.
861 * toplev.h (octave_interpreter_ready, octave_initialized): Likewise.
863 2007-11-14 John W. Eaton <jwe@octave.org>
865 * mex.cc (mex::foreign_memlist): New data member.
866 (mex::mark_foreign, mex::unmark_foreign): New functions.
867 (mex::free): Don't warn about pointers found in foreign_memlist.
868 (maybe_mark_foreign): New function.
869 (mxArray_octave_value::get_data, mxArray_octave_value::get_ir,
870 mxArray_octave_value::get_jc):
871 Call maybe_mark_foreign on returned pointer.
873 2007-11-14 David Bateman <dbateman@free.fr>
875 * mex.cc (mxArray_sparse::mxArray_sparse (const mxArray_sparse&)):
876 Also ensure that pr and pi are correctly copied.
878 2007-11-14 John W. Eaton <jwe@octave.org>
880 * Makefile.in (@bsd_gcc_kluge_targets_frag@): Delete line for
881 Makefrag.bsd substitution.
883 * graphics.h.in (base_properties::tag): New property.
884 (base_properties::get_tag, base_properties::set_tag): New functions.
885 (root_figure::set, root_figure::get, figure::set, figure::get,
886 axes::set, axes::get, line::set, line::get, text::set, text::get,
887 patch::set, patch::get, surface::set, surface::get): Handle tag.
889 2007-11-14 Joseph P. Skudlarek <Jskud@Jskud.com>
891 * DLD-FUNCTIONS/regexp.cc: Undo previous change.
893 2007-11-14 John W. Eaton <jwe@octave.org>
895 * mex.cc (mex::mark, mex::unmark): Now public.
896 (mex::persistent): Delete.
897 (mexMakeArrayPersistent): Call maybe_unmark_array instead of
899 (mexMakeMemoryPersistent): Call maybe_unmark instead of
901 (maybe_unmark (void *)): New function.
902 (mxSetDimensions, mxSetPr, mxSetPi, mxSetData, mxSetImagData,
903 mxSetIr, mxSetJc): Use it. From David Bateman.
905 2007-11-13 Joseph P. Skudlarek <Jskud@Jskud.com>
907 * DLD-FUNCTIONS/rand.cc (Frand): Update URL reference in doc string.
909 2007-11-12 David Bateman <dbateman@free.fr>
911 * graphics.h.in, graphics.cc (class text): Add the fontangle and
912 fontweight properties. Add string_property class to handle the
915 2007-11-12 John W. Eaton <jwe@octave.org>
917 * version.h (OCTAVE_VERSION): Now 2.9.17+.
919 2007-11-12 David Bateman <dbateman@free.fr>
921 * graphics.h.in, graphics.cc (class text): Add the fontname and
924 2007-11-10 John W. Eaton <jwe@octave.org>
926 * version.h (OCTAVE_VERSION): Now 2.9.17.
927 (OCTAVE_API_VERSION): Now api-v29.
928 (OCTAVE_RELEASE_DATE): Now 2007-11-10.
930 2007-11-09 John W. Eaton <jwe@octave.org>
932 * DLD-FUNCTIONS/__gnuplot_raw__.l: Don't add atexit ("closeplot")
935 2007-11-09 David Bateman <dbateman@free.fr>
937 * graphics.cc, graphics.h.in (class patch): Add the field "keylabel".
939 * data.cc (Fcputime) [__WIN32__]: Correct scaling of sys and usr times.
941 * graphics.cc (is_handle): Handle must be a real scalar.
943 2007-11-09 Joseph P. Skudlarek <Jskud@Jskud.com>
945 * data.cc (Fislogical): Fix typo in documentation entry.
947 2007-11-08 John W. Eaton <jwe@octave.org>
949 * DLD-FUNCTIONS/__gnuplot_raw__.l (F__gnuplot_save_data__):
950 Note obsolescence in doc string.
951 (WARN_OBSOLETE): New macro
952 (F__gnuplot_save_data__, Fgnuplot_command_plot,
953 Fgnuplot_command_replot, Fgnuplot_command_splot,
954 Fgnuplot_command_using, Fgnuplot_command_with,
955 Fgnuplot_command_axes, Fgnuplot_command_title,
956 Fgnuplot_command_end, Fgnuplot_use_title_option,
957 F__clear_plot_window__, Fcloseplot, Fpurge_tmp_files,
958 F__gnuplot_raw__, F__gnuplot_send_inline_data__, F__gnuplot_set__,
959 F__gnuplot_show__, F__gnuplot_plot__, F__gnuplot_splot__,
960 F__gnuplot_replot__): Use WARN_OBSOLETE.
962 2007-11-07 John W. Eaton <jwe@octave.org>
964 * DLD-FUNCTIONS/regexp.cc: Handle HAVE_PCRE_PCRE_H. Check
965 HAVE_PCRE_H instead of HAVE_PCRE to decide whether to include pcre.h.
967 * DLD-FUNCTIONS/__gnuplot_raw__.l (Fgnuplot_command_plot,
968 Fgnuplot_command_replot, Fgnuplot_command_splot,
969 Fgnuplot_command_using, Fgnuplot_command_with,
970 Fgnuplot_command_axes, Fgnuplot_command_title,
971 Fgnuplot_command_end, Fgnuplot_use_title_option,
972 F__clear_plot_window__, Fcloseplot, Fpurge_tmp_files,
973 F__gnuplot_raw__, F__gnuplot_send_inline_data__, F__gnuplot_set__,
974 F__gnuplot_show__, F__gnuplot_plot__, F__gnuplot_splot__,
975 F__gnuplot_replot__): Note obsolescence in doc string.
977 2007-11-06 Kai Habel <kai.habel@gmx.de>
979 * graphics.h.in (class surface::properties): New properties,
980 cdata, facecolor, facealpha, edgecolor, linestyle,
981 linewidth, marker, markeredgecolor, markerfacecolor, markersize.
982 * graphics.cc (surface::properties::properties,
983 surface::properties::set, surface::properties::get,
984 surface::properties::factory_defaults): Handle new properities.
986 2007-11-06 David Bateman <dbateman@free.fr>
988 * data.cc (DATA_REDUCTION): Handle the 'native' and 'double'
989 arguments of the Fsum function.
990 * OPERATORS/op-bm-bm.cc (matrix_to_bool_matrix,
991 scalar_to_bool_matrix): New type conversion functions.
992 (install_bm_bm_ops): Install new type conversions functions.
994 2007-11-06 Michael Goffioul <michael.goffioul@gmail.com>
996 * toplev.cc (Fsystem) [__WIN32__ && ! __CYGWIN__]:
997 Quote the complete command.
999 2007-11-06 John W. Eaton <jwe@octave.org>
1001 * data.cc (Fnorm): New tests.
1003 * defun-int.h (DEFINE_FUNX_INSTALLER_FUN3): Don't install function
1004 if check_version produces an error.
1006 2007-11-05 John W. Eaton <jwe@octave.org>
1008 * pt-idx.cc (tree_index_expression::lvalue): Try to do a better
1009 job of computing the number of elements in lvalue expressions when
1010 the last indexing element is ".".
1012 2007-11-02 John W. Eaton <jwe@octave.org>
1014 * file-io.cc (fopen_mode_to_ios_mode): Use std::ios::app instead
1017 2007-11-02 Olli Saarela <Olli.Saarela@kcl.fi>
1019 * input.cc, pr-output.cc, bitfcns.cc, DLD-FUNCTIONS/time.cc:
1020 Fix broken @examples in help texts.
1022 2007-10-31 John W. Eaton <jwe@octave.org>
1024 * data.cc (Fnorm): Avoid warning about p_val possibly being used
1027 * version.h (OCTAVE_VERSION): Now 2.9.16+.
1029 2007-10-31 John W. Eaton <jwe@octave.org>
1031 * version.h (OCTAVE_VERSION): Now 2.9.16.
1032 (OCTAVE_API_VERSION): Now api-v28.
1033 (OCTAVE_RELEASE_DATE): Now 2007-10-31.
1035 2007-10-31 Muthiah Annamalai <muthuspost@gmail.com>
1037 * pt-assign.h (tree_simple_assignment::op_type,
1038 tree_multi_assignment::op_type): New functions.
1039 * pt-unop.h (tree_unary_expression::op_type): New function.
1041 2007-10-31 John W. Eaton <jwe@octave.org>
1043 * graphics.cc (line::properties::get): Fix property name
1044 (markerface -> markerfacecolor).
1046 * Makefile.in (INCLUDES): Add debug.h to the list.
1048 2007-10-30 John Swensen <jpswensen@comcast.net>
1050 * debug.h: New file.
1051 * debug.cc (parse_dbfunction_params, do_find_bkpt_list,
1052 intmap_to_ov): New functions.
1053 (Fdbstop, Fdbclear): Use parse_dbfunction_params.
1054 Improve compatibility.
1055 (Fdbstatus): Improve compatibility.
1057 * help.cc (do_which): No longer static.
1058 * help.h: Provide decl.
1060 2007-10-30 David Bateman <dbateman@free.fr>
1062 * symtab.cc: Doc fixes for small book format.
1064 2007-10-30 John W. Eaton <jwe@octave.org>
1066 * file-io.cc (fopen_mode_to_ios_mode): Handle 'W' as 'w' and 'R'
1067 as 'r', but warn about them.
1069 2007-10-29 Thomas Treichl <Thomas.Treichl@gmx.net>
1071 * data.cc: Include sytime.h, sys/types.h, and sys/resource.h.
1073 2007-10-25 John W. Eaton <jwe@octave.org>
1075 * graphics.cc (figure::properties::set_currentaxes):
1076 Allow currentfigure to be NaN.
1078 2007-10-25 Michael Goffioul <michael.goffioul@gmail.com>
1080 * DLD-FUNCTIONS/__contourc__.cc: Use unsigned int instead of uint.
1081 (drawcn): Use 1 << k instead of pow (2, k).
1083 2007-10-25 John W. Eaton <jwe@octave.org>
1085 * symtab.h (symbol_record::TYPE): Delete trailing comma in enum decl.
1087 * ov-base.h (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Use
1088 OCTAVE_EMPTY_CPP_ARG to avoid annoying Sun compiler warning.
1090 * Makefile.in (graphics.h): Use $(AWK) instead of awk.
1092 * DLD-FUNCTIONS/time.cc (Ftime, Fmktime): Avoid unnecessary cast.
1094 * data.cc (Ftic, Ftoc): Call double_value on octave_time objects
1095 instead of relying on conversion operator.
1096 * ov.cc (octave_value::octave_value (octave_time)): Likewise.
1098 * variables.cc (symbol_out_of_date): Use explicit conversion to
1099 time_t instead of relying on conversion operator.
1100 * ov-fcn-handle.cc (octave_fcn_handle::subsref): Likewise.
1102 * data.cc (tic_toc_timestamp): Rename from __tic_toc_timestamp__.
1105 2007-10-24 David Bateman <dbateman@free.fr>
1107 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::OCTAVE_VALUE_INT_MATRIX_T
1108 (const ArrayN<OCTAVE_INT_T>&)): New constructor.
1109 * ov.cc (octave_value::octave_value(const ArrayN<T>) with T being
1110 octave_int8, octave_uint8, octave_int16, octave_uint16,
1111 octave_int32, octave_uint32, octave_int64, octave_uint64): New
1113 * ov.h (octave_value::octave_value(const ArrayN<T>) with T being
1114 octave_int8, octave_uint8, octave_int16, octave_uint16,
1115 octave_int32, octave_uint32, octave_int64, octave_uint64):
1117 * DLD-FUNCTIONS/sort.cc (template class octave_sort<T>,
1118 template class vec_index<T>, template class
1119 octave_sort<vec_index<T> *>, with T being
1120 octave_int8, octave_uint8, octave_int16, octave_uint16,
1121 octave_int32, octave_uint32, octave_int64, octave_uint64): New
1122 instantiations of sort template classes.
1125 2007-10-24 John W. Eaton <jwe@octave.org>
1127 * graphics.cc (root_figure::properties::set_currentfigure):
1128 Allow currentfigure to be NaN.
1130 * pt-idx.cc (tree_index_expression::lvalue): Correctly compute
1131 number of elements in lvalue expression when last indexing
1134 2007-10-23 John W. Eaton <jwe@octave.org>
1136 * graphics.cc (is_handle (const graphics_handle&)): New function.
1137 (gh_manager::do_free, reparent, base_properties::set_parent,
1138 properties::get_title, properties::get_xlabel,
1139 properties::get_ylabel, properties::get_zlabel,
1140 properties::remove_child, make_graphics_object, F__go_figure__,
1141 F__go_delete__, __go_axes_init__): Call OK on graphics handle
1142 object instead of relying on implicit conversion operator.
1143 * graphics.h.in (graphics_handle::operator double ()): Delete.
1144 (graphics_handle::operator bool ()): Delete.
1145 (gh_manager::do_handle_list, gh_manager::do_figure_handle_list,
1146 base_properties::adopt): Call VALUE on graphics handle object
1147 instead of relying on implicit conversion operator.
1149 * ov-base.h (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Call
1150 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2 with "( )" as arg list
1153 * mxarray.h.in (mxClassID): Delete trailing comma in enum decl.
1155 * symtab.h (symbol_table::symbol_table): Reduce default table size
1158 2007-10-22 Kim Hansen <kimhanse@gmail.com>
1160 * unwind-prot.cc: Include <cstring>.
1162 2007-10-22 David Bateman <dbateman@free.fr>
1164 * data.cc (Ftic, Ftoc, Fcputime): New builtin versions of the
1165 benchmarking functions for speed.
1166 * oct-map.cc (Octave_map::squeeze, Octave_map::permute): New methods.
1167 (Octave_map::index (const octave_value_list&, bool)): Add resize_ok
1168 argument, define as const and use const_iterator internally.
1169 (Octave_map::index (idx_vector&, ...), Octave_map::index (Array
1170 <idx_vector>&, ...)): New forms of the index function.
1171 * oct-map.h (squeeze, permute, indx (const octave_value_list&, bool),
1172 index (idx_vector&, ...), index (Array <idx_vector>&, ...)): Add
1173 or update declaration.
1174 * ov-struct.cc (octave_struct::do_index_op (const octave_value_list&,
1176 * ov-struct.h (do_index_op (const octave_value_list&, bool)): Declare
1178 (squeeze (void), permute (const Arra<int>&, bool): New methods.
1180 2007-10-19 Kai Habel <kai.habel@gmx.de>
1182 * DLD-FUNCTIONS/__contourc__.cc (add_point): Rename from
1183 cl_add_point. Change all uses.
1184 (end_contour): Rename from cl_end_contour. Change all uses.
1185 (start_contour): Rename from cl_start_contour. Change all uses.
1186 (drawcn): Rename from cl_drawcn. New algorithm for locating contours.
1187 (mark_facets): New function.
1188 (cntr): Rename from cl_cntr. Change all uses. New algorithm for
1191 2007-10-19 John W. Eaton <jwe@octave.org>
1193 * ov-cell.cc (octave_cell::subsasgn): If RHS is cs-list, don't
1194 fail if shape of LHS is different.
1195 * ov-struct.cc (octave_struct::subsasgn): Likewise.
1197 2007-10-19 Olli Saarela <Olli.Saarela@kcl.fi>
1199 * help.cc (Flookfor): Call print_usage instead of usage.
1200 * DLD-FUNCTIONS/cellfun.cc (Fmat2cell): Likewise.
1202 2007-10-17 John W. Eaton <jwe@octave.org>
1204 * DLD-FUNCTIONS/spchol.cc (Fsymbfact): Delete special code for METIS.
1206 2007-10-17 Gabriele Pannocchia <g.pannocchia@ing.unipi.it>
1208 * DLD-FUNCTIONS/__qp__.cc (qp): Fix check for Wact(j).
1210 2007-10-15 Søren Hauberg <hauberg@gmail.com>
1212 * error.cc (Ferror): Make text fit on pages when using smallbook.
1213 * load-save.cc (Fsave_header_format_string): Ditto.
1214 * ov-struct.cc (Fcell2struct): Ditto.
1215 * DLD-FUNCTIONS/besselj.cc (Fairy): Ditto.
1216 * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread): Ditto.
1218 2007-10-15 David Bateman <dbateman@free.fr>
1220 * graphics.cc (axes::properties::get): Fix typo.
1222 2007-10-13 John W. Eaton <jwe@octave.org>
1224 * version.h (OCTAVE_VERSION): Now 2.9.15+.
1226 2007-10-13 John W. Eaton <jwe@octave.org>
1228 * version.h (OCTAVE_VERSION): Now 2.9.15.
1229 (OCTAVE_API_VERSION): Now api-v27.
1230 (OCTAVE_RELEASE_DATE): Now 2007-10-13.
1232 2007-10-13 David Bateman <dbateman@free.fr>
1234 * graphics.h.in (class patch): Add the faces and vertices properties.
1235 * graphics.cc (patch::properties::properties): Initialize faces
1237 (patch::properties::get): Also fetch faces and vertices.
1238 (patch::properties::factory_defaults): Set faces and vertices.
1240 2007-10-12 John W. Eaton <jwe@octave.org>
1242 * Change copyright notices in all files that are part of Octave to
1243 GPLv3 or any later version.
1245 2007-10-11 John W. Eaton <jwe@octave.org>
1247 * DLD-FUNCTIONS/urlwrite.cc (urlget): Disable use of EPSV mode.
1249 2007-10-11 Brian Gough <bjg@network-theory.co.uk>
1251 * DLD-FUNCTIONS/fftn.cc, DLD-FUNCTIONS/regexp.cc, dirfns.cc,
1252 input.cc: Spelling fixes.
1254 2007-10-10 John W. Eaton <jwe@octave.org>
1256 * OPERATORS/op-sbm-sbm.cc (bool_matrix_to_double_matrix):
1257 New conversion function.
1258 (install_sbm_sbm_ops): Install it.
1260 * ov-re-mat.cc (double): Handle sparse as a special case.
1262 2007-10-10 Olli Saarela <Olli.Saarela@kcl.fi>
1264 * data.cc, debug.cc, dirfns.cc, error.cc, file-io.cc, help.cc,
1265 load-save.cc, ov-fcn-inline.cc, parse.y, pr-output.cc, symtab.cc,
1266 syscalls.cc, toplev.cc, variables.cc, DLD-FUNCTIONS/bsxfun.cc,
1267 DLD-FUNCTIONS/cellfun.cc, DLD-FUNCTIONS/fft.cc,
1268 DLD-FUNCTIONS/fft2.cc, DLD-FUNCTIONS/fftw.cc,
1269 DLD-FUNCTIONS/gcd.cc, DLD-FUNCTIONS/lsode.cc,
1270 DLD-FUNCTIONS/luinc.cc, DLD-FUNCTIONS/matrix_type.cc,
1271 DLD-FUNCTIONS/rand.cc, DLD-FUNCTIONS/regexp.cc,
1272 DLD-FUNCTIONS/sparse.cc, DLD-FUNCTIONS/spchol.cc,
1273 DLD-FUNCTIONS/splu.cc, DLD-FUNCTIONS/spparms.cc: Spelling fixes.
1275 2007-10-10 Kim Hansen <kimhanse@gmail.com>
1277 * DLD-FUNCTIONS/lpsolve.cc: Delete.
1278 * Makefile.in (DLD_XSRC): Remove it from the list.
1280 * data.cc (Fsqueeze): Document 2d behaviour.
1281 * ov-range.h (octave_range::squeeze): New function.
1283 2007-10-09 John W. Eaton <jwe@octave.org>
1285 * DLD-FUNCTIONS/urlwrite.cc (urlget_cleanup): New function.
1286 (urlget): Protect call to curl_easy_perform with
1287 BEGIN_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE and
1288 END_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE.
1290 2007-10-09 David Bateman <dbateman@free.fr>
1292 * input.cc (accept_line): Drop this function and remove automatic
1293 insertion of closing quotes as the transpose operator confuses it.
1294 (initialize_command_input): Remove accept_line from here as well.
1296 2007-10-09 John W. Eaton <jwe@octave.org>
1298 * ov-mapper.cc (octave_mapper::apply): If possible, use
1299 d_d_map_fcn to handle complex values which have imag(z) == 0.
1301 * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread) [! HAVE_CURL]:
1302 Throw error instead of returning empty string hiding error message
1303 in third return value.
1304 (progress_func): Delete.
1305 (Furlread): Don't set progress callback for curl.
1306 (write_data, form_query_string, urlget): Now static.
1308 2007-10-08 David Bateman <dbateman@free.fr>
1310 * input.cc (quoting_filename): Function to add a leading quote to
1312 (accept_line): Function to check if a string needs a closing quote
1313 before calling the rl_newline function.
1314 (initialize_command_input): Initialize completer_quote_characters,
1315 filename_quote_characters, quoting_function,
1316 user_accept_line_function.
1318 * data.cc (template <class T> static make_diag (...)): New
1319 template class version of make_diag. Make other make_diag
1320 functions depend on it.
1321 ( static octave_value make_diag (const octave_value&,
1322 octave_idx_type)): Treat all possible internal Octave types.
1324 2007-10-08 John W. Eaton <jwe@octave.org>
1326 * load-save.cc (save_vars, dump_octave_core):
1327 Don't pass INFNAN_WARNED to do_save.
1328 (do_save): Delete unused arg, INFNAN_WARNED.
1329 Don't pass INFNAN_WARNED to save_ascii_data.
1330 * ls-oct-ascii.cc (save_ascii_data_for_plotting):
1331 Don't pass INFNAN_WARNED to save_ascii.
1332 (save_ascii_data): Delete unused arg, INFNAN_WARNED.
1334 * ov.h (octave_value::save_ascii): Delete unused arg, INFNAN_WARNED.
1335 * ov-base-int.cc (octave_base_int_matrix<T>::save_ascii,
1336 octave_base_int_scalar<T>::save_ascii): Likewise.
1337 * ov-base-sparse.cc (octave_base_sparse<T>::save_ascii): Likewise.
1338 * ov-base.cc (octave_base_value::save_ascii): Likewise.
1339 * ov-bool-mat.cc (octave_bool_matrix::save_ascii): Likewise.
1340 * ov-bool.cc (octave_bool::save_ascii): Likewise.
1341 * ov-cell.cc (octave_cell::save_ascii): Likewise.
1342 * ov-fcn-handle.cc (octave_fcn_handle::save_ascii): Likewise.
1343 * ov-fcn-inline.cc (octave_fcn_inline::save_ascii): Likewise.
1344 * ov-list.cc (octave_list::save_ascii): Likewise.
1345 * ov-struct.cc (octave_struct::save_ascii): Likewise.
1346 * ov-str-mat.cc (octave_char_matrix_str::save_ascii): Likewise.
1347 * ov-range.cc (octave_range::save_ascii): Likewise.
1349 * ov-scalar.cc (octave_scalar::save_ascii): Remove warning about
1350 reloading inf/nan values. Delete unused arg, INFNAN_WARNED.
1351 * ov-complex.cc (octave_complex::save_ascii): Likewise.
1352 * ov-re-mat.cc (octave_matrix::save_ascii): Likewise.
1353 * ov-cx-mat.cc (octave_complex_matrix::save_ascii): Likewise.
1355 * ov-fcn-inline.cc (Finline): Use DEFUNX instead of DEFUN.
1357 2007-10-08 Michael Goffioul <michael.goffioul@gmail.com>
1359 * sighandlers.h (can_interrupt): Tag with OCTINERP_API.
1360 * sysdep.h (raw_mode, octave_popen, octave_pclose,
1361 same_file_internal): Likewise.
1363 2007-10-06 John W. Eaton <jwe@octave.org>
1365 * oct-stream.cc (octave_base_stream::do_scanf):
1366 Always allow MVAL to re resized if NR > 0.
1367 (FINISH_CHARACTER_CONVERSION): Likewise.
1369 * mappers.cc (install_mapper_functions): Undo previous change.
1370 Fix doc string for lgamma.
1373 2007-10-05 John W. Eaton <jwe@octave.org>
1375 * graphics.h.in (axes::properties): New property, colororder.
1376 * graphics.cc (default_colororder): New function.
1377 (axes::properties::properties, axes::properties::get,
1378 axes::properties::set_defaults,
1379 axes::properties::factory_defaults, ): Handle colororder.
1381 * mappers.cc (xzlgamma): New static function.
1382 (install_mapper_functions): Pass xzlgamma for c_c_map for lgamma
1383 mapper. Pass 1 for can_ret_cmplx_for_real and set hi to
1386 2007-10-04 John W. Eaton <jwe@octave.org>
1388 * DLD-FUNCTIONS/symrcm.cc: Move static functions to top of file to
1389 avoid forward decls.
1390 (Q_enq): Delete unused arg QH. Change all uses.
1391 (Q_deq): Delete unused arg QT. Change all uses.
1392 (find_starting_node): Delete unused local variable J.
1393 (H_heapify_min, H_insert, find_starting_node, Fsymrcm):
1394 Move local variable decls to point of first use.
1396 * OPERATORS/op-streamoff.cc (STREAMOFF_COMP_OP):
1397 Avoid control-reaches-end-of-non-void-function warning.
1399 * pt-const.cc (tree_constant::dup): Avoid unused parameter warning.
1401 * pr-output.cc (set_real_format, set_real_matrix_format,
1402 set_complex_format, set_complex_matrix_format):
1403 Delete unused arg, SIGN. Change uses.
1405 * oct-map.cc (Octave_map::Octave_map): Avoid shadow warning.
1407 * load-save.cc (write_header): Use reinterpret_cast to avoid
1408 old-style cast warning.
1410 * data.cc (do_permute): Delete unused arg, FNAME. Change all uses.
1412 * sysdep.cc (w32_set_octave_home, w32_set_quiet_shutdown,
1413 MINGW_signal_cleanup):
1414 Only define if defined (__WIN32__) && ! defined (_POSIX_VERSION).
1416 2007-10-04 Jason Riedy <jason@acm.org>
1418 * ls-mat5.cc (read_mat5_binary_data): Map miUTF16 to miUINT16,
1419 miUTF32 to miUINT32. The matfile format currently states that
1420 wide UTF formats are in the same byte order as the integers.
1421 (read_mat5_binary_element): Replace all UTF16 and UTF32
1422 characters with the high bit set (value >127) by '?' and warn
1425 2007-10-04 Michael Goffioul <michael.goffioul@gmail.com>
1427 * sysdep.cc (w32_set_octave_home): Base OCTAVE_HOME location on
1428 octinterp, not the main exe.
1430 2007-10-03 John W. Eaton <jwe@octave.org>
1432 * data.cc (Fnorm): New function.
1433 (F__vnorm__): Delete.
1435 2007-10-03 Michael Goffioul <michael.goffioul@gmail.com>
1437 * DLD-FUNCTIONS/typecast.cc: Include <algorithm>.
1439 2007-10-03 John W. Eaton <jwe@octave.org>
1441 * oct-map.cc (Octave_map::Octave_map (const dim_vector&,
1442 const string_vector&)): Delete.
1443 (Octave_map::Octave_map (const dim_vector&, const Cell&)):
1445 * ov-struct.cc (Fstruct): Allow creation of empty struct arrays
1448 2007-10-01 Shai Ayal <shaiay@users.sourceforge.net>
1450 * graphics.cc ((color_property::color_property (const
1451 octave_value& val)): Undo change from 2007-09-26
1452 (patch::properties::properties): use the "a" modifier to
1453 face_color & edge_color properties
1454 (patch::properties::set): Undo change from 2007-09-26
1455 * graphics.h.in (color_property::color_property
1456 (const octave_value& val)): Undo change from 2007-09-26
1458 2007-10-01 Michael Goffioul <michael.goffioul@gmail.com>
1460 * octave.cc (octave_main): Add "--line-editing" option to force
1461 readline line editing.
1463 2007-09-28 David Bateman <dbateman@free.fr>
1465 * ov-range.h (int8_array_value, int16_array_value, int32_array_value,
1466 int64_array_value, uint8_array_value, uint16_array_value,
1467 int32_array_value, uint64_array_value): New methods
1469 2007-09-28 Kai Habel <kai.habel@gmx.de>
1471 * graphics.h.in (color_property::colormap_property (const Matrix&)):
1472 Use floating point math in calculation of colormap.
1474 2007-09-26 David Bateman <dbateman@free.fr>
1476 * graphics.cc (color_values::str2rgb): accept upper, lower and
1477 mixed-case versions of the string representing the color. Allow
1478 black defined as "k" and white as "w".
1479 (color_property::color_property (const octave_value& val,
1480 const radio_values &v)): Modify the constructor to also take a
1481 radio_values argument. Use it.
1482 (patch::properties::set): Change set_facecolor calls to initialize
1483 the color_property argument with the available radio_values.
1484 * graphics.h.in (color_property::color_property
1485 (const octave_value& val, const radio_values &v)): Also pass a
1486 radio_values argument.
1488 * ov-range.h (sparse_matrix_value, sparse_complex_matrix_value):
1491 * mk-pkg-add: Simplfy the autoload commands.
1492 * parse.y (Fautoload): Allow bare filename if file is in the same
1493 directory as the script from where the autoload command is run.
1495 2007-09-25 Matthias Drochner <m.drochner@fz-juelich.de>
1497 * syscalls.cc (Fpopen2): Doc fix.
1498 Use "sort -r" instead of "sort -nr" in test.
1500 2007-09-18 John W. Eaton <jwe@octave.org>
1502 * input.cc (input_event_hook, Finput_event_hook): Call
1503 command_editor::add_event_hook and
1504 command_editor::remove_event_hook intstead of
1505 command_editor::set_event_hook and
1506 command_editor::restore_event_hook.
1508 2007-09-17 John W. Eaton <jwe@octave.org>
1510 * version.h (OCTAVE_VERSION): Now 2.9.14+.
1512 2007-09-17 John W. Eaton <jwe@octave.org>
1514 * version.h (OCTAVE_VERSION): Now 2.9.14.
1515 (OCTAVE_API_VERSION): Now api-v26.
1516 (OCTAVE_RELEASE_DATE): Now 2007-09-17.
1518 * Makefile.in (DISTFILES): Add genprops.awk to the list.
1520 * ov-typeinfo.h (cat_op_fcn): Third arg in function pointer
1521 typedef is now Array<octave_idx_type> instead of Array<int>.
1523 * file-io.cc (do_stream_open): Use binary mode by default.
1525 2007-09-14 Shai Ayal <shaiay@users.sourceforge.net>
1527 * genprop.awk: Handle "a" modifier.
1529 2007-09-14 Kai Habel <kai.habel@gmx.de>
1531 * graphics.h.in (radio_values::contains): New function.
1532 (radio_values::validate): Use it.
1533 * graphics.cc (color_property::operator =): Call it instead of
1536 2007-09-13 John W. Eaton <jwe@octave.org>
1538 * DLD-FUNCTIONS/__glpk__.cc (glpk): Pass LPX_FX, not LB_DB, to
1539 lpx_set_col_bnds when lb[i] == ub[i].
1540 From: Zhi Wang <zcwang@umich.edu>.
1542 * graphics.h.in (colormap_property::colormap_property):
1543 Use jet colormap as default.
1545 2007-09-12 John W. Eaton <jwe@octave.org>
1547 * graphics.cc (text::properties::properties): Default color is
1549 * graphics.h (text::properties::color): Declare as color_property,
1552 * graphics.h.in (root_figure::defaults, figure::defaults,
1553 axes::defaults, line::defaults, text::defaults, image::defaults,
1554 patch::defaults, surface::defaults): New functions.
1555 * gripes.cc (gripe_not_implemented): New function.
1556 * gripes.h: Provide decl.
1558 2007-09-10 John W. Eaton <jwe@octave.org>
1560 * genprops.awk: Add missing newline character at end of file.
1561 From Alexander Klimov <alserkli@inbox.ru>.
1563 2007-09-10 David Bateman <dbateman@free.fr>
1565 * data.cc (do_cat): Avoid invalid indexing into ra_idx vector.
1567 2007-09-06 David Bateman <dbateman@free.fr>
1569 * DLD-FUNCTIONS/__delaunay__.cc, DLD-FUNCRIONS/__voronoi__.cc,
1570 DLD-FUNCTIONS/convhulln.cc: Avoid variables in global scope
1572 2007-09-06 David Bateman <dbateman@free.fr>
1574 * Makefile.in (stamp-prereq): Add graphics.h to the dependency list.
1576 2007-08-31 John W. Eaton <jwe@octave.org>
1578 * Makefile.in (INCLUDES): Remove graphics.h from the list.
1579 (DISTFILES): Include graphics.h.in in the list.
1580 (genprops.awk): New file.
1581 (graphics.h): New rule.
1582 (distclean): Remove graphics.h.
1583 * graphics.h.in: New file, from graphics.h.
1584 (graphics_handle): Now a class instead of typedef. Adapt all uses.
1585 (OCTAVE_GRAPHICS_PROPERTY_INTERNAL, OCTAVE_GRAPHICS_PROPERTY,
1586 OCTAVE_GRAPHICS_MUTABLE_PROPERTY): Delete macros.
1587 (class root_figure, class figure, class axes, class line, class
1588 text, class image, class patch, class surface): Use genprops.awk
1589 to generate property declarations and set/get functions.
1590 * graphics.h: Delete.
1591 * graphics.cc (nan_to_empty, empty_to_nan): Delete.
1592 (root_figure::properties::set, figure::properties::set,
1593 axes::properties::set, line::properties::set,
1594 text::properties::set, image::properties::set,
1595 patch::properties::set, surface::properties::set): Call
1596 type-specific set functions to set properties.
1597 (root_figure::properties::set_currentfigure,
1598 figure::properties::set_currentaxes, figure::properties::set_visible,
1599 axes::properties::get_title, axes::properties::get_xlabel,
1600 axes::properties::get_ylabel, axes::properties::get_zlabel,
1601 axes::properties::set_title, axes::properties::set_xlabel,
1602 axes::properties::set_ylabel, axes::properties::set_zlabel):
1603 Define custom versions.
1605 2007-09-06 David Bateman <dbateman@free.fr>
1607 * DLD-FUNCTIONS/bsxfun.cc: New function.
1608 * DLD-FUNCTIONS/typecast.cc: New function.
1609 * Makefile.in (DLD_XSRC): Add bsxfun.cc and typecast.cc.
1610 * ov.cc (do_cat_op): Modify use of Array<int> to
1611 Array<octave_idx_type> and adjust where necessary.
1612 * ov.h (do_cat_op): ditto.
1613 * data.cc (do_cat): ditto.
1614 * pt-mat.cc (tree_matrix::rvalue): ditto.
1616 2007-09-05 Michael Goffioul <michael.goffioul@gmail.com>
1618 * oct-stream.cc (octave_base_stream::do_printf): Ignore precision
1619 portion of format string if printing Inf, NaN, or NA values.
1621 2007-09-05 David Bateman <dbateman@free.fr>
1623 * DLD-FUNCTIONS/sort.cc (mx_sort_sparse, mx_sort_sparse_indexed):
1624 New template classes for sparse sort functions.
1626 * ov.h (octave_value (const Sparse<double>&, const MatrixType&),
1627 octave_value (const Sparse<Complex>&, const MatrixType&)): New
1629 * ov.cc (octave_value::octave_value (const Sparse<double>&,
1630 const MatrixType&), octave_value::octave_value (const
1631 Sparse<Complex>&, const MatrixType&)): Define them.
1632 * ov-re-sparse.h (octave_sparse_matrix (const MSparse<double>&,
1633 const MatrixType&), octave_sparse_matrix (const Sparse<double>&),
1634 octave_sparse_matrix (const Sparse<double>&, const MatrixType&)):
1636 * ov-cx-sparse.h (octave_sparse_complex_matrix (const MSparse<double>&,
1637 const MatrixType&), octave_sparse_complex_matrix (const
1638 Sparse<double>&), octave_sparse_complex_matrix (const
1639 Sparse<double>&, const MatrixType&)): ditto.
1641 2007-09-04 Gabriele Pannocchia <g.pannocchia@ing.unipi.it>
1643 * DLD-FUNCTIONS/__qp__.cc (qp): Use Wact(j) == i - n_eq when
1644 checking for blocking constraint. Don't resize lambda_tmp. Only
1645 compute Y = Aact.pseudo_inverse () if it is needed.
1647 2007-08-31 Michael Goffioul <michael.goffioul@gmail.com>
1649 * ls-mat-ascii.cc (get_lines_and_columns): Check beg variable for
1650 NPOS to avoid segmentation fault.
1652 * load-path.cc (load_path::do_find_file): Do not assume paths
1653 use forward slashes.
1655 2007-08-30 John W. Eaton <jwe@octave.org>
1657 * sysdep.cc (Fpause): Doc fix.
1659 2007-08-30 Gabriele Pannocchia <g.pannocchia@ing.unipi.it>
1661 * DLD-FUNCTIONS/__qp__.cc (qp): Resize Wact to n_act-neq, not n_act.
1663 2007-08-29 John W. Eaton <jwe@octave.org>
1665 * graphics.cc (class root_figure::properties):
1666 Rename from root_figure::root_figure_properties.
1667 (class figure::properties): Rename from figure::figure_properties.
1668 (class axes::properties): Rename from axes::axes_properties.
1669 (class line::properties): Rename from line::line_properties.
1670 (class text::properties): Rename from text::text_properties.
1671 (class image::properties): Rename from image::image_properties.
1672 (class patch::properties): Rename from patch::patch_properties.
1673 (class surface::properties): Rename from surface::surface_properties.
1675 * base-list.h (octave_base_list::remove): Implement our own
1676 remove_if function here.
1678 2007-08-28 John W. Eaton <jwe@octave.org>
1680 * graphics.h (base_properties): Move class definition before
1681 definition of base_graphics_object class. Provide forward
1682 declaration of base_graphics_object prior to definition of
1684 (base_graphics_object::get_properties): New virtual function.
1685 (graphics_object::get_properties, root_figure::get_properties,
1686 figure::get_properties, axes::get_properties,
1687 line::get_properties, text::get_properties, image::get_properties,
1688 patch::get_properties, surface::get_properties): New functions.
1689 (root_figure::properties, figure::properties, axes::properties,
1690 line::properties, text::properties, image::properties,
1691 patch::properties, surface::properties): Data member now private.
1693 2007-08-27 John W. Eaton <jwe@octave.org>
1695 * load-path.cc (load_path::do_find_file): Also files with non
1696 rooted relative names.
1697 * load-save.cc (find_file_to_load): Likewise. Also handle
1698 appending .mat to files with relative names.
1700 * graphics.cc (base_properties::mark_modified,
1701 base_properties::override_defaults,
1702 base_properties::delete_children, figure::get_default,
1703 axes::get_default): Move definitions here, from graphics.h.
1704 * graphics.h (class gh_manager): Move decl to end of file.
1706 * Cell.h (Cell::Cell (const octave_value_list&)): Create row
1707 vector instead of column vector.
1709 * pt-idx.cc (tree_index_expression::lvalue): Handle [x.a] =
1710 ... style assignments.
1711 * ov-struct.cc (octave_struct::subsasgn): Handle case of RHS as
1712 comma-separated list.
1714 * ov-cell.cc (gripe_failed_assignment): New function.
1715 (octave_cell::subsasgn): Call gripe_failed_assignment if assign
1718 2007-08-24 David Bateman <dbateman@free.fr>
1720 * symtab.cc (void symbol_table::clear (void)): If the record in
1721 the symbol table to clear is a user function that is a sub
1722 function with a static parent or if the parent is the current
1723 parent function, don't delete the record.
1724 (void symbol_table::clear_functions (void)): ditto.
1725 (void symbol_table::clear (const std::string&)): ditto.
1726 (void symbol_table::clear_function (const std::string&)): ditto.
1728 * graphics.h (class text): Add property color.
1729 * graphics.cc (text::text_properties::text_properties) ditto.
1730 (text::text_properties::set): ditto.
1731 (text::text_properties::get): ditto.
1732 (text::text_properties::factory_defaults): ditto.
1734 2007-08-24 John W. Eaton <jwe@octave.org>
1736 * mappers.cc (dummyp): New function.
1737 (install_mapper_functions): Use it to handle character data in
1738 finite, isinf, isna, and isnan functions.
1740 * load-path.cc (load_path::do_remove): Call remove_hook function
1741 before removing directory from list.
1743 2007-08-24 David Bateman <dbateman@free.fr>
1745 * ov-bool-sparse.cc (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Class
1747 * ov-re-sparse.cc, ov-cx-sparse.cc
1748 (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Class is now double.
1749 * ov-mapper.cc (octave_mapper::apply): Use is_sparse_type method
1750 rather than comparing class name.
1751 * ls-mat5.cc (save_mat5_element_length, save_mat5_binary_element):
1753 * pt-mat.cc (tree_matrix:rvalue): sparse matrices are now of class
1754 "double" or "logical", create new single type concat clause for
1756 * mex.cc (get_class_id): No longer need to special case sparse
1759 * DLD-FUNCTIONS/__delaunayn__.cc, DLD-FUNCTIONS/convhulln.cc,
1760 DLD-FUNCTIONS/tsearch.cc, DLD-FUNCTIONS/__voronoi__.cc: New
1761 functions ported from octave-forge.
1762 * DLD-FUCTIONS/__dsearchn__.cc: New file.
1763 * DLD-FUNCTIONS/__voronoi__.cc: Return point at infinity and
1764 include it in the polygrons of the Voronoi diagram for
1766 * Makefile.in: Add specific build targets for __delanayn__.cc,
1767 convhulln.cc and __voronoi__.cc to link to Qhull.
1768 (DLD_SRC): Add new functions.
1769 (OCTAVE_LIBS): Add QHULL_LIBS
1771 2007-08-22 David Bateman <dbateman@free.fr>
1773 * variables.cc (Fmunlock): Call munlock and not mlock.
1774 * symtab.cc (symbol_record::mark_as_formal_parameter): Typo.
1776 2007-08-10 John W. Eaton <jwe@octave.org>
1778 * pt-idx.cc (tree_index_expression::get_struct_index): Improve
1780 * ov-struct.cc (Fstruct, Fcell2struct): Trap invalid field names here.
1782 2007-08-10 Peter A. Gustafson <petegus@umich.edu>
1784 * graphics.h, graphics.cc (axes::axes_properties): New properties,
1785 xaxislocation and yaxislocation.
1787 2007-08-10 Kai Habel <kai.habel@gmx.de>
1789 * graphics.cc, graphics.h (patch): New class.
1790 (axes::axes_properties): New properties, clim and climmode.
1791 (surface::surface_properties::surface_properties): Handle patch.
1792 (F__go_patch__): New function.
1794 2007-07-30 John W. Eaton <jwe@octave.org>
1796 * mex.cc (mxArray_number::mxArray_number (int, const char **)):
1797 First arg is now mwSize.
1798 (max_str_len): Return mwSize value, not int.
1799 * mxarray.h.in (mxArray::mxArray (int, const char **)):
1800 First arg is now mwSize.
1801 (mxArray::mxArray (mxClassID, mwSize, mwSize, int, mxComplexity)):
1802 Third arg is now mwSize.
1803 (mxArray::get_string (char *, int)): Second arg is now mwSize.
1805 2007-07-26 John W. Eaton <jwe@octave.org>
1807 * DLD-FUNCTIONS/__glpk__.cc: Include glpk/glpk.h if
1808 HAVE_GLPK_GLPK_H is defined.
1810 2007-07-26 David Bateman <dbateman@free.fr>
1812 * pr-output.cc (Frats): Return character array with same number of
1813 rows as original value.
1815 2007-07-26 John W. Eaton <jwe@octave.org>
1817 * pt-bp.h (MAYBE_DO_BREAKPOINT): Rename cur_fcn to xfcn.
1819 * version.h (OCTAVE_VERSION): Now 2.9.13+.
1821 2007-07-25 John W. Eaton <jwe@octave.org>
1823 * version.h (OCTAVE_VERSION): Now 2.9.13
1824 (OCTAVE_API_VERSION): Now api-v25.
1825 (OCTAVE_RELEASE_DATE): Now 2007-07-25.
1827 * pt-bp.h (MAYBE_DO_BREAKPOINT): Rename fcn to curr_fcn.
1829 2007-07-25 David Bateman <dbateman@free.fr>
1831 * Makefile.in: Adjust DISTFILES to allow out of tree "make dist"
1834 2007-07-24 Shai Ayal <shaiay@users.sourceforge.net>
1836 * graphics.cc (color_property::operator = (const octave_value&)):
1838 * graphics.h: Provide decl.
1840 2007-07-24 Rafael Laboissiere <rafael@debian.org>
1842 * oct-conf.h.in (OCTAVE_CONF_RUNTEST): Delete definition.
1843 * toplevel.cc (Foctave_config_info): Remove RUNTEST from struct.
1845 2007-07-23 David Bateman <dbateman@free.fr>
1847 * pr-output.cc (rat_format, rat_string_len): Global variable
1848 controlling behavior of rational approximation. Use throughout.
1849 (class pr_rational_float): New class for rational approximation of
1850 floats, specifically with the << operator defined.
1851 (std::ostream& operator << (std::ostream&, const
1852 pr_rational_float&)): Operator to print rational approximations of
1854 (std::string rational_approx (double, int)): Function to convert a
1855 double value to a string of maximum length giving the rational
1857 (pr_any_float): Include the output of rational approximations.
1858 (Fformat): Add the "rat" format as an option.
1859 (Frats): New function.
1861 2007-07-23 Aquil H. Abdullah <aquil.abdullah@gmail.com>
1863 * mex.cc (mxCreateStructArray): Declare second arg as const.
1864 * mexproto.h (mxCreateStructArray): Ditto.
1866 2007-07-20 David Bateman <dbateman@free.fr>
1868 * zfstream.cc (BUFSIZE): Increase default buffer size to 256kB
1869 (gzfilebuf::underflow): Stash the last 16 characters read, so as
1870 to avoid calling pbackfail as much as possible.
1872 2007-07-18 David Bateman <dbateman@free.fr>
1874 * zfstream.cc (int_type gzfilebuf::pbackfail (int_type)): New
1875 method to putback a character when the putback position in the
1876 internal buffer doesn't exist.
1877 * zfstream.h (int_type pbackfail (int_type)): Declaration it.
1879 2007-07-14 Michael Goffioul <michael.goffioul@swing.be>
1881 * src/ov-bool-sparse.cc (octave_sparse_bool_matrix:load_hdf5):
1882 Use OCTAVE_LOCAL_BUFFER for temporary boolean value.
1884 2007-06-27 David Bateman <dbateman@free.fr>
1886 * DLD-FUNCTIONS/sparse.cc (Fspdiag): Ensure spdiag(zeros(1,0)) returns
1887 0x0 matrix. Doc update.
1888 * data.cc (Fdiag): Doc update.
1890 2007-06-28 John W. Eaton <jwe@octave.org>
1892 * ov-cell.cc (octave_cell::subsasgn): Given x = {}, convert to
1893 struct for assignments like x(1).f = val;
1895 * oct-stream.cc (octave_scan_1): New function
1896 (octave_scan): Use it. Handle fmt.width.
1898 * graphics.h (axes::axes_properties::visible): New data member.
1899 * graphics.cc (axes::axes_properties::axes_properties,
1900 axes::axes_properties::set, axes::axes_properties::get,
1901 axes::axes_properties::factory_defaults): Handle visible property.
1903 2007-06-27 Kai Habel <kai.habel@gmx.de>
1905 * graphics.h (color_values::color_values): Arg is now std:string
1906 instead of char. Call str2rgb, not c2rgb.
1907 * graphics.h, graphics.cc: (color_values::str2rgb): Rename from
1908 c2rgb. Handle long color names, not just single char abbreviations.
1910 2007-06-27 David Bateman <dbateman@free.fr>
1912 * src/load-save.cc (Fsave): Ensure header is written for non
1913 existent file with "-append".
1914 * src/ls-hdf5.h: First steps towards having append work for hdf5.
1916 2007-06-26 John W. Eaton <jwe@octave.org>
1918 * src/load-save.cc (Fsave): Open files correctly for -append.
1919 Don't write file headers if appending. Error for -append -hdf5.
1921 2007-06-25 Olaf Till <i7tiol@t-online.de>
1923 * oct-stream.h (octave_stream_list::list): Use std::map.
1924 (octave_stream_list::curr_len): Delete data member.
1925 (octave_stream_list::octave_stream_list): Fix initializations.
1927 * oct-stream.cc (octave_steam_list::do_insert,
1928 octave_steam_list::do_lookup, octave_steam_list::do_remove,
1929 octave_steam_list::do_clear, octave_steam_list::do_list_open_files,
1930 octave_steam_list::do_open_file_numbers,
1931 octave_steam_list::do_get_file_number):
1932 Use new octave_stream_list::list type.
1933 (octave_stream_list::do_insert): Insert octave_stream with key
1934 corresponding to file-descriptor.
1935 (octave_stream_list::do_insert, octave_steam_list::insert):
1936 Remove const qualifier of argument.
1938 2007-06-18 Søren Hauberg <hauberg@gmail.com>
1940 * DLD-FUNCTIONS/__lin_interpn__.cc: Replace octave_NaN with octave_NA.
1942 2007-06-15 Shai Ayal <shaiay@users.sourceforge.net>
1944 * graphics.h (OCTAVE_GRAPHICS_PROPERTY_INTERNAL,
1945 OCTAVE_GRAPHICS_PROPERTY, OCTAVE_GRAPHICS_MUTABLE_PROPERTY):
1946 New macros. Use them to declare individual properties and define
1947 accessor methods for each property in the property classes.
1949 2007-06-15 Kai Habel <kai.habel@gmx.de>
1951 * graphics.cc (Fget, Fset): Handle vectors of handles.
1953 2007-06-14 John W. Eaton <jwe@octave.org>
1955 * sysdep.cc (octave_popen, octave_pclose): New functions.
1956 * sysdep.h: Provide decls.
1958 * oct-procbuf.cc (procbuf::open): Use octave_popen.
1959 (procbuf::close): Use octave_pclose.
1960 * oct-prcstrm.cc (octave_oprocstream::octave_oprocstream,
1961 octave_iprocstream::ictave_oprocstream): Likewise.
1963 * graphics.h (text::text_properties::rotation): New data member.
1964 * graphics.cc (text::text_properties::text_properties,
1965 text::text_properties::set, text::text_properties::get,
1966 text::text_properties::factory_defaults): Handle rotation property.
1968 2007-06-14 Kai Habel <kai.habel@gmx.de>
1970 * graphics.cc (color_values::c2rgb): Also accept 'k' for black.
1972 2007-06-14 David Bateman <dbateman@free.fr>
1974 * ov-ch-mat.h (idx_vector index_vector (void) const): Remove
1976 * ov-ch-mat.cc (idx_vector index_vector (void) const): Move it
1977 here. Special case ":" case for compatibility.
1979 2007-06-13 John W. Eaton <jwe@octave.org>
1981 * ov-re-mat.cc (octave_matrix::load_ascii):
1982 Do a better job of handling read errors and empty matrices.
1983 * ov-cx-mat.cc (octave_complex_matrix::load_ascii): Likewise.
1984 * ov-bool-mat.cc (octave_bool_matrix::load_ascii): Likewise.
1985 * ov-str-mat.cc (octave_char_matrix_str::load_ascii): Likewise.
1987 2007-06-13 David Bateman <dbateman@free.fr>
1989 * DLD-FUNCTIONS/minmax.cc (MINMAX_BODY): Don't treat as single
1990 argument if arg2 is empty and nargin=2.
1992 2007-06-13 Shai Ayal <shaiay@users.sourceforge.net>
1994 * graphics.h, graphics.cc: Move class declarations to graphics.h.
1995 Move larger functions outside of class declarations in graphics.cc.
1997 2007-06-12 Benjamin Lindner <lindnerben@gmx.net>
1999 * DLD-FUNCTIONS/cellfun.cc: Use fullfile to generate filenames
2000 instead of assuming / will work as directory separator.
2002 2007-06-12 David Bateman <dbateman@free.fr>
2004 * DLD-FUNCTIONS/interpn.cc: Remove it.
2005 * DLD-FUNCTIONS/__lin_interpn__.cc: Move it. This is now a support
2006 function of interpn.m.
2007 * Makefile.in (DLD_XSRC): Remove interpn.cc and add __lin_interpn__.cc.
2009 2007-06-07 David Bateman <dbateman@free.fr>
2011 * ov-fcn-handles.cc (octave_fcn_handle::save_hdf5): More care that
2012 all open HDF5 descriptors are closed.
2013 (octave_fcn_handle::load_hdf5): Ditto.
2015 2007-06-06 Benjamin Lindner <lindnerben@gmx.net>
2017 * utils.cc [__MINGW32__]: Don't define HAVE_C99_VSNPRINTF.
2019 2007-06-06 Michael Goffioul <michael.goffioul@swing.be>
2021 * defaults.h.in, ls-hdf5.h, ov-complex.h, ov-cx-mat.h, ov-intx.h,
2022 sysdep.h: Sprinkle with OCTINTERP_API as needed.
2024 2007-06-05 John W. Eaton <jwe@octave.org>
2026 * help.h (raw_help): Tag with OCTINTERP_API.
2028 * Makefile.in (INCLUDES): Remove mxarray.h from the list so that
2029 it is not distributed.
2030 (EXTRAS): Add mxarray.h to the list so that it is installed.
2032 * sysdep.cc (same_file_internal) [OCTAVE_USE_WINDOWS_API]:
2033 Avoid leaking file handles.
2035 2007-05-08 Michael Weitzel <michael.weitzel@uni-siegen.de>
2037 * DLD-FUNCTIONS/symrcm.cc: Fix for queuing error that might cause
2040 2007-06-04 John W. Eaton <jwe@octave.org>
2042 * data.cc (Fislogical): Rename from Fisbool.
2043 Make isbool an alias for islogical.
2045 2007-06-03 David Bateman <dbateman@free.fr>
2047 * Makefile.in (DISTFILES): Add mxarray.h.in
2048 (install-inc): Modify target so that mxarray.h is installed
2050 (distclean): Remove mxarray.h on distclean.
2051 * mex.cc: Use mwSize for dimensions and mwIndex for indexing
2052 throughout, with the exception of struct key indexes.
2053 * mexproto.h: ditto.
2054 * mxarray.h: remove.
2055 * mxarray.h.in: Copy here and define mwSize, mwIndex, and use
2057 * ov-bool-mat.cc (octave_bool_matrix::as_mxArray): Use mwSize and
2059 * ov-bool-sparse (octave_sparse_bool_matrix::as_mxArray): ditto.
2060 * ov-cell.cc (octave_cell:as_mxArray): ditto.
2061 * ov-ch-mat.cc (octave_char_matrix:as_mxArray): ditto.
2062 * ov-cx-mat.cc (octave_complex_matrix::as_mxArray): ditto.
2063 * ov-cx-sparse.cc (octave_sparse_complex_matrix::as_mxArray): ditto.
2064 * ov-int.h (as_mxArray): ditto.
2065 * ov-range.cc (octave_range:as_mxArray): ditto.
2066 * ov-re-mat.cc (octave_matrix:as_mxArray): ditto.
2067 * ov-re-sparse.cc (octave_sparse_matrix::as_mxArray): ditto.
2068 * ov-struct.cc (octave_struct::as_mxArray): ditto.
2070 2007-06-02 David Bateman <dbateman@free.fr>
2072 * graphics.cc (color_property class): g++ doesn't like anonymous
2073 enums. Give type to color_type enum.
2075 2007-05-31 Shai Ayal <shaiay@users.sourceforge.net>
2077 * graphics.cc (radio_values, radio_property, color_values):
2079 (color_property class): Handle both color and radio values.
2081 2007-05-31 John W. Eaton <jwe@octave.org>
2083 * toplev.cc (main_loop): Improve bad_alloc error message.
2085 * octave.cc (execute_command_line_file, execute_eval_option_code):
2088 2007-05-31 Michael Goffioul <michael.goffioul@swing.be>
2090 * toplev.cc (octave_atexit_functions):
2091 Now std::list instead of std::stack.
2092 (do_octave_atexit): Adapte to octave_atexit_functions as list.
2093 (Fatexit): Allow second arg of false to remove element from list.
2095 * DLD-FUNCTIONS/symrcm.cc: Use ! instead of "not".
2097 * sysdep.cc (same_file_internal) [OCTAVE_USE_WINDOWS_API]:
2098 Use INVALID_HANDLE_VALUE, not INVALID_FILE_HANDLE.
2100 2007-05-28 G. D. McBain <geordie_mcbain@yahoo.com.au>
2102 * ov-list.cc (append): Doc fix.
2104 2007-05-28 John W. Eaton <jwe@octave.org>
2106 * pt-loop.cc (DO_ND_LOOP): Avoid parser problem with obsolete g++.
2108 2007-05-23 John W. Eaton <jwe@octave.org>
2110 * version.h (OCTAVE_VERSION): Now 2.9.12+.
2112 2007-05-23 John W. Eaton <jwe@octave.org>
2114 * version.h (OCTAVE_VERSION): Now 2.9.12.
2115 (OCTAVE_RELEASE_DATE): Now 2007-05-23.
2117 * parse.y (make_anon_fcn_handle): Don't build assignment expression.
2118 * ov-fcn-handle.cc (octave_fcn_handle::print_raw):
2119 Don't split assignment expression.
2120 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
2121 Special case for inline function body evaluation.
2123 2007-05-22 John W. Eaton <jwe@octave.org>
2125 * pt-fcn-handle.cc (tree_anon_fcn_handle::rvalue):
2126 Set current function as parent of anonymous function handle.
2128 * Makefile.in (uninstall): Also remove
2129 $(DESTDIR)$(octincludedir)/octave, $(DESTDIR)$(octincludedir),
2130 $(DESTDIR)$(octlibdir), and $(DESTDIR)$(octfiledir).
2132 2007-05-22 Thomas Weber <thomas.weber.mail@gmail.com>
2134 * debug.cc, error.cc, load-save.cc, oct-hist.cc, sighandlers.cc,
2135 symtab.cc: Fix typos.
2137 2007-05-22 John W. Eaton <jwe@octave.org>
2139 * version.h (OCTAVE_VERSION): Now 2.9.11+.
2141 2007-05-22 John W. Eaton <jwe@octave.org>
2143 * version.h (OCTAVE_VERSION): Now 2.9.11.
2144 (OCTAVE_API_VERSION): Now api-v24.
2145 (OCTAVE_RELEASE_DATE): Now 2007-05-22.
2147 2007-05-21 David Bateman <dbateman@free.fr>
2149 * debug.cc (Fdbstop): handle integer, vector and multiple line
2151 (Fdbclar): ditto. Eliminate extraneous debugging messages.
2153 2007-05-21 Søren Hauberg <hauberg@gmail.com>
2155 * load-path.cc (Fpath, Frehash): Replace "LOADPATH" with "load
2156 path" in doc strings.
2158 * parse.y (Feval): Add example.
2160 2007-05-21 David Bateman <dbateman@free.fr>
2162 * error.cc (rethrow_error): Use NULL name so that "error:" is not
2163 added to the message
2164 (Frethrow): Correctly treat empty stack.
2166 2007-05-21 John W. Eaton <jwe@octave.org>
2168 * oct-map.h (Octave_map::numel): Return number of array elements,
2169 not number of map elements.
2170 (Octave_map::nfields): Rename from length.
2171 (Octave_map::empty): Delete.
2172 Change all uses of empty to check nfields () == 0 instead.
2174 2007-05-21 Søren Hauberg <soren@hauberg.org>
2176 * help.cc (Fautoload): Doc fix.
2177 * variables.cc (Fiscommand): Doc fix.
2179 2007-05-19 David Bateman <dbatemna@free.fr>
2181 * ov-fcn-inline.cc (Fvectorize): Doc fix.
2183 2007-05-16 Søren Hauberg <soren@hauberg.org>
2185 * ov.cc (Fsubsref, Fsubsasgn): Doc fix.
2187 2007-05-16 John W. Eaton <jwe@octave.org>
2189 * load-path.h (load_path::sys_path): New static data member.
2190 (load_path::system_path): New static function.
2191 (load_path::do_system_path): New function.
2192 * load-path.cc (Vsystem_path): Delete.
2193 (load_path::do_initialize): Use sys_path, not Vsystem_path.
2194 (Fpathdef): Call load_path::system_path instead of using Vsystem_path.
2195 * ls-mat5.cc (read_mat5_binary_element): Likewise.
2196 * ov-fcn-handle.cc (octave_fcn_handle::set_fcn): Likewise.
2198 2007-05-16 David Bateman <dbateman@free.fr>
2200 * load_pathc.cc (std::string octave_system_path (void)): New
2202 * load-path.h (std::string octave_system_path (void)): Declare it.
2204 * load-save.cc (static load_save_format get_file_format
2205 (std::istream&, const std::string&)): Add filename argument, and
2206 pass it to read_mat5_binary_header. Use new format throughout file.
2207 (Fload): Don't allow gzip of matlab v7 files as the files
2208 themselves include compression.
2210 * ls-mat5.cc (arrayclsstype:MAT_FILE_WORKSPACE_CLASS): New class
2212 (read_mat5_binary_element): Workspaces, don't have dimensions, so
2213 don't read them. Implement read of matlab objects, but only use
2214 them for inline functions. Implement reading of function and
2216 (read_mat5_binary_header): Add filename argument. Read sub-system
2217 specific data block given as an offset in bytes 117 to 124.
2218 (save_mat5_binary_element): Include saving of inline functions.
2220 * ls-mat5.h (read_mat5_binary_header): Include filename.
2222 * ov-fcn-handle.cc (octave_fcn_handle_save_ascii,
2223 octave_fcn_handle::load_ascii, octave_fcn_handle::save_binary,
2224 octave_fcn_handle::load_binary, octave_fcn_handle::save_hdf5,
2225 octave_fcn_handle::load_hdf5): Save and reload the local symbol
2226 table of the user function associated with anonymous function
2227 handles. Save and load the absolute path and the exec_prefix for
2228 normal function handles and use then to find equivalent functions
2229 between different installations of Octave. Attempt to maintain
2230 backward and forward compatibility.
2231 (Ffunctions): Additional outputs, including the workspace of
2232 anonymous functions, and more compatiable outputs.
2234 * ov-fcn-handle.h (user_function_value): Expose the user function
2235 value of a function handle.
2237 * ov-fcn-inline.cc (Octave_map octave_fcn_inline::map_value
2238 (void) const): Return a structure compatiable with matlab's class
2239 implementation of inline functions.
2241 * ov-fcn-inline.h (map_value): Declare it.
2243 2007-05-14 Bob Weigel <rweigel@gmu.edu>
2245 * DLD-FUNCTIONS/svd.cc: Doc fix.
2247 2007-05-14 Thomas Weber <thomas.weber.mail@gmail.com>
2249 * DLD-FUNCTIONS/fft.cc (do_fft): Handle empty matrices. New tests.
2251 2007-05-14 Søren Hauberg <soren@hauberg.org>
2253 * toplev.cc (Fatexit): Simplify example in doc string.
2254 * help.cc (Flookfor): Doc fix.
2255 * DLD-FUNCTIONS/cellfun.cc (Fcellfun):
2256 Reformat to avoid long lines in doc string example.
2258 2007-05-13 Søren Hauberg <soren@hauberg.org>
2260 * toplev.cc (Fquit): Doc fix.
2261 * help.cc (Fhelp): Doc fix.
2262 * oct-hist.cc (Fsaving_history): Doc fix.
2264 2007-05-11 John W. Eaton <jwe@octave.org>
2266 * variables.cc (symbol_out_of_date):
2267 Always check for files that have gone missing.
2269 2007-05-08 Michael Weitzel <michael.weitzel@uni-siegen.de>
2271 * DLD-FUNCTIONS/symrcm.cc: New function for Reverse Cuthill-McKee
2274 2007-05-07 John W. Eaton <jwe@octave.org>
2276 * oct-map.cc (Octave_map::resize): Handle case of no keys.
2277 (keys_ok): Rename from equiv_keys. Return value is now status.
2278 Pass key names as string_vector reference arg.
2279 (Octave_map::assign (const octave_value_list&, const Octave_map&)):
2280 Call keys_ok, not equiv_keys. Handle case of no keys.
2282 2007-04-30 John W. Eaton <jwe@octave.org>
2284 * Makefile.in (%.df : %.cc): Use mv instead of
2285 $(simple-move-if-change-rule).
2287 2007-04-30 David Bateman <dbateman@free.fr>
2289 * pt-loop.cc (DO_ND_LOOP): New args, CONV and ARG.
2290 Use octave_idx_type instead of int for loop counters.
2291 Remove redundant assignments to variable "quit" as it is
2292 always defined in quit_loop_now.
2293 Special case rows = 0 and 1 cases in loops over arrays.
2294 Include some of the code that was separate from the macro
2295 DO_ND_LOOP in the macro itself
2296 (tree_simple_for_command::eval): USE DO_ND_LOOP for all loops.
2299 2007-04-30 John W. Eaton <jwe@octave.org>
2301 * mex.cc (mex::cleanup): Don't call unmark for elements of the set
2302 inside the loop. From Laurent Mazet <laurent.mazet@motorola.com>.
2304 2007-04-30 David Bateman <dbateman@free.fr>
2306 * OPERATORS/op-int-conv.cc: Define sq and dq string conversion
2307 operators. Delete old char_matrix_str conversions.
2308 * OPERATORS/op-int-conv.cc (install_int_conv_ops): Install them.
2310 2007-04-27 Benjamin Lindner <lindnerb@users.sourceforge.net>.
2312 * octave.cc (execute_startup_files): Call same_file to check for
2313 already executed init files.
2315 2007-04-27 John W. Eaton <jwe@octave.org>
2317 * sysdep.cc (same_file_internal): New function. POSIX code
2318 from same_file in utils.cc. Windows code from
2319 Benjamin Lindner <lindnerb@users.sourceforge.net>.
2320 Don't canonicalize file names.
2321 Also return false if stat calls fail.
2322 * sysdep.h: Provide decl.
2323 * utils.cc (same_file): Use same_file_internal.
2325 2007-04-27 David Bateman <dbateman@free.fr>
2327 * graphic.cc (get_property_form_handle, set_property_in_handle):
2329 * grahics.h: New file.
2330 * mex.cc (mexGet, mexSet): use the above to implement mexGet
2332 * Makefile.in (INCLUDES): Add graphics.h
2334 2007-04-26 John W. Eaton <jwe@octave.org>
2336 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
2337 Only deal with varargout if ret_list->takes_varargs () is true.
2339 2007-04-26 Søren Hauberg <soren@hauberg.org>
2341 * DLD-FUNCTIONS/urlwrite.cc: Doc fix.
2343 2007-04-26 David Bateman <dbateman@free.fr>
2345 * pt-loop.cc (tree_simple_for_command::eval (void)): Correct
2346 reshaping of dim_vector in for loop for multi-dimensional array.
2348 2007-04-26 John W. Eaton <jwe@octave.org>
2350 * load-save.cc (find_file_to_load): Only consider regular files.
2352 2007-04-24 Shai Ayal <shaiay@users.sourceforge.net>
2354 * graphics.cc (color_property): Eliminate alpha channel from RGB
2357 2007-04-23 Shai Ayal <shaiay@users.sourceforge.net>
2359 * src/graphics.cc (color_property::color_property):
2360 New arg A for alpha channel. Set rgba instead of red, green, blue.
2361 (color_property::color_property (char)): New constructor.
2362 (color_propery::rgba): New data member.
2363 (color_property::red, color_property::green, color_property::blue):
2365 (color_property::validate): Use rgba.
2366 (color_property::c2rgba): New function.
2368 2007-04-23 Søren Hauberg <soren@hauberg.org>
2370 * data.cc (Fsize_equal): Allow more than two arguments.
2372 2007-04-20 John W. Eaton <jwe@octave.org>
2374 * DLD-FUNCTIONS/__gnuplot_raw__.l (deftypefn):
2375 (Vautomatic_replot): Delete static variable.
2376 (Fautomatic_replot): Delete function.
2378 * toplev.cc (Fcasesen): Delete obsolete function.
2380 * DLD-FUNCTIONS/__gnuplot_raw__.l (gnuplot::makeplot): Check
2381 whether caller is "splot", not "gsplot".
2383 2007-04-19 John W. Eaton <jwe@octave.org>
2385 * lex.l (is_keyword_token): Delete all_va_args_kw switch case.
2386 * octave.gperf: Remove all_va_args_kw from the list.
2388 2007-04-19 Daniel J. Sebald <daniel.sebald@ieee.org>
2390 * syscalls.cc: Fix popen2 test to stop trying after 100 times
2393 2007-04-16 Geordie McBain <geordie.mcbain@aeromech.usyd.edu.au>
2395 * ov-fcn-inline.cc (Fargnames): Doc fix.
2397 2007-04-13 Geordie McBain <geordie.mcbain@aeromech.usyd.edu.au>
2399 * DLD-FUNCTIONS/find.cc (Ffind): Doc fix.
2401 2007-04-11 John W. Eaton <jwe@octave.org>
2403 * Makefile.in (DOCSTRINGS): Don't echo commands.
2404 (doc-files): Use mv, not $(simple-move-if-change-rule).
2406 * data.cc (Fnot, Fuplus, Fuminus, Ftranspose, Fctranspose, Fplus,
2407 Fminus, Fmtimes, Fmrdivide, Fmpower, Fmldivide, Flt, Fle, Feq,
2408 Fge, Fgt, Fne, Ftimes, Frdivide, Fpower, Fldivide, Fand, For):
2411 2007-04-09 John W. Eaton <jwe@octave.org>
2413 * graphics.cc (line::line_properties::markeredgecolor,
2414 line::line_properties::markerfacecolor): New properties.
2416 2007-04-06 John W. Eaton <jwe@octave.org>
2418 * data.cc (F__vnorm__): New function.
2420 * pt-fcn-handle.cc (tree_anon_fcn_handle::param_list,
2421 tree_anon_fcn_handle::cmd_list, tree_anon_fcn_handle::ret_list,
2422 tree_anon_fcn_handle::sym_tab): Delete. Remove all uses.
2423 (tree_anon_fcn_handle::fcn): New data member.
2424 (tree_anon_fcn_handle::tree_anon_fcn_handle): Initialize it.
2425 (tree_anon_fcn_handle::rvalue, tree_anon_fcn_handle::dup):
2426 Extract parameter list, return list, function body, and symbol
2428 (tree_anon_fcn_handle::parameter_list, tree_anon_fcn_handle::body):
2429 Forward request to fcn.
2431 * ov-usr-fcn.h (octave_user_function::local_sym_tab): Rename from
2432 sym_tab. Change all uses.
2433 (octave_user_function::sym_tab): New function.
2435 * octave.cc (execute_command_line_file):
2437 2007-04-05 David Bateman <dbateman@free.fr>
2439 * DLD-FUNCTIONS/regexp.cc (Fregexprep): Correct iteration over
2440 cell arrays so that the source and pattern are iterated seperately
2441 in the same manner as matlab.
2443 2007-04-05 Laurent Mazet <laurent.mazet@motorola.com>
2445 * mex.cc (mxArray_octave_value::get_string): Copy nel elements,
2446 not buflen elements.
2448 2007-04-05 John W. Eaton <jwe@octave.org>
2450 * oct-stream.cc (DO_DOUBLE_CONV): New macro.
2451 (do_printf): Use it.
2453 2007-04-04 John W. Eaton <jwe@octave.org>
2455 * input.cc (octave_yes_or_no): Force interactive_input to use readline.
2457 * octave.cc (execute_eval_option_code): Catch bad::alloc here.
2459 2007-04-03 John W. Eaton <jwe@octave.org>
2461 * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread):
2462 Use && for logical, not &.
2464 * DLD-FUNCTIONS/qr.cc (Fqr): Clarify nargin check.
2466 * error.cc (Frethrow): Add braces to avoid ambiguous if/else.
2467 * oct-stream.cc (octave_scan<>): Likewise.
2468 * DLD-FUNCTIONS/colamd.cc (Fetree): Likewise.
2469 * DLD-FUNCTIONS/sort.cc (mx_sort, mx_sort_indexed): Likewise.
2471 * ov-fcn-handle.cc (make_fcn_handle): Pass ultimate parent
2472 function name to lookup_function.
2474 2007-03-29 John W. Eaton <jwe@octave.org>
2476 * DLD-FUNCTIONS/filter.cc (filter): Fix typo in doc string.
2477 From Utkarsh Upadhyay <musically.ut@gmail.com>.
2479 2007-03-28 Rafael Laboissiere <rafael@debian.org>
2481 * DLD-FUNCTIONS/__glpk__.cc: Fix #ifdef logic around GLPK_PRE_4_14.
2483 2007-03-27 John W. Eaton <jwe@octave.org>
2485 * version.h (OCTAVE_VERSION): Now 2.9.10+
2487 2007-03-27 John W. Eaton <jwe@octave.org>
2489 * version.h (OCTAVE_VERSION): Now 2.9.10.
2490 (OCTAVE_API_VERSION): Now api-v23.
2491 (OCTAVE_RELEASE_DATE): Now 2007-03-27.
2493 * version.h (OCTAVE_COPYRIGHT): Update for 2007. Add "and others".
2494 (X_OCTAVE_WARRANTY_STATEMENT): Rename from OCTAVE_WARRANTY_STATEMENT.
2496 (OCTAVE_WARRANTY_STATEMENT): Define using X_OCTAVE_WARRANTY_STATEMENT.
2497 (OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY): Define using
2498 X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY.
2499 (X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY): Rename
2500 from OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY.
2501 Accept arg and pass to X_OCTAVE_WARRANTY_STATEMENT.
2502 (OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY): Pass empty
2503 arg to X_OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS.
2504 (OCTAVE_STARTUP_MESSAGE): Put info about news last.
2506 2007-03-27 John W. Eaton <jwe@octave.org>
2508 * Makefile.in (dist, conf-dist): Use ln, not $(LN_S).
2510 2007-03-26 Juhani Saastamoinen <juhani@cs.joensuu.fi>
2512 * file-io.cc (do_stream_open) [! HAVE_ZLIB]:
2513 Call fopen with mode, not tmode.
2515 2007-03-26 John W. Eaton <jwe@octave.org>
2517 * OPERATORS/op-str-str.cc (DEFCHARNDBINOP): New macro. Use it to
2518 define functions for eq and ne ops. Also define lt, le, ge, and
2521 2007-03-23 David Bateman <dbateman@free.fr>
2523 * DLD-FUNCTIONS/rand.cc: Make more statistical tests optional.
2525 2007-03-23 John W. Eaton <jwe@octave.org>
2527 * bitfcns.cc (Fbitshift): Error if third argument is not a scalar.
2529 2007-03-23 David Bateman <dbateman@free.fr>
2531 * DLD-FUNCTIONS/rand.cc: Make statistical tests optional and
2532 add tests for fixed sequences.
2534 2007-03-22 John W. Eaton <jwe@octave.org>
2536 * graphics.cc (base_graphics_object::mark_modified):
2537 New virtual function.
2538 (base_properties::__modified__): New data member.
2539 (base_properties::base_properties): Initialize it.
2540 (graphics_object::mark_modified, base_properties::mark_modified,
2541 root_figure::mark_modified, figure::mark_modified,
2542 axes::mark_modified, line::mark_modified, text::mark_modified,
2543 image::mark_modified, surface::mark_modified,
2544 root_figure::root_figure_properties::mark_modified,
2545 figure::figure_properties::mark_modified,
2546 axes::axes_properties::mark_modified,
2547 line::line_properties::mark_modified,
2548 text::text_properties::mark_modified,
2549 image::image_properties::mark_modified,
2550 surface::surface_properties::mark_modified): New functions.
2551 (figure::figure_properties::set, figure::figure_properties::get,
2552 axes::axes_properties::set, axes::axes_properties::get,
2553 line::line_properties::set, line::line_properties::get,
2554 text::text_properties::set, text::text_properties::get,
2555 image::image_properties::set, image::image_properties::get,
2556 surface::surface_properties::set, surface::surface_properties::get):
2557 Handle __modified__ property.
2559 * parse.y (Fautoload): Use warning_with_id.
2561 2007-03-21 John W. Eaton <jwe@octave.org>
2563 * DLD-FUNCTIONS/__qp__.cc (ABS): Delete. Use std::abs instead.
2564 (null): Set elements of retval with magnitudes less than eps to 0.
2566 * error.cc (Fwarning): Allow setting options with struct.
2567 If setting options, return previous state.
2569 * graphics.cc (axes::axes_properties::set_defaults): Reverse sense
2570 of mode test for setting outerposition property.
2571 (figure::figure_properties::set): If setting visible property,
2572 make this figure the current figure.
2573 (gh_manager::figure_handle_list, gh_manager::do_figure_handle_list):
2575 (F__go_figure_handles__): New function.
2577 * sysdep.cc (Fpause): Also call drawnow if nargin == 0.
2578 (Fkbhit, Fsleep, Fusleep): Also call drawnow here.
2580 2007-03-20 David Bateman <dbateman@free.fr>
2582 * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Correct for shape of return
2583 matrix for the case of UniformOutput being true.
2585 2007-03-20 John W. Eaton <jwe@octave.org>
2587 * sysdep.cc (Fpause): Call drawnow.
2589 2007-03-15 John W. Eaton <jwe@octave.org>
2591 * variables.cc (F__lock_global__): Delete.
2593 2007-03-14 John W. Eaton <jwe@octave.org>
2595 * graphics.cc: New file.
2596 * Makefile.in (DIST_SRC): Add it to the list.
2598 2007-03-13 John W. Eaton <jwe@octave.org>
2600 * file-io.cc (do_stream_open): Use binary mode if 't' is not
2601 specified in mode, but don't add 'b' if it is already present.
2603 2007-03-09 David Bateman <dbateman@free.fr>
2605 * data.cc (do_cat): Also treat case of all empty matrices.
2607 2007-03-08 John W. Eaton <jwe@octave.org>
2609 * mex.cc (mxArray_octave_value::set_dimensions,
2610 mxArray_octave_value::set_m, mxArray_octave_value::set_n,
2611 mxArray_octave_value::set_class_name,
2612 mxArray_octave_value::set_ir, mxArray_octave_value::set_jc,
2613 mxArray_octave_value::remove_field,
2614 mxArray_octave_value::set_field_by_number):
2615 Don't panic; request mutation instead.
2616 (class mxArray_octave_value):
2618 * mxarray.h (mxArray::set_m, mxArray::set_n,
2619 mxArray::set_dimensions): Wrap method call call with
2620 DO_VOID_MUTABLE_METHOD.
2622 2007-03-08 David Bateman <dbateman@free.fr>
2624 * data.cc (do_cat): Ignore leading empty matrices.
2626 2007-03-07 Bob Weigel <rweigel@gmu.edu>
2628 * urlwrite.cc (urlget): Allow URL redirects.
2630 2007-03-05 David Bateman <dbateman@free.fr>
2632 * DLD-FUNCTIONS/md5sum.cc (Fmd5sum): Treat both files and strings.
2634 2007-03-05 John W. Eaton <jwe@octave.org>
2636 * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Check GLPK_PRE_4_14, not
2639 2007-03-02 John W. Eaton <jwe@octave.org>
2641 * parse.y (Fautoload): Undo previous change.
2642 Warn if FILE is not an absolute file name.
2644 * utils.cc (make_absolute): Make copy of arg before
2646 2007-03-01 John W. Eaton <jwe@octave.org>
2648 * ov-base-mat.h (octave_base_matrix::octave_base_matrix (const MT&),
2649 (octave_base_matrix::octave_base_matrix (const MT&, const MatrixType&)):
2650 Use common definition with default argument value.
2651 * ov-base-scalar.h (octave_base_scalar<T>::typ): New data member.
2652 Initialize in constructors.
2653 (octave_base_scalar<T>::matrix_type): New funtions.
2655 2007-03-01 David Bateman <dbateman@free.fr>
2657 * DLD-FUNCTIONS/md5sum.cc: New file.
2658 * Makefile.in (DLD_XSRC): Add md5sum.cc
2660 2007-03-01 Olli Saarela <Olli.Saarela@kcl.fi>
2662 * input.cc (FPS1): Fix @seealso.
2664 2007-03-01 David Bateman <dbateman@free.fr>
2666 * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Special case scalar
2667 types and always return "Full" matrix type.
2669 2007-02-28 John W. Eaton <jwe@octave.org>
2671 * input.cc (interactive_input): Also call flush_octave_stdout
2672 after calling drawnow.
2674 2007-02-27 John W. Eaton <jwe@octave.org>
2676 * Makefile.in (uninstall): Also remove octave-$(version)$(EXEEXT),
2677 oct-gperf.h, and all .oct files. Remove PKG_ADD.
2678 From Thomas Treichl <Thomas.Treichl@gmx.net>.
2680 * load-path.h, (load_path::initialize, load_path::do_initialize):
2681 New arg, set_initial_path.
2682 * load-path.cc (load_path::do_initialize): Don't add system
2683 directories to apth if set_initial_path is false.
2684 * octave.cc (set_initial_path): New static variable.
2685 (NO_INITIAL_PATH_OPTION): New define.
2686 (usage_string): Include --no-initial-path in message.
2687 (long_opts): Include no-initial-path/NO_INITIAL_PATH_OPTION here.
2688 (octave_main): Handle NO_INITIAL_PATH_OPTION.
2689 Pass set_initial_path to load_path::initialize.
2691 * parse.y (Fautoload): Warn about duplicate entries. Only insert
2694 2007-02-27 David Bateman <dbateman@free.fr>
2696 * error.cc (Vlast_error_file, Vlast_erro_name, Vlast_error_row,
2697 Vlast_error_column): New static variables.
2698 (verror): Use them to store the location of last error.
2699 (rethrow_error, Frethrow, Flasterror): New functions.
2701 * DLD-FUNCTIONS/regexp.cc (octcellregexp): Wrapper to octregexp
2702 function for cases when string or pattern are cell arrays
2703 (Fregexp, Fregexpi): Use them.
2704 (octregexprep): New function with functionality of old Fregexprep.
2705 (Fregexprep): Treat cell arguments.
2707 2007-02-26 Michael Goffioul <michael.goffioul@swing.be>
2709 * Makefile.in: Use $(LN_S) instead of ln or ln -s.
2711 * DLD-FUNCTIONS/getrusage.cc: Undef min after including windows.h.
2713 2007-02-25 John W. Eaton <jwe@octave.org>
2715 * DLD-FUNCTIONS/interpn.cc: Include dNDArray.h, not dMatrix.cc.
2717 * error.h: Include cstdarg.
2718 From Juhani Saastamoinen <juhani@cs.joensuu.fi>.
2720 2007-02-23 John W. Eaton <jwe@octave.org>
2722 * variables.cc (lookup_function): Don't dereference NULL
2723 curr_parent_fucntion pointer.
2724 * ov-fcn-handle.cc (make_fcn_handle): Call lookup_function with
2725 parent set to empty string if call_stack is empty.
2727 * DLD-FUNCTIONS/dispatch.cc (Fbuiltin): Also adjust argument list
2728 in calls to functions that are not overloaded. Call
2729 lookup_by_name to find function instead of searching fbi_symtab
2732 * help.cc (do_which): Return empty string if file not found.
2734 2007-02-22 John W. Eaton <jwe@octave.org>
2736 * mex.cc (mxArray_cell::mxArray_cell (const mxArray_cell&),
2737 mxArray_struct::mxArray_struct (const mxArray_struct&)):
2738 Avoid calling clone on 0 elements.
2740 * variables.cc (symbol_out_of_date): If checking nested function,
2741 look for file using parent function name. Delete unused
2744 * src/oct-stream.cc (octave_stream::do_gets): If no limit or not
2745 at limit, read ahead one character at end of line for compatibility.
2746 (octave_stream::gets, octave_stream::getl): Set max_len to -1 if
2747 tc_max_len is not defined.
2748 * file-io.cc (Ffgets, Ffgetl): If no limit specified, pass
2749 undefined octave_value object as max_len in call to
2750 octave_stream::gets.
2752 2007-02-21 John W. Eaton <jwe@octave.org>
2754 * mex.cc (mexErrMsgIdAndTxt, mexWarnMsgIdAndTxt): Handle second
2755 arg as format and accept variable number of arguments.
2756 * mexproto.h: Fix decls.
2758 * error.h, error.cc (vmessage, vusage, vwarning, verror,
2759 vparse_error, vmessage_with_id, vusage_with_id, vwarning_with_id,
2760 verror_with_id, vparse_error_with_id): Provide va_list versions of
2761 variadic error, warning, and message functions.
2762 (message, usage, warning, error, parse_error, message_with_id,
2763 usage_with_id, warning_with_id, error_with_id,
2764 parse_error_with_id): Call va_list versions.
2766 * DLD-FUNCTIONS/urlwrite.cc (Furlwrite, Furlread): Return error
2767 code and message instead of throwing error if functionality is
2770 * oct-obj.h (octave_value_list::splice): Set default for
2771 replacement list argument.
2773 2007-02-20 Rafael Laboissiere <rafael@laboissiere.net>
2775 * DLD-FUNCTIONS/__glpk__.cc: Adapt code for changes in the GLPK
2776 API for version 4.15 or later.
2778 2007-02-20 John W. Eaton <jwe@octave.org>
2780 * mxarray.h (mxArray::get_scalar): New function.
2781 * mex.cc (mxArray_base::get_scalar): New pure virtual function.
2782 (mxArray_octave_value::get_scalar, mxArray_matlab::get_scalar,
2783 mxArray_number::get_scalar): New functions.
2784 (mxGetScalar): Call get_scalar here.
2786 * mex.cc (mxArray_octave_value::get_dimensions): Cache ndims here.
2787 (mxArray_octave_value::get_number_of_dimensions):
2788 Call get_dimensions here to cache both ndims and dims.
2790 2007-02-17 John W. Eaton <jwe@octave.org>
2792 * variables.cc (symbol_out_of_date): Don't exit early if looking
2795 2007-02-16 John W. Eaton <jwe@octave.org>
2797 * dynamic-ld.cc (octave_dynamic_loader::do_load_oct): Clear
2798 function if original was loaded from relative path and the name
2799 can no longer be found in path. Mark files found from relative
2801 (clear): Only warn if there is more than one function to clear.
2803 * variables.cc (symbol_out_of_date): Don't ignore return value in
2804 call to octave_env::make_absolute.
2805 (symbol_out_of_date): Clear symbol if original was loaded from
2806 relative path and name can no longer be found in path.
2808 * dynamic-ld.cc (octave_dynamic_loader::do_load_oct):
2809 Also check whether new file is same as the old file.
2811 * utils.cc (same_file): Move here from variables.cc.
2812 * utils.h: (same_file): Provide decl.
2814 * parse.y (frob_function): Stash parent function name if parsing
2817 * ov-fcn-handle.cc (make_fcn_handle): Pass current function name
2818 as parent in call to lookup_function.
2820 * ov-fcn.h (octave_function::parent_fcn_name): New virtual function.
2822 * ov-usr-fcn.h (octave_user_function::parent_name): New data member.
2823 (octave_user_function::stash_parent_function_name,
2824 octave_user_function::parent_function_name): New methods.
2825 * ov-usr-fcn.cc (octave_user_function::octave_user_function):
2826 Initialize parent_name.
2828 * variables.h, variables.cc (lookup_function): New arg, parent.
2829 If not empty, try this first for lookup.
2831 * dynamic-ld.cc (octave_dynamic_loader::do_load_mex): If doing
2832 path lookup, check relative status. Pass relative to oct_file_in_path.
2833 (octave_dynamic_loader::do_load_mex): Likewise, for mex_file_in_path
2835 * defun-int.h, defun.cc (install_mex_function): New arg, relative.
2836 (install_dld_function): Likewise.
2837 (octave_dld_fcn_installer): Likewise.
2838 (DEFINE_FUNX_INSTALLER_FUN3): Pass relative to install_dld_function.
2840 * dynamic-ld.h (octave_dynamic_loader::load_oct,
2841 octave_dynamic_loader::load_mex,
2842 octave_dynamic_loader::do_load_oct
2843 octave_dynamic_loader::do_load_mex): New arg, relative.
2845 * dirfns.h (Vcurrent_directory): Delete unused variable.
2847 * variables.cc (symbol_out_of_date): Also compare function time
2848 stamp to Vlast_chdir_time if function is from relative lookup.
2850 * dirfns.cc (Vlast_chdir_time): New variable.
2851 (octave_change_to_directory): Update it if chdir succeeds.
2852 * dirfns.h (Vlast_chdir_time): Provide decl.
2854 * ov-fcn.h (octave_function::relative): New data member.
2855 (octave_function::mark_relative, octave_function::is_relative):
2858 * parse.y (fcn_file_from_relative_lookup): New static variable.
2859 (load_fcn_from_file): Note whether function file was found from
2860 relative path element.
2861 (frob_function): Maybe mark function as relative.
2863 * parse.y (lookup_autoload): Don't call octave_env::make_absolute
2865 * variables.cc (symbol_out_of_date): Make name absolute after call
2868 * input.cc (interactive_input): New arg, DEBUG. Don't call
2869 drawnow if debugging.
2870 (get_user_input): Pass DEBUG to interactive_input.
2872 2007-02-16 Michael Goffioul <michael.goffioul@swing.be>
2874 * syscalls.cc (Fpopen2): New function.
2875 (pipe): Modify to return input and output file descriptor
2876 seperately rather than in a list.
2878 2007-02-16 Muthiah Annamalai <muthuspost@gmail.com>
2880 * debug.cc (Fdbtype): Improve compatibility.
2882 2007-02-16 John W. Eaton <jwe@octave.org>
2884 * toplev.cc (wait_for_input): New function.
2885 (run_command_and_return_output): Use it instead of napping.
2887 * oct-procbuf.h (octave_procbuf::pid): Now const.
2888 * procstream.h (procstreambase::pid): Now const.
2889 (procstreambase::file_number): New function.
2891 2007-02-15 John W. Eaton <jwe@octave.org>
2893 * mxarray.h (mxChar): Use char instead of unsigned short.
2895 * toplev.cc (Foctave_config_info): Remove
2896 OCTAVE_CONF_MKOCTFILE_INCFLAGS and OCTAVE_CONF_MKOCTFILE_LFLAGS
2898 * oct-conf.h.in (OCTAVE_CONF_MKOCTFILE_INCFLAGS,
2899 OCTAVE_CONF_MKOCTFILE_LFLAGS): Don't define.
2900 (OCTAVE_CONF_INCLUDEDIR, OCTAVE_CONF_OCTINCLUDEDIR,
2901 OCTAVE_CONF_OCTLIBDIR, OCTAVE_CONF_PREFIX): New definitions.
2903 2007-02-14 Alexander Barth <abarth@marine.usf.edu>
2905 * DLD-FUNCTIONS/interpn.cc: New file.
2906 * Makefile.in (DLD_XSRC): Add it to the list.
2908 2007-02-14 John W. Eaton <jwe@octave.org>
2910 * input.cc (interactive_input): Check error_state after call to feval.
2912 2007-02-10 John W. Eaton <jwe@octave.org>
2914 * oct-stream.cc (octave_stream::rewind): Call seek (0, SEEK_SET)
2915 instead of rep->rewind.
2916 (octave_base_stream::rewind): Delete Function.
2917 * oct-stream.h (octave_base_stream::rewind): Delete decl.
2919 2007-02-09 John W. Eaton <jwe@octave.org>
2921 * ls-mat5.cc (PAD): Adjust to change in write_mat5_tag.
2922 (TAGLENGTH): Delete unused macro.
2924 * ov-struct.cc (octave_struct::load_ascii,
2925 octave_struct::load_binary, octave_struct::load_hdf5):
2926 Delete obsolete attempt at backward compatibility.
2928 * ls-mat5.cc (read_mat5_binary_element): Don't attempt to read
2929 fieldnames if there are no fields.
2930 (write_mat5_tag): Don't use small data element format if bytes == 0.
2932 * ls-mat5.cc (read_mat5_binary_element): Always create a structure
2933 that is at least 1x1.
2934 * ov-struct.cc (octave_struct::load_ascii,
2935 octave_struct::load_binary, octave_struct::load_hdf5): Likewise.
2937 2007-02-08 Michael Goffioul <michael.goffioul@swing.be>
2939 * DLD-FUNCTIONS/__glpk__.cc: Include glplib.h if glpk.h does not.
2940 Provide definitions for lib_set_fault_hook and lib_set_print_hook
2941 if they are not defined.
2943 2007-02-07 John W. Eaton <jwe@octave.org>
2945 * defaults.cc (subst_octave_home):
2946 Only substitute at beginning of string.
2948 * ls-hdf5.cc (save_hdf5_empty): Use OCTAVE_LOCAL_BUFFER.
2949 * ov-bool-mat.cc (octave_bool_matrix::save_hdf5,
2950 octave_bool_matrix::load_hdf5): Likewise.
2951 * ov-bool-sparse.cc (octave_sparse_bool_matrix::save_hdf5,
2952 octave_sparse_bool_matrix::load_hdf5): Likewise.
2954 2007-02-07 Michael Goffioul <michael.goffioul@swing.be>
2956 * ov-cell.cc (octave_cell::save_hdf5): Correct test for H5Dwrite
2959 2007-02-07 John W. Eaton <jwe@octave.org>
2961 * zfstream.cc (gzfilebuf::open_mode): Always append "b" to c_mode.
2963 * toplev.cc (Foctave_config_info): Use struct for conf_info.
2964 Call subst_octave_home on selected values when initializing map.
2965 * defaults.cc (subst_octave_home): Now extern.
2966 * defaults.h.in: Provide decl.
2968 2007-02-05 John W. Eaton <jwe@octave.org>
2970 * mex.cc (mxArray_number::as_octave_value): Fake mxSINGLE_CLASS
2971 by returning double-precision values.
2972 (mxArray_sparse::as_octave_value): Clarify error message.
2974 * ov-complex.h (octave_complex): Use std instead of OCTAVE_STD
2975 since the latter was unconditionally defined to be std anyway.
2977 2007-02-05 Michael Goffioul <michael.goffioul@swing.be>
2979 * ov-complex.h: Tag octave_complex class with OCTINTERP_API.
2981 2007-01-30 John W. Eaton <jwe@octave.org>
2983 * Merge of changes from graphics-branch:
2985 2007-01-26 John W. Eaton <jwe@octave.org>
2987 * DLD-FUNCTIONS/__contourc__.cc: New function.
2988 * Makefile.in (DLD_XSRC): Add it to the list.
2990 2007-01-25 John W. Eaton <jwe@octave.org>
2992 * input.cc (Vdrawnow_requested): New static variable.
2993 (F__request_drawnow__): New function.
2994 (interactive_input): New function. Update Vlast_prompt_time here.
2995 (octave_gets, get_user_input, octave_yes_or_no):
2996 Call interactive_input instead of gnu_readline.
2998 * symtab.h (symbol_record::eternal): New data member.
2999 (symbol_record::symbol_record): Initialize it.
3000 (symbol_record::make_eternal, symbol_record::is_eternal):
3001 Don't forward to symbol_def functions.
3002 (symbol_record::symbol_def::make_eternal,
3003 symbol_record::symbol_def::is_eternal): Delete.
3004 (symbol_record::symbol_def::eternal): Delete data member.
3005 (symbol_record::symbol_def::symbol_def): Delete initialization.
3007 * pt-id.cc (tree_identifier::link_to_global): Include variable
3008 name in warning message.
3010 * variables.cc (F__lock_global__): New function.
3012 2007-01-11 John W. Eaton <jwe@octave.org>
3014 * ls-oct-ascii.cc (save_ascii_data_for_plotting, save_three_d):
3015 Set precision to 6 instead of 4.
3017 2007-01-29 David Bateman <dbateman@free.fr>
3019 * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): Don't panic if
3020 nargout is greater than 3.
3022 2007-01-24 John W. Eaton <jwe@octave.org>
3024 * pt-assgn.cc (former_built_in_variables): New static data.
3025 (maybe_warn_former_built_in_variable): New static function.
3026 (tree_simple_assignment::tree_simple_assignment,
3027 tree_multi_assignment::tree_multi_assignment):
3028 Move definition here from pt-assign.h
3029 Maybe warn about assignment to obsolete built-in variables.
3031 * version.h (OCTAVE_STARTUP_MESSAGE): Mention "news" function.
3033 * pt-stmt.cc (tree_statement::eval): Use dynamic_cast, not
3036 * help.cc (help_from_file): Show .oct or .mex file name if one
3037 exists in the same directory as the .m file.
3039 2007-01-23 Luis F. Ortiz <lortiz@interactivesupercomputing.com>
3041 * strfns.cc (Fstrncmp): New function.
3043 2007-01-17 John W. Eaton <jwe@octave.org>
3045 * help.cc (help_from_file, help_from_symbol_table, help_from_list):
3046 Rewrite using raw_ versions.
3048 2007-01-17 David Bateman <dbateman@free.fr>
3050 * help.cc (raw_help, raw_help_from_file,
3051 raw_help_from_symbol_table, raw_help_from_list): New functions.
3052 * help.h (raw_help): Provide decl.
3054 2007-01-16 John W. Eaton <jwe@octave.org>
3056 * DLD-FUNCTIONS/__pchip_deriv__.cc: Fix dpchim decl for --enable-64.
3057 (F__pchip_deriv__): Fix call to dpchim for --enable-64.
3059 * DLD-FUNCTIONS/fftw.cc: Delete decl for fftw_planner.
3061 2007-01-11 Michael Goffioul <michael.goffioul@swing.be>
3063 * load-path.h (class load_path): Tag with OCTINTERP_API.
3065 * ls-oct-binary.cc (read_binary_data): Use unsigned char, not
3066 char, for reading flags and data types.
3068 2007-01-10 Luis F. Ortiz <lortiz@interactivesupercomputing.com>
3070 * parse.y (load_fcn_from_file): Delete unused variable NAMES.
3071 If NM is absolute, strip directory and extension parts.
3073 2007-01-10 Michael Goffioul <michael.goffioul@swing.be>
3075 * DLD-FUNCTIONS/getrusage.cc: Use #ifdef __WIN32__, not __MINGW32__.
3077 2007-01-10 John W. Eaton <jwe@octave.org>
3079 * parse.y (load_fcn_from_file): Only compare last two characters
3080 when looking for ".m".
3082 2007-01-06 John W. Eaton <jwe@octave.org>
3084 * version.h (OCTAVE_CONFIG_STATEMENT): New macro
3085 (OCTAVE_NAME_AND_VERSION): Remove config info.
3086 (OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_AND_WARRANTY):
3087 Use OCTAVE_CONFIG_STATEMENT here.
3089 2007-01-05 David Bateman <dbateman@free.fr>
3091 * Makefile.in (DLD_XSRC): Add fftw.cc and remove fftw_wisdom.cc
3092 * DLD-FUNCTIONS/fftw.cc: New file.
3093 * DLD-FUNCTIONS/fftw_wisdom.cc: Delete.
3094 * defaults.cc (Vfftw_wisdom_program): Delete variable.
3095 (set_default_fftw_wisdom_prog): Delete function that sets it.
3096 (install_defaults): Delete set_default_fftw_prog from defaults.
3097 (Ffftw_wisdom_program): Delete.
3099 2007-01-04 David Bateman <dbateman@free.fr>
3101 * ov-fcn-handle.cc (octave_fcn_handle::load_ascii,
3102 octave_fcn_handle::load_binary):
3103 Throw error if handle can't be created.
3105 2007-01-04 Luis F. Ortiz <lortiz@interactivesupercomputing.com>
3107 * mex.cc (mxArray_number::mxArray_number (int, const char **)):
3108 Correctly index LHS in assignment.
3110 2007-01-03 John W. Eaton <jwe@octave.org>
3112 * data.cc (Fisinteger): New function.
3113 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::is_integer_type,
3114 OCTAVE_VALUE_INT_SCALAR_T::is_integer_type): New function.
3115 * ov.h (octave_value::is_integer_type): New function.
3116 * ov-base.h (octave_base_value::is_integer_type): New virtual function.
3118 2007-01-03 Michael Goffioul <michael.goffioul@swing.be>
3120 * toplev.cc (Fsystem): Handle async calls on Windows systems.
3122 2007-01-03 David Bateman <dbateman@free.fr>
3124 * (OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc,
3125 OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc,
3126 OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc,
3127 OPERATORS/op-scm-cm.cc, OPERATORS/op-scm-cs.cc,
3128 OPERATORS/op-scm-m.cc, OPERATORS/op-scm-s.cc,
3129 OPERATORS/op-scm-scm.cc, OPERATORS/op-scm-sm.cc,
3130 OPERATORS/op-sm-cm.cc, OPERATORS/op-sm-cs.cc,
3131 OPERATORS/op-sm-m.cc, OPERATORS/op-sm-s.cc,
3132 OPERATORS/op-sm-scm.cc, OPERATORS/op-sm-sm.cc,
3133 OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc):
3134 Modify div and ldiv functions so that scalars stored as sparse
3135 matrices are special cased.
3137 * ov-re-sparse.cc (double_value, complex_value): Scalar can be
3138 stored as a sparse matrix and so don't warn on implicit conversion
3140 * ov-cx-sparse.cc (double_value, complex_value): ditto.
3141 * ov-bool-sparse.cc (double_value, complex_value): ditto.
3143 2007-01-03 John W. Eaton <jwe@octave.org>
3145 * dynamic-ld.cc (octave_dynamic_loader::do_load_mex): Also check
3148 2006-12-30 John W. Eaton <jwe@octave.org>
3150 * ov-fcn-inline.cc: For compatibility, class id is
3151 "function_handle", not "inline function".
3153 2006-12-27 John W. Eaton <jwe@octave.org>
3155 * Makefile.in (%.df : %.cc): Insert a "do not edit" notice in the
3158 * mex.cc (mxArray_matlab::get_class_name,
3159 mxArray_octave_value::get_class_id): Use "function_handle", not
3162 2006-12-14 John W. Eaton <jwe@octave.org>
3164 * pt-decl.cc (tree_decl_elt::eval): New function.
3165 * pt-decl.h (tree_decl_elt::eval): Provide decl.
3166 (tree_decl_elt::is_defined, tree_decl_elt::lvalue_ok,
3167 tree_decl_elt::mark_as_formal_parameter, tree_decl_elt::rvalue,
3168 tree_decl_elt::lvalue): New functions.
3170 * pt-misc.h (class tree_parameter_list): Derive from
3171 octave_base_list<tree_decl_elt *> instead of
3172 octave_base_list<tree_identifier *>.
3173 (tree_parameter_list::tree_parameter_list (tree_identifier *)): Delete.
3174 (tree_parameter_list::tree_parameter_list (tree_decl_elt *)):
3176 * pt-misc.cc (tree_parameter_list::mark_as_formal_parameters,
3177 tree_parameter_list::initialize_undefined_elements,
3178 tree_parameter_list::undefine, tree_parameter_list::dup,
3179 tree_parameter_list::convert_to_const_vector,
3180 tree_parameter_list::is_defined): Handle argument list elements
3181 as tree_decl_list objects instead of tree_identifier objects.
3182 (tree_parameter_list::define_from_arg_vector): Likewise.
3183 Always process entire list, setting default values if possible.
3184 Accept ":" to mean "use default argument".
3186 * parse.y (param_list2): Use decl2 to recognize
3187 "identifier '=' expression" in addition to "identifier".
3189 * parse.y (return_list1, make_anon_fcn_handle, finish_function):
3190 Adapt to new definition of tree_parameter_list.
3191 * pt-bp.cc (tree_breakpoint::visit_parameter_list): Likewise.
3192 * pt-check.cc (tree_checker::visit_parameter_list): Likewise.
3193 * pt-pr-code.cc (tree_print_code::visit_parameter_list): Likewise.
3195 2006-12-08 John W. Eaton <jwe@octave.org>
3197 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::array_value,
3198 OCTAVE_VALUE_INT_MATRIX_T::complex_array_value,
3199 OCTAVE_VALUE_INT_MATRIX_T::bool_array_value,
3200 OCTAVE_VALUE_INT_MATRIX_T::char_array_value):
3201 Use fortran_vec to avoid expensive indexing operator.
3203 2006-12-08 David Bateman <dbateman@free.fr>
3205 * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::matrix_value,
3206 OCTAVE_VALUE_INT_SCALAR_T::complex_matrix_value,
3207 OCTAVE_VALUE_INT_MATRIX_T::matrix_value,
3208 OCTAVE_VALUE_INT_MATRIX_T::comlex_matrix_value): New functions.
3209 (OCTAVE_VALUE_INT_MATRIX_T::array_value,
3210 OCTAVE_VALUE_INT_MATRIX_T::comlex_array_value):
3211 Use octave_idx_type instead of int for indexing.
3213 2006-12-04 David Bateman <dbateman@free.fr>
3215 * xpow.cc (xpow (const Matrix&, double)): Add matrix type probing
3217 (xpow (const ComplexMatrix&, double)): ditto.
3218 * DLD-FUNCTIONS/inv.cc (Finv): Add matrix type probing.
3220 2006-12-06 John W. Eaton <jwe@octave.org>
3222 * sysdep.cc: Include "Cell.h" here.
3223 * input.h: Include "oct-obj.h", not "ov-list.h".
3225 2006-12-06 Michael Goffioul <michael.goffioul@swing.be>
3227 * mappers.cc (install_mapper_functions): Undefine isascii before
3228 the DEFUN_MAPPER for it.
3230 * input.cc (get_user_input): Prevent out of bounds array access
3231 when checking for EOL.
3233 2006-12-05 John W. Eaton <jwe@octave.org>
3235 * ls-oct-ascii.cc (extract_keyword): If no match and looking for
3236 more, skip to end of line before trying another match.
3238 * pt-mat.cc (tm_row_const::empty): New function.
3239 (tm_const::init): Don't append anything if tmp tm_row_const object
3241 (tree_matrix::rvalue): Default return value is Matrix().
3242 Don't do anything if tmp tm_const object is empty.
3244 * dirfns.cc (Fmkdir): Fix thinko in previous change.
3246 2006-12-05 Paul Kienzle <pkienzle@users.sf.net>
3248 * DLD-FUNCTIONS/rand.cc: Test for Poisson generator with lambda > 1e8.
3250 2006-12-04 David Bateman <dbateman@free.fr>
3252 * data.cc (Fdata): If ndims is greater than nargout and
3253 nargout is greater than 1, then collect size of trailing
3254 dimensions into retval(end).
3256 * load-path.cc (load_path::do_find_fcn): Return empty string if
3259 * ov-base-mat.cc (void octave_base_matrix<MT>::assign (const
3260 octave_value_list&, const MT&)): Invalidate matrix type on
3263 2006-11-30 John W. Eaton <jwe@octave.org>
3265 * DLD-FUNCTIONS/fftw_wisdom.cc (Ffftw_wisdom):
3266 Accept "r" or "w" for second argument.
3268 2006-11-29 John W. Eaton <jwe@octave.org>
3270 * DLD-FUNCTIONS/fftw_wisdom.cc (Ffftw_wisdom): Look in load-path
3271 if reading wisdom file, but not if writing.
3273 2006-11-28 John W. Eaton <jwe@octave.org>
3275 * mex.cc (mxArray_struct::get_field_by_number):
3276 Return 0 if key_num is out of range.
3277 (mxArray_struct::set_field_by_number):
3278 Do nothing if key_num is out of range.
3279 (mxArray_cell::get_cell, mxArray_cell::set_cell):
3280 Avoid out-of-bounds indexing
3282 2006-11-28 Luis F. Ortiz <lortiz@interactivesupercomputing.com>
3284 * mex.cc (mxArray_matlab::get_n, mxArray_octave_value::get_n):
3285 Return product of last N-1 dims.
3287 2006-11-28 John W. Eaton <jwe@octave.org>
3289 * lex.l (eat_whitespace): Also handle CRLF as EOL.
3291 * dirfns.cc (Fmkdir): Handle "mkdir (parent, dir)".
3293 2006-11-21 John W. Eaton <jwe@octave.org>
3295 * load-path.cc (load_path::do_find_file,
3296 load_path::do_find_first_of, load_path::do_find_all_first_of):
3297 Call rooted_pathname instead of absolute_pathname.
3298 * utils.cc (fcn_file_in_path, oct_file_in_path, mex_file_in_path):
3301 2006-11-16 Michael Goffioul <michael.goffioul@swing.be>
3303 * oct-hist.cc (default_history_file): Instead of appending
3304 "/.octave_hist", append directory separator (but only if
3305 necessary), then ".octave_hist".
3307 2006-11-16 John W. Eaton <jwe@octave.org>
3309 * data.cc (Fresize): Fix doc string.
3311 2006-11-15 John W. Eaton <jwe@octave.org>
3313 * DLD-FUNCTIONS/__gnuplot_raw__.l (write_data, write_inline_data):
3315 (save_in_tmp_file): Use write_data.
3316 (gnuplot::send_inline_data, gnuplot_do_send_inline_data):
3318 (F__gnuplot_send_inline_data__, F__gnuplot_save_data__):
3321 * ls-oct-ascii.cc (save_ascii_data_for_plotting):
3322 Call save_ascii_data with precision = 4.
3323 (save_three_d): Temporarily set precision to 4 for output stream.
3325 2006-11-15 Michael Goffioul <michael.goffioul@swing.be>
3327 * Cell.h (Cell): Tag class with OCTINTERP_API.
3329 2006-11-13 John W. Eaton <jwe@octave.org>
3331 * octave.cc (maximum_braindamage): Disable
3332 Octave:fopen-file-in-path and Octave:load-file-in-path warnings.
3334 * load-save.cc (find_file_to_load): New function.
3335 (Fload): Call find_file_to_load to search load path for file.
3337 * file-io.cc (Ffopen): Search load path for file.
3339 * load-path.cc (path::do_find_first_of, path::do_find_file):
3340 Break out of all loops once file is found, not just innermost one.
3342 * data.cc (Fsize_equal): New function.
3344 2006-11-13 Michael Goffioul <michael.goffioul@swing.be>
3346 * ov.cc (check_subsref_elements, Fsubsref, Fsubsasgn):
3349 * ov-re-mat.h, ov-scalar.h, pr-output.h:
3350 Sprinkle with OCTINTERP_API as needed.
3352 2006-11-11 John W. Eaton <jwe@octave.org>
3354 * Makefile.in (parse.cc): Avoid creating empty files.
3355 (%.df : %cc, builtins.cc, mkbuiltins, PKG_ADD, DOCSTRINGS,
3356 doc-files, gendoc.cc, ops.cc, $(OPT_HANDLERS), oct-errno.cc,
3357 oct-gperf.h): Use $(simple-move-if-change-rule) here.
3358 (lex.cc, __gnuplot_raw__.cc):
3359 Use $(destdir-move-if-change-rule) here.
3360 (ifndef omit_deps): Don't include stamp-prereq here.
3361 ($(DEF_FILES), $(MAKEDEPS)): Also depend on stamp-prereq.
3363 2006-11-10 John W. Eaton <jwe@octave.org>
3365 * ov-str-mat.cc (octave_char_matrix_str::load_ascii,
3366 octave_char_matrix_str::load_binary):
3367 Use chMatrix as buffer instead of C string.
3369 2006-11-09 John W. Eaton <jwe@octave.org>
3371 * ov-usr-fcn.h (octave_user_function::inline_function):
3373 (octave_user_function::mark_as_inline_function): Set it.
3374 (octave_user_function::is_inline_function): Check it.
3375 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
3376 Also skip setting curr_parent_fucntion if evaluating an inline
3378 (octave_user_function::octave_user_function):
3379 Initialize inline_function.
3380 * pt-fcn-handle.cc (tree_anon_fcn_handle::rvalue):
3381 Mark user function as inline here.
3383 2006-11-09 Michael Goffioul <michael.goffioul@swing.be>
3385 * load-path.cc (load_path::move): Don't use reference to file_info
3386 object that will be erased.
3388 2006-11-07 John W. Eaton <jwe@octave.org>
3390 * utils.cc (file_in_path): Don't unconditionally return "".
3392 * pager.cc (default_pager): Don't append options here.
3393 (pager_command): New function.
3395 (VPAGER_FLAGS): New variable.
3396 (FPAGER_FLAGS): New function.
3398 2006-11-06 John W. Eaton <jwe@octave.org>
3400 * oct-hist.cc (default_history_file): If env_file is not empty,
3401 just accept it rather than checking to see if it exists.
3403 2006-11-03 Bill Denney <denney@seas.upenn.edu>
3405 * help.cc (keywords): Document try and unwind_protect.
3407 2006-11-03 John W. Eaton <jwe@octave.org>
3409 * Makefile.in (DLL_CXXDEFS): Rename from XTRA_CXXDEFS.
3410 (DLL_CDEFS): Rename from XTRA_CDEFS.
3411 Substitute OCTINTERP_DLL_DEFS, not XTRA_OCTINTERP_DEFS.
3413 2006-11-02 Michael Goffioul <michael.goffioul@swing.be>
3415 * sysdep.cc (MSVC_init): Also cal w32_sigint_init and
3416 w32_set_quiet_shutdown.
3418 2006-11-01 John W. Eaton <jwe@octave.org>
3420 * ov.h (octave_value::idx_type_value): New function.
3421 * data.cc (fill_matrix, Flinspace, Freshape): Use idx_type_value
3422 instead of int_value to extract size args.
3424 2006-10-31 John W. Eaton <jwe@octave.org>
3426 * ov-range.h (octave_range::empty_clone): Return octave_matrix
3427 object instead of octave_range.
3429 2006-10-29 Juhani Saastamoinen <juhani@cs.joensuu.fi>
3431 * ls-mat5.cc (read_mat5_tag): Declare bytes as int32_t, not just int.
3433 2006-10-28 John W. Eaton <jwe@octave.org>
3435 * toplev.cc (Fatexit): Push function names on the stack even if we
3436 don't have atexit or on_exit.
3438 2006-10-28 Michael Goffioul <michael.goffioul@swing.be>
3440 * mappers.cc (install_mapper_functions): Undefine toascii before
3441 the DEFUN_MAPPER for it.
3443 2006-10-27 John W. Eaton <jwe@octave.org>
3445 * mexproto.h: Include oct-dlldefs.h.
3447 * pr-output.cc (SPECIALIZE_UABS): New macro.
3448 Use it to generate specializations of abs for unsigned int types.
3449 Instantiate abs for signed int types.
3451 * load-path.cc (load_path::do_initialize):
3452 Use dir_path::path_sep_str instead of ":".
3453 Don't append ":::" to xpath when calling do_set.
3455 * dirfns.cc (Fls, cleanup_iprocstream): Delete.
3457 * sysdep.cc (Ftilde_expand): If arg is cellstr, return cellstr.
3459 * ov.h (octave_value::is_cellstr): New function.
3460 * ov-base.h (octave_base_value::is_cellstr): New function.
3461 * ov-cell.h (octave_cell::is_cellstr): New function.
3462 * ov-cell.cc (Fiscellstr): Implement with is_cellstr.
3463 * Cell.cc (Cell::Cell (const dim_vector&, const string_vector&, bool)):
3465 (Cell::is_cellstr): New function.
3466 * Cell.h: Provide decls.
3468 * defaults.cc (subst_octave_home): If dir_sep_char is not '/',
3469 replace before returning.
3470 From Michael Goffioul <michael.goffioul@swing.be>.
3472 2006-10-26 John W. Eaton <jwe@octave.org>
3474 * cutils.c (octave_strcasecmp, octave-strncasecmp):
3475 Move to liboctave/lo-cutils.c.
3476 * utils.h: Delete decls.
3477 * strcasecmp.c: Move to liboctave/strcasecmp.c.
3478 * strncase.c: Move to liboctave/strncase.c.
3479 * Makefile.in (DIST_SRC): Delete them from the list.
3481 * bitfcns.cc (bitshift): If A < 0, return -bitshift (-A, N, MASK).
3483 2006-10-26 Michael Goffioul <michael.goffioul@swing.be>
3485 * help.cc (display_help_text): Quote sed patterns with ".
3487 * file-io.cc: Include file-io.h.
3489 * TEMPLATE-INST/Array-os.cc, TEMPLATE-INST/Array-sym.cc,
3490 TEMPLATE-INST/Array-tc.cc, defun-int.h, error.h, file-io.h,
3491 gripes.h, ls-oct-ascii.h, mexproto.h, oct-map.h, oct-obj.h,
3492 oct-stream.cc, oct-stream.h, octave.h, ov-base.h,
3493 ov-bool-sparse.cc, ov-bool-sparse.h, ov-cx-sparse.cc,
3494 ov-cx-sparse.h, ov-fcn.h, ov-re-sparse.cc, ov-re-sparse.h,
3495 ov-str-mat.h, ov-typeinfo.cc, ov-typeinfo.h, ov.h, pager.h,
3496 parse.h, pr-output.cc, pr-output.h, procstream.h, sighandlers.h,
3497 symtab.h, unwind-prot.h, utils.h, variables.h:
3498 Sprinkle with OCTINTERP_API as needed.
3500 2006-10-26 John W. Eaton <jwe@octave.org>
3502 * ov-bool.h (octave_bool::sparse_matrix_value,
3503 octave_bool::sparse_complex_matrix_value
3504 octave_bool::sparse_bool_matrix_value): New functions.
3506 2006-10-25 John W. Eaton <jwe@octave.org>
3508 * sighandlers.cc: Check defined (RETSIGTYPE_IS_VOID) instead of
3511 * oct-procbuf.cc (BUFSIZ): Define if not already defined.
3512 (octave_procbuf::open): Pass BUFSIZ as size argument to setvbuf.
3514 2006-10-25 Michael Goffioul <michael.goffioul@swing.be>
3516 * Makefile.in (XTRA_CDEFS, XTRA_CXXDEFS): Substitute here.
3518 * oct-procbuf.cc [_MSC_VER]: Define W32POPEN and W32PCLOSE the
3519 same as for __MINGW32__.
3520 (octave_procbuf::open, octave_procbuf::close) [_MSC_VER]:
3521 Use the same code as for __MINGW32__ and __CYGWIN__.
3523 * oct-prcstrm.cc [_MSC_VER]: Define popen and pclose.
3525 2006-10-25 John W. Eaton <jwe@octave.org>
3527 * sysdep.cc (w32_set_octave_home): Correctly initialize bin_dir.
3528 Fill it with '\0' instead of ' '.
3530 2006-10-24 Michael Goffioul <michael.goffioul@swing.be>
3532 * Makefile.in: Filter out $(XTRA_CXXDEFS) from $(ALL_CXXFLAGS) for
3535 2006-10-24 John W. Eaton <jwe@octave.org>
3537 * sysdep.cc (MSC_init): New function.
3538 (sysdep_init): Call it.
3539 (w32_set_octave_home): New function, based on code from Michael
3540 Goffioul <michael.goffioul@swing.be>.
3541 (MINGW_init): Call w32_set_octave_home here too.
3543 2006-10-23 John W. Eaton <jwe@octave.org>
3545 * symtab.cc (symbol_table::clear_mex_functions): New function.
3546 * symtab.h: Provide decl.
3547 * vriables.cc (clear_mex_functions): New function.
3548 * variables.h Provide decl.
3549 * toplev.cc: Call clear_mex_functions instead of delete_symbol_tables.
3551 * variables.cc (delete_symbol_tables): Delete.
3552 * variables.h: Delete decl.
3554 * mex.cc (mex::unmark_array): New function.
3555 (mex::persistent): Define with unmark_array.
3556 (maybe_unmark_array): New function.
3557 (mxArray_struct::set_field_by_number, mxArray_cell::set_cell):
3558 Call maybe_unmark_array on val to avoid freeing val twice on exit
3560 (mxFree): Call xfree, not free.
3562 2006-10-21 John W. Eaton <jwe@octave.org>
3565 (OCTAVE_VALUE_INT_MATRIX_T::OCTAVE_TYPE_PREDICATE_FUNCTION,
3566 (OCTAVE_VALUE_INT_SCALAR_T::OCTAVE_TYPE_PREDICATE_FUNCTION):
3567 Function is now const, so it properly overloads method in base
3570 * mex.cc (mxArray_octave_value::is_uint32):
3571 Call val.is_uint32_type, not val.is_int32_type.
3572 (mxArray_octave_value::is_uint64):
3573 Call val.is_uint64_type, not val.is_int64_type.
3574 (mxArray_octave_value::is_uint8):
3575 Call val.is_uint8_type, not val.is_int8_type.
3577 2006-10-20 Paul Kienzle <pkienzle@users.sf.net>
3579 * ov-mex-fcn.h (octave_mex_function::atexit): New function.
3580 (octave_mex_function::exit_fcn_ptr): New data member.
3581 * ov-mex-fcn.cc (octave_mex_function::exit_fcn_ptr): New data member.
3582 (octave_mex_function::octave_mex_function): Initialize it.
3583 (octave_mex_function::~octave_mex_function):
3584 If we have an exit function, call it.
3586 2006-10-20 John W. Eaton <jwe@octave.org>
3588 * variables.cc (delete_symbol_tables): New function.
3589 * variables.h: Provide decl.
3590 * toplev.cc (do_octave_atexit): Call it.
3592 * mex.cc (mex::mex): New arg, a pointer to the current mex function.
3593 (mex::curr_mex_fcn): New data member.
3594 (mex::current_mex_function): New function.
3595 (mexAtExit): Set exit function pointer in current mex file object.
3597 2006-10-20 Paul Kienzle <pkienzle@users.sf.net>
3599 * mex.cc (enum callstyle): Delete enum definition.
3600 (Fortran_mex, C_mex): Delete functions.
3601 (call_mex): First arg is now bool.
3602 * ov-mex-fcn.cc (call_mex): Fix decl to match new definition.
3603 (Fortran_mex, C_mex): Delete decls.
3604 (octave_mex_function::do_multi_index_op): Simplify call to call_mex.
3606 2006-10-20 John W. Eaton <jwe@octave.org>
3608 * lex.l (handle_identifier): If a command name is found, skip
3609 starting command mode if parsing an object index.
3611 2006-10-20 David Bateman <dbateman@free.fr>
3613 * DLD-FUNCTION/spqr.cc (dmperm_internal): New function with core
3615 (Fdmperm): Call dmperm_internal rather then calculating loally.
3616 (Fsprank): New function to calculate the strutural rank also using
3619 2006-10-19 John W. Eaton <jwe@octave.org>
3621 * ov-struct.cc (octave_struct::as_mxArrary):
3622 Use OCTAVE_LOCAL_BUFFER to allocate tempoarary array of field names.
3624 * mxarray.h (mxArray::persistent): Delete var and all uses.
3625 (mxArray::mark_persistent, mxArray::unmark_persistent,
3626 mxArray::is_persistent): Delete functions.
3627 * mex.cc (mex::function_name): Use mxArray::strsave, not strsave.
3628 (mex::mark_array): New function.
3629 (mex::make_value): Use it.
3630 (mex::free_value): Return true if we found ptr in arraylist.
3631 (mex::persistent (mxArray *)): Remove ptr from arraylist instead
3632 of marking it as persistent.
3633 (mxArray::malloc): Call ::malloc instead of malloc.
3634 (mxArray::calloc): Call ::calloc instead of calloc.
3635 (maybe_mark_array): New function.
3636 (mxCreateCellArray, mxCreateCellMatrix, mxCreateCharArray,
3637 mxCreateCharMatrixFromStrings, mxCreateDoubleMatrix,
3638 mxCreateDoubleScalar, mxCreateLogicalArray, mxCreateLogicalMatrix,
3639 mxCreateLogicalScalar, mxCreateNumericArray,
3640 mxCreateNumericMatrix, mxCreateSparse,
3641 mxCreateSparseLogicalMatrix, mxCreateString, mxCreateStructArray,
3642 mxCreateStructMatrix, mxDuplicateArray): Use it.
3643 (mxDestroyArray): No need to check persistence now.
3644 Also delete ptr if mex_context->free_value does not.
3645 (call_mex): No need to delete elements of argout now.
3647 2006-10-18 John W. Eaton <jwe@octave.org>
3649 * dynamic-ld.cc (octave_shlib_list::remove,
3650 octave_shlib_list::do_remove, octave_mex_file_list::remove,
3651 octave_mex_file_list::do_remove): New arg, cl_hook.
3652 (octave_shlib_list::do_remove): Pass cl_hook to octave_shlib close
3654 (octave_dynamic_loader::do_load_oct): Don't call close on shl
3655 directly. Pass do_clear_function to octave_shlib_list::remove.
3657 * mex.cc (mexUnlock): Don't warn if unlocking a function that is
3660 * pt-fcn-handle.cc (tree_anon_fcn_handle::dup):
3661 Correctly duplicate symbol table info.
3663 2006-10-17 Michael Goffioul <michael.goffioul@swing.be>
3665 * oct-map.h: Include <algorithm>.
3667 2006-10-16 John W. Eaton <jwe@octave.org>
3669 * oct-stream.cc (octave_stream_list::do_remove): Handle "all" as a
3672 2006-10-13 Michael Goffioul <michael.goffioul@swing.be>
3674 * Makefile.in: Adapt rules to use $(LIBPRE).
3676 2006-10-11 John W. Eaton <jwe@octave.org>
3678 * mex.h (UINT64_T, uint64_T, INT64_T, int64_T, UINT32_T, uint32_T,
3679 INT32_T, int32_T, UINT16_T, uint16_T, INT16_T, int16_T, UINT8_T,
3680 uint8_T, INT8_T, int8_T): Conditionally define.
3681 From Andy Adler <adler@site.uottawa.ca>.
3683 2006-10-09 John W. Eaton <jwe@octave.org>
3685 * oct-conf.h.in (OCTAVE_CONF_CURL_LIBS): Substitute.
3686 * toplev.cc (octave_config_info): Add CURL_LIBS to the list.
3688 2006-10-09 Alexander Barth <abarth@marine.usf.edu>
3690 * DLD-FUNCTIONS/urlwrite.cc: New file providing urlwrite and urlread.
3692 2006-10-09 John W. Eaton <jwe@octave.org>
3694 * pt-mat.cc (tree_matrix::dup): Append new elements to new matrix.
3695 * pt-cell.cc (tree_cell::dup): Append new elements to new cell array.
3697 2006-10-04 John W. Eaton <jwe@octave.org>
3699 * version.h (OCTAVE_VERSION): Now 2.9.9+.
3701 * DLD-FUNCTIONS/__gnuplot_raw__.l (F__clear_plot_window__):
3702 Rename from Fclearplot. Only clear plot window.
3704 2006-10-03 John W. Eaton <jwe@octave.org>
3706 * DLD-FUNCTIONS/luinc.cc (Fluinc): Avoid crash if SparseLU or
3707 SparseComplexLU constructor fails.
3709 * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx):
3710 Delete unused variable.
3712 2006-10-03 David Bateman <dbateman@free.fr>
3714 * Makefile.in (OCT_LINK_DEPS) Include $(CAMD_LIBS) in the list.
3715 (octave$(EXEEXT)): Include $(CAMD_LIBS) in link command.
3717 2006-10-02 John W. Eaton <jwe@octave.org>
3719 * version.h (OCTAVE_VERSION): Now 2.9.9.
3720 (OCTAVE_API_VERSION): Now api-v22.
3721 (OCTAVE_RELEASE_DATE): Now 2006-10-02.
3723 * pr-output.cc (pr_plus_format): Use "inline" instead of "static
3724 inline" for template functions to avoid problems when not
3727 * mex.cc (call_mex): Delete elements of argout.
3728 From Kai Labusch <labusch@inb.uni-luebeck.de>.
3730 2006-09-29 John W. Eaton <jwe@octave.org>
3732 * DLD-FUNCTIONS/spfind.cc (sparse_find_non_zero_elem_idx):
3733 Leading dimension is NR, not NC.
3735 * Makefile.in (DEP_5): Include oct-errno.cc in the list.
3737 2006-09-27 John W. Eaton <jwe@octave.org>
3739 * pr-output.cc (abs): New template function. Instantiate for
3742 2006-09-27 David Bateman <dbateman@free.fr>
3744 * file-io.cc (Fsprintf): If fmt is an sq_string, return an sq_string.
3746 * DLD-FUNCTIONS/sparse.cc (spfind, sparse_find): Delete.
3747 * DLD-FUNCTIONS/spfind.cc: New file implementating compatible
3748 sparse find function.
3749 * Makefile.in (DLD_XSRC): Add spfind.cc.
3751 2006-09-26 Bill Denney <bill@givebillmoney.com>
3753 * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx, Ffind):
3754 Handle direction and limit on number of elements to find.
3756 2006-09-26 John W. Eaton <jwe@octave.org>
3758 * error.cc (warning_1): Call error_2, not error.
3760 2006-09-15 John W. Eaton <jwe@octave.org>
3762 * ops.h (DEFSTRDBLCONVFN): New arg, TFROM.
3763 * OPERATORS/op-double-conv.cc: Declare and install sq_string
3766 * ov-base-int.cc (octave_base_int_scalar<T>::convert_to_str_internal,
3767 octave_base_int_matrix<T>::convert_to_str_internal):
3769 * ov-base-int.h: Provide decls.
3771 2006-09-15 Søren Hauberg <soren@hauberg.org>.
3773 * data.cc (Fsize): If nargout > ndims, fill with 1.
3775 2006-09-15 John W. Eaton <jwe@octave.org>
3777 * octave.cc: Fix xerbla decl.
3779 2006-09-13 John W. Eaton <jwe@octave.org>
3781 * DLD-FUNCTIONS/cellfun.cc: Improve error message for uniform
3782 output case when results are not scalars. Avoid shadow decls.
3784 2006-09-13 David Bateman <dbateman@free.fr>
3786 * ov-scalar.h (octave_scalar::sparse_matrix_value,
3787 octave_scalar::sparse_complex_matrix_value): New extractor functions.
3788 * ov-complex.h (octave_complex::sparse_matrix_value,
3789 octave_complex::sparse_complex_matrix_value): Ditto.
3790 * DLD-FUNCTIONS/spkron.cc (Fspkron): Change example in help.
3792 2006-09-12 David Bateman <dbateman@free.fr>
3794 * DLD-FUNCTIONS/cellfun.cc (Fcellfun): Allow matlab compatiable
3795 'UniformOutput' and 'ErrorHandler' options. Change output when
3796 called with function handler or inline function to by default have
3797 'UniformOutput' set to true. Allow functions with multiple inputs
3798 and outputs. Add test code. Replace some int with octave_idx_type.
3799 (Fnum2cell): Replace some int with octave_idx_type. Add test code.
3801 2006-09-11 Yozo Hida <yozo@cs.berkeley.edu>
3803 * DLD-FUNCTIONS/gcd.cc (Fgcd): Extend range by using std::floor
3804 instead of converting to int.
3806 2006-09-05 John W. Eaton <jwe@octave.org>
3808 * mex.cc (mxArray_sparse::as_octave_value): Cast nzmax to
3809 octave_idx_type for sparse matrix constructors.
3811 2006-09-01 John W. Eaton <jwe@octave.org>
3813 * dirfns.cc: Don't handle nargout == 0 as a special case.
3814 (octave_change_to_directory): Perform tilde expansion on directory
3817 2006-08-30 John W. Eaton <jwe@octave.org>
3819 * load-save.cc (get_file_format): Fix misplaced #endif.
3821 2006-08-29 John W. Eaton <jwe@octave.org>
3823 * load-path.cc (execute_pkg_add_or_del):
3824 Source PKG_ADD or PKG_DEL in base workspace.
3825 * parse.y (source_file): New optional arg, context.
3826 * parse.h (source_file): Fix decl.
3828 2006-08-25 John W. Eaton <jwe@octave.org>
3830 * version.h (OCTAVE_VERSION): Now 2.9.8+.
3832 2006-08-24 John W. Eaton <jwe@octave.org>
3834 * version.h (OCTAVE_VERSION): Now 2.9.8.
3835 (OCTAVE_API_VERSION): Now api-v21.
3836 (OCTAVE_RELEASE_DATE): Now 2006-08-24.
3838 2006-08-23 John W. Eaton <jwe@octave.org>
3840 * ov.h (octave_value::save_ascii): Delete strip_nan_and_inf arg.
3841 * ov-base.h, ov-base.cc (octave_base_value::save_ascii): Likewise.
3842 * ov-base-int.h, ov-base-int.cc (octave_base_int_matrix<T>::save_ascii,
3843 octave_base_int_scalar<T>::save_ascii, ): Likewise.
3844 * ov-base-sparse.cc, ov-base-sparse.h
3845 (octave_base_sparse<T>::save_ascii): Likewise.
3846 * ov-bool-mat.cc, ov-bool-mat.h (octave_bool_matrix::save_ascii):
3848 * ov-bool.cc, ov-bool.h (octave_bool::save_ascii): Likewise.
3849 * ov-cell.cc, ov-cell.h (octave_cell::save_ascii): Likewise.
3850 * ov-complex.cc, ov-complex.h (octave_complex::save_ascii): Likewise.
3851 * ov-fcn-handle.cc, ov-fcn-handle.h (octave_fcn_handle::save_ascii):
3853 * ov-fcn-inline.cc, ov-fcn-inline.h (octave_fcn_inline::save_ascii):
3855 * ov-list.cc, ov-list.h (octave_list::save_ascii): Likewise.
3856 * ov-range.cc, ov-range.h (octave_range::save_ascii): Likewise.
3857 * ov-scalar.cc, ov-scalar.h (octave_scalar::save_ascii): Likewise.
3858 * ov-str-mat.cc, ov-str-mat.h (octave_char_matrix_str::save_ascii):
3860 * ov-struct.cc, ov-struct.h (octave_struct::save_ascii): Likewise.
3861 * ov-re-mat.cc, ov-re-mat.cc (octave_matrix::save_ascii): Likewise.
3862 * ov-cx-mat.cc, ov-cx-mat.cc (octave_complex_matrix::save_ascii):
3864 * ov-cx-mat.cc, ov-cx-mat.cc (octave_complex_matrix::save_ascii):
3866 * ov-re-mat.cc, ov-re-mat.cc (octave_matrix::save_ascii): Likewise.
3868 * ls-oct-ascii.cc, ls-oct-ascii.h (save_ascii_data):
3869 Delete strip_nan_and_inf arg.
3870 (save_ascii_data_for_plotting): Delete strip_nan_and_inf arg from
3871 call to save_ascii_data.
3873 * DLD-FUNCTIONS/__gnuplot_raw__.l (handle_using): Accept "(EXPR)"
3874 as components of using clauses.
3875 (enum _toktype): New element DOLLAR.
3876 Accept "$" in lexer.
3878 * ls-oct-ascii.cc (save_ascii_data): Delete arg strip_nan_and_inf.
3881 * ls-oct-ascii.h (save_three_d): Provide decl.
3882 * load-save.h (save_ascii_data_for_plotting, save_three_d):
3885 2006-08-22 John W. Eaton <jwe@octave.org>
3887 * ov.h (octave_value::save_ascii): strip_nan_and_inf is now int,
3889 * ov-base.h, ov-base.cc (octave_base_value::save_ascii): Likewise.
3890 * ov-base-int.h, ov-base-int.cc (octave_base_int_matrix<T>::save_ascii,
3891 octave_base_int_scalar<T>::save_ascii, ): Likewise.
3892 * ov-base-sparse.cc, ov-base-sparse.h
3893 (octave_base_sparse<T>::save_ascii): Likewise.
3894 * ov-bool-mat.cc, ov-bool-mat.h (octave_bool_matrix::save_ascii):
3896 * ov-bool.cc, ov-bool.h (octave_bool::save_ascii): Likewise.
3897 * ov-cell.cc, ov-cell.h (octave_cell::save_ascii): Likewise.
3898 * ov-complex.cc, ov-complex.h (octave_complex::save_ascii): Likewise.
3899 * ov-fcn-handle.cc, ov-fcn-handle.h (octave_fcn_handle::save_ascii):
3901 * ov-fcn-inline.cc, ov-fcn-inline.h (octave_fcn_inline::save_ascii):
3903 * ov-list.cc, ov-list.h (octave_list::save_ascii): Likewise.
3904 * ov-range.cc, ov-range.h (octave_range::save_ascii): Likewise.
3905 * ov-scalar.cc, ov-scalar.h (octave_scalar::save_ascii): Likewise.
3906 * ov-str-mat.cc, ov-str-mat.h (octave_char_matrix_str::save_ascii):
3908 * ov-struct.cc, ov-struct.h (octave_struct::save_ascii): Likewise.
3909 * ov-re-mat.cc, ov-re-mat.cc (octave_matrix::save_ascii): Likewise.
3910 * ov-cx-mat.cc, ov-cx-mat.cc (octave_complex_matrix::save_ascii):
3913 * ov-cx-mat.cc, ov-cx-mat.cc (octave_complex_matrix::save_ascii):
3914 Don't strip Inf and NaN here. Call ComplexMatrix::save_ascii to
3916 * ov-re-mat.cc, ov-re-mat.cc (octave_matrix::save_ascii):
3917 Don't strip Inf and NaN here. Call Matrix::save_ascii to do the
3920 * ov-re-mat.cc, ov-cx-mat.cc (strip_infnan): Delete.
3921 * ls-oct-ascii.cc, ls-oct-ascii.h (save_ascii_data):
3922 strip_nan_and_inf is now int, not bool.
3923 (strip_infnan): Delete.
3924 (save_ascii_data_for_plotting): Call save_ascii_data with
3925 strip_nan_and_inf = 2.
3927 * Makefile.in (INCLUDES): Remove matrix.h from the list.
3929 2006-08-22 David Bateman <dbateman@free.fr>
3931 * sparse-xpow.cc: Replace all uses of pow by std::pow.
3932 (elem_pow): Simplify for two sparse matrices arguments.
3934 2006-08-22 John W. Eaton <jwe@octave.org>
3936 * ls-oct-ascii.cc: Increase default value of save_precision to 16.
3938 * ls-mat-ascii.cc (save_mat5_ascii_data): Use scientific format.
3940 2006-08-21 John W. Eaton <jwe@octave.org>
3942 * ls-mat5.cc (read_mat5_binary_data, read_mat5_integer_data,
3943 write_mat5_array): Unconditionally enable code for 64-bit int types.
3945 * ov-fcn-handle.cc (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA):
3946 For compatibility, set class to function_handle.
3948 2006-08-18 John W. Eaton <jwe@octave.org>
3950 * pr-output.cc (set_real_matrix_format): Also always include space
3951 for sign if values are int, inf, or nan.
3952 (set_complex_format, set_complex_matrix_format): Always include
3953 space for sign in real format, but never in imaginary format.
3955 * gripes.cc (gripe_logical_conversion): New function.
3956 * gripes.h: Provide decl.
3957 * ov.h (octave_value::bool_value, octave_value::bool_matrix_value,
3958 octave_value::bool_array_value): New arg, warn.
3959 * ov-base.cc, ov-base.h (octave_base_value::bool_value,
3960 octave_base_value::bool_matrix_value,
3961 octave_base_value::bool_array_value): Likewise.
3962 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::bool_array_value,
3963 OCTAVE_VALUE_INT_SCALAR_T::bool_array_value): Likewise.
3964 * ov-range.h (octave_range::bool_array_value): Likewise.
3965 * ov-re-mat.cc, ov-re-mat.h (octave_matrix::bool_array_value):
3967 * ov-re-sparse.cc, ov-re-sparse.h
3968 (octave_sparse_matrix::bool_array_value): Likewise.
3969 * ov-scalar.h (octave_scalar::bool_value,
3970 octave_scalar::bool_array_value): Likewise.
3971 * OPERATORS/op-bm-b.cc (oct_assignop_conv_and_assign):
3972 Ask for warning from bool_array_value.
3973 * OPERATORS/op-bm-bm.cc (oct_assignop_conv_and_assign): Likewise.
3974 * ov-bool.h (octave_bool::bool_value,
3975 octave_bool::bool_matrix_value, octave_bool::bool_array_value):
3977 * ov-bool-mat.h (octave_bool_matrix::bool_matrix_value,
3978 octave_bool_matrix::bool_array_value): Likewise.
3979 * ov-bool-sparse.cc, ov-bool-sparse.h
3980 (octave_sparse_bool_matrix::bool_matrix_value,
3981 octave_sparse_bool_matrix::bool_array_value): Likewise.
3983 2006-08-18 Benjamin Lindner <lindnerben@gmx.net>
3985 * ls-mat5.cc (read_mat5_tag): Declare type as int32_t, not int.
3986 (read_mat5_binary_element): Likewise, for len and element_length.
3988 2006-08-18 John W. Eaton <jwe@octave.org>
3990 * load-save.h (enum load_save_format): New element, LS_MAT_ASCII_LONG.
3991 * load-save.cc (Fload, Fsave): Make -ascii Matlab compatible.
3992 (do_save): Handle LS_MAT_ASCII.
3993 * ls-mat-ascii.cc (save_mat_ascii_data): New function.
3994 * ls-mat-ascii.h: Provide decl.
3996 2006-08-17 John W. Eaton <jwe@octave.org>
3998 * ls-mat5.cc (save_mat5_element_length): Correctly compute element
3999 length for character data. Handle N-d character data
4000 (save_mat5_binary_element): Handle N-d character data.
4002 2006-08-16 John W. Eaton <jwe@octave.org>
4004 * parse.y (gobble_leading_white_space): New arg, SKIP_CODE.
4007 2006-08-15 John W. Eaton <jwe@octave.org>
4009 * help.cc (help_from_file): Call get_help_from_file with new file
4010 arg. Print file info here.
4012 * parse.y (get_help_from_file): Delete include_file_info arg.
4013 Provide two versions, one that returns the file found in a
4014 reference arg and one that does not.
4016 * variables.cc (do_isglobal): New function.
4017 (Fisglobal): Use it.
4018 (Fis_global): New function.
4020 2006-08-14 John W. Eaton <jwe@octave.org>
4022 * variables.cc (symbol_record_name_compare): Fix casts.
4024 * ov-cell.cc (octave_cell::subsasgn): Call empty_conv for 0x0
4025 objects, not just empty objects.
4027 * oct-map.h (Octave_map::clear): Also clear key_list.
4029 * load-path.cc (load_path::find_dir_info, load_path::do_add,
4030 load_path::do_remove): Perform tilde expansion on directory here.
4032 2006-07-29 John W. Eaton <jwe@octave.org>
4034 * matrix.h: Delete to avoid conflict with liboctave/Matrix.h on
4035 case-insensitive filesystems.
4037 * version.h (OCTAVE_VERSION): Now 2.9.7+.
4039 2006-07-28 John W. Eaton <jwe@octave.org>
4041 * version.h (OCTAVE_VERSION): Now 2.9.7.
4042 (OCTAVE_API_VERSION): Now api-v20.
4043 (OCTAVE_RELEASE_DATE): Now 2006-07-28.
4045 * load-path.cc (path::do_add): Warn for trailing "//".
4047 * strfns.cc: Comment out some tests for snapshot.
4049 2006-07-27 John W. Eaton <jwe@octave.org>
4051 * defaults.cc (Vlocal_api_arch_lib_dir): New variable.
4052 (set_default_local_api_arch_lib_dir): New function.
4053 (install_defaults): Call it.
4054 (set_exec_path): Put Vlocal_api_arch_lib_dir in the list.
4055 * toplev.cc (localapiarchlibdir): Include it in the list.
4056 * defaults.h.in (OCTAVE_LOCALAPIARCHLIBDIR): Substitute here.
4058 2006-07-26 John W. Eaton <jwe@octave.org>
4060 * mex.cc (mxArray::as_octave_value (mxArray *)): New static function.
4061 (call_mex, mexPutVariable, mexCallMATLAB,
4062 mxArray_cell::as_octave_value, mxArray_struct::as_octave_value):
4063 Use static version of as_octave_value here.
4064 (mxArray_sparse::mxArray_sparse (const mxArray_sparse&)):
4065 Check pr, ir, and jc before calling memcpy.
4066 (mxArray_number::mxArray_number): Check pr before calling memcpy
4068 * mxarray.h (mxArray::as_octave_value (mxArray *)): Provide decl.
4069 (mxArray::as_octave_value): Now protected.
4071 * file-io.cc (Ffeof, Fferror): Use DEFUNX instead of DEFUN.
4073 * mex.cc (xfree): New function.
4074 (mex::free): Use it.
4075 (mxArray_struct::~mxArray_struct, mxArray_cell::~mxArray_cell):
4076 Delete elements with delete, not mxDestroyArray.
4077 (mex::cleanup): Don't call mex::free or mex::free_value.
4078 (mex::free_value): Add debug warning.
4079 (mex::mark, mex::unmark): Fix debug warning.
4080 (call_mex): Use unwind_protect frame.
4081 (mexUnlock): Use iterator to remove item from mex_lock_count.
4083 * octave.cc (maximum_braindamage): Use disable_warning instead of
4084 bind_internal_variable to disable function-name-clash warning.
4085 * error.cc (disable_warning): No longer static.
4086 * error.h: Provide decl.
4088 2006-07-25 David Bateman <dbateman@free.fr>
4090 * mex.cc (mxArray_octave_value::get_class_id): Handle sparse.
4091 (class mxArray_sparse): Derive from mxArray_matlab, not
4093 (mxArray_sparse::as_octave_value): Implement function.
4094 * ov-bool-sparse.cc (octave_sparse_bool_matrix::as_mxArray):
4096 * ov-cx-sparse.cc (octave_sparse_complex_matrix::as_mxArray):
4098 * ov-re-sparse.cc (octave_sparse_matrix::as_mxArray):
4101 2006-07-25 John W. Eaton <jwe@octave.org>
4103 * mex.cc (mxArray_struct::as_octave_value, call_mex,
4104 mexCallMATLAB, mxArray_cell::as_octave_value):
4105 Convert NULL mxArray* pointers to empty matrix values.
4106 (mxArray_octave_value:get_ir): Fix typo.
4108 2006-07-22 John W. Eaton <jwe@octave.org>
4110 * mxarray.h: New file.
4111 * mex.h, mexproto.h, mex.cc: New implementation of mxArray and MEX
4114 * ov.h (octave_value::mex_get_ir, octave_value::mex_get_jc):
4116 * ov-base.h (octave_base_value::mex_get_ir,
4117 octave_base_value::mex_get_jc): New virtual functions.
4118 * ov-base-sparse.h (octave_base_sparse<T>::mex_get_ir,
4119 octave_base_sparse<T>::mex_get_jc): New functions.
4121 * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::as_mxArray,
4122 OCTAVE_VALUE_INT_MATRIX_T::as_mxArray): New functions.
4123 * ov-int8.h, ov-int16.h, ov-int32.h, ov-int64.h, ov-uint8.h,
4124 ov-uint16.h, ov-uint32.h, ov-uint64.h: Define OCTAVE_INT_MX_CLASS
4125 before including ov-intx.h. Undef it after.
4126 * ov-range.cc (octave_range::as_mxArray): New function.
4127 * ov-range.h: Provide decl.
4128 * ov-scalar.cc (octave_scalar::as_mxArray): New function.
4129 * ov-scalar.h: Provide decl.
4130 * ov-complex.cc (octave_complex::as_mxArray): New function.
4131 * ov-complex.h: Provide decl.
4132 * ov-re-mat.cc (octave_matrix::as_mxArray): New function.
4133 * ov-re-mat.h: Provide decl.
4134 * ov-cx-mat.cc (octave_complex_matrix::as_mxArray): New function.
4135 * ov-cx-mat.h: Provide decl.
4136 * ov-ch-mat.cc (octave_char_matrix::as_mxArray): New function.
4137 * ov-ch-mat.h: Provide decl.
4138 * ov-bool-mat.cc (octave_bool_matrix::as_mxArray): New function.
4139 * ov-bool-mat.h: Provide decl.
4140 * ov-bool.cc (octave_bool::as_mxArray): New function.
4141 * ov-bool.h: Provide decl.
4143 * ov-struct.h (octave_struct::numel): New function.
4145 * ls-mat5.cc (arrayclasstype): Use "MAT_FILE_" instead of "mx" as
4146 prefix for element names.
4148 * ov.h (octave_value::as_mxArray): New function.
4149 * ov-base.cc (octave_base_value::as_mxArray): New function.
4150 * ov-base.h: Provide decl.
4152 * ov.h (octave_value::mex_get_data): New function.
4153 * ov-base.h (octave_base_value::mex_get_data): New function.
4154 * ov-base-scalar.h (octave_base_scalar<ST>::mex_get_data): New function.
4155 * ov-base-matrix.h (octave_base_matrix<MT>::mex_get_data): New function.
4156 * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::mex_get_data): New function.
4158 * ov.h (octave_value::nfields): New function.
4159 * ov-base.cc (octave_base_value::nfields): New virtual function.
4160 * ov-base.h: Provide decl.
4161 * ov-struct.h (octave_struct::nfields): New function.
4163 2006-07-19 John W. Eaton <jwe@octave.org>
4165 * OPERATORS/op-bm-bm.cc (oct_assignop_conv_and_assign): New function.
4166 (install_bm_bm_ops): Install it for various types.
4167 * OPERATORS/op-bm-b.cc (oct_assignop_conv_and_assign): New function.
4168 (install_bm_b_ops): Install it for various types.
4169 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::bool_array_value,
4170 OCTAVE_VALUE_INT_SCALAR_T::bool_array_value): New functions.
4171 * ov-range.h (octave_range::bool_array_value): New function.
4172 * ov-re-sparse.cc (octave_sparse_matrix::bool_array_value):
4174 * ov-re-sparse.h: Provide decl.
4175 * ov-re-mat.cc (octave_matrix::bool_array_value): New function.
4176 * ov-re-mat.h: Provide decl.
4178 * ov-base.cc (octave_base_value::numeric_assign):
4179 Avoid memory leak when converting LHS.
4181 2006-07-18 John W. Eaton <jwe@octave.org>
4183 * ov.h (octave_value::is_int8_type, octave_value::is_int16_type,
4184 octave_value::is_int32_type, octave_value::is_int64_type,
4185 octave_value::is_uint8_type, octave_value::is_uint16_type,
4186 octave_value::is_uint32_type, octave_value::is_uint64_type):
4188 * ov-base.h (octave_base_value::is_int8_type,
4189 octave_base_value::is_int16_type,
4190 octave_base_value::is_int32_type,
4191 octave_base_value::is_int64_type,
4192 octave_base_value::is_uint8_type,
4193 octave_base_value::is_uint16_type,
4194 octave_base_value::is_uint32_type,
4195 octave_base_value::is_uint64_type): New functions.
4196 * ov-int8.h, ov-int16.h, ov-int32.h, ov-int16.h, ov-uint8.h,
4197 ov-uint16.h, ov-uint32.h, ov-uint16.h: Define OCTAVE_BASE_INT_T.
4198 * ov-intx.h: Use OCTAVE_BASE_INT_T to define type-specific predicate.
4200 * ov.h (octave_value::is_double_type, octave_value::is_single_type):
4202 * ov-base.h (octave_base_value::is_double_type,
4203 octave_base_value::is_single_type): New functions.
4204 * ov-re-mat.h (octave_matrix::is_double_type): New function.
4205 * ov-cx-mat.h (octave_matrix::is_double_type): New function.
4206 * ov-scalar.h (octave_scalar::is_double_type): New function.
4207 * ov-complex.h (octave_complex::is_double_type): New function.
4208 * ov-range.h (octave_range::is_double_type): New function.
4209 * ov-re-sparse.h (octave_sparse_matrix::is_double_type): New function.
4210 * ov-cx-sparse.h (octave_sparse_complex_matrix::is_double_type):
4213 2006-07-15 John W. Eaton <jwe@octave.org>
4215 * ov-typeinfo.cc: Also instantiate arrays of assignany_ops.
4217 * oct-errno.cc.in (octave_errno::octave_errno): VALUE field in
4218 errno_struct no longer const.
4220 * DLD-FUNCTIONS/dispatch.cc (octave_dispatch::do_index_op):
4221 Declare resize_ok arg as bool, not int.
4222 Provide default value for resize_ok.
4224 2006-07-14 John W. Eaton <jwe@octave.org>
4226 * oct-stream.cc (do_write): Include explicit instantiations.
4228 * ov-str-mat.h (octave_char_matrix_sq_str::resize):
4229 Include fill arg to match base class.
4230 * ov-struct.h (octave_struct::resize): Likewise.
4232 * ov-base-mat.cc, ov-base-mat.h, ov-base-sparse.cc,
4233 ov-base-sparse.h, ov-base.cc, ov-base.h, ov-bool.cc,
4234 ov-bool.h, ov-complex.cc, ov-complex.h, ov-intx.h, ov-list.cc,
4235 ov-list.h, ov-range.cc, ov-range.h, ov-scalar.cc, ov-scalar.h,
4236 ov-str-mat.cc, ov-str-mat.h, ov.h (do_index_op):
4237 Declare resize_ok arg as bool, not int.
4238 Provide default value for resize_ok.
4240 * c-file-ptr-stream.h (c_file_ptr_stream::c_file_ptr_stream):
4243 2006-07-13 John W. Eaton <jwe@octave.org>
4245 * oct-map.h (Octave_map::del): Add missing std:: qualifier to use
4248 2006-07-07 John W. Eaton <jwe@octave.org>
4250 * ov.h (octave_value::is_bool_scalar): New function.
4251 * ov-base.h (octave_base_value::is_bool_scalar): New function.
4252 * ov-bool.h (octave_bool::is_bool_scalar): New function.
4254 * oct-map.cc (Octave_map::keys): Use assert.
4255 (Octave_map::assign): Avoid inserting new key in map unless
4256 assignment to cell succeeds.
4258 * oct-map.h (Octave_map::del): Only touch key_list if map contains key.
4259 Assert that key_list contains key.
4261 * oct-map.h (Octave_map::maybe_add_to_key_list): For efficiency,
4262 check map, not key_list. From Paul Kienzle <pkienzle@users.sf.net>.
4264 2006-07-06 John W. Eaton <jwe@octave.org>
4266 * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Declare mrowsc volatile.
4268 * ov-struct.cc (octave_struct::print_raw): Print keys in key_list
4271 * oct-map.h (Octave_map::key_list): New data member.
4272 (Octave_map::maybe_add_to_key_list): New function.
4273 (Octave_map::key_list_iterator, Octave_map::const_key_list_iterator):
4275 (Octave_map::del): Also delete key from key_list.
4276 * oct-map.cc (Octave_map::keys): Compute return value from
4277 key_list instead of map.
4278 (Octave_map::assign, Octave_map::contents): Call maybe_add_to_key_list.
4279 * oct-map.h, oct-map.cc (Octave_map::Octave_map):
4280 Insert keys in key_list.
4282 * oct-map.h (Octave_map::Octave_map (const dim_vector&,
4283 const string_vector&)): New arg, key_list_arg.
4284 * oct-map.cc: Move definition here.
4286 2006-07-05 John W. Eaton <jwe@octave.org>
4288 * mex.cc (mexGetVariable): Rename from mexGetArray, swap arguments.
4289 (mexGetVariablePtr): Rename from mexGetArrayPtr, swap arguments.
4290 (mexErrMsgIdAndTxt, mexWarnMsgIdAndTxt): New functions.
4291 * mexproto.h: Provide decls.
4292 Include decls for as yet unsupported functions.
4293 * mex.h: Add enum for class ids.
4294 (mexGetArray): Define using mexGetVariable.
4295 (mexGetArrayPtr): Define using mexGetVariablePtr.
4297 2006-07-02 John W. Eaton <jwe@octave.org>
4299 * ov-str-mat.cc (CHAR_MATRIX_CONV): Omit "warn-" from label.
4300 * parse.y (maybe_warn_variable_switch_label): Likewise.
4302 2006-07-01 John W. Eaton <jwe@octave.org>
4304 * parse.y (finish_cell): Use finish_matrix to do constant folding.
4306 2006-06-30 John W. Eaton <jwe@octave.org>
4308 * ov-base.cc (octave_base_value::numeric_assign):
4309 Avoid memory leak when converting LHS.
4311 * oct-hist.cc (do_history, initialize_history, Fhistory_file):
4312 Don't perform tilde expansion on history file name.
4314 * syscalls.cc (Flstat, Fstat): Don't perform tilde expansion on arg.
4315 * input.cc (Fread_readline_init_file): Likewise.
4316 * dirfns.cc (Fcd, Freaddir): Likewise.
4318 * load-path.cc (genpath): Don't perform tilde expansion on name.
4319 (load_path::do_add): Don't warn about moving "." to front of list.
4321 2006-06-28 John W. Eaton <jwe@octave.org>
4323 * load-path.cc (Faddpath): Don't treat "." specially here.
4324 Don't check directory status here.
4325 (Fpath): Handle all args. Don't treat "." specially here.
4326 (Faddpath, Frmpath): Delete unused variable xpath.
4327 (load_path::do_add): New function.
4328 (load_path::do_prepend, load_path::do_append): Use it.
4329 (load_path::do_remove): Really prevent removal of ".".
4330 (load_path::do_clear): Clearing doesn't remove ".".
4331 (load_path::append, load_path::prepend, load_path::do_append,
4332 load_path::do_prepend): New arg, warn.
4334 * load-path.h: Fix decls.
4336 * DLD-FUNCTIONS/regexp.cc (octregexp_list):
4337 Avoid bug in older versions of g++.
4339 2006-06-27 John W. Eaton <jwe@octave.org>
4341 * Makefile.in (clean): Also remove $(DLD_OBJ).
4343 * sighandlers.cc (install_signal_handlers): Don't handle SIGPROF.
4344 From Geoffrey Knauth <geoff@knauth.org>.
4346 2006-06-25 John W. Eaton <jwe@octave.org>
4348 * mk-pkg-add: Avoid apparently non-portable sed patterns.
4350 2006-06-21 John W. Eaton <jwe@octave.org>
4352 * variables.cc (do_who): Handle mex.
4354 * symtab.cc (SYMBOL_DEF::type_as_string, SYMBOL_DEF::which,
4355 symbol_table::clear_functions, table::clear_function,
4356 symbol_table::clear_function_pattern):
4358 * symtab.h (symbol_record::is_mex_function,
4359 symbol_record::symbol_def::is_mex_function): New functions.
4360 (symbol_record::TYPE): New value, MEX_FUNCTION.
4361 (symbol_record::is_function, symbol_table::user_function_name_list,
4362 SYMTAB_ALL_TYPES): Handle MEX_FUNCTION.
4364 * ov-fcn.h (octave_function::octave_function):
4365 Provide default for doc string arg.
4367 * defun.cc (install_mex_function): New function.
4368 * defun-int.h: Provide decl.
4370 * ov-builtin.cc (any_arg_is_magic_colon): Delete.
4371 (octave_builtin::do_multi_index_op): Call has_magic_colon method
4372 for args instead of any_arg_is_magic_colon.
4374 * ov-base.h (octave_base_value::is_mex_function): New function.
4375 * ov.h (octave_value::is_mex_function): New function.
4377 * ov-mex-fcn.h, ov-mex-fcn.cc: New files.
4379 * parse.y (load_fcn_from_file): Also handle .mex files.
4381 * dynamic-ld.cc (octave_dynamic_loader::load_oct): Rename from load.
4382 (octave_dynamic_loader::do_load_oct): Rename from do_load.
4383 * dynamic-ld.h: Fix decls.
4385 * utils.cc (mex_file_in_path): New function.
4386 * utils.h: Provide decl.
4388 * variables.cc (symbol_out_of_date): Also handle mex files.
4390 * load-path.cc (load_path::dir_info::get_file_list,
4391 load_path::dir_info::get_private_function_map,
4392 load_path::do_find_fcn, load_path::add_to_fcn_map,
4393 load_path::do_display): Also handle mex files.
4394 * load-path.h (load_path::find_mex_file): New static function.
4395 (load_path::MEX_FILE): New static data member.
4396 (load_path::do_find_fcn): By default, also look for mex files.
4398 * matrix.h, mex.h, mex.cc: New files from Octave Forge
4399 * mexproto.h: New file, extracted from mex.h.
4400 * Makefile.in: Add them to the appropriate lists.
4402 2006-06-20 John W. Eaton <jwe@octave.org>
4404 * ov-re-mat.cc (octave_matrix::convert_to_str_internal):
4405 Don't lose empty dimensions on conversion to char.
4407 * strfns.cc (Fstrcmp): Handle comparison of cellstr and empty string.
4409 2006-06-16 John W. Eaton <jwe@octave.org>
4411 * parse.y (%union): New type, anon_fcn_handle_type.
4412 (anon_fcn_handle): Now anon_fcn_handle_type, not tree_constant_type.
4413 (make_anon_fcn_handle): Return tree_anon_fcn_handle, not tree_constant.
4415 * comment-list.cc (octave_comment_list::dup): New function.
4416 * comment-list.h: Provide decl.
4418 * pt-cmd.cc (tree_no_op_command::dup): New function.
4419 * pt-cmd.h: Provide decl.
4420 (tree_command::dup): New pure virtual function.
4422 * pt-loop.cc (tree_while_command::dup, tree_do_until_command::dup,
4423 tree_simple_for_command::dup, tree_complex_for_command::dup):
4425 * pt-loop.h: Provide decls.
4427 * pt-jump.cc (tree_break_command::dup, tree_continue_command::dup,
4428 tree_return_command::dup): New functions.
4429 * pt-jump.h: Provide decls.
4431 * pt-except.cc (tree_try_catch_command::dup,
4432 tree_unwind_protect_command::dup): New functions.
4433 * pt-except.h: Provide decls.
4435 * pt-select.cc (tree_if_clause::dup, tree_if_command_list::dup,
4436 tree_if_command::dup, tree_switch_case::dup,
4437 tree_switch_case_list::dup, tree_switch_command::dup):
4439 * pt-select.h: Provide decls.
4441 * pt-decl.cc (tree_decl_elt::dup, tree_decl_init_list::dup,
4442 tree_global_command::dup, tree_static_command::dup): New functions.
4443 * pt-decl.h: Provide decls.
4445 * pt-exp.h (tree_expression::copy_base): New function.
4446 (tree_expression::dup): New pure virtual function.
4448 * pt-fcn-handle.cc, pt-fcn-handle.h (tree_anon_fcn_handle): New class.
4450 * pt-fcn-handle.cc (tree_function_handle::dup): New function.
4451 * pt-fcn-handle.h: Provide decl.
4453 * pt-colon.cc (tree_colon_expression::dup): New function.
4454 * pt-colon.h: Provide decl.
4455 (tree_colon_expression::tree_colon_expression (tree_expression *,
4456 tree_expression *, tree_expression *, int, int)): New constructor.
4458 * pt-const.cc (tree_constant::dup): New function.
4459 (tree_constant::tree_constant (const octave_value&, const
4460 std::string&, int, int)): New constructor.
4461 * pt-const.h: Provide decls.
4463 * pt-idx.cc (tree_index_expression::dup): New functoin.
4464 (tree_index_expression::tree_index_expression (int, int)):
4466 * pt-idx.h: Provide decls.
4468 * pt-arg-list.cc (tree_argument_list::dup): New function.
4469 * pt-arg-list.h: Provide decl.
4471 * pt-id.cc (tree_identifier::dup): New function.
4472 * pt-id.h: Provide decl.
4474 * pt-cell.cc (tree_cell::dup): New function.
4475 * pt-cell.h: Provide decl.
4477 * pt-mat.cc (tree_matrix::dup): New function.
4478 * pt-mat.h: Provide decl.
4480 * pt-assign.cc (tree_simple_assignment::dup,
4481 tree_multi_assignment::dup): New functions.
4482 * pt-assign.h: Provide decls.
4484 * pt-binop.cc (tree_binary_expression::dup,
4485 tree_boolean_expression::dup): New functions.
4486 * pt-binop.h: Provide decls.
4488 * pt-unop.cc (tree_prefix_expression::dup,
4489 tree_postfix_expression::dup): New functions.
4490 * pt-unop.h: Provide decls.
4492 * pt-stmt.cc (tree_statement::dup, tree_statement_list::dup):
4494 * pt-stmt.h: Provide decls.
4496 * pt-misc.cc (tree_parameter_list::dup,
4497 tree_return_list::dup): New functions.
4498 * pt-misc.h: Provide decls.
4500 * symtab.cc (symbol_table::dup, symbol_table::inherit,
4501 symbol_record:is_automatic_variable): New functions.
4502 * symtab.h: Provide decls.
4503 (symbol_record::automatic_variable): New data member.
4504 (symbol_record::symbol_record): Initialize it.
4505 (symbol_record::mark_as_automatic_variable): New function.
4507 * pt-walk.h (tree_walker::visit_anon_fcn_handle):
4508 New pure virtual function.
4509 * pt-pr-code.cc (tree_print_code::visit_anon_fcn_handle): New function.
4510 * pt-pr-code.h: Provide decl.
4511 * pt-bp.cc (tree_breakpoint::visit_anon_fcn_handle): New function.
4512 * pt-bp.h: Provide decl.
4513 * pt-check.cc (tree_checker::visit_anon_fcn_handle): New function.
4514 * pt-check.h: Provide decl.
4516 2006-06-13 John W. Eaton <jwe@octave.org>
4518 * pt-stmt.cc (tree_statement_list::eval): Revise previous change
4519 to preserve return-last-value-computed semantics.
4521 * DLD-FUNCTIONS/fsolve.cc (hybrd_info_to_fsolve_info):
4522 Warn about invalid values of INFO from MINPACK instead of calling
4525 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
4526 Don't assign values returned by evaluation of cmd_list to
4527 temporary variable. Delete unused variable last_computed_value.
4529 * pt-stmt.cc (tree_statement_list::eval):
4530 Clear retval before each statement is evaluated.
4532 2006-06-12 John W. Eaton <jwe@octave.org>
4534 * unwind-prot.h (unwind_protect_fptr): New macro.
4535 * load-path.cc (load_path::do_set): Use it instead of
4536 unwind_protect_ptr when protecting add_hook function pointer.
4537 * dynamic-ld.cc (octave_dynamic_loader::do_load): Use FCN_PTR_CAST
4538 here instead of reinterpret_cast.
4540 2006-06-09 John W. Eaton <jwe@octave.org>
4542 * version.h (OCTAVE_VERSION): Now 2.9.6+.
4544 2006-06-09 John W. Eaton <jwe@octave.org>
4546 * version.h (OCTAVE_VERSION): Now 2.9.6.
4547 (OCTAVE_API_VERSION): Now api-v19.
4548 (OCTAVE_RELEASE_DATE): Now 2006-06-09.
4550 * ov-cell.cc (cell::save_hdf5): Use leading zeros to keep elements
4551 correctly sorted in the HDF file.
4552 From Stephen Fegan <sfegan@astro.ucla.edu>.
4554 2006-06-08 John W. Eaton <jwe@octave.org>
4556 * ov-usr-fcn.cc (function::do_multi_index_op): Append contents of
4557 varargout to ret_list before calling convert_to_const_vector.
4559 * pt-arg-list.cc (tree_argument_list::convert_to_const_vector):
4560 No need to handle all_va_args here.
4562 * ov-va-args.h, ov-va-args.cc: Delete files.
4563 * Makefile.in (OV_INCLUDES, OV_SRC): Delete from the lists.
4565 * ov.cc (install_types): Don't register octave_all_va_args type.
4566 * ov.h, ov.cc (octave_value::octave_value (octave_value::all_va_args)):
4568 * ov.h (octave_value::is_all_va_args): Delete.
4569 (octave_value::enum all_va_args): Delete.
4571 * pt-pr-code.cc (tree_print_code::visit_octave_user_function_header):
4572 Print "varargout" and "varargin" instead of "...".
4574 * pt-misc.h, pt-misc.cc (tree_parameter_list::convert_to_const_vector):
4575 Arg is now const Cell& instead of tree_va_return_list*.
4577 * ov-usr-fcn.h, ov-usr-fcn.cc (octave_user_function::vr_list,
4578 octave_user_function::curr_va_arg_number):
4579 Delete variables and all uses.
4580 (octave_function::octave_va_start, octave_function::octave_va_arg,
4581 octave_function::octave_vr_val, octave_function::has_varargout):
4582 Delete functions and all uses.
4584 * ov-fcn.h (octave_function::octave_va_start,
4585 octave_function::octave_va_arg, octave_function::octave_vr_val,
4586 octave_function::has_varargout): Delete.
4588 * ov-usr-fcn.cc (Fva_arg, Fva_start, Fvr_val): Delete.
4590 * lex.l ({EL}): Don't handle "..." as varargin or varargout.
4591 * octave.gperf (all_va_args, ALL_VA_ARGS, all_va_args_kw): Delete.
4592 * parse.y (ALL_VA_ARGS): Delete token and all uses.
4594 * defaults.h.in (OCTAVE_DATAROOTDIR): Substitute here.
4595 * toplev.cc (octave_config_info): Add datarootdir to the struct.
4597 2006-06-07 John W. Eaton <jwe@octave.org>
4599 * ov-cell.cc (octave_cell::subsasgn): Handle c-s list object on
4600 RHS if last index is '{'.
4601 * pt-assign.cc (tree_multi_assignment::rvalue): Compute all LHS
4602 lvalues before evaluating RHS. If LHS lvalue expects more than
4603 one output, pass octave_cs_list object to assign method.
4604 * pt-idx.cc (tree_index_expression::lvalue): Compute expected
4605 number of values if '{' index appears last.
4606 * pt-arg-list.cc (tree_argument_list::lvalue_list): New function.
4607 * pt-arg-list.h (tree_argument_list::lvalue_list): Provide decl.
4608 * oct-lvalue.h (octave_lvalue::nel): New data member.
4609 (octave_lvalue::numel): New functions
4610 * oct-obj.cc (octave_value_list::has_magic_colon): New function.
4611 * oct-obj.h (octave_value_list::has_magic_colon): Provide decl.
4612 * pt-arg-list.cc (tree_argument_list::nargout_count): Delete function.
4613 * pt-arg-list.h (tree_argument_list::nargout_count): Delete decl.
4615 2006-06-06 John W. Eaton <jwe@octave.org>
4617 * sighandlers.cc (generic_sig_handler, sigint_handler):
4618 Use strsignal instead of accessing sys_siglist directly.
4619 * siglist.h: Use HAVE_DECL_SYS_SIGLIST instead of SYS_SIGLIST_DECLARED.
4620 * siglist.c: Update sys_siglist.
4621 (init_signals, strsignal): New functions.
4622 * octave.cc (octave_main): Call init_signals here.
4624 * toplev.cc (Foctave_config_info): Delete LIBPLPLOT from struct.
4626 2006-06-05 John W. Eaton <jwe@octave.org>
4628 * pt-assign.cc (Vprint_rhs_assign_val): Delete variable.
4629 (Fprint_rhs_assign_val): Delete function.
4630 tree_simple_assignment::rvalue, tree_multi_assignment::rvalue):
4631 No special case for Vprint_rhs_assign_val.
4633 2006-06-02 John W. Eaton <jwe@octave.org>
4635 * pt-arg-list.h (tree_argument_list::mark_as_simple_assign_lhs,
4636 tree_argument_list::is_simple_assign_lhs): New functions.
4637 (tree_argument_list::simple_assign_lhs): New data member.
4638 * parse.y (assign_lhs): Classify LHS here.
4639 (make_assign_op): Create simple or multi assign op based on
4640 classification of LHS, not its length.
4642 2006-06-01 John W. Eaton <jwe@octave.org>
4644 * Makefile.in (DLD_XSRC): Add __pchip_deriv__.cc to the list.
4646 2006-06-01 David Bateman <dbateman@free.fr>
4648 * DLD-FUNCTIONS/__pchip_deriv__.cc: New file.
4650 2006-05-31 John W. Eaton <jwe@octave.org>
4652 * load-path.h (load_path::set_command_line_path): Make it
4655 2006-05-26 John W. Eaton <jwe@octave.org>
4657 * load-path.cc (genpath, maybe_add_path_elts, Fgenpath, Frehash,
4658 Fpath, Fpathdef): Move here from defaults.cc.
4659 * load-path.cc, load-path.h: New files.
4660 * Makefile.in (INCLUDES, DIST_SRC): Add them to the lists.
4661 * help.cc (make_name_list, simple_help): Use load_path instead of
4662 octave_fcn_file_name_cache.
4663 (Flookfor): Use load_path instead of Vload_path_dir_path.
4664 * octave.cc (octave_main): Likewise.
4665 * parse.y (load_fcn_from_file): Likewise.
4666 * utils.cc (Ffile_in_loadpath, file_in_path, fcn_file_in_path,
4667 oct_file_in_path): Likewise.
4668 * variables.cc (symbol_exist, symbol_out_of_date): Likewise.
4669 * DLD-FUNCTIONS/fftw_wisdom.cc (Ffftw_wisdom): Likewise.
4670 * utils.cc (Ffind_first_of_in_loadpath): Delete.
4671 * input.cc (octave_gets): Call load_path::update here.
4672 * dirfns.cc (octave_change_to_directory): Likewise.
4673 * defaults.cc (VLOADPATH, VDEFAULT_LOADPATH, Vload_path_dir_path,
4674 maybe_add_or_del_packages, update_load_path_dir_path,
4675 execute_default_pkg_add_files, set_load_path): Delete.
4676 * defaults.h.in (Vload_path_dir_path,
4677 execute_default_pkg_add_files, maybe_add_default_load_path,
4678 set_load_path): Delete decls.
4680 * fn-cache.h, fn-cache.cc: Delete.
4681 * Makefile.in (INCLUDES, DIST_SRC): Remove them from the lists.
4683 * input.cc (octave_gets): Only update Vlast_prompt_time if we are
4684 interactive and actually printing a prompt. Don't print prompt if
4685 reading startup files or command line files. Initialize
4686 Vlast_prompt_time to 0.
4688 * pr-output.cc (set_format): Always include space for sign.
4690 2006-05-23 John W. Eaton <jwe@octave.org>
4692 * load-save.cc (Fsave): Use tellp instead of pubseekoff to
4693 determine whether we are at beginning of file.
4695 * ov-intx.h (OCTAVE_VALUE_INT_SCALAR_T::increment,
4696 OCTAVE_VALUE_INT_SCALAR_T::decrement,
4697 OCTAVE_VALUE_INT_MATRIX_T::increment,
4698 OCTAVE_VALUE_INT_MATRIX_T::decrement): New functions.
4699 * OPERATORS/op-int.h (OCTAVE_INSTALL_M_INT_UNOPS,
4700 OCTAVE_INSTALL_S_INT_UNOPS, OCTAVE_M_INT_UNOPS,
4701 OCTAVE_S_INT_UNOPS): Uncomment increment and decrement ops.
4703 2006-05-19 John W. Eaton <jwe@octave.org>
4705 * symtab.cc (SYMBOL_DEF::document): If definition is a function,
4706 also pass doc string to function object.
4707 * ov-fcn.h (octave_function::document): New function.
4708 * defun.cc (print_usage (octave_function *)): New function.
4709 (print_usage (void)): New function.
4710 (print_usage (const std::string&)): Provide for backward
4711 compatibility. Ignore arg.
4712 (Fprint_usage): Don't accept arg.
4713 * defun-int.h (print_usage (void)): Provide decl.
4714 (print_usage (const std::string&)): Tag with GCC_ATTR_DEPRECATED.
4716 2006-05-04 David Bateman <dbateman@free.fr>
4718 * DLD-FUNCTIONS/conv2.cc: New file from Octave Forge.
4719 * Makefile.in (DLD_XSRC): Add it to the list
4721 2006-05-17 Bill Denney <bill@givebillmoney.com>
4723 * help.cc (keywords): Improve and Texinfoize.
4725 2006-05-17 John W. Eaton <jwe@octave.org>
4727 * symtab.cc (Vwhos_line_format): Show class instead of type.
4728 (symbol_table::parse_whos_line_format):
4729 Use 't' for "Type" and 'c' for "Class".
4730 (symbol_record::print_symbol_info_line): Likewise.
4731 (maybe_list_cmp_fcn): Fix casts.
4733 2006-05-11 John W. Eaton <jwe@octave.org>
4735 * octave.cc (IMAGE_PATH_OPTION): New macro.
4736 (usage_string, verbose_usage): Include --image-path option.
4737 (long_opts): Include --image-path.
4738 (octave_main): Handle IMAGE_PATH_OPTION.
4740 * toplev.cc (Foctave_config_info): Delete fcnfilepath, imagepath,
4741 localfcnfilepath, and localoctfilepath from the struct.
4742 * defaults.h.in (OCTAVE_FCNFILEPATH, OCTAVE_IMAGEPATH,
4743 OCTAVE_LOCALFCNFILEPATH, OCTAVE_LOCALOCTFILEPATH): Delete variables.
4745 * octave.cc (octave_main): Call set_exec_path and set_load_path
4746 instead of bind_internal_variable.
4748 * defaults.cc (Fpathdef): Rename from FDEFAULT_LOADPATH.
4749 Don't allow default path to be set.
4750 (Fpath): Rename from FLOADPATH. Make Matlab-compatible.
4751 (update_load_path_dir_path): No need to pass VDEFAULT_LOADPATH to
4752 dir_path constructor now.
4753 (update_exec_path, FDEFAULT_EXEC_PATH,
4754 set_default_default_exec_path, set_default_exec_path,
4755 maybe_add_default_load_path): Delete functions.
4756 (VDEFAULT_EXEC_PATH): Delete variable.
4757 (FEXEC_PATH): Leading and trailing colons no longer special.
4758 (set_exec_path, set_load_path, set_image_path,
4759 maybe_add_path_elts): New functions.
4760 (install_defaults): Call set_exec_path and set_load_path instead
4761 of set_default_exec_path and set_default_path. Don't call
4762 set_default_default_exec_path. Do call set_image_path.
4763 * defaults.cc (genpath, Fgenpath): New functions.
4764 (Vlocal_ver_oct_file_dir, Vlocal_api_oct_file_dir,
4765 Vlocal_oct_file_dir, Vlocal_ver_fcn_file_dir,
4766 Vlocal_api_fcn_file_dir, Vlocal_fcn_file_dir, Vimage_dir):
4768 (set_default_local_ver_oct_file_dir,
4769 set_default_local_api_oct_file_dir,
4770 set_default_local_oct_file_dir,
4771 set_default_local_ver_fcn_file_dir,
4772 set_default_local_api_fcn_file_dir,
4773 set_default_local_fcn_file_dir, set_default_image_dir):
4775 (install_defaults): Call them.
4776 * defaults.h.in (set_exec_path, set_load_path, set_image_path,
4777 Vlocal_ver_oct_file_dir, Vlocal_api_oct_file_dir,
4778 Vlocal_oct_file_dir, Vlocal_ver_fcn_file_dir,
4779 Vlocal_api_fcn_file_dir, Vlocal_fcn_file_dir,
4780 Vlocal_fcn_file_dir, Vimage_dir): Provide decls.
4782 2006-05-10 John W. Eaton <jwe@octave.org>
4784 * ov-cell.cc (Fcellstr): Trim trailing blanks.
4785 * Cell.h (Cell::Cell (const string_vector&)): New arg, TRIM.
4787 * oct-hist.cc (initialize_history, Fhistory_size):
4788 Also call command_history::set_size here.
4790 * defun.cc (Fprint_usage): New function.
4791 * help.cc (display_usage_text): New function.
4793 2006-05-09 Keith Goodman <kwgoodman@gmail.com>
4795 * DLD-FUNCTIONS/rand.cc: Doc string fix.
4797 2006-05-09 Jorge Barros de Abreu <ficmatin01@solar.com.br>
4799 * data.cc (FInf, FNaN): Fix typo in doc string.
4801 2006-05-08 John W. Eaton <jwe@octave.org>
4803 * Makefile.in (DEFUN_PATTERN): Match DEFUNX_DLD.
4804 * mkbuiltins: Handle XDEFUNX_DLD_INTERNAL.
4805 * mkgendoc: Likewise.
4806 * mk-pkg-add: Likewise. Do all the matching with sed.
4807 * defun-int.h (DEFINE_FUNX_INSTALLER_FUN, DEFINE_FUNX_INSTALLER_FUN2,
4808 DEFINE_FUNX_INSTALLER_FUN3): New macros.
4809 (DEFINE_FUN_INSTALLER_FUN3): Define using DEFINE_FUNX_INSTALLER_FUN3.
4810 (DEFUNX_DLD_INTERNAL): New macro.
4811 * defun-dld.h (DEFUNX_DLD): New macro.
4813 * DLD-FUNCTIONS/__gnuplot_raw__.l: Mark __gnuplot_set__ as a
4814 command, not a rawcommand.
4816 * load-save.cc: No need to handle built-in variables.
4817 * help.cc (simple_help): No need to handle built-in variables.
4819 * variables.cc (is_builtin_variable, builtin_string_variable,
4820 builtin_real_scalar_variable, builtin_any_variable):
4822 (Fexist, Fdocument, do_who, Fwho, link_to_builtin_or_function):
4823 No need to handle built-in variables.
4824 * variables.h (is_builtin_variable, builtin_string_variable,
4825 builtin_real_scalar_variable, builtin_any_variable): Delete decls.
4827 * symtab.h (symbol_record::symbol_def::is_builtin_variable,
4828 symbol_record::is_builtin_variable): Delete.
4829 (symbol_record::TYPE): Remove BUILTIN_VARIABLE from enum.
4830 (symbol_record::symbol_def::is_variable, SYMTAB_ALL_TYPES,
4831 SYMTAB_VARIABLES): No need to handle built-in variables now.
4832 (symbol_record::define_builtin_variable,
4833 symbol_record::link_to_builtin_variable): Delete decls.
4834 * symtab.cc (record::define, SYMBOL_DEF::type,
4835 SYMBOL_DEF::type_as_string): No need to handle built-in variables.
4836 (symbol_record::define_builtin_variable): Delete.
4837 (symbol_record::variable_reference): No need to attemp to link to
4840 * utils.cc (check_preference, warn_old_style_preference): Delete.
4841 * utils.h (check_preference): Delete decl.
4843 * defun-int.h: Delete all DEFVAR macros.
4845 * Makefile.in, mkbuiltins: No need for VAR_FILES.
4847 * parse.y (current_script_file_name): Delete all uses.
4848 (clear_current_script_file_name): Delete function.
4850 * variables.cc (symbols_of_variables): Delete DEFVAR and function.
4851 (bind_ans): Lookup ans in curr_sym_tab, not fbi_sym_tab.
4852 SR is no longer static, so we insert value in local scope.
4854 * defun.cc (bind_builtin_variable): Delete function.
4855 * defun-int.h: Delete decl.
4857 * defaults.cc (fftw_wisdom_program): Rename from fftw_wisdom_prog.
4859 (VDEFAULT_LOADPATH): Rename from Vdefault_load_path. Change all uses.
4860 (VLOADPATH): Rename from Vload_path. Change all uses.
4861 (VDEFAULT_EXECPATH): Rename from Vdefault_exec_path. Change all uses.
4862 (VEXECPATH): Rename from Vexec_path. Change all uses.
4863 (VEDITOR): Rename from Veditor. Change all uses.
4864 (Ffftw_wisdom_program, FDEFAULT_LOADPATH, FLOADPATH,
4865 FDEFAULT_EXEC_PATH, FEXEC_PATH, FEDITOR, FIMAGEPATH): New functions.
4866 (fftw_wisdom_program, default_load_path, loadpath,
4867 default_exec_path, exec_path, editor, image_path): Delete functions.
4868 (symbols_of_defaults): Delete DEFVARs and function.
4870 * pr-output.cc (set_output_prec_and_fw): Set Voutput_precision and
4871 Voutput_max_field_width directly instead of calling
4872 bind_builtin_variable.
4874 * octave.cc (octave_main, maximum_braindamage):
4875 Call bind_internal_variable instead of bind_builtin_variable.
4877 * pager.cc (Fmore): Set Vpage_screen_output directly instead of
4878 calling bind_builtin_variable.
4880 * error.cc (Fwarning): Set Vdebug_on_warning directly instead of
4881 calling bind_builtin_variable.
4883 * error.cc (initialize_warning_options): Now static.
4884 (disable_warning, initialize_default_warning_state): New functions.
4886 * error.h (initialize_warning_options): Delete decl.
4887 (initialize_default_warning_state): Provide decl.
4888 * octave.cc (octave_main): Call initialize_default_warning_state
4889 instead initialize_warning_options.
4891 * lex.l (warn_matlab_incompatible, warn_separator_insert,
4892 warn_single_quote_string): Delete functions.
4893 (symbols_of_lex): Delete DEFVARS.
4894 (Vwarn_matlab_incompatible, Vwarn_separator_insert,
4895 Vwarn_single_quote_string): Delete variables.
4896 (maybe_warn_separator_insert, gripe_single_quote_string,
4897 gripe_matlab_incompatible): Call warning_with_id instead of warning.
4899 * variables.h (SET_NONEMPTY_INTERNAL_STRING_VARIABLE,
4900 SET_INTERNAL_VARIABLE_WITH_LIMITS): New macros.
4902 * ls-oct-ascii.cc (Fsave_precision): New function.
4903 (save_precision): Delete function.
4904 (symbols_of_ls_oct_ascii): Delete DEFVAR and function.
4906 * oct-hist.cc (initialize_history): New function.
4907 * oct-hist.h: Provide decl.
4908 * octave.cc (octave_main): Call initialize_history instead of
4909 command_history::read.
4911 * oct-hist.cc (Fhistory_size, Fhistory_file,
4912 Fhistory_timestamp_format_string, Fsaving_history): New functions.
4913 (history_size, history_file, history_timestamp_format_string,
4914 saving_history): Delete functions.
4915 (symbols_of_oct_hist): Delete DEFVARs and function.
4917 * pt-mat.cc (Fstring_fill_char): New function.
4918 (string_fill_char): Delete function.
4919 (symbols_of_pt_mat): Delete DEFVAR and function.
4921 * variables.cc (Fignore_function_time_stamp, ans): New functions.
4922 (ignore_function_time_stamp): Delete function.
4923 (symbols_of_variables): Delete DEFVARs and function.
4925 * oct-procbuf.cc: (Vkluge_procbuf_delay): Delete variable.
4926 (octave_procbuf::open): Never delay after fork.
4927 (kluge_procbuf_delay): Delete function.
4928 (symbols_of_oct_procbuf): Delete DEFVAR and function.
4930 * dirfns.cc (Fconfirm_recursive_rmdir): New function.
4931 (confirm_recursive_rmdir): Delete function.
4932 (symbols_of_dirfns): Delete DEFVAR and function.
4934 * error.cc (initialize_warning_options): Now extern.
4935 Rename from init_warning_options.
4936 * error.h: Provide decl.
4937 * octave.cc (octave_main): Call it here.
4939 * error.cc (Fbeep_on_error, Fdebug_on_error, Fdebug_on_warning):
4941 (beep_on_error, debug_on_error, debug_on_warning): Delete Functions.
4942 (symbols_of_error): Delete DEFVARs and function.
4944 * help.cc (Finfo_file, Finfo_program, Fmakeinfo_program,
4945 Fsuppress_verbose_help_message): New function.
4946 (info_file, info_program, makeinfo_program,
4947 suppress_verbose_help_message): Delete function.
4948 (symbols_of_help): Delete DEFVARs and function.
4949 (Vinfo_program): Rename from Vinfo_prog. Change all uses.
4951 * input.cc (FPS1, FPS2, FPS4, Fcompletion_append_char,
4952 Fecho_executing_commands): New functions.
4953 (ps1, ps2, ps4, completion_append_char, echo_executing_commands):
4955 (symbols_of_input): Delete DEFVARs and function.
4956 (VPS1, VPS2, VPS4): Rename from Vps1, Vps2, Vps4. Change all uses.
4957 (Fecho): Set Vecho_executing_commands directly.
4959 * load-save.cc (crash_dumps_octave_core, Fdefault_save_options,
4960 Foctave_core_file_limit, Foctave_core_file_name,
4961 Foctave_core_file_options, Fsave_header_format_string):
4963 (crash_dumps_octave_core, default_save_options,
4964 octave_core_file_limit, octave_core_file_name,
4965 octave_core_file_options, save_header_format_string):
4967 (symbols_of_load_save): Delete DEFVARs and function.
4969 * ov-base.cc (Fprint_answer_id_name, Fsilent_functions): New functions.
4970 (print_answer_id_name, silent_functions): Delete functions.
4971 (symbols_of_ov_base): Delete DEFVARs and function.
4973 * ov-usr-fcn.cc (Fmax_recursion_depth): New function.
4974 (max_recursion_depth): Delete function.
4975 (symbols_of_ov_usr_fcn): Delete DEFVAR for max_recursion_depth.
4978 * pager.cc (Fpage_output_immediately, Fpage_screen_output, FPAGER):
4980 (page_output_immediately, page_screen_output, pager_binary):
4982 (symbols_of_pager): Delete DEFVARs and function.
4983 (VPAGER): Rename from Vpager_binary. Change all uses.
4985 * pr-output.cc (Ffixed_point_format, Fprint_empty_dimensions,
4986 Fsplit_long_rows, Foutput_max_field_width, Foutput_precision,
4987 Fstruct_levels_to_print): New functions.
4988 (fixed_point_format, print_empty_dimensions, split_long_rows,
4989 output_max_field_width, output_precision, struct_levels_to_print):
4991 (symbols_of_pr_output): Delete DEFVARs and function.
4993 * pt-assign.cc (Fprint_rhs_assign_val): New function.
4994 (print_rhs_assign_val): Delete function.
4995 (symbols_of_pt_assign): Delete DEFVAR. Delete function.
4997 * sighandlers.cc (Fdebug_on_interrupt, Fsighup_dumps_octave_core,
4998 Fsigterm_dumps_octave_core): New functions.
4999 (debug_on_interrupt, sighup_dumps_octave_core,
5000 sigterm_dumps_octave_core): Delete functions.
5001 (symbols_of_sighanlders): Delete DEFVARs. Delete function.
5003 * symtab.cc (Vdebug_symtab_lookups): Now bool.
5004 (Fdebug_symtab_lookups, Fwhos_line_format,
5005 Fvariables_can_hide_functions): New functions.
5006 (debug_symtab_lookups, whos_line_format,
5007 variables_can_hide_functions): Delete functions.
5008 (symbols_of_symtab): Delete DEFVARs and function.
5010 2006-05-04 David Bateman <dbateman@free.fr>
5012 * DLD-FUNCTIONS/sqqr (Fdmperm): Allow compilation with versions
5013 v2.0.0 of CXSparse or later.
5015 2006-05-04 John W. Eaton <jwe@octave.org>
5017 * variables.cc (set_internal_variable): Move here from
5018 DLD-FUNCTIONS/__gnuplot_raw__.l.
5019 * variables.h (SET_INTERNAL_VARIABLE): Likewise.
5020 (set_internal_variable): Provide decls.
5022 * DLD-FUNCTIONS/__gnuplot_raw__.l: Convert all DEFVARs to DEFUN_DLDs.
5023 (gnuplot::init): Delete.
5024 (gnuplot::gnuplot): Don't call init here.
5025 (set_internal_variable): New functions.
5026 (SET_INTERNAL_VARIABLE): New macro.
5028 * Makefile.in: Undo changes of 2006-03-16.
5029 * DLD-FUNCTINS/__gnuplot_raw__.l: Move here from __gnuplot_raw__.l.
5030 Undo changes of 2006-03-16.
5032 2006-05-03 David Bateman <dbateman@free.fr>
5034 * ov-base-mat.h: Add caching of matrix type, and code to supply
5035 and copy matrix type.
5036 * ov-bool-mat.h: Add caching to constructor.
5037 * ov-re-mat.h: ditto.
5038 * ov-cx-mat.h: ditto.
5039 * ov.cc: Add to the BoolMatrix, Matrix and the ComplexMatrix
5040 octave_value constructors, the ability to specify the matrix type.
5041 * ov.h: Adapt declaration of above constructors.
5042 (MatrixType matrix_type(void) const, MatrixType matrix_type (const
5043 MatrixType&)): New functions for probing and setting matrix type.
5044 * ov-base.cc (virtual MatrixType matrix_type(void) const, virtual
5045 MatrixType matrix_type (const MatrixType&)): New default functions
5046 for probing and setting matrix type.
5047 * ov-base.h (virtual MatrixType matrix_type(void) const, virtual
5048 MatrixType matrix_type (const MatrixType&)): Declarations.
5049 * ov-base-sparse.h: Replace all uses of SparseType with
5050 MatrixType. Replace sparse_type function with matrix_type function.
5051 * ov-bool-sparse.h: Replace all uses of SparseType with MatrixType.
5052 * ov-cx-sparse.h: ditto.
5053 * ov-re-sparse.h: ditto.
5054 * sparse-xdiv.cc: ditto.
5055 * sparse-xdiv.h: ditto.
5056 * sparse-xpow.cc: ditto.
5057 * DLD-FUNCTIONS/luinc.cc: ditto.
5058 * DLD-FUNCTIONS/splu.cc: ditto.
5059 * xdiv.cc (xdiv, xleftdiv): Pass the matrix type, simplfy since
5060 the matrix solve function now calls lssolve if singular.
5061 * xdiv.h (xdvi, xleftdiv): Update the declarations
5062 * OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc,
5063 OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc,
5064 OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc,
5065 OPERATORS/op-cs-cm.cc, OPERATORS/op-cs-m.cc,
5066 OPERATORS/op-m-cm.cc, OPERATORS/op-m-cs.cc,
5067 OPERATORS/op-m-m.cc, OPERATORS/op-m-s.cc,
5068 OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc,
5069 OPERATORS/op-s-cm.cc, OPERATORS/op-s-m.cc,
5070 OPERATORS/op-scm-cm.cc, OPERATORS/op-scm-m.cc,
5071 OPERATORS/op-sm-cm.cc, OPERATORS/op-sm-m.cc: Update use of
5072 xdiv and xleftdiv functions to allow matrix type caching.
5073 * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Update to allow typing
5074 of Matrix, and ComplexMatrix types. Add new test code for this.
5076 * DLD-FUNCTIONS/cellfun.cc (Fmat2cell): new function.
5078 * DLD-FUNCTIONS/regexp.cc (class regexp_elem): New class to store
5079 matched element in a std::list.
5080 (octregexp_list): Take algorithm from octregexp and construct a
5082 (octregexp): Rewrite to use linked list of matches.
5083 (Fregexprep): New function, working directly in linked list of
5086 2006-05-02 John W. Eaton <jwe@octave.org>
5088 * lex.l ({CCHAR}): Exit rawcommand mode if returning '\n' token.
5090 2006-05-02 David Bateman <dbateman@free.fr>
5092 * DLD-FUNCTIONS/rand.cc (do_rand): Require real scalar for seed.
5094 2006-05-01 John W. Eaton <jwe@octave.org>
5096 * error.h (Vwarning_option): Delete.
5097 * variables.cc (looks_like_struct): Remove use from commented code.
5099 * gripes.cc, gripes.h (gripe_implicit_conversion): New arg, ID.
5102 * defaults.cc (set_local_site_defaults_file, set_site_defaults_file):
5103 Allow filenames to be set from the environment.
5105 * oct-map.cc (octave_map::resize): No longer const.
5106 * ov-struct.h (octave_struct::resize): Deal with it.
5108 * octave.cc (initialize_error_handlers): Also call
5109 set_liboctave_warning_with_id_handler.
5110 (execute_startup_files): Check that home_rc is not an empty string.
5111 (F__version_info__): Resize vinfo before assigining elements.
5113 * ov-base.cc (warn_num_to_str, warn_resize_on_range_error):
5115 (symbols_of_ov_base): Delete DEFVARS.
5116 (Vwarn_num_to_str, Vwarn_resize_on_range_error): Delete variables.
5117 (value::convert_to_str): Check state of warning ID
5118 Octave:num-to-str instead of using Vwarn_num_to_str.
5119 * OPERATORS/op-chm.cc: Likewise.
5120 * ov-base.h (Vwarn_num_to_str, Vwarn_resize_on_range_error):
5123 * ov-list.cc (octave_list::assign): Call warning_with_id instead
5126 * parse.y (warn_assign_as_truth_value, warn_associativity_change,
5127 warn_function_name_clash, warn_future_time_stamp,
5128 warn_missing_semicolon, warn_precedence_change,
5129 warn_variable_switch_label, symbols_of_parse):
5130 Delete DEFVARs and functions.
5131 (Vwarn_assign_as_truth_value, Vwarn_associativity_change,
5132 Vwarn_function_name_clash, Vwarn_future_time_stamp,
5133 Vwarn_missing_semicolon, Vwarn_precedence_change,
5134 Vwarn_variable_switch_label): Delete variables.
5135 * parse.h (Vwarn_future_time_stamp): Delete decl.
5136 * parse.y (fold): Check state of warning ID
5137 Octave:associativity-change and Octave:precedence-change instead
5138 of using Vwarn_associativity_change and Vwarn_precedence_change.
5139 (maybe_warn_associativity_change, maybe_warn_missing_semi,
5140 maybe_warn_assign_as_truth_value, make_binary_op, make_boolean_op,
5141 frob_function): Call warning_with_id instead of warning.
5142 * dynamic-ld.cc (octave_dynamic_loader::do_load): Likewise.
5144 * ov.cc (warn_fortran_indexing, warn_imag_to_real, symbols_of_ov):
5145 Delete DEFVARs and functions.
5146 (Vwarn_fortran_indexing, Vwarn_imag_to_real): Delete variables.
5148 * ov.cc (octave_value::vector_value, octave_value::int_vector_value,
5149 octave_value::complex_vector_value): Check state of warning ID
5150 Octave:fortran-indexing instead of using Vwarn_fortran_indexing.
5151 * ov-cx-sparse.cc (octave_sparse_complex_matrix::double_value,
5152 octave_sparse_complex_matrix::complex_value): Likewise.
5153 * ov-cx-mat.cc (octave_complex_matrix::matrix_value,
5154 octave_complex_matrix::complex_value): Likewise.
5155 * ov-re-mat.cc (octave_matrix::complex_value,
5156 octave_matrix::double_value): Likewise.
5157 * ov-streamoff.cc (octave_streamoff::streamoff_value): Likewise.
5158 * ov-re-sparse.cc (octave_sparse_matrix::complex_value,
5159 octave_sparse_matrix::double_value): Likewise.
5160 * ov-range.cc (octave_range::complex_value,
5161 octave_range::double_value): Likewise.
5162 * ov-ch-mat.cc (octave_char_matrix::complex_value,
5163 octave_char_matrix::double_value): Likewise.
5164 * ov-bool-sparse.cc (octave_sparse_bool_matrix::complex_value,
5165 octave_sparse_bool_matrix::double_value): Likewise.
5166 * ov-bool-mat.cc (octave_bool_matrix::complex_value,
5167 octave_bool_matrix::double_value): Likewise.
5169 * ov-cx-sparse.cc (octave_sparse_complex_matrix::double_value,
5170 octave_sparse_complex_matrix::matrix_value,
5171 octave_sparse_complex_matrix::sparse_matrix_value): Check state of
5172 warning ID Octave:imag-to-real instead of using Vwarn_imag_to_real.
5173 * ov-cx-mat.cc (octave_complex_matrix::double_value,
5174 octave_complex_matrix::matrix_value,
5175 octave_complex_matrix::complex_value,
5176 octave_complex_matrix::sparse_matrix_value): Likewise.
5177 * ov-complex.cc (octave_complex::double_value,
5178 octave_complex::matrix_value, octave_complex::array_value): Likewise.
5180 * ov.h (Vwarn_fortran_indexing, Vwarn_imag_to_real): Delete decls.
5182 * pt-mat.cc (warn_empty_list_elements, warn_string_concat):
5184 (symbols_of_pt_mat): Delete DEFVARs.
5185 (Vwarn_empty_list_elements, Vwarn_string_concat): Delete variables.
5186 (tm_row_const::tm_row_const_rep::eval_warning, tm_const::init,
5187 maybe_warn_string_concat): Call warning_with_id instead of warning.
5189 * ov-str-mat.cc (warn_str_to_num, symbols_of_ov_str_mat):
5190 Delete DEFVAR and functions.
5191 (Vwarn_str_to_num): Delete variable.
5192 (CHAR_MATRIX_CONV): Call warning_with_id instead of warning.
5194 * utils.cc (warn_neg_dim_as_zero, symbols_of_utils):
5195 Delete DEFVAR and functions.
5196 (Vwarn_neg_dim_as_zero): Delete variable.
5197 (check_dimensions): Call warning_with_id instead of warning.
5199 * pt-misc.cc (warn_undefined_return_values, symbols_of_pt_misc):
5200 Delete DEFVAR and functions.
5201 (Vwarn_undefined_return_values): Delete variable.
5202 (tree_parameter_list::initialize_undefined_elements):
5203 Call warning_with_id instead of warning.
5205 * dynamic-ld.cc (warn_reload_forces_clear, symbols_of_dynamic_ld):
5206 Delete DEFVAR and functions.
5207 (Vwarn_reload_forces_clear): Delete variable.
5208 (do_clear_function, octave_dynamic_loader::do_load):
5209 Call warning_with_id instead of warning.
5210 * error.cc (warning_enabled): Now extern.
5211 (Fwarning): If specific id is not found, return state of "all".
5213 * error.h: Provide decl.
5215 * gripes.cc (warn_divide_by_zero, symbols_of_gripes):
5216 Delete DEFVAR and functions.
5217 (gripe_divide_by_zero): Check whether warning is enabled, then
5218 call warning_with_id instead of warning.
5219 (Vwarn_divide_by_zero): Delete variable.
5221 2006-04-27 John W. Eaton <jwe@octave.org>
5223 * variables.cc (Fexist): Fix doc string.
5225 * help.cc (simple_help): No need to handle built-in constants now.
5226 * variables.cc (do_who): Likewise.
5227 (symbol_exist): Likewise.
5228 (link_to_builtin_or_function): Likewise.
5229 * symtab.cc (SYMBOL_DEF::type_as_string): Likewise.
5230 (record::read_only_error): Likewise.
5231 (SYMBOL_DEF::type): Likewise.
5232 (record::variable_reference): Likewise.
5233 (symbol_record::define_builtin_const): Delete function.
5235 * symtab.h (symbol_record::define_builtin_const): Delete decl.
5236 (symbol_record::symbol_def::is_constant): Delete function.
5237 (symbol_record::symbol_def::is_builtin_constant): Delete function.
5238 (symbol_record::symbol_def::is_constant): Delete function.
5239 (symbol_record::is_builtin_constant): Delete function.
5240 (SYMTAB_ALL_TYPES): No need to handle builtin-constants now.
5241 (symbol_record::TYPE): Remove BUILTIN_CONSTANT from enum.
5243 * defun.cc (install_builtin_constant): Delete function.
5244 * defun-int.h (install_builtin_constant): Delete decl.
5246 * variables.cc (bind_builtin_constant): Delete function.
5247 * variables.h (bind_builtin_constant): Delete decl.
5249 * defun-int.h (DEFCONST, DEFCONSTX, DEFCONST_INTERNAL,
5250 DEFCONSTX_INTERNAL): Delete definitions.
5252 * sighandlers.cc (FSIG): New function to replace DEFCONST in
5253 symbols_of_sighandlers.
5255 * octave.cc (intern_argv): Set octave_argv instead of calling
5256 bind_builtin_variable here.
5257 (Fargv, Fprogram_invocation_name, Fprogram_name): New functions to
5258 replace DEFCONSTs in symbols_of_toplvev in toplev.cc.
5259 (octave_program_invocation_name, octave_program_name):
5260 New static variables.
5261 (execute_command_line_file): Use unwind_protect_str to protect
5262 octave_program_invocation_name, octave_program_name instead of
5263 using a restore function.
5264 (restore_program_name): Delete.
5266 * defaults.cc (FOCTAVE_HOME): New function to replace DEFCONST in
5267 symbols_of_defaults.
5269 2006-04-27 David Bateman <dbateman@free.fr>
5271 * DLD-FUNCTIONS/regexp.cc (octregexp): Fix for infinite loop in
5272 regexp. Include news regexp arguments, and associated tests.
5274 2006-04-26 John W. Eaton <jwe@octave.org>
5276 * oct-stream.cc: Also instantiate do_read functions for boolNDArray.
5278 2006-04-26 Bill Denney <denney@seas.upenn.edu>
5280 * pager.cc (Fterminal_size): Add list_in_columns to @seealso.
5282 2006-04-26 John W. Eaton <jwe@octave.org>
5284 * dirfns.cc (Ffilesep): New function to replace DEFCONST in
5286 (Fpathsep): New function.
5288 * defaults.cc (set_default_default_exec_path): Use
5289 dir_path::path_sep_str instead of std::string (SEPCHAR_STR).
5290 (set_default_exec_path): Likewise.
5291 (set_default_path): Likewise.
5292 (maybe_add_default_load_path): Likewise. Use dir_path::is_path_sep.
5294 2006-04-18 John W. Eaton <jwe@octave.org>
5296 * DLD-FUNCTIONS/regexp.cc: Include <algorithm>, for transform decl.
5298 * DLD-FUNCTIONS/ccolamd.cc (Fccolamd, Fcsymamd):
5299 Always return something.
5301 * sighandlers.cc (octave_set_signal_handler,
5302 octave_set_interrupt_handler): New arg, restart_syscalls, with
5304 * sighandlers.h: Fix decls to match.
5305 * sysdep.cc (octave_kbhit): Disable restarting of system calls.
5307 * help.cc (Flookfor): Add std qualifier to transform function.
5308 Include <algorithm>, for transform decl.
5310 2006-04-16 John W. Eaton <jwe@octave.org>
5312 * pager.h (octave_diary_buf, octave_pager_buf): Use std:stringbuf
5315 * ls-mat-ascii.cc (read_mat_ascii_data): Use std::istringstream
5317 * load-save.cc (parse_save_options): Likewise.
5318 * ls-mat5.cc (read_mat5_binary_element): Likewise.
5319 * oct-strstrm.h (octave_istrstream::is): Likewise.
5321 * __gnuplot_raw__.l (printrange, handle_using, gnuplot::do_open,
5322 gnuplot::do_set, gnuplot::do_show, gnuplot::makeplot,
5323 gnuplot::handle_title): Use std::ostringstream directly.
5324 * toplev.cc (run_command_and_return_output): Likewise.
5325 * symtab.h (symbol_table::symbol_table): Likewise.
5326 * strfns.cc (Flist_in_columns): Likewise.
5327 * pt.cc (tree::str_print_code): Likewise.
5328 * parse.y (yyerror, fold, finish_matrix): Likewise.
5329 * pr-output.cc (PRINT_ND_ARRAY, octave_print_internal, Fdisp):
5331 * symtab.cc (symbol_table::print_descriptor): Likewise.
5332 * ov-list.cc (octave_list::print_raw, octave_list::save_ascii,
5333 octave_list::save_binary, octave_list::save_hdf5): Likewise.
5334 * ov-fcn-inline.cc (octave_fcn_inline::octave_fcn_inline,
5335 octave_fcn_inline::load_ascii, octave_fcn_inline::print_raw,
5337 * ov-fcn-handle.cc (octave_fcn_handle::load_ascii,
5338 octave_fcn_handle::save_binary, octave_fcn_handle::save_hdf5):
5340 * ov-cs-list.cc (octave_cs_list::print_raw): Likewise.
5341 * ov-cell.cc (octave_cell::print_raw, octave_cell::save_hdf5):
5343 * oct-strstrm.h (octave_ostrstream::os, octave_ostrstream::str):
5345 * oct-stream.h (scanf_format_list::buf, printf_format_list::buf):
5347 * oct-stream.cc (scanf_format_list::scanf_format_list,
5348 printf_format_list::printf_format_list,
5349 octave_base_stream::do_gets, BEGIN_CHAR_CLASS_CONVERSION,
5350 octave_stream_list::do_list_open_files): Likewise.
5351 * ls-oct-ascii.h (extract_keyword): Likewise.
5352 * load-save.cc (do_load): Likewise.
5353 * lex.l (have_continuation, handle_string): Likewise.
5354 * input.cc (get_user_input): Likewise.
5355 * dirfns.cc (Fls): Likewise.
5356 * error.cc (error_message_buffer, vwarning, verror, pr_where):
5358 * defun.cc (print_usage): Likewise.
5359 * help.cc (display_help_text, Ftype, first_help_sentence):
5361 * ls-mat5.cc (save_mat5_binary_element): Likewise.
5362 * DLD-FUNCTIONS/regexp.cc (octregexp): Likewise.
5363 * DLD-FUNCTIONS/fftw_wisdom.cc (Ffftw_wisdom): Likewise.
5365 2006-04-13 John W. Eaton <jwe@octave.org>
5367 * Makefile.in (lex.o parse.o __gnuplot_raw__.o, pic/parse.o
5368 pic/__gnuplot_raw__.o): Omit -Wold-style-cast from CXXFLAGS.
5370 * ls-mat5.cc (READ_INTEGER_DATA): Allocate local buffer to avoid
5373 * DLD-FUNCTIONS/regexp.cc (octregexp): Use OCTAVE_LOCAL_BUFFER
5374 instead of allocting memory with malloc.
5376 * DLD-FUNCTIONS/sparse.cc (Fsparse): Use octave_value extractors
5377 instead of using get_rep.
5379 * DLD-FUNCTIONS/dispatch.cc (dispatch_record): Use dynamic_cast,
5380 not reinterpret_cast.
5382 * DLD-FUNCTIONS/besselj.cc (Fairy): Use int_value instead of
5383 double_value and cast to extract kind arg.
5384 (int_arrayN_to_array): Arg is ArrayN<octave_idx_type>, not ArrayN<int>.
5386 * OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc,
5387 OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc,
5388 OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc,
5389 OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc,
5390 OPERATORS/op-scm-cm.cc, OPERATORS/op-scm-cs.cc,
5391 OPERATORS/op-scm-m.cc, OPERATORS/op-scm-s.cc,
5392 OPERATORS/op-scm-scm.cc, OPERATORS/op-scm-sm.cc,
5393 OPERATORS/op-sm-cm.cc, OPERATORS/op-sm-cs.cc,
5394 OPERATORS/op-sm-m.cc, OPERATORS/op-sm-s.cc,
5395 OPERATORS/op-sm-scm.cc, OPERATORS/op-sm-sm.cc: No need to cast
5396 away const just to cache sparse type.
5397 * ov-base-sparse.h (octave_base_sparse::typ): Now mutable.
5398 (octave_base_sparse::sparse_type): Now const.
5400 * OPERATORS/op-cm-scm.cc (DEFBINOP(div)): Explicitly cast args
5401 here instead of using CAST_BINOP_ARGS.
5403 * OPERATORS/op-streamoff.cc (STREAMOFF_COMP_OP): Second arg to
5404 CAST_BINOP_ARGS is also const.
5406 * DLD-FUNCTIONS/chol.cc (Fcholinv, Fchol2inv): Eliminate nargout
5407 arg to avoid unused variable warnings.
5409 * unwind-prot.h, unwind-prot.cc (unwind_protect::save_bool,
5410 unwind_protect::save_int, unwind_protect::save_str,
5411 unwind_protect::save_ptr, unwind_protect::save_var):
5412 Pointer args now const.
5413 (unwind_protect_const_ptr): New macro.
5415 * symtab.cc (maybe_list_cmp_fcn): Use static_cast instead of X_CAST.
5416 * variables.cc (symbol_record_name_compare): Likewise.
5417 * ls-mat5.cc (MAT5_DO_WRITE, save_mat5_binary_element): Likewise.
5419 * ov-fcn-handle.cc (octave_fcn_handle::save_hdf5,
5420 octave_fcn_handle::load_hdf5): Eliminate unnecessary casts.
5421 * ov-fcn-inline.cc (octave_fcn_inline::save_hdf5,
5422 octave_fcn_inline::load_hdf5): Likewise.
5423 * ov-str-mat.cc (octave_char_matrix_str::save_hdf5,
5424 octave_char_matrix_str::load_hdf5): Likewise.
5425 * ov-bool-sparse.cc (octave_sparse_bool_matrix::save_hdf5,
5426 octave_sparse_bool_matrix::load_hdf5): Likewise.
5427 * ov-cx-sparse.cc (octave_sparse_complex_matrix::save_hdf5,
5428 octave_sparse_complex_matrix::load_hdf5): Likewise.
5429 * ov-re-sparse.cc (octave_sparse_matrix::save_hdf5,
5430 octave_sparse_matrix::load_hdf5): Likewise.
5431 * ov-str-mat.cc (octave_char_matrix_str::save_ascii,
5432 octave_char_matrix_str::load_ascii): Likewise.
5433 * mappers.cc (xtoascii): Likewise.
5434 * load-save.cc (read_binary_file_header, write_header): Likewise.
5435 * parse.y (get_help_from_file, parse_fcn_file): Likewise.
5436 * DLD-FUNCTIONS/rand.cc (do_rand): Likewise.
5437 * ls-hdf5.cc (read_hdf5_data, hdf5_add_attr, save_hdf5_empty,
5438 load_hdf5_empty add_hdf5_data): Likewise.
5439 * ls-mat4.cc (read_mat_binary_data): Likewise.
5440 * ls-mat5.cc (read_mat5_binary_element): Likewise.
5442 * oct-stream.cc (expand_char_class, octave_base_stream::do_gets):
5443 Use static_cast instead of C-style cast.
5444 * oct-procbuf.cc (kluge_procbuf_delay): Likewise.
5445 * parse.y (gobble_leading_white_space,: Likewise.
5446 * DLD-FUNCTIONS/besselj.cc (int_array2_to_matrix,
5447 int_arrayN_to_array): Likewise.
5448 * DLD-FUNCTIONS/colamd.cc (Fcolamd, Fsymamd): Likewise.
5449 * DLD-FUNCTIONS/ccolamd.cc (Fcsymamd): Likewise.
5450 * pt-pr-code.cc (tree_print_code::print_comment_elt): Likewise.
5451 * DLD-FUNCTIONS/besselj.cc (do_bessel): Likewise.
5452 * DLD-FUNCTIONS/spchol.cc (Fsymfact): Likewise.
5453 * DLD-FUNCTIONS/sparse.cc (sparse_find): Likewise.
5454 * DLD-FUNCTIONS/sort.cc (FloatFlip): Likewise.
5455 * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Likewise.
5456 * ls-mat5.cc (read_mat5_binary_element, OCTAVE_MAT5_INTEGER_READ,
5457 read_mat5_binary_element, save_mat5_binary_element): Likewise.
5459 * DLD-FUNCTIONS/splu.cc (Fspinv): Use dynamic_cast instead of
5461 * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Likewise.
5463 * DLD-FUNCTIONS/sort.cc (mx_sort): Use reinterpret_cast instead of
5465 * ls-mat5.cc (write_mat5_tag): Likewise.
5467 * ov-typeinfo.h (octave_value_typeinfo::octave_value_typeinfo):
5468 Eliminate unnecessary casts in constructor initializers.
5470 * ops.h (CAST_CONV_ARG, CAST_UNOP_ARG, CAST_BINOP_ARGS,
5471 DEFASSIGNANYOP_FN): Use C++ dynamic_cast instead of DYNAMIC_CAST macro.
5473 * unwind-prot.h (unwind_protect_ptr): Use combination of
5474 reinterpret_cast and const_cast instead of X_CAST.
5476 * dynamic-ld.cc (loader::do_load): Use reinterpret_cast instead of
5478 * ov-base-int.cc (octave_base_int_matrix<T>::save_binary,
5479 octave_base_int_matrix<T>::load_binary,
5480 octave_base_int_scalar<T>::save_binary,
5481 octave_base_int_scalar<T>::load_binary): Likewise.
5482 * ov-bool-mat.cc (octave_bool_matrix::save_binary,
5483 octave_bool_matrix::load_binary): Likewise.
5484 * ov-bool-sparse.cc (octave_sparse_bool_matrix::save_binary,
5485 octave_sparse_bool_matrix::load_binary): Likewise.
5486 * ov-bool.cc (octave_bool::save_binary, octave_bool::load_binary):
5488 * ov-cell.cc (octave_cell::save_binary, octave_cell::load_binary):
5490 * ov-complex.cc (octave_complex::save_binary,
5491 octave_complex::load_binary): Likewise.
5492 * ov-cx-mat.cc (octave_matrix::save_binary,
5493 octave_matrix::load_binary): Likewise.
5494 * ov-cx-sparse.cc (octave_sparse_complex_matrix::save_binary,
5495 octave_sparse_complex_matrix::load_binary): Likewise.
5496 * ov-fcn-handle.cc (octave_fcn_handle::save_binary,
5497 octave_fcn_handle::load_binary): Likewise.
5498 * ov-fcn-inline.cc (octave_fcn_inline::save_binary,
5499 octave_fcn_inline::load_binary): Likewise.
5500 * ov-list.cc (octave_list::save_binary, octave_list::load_binary):
5502 * ov-range.cc (octave_range::save_binary, octave_range::load_binary):
5504 * ov-re-mat.cc (octave_matrix::save_binary,
5505 octave_matrix::load_binary): Likewise.
5506 * ov-re-sparse.cc (octave_sparse_matrix::save_binary,
5507 octave_sparse_matrix::load_binary): Likewise.
5508 * ov-scalar.cc (octave_scalar::save_binary,
5509 octave_scalar::load_binary): Likewise.
5510 * ov-str-mat.cc (octave_char_matrix_str::save_binary,
5511 (octave_char_matrix_str::load_binary): Likewise.
5512 * ov-struct.cc (octave_struct::save_binary,
5513 octave_struct::load_binary): Likewise.
5514 * ls-oct-binary.cc (save_binary_data, read_binary_data): Likewise.
5515 * ls-mat4.cc (read_mat_file_header, save_mat_binary_data): Likewise.
5516 * ls-mat5.cc (read_mat5_tag, read_mat5_binary_element,
5517 read_mat5_binary_element, read_mat5_binary_file_header,
5518 MAT5_DO_WRITE, write_mat5_array, write_mat5_integer_data,
5519 save_mat5_binary_element, READ_INTEGER_DATA): Likewise.
5521 2006-04-12 John W. Eaton <jwe@octave.org>
5523 * ov.h (OV_REP_TYPE): New macro.
5525 * DLD-FUNCTIONS/sparse.cc (MINMAX_BODY): No need to cast arg1 to
5526 const octave_sparse_matrix&.
5528 * ov-base.cc (print_answer_id_name, warn_resize_on_range_error,
5529 warn_num_to_str, silent_functions): Move here, from ov.cc.
5530 (Vwarn_resize_on_range_error, Vsilent_functions): Likewise.
5531 (Vprint_answer_id_name): Likewise. Now static.
5532 (symbols_of_ov_base): New function. Move DEFVARs for
5533 print_answer_id_name, warn_resize_on_range_error, warn_num_to_str,
5534 and silent_functions here from symbols_of_ov in ov.cc.
5535 * ov.h (Vprint_answer_id_name): Delete decl.
5536 * ov-base.h (Vwarn_resize_on_range_error, Vwarn_num_to_str):
5537 Move decls here from ov.h.
5539 * ov-str-mat.cc (warn_str_to_num): Move here, from ov.cc.
5540 (Vwarn_str_to_num): Likewise. Now static.
5541 (symbols_of_ov_str_mat): New function. Move DEFVAR for
5542 warn_str_to_num here from symbols_of_ov in ov.cc.
5543 * ov.h (Vwarn_str_to_num): Delete decl.
5545 * ov-struct.cc (octave_struct::load_ascii): Pass loop counter, not
5546 count, to read_ascii.
5547 * ov-list.cc (octave_list::load_ascii): Likewise.
5549 * ov-list.cc (octave_list::do_index_op): Allow index to extract
5550 multiple items. Result is always a list.
5552 * pr-output.cc (struct_levels_to_print): Move here from ov.cc.
5553 (Vstruct-levels_to_print): Likewise.
5554 (symbols_of_pr_output): Move DEFVAR for struct_levels_to_print here
5555 from symbols_of_ov in ov.cc.
5556 * pr-output.h (Vstruct_levels_to_print): Nove decl here from ov.h.
5558 * gripes.cc (warn_divide_by_zero): Move here from ov.cc.
5559 (Vwarn_divide_by_zero): Likewise. Now static.
5560 (symbols_of_gripes): New function. Move DEFVAR for
5561 warn_divide_by_zero here from symbols_of_ov in ov.cc.
5562 * ov.h (Vwarn_divide_by_zero): Delete decl.
5564 * load-save.cc (do_load): Declare count octave_idx_type, not int.
5565 * ls-oct-ascii.cc, ls-oct-ascii.h (read_ascii_data): Likewise.
5567 Rearrange octave_value class hierarchy so that rep is a pointer
5568 an octave_base_value object and the octave_base_value class
5569 stores the reference count. Virtualness now goes with the
5570 octave_base_value class, not the octave_value class.
5572 * ops.h, ov-base-int.cc, ov-base-int.h, ov-base-mat.h,
5573 ov-base-scalar.h, ov-base-sparse.h, ov-base.cc, ov-base.h,
5574 ov-bool-mat.cc, ov-bool-mat.h, ov-bool-sparse.cc,
5575 ov-bool-sparse.h, ov-bool.cc, ov-bool.h, ov-cell.cc, ov-cell.h,
5576 ov-ch-mat.h, ov-colon.h, ov-complex.cc, ov-complex.h,
5577 ov-cs-list.h, ov-cx-mat.cc, ov-cx-mat.h, ov-cx-sparse.cc,
5578 ov-cx-sparse.h, ov-fcn-handle.h, ov-fcn-inline.h, ov-fcn.cc,
5579 ov-fcn.h, ov-intx.h, ov-list.cc, ov-list.h, ov-range.cc,
5580 ov-range.h, ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc,
5581 ov-re-sparse.h, ov-scalar.h, ov-str-mat.cc, ov-str-mat.h,
5582 ov-streamoff.h, ov-struct.cc, ov-struct.h, ov-type-conv.h,
5583 ov-typeinfo.cc, ov-typeinfo.h, ov-va-args.h, ov.cc, ov.h,
5584 variables.cc, DLD-FUNCTIONS/matrix_type.cc, DLD-FUNCTIONS/splu.cc,
5585 OPERATORS/op-chm.cc: Cope with octave_value hierarchy changes
5586 (apologies for the lack of detail).
5588 * ov.cc (octave_value::nil_rep): Delete.
5589 * ov.h (octave_value::nil_rep): Delete decl.
5591 * ov-base.h (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA,
5592 DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA,
5593 DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA2,
5594 DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA):
5595 Move macro definitions here from ov.h.
5596 (struct_indent, increment_struct_indent, decrement_struct_indent,
5597 list_indent, increment_list_indent, decrement_list_indent):
5600 * ov-base.cc. ov-base.h (do_index_op, ndims, all, any,
5601 convert_to_str, print_with_name, numeric_assign,
5602 reset_indent_level, increment_indent_level,
5603 decrement_indent_level, current_print_indent_level, newline,
5604 indent, reset): Move member functions here from octave_value class.
5605 (count, curr_print_indent_level, beginning_of_line):
5606 Move data members here from octave_value class.
5607 (gripe_indexed_assignment, gripe_assign_conversion_failed,
5608 gripe_no_conversion): Move here from ov.cc.
5610 * ov.h (class octave_xvalue): Delete.
5611 (octave_value::octave_value (const octave_xvalue&)): Delete.
5612 (anonymous union): Delete.
5613 (octave_value::rep): Now a pointer to octave_base_value instead of
5616 (octave_value::internal_rep): Return pointer to octave_base_value,
5619 2006-04-11 John W. Eaton <jwe@octave.org>
5621 * pt-assign.cc (tree_simple_assignment::rvalue,
5622 tree_multi_assignment::rvalue):
5623 Error if RHS is a comma-separated list.
5625 2006-04-07 John W. Eaton <jwe@octave.org>
5627 * defaults.cc (FOCTAVE_VERSION): New function to replace
5628 corresponding DEFCONSTX macro in symbols_of_defaults.
5630 * file-io.cc (FP_tmpdir, FSEEK_SET, FSEEK_CUR, FSEEK_END, Fstdin,
5631 Fstdout, Fstderr): New functions to replace DEFCONSTX macros in
5633 (const_value): New static function.
5634 (symbols_of_file_io): Delete.
5636 * syscalls.cc (FF_DUPFD, FF_GETFD, FF_GETFL, FF_SETFD, FF_SETFL,
5637 FO_APPEND, FO_ASYNC, FO_CREAT, FO_EXCL, FO_NONBLOCK, FO_RDONLY,
5638 FO_RDWR, FO_SYNC, FO_TRUNC, FO_WRONLY, FWNOHANG, FWUNTRACED,
5639 FWCONTINUE): New functions to replace DEFCONSTX macros in
5640 symbols_of_syscalls.
5641 (const_value): New static function.
5642 (symbols_of_syscalls): Delete.
5644 * pr-output.cc (pr_max_internal, pr_min_internal):
5645 Return 0 if all values are Inf or NaN.
5646 Always leave space for sign when printing Inf or NaN values.
5648 * parse.y (Fmfilename): Don't let filenames like ../foo fake us out.
5650 * data.cc (fill_matrix): Create separate versions for int, bool,
5651 and double, and Complex values.
5652 (FInf, FNaN, Fe, Feps, Fpi, Frealmax, Frealmin, FI, FNA, Ffalse,
5653 Ftrue): New functions to replace DEFCONST and DEFCONSTX macros in
5654 symbols_of_data. Provide i, J, and j aliases for I.
5655 Provide nan alias for NaN. Provide inf alias for Inf.
5656 (symbols_of_data): Delete.
5658 2006-04-06 John W. Eaton <jwe@octave.org>
5660 * parse.y (parse_and_execute, parse_fcn_file):
5661 Create octave_script_function object and push it on the call stack.
5663 * parse.y (Fmfilename): Check for script or user function file on
5666 * ov-builtin.cc (octave_builtin::do_multi_index_op):
5667 Use octave_call_stack instead of curr_function to save pointer to
5669 * ov-mapper.cc (octave_mapper::do_multi_index_op): Likewise.
5670 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op): Likewise.
5672 * pt-bp.h (MAYBE_DO_BREAKPOINT): Use octave_call_stack instead of
5673 curr_function to get pointer to current function.
5674 * pt-arg-list.cc (list::convert_to_const_vector): Likewise.
5675 * variables.cc (Fmlock, Fmunlock, Fmislocked): Likewise.
5676 * input.cc (get_user_input): Likewise.
5677 * error.cc (warning_1, error_2): Likewise. Only enter debug mode
5678 if there is a scripting language caller.
5679 * ov-usr-fcn.cc (Fva_arg, Fva_start, Fvr_val): Likewise. Check
5680 scripting language caller, not current function.
5682 * toplev.cc (curr_caller_function, curr_function): Delete.
5683 * toplev.h: Delete decls.
5685 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
5686 Don't protect and set curr_caller_function.
5687 * ov-builtin.cc (octave_builtin::do_multi_index_op): Likewise.
5688 * ov-mapper.cc (octave_mapper::do_multi_index_op): Likewise.
5690 * variables.cc (do_who): Use octave_call_stack instead of
5691 curr_caller_function to get pointer to calling function.
5692 * input.cc (get_user_input): Likewise.
5693 * error.cc (pr_where): Likewise. No need for curr_function now.
5694 * parse.y (Fmfilename): Likewise. Check for scripting language
5695 caller, not any calling function.
5697 * ov-usr-fcn.h (octave_user_script): New class.
5698 * ov-fcn.h (octave_function::is_user_script): New virtual function.
5700 * toplev.h, toplev.cc (octave_call_stack): New class.
5702 * debug.cc (Fdbwhere): Use get_user_function here.
5704 2006-04-05 John W. Eaton <jwe@octave.org>
5706 * Makefile.in (mk-pkg-add): Use mfilename to simplify.
5707 (PKG_ADD): Don't pass --prefix arg to mk-pkg-add.
5708 (PKG_ADD.inst): Delete target.
5709 (clean): Don't remove PKG_ADD.inst.
5710 (install-oct): Don't depend on PKG_ADD.inst. Install PKG_ADD, not
5713 * parse.y (Fmfilename): New function.
5715 2006-04-04 David Bateman <dbateman@free.fr>
5717 * help.cc (Flookfor): Skip overloaded functions. Lookup help text
5718 of autoloaded function, not parent that contains the autoload.
5720 2006-04-03 David Bateman <dbateman@free.fr>
5722 * data.cc (Fresize): New function.
5723 * oct-map.cc, ov-base-mat.cc, ov-base-sparse.cc, ov-base.cc,
5724 ov-bool.cc, ov-complex.cc, ov-range.cc, ov-scalar.cc,
5725 ov-str-mat.cc (resize): Add boolean fill argument.
5726 * oct-map.h, ov-base-mat.h, ov-base-sparse.h, ov-base.h,
5727 ov-bool.h, ov-complex.h, ov-intx.h, ov-range.h, ov-scalar.h,
5728 ov-str-mat.h, ov.h (resize): Ditto.
5730 * DLD-FUNCTIONS/rand.cc (do_rand): Additional argument for
5731 gamma and poisson distributions. Change "state" and "seed"
5732 arguments so that they choose between generators.
5733 Add, poisson, gamma and exponential generators.
5734 (Frand, Frandn): Update docs for new generators, add tests.
5735 (Frande, Frandp, Frandg): New generators, with test code.
5737 * DLD-FUNCTIONS/daspk.cc (Fdaspk): Allow functions to be passed
5738 using function handles, inline functions, and cell arrays of
5739 strings, inline and function handles.
5740 * DLD-FUNCTIONS/dasrtk.cc (Fdasrt): Likewise.
5741 * DLD-FUNCTIONS/dassl.cc (Fdassl): Likewise.
5742 * DLD-FUNCTIONS/fsolve.cc (Ffsolve): Likewise.
5743 * DLD-FUNCTIONS/lsode.cc (Flsode): Likewise.
5745 * ls-hdf5.h (hdf5_fstreambase::open): Remove unused arg prot.
5747 2006-03-30 Bill Denney <denney@seas.upenn.edu>
5749 * data.cc: Include numel in @seealso.
5751 2006-03-30 David Bateman <dbateman@free.fr>
5753 * DLD-FUNCTIONS/fftw_wisdom.cc: Don't attempt to save wisdom to
5754 an empty filename or invalid filename.
5756 2006-03-28 John W. Eaton <jwe@octave.org>
5758 * DLD-FUNCTIONS/matrix_type.cc: Update copyright notice and FSF
5761 2006-03-24 John W. Eaton <jwe@octave.org>
5763 * DLD-FUNCTIONS/spchol.cc (Fsymbfact): Use CHOLMOD_NAME to select
5764 proper version of row_subtree function.
5766 * ov-cell.cc (octave_cell::save_hdf5): Use OSSTREAM instead of
5767 fixed character buffer and sprintf.
5768 * ov-list.cc (octave_list::save_hdf5, octave_list::save_ascii,
5769 octave_list::save_binary): Likewise.
5771 * ov-cell.h (octave_cell::convert_to_str_internal):
5772 Undo previous change for pad arg.
5773 * ov-cell.cc (octave_cell::all_strings): Reinstate pad arg, pass
5774 it on to all_strings.
5775 * ov.h (octave_value::all_strings): Reinstate pad arg.
5776 * ov-base.cc (octave_base_value::all_strings): Likewise.
5777 * ov-str-mat.cc (octave_char_matrix_str::all_strings): Likewise.
5778 * ov.h, ov-base.h, ov-cell.h, ov-str-mat.h: Fix all_strings decls.
5780 2005-10-25 David Bateman <dbateman@free.fr>
5782 * data.cc (do_cat): With 1 arg, return [](0x0) for compatibility.
5784 2006-03-23 John W. Eaton <jwe@octave.org>
5786 * version.h (OCTAVE_VERSION): Now 2.9.5+.
5788 2006-03-22 John W. Eaton <jwe@octave.org>
5790 * version.h (OCTAVE_VERSION): Now 2.9.5.
5791 (OCTAVE_API_VERSION): Now api-v18.
5792 (OCTAVE_RELEASE_DATE): Now 2006-03-22.
5794 2006-03-21 John W. Eaton <jwe@octave.org>
5796 * ov-cell.h (octave_cell::convert_to_str_internal):
5797 Ignore pad and force args.
5798 * ov-cell.cc (octave_cell::all_strings): Delete args. Never pad.
5799 * ov-base.cc (octave_base_value::all_strings): Delete args.
5800 Always force string conversion, never pad.
5801 * ov-str-mat.cc (octave_char_matrix_str::all_strings):
5802 Delete args. Don't strip whitespace.
5803 * ov.h, ov-base.h, ov-cell.h, ov-str-mat.h: Fix all_strings decls.
5804 * strfns.cc (Fchar): No args for all_strings.
5806 2006-03-21 David bateman <dbateman@free.fr>
5808 * DLD-FUNCTIONS/getrusage.cc (Fgetrusage): Use GetProcessTimes for
5809 MinGW to obtain user and system times.
5811 2006-03-17 John W. Eaton <jwe@octave.org>
5813 * strfns.cc (F__list_in_columns__): New function.
5815 2006-03-16 Bill Denney <bill@givebillmoney.com>
5817 * DLD-FUNCTIONS/time.cc: Improve @seealso entries in doc strings.
5819 2006-03-16 John W. Eaton <jwe@octave.org>
5821 * __gnuplot_raw__.l (F__gnuplot_show__): Temporarily use DEFCMD
5823 (symbols_of___gnuplot_raw__): Temporarily mark __gnuplot_plot__,
5824 __gnuplot_set__, __gnuplot_splot__, and __gnuplot_replot__ as raw
5827 * variables.cc (is_marked_as_rawcommand, unmark_rawcommand,
5828 mark_as_rawcommand): Temporarily not static.
5829 * variables.h: Temporarily Provide decls.
5831 2006-03-16 David Bateman <dbateman@free.fr>
5833 * sparse-xdiv.cc (result_ok): delete.
5834 (xdiv, xleftdiv): Simplify to use version of SpareMatrix::solve
5835 and SparseComplexMatrix::solve which internally treats rectangular
5836 and singular matrices.
5837 * DLD-FUNCTIONS/luinc.cc: Remove error test for singular matrix as
5838 QR solver now implemented.
5839 * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Paranoid check on
5840 error_state. Disable tests for the detection of underdetermined
5841 lower and over-determined upper matrix due to problems with
5842 non minimum norm solutions.
5843 * DLD-FUNCTIONS/spqr.cc: Warning for issue of use of Fspqr for
5844 under-determined problems.
5846 2006-03-16 John W. Eaton <jwe@octave.org>
5848 * __gnuplot_raw__.l: Move here from DLD-FUNCTIONS/__gnuplot_raw__.l.
5849 Use DEFUN, not DEFUN_DLD. Include defun.h, not defun-dld.h.
5850 (gnuplot::do_init):Move guts to symbols_of___gnuplot_raw__.
5851 (symbols_of___gnuplot_raw__): New function.
5853 * Makefile.in (DLD_XSRC): Delete __gnuplot_raw__.l from the list.
5854 (DIST_SRC): Include __gnuplot_raw__.l in the list.
5855 (__gnuplot_raw__.cc): Depend on __gnuplot_raw__.l, not
5856 DLD-FUNCTIONS/__gnuplot_raw__.l
5858 * ls-oct-ascii.h (extract_keyword): Use std::string compare method
5860 * ls-oct-ascii.cc (extract_keyword): Likewise.
5862 2006-03-15 William Poetra Yoga Hadisoeseno <williampoetra@gmail.com>
5864 * src/data.cc (Frows, Fcolumns): New functions.
5866 * DLD-FUNCTIONS/time.cc (Fstrptime, Fstrftime): Fix docstring.
5868 * strfns.cc (Fstrcmp): Fixed docstring.
5870 2006-03-15 John W. Eaton <jwe@octave.org>
5872 * pager.cc (Fterminal_size): New function.
5874 * help.cc (help_from_info): Simplify.
5875 (try_info): Use feval to call doc instead of executing info program.
5876 (additional_help_message): Point users to doc instead of help -i.
5877 From Søren Hauberg <soren@hauberg.org>.
5879 * toplev.cc (Fsystem): Return output if nargout > 1, not 0.
5881 2006-03-14 Keith Goodman <kwgoodman@gmail.com>
5883 * help.cc (Fhelp, Fwhich, Flookfor): Doc string fix.
5885 2006-03-14 John W. Eaton <jwe@octave.org>
5887 * defun.cc (print_usage): New arg, extra_msg.
5889 * xpow.cc: Omit tests for now.
5891 * parse.y (QUOTE, TRANSPOSE): For compatibility, now have same
5892 precedence as POW and EPOW.
5894 2006-03-14 Bill Denney <bill@givebillmoney.com>
5896 * load-save.cc (Fload, Fsave): Update docstring for functional form.
5898 2006-03-14 John W. Eaton <jwe@octave.org>
5900 * xpow.cc (elem_xpow): Undo previous change.
5902 2006-03-14 Paul Kienzle <pkienzle@users.sf.net>
5904 * xpow.cc: New tests.
5906 2006-03-13 John W. Eaton <jwe@octave.org>
5908 * variables.cc (fcn_out_of_date): No longer static.
5909 * ov-fcn-handle.cc (warn_reload): New function.
5910 (octave_fcn_handle::subsref): Implement basic logic for updating
5911 when pointed-to function changes.
5913 2006-03-10 John W. Eaton <jwe@octave.org>
5915 * xpow.cc (elem_xpow): Only use complex pow if really necessary.
5917 * symtab.cc (symbol_table::glob, symbol_table::symbol_list,
5918 symbol_table::subsymbol_list): Force result to be a column
5921 * oct-stream.h (octave_stream::stream_ok): Undo previous change.
5922 Eliminate who parameter. Change all callers.
5924 * variables.cc (do_who): Return more info in structure array for
5926 * symtab.h (symbol_record::size, symbol_record::class_name,
5927 symbol_record::is_sparse_type, symbol_record::is_complex_type,
5928 symbol_record::size, symbol_record::symbol_def::class_name,
5929 symbol_record::symbol_def::is_sparse_type,
5930 symbol_record::symbol_def::is_complex_type): New functions.
5931 * ov.h (octave_value::size): New function.
5933 2006-03-09 John W. Eaton <jwe@octave.org>
5935 * toplev.cc (run_command_and_return_output): Swap output and
5936 status for compatibility.
5938 * Makefile.in (defaults.h, oct-conf.h): Force updates.
5940 * defaults.h.in (OCTAVE_RELEASE): New macro.
5942 * octave.cc (F__version_info__): New arg, release.
5943 (initialize_version_info): Pass release arg to F__version_info__.
5945 * toplev.cc: Include api_version in the list.
5947 * Makefile.in (DIST_SRC): Include octave.cc here.
5948 (DISTFILES, DEP_5): Not here.
5950 * octave.cc (F__version_info__): New function.
5951 (initialize_version_info): New function.
5952 (octave_main): Call initialize_version_info just before reading
5955 * version.h (OCTAVE_RELEASE_DATE): New macro.
5957 * ov-fcn-handle.h (octave_fcn_handle::dims): New function.
5959 2006-03-08 John W. Eaton <jwe@octave.org>
5961 * oct-stream.cc (octave_stream::stream_ok): Move definition here,
5962 from oct-stream.h. New arg, warn. If warn is true and stream is
5963 invalid, print warning.
5964 (octave_stream::error): Always avoid warning message from
5965 stream_ok. Return "invalid stream object" if stream is not ok.
5967 2006-03-08 David Bateman <dbateman@free.fr>
5969 * ov-mapper.cc (SPARSE_MAPPER_LOOP_2): Change nnz to nz to remove
5970 shadowed variable warning.
5971 * DLD-FUNCTIONS/spqr.cc: Update for new upstream CXSPARSE release.
5973 2006-03-06 John W. Eaton <jwe@octave.org>
5975 * help.cc (display_help_text): Force linebreak with @sp.
5977 2006-03-06 Keith Goodman <kwgoodman@gmail.com>
5979 * bitfcns.cc, data.cc, debug.cc, file-io.cc, help.cc,
5980 load-save.cc, mappers.cc, ov-cell.cc, ov-fcn-inline.cc,
5981 ov-struct.cc, ov-usr-fcn.cc, ov.cc, pr-output.cc, utils.cc,
5982 variables.cc, DLD-FUNCTIONS/ccolamd.cc, DLD-FUNCTIONS/cellfun.cc,
5983 DLD-FUNCTIONS/colamd.cc, DLD-FUNCTIONS/daspk.cc,
5984 DLD-FUNCTIONS/dasrt.cc, DLD-FUNCTIONS/dassl.cc,
5985 DLD-FUNCTIONS/fft.cc, DLD-FUNCTIONS/fft2.cc,
5986 DLD-FUNCTIONS/fftn.cc, DLD-FUNCTIONS/fftw_wisdom.cc,
5987 DLD-FUNCTIONS/gammainc.cc, DLD-FUNCTIONS/gcd.cc,
5988 DLD-FUNCTIONS/luinc.cc, DLD-FUNCTIONS/sparse.cc,
5989 DLD-FUNCTIONS/spchol.cc, DLD-FUNCTIONS/splu.cc,
5990 DLD-FUNCTIONS/spqr.cc, DLD-FUNCTIONS/sqrtm.cc:
5991 Move @seealso inside @defXXX macro. Remove "and" from @seealso.
5993 2006-03-04 John W. Eaton <jwe@octave.org>
5995 * help.cc (additional_help_message): Don't print "\n" before message.
5996 (help_from_symbol_table): If Vsuppress_verbose_help_message is
5997 true, don't print which info.
5999 2006-03-03 John W. Eaton <jwe@octave.org>
6001 * dirfns.cc (Vconfirm_recursive_rmdir): New static variable.
6002 (symbols_of_dirfns): DEFVAR it.
6003 (confirm_recursive_rmdir): New function.
6004 (Frmdir): Maybe ask for confirmation for recursive removal.
6005 Require second arg to be "s".
6007 * input.cc (octave_yes_or_no): New function.
6008 (Fyes_or_no): New function.
6009 * input.h (octave_yes_or_no): Provide decl.
6011 2006-03-02 John W. Eaton <jwe@octave.org>
6013 * dirfns.cc (Fmkdir, Frmdir): Now commands.
6015 2006-02-20 David Bateman <dbateman@free.fr>
6017 * ov.h (virtual bool is_sparse_type (bool)): New virtual function
6018 * ov-base.h (bool is_sparse_type (bool)): New function
6019 * ov-base-sparse.h (bool is_sparse_type (bool)): New function
6020 * DLD-FUNCTIONS/ccolamd.cc, DLD-FUNCTION/colamd.cc,
6021 DLD-FUNCTIONS/__glpk__.cc, DLD-FUNCTIONS/splu.cc,
6022 DLD-FUNCTIONS/sparse.cc, DLD-FUNCTIONS/matrix_type.cc, pt-mat.cc:
6023 Replace us of 'arg.class_name () == "sparse"' with
6024 'arg.is_sparse_type ()'
6026 2006-02-20 David Bateman <dbateman@free.fr>
6028 * pt-mat.cc (class tm_row_const): Add any_sparse bool variable.
6029 (tm_row_const::tm_row_const_rep::do_init_element): Initialize
6030 any_sparse variable if any matrice is sparse.
6031 (class tm_const): Add any_sparse bool variable.
6032 (tm_const::init): Initialize any_sparse variable.
6033 (tree_matrix::rvalue): If any matrix is sparse use sparse matrix
6034 as initial matrix for concatenation
6035 * DLD-FUNCTIONS/matrix_type.cc: Add tests for new rectangular
6036 diagonal, permuted diagonal, triangular and permuted triangular
6039 2006-02-20 John W. Eaton <jwe@octave.org>
6041 * toplev.cc (__builtin_delete, __builtin_new): Use std::cerr for
6042 messages instead of std::cout.
6043 (main_loop, do_octave_atexit): Use octave_stdout, not std::cout.
6045 2006-02-15 John W. Eaton <jwe@octave.org>
6047 * parse.y (Fautoload): Return struct array of autoload info if
6050 2006-02-15 Keith Goodman <kwgoodman@gmail.com>
6052 * help.cc (keywords): Doc string fix.
6054 2006-02-15 John W. Eaton <jwe@octave.org>
6056 * oct-procbuf.cc (close): Use __CYGWIN__ instead of __CYGWIN32__.
6058 2006-02-13 David Bateman <dbateman@free.fr>
6060 * DLD_FUNCTIONS/regexp.cc (octregexp): Add matlab compatiable
6061 named tokens. Update the tests
6063 2006-02-10 John W. Eaton <jwe@octave.org>
6065 * lex.l (\[{S}*): Maybe set lexer_flags.looking_at_return_list or
6066 lexer_flags.looking_at_matrix_or_assign_lhs here.
6068 (return_list_beg): Don't use in_return_list here.
6069 (assign_lhs, matrix): Don't use in_matrix_or_assign_lhs here.
6070 (in_matrix_or_assign_lhs, in_return_list): Delete unused macros.
6071 (matrix): Clear lexer_flags.looking_at_matrix_or_assign_lhs in all
6074 2006-02-09 John W. Eaton <jwe@octave.org>
6076 * utils.cc (oct_file_in_path): Check len > 4, not len > 2.
6077 From Larrie Carr <larrie@telus.net>.
6079 2006-02-09 David Bateman <dbateman@free.fr>
6081 * DLD-FUNCTIONS/spqr.cc: New file for sparse QR and dmperm based on
6083 * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): dintinguish between
6084 rectangular and singular matrices. Add tests.
6085 * DLD-FUNCTIONS/luinc.cc: Add tests.
6086 * DLD-FUNCTIONS/spkron.cc: Ditto.
6087 * Makefile.in (DLD_XSRC): Add spqr.cc.
6088 (OCT_LINK_DEPS): Add CSSPARSE_LIBS.
6089 * sparse-xdiv.h: Remove conditio of lssolve.
6091 2006-02-08 John W. Eaton <jwe@octave.org>
6093 * parse.y (frob_function): Clear ID_NAME from top_level symbol
6094 table if we are defining a function at the top-level and a
6095 function with the same name is already in the top-level symbol
6098 2006-01-31 John W. Eaton <jwe@octave.org>
6100 * ov-base-sparse.h (octave_base_sparse<T>::nzmax): New function.
6101 * ov.h (octave_value::nzmax): New function.
6102 * ov-base.cc (octave_base_value::nzmax): New function.
6103 * ov-base.h: Provide decl.
6104 * data.cc (Fnzmax): New function.
6105 * DLD-FUNCTIONS/sparse.cc (Fnzmax): Delete.
6107 2006-01-31 Kim Hansen <kim@i9.dk>
6109 * __glpk__.cc (F__glpk__): Fix for sparse matrices.
6111 2006-01-30 John W. Eaton <jwe@octave.org>
6113 * gripes.cc (gripe_wrong_type_arg (const char*, const char*, bool)):
6115 (gripe_wrong_type_arg (const char*, const std::string&, bool)):
6116 Define using const char*, const char*, bool version.
6117 (gripe_wrong_type_arg (const char*, const octave_value&, bool)):
6118 Define using const char*, const std::string&, bool version.
6120 * ov.h (octave_value::nnz): New function.
6121 * ov-base.cc (octave_base_value::nnz): New function.
6122 * ov-base.h: Provide decl.
6123 * ov-base-mat.h (octave_base_matrix<MT>::nnz): New function.
6124 * ov-base-scalar.h (octave_base_scalar<MT>::nnz): New function.
6125 * Cell.cc (Cell::nnz): New function.
6126 * Cell.h: Provide decl.
6127 * data.cc (Fnnz): New function.
6128 * DLD-FUNCTIONS/sparse.cc (Fnnz): Delete.
6130 2006-01-13 John W. Eaton <jwe@octave.org>
6132 * ov-struct.cc (octave_struct::print_raw): Correctly print scalar
6133 structs and empty struct arrays.
6135 * DLD-FUNCTIONS/__gnuplot_raw__.l (Fclearplot): For compatibility,
6136 also turn off hold state for current figure.
6138 2006-01-13 Bill Denney <bill@givebillmoney.com>
6140 * dirfns.cc: Add @seealso{} to docstrings.
6142 2006-01-13 John W. Eaton <jwe@octave.org>
6144 * help.cc (display_help_text): Use warning() to print raw Texinfo
6145 source. Don't redirect error output for makeinfo process.
6147 * DLD-FUNCTIONS/__gnuplot_raw__.l (F__gnuplot_init__): Delete
6148 function and PKG_ADD directive.
6149 (gnuplot::gnuplot): Call do_init here.
6150 (gnuplot::init): Delete static function.
6151 (gnuplot::close_all): New static function.
6152 (class gnuplot_X): New class.
6153 (gnpulot_X::X): New static instance.
6155 2006-01-12 David Bateman <dbateman@free.fr>
6157 * help.cc (make_name_list): Add autoload functions to list of
6158 available completions.
6159 (simple_help): Add autoloaded functions to functions listed
6160 (first_help_sentence): Avoid issue with single line help string
6161 that is not terminated in \n.
6162 (Flookfor): Check for string match in the keyword/function, etc
6163 name. Also look for string match in help of autoloaded functions.
6164 Load oct-files to be able to access their help string.
6165 * parse.y (string_vector autoloaded_functions (void)): New
6166 function to list all autloaded functions.
6167 (string_vector reverse_lookup_autoload (const std::string& nm)):
6168 Reverse lookup function to match file to autoloaded functions.
6169 * parse.h (autoloaded_functions, reverse_lookup_autoload):
6172 * oct-map.cc (maybe_delete_elements): New function.
6173 * oct-map.h (maybe_delete_elements): Declare it.
6174 * ov-struct.cc (octave_struct::subsref): Handle indexing empty
6176 (octave_struct::subsasgn): If rhs is [], delete elements.
6177 (octave_struct::print_raw): Handle printing empty structure.
6179 * ls-mat5.cc (read_mat5_binary_element): Allow reading of sparse
6180 elements when nnz doesn't equal nzmax.
6182 2006-01-10 David Bateman <dbateman@free.fr>
6184 * DLD-FUNCTIONS/sparse.cc (sparse_find): Use Sparse<T>::nonzero()
6185 rather than Sparse<T>::nnz(), due to possibility of overallocation
6188 2006-01-06 John W. Eaton <jwe@octave.org>
6190 * oct-map.cc (Octave_map::transpose): Avoid GCC 3.3.x parse error.
6192 2005-12-14 John W. Eaton <jwe@octave.org>
6194 * oct-stream.cc (octave_stream::invalid_stream_error): Delete.
6195 * oct-stream.h (octave_stream::stream_ok): Don't fail with error.
6197 2005-12-14 David Bateman <dbateman@free.fr>
6199 * DLD-FUNCTIONS/regexp.cc: New file.
6201 * DLD-FUNCTIONS/dispatch.cc: Update tests for string/sq_string
6204 * error.cc (Vquiet_warning): New variable.
6205 (vwarning): Use Vquiet_warning to prevent warning output.
6206 (Fwarning): Include "quiet" option to Fwarning function.
6207 Assign retval when using "query". Typo in error message.
6208 (Flastwarn): Clear warning_state when using Flastwarn to probe warning
6211 * ov-struct.cc: Update Fstruct tests for change in error output.
6213 * Makefile.in: Include regexp when needed with appropriate libraries.
6215 2005-12-13 David Bateman <dbateman@free.fr>
6217 * Makefile.in: Change references to gplot.l to __gnuplot_raw__.l.
6218 * DLD-FUNCTIONS/__gnuplot_raw__.l: Rename from DLD-FUNCTIONS/gplot.l.
6219 Remove all references to deprecated gplot, gsplot, graw, gset and
6221 * help.cc (static help_list keywords[]): Remove gsplot and gplot.
6223 * ls-oct-ascii.cc (save_three_d): Don't strip Inf or NaN.
6224 (save_ascii_data_for_plotting): Ditto.
6226 2005-12-13 John W. Eaton <jwe@octave.org>
6228 * oct-stream.cc (octave_stream_list::do_insert): Check open state
6229 of stream in list instead of whether stream state is OK.
6231 2005-12-12 David Bateman <dbateman@free.fr>
6233 * OPERATORS/op-struct.cc (transpose): New function.
6234 (install_struct_ops): Install it.
6236 * oct-map.cc (Octave_map::transpose): New function.
6237 * oct-map.h: Provide decl.
6239 2005-12-08 John W. Eaton <jwe@octave.org>
6241 * Cell.cc (Cell::column): New function.
6242 * pt-loop.cc (DO_ND_LOOP): Simplify.
6243 (simple_for_loop_command::eval): Correctly handle N-d numeric and
6244 cell arrays when only the first dimension is 0.
6246 2005-12-07 John W. Eaton <jwe@octave.org>
6248 * lex.l (NL): Also accept '\r'.
6250 * error.cc (Vbacktrace_on_warning, warning_options,
6251 Vlast_warning_id, Vlast_error_id): New file-scope variables.
6252 (Vwarning_frequency, Vwarning_option): Delete unused variables.
6253 (set_warning_option): Delete unused function.
6254 (Fwarning): Update for compatibility. Use DEFCMD, not DEFUN.
6255 (warning_enabled, check_state): New functions.
6256 (warning (const char *fmt, ...)): Use it.
6257 (init_warning_options): New function.
6258 (symbols_of_error): Call it.
6259 (vwarning, Flastwarn): Handle Vlast_warning_id. Improve compatibility.
6260 (handle_message): New arg, ID. Change all callers.
6261 (vwarning, verror, error_1): New arg, ID. Change all callers.
6262 (verror, Flasterr): Handle Vlast_error_id. Improve compatibility.
6264 * error.cc (message_with_id, usage_with_id, warning_with_id,
6265 error_with_id, parse_error_with_id): New functions.
6266 (error_2, warning_1, usage_1): New functions.
6267 * error.h (message_with_id, usage_with_id, warning_with_id,
6268 error_with_id, parse_error_with_id): Provide decls.
6270 2005-11-30 John W. Eaton <jwe@octave.org>
6272 * DLD-FUNCTIONS/schur.cc (Fschur): Doc string fix.
6273 From Jorge Barros de Abreu <ficmatin01@solar.com.br>.
6275 2005-11-28 John W. Eaton <jwe@octave.org>
6277 * syscalls.cc (Funame): New function.
6279 2005-11-21 John W. Eaton <jwe@octave.org>
6281 * pr-output.cc (pr_int): Fix thinko in byte-swapping for bit format.
6283 * DLD-FUNCTIONS/cellfun.cc (Fcellfun):
6284 Use C++ static_cast instead of C-style casts.
6286 2005-11-21 William Poetra Yoga H <williampoetra@yahoo.com>
6288 * DLD-FUNCTIONS/cellfun.cc (Fcellfun):
6289 Docstring and error message fixes.
6291 2005-11-17 John W. Eaton <jwe@octave.org>
6293 * DLD-FUNCTIONS/minmax.cc (MINMAX_BODY): Don't cast arg1 to
6294 const octave_complex_matrix&.
6296 2005-11-16 John W. Eaton <jwe@octave.org>
6298 * Makefile.in (PKG_ADD.inst): New target.
6299 (install-oct): Depend on it.
6302 * mk-pkg-add: New option --install. Don't use --prefix option.
6303 Delete obsolete comments.
6305 * Cell.cc (Cell::index): Indexing with () is a no-op, not an error.
6306 * oct-map.cc (Octave_map::index): Likewise.
6307 * ov-base-mat.cc (octave_base_matrix<MT>::do_index_op): Likewise.
6308 * ov-base-sparse.cc (octave_base_sparse<T>::do_index_op): Likewise.
6309 * ov-str-mat.cc (octave_char_matrix_str::do_index_op_internal):
6312 2005-11-11 John W. Eaton <jwe@octave.org>
6314 * Makefile.in (install-oct): Fix thinko in previous change.
6316 * version.h (OCTAVE_VERSION): Now 2.9.4
6317 (OCTAVE_API_VERSION): Now api-v17.
6319 * variables.cc (symbol_out_of_date): Check for autoloads here too.
6321 * Makefile.in (PKG_ADD): Depend on $(DLD_DEF_FILES), not $(DLD_SRC).
6322 (%.df : %.cc): Also insert PKG_ADD commands in .df files.
6323 (install-oct): Generate PKG_ADD file for install directory here.
6324 Don't depend on PKG-ADD. No need to make .oct file links.
6325 (clean): No need to delete links.
6326 (stamp-oct-links): Delete target.
6327 (distclean): No need to remove stamp-oct-links.
6328 (all): Depend on $(OCT_FILES), not stamp-oct-links.
6330 * mk-pkg-add: New file.
6331 * Makefile.in (DISTFILES): Add it to the list.
6333 * mk-oct-links: Delete.
6334 * Makefile.in (DISTFILES): Remove it from the list.
6336 2005-11-10 John W. Eaton <jwe@octave.org>
6338 * ov-str-mat.h (octave_char_matrix_str::permute,
6339 octave_char_matrix_str::resize): New functions.
6340 (octave_char_matrix_sq_str::reshape,
6341 octave_char_matrix_sq_str::permute,
6342 octave_char_matrix_sq_str::resize): New functions.
6344 * OPERATORS/op-str-str.cc, OPERATORS/op-str-s.cc,
6345 OPERATORS/op-str-m.cc: Use DEFNDCHARCATOP_FN.
6347 * data.cc (do_cat): No need to handle character arrays specially here.
6349 * ops.h (DEFNDCHARCATOP_FN): New macro.
6350 * OPERATORS/op-int.h (OCTAVE_INT_CHAR_CONCAT_FN,
6351 OCTAVE_CHAR_INT_CONCAT_FN, OCTAVE_INSTALL_INT_CHAR_CONCAT_FN,
6352 OCTAVE_INSTALL_CHAR_INT_CONCAT_FN): New macros.
6353 * OPERATORS/op-int-concat.cc: Use them do define char/int op functions.
6354 (install_int_concat_ops): Install char/int concat ops.
6356 * ov-scalar.h (class octave_scalar): Provide extractors
6357 for all int array types and char array type.
6359 2005-11-09 John W. Eaton <jwe@octave.org>
6361 * ov-bool-mat.h (class octave_bool_matrix): Provide extractors
6362 for all int array types and char array type.
6363 * ov-bool.h (class octave_bool): Likewise.
6365 * ov-intx.h (class OCTAVE_VALUE_INT_MATRIX_T): Provide extractors
6366 for all int array types and char array type.
6367 (class OCTAVE_VALUE_INT_SCALAR_T): Provide extractors for all int
6368 scalar and array types and char array type.
6370 * pt-mat.cc (tm_const::class_nm): New data member.
6371 (tm_const::tm_const): Initialize it.
6372 (tm_const::class_name): New function.
6373 (tm_row_const::tm_row_const_rep::class_nm): New data member.
6374 (tm_row_const::tm_row_const_rep::tm_row_const_rep): Initialize it.
6375 (tm_row_const::class_name): New function.
6376 (get_concat_class): New function.
6377 (tm_row_const::tm_row_const_rep::do_init_element): Use it.
6378 (tm_const::init): Use it.
6380 2005-11-07 John W. Eaton <jwe@octave.org>
6382 * strfns.cc (Fstrcmp): If args are not strings or cell arrays of
6383 strings, return false.
6385 2005-11-01 John W. Eaton <jwe@octave.org>
6387 * Makefile.in (oct-gperf.h): Avoid extra temporary file.
6388 (distclean): Delete oct-errno.cc here.
6389 From Quentin Spencer <qspencer@ieee.org>.
6391 2005-11-01 Quentin Spencer <qspencer@ieee.org>
6393 * DLD-FUNCTIONS/spchol.cc: Use C++ true/false instead of
6394 preprocessor defined TRUE/FALSE.
6395 * Makefile.in (DISTFILES): Add mk-errno-list to the list.
6397 2005-10-30 John W. Eaton <jwe@octave.org>
6399 * DLD-FUNCTIONS/gplot.l (gnuplot::set_gnuplot_exe,
6400 gnuplot::do_set_gnuplot_exe): New functions.
6401 (gnuplot_binary): Call gnuplot::set_gnuplot_exe here.
6403 * DLD-FUNCTIONS/gplot.l (gnuplot::set_gnuplot_use_title_option,
6404 gnuplot::do_set_gnuplot_use_title_option): New functions.
6405 (gnuplot_use_title_option):
6406 Call gnuplot::set_gnuplot_use_title_option here.
6408 2005-10-27 James R. Van Zandt <jrvz@comcast.net>
6410 * mappers.cc: Doc fix for lgamma.
6411 * DLD-FUNCTIONS/gammainc.cc (Fgammainc): Doc fix.
6413 2005-10-27 John W. Eaton <jwe@octave.org>
6415 * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Declare mrowsA volatile.
6417 * pt-mat.cc (tm_row_const::tm_row_const_rep::tm_row_const_rep):
6418 Ensure that we always have at least two dimensions here.
6419 (tm_const::tm_const): Likewise.
6420 (tm_const::rows, tm_const::columns): Simplify.
6421 (tm_row_const::rows, tm_row_const::columns)): Simplify.
6423 2005-10-26 John W. Eaton <jwe@octave.org>
6425 * oct-procbuf.cc (octave_procbuf::open): Cast 0 to void * to avoid
6427 * toplev.cc (Fsystem): Likewise.
6429 Changes for GCC 4.1, tip from Arno J. Klaassen
6430 <arno@heho.snv.jussieu.fr>:
6432 * ov.h (do_unary_op (octave_value::unary_op, const octave_value&)):
6433 Publish externally used friend function.
6434 (do_unary_op (octave_value::unary_op, const octave_value&,
6435 const octave_value&)): Likewise.
6437 2005-10-25 David Bateman <dbateman@free.fr>
6439 * data.cc (do_cat): called with 2 args, should return args(1)
6442 2005-10-23 David Bateman <dbateman@free.fr>
6444 * Makefile.in (DLD_XSRC): Add spchol.cc.
6445 * sparse-xpow.cc (xpow): Change call to sparse inverse to include
6447 * DLD-FUNCTIONS/colamd.c (Fsymbfact): Remove.
6448 * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): 64-bit fixes and fix
6449 for permutation of upper/lower triangular matrices.
6450 * DLD-FUNCTIONS/splu.cc (Fspinv): Implemtation of sparse inverse
6452 * DLD-FUNCTIONS/spchol.cc (sparse_chol): Static function for core of
6453 the sparse cholesky factorization.
6454 (Fspchol): New function for sparse cholesky factorization R'R.
6455 (Fsplchol): New function for sparse cholesky factorization LL'.
6456 (Fspcholinv): New cholesky inverse function.
6457 (Fspchol2inv): New cholesky inverse function.
6458 (Fsymbfact): Implementation of symbolic factorization using cholmod.
6460 2005-10-21 John W. Eaton <jwe@octave.org>
6462 * DLD-FUNCTIONS/gplot.l (read_until): Special case STRING.
6463 (handle_string): Restore function.
6464 ("'", "\""): Call handle string when matching these tokens..
6466 2005-10-20 John W. Eaton <jwe@octave.org>
6468 * pt-mat.cc (tm_row_const::all_real): New data member.
6469 (tm_row_const::all_real_p): New function.
6470 (tm_row_const::tm_row_const_rep::all_real): New data member.
6471 (tm_row_const::tm_row_const_rep::all_real_p): New function.
6472 (tm_row_const::tm_row_const_rep::init): Set all_real and all_cmplx
6474 (tm_row_const::all_cmplx): Rename from is_cmplx.
6475 (tm_row_const::all_complex_p): Rename from complex_p.
6476 (tm_row_const::tm_row_const_rep::all_cmplx): Rename from is_cmplx.
6477 (tm_row_const::tm_row_const_rep::all_complex_p): Rename from complex_p.
6478 (tm_row_const::tm_row_const_rep::init): Set all_real and all_cmplx
6480 (SINGLE_TYPE_CONCAT): New macro.
6481 (tree_matrix::rvalue): Use it for single type cases.
6483 * pt-mat.cc: Sprinkle with OCTAVE_QUIT.
6485 2005-10-18 John W. Eaton <jwe@octave.org>
6487 * octave.cc (octave_main): If not embedded, call clean_up_and_exit
6488 instead of return to exit function.
6490 2005-10-18 Arno J. Klaassen <arno@heho.snv.jussieu.fr>
6492 * DLD-FUNCTIONS/gplot.l (gnuplot::handle_title):
6493 Omit class name from declaration.
6495 2005-10-17 Keith Goodman <kwgoodman@gmail.com>
6497 * DLD-FUNCTIONS/sort.cc: Doc string fix.
6499 2005-10-17 John W. Eaton <jwe@octave.org>
6501 * oct-conf.h.in (OCTAVE_CONF_F77_FLOAT_STORE_FLAG): Substitute
6502 OCTAVE_CONF_F77_FLOAT_STORE_FLAG here.
6504 2005-10-14 John W. Eaton <jwe@octave.org>
6506 * mk-errno-list: New script.
6507 * Makefile.in (oct-errno.cc): Use it.
6509 2005-10-13 John W. Eaton <jwe@octave.org>
6511 * DLD-FUNCTIONS/gplot.l (F__gnuplot_raw__):
6512 Call print_usage with correct function name.
6514 2005-10-12 John W. Eaton <jwe@octave.org>
6516 * DLD-FUNCTIONS/gplot.l: Major cleanup.
6517 Built-in variable gnuplot_has_frames no longer necessary.
6518 (gnuplot): New class to manage multiple gnuplot processes.
6519 (handle_string): Delete. It was only used for the case of
6520 __gnuplot_plot__ "file", which is no longer allowed.
6522 2005-10-05 John W. Eaton <jwe@octave.org>
6524 * variables.cc (symbol_exist): Chekck for autoloaded functions.
6526 * parse.y (Fautoload): New function.
6527 (autoloading, autoload_map): New static variables.
6528 (load_fcn_from_file, frob_function): Handle autoloading.
6529 (lookup_autoload): New function.
6530 (get_help_from_file): New args, symbol_found and include_file_info.
6533 2005-10-05 David Bateman <dbateman@free.fr>
6535 * help.cc (try_info): format in command string for mingw.
6537 2005-09-30 John W. Eaton <jwe@octave.org>
6539 * ov.cc (octave_value::~octave_value): No need to set rep to zero
6542 2005-09-29 John W. Eaton <jwe@octave.org>
6544 * syscalls.cc (mk_stat_map): Store mode too.
6545 (FS_ISREG, FS_ISDIR, FS_ISCHR, FS_ISBLK, FS_ISFIFO, FS_ISLNK,
6546 FS_ISSOCK): New functions.
6547 (Fstat): Fix docstring.
6549 2005-09-28 John W. Eaton <jwe@octave.org>
6551 * oct-stream.cc (printf_value_cache::double_value): Force
6552 character strings to be converted to ASCII equivalents.
6554 * data.cc (Fcomplex): New function.
6556 * ov-type-conv.h (OCTAVE_TYPE_CONV_BODY3): Return arg unchanged if
6557 class name is same as name of conversion.
6559 * dirfns.cc (Frmdir, Fmkdir): For compatibility, return true for
6560 success and false for failure. Return third value, msgid.
6561 (Frmdir): Handle second arg for recursive behavior.
6563 2005-09-23 John W. Eaton <jwe@octave.org>
6565 * parse.y (load_fcn_from_file): Don't look in path if file is
6566 absolute and has .oct or .m extension.
6568 * utils.cc (Ferrno_list): New function.
6570 * oct-errno.h, oct-errno.cc.in: New files.
6571 * Makefile.in: Add them to the appropriate lists.
6572 (oct-errno.cc): New rule.
6573 ($(OPT_HANDLERS)): Use $(PERL) instead of just perl.
6575 * utils.cc: Include oct-errno.h.
6576 (Ferrno): Rename from FERRNO. Allow errno to be set. Allow
6577 lookups of errno codes by name and access to structure containing
6578 all errno names and codes.
6580 2005-09-19 John W. Eaton <jwe@octave.org>
6582 * pt-bp.cc (tree_breakpoint::visit_index_expression):
6583 Avoid dereferencing invalid pointer.
6585 2005-09-19 David Bateman <dbateman@free.fr>
6587 * Makefile.in (OCT_LINK_DEPS): Include UFsparse libraries.
6589 * DLD_FUNCTIONS/__glpk__.cc (F__glpk__): Replace isinf with
6590 xisinf. Allow sparse matrices as second argument.
6592 * syscalls.cc: Typos.
6595 2005-09-16 John W. Eaton <jwe@octave.org>
6597 * syscalls.cc (Fwaitpid): Doc fix. Expect WNOHANG, WUNTRACED,
6598 WCONTINUED as args instad of int values.
6599 Return values are now [pid, status, msg] instad of [pid, msg].
6600 (WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP,
6601 WIFSTOPPED, WSTOPSIG, WIFCONTINUED): New functions.
6602 (symbols_of_syscalls): DEFCONST WNOHANG, WUNTRACED, and WCONTINUE.
6604 * oct-procbuf.cc (octave_procbuf::close): Call octave_syscalls::waitpid
6605 here instead of calling waitpid directly.
6606 * sighandlers.cc (OCL_REP::wait): Likewise.
6608 * sysdep.h [__MINGW32__]: Don't define waitpid here.
6610 2005-09-15 John W. Eaton <jwe@octave.org>
6612 * sysdep.h [__MINGW32__]: Move to definition of waitpid sysdep.h.
6614 * sysdep.cc, sighandlers.cc: Rename all win32_ symbols to w32.
6616 * sysdep.cc (w32_set_quiet_shutdown): New function.
6617 * sysdep.h: Provide decl.
6618 * sysdep.cc (MINGW_signal_cleanup): Use it.
6619 * sighandlers.cc (octave_catch_interrupts): Use it.
6621 * sysdep.h: Provide decl.
6622 (MINGW_SIGNAL_CLEANUP): New macro.
6623 (USE_W32_SIGINT): Move definition here.
6624 * sighandlers.cc: From here.
6626 * DLD-FUNCTIONS/cellfun.cc (Fnum2cell): Use print_usage, not usage.
6627 * DLD-FUNCTIONS/colamd.cc (Fcolamd, Fsymamd, Fetree): Likewise.
6628 (Fcolamd, Fsymamd) [! HAVE_COLAMD]: Return empty octave_value_list
6631 * sysdep.cc (sysdep_cleanup): New function.
6632 Move w32 clean up code here.
6633 * toplev.cc (clean_up_and_exit): From here.
6634 Call sysdep_cleanup here.
6636 2005-09-15 David Bateman <dbateman@free.fr>
6638 * Makefile.in (DLD_XSRC): Add ccolamd.cc
6639 (OCTAVE_LIBS): Add LIBGLOB.
6640 (OCT_LINK_DEPST, octave): Add AMD, COLAMD, CCOLAMD and CHOLMOD
6642 * default.cc (set_default_exec_path, set_default_path,
6643 maybe_add_default_load_path, LOADPATH): Use SEPCHAR_STR and SEPCHAR.
6644 * help.cc (display_help_text): Exclude /dev/null on mingw.
6645 * oct-procbuf.cc (W32POPEN, W32PCLOSE): Macros for cygwin/mingw.
6646 (octave_procbuf::open, octave_probuf::close): Use them.
6647 * sighandler.cc (user_abort): New function with core of old
6649 (sigint_handler): Simplify and specialize for w32.
6650 (w32_sigint_handler): W32 version of sigint handler.
6651 (octave_catch_interrupts): Initialize w32 siginit handler.
6652 * sysdep.cc (MINGW_init): New function.
6653 (sysdep_init): Use it.
6654 * toplev.cc (clean_up_and_exit): Clean w32 signalling shutdown.
6655 * DLD-FUNCTIONS/cellfun.cc (Fnum2cell): New function.
6656 * DLD-FUNCTIONS/colamd.cc (Fcolamd, Fsymamd): Allow conditional build.
6657 Include oct-sparse.h rather than colamd.h.
6658 * DLD-FUNCTIONS/ccolamd.cc: New file with Fccolamd a Fcsymamd.
6660 2005-09-14 John W. Eaton <jwe@octave.org>
6662 * ov-complex.cc (octave_complex::try_narrowing_conversion):
6664 * ov-cx-mat.cc (octave_complex_matrix::try_narrowing_conversion):
6667 2005-09-14 Daniel <durbano@shbano.com>
6669 * DLD-FUNCTIONS/besselj.cc, DLD-FUNCTIONS/chol.cc,
6670 DLD-FUNCTIONS/fft.cc, DLD-FUNCTIONS/fftw_wisdom.cc, utils.cc:
6672 From Jorge Barros de Abreu <ficmatin01@solar.com.br>.
6674 2005-09-14 David Bateman <dbateman@free.fr>
6676 * help.cc (Flookfor, print_lookfor, first_help_sentence):
6679 2005-09-07 Bill Denney <denney@seas.upenn.edu>
6681 * dirfns.cc (Fglob): Doc fix.
6683 2005-09-07 John W. Eaton <jwe@octave.org>
6685 * ov-struct.cc (Fstruct): Allow struct (zeros (0, N)) to create a
6688 2005-09-04 David Bateman <dbateman@free.fr>
6690 * DLD-FUNCTIONS/colamd.c (COLAMD_NAME, SYMAMD_NAME): New macros
6691 (symetree, make_set, link, finf, etdfs, TreePostorder, coletree,
6692 Fcolamd, Fsymamd, Fetree): Update for 64-bit indexing and colamd
6695 2005-09-01 John W. Eaton <jwe@octave.org>
6697 * variables.cc (symbol_out_of_date): Don't check nested functions.
6699 2005-08-31 John W. Eaton <jwe@octave.org>
6701 * oct-map.cc (Octave_map::index): Don't crash if index list is empty.
6702 * ov-str-mat.cc (octave_char_matrix_str::do_index_op_internal):
6705 * oct-map.h (Octave_map::ndims): New function.
6707 2005-08-30 John W. Eaton <jwe@octave.org>
6709 * ov-range.h (octave_range::permute): New function.
6711 * ov-struct.cc (octave_struct::load_ascii,
6712 octave_struct::load_binary, octave_struct::load_hdf5): Try harder
6713 to read old-style files correctly.
6715 2005-08-25 David Bateman <dbateman@free.fr>
6717 * OPERATORS/op-sm-m.cc, OPERATORS/op-sm-cm.cc, OPERATORS/op-scm-m.cc,
6718 OPERATORS/op-scm-cm.cc, OPERATORS/op-m-sm.cc, OPERATORS/op-m-scm.cc,
6719 OPERATORS/op-cm-sm.cc, OPERATORS/op-cm-scm.cc: Use mixed matrix/sparse
6720 multiply operator rather than casting sparse to matrix.
6722 2005-07-18 John W. Eaton <jwe@octave.org>
6724 * strfns.cc (Fstrcmp): New function from Søren Hauberg
6725 <soren@hauberg.org> and Tom Holroyd <tomh@kurage.nimh.nih.gov>.
6726 Adapt to Octave conventions.
6728 2005-07-11 David Bateman <dbateman@free.fr>
6730 * ov-fc-inline.cc (Fvectorize): Allow string arguments
6732 2005-07-08 John W. Eaton <jwe@octave.org>
6734 * DLD-FUNCTIONS/gplot.l (Fhold, Fishold): Delete.
6735 (clear_before_plotting): Delete static variable.
6736 Delete PKG_ADD line for hold.
6738 2005-07-07 John W. Eaton <jwe@octave.org>
6740 * pr-output.cc (pr_plus_format): Delete "static" from template decl.
6742 * oct-stream.cc (octave_scan): Delete explicit instantiation of
6743 octave_scan<double> since a specialization is provided.
6745 * DLD-FUNCTIONS/matrix_type.cc (Fmatrix_type): Include
6746 <algorithm>, for std::transform decl. Use std qualifier for
6747 transform and tolower.
6749 2005-07-05 Antoine Moreau <antoine.moreau@univ-bpclermont.fr>
6751 * DLD-FUNCTIONS/betainc.cc (Fbetainc): Fix doc string to match
6752 function definition..
6754 2005-07-05 Mats Jansson <mats.e.jansson@home.se>
6756 * file-io.cc (Fmkstemp): Check if second argument is true
6757 before marking file for deletion.
6759 2005-07-05 John W. Eaton <jwe@octave.org>
6761 * ov-str-mat.cc (octave_char_matrix_str::do_index_op_internal):
6762 Rename from char_matrix_str::do_index_op. New arg, type.
6763 ov-str-mat.h (octave_char_matrix_str::do_index_op): Define using
6764 do_index_op_internal.
6765 (octave_char_matrix_sq_str::do_index_op): New function.
6767 2005-07-01 John W. Eaton <jwe@octave.org>
6769 * parse.y (end_error): Also handle end_try_catch case.
6771 2005-06-17 John W. Eaton <jwe@octave.org>
6773 * help.cc (help_from_list, help_from_symbol_table,
6774 help_from_file): New arg, symbol_found.
6775 (builtin_help): Use symbol_found arg to determine whether help
6776 text is empty or symbol is not available.
6778 * symtab.cc (symbol_record::print_info): Print more info.
6780 * DLD-FUNCTIONS/dispatch.cc (Fdispatch_help): Delete.
6781 (dispatch_record): Don't prepend "<>" to help text.
6782 (Fdispatch): Don't setup dispatched help.
6784 * help.cc (extract_help_from_dispatch): New function.
6785 (help_from_symbol_table): Use it.
6786 * defun.cc (print_usage): Use it.
6788 * toplev.cc (octave_config_info): Include localapifcnfiledir and
6789 localapioctfiledir in the list.
6791 * symtab.h (symbol_record::alias): New arg, mark_to_clear.
6792 (symbol_record::aliases_to_clear): New data member.
6793 (symbol_record::push_alias_to_clear): New function.
6794 * symtab.cc (symbol_record::alias): If mark_to_clear is true, push
6795 this pointer on aliases_to_clear stack for s.
6796 (symbol_record::clear): Also clear aliases_to_clear_stack.
6798 * defun.cc (install_dld_function): Create full file name alias in
6799 fbi_sym_tab and hide it from view.
6800 Don't call protect or make_eternal on sym_rec.
6802 * variables.cc (fcn_out_of_date): New function.
6803 (symbol_out_of_date): Also check for symbol using full function
6806 * symtab.h (symbol_record::visible): New data member.
6807 (symbol_record::hide, symbol_record::show, symbol_record::is_visible):
6810 * symtab.h (symbol_record::maybe_delete_def): New private function.
6811 * symtab.cc (symbol_record::clear, symbol_record::alias,
6812 symbol_record::pop_context,
6813 symbol_record::define (octave_function *, unsigned int)): Use it.
6814 (symbol_table::symbol_list): Only include visible symbols in list.
6816 * parse.y (frob_function): Hide nested function names.
6818 * parse.y (frob_function): Create full file name alias in
6819 fbi_sym_tab and hide it from view.
6820 * defun.cc (install_dld_function): Likewise.
6822 2005-06-16 John W. Eaton <jwe@octave.org>
6824 * ov-dld-fcn.cc (octave_dld_function): Check Voct_file_dir to see
6825 if function is system file, Vfcn_file_dir.
6826 * defaults.cc (set_default_oct_file_dir): New function.
6827 (install_defaults): Call it.
6828 (Voct_file_dir): New global variable.
6829 * defaults.h.in (Voct_file_dir): Provide decl.
6831 * variables.cc (function_out_of_date_internal): Use
6832 Vignore_function_time_stamp only to avoid calling stat.
6833 (symbol_out_of_date): Don't check Vignore_function_time_stamp here.
6834 (function_out_of_date): Rename from function_out_of_date_internal.
6836 * defaults.cc (loadpath): Don't do anything if value is unchanged.
6837 If loadpath changes, also update Vlast_prompt_time.
6839 2005-06-14 John W. Eaton <jwe@octave.org>
6841 * pt-mat.cc (Vwarn_string_concat): Default value now false.
6842 (symbols_of_pt_mat): Change initial value here as well.
6844 * ls-mat5.cc, mappers.cc, oct-stream.cc, pr-output.cc: Change all
6845 uses of octave_is_NaN_or_NA to xisnan.
6847 2005-06-14 Keith Goodman <kwgoodman@gmail.com>
6849 * input.cc (get_user_input): Renamed debug commands to dbnext,
6851 * pt.cc: Renamed dbg_next to dbnext in comment string.
6852 * pt.h: Renamed dbg_next to dbnext in comment string.
6854 2005-06-14 David Bateman <dbateman@free.fr>
6856 * pt-arg-list.cc (F__end__): Return 1 for dimensions larger than ndim.
6858 2005-06-14 John W. Eaton <jwe@octave.org>
6860 * ls-mat5.cc (save_mat5_array_length): Special case for NaN, NA,
6861 and Inf values. Only check if abs value is greater than FLT_MAX.
6863 2005-06-09 David Bateman <dbateman@free.fr>
6865 * ls-mat5.cc (save_mat5_element_length): 1 element strings will be
6866 saved in a compressed format, so calculate the length accordingly.
6868 2005-05-30 David Bateman <dbateman@free.fr>
6870 * ls-mat5.cc (read_mat5_binary_element): Don't convert to string
6871 if matrix is not of type mxCHAR_CLASS.
6873 2005-05-23 John W. Eaton <jwe@octave.org>
6875 * file-io.cc (Ffopen): Don't fail with internal error message if
6876 we fail to create a valid stream object.
6877 (do_stream_open (const std::string&, const std::string&,
6878 const std::string&, int&): Always create octave_stream object,
6879 even if file pointer returne from fopen is 0.
6881 * load-save.cc (gripe_file_open): New function.
6882 (get_file_format, Fload, Fsave): Use it.
6884 * DLD-FUNCTIONS/sort.cc (mx_sort, mx_sort_indexed): Return
6885 appropriately sized empty values for empty args.
6887 * debug.cc (Fdbwhere, get_user_function): Look at
6888 curr_caller_function, not curr_function, since function is now set
6889 inside mapper, built-in (and therefore dld) functions too.
6891 2005-05-21 John W. Eaton <jwe@octave.org>
6893 * pr-output.cc, pr-output.h (Vprint_empty_dimensions): Now extern.
6894 * ov-cell.cc (octave_cell::print_raw): Conditionally print
6895 dimensions of empty 2-d cell arrays.
6897 * DLD-FUNCTIONS/sort.cc (mx_sort, mx_sort_indexed): Return empty
6898 values for empty args.
6900 * lex.l (handle_string): If single-quote string, \ and . have no
6903 2005-05-18 John W. Eaton <jwe@octave.org>
6905 * pt-colon.cc (tree_colon_expression::make_range): Don't require
6906 scalars values as range components.
6908 * version.h (OCTAVE_VERSION): Now 2.9.3
6909 (OCTAVE_API_VERSION): Now api-v16.
6911 * ov-base-sparse.cc (octave_base_sparse<T>::print_raw):
6912 Make spacing of output consistent with other parts of Octave.
6914 * DLD-FUNCTIONS/rand.cc (do_rand): Chop trailing singelton
6915 dimensions before generating array.
6917 2005-05-17 John W. Eaton <jwe@octave.org>
6919 * ov.cc (install_types): Don't call octave_stream::register_type.
6920 * ov.h, ov.cc (octave_value::octave_value (const octave_stream&,
6921 int): Delete constructor.
6922 (octave_value::is_stream, octave_value::stream_value,
6923 octave_value::stream_number): Delete functions.
6924 * ov-base.h (octave_base_value::is_stream): Delete function.
6925 * ov-base.h, ov-base.cc (octave_base_value::stream_value,
6926 octave_base_value::stream_number): Delete functions.
6927 * file-io.cc (Fisstream): Delete function.
6928 * op-file.h, op-file.cc, OPERATORS/op-fil-sbm.cc,
6929 OPERATORS/op-fil-scm.cc, OPERATORS/op-fil-sm.cc,
6930 * OPERATORS/op-fil-b.cc, OPERATORS/op-fil-bm.cc,
6931 OPERATORS/op-fil-cm.cc, OPERATORS/op-fil-cs.cc,
6932 OPERATORS/op-fil-m.cc, OPERATORS/op-fil-s.cc,
6933 OPERATORS/op-fil-lis.cc, OPERATORS/op-fil-rec.cc,
6934 OPERATORS/op-fil-str.cc: Delete files.
6935 * Makefile.in (OP_XSRC, SPARSE_OP_XSRC): Delete op-fil-*.cc from
6937 (OV_INCLUDES): Delete op-file.h from the list.
6938 (OV_SRC): Delete op-file.cc from the list.
6939 * oct-stream.cc, oct-stream.h (octave_stream_list::insert,
6940 octave_stream_list::do_insert): Return stream number instead of
6943 2005-05-16 David Bateman <dbateman@free.fr>
6945 * ls-mat.cc (save_mat5_binary_element): Increase size of
6947 (load_mat5_binary_element): Allow ASCII encoded as UTF8,
6948 and give error messages for multi-byte UTF8 and UTF16 and UTF32
6951 * ls-hdf5.h (H5T_NATIVE_IDX): New macro defining native indexing
6954 * ls-hdf5.cc (save_hdf5_empty, load_hdf5_empty): Use
6955 H5T_NATIVE_IDX to allow 64-bit indexing.
6956 * ov-bool-sparse.cc (save_hdf5, load_hdf5): ditto.
6957 * ov-re-sparse.cc (save_hdf5, load_hdf5): ditto.
6958 * ov-cx-sparse.cc (save_hdf5, load_hdf5): ditto.
6959 * ov-cell.cc (save_hdf5, load_hdf5): ditto.
6961 * load-save.cc (parse_save_options): Remove -nozip option.
6962 (Fsave): If user defines file format, ignore completely the default
6963 file format options.
6965 2005-05-12 John W. Eaton <jwe@octave.org>
6967 * Makefile.in (oct-gperf.h): Try harder to cause Make to exit here
6968 if gperf is missing or fails to create a valid file.
6970 2005-05-10 John W. Eaton <jwe@octave.org>
6972 * lex.l (<MATRIX_START>{SNLCMT}*\]{S}*): If whitespace was gobbled,
6973 unput SPC before returning the token.
6974 (<MATRIX_START>{SNLCMT}*\}{S}*): Likewise.
6976 2005-05-09 John W. Eaton <jwe@octave.org>
6978 * parse.y (except_command): Make catch clause optional in try
6980 * pt-except.cc (tree_try_catch_command::eval):
6981 Always buffer error messages.
6983 2005-05-06 John W. Eaton <jwe@octave.org>
6985 * ov-struct.cc (octave_struct::save_ascii,
6986 octave_struct::save_binary, octave_sruct::save_hdf5):
6987 Always save cell array.
6988 (octave_struct::load_ascii, octave_struct::load_binary,
6989 octave_sruct::load_hdf5): Try to read old-style files correctly.
6991 * DLD-FUNCTIONS/__qp__.cc (qp): Use chol2inv to compute inverse
6992 from Cholesky factors.
6995 * DLD-FUNCTIONS/chol.cc (Fcholinv): New function.
6996 (Fchol2inv): New function.
6998 2005-05-05 Keith Goodman <kwgoodman@gmail.com>
7000 * ov-usr-fcn.cc (Fnargout, Fnargin): Update doc strings.
7001 * help.cc (keywords): Update doc strings for varargin, varargout.
7003 2005-05-05 John W. Eaton <jwe@octave.org>
7005 * oct-stream.cc (BEGIN_S_CONVERSION): Correctly handle width
7008 2005-05-04 John W. Eaton <jwe@octave.org>
7010 * ls-mat5.cc (read_mat5_binary_element): Implement reading of N-d
7013 * ov-struct.cc (octave_struct::load_hdf5,
7014 octave_struct::load_binary, octave_struct::load_ascii): Assign
7015 cell_value to map slot, not octave_value containing the cell.
7017 2005-05-02 John W. Eaton <jwe@octave.org>
7019 * error.cc (Flasterr): Don't access argv if an error occurs when
7022 * mkgendoc (main): Print header message.
7024 2005-05-02 Bill Denney <denney@seas.upenn.edu>
7026 * data.cc, defaults.cc, DLD-FUNCTIONS/qz.cc, file-io.cc,
7027 sighandlers.cc, syscalls.cc: Docstring fixes.
7029 2005-05-02 John W. Eaton <jwe@octave.org>
7031 * pr-output.cc (octave_print_internal (std::ostream&,
7032 const Range&, bool, int)): Don't print newline at end of broken
7033 rows (that is handled by pr_col_num_header).
7034 From Keith Goodman <kwgoodman@gmail.com>.
7036 * Makefile.in (octave$(EXEEXT)): List $(UMFPACK_LIBS) ahead of
7038 (OCTAVE_LIBS): Include $(GLPK_LIBS) in the list if dynamic linking
7040 From Dmitri A. Sergatskov <dasergatskov@gmail.com>.
7042 2005-05-02 John W. Eaton <jwe@octave.org>
7044 * oct-map.h, oct-map.cc (Octave_map::seek, Octave_map::contents):
7045 New non-const versions.
7046 (Octave_map::assign (const octave_value_list&,
7047 const std::string&, const Cell&)): Allow both tmp RHS and LHS to
7048 be resized. For clarity, always resize to new_dims.
7050 2005-05-02 David Bateman <dbateman@free.fr>
7052 * ov-re-sparse.cc, ov-cx-sparse.cc (load_binary): read save_type into
7055 2005-04-29 John W. Eaton <jwe@octave.org>
7057 * oct-stream.cc (DO_LITERAL_CONVERSION): Cast fmt[i] to unsigned
7058 char for comparison.
7060 * c-file-ptr-stream.h (c_file_ptr_stream): New template class,
7061 converted from i_c_file_ptr_stream.
7062 (i_c_file_ptr_stream, o_c_file_ptr_stream, io_c_file_ptr_stream):
7064 (i_c_zfile_ptr_stream, o_c_zfile_ptr_stream, io_c_zfile_ptr_stream):
7066 * c-file-ptr-stream.h, c-file-ptr-stream.cc (c_zfile_ptr_buf):
7069 * oct-stdstrm.h (class octave_tstdiostream): New template class,
7070 converted from octave_stdiostream.
7071 (octave_stdiostream): Now a typedef.
7072 [HAVE_ZLIB] (octave_zstdiostream): New a typedef.
7073 * oct-stdstrm.cc: Delete.
7074 * Makefile.in (DIST_SRC): Remove it from the list.
7076 2005-04-29 David Bateman <dbateman@free.fr>
7078 * Makefile.in: Add matrix_type.cc and spkron.cc to DLD_XSRC.
7080 * ls.mat.cc (read_mat5_binary_element): Allow for endian change
7081 for compressed data elements.
7083 * ov-base-sparse.cc (assign): Invalidate matrix type.
7085 * ov-base-sparse.cc (SparseType sparse_type (void),
7086 SparseType sparse_type (const SparseType&):
7087 Functions to read and set sparse matrix type.
7089 * ov-bool-sparse.cc (load_binary): Remove third argument.
7090 (load_hdf5): Cast hsize_t comparisions with int to avoid warning.
7091 * ov-cx-sparse.cc (load_hdf5): Ditto.
7092 * ov-re-sparse.cc (load_hdf5): Ditto.
7094 * ov-re-sparse.cc (convert_to_str_internal): Add third argument
7096 * ov-re-sparse.h (convert_to_str_internal): Adject declaration.
7098 * sparse-xdiv.cc (xdiv, xleftdiv): Pass SparseType as third
7099 argument, use it and return it to allow caching of type.
7100 * sparse-xdiv.h (xdiv, xleftdiv): Change declarations for third
7101 argument of type SparseType.
7103 * DLD-FUNCTIONS/luinc.cc (Fluinc): Use type_name and not
7104 class_name to test for real/complex sparse matrices.
7107 * DLD-FUNCTIONS/splu.cc (Fsplu): Set matrix type.
7109 * OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc,
7110 OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc,
7111 OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc,
7112 OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc,
7113 OPERATORS/op-scm-cm.cc, OPERATORS/op-scm-cs.cc,
7114 OPERATORS/op-scm-m.cc, OPERATORS/op-scm-s.cc,
7115 OPERATORS/op-scm-scm.cc, OPERATORS/op-scm-sm.cc,
7116 OPERATORS/op-sm-cm.cc, OPERATORS/op-sm-cs.cc,
7117 OPERATORS/op-sm-m.cc, OPERATORS/op-sm-s.cc,
7118 OPERATORS/op-sm-scm.cc, OPERATORS/op-sm-sm.cc (div, ldiv):
7119 Pass and recache SparseType wirh xdiv/xleftdiv.
7121 2005-04-29 John W. Eaton <jwe@octave.org>
7123 * file-io.cc (maybe_warn_interface_change): Delete function.
7124 (fopen_mode_to_ios_mode): Don't call it.
7126 2005-04-27 John W. Eaton <jwe@octave.org>
7128 * ov-fcn-handle.cc (octave_fcn_handle::subsref):
7129 Check whether function referenced by handle is out of date.
7130 (Ffunctions): Tag nameless user function as "command-line".
7132 * variables.cc (symbol_out_of_date (octave_fucntion *)): New function.
7133 (function_out_of_date): New function.
7134 * parse.y (load_fcn_from_file (const std::string&, bool)):
7137 * DLD-FUNCTIONS/gplot.l (gnuplot_init): New function to handle
7138 initialization. If builtin variables have already been installed,
7139 simply update our cached values.
7140 (F__gnuplot_init__): Call gnuplot_init to do all the real work.
7141 (Fclearplot, Fcloseplot, Fhold, Fishold, Fpurge_tmp_files,
7142 F__gnuplot_raw__, F__gnuplot_set__, F__gnuplot_plot__,
7143 F__gnuplot_splot__, F__gnuplot_replot__, Fgplot, Fgsplot, Fgraw,
7144 Fgset, Fgshow): Call gnuplot_init before doing anything.
7146 * parse.y: (safe_fclose): Delete comment list to avoid memory leak.
7147 (parse_and_execute (FILE *)): Also save and restore global_command.
7149 2005-04-26 John W. Eaton <jwe@octave.org>
7151 * mkbuiltins (VAR_FILES): Expect $(VAR_FILES) to have .df suffix.
7153 * Makefile.in (clean): Also remove $(DLD_PICOBJ).
7154 Use mk-oct-links --delete to remove links to .oct files.
7155 Remove $(DOC_FILES) not $(DEF_FILES) and $(VAR_FILES).
7157 * mk-oct-links (mk-oct-links): Handle --delete option.
7158 Rename -p option to be --print. Skip nonexistent .df files.
7160 2005-04-25 John W. Eaton <jwe@octave.org>
7162 * oct-hist.cc (default_history_file, default_history_size): Now static.
7163 * oct-hist.h: Delete decls.
7165 * oct-hist.cc (default_history_timestamp_format,
7166 default_history_timestamp_format): New functions.
7167 (Vdefault_history_timestamp_format): New variable.
7168 (symbols_of_oct_hist): DEFVAR it.
7169 (octave_history_write_timestamp): New function.
7170 * oct-hist.h (octave_history_write_timestamp): Provide decl.
7171 * toplev.cc (): call octave_history_write_timestamp here.
7172 * octave.cc (maximum_braindamage):
7173 Bind history_timestamp_format_string here.
7175 2005-04-22 John W. Eaton <jwe@octave.org>
7177 * version.h (OCTAVE_VERSION): Now 2.9.2.
7178 (OCTAVE_API_VERSION): Now api-v15.
7180 * pager.cc (default_pager): Also append -X.
7182 * DLD-FUNCTIONS/dispatch.cc (Fdispatch): Dispatch help on "string"
7183 and "sq_string" types.
7184 (dispatch_record): Add extra space to force new paragraph after
7185 each dispatched function name if we are formatting with Texinfo.
7186 Force noindent of preceding "Overloaded function:" tag.
7188 2005-04-21 John W Eaton <jwe@octave.org>
7190 * ls-mat5.cc (read_mat5_binary_element): Only read sparse matrix
7191 values if sizeof (int) == sizeof (octave_idx_type).
7193 * DLD-FUNCTIONS/colamd.cc: These functions only work if
7194 sizeof (int) == sizeof (octave_idx_type).
7196 * Makefile.in (parse.cc): Expect 14 shift/reduce conflicts.
7198 * parse.y (USING TITLE WITH AXES COLON OPEN_BRACE CLEAR):
7199 Delete unused tokens.
7201 * DLD-FUNCTIONS/__qp__.cc (qp): Use octave_idx_type where needed.
7203 * DLD-FUNCTIONS/__qp__.cc: New file.
7204 * Makefile.in (DLD_XSRC): Add it to the list.
7206 2005-04-20 John W. Eaton <jwe@octave.org>
7208 * lex.l (IDENT): Allow $ in identifiers.
7209 * utils.cc (valid_identifier): Likewise.
7211 2005-04-19 John W. Eaton <jwe@octave.org>
7213 * toplev.cc (Fsystem): Move enum exec_type declaration to file
7214 scope and rename system_exec_type. Change all uses.
7216 2005-04-14 David Bateman <dbateman@free.fr>
7218 * load-save.cc (Vdefault_save_format, Voctave_core_file_format):
7220 (Vdefault_save_options, Voctave_core_file_options): New variables.
7221 (get_save_format): Delete function.
7222 (parse_save_options (const string_vector&, ...),
7223 parse_save_options (const std::string&, ...)): New functions.
7224 (dump_octave_core): Allow save_as_floats to be used.
7225 (dump_octave_core): Parse save options.
7226 (Fsave): Split parsing of options, and default formats.
7227 (default_save_format): Delete function and DEFVAR.
7228 (default_save_options): New function. DEFVAR it.
7229 (octave_core_file_format): Delete function and DEFVAR.
7230 (octave_core_file_options): New function. DEFVAR it.
7232 * octave.cc (default_save_format): Delete binding
7233 (default_save_options): New bindings
7235 * Makefile.in: Add luinc.cc to DLD_XSRC.
7236 * DLD-FUNCTIONS/luinc.cc: New file for incomplete LU factorization.
7238 * ov-bool-sparse.h (index_vector): New function.
7239 * ov-re-sparse.cc (index_vector): Ditto.
7240 * ov-re-sparse.h (index_vector): Definition.
7242 * ov-mapper.cc (any_element_less_than, any_element_greater_than):
7243 New versions for SparseMatrix
7244 (SPARSE_MAPPER_LOOP_2, SPARSE_MAPPER_LOOP_1, SPARSE_MAPPER_LOOP):
7246 (octave_mapper::apply): Add special cases for sparse arguments to
7247 the mapper functions
7249 * ov-re-sparse.cc (streamoff_array_value): Use octave_idx_type.
7250 (convert_to_str_internal): New function.
7251 * ov-re-sparse.h (convert_to_str_internal): Definition.
7253 * DLD-FUNCTIONS/sparse.cc (Fsparse): More care for nargin=2 case.
7255 * DLD-FUNCTIONS/splu.cc (Fsplu): Use octave_idx_type.
7257 2005-04-14 John W. Eaton <jwe@octave.org>
7259 * strfns.cc (Fchar): If arg is a dq string, return a dq string.
7261 * pt-mat.cc (Vwarn_string_concat): New static variable.
7262 (symbols_of_pt_mat): DEFVAR it.
7263 (warn_string_concat): New function.
7264 (maybe_warn_string_concat): New function.
7265 (tree_matrix::rvalue): If all args are single quoted strings,
7266 create a single quoted string object. If all args are strings
7267 (any type), create a double quoted string object. If a mixture of
7268 string types, maybe warn.
7269 (class tm_row_const, class tm_row_const_rep, class tm_const):
7270 Note whether all values are double or single quoted strings.
7272 * ov.h (octave_value::is_dq_string): New function.
7274 2005-04-13 John W. Eaton <jwe@octave.org>
7276 * strfns.cc (Fchar): Create sq_string objects here.
7278 2005-04-12 John W. Eaton <jwe@octave.org>
7280 * file-io.cc (Ffprintf, Fprintf, Fsprintf):
7281 Pass octave_value to octave_stream::printf for FMT.
7282 (Fscanf, Fsscanf): Likewise, for octave_stream::scanf and
7283 octave_stream::oscanf.
7285 * oct-stream.cc, oct-stream.h (octave_stream::printf,
7286 octave_stream::scanf, octave_stream::oscanf): New versions that
7287 accept an octave_value for FMT.
7288 (octave_stream::puts): New version that accepts octave_value for
7290 (octave_base_stream::do_scanf): If all_char_conv, force
7291 conversion to string to avoid warning.
7293 * ov-str-mat.h, ov-str-mat.cc (octave_char_matrix_sq_str): New class.
7294 (octave_char_matrix_dq_str): New typedef.
7296 * ov.h, ov.cc: All string constructors now take type argument.
7298 * ov.cc (install_types): Register octave_char_matrix_sq_str.
7300 * ov.h (octave_value::convert_to_str): New arg, type.
7301 (octave_value::convert_to_str_internal): Likewise.
7302 Change all derived classes.
7304 * ov.h (octave_value::is_sq_string): New predicate.
7306 * octave.gperf (__FILE__): Now a DQ_STRING.
7308 * ls-mat4.cc (read_mat_binary_data): Force sq strings here.
7309 * ls-mat5.cc (read_mat5_binary_element): And here.
7311 * lex.l (<COMMAND_START>[\;\,]): Return SQ_STRING, not STRING.
7312 (<COMMAND_START>[^#% \t\r\n\;\,\"\'][^ \t\r\n\;\,]*{S}*): Likewise.
7313 (handle_string): Type of string to return depends on delimeter.
7315 * parse.y (DQ_STRING, SQ_STRING): New token types.
7316 (STRING): Delete token type.
7317 (string): New non-terminal.
7318 (constant): Recognize string here instead of STRING.
7319 (word_list): Likewise.
7320 (opt_sep): Handle DQ_STRING and SQ_STRING.
7322 * OPERATORS/op-str-m.cc, OPERATORS/op-str-s.cc,
7323 OPERATORS/op-str-str.cc: Define operators for both sq and dq
7326 2005-04-08 John W. Eaton <jwe@octave.org>
7328 * Makefile.in (clean): Use exact filenames instead of *.xxx.
7329 Also remove PKG_ADD.
7330 (DISTFILES): Add gplot.cc to the list.
7331 (maintainer-clean): Remove gplot.cc here.
7333 * Initial merge of 64-bit changes from Clinton Chee:
7335 2005-04-07 John W. Eaton <jwe@octave.org>
7337 * ls-oct-ascii.h, ls-oct-ascii.cc (extract_keyword): Now template
7338 functions defined in the header file.
7340 * ls-mat5.cc, ov-base-sparse.h, ov-base.h, ov-bool-sparse.cc
7341 ov-cx-sparse.cc, ov-re-sparse.cc, ov.cc, pt-loop.cc,
7342 sparse-xdiv.cc, sparse-xpow.cc, DLD-FUNCTIONS/sparse.cc,
7343 DLD-FUNCTIONS/spdet.cc:
7344 Use octave_idx_type instead of int where needed.
7346 2005-03-31 Clinton Chee <chee@parallel.hpc.unsw.edu.au>
7348 * Cell.cc, Cell.h, data.cc, defaults.cc, dirfns.cc, file-io.cc,
7349 gripes.cc, gripes.h, ls-mat-ascii.cc, ls-mat4.cc, ls-oct-ascii.cc,
7350 oct-map.cc, oct-map.h, oct-obj.cc, oct-obj.h, oct-stream.cc,
7351 oct-stream.h, octave.cc, ops.h, ov-base-mat.cc, ov-base.h,
7352 ov-bool-mat.cc, ov-cell.cc, ov-cs-list.cc, ov-cx-mat.cc,
7353 ov-intx.h, ov-list.cc, ov-mapper.cc, ov-range.cc, ov-range.h,
7354 ov-re-mat.cc, ov-scalar.h, ov-str-mat.cc, ov-struct.cc, ov.cc,
7355 ov.h, pr-output.cc, pt-arg-list.cc, pt-cell.cc, pt-loop.cc,
7356 pt-mat.cc, pt-select.cc, symtab.h, utils.cc, utils.h, xdiv.cc,
7358 Use octave_idx_type instead of int where needed.
7360 2005-04-01 John W. Eaton <jwe@octave.org>
7362 * toplev.cc (octave_config_info): Add USE_64_BIT_IDX_T to the list.
7363 * oct-conf.h.in (OCTAVE_CONF_USE_64_BIT_IDX_T): Substitute here.
7365 2005-03-31 John W. Eaton <jwe@octave.org>
7367 * DLD-FUNCTIONS/sort.cc: Don't use unsigned int for index into
7368 dim_vector, or cast dim to unsigned int.
7369 (Fsort): No need to cast arg before asking for dims.
7371 * DLD-FUNCTIONS/gcd.cc (Fgcd): Use OCTAVE_LOCAL_BUFFER to allocate
7372 local array of NDArray objects.
7374 2005-03-31 Clinton Chee <chee@parallel.hpc.unsw.edu.au>
7376 * DLD-FUNCTIONS/balance.cc, DLD-FUNCTIONS/besselj.cc,
7377 DLD-FUNCTIONS/chol.cc, DLD-FUNCTIONS/colloc.cc,
7378 DLD-FUNCTIONS/daspk.cc, DLD-FUNCTIONS/dasrt.cc,
7379 DLD-FUNCTIONS/dassl.cc, DLD-FUNCTIONS/det.cc,
7380 DLD-FUNCTIONS/eig.cc, DLD-FUNCTIONS/expm.cc, DLD-FUNCTIONS/fft.cc,
7381 DLD-FUNCTIONS/fft2.cc, DLD-FUNCTIONS/fftn.cc,
7382 DLD-FUNCTIONS/fftw_wisdom.cc, DLD-FUNCTIONS/filter.cc,
7383 DLD-FUNCTIONS/find.cc, DLD-FUNCTIONS/fsolve.cc,
7384 DLD-FUNCTIONS/gcd.cc, DLD-FUNCTIONS/hess.cc, DLD-FUNCTIONS/inv.cc,
7385 DLD-FUNCTIONS/kron.cc, DLD-FUNCTIONS/lu.cc,
7386 DLD-FUNCTIONS/minmax.cc, DLD-FUNCTIONS/quad.cc,
7387 DLD-FUNCTIONS/qz.cc, DLD-FUNCTIONS/rand.cc,
7388 DLD-FUNCTIONS/schur.cc, DLD-FUNCTIONS/sort.cc,
7389 DLD-FUNCTIONS/sqrtm.cc, DLD-FUNCTIONS/svd.cc,
7390 DLD-FUNCTIONS/syl.cc:
7391 Use octave_idx_type instead of int where needed.
7393 2005-04-06 David Bateman <dbateman@free.fr>
7395 * Makefile.in: Link to UMFPACK_LIBS. Add zfstream.{cc,h} to build and
7398 * zfstream.cc: New file for C++ binding for fstream like class for
7401 * zfstream.h: Definition for fstream like C++ bindings to zlib.
7403 * load-save.cc (static bool check_gzip_magic (const std::string&)):
7404 New function to look for GZIP magic
7405 (static load_save_format get_file_format (const istream &file)): New
7406 function split from old get_file_format but passed istream to allow
7407 use with zlib istream.
7408 (static load_save_format get_file_format (const std::string&,
7409 const std::string&, bool)): Modify the test uncompressed file first,
7410 then compressed version
7411 (Fload) Allow -v6, -6, -v7 and -7 options. Split load code to allow
7413 (Fsave) Allow -zip, -z, -v6, -6, -v7 and -7 options. Split save code
7414 to allow use of zlib.
7416 * load-save.h: add LS_MAT7_BINARY to load_save_format enum
7418 * ls-mat5.cc (read_mat5_binary_element): Test for miCOMPRESSED flag for
7419 matlab v7 files, and decompress data in memory. Allow reading of matlab
7420 logical variables either in mxDOUBLE_CLASS or mxUINT8_CLASS.
7421 (int save_mat5_array_length(const double*, ...): New function to
7422 calculate number of bytes used to save NDArray.
7423 (int save_mat5_array_length(const Complex*, ...): New function to
7424 calculate number of bytes used to save ComplexNDArray.
7425 (int save_mat5_element_length): New function to find number of bytes
7426 needed to save data element.
7427 (save_mat5_binary_element): New input arguments, mat7_format and
7428 compressing, that define if we are in a matlab v7 format and where we
7429 are currently compressing the data element. If mat7_format use
7430 miCOMPRESSED flag for matlab v7 files, and compress data in memory.
7431 Add capability to save logical variables as mxUINT8_CLASS. If v7
7432 format maximum variable length is 63 characters and not 31. Use the
7433 save_mat5_element_length function to pre-calculate the number of bytes
7434 taken by a variable rather than use a negative seek to correct after
7435 writing (zlib can't do negative seeking)
7437 * ls-mat5.h: Add to miCOMPRESSED, miUTF8, miUTF16 and miUTF32 flags to
7438 the enum mat5_data_type.
7439 (save_mat5_binary_element): Add args mat7_format and compressing to the
7442 2005-04-06 John W. Eaton <jwe@octave.org>
7444 * OPERATORS/op-scm-scm.cc: Delete #pragma implementation.
7446 2005-04-05 John W. Eaton <jwe@octave.org>
7448 * ov-ch-mat.h (octave_char_matrix::index_vector): New function.
7450 * oct-stream.cc (BEGIN_C_CONVERSION): Clear stream state if
7451 we hit EOF after we read something.
7453 * pt-assign.cc (tree_multi_assignment::rvalue):
7454 Allow assignments of the form [a,b,c] = x{:}.
7456 2005-03-30 John W. Eaton <jwe@octave.org>
7458 * mappers.cc (install_mapper_functions): Use std:: as needed.
7459 * defun-int.h (DEFUN_MAPPER_INTERNAL): Don't use X_CAST on
7460 function pointer args.
7462 * ov-complex.cc, ov-cx-mat.cc, xpow.cc, ls-mat5.cc: Use std:: for
7463 Complex functions instead of relying on wrappers from oct-cmplx.h.
7465 * oct-stream.cc (octave_scan): Initialize c1 to EOF.
7467 2005-03-29 John W. Eaton <jwe@octave.org>
7469 * utils.cc (get_dimensions): Produce error instead of warning if
7470 given a matrix argument.
7472 * load-save.cc (Fload, Fsave): Also accept -V4 option.
7474 * ls-hdf5.h (hdf5_fstreambase::hdf5_fstreambase,
7475 hdf5_fstreambase::open): Use & instead of == to test whether mode
7476 is std::ios::in or std::ios::out.
7477 (hd5_ifstream::istream, hd5_ifstream::open, hd5_ofstream::istream,
7478 hd5_ofstream::open): Default mode now includes binary flag.
7480 2005-03-28 John W. Eaton <jwe@octave.org>
7482 * oct-stream.cc (octave_stream::write): For compatibility, Write
7483 zeros instead of seeking if SKIP is nonzero.
7485 * DLD-FUNCTIONS/gplot.l (Fgraw): Recommend __gnuplot_raw__, not
7487 (Fgshow): Recommend __gnuplot_show__, not __gnuplot__show__.
7488 Don't add "mark_as_rawcommand ("replot")" to PKG_ADD file.
7490 2005-03-26 John W. Eaton <jwe@octave.org>
7492 * input.cc (gnu_readline): Don't wrap call to command_editor::readline
7493 with {BEGIN,END}_INTERRUPT_IMMEDIATELY_IN_FOREIGN_CODE.
7495 2005-03-25 John W. Eaton <jwe@octave.org>
7497 * toplev.cc (main_loop): Don't use octave_set_current_context here.
7499 * pt-loop.cc (simple_for_loop::eval): In for i = matrix ... end,
7500 skip loop if matrix is empty. Likewise for cell arrays.
7502 2005-03-24 John W. Eaton <jwe@octave.org>
7504 * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Texinfoize doc string.
7506 * Makefile.in (install-oct): Always create $(octfiledir) and
7507 install PKG_ADD file there.
7509 * octave.cc (octave_main): Fix logic in test for exit after
7510 evaluating --eval option code.
7512 2005-03-23 John W. Eaton <jwe@octave.org>
7514 * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Require 9 arguments.
7515 Print error messages and return early if value extractions fail.
7516 Default for message level now 0.
7517 Rename local variable error to be errnum.
7518 (glpk_fault_hook): Call message instead of writing to octave_stderr.
7519 (glpk_fault_hook): Call error instead of writing to octave_stderr.
7521 Declare mark static. Delete declaration of fperr.
7522 (glpk): Delete unnecessary casts.
7524 * DLD-FUNCTIONS/__glpk__.cc (OCTAVE_GLPK_GET_REAL_PARAM,
7525 OCTAVE_GLPK_GET_INT_PARAM): New macros.
7526 (F__glpk__): Use them.
7528 * DLD-FUNCTIONS/__glpk__.cc (F__glpk__): Accept lpsolver and
7529 save_pb in param arg instead of as separate args.
7530 Arg list now matches new interface for glpk.m.
7531 Don't return lambda and redcosts fields in extra if isMIP.
7533 * toplev.cc (do_octave_atexit): Call reset_error_handler before
7536 2005-03-22 John W. Eaton <jwe@octave.org>
7538 * Makefile.in: Add special rule for __glpk__.oct.
7540 * toplev.cc (octave_config_info): Add GLPK_LIBS to the list.
7541 * oct-conf.h.in (OCTAVE_CONF_GLPK_LIBS): Substitute here.
7543 * DLD-FUNCTIONS/__glpk__.cc (F__glpk__, glpk):
7544 Adapt to Octave coding style.
7545 (glpk): Move decls closer to first use.
7546 (F__glpk__): Eliminate unnecessary loop seting inf values.
7547 Ensure that isMIP is initialized.
7548 Declare sense, nz, and isMIP volatile to avoid GCC warnings that
7549 these variables might be might be clobbered by `longjmp' or `vfork'
7551 * DLD-FUNCTIONS/__glpk__.cc: New file.
7553 * Makefile.in (DLD_XSRC): Add it to the list.
7555 2005-03-21 John W. Eaton <jwe@octave.org>
7557 * octave.cc (maximum_braindamage):
7558 Don't set warn_matlab_incompatible to true.
7560 2005-03-17 John W. Eaton <jwe@octave.org>
7562 * lex.l (class bracket_brace_paren_nesting_level): Use static
7563 const int members instead of anonymous enum.
7565 2005-03-16 John W. Eaton <jwe@octave.org>
7567 * ov-struct.cc (octave_struct::save_ascii): Don't convert Cell
7569 (octave_struct::save_binary): Likewise
7570 (octave_struct::save_hdf5): Likewise.
7572 * DLD-FUNCTIONS/gplot.l (Fset, Fshow): Delete.
7573 (F__gnuplot_plot__): Rename from Fgplot.
7574 (F__gnuplot_splot__): Rename from Fgsplot.
7575 (F__gnuplot_raw__): Rename from Fgraw.
7576 (F__gnuplot_set__): Rename from Fgset.
7577 (F__gnuplot_show__): Rename from Fgshow.
7578 (F__gnuplot_replot__): Rename from Freplot.
7579 (WARN_DEPRECATED, DEPRECATED_BODY): New macros.
7580 (Fgplot, Fgsplot, Fgraw, Fgset, Fgshow): New functions.
7582 2005-03-15 John W. Eaton <jwe@octave.org>
7584 * lex.l (<COMMAND_START>{NL}): Reset lexer_flags.doing_rawcommand
7587 * version.h (OCTAVE_API_VERSION): Now 2.9.0.
7588 (OCTAVE_API_VERSION): Now api-v14.
7590 * Makefile.in (INCLUDES): Delete sparse-ops.h from the list.
7592 * cellfun.cc: New function from Octave-forge. Adapt to Octave
7594 * Makefile.in (DLD_XSRC): Add it to the list.
7596 2005-03-14 John W. Eaton <jwe@octave.org>
7598 * DLD-FUNCTIONS/dispatch.cc (Fbuiltin): Avoid crash if symbol
7601 2005-03-10 John W. Eaton <jwe@octave.org>
7603 * toplev.cc (Foctave_config_info): Print error instead of crashing
7604 if struct does not contain field we are looking for.
7606 2005-03-09 John W. Eaton <jwe@octave.org>
7608 * load-save.cc (Fload, Fsave): Accept -text as an alias for -ascii.
7609 Issue warning for future change in meaning of -ascii.
7611 * Makefile.in (bin-dist): Delete target.
7612 (BINDISTFILES, BINDISTLIBS): Delete variables.
7614 2005-03-04 John W. Eaton <jwe@octave.org>
7616 * octave.cc (octave_main): Concatenate all --eval arguments.
7618 2005-03-03 John W. Eaton <jwe@octave.org>
7620 * input.cc (input_from_command_line_file): Move definition here.
7621 * parse.y: From here.
7622 * input.h (input_from_command_line_file): Move decl here.
7623 * parse.h: From here.
7625 * input.cc (octave_gets):
7626 Don't save history if input is from command line file.
7628 * parse.y (parse_and_execute, parse_fcn_file, eval_string):
7629 Don't alter value of input_from_command_line_file here.
7630 (input_from_command_line_file): Default value is false.
7631 (eval_string): Turn off line editing here.
7633 * toplev.cc, toplev.h (main_loop): Delete fun_to_call arg and all uses.
7635 * octave.cc (fun_to_call): Delete static variable.
7636 (persist, code_to_eval): New static variables.
7637 (long_opts): Delete --funcall, add --eval and --persist.
7638 (usage_string, verbose_usage, octave_main): Likewise.
7639 (FUNCALL_OPTION): Delete.
7640 (EVAL_OPTION, PERSIST_OPTION): New macros.
7641 (maximum_braindamage): Set persist to true.
7642 (execute_eval_option_code): New function.
7643 (restore_program_name): New function.
7644 (execute_command_line_file): New function.
7645 (octave_main): Call execute_eval_option code and
7646 execute_command_line file. If persist, go interactive even after
7647 evaluating --eval code and/or command-line file.
7649 * ov-bool-sparse.h, ov-bool-sparse.cc
7650 (octave_sparse_bool_matrix::sparse_matrix_value,
7651 octave_sparse_bool_matrix::sparse_complex_matrix_value):
7654 * parse.y (looks_like_copyright): Check first 9 characters, not 14.
7656 2005-03-02 John W. Eaton <jwe@octave.org>
7658 * oct-stream.cc (octave_scan (std::istream&, const
7659 scanf_format_elt&, double*)): New specialization to handle Inf,
7662 * parse.y (looks_like_copyright):
7663 Rename from looks_like_octave_copyright. Change all uses.
7664 Simply match "Copyright".
7666 2005-03-01 John W. Eaton <jwe@octave.org>
7668 * DLD-FUNCTIONS/odessa.cc: Delete.
7669 * Makefile.in (DLD_XSRC): Remove it from the list.
7670 (OPT_HANDLERS): Remove ODESSA-opts.cc from the list.
7672 2005-02-28 John W. Eaton <jwe@octave.org>
7674 * toplev.cc (octave_config_info): Remove LIBGLOB and GLOB_INCFLAGS
7676 * oct-conf.h.in (OCTAVE_CONF_LIBGLOB, OCTAVE_CONF_GLOB_INCFLAGS):
7678 * Makefile.in (OCTAVE_LIBS): Remove $(LIBGLOB) from the list.
7680 2005-02-25 John W. Eaton <jwe@octave.org>
7684 2005-02-25 John W. Eaton <jwe@octave.org>
7686 * DLD-SRC/rand.cc (Frand): Accept "state" as an alias for "seed".
7688 * DLD-SRC/dispatch.cc: New file.
7689 * Makefile.in (DLD_XSRC): Add it to the list.
7691 2005-02-13 David Bateman <dbateman@free.fr>
7693 * ov-fcn-inline.h, DLD-FUNCTIONS/spparms.cc, DLD-FUNCTIONS/gcd.cc:
7694 Remove additional licensing clause, with authors permission
7696 * ov-base-sparse.h: New constructor to cache SparseType, not yet
7698 * ov-re-sparse.h: likewise
7699 * ov-cx-sparse.h: likewise
7702 * sparse-xdiv.cc: Remove spparms umfpack flag
7704 * DLD-FUNCTIONS/spparms.cc: Warning that umfpack flag is ignored.
7706 2005-01-16 David Bateman <dbateman@free.fr>
7708 * ls-mat5.cc (read_mat5_integer_data): Change "T &m" to "T *m" and
7709 instantiate with values like octave_int8 rather than int8NDArray.
7710 Modify function to fit
7711 (read_mat5_binary_element): Use new form of read_mat_integer_data
7712 to read data directly into sparse matrix
7713 (write_mat5_integer_data): Change "const T &m" to "T *m", etc. New
7714 instantiation with int.
7715 (save_mat5_binary_element): Modify to save sparse data
7717 2005-01-15 David Bateman <dbateman@free.fr>
7719 * data.cc (do_cat): Use first non-empty matrix as base for
7721 * pt-mat.cc (tree_matrix::rvalue): ditto.
7723 2005-01-14 John W. Eaton <jwe@octave.org>
7725 * ov.cc (do_cat_op): When checking for empty args, use
7726 all_zero_dims, not numel.
7727 * ov.h (octave_value::all_zero_dims): New function.
7729 * ov-bool-sparse.cc (try_narrowing_conversion): Convert to
7730 bool_matrix, not matrix.
7732 2005-01-13 David Bateman <dbateman@free.fr>
7734 * data.cc (make_diag): Use numel not capacity to remove ambiguity.
7735 * ov.h (octave_value::capacity): New virtual funtion.
7736 * ov-base.h (octave_base_value::capacity): New function calls numel.
7737 * data.cc (Freshape): Use arg.numel() rather than arg.dims().numel()
7738 since sparse numel now consistent.
7739 * symtab.h (symbol_record::symbol_def::capacity,
7740 symbol_record::capacity): New methods.
7741 * symtab.cc (symbol_record::print_symbol_info_line,
7742 symbol_table::parse_whos_line_format, symbol_table::maybe_list):
7743 used capacity() and not numel() to properly assess size of
7745 * ov-base-sparse.h (octave_base_sparse::capacity): New function,
7746 (octave_base_sparse::numel): Delete.
7747 * ov-re-sparse.cc (octave_sparse_matrix::streamoff_array_value):
7748 Only fill from non-zero elements of sparse array.
7749 * DLD-FUNCTIONS/splu.cc (Fsplu): Change use of nelem to numel.
7750 * ov.cc (do_cat_op): Early return for concatenation with empty
7753 2005-01-12 John W. Eaton <jwe@octave.org>
7755 * DLD-FUNCTIONS/find.cc (Ffind): Make it work for character strings.
7757 2005-01-11 John W. Eaton <jwe@octave.org>
7759 * OPERATORS/op-double-conv.cc: New conversions for sparse_matrix
7760 and sparse_bool_matrix to matrix.
7762 2005-01-11 David Bateman <dbateman@free.fr>
7764 * ov-base-sparse.h (octave_base_sparse::any,
7765 octave_base_sparse::all): Use new constructors, etc as pointed out
7768 2005-01-10 John W. Eaton <jwe@octave.org>
7770 * DLD-FUNCTIONS/sparse.cc (MINMAX_BODY, Fspatan2, make_spdiag):
7771 Write retval(0) = result instead of retval(0) = octave_value (result).
7772 * DLD-FUNCTIONS/splu.cc (Fsplu): Likewise.
7774 2005-01-08 David Bateman <dbateman@free.fr>
7776 * ls-mat5.cc (read_mat5_integer_data): Instantiate for Array<int>
7777 (read_mat5_binary_element): Add code to read sparse matrices
7778 saved in matlab v5 format
7780 2005-01-07 David Bateman <dbateman@free.fr>
7782 * OPERATORS/op-bm-sbm.cc, OPERATORS/op-b-sbm.cc,
7783 OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc,
7784 OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc,
7785 OPERATORS/op-m-scm.cc, OPERATORS/op-m-sm.cc,
7786 OPERATORS/op-sbm-b.cc, OPERATORS/op-sbm-bm.cc,
7787 OPERATORS/op-sbm-sbm.cc, OPERATORS/op-scm-cm.cc,
7788 OPERATORS/op-scm-cs.cc, OPERATORS/op-scm-m.cc,
7789 OPERATORS/op-scm-s.cc, OPERATORS/op-scm-scm.cc,
7790 OPERATORS/op-scm-sm.cc, OPERATORS/op-sm-cm.cc,
7791 OPERATORS/op-sm-cs.cc, OPERATORS/op-sm-m.cc,
7792 OPERATORS/op-sm-s.cc, OPERATORS/op-sm-scm.cc,
7793 OPERATORS/op-sm-sm.cc, OPERATORS/op-s-scm.cc,
7794 OPERATORS/op-s-sm.cc: New octave_value constructors allow
7795 macros from ops.h to be used rather than sparse-ops.h. Remove
7796 other explicit uses of maybe_mutate.
7798 * sparse-ops.h: delete file.
7800 * colamd.cc (Fcolamd, Fsymamd, Fetree): Remove no longer needed
7801 use of get_rep() and use the sparse matrix conversion functions
7804 * data.cc (Freshape): Use arg.dims().numel() rather than
7805 arg.numel() due to definition of numel for sparse matrices.
7807 * sparse.cc (Ffull, Fspfind, SPARSE_DIM_ARG_BODY, MINMAX_BODY,
7808 Fspatan2, make_spdiag): Convert to use new octave_value sparse
7809 constructors, sparse matrix conversion functions and remove
7811 (Fspreshape): Delete
7813 * splu.cc (Fsplu): Remove remaining explicit octave_value
7816 * ov-base-sparse.h (do_index_op, resize, reshape, permute, squeeze):
7817 Move these methods from the derived classes.
7818 * ov-base-spase.cc (do_index_op): Move this method from the derived
7820 * ov-bool-sparse.h (do_index_op, resize, reshape, permute, squeeze):
7822 * ov-re-spase.cc (do_index_op): delete.
7823 * ov-cx-sparse.h (do_index_op, resize, reshape, permute, squeeze):
7825 * ov-cx-spase.cc (do_index_op): delete.
7826 * ov-bool-spase.cc (do_index_op): delete.
7827 * ov-re-sparse.h (do_index_op, resize, reshape, permute, squeeze):
7830 * DLD-FUNCTIONS/spdet.cc (Fspdet): Remove use of SparseDet and
7831 SparseComplexDET classes and use DET and ComplexDET classes.
7833 * DLD-FUNCTIONS/colamd.cc op-bm-sbm.cc OPERATORS/op-b-sbm.cc
7834 OPERATORS/op-cm-scm.cc OPERATORS/op-cm-sm.cc OPERATORS/op-cs-scm.cc
7835 OPERATORS/op-cs-sm.cc OPERATORS/op-fil-sbm.cc OPERATORS/op-fil-scm.cc
7836 OPERATORS/op-fil-sm.cc OPERATORS/op-m-scm.cc OPERATORS/op-m-sm.cc
7837 OPERATORS/op-sbm-b.cc OPERATORS/op-sbm-bm.cc OPERATORS/op-sbm-sbm.cc
7838 OPERATORS/op-scm-cm.cc OPERATORS/op-scm-cs.cc OPERATORS/op-scm-m.cc
7839 OPERATORS/op-scm-s.cc OPERATORS/op-scm-scm.cc OPERATORS/op-scm-sm.cc
7840 OPERATORS/op-sm-cm.cc OPERATORS/op-sm-cs.cc OPERATORS/op-sm-m.cc
7841 OPERATORS/op-sm-s.cc OPERATORS/op-sm-scm.cc OPERATORS/op-sm-sm.cc
7842 OPERATORS/op-s-scm.cc OPERATORS/op-s-sm.cc ov-base-sparse.cc
7843 ov-base-sparse.h ov-bool-sparse.cc ov-bool-sparse.h ov-cx-sparse.cc
7844 ov-cx-sparse.h ov-re-sparse.cc ov-re-sparse.h sparse-base-lu.cc
7845 sparse-base-lu.h DLD-FUNCTIONS/sparse.cc sparse-xdiv.cc sparse-xdiv.h
7846 sparse-xpow.cc sparse-xpow.h DLD-FUNCTIONS/spdet.cc
7847 DLD-FUNCTIONS/splu.cc DLD-FUNCTIONS/spparms.cc: Remove additional
7848 licensing clause with authors permission.
7850 2005-01-05 David Bateman <dbateman@free.fr>
7852 * DLD-FUNCTIONS/colamd.cc: Rename from colamdoct.cc. Base colamd.h
7853 now found in COLAMD/colamd.h.
7854 (Fcolamd): Return value is now used.
7857 * Makefile.in: include colamd.cc in DLD_XSRC.
7859 * ov.h (sparse_matrix_value, sparse_complex_matrix_value,
7860 sparse_bool_matrix_value): New virtual functions
7862 * ov-base.cc (octave_base_value::sparse_matrix_value,
7863 octave_base_value::sparse_complex_matrix_value,
7864 octave_base_value::sparse_bool_matrix_value): New default sparse
7865 matrix extraction functions.
7867 * ov-base.h (sparse_matrix_value, sparse_complex_matrix_value,
7868 sparse_bool_matrix_value): Declare them.
7870 * ov-re-mat.cc (octave_matrix::sparse_matrix_value,
7871 octave_matrix::sparse_complex_matrix_value): Conversion functions.
7873 * ov-re-mat.h (sparse_matrix_value, sparse_complex_matrix_value):
7876 * ov-cx-mat.cc (octave_complex_matrix::sparse_matrix_value,
7877 octave_complex_matrix::sparse_complex_matrix_value): Conversion
7880 * ov-cx-mat.h (sparse_matrix_value, sparse_complex_matrix_value):
7883 * ov-bool-mat.h (sparse_matrix_value, sparse_complex_matrix_value,
7884 sparse_bool_matrix_value): Conversion functions.
7886 * DLD_FUNCTIONS/spdet.cc (Fspdet): Use the above constructors
7887 and conversion functions.
7888 * DLD_FUNCTIONS/splu.cc (Fsplu): ditto.
7890 2004-12-30 John W. Eaton <jwe@octave.org>
7892 * DLD-FUNCTIONS/splu.cc (Fsplu): Avoid shadow warnings.
7894 * sparse-xpow.cc (elem_xpow): Delete unsed variables.
7895 * sparse-xdiv.cc (x_el_div): Likewise.
7897 * DLD-FUNCTIONS/det.cc (Fdet): Delete unused argument nargout.
7898 * DLD-FUNCTIONS/spdet.cc (Fspdet): Likewise.
7900 * DLD-FUNCTIONS/sparse.cc (Fnzmax): Return a value.
7902 * ov.cc, ov.h (octave_value::octave_value (const SparseMatrix&),
7903 (octave_value::octave_value (const SparseBoolMatrix&),
7904 (octave_value::octave_value (const SparseComplexMatrix&)):
7907 2004-12-29 John W. Eaton <jwe@octave.org>
7909 * DLD-FUNCTIONS/sparse.cc (SPARSE_DIM_ARG_BODY): Rename from
7910 DEFUN_DLD_SPARSE_DIM_ARG. Omit HELP arg. Omit DEFUN_DLD, so the
7911 macro only defines the function body.
7912 (Fspprod, Fspcumprod, Fspsum, Fspcumsum, Fspsumsq): Define with
7913 DEFUN_DLD, not DEFUN_DLD_SPARSE_DIM_ARG. Use SPARSE_DIM_ARG_BODY
7914 to define function body.
7916 * DLD-FUNCTIONS/sparse.cc (load_sparse_type, sparse_type_loaded):
7917 Delete function, variable, and all uses.
7918 * ov.cc: Include ov-bool-sparse.h, ov-re-sparse.h, ov-cx-sparse.h.
7919 (install_types): Register sparse types.
7921 Merge of sparse code from David Bateman <dbateman@free.fr> and
7922 Andy Adler <adler@site.uottawa.ca>.
7924 * sparse-xdiv.cc, sparse-xpow.cc: New files.
7925 * Makefile.in (DIST_SRC): Add them to the list.
7927 * sparse-ops.h sparse-xdiv.h, sparse-xpow.h: New files.
7928 * Makefile.in (INCLUDES): Add them to the list.
7930 * DLD-FUNCTIONS/colamdoct.cc, DLD-FUNCTIONS/sparse.cc,
7931 DLD-FUNCTIONS/spdet.cc, DLD-FUNCTIONS/splu.cc,
7932 DLD-FUNCTIONS/spparms.cc: New files.
7933 * Makefile.in (DLD_XSRC): Add them to the list.
7935 * ov-base-sparse.cc, ov-base-sparse.h, ov-bool-sparse.cc,
7936 ov-bool-sparse.h, ov-cx-sparse.cc, ov-cx-sparse.h,
7937 ov-re-sparse.cc, ov-re-sparse.h: New files.
7938 * Makefile.in (OV_SPARSE_SRC, OV_SPARSE_INCLUDES): New lists.
7939 (OV_SRC): Add $(OV_SPARSE_SRC) to the list.
7940 (INCLUDES): Add $(OV_SPARSE_INCLUDES) to the list.
7942 * OPERATORS/op-bm-sbm.cc, OPERATORS/op-b-sbm.cc,
7943 OPERATORS/op-cm-scm.cc, OPERATORS/op-cm-sm.cc,
7944 OPERATORS/op-cs-scm.cc, OPERATORS/op-cs-sm.cc,
7945 OPERATORS/op-fil-sbm.cc, OPERATORS/op-fil-scm.cc,
7946 OPERATORS/op-fil-sm.cc, OPERATORS/op-m-scm.cc,
7947 OPERATORS/op-m-sm.cc, OPERATORS/op-sbm-b.cc,
7948 OPERATORS/op-sbm-bm.cc, OPERATORS/op-sbm-sbm.cc,
7949 OPERATORS/op-scm-cm.cc, OPERATORS/op-scm-cs.cc,
7950 OPERATORS/op-scm-m.cc, OPERATORS/op-scm-s.cc,
7951 OPERATORS/op-scm-scm.cc, OPERATORS/op-scm-sm.cc,
7952 OPERATORS/op-sm-cm.cc, OPERATORS/op-sm-cs.cc,
7953 OPERATORS/op-sm-m.cc, OPERATORS/op-sm-s.cc,
7954 OPERATORS/op-sm-scm.cc, OPERATORS/op-sm-sm.cc,
7955 OPERATORS/op-s-scm.cc, OPERATORS/op-s-sm.cc: New files.
7956 * Makefile.in (SPARSE_OP_XSRC): New list.
7957 (OP_XSRC): Add $(SPARSE_OP_XSRC) to the list.
7959 2005-02-23 John W. Eaton <jwe@octave.org>
7961 * parse.y (fold (tree_binary_expression*)): Skip constant folding
7962 for some expressions to preserve warnings.
7963 (Vwarn_associativity_change): New static variable.
7964 (warn_associativity_change): New function.
7965 (symbols_of_parse): DEFVAR warn_associativity_change.
7966 (maybe_warn_associativity_change): New function.
7967 (make_binary_op): Use it.
7969 2005-02-22 John W. Eaton <jwe@octave.org>
7971 * parse.y (POW, EPOW): Use %left associativity for compatibility.
7973 * ov-base-int.cc (octave_baes_int_matrix<T>::load_binary):
7974 Handle arrays with only one dimension.
7975 * ov-bool-mat.cc (octave_bool_matrix::load_binary): Likewise.
7976 * ov-cell.cc (octave_cell::load_binary): Likewise.
7977 * ov-cell.cc (octave_complex_matrix::load_binary): Likewise.
7978 * ov-re-mat.cc (octave_matrix::load_binary): Likewise.
7979 * ov-str-mat.cc (octave_char_matrix_str::load_binary): Likewise.
7981 * ov-mapper.cc (octave_mapper::subsref): Return retval after
7982 calling next_subsref.
7984 * ov-mapper.cc (octave_builtin::subsref): If nargout is 0 and we
7985 have additional indexing to perform, set it to 1 before calling
7988 * oct-map.cc (Octave_map::intfield, Octave_map::stringfield):
7990 * oct-map.h: Provide decls.
7991 * DLD-FUNCTIONS/time.cc (extract_tm): Use intfield and stringfield
7992 to access map elements.
7994 2005-02-21 John W. Eaton <jwe@octave.org>
7996 * ov-builtin.cc (octave_builtin::subsref): If nargout is 0 and we
7997 have additional indexing to perform, set it to 1 before calling
7999 * ov-usr-fcn.cc (octave_user_function::subsref): Likewise.
8001 * DLD-FUNCTIONS/gplot.l (send_to_plot_stream):
8002 Replot with no previous plot is a no-op.
8003 (makeplot): Likewise.
8004 (Vautomatic_replot): Don't use this variable in low-level functions.
8006 2005-02-18 John W. Eaton <jwe@octave.org>
8008 * Makefile.in (oct-gperf.h): Remove -E from list of gperf options.
8010 * data.cc (do_permute): Use zero-based indexing for permutation
8011 vector that is passed to octave_value::permute method.
8012 Allow permutation vector longer than number of dimenensions of
8015 2005-02-17 John W. Eaton <jwe@octave.org>
8017 * version.h (OCTAVE_API_VERSION): Now 2.1.64-cvs.
8018 (OCTAVE_API_VERSION): Now api-v12-cvs.
8020 2005-02-16 John W. Eaton <jwe@octave.org>
8022 * ov-base-mat.h (octave_base_matrix::squeeze): Explicitly convert
8023 result of matrix.squeeze() to MT.
8025 2005-02-15 John W. Eaton <jwe@octave.org>
8027 * dirfns.cc (deftypefn): Don't print to octave_stdout if nargout > 0.
8029 * pt-mat.cc (tree_matrix::rvalue): Min size of ra_idx is 2.
8031 * file-io.cc (Ffclear): New function.
8033 * sighandlers.h: Define SIGCHLD if it is not already defined and
8036 * sighandlers.cc (octave_set_signal_handler): Request system calls
8037 restarted if interrupted by signals (except for SIGALRM).
8038 * dirfns.cc (Fls): Don't bother with sleeping or checking errno.
8040 2005-02-11 John W. Eaton <jwe@octave.org>
8042 * sighandlers.cc (sigpipe_handler): Don't try to take action.
8043 Set octave_signal_caught and octave_signals_caught here.
8044 (sigchld_handler): Call octave_child_list::wait here.
8045 Set octave_signal_caught and octave_signals_caught here.
8046 (octave_signals_caught): New static file-scope variable.
8047 (sigint_handler): Also set octave_signal_caught.
8049 * sighandlers.cc (sigpipe_handler):
8051 * DLD-FUNCTIONS/gplot.l (plot_stream_event_handler): Rename from
8052 plot_stream_death_handler. Return true if plotter has exited.
8053 Call close_plot_stream with false arg.
8054 (plot_stream_pid): Delete static file-scope variable and all uses.
8055 (close_plot_stream): New arg, remove_from_child_list, with default
8056 value of true. Only call octave_child_list::remove if
8057 remove_from_child_list is true.
8059 * pager.cc (octave_pager_pid, saved_interrupt_handler,
8060 interrupt_handler_saved): Delete static file-scope variables and
8062 (clear_external_pager): Do nothing if external_pager is 0.
8063 (pager_event_handler): Rename from pager_death_handler.
8064 Improve warning message. Return true if pager has exited.
8065 (octave_pager_buf::do_sync): Check errno == EPIPE after write.
8066 (flush_octave_stdout): No need to check external_pager before
8067 calling clear_external_pager.
8069 * toplev.cc (recover_from_exception): Set octave_signal_caught to zero.
8070 (main_loop): Set octave_signal_hook to octave_signal_handler here.
8072 * sighandlers.cc (octave_signal_handler): New function.
8073 * sighanlders.h: Provide decl.
8075 * sighandlers.cc (install_signal_handlers): Initialize
8076 octave_signals_caught.
8078 * sighandlers.h (octave_child::status, have_status): New data members.
8079 (child_event_handler): Rename from dead_child_handler.
8081 (octave_child_list::reap, octave_child_list::wait): New functions.
8082 (octave_child_list::length, octave_child_list::do_length,
8083 octave_child_list::elem, octave_child_list::do_elem,
8084 octave_child_list::list, octave_child_list::curr_len): Delete.
8086 * sighandlers.h, sighandlers.cc
8087 (octave_child_list::octave_child_list_rep): New class.
8089 * input.cc (gnu_readline, octave_gets, get_user_input):
8090 Call OCTAVE_QUIT before doing anything.
8092 * base-list.h (octave_base_list<T>::remove_if): New function.
8094 * TEMPLATE-INST/Array-oc.cc: Delete.
8095 * Makefile.in (TI_XSRC): Remove from list.
8097 2005-02-10 Driss Ghaddab <driss.ghaddab@free.fr>
8099 * cutils.c (octave_usleep) [HAVE_POLL]: Fix typo.
8101 2005-02-10 John W. Eaton <jwe@octave.org>
8103 * variables.cc (symbol_exist): Don't search path if explicitly
8104 asked for a variable or builtin. From David Bateman
8107 2005-02-09 John W. Eaton <jwe@octave.org>
8109 * variables.cc (same_file): New static function.
8110 (symbol_out_of_date): Use it.
8112 * syscalls.cc (Fcanonicalize_file_name): New function.
8114 2005-02-08 Walter Landry <landry@osc.edu>
8116 * symtab.h (symbol_record::mark_as_command): Avoid AIX compiler error.
8118 2005-02-07 John W. Eaton <jwe@octave.org>
8120 * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): Return [] instead
8121 of [](1x0) for scalar arg of zero.
8123 2005-02-06 John W. Eaton <jwe@octave.org>
8125 * DLD-FUNCTIONS/gplot.l (tmp_files): Delete.
8126 From Todd Neal <tolchz@tolchz.net>.
8128 2005-02-04 John W. Eaton <jwe@octave.org>
8130 * sighandlers.cc (octave_child_list::~octave_child_list): Move here.
8131 * sighandlers.h: From here.
8133 2005-02-02 John W. Eaton <jwe@octave.org>
8135 * Makefile.in (parse.cc): Expect 12 shift/reduce conflicts.
8136 * parse.y (loop_command): Allow "for (k=1:10) ... endfor".
8138 2005-01-27 David Bateman <dbateman@free.fr>
8140 * ov-mapper.cc (octave_mapper::apply): Only work on real arguments
8141 if c_c_map_fcn or d_d_map_fcn or d_b_map_fcn is defined.xo
8143 2005-01-26 Joel Andersson <snprintf@gmail.com>
8145 * help.cc (keywords): Document endswitch.
8147 2005-01-21 John W. Eaton <jwe@octave.org>
8149 * DLD-FUNCTIONS/filter.cc (filter): Avoid slow Marray indexing ops.
8151 2005-01-20 John W. Eaton <jwe@octave.org>
8153 * Makefile.in (EXTRAS): Move ov-base-mat.cc ov-base-scalar.cc here.
8154 (OV_SRC): From here.
8156 2005-01-18 John W. Eaton <jwe@octave.org>
8158 * ov-complex.h (octave_complex::any): New function.
8159 * ov-scalar.h (octave_scalar::any): New function.
8161 * file-io.cc (Fmkstemp): Fix doc string. Error message belongs in
8162 third output value. From Mats Jansson <mats.e.jansson@home.se>.
8164 2005-01-12 John W. Eaton <jwe@octave.org>
8166 * DLD-FUNCTIONS/find.cc (Ffind): Make it work for character strings.
8168 2005-01-11 John W. Eaton <jwe@octave.org>
8170 * DLD-FUNCTIONS/gplot.l (UNOP): Avoid trailing comment.
8172 2005-01-10 John W. Eaton <jwe@octave.org>
8174 * ls-oct-ascii.cc (extract_keyword (std::istream&, const
8175 string_vector&, std::string&, int&, const bool)):
8176 Remove duplicate definition.
8178 2004-12-27 Martin Dalecki <martin@dalecki.de>
8180 * Cell.cc, c-file-ptr-stream.cc, comment-list.cc, oct-map.cc,
8181 oct-obj.cc, ov-base.cc, ov-base-int.cc, ov-base-mat.cc,
8182 ov-base-scalar.cc, ov-bool.cc, ov-bool-mat.cc, ov-builtin.cc,
8183 ov.cc, ov-cell.cc, ov-ch-mat.cc, ov-colon.cc, ov-complex.cc,
8184 ov-cs-list.cc, ov-cx-mat.cc, ov-dld-fcn.cc, ov-fcn.cc,
8185 ov-fcn-handle.cc, ov-fcn-inline.cc, ov-file.cc, ov-int16.cc,
8186 ov-int32.cc, ov-int64.cc, ov-int8.cc, ov-list.cc, ov-mapper.cc,
8187 ov-range.cc, ov-re-mat.cc, ov-scalar.cc, ov-streamoff.cc,
8188 ov-str-mat.cc, ov-struct.cc, ov-typeinfo.cc, ov-uint16.cc,
8189 ov-uint32.cc, ov-uint64.cc, ov-uint8.cc, ov-usr-fcn.cc,
8190 ov-va-args.cc, procstream.cc, pt-arg-list.cc, pt-assign.cc,
8191 pt-binop.cc, pt-bp.cc, pt.cc, pt-cell.cc, pt-check.cc, pt-cmd.cc,
8192 pt-colon.cc, pt-const.cc, pt-decl.cc, pt-except.cc, pt-exp.cc,
8193 pt-fcn-handle.cc, pt-id.cc, pt-idx.cc, pt-jump.cc, pt-loop.cc,
8194 pt-mat.cc, pt-misc.cc, pt-pr-code.cc, pt-select.cc, pt-stmt.cc,
8195 pt-unop.cc, symtab.cc, token.cc, unwind-prot.cc:
8196 Delete #pragma implementation.
8198 * Cell.h, c-file-ptr-stream.h, comment-list.h, oct-map.h,
8199 oct-obj.h, ov-base.h, ov-base-int.h, ov-base-mat.h,
8200 ov-base-scalar.h, ov-bool.h, ov-bool-mat.h, ov-builtin.h,
8201 ov-cell.h, ov-ch-mat.h, ov-complex.h, ov-cs-list.h, ov-cx-mat.h,
8202 ov-dld-fcn.h, ov-fcn.h, ov-fcn-handle.h, ov-fcn-inline.h,
8203 ov-file.h, ov.h, ov-int16.h, ov-int32.h, ov-int64.h, ov-int8.h,
8204 ov-list.h, ov-mapper.h, ov-range.h, ov-re-mat.h, ov-scalar.h,
8205 ov-streamoff.h, ov-str-mat.h, ov-struct.h, ov-typeinfo.h,
8206 ov-uint16.h, ov-uint32.h, ov-uint64.h, ov-uint8.h, ov-usr-fcn.h,
8207 procstream.h, pt-arg-list.h, pt-assign.h, pt-binop.h, pt-bp.h,
8208 pt-cell.h, pt-check.h, pt-cmd.h, pt-colon.h, pt-const.h,
8209 pt-decl.h, pt-except.h, pt-exp.h, pt-fcn-handle.h, pt.h, pt-id.h,
8210 pt-idx.h, pt-jump.h, pt-loop.h, pt-mat.h, pt-misc.h, pt-pr-code.h,
8211 pt-select.h, pt-stmt.h, pt-unop.h, symtab.h, token.h,
8212 unwind-prot.h: Delete #pragma interface.
8214 2004-12-27 John W. Eaton <jwe@octave.org>
8216 Merge of changes from Teemu Ikonen <tpikonen@pcu.helsinki.fi> to
8217 remove gnuplot from main parser.
8219 * pt-plot.cc, pt-plot.h: Delete.
8220 * Makefile.in (PT_SRC, PT_INCLUDES): Delete them from the lists.
8222 * DLD-FUNCTIONS/gplot.l: New file.
8223 * Makefile.in: Include it in the DLD_XSRC list.
8225 * dirfns.cc (octave_change_to_directory):
8226 Don't call do_external_plotter_cd.
8228 * symtab.h (symbol_record::TYPE): New element, RAWCOMMAND.
8229 (symbol_record::symbol_def::mark_as_rawcommand,
8230 symbol_record::symbol_def::unmark_rawcommand,
8231 symbol_record::symbol_def::is_rawcommand): New functions.
8232 (symbol_record::symbol_def::symbol_type): Bitfield is now 9 bits wide.
8233 (symbol_record::mark_as_rawcommand,
8234 symbol_record::unmark_rawcommand, symbol_record::is_rawcommand):
8236 (SYMTAB_ALL_TYPES): Include RAWCOMMAND.
8238 * parse.y (make_plot_command): Delete function.
8239 (tree_plot_command_type, subplot_type, subplot_list_type,
8240 plot_limits_type, plot_range_type, subplot_using_type,
8241 subplot_style_type, subplot_axes_type):
8242 Delete non-terminal type decls.
8243 (PLOT, STYLE, AXES_TAG): Delete token types.
8244 (title, plot_command, plot_command2, plot_options, plot_command1,
8245 ranges, ranges1, using, using1, style, axes): Delete non-terminals.
8247 * toplev.cc (do_octave_atexit): Don't call close_plot_stream.
8249 * variables.cc (rawcommand_set): New static variable.
8250 (is_marked_as_rawcommand, mark_as_rawcommand, unmark_rawcommand,
8251 Fiscommand, Fmark_as_rawcommand, Funmark_rawcommand,
8252 Fisrawcommand, is_rawcommand_name): New functions.
8253 * variables.h: Provide decl for is_rawcommand_name.
8255 * pt-bp.cc, pt-bp.h, pt-check.cc, pt-check.h, pt-pr-code.cc,
8256 pt-pr-code.h, pt-walk.h: Delete all declarations, definitions, and
8257 uses of visit_subplot, visit_subplot_axes, visit_subplot_list,
8258 visit_subplot_style, and visit_subplot_using methods.
8260 * lex.h (lexer_flags): New field, doing_rawcommand.
8261 * lex.l (<COMMAND_START>[\;\,]): Also handle raw commands here.
8262 (lexer_flags::init): Initialize doing_racommand to false.
8263 (handle_identifier): Recognize raw commands ere.
8264 (handle_string): Don't do string escape conversions on raw command
8267 * octave.gperf: Delete gplot_kw, gsplot_kw, replot_kw.
8269 * lex.h (lexer_flags): Delete fields cant_be_identifier,
8270 doing_set, in_plot_range, in_plot_using, in_plot_style,
8271 in_plot_axes, past_plot_range, and plotting.
8272 * lex.l: Delete all uses of these lexer flags and remove all
8273 special cases for plotting.
8274 (plot_style_token, plot_axes_token, is_plot_keyword): Delete.
8276 * file-io.cc, file-io.h (tmp_files, mark_for_deletion,
8277 cleanup_tmp_files): Move here.
8278 * pt-plot.cc, pt-plot.h: From here.
8280 * Makefile.in (PKG_ADD): New target.
8281 (all): Depend on PKG_ADD.
8282 (install-oct): Depend on PKG_ADD. Install PKG_ADD file.
8283 (gplot.cc): New target.
8284 (stamp-prereq): Depend on gplot.cc.
8285 (VAR): Don't include $(DLD_SRC) here.
8286 (DLD_OBJ, DLD_DEF_FILES): Include .l files.
8288 * defun-int.h (DEFVAR, DEFCONST, DEFCONSTX): Move definition here.
8289 * defun.h: From here.
8291 2004-12-22 John W. Eaton <jwe@octave.org>
8293 * ls-oct-ascii.cc (extract_keyword (std::istream&, const
8294 string_vector&, std::string&, int&, const bool): New function.
8295 * ls-oct-ascii.h: Provide decl.
8296 * ov-bool-mat.cc (octave_bool_matrix::load_ascii):
8297 Use new extract_keyword function to avoid calling tellg/seekg.
8298 * ov-cell.cc (octave_cell::load_ascii): Likewise.
8299 * ov-cx-mat.cc (octave_complex_matrix::load_ascii): Likewise.
8300 * ov-re-mat.cc (octave_matrix::load_ascii): Likewise.
8301 * ov-str-mat.cc (octave_char_matrix_str::load_ascii): Likewise.
8303 2004-12-20 John W. Eaton <jwe@octave.org>
8305 * pt-idx.cc (tree_index_expression::has_magic_end): Return true if
8306 any argument list element has a magic end token.
8308 2004-12-03 John W. Eaton <jwe@octave.org>
8310 * version.h (OCTAVE_VERSION): Now 2.1.64.
8312 2004-12-03 Teemu Ikonen <tpikonen@pcu.helsinki.fi>
8314 * file-io.cc: Doc string fixes.
8316 2004-12-02 David Bateman <dbateman@free.fr>
8318 * input.cc (get_user_input): Only set nm and line for debugging if
8319 both debug is true and curr_caller_function is non-null.
8321 2004-12-02 David Bateman <dbateman@free.fr>
8323 * ls-mat5.cc (arrayclasstype): Add mxINT64_CLASS, mxUINT64_CLASS,
8324 mxFUNCTION_CLASS enum values.
8325 (read_mat5_integer_data): New template function.
8326 (OCTAVE_MAT5_INTEGER_READ): New macro.
8327 (read_mat5_binary_element): Handle reading integer types.
8328 Eliminate automatic conversion from int to double.
8329 (write_mat5_integer_data): New template function.
8330 Instantiate it for the 8 integer data types
8331 (save_mat5_binary_element): Handle integer data types.
8333 * load-save.cc (Fload): Check file existence here.
8334 If file does not exist, append ".mat" to name and try again.
8335 (get_file_format): Delete check for file existence.
8337 2004-11-30 John W. Eaton <jwe@octave.org>
8339 * Makefile.in (oct-gperf.h): Use -L C++ instead of -L ANSI_C.
8340 Use -Z octave_kw_hash option, delete -H and -N options.
8341 * lex.l (is_keyword_token): Use octave_kw_hash::in_word_set
8342 instead of octave_kw_lookup.
8343 (is_keyword): Likewise.
8345 2004-11-22 John W. Eaton <jwe@octave.org>
8347 * pt-arg-list.cc (tree_argument_list::convert_to_const_vector):
8348 Check to see whether object is a function or function handle
8349 instead of constant.
8351 2004-11-19 John W. Eaton <jwe@octave.org>
8353 * ov-str-mat.cc (octave_char_matrix_str::do_index_op):
8354 Skip indexing operation if indices are invalid.
8356 * pr-output.cc (set_range_format, set_complex_matrix_format,
8357 set_complex_format, set_real_matrix_format, set_real_format):
8358 Also specify std::ios::fixed for bank format.
8360 2004-11-17 John W. Eaton <jwe@octave.org>
8362 * version.h (OCTAVE_VERSION): Now 2.1.63.
8363 (OCTAVE_API_VERSION): Now api-v12.
8365 2004-11-17 David Bateman <dbateman@free.fr>
8367 * pt-arg-list.cc (F__end__): Ask dv for the number of elements
8368 instead indexed_object.
8370 2004-11-16 David Bateman <dbateman@free.fr>
8372 * ov.h (octave_value::numel): Now virtual. Call rep->numel ().
8373 * ov.cc (octave_value::numel): Delete.
8374 * ov-base.h (octave_base_value::numel): New function.
8376 2004-11-12 John W. Eaton <jwe@octave.org>
8378 * version.h (OCTAVE_VERSION): Now 2.1.62.
8380 2004-11-09 John W. Eaton <jwe@octave.org>
8382 * OPERATORS/op-int-concat.cc: New file for mixed integer/other
8383 concatentation operators.
8384 * Makefile.in (INTTYPE_OP_XSRC): Add it to the list.
8386 * ops.h (DEFNDCATOP_FN2): New macro.
8388 * OPERATORS/op-int.h (OCTAVE_CONCAT_FN2,
8389 OCTAVE_INSTALL_CONCAT_FN2, OCTAVE_DOUBLE_INT_CONCAT_FN,
8390 OCTAVE_INSTALL_DOUBLE_INT_CONCAT_FN, OCTAVE_INT_DOUBLE_CONCAT_FN,
8391 OCTAVE_INSTALL_INT_DOUBLE_CONCAT_FN): New macros.
8393 2004-11-09 David Bateman <dbateman@free.fr>
8395 * Cell.cc (concat): Delete.
8396 (Cell::concat): New method.
8397 * Cell.h: Provide decls.
8399 * oct-map.cc (concat): Delete
8400 (Octave_map::concat): New method.
8401 * oct-map.h: Provide decls.
8403 * ov.h (typedef octave_value (*cat_op_fcn) (octave_value&,
8404 const octave_value&, const Array<int>&): Change definition of
8405 cat_op_fcn so first argument is not constant.
8407 * ops.h (CATOPDECL): First arg is no longer constant.
8408 (DEFCATOP_FN, DEFNDCATOP_FN): Change to use new concat methods.
8410 * OPERATORS/op-chm.cc, OPERATORS/op-str-m.cc, OPERATORS/op-str-s.cc,
8411 OPERATORS/op-str-str.cc (DEFCATOP): Change explicit concat functions
8412 to use new concatenation methods.
8414 2004-11-05 John W. Eaton <jwe@octave.org>
8416 * version.h (OCTAVE_VERSION): Now 2.1.61.
8418 * DLD-FUNCTIONS/det.cc (det): Always compute rcond so we can
8419 detect numerically singular matrices.
8421 2004-11-04 John W. Eaton <jwe@octave.org>
8423 * pt-colon.cc (tree_colon_expression::line,
8424 tree_colon_expression::column): New functions.
8425 * pt-colon.h: Provide decls.
8427 * oct-stream.cc (octave_stream::seek (long, int)): Return error
8428 (but leave file position unchanged) for attempt to seek beyond end
8431 * DLD-FUNCTIONS/inv.cc (Finv): Check rcond value returned from
8432 LAPACK routines, and be careful to avoid optimizing away the
8433 1+rcond == 1.0 check.
8434 * DLD-FUNCTIONS/det.cc (Fdet): Likewise.
8436 2004-11-03 John W. Eaton <jwe@octave.org>
8438 * data.cc (Fsize): Return 1 if requested dimension is larger than
8439 the number of dimensions of the given object.
8441 2004-11-01 Claude Lacoursiere <claude@hpc2n.umu.se>a
8443 * ls-hdf5.cc (read_hdf5_data): Expect num_obj to be in distinct group.
8444 * ov-cell.cc (octave_cell::load_hdf5): Likewise.
8445 * ov-list.cc (octave_list::load_hdf5): Likewise.
8446 * ov-struct.cc (octave_struct::load_hdf5): Likewise.
8448 2004-11-01 David Bateman <dbateman@free.fr>
8450 * DLD-FUNCTIONS/filter.cc (filter (MArray<T>&, MArray<T>&,
8451 MArrayN<T>&, MArrayN<T>&, int)): The variable si is now at least 2-D.
8452 (Ffilter): Force si to be 2-D, while allowing arbitrary vector
8455 2004-11-01 John W. Eaton <jwe@octave.org>
8457 * data.cc (INSTANTIATE_EYE): New macro. Use it to instantiate
8458 identity matrix functions for various matrix types.
8460 * variables.cc (do_who): Fix typo in for loop.
8462 2004-10-28 John W. Eaton <jwe@octave.org>
8464 * ls-mat5.cc (save_mat5_binary_element): Save structure elements
8467 2004-10-26 John W. Eaton <jwe@octave.org>
8469 * ov-fcn.h (octave_function::octave_va_arg): No longer const.
8471 2004-10-22 John W. Eaton <jwe@octave.org>
8473 * DLD-FUNCTIONS/filter.cc: Remove some unnecessary parens.
8475 2004-10-22 David Bateman <dbateman@free.fr>
8477 * DLD-FUNCTIONS/filter.cc (filter (MArray<T>&, MArray<T>&,
8478 MArrayN<T>&, MArrayN<T>&, int)): If value to filter is
8479 dimensionality 2 it might still be a vector, use special case.
8481 2004-10-21 John W. Eaton <jwe@octave.org>
8483 * ov-base.cc (INT_CONV_METHOD): Apply saturation semantics here too.
8485 2004-10-19 John W. Eaton <jwe@octave.org>
8487 * ov-range.h (octave_range::write): New function.
8489 2004-10-18 John W. Eaton <jwe@octave.org>
8491 * symtab.cc (symbol_record::dimensions_string_req_first_space,
8492 symbol_record::make_dimensions_string): Use dims() for all objects.
8494 2004-10-18 Oyvind Kristiansen <oyvinkri@stud.ntnu.no>
8496 * symtab.cc (symbol_table::parse_whos_line_format): Handle
8497 size-of-parameter and center-specific format specifiers.
8499 2004-10-18 John W. Eaton <jwe@octave.org>
8501 * pt-plot.cc (handle_plot_data): If plotting data from file,
8502 always use "using" clause.
8504 2004-10-12 David Bateman <dbateman@free.fr>
8506 * pt-mat.cc (tm_row_const::tm_row_const_rep::do_init_element,
8507 tm_const::init): Dimensionality of matrices not necessarily the
8508 same. Check before comparing.
8510 2004-10-06 John W. Eaton <jwe@octave.org>
8512 * pt-fcn-handle.h (tree_fcn_handle::name): New function.
8514 2004-10-01 John W. Eaton <jwe@octave.org>
8516 * ov-range.h (octave_range::valid_as_scalar_index): Ensure int value.
8517 (octave_range::valid_as_zero_index): Likewise.
8519 * ov-scalar.h (octave_scalar::valid_as_scalar_index): Ensure int value.
8520 (octave_scalar::valid_as_zero_index): Likewise.
8522 2004-09-24 John W. Eaton <jwe@octave.org>
8524 * version.h (OCTAVE_VERSION): Now 2.1.60.
8525 (OCTAVE_API_VERSION): Now api-v11.
8527 * OPERATORS/op-int.h (OCTAVE_MM_INT_OPS): Include missing matrix
8529 (OCTAVE_INSTALL_MM_INT_OPS): Install them.
8531 * OPERATORS/op-i64-i64.cc: Define and install missing int64 by
8532 matrix and scalar ops.
8534 2004-09-24 David Bateman <dbateman@free.fr>
8536 * ov-fcn-inline (Finline): Attempt better auto-detection of
8537 symbols that should be recognized as arguments.
8539 2004-09-24 John W. Eaton <jwe@octave.org>
8541 * ov-str-mat.cc (default_numeric_conversion_function): Return
8542 scalar object if numel == 1.
8544 2004-09-23 John W. Eaton <jwe@octave.org>
8546 * ops.h (DEFSTRDBLCONVFN): New macro.
8547 * OPERATORS/op-double-conv.cc: Use it to define new conversion op.
8548 Define new range to double matrix conversion.
8549 (install_int_conv_ops): Install new ops.
8551 * ops.h (DEFSTRINTCONVFN): New macro.
8552 * OPERATORS/op-int-conv.cc: Use it to define new conversion ops.
8553 (install_int_conv_ops): Install them.
8555 * (OCTAVE_SS_INT_OPS2, OCTAVE_SM_INT_OPS2, OCTAVE_MM_INT_OPS2,
8556 OCTAVE_INSTALL_SS_INT_OPS2, OCTAVE_INSTALL_SM_INT_OPS2,
8557 OCTAVE_INSTALL_MS_INT_OPS2, OCTAVE_INSTALL_MM_INT_OPS2):
8558 Delete unused macros.
8560 * OPERATORS/op-int.h (OCTAVE_SS_INT_BOOL_OPS): New args Z1 and Z2.
8561 (OCTAVE_SS_INT_OPS): Pass appropriately typed zero values to
8562 OCTAVE_SS_INT_BOOL_OPS.
8563 * OPERATORS/op-i64-i64.cc, OPERATORS/op-ui64-ui64.cc: Likewise.
8565 * pr-output.cc (pr_plus_format): Now template.
8566 Specialize for Complex.
8567 (octave_print_internal): Lookup print_conv_type using
8568 octave_int<T>, not just T.
8570 * ov-struct.cc (octave_struct::subsref): Pass skip to next_subsref.
8572 * oct-stream.cc (do_read): Hitting EOF should not be an error.
8574 2004-09-22 John W. Eaton <jwe@octave.org>
8576 * pt-plot.cc (send_to_plot_stream): Skip automatic replot if in
8579 * variables.cc (get_global_value): New arg, silent.
8580 * variables.h (get_global_value): Default value for silent arg is
8583 2004-09-22 David Bateman <dbateman@free.fr>
8585 * ov-fcn-inline.cc (Finline): When called with a single arg, derive
8586 argument of inline function in a compatible manner.
8588 2004-09-22 Federico Zenith <zenith@chemeng.ntnu.no>
8590 * DLD-FUNCTIONS/qz.cc (Fqz): New @tex section(s) in doc string for
8591 better formating of printed documentation. Use @var in doc string.
8593 * DLD-FUNCTIONS/time.cc (Fstrftime): Fix typo in doc string.
8594 * error.cc (Flasterr, Flastwarn): Likewise.
8595 * mappers.cc (Farg, Fasinh, Fatanh, Ffinite, Fsin, Fsinh, Ftan):
8597 * file-io.cc (Fmktemp): Likewise.
8598 * pt-plot.cc (symbols_of_pt_plot): Fix typos in doc string for
8601 * input.cc (symbols_of_input): Replace --echo-input with new
8602 --echo-commands in PS4 doc string.
8604 * pt-assign.cc (symbols_of_pt_assign): Mark print_rhs_assign_val
8605 as built-in in doc string.
8607 * symtab.cc (symbols_of_symtab): Mark variables_can_hide_functions
8608 as built-in in doc string.
8610 2004-09-21 John W. Eaton <jwe@octave.org>
8612 * version.h (OCTAVE_VERSION): Now 2.1.59.
8614 * oct-fstrm.h (octave_fstream::octave_fstream,
8615 octave_fstream::create): Set default float format to actual native
8616 format, not flt_fmt_native.
8617 * oct-iostrm.h (octave_base_iostream::octave_base_iostream,
8618 octave_istream::octave_istream, octave_ostream::octave_ostream):
8620 * oct-prcstrm.h (octave_iprocstream::octave_iprocstream,
8621 octave_oprocstream::octave_oprocstream,
8622 octave_iprocstream::create, octave_oprocstream::create):
8624 * oct-stdstrm.h (octave_stdiostream::octave_stdiostream,
8625 octave_stdiostream::create):
8627 * oct-stream.h (octave_base_stream::octave_base_stream):
8629 * oct-strstrm.h (octave_base_strstream::octave_base_strstream,
8630 octave_istrstream::octave_istrstream, octave_istrstream::create):
8633 2004-09-21 David Bateman <dbateman@free.fr>
8635 * data.cc (Freshape): Allow a single empty dimension argument
8636 to flag unknown dimension and calculate its value from the
8639 2004-09-21 John W. Eaton <jwe@octave.org>
8641 * symtab.h (symbol_record::~symbol_record): Delete definition if
8643 * symtab.cc (symbol_table::~symbol_table): Move here from symtab.h.
8644 Call delete on each symbol record in the table instead of just
8647 2004-09-17 David Bateman <dbateman@free.fr>
8649 * DLD-FUNCTIONS/sort.cc (ascending_compare, descending_compare):
8650 Now templates (avoids g++ 3.4.x compile problems).
8651 Fix other uses of these functions to also treat them as templates.
8652 (mx_sort): For unsigned EIGHT_BYTE_INT versions correct the test
8653 for the position of NaN. Problems when mode was DESCENDING or
8654 UNDEFINED. Use static_cast<unsigned int> (dim) rather than
8656 (IFloatFlip): Now static.
8658 2004-09-17 David Bateman <dbateman@free.fr>
8660 * DLD-FUNCTIONS/det.cc (Fdet): Only compute estimate of the
8661 condition number if requested as output.
8663 * DLD-FUNCTIONS/schur.cc (Fschur): Only compute unitary matrix if
8664 requested as output.
8666 2004-09-17 John W. Eaton <jwe@octave.org>
8668 * ov-fcn-inline.cc (octave_fcn_inline::octave_fcn_inline):
8669 Call eval_string instead of feval ("eval", ...).
8670 Construct anonymous function handle to avoid going through the
8673 * ov-fcn-handle.h (octave_fcn_handle::fcn_val): New function.
8674 (octave_fcn_handle::octave_fcn_handle (const std:string&)):
8677 2004-09-16 John W. Eaton <jwe@octave.org>
8679 * parse.y (frob_function): Clear id_name from curr_sym_tab, not
8682 * symtab.cc (maybe_list): Count sizes using size_t, not int.
8684 * variables.cc (symbol_out_of_date): Always look in LOADPATH.
8686 2004-09-15 John W. Eaton <jwe@octave.org>
8688 * OPERATORS/op-int-conv.cc: Define and install bool to int
8690 * OPERATORS/op-double-conv.cc: Define and install bool to double
8693 * ov.cc (octave_value::assign): Handle subsref for containers.
8694 * oct-lvalue.cc (octave_lvale::value): Likewise.
8696 * DLD-FUNCTIONS/sort.cc (mx_sort): Return octave_value, not
8699 2004-09-15 David Bateman <dbateman@free.fr>
8701 * ov.cc (octave_value::octave_value (const ArrayN<char>&, bool)):
8703 * ov.h: Provide decl.
8705 * DLD-FUNCTIONS/sort.cc (sortmode): New enum to define sort direction.
8706 (template <class T> class vec_index): New class to contain values and
8707 index for indexed sorts, replacing all previous struct versions.
8708 Instantiate for double, Complex, char and octave_value.
8709 (template <class T> static octave_value_list mx_sort (ArrayN<T> &, int,
8710 sortmode)): New templated version of mx_sort replacing all previous
8711 versions, but specific to non indexed sorts. Instantiate for char
8712 and double if not IEEE754.
8713 (template <> static octave_value_list mx_sort (ArrayN<double> &,
8714 int, sortmode)): Specialized function of mx_sort of IEEE754.
8715 (template <class T> static octave_value_list mx_sort_indexed
8716 (ArrayN<T> &, int, sortmode)): New templated version of mx_sort
8717 for indexed sorts. Instantiate for double, Complex, char and
8719 (ascending_compare, descending_compare): Comparison functions
8720 for double, char, vec_index<double> *, vec_index<Complex> *,
8721 vec_index<char> *, vec_index<octave_value>. Fix Complex comparison
8722 operator to sort by arg of values if absolute values are equal.
8723 (Fsort): Update docs for new mode argument and for sorting of
8724 strings and cell arrays of strings. Implement mode argument to
8725 define ascending and descending sorts. Include sorting of cell
8726 arrays of strings. Adapt for new templated versions of the mx_sort
8729 2004-09-15 John W. Eaton <jwe@octave.org>
8731 * ov-cell.cc (octave_cell::subsref): Pass nargout to next_subsref.
8732 * ov-builtin.cc (octave_builtin::subsref): Likewise.
8733 * ov-fcn-handle.cc (octave_fcn_handle::subsref): Likewise.
8734 * ov-list.cc (octave_list::subsref): Likewise.
8735 * ov-mapper.cc (octave_mapper::subsref): Likewise.
8736 * ov-struct.cc (octave_struct::subsref): Likewise.
8737 * ov-usr-fcn.cc (octave_user_function::subsref): Likewise.
8739 * ov-struct.cc, ov-struct.h (octave_struct::subsref (const
8740 std::string&, const std::list<octave_value_list>&, int)):
8741 Define this version.
8742 (octave_struct::subsref (const std::string&, const
8743 std::list<octave_value_list>&)): Panic in this version.
8744 * ov-list.cc, ov-list.h: Likewise.
8745 * ov-cell.cc, ov-cell.h: Likewise.
8747 * ov.cc (octave_value::subsref (int, const std::string&, const
8748 std::list<octave_value_list>&, size_t)): New function.
8749 * ov.h: Provide decl.
8751 * ov-cell.h (octave_cell::is_constant): Return false.
8752 * ov-struct.h (octave_struct::is_constant): Delete.
8753 * ov-list.h (octave_list::is_constant): Delete.
8755 2004-09-14 David Bateman <dbateman@free.fr>
8757 * DLD-FUNCTIONS/sort.cc (mx_sort (charNDArray&, bool, int)):
8758 New function to sort character strings.
8759 (Fsort): Handle character strings.
8761 2004-09-11 John W. Eaton <jwe@octave.org>
8763 * ov-fcn-handle.cc (octave_fcn_handle::save_ascii):
8764 Write directly to OS.
8765 (octave_fcn_handle::load_ascii, octave_fcn_handle::load_binary,
8766 octave_fcn_handle::load_hdf5): Check parse status after calling
8767 eval_string. Don't dereference fh unless it is valid.
8769 2004-09-11 David Bateman <dbateman@free.fr>
8771 * ov-fcn-handle.cc (octave_fcn_handle::save_ascii,
8772 octave_fcn_handle::load_ascii, octave_fcn_handle::save_binary,
8773 octave_fcn_handle::load_binary, octave_fcn_handle::save_hdf5,
8774 octave_fcn_handle::load_hdf5): New functions.
8775 * ov-fcn-handle.h: Provide decls.
8777 * ov-fcn-inline.cc (octave_fcn_inline::load_ascii):
8778 Allow spaces in saved function.
8779 (octave_fcn_inline::save_hdf5): Properly close all HDF5 objects.
8781 * ls-oct-ascii.cc (read_ascii_data): Check return type of
8782 <octave_value>.load_ascii for errors reading the variables
8784 * variables.cc (lookup_function_handle, clear_variable,
8785 clear_symbol): New functions.
8786 * variables.h: Provide decls.
8788 2004-09-10 John W. Eaton <jwe@octave.org>
8790 * ov-builtin.cc (octave_builtin::do_multi_index_op): Use unwind
8791 protect frame instead of a single unwind_protect::run.
8792 * ov-mapper.cc (octave_mapper::do_multi_index_op): Likewise.
8794 * data.cc (fill_matrix, identity_matrix):
8795 Also allow logical data type.
8797 2004-09-10 David Bateman <dbateman@free.fr>
8799 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::double_value,
8800 OCTAVE_VALUE_INT_MATRIX_T::scalar_value,
8801 OCTAVE_VALUE_INT_SCALAR_T::double_value,
8802 OCTAVE_VALUE_INT_SCALAR_T::scalar_value): New functions.
8804 2004-09-10 John W. Eaton <jwe@octave.org>
8806 * ov-base-scalar.h (octave_base_scalar::clone,
8807 octave_base_scalar::empty_clone): New functions.
8809 2004-09-09 John W. Eaton <jwe@octave.org>
8811 * pt-pr-code.h (tree_print_code::newline): New optional arg, alt_nl.
8812 * pt-pr-code.cc (tree_print_code::newline): Use it if not printing
8814 (tree_print_code::visit_statement): If we printed ";", call
8815 newline with optional arg set to "".
8816 (tree_print_code::printing_newlines): New data member.
8817 (tree_print_code::tree_print_code): Initialize it.
8818 (tree_print_code::suspend_newline, tree_print_code::resume_newline):
8820 (tree_print_code::newline, tree_print_code::indent): Use it
8822 * ov-fcn-handle.cc (octave_fcn_handle::print_raw):
8823 Print code for anonymous function handles.
8825 2004-09-08 John W. Eaton <jwe@octave.org>
8827 * ov-fcn-handle.cc (Ffunc2str, Ffunctions): Don't call substr(1)
8828 on fh_nm, since we no longer need to skip "@" in the name.
8830 * error.cc (pr_where): Do a better job of printing location info.
8832 * input.cc (get_user_input): Print location info before the debug
8833 prompt. From Keith Goodman <kwgoodman@gmail.com>.
8835 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
8836 Save and set curr_caller_function and curr_caller_statement here.
8837 * ov-mapper.cc (octave_mapper::do_multi_index_op): Likewise.
8838 * ov-builtin.cc (octave_builtin::do_multi_index_op): Likewise.
8840 * pt-stmt.cc (curr_caller_statement): New variable.
8841 * pt-stmt.h: Provide decl.
8843 * toplev.cc (curr_caller_function): New variable.
8844 * toplev.h: Provide decl.
8846 * pt-arg-list.cc (convert_to_const_vector):
8847 Unwind-protect index_position before modifying it.
8848 Don't protect and set index_position unless stash_object is true.
8850 2004-09-08 David Bateman <dbateman@free.fr>
8852 * ov-fcn-inline.cc (octave_fcn_inline::save_ascii,
8853 octave_fcn_inline::load_ascii, octave_fcn_inline::save_binary,
8854 octave_fcn_inline::load_binary, octave_fcn_inline::save_hdf5,
8855 octave_fcn_inline::load_hdf5): New functions.
8856 * ov-fcn-inline.h: Provide decls.
8858 2004-09-08 John W. Eaton <jwe@octave.org>
8860 * ov.h: Add octave_array_type_traits specialization for
8861 boolNDArray element type.
8863 2004-09-07 John W. Eaton <jwe@octave.org>
8865 * oct-stream.cc: Instantiate octave_stream::write for Array<bool>.
8866 (octave_stream::read): Expand read_fptr_table to include dt_logical.
8868 * ov-bool.h (octave_bool::write): New function.
8869 * ov-bool-mat.h (octave_bool_matrix::write): New function.
8871 * ov-fcn-inline.h (octave_fcn_inline::octave_fcn_inline): New copy
8873 (octave_fcn_inline::clone, octave_fcn_inline::empty_clone):
8876 * ov-fcn-handle.h (octave_fcn_handle::octave_fcn_handle): New copy
8878 (octave_fcn_handle::clone, octave_fcn_handle::empty_clone):
8881 2004-09-06 John W. Eaton <jwe@octave.org>
8883 * ov.cc (install_types): Call octave_fcn_inline::register_type.
8885 * version.h (OCTAVE_API_VERSION): Now api-v10.
8887 * OPERATORS/op-b-b.cc, OPERATORS/op-bm-bm.cc: Define and install
8888 unary plus and unary minus operators.
8890 * OPERATORS/op-int.h, OPERATORS/op-cm-cm.cc,
8891 OPERATORS/op-cs-cs.cc, OPERATORS/op-m-m.cc, OPERATORS/op-range.cc:
8892 Define and install unary plus operator.
8894 * ov.cc (unary_op_as_string): Handle op_uplus too.
8896 * parse.y (prefix_expr): Build unary plus op here instead of
8897 converting to no-op.
8898 (make_prefix_op): Accept op_uplus.
8900 2004-09-03 John W. Eaton <jwe@octave.org>
8902 * OPERATORS/op-b-bm.cc (DEFCONV): Define bool scalar to bool
8904 (install_b_bm_ops): Install it.
8905 Install conversion for assignment of bool matrix to indexed bool.
8906 * OPERATORS/op-b-b.cc (install_b_b_ops): Install conversion for
8907 assignment of bool to indexed bool.
8909 2004-09-03 David Bateman <dbateman@free.fr>
8911 * OPERATORS/op-b-b.cc, OPERATORS/op-b-bm.cc, OPERATORS/op-bm-b.cc,
8912 OPERATORS/op-bm-bm.cc: Modify concatenation between boolean types
8913 so that it returns a boolean.
8915 * ov-bool.cc (octave_bool::do_index_op): Return boolean matrix.
8917 * ov-intx.h (do_index_op (const octave_value_list&, int)):
8918 New function for indexed subsref of int types.
8920 2004-09-03 John W. Eaton <jwe@octave.org>
8922 * OPERATORS/op-int.h (OCTAVE_SM_INT_OPS): Define int by double
8923 mixed comparison and bool ops.
8924 (OCTAVE_INSTALL_SM_INT_OPS): Install them.
8925 (OCTAVE_MS_INT_OPS): Define double by int mixed comparison and
8927 (OCTAVE_INSTALL_MS_INT_OPS): Install them
8929 * OPERATORS/op-i8-i8.cc, OPERATORS/op-i16-i16.cc,
8930 OPERATORS/op-i32-i32.cc, OPERATORS/op-i64-i64.cc,
8931 OPERATORS/op-ui8-ui8.cc, OPERATORS/op-ui16-ui16.cc,
8932 OPERATORS/op-ui32-ui32.cc, OPERATORS/op-ui64-ui64.cc:
8933 Define and install various mixed-type operators.
8935 * OPERATORS/op-int.h (OCTAVE_MM_INT_OPS): Also define mixed int
8936 and double matrix comparison and bool ops.
8937 (OCTAVE_INSTALL_MM_INT_OPS): Install them.
8938 (OCTAVE_SS_INT_BOOL_OPS, OCTAVE_SM_INT_BOOL_OPS,
8939 OCTAVE_MS_INT_BOOL_OPS, OCTAVE_MM_INT_BOOL_OPS):
8940 Define logical AND and OR ops.
8941 (OCTAVE_INSTALL_SS_INT_BOOL_OPS, OCTAVE_INSTALL_SM_INT_BOOL_OPS,
8942 OCTAVE_INSTALL_MS_INT_BOOL_OPS, OCTAVE_INSTALL_MM_INT_BOOL_OPS):
8944 (OCTAVE_MM_INT_CMP_OPS, OCTAVE_MM_INT_BOOL_OPS): Accept prefix arg.
8945 (OCTAVE_MM_CONV): New macro.
8946 (OCTAVE_MM_INT_OPS): Use it to define complex matrix conversion.
8947 (OCTAVE_MIXED_INT_CMP_OPS, OCTAVE_MIXED_INT_BOOL_OPS): New macros.
8949 * OPERATORS/op-int.h (OCTAVE_MS_INT_OPS): Don't define indexed int
8950 matrix = complex scalar assignment ops.
8951 (OCTAVE_MS_INT_OPS): Don't define indexed int matrix = complex
8952 matrix assignment ops.
8953 (OCTAVE_SM_CONV): New macro.
8954 (OCTAVE_SM_INT_OPS): Use it to define int scalar -> (int|complex)
8955 matrix widening ops.
8956 (OCTAVE_RE_INT_ASSIGN_OPS, OCTAVE_CX_INT_ASSIGN_OPS): New macros.
8957 (OCTAVE_INT_OPS): Use them here.
8958 (OCTAVE_INSTALL_SS_INT_OPS): Install indexed int scalar = scalar
8959 and indexed int scalar = complex scalar assignment conversions.
8960 (OCTAVE_INSTALL_SM_INT_OPS): Install int scalar -> (int|complex)
8961 matrix widening ops. Install indexed int scalar =
8962 (int|real|complex) matrix assignment conversions.
8963 (OCTAVE_INSTALL_MS_INT_OPS): Install indexed int matrix = complex
8964 scalar assignment conversion.
8965 (OCTAVE_INSTALL_MM_INT_OPS): Install int matrix -> complex matrix
8966 widening op. Install indexed int matrix = complex matrix
8967 assignment conversion.
8968 (OCTAVE_INSTALL_RE_INT_ASSIGN_OPS, OCTAVE_INSTALL_CX_INT_ASSIGN_OPS):
8970 (OCTAVE_INSTALL_INT_OPS): Use them.
8972 * op-int.h: (OCTAVE_INSTALL_SM_INT_ASSIGNCONV): New macro.
8973 * OPERATORS/op-i8-i8.cc, OPERATORS/op-i16-i16.cc,
8974 OPERATORS/op-i32-i32.cc, OPERATORS/op-i64-i64.cc,
8975 OPERATORS/op-ui8-ui8.cc, OPERATORS/op-ui16-ui16.cc,
8976 OPERATORS/op-ui32-ui32.cc, OPERATORS/op-ui64-ui64.cc:
8977 Use it to define mixed size integer scalar/integer matrix
8978 assignment conversions.
8980 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::complex_array_value,
8981 OCTAVE_VALUE_INT_SCALAR_T::complex_array_vale):
8984 2004-09-02 John W. Eaton <jwe@octave.org>
8986 * DLD-FUNCTIONS/quad.cc (Fquad): Pass "__quad_fcn_" instead of
8987 "__quad_fcn__" to unique_symbol_name.
8989 * ov-fcn-inline.cc (octave_fcn_inline): Pass "__inline_" instead
8990 of "__inline__" to unique_symbol_name.
8992 * variables.cc (unique_symbol_name): Make better random symbol name.
8994 2004-09-01 John W. Eaton <jwe@octave.org>
8996 * version.h (OCTAVE_VERSION): Now 2.1.58.
8998 * Makefile.in (OP_INCLUDES): New variable.
8999 Include OPERATORS/op-int.h here.
9000 * Makefile.in (dist): Also link $(OP_INCLUDES).
9002 * Makefile.in (DISTFILES): Include $(EXTRAS) in the list.
9004 2004-09-01 David Bateman <dbateman@free.fr>
9006 * DLD-FUNCTION/quad.cc: Allow function handle and inline functions.
9007 Use a unique function name and delete it on exit.
9009 * ov.h (is_inline_function): New virtual function.
9010 * ov-fcn-inline.h (is_inline_function): New function.
9011 * ov-base.h (is_inline_function): New function.
9013 * ov-fcn-inline.cc (octave_fcn_handle::octave_fcn_handle):
9014 Use unique_symbol_name and clear_function instead of manipulating
9015 symbol table directly.
9017 * variables.cc (unique_symbol_name): New function.
9018 (clear_function): New function.
9019 * variables.h: Provide decls.
9021 * dynamic-ld.cc (do_clear_function): Rename from clear_function.
9023 2004-09-01 John W. Eaton <jwe@octave.org>
9025 * OPERATORS/op-i8-i8.cc, OPERATORS/op-i16-i16.cc,
9026 OPERATORS/op-i32-i32.cc, OPERATORS/op-i64-i64.cc,
9027 OPERATORS/op-ui8-ui8.cc, OPERATORS/op-ui16-ui16.cc,
9028 OPERATORS/op-ui32-ui32.cc, OPERATORS/op-ui64-ui64.cc:
9029 Define and install mixed assignment ops.
9030 * op-int.h: Define mixed integer/double ops.
9031 Define simple division ops.
9033 * ov-complex.h (octave_complex_scalar): New typedef to simplify
9034 various macros where naming consistency matters.
9036 2004-08-31 David Bateman <dbateman@free.fr>
9038 * OPERATORS/op-int.h (ss_pow, ms_el_pow, mm_el_pow): New power
9040 (sm_el_pow): Return correct type.
9041 (OCTAVE_SS_POW_OPS, OCTAVE_SM_POW_OPS, OCTAVE_MS_POW_OPS,
9042 OCTAVE_MM_POW_OPS): New macros to define the power operator over
9044 (OCTAVE_SS_INT_OPS, OCTAVE_SM_INT_OPS, OCTAVE_MS_INT_OPS,
9045 OCTAVE_MM_INT_OPS): Use the new macros for the power operators.
9046 (OCTAVE_INSTALL_SS_INT_OPS, OCTAVE_INSTALL_MS_INT_OPS,
9047 OCTAVE_INSTALL_MM_INT_OPS): Install new power functions.
9049 * OPERATORS/op-int-conv.cc (INT_CONV_FUNCTIONS): Correct return
9050 types for unsigned integer scalars and signed integer matrices.
9052 * ov-type-conv.h (OCTAVE_TYPE_CONV_BODY3): Conversion betwen same
9053 types returns the original value.
9055 * bitfcns.cc (BITOP): Fix for mixed scalar/matrix ops. Allow
9056 octave_range as an argument, by using class_name rather than
9059 2004-08-31 John W. Eaton <jwe@octave.org>
9061 * pr-output.cc (pr_int): Also handle bank_format.
9062 (octave_print_internal (std::ostream& os, const intNDArray<T>&,
9063 bool, int)): Likewise.
9065 2004-08-31 David Bateman <dbateman@free.fr>
9067 * pr-output.cc (pr_int(std::ostream, const T&, int)):
9068 New template function to print formatted integer types.
9069 Instantiate it for all of the integer types.
9070 (octave_print_internal (std::ostream, const intNDArray<T>&, bool,
9071 int)): Use pr_int. Align output up in columns, and check for
9072 free_format or plus_format.
9073 (octave_print_internal (std::ostream, const octave_int<T>&, bool)):
9074 Use pr_int. Check for free_format and plus_format.
9076 * ls-hdf5.cc (hdf5_read_next_data): When importing hdf5 files,
9077 allow structures and lists (for backward compatibility). Also
9078 allow importation of integer types into octave int and uint types.
9080 2004-08-31 John W. Eaton <jwe@octave.org>
9082 * data.cc (fill_matrix, identity_matrix): Convert class name to
9083 oct_data_conv::data_type and switch on that.
9084 (identity_matrix (int, int)): New template.
9085 (identity_matrix (int, int, const std::string&)): Use it.
9087 * ov.h (octave_type_traits, octave_array_type_traits): Move here.
9088 * oct-stream.cc: From here.
9090 2004-08-31 David Bateman <dbateman@free.fr>
9092 * data.cc (Fzeros, Fones, Feye): Update help text for optional
9094 (static octave_value identity_matrix (int, int, const std::string&)):
9095 New function to create identity matrices with an arbitrary type.
9096 (Feye): Call new version of identity matrix function, even for scalars.
9097 (static octave_value fill_matrix (const octave_value_list&, double,
9098 const char *)): Update to allow arbitrary classes of matrices to be
9101 2004-08-31 John W. Eaton <jwe@octave.org>
9103 * ls-mat5.cc (read_int): New function.
9105 * oct-stream.cc (octave_base_stream::do_read,
9106 octave_base_stream::read, octave_base_stream::write): Delete.
9107 * oct-stream.h: Delete decls.
9109 * oct-stream.cc (octave_stream::read): Handle block_size and
9110 separate input/output types.
9111 (octave_stream::write): Handle block_size and various input types.
9112 (octave_type_traits, octave_array_type_traits): New traits classes.
9113 (do_read): New templates to read data and perform type conversion.
9114 (octave_stream::write (const Array<T>&, int,
9115 oct_data_conv::data_type, int, oct_mach_info::float_format),
9116 do_write, write_int):
9117 New templates to write ints and perform type conversion.
9118 Instantiate for various Octave types.
9120 * ov.cc (octave_value::write): New function.
9121 * ov.h: Provide decl.
9122 * ov-base.cc (octave_base_value::write): New function.
9123 * ov-base.h: Provide decl.
9124 * ov-complex.h (octave_complex::write): New function.
9125 * ov-cx-mat.h (octave_complex_matrix::write): New function.
9126 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::write): New function.
9127 (OCTAVE_VALUE_INT_SCALAR_T::write): New function.
9128 * ov-re-mat.h (octave_matrix::write): New function.
9129 * ov-scalar.h (octave_scalar::write): New function.
9130 * ov-str-mat.h (octave_char_matrix_str::write): New function.
9132 * file-io.cc (Ffread): Handle block size, to/from format in
9134 (Ffwrite): Handle block size in precision argument.
9136 2004-08-25 David Bateman <dbateman@free.fr>
9138 * ov-cell.cc (octave_cell::subsasgn): Delete elements of cell array
9139 when type is "(" and rhs is empty.
9141 2004-08-09 John W. Eaton <jwe@octave.org>
9143 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::index_vector,
9144 OCTAVE_VALUE_INT_SCALAR_T::index_vector): New functions.
9146 2004-08-06 David Bateman <dbateman@free.fr>
9148 * OPERATORS/op-struct.cc: New file.
9149 * ov-struct.h (octave_struct::resize (const dim_vector&)):
9151 * oct-map.h (Octave_map::resize (const dim_vector&)): New function.
9152 * ov-map.cc (Octave_map::reshape):
9153 Correct return for same sized reshape.
9154 (Octave_map::resize (const dim_vector&)): New function.
9155 (concat (const Octave_map&, const Octave_map&, const Array<int>&)):
9156 Complete concatenation function.
9157 * Makefile.in (OP_XSRC): Include op-struct.cc in the list.
9159 2004-08-05 John W. Eaton <jwe@octave.org>
9161 * pt-stmt.h (tree_statement::set_command,
9162 (tree_statement::set_expression): New functions.
9164 * parse.y (param_list_beg): Handle pushing new symbol table
9165 context for anonymous function handle parameter lists here.
9166 (anon_fcn_handle): New non-terminal.
9167 (expression): Include anon_fcn_handle here.
9168 (make_anon_fcn_handle): New static function.
9170 2004-08-05 David Bateman <dbateman@free.fr>
9172 * ov.cc (octave_value::fcn_inline_value): New virtual function.
9173 * ov.h (octave_value::fcn_inline_value): Provide decl.
9174 * ov-base.cc (octave_base_value::fcn_inline_value): New function
9175 * ov-base.h (octave_base_value::fcn_inline_value): Provide decl.
9176 * ov-fcn-handle.cc (octave_fcn_handle::octave_fcn_handle
9177 (const std::string&, const string_vector&, const std::string&),
9178 octave_fcn_handle::convert_to_str_internal, Finline, Fargnames,
9179 Fformula, Fvectorize): Delete.
9180 (octave_fcn_handle::print_raw): Remove inline case.
9181 * ov-fcn-handle.h (octave_fcn_handle::fcn_type,
9182 octave_fcn_handle::octave_fcn_handle (const std::string&, const
9183 string_vector&, const std::string&),
9184 octave_fcn_handle::inline_fcn_name,
9185 octave_fcn_handle::inline_fcn_text,
9186 octave_fcn_handle::inline_fcn_arg_names,
9187 octave_fcn_handle::is_inline,
9188 octave_fcn_handle::convert_to_str_internal,
9189 octave_fcn_handle::typ, octave_fcn_handle::iftext,
9190 octave_fcn_handle::ifargs): Delete constructors,
9191 functions, and data members (moved to ov-fcn-inline.h).
9192 * Makefile.in: Include ov-fcn-inline.h and ov-fcn-inline.cc where
9194 * ov-fcn-inline.h, ov-fcn-inline.cc: New class.
9196 2004-08-05 John W. Eaton <jwe@octave.org>
9198 * ov-base-int.cc (octave_base_int_matrix<T>::save_ascii,
9199 octave_base_int_matrix<T>::load_ascii,
9200 octave_base_int_matrix<T>::save_binary,
9201 octave_base_int_matrix<T>::load_binary,
9202 octave_base_int_matrix<T>::save_hdf5,
9203 octave_base_int_matrix<T>::load_hdf5,
9204 octave_base_int_matrix<T>::try_narrowing_conversion,
9205 octave_base_int_scalar<T>::print_raw,
9206 octave_base_int_scalar<T>::save_ascii,
9207 octave_base_int_scalar<T>::load_ascii,
9208 octave_base_int_scalar<T>::save_binary,
9209 octave_base_int_scalar<T>::load_binary,
9210 octave_base_int_scalar<T>::save_hdf5,
9211 octave_base_int_scalar<T>::load_hdf5):
9212 Sprinkle with this-> as needed.
9214 * Makefile.in (EXTRAS): New macro. Move ov-base-int.cc here from
9216 (INCLUDES_FOR_INSTALL): New macro.
9217 (install-inc, uninstall): Use it instead of INCLUDES.
9219 * variables.h (symbol_exist): Default for type is now "any".
9221 2004-08-05 David Bateman <dbateman@free.fr>
9223 * ov-fcn-handle.cc (octave_fcn_handle (const std::string&,
9224 const string_vector&, const std::string&)): New constructor for inline
9226 (octave_fcn_handle::print_raw): Allow inline functions to be printed.
9227 (octave_fcn_handle::convert_to_str_internal): New function to allow
9228 Fchar to work on inlined function handles.
9229 (Finline, Fformula, Fargnames, Fvectorize): New functions.
9230 * ov-fcn-handle.h (octave_fcn_handle (const std::string&,
9231 const string_vector&, const std::string&)): Provide decl.
9232 (octave_fcn_handle::convert_to_str_internal): Provide decl.
9233 (fcn_type): New enum for the type of function handle.
9234 (octave_fcn_handle::inline_fcn_text, octave_fcn_handle::is_inline,
9235 octave_fcn_handle::inline_fcn_arg_names): New functions.
9236 (octave_fcn_handle::typ, octave_fcn_handle::iftext,
9237 octave_fcn_handle::ifargs): New private variables for inline functions.
9239 2004-08-04 John W. Eaton <jwe@octave.org>
9241 * parse.y (fcn_handle):
9242 Recognize '@' FCN_HANDLE rather than just FCN_HANDLE.
9243 Decrement lexer_flags.looking_at_function_handle here.
9244 * lex.h (lexical_feedback::looking_at_function_handle):
9246 (lexical_feedback::init): Initialize it.
9247 * lex.l (handle_identifier): Only reject keywords if we are
9248 looking at a function handle.
9249 ("@"): Recognize this separately from what follows.
9250 Increment lexer_flags.looking_at_function_handle here.
9252 * ov-fcn-handle.h (octave_fcn_handle::octave_fcn_handle
9253 (octave_function*, const std::string)): Delete.
9254 * ov.h, ov.cc (octave_value::octave_value (octave_function *)): Delete.
9255 (octave_value::octave_value (octave_function *, const std::string)):
9258 * ov-fcn-handle.h (octave_fcn_handle::fcn): Now octave_value, not
9259 pointer to octave_function.
9260 (octave_fcn_handle::octave_fcn_handle (const octave_value&, const
9261 std::string)): New constructor.
9262 * variables.cc (lookup_function): Return octave_value, not pointer
9263 to octave_function. Change all uses.
9264 (lookup_user_function): Return octave_value, not pointer
9265 to octave_user_function. Change all uses.
9267 2004-08-03 John W. Eaton <jwe@octave.org>
9269 * ov-usr-fcn.cc (octave_user_fcn::do_multi_index_op): Call
9270 install_automatic_vars here.
9271 (octave_user_fcn::octave_user_fcn): Not here.
9272 (install_automatic_vars): Don't mark argn_sr, nargin_sr,
9273 nargout_sr, or varargin_sr as static.
9275 * oct-stream.cc (octave_scan): Avoid need for pushing two
9276 characters back on the input stream.
9278 2004-08-02 John W. Eaton <jwe@octave.org>
9280 * oct-stream.cc (octave_scan): For %i format, recognize numbers
9281 with leading 0x or 0X as hex and leading 0 as octal.
9283 * OPERATORS/op-fcn-handle.cc: Delete.
9284 * Makefile.in (OP_XSRC): Delete it from the list.
9285 * pr-output.cc (octave_print_internal (std::ostream&, const
9286 std::string&, bool, int): New function.
9287 * ov-fcn-handle.cc (octave_value::subsref): New function.
9288 * ov-fcn-handle.h (class fcn_handle_elt, class fcn_handle_array):
9290 (class octave_fcn_handle): Derive from octave_base_value, not
9291 octave_base_matrix<fcn_handle_array>.
9293 * ov-cx-mat.cc (try_narrowing_conversion): Also allow complex to
9294 real conversion for N-d arrays.
9296 2004-07-30 John W. Eaton <jwe@octave.org>
9298 * lex.l (<COMMAND_START>[^#% \t\r\n\;\,\"\'][^ \t\r\n\;\,]*{S}*):
9299 Also recognize \r as a word list separator.
9301 2004-07-27 John W. Eaton <jwe@octave.org>
9303 * bitfcns.cc (DO_BITSHIFT): Pass mask to bitshift.
9304 (bitshift (double, int, EIGHT_BYTE_INT): New arg, mask.
9305 (DO_UBITSHIFT, DO_SBITSHIFT): Use bitshfit, not operator >>.
9306 Use nbits function from octave_int type to set bits_in_type.
9308 * ov-struct.cc (Fisfield): Only print usage message if number of
9309 arguments is incorrect. Return false for invalid arguments.
9310 From Andy Adler <adler@site.uottawa.ca>.
9312 2004-07-27 David Bateman <dbateman@free.fr>
9314 * Cell.cc (Cell::index): Quit early if an error occurs when
9315 creating index vector object.
9317 * ov-int8.cc, ov-int16.cc, ov-int32.cc, ov-int64.cc, ov-uint8.cc,
9318 ov-uint16.cc, ov-uint32.cc, ov-uint64.cc (HDF5_SAVE_TYPE): Define
9319 for HDF5 native format for the type.
9321 * ov-base-int.h (save_ascii, save_binary, load_binary, save_hdf5):
9322 Delete unused arguments.
9324 * ov-base-int.cc (octave_base_int_matrix::save_ascii,
9325 octave_base_int_matrix::save_binary,
9326 octave_base_int_scalar::save_ascii,
9327 octave_base_int_scalar::save_binary,
9328 octave_base_int_scalar::save_hdf5): Delete unused argument.
9330 * ov-base-int.cc (octave_base_int_matrix::save_binary,
9331 octave_base_int_matrix::load_binary,
9332 octave_base_int_matrix::save_hdf5,
9333 octave_base_int_matrix::load_hdf5,
9334 octave_base_int_scalar::save_ascii,
9335 octave_base_int_scalar::load_ascii,
9336 octave_base_int_scalar::save_binary,
9337 octave_base_int_scalar::load_binary,
9338 octave_base_int_scalar::save_hdf5,
9339 octave_base_int_scalar::load_hdf5): Implement missing functions.
9341 2004-07-23 David Bateman <dbateman@free.fr>
9343 * ov-intx.h (OCTAVE_VALUE_INT_MATRIX_T::array_value,
9344 OCTAVE_VALUE_INT_SCALAR_T::array_value): new methods to extract array
9345 value from integer types.
9347 * bitfcns.cc (BITOPX): New Macro renamed from BITOP.
9348 (BITOP): Alter to allow different types and call BITOP appropriately.
9349 (DO_SBITSHIFT, DO_UBITSHIFT): New macros for signed, unsigned
9352 (DO_BITSHIFT): Test for shift of more bits than in type, which is
9353 undefined. Generalize to allow double args as well.
9354 (Fbitshift): Add int and double types.
9355 (Fbitmax): Return 53 bit value which conforms to IEEE754 double
9357 (Fintmax, Fintmin): New functions.
9358 (Fbitget, Fbitset, Fbitcmp): Delete.
9360 * OPERATORS/op-int.h: Add sm_el_pow function
9362 * ops.h (CATOPDECL, DEFCATOPX, DEFCATOP, DEFCATOP_FB, DEFNDCATOP_FN,
9363 CATOP_NONCONFORMANT, INSTALL_CATOP): New macros.
9365 * OPERATORS/op-b-b.cc, OPERATORS/op-b-bm.cc, OPERATORS/op-bm-b.cc,
9366 OPERATORS/op-bm-bm.cc, OPERATORS/op-cell.cc, OPERATORS/op-chm.cc,
9367 OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc, OPERATORS/op-cm-m.cc,
9368 OPERATORS/op-cm-s.cc, OPERATORS/op-cs-cm.cc, OPERATORS/op-cs-cs.cc,
9369 OPERATORS/op-cs-m.cc, OPERATORS/op-cs-s.cc, OPERATORS/op-m-cm.cc,
9370 OPERATORS/op-m-cs.cc, OPERATORS/op-m-m.cc, OPERATORS/op-m-s.cc,
9371 OPERATORS/op-range.cc, OPERATORS/op-s-cm.cc, OPERATORS/op-s-cs.cc,
9372 OPERATORS/op-s-m.cc, OPERATORS/op-s-s.cc, OPERATORS/op-str-str.cc,
9373 OPERATORS/op-str-m.cc, OPERATORS/op-str-s.cc (CATOPDECL, DEFCATOPX,
9374 DEFCATOP, DEFCATOP_FB, DEFNDCATOP_FN, CATOP_NONCONFORMANT,
9375 INSTALL_CATOP): Use them to define concatenation functions.
9377 * OPERATORS/op-int.h (OCTAVE_CONCAT_FN, OCTAVE_INSTALL_CONCAT_FN):
9378 New macros to define and install concatentaion functions for int/uint
9381 * TEMPLATE-INST/Array-tc.cc (INSTANTIATE_ARRAY_CAT): Delete.
9383 * pt-mat.cc (tm_row_const::tm_row_const_rep::do_init_element):
9384 Also append empty elements to the list of elements to be parsed.
9385 (tree_matrix::rvalue): Use new concatenation binary operators.
9387 * data.cc (cat_add_dims): Delete (now dim_vector::concat).
9388 (do_cat): Use new concatenation binary operators.
9390 * ov-typeinfo.cc (cat_op_fcn): Instantiate the array of cat functions.
9391 (register_cat_op, do_register_cat_op, do_lookup_cat_op): New functions.
9392 (cat_ops): Lookup table of binary concatentaion operators.
9394 * ov-typeinfo.h (lookup_cat_op): New function.
9396 * ov.cc (gripe_cat_op, gripe_cat_op_conv, do_cat_op): New functions.
9398 * ov.h (cat_op_fcn): Definition.
9399 (resize, do_cat_op): New functions.
9401 * ov-intx.h (resize): New_function
9403 * version.h (OCTAVE_API_VERSION): Bump version to api-v9.
9405 * Cell.cc, Cell.h, oct-map.cc, oct-map.h (cat): Delete.
9406 (concat): New function.
9408 * Cell.cc, Cell.h (insert): New function
9410 * ov-base.cc, ov-base.h, ov-scalar.h, ov-complex.h, ov-bool.h,
9411 ov-range.h, ov-base-mat.h, (resize): New function.
9414 2004-07-23 John W. Eaton <jwe@octave.org>
9416 * symtab.cc (whos_parameter): Move decl here, from symtab.h.
9418 2004-07-23 Oyvind Kristiansen <oyvinkri@stud.ntnu.no>
9420 * symtab.cc (symbol_record::subsymbols_list): New method.
9421 (symbol_record::maybe_list): Call to subsymbols_list and merge
9422 result with the original list of symbols.
9424 * symtab.cc (symbol_record::make_dimensions_string): New method.
9425 (symbol_record::print_symbol_info_line): Print N-d info. Output
9426 for long format now under control of format string.
9427 (symbol_table::maybe_list): Headers to whos listing updated.
9428 Also print footer info.
9429 (symbol_table::print_descriptor): Method printing the
9430 header of whos listings.
9431 (symbol_table::parse_whos_line_format): New method.
9432 (whos_line_format, Vwhos_line_format): New built-in variables.
9433 (symbols_of_symtab): DEFVAR them.
9434 (symbol_record::nelem, symbol_record::symbol_def::nelem,
9435 symbol_record::byte_size, symbol_record::symbol_def::byte_size):
9437 (symbol_record::dimensions_string_req_first_space): New method.
9438 (symbol_record::dimensions_string_req_total_space): New method.
9439 * symtab.h (whos_parameter): New struct. Container for one
9440 parameter in whos_line_format.
9442 2004-07-22 Paul Kienzle <pkienzle@users.sf.net>
9444 * DLD-FUNCTIONS/dassl.cc (Fdassl): Fix doc string.
9445 * ov-struct.cc (Fstruct): Likewise.
9446 * symtab.cc (Fdebug_symtab_lookups): Likewise.
9448 2004-07-22 David Bateman <dbateman@free.fr>
9450 * data.cc (Fsize): Return 1 for dimensions exceeding ndim.
9452 * ov.cc (octave_value::octave_value (const ArrayN<double>)):
9454 * ov.h: Provide decl.
9455 * ov-cx-mat.h (octave_complex_matrix (const ArrayN<Complex>&)):
9457 * ov-re-mat.h (octave_complex_matrix (const ArrayN<double>&)):
9460 * ov-re-mat.h (octave_matrix(const ArrayN<double>&)): New constructor
9461 * pt-loop.cc (DO_ND_LOOP): New macro for use of NDArray in for loop.
9462 (tree_simple_for_command::eval): Use it, and allow iteration over
9465 2004-07-12 John W. Eaton <jwe@octave.org>
9467 * ov-intx.h: N-d array and scalar extractor functions take no args.
9469 * ov.h (octave_value::int8_scalar_value,
9470 octave_value::int16_scalar_value, octave_value::int32_scalar_value,
9471 octave_value::int64_scalar_value, octave_value::uint8_scalar_value,
9472 octave_value::uint16_scalar_value, octave_value::uint32_scalar_value,
9473 octave_value::uint64_scalar_value): New functions.
9474 * ov-base.cc (octave_base_value::int8_scalar_value,
9475 octave_base_value::int16_scalar_value,
9476 octave_base_value::int32_scalar_value,
9477 octave_base_value::int64_scalar_value,
9478 octave_base_value::uint8_scalar_value,
9479 octave_base_value::uint16_scalar_value,
9480 octave_base_value::uint32_scalar_value,
9481 octave_base_value::uint64_scalar_value): New functions.
9482 * ov-base.h: Provide decls.
9484 * lex.l: (Vtoken_count): New static variable.
9485 (COUNT_TOK_AND_RETURN): New macro. Use it everywhere a token is
9486 returned to the parser.
9487 (F__token_count__): New function.
9489 2004-06-25 John W. Eaton <jwe@octave.org>
9491 * OPERATORS/op-int-conv.cc: Add conversions for range type.
9493 2004-06-17 John W. Eaton <jwe@octave.org>
9495 * bitfcns.cc (bitfcns): New file.
9496 * Makefile.in (DIST_SRC): Add it to the list.
9498 2004-06-16 John W. Eaton <jwe@octave.org>
9500 * OPERATORS/op-int.h: New file.
9501 * OPERATORS/op-i16-i16.cc, OPERATORS/op-i8-i8.cc,
9502 OPERATORS/op-ui32-ui32.cc, OPERATORS/op-i32-i32.cc,
9503 OPERATORS/op-int-conv.cc, OPERATORS/op-ui64-ui64.cc,
9504 OPERATORS/op-i64-i64.cc, OPERATORS/op-ui16-ui16.cc,
9505 OPERATORS/op-ui8-ui8.cc: Use new macros from op-int.h.
9507 2004-06-14 John W. Eaton <jwe@octave.org>
9509 * pr-output.h, pr-output.cc (octave_print_conv): New traits class.
9510 (template <class T> void octave_print_internal (std::ostream&,
9511 const intNDArray<T>&, bool, int),
9512 (template <class T> void octave_print_internal (std::ostream&,
9513 const octave_int<T>&, bool)): New template functions.
9514 Instantiate versions for new int types.
9516 * ov-typeinfo.h (octave_value_typeinfo::type_conv_ops):
9518 (octave_value_typeinfo::register_type_conv_op,
9519 octave_value_typeinfo::lookup_type_conv_op,
9520 octave_value_typeinfo::do_register_type_conv_op,
9521 octave_value_typeinfo::do_lookup_type_conv_op): New functions.
9523 * ov-re-mat.cc (Fdouble): New function.
9525 * ov-range.h (octave_range::reshape): Reshape array_value, not
9528 * ov-base-scalar.h (octave_base_scalar<ST>::all,
9529 octave_base_scalar<ST>::any, octave_base_scalar<ST>::is_true): Use
9530 ST() instead of 0.0.
9532 * ov-base-mat.h (octave_base_matrix<MT>::byte_size): New function.
9534 * ops.h (INSTALL_COLNVOP, DEFCONVFNX, DEFDBLCONVFN, DEFCONVFN,
9535 DEFCONVFN2): New macros.
9537 * DLD-FUNCTIONS/filter.cc (Ffilter): Kluge type conversions.
9539 * ov.cc (install_types): Register new integer types.
9541 * ov.h, ov.cc (octave_value::octave_value (const octave_int8&),
9542 octave_value::octave_value (const octave_uint8&),
9543 octave_value::octave_value (const octave_int16&),
9544 octave_value::octave_value (const octave_uint16&),
9545 octave_value::octave_value (const octave_int32&),
9546 octave_value::octave_value (const octave_uint32&),
9547 octave_value::octave_value (const octave_int64&),
9548 octave_value::octave_value (const octave_uint64&),
9549 octave_value::octave_value (const int8NDArray&),
9550 octave_value::octave_value (const uint8NDArray&),
9551 octave_value::octave_value (const int16NDArray&),
9552 octave_value::octave_value (const uint16NDArray&),
9553 octave_value::octave_value (const int32NDArray&),
9554 octave_value::octave_value (const uint32NDArray&),
9555 octave_value::octave_value (const int64NDArray&),
9556 octave_value::octave_value (const uint64NDArray&)):
9559 * ov.h (octave_value::internal_rep): New function.
9560 (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Also define
9561 static_type_id, static_type_name, and static_class_name
9564 * Cell.h (Cell::reshape (const dim_vector&)): New forwarding
9565 function for return type conversion.
9567 * ov-int16.cc, ov-int16.h, ov-int32.cc, ov-int32.h, ov-int64.cc,
9568 ov-int64.h, ov-int8.cc, ov-int8.h, ov-uint16.cc, ov-uint16.h,
9569 ov-uint32.cc, ov-uint32.h, ov-uint64.cc, ov-uint64.h, ov-uint8.cc,
9570 ov-uint8.h, ov-type-conv.h, ov-int-traits.h,
9571 OPERATORS/op-int-conv.cc, OPERATORS/op-double-conv.cc,
9572 OPERATORS/op-i16-i16.cc, OPERATORS/op-i32-i32.cc,
9573 OPERATORS/op-i64-i64.cc, OPERATORS/op-i8-i8.cc,
9574 OPERATORS/op-ui16-ui16.cc, OPERATORS/op-ui32-ui32.cc,
9575 OPERATORS/op-ui64-ui64.cc, OPERATORS/op-ui8-ui8.cc: New files.
9576 Makefile.in: Add them to the appropriate lists.
9578 2004-06-03 John W. Eaton <jwe@octave.org>
9580 * ov-fcn-handle.h (octave_function_handle::is_matrix_type,
9581 octave_function_handle::is_numeric_type,
9582 octave_function_handle::is_constant,
9583 octave_function_handle::is_true): New functions.
9584 (octave_function_handle::is_defined): Delete (inherited version is
9587 2004-06-03 David Bateman <dbateman@free.fr>
9589 * DLD-FUNCTIONS/filter.cc: Fix for length(a)=1 && length(b)=2 case.
9591 2004-05-07 John W. Eaton <jwe@octave.org>
9593 * ov.cc (octave_value::print_with_name): Only print name tag if
9594 Vprint_answer_id_name is true.
9596 * octave.cc (intern_argv): Insert __nargin__ in top_level_sym_tab
9597 instead of making it a builtin variable. Mark it static.
9598 * ov-usr-fcn.cc (octave_user_function::install_automatic_vars):
9599 Mark local automatic variables static.
9601 2004-04-30 John W. Eaton <jwe@octave.org>
9603 * oct-stream.cc (octave_base_stream::clearerr): New function.
9604 (octave_stream::clearerr): New function.
9605 (seek (long, int)): Call clearerr here.
9606 * oct-stdstrm.h (octave_stdiostream::clear): New function.
9607 * c-file-ptr-stream.h (c_file_ptr_buf::clear,
9608 i_c_file_ptr_stream::clear, o_c_file_ptr_stream::clear,
9609 io_c_file_ptr_stream::clear): New functions.
9611 2004-04-29 David Bateman <dbateman@free.fr>
9613 * load-save.cc (Fload, Fsave): Accept -mat as well as -mat-binary.
9615 2004-04-27 David Bateman <dbateman@free.fr>
9617 * DLD-FUNCTIONS/sort.cc: Add missing "class" keywords to template
9620 2004-04-22 John W. Eaton <jwe@octave.org>
9622 * pt-plot.cc (Fclearplot): Temporarily turn off automatic_replot.
9623 Clear display after resetting title, labels, etc.
9625 2004-04-22 John W. Eaton <jwe@bevo.che.wisc.edu>
9627 * pt-colon.cc (tree_colon_expression::rvalue): Also check for
9628 error_state after evaluating each subexpression.
9630 2004-04-22 David Bateman <dbateman@free.fr>
9632 * ov-base-scalar.h (octave_base_scalar<ST>::permute): New function.
9634 * ov-base-mat.cc (octave_base_matrix<MT>::is_true): Make N-d aware.
9636 2004-04-22 John W. Eaton <jwe@octave.org>
9638 * oct-stream.cc (printf_value_cache::curr_value): Now NDArray.
9639 (printf_value_cache::double_value): Extract N-d array, not Matrix.
9641 2004-04-21 John W. Eaton <jwe@octave.org>
9643 * parse.y (function2): Pass id name to frob_function. Delete id.
9644 (frob_function): Accept function name instead of identifier.
9645 Don't try to rename symbol table entry. Lookup symbol record for
9646 function name here. Insert name in symbol table if needed.
9647 Operate on symbol record instead of identifier.
9649 2004-04-21 David Bateman <dbateman@free.fr>
9651 * DLD_FUNCTIONS/fft.cc(do_fft): Correctly initialize the variable dim
9652 for scalar arguments.
9654 * DLD-FUNCTIONS/minmax.cc: Handle single vector arg correctly.
9656 2004-04-20 John W. Eaton <jwe@octave.org>
9658 * ls-mat-ascii.cc (read_mat_ascii_data): Prepend "X" to keywords.
9659 Only drop text after last "." in name.
9661 * lex.l (is_keyword): New function.
9662 (Fiskeyword): Use it.
9663 * lex.h: Provide decl.
9665 * lex.l (is_keyword_token): Rename from is_keyword.
9667 2004-04-16 John W. Eaton <jwe@octave.org>
9669 * file-io.cc (maybe_warn_interface_change): New function.
9670 (fopen_mode_to_ios_mode): Use it.
9672 2004-04-16 Paul Kienzle <pkienzle@users.sf.net>
9674 * file-io.cc (fopen_mode_to_ios_mode): Default to binary mode.
9675 (Ffopen): Document 't' and 'b' mode flags.
9677 2004-04-16 John W. Eaton <jwe@octave.org>
9679 * Makefile.in (DLD_XSRC): Add gcd.cc to the list.
9681 2004-04-16 David Bateman <dbateman@free.fr>
9683 * DLD-FUNCTIONS/gcd.cc: New file.
9685 2004-04-15 David Bateman <dbateman@free.fr>
9687 * ov-ch-mat.h: convert_to_str_interal returns charNDArray.
9689 2004-04-12 John W. Eaton <jwe@octave.org>
9691 * version.h (OCTAVE_BUGS_STATEMENT): Bug list is now bug@octave.org.
9693 2004-04-08 John W. Eaton <jwe@octave.org>
9695 * ov-base-mat.cc (octave_base_matrix<MT>::do_index_op): Quit early
9696 if an error occurs when creating index vector object.
9698 * ov.cc (octave_value::numeric_assign): Always call maybe_mutate
9701 2004-04-06 David Bateman <dbateman@free.fr>
9703 * DLD_FUNCTIONS/sort.cc: Use the new template sort class, adapt for
9704 N-d arrays, and allow optional dim argument.
9706 * DLD_FUNCTIONS/fftn.cc: Save result of transpose operation.
9707 Check for failure of transpose.
9709 2004-04-02 John W. Eaton <jwe@bevo.che.wisc.edu>
9711 * ov-bool.h (octave_bool::bool_array_value): New function.
9713 * ov-base-mat.cc (octave_base_matrix<MT>::subsasgn): Don't allow
9714 expressions like x(i)(j) or x(i){j} when x is empty.
9716 * load-save.cc (get_file_format): Error if file does not exist.
9717 (Fload): Also complain here if specific file type is specified and
9718 file does not exist.
9720 2004-04-02 Quentin Spencer <qspencer@ieee.org>
9722 * parse.y: Use persistent instead of static in warnings messages.
9724 2004-04-02 John W. Eaton <jwe@bevo.che.wisc.edu>
9726 * pt-decl.cc (tree_static_command::do_init): Initialize to empty
9729 2004-04-02 David Bateman <dbateman@free.fr>
9731 * ov-re-mat.cc (octave_matrix::convert_to_str_internal):
9733 * ov-bool-mat.cc (octave_bool_matrix::convert_to_str_internal):
9736 * DLD-FUNCTIONS/besselj.cc, DLD-FUNCTIONS/betainc.cc,
9737 DLD-FUNCTIONS/gammainc.cc, DLD-FUNCTIONS/minmax.cc,
9738 DLD-FUNCTIONS/filter.cc:
9739 Convert for N-d array, better Matlab compatibility.
9741 * load-save.cc (Fload): Better handling of non existent files.
9743 2004-03-19 John W. Eaton <jwe@bevo.che.wisc.edu>
9745 * ov-list.cc (octave_list::subsref): Correctly create return value.
9746 Return comma-separate list if {-style indexing extracts more than
9749 2004-03-12 John W. Eaton <jwe@bevo.che.wisc.edu>
9751 * version.h (OCTAVE_VERSION): Now 2.1.57.
9752 (OCTAVE_API_VERSION): Now api-v8.
9754 * ov-cell.cc (octave_cell::save_hdf5): Handle empty cells.
9755 (octave_cell::load_hdf5): Likewise.
9757 2004-03-11 John W. Eaton <jwe@bevo.che.wisc.edu>
9759 * ov-base-mat.cc (octave_base_matrix<MT>::subsasgn): If empty,
9760 allow type conversion when indexing with "{" and ".".
9762 2004-03-10 John W. Eaton <jwe@bevo.che.wisc.edu>
9764 * pr-output.cc (init_format_state): Also set compact_format.
9765 (pr_col_num_header): Print one newline character before column
9766 headers for compact format.
9768 2004-03-09 John W. Eaton <jwe@bevo.che.wisc.edu>
9770 * version.h (OCTAVE_WWW_STATEMENT): New macro.
9771 (OCTAVE_STARTUP_MESSAGE): Include it here.
9772 (OCTAVE_NAME_VERSION_COPYRIGHT_COPYING_WARRANTY_AND_BUGS): And here.
9774 * octave.cc (verbose_usage): Use OCTAVE_WWW_STATEMENT here.
9776 * DLD-FUNCTIONS/find.cc (find_nonzero_elem_idx): If there are no
9777 nonzero elements, return [](0x1) or [](1x0), not [](0x0).
9778 Correctly preserve orientation for row vectors.
9780 2004-03-08 Petter Risholm <risholm@idi.ntnu.no>
9782 * data.cc (do_cat): Check for length of args before getting dimension.
9783 New arg, fname. Print usage message corresponding to fname.
9784 (Fcat): Pass "cat" as fname arg to do_cat.
9785 (Fhorzcat): Pass "horzcat" as fname arg to do_cat.
9786 (Fvertcat): Pass "vertcat" as fname arg to do_cat.
9788 2004-03-05 John W. Eaton <jwe@bevo.che.wisc.edu>
9790 * version.h (OCTAVE_VERSION): Now 2.1.56.
9791 (OCTAVE_API_VERSION): Now api-v7.
9793 2004-03-04 John W. Eaton <jwe@bevo.che.wisc.edu>
9795 * ov-struct.cc (Frmfield): New function
9797 * oct-map.h (Octave_map::contains): Return bool, not int.
9799 * ov-cell.cc (Fiscellstr): No error if arg is not a cell array.
9800 (Fcellstr): Return arg if it is already a cell array of character
9803 2004-03-03 John W. Eaton <jwe@bevo.che.wisc.edu>
9805 * ov-bool.cc (octave_bool::load_hdf5, octave_bool::save_hdf5):
9806 Avoid unnecessary casts.
9807 * ov-bool-mat.cc (octave_bool_matrix::load_hdf5,
9808 octave_bool_matrix::save_hdf5): Likewise.
9809 * ov-cell.cc (octave_cell::load_hdf5, octave_cell::save_hdf5):
9811 * ov-complex.cc (octave_complex::load_hdf5,
9812 octave_complex::save_hdf5): Likewise.
9813 * ov-cx-mat.cc (octave_complex_matrix::load_hdf5,
9814 octave_complex_matrix::save_hdf5): Likewise.
9815 * ov-range.cc (octave_range::load_hdf5, octave_range::save_hdf5):
9817 * ov-re-mat.cc (octave_matrix::load_hdf5, octave_matrix::save_hdf5):
9819 * ov-scalar.cc (octave_scalar::load_hdf5, octave_scalar::save_hdf5):
9821 * ov-str-mat.cc (octave_char_matrix_str::load_hdf5,
9822 octave_char_matrix_str::save_hdf5): Likewise.
9824 2004-03-03 David Bateman <dbateman@free.fr>
9826 * ov-cell.cc (octave_cell::save_hdf5, octave_cell::load_hdf5):
9829 2004-03-03 John W. Eaton <jwe@bevo.che.wisc.edu>
9831 * parse.y: Delete spaces surrounding = in %name-prefix directive.
9833 2004-03-01 Petter Risholm <risholm@idi.ntnu.no>
9835 * Cell.cc (Cell::cat): New function.
9836 * Cell.h: Provide decl.
9838 * oct-map.cc (Octave_map::cat): New function.
9839 * oct-map.h: Provide decl.
9841 * data.cc (Fcat): Speedup implementation.
9843 * data.cc (Fhorzcat, Fvertcat): New functions.
9845 * Array-tc.cc: Instantiate cat function.
9847 2004-03-01 David Bateman <dbateman@free.fr>
9849 * ls-hdf5.cc (save_hdf5_empty, load_hdf5_empty): New functions
9850 to save/load empty matrices keeping their dimensions.
9851 * ls-hdf5.h (save_hdf5_empty, load_hdf5_empty): Provide decls.
9853 * ov-re-mat.cc (save_hdf5, load_hdf5): Cleanup, check empty matrix.
9854 * ov-cx-mat.cc (save_hdf5, load_hdf5): Ditto.
9855 * ov-bool-mat.cc (save_hdf5, load_hdf5): Ditto.
9857 * ov-str-mat.cc (save_ascoo, load_ascii, save_binary,
9858 load_binary, save_hdf5, load_hdf5): Cleanup, check empty matrix,
9859 and save/load N-d arrays.
9861 2004-02-27 John W. Eaton <jwe@bevo.che.wisc.edu>
9863 * octave.cc (execute_startup_files): Don't find current directory
9864 for absolute name of local_rc until after executing home_rc.
9866 2004-02-24 John W. Eaton <jwe@bevo.che.wisc.edu>
9868 * input.cc (input_event_hook): Return type is now int. Return 0.
9870 * file-io.cc (do_stream_open): Don't call ::error if stream can't
9871 be created. Don't call ::fopen if arch is invalid. Set error
9872 state for stream if fopen fails.
9873 * oct-stream.h (octave_stream::error (const char *)): New function.
9874 (octave_stream::error (const std::string&)): Now public.
9876 2004-02-23 John W. Eaton <jwe@bevo.che.wisc.edu>
9878 * file-io.cc (Fftell): Return long integer instead of streamoff_array.
9879 (do_stream_open): Create octave_stdiostream instead of octave_fstream.
9881 * oct-fstrm.cc (octave_fstream::seek, octave_fstream::tell):
9882 Always fail. Signatures now match C library functionsb.
9883 * oct-iostrm.cc (octave_base_iostream::seek,
9884 octave_base_iostream::tell): Likewise.
9885 * oct-strstrm.cc (octave_base_strstream::seek,
9886 octave_base_strstream::tell): Likewise.
9888 * oct-stream.cc (octave_stream::seek, octave_stream::tell):
9889 Signatures now match C-library functions.
9891 * oct-stdstrm.cc (octave_stdiostream::seek, octave_stdiostream::tell):
9892 Call io_c_file_ptr_stream::seek and tell. Signatures now match
9893 C-library functions.
9895 * c-file-ptr-stream.h (c_file_ptr_buf::seek, c_file_ptr_buf::tell):
9897 (i_c_file_ptr_stream::seek, i_c_file_ptr_stream::tell): Likewise.
9898 (o_c_file_ptr_stream::seek, o_c_file_ptr_stream::tell): Likewise.
9899 (io_c_file_ptr_stream::seek, io_c_file_ptr_stream::tell): Likewise.
9901 2004-02-20 John W. Eaton <jwe@bevo.che.wisc.edu>
9903 * version.h (OCTAVE_VERSION): Now 2.1.55.
9904 (OCTAVE_API_VERSION): Now api-v6.
9906 * sighandlers.cc (sigfpe_handler, sigpipe_handler):
9907 Don't increment octave_interrupt_state if it is less than 0.
9908 (sigint_handler): If octave_interrupt_state is less than zero,
9911 * pt-except.cc (do_catch_code): Call OCTAVE_QUIT here so the catch
9912 code won't run if an interrupt is pending. Don't run catch code
9913 if octave_interrupt_state is less than zero.
9915 2004-02-20 Per Persson <persquare@mac.com>
9917 * Makefile.in (OCT_LINK_DEPS, OCTINTERP_LINK_DEPS):
9918 Include $(LIBS) in the list before $(FLIBS).
9920 2004-02-20 John W. Eaton <jwe@bevo.che.wisc.edu>
9922 * pr-output.cc (octave_print_internal (std::ostream&, const
9923 Range&, bool, int)): Don't print values beyond the limits of the
9926 * sighandlers.cc (sigint_handler): Print message after two
9927 consecutive interrupts, dump core after three or more.
9929 * load-save.cc (dump_octave_core): Handle core size limit.
9930 Rename from save_user_variables. Change all callers.
9931 (Fload, dump_octave_core, Fsave): Open HDF5 fils in binary mode.
9932 (do_save): Extract switch over file types to separate function.
9934 * load-save.cc (Voctave_core_file_limit): New variable.
9935 (octave_core_file_limit): New function.
9936 (symbols_of_load_save): Add DEFVAR for octave_core_file_limit.
9938 * load-save.cc (Voctave_core_file_name): New variable.
9939 (octave_core_file_name): New function.
9940 (symbols_of_load_save): Add DEFVAR for octave_core_file_name.
9942 * load-save.cc (Voctave_core_file_format):
9943 Rename from Voctave_core_format.
9944 (octave_core_file_format): Rename from octave_core_format.
9945 (symbols_of_load_save): Fix DEFVAR to match.
9947 2004-02-19 John W. Eaton <jwe@bevo.che.wisc.edu>
9949 * ov.cc (Fsizeof): New function.
9951 * ov.h (octave_value::byte_size): New function.
9952 * ov-base.h (octave_base_value::byte_size): New function.
9953 * ov-base-scalar.h (octave_base_scalar::byte_size): New function.
9954 * ov-bool-mat.h (octave_bool_matrix::byte_size): New function.
9955 * ov-ch-mat.h (octave_char_matrix::byte_size): New function.
9956 * ov-cx-mat.h (octave_complex_matrix::byte_size): New function.
9957 * ov-re-mat.h (octave_matrix::byte_size): New function.
9958 * ov-range.h (octave_range::byte_size): New function.
9959 * ov-cell.cc (octave_cell::byte_size): New function.
9960 * ov-cell.h: Provide decl.
9961 * ov-struct.cc (octave_struct::byte_size): New function.
9962 * ov-struct.h: Provide decl.
9963 * ov-streamoff.h (octave_streamoff::byte_size): New function.
9964 * ov-list.cc (octave_list::byte_size): New function.
9965 * ov-list.h: Provide decl.
9967 * xpow.cc (elem_xpow (const Matrix&, double)):
9968 Convert both operands to Complex if any element of A is negative.
9969 (elem_xpow (const NDArray&, double)): Likewise.
9971 2004-02-18 John W. Eaton <jwe@bevo.che.wisc.edu>
9973 * load-save.cc (Voctave_core_format): New static_variable.
9974 (octave_core_format): New function.
9975 (symbols_of_load_save): Add DEFVAR for octave_core_format.
9976 (get_save_format): Rename from get_default_save_format.
9977 Pass name of format as arg. New optional arg, fallback_format.
9979 (save_user_variables): Use pass Voctave_core_format to
9980 get_save_format here. Pass LS_BINARY as fallback_format.
9982 * sighandlers.cc (my_friendly_exit): New optional arg, save_vars.
9983 Only call save_user_variables if save_vars is true.
9984 (sigint_handler): If interactive, offer to abort and save
9985 workspace after three consecutive interrupts.
9986 (sigint_handler, sigpipe_handler, sigfpe_handler):
9987 Increment octave_interrupt_handler instead of setting it to 1.
9989 2004-02-16 John W. Eaton <jwe@bevo.che.wisc.edu>
9991 * version.h (OCTAVE_VERSION): Now 2.1.54.
9992 (OCTAVE_API_VERSION): Now api-v5.
9994 * Makefile.in (DLD_XSRC): Always include fftw_wisdom.cc.
9996 * DLD-FUNCTIONS/fftw_wisdom.cc:
9997 Rename from DLD-FUNCTIONS/fft_wisdom.cc.
9998 (Vfftw_wisdom_prog): Delete extern decl.
9999 (Ffftw_wisdom): Rename from Ffft_wisdom.
10000 Use Vfftw_wisdom_prog instead of Vwisdom_prog.
10001 Always define function. Signal error if not configured to use FFTW3.
10003 * defaults.cc (symbols_of_defaults): Rename WISDOM_PROGRAM to be
10004 FFTW_WISDOM_PROGRAM.
10005 (Vfftw_wisdom_prog): Rename from Vwisdom_prog.
10006 (fftw_wisdom_program): Rename from wisdom_program.
10007 For simplicity, always define FFTW_WISDOM_PROGRAM even when not
10009 (set_default_wisdom_prog): Look for OCTAVE_FFTW_WISDOM_PROGRAM in
10010 the environment instead of OCTAVE_WISDOM_PROGRAM.
10011 (set_default_fftw_wisdom_prog): Rename from set_default_wisdom_prog.
10012 * defaults.h.in (Vfftw_wisdom_prog): Provide extern decl.
10014 2004-02-16 David Bateman <dbateman@free.fr>
10016 * DLD-FUNCTIONS/fft.cc: Adapt for Nd arrays, combine with ifft.cc.
10017 * DLD-FUNCTIONS/ifft.cc: Delete.
10018 * DLD-FUNCTIONS/fft2.cc: Adapt for Nd arrays, combine with ifft.cc.
10019 * DLD-FUNCTIONS/ifft2.cc: Delete.
10020 * DLD-FUNCTIONS/fftn.cc: New function for Nd FFT and inverse FFT.
10021 * DLD-FUNCTIONS/fft_wisdom.cc: New function to manipulate FFTW
10024 * Makefile.in: Remove ifft.cc and ifft2.cc. Add fftn.cc and
10025 ifftn.cc. Make building of fft-wisdom.cc conditional on the
10026 value of FFTW_LIBS.
10027 * defaults.cc (Vwisdom_prog): New variable
10028 (set_default_wisdom_prog, wisdom_prog): New functions.
10029 (symbols_of_defaults): Add DEFVAR for wisdom_prog.
10031 2004-02-16 John W. Eaton <jwe@bevo.che.wisc.edu>
10033 * ov-list.cc (octave_list::subsasgn): Call assign for Cell objects
10034 here, not the base octave_value::assign.
10036 2004-02-15 John W. Eaton <jwe@bevo.che.wisc.edu>
10038 * lex.l (yywrap): Don't #undef this symbol.
10040 2004-02-15 Petter Risholm <risholm@stud.ntnu.no>
10042 * pt-mat.cc: Make [,] concatenation work for N-d arrays.
10044 2004-02-15 John W. Eaton <jwe@bevo.che.wisc.edu>
10046 * data.cc (do_cat): Merge with Fcat.
10048 2004-02-15 Petter Risholm <risholm@stud.ntnu.no>
10050 * ov-cell.cc (Fstruct2cell): New function.
10052 2004-02-14 John W. Eaton <jwe@bevo.che.wisc.edu>
10054 * Makefile.in (OCTINTERP_LINK_DEPS, OCT_LINK_DEPS): Always define.
10056 * oct-conf.h.in: Add OCTAVE_CONF_DL_LD, OCTAVE_CONF_DL_LDFLAGS,
10057 and OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS.
10058 Delete OCTAVE_CONF_MKOCTFILE_SH_LDFLAGS.
10060 * toplev.cc (octave_config_info): Delete MKOCTFILE_SH_LDFLAGS.
10061 Add DL_LD, DL_LDFLAGS, and MKOCTFILE_DL_LDFLAGS to the struct.
10063 2004-02-14 Per Persson <persquare@mac.com>
10065 * Makefile.in (%.oct): Use DL_LD instead of SH_LD to build .oct files.
10067 2004-02-14 John W. Eaton <jwe@bevo.che.wisc.edu>
10069 * ov-base-scalar.h (octave_base_scalar::squeeze): New function.
10071 2004-02-13 Petter Risholm <risholm@stud.ntnu.no>
10073 * data.cc (Fcat): New function.
10074 * data.cc (do_cat): New function.
10075 * data.cc (cat_add_dims): New function.
10077 2004-02-13 John W. Eaton <jwe@bevo.che.wisc.edu>
10079 * toplev.cc (main_loop): Call octave_parse, not yyparse.
10080 * octave.cc (octave_main): Increment octave_debug, not yydebug.
10081 * parse.y (%name-prefix): New directive, set to "octave_".
10082 * parse.h: Provide declarations for octave_lex and octave_parse
10083 instead of yylex and yyparse.
10084 * lex.l (%option prefix): New directive, set to "_octave".
10085 Define yylval to be octave_lval.
10086 Move definitions of YY_INPUT, YY_FATAL_ERROR, TOK_RETURN,
10087 TOK_PUSH_AND_RETURN, BIN_OP_RETURN, XBIN_OP_RETURN here.
10088 * lex.h: From here.
10090 2004-02-07 Petter Risholm <risholm@stud.ntnu.no>
10092 * ov-struct.cc (Fcell2struct): New function.
10093 (cell2struct_check_args, cell2struct_construct_idx): Likewise.
10095 2004-02-07 John W. Eaton <jwe@bevo.che.wisc.edu>
10097 * ov-scalar.h (octave_scalar::empty_clone):
10098 Return empty octave_matrix, not an octave_scalar object.
10099 * ov-complex.h (octave_complex::empty_clone):
10100 Return empty octave_complex_matrix, not an octave_complex object.
10102 2004-02-06 John W. Eaton <jwe@bevo.che.wisc.edu>
10104 * ov-usr-fcn.h (octave_user_function::function_name): Delete.
10105 (octave_user_function::fcn_name): Delete unused data member.
10106 (octave_user_function::stash_function_name): Save name in
10107 tree_function::my_name instead of fcn_name.
10108 Change all uses of fcn_name to be my_name instead.
10110 * pt.h, pt.cc (tree::break_function): Now pointer to
10111 octave_function rather than octave_user_function object.
10113 * pt-bp.h (MAYBE_DO_BREAKPOINT): Use name instead of function_name
10114 to get name from curr_function.
10115 * pt-pr-code.cc (tree_print_code::visit_octave_user_function_header):
10117 * debug.cc (Fdbwhere, Fdbtype, ): Likewise
10118 * error.cc (pr_where): Likewise.
10119 * variables.cc (Fmlock, Fmunlock, Fmislocked): Likewise.
10120 (lookup_function, lookup_user_function, link_to_builtin_or_function):
10121 Likewise, for curr_parent_function.
10123 * debug.cc (get_user_function, Fdbwhere):
10124 Cast curr_function to pointer to octave_user_function.
10126 * ov-mapper.cc (octave_mapper::do_multi_index_op):
10127 Save and restore curr_function here.
10128 * ov-builtin.cc (octave_builtin::do_multi_index_op): Likewise.
10130 * toplev.h, toplev.cc (curr_function, curr_parent_function): Now
10131 pointers to octave_function rather than octave_user_function objects.
10133 * ov-usr-fcn.h (octave_user_function::is_user_function): New function.
10134 * ov-fcn.h (octave_function::takes_varargs,
10135 octave_function::octave_va_start, octave_function::octave_va_arg,
10136 octave_function::octave_all_va_args,
10137 octave_function::takes_var_return, octave_function::octave_vr_val,
10138 octave_function::is_user_function): New virtual functions.
10140 2004-02-05 John W. Eaton <jwe@bevo.che.wisc.edu>
10142 * ov-struct.cc (Fstruct): Use new Octave_map constructor to create
10143 structures with specified sizes but no keys.
10145 * ov-struct.cc (Fstruct): New function, from Paul Kienzle
10146 <pkienzle@users.sf.net> and Petter Risholm <risholm@stud.ntnu.no>.
10148 * oct-map.h (Octave_map::Octave_map): Allow dimension to be
10149 specified for map with no keys.
10151 * ov-struct.cc (fieldnames): Return 0x1 cell array if no fieldnames.
10153 2004-02-05 Petter Risholm <risholm@stud.ntnu.no>
10155 * ov-base-mat.cc (octave_base_matrix<MT>::do_index_op):
10156 Don't fail if number of indices is greater than 2.
10158 2004-02-05 John W. Eaton <jwe@bevo.che.wisc.edu>
10160 * data.cc (Fsize): Update for N-d objects.
10162 * ls-mat5.cc (read_mat5_binary_element): Force conversion.
10164 * ov-base.cc (octave_base_value::char_matrix_value):
10165 Pass force arg to convert_to_str.
10167 * data.cc (Freshape): Chop trailing singletons from new dimensions.
10169 2004-02-03 John W. Eaton <jwe@bevo.che.wisc.edu>
10171 * error.cc (defun_usage_message): Only accept one arg, a const
10172 std::string& object. Change all uses. Pass nul-terminated string
10173 to defun_message_1.
10174 (defun_usage_message_1): New function, equivalent to old
10175 defun_usage_message.
10177 * ov-base.cc (nint_value): Use fix, not NINT.
10178 (INT_CONV_METHOD): Likewise, use fix instead of just casting.
10180 * data.cc (make_diag): Use int_value instead of nint_value to
10181 extract k for Matlab compatibility.
10182 (Flinspace): Likewise, for npoints.
10183 (fill_matrix): Likewise, for extracting dims.
10184 (Fsize): Likewise, for extracting dim argument. Require int value.
10185 * utils.cc (get_dimensions): Likewise. Use fix, not NINT.
10187 2004-02-02 John W. Eaton <jwe@bevo.che.wisc.edu>
10189 * error.cc (verror, error_1): New arg, os. Use this instead
10190 of always printing to std:cerr. Change all callers.
10192 * error.cc (defun_usage_message): New function.
10193 * error.h: Provide decl.
10194 * defun.cc (print_usage): Use it to display error message.
10196 * error.cc (verror): New arg, save_last_error. Change all callers.
10197 (usage): Set error_state after calling verror.
10199 * oct-map.cc (Octave_map::assign (const std::string, const Cell&)):
10200 Set dimensions to RHS dimensions, not 1x1.
10202 2004-01-23 John W. Eaton <jwe@bevo.che.wisc.edu>
10204 * ov-bool.cc, ov-cx-mat.cc, ov-re-mat.cc, ov-str-mat.cc:
10206 * file-io.cc, ls-hdf5.cc, ls-mat4.cc, ls-mat5.cc, ls-oct-binary.cc:
10207 Include <vector>, not <memory> for new defn of OCTAVE_LOCAL_BUFFER.
10208 * load-save.cc, ls-mat-ascii.cc, ls-oct-ascii.cc
10209 No need to include <memory> now.
10211 * DLD-FUNCTIONS/eig.cc (Feig): Use new optional arg for EIG to
10212 avoid computing eigenvectors if not requested.
10213 Based on a patch from David Bateman <dbateman@free.fr>.
10215 2004-01-23 John W. Eaton <jwe@bevo.che.wisc.edu>
10217 * ov-cell.cc (all_strings): Always compute total required length
10220 2004-01-22 John W. Eaton <jwe@bevo.che.wisc.edu>
10222 * version.h (OCTAVE_VERSION): Now 2.1.53.
10223 (OCTAVE_API_VERSION): Now api-v4.
10225 * error.cc (pr_where): New arg, print_code with default value true.
10226 (warning): Call pr_where with second arg false.
10228 * file-io.cc (Ffrewind): Only return value if nargout > 0.
10229 (Ffprintf): Likewise.
10230 (Fprintf): Likewise.
10232 * file-io.cc (Ffrewind): Return 0 for success, -1 for failure.
10235 * Makefile.in (distclean): Remove DOCSTRINGS.
10236 (maintainer-clean): Remove $(OPT_HANDLERS).
10238 2004-01-21 John W. Eaton <jwe@bevo.che.wisc.edu>
10240 * ov-cell.cc (octave_cell::subsref): Make '{' case N-d aware.
10242 * ov-scalar.cc (streamoff_array_value): New function.
10243 * ov-scalar.h: Provide decl.
10245 * OPERATORS/op-streamoff.cc (STREAMOFF_COMP_OP): New maco.
10246 Use it to define streamoff by matrix, streamoff by scalar, scalar
10247 by streamoff, and matrix by streamoff comparison operators.
10248 (install_streamoff_ops): Install them.
10250 * Cell.h (Cell::operator ()): Delete (we inherit them from Array<T>).
10251 (maybe_resize, elem_internal): Delete unused functions.
10253 * ls-mat5.cc (write_mat5_cell_array): Cell& arg is now const.
10255 2004-01-20 John W. Eaton <jwe@bevo.che.wisc.edu>
10257 * variables.cc (is_valid_function): If warn, also print error
10258 message if arg is not a string.
10260 * ov-usr-fcn.cc (Fnargin, Fnargout): New functions.
10262 * octave.cc (intern_argv): Lookup __nargin__ instead of nargin.
10263 * ov-usr-fcn.cc (octave_user_function::install_automatic_vars):
10264 Lookup __nargin__ and __nargout__ instead of nargin and nargout.
10266 * variables.h (at_top_level): Now extern.
10267 (lookup_user_function): New function.
10268 * variables.cc: Provide decls.
10270 * ov.h, ov.cc (octave_value::user_function_value):
10271 New virtual function.
10272 * ov-base.h, ov-base.cc (octave_base_value::user_function_value):
10273 Provide default version.
10274 * ov-usr-fcn.h (octave_user_function::user_function_value):
10277 * ov-re-mat.cc (complex_array_value): New function.
10278 * ov-re-mat.h: Provide decl.
10280 * ov-cell.cc (Fiscellstr): Don't return value on usage error.
10282 * error.cc: (symbols_of_error): Delete DEFVAR for error_text.
10283 Define __error_text__ and error_text as aliases for lasterr.
10285 * error.cc (bind_global_error_variable, clear_global_error_variable):
10287 * variables.h: Delete decls.
10289 * parse.y (Feval, Fevalin): Don't call bind_global_error_variable.
10290 Don't add clear_global_error_variable to the unwind_protect stack.
10291 Increment buffer_error_messages before evaluating "eval" code,
10292 decrement it before evaluating "catch" code.
10294 * pt-except.cc (do_catch_code): Don't call bind_global_error_variable.
10295 Don't add clear_global_error_variable to the unwind_protect stack.
10296 Decrement buffer_error_messages here.
10297 (tree_try_catch_command::eval): Increment buffer_error_messages here.
10299 * error.cc, error.h (buffer_error_messages): Now an int.
10301 2004-01-16 John W. Eaton <jwe@bevo.che.wisc.edu>
10303 * toplev.cc (octave_config_info): Add float_format,
10304 words_big_endian, and words_little_endian to the struct.
10306 2004-01-14 David Bateman <dbateman@free.fr>
10308 * ov-cell.cc (octave_cell::load_hdf5): Fix for HDF5 version 1.6
10309 handling of number of objects in a group.
10310 * ov-struct.cc (octave_struct::load_hdf5): Likewise.
10311 * ov-list.cc (octave_list::load_hdf5): Likewise.
10312 * ls-hdf5.cc (read_hdf5_data): Likewise.
10314 2004-01-13 John W. Eaton <jwe@bevo.che.wisc.edu>
10316 * ls-hdf5.h: Surround contents with #if defined (HAVE_HDF5).
10318 2004-01-10 John W. Eaton <jwe@bevo.che.wisc.edu>
10320 * oct-stream.cc (convert_to_valid_int, get_size):
10321 Use lo_ieee_is_NaN_or_NA instead of xisnan.
10322 (octave_base_stream::do_printf): Correct special case check for
10323 NA, NaN, Inf, or out of range integers.
10325 * dirfns.cc (Fglob): Always return list of files as a cell array.
10326 (Freaddir): Likewise.
10328 * dirfns.cc (Fls): If nargout > 0, return ls output.
10330 2004-01-09 John W. Eaton <jwe@bevo.che.wisc.edu>
10332 * load-save.cc (Fload): Assume -force by default.
10334 * oct-stream.cc (octave_base_stream::write):
10335 Allow fwrite (fid, "some string") to work.
10337 * toplev.cc (Fcomputer): Delete.
10338 (octave_config_info): Add unix and windows fields to the struct.
10340 2004-01-06 David Bateman <dbateman@free.fr>
10342 * ls-hdf5.cc: Fix handle of old versus new format files.
10344 * ls-oct-binary.cc: Split the load/save functionality into the types
10345 themselves. Backward compatibility maintained.
10347 * ov-struct.cc (save_binary, load_binary):
10348 * ov-str-mat.cc (save_binary, load_binary):
10349 * ov-scalar.cc (save_binary, load_binary):
10350 * ov-re-mat.cc (save_binary, load_binary):
10351 * ov-range.cc (save_binary, load_binary):
10352 * ov-list.cc (save_binary, load_binary):
10353 * ov-cx-mat.cc (save_binary, load_binary):
10354 * ov-complex.cc (save_binary, load_binary):
10355 * ov-cell.cc (save_binary, load_binary):
10356 * ov-bool.cc (save_binary, load_binary):
10357 * ov-bool-mat.cc (save_binary, load_binary):
10358 New functions for loading and saving structures in octave binary
10361 * ov-str-mat.h (save_binary, load_binary):
10362 * ov-scalar.h (save_binary, load_binary):
10363 * ov-re-mat.h (save_binary, load_binary):
10364 * ov-range.h (save_binary, load_binary):
10365 * ov-list.h (save_binary, load_binary):
10366 * ov-cx-mat.h (save_binary, load_binary):
10367 * ov-complex.h (save_binary, load_binary):
10368 * ov-cell.h (save_binary, load_binary):
10369 * ov-bool.h (save_binary, load_binary):
10370 * ov-bool-mat.h (save_binary, load_binary):
10371 * ov-struct.h (save_binary, load_binary):
10374 * ov.h (save_binary, load_binary): New virtual functions.
10376 * ov-base.cc (save_binary, load_binary): New functions, for fallbacks
10377 with error message.
10378 * ov-base.h: Provide decls.
10380 * load-save.cc: Remove "-import" flag and make it the default.
10381 * load-save.h: Likewise.
10383 * ls-oct-ascii.cc: Split the load/save functionality into the types
10384 themselves. Save "string" variables with the name "string" rather than
10385 string array. Backward compatiability maintained in ov-cs-mat.cc.
10386 Include new version of extract_keyword that halts if the next value is
10387 invalid rather that searching for the next valid value.
10389 * ls-oct-ascii.h: Extract_keyword header updated.
10390 Include definition of OCT_RBV and CELL_ELT_TAG, since they are now
10393 * ls-hdf5.cc: Split load/save functionality into the types themselves.
10394 The hdf5 format is changed so that each object is a group with a
10395 dataset "type" being a string with the octave_value type and the
10396 dataset or group "value" containing the value of the data, struct, etc.
10397 This allows extensibility. Backward compatibility is maintained. The
10398 "import" flag is now assumed to always be true and has been removed.
10400 * ov-struct.cc (save_ascii, load_ascii, save_hdf5, load_hdf5):
10401 * ov-str-mat.cc (save_ascii, load_ascii, save_hdf5, load_hdf5):
10402 * ov-scalar.cc (save_ascii, load_ascii, save_hdf5, load_hdf5):
10403 * ov-re-mat.cc (save_ascii, load_ascii, save_hdf5, load_hdf5):
10404 * ov-range.cc (save_ascii, load_ascii, save_hdf5, load_hdf5):
10405 * ov-list.cc (save_ascii, load_ascii, save_hdf5, load_hdf5):
10406 * ov-cx-mat.cc (save_ascii, load_ascii, save_hdf5, load_hdf5):
10407 * ov-complex.cc (save_ascii, load_ascii, save_hdf5, load_hdf5):
10408 * ov-cell.cc (save_ascii, load_ascii, save_hdf5, load_hdf5):
10409 * ov-bool.cc (save_ascii, load_ascii, save_hdf5, load_hdf5):
10410 * ov-bool-mat.cc (save_ascii, load_ascii, save_hdf5, load_hdf5):
10411 New functions for loading and saving structures in octave ascii
10412 and hdf5 formatted files.
10414 * ov-struct.h (save_ascii, load_ascii, save_hdf5, load_hdf5):
10415 * ov-str-mat.h (save_ascii, load_ascii, save_hdf5, load_hdf5):
10416 * ov-scalar.h (save_ascii, load_ascii, save_hdf5, load_hdf5):
10417 * ov-re-mat.h (save_ascii, load_ascii, save_hdf5, load_hdf5):
10418 * ov-range.h (save_ascii, load_ascii, save_hdf5, load_hdf5):
10419 * ov-list.h (save_ascii, load_ascii, save_hdf5, load_hdf5):
10420 * ov-cx-mat.h (save_ascii, load_ascii, save_hdf5, load_hdf5):
10421 * ov-complex.h (save_ascii, load_ascii, save_hdf5, load_hdf5):
10422 * ov-cell.h (save_ascii, load_ascii, save_hdf5, load_hdf5):
10423 * ov-bool.h (save_ascii, load_ascii, save_hdf5, load_hdf5):
10424 * ov-bool-mat.h (save_ascii, load_ascii, save_hdf5, load_hdf5):
10427 * ov-typeinfo.cc (octave_value_typeinfo::do_lookup_type): Include
10428 make_unique so that the stored type value is not used for all loaded
10431 * ov.h: (save_ascii, load_ascii, save_hdf5 and load_hdf5):
10432 New virtual functions.
10434 * ov-base.cc (save_ascii, load_ascii, save_hdf5, load_hdf5):
10435 New functions, for fallbacks with error message.
10436 * ov-base.h: Provide decls.
10438 2003-12-22 John W. Eaton <jwe@bevo.che.wisc.edu>
10440 * ov-cx-mat.cc (octave_complex_matrix::assign): RHS arg is N-d.
10441 * ov-cx-mat.h: Fix decl.
10443 * ops.h (DEFNDASSIGNOP_FN): New macro.
10444 * OPERATORS/op-bm-b.cc, OPERATORS/op-bm-bm.cc,
10445 OPERATORS/op-cm-cm.cc, OPERATORS/op-cm-cs.cc,
10446 OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc, OPERATORS/op-m-m.cc,
10447 OPERATORS/op-m-s.cc: Use it instead of DEFASSIGNOP_FN.
10449 2003-12-19 John W. Eaton <jwe@bevo.che.wisc.edu>
10451 * xpow.cc (xpow (double, double)): Avoid apparent GNU libm bug.
10453 2003-12-17 John W. Eaton <jwe@bevo.che.wisc.edu>
10455 * symtab.cc (symbol_record::print_symbol_info_line):
10456 Also check is_static to see if a symbol can be cleared.
10458 2003-12-16 John W. Eaton <jwe@bevo.che.wisc.edu>
10460 * lex.l (is_keyword): Also allow varargout_kw if
10461 lexer_flags.looking_at_return_list is false provided that we are
10462 defining a function and we haven't seen the function name yet.
10463 * parse.y (return_list): Don't require [] around varargout.
10465 * DLD-FUNCTIONS/find.cc (DO_FIND_OP): Delete macro.
10466 (find_to_fortran_idx): Delete. Move guts of function to
10467 find_nonzero_elem_idx.
10468 (find_nonzero_elem_idx): Now a template function. Handle overall
10469 array index here too. Make it N-d aware.
10471 * pt-pr-code.cc (tree_print_code::visit_complex_for_command,
10472 tree_print_code::visit_octave_user_function_header,
10473 tree_print_code::visit_matrix, tree_print_code::visit_cell,
10474 tree_print_code::visit_multi_assignment): Keep track of nearest
10475 [, {, or ( nesting level.
10476 (tree_print_code::visit_index_expression): Likewise. Check nesting
10477 level to decide how to print index.
10478 (tree_print_code::reset): Also reset nesting level stack.
10480 * pt-pr-code.h (tree_print_code::nesting): New data member.
10481 (tree_print_code::tree_print_code): Initialize it.
10483 * ov-base-mat.h (octave_base_matrix::octave_base_matrix (const MT&)):
10484 If arg has no dimensions, resize to be 0x0.
10486 2003-12-15 John W. Eaton <jwe@bevo.che.wisc.edu>
10488 * oct-map.cc (Octave_map::assign): Use Octave_map::contents member
10489 function instead of operator [].
10490 * ov-struct.cc (octave_struct::subsasgn): Likewise.
10491 * DLD-FUNCTIONS/time.cc (extract_tm): Likewise.
10493 * DLD-FUNCTIONS/time.cc (mk_tm_map): Use Octave_map::assign member
10494 function instead of operator [].
10495 * DLD-FUNCTIONS/getrusage.cc (Fgetrusage): Likewise.
10496 * DLD-FUNCTIONS/getgrent.cc (mk_gr_map): Likewise.
10497 * DLD-FUNCTIONS/getpwent.cc (mk_pw_map): Likewise.
10498 * load-save.cc (do_load): Likewise.
10499 * ls-hdf5.cc (hdf5_read_next_data): Likewise.
10500 * ls-mat5.cc (read_mat5_binary_element): Likewise.
10501 * oct-map.cc (Octave_map::reshape): Likewise.
10502 * oct-map.cc (Octave_map::index): Likewise.
10503 * ov-fcn-handle.cc (Ffunctions): Likewise.
10504 * pt-idx.cc (make_arg_struct): Likewise.
10505 * sighandlers.cc (make_sig_struct): Likewise.
10506 * syscalls.cc (mk_stat_map): Likewise.
10507 * toplev.cc (Foctave_config_info): Likewise.
10509 * ls-hdf5.cc (add_hdf5_data): Temporary Octave_map is now const.
10510 * ls-mat5.cc (save_mat5_binary_element): Likewise.
10512 * oct-map.cc (Octave_map::assign (const std::string&, const
10513 octave_value&)): New function.
10514 * oct-map.h: Provide decl.
10515 (Octave_map::contents (const std::string&)): New function.
10516 (Octave_map::operator [] (const std::string&) const): Delete.
10517 (Octave_map::operator [] (const std::string&)): Delete.
10519 2003-12-09 John W. Eaton <jwe@bevo.che.wisc.edu>
10521 * OPERATORS/op-cell.cc: Allow transpose for cell arrays.
10522 * OPERATORS/op-m-m.cc, OPERATORS/op-cm-cm.cc,
10523 OPERATORS/op-bm-bm.cc, OPERATORS/op-streamoff.cc,
10524 OPERATORS/op-str-str.cc: Improve error message for attempt to
10525 transpose N-d object.
10527 2003-11-27 John W. Eaton <jwe@bevo.che.wisc.edu>
10529 * pt-arg-list.cc (F__end__): Handle N-d objects.
10531 2003-11-25 John W. Eaton <jwe@bevo.che.wisc.edu>
10533 * OPERATORS/op-b-bm.cc: New file.
10535 * OPERATORS/op-bm-b.cc (op_el_and, op_el_or): Define and install.
10536 * OPERATORS/op-bm-bm.cc (op_el_and, op_el_or, assign): Likewise.
10538 * ov-str-mat.cc (CHAR_MATRIX_CONV): New macro.
10539 * ov-str-mat.h (octave_char_matrix_str::double_value,
10540 octave_char_matrix_str::matrix_value,
10541 octave_char_matrix_str::array_value,
10542 octave_char_matrix_str::complex_value,
10543 octave_char_matrix_str::complex_matrix_value,
10544 (octave_char_matrix_str::complex_array_value): Use it.
10546 * ov-bool-mat.cc (default_numeric_conversion_function):
10547 Convert to NDArray, not Matrix.
10548 * ov-str-mat.cc (default_numeric_conversion_function): Likewise.
10550 * ov-range.h (octave_range::array_value): New function.
10551 (octave_range::complex_array_value): Likewise.
10552 * ov-ch-mat.h (charNDArray::array_value): New function.
10553 (charNDArray::complex_array_value): Likewise.
10554 * ov-str-mat.h (octave_char_matrix_str::array_value): Likewise.
10555 (octave_char_matrix_str::complex_value): Likewise.
10556 (octave_char_matrix_str::complex_matrix_value): Likewise.
10557 (octave_char_matrix_str::complex_array_value): Likewise.
10559 * mappers.cc (acosh, log, log10, sqrt):
10560 Use octave_Inf instead of DBL_MAX for range limit.
10562 2003-11-24 John W. Eaton <jwe@bevo.che.wisc.edu>
10564 * version.h (OCTAVE_VERSION): Now 2.1.52.
10565 (OCTAVE_API_VERSION): Now api-v3.
10567 * DLD-FUNCTIONS/rand.cc (do_rand): Pass function name from arg
10568 list in calls to error.
10570 * ov-cs-list.cc, ov-cs-list.h (octave_cs_list::octave_cs_list):
10571 Explicitly initialize base class in constructors.
10573 * ov.h (octave_value::all_strings): Pass second arg to rep function.
10575 * ov.h (octave_value::string_value): Pass arg to rep function.
10577 * DLD-FUNCTIONS/dasrt.cc (dasrt_user_f): Delete unused arg names.
10578 * DLD-FUNCTIONS/rand.cc (Frand, Frandn): Likewise.
10579 * ls-hdf5.h (hdf5_streambase::hdf5_streambase): Likewise.
10580 * ls-hdf5.cc (read_hdf5_data): Likewise.
10581 * ls-utils.cc (get_save_type): Likewise.
10582 * parse.y (Fassignin): Likewise.
10583 * utils.cc (empty_arg): Likewise.
10584 * ov-usr-fcn.h (octave_user_function::subsref): Likewise.
10585 * ov-base-mat.h (octave_base_matrix::subsref): Likewise.
10586 * ov-mapper.h (octave_mapper::subsref): Likewise.
10587 * ov-builtin.h (octave_builtin::subsref): Likewise.
10588 * ov-complex.cc (octave_complex::complex_array_value): Likewise.
10589 * ov-cell.h (octave_cell::subsref): Likewise.
10590 * ov-base-scalar.h (octave_base_scalar::subsref): Likewise.
10591 * ov-struct.h (octave_struct::subsref): Likewise.
10592 * ov-range.h (octave_range::subsref): Likewise.
10593 * ov-list.h (octave_list::subsref): Likewise.
10594 * ov-base.cc (octave_base_value::print_info): Likewise.
10595 * pt-check.cc (tree_checker::visit_subplot_axes): Likewise.
10596 * pr-output.cc (octave_print_internal (std::ostream&, double, bool),
10597 octave_print_internal (std::ostream&, const Complex&, bool),
10598 octave_print_internal (std::ostream&, const ArrayN<std::string>&,
10599 bool, int): Likewise.
10600 * oct-stream.cc (octave_scan<> (std::istream&, const
10601 scanf_format_elt&, char*): Likewise
10602 * TEMPLATE-INST/Array-tc.cc (resize_fill_value<octave_value>):
10604 * pt-bp.cc (tree_breakpoint::visit_octave_user_function,
10605 tree_breakpoint::visit_octave_user_function_header,
10606 tree_breakpoint::visit_octave_user_function_trailer,
10607 tree_breakpoint::visit_plot_limits,
10608 tree_breakpoint::visit_plot_range,
10609 tree_breakpoint::visit_subplot,
10610 tree_breakpoint::visit_subplot_axes,
10611 tree_breakpoint::visit_subplot_list,
10612 tree_breakpoint::visit_subplot_style,
10613 tree_breakpoint::visit_subplot_using): Likewise.
10614 * ov.cc (octave_value::column_vector_value,
10615 (octave_value::complex_column_vector_value,
10616 (octave_value::row_vector_value,
10617 octave_value::complex_row_vector_value,
10618 octave_value::do_non_const_unary_op): Likewise.
10620 * load-save.cc: Only include ls-hdf5.h if HAVE_HDF5 is defined.
10621 From Melqart <melqart@free.fr>.
10623 * pr-output.h (octave_fcn_handle::print_as_scalar): Delete.
10625 * pr-output.cc (octave_print_internal): New version for
10626 ArrayN<std::string> objects.
10627 * pr-output.h: Provide decl.
10628 * ov-fcn-handle.cc (octave_fcn_handle::print_raw): Use it.
10630 * OPERATORS/op-fcn-handle.cc: New file.
10631 * Makefile.in (OP_XSRC): Add it to the list.
10633 * ov-fcn-handle.h, ov-fcn-handle.cc (octave_fcn_handle):
10634 Now an array of function handle objects.
10636 * ov.h, ov.cc (octave_value::octave_value (const fcn_handle_array&),
10637 (octave_value::octave_value (octave_function *f, const std::string&)):
10639 (octave_value::octave_value (const octave_fcn_handle&)): Delete.
10641 * ov-base-mat.cc (octave_base_matrix<T>::print_as_scalar):
10642 Check dims instead of rows and columns.
10644 * ov.h (octave_value::is_function_handle): New function.
10645 * ov-base.h (octave_base_value::is_function_handle): New function.
10647 2003-11-23 John W. Eaton <jwe@bevo.che.wisc.edu>
10649 * ov-bool-mat.h (octave_bool_matrix::array_value): Construct return
10650 value directly from matrix data member, not matrix.matrix_value ().
10652 * ov-re-mat.h (octave_matrix::index_vector): Construct idx_vector
10653 from NDArray, not Matrix.
10655 * ov-bool-mat.h (octave_bool_matrix::index_vector): Construct
10656 idx_vector from boolNDArray, not boolMatrix.
10658 * ov.cc (install_types): Also register dld function type.
10660 * OPERATORS/op-streamoff.cc: Install increment and decrement operators.
10661 * ov-streamoff.h (octave_streamoff::increment,
10662 octave_streamoff::decrement): New functions.
10664 * ov-streamoff.h, ov-streamoff.cc: Move streamoff_array class to
10665 liboctave/so-array.h and liboctave/so-array.cc.
10667 * oct-stream.cc (octave_stream::seek): Extract std::streamoff from
10668 tc_offset instead of int.
10670 * ov-re-mat.cc (octave_matrix::double_value): Use numel, not length.
10672 * ov-re-mat.cc (octave_matrix::streamoff_array_value): New function.
10673 * ov-re-mat.h: Provide decl.
10675 * ov-scalar.cc (octave_scalar::streamoff_value): New function.
10676 * ov-scalar.h: Provide decl.
10678 * ov.cc (octave_value::streamoff_array_value,
10679 octave_value::streamoff_value): New functions.
10680 * ov.h: Provide decls.
10682 * ov-base.cc (octave_base_value::streamoff_array_value,
10683 octave_base_value::streamoff_value): New functions.
10684 * ov-base.h: Provide decls.
10686 * ov-usr-fcn.cc (install_automatic_vars): Don't do anything unless
10687 sym_tab is defined.
10689 * ov-streamoff.h, ov-streamoff.cc, OPERATORS/op-streamoff.cc:
10692 * ov-cell.h (octave_value_cell::is_matrix_type): New function.
10694 * ov-mapper.h (octave_mapper::octave_mapper): No copying.
10695 * ov-fcn.h (octave_function::octave_function): Likewise.
10696 * ov-usr-fcn.h (octave_function::octave_function): Likewise.
10697 * ov-builtin.h (octave_builtin::octave_builtin): Likewise.
10698 * ov-dld-fcn.h (octave_dld_function::octave_dld_function): Likewise.
10700 2003-11-22 John W. Eaton <jwe@bevo.che.wisc.edu>
10702 * ov-mapper.h (octave_mapper::octave_mapper): Make public.
10703 Provide copy constructor and assignment operator.
10704 * ov-fcn.h (octave_function::octave_function): Likewise.
10705 * ov-builtin.h (octave_builtin::octave_builtin): Likewise.
10706 * ov-dld-fcn.h (octave_dld_function::octave_dld_function): Likewise.
10708 * ov-typeinfo.cc (octave_value_typeinfo::register_type,
10709 octave_value_typeinfo::do_register_type): New arg, val.
10710 Save it in vals array.
10711 (octave_value_typeinfo::lookup_type,
10712 octave_value_typeinfo::do_lookup_type): New functions.
10713 * ov-typeinfo.h: Provide decl.
10714 (octave_value_typeinfo::vals): New data member.
10715 (octave_value_typeinfo::octave_value_typeinfo): Initialize it.
10717 * ov.h (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Pass
10719 * ov.h (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Define register_type
10720 here. Also pass an empty object of the to-be-registered type to
10722 (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Declare register_type
10723 here, but don't define it.
10725 2003-11-21 John W. Eaton <jwe@bevo.che.wisc.edu>
10727 * ov-fcn-handle.h (octave_fcn_handle::octave_fcn_handle (void)):
10730 * ov-usr-fcn.h (octave_user_function::octave_user_function):
10731 Delete decl for private constructor.
10733 * ov-str-mat.cc (octave_char_matrix_str::matrix_value):
10734 Conversion to matrix is an error unless explicitly forced.
10736 * ov-str-mat.cc (octave_char_matrix_str::double_value): New function.
10737 * ov-str-mat.h: Provide decl.
10739 * ov-file.cc (print_raw): Use parens around ?: conditional used on
10740 RHS of << output operator.
10742 * c-file-ptr-stream.cc (c_file_ptr_buf::seekoff,
10743 c_file_ptr_buf::seekpos): Can't use fseek here, so just fail (by
10744 returning -1) until we have a better solution.
10746 * oct-stream.cc (octave_stream::tell): Return std::streamoff, not long.
10747 * oct-iostrm.cc (octave_base_iostream::tell): Likewise.
10748 * oct-stdstrm.cc (octave_stdiostream::tell): Likewise.
10749 * oct-strstrm.cc (octave_base_strstream::tell): Likewise.
10750 * oct-stream.h, oct-iostrm.h, oct-stdstrm.h, oct-strstrm.h:
10751 Fix decls to match.
10753 2003-11-20 John W. Eaton <jwe@bevo.che.wisc.edu>
10755 * ls-mat-ascii.cc (get_lines_and_columns): Delete second arg in
10756 call to istream::seekg.
10758 * ov-mapper.cc (MAPPER_LOOP_2, any_element_less_than,
10759 any_element_greater_than, octave_mapper::apply):
10762 2003-11-19 John W. Eaton <jwe@bevo.che.wisc.edu>
10764 * ls-mat5.cc (read_mat5_binary_element, save_mat5_binary_element):
10767 * lex.l (next_token_is_index_op): New function.
10768 (handle_close_bracket): Use it.
10770 * ls-hdf5.cc, ls-mat-ascii.cc, ls-mat4.cc, ls-mat5.cc,
10771 ls-oct-ascii.cc, ls-oct-binary.cc, ls-utils.cc, ls-hdf5.h,
10772 ls-mat-ascii.h, ls-mat4.h, ls-mat5.h, ls-oct-ascii.h,
10773 ls-oct-binary.h, ls-utils.h: New files, extracted from load-save.cc.
10774 * Makefile.in: Add them to the appropriate lists.
10776 2003-11-18 John W. Eaton <jwe@bevo.che.wisc.edu>
10778 * pr-output.cc (octave_print_internal): Don't indent rows for
10779 plus_format. Use pr_plus_format for Range type with plus_format.
10780 (plus_format_chars): New static variable.
10781 (set_format_style): Allow optional arg for plus format to set it.
10782 (pr_plus_format): Use it.
10784 * ov-bool.h (octave_bool::array_value,
10785 octave_bool::complex_array_value): New functions.
10787 * ov-base-mat.cc (octave_base_matrix<MT>::do_index_op):
10788 Ensure correct number of indices for Array indexing code.
10790 2003-11-17 John W. Eaton <jwe@bevo.che.wisc.edu>
10792 * DLD-FUNCTIONS/qz.cc (qz): Use x.data()+offset instead of &a(i,j).
10793 First and third args for dlag2 are const.
10795 * DLD-FUNCTIONS/sort.cc (Fsort): Use const qualifier as appropriate.
10797 * DLD-FUNCTIONS/balance.cc (balance): Use data() instead of
10798 fortran_vec where appropriate in call to dggbak.
10800 * DLD-FUNCTIONS/dasrt.cc (dasrt_user_j): Simplify inserting x and
10801 xdot in arg vector.
10802 (dasrt_user_f): Likewise.
10803 (dasrt_user_cf): Likewise.
10804 * DLD-FUNCTIONS/dassl.cc (dassl_user_function): Likewise.
10805 (dassl_user_jacobian): Likewise.
10806 * DLD-FUNCTIONS/lsode.cc (lsode_user_function): Likewise.
10807 (lsode_user_jacobian): Likewise.
10808 * DLD-FUNCTIONS/daspk.cc (daspk_user_function): Likewise.
10809 (daspk_user_jacobian): Likewise.
10811 2003-11-16 John W. Eaton <jwe@bevo.che.wisc.edu>
10813 * ov-range.h (octave_range::reshape): New function.
10815 2003-11-15 John W. Eaton <jwe@bevo.che.wisc.edu>
10817 * version.h (OCTAVE_VERSION): Now 2.1.51.
10818 (OCTAVE_API_VERSION): Now api-v2.
10820 * version.h (OCTAVE_BUGS_STATEMENT): Also tell people to look at
10821 http://www.octave.org/bugs.html.
10823 * oct-map.cc (Octave_map::assign): Use resize, not resize and fill.
10824 * ov-typeinfo.cc (octave_value_typeinfo::do_register_type): Likewise.
10826 * Cell.cc (Cell::Cell): Pass dim_vector to resize instead of two ints.
10828 2003-11-14 John W. Eaton <jwe@bevo.che.wisc.edu>
10830 * Makefile.in (stamp-liboctave-prereq): New target.
10831 ($(DEF_FILES), $(MAKEDEPS)): Depend on it.
10832 (distclean): Remove it.
10834 * parse.y (cancel_obj_idx): New rule.
10835 (postfix_expr, prefix_expr): Use begin_obj_idx after every
10836 postfix_expr on RHS. Use cancel_obj_idx as soon as possible for
10837 cases where we are not working on an index expression.
10839 * lex.l (maybe_unput_comma, handle_close_bracket):
10840 Don't insert comma if we are looking at an object index and the
10841 closest nesting level is a brace.
10843 * parse.y (postfix_expr): Use begin_obj_idx between postfix_expr
10844 and the indexing delimiter rather than after it.
10846 * lex.h (lexical_feedback::braceflag): New member variable.
10847 * lex.l (lexical_feedback::init): Initialize braceflag.
10848 (\{{S}*): Increment lexer_flags.braceflag, not
10849 lexer_flags.bracketflag.
10850 (handle_close_bracket): Handle lexer_flags.braceflag and
10851 lexer_flags.bracketflag separately based on bracket_type.
10852 Delete unnecesary yyinput/yyunput.
10854 * lex.l (next_token_is_postfix_unary_op): Also recognize ++ and --.
10856 * ov-typeinfo.cc (octave_value_typeinfo::register_type,
10857 octave_value_typeinfo::do_register_type):
10858 New arg, c_name for class name.
10859 * ov-base.cc, ov-bool-mat.cc, ov-bool.cc, ov-builtin.cc,
10860 ov-cell.cc, ov-ch-mat.cc, ov-colon.cc, ov-complex.cc,
10861 ov-cs-list.cc, ov-cx-mat.cc, ov-dld-fcn.cc, ov-fcn-handle.cc,
10862 ov-file.cc, ov-list.cc, ov-mapper.cc, ov-range.cc, ov-re-mat.cc,
10863 ov-scalar.cc, ov-str-mat.cc, ov-struct.cc, ov-usr-fcn.cc,
10864 ov-va-args.cc: Pass class name to DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA.
10865 * ov.h (octave_value::class_name): New virtual function.
10866 (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Define c_name, for class name.
10867 Pass c_name to octave_value_typeinfo::register_type.
10868 (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Declare static member
10869 c_name for class name. Provide class_name member function.
10871 * ov-typeinfo.cc (Fclass): New function.
10873 2003-11-13 John W. Eaton <jwe@bevo.che.wisc.edu>
10875 * utils.cc (Fisvarname): Pass correct name to make_argv.
10877 * ov-cell.cc (Fiscellstr): New function.
10879 * ov-file.h (octave_file::all, octave_file::any,
10880 octave_file::dims, octave_file::is_real_type,
10881 octave_file::ist_real_scalar): New functions.
10883 * lex.l (bracket_brace_paren_nesting_level::is_bracket_or_brace):
10885 (handle_close_bracket): New arg, bracket_type. Change all uses.
10886 First arg is now bool.
10887 (<MATRIX_START>{SNLCMT}*\}{S}*): New pattern.
10888 (maybe_unput_comma): Handle brace nesting level the same as brackets.
10889 (handle_close_brace): Likewise.
10890 (<MATRIX_START>{S}+): Likewise.
10891 (<MATRIX_START>{S}*{COMMENT}{SNLCMT}*): Likewise.
10892 (<MATRIX_START>{S}*{NL}{SNLCMT}*): Likewise.
10894 ({CCHAR}): Likewise.
10896 (\{{S}*): Handle the same as \[{S}*.
10897 ("}"): Handle the same as \].
10899 * Makefile.in (stamp-prereq): Add oct-gperf.h, parse.cc, and
10900 lex.cc to the list.
10902 2003-11-12 John W. Eaton <jwe@bevo.che.wisc.edu>
10904 * ov-cell.cc (print_as_scalar): New function.
10905 * ov-cell.h: Provide decl.
10907 * ov-cell.cc (octave_cell::print_name_tag): Delete.
10908 * ov-cell.h: Delete decl.
10910 * ov-base-mat.cc (octave_base_matrix::print_name_tag): Delete.
10911 * ov-base-mat.h: Delete decl.
10913 * ov-base.cc (octave_base_value::print_name_tag):
10914 Use print_as_scalar here.
10915 * ov.h (octave_base_value::print_as_scalar): New virtual function.
10916 * ov-base.h (octave_base_value::print_as_scalar):
10917 New default implementation.
10918 * ov-base-mat.h (octave_base_matrix::pirnt_as_scalar):
10919 Don't declare as virtual here.
10921 * ov-struct.cc (octave_struct::print_raw): If only printing keys,
10922 also print dimensions of fields and overall array.
10924 * sysdep.cc (Fnative_float_format): New function.
10926 * input.cc (generate_possible_completions): Also append all
10927 possible filename completions here.
10929 2003-11-11 John W. Eaton <jwe@bevo.che.wisc.edu>
10931 * oct-stream.cc: Explicitly instantiate octave_scan functions.
10933 * TEMPLATE-INST/Array-c.cc, TEMPLATE-INST/Array-os.cc,
10934 TEMPLATE-INST/Array-sym.cc, ov-typeinfo.cc:
10935 Use new INSTANTIATE_ARRAY macro.
10937 * data.cc (do_permute): New function.
10938 (Fpermute, Fipermute): Use it.
10940 * ov-base.cc (octave_base_value::permute): New function.
10941 * ov-base.h: Provide decl.
10943 * ov.h (octave_value::ipermute): New function.
10945 2003-11-11 Petter Risholm <risholm@stud.ntnu.no>
10947 * data.cc (Fpermute, Fipermute): New functions.
10948 * ov.h (octave_value::permute): New function.
10949 * ov-base-mat.h (octave_base_matrix::permute): New function.
10951 2003-11-10 John W. Eaton <jwe@bevo.che.wisc.edu>
10953 * oct-obj.h (octave_value_list): Internal representation is now
10954 std::vector instead of Array.
10956 * ov-list.h, ov-list.cc: Internal representation is now Cell, not
10958 (Flist): Print one-time warning.
10960 * ov.cc (octave_value::octave_value (const octave_value_list&, bool)):
10961 Cope with octave_cs_list not being derived from octave_list.
10963 * ov-cs-list.cc (octave_cs_list): Handle conversion of Cell array
10964 to octave_value_list here.
10966 * ov-cs-list.h (class octave_cs_list): Derive from
10967 octave_base_value, not octave_list.
10969 * ov-cs-list.h, ov-cs-list.cc: Remove commented-out code.
10971 * TEMPLATE-INST/Array-tc.cc (resize_fill_value): Use modern
10972 specialization syntax.
10974 * ov-cell.cc (octave_cell::print_raw): Use dim_vector::str.
10976 * Cell.cc, Cell.h, debug.cc, file-io.cc, load-save.cc,
10977 oct-fstrm.cc, oct-iostrm.cc, oct-iostrm.h, oct-map.cc, oct-map.h,
10978 oct-prcstrm.cc, oct-stdstrm.h, oct-stream.cc, oct-strstrm.h,
10979 octave.cc, ov-base.h, ov-cell.cc, ov.cc, ov.h, pt-cell.h,
10980 pt-mat.cc, pt-mat.h, pt-plot.cc, pt-stmt.cc, variables.cc,
10981 DLD-FUNCTIONS/rand.cc: Avoid -Wshadow warnings.
10983 2003-11-01 John W. Eaton <jwe@bevo.che.wisc.edu>
10985 * ov.h (octave_base_value::is_bool_matrix): New virtual function.
10986 * ov-base.h (octave_base_value::is_bool_matrix): New function.
10988 2003-10-31 John W. Eaton <jwe@bevo.che.wisc.edu>
10990 * ov.cc (octave_value::length): If any dim is zero, return 0.
10992 * ov-cell.cc (octave_cell::subsref): When indexing with '{', quit
10993 early if an error occurs in do_index_op.
10995 * ov.cc (octave_value::next_subsref): Don't do anything if
10996 error_state is true.
10998 * cutils.c (octave_usleep) [HAVE_SELECT]: Introduce new local
10999 scope for declaration of delay.
11000 [HAVE_POLL]: Likewise, for delay and pfd.
11002 * ov-base.cc (octave_base_value::bool_array_value):
11003 Function takes no args.
11004 * ov-base.h: Likewise, for decl.
11005 * ov-bool-mat.h (boolNDArray::bool_array_value): Likewise.
11007 * ov-fcn.cc, ov-fcn.h (octave_value::clone,
11008 octave_value::empty_clone): Return type is octave_value*, not
11011 2003-10-29 John W. Eaton <jwe@bevo.che.wisc.edu>
11013 * ov-str-mat.h (octave_char_matrix_str::reshape): New function.
11014 Force result to be a string.
11016 2003-10-29 Petter Risholm <risholm@stud.ntnu.no>
11018 * data.cc (DATA_REDUCTION): Work on NDArray and ComplexNDArray
11019 objects instead of Matrix and ComplexMatrix objects.
11021 2003-10-29 John W. Eaton <jwe@bevo.che.wisc.edu>
11023 * ov-bool-mat.h (octave_bool_matrix::NDArray,
11024 octave_bool_matrix::ComplexNDArray): New functions.
11026 * ov-complex.cc (octave_complex::array_value,
11027 octave_complex::complex_array_value): New functions.
11028 * ov-complex.h: Provide decls.
11030 * ov-scalar.cc (octave_scalar::array_value,
11031 octave_scalar::complex_array_value): New functions.
11032 * ov-scalar.h: Provide decls.
11034 * oct-map.cc (Octave_map::reshape): New function.
11035 * oct-map.h: Provide decl.
11037 * ov-struct.h (octave_struct::reshape): New function.
11039 * Cell.h (Cell:Cell (const Array<octave_value>&): New constructor.
11041 * data.cc (Freshape): New function.
11042 * ov.h (octave_value::reshape): New function.
11043 * ov-base-mat.h (octave_base_matrix::reshape): New function.
11044 * ov-base.cc (octave_base_value::reshape): New function.
11045 * ov-base.h: Provide decl.
11047 * DLD-FUNCTIONS/balance.cc: lscale and rscale args for dggbak are
11048 const. Use data() instead of fortran_vec where possible.
11049 * DLD-FUNCTIONS/qz.cc: Likewise.
11051 * data.cc (fill_matrix): Remove trailing singletons before
11052 allocating the result matrix.
11054 * input.cc (get_user_input): Don't forget about the diary here.
11056 2003-10-28 John W. Eaton <jwe@bevo.che.wisc.edu>
11058 * ov-list.h (octave_list::nelem): Delete.
11059 (octave_list::dims): New function.
11060 * ov-range.h (octave_list::dims): New function.
11061 * ov-struct.h (octave_struct::dims): New function.
11062 * ov-base-scalar.h (octave_base_scalar::dims): New function.
11064 * ov.h (octave_value::rows): No longer virtual.
11065 * ov.cc (octave_value::rows): Provide common implementation.
11066 * ov-base.h (octave_base_value::rows): Delete.
11067 * ov-base-mat.h (octave_base_matrix<T>::rows): Delete.
11068 * ov-base-scalar.h (octave_base_scalar<T>::rows): Delete.
11069 * ov-struct.h (octave_struct::rows): Delete.
11070 * ov-range.h (octave_range::rows): Delete.
11072 * ov.h (octave_value::columns): No longer virtual.
11073 * ov.cc (octave_value::columns): Provide common implementation.
11074 * ov-base.h (octave_base_value::columns): Delete.
11075 * ov-base-mat.h (octave_base_matrix<T>::columns): Delete.
11076 * ov-base-scalar.h (octave_base_scalar<T>::columns): Delete.
11077 * ov-struct.h (octave_struct::columns): Delete.
11078 * ov-range.h (octave_range::columns): Delete.
11080 * ov.h (octave_value::numel): No longer virtual.
11081 * ov.cc (octave_value::numel): Provide common implementation.
11082 * ov-base.h (octave_base_value::numel): Delete.
11083 * ov-base-mat.h (octave_base_matrix<T>::numel): Delete.
11084 * ov-base-scalar.h (octave_base_scalar<T>::numel): Delete.
11085 * ov-struct.h (octave_struct::numel): Delete.
11087 * ov-cs-list.h (octave_cs_list::dims): New function.
11088 (octave_cs_list::length): Delete.
11090 * ov.h (octave_value::ndims): No longer virtual.
11091 * ov.cc (octave_value::ndims): Provide common implementation.
11092 * ov-base.h (octave_base_value::ndims): Delete.
11093 * ov-base-mat.h (octave_base_matrix<T>::ndims): Delete.
11094 * ov-base-scalar.h (octave_base_scalar<T>::ndims): Delete.
11095 * ov-struct.h (octave_struct::ndims): Delete.
11097 * ov-cell.cc (Fcell): Make it work for N-d cells.
11099 * Cell.h (Cell::Cell (const dim_vector&, const octave_value&)):
11102 * ov.h (octave_value::length): No longer virtual.
11103 * ov.cc (octave_value::length): Provide common implementation.
11104 * ov-base.h (octave_base_value::length): Delete.
11105 * ov-base-mat.h (octave_base_matrix<T>::length): Delete.
11106 * ov-base-scalar.h (octave_base_scalar<T>::length): Delete.
11107 * ov-struct.h (octave_struct::length): Delete.
11108 * ov-cs-list.h (octave_cs_list::length): Delete.
11109 * ov-list.h (octave_list::length): Delete.
11110 * ov-range.h (octave_range::length): Delete.
11112 * load-save.cc (save_mat5_binary_element): Use numel instead of
11114 * ov-struct.cc (octave_struct::print_raw): Likewise.
11115 * pt-loop.cc (tree_complex_for_command::eval): Likewise.
11116 * oct-map.cc (Octave_map::numel): New function.
11117 * oct-map.h: Provide decl.
11119 * oct-map.cc, oct-map.h (Octave_map::array_length): Delete.
11120 (common_size): New static function.
11121 (Octave_map::assign): Make resizing work for N-d cell objects.
11123 * oct-map.cc (Octave_map::dims): New function.
11124 * oct-map.h: Provide decl.
11126 * pr-output.cc (print_empty_nd_array): New static function.
11127 (PRINT_ND_ARRAY): Use it.
11129 * ov.h (octave_value::is_empty): No longer virtual. Return value
11131 * data.cc (Fisempty): Use it.
11132 (Fnumel): New function.
11134 * ov.h (octave_value::numel): New function.
11135 * ov-base.h (octave_base_value::numel): Likewise.
11136 * ov-base-mat.h (octave_base_matrix<T>::numel): Likewise.
11137 * ov-base-scalar.h (octave_base_scalar<T>::numel): Likewise.
11139 2003-10-27 Petter Risholm <risholm@stud.ntnu.no>
11141 * ov-base-mat.cc (octave_base_matrix<MT>::is_true):
11142 Only work for 2-dimensional objects.
11143 * data.cc (ANY_ALL (FCN)): Allow dim to take values large than 2.
11145 * ov.h (octave_value::ndims): New function.
11146 * ov-base.h (octave_base_value::ndims): Likewise.
11147 * ov-base-scalar.h (octave_base_scalar<T>::ndims): Likewise.
11148 * ov-base-mat.cc (octave_base_matrix<MT>::ndims): New function.
11149 (octave_base_matrix<MT>::length): Move here from ov-base-mat.h.
11150 Make it work for N-d arrays.
11151 * ov-base-mat.h (octave_base_matrix<MT>::ndims): Provide decl.
11152 * data.cc (Fndims): New built-in function.
11154 2003-10-27 John W. Eaton <jwe@bevo.che.wisc.edu>
11156 * DLD-FUNCTIONS/balance.cc, DLD-FUNCTIONS/qz.cc:
11157 Use new F77 arg macros in declarations of external Fortran
11158 subroutines and for calling them.
11160 * ops.h (DEFNDUNOP_OP, DEFNDUNOP_FN): New arg e, to name value
11161 extractor function prefix.
11162 * OPERATORS/op-bm-bm.cc, OPERATORS/op-cm-cm.cc, OPERATORS/op-m-m.cc:
11165 * ov-cx-mat.h (octave_complex_matrix::complex_array_value,
11166 octave_char_matrix::char_array_value,
11167 octave_bool_matrix::bool_array_value): Rename from array_value.
11168 * OPERATORS/op-bm-bm.cc, OPERATORS/op-cm-cm.cc,
11169 OPERATORS/op-cm-cs.cc, OPERATORS/op-cm-m.cc,
11170 OPERATORS/op-cm-s.cc, OPERATORS/op-cs-cm.cc,
11171 OPERATORS/op-m-cm.cc, OPERATORS/op-m-m.cc,
11172 OPERATORS/op-s-cm.cc: Use complex_array, char_array, and
11173 bool_array as appropriate (instead of just array).
11175 * ov-base.cc (octave_base_value::array_value,
11176 octave_base_value::bool_array_value,
11177 octave_base_value::complex_array_value,
11178 octave_base_value::char_array_value): Provide default implementations.
11179 * ov-base.h: Provide decls.
11181 * ov.h (octave_value::array_value, octave_value::bool_array_value,
11182 octave_value::complex_array_value, octave_value::char_array_value):
11183 New virtual functions.
11185 2003-10-25 John W. Eaton <jwe@bevo.che.wisc.edu>
11187 * pt-idx.cc (make_subs_cell): Pass dim_vector object to resize.
11189 * ov-typeinfo.cc (octave_value_typeinfo::do_register_type):
11190 Use resize_and_fill for types.
11192 * oct-obj.h (octave_value_list::maybe_resize): Use resize_and_fill.
11193 (octave_value_list::resize (int, const octave_value&)): Likewise.
11195 * oct-map.cc (Octave_map::assign): Use resize_and_fill as needed.
11197 * Cell.h (Cell (void)): Default size is now 0x0.
11199 2003-10-23 John W. Eaton <jwe@bevo.che.wisc.edu>
11201 * OPERATORS/op-cm-m.cc, OPERATORS/op-cm-s.cc,
11202 OPERATORS/op-cs-m.cc, OPERATORS/op-m-cm.cc, OPERATORS/op-s-cm.cc:
11203 Include headers for N-d operators.
11205 2003-10-17 John W. Eaton <jwe@bevo.che.wisc.edu>
11207 * ops.h (DEFNDUNOP_OP, DEFNDUNOP_FN, DEFNDBINOP_OP,
11208 DEFNDBINOP_FN): New N-dimensional macros.
11209 * OPERATORS/op-bm-bm.cc, OPERATORS/op-cm-cm.cc,
11210 OPERATORS/op-cm-cs.cc, OPERATORS/op-cm-m.cc,
11211 OPERATORS/op-cm-s.cc, OPERATORS/op-cs-cm.cc,
11212 OPERATORS/op-cs-m.cc, OPERATORS/op-m-cm.cc,
11213 OPERATORS/op-m-cs.cc, OPERATORS/op-m-m.cc,
11214 OPERATORS/op-m-s.cc, OPERATORS/op-s-cm.cc,
11215 OPERATORS/op-s-m.cc: Use N-dimensional macros as appropriate.
11217 * DLD-FUNCTIONS/rand.cc (do_rand, Frand, Frandn):
11218 Handle N-dimensions.
11220 * xpow.cc (elem_xpow (double, const NDArray&),
11221 elem_xpow (double, const ComplexNDArray&),
11222 elem_xpow (const NDArray&, double),
11223 elem_xpow (const NDArray&, const NDArray&),
11224 elem_xpow (const NDArray&, const Complex&),
11225 elem_xpow (const NDArray&, const ComplexNDArray&),
11226 elem_xpow (const Complex&, const NDArray&),
11227 elem_xpow (const Complex&, const ComplexNDArray&),
11228 elem_xpow (const ComplexNDArray&, double),
11229 elem_xpow (const ComplexNDArray&, const NDArray&),
11230 elem_xpow (const ComplexNDArray&, const Complex&),
11231 elem_xpow (const ComplexNDArray&, const ComplexNDArray&):
11233 * xpow.h: Provide decls.
11235 * xdiv.cc (x_el_div (double, const NDArray&),
11236 x_el_div (double, const ComplexNDArray&),
11237 x_el_div (const Complex, const NDArray&),
11238 x_el_div (const Complex, const ComplexNDArray&)): New functions.
11239 * xdiv.h: Provide decls.
11241 * ov-bool-mat.h (boolNDArray::array_value): New function.
11242 * ov-ch-mat.h (charNDArray::array_value): New function.
11243 * ov-cx-mat.h (ComplexNDArray::array_value): New function.
11244 * ov-re-mat.h (NDArray::array_value): New function.
11245 (NDArray::double_nd_array_value): Delete.
11247 2003-10-16 John W. Eaton <jwe@bevo.che.wisc.edu>
11249 * parse.y (text_getc): New static function.
11250 (gobble_leading_white_space): Use it to simplify EOL processing.
11252 2003-10-15 John W. Eaton <jwe@bevo.che.wisc.edu>
11254 * file-io.cc (fopen_mode_to_ios_mode): Ignore "t" in mode string.
11256 * strfns.cc (Fischar): rename from Fisstr.
11258 2003-10-09 John W. Eaton <jwe@bevo.che.wisc.edu>
11260 * pr-output.cc (PRINT_ND_ARRAY): New macro.
11261 (octave_print_internal): Use it.
11263 2003-10-08 John W. Eaton <jwe@bevo.che.wisc.edu>
11265 * ov.cc (octave_value::octave_value (const ArrayN<octave_value>&,
11266 bool)): New constructor.
11267 * ov.h: Provide decl.
11269 * ov.h (octave_value::squeeze): New virtual function.
11270 * ov-base.cc (squeeze): Provide default implementation.
11271 * ov-base-mat.h (octave_base_matrix::squeeze): New function.
11272 * data.cc (Fsqueeze): New function.
11274 2003-10-03 John W. Eaton <jwe@bevo.che.wisc.edu>
11276 * load-save.cc (make_valid_identifier): Return new string.
11277 Arg is now string, not char *.
11278 (ident_is_all_digits): New function.
11279 (hdf5_read_next_data): Use it.
11281 2003-10-02 John W. Eaton <jwe@bevo.che.wisc.edu>
11283 * input.cc (input_event_hook): Clear the event hook if hook_fcn
11284 does not name a valid function.
11286 2003-10-01 John W. Eaton <jwe@bevo.che.wisc.edu>
11288 * mappers.cc (xabs): New function.
11289 (install_mapper_functions): Use it instead of abs for complex args
11290 in Octave's abs mapper function.
11292 2003-09-27 Joseph P. Skudlarek <Jskud@Jskud.com>
11294 * DLD-FUNCTIONS/minmax.cc (min, max): Use @deftypefn machinery,
11295 doc missing semantics, and add more examples to texinfo strings.
11297 2003-09-26 John W. Eaton <jwe@bevo.che.wisc.edu>
11299 * load-save.cc (read_mat5_binary_element): Return early if the
11300 miMATRIX element has length zero.
11302 2003-09-24 John W. Eaton <jwe@bevo.che.wisc.edu>
11304 * ov-cell.cc (octave_cell::subsasgn): Also attempt empty
11305 conversion after extracting single element from cell array to
11306 allow things like x{i}.elt = rhs to work.
11308 2003-09-19 John W. Eaton <jwe@bevo.che.wisc.edu>
11310 * ov.h (octave_value::dim_vector): New function.
11312 * ov.h, ov.cc (octave_value::octave_value (const Cell&)):
11313 New arg, is_cs_list.
11314 (octave_value::octave_value (const NDArray&)):
11315 Create octave_matrix object, not octave_double_nd_array object.
11316 (octave_value::octave_value (const ComplexNDArray&),
11317 octave_value::octave_value (const boolNDArray&),
11318 octave_value (const charNDArray&, bool)): New constructors.
11320 * ov.h, ov.cc (octave_value::nil_rep): New function.
11321 (octave_value::octave_value (void)): Use it to initialize empty
11322 octave_value objects.
11324 * ov-list.h, ov-list.cc (octave_list::octave_list (const Cell&)):
11326 * ov-cs-list.h (octave_cs_list::octave_cs_list (const Cell&)):
11329 * data.cc (Fsize): Handle N-d objects.
11331 * pr-output.cc (octave_print_internal): New versions for NDArray,
11332 ComplexNDArray, boolNDArray, and charNDArray objects.
11333 * pr-output.h: Provide decls.
11335 * ov-re-nd-array.h, ov-re-nd-array.cc: Delete.
11337 * Cell.h, Cell.cc, ov-base-mat.h, ov-base-mat.cc, ov-bool-mat.h,
11338 ov-bool-mat.cc, ov-ch-mat.h, ov-ch-mat.cc, ov-cx-mat.h,
11339 ov-cx-mat.cc, ov-re-mat.h, ov-re-mat.cc, ov-str-mat.h,
11340 ov-str-mat.cc: Now N-dimensional.
11342 * oct-map.h, oct-map.cc: Now based on Cell ojects instead of
11343 octave_value_list objects. Change all uses.
11345 * TEMPLATE-INST/Array-tc.cc: Also instantiate ArrayN objects.
11346 Don't instantiate assign funcitons for Array2 objects.
11348 2003-09-11 John W. Eaton <jwe@bevo.che.wisc.edu>
11350 * pt-plot.cc (symbols_of_pt_plot): Default for automatic replot is
11353 * pr-output.cc (Fformat): Doc fix.
11354 (current_output_max_field_width, current_output_precision):
11356 (float_format::float_format (int, int, int)): Use them to provide
11357 default values for field width and precision.
11358 (print_g): New static variable.
11359 (set_real_format, set_real_matrix_format, set_complex_format)
11360 (set_complex_matrix_format, set_range_format): Handle print_g.
11361 (pr_float, pr_complex): Don't scale if using print_g.
11362 (set_format_style): Accept new "g" and "G" modifiers for short and
11363 long formats and set print_g.
11364 Set default precision and width for short to 5, 10.
11365 Set default precision and width for long to 15, 20.
11367 2003-09-10 John W. Eaton <jwe@bevo.che.wisc.edu>
11369 * OPERATORS/op-m-cs.cc (complex_matrix_conv): Delete function.
11370 (install_m_cs_ops): Don't install complex_matrix_conv here.
11372 * OPERATORS/op-s-cs.cc (complex_matrix_conv): Delete function.
11373 (install_s_cs_ops): Don't install complex_matrix_conv here.
11375 * OPERATORS/op-s-s.cc (matrix_conv): Delete function.
11376 (install_s_s_ops): Don't install matrix_conv here.
11378 * OPERATORS/op-cs-s.cc (complex_matrix_conv): Delete function.
11379 (install_cs_s_ops): Don't install complex_matrix_conv here.
11381 * OPERATORS/op-cs-m.cc (complex_matrix_conv): Delete function.
11382 (install_cs_m_ops): Don't install complex_matrix_conv here.
11384 * OPERATORS/op-cs-cs.cc (complex_matrix_conv): Delete function.
11385 (install_cs_cs_ops): Don't install complex_matrix_conv here.
11387 * ov-typeinfo.cc (do_register_unary_op,
11388 do_register_non_const_unary_op, do_register_binary_op,
11389 do_register_assign_op, do_register_assignany_op,
11390 do_register_pref_assign_conv, do_register_widening_op):
11391 Print warning if installing a duplicate function.
11393 2003-09-10 Petter Risholm <risholm@stud.ntnu.no>
11395 * data.cc, ov-base.cc, ov-base.h, ov.h, ov.cc, ov-re-mat.h,
11396 ov-scalar.h, ov-re-nd-array.h, ov-re-nd-array.cc: Use NDArray, not
11399 2003-09-09 John W. Eaton <jwe@bevo.che.wisc.edu>
11401 * ov.h (octave_value::double_nd_array_value): New function.
11402 (octave_value::is_real_nd_array): New function.
11404 * ov-base.cc (octave_base_value::double_nd_array_value): New function.
11405 * ov-base.h: Provide decl.
11406 (octave_base_value::is_real_nd_array): New function.
11408 2003-09-09 Petter Risholm <risholm@stud.ntnu.no>
11410 * ov-re-mat.h (octave_matrix::double_nd_array_value): New function.
11411 * ov-scalar.h (octave_scalar::double_nd_array_value): New function.
11413 * ov-re-nd-array.cc (octave_double_nd_array::assign): New function.
11414 (octave_double_nd_array::try_narrowing_conversion): Likewise.
11415 (octave_double_nd_array::valid_as_scalar_index): Likewise.
11416 (octave_double_nd_array::double_value): Likewise.
11417 (octave_double_nd_array::matrix_value): Likewise.
11418 (octave_double_nd_array::complex_value): Likewise.
11419 (octave_double_nd_array::convert_slice_to_matrix): Likewise.
11420 * ov-re-nd-array.h: Provide decls.
11421 (octave_double_nd_array::is_real_nd_array): New function.
11422 (octave_double_nd_array::double_nd_array_value): New function.
11423 (octave_double_nd_array::double_nd_array_value): New function.
11425 * OPERATORS/op-m-nd.cc, OPERATORS/op-nd-m.cc,
11426 OPERATORS/op-nd-nd.cc, OPERATORS/op-nd-s.cc, OPERATORS/op-s-nd.cc:
11428 * Makefile.in (OP_XSRC): Add them to the list.
11430 2003-09-09 David Bateman <dbateman@free.fr>
11432 * OPERATORS/op-cs-s.cc (DEFBINOP): First arg is complex, second is
11435 2003-09-05 John W. Eaton <jwe@bevo.che.wisc.edu>
11437 * pt-cell.cc (tree_cell::rvalue): Don't assume that the number of
11438 elements in a tree_argument_list is the same as the number of
11439 objects it contains (cs-list objects expand to more than one).
11441 * pt-mat.cc (tm_row_const::tm_row_const_rep::do_init_element):
11442 New function, extracted from tm_row_const::tm_row_const_rep::init.
11443 (tm_row_const::tm_row_const_rep::init): Use it.
11444 Also handle cs-list objects.
11446 * ov-cs-list.cc (octave_cs_list::print_raw): New function.
11447 * ov-cs-list.h (octave_cs_list::print_raw): Provide decl.
11448 * ov-list.h (octave_list::lst): Now protected instead of private.
11450 2003-09-04 John W. Eaton <jwe@bevo.che.wisc.edu>
11452 * pt-plot.cc (subplot_style::columns_ok): Allow boxes style to
11453 have 2 columns as well.
11455 2003-08-28 John W. Eaton <jwe@bevo.che.wisc.edu>
11457 * dirfns.cc (Fls): Check EAGAIN to avoid losing output.
11458 * toplev.cc (run_command_and_return_output): Likewise.
11460 2003-08-25 John W. Eaton <jwe@bevo.che.wisc.edu>
11462 * OPERATORS/op-str-s.cc, OPERATORS/op-str-m.cc: New files.
11463 * Makefile.in (OP_XSRC): Add them to the list.
11465 2003-08-22 John W. Eaton <jwe@bevo.che.wisc.edu>
11467 * defaults.cc (maybe_add_or_del_packages): Use source_file instead
11468 of parse_and_execute.
11469 * parse.y (source_file): New function.
11471 * parse.h (source_file): Provide decl.
11473 2003-08-21 John W. Eaton <jwe@bevo.che.wisc.edu>
11475 * utils.cc (octave_vsnprintf): Copy va_list to avoid using more
11478 2003-08-07 John W. Eaton <jwe@bevo.che.wisc.edu>
11480 * utils.cc (octave_vsnprintf): Call octave_raw_vsnprintf instead
11481 of calling vsnprintf directly.
11482 (octave_vsnprintf) [HAVE_C99_VSNPRINTF]: Declare nchars to be size_t.
11484 2003-08-06 Heine Kolltveit <kolltvei@idi.ntnu.no>
11486 * utils.cc (check_dimensions(Array<int>&, char),
11487 get_dimensions(octave_value&, char, Array<int>&): New functions.
11488 * utils.h (check_dimensions (Array<int>&, char),
11489 get_dimensions (octave_value&, char, Array<int>&)): Provide decl.
11491 * data.cc (fill_matrix): Also create N-d arrays.
11492 (Fones, Fzeros): Handle more than 2 args to create N-d arrays.
11494 2003-07-30 John W. Eaton <jwe@bevo.che.wisc.edu>
11496 * data.cc (make_diag): Use std::abs instead of our own ABS macro.
11498 * utils.cc (identity_matrix): Move here from data.cc.
11499 (identity_matrix): Use std::min instead of our own MIN macro.
11501 * utils.h (identity_matrix): Provide decl.
11503 * DLD-FUNCTIONS/svd.cc (Fsvd): Improve handling of empty matrix arg.
11505 * ov.cc (octave_value(const ArrayN<Complex>&)): New constructor.
11506 * ov.h (octave_value(const ArrayN<Complex>&)): Provide decl.
11508 2003-07-30 Heine Kolltveit <kolltvei@idi.ntnu.no>
11510 * ov.cc (octave_value(const ArrayN<double>&)): New constructor.
11511 * ov.h (octave_value(const ArrayN<double>&)): Provide decl.
11513 2003-07-30 John W. Eaton <jwe@bevo.che.wisc.edu>
11515 * ov.h (Vpropagate_empty_matrices): Delete decl.
11516 * ov.cc: (Vpropagate_empty_matrices): Delete.
11517 (propagate_empty_matrices): Delete.
11518 (symbols_of_ov): Delete DEFVAR for propagate_empty_matrices.
11520 * utils.cc (empty_arg): Behave as though propagate_empty_matrices
11522 * ov-range.cc (octave_range::is_true): Likewise.
11523 * ov-base-mat.cc (octave_base_matrix<MT>::is_true): Likewise.
11525 * octave.cc (maximum_braindamage): Also set
11526 warn_matlab_incompatible to TRUE.
11528 * lex.l (Vwhitespace_in_literal_matrix): Delete.
11529 (whitespace_in_literal_matrix): Delete.
11530 (symbols_of_lex): Delete DEFVAR for whitespace_in_literal_matrix.
11531 (<MATRIX_START>{S}*\,{S}*, <MATRIX_START>{S}+,
11532 (<MATRIX_START>{S}*{COMMENT}{SNLCMT}*,
11533 <MATRIX_START>{S}*{NL}{SNLCMT}*, maybe_unput_comma): Behave as though
11534 old Vwhitespace_in_literal_matrix varaible is always 1.
11536 * octave.cc (maximum_braindamage): Don't set
11537 whitespace_in_literal_matrix.
11539 2003-07-29 John W. Eaton <jwe@bevo.che.wisc.edu>
11541 * Makefile.in (install-lib): Use $(INSTALL), not
11542 $(INSTALL_PROGRAM) for $(SHLLIB) files.
11544 2003-07-29 Paul Kienzle <pkienzle@users.sf.net>
11546 * Makefile.in: Don't need special system.c for Cygwin.
11547 * oct-procbuf.cc: Use popen rather than fork/exec for Windows.
11549 2003-07-28 Paul Kienzle <pkienzle@users.sf.net>
11551 * sysdep.cc (CYGWIN_init): Convert TMPDIR to system agnostic path.
11553 2003-07-25 Paul Kienzle <pkienzle@users.sf.net>
11555 * help.cc (try_info, display_help_text):
11556 Protect spaces in filenames with quotes.
11557 * oct-hist.cc (do_edit_history): Likewise.
11558 * pt-plot.cc (open_plot_stream): Likewise.
11560 2003-07-15 John W. Eaton <jwe@bevo.che.wisc.edu>
11562 * oct-stream.cc (get_size, octave_base_stream::error,
11563 octave_base_stream::do_gets, octave_base_stream::getl,
11564 octave_base_stream::gets, octave_base_stream::do_scanf,
11565 octave_base_stream::scanf, octave_base_stream::do_oscanf,
11566 octave_base_stream::oscanf, do_printf_conv,
11567 octave_base_stream::do_printf, octave_base_stream::printf,
11568 octave_base_stream::puts, octave_base_stream::invalid_operation,
11569 octave_stream::getl, octave_stream::gets, octave_stream::scanf,
11570 octave_stream::oscanf, octave_stream::printf, octave_stream::puts,
11571 octave_stream::invalid_stream_error): Handle name of calling
11572 function for error messages as a std::string object. Change all
11575 * file-io.cc (Fprintf, Fputs): New functions, so we can get
11576 function prefixes on error messages right.
11577 (Ffgetl, Ffgets, Ffprintf, Fsprintf, Fputs, Ffscanf, Fsscanf):
11578 Pass name of calling function to octave_stream method.
11580 * oct-stream.h (octave_base_stream::do_char_scanf,
11581 octave_base_stream::do_real_scanf): Delete unused decls.
11583 * load-save.cc (read_mat5_binary_element): Correctly read struct
11586 * pt-misc.cc (tree_parameter_list::initialize_undefined_elements):
11587 New args, warnfor and nargout. Change all callers.
11588 (symbols_of_pt_misc): New function.
11589 (warn_undefined_return_values): New function.
11591 * octave.cc (maximum_braindamage): Don't set
11592 define_all_return_values.
11594 * ov-usr-fcn.cc (ov_user_function::do_multi_index_op): Always
11595 intiialize undefined elements in ret_list to [].
11596 Never return last computed value.
11597 (Vreturn_last_computed_value, Vdefine_all_return_values): Delete.
11598 (return_last_computed_value, define_all_return_values): Delete.
11599 (symbols_of_ov_usr_fcn): Delete DEFVARs for
11600 return_last_computed_value, define_all_return_values, and
11601 default_return_value.
11603 2003-07-14 John W. Eaton <jwe@bevo.che.wisc.edu>
11605 * pt-misc.cc (tree_parameter_list::convert_to_const_vector):
11606 Don't skip undefined elements.
11608 2003-07-13 John W. Eaton <jwe@bevo.che.wisc.edu>
11610 * octave.cc (maximum_braindamage): Don't set
11611 default_global_variable_value or initialize_global_variables.
11613 * pt-decl.cc (Vinitialize_global_variables): Delete.
11614 (initialize_global_variables): Delete.
11615 (symbols_of_pt_decl): Delete.
11616 (tree_global_command::do_init): Default initial value is now
11619 2003-07-11 John W. Eaton <jwe@bevo.che.wisc.edu>
11621 * octave.cc (maximum_braindamage): Don't set default_eval_print_flag.
11623 * parse.y (Vdefault_eval_print_flag): Delete:
11624 (default_eval_print_flag): Delete.
11625 (symbols_of_parse): Delete DEFVAR for default_eval_print_flag.
11626 (Feval, Fevalin): Return empty octave_value_list and turn printing
11627 on in eval_string if nargout is zero.
11629 * ov-list.cc (octave_list::assign): Check
11630 Vwarn_resize_on_range_error, not Vresize_on_range_error.
11632 * ov.cc (Vwarn_resize_on_range_error): New variable.
11633 (warn_resize_on_range_error): New function.
11634 (symbols_of_ov): Add DEFVAR for warn_resize_on_range_error.
11636 * ov.cc (Vresize_on_range_error): Delete.
11637 (resize_on_range_error): Delete.
11638 (symbols_of_ov): Delete DEFVAR for resize_on_range_error.
11640 * pt-mat.cc (Vwarn_empty_list_elements): New variable.
11641 (warn_empty_list_elements): New function.
11642 (symbols_of_pt_mat): Add DEFVAR for warn_empty_list_elements.
11643 (tm_row_const::tm_row_const_rep::init, tm_const::init):
11644 Check Vwarn_empty_list_elements, not Vempty_list_elements_ok.
11646 * pt-mat.cc (Vempty_list_elements_ok): Delete.
11647 (empty_list_elements_ok): Delete.
11648 (symbols_of_pt_mat): Delete DEFVAR for empty_list_elements_ok.
11650 2003-07-11 Russell Standish <R.Standish@unsw.edu.au>
11652 * TEMPLATE-INST/Array-tc.cc (resize_fill_value): Provide
11655 2003-07-10 John W. Eaton <jwe@bevo.che.wisc.edu>
11657 * strfns.cc (Fchar): Force string conversions without warnings.
11659 * ov.h (octave_value::convert_to_str, octave_value::all_strings,
11660 octave_value::string_value, octave_value:convert_to_str_internal):
11661 New arg, force. Fix all derived classes to match.
11663 * strfns.cc (Fchar): Temporarily reset Vwarn_num_to_str to avoid
11666 * ov.cc (convert_to_str): New arg, force.
11668 * octave.cc (maximum_braindamage): Don't set treat_neg_dim_as_zero.
11670 * utils.cc (Vwarn_neg_dim_as_zero): New variable.
11671 (warn_neg_dim_as_zero): New function.
11672 (symbols_of_utils): Add DEFVAR for warn_neg_dim_as_zero.
11673 (check_dimensions): Check Vwarn_neg_dim_as_zero, not
11674 Vtreat_neg_dim_as_zero.
11676 * utils.cc (Vtreat_neg_dim_as_zero): Delete.
11677 (treat_neg_dim_as_zero): Delete.
11678 (symbols_of_utils): Delete DEFVAR for treat_neg_dim_as_zero.
11680 2003-07-09 John W. Eaton <jwe@bevo.che.wisc.edu>
11682 * octave.cc (maximum_braindamage): Don't set prefer_column_vectors.
11684 * ov.cc (Vprefer_column_vectors): Delete.
11685 (prefer_column_vectors): Delete.
11686 (symbols_of_ov): Delete DEFVAR for prefer_column_vectors.
11688 * octave.cc (maximum_braindamage): Don't set do_fortran_indexing.
11690 * ov-re-mat.cc (octave_matrix::double_value,
11691 octave_matrix::complex_value): Use Vwarn_fortran_indexing, not
11692 Vdo_fortran_indexing.
11693 * ov-range.cc (octave_range::double_value,
11694 octave_range::complex_value): Likewise.
11695 * ov-cx-mat.cc (octave_complex_matrix::double_value,
11696 octave_complex_matrix::complex_value): Likewise.
11697 * ov-ch-mat.cc (octave_char_matrix::double_value,
11698 octave_char_matrix::complex_value): Likewise.
11699 * ov-bool-mat.cc (octave_bool_matrix::double_value,
11700 octave_bool_matrix::complex_value): Likewise.
11702 * ov.cc (Vwarn_fortran_indexing): New variable.
11703 (warn_fortran_indexing): New function.
11704 (symbols_of_ov): Add DEFVAR for warn_fortran_indexing.
11705 (octave_value::vector_value, octave_value::int_vector_value,
11706 (octave_value::complex_vector_value): Check
11707 Vwarn_fortran_indexing, not Vdo_fortran_indexing.
11709 * ov.h (Vwarn_fortran_indexing): Provide decl.
11711 * ov.cc (Vdo_fortran_indexing): Delete unused variable.
11712 (do_fortran_indexing): Delete unused function.
11713 (symbols_of_ov): Delete DEFVAR for do_fortran_indexing.
11714 * ov.h (Vdo_fortran_indexing): Delete decl.
11716 * ov.cc (octave_value::convert_to_str): Call convert_to_str_internal.
11717 (octave_value::convert_to_str_internal): New virtual function.
11718 Rename all derived class convert_to_str functions to match.
11720 * variables.cc (generate_struct_completions): Set
11721 discard_warning_messages, not Vwarning_option. Also protect
11724 * parse.y (fold): Temporarily discard warning messages.
11725 Also protect warning_state.
11727 * error.cc (discard_warning_messages): New variable.
11728 (vwarning): Use it.
11729 (warning): Don't print backtrace if discard_warning_messages is true.
11731 * ov.cc (octave_value::convert_to_str):
11732 Handle type conversion warning here.
11734 * gripes.cc (gripe_implicit_conversion):
11735 New function accepting std::string args.
11737 * octave.cc (maximum_braindamage): Don't set
11738 implicit_num_to_str_ok or implicit_str_to_num_ok.
11740 * ov-base.cc (octave_base_value::char_matrix_value):
11741 Vimplicit_num_to_str_ok no longer exists.
11742 (octave_base_value::all_strings): Likewise.
11743 (octave_base_value::string_value): Likewise.
11745 * ov-str-mat.cc (octave_char_matrix_str::matrix_value): Warn based
11746 on Vwarn_str_to_num instead of Vimplicit_str_to_num_ok.
11748 * ov.cc (Vwarn_num_to_str, Vwarn_str_to_num): New variables.
11749 (warn_num_to_str, warn_str_to_num): New functions.
11750 (symbols_of_ov): Add DEFVARs for warn_num_to_str and Vwarn_str_to_num.
11751 * ov.h (Vwarn_num_to_str, Vwarn_str_to_num): Provide decl.
11753 * ov.cc (Vimplicit_num_to_str_ok, Vimplicit_str_to_num_ok):
11754 Delete unused variables.
11755 (implicit_num_to_str_ok, implicit_str_to_num_ok):
11756 Delete unused functions.
11757 (symbols_of_ov): Delete DEFVARs for implicit_num_to_str_ok and
11758 implicit_str_to_num_ok.
11759 * ov.h (Vimplicit_num_to_str_ok, Vimplicit_str_to_num_ok):
11762 * pt-mat.cc (tree_matrix::rvalue): Vimplicit_num_to_str_ok no
11765 * ov.cc (Vwarn_imag_to_real): New variable.
11766 (warn_imag_to_real): New function.
11767 (symbols_of_ov): Add DEFVAR for warn_imag_to_real.
11768 * ov.h (Vwarn_imag_to_real): Provide decl.
11770 * ov.cc (Vok_to_lose_imaginary_part): Delete unused variable.
11771 (ok_to_lose_imaginary_part): Delete unused function.
11772 (symbols_of_ov): Delete DEFVAR for ok_to_lose_imaginary_part.
11773 * ov.h (Vok_to_lose_imaginary_part): Delete decl.
11775 * ov-complex.cc (octave_complex::double_value): Warn based on
11776 Vwarn_imag_to_real instead of Vok_to_lose_imaginary_part.
11777 (octave_complex::matrix_value): Likewise.
11778 * ov-cx-mat.cc (octave_complex_matrix::double_value): Likewise.
11779 (octave_complex_matrix::matrix_value): Likewise.
11781 * octave.cc (maximum_braindamage): Don't set ok_to_lose_imaginary_part.
11783 2003-07-08 John W. Eaton <jwe@bevo.che.wisc.edu>
11785 * sighandlers.cc (sig_hup_or_term_handler): New function.
11786 (install_signal_handlers): Install sig_hup_or_term_handler for
11787 SIGHUP and SIGTERM instead of generic_sig_handler.
11788 (Vsighup_dumps_octave_core, Vsigterm_dumps_octave_core):
11789 New static variables.
11790 (sighup_dumps_octave_core, sigterm_dumps_octave_core):
11791 New static functions.
11792 (symbols_of_sighandlers): Add DEFVARs for sighup_dumps_octave_core
11793 and sigterm_dumps_octave_core.
11795 * defaults.h.in (OCTAVE_LOCALAPIFCNFILEDIR, OCTAVE_LOCALAPIOCTFILEDIR):
11796 Subsitute new variables.
11798 * defun.cc (check_version): Compare version to OCTAVE_API_VERSION,
11799 not OCTAVE_VERSION. Mismatch is now fatal.
11800 * defun-int.h (DEFINE_FUN_INSTALLER_FUN3): Pass
11801 OCTAVE_API_VERSION instead of OCTAVE_VERSION to check_version.
11802 * version.h (OCTAVE_API_VERSION): New macro, initial value api-v1.
11804 * defaults.cc (Vdefault_exec_path): New static variable.
11805 (set_default_default_exec_path): New function.
11806 (install_defaults): Call it.
11807 (exec_path): Use it.
11808 (default_exec_path): New function.
11809 (symbols_of_defaults): Add DEFVAR for DEFAULT_EXEC_PATH.
11811 2003-07-07 John W. Eaton <jwe@bevo.che.wisc.edu>
11813 * defaults.h.in (OCTAVE_LOCALSTARTUPFILEDIR, OCTAVE_STARTUPFILEDIR):
11814 Set values directly instead of constructing them.
11816 2003-06-28 Arno J. Klaassen <arno@heho.snv.jussieu.fr>
11818 * toplev.cc (octave_config_info): Key for OCTAVE_CONF_DEFS should
11819 be DEFS, not UGLY_DEFS.
11821 2003-06-27 John W. Eaton <jwe@bevo.che.wisc.edu>
11823 * version.h (OCTAVE_VERSION): Now 2.1.50.
11825 2003-06-26 John W. Eaton <jwe@bevo.che.wisc.edu>
11827 * variables.cc (symbol_exist): Distinguish between user and dld
11828 functions loaded in memory.
11830 2003-06-24 John W. Eaton <jwe@bevo.che.wisc.edu>
11832 * pt-mat.cc (tm_row_const::init, tm_const::init): Don't ignore
11833 empty matrices that have one non-zero dimension.
11835 * variables.cc (symbol_exist): Use dir_path::find_first_of to
11836 search for .oct and .m files.
11838 * ov-base.cc (octave_base_value::subsasgn): Also allow type
11839 conversion for empty numeric objects with more than one index.
11840 * ov-base-mat.cc (octave_base_matrix<T>::subsasgn): Likewise.
11842 2003-06-23 John W. Eaton <jwe@bevo.che.wisc.edu>
11844 * variables.cc (do_who): New arg, return_list. If return_list is
11845 true, return values in cell or struct arrays instead of printing.
11846 (Fwho, Fwhos): If nargout is 1, ask do_who to return lists of values.
11847 * oct-map.h (Octave_map (const std::string&, const octave_value_list&):
11850 2003-06-19 John W. Eaton <jwe@bevo.che.wisc.edu>
11852 * pt-idx.cc (tree_index_expression::rvalue):
11853 Correctly handle index expressions like x(end).f(end).
11854 (tree_index_expression::lvalue): Likewise.
11856 * pt-arg-list.cc (F__end__): Add nr, nc info to error messages.
11858 2003-06-18 John W. Eaton <jwe@bevo.che.wisc.edu>
11860 * pr-output.cc (set_format (const Matrix&, int&, double&)): Ask
11861 any_element_is_negative to return true for negative zero as well.
11862 (set_format (const ComplexMatrix&, int&, int&, double&)): Likewise.
11864 2003-06-16 John W. Eaton <jwe@bevo.che.wisc.edu>
11866 * toplev.cc (main_loop): Set octave_interrupt_hook and
11867 octave_bad_alloc_hook to unwind_protect::run_all here.
11868 (recover_from_exception): Don't call unwind_protect::run_all here.
11870 * pt-except.cc (do_catch_code): Return immediately if
11871 octave_interrupt_immediately is nonzero.
11873 * sighandlers.cc (sigint_handler): If jumping, don't set
11874 octave_interrupt_state.
11876 2003-06-14 John W. Eaton <jwe@bevo.che.wisc.edu>
11878 * load-save.cc (get_save_type): Avoid all save types other than
11879 LS_DOUBLE to avoid apparent Matlab bugs.
11881 2003-06-13 John W. Eaton <jwe@bevo.che.wisc.edu>
11883 * parse.y (frob_function, parse_fcn_file): Handle help_buf as
11885 * lex.l ({CCHAR}): Handle help_buf as stack of strings.
11886 Store text returned from grab_help_text in help_buf here.
11887 (reset_parser): Handle help_buf as stack of strings.
11888 (prep_for_nested_function): Push empty string onto help_buf stack.
11889 (grab_help_text): Return help text instead of storing it in help_buf.
11890 * parse.h, parse.y (help_buf): Now a stack of strings.
11892 * oct-stream.cc (printf_value_cache::string_value): Don't attempt
11893 to extract values when none are available.
11895 2003-06-04 John W. Eaton <jwe@bevo.che.wisc.edu>
11897 * pt-plot.cc (Vgnuplot_has_multiplot): Delete variable.
11898 (gnuplot_has_multiplot): Delete.
11899 (symbols_of_pt_plot): Delete DEFVAR for gnuplot_has_multiplot.
11901 2003-05-28 John W. Eaton <jwe@bevo.che.wisc.edu>
11903 * version.h (OCTAVE_VERSION): Now 2.1.49.
11905 2003-05-28 Teemu Ikonen <tpikonen@pcu.helsinki.fi>
11907 * load-save.cc (save_mat5_binary_element, save_mat_binary_data):
11908 Allow saving of non-7-bit ASCII characters.
11910 2003-05-28 John W. Eaton <jwe@bevo.che.wisc.edu>
11912 * oct-stream.cc (FINISH_CHARACTER_CONVERSION,
11913 octave_base_stream::do_scanf): Do a better job of resizing for
11914 charachter conversions.
11916 2003-05-25 John W. Eaton <jwe@bevo.che.wisc.edu>
11918 * ov-cx-mat.cc (octave_complex_matrix::assign): Move definition here.
11919 * ov-cx-mat.h: From here.
11921 2003-05-24 John W. Eaton <jwe@bevo.che.wisc.edu>
11923 * ov-range.cc (octave_range::try_narrowing_conversion): Convert to
11924 [](1x0) instead of [](0x0) if range is empty.
11926 2003-05-14 John W. Eaton <jwe@bevo.che.wisc.edu>
11928 * Makefile.in: Handle DESTDIR.
11930 2003-05-13 John W. Eaton <jwe@bevo.che.wisc.edu>
11932 * lex.l: Use yyunput (X, yytext) instead of unput (X) for newer
11935 2003-05-06 John W. Eaton <jwe@bevo.che.wisc.edu>
11937 * version.h (OCTAVE_VERSION): Now 2.1.48.
11939 2003-05-02 John W. Eaton <jwe@bevo.che.wisc.edu>
11941 * version.h (OCTAVE_VERSION): Now 2.1.47.
11943 2003-05-01 John W. Eaton <jwe@bevo.che.wisc.edu>
11945 * load-save.cc (save_ascii_data): If saving a range with
11946 non-integer base, limit, or increment, save as matrix instead.
11947 (get_save_type): Avoid unsigned types.
11949 2003-04-30 John W. Eaton <jwe@bevo.che.wisc.edu>
11951 * octave.cc (initialize_pathsearch): Don't save old and set new
11954 * toplev.cc (restore_texmfdbs_envvar): Delete function.
11955 (Fsystem): Don't set and reset TEXMFDBS.
11957 * toplev.h, toplev.cc (octave_original_texmfdbs): Delete variable.
11959 2003-04-25 John W. Eaton <jwe@bevo.che.wisc.edu>
11961 * DLD-FUNCTIONS/getpwent.cc (Fgetpwnam): Delete unnecessary
11964 2003-04-22 John W. Eaton <jwe@bevo.che.wisc.edu>
11966 * file-io.cc: Include <memory> for auto_ptr.
11968 2003-04-18 John W. Eaton <jwe@bevo.che.wisc.edu>
11970 * toplev.cc (octave_config_info): Delete LIBKPATHSEA from struct.
11971 * oct-conf.h.in: Don't substitute LIBKPATHSEA.
11973 * octave.cc (octave_main): Don't call dir_path::set_program_name.
11975 2003-04-17 John W. Eaton <jwe@bevo.che.wisc.edu>
11977 * ov-file.h (octave_file::empty_clone): Create an octave_scalar
11978 object, not an octave_file object.
11980 2003-04-01 John W. Eaton <jwe@bevo.che.wisc.edu>
11982 * load-save.cc (hdf5_read_next_data): Extract list before
11983 assigning to map element.
11984 (add_hdf5_data): Prefix faked names with '_' so they are valid
11987 2003-03-24 Mats Jansson <mats.e.jansson@home.se>
11989 * syscalls.cc (Fkill): Fixed docstring typo.
11991 2003-03-18 John W. Eaton <jwe@bevo.che.wisc.edu>
11993 * ov-cell.h (octave_cell::is_matrix_type): New function.
11995 2003-03-09 Duncan Temple Lang <duncan@research.bell-labs.com>
11997 * octave.cc (octave_main): New arg, embedded.
11998 * octave.h: Fix decl.
11999 * main.c: Pass 0 for embedded here.
12001 2003-03-03 John W. Eaton <jwe@bevo.che.wisc.edu>
12003 * version.h (OCTAVE_VERSION): Now 2.1.46.
12005 * oct-conf.h.in: Undo previous change.
12007 * load-save.cc (read_mat5_binary_element): Handle structure arrays.
12008 (save_mat5_binary_element): Likewise.
12010 2003-03-01 John W. Eaton <jwe@bevo.che.wisc.edu>
12012 * ov-cell.cc (octave_cell::subsasgn): Use make_unique in
12013 appropriate places to preserve copy on write semantics.
12015 * oct-conf.h.in: Substitute OCTAVE_CONF_KPATHSEA_INCFLAGS.
12017 * oct-stdstrm.h (octave_stdiostream::output_stream): Return stream
12018 if mode is out, not in.
12020 2003-02-22 John W. Eaton <jwe@bevo.che.wisc.edu>
12022 * strfns.cc (Fchar): New function.
12024 * ov-cell.cc (octave_cell::all_strings): Allow elements to be
12026 * ov.cc (octave_value::all_strings, octave_value::convert_to_str):
12027 New optional arg, pad. Change all derived classes.
12029 * ov-struct.cc (Ffieldnames, Fisfield): Move here from data.cc.
12031 * data.cc (Ffieldnames): Rename from Fstruct_elements. Return
12032 cell array instead of a string array.
12033 (Fisfield): Rename from struct_contains.
12035 2003-02-22 Paul Kienzle <pkienzle@users.sf.net>
12037 * toplev.cc: Put config info in array of strings, then convert to map.
12039 2003-02-22 John W. Eaton <jwe@bevo.che.wisc.edu>
12041 * variables.cc (symbol_exist): For names like foo.bar, don't omit
12042 the part after the dot.
12044 2003-02-21 John W. Eaton <jwe@bevo.che.wisc.edu>
12046 * octave.cc (fun_to_call): New static variable.
12047 (octave_main): Pass it to main_loop.
12048 (long_opts): Accept --funcall.
12049 (usage_string, verbose_usage): Add --funcall.
12051 * toplev.cc (main_loop): New arg, fun_to_call. If non-empty,
12052 evaluate this function before continuing.
12054 2003-02-21 Paul Kienzle <pkienzle@users.sf.net>
12056 * file-io.cc (Fmkstemp): Use OCTAVE_LOCAL_BUFFER instead of using
12057 std::auto_ptr directly.
12059 2003-02-21 John W. Eaton <jwe@bevo.che.wisc.edu>
12061 * ov.h, ov.cc (octave_value (long long int)): New constructor.
12062 (octave_value (unsigned long long int)): Likewise.
12064 * oct-obj.h (octave_value_list::operator delete): Handle systems
12065 with or without placement delete.
12067 2003-02-21 Paul Kienzle <pkienzle@users.sf.net>
12069 * utils.cc (octave_vsnprintf): Return value of vsnprintf is int,
12070 not size_t. Make sure there is some space left in the buffer for
12071 vsnprintf versions which return the number of characters written
12072 even when the buffer is too short.
12074 2003-02-20 John W. Eaton <jwe@bevo.che.wisc.edu>
12076 * debug.cc (get_user_function): Use dynamic_cast, not static_cast.
12078 * ov-usr-fcn.cc (octave_user_function::traceback_error): Now const.
12080 * ov.cc (octave_value (const octave_fcn_handle&)): New constructor.
12081 (octave_value::fcn_handle_value): New virtual function.
12082 * ov-base.cc (octave_value::fcn_handle_value): Provide default.
12083 * ov-usr-fcn.cc (octave_user_function::stash_fcn_file_name): New
12084 arg, nm. Change all callers.
12085 * ov-fcn.h (octave_function::is_nested_function): New virtual function.
12086 * parse.y (get_feval_args): New function.
12087 (feval (octave_function *, const octave_value_list&, int)): Likewise.
12088 (feval (const octave_value_list&, int)): Allow the first arg to be
12089 a function handle as well as a string.
12090 * variables.cc (load_function): New function.
12091 * pt-walk.h, pt-pr-code.h, pt-pr-code.cc, pt-check.h, pt-check.cc,
12092 pt-bp.h, pt-bp.cc: Handle new tree_fcn_handle class.
12093 * pt-all.h: Include pt-fcn-handle.h.
12094 * pt-fcn-handle.h, pt-fcn-handle.cc, ov-fcn-handle.h,
12095 ov-fcn-handle.cc: New files.
12097 2003-02-19 John W. Eaton <jwe@bevo.che.wisc.edu>
12099 * parse.y (FCN_HANDLE): New token type.
12100 (fcn_handle): New non-terminal.
12101 (primary_expr): Also accept fcn_handle.
12102 (tree_fcn_handle_type): New %type.
12103 (union): New field, tree_fcn_handle_type.
12104 (make_fcn_handle): New function.
12106 * lex.l (@{IDENT}): Recognize function handle syntax.
12107 (@): Don't recognize "@" as a single token.
12109 * load-save.cc (struct hdf5_callback_data): Provide constructor.
12110 (hdf5_callback_data::name, hdf5_callback_data::doc): Now
12111 std::string instead of char*. Change all uses.
12113 2003-02-18 Roger Banks <rbanks@colsa.com>
12115 * load-save.cc (read_ascii_data, read_ascii_data,
12116 read_mat5_binary_element, save_mat5_binary_element,
12117 save_ascii_data): Handle cell arrays.
12118 (write_mat5_cell_array): New function.
12120 2003-02-18 John W. Eaton <jwe@bevo.che.wisc.edu>
12122 * Makefile.in (DLD_XSRC): Delete log.cc from the list.
12123 Add sqrtm.cc to the list.
12125 * DLD-FUNCTIONS/log.cc: Delete.
12127 2003-02-18 Paul Kienzle <pkienzle@users.sf.net>
12129 * DLD-FUNCTIONS/sqrtm.cc: New file.
12131 2003-02-18 David Bateman <dbateman@free.fr>
12133 * DLD-FUNCTIONS/lu.cc (Flu): Allow non-square matrices.
12135 2003-02-17 John W. Eaton <jwe@bevo.che.wisc.edu>
12137 * load-save.cc (read_binary_file_header, do_load, do_save,
12138 write_header): No longer static.
12139 (load_save_format): Move enum decl to load-save.h.
12141 2003-02-15 John W. Eaton <jwe@bevo.che.wisc.edu>
12143 * oct-stdstrm.h, oct-stdstrm.cc (octave_base_stdiostream,
12144 octave_iostdiostream, octave_istdiostram, octave_ostdiostream):
12145 Combine all functionality into one class, octave_stdiostream.
12148 * file-io.cc (Ftmpfile, Fmkstemp): New functions.
12149 * oct-stdstrm.h (octave_iostdiostream): New class.
12150 (octave_istdiostream::octave_istdiostream,
12151 octave_istdiostream::create,
12152 octave_ostdiostream::octave_ostdiostream, octave_ostdiostream::create,
12153 octave_iostdiostream::octave_iostdiostream,
12154 octave_iostdiostream::create): Make close function the last arg.
12157 * c-file-ptr-stream.h (io_c_file_ptr_stream): New class.
12159 2003-02-14 John W. Eaton <jwe@bevo.che.wisc.edu>
12161 * octave.cc (maximum_braindamage): Set boolean built-in variables
12162 to true and false instead of 1.0 and 0.0.
12163 (octave_main): Likewise.
12164 * error.cc (Fwarning): Likewise.
12166 * pager.cc (Fmore): Make the no-arg case work too.
12168 * ov-str-mat.h (octave_char_matrix_str::is_real_type,
12169 octave_char_matrix_str::is_matrix_type,
12170 octave_char_matrix_str::is_numeric_type): Always return false.
12172 2003-02-13 John W. Eaton <jwe@bevo.che.wisc.edu>
12174 * lex.l (<CCHAR>): If we are parsing a command, reset start state.
12175 Use BEGIN (INITIAL) instead of BEGIN 0. Use parens around start
12176 state in BEGIN statements.
12178 2003-02-13 Paul Kienzle <pkienzle@users.sf.net>
12180 * variables.cc (Fmlock, Fmunlock, Fmislocked): New functions.
12182 * variables.cc (mlock, munlock, mislocked): New functions.
12183 * variables.h: Provide decls.
12185 * symtab.h (symbol_record::unmark_static): New function.
12187 2003-02-12 John W. Eaton <jwe@bevo.che.wisc.edu>
12189 * error.cc (reset_error_handler): New function.
12190 * toplev.cc (main_loop): Use it here.
12191 * lex.l (reset_parser): Don't set error_state and warning_state here.
12192 * parse.y (eval_string): Reset parser before calling yyparse.
12194 2003-01-29 John W. Eaton <jwe@bevo.che.wisc.edu>
12196 * data.cc (Ffmod): New function.
12198 * c-file-ptr-stream.cc (c_file_ptr_buf::underflow_common): New
12200 * c-file-ptr-stream.h (c_file_ptr_buf::underflow,
12201 c_file_ptr_buf::uflow): Use it.
12202 (c_file_ptr_buf): Derive from std::streambuf, not OCTAVE_STD_FILEBUF.
12203 Don't cache file descriptor.
12205 2003-01-28 John W. Eaton <jwe@bevo.che.wisc.edu>
12207 * DLD-FUNCTIONS/minmax.cc: Move min and max functions from here to
12208 liboctave/dMatrix.cc and liboctave/CMatrix.cc.
12210 2003-01-24 John W. Eaton <jwe@bevo.che.wisc.edu>
12212 * DLD-FUNCTIONS/rand.cc: Rewrite to use new octave_rand functions.
12214 2003-01-23 John W. Eaton <jwe@bevo.che.wisc.edu>
12216 * oct-stream.cc (octave_base_stream::do_printf): Handle values
12217 outside the range of integers in int conversions for
12218 compatibilitiy wtih Matlab.
12220 2003-01-22 John W. Eaton <jwe@bevo.che.wisc.edu>
12222 * load-save.cc (get_mat_data_input_line): Handle lines with CR
12225 * oct-stream.cc (octave_base_stream::do_printf): Handle Inf and
12226 NaN in int conversions for compatibility with Matlab.
12228 * data.cc (symbols_of_data): Doc fix for realmin.
12230 * cutils.c (octave_raw_vsnprintf): New function.
12231 * utils.cc (octave_snprintf): Move here from cutils.c.
12232 (octave_Vsnprintf): Likewise. Allow octave_raw_vsnprintf to be
12234 * utils.h (octave_vsnprintf, octave_snprintf): No longer extern "C".
12236 2003-01-21 John W. Eaton <jwe@bevo.che.wisc.edu>
12238 * pt-loop.cc (tree_complex_for_command::eval): Fix typo.
12240 2003-01-16 Mumit Khan <khan@nanotech.wisc.edu>
12242 * mk-oct-links: Use $SED if set.
12243 * mkbuiltins: Likewise.
12244 * mkdefs: Likewise.
12245 * mkdocs: Likewise.
12246 * mkgendoc: Likewise.
12249 2003-01-11 Paul Kienzle <pkienzle@users.sf.net>
12251 * Makefile.in (gendoc$(BUILD_EXEEXT)): Pass $(BUILD_CXXFLAGS) and
12252 $(BUILD_LDFLAGS) to compiler.
12254 2003-01-11 John W. Eaton <jwe@bevo.che.wisc.edu>
12256 * parse.y (Fassignin): New function.
12258 2003-01-10 John W. Eaton <jwe@bevo.che.wisc.edu>
12260 * sighandlers.cc (make_sig_struct): New function.
12261 (symbols_of_sighandlers): Add DEFCONST for SIG struct.
12263 * syscalls.cc (Fkill): New function.
12265 2003-01-06 John W. Eaton <jwe@bevo.che.wisc.edu>
12267 * oct-stream.cc (get_size): If only one dimension is specified and
12268 it is zero, also set the other dimension to zero instead of one.
12270 2003-01-04 John W. Eaton <jwe@bevo.che.wisc.edu>
12272 * sysdep.cc [__DECCXX]: Add a kluge for some missing template
12275 2003-01-03 John W. Eaton <jwe@bevo.che.wisc.edu>
12277 * ov-usr-fcn.cc (octave_vr_val): Assert vr_list != 0, not vr_list.
12278 * variables.cc (builtin_string_variable, builtin_any_variable,
12279 builtin_real_scalar_variable, bind_builtin_variable): Likewise.
12281 * TEMPLATE-INST/Array-tc.cc: Provide specialization of
12282 Array<octave_value>::resize_fill_value before instantiation of
12283 Array<octave_value>.
12285 * oct-obj.h (octave_value_list::operator delete): Define version
12286 of delete operator to correspond to placement new operator.
12288 * mkgendoc: In generated code, define __USE_STD_IOSTREAM if using
12291 * Makefile.in (distclean): Also remove doc-files and gendoc.cc.
12293 * input.cc (initialize_command_input): Use const for
12294 initialization of char * from literal string.
12296 * pt-plot.cc (subplot::extract_plot_data): Call single_subsref,
12298 * ov.h, ov.cc (single_subsref (const std::string&, const
12299 octave_value_list&)): Rename from subsref.
12301 * symtab.cc (symbol_table::rename): Explicitly convert C string to
12302 std::string so type of second arg of ?: matches third.
12303 (symbol_table::lookup): Likewise.
12305 * mappers.cc: Remove std:: qualifiers from C library names.
12307 2003-01-03 John W. Eaton <jwe@bevo.che.wisc.edu>
12309 * pt-exp.h (tree_expression::has_magic_end): New pure virtual function.
12310 * pt-id.h (tree_identifier::has_magic_end): New function.
12311 * pt-colon.h (tree_colon_expression::has_magic_end): Likewise.
12312 * pt-idx.h (tree_index_expression::has_magic_end): Likewise.
12313 * pt-const.h (tree_constant::has_magic_end): Likewise.
12314 * pt-unop.h (tree_unary_expression::has_magic_end): Likewise.
12315 * pt-binop.h (tree_binary_expression::has_magic_end): Likewise.
12316 * pt-assign.h (tree_multi_assignment::has_magic_end): Likewise.
12317 (tree_simple_assignment::has_magic_end): Likewise.
12318 * pt-mat.cc (tree_matrix::has_magic_end): Likewise.
12319 * pt-arg-list.cc (tree_argument_list::has_magic_end): Likewise.
12321 * pt-arg-list.cc (tree_argument_list::append): Check all
12322 expression types for magic end token..
12324 * file-io.cc (Ftmpnam): Improve error checking.
12325 (symbols_of_file_io): Move definition of P_tmpdir here from dirfns.cc.
12327 * dirfns.cc (symbols_of_dirfns): Install new built-in constant
12330 2003-01-02 John W. Eaton <jwe@bevo.che.wisc.edu>
12332 * dirfns.cc (symbols_of_dirfns): New function.
12333 Install new built-in constant filesep.
12335 * utils.cc (Fisvaranme): New function.
12336 (valid_identifier): Identifiers can't start with digits! Doh!
12338 * lex.l (Fiskeyword): New function.
12340 * Makefile.in (INCLUDES): Don't forget base-list.h.
12342 * symtab.cc (symbol_record::define): If definition already exists,
12343 redefine it instead of replacing it.
12345 * variables.cc (symbol_exist): Don't use reference when handling
12348 * pt-plot.cc (save_in_tmp_file): octave_value arg is now const.
12349 * pt-misc.cc (tree_parameter_list::initialize_undefined_elements):
12352 * symtab.cc (symbol_record::clear): Don't do anything if the
12353 symbol record is already undefined.
12355 2003-01-01 John W. Eaton <jwe@bevo.che.wisc.edu>
12357 * pt-arg-list.cc (tree_argument_list::append): New function.
12358 (tree_argument_list::convert_to_const_vector): Don't save and
12359 set pointer to indexed object if list_includes_magic_end is false.
12360 * pt-arg-list.h (tree_argument_list::append): Provide decl.
12361 (tree_argument_list::list_includes_magic_end): New data member.
12362 (tree_argument_list::tree_argument_list): Initialize it.
12364 * ov-base.cc (octave_base_value::char_matrix_value,
12365 octave_base_value::all_strings, octave_base_value::string_value):
12366 Attempt conversions here if Vimplicit_num_to_num_ok is true.
12368 * ov.cc (Vimplicit_num_to_str_ok): Move here from pt-mat.cc and
12370 * ov.h: Provide decl.
12372 * oct-stream.cc (printf_value_cache::looking_at_string): Delete.
12373 (printf_value_cache::string_value): Just attempt conversion.
12374 (octave_base_stream::do_printf): When doing '%s' format,
12375 just attempt converstion.
12377 * file-io.cc (Ffread): Allow size to be omitted even when
12378 additional arguments are given.
12380 2002-12-31 John W. Eaton <jwe@bevo.che.wisc.edu>
12382 * pt-arg-list.cc (F__end__): Fail if rows or columns is negative.
12383 (tree_argument_list::convert_to_const_vector): Only protect and
12384 save pointer to the indexed object if it is a constant.
12386 * syscalls.cc (Fmkfifo): Use long_value instead of cast.
12388 * ov.h (octave_value::short_value, octave_value::ushort_value,
12389 octave_value::uint_value, octave_value::long_value,
12390 octave_value::ulong_value): New functions.
12392 * syscalls.cc (mk_stat_map, Fgetegid, getgid, geteuid): Likewise.
12393 Delete unnecessary casts.
12394 * file-io.cc (Ffgetl, Ffgets, Fftell, Fsscanf): Likewise.
12395 * toplev.cc (Fsystem): Likewise.
12397 * ov-file.h (octave_file::double_value, octave_file::scalar_value):
12398 Delete unnecessry cast.
12400 * ov.cc (octave_value::octave_value): Add constructors for
12401 octave_time, short int, unsigned short int, unsigned int, long
12402 int, unsigned long int,
12404 * ov.h (octave_value::do_subsref (const std::string&, const
12405 octave_value_list&)): Rename from subsref. Change all derived classes.
12407 * input.cc (generate_completion): Delete unused variable prefix_len.
12409 * ov.h (DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA): Delete volatile
12410 qualifier for decls of static_type_id and t_id.
12411 (DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA): Likewise, for def of t_id.
12413 2002-12-30 John W. Eaton <jwe@bevo.che.wisc.edu>
12415 * utils.cc (Ffile_in_path): Index args correctly.
12417 * utils.cc (Ffile_in_path): Call error, not print_usage, for
12418 invalid option error.
12419 (Ffile_in_loadpath): Likewise.
12421 * load-save.cc: Use OCTAVE_LOCAL_BUFFER instead of local automatic
12422 arrays or using new/delete.
12424 * lex.l (.): Try another approach to handling EOF here.
12426 * load-save.cc (read_mat_ascii_data): Use isalpha and isalnum, not
12427 ::isalpha and ::isalnum.
12429 * defaults.cc (maybe_add_or_del_packages): SCRIPT_FILE arg is now
12430 a const reference type.
12432 * ov.h (octave_value::subsref, octave_value::subsasgn,
12433 octave_value::assign, octave_value::do_non_const_unary_op,
12434 octave_value::numeric_assign): TYPE arg is now a const reference
12435 type. Change all derived classes.
12437 * ov.cc (octave_value::subsref (const std::string&, const
12438 octave_value_list&)): Move body here, from ov.h.
12440 * octave.cc (octave_main): Return 0 at end of function to avoid
12443 2002-12-30 Paul Kienzle <pkienzle@users.sf.net>
12445 * parse.y: Fix typo in doc string.
12447 2002-12-29 John W. Eaton <jwe@bevo.che.wisc.edu>
12449 * DLD-FUNCTIONS/lpsolve.cc (Flpsolve): Rename from Flp_solve.
12450 (Flpsolve_options): Rename ffrom Flp_solve_options.
12452 2002-12-27 John W. Eaton <jwe@bevo.che.wisc.edu>
12454 * parse.y (Fevalin): New function.
12456 * variables.cc (curr_caller_sym_tab): New global variable.
12457 * variables.h: Provide decl.
12458 (initialize_symbol_tables): Initialize it.
12459 * ov-usr-fcn.cc (octave_user_function::do_multi_index_op):
12460 Protect and set it here.
12462 2002-12-26 John W. Eaton <jwe@bevo.che.wisc.edu>
12464 * utils.cc (search_path_for_file): Second arg now string_vector.
12465 Use find_first_of, not find.
12466 (search_path_for_all_files): Second arg now string_vector.
12467 Use find_all_first_of, not find_all.
12468 (Ffile_in_path): Accept cell array of strings as first argument.
12469 (Ffile_in_loadpath): Likewise.
12471 * dynamic-ld.cc (octave_dynamic_loader::load): New arg, file_name.
12472 (octave_dynamic_loader::do_load): Likewise. If file_name is not
12473 empty, use it instead of searching in path.
12475 * parse.y (load_fcn_from_file): Use find_first_of to perform search.
12477 * ov-cell.cc (octave_cell::all_strings): New function.
12478 * ov-cell.h: Provide decl.
12480 2002-12-25 John W. Eaton <jwe@bevo.che.wisc.edu>
12482 * parse.y (function_end): If parsing a nested function, set
12483 lexer_flags.parsing_nested_function to -1.
12484 (frob_function): If lexer_flags.parsing_nested_function is
12485 negative, set it to zero.
12486 * lex.h (lexical_feedback::parsing_nested_function): Now int.
12487 Change uses as needed.
12489 * lex.l (NESTED_FUNCTION_BEGIN): Rename from NESTED_FUNCTION_START.
12490 Now an exclusive start state.
12491 (NESTED_FUNCTION_END): New exclusive start state.
12492 (is_keyword): When matching a new function keyword in a nested
12493 function context, explicitly return END and set start state to
12494 NESTED_FUNCTION_END.
12495 (.): Accept EOF here too.
12497 * variables.cc (link_to_builtin_or_function): Maybe prepend parent
12498 function name symbol name.
12500 * parse.y (parent_function_name): New variable.
12501 (fcn_name): New non-terminal.
12502 (function2): Use it.
12503 (parsed_fcn_name): Fold into fcn_name.
12504 (function_end): Don't call check_for_garbage_after_fcn_def.
12505 Set lexer_flags.parsing_nested_function on EOF.
12506 * parse.h: Provide decl for parent_function_name.
12508 * ov-usr-fcn.h (octave_user_function::mark_as_nested_function,
12509 (octave_user_funciton::is_nested_function): New functions.
12510 (octave_user_function::nested_function): New data member.
12511 (octave_user_function::do_multi_index_op): Maybe protect and set
12512 curr_parent_function pointer.
12513 * parse.y (frob_function): Maybe mark as nested function.
12515 * toplev.cc (curr_parent_function): New global variable.
12516 * toplev.h: Provide decl.
12518 * lex.l (check_for_garbage_after_fcn_def): Delete.
12519 * lex.h: Delete decl.
12521 * lex.l (prep_for_nested_function): New function.
12522 (<NESTED_FUNCTION_START>): Use it here.
12523 (is_keyword): And here.
12524 (lookup_identifier): Maybe prepend parent function name.
12526 * variables.cc (initialize_symbol_tables): Give names to the three
12527 main symbol tables.
12528 * symtab.cc (symbol_table::lookup, symbol_table::rename): Print
12529 debugging info if Vdebug_symtab_lookups is nonzero.
12530 (debug_symtab_lookups): New function.
12531 (Vdebug_symtab_lookups): New static varaible.
12532 (symbols_of_symtab): DEFVAR it.
12533 * symtab.h (symbol_table::table_name): New member variable.
12534 (symtab_count): New static member variable.
12535 (symbol_table::symbol_table): Handle table name.
12537 2002-12-24 John W. Eaton <jwe@bevo.che.wisc.edu>
12539 * parse.y (frob_function): Don't give nested functions the same
12540 name as the function file.
12542 * lex.h (lexical_feedback::parsing_nested_function): New data member.
12543 * lex.l (lexical_feedback::init): Initialize it to false.
12544 (<NESTED_FUNCTION_START>): Set lexer_flags.parsing_nested_function
12547 * parse.y (symtab_context): Now a stack. Change all uses.
12549 * lex.l (NESTED_FUNCTION_START): New start state to handle
12550 "function" keyword in a nested function context.
12551 (prep_for_function): New function.
12552 (is_keyword): Allow functions to be nested in function files.
12554 * lex.l (is_keyword): Maybe ignore END tokens.
12555 Increment and decrement end_tokens_expected as appropriate.
12556 (handle_identifier): If is_keyword returns -1, return immediately.
12557 ({IDENT}{S}*): Do nothing if handle_identifier returns -1.
12559 * parse.y (end_tokens_expected): New variable.
12560 (parse_fcn_file): Protect and set it.
12562 * parse.y (begin_obj_idx): Increment
12563 lexer_flags.looking_at_object_index.
12564 (postfix_expr): Decrement it as appropriate here.
12566 * lex.h (lexical_feedback::looking_at_object_index): Now int.
12568 * parse.y (postfix_expr): Reset lexer_flags.looking_at_object_index
12569 in () and {} cases too.
12571 2002-12-21 John W. Eaton <jwe@bevo.che.wisc.edu>
12573 * pt-arg-list.cc (indexed_object, indexed_position):
12574 New file-scope static variables.
12575 (tree_argument_list::convert_to_const_vector): New arg, object.
12576 Protect and set indexed_object and indexed_position.
12577 (F__end__): New function.
12579 * octave-lvalue.h (octave_lvalue::object): New member function.
12580 * pt-idx.cc (make_value_list): New arg, object. Change all
12581 callers. Pass object to convert_to_const_vector.
12583 * lex.h (lexical_feedback.looking_at_object_index): New data member.
12584 * lex.l (lexical_feedback::init): Initialize it.
12585 (is_keyword): If looking at object index, end is not a keyword.
12586 (handle_identifier): If end is not a keyword, transform it to __end__.
12587 * parse.y (begin_obj_idx): New non-terminal.
12588 (postfix_expr): Use it.
12590 * defun.cc (install_builtin_function): New arg, can_hide_function.
12591 * defun-int.h: Fix decl.
12592 (DEFCONSTFUN_INTERNAL): New macro.
12593 * defun.h (DEFCONSTFUN): New macro.
12594 * mkbuiltins (XDEFCONSTFUN_INTERNAL): New macro.
12595 * mkgendoc: Likewise.
12596 * Makefile.in (DEFUN_PATTERN): Make it work for DEFCONSTFUN too.
12597 * symtab.h (symbol_record::can_hide_function): New data member.
12598 (symbol_record::symbol_record): Initialize it.
12599 * symtab.cc (symbol_record::variable_reference): Also check
12600 can_hide_function flag.
12602 2002-12-20 John W. Eaton <jwe@bevo.che.wisc.edu>
12604 * DLD-FUNCTIONS/time.cc (extract_tm): Use int_value() instead of
12605 casting double_value() to int.
12607 * ov.cc (octave_value::next_subsref): Arg "skip" is now size_t.
12609 * oct-obj.h (octave_value_list::octave_value_list (double),
12610 octave_value_list::octave_value_list (const Matrix&),
12611 octave_value_list::octave_value_list (const DiagMatrix&),
12612 octave_value_list::octave_value_list (const RowVector&),
12613 octave_value_list::octave_value_list (const ColumnVector&),
12614 octave_value_list::octave_value_list (const Complex&),
12615 octave_value_list::octave_value_list (const ComplexMatrix&),
12616 octave_value_list::octave_value_list (const ComplexDiagMatrix&),
12617 octave_value_list::octave_value_list (const ComplexRowVector&),
12618 octave_value_list::octave_value_list (const ComplexColumnVector&),
12619 octave_value_list::octave_value_list (const char *),
12620 octave_value_list::octave_value_list (const std::string&),
12621 octave_value_list::octave_value_list (const string_vector&),
12622 octave_value_list::octave_value_list (double, double, double),
12623 octave_value_list::octave_value_list (const Range&): Delete.
12624 Adjust uses of octave_value/octave_value_list to handle this change.
12626 * ov.cc (octave_value::octave_value (int)): New constructor.
12627 * ov.h: Provide decl.
12628 In files that construct integer-valued octave_value objects, use
12629 ints instead of casing to double.
12631 2002-12-19 John W. Eaton <jwe@bevo.che.wisc.edu>
12633 * load-save.cc (read_mat_ascii_data): Allow commas to separate values.
12634 Try harder to convert filenames to valid identifiers in a
12635 Matlab-compatible way.
12637 2002-12-18 John W. Eaton <jwe@bevo.che.wisc.edu>
12639 * Makefile.in: No need to add $(LIBKPATHSEA) to LINK_DEPS, since
12640 it is not included in liboctave.
12642 2002-12-18 JD Cole <jdcole@san.rr.com>
12644 * pt-check.cc (tree_checker::visit_subplot_axes,
12645 tree_checker::visit_do_until_command): New functions.
12646 * pt-check.h: Provide decl.
12648 2002-12-17 John W. Eaton <jwe@bevo.che.wisc.edu>
12650 * variables.cc (Fclear): Fix off-by-one error.
12652 * oct-stream.cc (octave_base_stream::do_gets): Correctly read
12653 last line of file even if it does not end with new line
12656 * pt-select.cc (equal): Don't look up == op, just try it and see
12659 * oct-stream.cc (printf_format_list::printf_format_list):
12660 Handle empty format string.
12662 2002-12-06 John W. Eaton <jwe@bevo.che.wisc.edu>
12664 * pt-mat.cc (class tm_row_const::tm_row_const_rep): Derive from
12665 octave_base_list instead of SLList. Fix tm_row_const member
12666 functions as needed, change all uses.
12667 (class tm_const): Derive from octave_base_list, not SLList. Fix
12668 member functions as needed, change all uses.
12669 * pt-mat.h (class tree_matrix): Derive from octave_base_list
12670 instead of including SLList object as data member. Fix member
12671 functions as needed, change all uses.
12673 * pt-idx.h (tree_index_expression::args,
12674 tree_index_expression::arg_nm, tree_index_expression::dyn_field):
12675 Now std::list, not SLList. Fix member functions as needed, change
12678 * oct-map.h (Octave_map::map): Now std::map instead of CHMap.
12679 Fix member functions as needed, change all uses.
12681 * oct-lvalue.h (octave_lvalue::idx): Now std::list instead of
12682 SLList object. Fix member functions as needed, change all uses.
12684 * dynamic-ld.cc (octave_shlib_list::lib_list): Now std::list
12685 instead of DLList object. Fix member functions as needed, change
12688 * ov.h (octave_value::subsref, octave_value::subsasgn):
12689 Index arg is not std::list, not SLList. Change all derived
12692 * pt-stmt.h (tree_statement_list): Derive from base_octave_list
12693 object instead of including SLList object as data member. Fix
12694 member functions as needed, change all uses.
12695 * pt-select.h (tree_switch_case_list): Likewise.
12696 (tree_if_command_list): Likewise.
12697 * pt-misc.h (tree_parameter_list, tree_return_list,
12698 tree_va_return_list): Likewise.
12699 * pt-plot.h (subplot_list): Likewise.
12700 * pt-mat.h (tree_matrix): Likewise.
12701 * pt-decl.h (tree_decl_init_list): Likewise.
12702 * pt-arg-list.h (tree_argument_list): Likewise.
12703 * comment-list.h (octave_comment_list): Likewise.
12705 * BaseSLList.cc, DLList.cc, Map.cc, SLList.cc, SLStack.cc,
12707 * Makefile.in (DIST_SRC): Delete them from the list.
12709 * BaseSLList.h, DLList.h, Map.h, Pix.h, SLList.h, SLStack.h,
12711 * Makefile.in (INCLUDES): Delete them from the list.
12713 * Map-oct-obj.cc, SLList-expr.cc, SLList-misc.cc, SLList-plot.cc,
12714 SLList-tc.cc, SLList-tm.cc: Delete.
12715 * Makefile.in (TI_XSRC): Delete them from the list.
12717 * ov-base-mat.cc (octave_base_matrix::assign): Pass
12718 MT::resize_fill_value () as third arg for ::assign.
12720 * Cell.h (Cell::resize_fill_value): Use empty Matrix object, not
12721 undefined octave_value object.
12722 (Cell::Cell (int, int, const octave_value&)): Use
12723 resize_fill_value () as default value, not undefined octave_value
12726 2002-12-05 John W. Eaton <jwe@bevo.che.wisc.edu>
12728 * Makefile.in (DEFUN_PATTERN): Make it work for DEFCMD too.
12730 * base-list.h: New file.
12732 2002-12-04 John W. Eaton <jwe@bevo.che.wisc.edu>
12734 * toplev.cc (octave_interpreter_ready): New global variable.
12735 * toplev.h: Provide decl.
12737 * octave.cc (octave_main): Call execute_default_pkg_add_files just
12738 before executing startup files. Set octave_interpreter_ready to
12739 true before calling execute_default_pkg_add_files.
12741 * defaults.cc (maybe_add_or_del_packages, default_load_path,
12742 update_load_path_dir_path): New static functions.
12743 (set_default_path, loadpath): Call update_load_path_dir_path.
12744 (symbols_of_defaults): Use DEFVAR, not DEFCONST for DEFAULT_LOADPATH.
12745 (execute_default_pkg_add_files): New function.
12746 * defaults.h.in: Provide decl.
12748 * utils.cc (search_path_for_all_files): New function.
12749 (Ffile_in_loadpath, Ffile_in_path): Allow search to return all
12752 * Cell.cc (Cell (const string_vector&)): New constructor.
12754 * oct-obj.cc (octave_value_list::assign): Allow optional fill
12755 value for resizing.
12756 * oct-map.cc (Octave_map::assign): Pass fill_value in initial
12759 2002-12-03 John W. Eaton <jwe@bevo.che.wisc.edu>
12761 * TEMPLATE-INST/Map-tc.cc, TEMPLATE-INST/Map-fnc.cc: Delete.
12762 * Makefile.in (TI_XSRC): Delete them from the list.
12764 * fn-cache.h (octave_fcn_file_name_cache::cache): Now std::map,
12767 * TEMPLATE-INST/SLStack-i.cc, TEMPLATE-INST/SLStack-ovl.cc,
12768 TEMPLATE-INST/SLStack-pc.cc, TEMPLATE-INST/SLStack-str.cc,
12769 TEMPLATE-INST/SLStack-sym.cc, TEMPLATE-INST/SLStack-tok.cc,
12770 TEMPLATE-INST/SLStack-ue.cc, TEMPLATE-INST/SLStack-ui.cc:
12771 Delete unnecessary files.
12772 * Makefile.in (TI_XSRC): Delete them from the list.
12774 * toplev.cc (octave_atexit_functions): Now std::stack, not SLStack.
12775 * pt-plot.cc (tmp_files): Likewise.
12776 * lex.l (token_stack): Likewise.
12777 (class bracket_brace_paren_nesting_level): Make context a data
12778 member instead of deriving from SLStack object.
12779 Use std::stack instead of SLStack.
12780 * ov-usr-fcn.h (octave_user_function::saved_args): Likewise.
12781 * symtab.h (symbol_record::context): Likewise.
12782 (symbol_record::global_link_context): Likewise.
12784 * unwind-prot.h (unwind_protect::elt_list): Rename from list.
12785 Now std::stack, not SLStack.
12787 * pt-stmt.h (tree_statement_list): Make list member data instead
12788 of deriving from SLList object.
12789 * pt-select.h (tree_switch_case_list): Likewise.
12790 (tree_if_command_list): Likewise.
12791 * pt-plot.h (subplot_list): Likewise.
12792 * pt-mat.h (tree_matrix): Likewise.
12793 * pt-decl.h (tree_decl_init_list): Likewise.
12794 * pt-arg-list.h (tree_argument_list): Likewise.
12795 * comment-list.h (octave_comment_list): Likewise.
12797 * defun.h (DEFCMD): Rename from DEFUN_TEXT. Provide DEFUN_TEXT as
12798 an alias for DEFCMD. Change all uses.
12800 * variables.cc (at_top_level): New function.
12801 (do_who, Fmark_as_command, Funmark_command): Use it.
12803 * lex.l (COMMAND_START): Rename from TEXT_FCN. Change all uses.
12804 (MATRIX_START): Rename from MATRIX. Change all uses.
12805 * variables.cc (command_function_set): Rename from
12807 (mark_as_command): Rename from mark_as_text_function.
12808 (is_marked_as_command): Rename from is_marked_as_text_function.
12809 (Fmark_as_command): Rename from Fmark_as_text_function.
12810 (Funmark_command): Rename from Funmark_text_function.
12811 (is_command_name): Rename from is_text_function_name.
12812 * symtab.h (symbol_record::COMMAND): Rename from TEXT_FUNCTION.
12813 (symbol_record::mark_as_command): Rename from mark_as_text_function.
12814 (symbol_record::unmark_command): Rename from
12815 symbol_record::unmark_text_function.
12816 (symbol_record::is_command): Rename from
12817 symbol_record::is_text_function.
12818 (symbol_record::symbol_def::mark_as_command): Rename from
12819 symbol_record::symbol_def::mark_as_text_function.
12820 (symbol_record::symbol_def::unmark_command): Rename from
12821 symbol_record::symbol_def::unmark_text_function.
12822 (symbol_record::symbol_def::is_command): Rename from
12823 symbol_record::symbol_def::is_text_function.
12825 * pt-jump.h, pt-jump.cc: Undo previous changes.
12826 * parse.y: Undo previous changes for brea, continue, and return.
12828 2002-11-25 John W. Eaton <jwe@bevo.che.wisc.edu>
12830 * pt-stmt.cc (tree_statement::eval): Allow the lookup to execute
12831 script files. If script file has been executed, don't bother to
12832 call expr->rvalue ().
12834 2002-11-22 John W. Eaton <jwe@bevo.che.wisc.edu>
12836 * Makefile.in (OCTINTERP_LINK_DEPS): Include $(FLIBS) in
12837 OCTINTERP_LINK_DEPS.
12839 * variables.cc (text_function_set): New static data.
12840 (mark_as_text_function, unmark_text_function,
12841 is_marked_as_text_function, Fmark_as_text_function,
12842 Funmark_text_function): New functions.