aboutsummaryrefslogtreecommitdiff
path: root/src/keys.cc
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2009-05-03 21:05:52 +0000
committercorvid <corvid@lavabit.com>2009-05-03 21:05:52 +0000
commit0f964c3cad15ef8d4fd279a9ed69860f6749192c (patch)
tree0d50dc6fa0f2349f1c40599c37fcb196693973b5 /src/keys.cc
parentd492c394081bded6d9ad6d7a6895f8d07ed0899f (diff)
dStrndup, dStrcasecmp
Diffstat (limited to 'src/keys.cc')
-rw-r--r--src/keys.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/keys.cc b/src/keys.cc
index 147c9935..279a0431 100644
--- a/src/keys.cc
+++ b/src/keys.cc
@@ -189,7 +189,7 @@ int Keys::getKeyCode(char *keyName)
{
uint_t i;
for (i = 0; i < sizeof(keyNames) / sizeof(Mapping_t); i++) {
- if (!strcasecmp(keyNames[i].name, keyName)) {
+ if (!dStrcasecmp(keyNames[i].name, keyName)) {
return keyNames[i].value;
}
}
@@ -206,7 +206,7 @@ int Keys::getCmdCode(const char *commandName)
uint_t i;
for (i = 0; i < sizeof(default_keys) / sizeof(KeyBinding_t); i++) {
- if (!strcasecmp(default_keys[i].name, commandName))
+ if (!dStrcasecmp(default_keys[i].name, commandName))
return default_keys[i].cmd;
}
return -1;
@@ -220,7 +220,7 @@ int Keys::getModifier(char *modifierName)
{
uint_t i;
for (i = 0; i < sizeof(modifierNames) / sizeof(Mapping_t); i++) {
- if (!strcasecmp(modifierNames[i].name, modifierName)) {
+ if (!dStrcasecmp(modifierNames[i].name, modifierName)) {
return modifierNames[i].value;
}
}
@@ -250,7 +250,7 @@ void Keys::parseKey(char *key, char *commandName)
for ( ; isspace(*key); ++key) ;
// Get modifiers
while(*key == '<' && (p = strchr(++key, '>'))) {
- modstr = strndup(key, p - key);
+ modstr = dStrndup(key, p - key);
if ((st = getModifier(modstr)) == -1) {
MSG("Keys::parseKey unknown modifier: %s\n", modstr);
} else {
@@ -260,7 +260,7 @@ void Keys::parseKey(char *key, char *commandName)
key = p + 1;
}
// Allow trailing space after keyname
- keystr = (*key && (p = strchr(key + 1, ' '))) ? strndup(key, p - key - 1) :
+ keystr = (*key && (p = strchr(key + 1, ' '))) ? dStrndup(key, p - key - 1) :
dStrdup(key);
// Get key code
if (!key[1]) {