# HG changeset patch # User jwe # Date 1041620111 0 # Node ID e7e10ce42860883ceb32014c5a9c083e1064a5bc # Parent 5b075bd78a91ba2e85d8d15009af5ab26ba8fc2a [project @ 2003-01-03 18:52:59 by jwe] diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-01-03 John W. Eaton + + * configure.in: Default value of BUILD_CXX is $CXX, not g++. + 2003-01-02 John W. Eaton * configure.in: Fail on all gcc 1.x and 2.x versions. diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -22,7 +22,7 @@ ### 02111-1307, USA. AC_INIT -AC_REVISION($Revision: 1.402 $) +AC_REVISION($Revision: 1.403 $) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -330,9 +330,9 @@ BUILD_CXXFLAGS="-O2 -g" BUILD_EXEEXT="" else - BUILD_CC=$CC + BUILD_CC="$CC" BUILD_CFLAGS="-O2 -g" - BUILD_CXX="g++" + BUILD_CXX="$CXX" BUILD_CXXFLAGS="-O2 -g" BUILD_EXEEXT="$EXEEXT" fi diff --git a/libcruft/ChangeLog b/libcruft/ChangeLog --- a/libcruft/ChangeLog +++ b/libcruft/ChangeLog @@ -1,3 +1,7 @@ +2003-01-03 John W. Eaton + + * misc/quit.cc: Add std:: qualifiers to memcpy calls. + 2003-01-03 Paul Kienzle * misc/quit.h: Move #include outside extern "C" block. diff --git a/libcruft/misc/quit.cc b/libcruft/misc/quit.cc --- a/libcruft/misc/quit.cc +++ b/libcruft/misc/quit.cc @@ -40,13 +40,13 @@ void octave_save_current_context (void *save_buf) { - memcpy (save_buf, current_context, sizeof (octave_jmp_buf)); + std::memcpy (save_buf, current_context, sizeof (octave_jmp_buf)); } void octave_restore_current_context (void *save_buf) { - memcpy (current_context, save_buf, sizeof (octave_jmp_buf)); + std::memcpy (current_context, save_buf, sizeof (octave_jmp_buf)); } void diff --git a/liboctave/Array2-idx.h b/liboctave/Array2-idx.h --- a/liboctave/Array2-idx.h +++ b/liboctave/Array2-idx.h @@ -556,15 +556,18 @@ } else if (n == rhs_nr && m == rhs_nc) { - MAYBE_RESIZE_LHS; - - for (int j = 0; j < m; j++) + if (n > 0 && m > 0) { - int jj = idx_j.elem (j); - for (int i = 0; i < n; i++) + MAYBE_RESIZE_LHS; + + for (int j = 0; j < m; j++) { - int ii = idx_i.elem (i); - lhs.elem (ii, jj) = rhs.elem (i, j); + int jj = idx_j.elem (j); + for (int i = 0; i < n; i++) + { + int ii = idx_i.elem (i); + lhs.elem (ii, jj) = rhs.elem (i, j); + } } } } diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +2003-01-03 John W. Eaton + + * Array2-idx.h (assign): If assignment conforms but the RHS and + index are empty matrices, don't do anything. + 2002-12-26 John W. Eaton * pathsearch.cc (make_retval, free_c_array, make_c_names, diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -6,9 +6,6 @@ * mappers.cc: Remove std:: qualifiers from C library names. - * pr-output.cc: Replace std:: qualifiers on pow with STD_QUAL. - (STD_QUAL): New macro. - 2003-01-03 John W. Eaton * pt-exp.h (tree_expression::has_magic_end): New pure virtual function. diff --git a/src/pr-output.cc b/src/pr-output.cc --- a/src/pr-output.cc +++ b/src/pr-output.cc @@ -56,12 +56,6 @@ #include "utils.h" #include "variables.h" -#if defined (__GNUG__) -#define STD_QUAL std:: -#else -#define STD_QUAL -#endif - // TRUE means use a scaled fixed point format for `format long' and // `format short'. static bool Vfixed_point_format; @@ -505,7 +499,7 @@ int x_min = min_abs == 0.0 ? 0 : static_cast (floor (log10 (min_abs) + 1.0)); - scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : STD_QUAL pow (10.0, x_max - 1); + scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : std::pow (10.0, x_max - 1); set_real_matrix_format (sign, x_max, x_min, inf_or_nan, int_or_inf_or_nan, fw); @@ -856,7 +850,7 @@ int x_max = r_x_max > i_x_max ? r_x_max : i_x_max; int x_min = r_x_min > i_x_min ? r_x_min : i_x_min; - scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : STD_QUAL pow (10.0, x_max - 1); + scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : std::pow (10.0, x_max - 1); set_complex_matrix_format (sign, x_max, x_min, r_x_max, r_x_min, inf_or_nan, int_or_inf_or_nan, r_fw, i_fw); @@ -997,7 +991,7 @@ int x_min = min_abs == 0.0 ? 0 : static_cast (floor (log10 (min_abs) + 1.0)); - scale = (x_max == 0 || all_ints) ? 1.0 : STD_QUAL pow (10.0, x_max - 1); + scale = (x_max == 0 || all_ints) ? 1.0 : std::pow (10.0, x_max - 1); set_range_format (sign, x_max, x_min, all_ints, fw); }