aboutsummaryrefslogtreecommitdiff
path: root/lib/base/encoding.cpp
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2010-10-28 20:29:01 +0200
committerAndreas Oberritter <obi@opendreambox.org>2010-11-16 17:15:37 +0100
commit879d60c88e24c2c3f2aab9dff73192c901f63f31 (patch)
tree73bebea0db9c4d22d2de42cc1cd7303b01dc8943 /lib/base/encoding.cpp
parent6b59a3472e24f35fcaac669a167b1a4fae207556 (diff)
downloadenigma2-879d60c88e24c2c3f2aab9dff73192c901f63f31.tar.gz
enigma2-879d60c88e24c2c3f2aab9dff73192c901f63f31.zip
use eEnv::resolve() / eEnv.resolve()
Diffstat (limited to 'lib/base/encoding.cpp')
-rw-r--r--lib/base/encoding.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/base/encoding.cpp b/lib/base/encoding.cpp
index 8b4b592b..361acce5 100644
--- a/lib/base/encoding.cpp
+++ b/lib/base/encoding.cpp
@@ -2,6 +2,7 @@
#include <cstdlib>
#include <lib/base/encoding.h>
#include <lib/base/eerror.h>
+#include <lib/base/eenv.h>
eDVBTextEncodingHandler encodingHandler; // the one and only instance
@@ -17,8 +18,8 @@ inline char toupper(char c)
eDVBTextEncodingHandler::eDVBTextEncodingHandler()
{
- const char * file=DATADIR "/enigma2/encoding.conf";
- FILE *f = fopen(file, "rt");
+ std::string file = eEnv::resolve("${datadir}/enigma2/encoding.conf");
+ FILE *f = fopen(file.c_str(), "rt");
if (f)
{
char *line = (char*) malloc(256);
@@ -61,7 +62,7 @@ eDVBTextEncodingHandler::eDVBTextEncodingHandler()
free(line);
}
else
- eDebug("[eDVBTextEncodingHandler] couldn't open %s !", file);
+ eDebug("[eDVBTextEncodingHandler] couldn't open %s !", file.c_str());
}
void eDVBTextEncodingHandler::getTransponderDefaultMapping(int tsidonid, int &table)