summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-11-09 11:45:11 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-11-09 11:45:11 +0000
commite0049fd6e29f167bada1d9a345425f36bbed9bff (patch)
tree054bc21f323fd6f9764649417ca57e7cad448e80
parent9b74f59d3dcb5e022d91dbcb1da28a42b3bccc31 (diff)
Constify buf.
-rw-r--r--usr.bin/tmux/tty-keys.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/tmux/tty-keys.c b/usr.bin/tmux/tty-keys.c
index 56ffab1a0ba..8cd07259d95 100644
--- a/usr.bin/tmux/tty-keys.c
+++ b/usr.bin/tmux/tty-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty-keys.c,v 1.17 2009/11/05 19:32:34 nicm Exp $ */
+/* $OpenBSD: tty-keys.c,v 1.18 2009/11/09 11:45:10 nicm 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