move match_line close to filter_line - iomenu - interactive terminal-based selection menu
 (HTM) git clone git://bitreich.org/iomenu git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/iomenu
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 2f9fbc265bf1361ff66867b97a0c5ea536507c74
 (DIR) parent b29fc218d36185be00fbb8952e26264d0d61508a
 (HTM) Author: Josuah Demangeonā  ā µ <mail@josuah.net>
       Date:   Sat, 25 Mar 2017 11:39:46 +0100
       
       move match_line close to filter_line
       
       Diffstat:
         M iomenu.c                            |      24 ++++++++++++------------
       
       1 file changed, 12 insertions(+), 12 deletions(-)
       ---
 (DIR) 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;