Moved some of the non-global variables into main().
authorFrancois Fleuret <francois@fleuret.org>
Tue, 5 Feb 2013 20:39:52 +0000 (21:39 +0100)
committerFrancois Fleuret <francois@fleuret.org>
Tue, 5 Feb 2013 20:39:52 +0000 (21:39 +0100)
mymail.c

index 20d0419..bac2f45 100644 (file)
--- a/mymail.c
+++ b/mymail.c
 
 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;