diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2000-12-28 12:57:16 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2000-12-28 12:57:16 +0100 |
commit | 4e354bc9a0f9a67e842932b1de9da889488c8a2b (patch) | |
tree | a07ad700367cef6a4058aecb6e6e47549c4fb9ed /videodir.c | |
parent | be137ee37f0e9f6f9a90b3c57922b7d65fbde5d2 (diff) | |
download | vdr-4e354bc9a0f9a67e842932b1de9da889488c8a2b.tar.gz vdr-4e354bc9a0f9a67e842932b1de9da889488c8a2b.tar.bz2 |
Implemented 'on disk editing'
Diffstat (limited to 'videodir.c')
-rw-r--r-- | videodir.c | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -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; +} + |