Mercurial > hg > octave-nkf
diff libinterp/corefcn/oct-stream.cc @ 20071: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 | 19755f4fc851 |
children | e914b5399c67 7fa170cc14fe |
line wrap: on
line diff
--- a/libinterp/corefcn/oct-stream.cc +++ b/libinterp/corefcn/oct-stream.cc @@ -4226,15 +4226,18 @@ if ((stream_number = os.file_number ()) == -1) return stream_number; - // Should we test for "(list.find (stream_number) != list.end ()) && - // list[stream_number].is_open ()" and respond with "error - // ("internal error: ...")"? It should not happen except for some - // bug or if the user has opened a stream with an interpreted - // command, but closed it directly with a system call in an - // oct-file; then the kernel knows the fd is free, but Octave does - // not know. If it happens, it should not do harm here to simply - // overwrite this entry, although the wrong entry might have done - // harm before. + // Should we test for + // + // (list.find (stream_number) != list.end () + // && list[stream_number].is_open ()) + // + // and respond with "error ("internal error: ...")"? It should not + // happen except for some bug or if the user has opened a stream with + // an interpreted command, but closed it directly with a system call + // in an oct-file; then the kernel knows the fd is free, but Octave + // does not know. If it happens, it should not do harm here to simply + // overwrite this entry, although the wrong entry might have done harm + // before. if (list.size () < list.max_size ()) list[stream_number] = os;