comparison libinterp/corefcn/load-save.cc @ 19898:17d647821d61

maint: More cleanup of C++ code to follow Octave coding conventions. * gl-select.cc, betainc.cc, bitfcns.cc, bsxfun.cc, gl-render.cc, graphics.cc, load-save.cc, ls-mat-ascii.cc, ls-mat5.cc, lu.cc, oct-stream.cc, symtab.cc, variables.cc, __eigs__.cc, __magick_read__.cc, chol.cc, ov-base-sparse.cc, ov-class.cc, ov-classdef.cc, ov-fcn-inline.cc, ov-perm.cc, ov.cc, CMatrix.cc, CSparse.cc, MSparse.cc, MatrixType.cc, MatrixType.h, dMatrix.cc, dSparse.cc, fCMatrix.cc, fMatrix.cc, eigs-base.cc, lo-sysdep.cc, kpse.cc: Break long lines before && and ||.
author John W. Eaton <jwe@octave.org>
date Thu, 26 Feb 2015 13:07:04 -0500
parents bafcfc5b99af
children 4f45eaf83908
comparison
equal deleted inserted replaced
19897:09ed6f7538dd 19898:17d647821d61
213 { 213 {
214 bool retval = false; 214 bool retval = false;
215 std::ifstream file (fname.c_str ()); 215 std::ifstream file (fname.c_str ());
216 OCTAVE_LOCAL_BUFFER (unsigned char, magic, 2); 216 OCTAVE_LOCAL_BUFFER (unsigned char, magic, 2);
217 217
218 if (file.read (reinterpret_cast<char *> (magic), 2) && magic[0] == 0x1f && 218 if (file.read (reinterpret_cast<char *> (magic), 2) && magic[0] == 0x1f
219 magic[1] == 0x8b) 219 && magic[1] == 0x8b)
220 retval = true; 220 retval = true;
221 221
222 file.close (); 222 file.close ();
223 return retval; 223 return retval;
224 } 224 }
1711 { 1711 {
1712 error ("save: appending to HDF5 files is not implemented"); 1712 error ("save: appending to HDF5 files is not implemented");
1713 return retval; 1713 return retval;
1714 } 1714 }
1715 1715
1716 bool write_header_info = ! (append && 1716 bool write_header_info
1717 H5Fis_hdf5 (fname.c_str ()) > 0); 1717 = ! (append && H5Fis_hdf5 (fname.c_str ()) > 0);
1718 1718
1719 hdf5_ofstream hdf5_file (fname.c_str (), mode); 1719 hdf5_ofstream hdf5_file (fname.c_str (), mode);
1720 1720
1721 if (hdf5_file.file_id != -1) 1721 if (hdf5_file.file_id != -1)
1722 { 1722 {