summaryrefslogtreecommitdiff
path: root/src/mesa/glapi
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-02-22 23:59:25 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-02-22 23:59:25 +0000
commita5116095010d6f57d71f85e5ede9d534a5099179 (patch)
tree2bc0eacc8ae00b68baa9513e32b60155371b4c86 /src/mesa/glapi
parentfeaf04a27bfe869d5a1093c5291cd6ee5865c88b (diff)
sort the offsets by number
Diffstat (limited to 'src/mesa/glapi')
-rw-r--r--src/mesa/glapi/gloffsets.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/mesa/glapi/gloffsets.py b/src/mesa/glapi/gloffsets.py
index 061d71b7e00..5cdc07b643d 100644
--- a/src/mesa/glapi/gloffsets.py
+++ b/src/mesa/glapi/gloffsets.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# $Id: gloffsets.py,v 1.1 2000/02/22 22:45:20 brianp Exp $
+# $Id: gloffsets.py,v 1.2 2000/02/22 23:59:25 brianp Exp $
# Mesa 3-D graphics library
# Version: 3.3
@@ -56,7 +56,7 @@ def PrintTail():
def GenerateDefine(name, offset):
- s = '#define _gloffset_' + name + ' ' + offset
+ s = '#define _gloffset_' + name + ' ' + str(offset)
return s;
#enddef
@@ -67,6 +67,9 @@ def PrintDefines():
funcName = ''
+ maxOffset = 0
+ offsetInfo = { }
+
f = open('gl.spec')
for line in f.readlines():
@@ -81,11 +84,18 @@ def PrintDefines():
if m[0] == 'param':
paramName = m[1]
if m[0] == 'offset':
- funcOffset = m[1]
+ funcOffset = int(m[1])
+ if funcOffset > maxOffset:
+ maxOffset = funcOffset
s = GenerateDefine(funcName, funcOffset)
- print s
+ offsetInfo[funcOffset] = s;
#endif
#endfor
+
+ # Now print the #defines in order of dispatch offset
+ for i in range(0, maxOffset + 1):
+ print offsetInfo[i]
+
#enddef