From 2f03f77ce487bbd68eead3a60008096245aeb859 Mon Sep 17 00:00:00 2001
From: Philip Sargent <philip.sargent@klebos.com>
Date: Tue, 13 Apr 2021 23:52:56 +0100
Subject: [PATCH] rename function more accurately

---
 parsers/survex.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/parsers/survex.py b/parsers/survex.py
index bcb4070..23f27aa 100644
--- a/parsers/survex.py
+++ b/parsers/survex.py
@@ -977,7 +977,7 @@ class LoadingSurvex():
         self.legsnumber = slengthtotal
         self.slength = nlegstotal 
 
-    def RecursiveScan(self, survexblock, path, fin, flinear, fcollate):
+    def PushdownStackScan(self, survexblock, path, fin, flinear, fcollate):
         """Follows the *include links in all the survex files from the root file 1623.svx
         and reads only the *include and *begin and *end statements. It produces a linearised
         list of the include tree and detects blocks included more than once.
@@ -1031,7 +1031,7 @@ class LoadingSurvex():
                         push = includepath.lower()
                         self.includestack.append(push)
                         #-----------------
-                        self.RecursiveScan(survexblock, includepath, fininclude, flinear, fcollate)
+                        self.PushdownStackScan(survexblock, includepath, fininclude, flinear, fcollate)
                         #-----------------
                         pop = self.includestack.pop()
                         if pop != push:
@@ -1120,7 +1120,7 @@ class LoadingSurvex():
             runcavern()
 
 def FindAndLoadSurvex(survexblockroot):
-    """Follows the *include links recursively to find files
+    """Follows the *include links successively to find files in the whole include tree
     """
     print('  - redirecting stdout to svxblks.log...')
     stdout_orig = sys.stdout
@@ -1150,7 +1150,7 @@ def FindAndLoadSurvex(survexblockroot):
     fcollate.write(";*include {}\n".format(survexfileroot.path))
     flinear.write("{:2} {} *include {}\n".format(svx_scan.depthinclude, indent, survexfileroot.path))
     #----------------------------------------------------------------
-    svx_scan.RecursiveScan(survexblockroot, survexfileroot.path, finroot, flinear, fcollate)
+    svx_scan.PushdownStackScan(survexblockroot, survexfileroot.path, finroot, flinear, fcollate)
     #----------------------------------------------------------------
     flinear.write("{:2} {} *edulcni {}\n".format(svx_scan.depthinclude, indent, survexfileroot.path))
     fcollate.write(";*edulcni {}\n".format(survexfileroot.path))