# HG changeset patch # User Jaroslav Hajek # Date 1225295530 -3600 # Node ID 25bc2d31e1bfa765f01279c7eb2a32a997c263cd # Parent c43481a19bfe496accc54fd2f57c7dd0993acbe6 improve OCTAVE_LOCAL_BUFFER diff -r c43481a19bfe -r 25bc2d31e1bf ChangeLog --- a/ChangeLog Fri Dec 05 12:51:48 2008 +0100 +++ b/ChangeLog Wed Oct 29 16:52:10 2008 +0100 @@ -1,3 +1,8 @@ +2008-10-29 Jaroslav Hajek + + * configure.in: Remove the OCTAVE_LOCAL_BUFFER stuff (moved to + liboctave). + 2008-12-04 Jaroslav Hajek * NEWS: Document more new features. diff -r c43481a19bfe -r 25bc2d31e1bf configure.in --- a/configure.in Fri Dec 05 12:51:48 2008 +0100 +++ b/configure.in Wed Oct 29 16:52:10 2008 +0100 @@ -1932,32 +1932,6 @@ #define OCTAVE_HAVE_SIG_JUMP #endif -/* Always use vector, since we sometimes allocate large chunks - of memory and that can cause trouble due to stack size limits. - - Note that using auto_ptr is not appropriate because it uses delete, - not delete[] and we need the latter to properly handle arrays - allocated with new[size]. - - Use < T > instead of to avoid problems if T is a template type - (say, foo) and the preprocessor fails to insert a space and - generates >. - -#if defined (HAVE_DYNAMIC_AUTO_ARRAYS) - -#define OCTAVE_LOCAL_BUFFER(T, buf, size) \ - T buf[size] - -#else - -*/ - -#define OCTAVE_LOCAL_BUFFER(T, buf, size) \ - std::vector< T > buf ## _vector (size); \ - T *buf = ((size) > 0 ? &(buf ## _vector[0]) : 0) - -/* #endif */ - #if defined (__DECCXX) #define __USE_STD_IOSTREAM #endif diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/Array-d.cc --- a/liboctave/Array-d.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/Array-d.cc Wed Oct 29 16:52:10 2008 +0100 @@ -30,6 +30,7 @@ #include "Array.h" #include "Array.cc" #include "oct-sort.cc" +#include "oct-locbuf.h" #if defined (HAVE_IEEE754_DATA_FORMAT) diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/Array-f.cc --- a/liboctave/Array-f.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/Array-f.cc Wed Oct 29 16:52:10 2008 +0100 @@ -30,6 +30,7 @@ #include "Array.h" #include "Array.cc" #include "oct-sort.cc" +#include "oct-locbuf.h" #if defined (HAVE_IEEE754_DATA_FORMAT) diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/Array.cc --- a/liboctave/Array.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/Array.cc Wed Oct 29 16:52:10 2008 +0100 @@ -40,6 +40,7 @@ #include "Array-util.h" #include "idx-vector.h" #include "lo-error.h" +#include "oct-locbuf.h" // One dimensional array class. Handles the reference counting for // all the derived classes. diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/CMatrix.cc --- a/liboctave/CMatrix.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/CMatrix.cc Wed Oct 29 16:52:10 2008 +0100 @@ -47,6 +47,7 @@ #include "f77-fcn.h" #include "functor.h" #include "lo-error.h" +#include "oct-locbuf.h" #include "lo-ieee.h" #include "lo-mappers.h" #include "lo-utils.h" diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/CNDArray.cc --- a/liboctave/CNDArray.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/CNDArray.cc Wed Oct 29 16:52:10 2008 +0100 @@ -36,6 +36,7 @@ #include "functor.h" #include "lo-ieee.h" #include "lo-mappers.h" +#include "oct-locbuf.h" #if defined (HAVE_FFTW3) #include "oct-fftw.h" diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/CSparse.cc --- a/liboctave/CSparse.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/CSparse.cc Wed Oct 29 16:52:10 2008 +0100 @@ -35,6 +35,7 @@ #include "lo-mappers.h" #include "f77-fcn.h" #include "dRowVector.h" +#include "oct-locbuf.h" #include "CSparse.h" #include "boolSparse.h" diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/ChangeLog --- a/liboctave/ChangeLog Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/ChangeLog Wed Oct 29 16:52:10 2008 +0100 @@ -1,3 +1,15 @@ +2008-10-29 Jaroslav Hajek + + * oct-locbuf.h: New header file. + * Array-d.cc, Array-f.cc, Array.cc, CMatrix.cc, CNDArray.cc, + CSparse.cc, CmplxCHOL.cc, CmplxGEPBAL.cc, MatrixType.cc, + Sparse-op-defs.h, Sparse.cc, SparseCmplxLU.cc, SparseCmplxQR.cc, + SparseQR.cc, SparsedbleLU.cc, dMatrix.cc, dNDArray.cc, dSparse.cc, + data-conv.cc, dbleCHOL.cc, dbleGEPBAL.cc, fCMatrix.cc, fCNDArray.cc, + fCmplxCHOL.cc, fCmplxGEPBAL.cc, fMatrix.cc, fNDArray.cc, file-ops.cc, + floatCHOL.cc, floatGEPBAL.cc, lo-sysdep.cc, oct-fftw.cc, oct-md5.cc, + oct-rand.cc, regex-match.cc, sparse-dmsolve.cc: Include oct-locbuf.h. + 2008-12-04 Jaroslav Hajek * DiagArray2.h (DiagArray2): Inherit Array privately. diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/CmplxCHOL.cc --- a/liboctave/CmplxCHOL.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/CmplxCHOL.cc Wed Oct 29 16:52:10 2008 +0100 @@ -34,6 +34,7 @@ #include "CmplxCHOL.h" #include "f77-fcn.h" #include "lo-error.h" +#include "oct-locbuf.h" extern "C" { diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/CmplxGEPBAL.cc --- a/liboctave/CmplxGEPBAL.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/CmplxGEPBAL.cc Wed Oct 29 16:52:10 2008 +0100 @@ -31,6 +31,7 @@ #include "CmplxGEPBAL.h" #include "Array-util.h" #include "f77-fcn.h" +#include "oct-locbuf.h" extern "C" { diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/MatrixType.cc --- a/liboctave/MatrixType.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/MatrixType.cc Wed Oct 29 16:52:10 2008 +0100 @@ -33,6 +33,7 @@ #include "dSparse.h" #include "CSparse.h" #include "oct-spparms.h" +#include "oct-locbuf.h" // FIXME There is a large code duplication here diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/Sparse-op-defs.h --- a/liboctave/Sparse-op-defs.h Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/Sparse-op-defs.h Wed Oct 29 16:52:10 2008 +0100 @@ -27,6 +27,7 @@ #include "Array-util.h" #include "mx-ops.h" +#include "oct-locbuf.h" #define SPARSE_BIN_OP_DECL(R, OP, X, Y, API) \ extern API R OP (const X&, const Y&) diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/Sparse.cc --- a/liboctave/Sparse.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/Sparse.cc Wed Oct 29 16:52:10 2008 +0100 @@ -39,6 +39,7 @@ #include "idx-vector.h" #include "lo-error.h" #include "quit.h" +#include "oct-locbuf.h" #include "Sparse.h" #include "sparse-sort.h" diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/SparseCmplxLU.cc --- a/liboctave/SparseCmplxLU.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/SparseCmplxLU.cc Wed Oct 29 16:52:10 2008 +0100 @@ -28,6 +28,7 @@ #include #include "lo-error.h" +#include "oct-locbuf.h" #include "SparseCmplxLU.h" #include "oct-spparms.h" diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/SparseCmplxQR.cc --- a/liboctave/SparseCmplxQR.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/SparseCmplxQR.cc Wed Oct 29 16:52:10 2008 +0100 @@ -27,6 +27,7 @@ #include "lo-error.h" #include "SparseCmplxQR.h" +#include "oct-locbuf.h" #if defined(CS_VER) && (((CS_VER == 2) && (CS_SUBVER < 2)) || (CS_VER < 2)) typedef double _Complex cs_complex_t; diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/SparseQR.cc --- a/liboctave/SparseQR.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/SparseQR.cc Wed Oct 29 16:52:10 2008 +0100 @@ -27,6 +27,7 @@ #include "lo-error.h" #include "SparseQR.h" +#include "oct-locbuf.h" SparseQR::SparseQR_rep::SparseQR_rep (const SparseMatrix& a, int order) { diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/SparsedbleLU.cc --- a/liboctave/SparsedbleLU.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/SparsedbleLU.cc Wed Oct 29 16:52:10 2008 +0100 @@ -28,6 +28,7 @@ #include #include "lo-error.h" +#include "oct-locbuf.h" #include "SparsedbleLU.h" #include "oct-spparms.h" diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/dMatrix.cc --- a/liboctave/dMatrix.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/dMatrix.cc Wed Oct 29 16:52:10 2008 +0100 @@ -43,6 +43,7 @@ #include "f77-fcn.h" #include "functor.h" #include "lo-error.h" +#include "oct-locbuf.h" #include "lo-ieee.h" #include "lo-mappers.h" #include "lo-utils.h" diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/dNDArray.cc --- a/liboctave/dNDArray.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/dNDArray.cc Wed Oct 29 16:52:10 2008 +0100 @@ -37,6 +37,7 @@ #include "lo-error.h" #include "lo-ieee.h" #include "lo-mappers.h" +#include "oct-locbuf.h" #if defined (HAVE_FFTW3) #include "oct-fftw.h" diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/dSparse.cc --- a/liboctave/dSparse.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/dSparse.cc Wed Oct 29 16:52:10 2008 +0100 @@ -35,6 +35,7 @@ #include "lo-mappers.h" #include "f77-fcn.h" #include "dRowVector.h" +#include "oct-locbuf.h" #include "CSparse.h" #include "boolSparse.h" diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/data-conv.cc --- a/liboctave/data-conv.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/data-conv.cc Wed Oct 29 16:52:10 2008 +0100 @@ -35,6 +35,7 @@ #include "data-conv.h" #include "lo-error.h" #include "lo-ieee.h" +#include "oct-locbuf.h" template void swap_bytes<2> (volatile void *, int); template void swap_bytes<4> (volatile void *, int); diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/dbleCHOL.cc --- a/liboctave/dbleCHOL.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/dbleCHOL.cc Wed Oct 29 16:52:10 2008 +0100 @@ -33,6 +33,7 @@ #include "dbleCHOL.h" #include "f77-fcn.h" #include "lo-error.h" +#include "oct-locbuf.h" extern "C" { diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/dbleGEPBAL.cc --- a/liboctave/dbleGEPBAL.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/dbleGEPBAL.cc Wed Oct 29 16:52:10 2008 +0100 @@ -31,6 +31,7 @@ #include "dbleGEPBAL.h" #include "Array-util.h" #include "f77-fcn.h" +#include "oct-locbuf.h" extern "C" { diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/fCMatrix.cc --- a/liboctave/fCMatrix.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/fCMatrix.cc Wed Oct 29 16:52:10 2008 +0100 @@ -46,6 +46,7 @@ #include "f77-fcn.h" #include "functor.h" #include "lo-error.h" +#include "oct-locbuf.h" #include "lo-ieee.h" #include "lo-mappers.h" #include "lo-utils.h" diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/fCNDArray.cc --- a/liboctave/fCNDArray.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/fCNDArray.cc Wed Oct 29 16:52:10 2008 +0100 @@ -36,6 +36,7 @@ #include "functor.h" #include "lo-ieee.h" #include "lo-mappers.h" +#include "oct-locbuf.h" #if defined (HAVE_FFTW3) #include "oct-fftw.h" diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/fCmplxCHOL.cc --- a/liboctave/fCmplxCHOL.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/fCmplxCHOL.cc Wed Oct 29 16:52:10 2008 +0100 @@ -34,6 +34,7 @@ #include "fCmplxCHOL.h" #include "f77-fcn.h" #include "lo-error.h" +#include "oct-locbuf.h" extern "C" { diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/fCmplxGEPBAL.cc --- a/liboctave/fCmplxGEPBAL.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/fCmplxGEPBAL.cc Wed Oct 29 16:52:10 2008 +0100 @@ -31,6 +31,7 @@ #include "fCmplxGEPBAL.h" #include "Array-util.h" #include "f77-fcn.h" +#include "oct-locbuf.h" extern "C" { diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/fMatrix.cc --- a/liboctave/fMatrix.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/fMatrix.cc Wed Oct 29 16:52:10 2008 +0100 @@ -42,6 +42,7 @@ #include "f77-fcn.h" #include "functor.h" #include "lo-error.h" +#include "oct-locbuf.h" #include "lo-ieee.h" #include "lo-mappers.h" #include "lo-utils.h" diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/fNDArray.cc --- a/liboctave/fNDArray.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/fNDArray.cc Wed Oct 29 16:52:10 2008 +0100 @@ -37,6 +37,7 @@ #include "lo-error.h" #include "lo-ieee.h" #include "lo-mappers.h" +#include "oct-locbuf.h" #if defined (HAVE_FFTW3) #include "oct-fftw.h" diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/file-ops.cc --- a/liboctave/file-ops.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/file-ops.cc Wed Oct 29 16:52:10 2008 +0100 @@ -50,6 +50,7 @@ #include "quit.h" #include "statdefs.h" #include "str-vec.h" +#include "oct-locbuf.h" file_ops::static_members *file_ops::static_members::instance = 0; diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/floatCHOL.cc --- a/liboctave/floatCHOL.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/floatCHOL.cc Wed Oct 29 16:52:10 2008 +0100 @@ -33,6 +33,7 @@ #include "floatCHOL.h" #include "f77-fcn.h" #include "lo-error.h" +#include "oct-locbuf.h" extern "C" { diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/floatGEPBAL.cc --- a/liboctave/floatGEPBAL.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/floatGEPBAL.cc Wed Oct 29 16:52:10 2008 +0100 @@ -31,6 +31,7 @@ #include "floatGEPBAL.h" #include "Array-util.h" #include "f77-fcn.h" +#include "oct-locbuf.h" extern "C" { diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/lo-sysdep.cc --- a/liboctave/lo-sysdep.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/lo-sysdep.cc Wed Oct 29 16:52:10 2008 +0100 @@ -48,6 +48,7 @@ #include "pathlen.h" #include "lo-sysdep.h" #include "str-vec.h" +#include "oct-locbuf.h" std::string octave_getcwd (void) diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/oct-fftw.cc --- a/liboctave/oct-fftw.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/oct-fftw.cc Wed Oct 29 16:52:10 2008 +0100 @@ -32,6 +32,7 @@ #include "lo-error.h" #include "oct-fftw.h" #include "quit.h" +#include "oct-locbuf.h" // Helper class to create and cache fftw plans for both 1d and // 2d. This implementation defaults to using FFTW_ESTIMATE to create diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/oct-locbuf.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/liboctave/oct-locbuf.h Wed Oct 29 16:52:10 2008 +0100 @@ -0,0 +1,81 @@ +/* + +Copyright (C) 2008 Jaroslav Hajek + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, see +. + +*/ + +#if !defined (octave_local_buffer_h) +#define octave_local_buffer_h 1 + +#include + +// The default local buffer simply encapsulates an *array* pointer that gets +// delete[]d automatically. For common POD types, we provide specializations. + +template +class octave_local_buffer +{ +public: + octave_local_buffer (size_t size) + : data (0) + { + if (size) + data = new T[size]; + } + ~octave_local_buffer (void) { delete [] data; } + operator T *() const { return data; } +private: + T *data; +}; + + +// If the compiler supports dynamic stack arrays, we can use the attached hack to +// place small buffer arrays on the stack. + +#ifdef HAVE_DYNAMIC_AUTO_ARRAYS + +// Maximum buffer size (in bytes) to be placed on the stack. + +#define OCTAVE_LOCAL_BUFFER_MAX_STACK_SIZE 8192 + +// If we have automatic arrays, we use an automatic array if the size is small +// enough. To avoid possibly evaluating `size' multiple times, we first cache +// it. Note that we always construct both the stack array and the +// octave_local_buffer object, but only one of them will be nonempty. + +#define OCTAVE_LOCAL_BUFFER(T, buf, size) \ + const size_t _bufsize_ ## buf = size; \ + const bool _lbufaut_ ## buf = _bufsize_ ## buf * sizeof (T) \ + <= OCTAVE_LOCAL_BUFFER_MAX_STACK_SIZE; \ + T _bufaut_ ## buf [_lbufaut_ ## buf ? _bufsize_ ## buf : 0]; \ + octave_local_buffer _bufheap_ ## buf (!_lbufaut_ ## buf ? _bufsize_ ## buf : 0); \ + T *buf = _lbufaut_ ## buf ? _bufaut_ ## buf : static_cast (_bufheap_ ## buf); + +#else + +// If we don't have automatic arrays, we simply always use octave_local_buffer. + +#define OCTAVE_LOCAL_BUFFER(T, buf, size) \ + octave_local_buffer _buffer_ ## buf (size); \ + T *buf = _buffer_ ## buf; + +#endif + +#endif + diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/oct-md5.cc --- a/liboctave/oct-md5.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/oct-md5.cc Wed Oct 29 16:52:10 2008 +0100 @@ -30,6 +30,7 @@ #include "lo-error.h" #include "oct-md5.h" #include "md5.h" +#include "oct-locbuf.h" std::string oct_md5 (const std::string str) diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/oct-rand.cc --- a/liboctave/oct-rand.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/oct-rand.cc Wed Oct 29 16:52:10 2008 +0100 @@ -38,6 +38,7 @@ #include "randpoisson.h" #include "randgamma.h" #include "mach-info.h" +#include "oct-locbuf.h" extern "C" { diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/regex-match.cc --- a/liboctave/regex-match.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/regex-match.cc Wed Oct 29 16:52:10 2008 +0100 @@ -30,6 +30,7 @@ #include "regex-match.h" #include "str-vec.h" +#include "oct-locbuf.h" regex_match& regex_match::operator = (const regex_match& gm) diff -r c43481a19bfe -r 25bc2d31e1bf liboctave/sparse-dmsolve.cc --- a/liboctave/sparse-dmsolve.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/liboctave/sparse-dmsolve.cc Wed Oct 29 16:52:10 2008 +0100 @@ -32,6 +32,7 @@ #include "SparseCmplxQR.h" #include "MatrixType.h" #include "oct-sort.h" +#include "oct-locbuf.h" template static MSparse diff -r c43481a19bfe -r 25bc2d31e1bf src/ChangeLog --- a/src/ChangeLog Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ChangeLog Wed Oct 29 16:52:10 2008 +0100 @@ -1,3 +1,17 @@ +2008-10-29 Jaroslav Hajek + * file-io.cc, gl-render.cc, load-save.cc, ls-hdf5.cc, ls-mat4.cc, + ls-mat5.cc, ls-oct-binary.cc, mex.cc, oct.h, ov-base-int.cc, + ov-bool-mat.cc, ov-bool-sparse.cc, ov-cell.cc, ov-class.cc, + ov-cx-mat.cc, ov-cx-sparse.cc, ov-fcn-handle.cc, ov-fcn-inline.cc, + ov-flt-cx-mat.cc, ov-flt-re-mat.cc, ov-re-mat.cc, ov-re-sparse.cc, + ov-str-mat.cc, ov-struct.cc, toplev.cc, + DLD-FUNCTIONS/__lin_interpn__.cc, DLD-FUNCTIONS/amd.cc, + DLD-FUNCTIONS/ccolamd.cc, DLD-FUNCTIONS/cellfun.cc, + DLD-FUNCTIONS/colamd.cc, DLD-FUNCTIONS/gcd.cc, + DLD-FUNCTIONS/matrix_type.cc, DLD-FUNCTIONS/regexp.cc, + DLD-FUNCTIONS/symbfact.cc, DLD-FUNCTIONS/symrcm.cc: + Include oct-locbuf.h. + 2008-12-05 Jaroslav Hajek * ov-base-diag.cc (save_ascii, load_ascii): Save natively. diff -r c43481a19bfe -r 25bc2d31e1bf src/DLD-FUNCTIONS/__lin_interpn__.cc --- a/src/DLD-FUNCTIONS/__lin_interpn__.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/DLD-FUNCTIONS/__lin_interpn__.cc Wed Oct 29 16:52:10 2008 +0100 @@ -25,6 +25,7 @@ #endif #include "dNDArray.h" +#include "oct-locbuf.h" #include "defun-dld.h" #include "error.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/DLD-FUNCTIONS/amd.cc --- a/src/DLD-FUNCTIONS/amd.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/DLD-FUNCTIONS/amd.cc Wed Oct 29 16:52:10 2008 +0100 @@ -42,6 +42,7 @@ #include "oct-map.h" #include "oct-sparse.h" +#include "oct-locbuf.h" #ifdef IDX_TYPE_LONG #define AMD_NAME(name) amd_l ## name diff -r c43481a19bfe -r 25bc2d31e1bf src/DLD-FUNCTIONS/ccolamd.cc --- a/src/DLD-FUNCTIONS/ccolamd.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/DLD-FUNCTIONS/ccolamd.cc Wed Oct 29 16:52:10 2008 +0100 @@ -41,6 +41,7 @@ #include "ov-cx-sparse.h" #include "oct-sparse.h" +#include "oct-locbuf.h" #ifdef IDX_TYPE_LONG #define CCOLAMD_NAME(name) ccolamd_l ## name diff -r c43481a19bfe -r 25bc2d31e1bf src/DLD-FUNCTIONS/cellfun.cc --- a/src/DLD-FUNCTIONS/cellfun.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/DLD-FUNCTIONS/cellfun.cc Wed Oct 29 16:52:10 2008 +0100 @@ -29,6 +29,7 @@ #include #include "lo-mappers.h" +#include "oct-locbuf.h" #include "Cell.h" #include "oct-map.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/DLD-FUNCTIONS/colamd.cc --- a/src/DLD-FUNCTIONS/colamd.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/DLD-FUNCTIONS/colamd.cc Wed Oct 29 16:52:10 2008 +0100 @@ -42,6 +42,7 @@ #include "ov-cx-sparse.h" #include "oct-sparse.h" +#include "oct-locbuf.h" #ifdef IDX_TYPE_LONG #define COLAMD_NAME(name) colamd_l ## name diff -r c43481a19bfe -r 25bc2d31e1bf src/DLD-FUNCTIONS/gcd.cc --- a/src/DLD-FUNCTIONS/gcd.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/DLD-FUNCTIONS/gcd.cc Wed Oct 29 16:52:10 2008 +0100 @@ -29,6 +29,7 @@ #include "fNDArray.h" #include "fCNDArray.h" #include "lo-mappers.h" +#include "oct-locbuf.h" #include "defun-dld.h" #include "error.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/DLD-FUNCTIONS/matrix_type.cc --- a/src/DLD-FUNCTIONS/matrix_type.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/DLD-FUNCTIONS/matrix_type.cc Wed Oct 29 16:52:10 2008 +0100 @@ -34,6 +34,7 @@ #include "ov-re-sparse.h" #include "ov-cx-sparse.h" #include "MatrixType.h" +#include "oct-locbuf.h" DEFUN_DLD (matrix_type, args, , "-*- texinfo -*-\n\ diff -r c43481a19bfe -r 25bc2d31e1bf src/DLD-FUNCTIONS/regexp.cc --- a/src/DLD-FUNCTIONS/regexp.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/DLD-FUNCTIONS/regexp.cc Wed Oct 29 16:52:10 2008 +0100 @@ -39,6 +39,7 @@ #include "str-vec.h" #include "quit.h" #include "parse.h" +#include "oct-locbuf.h" #if defined (HAVE_PCRE) #include diff -r c43481a19bfe -r 25bc2d31e1bf src/DLD-FUNCTIONS/symbfact.cc --- a/src/DLD-FUNCTIONS/symbfact.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/DLD-FUNCTIONS/symbfact.cc Wed Oct 29 16:52:10 2008 +0100 @@ -29,6 +29,7 @@ #include "SparsedbleCHOL.h" #include "oct-spparms.h" #include "sparse-util.h" +#include "oct-locbuf.h" #include "ov-re-sparse.h" #include "ov-cx-sparse.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/DLD-FUNCTIONS/symrcm.cc --- a/src/DLD-FUNCTIONS/symrcm.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/DLD-FUNCTIONS/symrcm.cc Wed Oct 29 16:52:10 2008 +0100 @@ -59,6 +59,7 @@ #include "error.h" #include "gripes.h" #include "utils.h" +#include "oct-locbuf.h" #include "ov-re-mat.h" #include "ov-re-sparse.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/file-io.cc --- a/src/file-io.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/file-io.cc Wed Oct 29 16:52:10 2008 +0100 @@ -63,6 +63,7 @@ #include "file-stat.h" #include "lo-ieee.h" #include "oct-env.h" +#include "oct-locbuf.h" #include "defun.h" #include "file-io.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/gl-render.cc --- a/src/gl-render.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/gl-render.cc Wed Oct 29 16:52:10 2008 +0100 @@ -27,6 +27,7 @@ #if defined (HAVE_OPENGL) #include +#include "oct-locbuf.h" #include "gl-render.h" #define LIGHT_MODE GL_FRONT_AND_BACK diff -r c43481a19bfe -r 25bc2d31e1bf src/load-save.cc --- a/src/load-save.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/load-save.cc Wed Oct 29 16:52:10 2008 +0100 @@ -54,6 +54,7 @@ #include "oct-time.h" #include "quit.h" #include "str-vec.h" +#include "oct-locbuf.h" #include "Cell.h" #include "defun.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ls-hdf5.cc --- a/src/ls-hdf5.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ls-hdf5.cc Wed Oct 29 16:52:10 2008 +0100 @@ -50,6 +50,7 @@ #include "oct-time.h" #include "quit.h" #include "str-vec.h" +#include "oct-locbuf.h" #include "Cell.h" #include "defun.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ls-mat4.cc --- a/src/ls-mat4.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ls-mat4.cc Wed Oct 29 16:52:10 2008 +0100 @@ -44,6 +44,7 @@ #include "oct-time.h" #include "quit.h" #include "str-vec.h" +#include "oct-locbuf.h" #include "Cell.h" #include "defun.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ls-mat5.cc --- a/src/ls-mat5.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ls-mat5.cc Wed Oct 29 16:52:10 2008 +0100 @@ -48,6 +48,7 @@ #include "quit.h" #include "str-vec.h" #include "file-stat.h" +#include "oct-locbuf.h" #include "Cell.h" #include "defun.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ls-oct-binary.cc --- a/src/ls-oct-binary.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ls-oct-binary.cc Wed Oct 29 16:52:10 2008 +0100 @@ -44,6 +44,7 @@ #include "oct-time.h" #include "quit.h" #include "str-vec.h" +#include "oct-locbuf.h" #include "Cell.h" #include "defun.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/mex.cc --- a/src/mex.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/mex.cc Wed Oct 29 16:52:10 2008 +0100 @@ -33,6 +33,7 @@ #include "f77-fcn.h" #include "lo-ieee.h" +#include "oct-locbuf.h" // mxArray must be declared as a class before including mexproto.h. class mxArray; diff -r c43481a19bfe -r 25bc2d31e1bf src/oct.h --- a/src/oct.h Fri Dec 05 12:51:48 2008 +0100 +++ b/src/oct.h Wed Oct 29 16:52:10 2008 +0100 @@ -32,6 +32,7 @@ #include "Matrix.h" +#include "oct-locbuf.h" #include "defun-dld.h" #include "error.h" #include "gripes.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-base-int.cc --- a/src/ov-base-int.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-base-int.cc Wed Oct 29 16:52:10 2008 +0100 @@ -33,6 +33,7 @@ #include "lo-utils.h" #include "mx-base.h" #include "quit.h" +#include "oct-locbuf.h" #include "defun.h" #include "gripes.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-bool-mat.cc --- a/src/ov-bool-mat.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-bool-mat.cc Wed Oct 29 16:52:10 2008 +0100 @@ -30,6 +30,7 @@ #include "lo-ieee.h" #include "mx-base.h" +#include "oct-locbuf.h" #include "gripes.h" #include "oct-obj.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-bool-sparse.cc --- a/src/ov-bool-sparse.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-bool-sparse.cc Wed Oct 29 16:52:10 2008 +0100 @@ -36,6 +36,7 @@ #include "ov-bool-mat.h" #include "gripes.h" #include "ops.h" +#include "oct-locbuf.h" #include "ov-re-sparse.h" #include "ov-cx-sparse.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-cell.cc --- a/src/ov-cell.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-cell.cc Wed Oct 29 16:52:10 2008 +0100 @@ -34,6 +34,7 @@ #include "byte-swap.h" #include "lo-utils.h" #include "quit.h" +#include "oct-locbuf.h" #include "defun.h" #include "error.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-class.cc --- a/src/ov-class.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-class.cc Wed Oct 29 16:52:10 2008 +0100 @@ -28,6 +28,7 @@ #include "Array-util.h" #include "byte-swap.h" +#include "oct-locbuf.h" #include "Cell.h" #include "defun.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-cx-mat.cc --- a/src/ov-cx-mat.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-cx-mat.cc Wed Oct 29 16:52:10 2008 +0100 @@ -34,6 +34,7 @@ #include "lo-mappers.h" #include "mx-base.h" #include "mach-info.h" +#include "oct-locbuf.h" #include "gripes.h" #include "oct-obj.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-cx-sparse.cc --- a/src/ov-cx-sparse.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-cx-sparse.cc Wed Oct 29 16:52:10 2008 +0100 @@ -32,6 +32,7 @@ #include "lo-specfun.h" #include "lo-mappers.h" +#include "oct-locbuf.h" #include "ov-base.h" #include "ov-scalar.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-fcn-handle.cc --- a/src/ov-fcn-handle.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-fcn-handle.cc Wed Oct 29 16:52:10 2008 +0100 @@ -29,6 +29,7 @@ #include #include "file-ops.h" +#include "oct-locbuf.h" #include "defun.h" #include "error.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-fcn-inline.cc --- a/src/ov-fcn-inline.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-fcn-inline.cc Wed Oct 29 16:52:10 2008 +0100 @@ -33,6 +33,8 @@ #include #include +#include "oct-locbuf.h" + #include "defun.h" #include "error.h" #include "gripes.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-flt-cx-mat.cc --- a/src/ov-flt-cx-mat.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-flt-cx-mat.cc Wed Oct 29 16:52:10 2008 +0100 @@ -34,6 +34,7 @@ #include "lo-mappers.h" #include "mx-base.h" #include "mach-info.h" +#include "oct-locbuf.h" #include "gripes.h" #include "oct-obj.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-flt-re-mat.cc --- a/src/ov-flt-re-mat.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-flt-re-mat.cc Wed Oct 29 16:52:10 2008 +0100 @@ -38,6 +38,7 @@ #include "mach-info.h" #include "mx-base.h" #include "quit.h" +#include "oct-locbuf.h" #include "defun.h" #include "gripes.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-re-mat.cc --- a/src/ov-re-mat.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-re-mat.cc Wed Oct 29 16:52:10 2008 +0100 @@ -38,6 +38,7 @@ #include "mach-info.h" #include "mx-base.h" #include "quit.h" +#include "oct-locbuf.h" #include "defun.h" #include "gripes.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-re-sparse.cc --- a/src/ov-re-sparse.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-re-sparse.cc Wed Oct 29 16:52:10 2008 +0100 @@ -32,6 +32,7 @@ #include "lo-specfun.h" #include "lo-mappers.h" +#include "oct-locbuf.h" #include "ov-base.h" #include "ov-scalar.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-str-mat.cc --- a/src/ov-str-mat.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-str-mat.cc Wed Oct 29 16:52:10 2008 +0100 @@ -34,6 +34,7 @@ #include "lo-ieee.h" #include "mach-info.h" #include "mx-base.h" +#include "oct-locbuf.h" #include "defun.h" #include "byte-swap.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/ov-struct.cc --- a/src/ov-struct.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/ov-struct.cc Wed Oct 29 16:52:10 2008 +0100 @@ -39,6 +39,7 @@ #include "variables.h" #include "Array-util.h" +#include "oct-locbuf.h" #include "byte-swap.h" #include "ls-oct-ascii.h" diff -r c43481a19bfe -r 25bc2d31e1bf src/toplev.cc --- a/src/toplev.cc Fri Dec 05 12:51:48 2008 +0100 +++ b/src/toplev.cc Wed Oct 29 16:52:10 2008 +0100 @@ -50,6 +50,7 @@ #include "oct-env.h" #include "quit.h" #include "str-vec.h" +#include "oct-locbuf.h" #include #include "defun.h"