Mercurial > hg > octave-nkf
changeset 5850:426b94346d70
[project @ 2006-06-09 15:44:35 by jwe]
author | jwe |
---|---|
date | Fri, 09 Jun 2006 15:46:10 +0000 |
parents | e89f8bae317b |
children | acb4a1e0b311 |
files | src/ChangeLog src/ov-cell.cc src/version.h |
diffstat | 3 files changed, 22 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2006-06-09 John W. Eaton <jwe@octave.org> + + * 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 <sfegan@astro.ucla.edu>. + 2006-06-08 John W. Eaton <jwe@octave.org> * ov-usr-fcn.cc (function::do_multi_index_op): Append contents of
--- a/src/ov-cell.cc +++ b/src/ov-cell.cc @@ -25,6 +25,7 @@ #include <config.h> #endif +#include <iomanip> #include <iostream> #include <sstream> #include <vector> @@ -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<int> (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;
--- a/src/version.h +++ b/src/version.h @@ -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."