summaryrefslogtreecommitdiff
path: root/recinfofile.c
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2017-03-20 17:55:35 +0100
committerhorchi <vdr@jwendel.de>2017-03-20 17:55:35 +0100
commit1fe6380b69b14c3840010aed520aeb2e946219a5 (patch)
tree392ff4401fedee9d6c1ba12b3ca27ea443e114fc /recinfofile.c
parentfa25e7126b97348f825abad9fabb2bdc82e52a05 (diff)
downloadvdr-plugin-epg2vdr-1fe6380b69b14c3840010aed520aeb2e946219a5.tar.gz
vdr-plugin-epg2vdr-1fe6380b69b14c3840010aed520aeb2e946219a5.tar.bz2
2017-03-20: version 1.1.51 (horchi)\n - change: Removed compiler warnings when using clang\n - added: Added clang++ to Make.config (as optional compiler)\n - change: Fixed APIVERSION check for VDR < 2.2.0 (thx to nobanzai)\n\n1.1.51
Diffstat (limited to 'recinfofile.c')
-rw-r--r--recinfofile.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/recinfofile.c b/recinfofile.c
index cc957da..6c1b00c 100644
--- a/recinfofile.c
+++ b/recinfofile.c
@@ -37,7 +37,7 @@ const char* cEventDetails::fields[] =
"SCRSERIESID",
"SCRSERIESEPISODE",
"SCRMOVIEID",
-
+
// just in recordinglist, not in events or useevents row
"CHANNELNAME",
@@ -57,7 +57,7 @@ void cEventDetails::setValue(const char* name, const char* value)
std::map<std::string,std::string>::iterator it;
it = values.find(name);
-
+
if (it == values.end() || it->first != value)
{
changes++;
@@ -162,24 +162,24 @@ int cEventDetails::storeToFs(const char* path)
FILE* f;
char* fileName = 0;
std::map<std::string,std::string>::iterator it;
-
+
asprintf(&fileName, "%s/info.epg2vdr", path);
-
+
if (!(f = fopen(fileName, "w")))
{
tell(0, "Error opening file '%s' failed, %s", fileName, strerror(errno));
free(fileName);
-
+
return fail;
}
-
+
tell(0, "Storing event details to '%s'", fileName);
-
- // store fields
-
+
+ // store fields
+
for (it = values.begin(); it != values.end(); it++)
fprintf(f, "%s: %s\n", it->first.c_str(), it->second.c_str());
-
+
free(fileName);
fclose(f);
@@ -211,32 +211,32 @@ int cEventDetails::loadFromFs(const char* path)
{
tell(0, "Error opening file '%s' failed, %s", fileName, strerror(errno));
free(fileName);
-
+
return fail;
}
-
+
tell(3, "Loading event details from '%s'", fileName);
-
- // load fields
-
+
+ // load fields
+
char* p;
char* s;
cReadLine readLine;
- while (s = readLine.Read(f))
+ while ((s = readLine.Read(f)))
{
if (!(p = strchr(s, ':')))
{
tell(0, " ");
continue;
}
-
+
*(p++) = 0;
p = skipspace(rTrim(p));
if (!isEmpty(p))
values[s] = p;
- }
+ }
free(fileName);
fclose(f);