summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/config.c b/config.c
index 16f44124..32fa17f9 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.8 2000/07/15 12:39:20 kls Exp $
+ * $Id: config.c 1.9 2000/07/15 16:35:18 kls Exp $
*/
#include "config.h"
@@ -54,6 +54,12 @@ void cKeys::Clear(void)
k->code = 0;
}
+void cKeys::SetDummyValues(void)
+{
+ for (tKey *k = keys; k->type != kNone; k++)
+ k->code = k->type + 1; // '+1' to avoid 0
+}
+
bool cKeys::Load(char *FileName)
{
isyslog(LOG_INFO, "loading %s", FileName);
@@ -150,7 +156,7 @@ unsigned int cKeys::Encode(const char *Command)
{
if (Command != NULL) {
const tKey *k = keys;
- while ((k->type != kNone) && strncmp(k->name, Command, strlen(k->name)) != 0) // must use 'strncmp()' because LIRC delivers trailing characters!
+ while ((k->type != kNone) && strcmp(k->name, Command) != 0)
k++;
return k->code;
}