Mesa (master): generate_builtins.py: Whitespace fixes.

Vinson Lee vlee at kemper.freedesktop.org
Fri Jan 14 22:22:01 UTC 2011


Module: Mesa
Branch: master
Commit: 57ef69dd8864a745453e4e579b22aea950fdbabb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=57ef69dd8864a745453e4e579b22aea950fdbabb

Author: Vinson Lee <vlee at vmware.com>
Date:   Fri Jan 14 14:19:02 2011 -0800

generate_builtins.py: Whitespace fixes.

Also removed unnecessary semicolons.

---

 src/glsl/builtins/tools/generate_builtins.py |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/glsl/builtins/tools/generate_builtins.py b/src/glsl/builtins/tools/generate_builtins.py
index fac3821..3a938a0 100755
--- a/src/glsl/builtins/tools/generate_builtins.py
+++ b/src/glsl/builtins/tools/generate_builtins.py
@@ -17,8 +17,8 @@ builtins_dir = path.join(path.dirname(path.abspath(__file__)), "..")
 
 # Get the path to the standalone GLSL compiler
 if len(argv) != 2:
-   print "Usage:", argv[0], "<path to compiler>"
-   sys.exit(1)
+    print "Usage:", argv[0], "<path to compiler>"
+    sys.exit(1)
 
 compiler = argv[1]
 
@@ -63,8 +63,8 @@ def run_compiler(args):
     output = p.communicate()[0]
 
     # Clean up output a bit by killing whitespace before a closing paren.
-    kill_paren_whitespace = re.compile(r'[ \n]*\)', re.MULTILINE);
-    output = kill_paren_whitespace.sub(')', output);
+    kill_paren_whitespace = re.compile(r'[ \n]*\)', re.MULTILINE)
+    output = kill_paren_whitespace.sub(')', output)
 
     # Also toss any duplicate newlines
     output = output.replace('\n\n', '\n')
@@ -79,12 +79,12 @@ def write_profile(filename, profile):
         return
 
     # Kill any global variable declarations.  We don't want them.
-    kill_globals = re.compile(r'^\(declare.*\n', re.MULTILINE);
+    kill_globals = re.compile(r'^\(declare.*\n', re.MULTILINE)
     proto_ir = kill_globals.sub('', proto_ir)
 
     # Kill pointer addresses.  They're not necessary in prototypes and just
     # clutter the diff output.
-    proto_ir = re.sub(r'@0x[0-9a-f]+', '', proto_ir);
+    proto_ir = re.sub(r'@0x[0-9a-f]+', '', proto_ir)
 
     print 'static const char prototypes_for_' + profile + '[] ='
     print stringify(proto_ir), ';'
@@ -238,7 +238,7 @@ _mesa_glsl_initialize_functions(struct _mesa_glsl_parse_state *state)
    state->num_builtins_to_link = 0;
 """
 
-    i=0
+    i = 0
     for (filename, profile) in profiles:
         if profile.endswith('_vert'):
             check = 'state->target == vertex_shader && '




More information about the mesa-commit mailing list