]> mj.ucw.cz Git - umpf.git/blobdiff - umpf.c
add nice conditions
[umpf.git] / umpf.c
diff --git a/umpf.c b/umpf.c
index bb8ca58f0fa002dcb08e62a7d3e5733b17e76316..f868775a6183f6e3541ca53320be67c724c23327 100644 (file)
--- a/umpf.c
+++ b/umpf.c
@@ -3,6 +3,16 @@
 
 #include "umpf.h"
 
+void
+init(void)
+{
+       list_init(&input_code);
+       var_hash = new_var_hash();
+       const_tab = xmalloc(BUFSIZE);
+       cur_const_n = 1;
+       cur_const_s = BUFSIZE;
+}
+
 int
 main(int argc, char** argv)
 {
@@ -19,17 +29,17 @@ main(int argc, char** argv)
 
        save_gids();
        read_conf(argv[1]);
-
+       init();
 //     yydebug=1;
        res = yyparse ();
 
        if (res)
                return res;
 
-       init();
+       temp_varcode_start = current_varcode;
        compile(input_tree);
 
-       print_code(input_tree);
+       print_code();
 
 //     var_hash = new_var_hash();
 //     current_headers = make_hlist();