From 298604bb3dcb60332e37ae3b66b746bad249e1ca Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Sun, 28 Jun 2009 12:18:16 +0200 Subject: [PATCH] Added the fclose() for the input files. --- selector.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/selector.c b/selector.c index 1923b7a..2880b5f 100644 --- a/selector.c +++ b/selector.c @@ -367,14 +367,14 @@ void update_screen(int *current_focus_line, int *displayed_focus_line, int console_width = getmaxx(stdscr); int console_height = getmaxy(stdscr); - /* First, we find a visible line. */ - int nb_printed_lines = 0; use_default_colors(); addstr("\n"); + /* First, we find a visible line. */ + if(matcher.regexp_error) { attron(attr_error); addnstr("Regexp syntax error", console_width); @@ -604,7 +604,7 @@ void read_file(const char *input_filename, if(eol == buffer_size) { raw_line[buffer_size - 1] = '\0'; - fprintf(stderr, "Line too long:\n"); + fprintf(stderr, "Line too long (max is %d characters):\n", buffer_size); fprintf(stderr, raw_line); fprintf(stderr, "\n"); exit(1); @@ -654,6 +654,8 @@ void read_file(const char *input_filename, start = eol + 1; } + + fclose(file); } /*********************************************************************/ -- 2.20.1