From: José Fonseca Date: Wed, 29 May 2013 07:53:03 +0000 (+0100) Subject: scripts: Make gltxt.py parse EGL specs correctly (issue #134). X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;ds=sidebyside;h=d2b1eb567dd3c2f7a7778f650b37c9d6177bf1a9;p=apitrace scripts: Make gltxt.py parse EGL specs correctly (issue #134). --- diff --git a/specs/scripts/gltxt.py b/specs/scripts/gltxt.py index 08b6a57..be95d80 100755 --- a/specs/scripts/gltxt.py +++ b/specs/scripts/gltxt.py @@ -134,6 +134,8 @@ class TxtParser(LineParser): break self.consume() name = line.strip() + if name.startswith('EGL_'): + self.prefix = '' print ' # %s' % name def skip_c_comments(self): @@ -157,7 +159,7 @@ class TxtParser(LineParser): if not line.strip(): self.consume() continue - if not line.startswith(' '): + if not line[0].isspace(): break self.consume() lines.append(line.strip()) @@ -221,7 +223,7 @@ class TxtParser(LineParser): def main(): optparser = optparse.OptionParser( - usage="\n\t%prog [options] [SPEC] ") + usage="\n\t%prog [options] [URL|TXT] ...") optparser.add_option( '-p', '--prefix', metavar='STRING', type="string", dest="prefix", default='gl',