summaryrefslogtreecommitdiffstats
path: root/tty-keys.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-11-09 11:45:10 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-11-09 11:45:10 +0000
commitdaf150c38de726f75fc9229ec4f4c62498668bbb (patch)
treeb1adcd47d6892d665b01864f51fe33a33469454e /tty-keys.c
parentf98d13e7dc2500d84a382d309f95dad9e7eec01a (diff)
Constify buf.
Diffstat (limited to 'tty-keys.c')
-rw-r--r--tty-keys.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tty-keys.c b/tty-keys.c
index 8505900c..f30775fb 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -38,7 +38,8 @@ struct tty_key *tty_keys_find1(
struct tty_key *, const char *, size_t, size_t *);
struct tty_key *tty_keys_find(struct tty *, const char *, size_t, size_t *);
void tty_keys_callback(int, short, void *);
-int tty_keys_mouse(char *, size_t, size_t *, struct mouse_event *);
+int tty_keys_mouse(
+ const char *, size_t, size_t *, struct mouse_event *);
struct tty_key_ent {
enum tty_code_code code;
@@ -350,7 +351,7 @@ tty_keys_next(struct tty *tty)
struct tty_key *tk;
struct timeval tv;
struct mouse_event mouse;
- char *buf;
+ const char *buf;
size_t len, size;
cc_t bspace;
int key;
@@ -486,7 +487,7 @@ tty_keys_callback(unused int fd, unused short events, void *data)
/* Handle mouse key input. */
int
-tty_keys_mouse(char *buf, size_t len, size_t *size, struct mouse_event *m)
+tty_keys_mouse(const char *buf, size_t len, size_t *size, struct mouse_event *m)
{
/*
* Mouse sequences are \033[M followed by three characters indicating