summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-09-17 09:36:50 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-09-17 09:36:50 +0200
commit27046cf8a9f1047e39724ddb1702957f4b395f36 (patch)
tree0a4b25e04063568883f74f218c689389e8b53854 /config.c
parent4716cfb5a1ebae09a8a277b8943d3a885dcf1365 (diff)
downloadvdr-27046cf8a9f1047e39724ddb1702957f4b395f36.tar.gz
vdr-27046cf8a9f1047e39724ddb1702957f4b395f36.tar.bz2
Implemented SVDRP command 'HITK'
Diffstat (limited to 'config.c')
-rw-r--r--config.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/config.c b/config.c
index 0a965ee5..e161efd7 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.22 2000/09/10 15:07:15 kls Exp $
+ * $Id: config.c 1.23 2000/09/17 09:11:59 kls Exp $
*/
#include "config.h"
@@ -155,14 +155,22 @@ eKeys cKeys::Get(unsigned int Code)
return kNone;
}
-unsigned int cKeys::Encode(const char *Command)
+eKeys cKeys::Translate(const char *Command)
{
- if (Command != NULL) {
+ if (Command) {
const tKey *k = keys;
- while ((k->type != kNone) && strcmp(k->name, Command) != 0)
+ while ((k->type != kNone) && strcasecmp(k->name, Command) != 0)
k++;
- return k->code;
+ return k->type;
}
+ return kNone;
+}
+
+unsigned int cKeys::Encode(const char *Command)
+{
+ eKeys k = Translate(Command);
+ if (k != kNone)
+ return keys[k].code;
return 0;
}