summaryrefslogtreecommitdiff
path: root/videodir.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-12-28 12:57:16 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2000-12-28 12:57:16 +0100
commit4e354bc9a0f9a67e842932b1de9da889488c8a2b (patch)
treea07ad700367cef6a4058aecb6e6e47549c4fb9ed /videodir.c
parentbe137ee37f0e9f6f9a90b3c57922b7d65fbde5d2 (diff)
downloadvdr-4e354bc9a0f9a67e842932b1de9da889488c8a2b.tar.gz
vdr-4e354bc9a0f9a67e842932b1de9da889488c8a2b.tar.bz2
Implemented 'on disk editing'
Diffstat (limited to 'videodir.c')
-rw-r--r--videodir.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/videodir.c b/videodir.c
index 91d362db..4d5c2572 100644
--- a/videodir.c
+++ b/videodir.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: videodir.c 1.2 2000/09/15 13:23:47 kls Exp $
+ * $Id: videodir.c 1.3 2000/12/24 12:51:41 kls Exp $
*/
#include "videodir.h"
@@ -180,3 +180,20 @@ bool VideoFileSpaceAvailable(unsigned int SizeMB)
}
return Dir.FreeMB() >= SizeMB;
}
+
+const char *PrefixVideoFileName(const char *FileName, char Prefix)
+{
+ static char *PrefixedName = NULL;
+
+ if (!PrefixedName || strlen(PrefixedName) <= strlen(FileName))
+ PrefixedName = (char *)realloc(PrefixedName, strlen(FileName) + 2);
+ if (PrefixedName) {
+ strcpy(PrefixedName, VideoDirectory);
+ char *p = PrefixedName + strlen(PrefixedName);
+ *p++ = '/';
+ *p++ = Prefix;
+ strcpy(p, FileName + strlen(VideoDirectory) + 1);
+ }
+ return PrefixedName;
+}
+