From: Francois Fleuret Date: Tue, 5 Feb 2013 07:54:50 +0000 (+0100) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=29acf1213d6717cb1911de8a02969fea4d23a00b;p=mymail.git Update. --- diff --git a/mymail.c b/mymail.c index a77e5e2..6d57fed 100644 --- a/mymail.c +++ b/mymail.c @@ -287,6 +287,11 @@ void search_in_db(const char *db_filename, int nb_body_conditions, nb_fulfilled_body_conditions; FILE *db_file; + if(!quiet) { + printf("Searching in '%s' ... ", db_filename); + fflush(stdout); + } + db_file = fopen(db_filename, "r"); if(!db_file) { @@ -447,6 +452,11 @@ void search_in_db(const char *db_filename, } fclose(db_file); + + if(!quiet) { + printf("done.\n"); + fflush(stdout); + } } void recursive_search_in_db(const char *entry_name, regex_t *db_filename_regexp, @@ -485,18 +495,7 @@ void recursive_search_in_db(const char *entry_name, regex_t *db_filename_regexp, while(*s) { if(*s == '/') { filename = s+1; } s++; } if(regexec(db_filename_regexp, filename, 0, 0, 0) == 0) { - - if(!quiet) { - printf("Searching in '%s' ... ", entry_name); - fflush(stdout); - } - search_in_db(entry_name, nb_search_conditions, search_conditions, output_file); - - if(!quiet) { - printf("done.\n"); - fflush(stdout); - } } } }