From d6d74d252f8a5ccf81d9605718d4e195d66be0aa Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Fri, 1 Apr 2011 13:55:36 +0100 Subject: Add a couple more 'const' markings to API functions where appropriate --- termkey.c | 4 ++-- termkey.h.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/termkey.c b/termkey.c index 88d1c75..7995871 100644 --- a/termkey.c +++ b/termkey.c @@ -726,7 +726,7 @@ static TermKeyResult peekkey_mouse(TermKey *tk, TermKeyKey *key, size_t *nbytep) return TERMKEY_RES_KEY; } -TermKeyResult termkey_interpret_mouse(TermKey *tk, TermKeyKey *key, TermKeyMouseEvent *event, int *button, int *line, int *col) +TermKeyResult termkey_interpret_mouse(TermKey *tk, const TermKeyKey *key, TermKeyMouseEvent *event, int *button, int *line, int *col) { if(key->type != TERMKEY_TYPE_MOUSE) return TERMKEY_RES_NONE; @@ -848,7 +848,7 @@ TermKeyResult termkey_waitkey(TermKey *tk, TermKeyKey *key) /* UNREACHABLE */ } -void termkey_pushinput(TermKey *tk, unsigned char *input, size_t inputlen) +void termkey_pushinput(TermKey *tk, const unsigned char *input, size_t inputlen) { if(tk->buffstart + tk->buffcount + inputlen > tk->buffsize) { while(tk->buffstart + tk->buffcount + inputlen > tk->buffsize) diff --git a/termkey.h.in b/termkey.h.in index 9c340c2..c4e9cb2 100644 --- a/termkey.h.in +++ b/termkey.h.in @@ -165,7 +165,7 @@ TermKeyResult termkey_getkey(TermKey *tk, TermKeyKey *key); TermKeyResult termkey_getkey_force(TermKey *tk, TermKeyKey *key); TermKeyResult termkey_waitkey(TermKey *tk, TermKeyKey *key); -void termkey_pushinput(TermKey *tk, unsigned char *input, size_t inputlen); +void termkey_pushinput(TermKey *tk, const unsigned char *input, size_t inputlen); TermKeyResult termkey_advisereadable(TermKey *tk); @@ -175,7 +175,7 @@ char *termkey_lookup_keyname(TermKey *tk, const char *str, TermKeySym *sym TermKeySym termkey_keyname2sym(TermKey *tk, const char *keyname); -TermKeyResult termkey_interpret_mouse(TermKey *tk, TermKeyKey *key, TermKeyMouseEvent *event, int *button, int *line, int *col); +TermKeyResult termkey_interpret_mouse(TermKey *tk, const TermKeyKey *key, TermKeyMouseEvent *event, int *button, int *line, int *col); typedef enum { TERMKEY_FORMAT_LONGMOD = 1 << 0, // Shift-... instead of S-... -- cgit v1.2.3-70-g09d2