# HG changeset patch # User jwe # Date 1149867970 0 # Node ID 426b94346d702634366decd1b37d450251c3e2b2 # Parent e89f8bae317be67a197627550f06908c631a59fd [project @ 2006-06-09 15:44:35 by jwe] diff -r e89f8bae317b -r 426b94346d70 src/ChangeLog --- a/src/ChangeLog Fri Jun 09 04:46:25 2006 +0000 +++ b/src/ChangeLog Fri Jun 09 15:46:10 2006 +0000 @@ -1,3 +1,13 @@ +2006-06-09 John W. Eaton + + * version.h (OCTAVE_VERSION): Now 2.9.6. + (OCTAVE_API_VERSION): Now api-v19. + (OCTAVE_RELEASE_DATE): Now 2006-06-09. + + * ov-cell.cc (cell::save_hdf5): Use leading zeros to keep elements + correctly sorted in the HDF file. + From Stephen Fegan . + 2006-06-08 John W. Eaton * ov-usr-fcn.cc (function::do_multi_index_op): Append contents of diff -r e89f8bae317b -r 426b94346d70 src/ov-cell.cc --- a/src/ov-cell.cc Fri Jun 09 04:46:25 2006 +0000 +++ b/src/ov-cell.cc Fri Jun 09 15:46:10 2006 +0000 @@ -25,6 +25,7 @@ #include #endif +#include #include #include #include @@ -791,15 +792,18 @@ // Recursively add each element of the cell to this group. Cell tmp = cell_value (); - - for (octave_idx_type i = 0; i < dv.numel (); i++) + + octave_idx_type nel = dv.numel (); + + for (octave_idx_type i = 0; i < nel; i++) { std::ostringstream buf; - buf << "_" << i; + int digits = static_cast (floor (log10 (nel) + 1.0)); + buf << "_" << std::setw (digits) << std::setfill ('0') << i; std::string s = buf.str (); - if (! add_hdf5_data(data_hid, tmp.elem (i), s.c_str (), "", false, - save_as_floats)) + if (! add_hdf5_data (data_hid, tmp.elem (i), s.c_str (), "", false, + save_as_floats)) { H5Gclose (data_hid); return false; diff -r e89f8bae317b -r 426b94346d70 src/version.h --- a/src/version.h Fri Jun 09 04:46:25 2006 +0000 +++ b/src/version.h Fri Jun 09 15:46:10 2006 +0000 @@ -25,11 +25,11 @@ #if !defined (octave_version_h) #define octave_version_h 1 -#define OCTAVE_VERSION "2.9.5+" +#define OCTAVE_VERSION "2.9.6" -#define OCTAVE_API_VERSION "api-v18" +#define OCTAVE_API_VERSION "api-v19" -#define OCTAVE_RELEASE_DATE "2006-03-22" +#define OCTAVE_RELEASE_DATE "2006-06-09" #define OCTAVE_COPYRIGHT \ "Copyright (C) 2006 John W. Eaton."