diff options
author | Jasmin Jessich <jasmin@anw.at> | 2017-05-21 00:50:00 +0200 |
---|---|---|
committer | Jasmin Jessich <jasmin@anw.at> | 2017-05-21 00:50:00 +0200 |
commit | 5f457e6d67133e2b7e7269efedbbe758227b44e3 (patch) | |
tree | 2fdfbe897a786fa9c4a3983bbefdd86e175b82e7 | |
parent | c2761cb4a8e93434470c1c6cac15b950413e1add (diff) | |
download | vdr-plugin-live-5f457e6d67133e2b7e7269efedbbe758227b44e3.tar.gz vdr-plugin-live-5f457e6d67133e2b7e7269efedbbe758227b44e3.tar.bz2 |
Include file re-ordering
- Reorder all included header files to this order:
* own headers
* STL headers
* VDR headers
* system headers
This has been done in all source and all own header files.
Normally the STL headers should have gone after the VDR headers, but due
to an compilation error with GCC 6 and the definition of swap in vdr/tools.h
if __STL_CONFIG_H is not defined, the STL headers need to be before the VDR
headers. Please note, that GCC 4.x, 5.x and 6.x do no longer define
__STL_CONFIG_H resulting in the definition of swap in vdr/tools.h. This was
no problem till GCC 6.x. To overcome the error in GCC 6.x, __STL_CONFIG_H
is now defined in some headers before including a VDR header file, so that
vdr/tools.h doe not define swap any more.
Klaus S. might change the definition in vdr/tools.h with the next VDR
version. So the setting of "__STL_CONFIG_H" may be removed.
- Added all missing system/STL/VDR header files to the own header files,
so that they can be included as first file.
- Removed all unnecessary header file includes in source and own header
files.
- Used #include "..." only for header files in the same directory and
#include <...> for all header files which need to be searched via the -I
and built in path.
80 files changed, 335 insertions, 454 deletions
@@ -5,6 +5,8 @@ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) +# include <memory> + #if GCC_VERSION > 50000 # define AUTO_PTR std::unique_ptr #else @@ -1,14 +1,11 @@ #ifndef VGSTOOLS_CACHE_H #define VGSTOOLS_CACHE_H +#include "stdext.h" + #include <cassert> -#include <algorithm> -#include <ctime> -#include <functional> #include <list> #include <map> -#include <utility> -#include "stdext.h" /* Interface for TValue: * size_t weight() diff --git a/epg_events.cpp b/epg_events.cpp index fabf033..e4bfde7 100644 --- a/epg_events.cpp +++ b/epg_events.cpp @@ -1,15 +1,16 @@ -#include <time.h> -#include <glob.h> -#include <algorithm> -#include <assert.h> -#include <vdr/player.h> + +#include "epg_events.h" #include "tools.h" #include "recman.h" - -#include "epg_events.h" #include "setup.h" +// STL headers need to be before VDR tools.h (included by <vdr/player.h>) +#include <glob.h> +#include <cassert> + +#include <vdr/player.h> + using namespace std; namespace vdrlive diff --git a/epg_events.h b/epg_events.h index 0729ad2..ebd583b 100644 --- a/epg_events.h +++ b/epg_events.h @@ -1,17 +1,15 @@ -#ifndef VDR_LIVE_WHATS_ON_H -#define VDR_LIVE_WHATS_ON_H +#ifndef VDR_LIVE_EPG_EVENTS_H +#define VDR_LIVE_EPG_EVENTS_H -#include <ctime> +#include "stdext.h" + +// STL headers need to be before VDR tools.h (included by <vdr/channels.h>) +#include <string> #include <list> -#include <vdr/plugin.h> #include <vdr/channels.h> #include <vdr/epg.h> -#include <vdr/config.h> -#include <vdr/i18n.h> - -#include "live.h" -#include "stdext.h" +#include <vdr/recording.h> namespace vdrlive { @@ -252,5 +250,4 @@ namespace vdrlive }; // namespace vdrlive -#endif // VDR_LIVE_WHATS_ON_H - +#endif // VDR_LIVE_EPG_EVENTS_H diff --git a/epgsearch.cpp b/epgsearch.cpp index b157ea0..48e7fbf 100644 --- a/epgsearch.cpp +++ b/epgsearch.cpp @@ -1,14 +1,13 @@ -#include <vector> -#include <algorithm> -#include <vdr/channels.h> -#include <vdr/plugin.h> -#include <iomanip> -#include "epgsearch/services.h" + #include "epgsearch.h" + +#include "epgsearch/services.h" #include "exception.h" #include "livefeatures.h" #include "tools.h" +#include <iomanip> + namespace vdrlive { using namespace std; diff --git a/epgsearch.h b/epgsearch.h index 95d7387..c5f81e6 100644 --- a/epgsearch.h +++ b/epgsearch.h @@ -1,13 +1,15 @@ #ifndef VDR_LIVE_EPGSEARCH_H #define VDR_LIVE_EPGSEARCH_H +// STL headers need to be before VDR tools.h (included by <vdr/channels.h>) #include <vector> #include <list> #include <set> #include <string> +#include <algorithm> + #include <vdr/channels.h> #include <vdr/epg.h> -#include "tools.h" namespace vdrlive { diff --git a/epgsearch/services.h b/epgsearch/services.h index e7f80dd..fee274e 100644 --- a/epgsearch/services.h +++ b/epgsearch/services.h @@ -24,12 +24,15 @@ The project's page is at http://winni.vdr-developer.org/epgsearch #ifndef EPGSEARCHSERVICES_INC #define EPGSEARCHSERVICES_INC +#include "../autoptr.h" + +// STL headers need to be before VDR tools.h (included by <vdr/channels.h>) #include <string> #include <list> -#include <memory> #include <set> + #include <vdr/osdbase.h> -#include "../autoptr.h" + // Data structure for service "Epgsearch-search-v1.0" struct Epgsearch_search_v1_0 diff --git a/filecache.cpp b/filecache.cpp index 1ecb60f..a9c7c11 100644 --- a/filecache.cpp +++ b/filecache.cpp @@ -1,8 +1,10 @@ + +#include "filecache.h" + #include <algorithm> #include <fstream> #include <istream> #include <sys/stat.h> -#include "filecache.h" namespace vdrlive { diff --git a/filecache.h b/filecache.h index 6833193..25679c0 100644 --- a/filecache.h +++ b/filecache.h @@ -1,13 +1,15 @@ #ifndef VDR_LIVE_FILECACHE_H #define VDR_LIVE_FILECACHE_H +#include "cache.h" + +// STL headers need to be before VDR tools.h (included by <vdr/tools.h>) #include <limits> -#include <numeric> #include <string> +#include <ctime> #include <vector> + #include <vdr/thread.h> -#include <vdr/tools.h> -#include "cache.h" namespace vdrlive { @@ -1,8 +1,10 @@ -#include <cstdlib> -#include <vdr/device.h> -#include <vdr/tools.h> + #include "grab.h" +#include "tasks.h" + +#include <vdr/device.h> + namespace vdrlive { using namespace std; @@ -2,7 +2,6 @@ #define VDR_LIVE_GRAB_H #include "stdext.h" -#include "tasks.h" #include "autoptr.h" namespace vdrlive { @@ -7,6 +7,8 @@ #include "i18n.h" +#include <vdr/tools.h> + namespace vdrlive { @@ -2,8 +2,6 @@ #define VDR_LIVE_I18N_H #include <string> -#include <vdr/config.h> -#include <vdr/i18n.h> namespace vdrlive { @@ -4,17 +4,11 @@ * See the README file for copyright information and how to reach the author. */ -// To get rid of the swap definition in vdr/tools.h -#define __STL_CONFIG_H - -#include <vdr/config.h> -#include <vdr/plugin.h> -#include "i18n.h" #include "live.h" + #include "setup.h" #include "status.h" #include "tasks.h" -#include "thread.h" #include "timers.h" #include "preload.h" #include "users.h" @@ -1,12 +1,16 @@ #ifndef VDR_LIVE_LIVE_H #define VDR_LIVE_LIVE_H -#include <memory> +#include "thread.h" + +// STL headers need to be before VDR tools.h (included by <vdr/plugin.h>) #include <string> -#include <vdr/config.h> + +#ifndef __STL_CONFIG_H +// To get rid of the swap definition in vdr/tools.h +# define __STL_CONFIG_H +#endif #include <vdr/plugin.h> -#include "thread.h" -#include "autoptr.h" namespace vdrlive { diff --git a/livefeatures.cpp b/livefeatures.cpp index 94aa4cc..edc4e92 100644 --- a/livefeatures.cpp +++ b/livefeatures.cpp @@ -1,4 +1,6 @@ + #include "livefeatures.h" + #include "tools.h" namespace vdrlive { diff --git a/livefeatures.h b/livefeatures.h index 8c6f361..98f2d8a 100644 --- a/livefeatures.h +++ b/livefeatures.h @@ -1,13 +1,13 @@ #ifndef VDR_LIVE_FEATURES_H #define VDR_LIVE_FEATURES_H +// STL headers need to be before VDR tools.h (included by <vdr/channels.h>) #include <string> + #include <vdr/plugin.h> namespace vdrlive { -//LiveFeatures<EpgsearchFeature>().Available(); - class SplitVersion { public: @@ -33,12 +33,11 @@ // documentation and/or software. ///////////////////////////////////////////////////////////////////////// +#include "md5.h" + #include <assert.h> #include <memory.h> #include <stdio.h> -#include <string.h> -#include "md5.h" - static unsigned char PADDING[64] = { diff --git a/osd_status.cpp b/osd_status.cpp index a6791ab..90e6257 100644 --- a/osd_status.cpp +++ b/osd_status.cpp @@ -1,7 +1,8 @@ -#include <string> -#include <sstream> + #include "osd_status.h" +#include <sstream> + namespace vdrlive { OsdStatusMonitor::OsdStatusMonitor():title(),message(),red(),green(),yellow(),blue(),text(),selected(-1),lastUpdate(0){ diff --git a/osd_status.h b/osd_status.h index f84b1ef..3c86d45 100644 --- a/osd_status.h +++ b/osd_status.h @@ -1,9 +1,11 @@ #ifndef VDR_LIVE_OSD_STATUS_H #define VDR_LIVE_OSD_STATUS_H +// STL headers need to be before VDR tools.h (included by <vdr/status.h>) #include <string> + #include <vdr/status.h> -#include <time.h> + namespace vdrlive { diff --git a/pages/channels_widget.ecpp b/pages/channels_widget.ecpp index d4c06b4..c71506d 100644 --- a/pages/channels_widget.ecpp +++ b/pages/channels_widget.ecpp @@ -1,8 +1,7 @@ <%pre> -#include <vdr/channels.h> -#include "exception.h" -#include "setup.h" -#include "tools.h" + +#include <exception.h> +#include <setup.h> using namespace vdrlive; diff --git a/pages/content.ecpp b/pages/content.ecpp index cde092f..28f43c1 100644 --- a/pages/content.ecpp +++ b/pages/content.ecpp @@ -1,9 +1,6 @@ <%pre> -#include <string> -#include <tnt/httperror.h> -#include <tnt/httpheader.h> -#include "filecache.h" -#include "setup.h" + +#include <filecache.h> using namespace std; using namespace vdrlive; diff --git a/pages/edit_recording.ecpp b/pages/edit_recording.ecpp index a810908..e3e3deb 100644 --- a/pages/edit_recording.ecpp +++ b/pages/edit_recording.ecpp @@ -1,15 +1,11 @@ <%pre> + +#include <tools.h> +#include <recman.h> +#include <setup.h> +#include <users.h> + #include <vdr/recording.h> -#include <vdr/config.h> -#include <vdr/i18n.h> -#include "exception.h" -#include "tools.h" -#include "epg_events.h" -#include "recman.h" -#include "setup.h" -#include "i18n.h" -#include "livefeatures.h" -#include "users.h" using namespace std; using namespace vdrlive; diff --git a/pages/edit_searchtimer.ecpp b/pages/edit_searchtimer.ecpp index a17b9d8..a81a15a 100644 --- a/pages/edit_searchtimer.ecpp +++ b/pages/edit_searchtimer.ecpp @@ -1,16 +1,11 @@ <%pre> -#include <memory> -#include <vdr/channels.h> -#include <vdr/config.h> -#include <vdr/epg.h> -#include <vdr/i18n.h> + +#include <tools.h> +#include <epgsearch.h> +#include <setup.h> +#include <users.h> + #include <iomanip> -#include "exception.h" -#include "tools.h" -#include "epgsearch.h" -#include "setup.h" -#include "i18n.h" -#include "users.h" using namespace std; using namespace vdrlive; diff --git a/pages/edit_timer.ecpp b/pages/edit_timer.ecpp index ecc8c6e..d080ee5 100644 --- a/pages/edit_timer.ecpp +++ b/pages/edit_timer.ecpp @@ -1,24 +1,16 @@ <%pre> -// To get rid of the swap definition in vdr/tools.h -#define __STL_CONFIG_H +#include <tools.h> +#include <timers.h> +#include <setup.h> +#include <epg_events.h> +#include <timerconflict.h> +#include <livefeatures.h> +#include <epgsearch.h> +#include <users.h> +#include <autoptr.h> -#include <memory> -#include <vdr/channels.h> -#include <vdr/config.h> -#include <vdr/epg.h> -#include <vdr/i18n.h> -#include "exception.h" -#include "tools.h" -#include "timers.h" -#include "setup.h" -#include "epg_events.h" -#include "timerconflict.h" -#include "i18n.h" -#include "livefeatures.h" -#include "epgsearch.h" -#include "users.h" -#include "autoptr.h" +#include <vdr/timers.h> using namespace std; using namespace vdrlive; @@ -226,15 +218,15 @@ cTimer* timer; </tr> <%cpp> if ( LiveFeatures< features::epgsearch >().Recent() ) { - RecordingDirs recordingdirs(true); + RecordingDirs recordingdirs(true); </%cpp> <tr> <td class="label leftcol"><div class="withmargin"><$ tr("Directory" ) $>:</div></td> <td class="rightcol"><select name="directory" size="1" id="directory" style="margin-top: 5px"> <option/> <%cpp> - for (RecordingDirs::iterator rdir = recordingdirs.begin(); rdir != recordingdirs.end(); ++rdir) { - std::string dir = *rdir; + for (RecordingDirs::iterator rdir = recordingdirs.begin(); rdir != recordingdirs.end(); ++rdir) { + std::string dir = *rdir; </%cpp> <option value="<$ dir $>" % if (*rdir == directory) { diff --git a/pages/edit_user.ecpp b/pages/edit_user.ecpp index e1d977c..ac7ba86 100644 --- a/pages/edit_user.ecpp +++ b/pages/edit_user.ecpp @@ -1,9 +1,8 @@ <%pre> -#include "exception.h" -#include "tools.h" -#include "users.h" -#include "livefeatures.h" -#include "setup.h" + +#include <users.h> +#include <livefeatures.h> +#include <setup.h> using namespace std; using namespace vdrlive; diff --git a/pages/epginfo.ecpp b/pages/epginfo.ecpp index 77d2f91..91e72f9 100644 --- a/pages/epginfo.ecpp +++ b/pages/epginfo.ecpp @@ -1,13 +1,11 @@ <%pre> -#include <sys/stat.h> -#include <vdr/tools.h> - -#include "stdext.h" -#include "exception.h" -#include "setup.h" -#include "tools.h" -#include "epg_events.h" -#include "recman.h" + +#include <stdext.h> +#include <exception.h> +#include <setup.h> +#include <tools.h> +#include <epg_events.h> +#include <recman.h> namespace vdrlive { class SchedulesLock diff --git a/pages/error.ecpp b/pages/error.ecpp index df24dd4..ed68b89 100644 --- a/pages/error.ecpp +++ b/pages/error.ecpp @@ -1,6 +1,6 @@ <%pre> -#include <vdr/i18n.h> -#include "setup.h" + +#include <setup.h> using namespace vdrlive; diff --git a/pages/event_widget.ecpp b/pages/event_widget.ecpp index b4a80cb..db8538d 100644 --- a/pages/event_widget.ecpp +++ b/pages/event_widget.ecpp @@ -1,10 +1,6 @@ <%pre> -#include <vdr/plugin.h> -#include <vdr/channels.h> -#include <vdr/epg.h> -#include <vdr/config.h> -#include <vdr/i18n.h> -#include "tools.h" + +#include <setup.h> using namespace vdrlive; diff --git a/pages/ffw_recording.ecpp b/pages/ffw_recording.ecpp index 5b2d8bc..9d746f1 100644 --- a/pages/ffw_recording.ecpp +++ b/pages/ffw_recording.ecpp @@ -1,10 +1,7 @@ <%pre> -#include <string> -#include <vdr/recording.h> -#include "exception.h" -#include "setup.h" -#include "tasks.h" -#include "tools.h" + +#include <setup.h> +#include <tasks.h> using namespace std; using namespace vdrlive; diff --git a/pages/ibox.ecpp b/pages/ibox.ecpp index 5e714b0..947b746 100644 --- a/pages/ibox.ecpp +++ b/pages/ibox.ecpp @@ -1,17 +1,12 @@ <%pre> -#include <vdr/plugin.h> -#include <vdr/config.h> -#include <vdr/recording.h> -#include <vdr/channels.h> + +#include <setup.h> +#include <tools.h> +#include <epg_events.h> +#include <recman.h> +#include <timerconflict.h> + #include <vdr/menu.h> -#include <vdr/device.h> - -#include "exception.h" -#include "setup.h" -#include "tools.h" -#include "epg_events.h" -#include "recman.h" -#include "timerconflict.h" using namespace vdrlive; using namespace std; diff --git a/pages/keypress.ecpp b/pages/keypress.ecpp index efcb1a3..16ddd4f 100644 --- a/pages/keypress.ecpp +++ b/pages/keypress.ecpp @@ -1,6 +1,8 @@ <%pre> + +#include <setup.h> + #include <vdr/remote.h> -#include "setup.h" using namespace vdrlive; diff --git a/pages/login.ecpp b/pages/login.ecpp index a49f1fa..f7e6a17 100644 --- a/pages/login.ecpp +++ b/pages/login.ecpp @@ -1,7 +1,7 @@ <%pre> -#include "tools.h" -#include "setup.h" -#include "users.h" + +#include <setup.h> +#include <users.h> using namespace std; using namespace vdrlive; diff --git a/pages/menu.ecpp b/pages/menu.ecpp index 74ff1b9..6251ec7 100644 --- a/pages/menu.ecpp +++ b/pages/menu.ecpp @@ -1,12 +1,8 @@ <%pre> -#include <string> -#include <vdr/plugin.h> -#include <vdr/config.h> -#include "livefeatures.h" -#include "setup.h" -#include "i18n.h" -#include "timerconflict.h" +#include <livefeatures.h> +#include <setup.h> +#include <timerconflict.h> using namespace std; using namespace vdrlive; diff --git a/pages/multischedule.ecpp b/pages/multischedule.ecpp index f84287a..22a3f07 100644 --- a/pages/multischedule.ecpp +++ b/pages/multischedule.ecpp @@ -1,17 +1,10 @@ <%pre> -#include <list> -#include <vdr/plugin.h> -#include <vdr/channels.h> -#include <vdr/epg.h> -#include <vdr/config.h> -#include <vdr/device.h> -#include "exception.h" -#include "livefeatures.h" -#include "setup.h" -#include "tools.h" -#include "timers.h" -#include "epg_events.h" -#include "i18n.h" + +#include <livefeatures.h> +#include <setup.h> +#include <tools.h> +#include <timers.h> +#include <epg_events.h> using namespace std; using namespace vdrlive; diff --git a/pages/osd.ecpp b/pages/osd.ecpp index b7cf24a..1a8aba7 100644 --- a/pages/osd.ecpp +++ b/pages/osd.ecpp @@ -1,13 +1,7 @@ <%pre> -#include <locale> -#include <vdr/i18n.h> -#include <vdr/keys.h> -#include <vdr/device.h> -#include "grab.h" -#include "setup.h" -#include "tools.h" -#include "users.h" -#include "osd_status.h" + +#include <setup.h> +#include <osd_status.h> using namespace std; using namespace vdrlive; diff --git a/pages/page_exit.eh b/pages/page_exit.eh index 319260e..fb83055 100644 --- a/pages/page_exit.eh +++ b/pages/page_exit.eh @@ -1,6 +1,6 @@ <# do not add to Makefile #> <%pre> -#include "exception.h" +#include <exception.h> </%pre> <%cpp> spoint.commit(); diff --git a/pages/page_init.eh b/pages/page_init.eh index 5a367df..da4374e 100644 --- a/pages/page_init.eh +++ b/pages/page_init.eh @@ -1,9 +1,9 @@ <%pre> // do not add to Makefile // and do not write a ecpp comment into this file. It must produce no -// html output not even a empty line. +// html output not even an empty line. #include <tnt/savepoint.h> -#include "exception.h" +#include <exception.h> </%pre> <%request scope="global"> std::string pageTitle; @@ -12,4 +12,4 @@ std::string pageTitle; try { reply.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); tnt::Savepoint spoint( reply ); -</%cpp>
\ No newline at end of file +</%cpp> diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp index bbb8f38..1f96399 100644 --- a/pages/pageelems.ecpp +++ b/pages/pageelems.ecpp @@ -1,17 +1,12 @@ <%pre> -#include <string> -#include <vdr/menu.h> -#include <vdr/epg.h> -#include "exception.h" -#include "livefeatures.h" -#include "tntfeatures.h" -#include "i18n.h" -#include "setup.h" -#include "timers.h" -#include "tools.h" -#include "epg_events.h" -#include "gen_version_suffix.h" +#include <livefeatures.h> +#include <setup.h> +#include <timers.h> +#include <tools.h> +#include <epg_events.h> +#include <gen_version_suffix.h> +// using namespace std; using namespace vdrlive; diff --git a/pages/pause_recording.ecpp b/pages/pause_recording.ecpp index 1208a42..00ea269 100644 --- a/pages/pause_recording.ecpp +++ b/pages/pause_recording.ecpp @@ -1,10 +1,7 @@ <%pre> -#include <string> -#include <vdr/recording.h> -#include "exception.h" -#include "setup.h" -#include "tasks.h" -#include "tools.h" + +#include <setup.h> +#include <tasks.h> using namespace std; using namespace vdrlive; diff --git a/pages/play_recording.ecpp b/pages/play_recording.ecpp index 1f018de..6ecb7db 100644 --- a/pages/play_recording.ecpp +++ b/pages/play_recording.ecpp @@ -1,11 +1,9 @@ <%pre> -#include <string> -#include <vdr/recording.h> -#include "exception.h" -#include "setup.h" -#include "tasks.h" -#include "tools.h" -#include "users.h" + +#include <setup.h> +#include <tasks.h> +#include <users.h> +#include <exception.h> using namespace std; using namespace vdrlive; diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index 1693e2a..615fb7c 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -1,25 +1,18 @@ <%pre> -#include <string> + +#include <setup.h> +#include <tasks.h> +#include <tools.h> +#include <users.h> +#include <recman.h> +#include <tntconfig.h> #ifdef HAVE_LIBPCRECPP #include <pcrecpp.h> #endif -#include <vdr/plugin.h> -#include <vdr/config.h> #include <vdr/videodir.h> -#include "exception.h" -#include "epg_events.h" - -#include "setup.h" -#include "tasks.h" -#include "tools.h" -#include "i18n.h" -#include "users.h" - -#include "recman.h" - #define MB_PER_MINUTE 25.75 // this is just an estimate! using namespace vdrlive; diff --git a/pages/recstream.ecpp b/pages/recstream.ecpp index 61a48e1..5e7614b 100644 --- a/pages/recstream.ecpp +++ b/pages/recstream.ecpp @@ -1,14 +1,6 @@ <%pre> -#include <string> -#include <iostream> -#include <fstream> -#include <algorithm> -#include <tnt/httperror.h> -#include <tnt/httpheader.h> -#include <vdr/recording.h> -#include "tntfeatures.h" -#include "setup.h" -#include "recman.h" + +#include <recman.h> using namespace std; using namespace vdrlive; diff --git a/pages/remote.ecpp b/pages/remote.ecpp index d76b208..0c46f69 100644 --- a/pages/remote.ecpp +++ b/pages/remote.ecpp @@ -1,12 +1,9 @@ <%pre> -#include <locale> -#include <vdr/i18n.h> -#include <vdr/keys.h> -#include <vdr/device.h> -#include "grab.h" -#include "setup.h" -#include "tools.h" -#include "users.h" + +#include <grab.h> +#include <setup.h> +#include <tools.h> +#include <users.h> using namespace std; using namespace vdrlive; diff --git a/pages/rwd_recording.ecpp b/pages/rwd_recording.ecpp index a0ce569..d568cf3 100644 --- a/pages/rwd_recording.ecpp +++ b/pages/rwd_recording.ecpp @@ -1,10 +1,7 @@ <%pre> -#include <string> -#include <vdr/recording.h> -#include "exception.h" -#include "setup.h" -#include "tasks.h" -#include "tools.h" + +#include <setup.h> +#include <tasks.h> using namespace std; using namespace vdrlive; diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp index 96d9427..c5e5979 100644 --- a/pages/schedule.ecpp +++ b/pages/schedule.ecpp @@ -1,15 +1,9 @@ <%pre> -#include <vdr/plugin.h> -#include <vdr/channels.h> -#include <vdr/epg.h> -#include <vdr/config.h> -#include <vdr/device.h> -#include "exception.h" -#include "livefeatures.h" -#include "setup.h" -#include "tools.h" -#include "epg_events.h" -#include "i18n.h" + +#include <livefeatures.h> +#include <setup.h> +#include <tools.h> +#include <epg_events.h> using namespace std; using namespace vdrlive; diff --git a/pages/screenshot.ecpp b/pages/screenshot.ecpp index c80c1c8..fbdca02 100644 --- a/pages/screenshot.ecpp +++ b/pages/screenshot.ecpp @@ -1,7 +1,7 @@ <%pre> -#include <vdr/config.h> -#include "setup.h" -#include "grab.h" + +#include <setup.h> +#include <grab.h> using namespace vdrlive; diff --git a/pages/searchepg.ecpp b/pages/searchepg.ecpp index 18e8f2e..9d9c79a 100644 --- a/pages/searchepg.ecpp +++ b/pages/searchepg.ecpp @@ -1,14 +1,8 @@ <%pre> -#include <memory> -#include <vdr/channels.h> -#include <vdr/config.h> -#include <vdr/epg.h> -#include <vdr/i18n.h> -#include <iomanip> -#include "exception.h" -#include "tools.h" -#include "epgsearch.h" -#include "setup.h" + +#include <tools.h> +#include <epgsearch.h> +#include <setup.h> using namespace std; using namespace vdrlive; diff --git a/pages/searchresults.ecpp b/pages/searchresults.ecpp index 695a7cd..8970f37 100644 --- a/pages/searchresults.ecpp +++ b/pages/searchresults.ecpp @@ -1,11 +1,9 @@ <%pre> -#include <vdr/channels.h> -#include <vdr/i18n.h> -#include <vdr/epg.h> -#include "epgsearch.h" -#include "tools.h" -#include "setup.h" -#include "epg_events.h" + +#include <epgsearch.h> +#include <tools.h> +#include <setup.h> +#include <epg_events.h> using namespace vdrlive; using namespace std; diff --git a/pages/searchtimers.ecpp b/pages/searchtimers.ecpp index dc8bc53..0ed3acc 100644 --- a/pages/searchtimers.ecpp +++ b/pages/searchtimers.ecpp @@ -1,10 +1,8 @@ <%pre> -#include <vdr/channels.h> -#include <vdr/i18n.h> -#include "epgsearch.h" -#include "tools.h" -#include "setup.h" -#include "users.h" + +#include <epgsearch.h> +#include <setup.h> +#include <users.h> using namespace vdrlive; using namespace std; diff --git a/pages/setup.ecpp b/pages/setup.ecpp index 264839b..b87b0db 100644 --- a/pages/setup.ecpp +++ b/pages/setup.ecpp @@ -1,10 +1,9 @@ <%pre> -#include <sys/stat.h> -#include <vdr/tools.h> -#include "setup.h" -#include "tools.h" -#include "users.h" -#include "i18n.h" + +#include <setup.h> +#include <tools.h> +#include <users.h> +#include <live.h> using namespace vdrlive; using namespace std; diff --git a/pages/stop_recording.ecpp b/pages/stop_recording.ecpp index 869beb0..00be32f 100644 --- a/pages/stop_recording.ecpp +++ b/pages/stop_recording.ecpp @@ -1,10 +1,7 @@ <%pre> -#include <string> -#include <vdr/recording.h> -#include "exception.h" -#include "setup.h" -#include "tasks.h" -#include "tools.h" + +#include <setup.h> +#include <tasks.h> using namespace std; using namespace vdrlive; diff --git a/pages/switch_channel.ecpp b/pages/switch_channel.ecpp index 2cffefc..79a6466 100644 --- a/pages/switch_channel.ecpp +++ b/pages/switch_channel.ecpp @@ -1,9 +1,9 @@ <%pre> -#include <vdr/channels.h> -#include "exception.h" -#include "tasks.h" -#include "tools.h" -#include "users.h" + +#include <exception.h> +#include <tasks.h> +#include <tools.h> +#include <users.h> using namespace std; using namespace vdrlive; diff --git a/pages/timerconflicts.ecpp b/pages/timerconflicts.ecpp index b6c34f0..61e7338 100644 --- a/pages/timerconflicts.ecpp +++ b/pages/timerconflicts.ecpp @@ -1,12 +1,10 @@ <%pre> -#include <vdr/channels.h> -#include <vdr/i18n.h> -#include "timerconflict.h" -#include "tools.h" -#include "setup.h" -#include "epg_events.h" -#include "timers.h" -#include "i18n.h" + +#include <timerconflict.h> +#include <tools.h> +#include <setup.h> +#include <epg_events.h> +#include <timers.h> using namespace vdrlive; using namespace std; diff --git a/pages/timers.ecpp b/pages/timers.ecpp index 9f5632c..771a907 100644 --- a/pages/timers.ecpp +++ b/pages/timers.ecpp @@ -1,14 +1,12 @@ <%pre> -#include <set> -#include <vdr/i18n.h> -#include "timers.h" -#include "tools.h" -#include "setup.h" -#include "i18n.h" -#include "epg_events.h" -#include "timerconflict.h" -#include "livefeatures.h" -#include "users.h" + +#include <timers.h> +#include <tools.h> +#include <setup.h> +#include <epg_events.h> +#include <timerconflict.h> +#include <livefeatures.h> +#include <users.h> using namespace std; using namespace vdrlive; diff --git a/pages/tooltip.ecpp b/pages/tooltip.ecpp index e7ddaa6..ed1a31a 100644 --- a/pages/tooltip.ecpp +++ b/pages/tooltip.ecpp @@ -1,5 +1,6 @@ <%pre> -#include "setup.h" + +#include <setup.h> using namespace vdrlive; diff --git a/pages/users.ecpp b/pages/users.ecpp index 9e00602..f8bc546 100644 --- a/pages/users.ecpp +++ b/pages/users.ecpp @@ -1,8 +1,7 @@ <%pre> -#include <vdr/channels.h> -#include <vdr/i18n.h> -#include "users.h" -#include "setup.h" + +#include <users.h> +#include <setup.h> using namespace vdrlive; using namespace std; diff --git a/pages/vlc.ecpp b/pages/vlc.ecpp index 59baa72..39cfb67 100644 --- a/pages/vlc.ecpp +++ b/pages/vlc.ecpp @@ -1,11 +1,8 @@ <%pre> -#include <vdr/channels.h> -#include <vdr/i18n.h> -#include <vdr/keys.h> -#include "setup.h" -#include "tools.h" -#include "users.h" -#include "tntfeatures.h" + +#include <setup.h> +#include <tools.h> +#include <users.h> using namespace std; using namespace vdrlive; diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp index 444b845..bc58687 100644 --- a/pages/whats_on.ecpp +++ b/pages/whats_on.ecpp @@ -1,14 +1,10 @@ <%pre> -#include <vdr/plugin.h> -#include <vdr/channels.h> -#include <vdr/epg.h> -#include <vdr/config.h> -#include <vdr/i18n.h> -#include "livefeatures.h" -#include "setup.h" -#include "tools.h" -#include "epg_events.h" -#include "epgsearch.h" + +#include <livefeatures.h> +#include <setup.h> +#include <tools.h> +#include <epg_events.h> +#include <epgsearch.h> using namespace std; using namespace vdrlive; diff --git a/pages/xmlresponse.ecpp b/pages/xmlresponse.ecpp index bf0a6c1..40eca86 100644 --- a/pages/xmlresponse.ecpp +++ b/pages/xmlresponse.ecpp @@ -1,6 +1,6 @@ <%pre> -#include <string> -#include "i18n.h" + +#include <i18n.h> using namespace std; using namespace vdrlive; diff --git a/preload.cpp b/preload.cpp index 10e066e..3c24955 100644 --- a/preload.cpp +++ b/preload.cpp @@ -1,10 +1,9 @@ -#include <string> -#include <vdr/tools.h> +#include "preload.h" #include "filecache.h" -#include "preload.h" +#include <vdr/tools.h> using namespace std; @@ -1,15 +1,14 @@ -#include <unistd.h> -#include <string> -#include <sstream> + +#include "recman.h" + +#include "tools.h" + +// STL headers need to be before VDR tools.h (included by <vdr/videodir.h>) #include <fstream> #include <stack> #include <algorithm> -#include "stdext.h" -#include "tools.h" - -#include "epg_events.h" -#include "recman.h" +#include <vdr/videodir.h> #define INDEXFILESUFFIX "/index.vdr" #define LENGTHFILESUFFIX "/length.vdr" @@ -1,12 +1,15 @@ #ifndef VDR_LIVE_RECORDINGS_H #define VDR_LIVE_RECORDINGS_H -#include <ctime> +#include "stdext.h" + +// STL headers need to be before VDR tools.h (included by <vdr/recording.h>) #include <map> +#include <string> #include <vector> #include <list> + #include <vdr/recording.h> -#include "stdext.h" namespace vdrlive { @@ -1,25 +1,21 @@ -#include <cerrno> -#include <cstdlib> -#include <cstring> + +#include "setup.h" + +#include "tools.h" + +// STL headers need to be before VDR tools.h (included by <vdr/plugin.h>) +#include <getopt.h> #include <algorithm> -#include <functional> #include <iostream> -#include <sstream> #include <bitset> -#include <getopt.h> -#include <stdint.h> -#include <unistd.h> -#include <string> + +#include <vdr/plugin.h> + #ifdef __FreeBSD__ #include <sys/socket.h> #include <netinet/in.h> #endif #include <arpa/inet.h> -#include <vdr/tools.h> -#include <vdr/menuitems.h> -#include <vdr/plugin.h> -#include "setup.h" -#include "tools.h" namespace vdrlive { @@ -1,12 +1,11 @@ #ifndef VDR_LIVE_SETUP_H #define VDR_LIVE_SETUP_H +// STL headers need to be before VDR tools.h (included by <vdr/menuitems.h>) #include <list> #include <limits> -#include <numeric> #include <string> -#include "live.h" -#include "tntfeatures.h" + #include <vdr/menuitems.h> #define LIVEVERSION "2.3.1" @@ -1,4 +1,6 @@ + #include "status.h" + #include "timers.h" namespace vdrlive { @@ -1,15 +1,13 @@ -#include <algorithm> -#include <vdr/channels.h> -#include <vdr/i18n.h> -#include <vdr/menu.h> -#include <vdr/recording.h> + +#include "tasks.h" #include "stdext.h" -#include "exception.h" #include "recman.h" -#include "tools.h" -#include "tasks.h" +// STL headers need to be before VDR tools.h (included by <vdr/menu.h>) +#include <algorithm> + +#include <vdr/menu.h> namespace vdrlive { @@ -1,9 +1,10 @@ #ifndef VDR_LIVE_TASKS_H #define VDR_LIVE_TASKS_H -#include <memory> +// STL headers need to be before VDR tools.h (included by <vdr/channels.h>) #include <string> #include <vector> + #include <vdr/channels.h> #include <vdr/thread.h> @@ -1,11 +1,10 @@ -#include <cstdlib> -#include <iostream> -#include <stdexcept> -#include <vdr/tools.h> -#include <tnt/tntnet.h> + #include "thread.h" + #include "tntconfig.h" +#include <vdr/tools.h> + namespace vdrlive { using namespace std; @@ -1,10 +1,8 @@ #ifndef VDR_LIVE_THREAD_H #define VDR_LIVE_THREAD_H -#include <memory> -#include <vdr/thread.h> #include "autoptr.h" - +#include <vdr/thread.h> namespace tnt { class Tntnet; } diff --git a/timerconflict.cpp b/timerconflict.cpp index 01f473a..e2140db 100644 --- a/timerconflict.cpp +++ b/timerconflict.cpp @@ -1,15 +1,13 @@ -#include <time.h> -#include <vector> - -#include <vdr/plugin.h> +#include "timerconflict.h" #include "tools.h" -#include "exception.h" -#include "epgsearch.h" #include "epgsearch/services.h" -#include "timerconflict.h" +// STL headers need to be before VDR tools.h (included by <vdr/plugin.h>) +#include <vector> + +#include <vdr/plugin.h> namespace vdrlive { diff --git a/timerconflict.h b/timerconflict.h index 0e60420..ed1f15e 100644 --- a/timerconflict.h +++ b/timerconflict.h @@ -1,10 +1,12 @@ #ifndef VDR_LIVE_TIMERCONFLICT_H #define VDR_LIVE_TIMERCONFLICT_H -#include <list> - #include "stdext.h" +#include <list> +#include <string> +#include <time.h> + namespace vdrlive { // classes for timer conflict interface @@ -1,12 +1,16 @@ -#include <memory> -#include <sstream> -#include <vector> -#include "exception.h" + #include "timers.h" + +#include "exception.h" #include "tools.h" -#include "i18n.h" #include "autoptr.h" +// STL headers need to be before VDR tools.h (included by <vdr/plugin.h>) +#include <sstream> + +#include <vdr/plugin.h> +#include <vdr/menu.h> + static bool operator<( cTimer const& left, cTimer const& right ) { return left.Compare( right ) < 0; @@ -1,13 +1,11 @@ #ifndef VDR_LIVE_TIMERS_H #define VDR_LIVE_TIMERS_H +// STL headers need to be before VDR tools.h (included by <vdr/timers.h>) #include <list> #include <string> -#include <vdr/channels.h> -#include <vdr/menu.h> + #include <vdr/timers.h> -#include <vdr/thread.h> -#include "live.h" namespace vdrlive { diff --git a/tntconfig.cpp b/tntconfig.cpp index 123ee78..6d4c6e9 100644 --- a/tntconfig.cpp +++ b/tntconfig.cpp @@ -1,24 +1,16 @@ -#include <cerrno> -#include <cstring> -#include <fstream> -#include <sstream> -#include <stdexcept> -#include "tntfeatures.h" + +#include "tntconfig.h" + +#include "i18n.h" +#include "live.h" +#include "setup.h" + #if TNT_LOG_SERINFO #include <cxxtools/log.h> #include <cxxtools/xml/xmldeserializer.h> #else #include <cxxtools/loginit.h> #endif -#include <tnt/sessionscope.h> -#include <tnt/httpreply.h> -#include <vdr/config.h> -#include <vdr/plugin.h> -#include <vdr/videodir.h> -#include "i18n.h" -#include "live.h" -#include "setup.h" -#include "tntconfig.h" namespace vdrlive { diff --git a/tntconfig.h b/tntconfig.h index 118a6e5..2169245 100644 --- a/tntconfig.h +++ b/tntconfig.h @@ -1,11 +1,10 @@ #ifndef VDR_LIVE_TNTCONFIG_H #define VDR_LIVE_TNTCONFIG_H -#include <string> -#include <tnt/tntnet.h> -#include <vdr/config.h> #include "tntfeatures.h" +#include <tnt/tntnet.h> + namespace vdrlive { class TntConfig @@ -1,17 +1,16 @@ -#include <algorithm> -#include <stdexcept> -#include <iomanip> -#include <tnt/ecpp.h> -#include <tnt/htmlescostream.h> -#include <tnt/httprequest.h> -#include <tnt/httpreply.h> -#include <vdr/recording.h> -#include "exception.h" -#include "live.h" -#include "setup.h" + #include "tools.h" + #include "md5.h" +#include <tnt/ecpp.h> +#include <tnt/htmlescostream.h> + +// STL headers need to be before VDR tools.h (included by <vdr/recording.h>) +#include <iomanip> + +#include <vdr/recording.h> +#include <vdr/videodir.h> using namespace std; using namespace tnt; @@ -1,18 +1,17 @@ #ifndef VDR_LIVE_TOOLS_H #define VDR_LIVE_TOOLS_H -#include <ctime> +// STL headers need to be before VDR tools.h (included by <vdr/channels.h>) #include <istream> -#include <locale> -#include <ostream> #include <sstream> #include <stdexcept> -#include <string> #include <vector> + +#ifndef __STL_CONFIG_H +// To get rid of the swap definition in vdr/tools.h +# define __STL_CONFIG_H +#endif #include <vdr/channels.h> -#include <vdr/thread.h> -#include <vdr/videodir.h> -#include <vdr/tools.h> std::istream& operator>>( std::istream& is, tChannelID& ret ); @@ -5,11 +5,12 @@ */ #include "users.h" -#include <iostream> -#include <sstream> + #include "tools.h" #include "setup.h" +#include <sstream> + namespace vdrlive { using namespace std; @@ -1,11 +1,11 @@ #ifndef VDR_LIVE_USERS_H #define VDR_LIVE_USERS_H +// STL headers need to be before VDR tools.h (included by <vdr/channels.h>) #include <string> -#include <vdr/plugin.h> + #include <vdr/tools.h> -#include <iostream> -#include <sstream> +#include <vdr/config.h> namespace vdrlive { |