const int buffer_size = 1024;
const int nb_lines_max = 100000;
-void build_display(int key, int nb_lines, char **lines, char *regexp) {
+void build_display(int line, int nb_lines, char **lines, char *regexp) {
char buffer[buffer_size];
clear(); // Cleaning the window
refresh(); // After doing something on the display, we refresh it
printw("Press a key to contine\n");
int key;
- build_display(-1, nb_lines, lines, regexp);
+ build_display(0, nb_lines, lines, regexp);
do {
key = getch();
regexp[regexp_point] = '\0';
}
}
- build_display(key, nb_lines, lines, regexp);
+ build_display(0, nb_lines, lines, regexp);
} while(key != '\n' && key != KEY_ENTER);
echo(); // We want to have echo