From e0035021931f2b645c9d107c1be6636d3b6aa544 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 8 Feb 2009 19:05:06 -0400 Subject: Moved several #includes to facilitate the use of pre-compiled headers. --- python/py_chain.cc | 4 ---- python/py_commodity.cc | 3 --- python/py_entry.cc | 4 ---- python/py_flags.cc | 4 ---- python/py_format.cc | 4 ---- python/py_global.cc | 4 ---- python/py_item.cc | 4 ---- python/py_journal.cc | 4 ---- python/py_report.cc | 4 ---- python/py_scope.cc | 4 ---- python/py_session.cc | 4 ---- python/py_timelog.cc | 4 ---- python/py_times.cc | 2 -- python/py_utils.cc | 4 ---- python/py_value.cc | 4 ---- python/py_xact.cc | 4 ---- python/pyinterp.cc | 2 -- python/pyinterp.h | 3 --- src/format.h | 5 ----- src/stream.cc | 6 ------ src/system.hh | 27 +++++++++++++++++++++++++++ 21 files changed, 27 insertions(+), 77 deletions(-) diff --git a/python/py_chain.cc b/python/py_chain.cc index adfa6423..279d4375 100644 --- a/python/py_chain.cc +++ b/python/py_chain.cc @@ -33,10 +33,6 @@ #include "pyutils.h" #include "chain.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_commodity.cc b/python/py_commodity.cc index d29ec83d..7b101ec1 100644 --- a/python/py_commodity.cc +++ b/python/py_commodity.cc @@ -33,9 +33,6 @@ #include "pyutils.h" #include "amount.h" -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_entry.cc b/python/py_entry.cc index d72f6363..8743886e 100644 --- a/python/py_entry.cc +++ b/python/py_entry.cc @@ -33,10 +33,6 @@ #include "pyutils.h" #include "entry.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_flags.cc b/python/py_flags.cc index 0fe794f7..440c81c6 100644 --- a/python/py_flags.cc +++ b/python/py_flags.cc @@ -33,10 +33,6 @@ #include "pyutils.h" #include "flags.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_format.cc b/python/py_format.cc index 632d0e74..2880cf3e 100644 --- a/python/py_format.cc +++ b/python/py_format.cc @@ -33,10 +33,6 @@ #include "pyutils.h" #include "format.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_global.cc b/python/py_global.cc index 1037e8a5..c064f9d8 100644 --- a/python/py_global.cc +++ b/python/py_global.cc @@ -33,10 +33,6 @@ #include "pyutils.h" #include "global.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_item.cc b/python/py_item.cc index 3007fa63..f0e3f440 100644 --- a/python/py_item.cc +++ b/python/py_item.cc @@ -33,10 +33,6 @@ #include "pyutils.h" #include "item.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_journal.cc b/python/py_journal.cc index e9832a16..7f8d76c6 100644 --- a/python/py_journal.cc +++ b/python/py_journal.cc @@ -33,10 +33,6 @@ #include "pyutils.h" #include "journal.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_report.cc b/python/py_report.cc index 3fbb142b..1a42b1d7 100644 --- a/python/py_report.cc +++ b/python/py_report.cc @@ -33,10 +33,6 @@ #include "pyutils.h" #include "report.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_scope.cc b/python/py_scope.cc index 4ca76845..e4eef37d 100644 --- a/python/py_scope.cc +++ b/python/py_scope.cc @@ -33,10 +33,6 @@ #include "pyutils.h" #include "scope.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_session.cc b/python/py_session.cc index 3468a4e7..108dcc3c 100644 --- a/python/py_session.cc +++ b/python/py_session.cc @@ -33,10 +33,6 @@ #include "pyutils.h" #include "session.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_timelog.cc b/python/py_timelog.cc index febc6fee..127bf641 100644 --- a/python/py_timelog.cc +++ b/python/py_timelog.cc @@ -33,10 +33,6 @@ #include "pyutils.h" #include "timelog.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_times.cc b/python/py_times.cc index dfd1769d..f209929a 100644 --- a/python/py_times.cc +++ b/python/py_times.cc @@ -32,8 +32,6 @@ #include "pyinterp.h" #include "pyutils.h" -#include - // jww (2007-05-04): Convert time duration objects to PyDelta namespace ledger { diff --git a/python/py_utils.cc b/python/py_utils.cc index d1963852..ac1ed822 100644 --- a/python/py_utils.cc +++ b/python/py_utils.cc @@ -32,10 +32,6 @@ #include "pyinterp.h" #include "pyutils.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_value.cc b/python/py_value.cc index 6c8c232f..f4fe11bc 100644 --- a/python/py_value.cc +++ b/python/py_value.cc @@ -33,10 +33,6 @@ #include "pyutils.h" #include "value.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/py_xact.cc b/python/py_xact.cc index 85c55151..fb5dbf8e 100644 --- a/python/py_xact.cc +++ b/python/py_xact.cc @@ -33,10 +33,6 @@ #include "pyutils.h" #include "xact.h" -#include -#include -#include - namespace ledger { using namespace boost::python; diff --git a/python/pyinterp.cc b/python/pyinterp.cc index f2f712d9..3648cdf4 100644 --- a/python/pyinterp.cc +++ b/python/pyinterp.cc @@ -31,8 +31,6 @@ #include "pyinterp.h" -#include - namespace ledger { using namespace boost::python; diff --git a/python/pyinterp.h b/python/pyinterp.h index de910223..7303644c 100644 --- a/python/pyinterp.h +++ b/python/pyinterp.h @@ -37,9 +37,6 @@ #if defined(HAVE_BOOST_PYTHON) -#include -#include - namespace ledger { class python_interpreter_t : public session_t diff --git a/src/format.h b/src/format.h index 66c226b2..5c0de527 100644 --- a/src/format.h +++ b/src/format.h @@ -46,13 +46,8 @@ #ifndef _FORMAT_H #define _FORMAT_H -#define SUPPORT_UNICODE 1 - #include "journal.h" #include "expr.h" -#if defined(SUPPORT_UNICODE) -#include "utf8.h" -#endif namespace ledger { diff --git a/src/stream.cc b/src/stream.cc index 94282d2d..403e579e 100644 --- a/src/stream.cc +++ b/src/stream.cc @@ -31,12 +31,6 @@ #include "utils.h" -#ifdef HAVE_UNIX_PIPES -#include -#include -#include "fdstream.h" -#endif - namespace ledger { namespace { diff --git a/src/system.hh b/src/system.hh index d56a1896..fdec99fe 100644 --- a/src/system.hh +++ b/src/system.hh @@ -129,9 +129,19 @@ typedef std::ostream::pos_type ostream_pos_type; #include #endif +#ifdef HAVE_UNIX_PIPES +#include +#include +#include "fdstream.h" +#endif + #include #include #include "sha1.h" +#define SUPPORT_UNICODE 1 +#if defined(SUPPORT_UNICODE) +#include "utf8.h" +#endif #ifdef HAVE_LIBEDIT #include @@ -159,4 +169,21 @@ typedef std::ostream::pos_type ostream_pos_type; #include #include +#if defined(HAVE_BOOST_PYTHON) + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#endif // HAVE_BOOST_PYTHON + #endif // _SYSTEM_HH -- cgit v1.2.3