projects
/
selector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c0c9c41
)
Added the fclose() for the input files.
author
Francois Fleuret
<francois@fleuret.org>
Sun, 28 Jun 2009 10:18:16 +0000
(12:18 +0200)
committer
Francois Fleuret
<francois@fleuret.org>
Sun, 28 Jun 2009 10:18:16 +0000
(12:18 +0200)
selector.c
patch
|
blob
|
history
diff --git
a/selector.c
b/selector.c
index
1923b7a
..
2880b5f
100644
(file)
--- 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);
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");
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);
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';
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);
fprintf(stderr, raw_line);
fprintf(stderr, "\n");
exit(1);
@@
-654,6
+654,8
@@
void read_file(const char *input_filename,
start = eol + 1;
}
start = eol + 1;
}
+
+ fclose(file);
}
/*********************************************************************/
}
/*********************************************************************/