about summary refs log tree commit diff stats
path: root/cpp/000organization
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-03-14 20:45:54 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-03-14 20:45:54 -0700
commit7c610028c1f701f587d9e4ad12d439ac34833d83 (patch)
tree77a259b7780b8a37de2fd91a1c199df55edae5a3 /cpp/000organization
parent064a1c0aca0b76843ae767421d70d2791f50335b (diff)
downloadmu-7c610028c1f701f587d9e4ad12d439ac34833d83.tar.gz
919 - c++: run .mu files from commandline
Diffstat (limited to 'cpp/000organization')
-rw-r--r--cpp/000organization19
1 files changed, 18 insertions, 1 deletions
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<string, int>::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
 }