From 7c610028c1f701f587d9e4ad12d439ac34833d83 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 14 Mar 2015 20:45:54 -0700 Subject: 919 - c++: run .mu files from commandline --- cpp/000organization | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'cpp/000organization') diff --git a/cpp/000organization b/cpp/000organization index ba82dd52..f410fcd9 100644 --- a/cpp/000organization +++ b/cpp/000organization @@ -97,9 +97,26 @@ int main(int argc, char* argv[]) { if (argc > 1) { // Commandline Options + if (!is_equal(argv[1], "test")) { + setup(); + for (int i = 1; i < argc; ++i) { + ifstream fin(argv[i]); + while (!fin.eof()) add_recipe(fin); + fin.close(); + } + } } - setup(); +//? setup(); +//? for (unordered_map::iterator p = Recipe_number.begin(); p != Recipe_number.end(); ++p) { //? 1 +//? cout << p->first << ": " << p->second << '\n'; //? 1 +//? } //? 1 + recipe_number r = Recipe_number[string("main")]; +//? cout << "recipe " << r << '\n'; //? 1 +//? START_TRACING_UNTIL_END_OF_SCOPE //? 1 +//? DUMP(""); //? 1 + if (r) run(r); + dump_memory(); return 0; // End Main } -- cgit 1.4.1-2-gfad0