# HG changeset patch # User Jaroslav Hajek # Date 1225295530 -3600 # Node ID 3de10c0653e23b5edb1dfa4d16a492d92c89fe6d # Parent 4ceffd54031a05309a5430e728134eec0ff17b6a improve OCTAVE_LOCAL_BUFFER diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -0,0 +1,5 @@ +2008-10-29 Jaroslav Hajek + + * configure.in: Remove the OCTAVE_LOCAL_BUFFER stuff (moved to + liboctave). + diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -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 --git a/liboctave/Array-d.cc b/liboctave/Array-d.cc --- a/liboctave/Array-d.cc +++ b/liboctave/Array-d.cc @@ -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 --git a/liboctave/Array-f.cc b/liboctave/Array-f.cc --- a/liboctave/Array-f.cc +++ b/liboctave/Array-f.cc @@ -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 --git a/liboctave/Array.cc b/liboctave/Array.cc --- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -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 --git a/liboctave/CMatrix.cc b/liboctave/CMatrix.cc --- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -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 --git a/liboctave/CNDArray.cc b/liboctave/CNDArray.cc --- a/liboctave/CNDArray.cc +++ b/liboctave/CNDArray.cc @@ -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 --git a/liboctave/CSparse.cc b/liboctave/CSparse.cc --- a/liboctave/CSparse.cc +++ b/liboctave/CSparse.cc @@ -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 --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -0,0 +1,12 @@ +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. + diff --git a/liboctave/CmplxCHOL.cc b/liboctave/CmplxCHOL.cc --- a/liboctave/CmplxCHOL.cc +++ b/liboctave/CmplxCHOL.cc @@ -34,6 +34,7 @@ #include "CmplxCHOL.h" #include "f77-fcn.h" #include "lo-error.h" +#include "oct-locbuf.h" extern "C" { diff --git a/liboctave/CmplxGEPBAL.cc b/liboctave/CmplxGEPBAL.cc --- a/liboctave/CmplxGEPBAL.cc +++ b/liboctave/CmplxGEPBAL.cc @@ -31,6 +31,7 @@ #include "CmplxGEPBAL.h" #include "Array-util.h" #include "f77-fcn.h" +#include "oct-locbuf.h" extern "C" { diff --git a/liboctave/MatrixType.cc b/liboctave/MatrixType.cc --- a/liboctave/MatrixType.cc +++ b/liboctave/MatrixType.cc @@ -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 --git a/liboctave/Sparse-op-defs.h b/liboctave/Sparse-op-defs.h --- a/liboctave/Sparse-op-defs.h +++ b/liboctave/Sparse-op-defs.h @@ -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 --git a/liboctave/Sparse.cc b/liboctave/Sparse.cc --- a/liboctave/Sparse.cc +++ b/liboctave/Sparse.cc @@ -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 --git a/liboctave/SparseCmplxLU.cc b/liboctave/SparseCmplxLU.cc --- a/liboctave/SparseCmplxLU.cc +++ b/liboctave/SparseCmplxLU.cc @@ -28,6 +28,7 @@ #include #include "lo-error.h" +#include "oct-locbuf.h" #include "SparseCmplxLU.h" #include "oct-spparms.h" diff --git a/liboctave/SparseCmplxQR.cc b/liboctave/SparseCmplxQR.cc --- a/liboctave/SparseCmplxQR.cc +++ b/liboctave/SparseCmplxQR.cc @@ -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 --git a/liboctave/SparseQR.cc b/liboctave/SparseQR.cc --- a/liboctave/SparseQR.cc +++ b/liboctave/SparseQR.cc @@ -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 --git a/liboctave/SparsedbleLU.cc b/liboctave/SparsedbleLU.cc --- a/liboctave/SparsedbleLU.cc +++ b/liboctave/SparsedbleLU.cc @@ -28,6 +28,7 @@ #include #include "lo-error.h" +#include "oct-locbuf.h" #include "SparsedbleLU.h" #include "oct-spparms.h" diff --git a/liboctave/dMatrix.cc b/liboctave/dMatrix.cc --- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -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 --git a/liboctave/dNDArray.cc b/liboctave/dNDArray.cc --- a/liboctave/dNDArray.cc +++ b/liboctave/dNDArray.cc @@ -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 --git a/liboctave/dSparse.cc b/liboctave/dSparse.cc --- a/liboctave/dSparse.cc +++ b/liboctave/dSparse.cc @@ -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 --git a/liboctave/data-conv.cc b/liboctave/data-conv.cc --- a/liboctave/data-conv.cc +++ b/liboctave/data-conv.cc @@ -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 --git a/liboctave/dbleCHOL.cc b/liboctave/dbleCHOL.cc --- a/liboctave/dbleCHOL.cc +++ b/liboctave/dbleCHOL.cc @@ -33,6 +33,7 @@ #include "dbleCHOL.h" #include "f77-fcn.h" #include "lo-error.h" +#include "oct-locbuf.h" extern "C" { diff --git a/liboctave/dbleGEPBAL.cc b/liboctave/dbleGEPBAL.cc --- a/liboctave/dbleGEPBAL.cc +++ b/liboctave/dbleGEPBAL.cc @@ -31,6 +31,7 @@ #include "dbleGEPBAL.h" #include "Array-util.h" #include "f77-fcn.h" +#include "oct-locbuf.h" extern "C" { diff --git a/liboctave/fCMatrix.cc b/liboctave/fCMatrix.cc --- a/liboctave/fCMatrix.cc +++ b/liboctave/fCMatrix.cc @@ -45,6 +45,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 --git a/liboctave/fCNDArray.cc b/liboctave/fCNDArray.cc --- a/liboctave/fCNDArray.cc +++ b/liboctave/fCNDArray.cc @@ -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 --git a/liboctave/fCmplxCHOL.cc b/liboctave/fCmplxCHOL.cc --- a/liboctave/fCmplxCHOL.cc +++ b/liboctave/fCmplxCHOL.cc @@ -34,6 +34,7 @@ #include "fCmplxCHOL.h" #include "f77-fcn.h" #include "lo-error.h" +#include "oct-locbuf.h" extern "C" { diff --git a/liboctave/fCmplxGEPBAL.cc b/liboctave/fCmplxGEPBAL.cc --- a/liboctave/fCmplxGEPBAL.cc +++ b/liboctave/fCmplxGEPBAL.cc @@ -31,6 +31,7 @@ #include "fCmplxGEPBAL.h" #include "Array-util.h" #include "f77-fcn.h" +#include "oct-locbuf.h" extern "C" { diff --git a/liboctave/fMatrix.cc b/liboctave/fMatrix.cc --- a/liboctave/fMatrix.cc +++ b/liboctave/fMatrix.cc @@ -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 --git a/liboctave/fNDArray.cc b/liboctave/fNDArray.cc --- a/liboctave/fNDArray.cc +++ b/liboctave/fNDArray.cc @@ -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 --git a/liboctave/file-ops.cc b/liboctave/file-ops.cc --- a/liboctave/file-ops.cc +++ b/liboctave/file-ops.cc @@ -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 --git a/liboctave/floatCHOL.cc b/liboctave/floatCHOL.cc --- a/liboctave/floatCHOL.cc +++ b/liboctave/floatCHOL.cc @@ -33,6 +33,7 @@ #include "floatCHOL.h" #include "f77-fcn.h" #include "lo-error.h" +#include "oct-locbuf.h" extern "C" { diff --git a/liboctave/floatGEPBAL.cc b/liboctave/floatGEPBAL.cc --- a/liboctave/floatGEPBAL.cc +++ b/liboctave/floatGEPBAL.cc @@ -31,6 +31,7 @@ #include "floatGEPBAL.h" #include "Array-util.h" #include "f77-fcn.h" +#include "oct-locbuf.h" extern "C" { diff --git a/liboctave/lo-sysdep.cc b/liboctave/lo-sysdep.cc --- a/liboctave/lo-sysdep.cc +++ b/liboctave/lo-sysdep.cc @@ -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 --git a/liboctave/oct-fftw.cc b/liboctave/oct-fftw.cc --- a/liboctave/oct-fftw.cc +++ b/liboctave/oct-fftw.cc @@ -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 --git a/liboctave/oct-locbuf.h b/liboctave/oct-locbuf.h new file mode 100644 --- /dev/null +++ b/liboctave/oct-locbuf.h @@ -0,0 +1,71 @@ +/* + +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_oct_lookup) +#define octave_oct_lookup 1 + +#include "oct-types.h" + +// Maximum buffer size (in bytes) to be placed on the stack. + +#define OCTAVE_LOCAL_BUFFER_MAX_STACK_SIZE 8192 + +/* a simplistic class to provide an automatically deallocated array */ +template +class octave_local_buffer +{ +public: + octave_local_buffer (octave_idx_type size) + : data (size ? new T[size] : 0) { } + ~octave_local_buffer (void) { delete [] data; } + operator T *() const { return data; } +private: + T *data; +}; + +#ifdef HAVE_DYNAMIC_AUTO_ARRAYS + +// 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 octave_idx_type _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 : _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 --git a/liboctave/oct-md5.cc b/liboctave/oct-md5.cc --- a/liboctave/oct-md5.cc +++ b/liboctave/oct-md5.cc @@ -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 --git a/liboctave/oct-rand.cc b/liboctave/oct-rand.cc --- a/liboctave/oct-rand.cc +++ b/liboctave/oct-rand.cc @@ -38,6 +38,7 @@ #include "randpoisson.h" #include "randgamma.h" #include "mach-info.h" +#include "oct-locbuf.h" extern "C" { diff --git a/liboctave/regex-match.cc b/liboctave/regex-match.cc --- a/liboctave/regex-match.cc +++ b/liboctave/regex-match.cc @@ -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 --git a/liboctave/sparse-dmsolve.cc b/liboctave/sparse-dmsolve.cc --- a/liboctave/sparse-dmsolve.cc +++ b/liboctave/sparse-dmsolve.cc @@ -32,6 +32,7 @@ #include "SparseCmplxQR.h" #include "MatrixType.h" #include "oct-sort.h" +#include "oct-locbuf.h" template static MSparse diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -0,0 +1,14 @@ +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. + diff --git a/src/DLD-FUNCTIONS/__lin_interpn__.cc b/src/DLD-FUNCTIONS/__lin_interpn__.cc --- a/src/DLD-FUNCTIONS/__lin_interpn__.cc +++ b/src/DLD-FUNCTIONS/__lin_interpn__.cc @@ -25,6 +25,7 @@ #endif #include "dNDArray.h" +#include "oct-locbuf.h" #include "defun-dld.h" #include "error.h" diff --git a/src/DLD-FUNCTIONS/amd.cc b/src/DLD-FUNCTIONS/amd.cc --- a/src/DLD-FUNCTIONS/amd.cc +++ b/src/DLD-FUNCTIONS/amd.cc @@ -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 --git a/src/DLD-FUNCTIONS/ccolamd.cc b/src/DLD-FUNCTIONS/ccolamd.cc --- a/src/DLD-FUNCTIONS/ccolamd.cc +++ b/src/DLD-FUNCTIONS/ccolamd.cc @@ -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 --git a/src/DLD-FUNCTIONS/cellfun.cc b/src/DLD-FUNCTIONS/cellfun.cc --- a/src/DLD-FUNCTIONS/cellfun.cc +++ b/src/DLD-FUNCTIONS/cellfun.cc @@ -29,6 +29,7 @@ #include #include "lo-mappers.h" +#include "oct-locbuf.h" #include "Cell.h" #include "oct-map.h" diff --git a/src/DLD-FUNCTIONS/colamd.cc b/src/DLD-FUNCTIONS/colamd.cc --- a/src/DLD-FUNCTIONS/colamd.cc +++ b/src/DLD-FUNCTIONS/colamd.cc @@ -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 --git a/src/DLD-FUNCTIONS/gcd.cc b/src/DLD-FUNCTIONS/gcd.cc --- a/src/DLD-FUNCTIONS/gcd.cc +++ b/src/DLD-FUNCTIONS/gcd.cc @@ -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 --git a/src/DLD-FUNCTIONS/matrix_type.cc b/src/DLD-FUNCTIONS/matrix_type.cc --- a/src/DLD-FUNCTIONS/matrix_type.cc +++ b/src/DLD-FUNCTIONS/matrix_type.cc @@ -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 --git a/src/DLD-FUNCTIONS/regexp.cc b/src/DLD-FUNCTIONS/regexp.cc --- a/src/DLD-FUNCTIONS/regexp.cc +++ b/src/DLD-FUNCTIONS/regexp.cc @@ -39,6 +39,7 @@ #include "str-vec.h" #include "quit.h" #include "parse.h" +#include "oct-locbuf.h" #if defined (HAVE_PCRE) #include diff --git a/src/DLD-FUNCTIONS/symbfact.cc b/src/DLD-FUNCTIONS/symbfact.cc --- a/src/DLD-FUNCTIONS/symbfact.cc +++ b/src/DLD-FUNCTIONS/symbfact.cc @@ -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 --git a/src/DLD-FUNCTIONS/symrcm.cc b/src/DLD-FUNCTIONS/symrcm.cc --- a/src/DLD-FUNCTIONS/symrcm.cc +++ b/src/DLD-FUNCTIONS/symrcm.cc @@ -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 --git a/src/file-io.cc b/src/file-io.cc --- a/src/file-io.cc +++ b/src/file-io.cc @@ -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 --git a/src/gl-render.cc b/src/gl-render.cc --- a/src/gl-render.cc +++ b/src/gl-render.cc @@ -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 --git a/src/load-save.cc b/src/load-save.cc --- a/src/load-save.cc +++ b/src/load-save.cc @@ -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 --git a/src/ls-hdf5.cc b/src/ls-hdf5.cc --- a/src/ls-hdf5.cc +++ b/src/ls-hdf5.cc @@ -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 --git a/src/ls-mat4.cc b/src/ls-mat4.cc --- a/src/ls-mat4.cc +++ b/src/ls-mat4.cc @@ -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 --git a/src/ls-mat5.cc b/src/ls-mat5.cc --- a/src/ls-mat5.cc +++ b/src/ls-mat5.cc @@ -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 --git a/src/ls-oct-binary.cc b/src/ls-oct-binary.cc --- a/src/ls-oct-binary.cc +++ b/src/ls-oct-binary.cc @@ -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 --git a/src/mex.cc b/src/mex.cc --- a/src/mex.cc +++ b/src/mex.cc @@ -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 --git a/src/oct.h b/src/oct.h --- a/src/oct.h +++ b/src/oct.h @@ -32,6 +32,7 @@ #include "Matrix.h" +#include "oct-locbuf.h" #include "defun-dld.h" #include "error.h" #include "gripes.h" diff --git a/src/ov-base-int.cc b/src/ov-base-int.cc --- a/src/ov-base-int.cc +++ b/src/ov-base-int.cc @@ -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 --git a/src/ov-bool-mat.cc b/src/ov-bool-mat.cc --- a/src/ov-bool-mat.cc +++ b/src/ov-bool-mat.cc @@ -30,6 +30,7 @@ #include "lo-ieee.h" #include "mx-base.h" +#include "oct-locbuf.h" #include "gripes.h" #include "oct-obj.h" diff --git a/src/ov-bool-sparse.cc b/src/ov-bool-sparse.cc --- a/src/ov-bool-sparse.cc +++ b/src/ov-bool-sparse.cc @@ -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 --git a/src/ov-cell.cc b/src/ov-cell.cc --- a/src/ov-cell.cc +++ b/src/ov-cell.cc @@ -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 --git a/src/ov-class.cc b/src/ov-class.cc --- a/src/ov-class.cc +++ b/src/ov-class.cc @@ -28,6 +28,7 @@ #include "Array-util.h" #include "byte-swap.h" +#include "oct-locbuf.h" #include "Cell.h" #include "defun.h" diff --git a/src/ov-cx-mat.cc b/src/ov-cx-mat.cc --- a/src/ov-cx-mat.cc +++ b/src/ov-cx-mat.cc @@ -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 --git a/src/ov-cx-sparse.cc b/src/ov-cx-sparse.cc --- a/src/ov-cx-sparse.cc +++ b/src/ov-cx-sparse.cc @@ -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 --git a/src/ov-fcn-handle.cc b/src/ov-fcn-handle.cc --- a/src/ov-fcn-handle.cc +++ b/src/ov-fcn-handle.cc @@ -29,6 +29,7 @@ #include #include "file-ops.h" +#include "oct-locbuf.h" #include "defun.h" #include "error.h" diff --git a/src/ov-fcn-inline.cc b/src/ov-fcn-inline.cc --- a/src/ov-fcn-inline.cc +++ b/src/ov-fcn-inline.cc @@ -32,6 +32,8 @@ #include #include #include + +#include "oct-locbuf.h" #include "defun.h" #include "error.h" diff --git a/src/ov-flt-cx-mat.cc b/src/ov-flt-cx-mat.cc --- a/src/ov-flt-cx-mat.cc +++ b/src/ov-flt-cx-mat.cc @@ -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 --git a/src/ov-flt-re-mat.cc b/src/ov-flt-re-mat.cc --- a/src/ov-flt-re-mat.cc +++ b/src/ov-flt-re-mat.cc @@ -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 --git a/src/ov-re-mat.cc b/src/ov-re-mat.cc --- a/src/ov-re-mat.cc +++ b/src/ov-re-mat.cc @@ -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 --git a/src/ov-re-sparse.cc b/src/ov-re-sparse.cc --- a/src/ov-re-sparse.cc +++ b/src/ov-re-sparse.cc @@ -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 --git a/src/ov-str-mat.cc b/src/ov-str-mat.cc --- a/src/ov-str-mat.cc +++ b/src/ov-str-mat.cc @@ -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 --git a/src/ov-struct.cc b/src/ov-struct.cc --- a/src/ov-struct.cc +++ b/src/ov-struct.cc @@ -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 --git a/src/toplev.cc b/src/toplev.cc --- a/src/toplev.cc +++ b/src/toplev.cc @@ -50,6 +50,7 @@ #include "oct-env.h" #include "quit.h" #include "str-vec.h" +#include "oct-locbuf.h" #include #include "defun.h"