# HG changeset patch # User jwe # Date 910707127 0 # Node ID bc3fdfe311a37299c0bc2528302b8541cf41b24d # Parent 8cc04ca5b4caa2649ae0c1281a440fb417bd5640 [project @ 1998-11-10 14:06:21 by jwe] diff -r 8cc04ca5b4ca -r bc3fdfe311a3 ChangeLog --- a/ChangeLog Fri Nov 06 16:24:13 1998 +0000 +++ b/ChangeLog Tue Nov 10 14:12:07 1998 +0000 @@ -1,5 +1,18 @@ +Mon Nov 9 08:53:03 1998 John W. Eaton + + * Makeconf.in (LIBGLOB): Add a place for substitution to occur. + (GLOB_INCFLAGS): Define as @GLOB_INCFLAGS@, not @DLFCN_INCFLAGS@. + (do-subst-config-vals): Don't forget LIBGLOB. + * octave-bug.in (LIBGLOB): Substitute here too, and add it to the + list of configuration items to print. + Mon Nov 2 20:33:16 1998 John W. Eaton + * configure.in: Define __NO_MATH_INLINES. + * acconfig.h: Add #undef for it. + + * configure.in (AC_OUTPUT): Escape newlinew in macro call with \. + * install-octave.in (SHLEXT): Substitute. (SHLEXT_VER): Define. Use them for installing shared libraries. diff -r 8cc04ca5b4ca -r bc3fdfe311a3 Makeconf.in --- a/Makeconf.in Fri Nov 06 16:24:13 1998 +0000 +++ b/Makeconf.in Tue Nov 10 14:12:07 1998 +0000 @@ -73,7 +73,7 @@ # cc and associated flags. DLFCN_INCFLAGS = @DLFCN_INCFLAGS@ -GLOB_INCFLAGS = @DLFCN_INCFLAGS@ +GLOB_INCFLAGS = @GLOB_INCFLAGS@ # Clean up INCFLAGS a bit if we are not compiling in a separate # directory. @@ -135,6 +135,7 @@ TERMLIBS = @TERMLIBS@ LIBDLFCN = @LIBDLFCN@ +LIBGLOB = @LIBGLOB@ LIBPLPLOT = @LIBPLPLOT@ LIBREADLINE = @LIBREADLINE@ LIBKPATHSEA = @LIBKPATHSEA@ @@ -332,6 +333,7 @@ -e "s;%LDFLAGS%;\"${LDFLAGS}\";" \ -e "s;%LEXLIB%;\"${LEXLIB}\";" \ -e "s;%LIBDLFCN%;\"${LIBDLFCN}\";" \ + -e "s;%LIBGLOB%;\"${LIBGLOB}\";" \ -e "s;%LIBFLAGS%;\"-L${octlibdir}\";" \ -e "s;%LIBPLPLOT%;\"${LIBPLPLOT}\";" \ -e "s;%LIBS%;\"${LIBS}\";" \ diff -r 8cc04ca5b4ca -r bc3fdfe311a3 acconfig.h --- a/acconfig.h Fri Nov 06 16:24:13 1998 +0000 +++ b/acconfig.h Tue Nov 10 14:12:07 1998 +0000 @@ -6,6 +6,10 @@ Leave the following blank line there!! Autoheader needs it. */ +/* Define if your version of GNU libc has buggy inline assembly code + for math functions like exp. */ +#undef __NO_MATH_INLINES + /* Define if you want bounds checking on element references for internal array and matrix classes. */ #undef BOUNDS_CHECKING diff -r 8cc04ca5b4ca -r bc3fdfe311a3 configure.in --- a/configure.in Fri Nov 06 16:24:13 1998 +0000 +++ b/configure.in Tue Nov 10 14:12:07 1998 +0000 @@ -21,7 +21,7 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -AC_REVISION($Revision: 1.309 $) +AC_REVISION($Revision: 1.310 $) AC_PREREQ(2.9) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -158,6 +158,13 @@ AC_DEFINE(BOUNDS_CHECKING, 1) fi +### It seems that there are some broken inline assembly functions in +### the GNU libc. Since I'm not sure how to test whether we are using +### GNU libc, just disable them for all platforms. + +AC_MSG_RESULT([defining __NO_MATH_INLINES avoids buggy GNU libc exp function]) +AC_DEFINE(__NO_MATH_INLINES, 1) + ### See which C++ compiler to use (we expect to find g++). EXTERN_CXXFLAGS="$CXXFLAGS" @@ -1132,19 +1139,19 @@ ### Do the substitutions in all the Makefiles. -AC_OUTPUT(Makefile octMakefile Makeconf install-octave - test/Makefile dlfcn/Makefile - doc/Makefile doc/faq/Makefile doc/interpreter/Makefile - doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile - examples/Makefile liboctave/Makefile src/Makefile - libcruft/Makefile libcruft/Makerules - libcruft/blas/Makefile libcruft/dassl/Makefile - libcruft/fftpack/Makefile libcruft/lapack/Makefile - libcruft/linpack/Makefile libcruft/minpack/Makefile - libcruft/misc/Makefile libcruft/odepack/Makefile - libcruft/ordered-qz/Makefile libcruft/quadpack/Makefile - libcruft/ranlib/Makefile libcruft/specfun/Makefile - libcruft/slatec-fn/Makefile libcruft/slatec-err/Makefile +AC_OUTPUT(Makefile octMakefile Makeconf install-octave \ + test/Makefile dlfcn/Makefile \ + doc/Makefile doc/faq/Makefile doc/interpreter/Makefile \ + doc/liboctave/Makefile doc/refcard/Makefile emacs/Makefile \ + examples/Makefile liboctave/Makefile src/Makefile \ + libcruft/Makefile libcruft/Makerules \ + libcruft/blas/Makefile libcruft/dassl/Makefile \ + libcruft/fftpack/Makefile libcruft/lapack/Makefile \ + libcruft/linpack/Makefile libcruft/minpack/Makefile \ + libcruft/misc/Makefile libcruft/odepack/Makefile \ + libcruft/ordered-qz/Makefile libcruft/quadpack/Makefile \ + libcruft/ranlib/Makefile libcruft/specfun/Makefile \ + libcruft/slatec-fn/Makefile libcruft/slatec-err/Makefile \ libcruft/villad/Makefile) chmod 755 install-octave diff -r 8cc04ca5b4ca -r bc3fdfe311a3 liboctave/ChangeLog --- a/liboctave/ChangeLog Fri Nov 06 16:24:13 1998 +0000 +++ b/liboctave/ChangeLog Tue Nov 10 14:12:07 1998 +0000 @@ -1,3 +1,20 @@ +Tue Nov 10 07:53:15 1998 John W. Eaton + + * byte-swap.h (swap_bytes, swap_2_bytes, swap_4_bytes, swap_8_bytes): + Add volatile qualifier to void* arg. + Cast volatile void* arg to volatile char*. + +Mon Nov 9 08:28:31 1998 John W. Eaton + + * cmd-edit.h (command_editor::do_set_event_hook): New function. + (command_editor::do_restore_event_hook): Ditto. + * cmd-edit.cc (command_editor::set_event_hook): Ditto. + (command_editor::restore_event_hook): Ditto. + (gnu_readline::do_set_event_hook): Ditto. + (gnu_readline::do_restore_event_hook): Ditto. + (gnu_readline::previous_event_hook): New data member. + (gnu_readline::gnu_readline): Initialize previous_event_hook. + Mon Nov 2 13:36:04 1998 John W. Eaton * Makefile.in (BINDISTLIBS): Don't include .$(SHLEXT_VER) in name. diff -r 8cc04ca5b4ca -r bc3fdfe311a3 liboctave/byte-swap.h --- a/liboctave/byte-swap.h Fri Nov 06 16:24:13 1998 +0000 +++ b/liboctave/byte-swap.h Tue Nov 10 14:12:07 1998 +0000 @@ -23,10 +23,13 @@ #if !defined (octave_byte_swap_h) #define octave_byte_swap_h 1 +// XXX FIXME XXX -- not sure these volatile qualifiers are really +// needed or appropriate here. + static inline void -swap_bytes (void *ptr, unsigned int i, unsigned int j) +swap_bytes (volatile void *ptr, unsigned int i, unsigned int j) { - char *t = static_cast (ptr); + volatile char *t = static_cast (ptr); char tmp = t[i]; t[i] = t[j]; @@ -34,26 +37,26 @@ } static inline void -swap_2_bytes (void *ptr) +swap_2_bytes (volatile void *ptr) { - char *t = static_cast (ptr); + volatile char *t = static_cast (ptr); swap_bytes (t, 0, 1); } static inline void -swap_4_bytes (void *ptr) +swap_4_bytes (volatile void *ptr) { - char *t = static_cast (ptr); + volatile char *t = static_cast (ptr); swap_bytes (t, 0, 3); swap_bytes (t, 1, 2); } static inline void -swap_8_bytes (void *ptr) +swap_8_bytes (volatile void *ptr) { - char *t = static_cast (ptr); + volatile char *t = static_cast (ptr); swap_bytes (t, 0, 7); swap_bytes (t, 1, 6); @@ -62,9 +65,9 @@ } static inline void -swap_2_bytes (void *ptr, int len) +swap_2_bytes (volatile void *ptr, int len) { - char *t = static_cast (ptr); + volatile char *t = static_cast (ptr); for (int i = 0; i < len; i++) { @@ -74,9 +77,9 @@ } static inline void -swap_4_bytes (void *ptr, int len) +swap_4_bytes (volatile void *ptr, int len) { - char *t = static_cast (ptr); + volatile char *t = static_cast (ptr); for (int i = 0; i < len; i++) { @@ -86,9 +89,9 @@ } static inline void -swap_8_bytes (void *ptr, int len) +swap_8_bytes (volatile void *ptr, int len) { - char *t = static_cast (ptr); + volatile char *t = static_cast (ptr); for (int i = 0; i < len; i++) { diff -r 8cc04ca5b4ca -r bc3fdfe311a3 liboctave/cmd-edit.cc --- a/liboctave/cmd-edit.cc Fri Nov 06 16:24:13 1998 +0000 +++ b/liboctave/cmd-edit.cc Tue Nov 10 14:12:07 1998 +0000 @@ -114,6 +114,10 @@ void do_restore_startup_hook (void); + void do_set_event_hook (fcn f); + + void do_restore_event_hook (void); + void do_read_init_file (const string& file); static void operate_and_get_next (int, int); @@ -122,6 +126,8 @@ fcn previous_startup_hook; + fcn previous_event_hook; + completion_fcn completion_function; static char *command_generator (const char *text, int state); @@ -130,7 +136,8 @@ }; gnu_readline::gnu_readline () - : command_editor (), previous_startup_hook (0), completion_function (0) + : command_editor (), previous_startup_hook (0), + previous_event_hook (0), completion_function (0) { rl_initialize (); @@ -326,6 +333,20 @@ } void +gnu_readline::do_set_event_hook (fcn f) +{ + previous_event_hook = rl_event_hook; + + rl_event_hook = f; +} + +void +gnu_readline::do_restore_event_hook (void) +{ + rl_event_hook = previous_event_hook; +} + +void gnu_readline::do_read_init_file (const string& file) { if (file.empty ()) @@ -662,6 +683,20 @@ } void +command_editor::set_event_hook (fcn f) +{ + if (instance_ok ()) + instance->do_set_event_hook (f); +} + +void +command_editor::restore_event_hook (void) +{ + if (instance_ok ()) + instance->do_restore_event_hook (); +} + +void command_editor::read_init_file (const string& file) { if (instance_ok ()) diff -r 8cc04ca5b4ca -r bc3fdfe311a3 liboctave/cmd-edit.h --- a/liboctave/cmd-edit.h Fri Nov 06 16:24:13 1998 +0000 +++ b/liboctave/cmd-edit.h Tue Nov 10 14:12:07 1998 +0000 @@ -85,6 +85,10 @@ static void restore_startup_hook (void); + static void set_event_hook (fcn f); + + static void restore_event_hook (void); + static void read_init_file (const string& file = string ()); static int current_command_number (void); @@ -158,6 +162,10 @@ virtual void do_restore_startup_hook (void) { } + virtual void do_set_event_hook (fcn) { } + + virtual void do_restore_event_hook (void) { } + virtual void do_read_init_file (const string&) { } int read_octal (const string& s); diff -r 8cc04ca5b4ca -r bc3fdfe311a3 octave-bug.in --- a/octave-bug.in Fri Nov 06 16:24:13 1998 +0000 +++ b/octave-bug.in Tue Nov 10 14:12:07 1998 +0000 @@ -39,6 +39,7 @@ LIBS=%LIBS% LEXLIB=%LEXLIB% LIBPLPLOT=%LIBPLPLOT% +LIBGLOB=%LIBGLOB% LIBDLFCN=%LIBDLFCN% DEFS=%DEFS% @@ -185,6 +186,7 @@ LEXLIB: $LEXLIB LIBPLPLOT: $LIBPLPLOT LIBDLFCN: $LIBDLFCN +LIBGLOB: $LIBGLOB DEFS: EOF diff -r 8cc04ca5b4ca -r bc3fdfe311a3 scripts/ChangeLog --- a/scripts/ChangeLog Fri Nov 06 16:24:13 1998 +0000 +++ b/scripts/ChangeLog Tue Nov 10 14:12:07 1998 +0000 @@ -1,3 +1,63 @@ +Fri Nov 6 10:17:00 1998 John W. Eaton + + * New files from OCST, in control subdiretory: + + DEMOcontrol.m is_siso.m syschnames.m + abcddim.m is_stabilizable.m syschnamesl.m + abcddims.m is_stable.m syschtsam.m + analdemo.m jet707.m sysconnect.m + are.m lqe.m syscont.m + axis2dlim.m lqg.m syscont_disc.m + bddemo.m lqr.m sysdefioname.m + bode.m lsim.m sysdefstname.m + bode_bounds.m ltifr.m sysdimensions.m + bodquist.m lyap.m sysdisc.m + buildssic.m mb.m sysdup.m + c2d.m minfo.m sysgetsignals.m + com2str.m,v moddemo.m sysgettsam.m + controldemo.m nichols.m sysgettype.m + ctrb.m nyquist.m sysgroup.m + d2c.m obsv.m sysgroupn.m + damp.m ord2.m sysmult.m + dare.m outlist.m sysout.m + dcgain.m packedform.m sysprune.m + demomarsyas.m packsys.m sysreorder.m + dezero.m; parallel.m sysrepdemo.m + dgkfdemo.m place.m sysscale.m + dgram.m polyout.m syssub.m + dhinfdemo.m prompt.m sysupdate.m + dlqe.m pzmap.m tf2ss.m + dlqg.m qzval.m tf2sys.m + dlqr.m rldemo.m tf2sysl.m + dlyap.m rlocus.m tf2zp.m + dmr2d.m rotg.m tfout.m + fir2sys.m run_cmd.m; tzero.m + frdemo.m series.m tzero2.m + freqchkw.m sortcom.m ugain.m + freqresp.m ss2sys.m unpacksys.m + gram.m ss2tf.m wgt1o.m + h2norm.m ss2zp.m zgfmul.m + h2syn.m starp.m zgfslv.m + hinf_ctr.m step.m zginit.m + hinfdemo.m stepimp.m zgpbal.m + hinfnorm.m strappend.m; zgreduce.m + hinfsyn.m susball.m zgrownorm.m + hinfsyn_chk.m swap.m zgscal.m + impulse.m swapcols.m zgsgiv.m + is_abcd.m swaprows.m zgshsr.m + is_controllable.m sys2fir.m zp2ss.m + is_detectable.m sys2ss.m zp2ssg2.m + is_dgkf.m sys2tf.m zp2sys.m + is_digital.m sys2zp.m zp2tf.m + is_observable.m sysadd.m zpout.m + is_sample.m sysappend.m + +Thu Nov 5 13:28:40 1998 John W. Eaton + + * configure.in (AC_OUTPUT): Escape newlinew in macro call with \. + + * strings/deblank.m: Make it work for string arrays too. + Wed Nov 4 21:51:13 1998 John W. Eaton * linear-algebra/housh.m: New file from the OCST. diff -r 8cc04ca5b4ca -r bc3fdfe311a3 scripts/configure.in --- a/scripts/configure.in Fri Nov 06 16:24:13 1998 +0000 +++ b/scripts/configure.in Tue Nov 10 14:12:07 1998 +0000 @@ -26,11 +26,11 @@ AC_PROG_INSTALL -AC_OUTPUT(Makefile audio/Makefile control/Makefile elfun/Makefile - finance/Makefile general/Makefile image/Makefile io/Makefile - linear-algebra/Makefile miscellaneous/Makefile plot/Makefile - polynomial/Makefile set/Makefile signal/Makefile - specfun/Makefile special-matrix/Makefile startup/Makefile - statistics/Makefile statistics/base/Makefile - statistics/distributions/Makefile statistics/models/Makefile +AC_OUTPUT(Makefile audio/Makefile control/Makefile elfun/Makefile \ + finance/Makefile general/Makefile image/Makefile io/Makefile \ + linear-algebra/Makefile miscellaneous/Makefile plot/Makefile \ + polynomial/Makefile set/Makefile signal/Makefile \ + specfun/Makefile special-matrix/Makefile startup/Makefile \ + statistics/Makefile statistics/base/Makefile \ + statistics/distributions/Makefile statistics/models/Makefile \ statistics/tests/Makefile strings/Makefile time/Makefile) diff -r 8cc04ca5b4ca -r bc3fdfe311a3 scripts/strings/deblank.m --- a/scripts/strings/deblank.m Fri Nov 06 16:24:13 1998 +0000 +++ b/scripts/strings/deblank.m Tue Nov 10 14:12:07 1998 +0000 @@ -41,8 +41,8 @@ t = ""; else s = reshape (s, 1, len); - k = max (find (s != " ")); - t = s (1:k); + k = ceil (max (find (s != " ")) / nr) * nr; + t = reshape (s (1:k), nr, k / nr); endif else diff -r 8cc04ca5b4ca -r bc3fdfe311a3 src/ChangeLog --- a/src/ChangeLog Fri Nov 06 16:24:13 1998 +0000 +++ b/src/ChangeLog Tue Nov 10 14:12:07 1998 +0000 @@ -1,3 +1,36 @@ +Mon Nov 9 16:12:37 1998 John W. Eaton + + * pr-output.cc (octave_print_internal): Reorder default args for + charMatrix version. + (octave_print_internal): New function for boolMatrix. + + * version.h (OCTAVE_STARTUP_MESSAGE): Note that this is a + development release. + + * toplev.cc (do_octave_atexit): Call flush_octave_stdout here. + (clean_up_for_exit): And here. + +Mon Nov 9 15:20:53 1998 John W. Eaton + + * input.cc (get_user_input): Check retval.length(), not retval.length. + +Sun Nov 8 19:30:33 1998 John W. Eaton + + * pt-assign.cc (tree_simple_assignment::rvalue): If etype is + asn_eq, don't evaluate ult again because retval is just rhs value. + (tree_multi_assignment::rvalue): Likewise. + +Fri Nov 6 12:14:29 1998 John W. Eaton + + * pt-loop.cc (tree_for_command::eval): Move code for string RHS + outside if clause for matrix types. + + * pt-idx.cc: Don't forget to define arg_nm. + Move contstructor here. + * pt-idx.h: From here. + + * data.cc (Fisempty): Also return true for empty strings. + Wed Nov 4 17:21:41 1998 John W. Eaton * ov-base.cc (octave_base_value::rows, octave_base_value::columns, diff -r 8cc04ca5b4ca -r bc3fdfe311a3 src/data.cc --- a/src/data.cc Fri Nov 06 16:24:13 1998 +0000 +++ b/src/data.cc Tue Nov 10 14:12:07 1998 +0000 @@ -782,7 +782,7 @@ } DEFUN (isempty, args, , - "isempty (x): return nonzero if x is an empty matrix or empty list") + "isempty (x): return nonzero if x is an empty matrix, string, or list") { double retval = 0.0; @@ -792,7 +792,7 @@ if (arg.is_matrix_type ()) retval = static_cast (arg.rows () == 0 || arg.columns () == 0); - else if (arg.is_list ()) + else if (arg.is_list () || arg.is_string ()) retval = static_cast (arg.length () == 0); } else diff -r 8cc04ca5b4ca -r bc3fdfe311a3 src/input.cc --- a/src/input.cc Fri Nov 06 16:24:13 1998 +0000 +++ b/src/input.cc Tue Nov 10 14:12:07 1998 +0000 @@ -564,7 +564,7 @@ retval = eval_string (input_buf, silent, parse_status, nargout); - if (! debug && retval.length == 0) + if (! debug && retval.length () == 0) retval(0) = Matrix (); } } diff -r 8cc04ca5b4ca -r bc3fdfe311a3 src/pr-output.cc --- a/src/pr-output.cc Fri Nov 06 16:24:13 1998 +0000 +++ b/src/pr-output.cc Tue Nov 10 14:12:07 1998 +0000 @@ -1577,9 +1577,19 @@ } void +octave_print_internal (ostream& os, const boolMatrix& bm, + bool pr_as_read_syntax, + int extra_indent) +{ + Matrix tmp (bm); + octave_print_internal (os, tmp, pr_as_read_syntax, extra_indent); +} + +void octave_print_internal (ostream& os, const charMatrix& chm, - bool pr_as_read_syntax, bool pr_as_string, - int /* extra_indent XXX FIXME XXX */) + bool pr_as_read_syntax, + int /* extra_indent XXX FIXME XXX */, + bool pr_as_string) { if (pr_as_string) { diff -r 8cc04ca5b4ca -r bc3fdfe311a3 src/pr-output.h --- a/src/pr-output.h Fri Nov 06 16:24:13 1998 +0000 +++ b/src/pr-output.h Tue Nov 10 14:12:07 1998 +0000 @@ -30,6 +30,7 @@ class ComplexMatrix; class Matrix; class Range; +class boolMatrix; class charMatrix; extern void @@ -56,10 +57,15 @@ int extra_indent = 0); extern void +octave_print_internal (ostream& os, const boolMatrix& m, + bool pr_as_read_syntax = false, + int extra_indent = 0); + +extern void octave_print_internal (ostream& os, const charMatrix& chm, bool pr_as_read_syntax = false, - bool pr_as_string = false, - int extra_indent = 0); + int extra_indent = 0, + bool pr_as_string = false); #endif diff -r 8cc04ca5b4ca -r bc3fdfe311a3 src/pt-assign.cc --- a/src/pt-assign.cc Fri Nov 06 16:24:13 1998 +0000 +++ b/src/pt-assign.cc Tue Nov 10 14:12:07 1998 +0000 @@ -104,32 +104,38 @@ { ult.assign (etype, rhs_val); - retval = ult.value (); + if (! error_state) + { + if (etype == octave_value::asn_eq) + retval = rhs_val; + else + retval = ult.value (); - if (error_state) - eval_error (); - else if (print_result ()) - { - if (Vprint_rhs_assign_val) - retval.print_with_name (octave_stdout, - lhs->str_print_code ()); - else + if (print_result ()) { - // We clear any index here so that we can - // get the new value of the referenced - // object below, instead of the indexed - // value (which should be the same as the - // right hand side value). + if (Vprint_rhs_assign_val) + retval.print_with_name (octave_stdout, + lhs->str_print_code ()); + else + { + // We clear any index here so that we can + // get the new value of the referenced + // object below, instead of the indexed + // value (which should be the same as the + // right hand side value). - ult.clear_index (); + ult.clear_index (); - octave_value lhs_val = ult.value (); + octave_value lhs_val = ult.value (); - if (! error_state) - lhs_val.print_with_name (octave_stdout, - lhs->name ()); + if (! error_state) + lhs_val.print_with_name (octave_stdout, + lhs->name ()); + } } } + else + eval_error (); } } } @@ -235,7 +241,13 @@ { ult.assign (etype, rhs_val(k)); - retval(k) = ult.value (); + if (! error_state) + { + if (etype == octave_value::asn_eq) + retval(k) = rhs_val(k); + else + retval(k) = ult.value (); + } } else error ("element number %d undefined in return list", diff -r 8cc04ca5b4ca -r bc3fdfe311a3 src/pt-idx.cc --- a/src/pt-idx.cc Fri Nov 06 16:24:13 1998 +0000 +++ b/src/pt-idx.cc Tue Nov 10 14:12:07 1998 +0000 @@ -38,6 +38,12 @@ // Index expressions. +tree_index_expression::tree_index_expression (tree_expression *e = 0, + tree_argument_list *lst = 0, + int l = -1, int c = -1) + : tree_expression (l, c), expr (e), list (lst), + arg_nm (lst ? lst->get_arg_names () : string_vector ()) { } + tree_index_expression::~tree_index_expression (void) { delete expr; diff -r 8cc04ca5b4ca -r bc3fdfe311a3 src/pt-idx.h --- a/src/pt-idx.h Fri Nov 06 16:24:13 1998 +0000 +++ b/src/pt-idx.h Tue Nov 10 14:12:07 1998 +0000 @@ -47,8 +47,7 @@ public: tree_index_expression (tree_expression *e = 0, tree_argument_list *lst = 0, - int l = -1, int c = -1) - : tree_expression (l, c), expr (e), list (lst), arg_nm () { } + int l = -1, int c = -1); ~tree_index_expression (void); diff -r 8cc04ca5b4ca -r bc3fdfe311a3 src/pt-loop.cc --- a/src/pt-loop.cc Fri Nov 06 16:24:13 1998 +0000 +++ b/src/pt-loop.cc Tue Nov 10 14:12:07 1998 +0000 @@ -215,22 +215,41 @@ do_for_loop_once (ult, rhs, quit); } + else if (rhs.is_string ()) + { + charMatrix chm_tmp = rhs.char_matrix_value (); + int nr = chm_tmp.rows (); + int steps = chm_tmp.columns (); + + if (error_state) + return; + + if (nr == 1) + DO_LOOP (chm_tmp (0, i)); + else + { + for (int i = 0; i < steps; i++) + { + octave_value val (chm_tmp.extract (0, i, nr-1, i), true); + + bool quit = false; + + do_for_loop_once (ult, val, quit); + + if (quit) + break; + } + } + } else if (rhs.is_matrix_type ()) { - charMatrix chm_tmp; Matrix m_tmp; ComplexMatrix cm_tmp; int nr; int steps; - if (rhs.is_string ()) - { - chm_tmp = rhs.char_matrix_value (); - nr = chm_tmp.rows (); - steps = chm_tmp.columns (); - } - else if (rhs.is_real_matrix ()) + if (rhs.is_real_matrix ()) { m_tmp = rhs.matrix_value (); nr = m_tmp.rows (); @@ -246,26 +265,7 @@ if (error_state) return; - if (rhs.is_string ()) - { - if (nr == 1) - DO_LOOP (chm_tmp (0, i)); - else - { - for (int i = 0; i < steps; i++) - { - octave_value val (chm_tmp.extract (0, i, nr-1, i), true); - - bool quit = false; - - do_for_loop_once (ult, val, quit); - - if (quit) - break; - } - } - } - else if (rhs.is_real_matrix ()) + if (rhs.is_real_matrix ()) { if (nr == 1) DO_LOOP (m_tmp (0, i)); diff -r 8cc04ca5b4ca -r bc3fdfe311a3 src/toplev.cc --- a/src/toplev.cc Fri Nov 06 16:24:13 1998 +0000 +++ b/src/toplev.cc Tue Nov 10 14:12:07 1998 +0000 @@ -182,6 +182,8 @@ cleanup_tmp_files (); + flush_octave_stdout (); + if (!quitting_gracefully && (interactive || forced_interactive)) cout << "\n"; } @@ -512,6 +514,8 @@ octave_value_list fcn = octave_atexit_functions.pop (); feval (fcn, 0); + + flush_octave_stdout (); } }