Later versions of Python handle formats like '% 5u' differently. For
authorIan Romanick <idr@us.ibm.com>
Mon, 6 Mar 2006 18:31:50 +0000 (18:31 +0000)
committerIan Romanick <idr@us.ibm.com>
Mon, 6 Mar 2006 18:31:50 +0000 (18:31 +0000)
whatever reason, a space is always inserted.  That is not the desired
behavior.

src/mesa/glapi/glX_proto_send.py
src/mesa/glapi/gl_enums.py
src/mesa/glapi/gl_procs.py

index 53a979591822893b05eaf32acff1028d89d04c85..3fa665dbcec75d0d1271b47701286eed4edbf0a8 100644 (file)
@@ -879,7 +879,7 @@ __GLapi * __glXNewIndirectAPI( void )
                                if first:
                                        print ''
                                        if show_num:
-                                               print '    /* % 3u. %s */' % (cat_num, cat_name)
+                                               print '    /* %3u. %s */' % (cat_num, cat_name)
                                        else:
                                                print '    /* %s */' % (cat_name)
                                        print ''
index 33d621dcd6f02d253b21b246616118401724040f..e8c0576fd9b21f580f449617d2968f2d5d67b3ef 100644 (file)
@@ -161,7 +161,7 @@ int _mesa_lookup_enum_by_name( const char *symbol )
                print 'static const enum_elt all_enums[%u] =' % (len(name_table))
                print '{'
                for [name, enum] in name_table:
-                       print '   { % 5u, 0x%08X }, /* %s */' % (string_offsets[name], enum, name)
+                       print '   { %5u, 0x%08X }, /* %s */' % (string_offsets[name], enum, name)
                print '};'
                print ''
 
@@ -174,7 +174,7 @@ int _mesa_lookup_enum_by_name( const char *symbol )
                        else:
                                i = name_table.index( [name, enum] )
 
-                               print '      % 4u, /* %s */' % (i, name)
+                               print '      %4u, /* %s */' % (i, name)
                print '};'
 
 
index 1ad683de5c708f5a6ebef275783fb0bffd095ff4..76131b83a0ba0378fccd4fbe2197e9b80587927e 100644 (file)
@@ -113,7 +113,7 @@ class PrintGlProcs(gl_XML.gl_print_base):
                print 'static const glprocs_table_t static_functions[] = {'
 
                for (offset, disp_name, real_name) in table:
-                       print '    NAME_FUNC_OFFSET( % 5u, gl%s, _gloffset_%s ),' % (offset, disp_name, real_name)
+                       print '    NAME_FUNC_OFFSET( %5u, gl%s, _gloffset_%s ),' % (offset, disp_name, real_name)
 
                print '    NAME_FUNC_OFFSET( -1, NULL, 0 )'
                print '};'