summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-10-13 09:03:53 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-10-13 09:03:53 +0200
commite58fa67e6c53dc8ad061a2941b9984a0c1185a8f (patch)
tree1b0e139b036885c17195a78869d5ff6ccef80dfb /config.c
parentfadc2565d468afca10448600033b73af1ef74978 (diff)
downloadvdr-e58fa67e6c53dc8ad061a2941b9984a0c1185a8f.tar.gz
vdr-e58fa67e6c53dc8ad061a2941b9984a0c1185a8f.tar.bz2
Implemented '?' handling for commands.conf
Diffstat (limited to 'config.c')
-rw-r--r--config.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/config.c b/config.c
index 24c14389..ad9282be 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 1.107 2002/10/03 10:06:55 kls Exp $
+ * $Id: config.c 1.108 2002/10/13 08:52:25 kls Exp $
*/
#include "config.h"
@@ -360,6 +360,7 @@ char *cCommand::result = NULL;
cCommand::cCommand(void)
{
title = command = NULL;
+ confirm = false;
}
cCommand::~cCommand()
@@ -374,9 +375,14 @@ bool cCommand::Parse(const char *s)
if (p) {
int l = p - s;
if (l > 0) {
- title = new char[l + 1];
- strn0cpy(title, s, l + 1);
+ title = MALLOC(char, l + 1);
+ stripspace(strn0cpy(title, s, l + 1));
if (!isempty(title)) {
+ int l = strlen(title);
+ if (l > 1 && title[l - 1] == '?') {
+ confirm = true;
+ title[l - 1] = 0;
+ }
command = stripspace(strdup(skipspace(p + 1)));
return !isempty(command);
}