Author: esr
Date: Thu Apr 26 07:16:10 2007
New Revision: 17104
URL: http://svn.gna.org/viewcvs/wesnoth?rev=17104&view=rev
Log:
Help the duplicate-checking in macroscope cope with some wacky UMC.
Modified:
trunk/data/tools/macroscope
Modified: trunk/data/tools/macroscope
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/macroscope?rev=17104&r1=17103&r2=17104&view=diff
==============================================================================
--- trunk/data/tools/macroscope (original)
+++ trunk/data/tools/macroscope Thu Apr 26 07:16:10 2007
@@ -160,6 +160,8 @@
self.fileref = {}
self.noxref = False
for filename in self.filelist:
+ if warnlevel > 1:
+ print filename + ":"
if filter(lambda x: x, map(lambda x: filename.endswith("." + x),
resource_extensions)):
# It's a resource file of some sort.
#
@@ -186,6 +188,8 @@
dfp = open(filename)
state = "outside"
for (n, line) in enumerate(dfp):
+ if warnlevel > 1:
+ print `line`[1:-1]
line = line.strip()
if line.startswith("#define"):
tokens = line.split()
@@ -195,7 +199,7 @@
here.docstring = line[8:] # Strip off #define_
state = "macro_header"
continue
- elif line.endswith("#enddef"):
+ elif state != 'outside' and line.endswith("#enddef"):
here.hash.update(line)
here.hash = here.hash.digest()
if name in self.xref:
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits