Last change
on this file since 63205 was 15532, checked in by vboxsync, 16 years ago |
crOpenGL: export to OSE
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Id
|
File size:
1.0 KB
|
Line | |
---|
1 | # Copyright (c) 2001, Stanford University
|
---|
2 | # All rights reserved.
|
---|
3 | #
|
---|
4 | # See the file LICENSE.txt for information on redistributing this software.
|
---|
5 |
|
---|
6 | import sys
|
---|
7 |
|
---|
8 | import apiutil
|
---|
9 |
|
---|
10 |
|
---|
11 | apiutil.CopyrightC()
|
---|
12 |
|
---|
13 | print """
|
---|
14 | /* DO NOT EDIT - THIS FILE GENERATED BY THE tsfuncs.py SCRIPT */
|
---|
15 |
|
---|
16 | #include "stub.h"
|
---|
17 | """
|
---|
18 |
|
---|
19 | keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
|
---|
20 |
|
---|
21 | for func_name in keys:
|
---|
22 | return_type = apiutil.ReturnType(func_name)
|
---|
23 | params = apiutil.Parameters(func_name)
|
---|
24 |
|
---|
25 | print "static %s SPULOAD_APIENTRY ts_%s( %s )" % (return_type, func_name, apiutil.MakeDeclarationString(params) )
|
---|
26 | print "{"
|
---|
27 | print "\tSPUDispatchTable *tab = (SPUDispatchTable *) crGetTSD(&stub.dispatchTSD);"
|
---|
28 |
|
---|
29 | if return_type != "void":
|
---|
30 | print "\treturn ",
|
---|
31 |
|
---|
32 | print "\ttab->%s( %s );" % (func_name, apiutil.MakeCallString(params))
|
---|
33 | print "}"
|
---|
34 | print ""
|
---|
35 |
|
---|
36 |
|
---|
37 | print "SPUDispatchTable stubThreadsafeDispatch = {"
|
---|
38 |
|
---|
39 | for func_name in keys:
|
---|
40 | print "\tts_%s," % func_name
|
---|
41 |
|
---|
42 | print "\tNULL, /* copyList */"
|
---|
43 | print "\tNULL, /* copy_of */"
|
---|
44 | print "\t0, /* mark */"
|
---|
45 | print "\tNULL /* server */"
|
---|
46 | print "};"
|
---|
Note:
See
TracBrowser
for help on using the repository browser.