Author: esr
Date: Wed Apr 25 16:34:13 2007
New Revision: 17081
URL: http://svn.gna.org/viewcvs/wesnoth?rev=17081&view=rev
Log:
Small cleanup change.
Modified:
trunk/data/tools/macroscope
Modified: trunk/data/tools/macroscope
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/macroscope?rev=17081&r1=17080&r2=17081&view=diff
==============================================================================
--- trunk/data/tools/macroscope (original)
+++ trunk/data/tools/macroscope Wed Apr 25 16:34:13 2007
@@ -152,12 +152,14 @@
key = trial
self.fileref[key].append(fn, n)
return key
- def __init__(self, filelist):
+ def __init__(self, dirpath, exclude=""):
"Build cross-reference object from the specified filelist."
+ self.dirpath = dirpath
+ self.filelist = allfiles(dirpath, exclude)
self.xref = {}
self.fileref = {}
self.noxref = False
- for filename in filelist:
+ for filename in self.filelist:
if filter(lambda x: x, map(lambda x: filename.endswith("." + x),
resource_extensions)):
# It's a resource file of some sort.
#
@@ -211,7 +213,7 @@
self.unresolved = []
self.missing = []
formals = []
- for fn in filelist:
+ for fn in self.filelist:
if iswml(fn):
rfp = open(fn)
for (n, line) in enumerate(rfp):
@@ -405,12 +407,11 @@
dirpath = arguments[0].split(":")
else:
dirpath = ['.']
- filelist = allfiles(dirpath, "|".join(exclude))
- xref = CrossRef(filelist)
+ xref = CrossRef(dirpath, "|".join(exclude))
if extracthelp:
xref.extracthelp(dirpath[0], sys.stdout)
elif listfiles:
- for filename in filelist:
+ for filename in xref.filelist:
print filename
elif crossreference or definitions or listfiles or unresolved:
print "# Macroscope reporting on %s" % time.ctime()
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits