Changeset 63939 in vbox for trunk/src/VBox/GuestHost/OpenGL/state_tracker/get_components.py
- Timestamp:
- Sep 22, 2016 7:58:05 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/state_tracker/get_components.py
r50041 r63939 3 3 # 4 4 # See the file LICENSE.txt for information on redistributing this software. 5 6 from __future__ import print_function 5 7 6 8 num_components = { … … 114 116 } 115 117 116 print 118 print("""unsigned int crStateHlpComponentsCount( GLenum pname ) 117 119 { 118 120 switch( pname ) 119 121 { 120 """ 121 comps = num_components.keys(); 122 comps.sort(); 123 for comp in comps: 124 print '\t\t\tcase %s: return %d;' % (comp,num_components[comp]) 122 """) 123 for comp in sorted(num_components.keys()): 124 print('\t\t\tcase %s: return %d;' % (comp,num_components[comp])) 125 125 126 comps = num_extended_components.keys(); 127 comps.sort(); 128 for comp in comps: 126 for comp in sorted(num_extended_components.keys()): 129 127 (nc, ifdef) = num_extended_components[comp] 130 print '#ifdef %s' % ifdef131 print '\t\t\tcase %s: return %d;' % (comp,nc)132 print '#endif /* %s */' % ifdef128 print('#ifdef %s' % ifdef) 129 print('\t\t\tcase %s: return %d;' % (comp,nc)) 130 print('#endif /* %s */' % ifdef) 133 131 134 print 132 print(""" 135 133 default: 136 134 crError( "Unknown parameter name in crStateHlpComponentsCount: %d", (int) pname ); … … 140 138 return 0; 141 139 } 142 """ 140 """) 143 141 144 142
Note:
See TracChangeset
for help on using the changeset viewer.