]> git.lyx.org Git - lyx.git/commitdiff
small patch from Dekel, begin introducing the real boost framework, get rid of the...
authorLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 2 Oct 2000 00:55:02 +0000 (00:55 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 2 Oct 2000 00:55:02 +0000 (00:55 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1063 a592a061-630c-0410-9148-cb99ea01b6c8

49 files changed:
ChangeLog
Makefile.am
boost/.cvsignore [new file with mode: 0644]
boost/Makefile.am [new file with mode: 0644]
boost/boost/array.hpp [new file with mode: 0644]
boost/boost/config.hpp [new file with mode: 0644]
boost/boost/utility.hpp [new file with mode: 0644]
boost/libs/README [new file with mode: 0644]
config/lyxinclude.m4
configure.in
src/BufferView.h
src/LColor.h
src/LaTeX.h
src/LyXAction.h
src/LyXView.h
src/Makefile.am
src/bufferlist.h
src/bufferparams.h
src/frontends/ButtonPolicies.h
src/frontends/Dialogs.h
src/frontends/Makefile.am
src/frontends/gnome/Makefile.am
src/frontends/kde/Makefile.am
src/frontends/xforms/FormBase.h
src/frontends/xforms/FormGraphics.h
src/frontends/xforms/FormParagraph.h
src/frontends/xforms/FormTabular.h
src/frontends/xforms/Makefile.am
src/graphics/GraphicsCache.h
src/graphics/Makefile.am
src/graphics/Renderer.h
src/insets/ExternalTemplate.h
src/insets/Makefile.am
src/insets/insetcommand.h
src/lastfiles.h
src/layout.h
src/lyx_gui.h
src/lyx_main.h
src/lyxlex.h
src/lyxparagraph.h
src/lyxrc.h
src/mathed/Makefile.am
src/mathed/formula.C
src/mathed/formulamacro.C
src/support/Makefile.am
src/support/block.h [deleted file]
src/support/lstrings.C
src/support/path.h
src/support/utility.hpp [deleted file]

index c1a0f1100c5a1858e3e4ecc9c9e8934362733265..b2bb384ba9c0b2dc6067e4e255eae5215f878bf3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,73 @@
+2000-10-02  Lars Gullik Bjønnes  <larsbj@lyx.org>
+
+       * src/support/utility.hpp: removed file
+       * src/support/block.h: removed file
+
+       * src/support/Makefile.am (libsupport_la_SOURCES): remove block.h
+       and utility.hpp
+
+       * src/mathed/formula.C: add support/lyxlib.h
+       * src/mathed/formulamacro.C: ditto
+
+       * src/bufferparams.h: use boost/array.hpp instead of support/block.h
+       * src/lyxparagraph.h: ditto
+
+       * src/Makefile.am (BOOST_INCLUDES): the boost include dir
+       * src/frontends/Makefile.am (INCLUDES): ditto
+       * src/frontends/gnome/Makefile.am (BOOST_INCLUDES): ditto
+       * src/frontends/kde/Makefile.am (BOOST_INCLUDES): ditto
+       * src/frontends/xforms/Makefile.am (BOOST_INCLUDES): ditto
+       * src/graphics/Makefile.am (BOOST_INCLUDES): ditto
+       * src/insets/Makefile.am (BOOST_INCLUDES): ditto
+       * src/mathed/Makefile.am (BOOST_INCLUDES): ditto
+
+       * src/BufferView.h: use boost/utility.hpp
+       * src/LColor.h: ditto
+       * src/LaTeX.h: ditto
+       * src/LyXAction.h: ditto
+       * src/LyXView.h: ditto
+       * src/bufferlist.h: ditto
+       * src/lastfiles.h: ditto
+       * src/layout.h: ditto
+       * src/lyx_gui.h: ditto
+       * src/lyx_main.h: ditto
+       * src/lyxlex.h: ditto
+       * src/lyxrc.h: ditto
+       * src/frontends/ButtonPolicies.h: ditto
+       * src/frontends/Dialogs.h: ditto
+       * src/frontends/xforms/FormBase.h: ditto
+       * src/frontends/xforms/FormGraphics.h: ditto
+       * src/frontends/xforms/FormParagraph.h: ditto
+       * src/frontends/xforms/FormTabular.h: ditto
+       * src/graphics/GraphicsCache.h: ditto
+       * src/graphics/Renderer.h: ditto
+       * src/insets/ExternalTemplate.h: ditto
+       * src/insets/insetcommand.h: ditto
+       * src/support/path.h: ditto
+
+       * config/lyxinclude.m4 (LYX_PROG_CXX): change clause for 2.96
+       and introduce clause for 2.97.
+
+       * boost/libs/README: new file
+
+       * boost/boost/utility.hpp: new file
+
+       * boost/boost/config.hpp: new file
+
+       * boost/boost/array.hpp: new file
+
+       * boost/Makefile.am: new file
+
+       * boost/.cvsignore: new file
+
+       * configure.in (AC_OUTPUT): add boost/Makefile
+
+       * Makefile.am (SUBDIRS): add boost
+
+2000-10-01  Dekel Tsur  <dekelts@tau.ac.il>
+
+       * src/support/lstrings.C (suffixIs): Fixed.
+
 2000-10-01  Allan Rae  <rae@lyx.org>
 
        * src/PrinterParams.h: moved things around to avoid the "can't
index 9a52256508b8e6e96f06ae06ab82144692c971e3..a8269cf2616d14b475c5fe34bf9fef2437fe6864 100644 (file)
@@ -3,7 +3,7 @@ DISTCLEANFILES= *.orig *.rej *~ *.bak lyx.1 core
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in $(srcdir)/aclocal.m4 \
        $(srcdir)/configure $(srcdir)/development/lyx.spec \
        $(srcdir)/acinclude.m4
-SUBDIRS = intl po sigc++ src lib
+SUBDIRS = intl po sigc++ boost src lib
 
 EXTRA_DIST = ANNOUNCE OLD-CHANGES INSTALL.OS2 INSTALL.autoconf README.OS2 \
        UPGRADING lyx.man acconfig.h \
diff --git a/boost/.cvsignore b/boost/.cvsignore
new file mode 100644 (file)
index 0000000..70845e0
--- /dev/null
@@ -0,0 +1 @@
+Makefile.in
diff --git a/boost/Makefile.am b/boost/Makefile.am
new file mode 100644 (file)
index 0000000..2663749
--- /dev/null
@@ -0,0 +1,3 @@
+DISTCLEANFILES= *.orig *.rej *~ *.bak core
+MAINTAINERCLEANFILES= $(srcdir)/Makefile.in
+ETAGS_ARGS = --lang=c++
diff --git a/boost/boost/array.hpp b/boost/boost/array.hpp
new file mode 100644 (file)
index 0000000..0b16c39
--- /dev/null
@@ -0,0 +1,159 @@
+/* The following code declares class array,
+ * an STL container (as wrapper) for arrays of constant size.
+ *
+ * See
+ *      http://www.josuttis.com/cppcode
+ * for details and the latest version.
+ *
+ * (C) Copyright Nicolai M. Josuttis 1999.
+ * Permission to copy, use, modify, sell and distribute this software
+ * is granted provided this copyright notice appears in all copies.
+ * This software is provided "as is" without express or implied
+ * warranty, and with no claim as to its suitability for any purpose.
+ *
+ * Jul 31, 2000
+ */
+#ifndef BOOST_ARRAY_HPP
+#define BOOST_ARRAY_HPP
+
+#include <cstddef>
+#include <stdexcept>
+#include <iterator>
+#include <algorithm>
+
+// BUG-FIX for compilers that don't support
+// std::size_t and std::ptrdiff_t yet
+// (such as gcc)
+#include <boost/config.hpp>
+
+// LGB
+// namespace boost {
+
+    template<class T, std::size_t N>
+    class array {
+      public:
+        T elems[N];    // fixed-size array of elements of type T
+
+      public:
+        // type definitions
+        typedef T              value_type;
+        typedef T*             iterator;
+        typedef const T*       const_iterator;
+        typedef T&             reference;
+        typedef const T&       const_reference;
+        typedef std::size_t    size_type;
+        typedef std::ptrdiff_t difference_type;
+    
+        // iterator support
+        iterator begin() { return elems; }
+        const_iterator begin() const { return elems; }
+        iterator end() { return elems+N; }
+        const_iterator end() const { return elems+N; }
+
+        // reverse iterator support
+# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+        typedef std::reverse_iterator<iterator> reverse_iterator;
+        typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+# else
+        // workaround for broken reverse_iterator implementations due to no partial specialization
+        typedef std::reverse_iterator<iterator,T> reverse_iterator;
+        typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
+# endif
+
+        reverse_iterator rbegin() { return reverse_iterator(end()); }
+        const_reverse_iterator rbegin() const {
+            return const_reverse_iterator(end());
+        }
+        reverse_iterator rend() { return reverse_iterator(begin()); }
+        const_reverse_iterator rend() const {
+            return const_reverse_iterator(begin());
+        }
+
+        // operator[]
+        reference operator[](size_type i) { return elems[i]; }
+        const_reference operator[](size_type i) const { return elems[i]; }
+
+        // at() with range check
+        reference at(size_type i) { rangecheck(i); return elems[i]; }
+        const_reference at(size_type i) const { rangecheck(i); return elems[i]; }
+    
+        // front() and back()
+        reference front() { return elems[0]; }
+        const_reference front() const { return elems[0]; }
+        reference back() { return elems[N-1]; }
+        const_reference back() const { return elems[N-1]; }
+
+        // size is constant
+        static size_type size() { return N; }
+        static bool empty() { return false; }
+        static size_type max_size() { return N; }
+        enum { static_size = N };
+
+  public:
+        // swap (note: linear complexity)
+        void swap (array<T,N>& y) {
+            std::swap_ranges(begin(),end(),y.begin());
+        }
+
+        // direct access to data
+        const T* data() const { return elems; }
+
+        // assignment with type conversion
+        template <typename T2>
+        array<T,N>& operator= (const array<T2,N>& rhs) {
+            std::copy(rhs.begin(),rhs.end(), begin());
+            return *this;
+        }
+
+        // assign one value to all elements
+        void assign (const T& value)
+        {
+            std::fill_n(begin(),size(),value);
+        }
+
+# ifndef BOOST_NO_PRIVATE_IN_AGGREGATE
+      private:
+# endif
+        // private member functions are allowed in aggregates [ISO 8.5.1]
+        static void rangecheck (size_type i) {
+            if (i >= size()) { throw std::range_error("array"); }
+        }
+
+    };
+
+    // comparisons
+    template<class T, std::size_t N>
+    bool operator== (const array<T,N>& x, const array<T,N>& y) {
+        return std::equal(x.begin(), x.end(), y.begin());
+    }
+    template<class T, std::size_t N>
+    bool operator< (const array<T,N>& x, const array<T,N>& y) {
+        return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
+    }
+    template<class T, std::size_t N>
+    bool operator!= (const array<T,N>& x, const array<T,N>& y) {
+        return !(x==y);
+    }
+    template<class T, std::size_t N>
+    bool operator> (const array<T,N>& x, const array<T,N>& y) {
+        return y<x;
+    }
+    template<class T, std::size_t N>
+    bool operator<= (const array<T,N>& x, const array<T,N>& y) {
+        return !(y<x);
+    }
+    template<class T, std::size_t N>
+    bool operator>= (const array<T,N>& x, const array<T,N>& y) {
+        return !(x<y);
+    }
+
+    // global swap()
+    template<class T, std::size_t N>
+    inline void swap (array<T,N>& x, array<T,N>& y) {
+        x.swap(y);
+    }
+
+// LGB
+// } /* namespace boost */
+
+#endif /*BOOST_ARRAY_HPP*/
diff --git a/boost/boost/config.hpp b/boost/boost/config.hpp
new file mode 100644 (file)
index 0000000..59fc15e
--- /dev/null
@@ -0,0 +1,346 @@
+//  Boost config.hpp configuration header file  ------------------------------//
+
+//  (C) Copyright Boost.org 1999. Permission to copy, use, modify, sell and
+//  distribute this software is granted provided this copyright notice appears
+//  in all copies. This software is provided "as is" without express or implied
+//  warranty, and with no claim as to its suitability for any purpose.
+
+//  See http://www.boost.org for most recent version.
+
+//  Boost config.hpp policy and rationale documentation has been moved to
+//  http://www.boost.org/libs/config
+
+//  Revision History (excluding minor changes for specific compilers)
+//   25 Sep 00  BOOST_NO_STD_ALLOCATOR (Jeremy Siek)
+//   18 SEP 00  BOOST_NO_SLIST, BOOST_NO_HASH, 
+//              BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
+//              BOOST_NO_LIMITS (Jeremy Siek)
+//    1 Sep 00  BOOST_NO_PRIVATE_IN_AGGREGATE added. (Mark Rodgers)
+//   23 Jul 00  Fixed spelling of BOOST_NO_INCLASS_MEMBER_INITIALIZATION in
+//              comment (Dave Abrahams). 
+//   10 Jul 00  BOOST_NO_POINTER_TO_MEMBER_CONST added (Mark Rodgers)
+//   26 Jun 00  BOOST_NO_STD_ITERATOR, BOOST_MSVC_STD_ITERATOR,
+//              BOOST_NO_STD_ITERATOR_TRAITS, BOOST_NO_USING_TEMPLATE,
+//              added (Jeremy Siek)
+//   20 Jun 00  BOOST_MSVC added (Aleksey Gurtovoy)
+//   14 Jun 00  BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS (Jens M.)
+//   22 Mar 00  BOOST_MSVC6_MEMBER_TEMPLATES added (Dave Abrahams)
+//   18 Feb 00  BOOST_NO_INCLASS_MEMBER_INITIALIZATION added (Jens Maurer)
+//   26 Jan 00  Borland compiler support added (John Maddock)
+//   26 Jan 00  Sun compiler support added (Jörg Schaible)
+//   30 Dec 99  BOOST_NMEMBER_TEMPLATES compatibility moved here from
+//              smart_ptr.hpp. (Dave Abrahams)
+//   15 Nov 99  BOOST_NO_OPERATORS_IN_NAMESPACE,
+//              BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION added (Beman Dawes)
+//   11 Oct 99  BOOST_NO_STDC_NAMESPACE refined; <cstddef> supplied
+//   29 Sep 99  BOOST_NO_STDC_NAMESPACE added (Ed Brey)
+//   24 Sep 99  BOOST_DECL added (Ed Brey)
+//   10 Aug 99  Endedness flags added, GNU CC support added
+//   22 Jul 99  Initial version
+
+#ifndef BOOST_CONFIG_HPP
+#define BOOST_CONFIG_HPP
+
+//  Conformance Flag Macros  -------------------------------------------------//
+//
+//  Conformance flag macros should identify the absence of C++ Standard 
+//  conformance rather than its presence.  This ensures that standard conforming
+//  compilers do not require a lot of configuration flag macros.  It places the
+//  burden where it should be, on non-conforming compilers.  In the future,
+//  hopefully, less rather than more conformance flags will have to be defined.
+
+//  BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS: Template value
+//  parameters cannot have a dependent type, for example
+//  "template<class T, typename T::type value> class X { ... };"
+
+//  BOOST_NO_INCLASS_MEMBER_INITIALIZATION: Compiler violates std::9.4.2/4. 
+
+//  BOOST_NO_MEMBER_TEMPLATES: Member template functions not fully supported.
+//  Also see BOOST_MSVC6_MEMBER_TEMPLATES in the Compiler Control section below.
+
+//  BOOST_NO_MEMBER_TEMPLATE_FRIENDS: Member template friend syntax
+//  ("template<class P> friend class frd;") described in the C++ Standard,
+//  14.5.3, not supported.
+
+//  BOOST_NO_OPERATORS_IN_NAMESPACE: Compiler requires inherited operator
+//  friend functions to be defined at namespace scope, then using'ed to boost.
+//  Probably GCC specific.  See boost/operators.hpp for example.
+
+//  BOOST_NO_POINTER_TO_MEMBER_CONST: The compiler does not correctly handle
+//  pointers to const member functions, preventing use of these in overloaded 
+//  function templates.  See boost/functional.hpp for example.
+
+//  BOOST_NO_PRIVATE_IN_AGGREGATE: The compiler misreads 8.5.1, treating classes
+//  as non-aggregate if they contain private or protected member functions. 
+
+//  BOOST_NO_STD_ITERATOR: The C++ implementation fails to provide the
+//  std::iterator class.
+
+//  BOOST_NO_STD_ITERATOR_TRAITS: The compiler does not provide a standard
+//  compliant implementation of std::iterator_traits. Note that
+//  the compiler may still have a non-standard implementation.
+
+//  BOOST_NO_STDC_NAMESPACE: The contents of C++ standard headers for C library
+//  functions (the <c...> headers) have not been placed in namespace std.
+//  Because the use of std::size_t is so common, a specific workaround for
+//  <cstddef> (and thus std::size_t) is provided in this header (see below).
+//  For other <c...> headers, a workaround must be provided in the boost header:
+//
+//    #include <cstdlib>  // for abs
+//    #ifdef BOOST_NO_STDC_NAMESPACE
+//      namespace std { using ::abs; }
+//    #endif
+
+//  BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION. Class template partial
+//  specialization (14.5.4 [temp.class.spec]) not supported.
+
+//  BOOST_NO_USING_TEMPLATE: The compiler will not accept a using declaration
+//  that imports a template from the global namespace into a named namespace.
+//  Probably Borland specific.
+
+//  Compiler Control or Information Macros  ----------------------------------//
+//
+//  Compilers often supply features outside of the C++ Standard which need to be
+//  controlled or detected. As usual, reasonable default behavior should occur
+//  if any of these macros are not defined.
+
+//  BOOST_DECL:  Certain compilers for Microsoft operating systems require
+//  non-standard class and function decoration if dynamic load library linking
+//  is desired.  BOOST_DECL supplies that decoration, defaulting to a nul string
+//  so that it is harmless when not required.  Boost does not encourage the use
+//  of BOOST_DECL - it is non-standard and to be avoided if practical to do so.
+
+//  BOOST_DECL_EXPORTS:  User defined, BOOST_DECL_EXPORTS causes BOOST_DECL to
+//  be defined as __declspec(dllexport) rather than __declspec(dllimport).
+
+//  BOOST_MSVC6_MEMBER_TEMPLATES:  Microsoft Visual C++ 6.0 has enough member
+//  template idiosyncrasies (being polite) that BOOST_NO_MEMBER_TEMPLATES is
+//  defined for this compiler. BOOST_MSVC6_MEMBER_TEMPLATES is defined to allow
+//  compiler specific workarounds.
+
+//  BOOST_MSVC: defined as _MSC_VER for the Microsoft compiler only. In general,
+//  boost headers should test for a specific conformance flag macro (for
+//  example, BOOST_NO_MEMBER_TEMPLATE_FRIENDS) rather than a specific compiler.
+//  VC++ is a special case, however, since many libraries try to support it yet
+//  it has so many conformance issues that sometimes it is just easier to test
+//  for it directly. On the other hand, the obvious way to do this doesn't work,
+//  as many non-Microsoft compilers define _MSC_VER.  Thus BOOST_MSVC.
+
+//  BOOST_MSVC_STD_ITERATOR: Microsoft's broken version of std::iterator
+//  is being used. 
+
+//  BOOST_SYSTEM_HAS_STDINT_H: There are no 1998 C++ Standard headers <stdint.h> 
+//  or <cstdint>, although the 1999 C Standard does include <stdint.h>. 
+//  If <stdint.h> is present, <boost/stdint.h> can make good use of it,
+//  so a flag is supplied (signalling presence; thus the default is not
+//  present, conforming to the current C++ standard).
+
+//  BOOST_NO_SLIST: The C++ implementation does not provide the slist class.
+
+//  BOOST_NO_HASH: The C++ implementation does not provide the hash_set
+//  or hash_map classes.
+
+//  BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS: The standard library does not provide
+//  templated iterator constructors for its containers.
+
+//  BOOST_NO_LIMITS: The C++ implementation does not provide the <limits> header.
+
+//  BOOST_NO_INTRINSIC_WCHAR_T: The C++ implementation does not provide wchar_t,
+//  or it is really a synonym for another integral type. Use this symbol to
+//  decide whether it is appropriate to explicitly specialize a template on
+//  wchar_t if there is already a specialization for other integer types.
+
+//  BOOST_NO_STD_ALLOCATOR: The C++ standard library does not provide
+//  a standards conforming std::allocator.
+
+//  Compilers are listed in alphabetic order (except VC++ last - see below)---//
+
+//  GNU CC (also known as GCC and G++)  --------------------------------------//
+
+# if defined __GNUC__
+#   if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
+#     include <iterator>  // not sure this is the right way to do this -JGS
+#     if !defined(_CXXRT_STD) && !defined(__SGI_STL) // need to ask Dietmar about this -JGS
+#       define BOOST_NO_STD_ITERATOR
+#       define BOOST_NO_LIMITS
+#     endif
+#     define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+#     define BOOST_NO_OPERATORS_IN_NAMESPACE
+#   endif
+#   if __GNUC__ == 2 && __GNUC_MINOR__ <= 8
+#     define BOOST_NO_MEMBER_TEMPLATES
+#   endif
+
+//  Kai C++ ------------------------------------------------------------------//
+
+#elif defined __KCC
+#   define BOOST_NO_SLIST
+#   define BOOST_NO_HASH
+
+//  Greenhills C++ -----------------------------------------------------------//
+
+#elif defined __ghs
+#   define BOOST_NO_SLIST
+#   define BOOST_NO_HASH
+
+//  Borland ------------------------------------------------------------------//
+
+#elif defined __BORLANDC__
+#   if __BORLANDC__ <= 0x0551
+#     define BOOST_NO_PRIVATE_IN_AGGREGATE
+#   endif
+#   if __BORLANDC__ <= 0x0550
+// Borland C++ Builder 4 and 5:
+#     define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+#     define BOOST_NO_USING_TEMPLATE
+#     if __BORLANDC__ == 0x0550
+// Borland C++ Builder 5, command-line compiler 5.5:
+#       define BOOST_NO_OPERATORS_IN_NAMESPACE
+#     endif
+#   endif
+#   if defined BOOST_DECL_EXPORTS
+#     define BOOST_DECL __declspec(dllexport)
+#   else
+#     define BOOST_DECL __declspec(dllimport)
+#   endif
+
+//  Intel  -------------------------------------------------------------------//
+
+# elif defined __ICL
+#   include <iterator>  // not sure this is the right way to do this -JGS
+#   if __SGI_STL_PORT >= 0x400 || __SGI_STL_PORT >= 0x321 && defined(__STL_USE_NAMESPACES)
+        // a perfectly good implementation of std::iterator is supplied
+#   elif defined(__SGI_STL_ITERATOR)
+#     define BOOST_NO_STD_ITERATOR // No std::iterator in this case
+#   else // assume using dinkumware's STL that comes with VC++ 6.0
+#     define BOOST_MSVC_STD_ITERATOR
+#     define BOOST_NO_STD_ITERATOR_TRAITS
+#     define BOOST_NO_STDC_NAMESPACE
+#     define BOOST_NO_SLIST
+#     define BOOST_NO_HASH
+#     define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
+#     define BOOST_NO_STD_ALLOCATOR
+#   endif
+
+
+//  Metrowerks CodeWarrior  --------------------------------------------------//
+
+# elif defined  __MWERKS__
+#   if __MWERKS__ <= 0x4000
+#     define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+#   endif
+#   if __MWERKS__ <= 0x2301
+#     define BOOST_NO_POINTER_TO_MEMBER_CONST
+#   endif
+#   if __MWERKS__ >= 0x2300
+#     define BOOST_SYSTEM_HAS_STDINT_H
+#   endif
+#   if defined BOOST_DECL_EXPORTS
+#     define BOOST_DECL __declspec(dllexport)
+#   else
+#     define BOOST_DECL __declspec(dllimport)
+#   endif
+
+//  Sun Workshop Compiler C++ ------------------------------------------------//
+
+# elif defined  __SUNPRO_CC
+#    if __SUNPRO_CC <= 0x500
+#      define BOOST_NO_MEMBER_TEMPLATES
+#      define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#    endif
+
+//  Microsoft Visual C++ (excluding Intel/EDG front end)  --------------------//
+//
+//  Must remain the last #elif since some other vendors (Metrowerks, for
+//  example) also #define _MSC_VER
+
+# elif defined _MSC_VER
+#   define BOOST_MSVC _MSC_VER
+
+    // turn off the warnings before we #include anything
+#   pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
+#   pragma warning( disable : 4503 ) // warning: decorated name length exceeded
+
+#   if _MSC_VER <= 1200  // 1200 == VC++ 6.0
+#     define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+#     define BOOST_NO_PRIVATE_IN_AGGREGATE
+
+#     define BOOST_NO_INTRINSIC_WCHAR_T
+
+//    VC++ 6.0 has member templates but they have numerous problems including
+//    cases of silent failure, so for safety we define:
+#     define BOOST_NO_MEMBER_TEMPLATES
+//    For VC++ experts wishing to attempt workarounds, we define:
+#     define BOOST_MSVC6_MEMBER_TEMPLATES
+
+#     define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+#     define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#     define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
+
+#     include <iterator>  // not sure this is the right way to do this -JGS
+#     if __SGI_STL_PORT >= 0x400 || __SGI_STL_PORT >= 0x321 && defined(__STL_USE_NAMESPACES)
+        // a perfectly good implementation of std::iterator is supplied
+#     elif defined(__SGI_STL_ITERATOR)
+#       define BOOST_NO_STD_ITERATOR // No std::iterator in this case
+#     else
+#       define BOOST_MSVC_STD_ITERATOR 1
+#       define BOOST_NO_SLIST
+#       define BOOST_NO_HASH
+#       define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
+#       define BOOST_NO_STD_ALLOCATOR
+#     endif
+#     define BOOST_NO_STD_ITERATOR_TRAITS
+
+
+// Make sure at least one standard library header is included so that library
+// implementation detection will work, even if no standard headers have been
+// included in front of a boost header. (Ed Brey 5 Jun 00)
+#     include <cstddef>
+
+// Determine if the standard library implementation is already pulling names
+// into std.  STLport defines the following if so. (Ed Brey 5 Jun 00)
+#     ifndef __STL_IMPORT_VENDOR_CSTD
+#       define BOOST_NO_STDC_NAMESPACE
+#     endif
+
+#   endif
+
+#   if defined BOOST_DECL_EXPORTS
+#     define BOOST_DECL __declspec(dllexport)
+#   else
+#     define BOOST_DECL __declspec(dllimport)
+#   endif
+
+# endif // Microsoft (excluding Intel/EDG frontend) 
+
+# ifndef BOOST_DECL
+#   define BOOST_DECL  // default for compilers not needing this decoration.
+# endif
+
+//  end of compiler specific portion  ----------------------------------------//
+
+// Check for old name "BOOST_NMEMBER_TEMPLATES" for compatibility  -----------//
+// Don't use BOOST_NMEMBER_TEMPLATES. It is deprecated and will be removed soon.
+#if defined( BOOST_NMEMBER_TEMPLATES ) && !defined( BOOST_NO_MEMBER_TEMPLATES )
+  #define BOOST_NO_MEMBER_TEMPLATES
+#endif
+
+//  BOOST_NO_STDC_NAMESPACE workaround  --------------------------------------//
+//
+//  Because std::size_t usage is so common, even in boost headers which do not
+//  otherwise use the C library, the <cstddef> workaround is included here so
+//  that ugly workaround code need not appear in many other boost headers.
+//  NOTE WELL: This is a workaround for non-conforming compilers; <cstddef> 
+//  must still be #included in the usual places so that <cstddef> inclusion
+//  works as expected with standard conforming compilers.  The resulting
+//  double inclusion of <cstddef> is harmless.
+
+# ifdef BOOST_NO_STDC_NAMESPACE
+#   include <cstddef>
+    namespace std { using ::ptrdiff_t; using ::size_t; }
+    // using ::wchar_t; removed since wchar_t is a C++ built-in type (Ed Brey)
+# endif
+
+
+#endif  // BOOST_CONFIG_HPP
diff --git a/boost/boost/utility.hpp b/boost/boost/utility.hpp
new file mode 100644 (file)
index 0000000..7d3503a
--- /dev/null
@@ -0,0 +1,101 @@
+//  boost utility.hpp header file  -------------------------------------------//
+
+//  (C) Copyright boost.org 1999. Permission to copy, use, modify, sell
+//  and distribute this software is granted provided this copyright
+//  notice appears in all copies. This software is provided "as is" without
+//  express or implied warranty, and with no claim as to its suitability for
+//  any purpose.
+
+//  See http://www.boost.org for most recent version including documentation.
+
+//  Classes appear in alphabetical order
+
+//  Revision History
+//  26 Jan 00  protected noncopyable destructor added (Miki Jovanovic)
+//  10 Dec 99  next() and prior() templates added (Dave Abrahams)
+//  30 Aug 99  moved cast templates to cast.hpp (Beman Dawes)
+//   3 Aug 99  cast templates added
+//  20 Jul 99  name changed to utility.hpp 
+//   9 Jun 99  protected noncopyable default ctor
+//   2 Jun 99  Initial Version. Class noncopyable only contents (Dave Abrahams)
+
+#ifndef BOOST_UTILITY_HPP
+#define BOOST_UTILITY_HPP
+
+#include <boost/config.hpp>
+#include <cstddef>            // for size_t
+#include <utility>            // for std::pair
+
+// LGB
+//namespace boost
+//{
+
+//  next() and prior() template functions  -----------------------------------//
+
+    //  Helper functions for classes like bidirectional iterators not supporting
+    //  operator+ and operator-.
+    //
+    //  Usage:
+    //    const std::list<T>::iterator p = get_some_iterator();
+    //    const std::list<T>::iterator prev = boost::prior(p);
+
+    //  Contributed by Dave Abrahams
+
+    template <class T>
+    T next(T x) { return ++x; }
+
+    template <class T>
+    T prior(T x) { return --x; }
+
+
+//  class noncopyable  -------------------------------------------------------//
+
+    //  Private copy constructor and copy assignment ensure classes derived from
+    //  class noncopyable cannot be copied.
+
+    //  Contributed by Dave Abrahams
+
+    class noncopyable
+    {
+    protected:
+        noncopyable(){}
+        ~noncopyable(){}
+    private:  // emphasize the following members are private
+        noncopyable( const noncopyable& );
+        const noncopyable& operator=( const noncopyable& );
+    }; // noncopyable
+
+//  class tied  -------------------------------------------------------//
+
+    // A helper for conveniently assigning the two values from a pair
+    // into separate variables. The idea for this comes from Jaakko J\84rvi's
+    // Binder/Lambda Library.
+
+    // Constributed by Jeremy Siek
+
+    template <class A, class B>
+    class tied {
+    public:
+      inline tied(A& a, B& b) : _a(a), _b(b) { }
+      template <class U, class V>
+      inline tied& operator=(const std::pair<U,V>& p) {
+        _a = p.first;
+        _b = p.second;
+        return *this;
+      }
+    protected:
+      A& _a;
+      B& _b;
+    };
+
+    template <class A, class B>
+    inline tied<A,B> tie(A& a, B& b) { return tied<A,B>(a, b); }
+
+// LGB
+//} // namespace boost
+
+#endif  // BOOST_UTILITY_HPP
+
+
+
+
diff --git a/boost/libs/README b/boost/libs/README
new file mode 100644 (file)
index 0000000..8ec6c04
--- /dev/null
@@ -0,0 +1 @@
+This is just a placeholder. We will put boost cpp files here when we need them.
index 9053a8d051e04f593bd7bd0d6ff53de20575d5f8..152bbbe05ed8ebda5d44d51c61d8001ed04709f2 100644 (file)
@@ -186,7 +186,8 @@ dnl Check the version of g++
     case $gxx_version in
       2.95.1)  CXXFLAGS="-g $lyx_opt -fpermissive -fno-rtti -fno-exceptions";;
       2.95.*)  CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
