diff options
author | Andreas Brugger <brougs78@gmx.net> | 2006-01-07 12:00:00 +0100 |
---|---|---|
committer | Thomas Günther <tom@toms-cafe.de> | 2009-06-03 01:37:19 +0200 |
commit | eb6eaf285edd82c212810f066313f93dc4a8a129 (patch) | |
tree | ccd809304ccfaf710db31e5ba765b92961a821ca /common.c | |
parent | eeda27b9d069161db0261f6e2f51ac9463bde910 (diff) | |
download | vdr-plugin-text2skin-eb6eaf285edd82c212810f066313f93dc4a8a129.tar.gz vdr-plugin-text2skin-eb6eaf285edd82c212810f066313f93dc4a8a129.tar.bz2 |
2006-01-07: Version 1.1-cvs_ext-0.5 (vdr-text2skin-1.1-cvs_ext-0.5.diff)
- modifications to compile with vdr-versions >= 1.3.18
- added tokens:
OsdWidth, OsdHeight
- activating the token ReplayVideoAR
Diffstat (limited to 'common.c')
-rw-r--r-- | common.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -128,7 +128,9 @@ int GetRecordingSize(const char *FileName) int nFiles; struct stat fileinfo; // Holds file information structure char *cmd = NULL; +#if VDRVERSNUM >= 10318 cReadLine reader; +#endif asprintf(&cmd, "find '%s' -follow -type f -name '*.*'|sort ", FileName); FILE *p = popen(cmd, "r"); @@ -137,7 +139,11 @@ int GetRecordingSize(const char *FileName) { char *s; +#if VDRVERSNUM >= 10318 while ((s = reader.Read(p)) != NULL) +#else + while ((s = readline(p)) != NULL) +#endif { if ((ret=stat(s, &fileinfo)) != -1) { @@ -188,7 +194,11 @@ int GetRecordingLength(const char *FileName) } last = (buf.st_size + delta) / sizeof(tIndex) - 1; char hour[2], min[3]; +#if VDRVERSNUM >= 10318 snprintf(RecLength, sizeof(RecLength), "%s", *IndexToHMSF(last, true)); +#else + snprintf(RecLength, sizeof(RecLength), "%s", IndexToHMSF(last, true)); +#endif snprintf(hour, sizeof(hour), "%c", RecLength[0]); snprintf(min, sizeof(min), "%c%c", RecLength[2], RecLength[3]); return (atoi(hour) * 60) + atoi(min); |