diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2000-09-15 15:09:15 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2000-09-15 15:09:15 +0200 |
commit | 7fbf9e6c49430ca2de4683dc7319aa32d247a0f6 (patch) | |
tree | 07f63040bdf138c88c96fca5bb019e2ab22d71a1 /tools.c | |
parent | 39600857613d85e035ab1f93ad8360d9eaf00fe0 (diff) | |
download | vdr-7fbf9e6c49430ca2de4683dc7319aa32d247a0f6.tar.gz vdr-7fbf9e6c49430ca2de4683dc7319aa32d247a0f6.tar.bz2 |
New option '-c'; config files in video directory by default
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 1.15 2000/09/15 13:30:24 kls Exp $ + * $Id: tools.c 1.16 2000/09/15 14:45:31 kls Exp $ */ #define _GNU_SOURCE @@ -153,6 +153,14 @@ bool isnumber(const char *s) return true; } +const char *AddDirectory(const char *DirName, const char *FileName) +{ + static char *buf = NULL; + delete buf; + asprintf(&buf, "%s/%s", DirName && *DirName ? DirName : ".", FileName); + return buf; +} + #define DFCMD "df -m %s" uint FreeDiskSpaceMB(const char *Directory) |