From: Francois Fleuret Date: Sat, 2 Feb 2013 13:43:58 +0000 (+0100) Subject: Cosmetics. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=mymail.git;a=commitdiff_plain;h=96a094ac06017ef55c085690cb24d655458dc2ba Cosmetics. --- diff --git a/mymail.c b/mymail.c index eb329b1..4e16d2f 100644 --- a/mymail.c +++ b/mymail.c @@ -45,7 +45,7 @@ #include #define MYMAIL_DB_MAGIC_TOKEN "mymail_index_file" -#define VERSION "0.1" +#define VERSION "0.9" #define MAX_NB_SEARCH_PATTERNS 10 @@ -572,13 +572,6 @@ int main(int argc, char **argv) { } } - if(!db_root_path) { - fprintf(stderr, - "mymail: db root path is not set\n"); - exit(EXIT_FAILURE); - } - - if(error) { print_usage(stderr); exit(EXIT_FAILURE); @@ -614,7 +607,7 @@ int main(int argc, char **argv) { } } - fprintf(db_file, "%s version_%s raw version\n", MYMAIL_DB_MAGIC_TOKEN, VERSION); + fprintf(db_file, "%s version_%s raw\n", MYMAIL_DB_MAGIC_TOKEN, VERSION); while(optind < argc) { recursive_index_mbox(db_file, @@ -632,6 +625,12 @@ int main(int argc, char **argv) { else { + if(!db_root_path) { + fprintf(stderr, + "mymail: db root path is not set\n"); + exit(EXIT_FAILURE); + } + if(nb_search_patterns > 0) { struct search_request search_requests[MAX_NB_SEARCH_PATTERNS]; char *search_regexp_string;