# HG changeset patch # User jwe # Date 1113922969 0 # Node ID fe5ee25a5e6cb48022241dde41860e1cb2f7dec4 # Parent e14d6e159dab84d896c812329436986cc86021e3 [project @ 2005-04-19 15:02:49 by jwe] diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-04-14 John W. Eaton + + * mkoctfile.in: Only perform link step if we have some object files. + If only -v or --version is supplied, print version info and exit. + 2005-04-08 John W. Eaton * octMakefile.in (maintainer-clean distclean): diff --git a/liboctave/Array.cc b/liboctave/Array.cc --- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -2907,6 +2907,13 @@ { lhs.maybe_delete_elements (idx, rfv); } + else if (n_idx == 0) + { + (*current_liboctave_error_handler) + ("invalid number of indices for matrix expression"); + + retval = 0; + } else if (n_idx == 1) { idx_vector iidx = idx(0); diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,7 @@ +2005-04-19 John W. Eaton + + * Array.cc (assignN): Don't crash if the index list is empty. + 2005-04-14 David Bateman * SparseCmplxLU.cc: Add flags for incomplete factorization. diff --git a/mkoctfile.in b/mkoctfile.in --- a/mkoctfile.in +++ b/mkoctfile.in @@ -7,6 +7,8 @@ set -e +OCTAVE_VERSION="%OCTAVE_CONF_VERSION%" + # Default values for these variables are filled in when Octave is # compiled. @@ -63,6 +65,8 @@ usage_msg="usage: mkoctfile [options] file ..." +version_msg="mkoctfile, version $OCTAVE_VERSION" + cfiles= ccfiles= f77files= @@ -87,6 +91,15 @@ exit 1 fi +if [ $# -eq 1 ]; then + case "$1" in + -v | --version) + echo $version_msg 1>&2 + exit 0 + ;; + esac +fi + while [ $# -gt 0 ]; do file= case "$1" in @@ -404,7 +417,7 @@ # Link all the object files. -if $link; then +if $link && [ -n "$objfiles" ]; then if $link_stand_alone; then if [ -n "$LD_CXX" ]; then cmd="$LD_CXX $CPPFLAGS $ALL_CXXFLAGS $RDYNAMIC_FLAG $ALL_LDFLAGS $pass_on_options $output_option $objfiles $ldflags $LFLAGS $RLD_FLAG $OCTAVE_LIBS $BLAS_LIBS $FFTW_LIBS $LIBREADLINE $LIBS $FLIBS" diff --git a/src/toplev.cc b/src/toplev.cc --- a/src/toplev.cc +++ b/src/toplev.cc @@ -382,6 +382,8 @@ return retval; } +enum system_exec_type { et_sync, et_async }; + DEFUN (system, args, nargout, "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} system (@var{string}, @var{return_output}, @var{type})\n\ @@ -436,9 +438,7 @@ std::string cmd_str = args(0).string_value (); - enum exec_type { sync, async }; - - exec_type type = sync; + system_exec_type type = et_sync; if (! error_state) { @@ -449,9 +449,9 @@ if (! error_state) { if (type_str == "sync") - type = sync; + type = et_sync; else if (type_str == "async") - type = async; + type = et_async; else error ("system: third arg must be \"sync\" or \"async\""); } @@ -464,7 +464,7 @@ if (! error_state) { - if (type == async) + if (type == et_async) { #ifdef HAVE_FORK pid_t pid = fork ();