aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-11-10 23:26:13 +0000
committerTiago Cunha <tcunha@gmx.com>2009-11-10 23:26:13 +0000
commite275bc52f224403d99ea8a92b51dcf7cada92668 (patch)
treec22b36dcf95da98fec37ef5750604210cf667aa7
parentef45c1c65ba5514d1a3f3cabe8b5bdd082541358 (diff)
downloadrtmux-e275bc52f224403d99ea8a92b51dcf7cada92668.tar.gz
rtmux-e275bc52f224403d99ea8a92b51dcf7cada92668.tar.bz2
rtmux-e275bc52f224403d99ea8a92b51dcf7cada92668.zip
Sync OpenBSD patchset 518:
Constify buf.
-rw-r--r--tty-keys.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tty-keys.c b/tty-keys.c
index 7ba8579a..3c8bc7bf 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -1,4 +1,4 @@
-/* $Id: tty-keys.c,v 1.43 2009-11-08 23:33:17 tcunha Exp $ */
+/* $Id: tty-keys.c,v 1.44 2009-11-10 23:26:13 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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