sfm

simple file manager
git clone git://git.afify.dev/sfm
Log | Files | Refs | README | LICENSE

commit 5a3cfce5b7e15cc20bfa29ccedbc6cdaa33957c0
parent 0b2ea4c411ba2682d974a4474a835e11e4527ec7
Author: afify <hassan@afify.dev>
Date:   Fri, 15 Oct 2021 13:45:58 +0300

[fix] termbox g var same name

Parameter inputmode hides a global variable with the same name

Diffstat:
Mtermbox.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/termbox.c b/termbox.c @@ -702,7 +702,7 @@ parse_escape_seq(struct tb_event *event, const char *buf, int len) } static bool -extract_event(struct tb_event *event, struct bytebuffer *inbuf, int inputmode) +extract_event(struct tb_event *event, struct bytebuffer *inbuf, int in) { const char *buf = inbuf->buf; const int len = inbuf->len; @@ -722,7 +722,7 @@ extract_event(struct tb_event *event, struct bytebuffer *inbuf, int inputmode) } else { // it's not escape sequence, then it's ALT or ESC, // check inputmode - if (inputmode & TB_INPUT_ESC) { + if (in & TB_INPUT_ESC) { // if we're in escape mode, fill ESC event, pop // buffer, return success event->ch = 0; @@ -730,12 +730,12 @@ extract_event(struct tb_event *event, struct bytebuffer *inbuf, int inputmode) event->mod = 0; bytebuffer_truncate(inbuf, 1); return true; - } else if (inputmode & TB_INPUT_ALT) { + } else if (in & TB_INPUT_ALT) { // if we're in alt mode, set ALT modifier to // event and redo parsing event->mod = TB_MOD_ALT; bytebuffer_truncate(inbuf, 1); - return extract_event(event, inbuf, inputmode); + return extract_event(event, inbuf, in); } assert(!"never got here"); }