about summary refs log tree commit diff stats
path: root/010vm.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-10-04 16:25:20 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-10-04 16:25:20 -0700
commit926e1b049b818840b26fcff8395305307afabceb (patch)
treecdf11112f252a9ebb6cdbd78ec49c0bbb3698697 /010vm.cc
parentb1cf3bc92d1e29a5711aaf8f6498f0106e4b222a (diff)
downloadmu-926e1b049b818840b26fcff8395305307afabceb.tar.gz
2238 - dump recipes after tangling
Diffstat (limited to '010vm.cc')
-rw-r--r--010vm.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/010vm.cc b/010vm.cc
index ff6f7f30..cf54d65a 100644
--- a/010vm.cc
+++ b/010vm.cc
@@ -291,6 +291,15 @@ void dump_memory() {
   }
 }
 
+void dump_recipe(const string& recipe_name) {
+  const recipe& r = Recipe[Recipe_ordinal[recipe_name]];
+  cout << "recipe " << r.name << " [\n";
+  for (long long int i = 0; i < SIZE(r.steps); ++i) {
+    cout << "  " << r.steps.at(i).to_string() << '\n';
+  }
+  cout << "]\n";
+}
+
 :(before "End Types")
 struct no_scientific {
   double x;