From: Francois Fleuret Date: Tue, 5 Feb 2013 20:39:52 +0000 (+0100) Subject: Moved some of the non-global variables into main(). X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=cbe29e579b66cf31ec64c142286e7e2b865d84d7;p=mymail.git Moved some of the non-global variables into main(). --- diff --git a/mymail.c b/mymail.c index 20d0419..bac2f45 100644 --- a/mymail.c +++ b/mymail.c @@ -55,18 +55,11 @@ regex_t leading_from_line_regexp; -char *db_filename; -char *db_filename_regexp_string; -char *db_root_path; -char *db_filename_list; -char output_filename[PATH_MAX + 1]; +/* Global variables! */ int paranoid; -int action_index; int quiet; -time_t being_today; - /********************************************************************/ enum { @@ -815,6 +808,13 @@ void free_condition(struct search_condition *condition) { /*********************************************************************/ int main(int argc, char **argv) { + char *db_filename; + char *db_filename_regexp_string; + char *db_root_path; + char *db_filename_list; + char output_filename[PATH_MAX + 1]; + int action_index; + int error = 0, show_help = 0; const int nb_fields_to_parse = sizeof(fields_to_parse) / sizeof(struct parsable_field); char c;