# HG changeset patch # User jwe # Date 1021588296 0 # Node ID a10df4059532b4b572a8dbeed72c1fa6cc7499a9 # Parent 2ca2d23a49a739db1058b51d9290225a5a734a7e [project @ 2002-05-16 22:31:35 by jwe] diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-05-16 John W. Eaton + + * aclocal.m4 (OCTAVE_CXX_ISO_COMPLIANT_LIBRARY): Omit cwctype. + 2002-05-01 John W. Eaton * configure.in (AC_AIX): Move before AC_MINIX and AC_ISC_POSIX. diff --git a/aclocal.m4 b/aclocal.m4 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -557,9 +557,11 @@ AC_CACHE_VAL(octave_cv_cxx_iso_compliant_library, [ AC_LANG_PUSH(C++) rm -f conftest.h +### Omitting cwctype for now, since it is broken with gcc-3.0.x and +### possibly other versions... for inc in algorithm bitset cassert cctype cerrno cfloat ciso646 \ climits clocale cmath complex csetjmp csignal cstdarg cstddef \ - cstdio cstdlib cstring ctime cwchar cwctype deque exception \ + cstdio cstdlib cstring ctime cwchar deque exception \ fstream functional iomanip ios iosfwd iostream istream iterator \ limits list locale map memory new numeric ostream queue set \ sstream stack stdexcept streambuf string strstream typeinfo \ diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2002-05-16 John W. Eaton + * oct-map.cc (Octave_map::assign): Resize RHS if it is shorter + than existing struct array. + * ov-cell.cc (octave_cell::subsasgn): If an error has occurred, skip final assignment step. * ov-list.cc (octave_list::subsasgn): Likewise. diff --git a/src/oct-map.cc b/src/oct-map.cc --- a/src/oct-map.cc +++ b/src/oct-map.cc @@ -69,16 +69,22 @@ if (! error_state) { - int n = tmp.length (); + int rhs_len = tmp.length (); + + int len = array_length (); - if (n > array_length ()) + octave_value fill_value = Matrix (); + + if (rhs_len < len) { - octave_value fill_value = Matrix (); - + tmp.resize (len, fill_value); + } + else if (rhs_len > len) + { for (Pix p = first (); p != 0; next (p)) - contents(p).resize (n, fill_value); + contents(p).resize (len, fill_value); - array_len = n; + array_len = len; } map[key] = tmp;