summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b>2005-02-08 22:51:17 +0000
committerwr61 <wr61@e10066b5-e1e2-0310-b819-94efdf66514b>2005-02-08 22:51:17 +0000
commit4e66317bdef5451a50a3bf4bc1b564338bc52788 (patch)
tree000f1f640b3306c86b74208bbc46a03b80f31beb
parentdc68a2ee19366fc958b9d876845c3aef6a469240 (diff)
downloadvdr-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--Makefile2
-rw-r--r--mg_actions.c2
-rw-r--r--mg_db.c3
-rw-r--r--mg_db.h4
-rw-r--r--mg_order.c12
-rw-r--r--mg_order.h4
-rw-r--r--mg_valmap.h2
-rw-r--r--muggle.h3
-rwxr-xr-xmugglei.c2
-rw-r--r--vdr_decoder.c10
-rw-r--r--vdr_decoder_flac.c15
-rw-r--r--vdr_menu.c4
12 files changed, 37 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index 7b8ba41..19b9c80 100644
--- a/Makefile
+++ b/Makefile
@@ -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>
diff --git a/mg_db.c b/mg_db.c
index dfc0843..d6cf8b3 100644
--- a/mg_db.c
+++ b/mg_db.c
@@ -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);
diff --git a/mg_db.h b/mg_db.h
index 5ef26e2..c0daf7c 100644
--- a/mg_db.h
+++ b/mg_db.h
@@ -17,10 +17,6 @@
#include <list>
#include <vector>
#include <map>
-#include <iostream>
-#include <istream>
-#include <sstream>
-#include <ostream>
#include <i18n.h>
using namespace std;
diff --git a/mg_order.c b/mg_order.c
index 46d4d57..cc93141 100644
--- a/mg_order.c
+++ b/mg_order.c
@@ -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();
}
diff --git a/mg_order.h b/mg_order.h
index 71907da..900b498 100644
--- a/mg_order.h
+++ b/mg_order.h
@@ -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>
diff --git a/muggle.h b/muggle.h
index 171cdb7..4a05aee 100644
--- a/muggle.h
+++ b/muggle.h
@@ -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;
diff --git a/mugglei.c b/mugglei.c
index 9cf74b0..79c68f6 100755
--- a/mugglei.c
+++ b/mugglei.c
@@ -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
diff --git a/vdr_menu.c b/vdr_menu.c
index e7e107b..5d3d1cd 100644
--- a/vdr_menu.c
+++ b/vdr_menu.c
@@ -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];