iomenu

interactive text selection menu
Log | Files | Refs | README | LICENSE

commit a6d7fac8aad60c7581c11762a3d9a519dfb89d38
parent 196463eca4a85a841ad1cce147e44536bc2887cc
Author: Josuah Demangeonā  ā µ <mail@josuah.net>
Date:   Sat, 18 Mar 2017 16:24:40 +0100

fixed print_selection on no match

Diffstat:
Miomenu.c | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/iomenu.c b/iomenu.c @@ -70,9 +70,6 @@ set_terminal(int tty_fd) void read_lines(void) { - extern struct line **linev; - extern size_t linec, matching; - char buffer[BUFSIZ]; size_t size = 1 << 6; @@ -136,7 +133,8 @@ filter_lines(void) tokv[tokc] = s; } - for (size_t i = 0, matching = 0; i < linec; i++) + matching = 0; + for (size_t i = 0; i < linec; i++) matching += linev[i]->match = match_line(linev[i], tokv, tokc); free(tokv); @@ -320,8 +318,6 @@ print_selection(void) int input_key(FILE *tty_fp) { - extern char input[]; - char key = fgetc(tty_fp); switch (key) {