octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MSVC patch: support for HDF5


From: John W. Eaton
Subject: MSVC patch: support for HDF5
Date: Wed, 7 Feb 2007 03:13:10 -0500

On 14-Dec-2006, address@hidden wrote:

| The attached patch fixes a few things to compile octave with HDF5
| support. Mainly:
| - replacement of dynamically-sized arrays with std::vector, because
| those are not supported by MSVC
| - additional config test, when using HDF5 compiled as a DLL

I applied the configure test as you sent it, but used
OCTAVE_LOCAL_BUFFER unconditionally instead of std::vector.

Your patch also included the folling parts:

  Index: src/ov-cell.cc
  ===================================================================
  RCS file: /cvs/octave/src/ov-cell.cc,v
  retrieving revision 1.74
  diff -c -p -r1.74 ov-cell.cc
  *** src/ov-cell.cc    27 Oct 2006 18:04:50 -0000      1.74
  --- src/ov-cell.cc    14 Dec 2006 10:26:16 -0000
  *************** octave_cell::save_hdf5 (hid_t loc_id, co
  *** 775,781 ****
          return false;
        }

  !   if (! H5Dwrite (size_hid, H5T_NATIVE_IDX, H5S_ALL, H5S_ALL,
                    H5P_DEFAULT, hdims) < 0)
        {
          H5Dclose (size_hid);
  --- 775,781 ----
          return false;
        }

  !   if (H5Dwrite (size_hid, H5T_NATIVE_IDX, H5S_ALL, H5S_ALL,
                    H5P_DEFAULT, hdims) < 0)
        {
          H5Dclose (size_hid);
  *************** octave_cell::save_hdf5 (hid_t loc_id, co
  *** 796,802 ****
      for (octave_idx_type i = 0; i < nel; i++)
        {
          std::ostringstream buf;
  !       int digits = static_cast<int> (floor (log10 (nel) + 1.0));
          buf << "_" << std::setw (digits) << std::setfill ('0') << i;
          std::string s = buf.str ();

  --- 796,802 ----
      for (octave_idx_type i = 0; i < nel; i++)
        {
          std::ostringstream buf;
  !       int digits = static_cast<int> (floor (log10 (double (nel)) + 1.0));
          buf << "_" << std::setw (digits) << std::setfill ('0') << i;
          std::string s = buf.str ();

  Index: src/toplev.cc
  ===================================================================
  RCS file: /cvs/octave/src/toplev.cc,v
  retrieving revision 1.190
  diff -c -p -r1.190 toplev.cc
  *** src/toplev.cc     28 Oct 2006 16:30:52 -0000      1.190
  --- src/toplev.cc     14 Dec 2006 10:26:16 -0000
  *************** specified option.\n\
  *** 841,847 ****
            const char *key = conf_info[i++];

            if (key)
  !         m.assign (key, octave_value (conf_info[i++]));
            else
              break;
          }
  --- 841,847 ----
            const char *key = conf_info[i++];

            if (key)
  !         m.assign (key, octave_value (subst_octave_home (conf_info[i++])));
            else
              break;
          }


I applied the changes to ov-cell.cc but not the one to toplev.cc since
that has now been handled differently.

Thanks,

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]