about summary refs log tree commit diff stats
path: root/cpp/013run
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/013run')
-rw-r--r--cpp/013run4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpp/013run b/cpp/013run
index 22239667..26436392 100644
--- a/cpp/013run
+++ b/cpp/013run
@@ -26,12 +26,16 @@ struct routine {
   routine(recipe_number r) :running_recipe(r), running_at(0) {}
 };
 
+:(before "End Globals")
+routine Current_routine(0);
+
 :(code)
 void run(recipe_number r) {
   run(routine(r));
 }
 
 void run(routine rr) {
+  Current_routine = rr;
   while (!done(rr)) {
     vector<instruction>& instructions = steps(rr);
     size_t& pc = running_at(rr);