2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-29 13:21:54 +00:00

rename function more accurately

This commit is contained in:
Philip Sargent 2021-04-13 23:52:56 +01:00
parent daf58e9e45
commit 2f03f77ce4

View File

@ -977,7 +977,7 @@ class LoadingSurvex():
self.legsnumber = slengthtotal self.legsnumber = slengthtotal
self.slength = nlegstotal 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 """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 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. list of the include tree and detects blocks included more than once.
@ -1031,7 +1031,7 @@ class LoadingSurvex():
push = includepath.lower() push = includepath.lower()
self.includestack.append(push) self.includestack.append(push)
#----------------- #-----------------
self.RecursiveScan(survexblock, includepath, fininclude, flinear, fcollate) self.PushdownStackScan(survexblock, includepath, fininclude, flinear, fcollate)
#----------------- #-----------------
pop = self.includestack.pop() pop = self.includestack.pop()
if pop != push: if pop != push:
@ -1120,7 +1120,7 @@ class LoadingSurvex():
runcavern() runcavern()
def FindAndLoadSurvex(survexblockroot): 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...') print(' - redirecting stdout to svxblks.log...')
stdout_orig = sys.stdout stdout_orig = sys.stdout
@ -1150,7 +1150,7 @@ def FindAndLoadSurvex(survexblockroot):
fcollate.write(";*include {}\n".format(survexfileroot.path)) fcollate.write(";*include {}\n".format(survexfileroot.path))
flinear.write("{:2} {} *include {}\n".format(svx_scan.depthinclude, indent, 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)) flinear.write("{:2} {} *edulcni {}\n".format(svx_scan.depthinclude, indent, survexfileroot.path))
fcollate.write(";*edulcni {}\n".format(survexfileroot.path)) fcollate.write(";*edulcni {}\n".format(survexfileroot.path))