about summary refs log tree commit diff stats
path: root/cpp/tangle
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-20 11:05:14 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-20 11:05:14 -0700
commit07efdfd7072d84209b419e66e5a2b48a0c78b2ac (patch)
treed5983420d8b867b9f34fea4bd4c08d9b56220df8 /cpp/tangle
parented84cba28ab0a00fca80807228afd71d3a00ac44 (diff)
downloadmu-07efdfd7072d84209b419e66e5a2b48a0c78b2ac.tar.gz
1110 - 'scenarios' directive applies only to current file
Diffstat (limited to 'cpp/tangle')
-rw-r--r--cpp/tangle/030tangle.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/tangle/030tangle.cc b/cpp/tangle/030tangle.cc
index bbd0e178..1e30cc3c 100644
--- a/cpp/tangle/030tangle.cc
+++ b/cpp/tangle/030tangle.cc
@@ -4,12 +4,15 @@
 
 size_t Line_number = 0;
 string Filename;
+string Toplevel = "run";
 
 int tangle(int argc, const char* argv[]) {
   list<string> result;
   for (int i = 1; i < argc; ++i) {
+//?     cerr << "new file " << argv[i] << '\n'; //? 1
     ifstream in(argv[i]);
     Filename = argv[i];
+    Toplevel = "run";
     tangle(in, result);
   }
   for (list<string>::iterator p = result.begin(); p != result.end(); ++p)
@@ -36,8 +39,6 @@ void tangle(istream& in, list<string>& out) {
   trace_all("tangle", out);
 }
 
-string Toplevel = "run";
-
 void process_next_hunk(istream& in, const string& directive, list<string>& out) {
   list<string> hunk;
   hunk.push_back(line_directive(Line_number, Filename));