diff options
author | wr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b> | 2005-02-08 22:51:17 +0000 |
---|---|---|
committer | wr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b> | 2005-02-08 22:51:17 +0000 |
commit | 4e66317bdef5451a50a3bf4bc1b564338bc52788 (patch) | |
tree | 000f1f640b3306c86b74208bbc46a03b80f31beb | |
parent | dc68a2ee19366fc958b9d876845c3aef6a469240 (diff) | |
download | vdr-plugin-muggle-4e66317bdef5451a50a3bf4bc1b564338bc52788.tar.gz vdr-plugin-muggle-4e66317bdef5451a50a3bf4bc1b564338bc52788.tar.bz2 |
make it compilable with 2.95
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@464 e10066b5-e1e2-0310-b819-94efdf66514b
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | mg_actions.c | 2 | ||||
-rw-r--r-- | mg_db.c | 3 | ||||
-rw-r--r-- | mg_db.h | 4 | ||||
-rw-r--r-- | mg_order.c | 12 | ||||
-rw-r--r-- | mg_order.h | 4 | ||||
-rw-r--r-- | mg_valmap.h | 2 | ||||
-rw-r--r-- | muggle.h | 3 | ||||
-rwxr-xr-x | mugglei.c | 2 | ||||
-rw-r--r-- | vdr_decoder.c | 10 | ||||
-rw-r--r-- | vdr_decoder_flac.c | 15 | ||||
-rw-r--r-- | vdr_menu.c | 4 |
12 files changed, 37 insertions, 26 deletions
@@ -53,7 +53,7 @@ PACKAGE = vdr-$(ARCHIVE) INCLUDES += -I$(VDRDIR) -I$(VDRDIR)/include -I$(DVBDIR)/include \ -I/usr/include/mysql/ -I/usr/include/taglib -DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' +DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' MIFLAGS += -I/usr/include/taglib -lmysqlclient diff --git a/mg_actions.c b/mg_actions.c index 42337d9..ea35c32 100644 --- a/mg_actions.c +++ b/mg_actions.c @@ -9,6 +9,8 @@ * $Id: mg_actions.c 276 2004-12-25 15:52:35Z wr61 $ */ +#include <stdio.h> + #include <typeinfo> #include <string> #include <vector> @@ -9,6 +9,7 @@ * */ +#include <stdio.h> #include "mg_db.h" #include "vdr_setup.h" #include "mg_tools.h" @@ -403,7 +404,7 @@ string mgSelection::exportM3U () mgContentItem& t = m_tracks[i]; fprintf (listfile, "#EXTINF:%d,%s\n", t.getDuration (), t.getTitle ().c_str ()); - fprintf (listfile, "#MUGGLE:%d\n", t.getId()); + fprintf (listfile, "#MUGGLE:%ld\n", t.getId()); fprintf (listfile, "%s\n", t.getSourceFile (false).c_str ()); } fclose (listfile); @@ -17,10 +17,6 @@ #include <list> #include <vector> #include <map> -#include <iostream> -#include <istream> -#include <sstream> -#include <ostream> #include <i18n.h> using namespace std; @@ -1,6 +1,7 @@ #include "mg_order.h" #include "mg_tools.h" #include "i18n.h" +#include <stdio.h> bool iskeyGenre(mgKeyTypes kt) @@ -28,7 +29,7 @@ sql_string (MYSQL *db, const string s) return ""; char *buf = (char *) malloc (s.size () * 2 + 1); mysql_real_escape_string (db, buf, s.c_str (), s.size ()); - string result = "'" + std::string (buf) + "'"; + string result = "'" + string (buf) + "'"; free (buf); return result; } @@ -866,8 +867,11 @@ mgReferences::mgReferences() bool mgReferences::Equal(unsigned int i,string table1, string table2) const { - return (((at(i).t1()==table1) && (at(i).t2()==table2)) - || ((at(i).t1()==table2) && (at(i).t2()==table1))); + const mgReference& r = operator[](i); + string s1 = r.t1(); + string s2 = r.t2(); + return ((s1==table1) && (s2==table2)) + || ((s1==table2) && (s2==table1)); } mgParts @@ -875,7 +879,7 @@ mgReferences::FindConnectionBetween(string table1, string table2) const { for (unsigned int i=0 ; i<size(); i++ ) if (Equal(i,table1,table2)) - return mgRefParts(at(i)); + return mgRefParts(operator[](i)); return mgParts(); } @@ -7,11 +7,7 @@ #include <assert.h> #include <list> #include <vector> -#include <iostream> -#include <istream> #include <sstream> -#include <ostream> - #include "mg_valmap.h" using namespace std; diff --git a/mg_valmap.h b/mg_valmap.h index a1da822..ca39139 100644 --- a/mg_valmap.h +++ b/mg_valmap.h @@ -1,5 +1,7 @@ #ifndef _MG_VALMAP_H #define _MG_VALMAP_H + +#include <stdio.h> #include <string> #include <map> @@ -32,6 +32,9 @@ #ifndef _MUGGLE_H #define _MUGGLE_H #include <string> +#include <stdio.h> +#include <sys/types.h> +#include <pthread.h> #include <plugin.h> class mgMainMenu; @@ -6,6 +6,8 @@ */ // #define VERBOSE + +#include <unistd.h> #include <string> #include <stdlib.h> diff --git a/vdr_decoder.c b/vdr_decoder.c index 93dc540..2ba1e5b 100644 --- a/vdr_decoder.c +++ b/vdr_decoder.c @@ -21,6 +21,12 @@ #include <sys/stat.h> #include <sys/vfs.h> +#include "mg_db.h" + +#include <videodir.h> +#include <interface.h> + + #include "vdr_setup.h" #include "vdr_decoder.h" #include "vdr_decoder_mp3.h" @@ -35,10 +41,6 @@ extern void showmessage(const char *); #include "vdr_decoder_flac.h" #endif -#include "mg_db.h" - -#include <videodir.h> -#include <interface.h> // --- mgDecoders --------------------------------------------------------------- diff --git a/vdr_decoder_flac.c b/vdr_decoder_flac.c index f18ceab..76d15dd 100644 --- a/vdr_decoder_flac.c +++ b/vdr_decoder_flac.c @@ -11,17 +11,20 @@ #ifdef HAVE_FLAC #define DEBUG -#include "vdr_setup.h" -#include "vdr_decoder_flac.h" + +#include <string> +#include <stdlib.h> +#include <stdio.h> #include "mg_tools.h" #include "mg_db.h" +#include "vdr_setup.h" +#include "vdr_decoder_flac.h" + + #include <mad.h> -#include <string> -#include <stdlib.h> -#include <stdio.h> using namespace std; @@ -82,7 +85,7 @@ bool mgFlacDecoder::initialize() m_reservoir[0] = new FLAC__int32[MAX_RES_SIZE]; m_reservoir[1] = new FLAC__int32[MAX_RES_SIZE]; - FLAC::Decoder::File::State d = init(); // TODO: check this + /*FLAC::Decoder::File::State d =*/ init(); // TODO: check this process_until_end_of_metadata(); // basically just skip metadata @@ -9,6 +9,8 @@ * $Id$ */ +#include <stdio.h> + #include <typeinfo> #include <string> #include <vector> @@ -220,7 +222,6 @@ mgMenu::mgMenu () void mgMainMenu::DumpOrders(mgValmap& nv) { - map<string,mgOrder*>::iterator it; for (unsigned int idx=0;idx<orders.size();idx++) { mgOrder *o = orders[idx]; @@ -464,7 +465,6 @@ mgMenu::AddExternalAction(const mgActions action, const char *title) void mgMainMenu::AddOrderActions(mgMenu* m) { - map<string,mgOrder*>::iterator it; for (unsigned int idx=0;idx<orders.size();idx++) { mgOrder *o = orders[idx]; |