]> mj.ucw.cz Git - umpf.git/blobdiff - brum.c
body can have 0 now
[umpf.git] / brum.c
diff --git a/brum.c b/brum.c
index 21ebff6f3e48450c799e6144a2ceee66dbf16c94..facd0f968f100848a2571b52d31b55924c11d36c 100644 (file)
--- a/brum.c
+++ b/brum.c
@@ -2,20 +2,36 @@
 #include "brum.h"
 
 int
-main(void)
+main(int argc, char** argv)
 {
        int res;
 
+       if (argc < 2)
+               die("Usage: ./brum conf_file");
+
+       save_gids();
+       read_conf(argv[1]);
+       //FIXME:
+       get_default_mailbox("/var/mail/anicka");
+
 //     yydebug=1;
        res = yyparse ();
 
        if (res)
                return res;
 
-       print_tree(input_tree,0);
+//     print_tree(input_tree,0);
 
        var_hash = new_var_hash();
+
+       current_headers = make_hlist();
+       current_body = get_body();
+//     print_headers(current_headers);
+
+       save_current_headers(var_hash);
        interp(input_tree, var_hash);
+       
+//     print_vars(var_hash);
 
        return 0;
 }