iomenu

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

commit 2f9fbc265bf1361ff66867b97a0c5ea536507c74
parent b29fc218d36185be00fbb8952e26264d0d61508a
Author: Josuah Demangeonā  ā µ <mail@josuah.net>
Date:   Sat, 25 Mar 2017 11:39:46 +0100

move match_line close to filter_line

Diffstat:
Miomenu.c | 24++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/iomenu.c b/iomenu.c @@ -110,17 +110,6 @@ read_lines(void) static int -match_line(wchar_t *line, wchar_t **tokv, int tokc) -{ - for (int i = 0; i < tokc; i++) - if (wcsstr(line, tokv[i]) == NULL) - return 0; - - return 1; -} - - -int screen_width(wchar_t *wcs) { int len = 0; @@ -261,6 +250,17 @@ clear(int lines) } +static int +match_line(wchar_t *line, wchar_t **tokv, int tokc) +{ + for (int i = 0; i < tokc; i++) + if (wcsstr(line, tokv[i]) == NULL) + return 0; + + return 1; +} + + static void filter_lines(void) { @@ -420,7 +420,7 @@ usage(void) } -int +static int main(int argc, char *argv[]) { int exit_code;