Mercurial > hg > octave-nkf
diff src/ls-hdf5.h @ 10313:f3b65e1ae355
untabify src header files
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 11 Feb 2010 12:16:43 -0500 |
parents | cd96d29c5efa |
children | 2271261f088a |
line wrap: on
line diff
--- a/src/ls-hdf5.h +++ b/src/ls-hdf5.h @@ -50,17 +50,17 @@ hdf5_fstreambase (const char *name, int mode, int /* prot */ = 0) { if (mode & std::ios::in) - file_id = H5Fopen (name, H5F_ACC_RDONLY, H5P_DEFAULT); + file_id = H5Fopen (name, H5F_ACC_RDONLY, H5P_DEFAULT); else if (mode & std::ios::out) - { - if (mode & std::ios::app && H5Fis_hdf5 (name) > 0) - file_id = H5Fopen (name, H5F_ACC_RDWR, H5P_DEFAULT); - else - file_id = H5Fcreate (name, H5F_ACC_TRUNC, H5P_DEFAULT, - H5P_DEFAULT); - } + { + if (mode & std::ios::app && H5Fis_hdf5 (name) > 0) + file_id = H5Fopen (name, H5F_ACC_RDWR, H5P_DEFAULT); + else + file_id = H5Fcreate (name, H5F_ACC_TRUNC, H5P_DEFAULT, + H5P_DEFAULT); + } if (file_id < 0) - std::ios::setstate (std::ios::badbit); + std::ios::setstate (std::ios::badbit); current_item = 0; } @@ -68,11 +68,11 @@ void close () { if (file_id >= 0) - { - if (H5Fclose (file_id) < 0) - std::ios::setstate (std::ios::badbit); - file_id = -1; - } + { + if (H5Fclose (file_id) < 0) + std::ios::setstate (std::ios::badbit); + file_id = -1; + } } void open (const char *name, int mode, int) @@ -80,17 +80,17 @@ clear (); if (mode & std::ios::in) - file_id = H5Fopen (name, H5F_ACC_RDONLY, H5P_DEFAULT); + file_id = H5Fopen (name, H5F_ACC_RDONLY, H5P_DEFAULT); else if (mode & std::ios::out) - { - if (mode & std::ios::app && H5Fis_hdf5 (name) > 0) - file_id = H5Fopen (name, H5F_ACC_RDWR, H5P_DEFAULT); - else - file_id = H5Fcreate (name, H5F_ACC_TRUNC, H5P_DEFAULT, - H5P_DEFAULT); - } + { + if (mode & std::ios::app && H5Fis_hdf5 (name) > 0) + file_id = H5Fopen (name, H5F_ACC_RDWR, H5P_DEFAULT); + else + file_id = H5Fcreate (name, H5F_ACC_TRUNC, H5P_DEFAULT, + H5P_DEFAULT); + } if (file_id < 0) - std::ios::setstate (std::ios::badbit); + std::ios::setstate (std::ios::badbit); current_item = 0; } @@ -106,11 +106,11 @@ hdf5_ifstream () : hdf5_fstreambase (), std::istream (0) { } hdf5_ifstream (const char *name, int mode = std::ios::in|std::ios::binary, - int prot = 0) + int prot = 0) : hdf5_fstreambase (name, mode, prot), std::istream (0) { } void open (const char *name, int mode = std::ios::in|std::ios::binary, - int prot = 0) + int prot = 0) { hdf5_fstreambase::open (name, mode, prot); } }; @@ -121,11 +121,11 @@ hdf5_ofstream () : hdf5_fstreambase (), std::ostream (0) { } hdf5_ofstream (const char *name, int mode = std::ios::out|std::ios::binary, - int prot = 0) + int prot = 0) : hdf5_fstreambase (name, mode, prot), std::ostream (0) { } void open (const char *name, int mode = std::ios::out|std::ios::binary, - int prot = 0) + int prot = 0) { hdf5_fstreambase::open (name, mode, prot); } }; @@ -168,8 +168,8 @@ extern OCTINTERP_API bool add_hdf5_data (hid_t loc_id, const octave_value& tc, - const std::string& name, const std::string& doc, - bool mark_as_global, bool save_as_floats); + const std::string& name, const std::string& doc, + bool mark_as_global, bool save_as_floats); extern OCTINTERP_API int save_hdf5_empty (hid_t loc_id, const char *name, const dim_vector d); @@ -179,12 +179,12 @@ extern OCTINTERP_API std::string read_hdf5_data (std::istream& is, const std::string& filename, bool& global, - octave_value& tc, std::string& doc); + octave_value& tc, std::string& doc); extern OCTINTERP_API bool save_hdf5_data (std::ostream& os, const octave_value& tc, - const std::string& name, const std::string& doc, - bool mark_as_global, bool save_as_floats); + const std::string& name, const std::string& doc, + bool mark_as_global, bool save_as_floats); #ifdef IDX_TYPE_LONG #define H5T_NATIVE_IDX H5T_NATIVE_LONG