summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-08-27 16:42:28 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-08-27 16:42:28 +0200
commit6445b9a0864a945d50e5ea4744f3bfa4ee8622dd (patch)
tree3b1759d7d98226656ee52bddab007e1c48847dc3 /tools.c
parent110c64f56db10405446cafb17a1c18308fff0b96 (diff)
downloadvdr-6445b9a0864a945d50e5ea4744f3bfa4ee8622dd.tar.gz
vdr-6445b9a0864a945d50e5ea4744f3bfa4ee8622dd.tar.bz2
Implemented SVDRP command for plugins
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index ca4b0b80..46d3ce26 100644
--- a/tools.c
+++ b/tools.c
@@ -4,13 +4,14 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.96 2005/08/06 09:53:21 kls Exp $
+ * $Id: tools.c 1.97 2005/08/27 14:43:55 kls Exp $
*/
#include "tools.h"
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
+#include <stdarg.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/vfs.h>
@@ -530,6 +531,15 @@ cString &cString::operator=(const cString &String)
return *this;
}
+cString cString::sprintf(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ char *buffer;
+ vasprintf(&buffer, fmt, ap);
+ return cString(buffer, true);
+}
+
cString WeekDayName(int WeekDay)
{
char buffer[4];