diff options
Diffstat (limited to 'cpp/013run')
-rw-r--r-- | cpp/013run | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cpp/013run b/cpp/013run index 48de68d0..7296d128 100644 --- a/cpp/013run +++ b/cpp/013run @@ -83,10 +83,9 @@ inline bool done(routine& rr) { :(before "End Main") if (argc > 1) { setup(); + load("core.mu"); for (int i = 1; i < argc; ++i) { - ifstream fin(argv[i]); - while (!fin.eof()) add_recipe(fin); - fin.close(); + load(argv[i]); } Trace_stream = new trace_stream; @@ -97,6 +96,13 @@ if (argc > 1) { dump_memory(); } +:(code) +void load(string filename) { + ifstream fin(filename.c_str()); + while (!fin.eof()) add_recipe(fin); + fin.close(); +} + //: helper for tests :(before "End Globals") |