mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
Merge remote-tracking branch 'check/next-cc'
build-tested only, needs fixing
Conflicts:
data/locale/deutsch.locale
data/locale/english.locale
src/Makefile.am
src/driver/rcinput.cpp
src/driver/streamts.cpp
src/eitd/sectionsd.cpp
src/gui/Makefile.am
src/gui/bouquetlist.cpp
src/gui/hdd_menu.cpp
src/gui/luainstance.cpp
src/gui/luainstance.h
src/gui/moviebrowser.cpp
src/gui/movieplayer.cpp
src/gui/pluginlist.cpp
src/gui/plugins.cpp
src/gui/plugins.h
src/gui/scan.cpp
src/gui/scan_setup.cpp
src/gui/user_menue.cpp
src/gui/videosettings.cpp
src/gui/widget/menue.cpp
src/neutrino.cpp
src/neutrinoMessages.h
src/system/locals.h
src/system/locals_intern.h
src/zapit/include/zapit/scan.h
src/zapit/src/femanager.cpp
src/zapit/src/frontend.cpp
src/zapit/src/getservices.cpp
src/zapit/src/transponder.cpp
Origin commit data
------------------
Branch: ni/coolstream
Commit: 44ba8fafca
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2014-04-27 (Sun, 27 Apr 2014)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -404,6 +404,50 @@ time_t toEpoch(std::string &date)
|
||||
|
||||
}
|
||||
|
||||
std::string& str_replace(const std::string &search, const std::string &replace, std::string &text)
|
||||
{
|
||||
if (search.empty() || text.empty())
|
||||
return text;
|
||||
|
||||
size_t searchLen = search.length();
|
||||
while (1) {
|
||||
size_t pos = text.find(search);
|
||||
if (pos == std::string::npos)
|
||||
break;
|
||||
text.replace(pos, searchLen, replace);
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
std::string& htmlEntityDecode(std::string& text)
|
||||
{
|
||||
struct decode_table {
|
||||
const char* code;
|
||||
const char* htmlCode;
|
||||
};
|
||||
decode_table dt[] =
|
||||
{
|
||||
{" ", " "},
|
||||
{"&", "&"},
|
||||
{"<", "<"},
|
||||
{">", ">"},
|
||||
{"\"", """},
|
||||
{"'", "'"},
|
||||
{"€", "€"},
|
||||
{"–", "–"},
|
||||
{"“", "“"},
|
||||
{"”", "”"},
|
||||
{"„", "„"},
|
||||
{"•", "•"},
|
||||
{"…", "…"},
|
||||
{NULL, NULL}
|
||||
};
|
||||
for (int i = 0; dt[i].code != NULL; i++)
|
||||
text = str_replace(dt[i].htmlCode, dt[i].code, text);
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
CFileHelpers::CFileHelpers()
|
||||
{
|
||||
FileBufSize = 0xFFFF;
|
||||
@@ -662,3 +706,20 @@ void hdd_flush(const char * fname)
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
|
||||
/* split string like PARAM1=value1 PARAM2=value2 into map */
|
||||
bool split_config_string(const std::string &str, std::map<std::string,std::string> &smap)
|
||||
{
|
||||
smap.clear();
|
||||
std::string::size_type start = 0;
|
||||
std::string::size_type end = 0;
|
||||
while ((end = str.find(" ", start)) != std::string::npos) {
|
||||
std::string param = str.substr(start, end - start);
|
||||
std::string::size_type i = param.find("=");
|
||||
if (i != std::string::npos) {
|
||||
smap[param.substr(0,i).c_str()] = param.substr(i+1).c_str();
|
||||
}
|
||||
start = end + 1;
|
||||
}
|
||||
return !smap.empty();
|
||||
}
|
||||
|
Reference in New Issue
Block a user