summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-07-31 22:17:47 +0200
committerAlfred E. Heggestad <aeh@db.org>2016-07-31 22:17:47 +0200
commit26c176c839a749a8ca2b9530909248a64ef429aa (patch)
tree541d37c3d115d8b362c0f8d4f78d1f058bb94dbd /src
parent54fb1f3810de177531353af3af58a7ea3de0ca9a (diff)
use KEYCODE_REL instead of 0x00
Diffstat (limited to 'src')
-rw-r--r--src/audio.c2
-rw-r--r--src/call.c4
-rw-r--r--src/cmd.c7
3 files changed, 6 insertions, 7 deletions
diff --git a/src/audio.c b/src/audio.c
index 2b5be6e..c373cb8 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -1317,7 +1317,7 @@ int audio_send_digit(struct audio *a, char key)
if (!a)
return EINVAL;
- if (key > 0) {
+ if (key != KEYCODE_REL) {
info("audio: send DTMF digit: '%c'\n", key);
err = telev_send(a->telev, telev_digit2code(key), false);
}
diff --git a/src/call.c b/src/call.c
index 880a7d0..db6cb84 100644
--- a/src/call.c
+++ b/src/call.c
@@ -994,7 +994,7 @@ int call_info(struct re_printf *pf, const struct call *call)
* Send a DTMF digit to the peer
*
* @param call Call object
- * @param key DTMF digit to send (0x00 for key release)
+ * @param key DTMF digit to send (KEYCODE_REL for key release)
*
* @return 0 if success, otherwise errorcode
*/
@@ -1135,7 +1135,7 @@ static void dtmfend_handler(void *arg)
struct call *call = arg;
if (call->dtmfh)
- call->dtmfh(call, 0x00, call->arg);
+ call->dtmfh(call, KEYCODE_REL, call->arg);
}
diff --git a/src/cmd.c b/src/cmd.c
index 5fdc59f..9143a3e 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -11,7 +11,6 @@
enum {
- REL = 0x00,
ESC = 0x1b,
DEL = 0x7f,
};
@@ -140,7 +139,7 @@ static int editor_input(struct mbuf *mb, char key,
*del = true;
return re_hprintf(pf, "\nCancel\n");
- case REL:
+ case KEYCODE_REL:
break;
case '\n':
@@ -274,7 +273,7 @@ int cmd_process(struct cmd_ctx **ctxp, char key, struct re_printf *pf,
/* are we in edit-mode? */
if (ctxp && *ctxp) {
- if (key == REL)
+ if (key == KEYCODE_REL)
return 0;
return cmd_process_edit(ctxp, key, pf, data);
@@ -306,7 +305,7 @@ int cmd_process(struct cmd_ctx **ctxp, char key, struct re_printf *pf,
return cmd->h(pf, &arg);
}
- if (key == REL)
+ if (key == KEYCODE_REL)
return 0;
return cmd_print(pf, NULL);