-      2.96*)   CXXFLAGS="-g $lyx_opt -fhonor-std -fvtable-thunks -ffunction-sections -fdata-sections";;
+      2.96*)  CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
+      2.97*)   CXXFLAGS="-g $lyx_opt -fhonor-std -fvtable-thunks -ffunction-sections -fdata-sections";;
       *2.91.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
       *)       CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
     esac
@@ -197,6 +198,7 @@ dnl Check the version of g++
     case $gxx_version in
        2.95.*) CXXFLAGS="$CXXFLAGS -W -Wall -Wconversion -Winline";;
        2.96*)  CXXFLAGS="$CXXFLAGS -W -Wall -Wconversion -Winline";;
+       2.97*)  CXXFLAGS="$CXXFLAGS -W -Wall -Wconversion -Winline";;
        *)      CXXFLAGS="$CXXFLAGS -W -Wall -Wno-return-type";;
     esac
     if test $lyx_devel_version = yes ; then
index e8aecb2a1503d92d2039c3ed2a924aca4191c060..d3a9592a363fa129fd709ad82055edf933282fb3 100644 (file)
@@ -283,6 +283,7 @@ AC_OUTPUT([Makefile \
        lib/Makefile \
        intl/Makefile \
        po/Makefile.in \
+       boost/Makefile \
        src/Makefile \
        src/mathed/Makefile \
        src/graphics/Makefile \
index 00cfc04917ff37d24ebf2e6ee067103afc0bb62f..e13893664aa5b8b7e1d1c411a4e983c8aa932d96 100644 (file)
@@ -18,7 +18,7 @@
 
 #include FORMS_H_LOCATION
 #include "undo.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 class LyXView;
 class LyXText;
index 6f8af995b508354f25cdfb80ddbac7b3b9bd0b45..eae06f550042cdf224ebc3027be8dcb4d022e9af 100644 (file)
@@ -18,7 +18,7 @@
 #include <map>
 
 #include "LString.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 /**
   This is a stateless class. 
index b57a57e6ab6c522bcf90c295cbb86dbbf1585d4a..fcd013b8dd78aa86fa8786703cd341ee30a48bbc 100644 (file)
@@ -23,7 +23,7 @@
 #include "DepTable.h"
 #include <vector>
 
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 class MiniBuffer;
 
index cf611e3c35283903d8687031497598d3ee77424e..3ec318a596871b4cf4817c77cb0f31598a143d68 100644 (file)
@@ -10,7 +10,7 @@
 
 #include "commandtags.h"
 #include "LString.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 /** This class encapsulates LyX action and user command operations.
  */
index 9072a3ccf0f3a07677b2042d1f5107c89e6d6934..87ad3703e1912ebb89f434d76b23a9b46d8b168a 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "LString.h"
 #include "Timeout.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 #include "layout.h"
 
 class LyXFunc;
index 7bc192a80a265a82e3efadc0447101a304120a00..49537854e7fbe0832fa6eedfad209ec0a7f8be0f 100644 (file)
@@ -16,7 +16,8 @@ lyx_LDADD = $(lyx_DEPENDENCIES) @INTLLIBS@ $(LYX_LIBS) $(SIGC_LIBS) \
 #lyx_LDFLAGS=-Wl,-O1
 EXTRA_DIST = config.h.in stamp-h.in cheaders
 ETAGS_ARGS = --lang=c++
-INCLUDES = $(SIGC_CFLAGS) $(PSPELL_INCLUDES) @FRONTEND_INCLUDES@
+BOOST_INCLUDES = -I$(top_srcdir)/boost
+INCLUDES = $(SIGC_CFLAGS) $(BOOST_INCLUDES) $(PSPELL_INCLUDES) @FRONTEND_INCLUDES@
 localedir = $(datadir)/locale
 lyx_SOURCES = \
        BackStack.h \
index 7a89a8a87ee6e303013b01c8934b4c0dd3250f02..f186b84e0b135267dfbc7ee9f1690bbebb62ed3d 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "buffer.h"
 #include "debug.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 /** A class to hold all the buffers in a structure
   The point of this class is to hide from bufferlist what kind
index 70d147c242e17a7cf60171597eef49d09a3e7ff9..ddff9697873940770bc938d184ae89a8da9f1d5b 100644 (file)
@@ -23,7 +23,7 @@
 #include "Bullet.h"
 #include "insets/insetquotes.h"
 #include "layout.h"
-#include "support/block.h"
+#include <boost/array.hpp>
 
 
 struct Language;
@@ -192,9 +192,9 @@ public:
        ///
        string pagestyle;
        ///
-       block<Bullet, 4> temp_bullets;
+       array<Bullet, 4> temp_bullets;
        ///
-       block<Bullet, 4> user_defined_bullets;
+       array<Bullet, 4> user_defined_bullets;
        ///
        void readPreamble(LyXLex &);
        ///
index 80661a662ffa3128034b5fd4e0a40ed94bd7b771..4c2c118e29d8da3660aba5a688da852683c69e18 100644 (file)
@@ -21,7 +21,7 @@
 
 
 #include <vector>
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 
 /** An abstract base class for button policies.
index 03b988b8a716c12f0bbfaa0b7f1ee05b76d83c4b..296e552e10f7d52dd8ee2fe5e0d8ad2ab59a8b2c 100644 (file)
@@ -22,7 +22,7 @@
 #include <sigc++/signal_system.h>
 
 #include "LString.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 class DialogBase;
 
index 2f826473b160b7b7e3ae94e9beb5df70cf057f17..abe51ff8e42edcc69a2e75889ffb8002c06305d1 100644 (file)
@@ -6,7 +6,8 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 # here.
 SUBDIRS = xforms @FRONTEND@
 ETAGS_ARGS = --lang=c++
-INCLUDES = ${FRONTEND_INCLUDES} -I${srcdir}/.. -I${srcdir}/xforms ${SIGC_CFLAGS}
+BOOST_INCLUDES = -I$(top_srcdir)/boost
+INCLUDES = ${FRONTEND_INCLUDES} -I${srcdir}/.. -I${srcdir}/xforms ${SIGC_CFLAGS} $(BOOST_INCLUDES)
 LIBS =
 noinst_LTLIBRARIES = libfrontends.la
 libfrontends_la_SOURCES=\
index e40daf97403ca06640138e9ab7f68ffb0b1974e9..7a0c1f634aaefc609961cfe014161daae617b27c 100644 (file)
@@ -2,9 +2,10 @@ AUTOMAKE_OPTIONS = foreign 1.4
 DISTCLEANFILES= *.orig *.rej *~ *.bak core
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 noinst_LTLIBRARIES = libgnome.la
+BOOST_INCLUDES = -I$(top_srcdir)/boost
 INCLUDES = ${FRONTEND_INCLUDES} -I${top_srcdir}/src/ \
        -I${top_srcdir}/src/frontends/ -I${top_srcdir}/src/frontends/xforms \
-       ${SIGC_CFLAGS}
+       ${SIGC_CFLAGS} $(BOOST_INCLUDES)
 libgnome_la_OBJADD = \
         ../xforms/FormBase.lo \
        ../xforms/FormCitation.lo \
index 3eb5671b3a4c79bc9ade23c6e48063b371a26641..473d53091273c551ec9ab08daa4e1cedbe24ee78 100644 (file)
@@ -1,8 +1,9 @@
 AUTOMAKE_OPTIONS = foreign 1.4
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 noinst_LTLIBRARIES = libkde.la
+BOOST_INCLUDES = -I$(top_srcdir)/boost
 INCLUDES = -I${top_srcdir}/src/ -I${top_srcdir}/src/frontends/ \
-       ${SIGC_CFLAGS} ${FRONTEND_INCLUDES} \
+       ${SIGC_CFLAGS} ${FRONTEND_INCLUDES} $(BOOST_INCLUDES) \
        -I${top_srcdir}/src/frontends/xforms
 
 # just to make sure, automake makes them 
index 2524d88723e3e7fbf55c59b872ba3afbef3f5696..09745ed28f07ecd79ab76873072dd97408ceb135 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "DialogBase.h"
 #include "LString.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 #include FORMS_H_LOCATION
 #include "ButtonController.h"
 #include "gettext.h"
index d554b25468c0685b5485c0e03769714e617737d9..88abccabce7410c569be8421c513525880999a66 100644 (file)
@@ -21,7 +21,7 @@
 #include "LString.h"
 #include "frontends/DialogBase.h"
 #include "RadioButtonGroup.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 #ifdef __GNUG__
 #pragma interface
index ca2b970bc6f5d16ea38172c13e0b8061f9501fd2..b34a1e23d435a5b56181da6604064d54d4f67f45 100644 (file)
@@ -14,7 +14,7 @@
 #define FORM_PARAGRAPH_H
 
 #include "DialogBase.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 #include <vector>
 
 #ifdef __GNUG_
index f625b587af6f7af9f385812caf86939a9f2608b9..aa95b0fae1afba36c1d37c4d04fcd0590a78daaf 100644 (file)
@@ -18,7 +18,7 @@
 #define FORMTABULAR_H
 
 #include "DialogBase.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 #ifdef SIGC_CXX_NAMESPACES
 using SigC::Connection;
index 9e0cb8efffdb9d50767c685aba70a7be10b45c3f..d8f0430dec9b191f9711e389d5e95037d3bf511a 100644 (file)
@@ -2,9 +2,10 @@ AUTOMAKE_OPTIONS = foreign 1.4
 DISTCLEANFILES= *.orig *.rej *~ *.bak core
 MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 noinst_LTLIBRARIES = libxforms.la
+BOOST_INCLUDES = -I$(top_srcdir)/boost
 INCLUDES = -I${top_srcdir}/src/ \
        -I${top_srcdir}/src/frontends/ \
-       ${SIGC_CFLAGS}
+       ${SIGC_CFLAGS} $(BOOST_INCLUDES)
 LIBS=
 LDFLAGS=
 LYXDATADIRS = forms
index e9a8c6f88c88649e00fa6cb422fb6a0276efc1f5..b0c7e4f6e66f10453e3deeb2fba4a322daa2405d 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "LString.h"
 #include "GraphicsCacheItem.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 /** GraphicsCache is the manager of the image cache.
     It is responsible of create the GraphicsCacheItem's and maintain them.
index 5b02f67af405ea452828e9295a23d5028bb69b70..1224ae7256429543286eac1a6f090670ed22d3a9 100644 (file)
@@ -4,7 +4,8 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 noinst_LTLIBRARIES = libgraphics.la
 LIBS =
 ETAGS_ARGS = --lang=c++
-INCLUDES = -I${srcdir}/../ $(SIGC_CFLAGS)
+BOOST_INCLUDES = -I$(top_srcdir)/boost
+INCLUDES = -I${srcdir}/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES)
 
 libgraphics_la_SOURCES = \
        Renderer.h \
index a8b6044db8387e34c01bd6cf63e3a9716d743ec3..4cf56d767a157cf9172be5863cd93a66e52d322e 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "LString.h"
 #include "X11/Xlib.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 /** Renderer is a base class that is used to take an image format, and
     render it into a Pixmap in order to be able to display it later on
index 63f85dbdec68ba8e9af8bbfc3c9c6ecd59844947..d643f5d4837b9645861d3bdc301ad4a7347c024e 100644 (file)
@@ -19,7 +19,7 @@
 #include <iosfwd>
 #include <map>
 #include "LString.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 class LyXLex;
 
index 9574baa198956add64b70979ddf8e9fe4782bf59..a66dec59e5d81a3ae2b2c0f9d9c168c2894a8665 100644 (file)
@@ -4,7 +4,8 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 noinst_LTLIBRARIES = libinsets.la
 LIBS =
 ETAGS_ARGS = --lang=c++
-INCLUDES = -I${srcdir}/../ $(SIGC_CFLAGS)
+BOOST_INCLUDES = -I$(top_srcdir)/boost
+INCLUDES = -I${srcdir}/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES)
 
 libinsets_la_SOURCES = \
        BoundingBox.h \
index 857563903206a426993df57eecd680c5b54bc228..2e75be5bbe5efd67ed2d2228f5199cfabe1b1a15 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "insetbutton.h"
 #include <sigc++/signal_system.h>
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 #ifdef SIGC_CXX_NAMESPACES
 using SigC::Signal0;
index dee8c5e0f89efc384102dff7ae8e52cf4c962041..a5816204ca68440ba42140fd4a73b0b36971fae3 100644 (file)
@@ -19,7 +19,7 @@
 #include <deque>
 
 #include "LString.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 /** The latest documents loaded.
     This class takes care of the last .lyx files used by the LyX user. It
index 789f9ca098d14a43040bb1db9ee60008b0a61315..7359b2d4a065c09e8f1144739180c78783894514 100644 (file)
@@ -21,7 +21,7 @@
 #include "lyxlex.h"
 #include "lyxfont.h"
 #include "Spacing.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 /// Reads the style files
 extern void LyXSetStyle();
index 17dedf9edfff9364e543fb412fb4f269943d8539..98fd4c19e194650284601714e2ce5711fe884a3f 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef LYX_GUI_H
 #define LYX_GUI_H
 
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 #ifdef __GNUG__
 #pragma interface
index 0ba6779ef7b787acbbba6e761e8aa6a55edb7d4f..ba5db6b409b61b65d5833bacc043588e92182a3b 100644 (file)
@@ -22,7 +22,7 @@
 #include <csignal>
 
 #include "LString.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 class LyXGUI;
 class LyXRC;
index 420396be1325e9023ea8eed8a2daccf8c7b6172c..f7113e9c9c16f84731ce1c790e81df355816f2da 100644 (file)
@@ -14,7 +14,7 @@
 #include <iosfwd>
 
 #include "LString.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 ///
 struct keyword_item {
index 48476bd5aeddadcc122361df7c0702c1dd89c343..03b498e7061bf77120f1be98da785ed4b38026ce 100644 (file)
@@ -22,7 +22,7 @@
 #include "insets/lyxinset.h"
 #include "vspace.h"
 #include "layout.h"
-#include "support/block.h"
+#include <boost/array.hpp>
 #include "language.h"
 
 class BufferParams;
@@ -286,7 +286,7 @@ public:
        
 private:
        ///
-       block<int, 10> counter_;
+       array<int, 10> counter_;
 public:
        ///
        void setCounter(int i, int v) { counter_[i] = v; }
index 5db59f319899e962e1b6ccfb2de7454fb64a2ed9..3281a0df8620c6deecf2daba4a31f89a0f94f5e6 100644 (file)
@@ -17,7 +17,7 @@
 #endif
 
 #include "bufferparams.h"
-#include "support/utility.hpp"
+#include <boost/utility.hpp>
 
 /// This contains the runtime configuration of LyX
 class LyXRC : public noncopyable {
index 78cfe28e454c535bac20edf328d5f30f3338c436..2ed45838b75a5a9102bc4470f20f41aa34b0096e 100644 (file)
@@ -4,7 +4,8 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 noinst_LTLIBRARIES = libmathed.la
 LIBS=
 ETAGS_ARGS = --lang=c++
-INCLUDES = -I${top_srcdir}/images -I${srcdir}/../ $(SIGC_CFLAGS)
+BOOST_INCLUDES = -I$(top_srcdir)/boost
+INCLUDES = -I${top_srcdir}/images -I${srcdir}/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES)
 
 libmathed_la_SOURCES = array.h \
        formula.C \
index 6d7f75a58816dc32792a15f1ec35f1d66b8194fd..58230fa6276b1ad15676b73e18e439e055b77363 100644 (file)
@@ -37,6 +37,7 @@
 #include "LyXView.h"
 #include "Painter.h"
 #include "font.h"
+#include "support/lyxlib.h"
 
 using std::ostream;
 using std::istream;
index d74a5b3bfff7da3146e748c8feb8609ef9151da0..10f9c5d238cc125c0ccf2e74d7a5ff533ccb30a1 100644 (file)
@@ -30,6 +30,7 @@
 #include "gettext.h"
 #include "Painter.h"
 #include "font.h"
+#include "support/lyxlib.h"
 
 using std::ostream;
 using std::istream;
index 6d5bcb61cba747c579e3a5b2328663a0256e90ff..4278b992b99fa1b5a4aebb6da598bfe15d230b7a 100644 (file)
@@ -4,7 +4,8 @@ MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
 noinst_LTLIBRARIES = libsupport.la
 LIBS =
 ETAGS_ARGS = --lang=c++
-INCLUDES = -I${srcdir}/../
+BOOST_INCLUDES = -I$(top_srcdir)/boost
+INCLUDES = -I${srcdir}/../ $(BOOST_INCLUDES)
 
 EXTRA_DIST = lyxstring.C lyxstring.h regex.c lyxregex.h
 
@@ -32,7 +33,6 @@ libsupport_la_SOURCES = \
        StrPool.h \
        abort.C \
        atoi.C \
-       block.h \
        chdir.C \
        copy.C \
        date.C \
@@ -62,5 +62,4 @@ libsupport_la_SOURCES = \
        syssingleton.C \
        translator.h \
        textutils.h \
-       unlink.C \
-       utility.hpp
+       unlink.C
diff --git a/src/support/block.h b/src/support/block.h
deleted file mode 100644 (file)
index 87315c5..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-// -*- C++ -*-
-
-#ifndef BLOCK_H
-#define BLOCK_H
-
-#include "LAssert.h"
-
-///
-template <class T, size_t s>
-class block {
-public:
-       ///
-       typedef T value_type;
-       ///
-       typedef size_t size_type;
-       ///
-       typedef T * pointer;
-       ///
-       typedef T const * const_pointer;
-       ///
-       typedef T & reference;
-       ///
-       typedef T const & const_reference;
-       ///
-       typedef T * iterator;
-       ///
-       typedef T const * const_iterator;
-       ///
-       size_type size() const { return s; }
-       ///
-       reference at(int i) {
-               Assert(i >= 0 && i < s);
-               return arr[i];
-       }
-       ///
-       const_reference at(int i) const {
-               Assert(i >= 0 && i < s);
-               return arr[i];
-       }
-       ///
-       reference operator[](int i) { return arr[i]; }
-       ///
-       const_reference operator[](int i) const { return arr[i]; }
-       ///
-       void operator=(block const & b) {
-               Assert(b.size() == size());
-               for (size_t i = 0; i < size(); ++i) {
-                       arr[i] == b[i];
-               }
-       }
-       ///
-       bool operator==(block const & b) const {
-               Assert(b.size() == size());
-               for (size_t i = 0; i < size(); ++i) {
-                       if (arr[i] != b[i]) return false;
-               }
-               return true;
-       }
-       ///
-       iterator begin() { return arr[0]; }
-       ///
-       iterator end() { return arr[s]; }
-       ///
-       const_iterator begin() const { return arr[0]; }
-       ///
-       const_iterator end() const { return arr[s]; }
-private:
-       ///
-       T arr[s];
-};
-
-#endif // BLOCK_H_
index fae7df7bfa225bf3da0a89f9f05b6879ce538def..87e67e45ea5b3e69edba38bc16f2589f62cbe85c 100644 (file)
@@ -283,7 +283,7 @@ bool suffixIs(string const & a, string const & suf)
                string tmp(a, alen - suflen);
                return ::strncmp(tmp.c_str(), suf.c_str(), suflen) == 0;
 #else
-               return a.compare(alen - suflen, suflen, suf);
+               return a.compare(alen - suflen, suflen, suf) == 0;
 #endif
        }
 }
index 893b4bdc7176d5fc0b7a319b95ca582aa32e5aeb..ced3358c240c8c37a30606b858a3d2fbec733ef4 100644 (file)
@@ -5,7 +5,7 @@
 #include "LString.h"
 #include "filetools.h"
 #include "lyxlib.h"
-#include "utility.hpp"
+#include <boost/utility.hpp>
 
 #ifdef __GNUG__
 #pragma interface
diff --git a/src/support/utility.hpp b/src/support/utility.hpp
deleted file mode 100644 (file)
index 4ee9927..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-//  boost utility.hpp header file  ----------------------------------------//
-
-//  (C) Copyright boost.org 1999. Permission to copy, use, modify, sell
-//  and distribute this software is granted provided this copyright
-//  notice appears in all copies. This software is provided "as is" without
-//  express or implied warranty, and with no claim as to its suitability for
-//  any purpose.
-
-//  See http://www.boost.org for most recent version including documentation.
-
-//  Classes appear in alphabetical order
-
-//  Revision History
-//  10 Dec 99  next() and prior() templates added.
-//  30 Aug 99  moved cast templates to cast.hpp
-//   3 Aug 99  cast templates added
-//  20 Jul 99  name changed to utility.hpp 
-//   9 Jun 99  protected noncopyable default ctor
-//   2 Jun 99  Initial Version. Class noncopyable only contents.
-
-#ifndef BOOST_UTILITY_HPP
-#define BOOST_UTILITY_HPP
-
-//#include <boost/config.hpp>
-//#include <cstddef>            // for size_t
-
-//namespace boost
-//{
-
-//  next() and prior() template functions  -----------------------------------//
-
-    //  Helper functions for classes like bidirectional iterators not supporting
-    //  operator+ and operator-.
-    //
-    //  Usage:
-    //    const std::list<T>::iterator p = get_some_iterator();
-    //    const std::list<T>::iterator prev = boost::prior(p);
-
-    //  Contributed by Dave Abrahams
-
-    template <class T>
-    T next(T x) { return ++x; }
-
-    template <class T>
-    T prior(T x) { return --x; }
-
-
-//  class noncopyable  -------------------------------------------------------//
-
-    //  Private copy constructor and copy assignment ensure classes derived from
-    //  class noncopyable cannot be copied.
-
-    //  Contributed by Dave Abrahams
-
-class noncopyable
-{
-protected:
-        noncopyable(){}
-private:  // emphasize the following members are private
-        noncopyable( const noncopyable& );
-        const noncopyable& operator=( const noncopyable& );
-}; // noncopyable
-
-//} // namespace boost
-
-#endif  // BOOST_UTILITY_HPP