summaryrefslogtreecommitdiffstats
path: root/src/glx/apple/gen_defs.tcl
diff options
context:
space:
mode:
authorJeremy Huddleston <[email protected]>2010-04-01 17:00:22 -0700
committerJeremy Huddleston <[email protected]>2010-04-01 17:01:51 -0700
commit115203281cf791221f586f03c14cfe4e0a44dd7a (patch)
tree767951e542d416243041b964dd252e030cfadf5e /src/glx/apple/gen_defs.tcl
parent9aadc793f3db64cefa0b08f18abad424a659dacc (diff)
Revert accidental commits from the xquartz tree
This reverts commit 9aadc793f3db64cefa0b08f18abad424a659dacc. This reverts commit 69ea4e7718efb60b6b0d795a355cebd6712ceac1. This reverts commit dbe8b013936d977ec63d6607bfd2fc6772d29787. This reverts commit 23215ef4d60a86d9f3b3fdc08e3fdadc59e98890. This reverts commit 9495e3703062d1ddaf3161f4efc23f0b51284d9b. This reverts commit 0594cf70883b64692ba617d85f4f9b4e636e5c2b. This reverts commit 86a7978d37393ee34f876569ac06ffdb8d7289ae. This reverts commit 437902ce978cde9a0e1aa260f12dc232a8501c42.
Diffstat (limited to 'src/glx/apple/gen_defs.tcl')
-rw-r--r--src/glx/apple/gen_defs.tcl67
1 files changed, 0 insertions, 67 deletions
diff --git a/src/glx/apple/gen_defs.tcl b/src/glx/apple/gen_defs.tcl
deleted file mode 100644
index d32694db72e..00000000000
--- a/src/glx/apple/gen_defs.tcl
+++ /dev/null
@@ -1,67 +0,0 @@
-#This parses and generates #defines from an enum.spec type of file.
-
-proc main {argc argv} {
- if {2 != $argc} {
- puts stderr "syntax is: [info script] input.spec output.h"
- exit 1
- }
-
- set fd [open [lindex $argv 0] r]
- set data [read $fd]
- close $fd
-
- set fd [open [lindex $argv 1] w]
-
- set state ""
-
- puts $fd "#define GL_VERSION_1_1 1"
- puts $fd "#define GL_VERSION_1_2 1"
- puts $fd "#define GL_VERSION_1_3 1"
- puts $fd "#define GL_VERSION_1_4 1"
- puts $fd "#define GL_VERSION_1_5 1"
- puts $fd "#define GL_VERSION_2_0 1"
- #puts $fd "#define GL_VERSION_3_0 1"
-
- set mask ""
- array set ar {}
-
- foreach line [split $data \n] {
- if {[regexp {^\S*#.*} $line] > 0} {
- #puts COMMENT:$line
- set state ""
- } elseif {"enum" eq $state} {
- if {[string match "\t*" $line]} {
- if {[regexp {^\tuse.*} $line] > 0} {
- lassign [split [string trim $line]] use usemask def
- set usemask [string trim $usemask]
- set def [string trim $def]
- puts $fd "/* GL_$def */"
- } else {
- lassign [split [string trim $line] =] def value
- set def [string trim $def]
- set value [string trim $value]
-
- #Trim out the data like: 0x0B00 # 4 F
- set value [lindex [split $value] 0]
-
- puts $fd "#define GL_$def $value"
-
- #Save this association with the value.
- set d $ar($mask)
- dict set d $def $value
- set ar($mask) $d
- }
- } else {
- set state ""
- }
- } elseif {[string match "* enum:*" $line]} {
- lassign [split $line] mask _
- puts $fd "\n/*[string trim $mask]*/"
- set ar($mask) [dict create]
- set state enum
- }
- }
-
- close $fd
-}
-main $::argc $::argv