VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/NULLfuncs.py@ 42500

Last change on this file since 42500 was 16381, checked in by vboxsync, 16 years ago

crOpenGL: some initial functionality on linux

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.4 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
7import sys
8
9import apiutil
10
11keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
12
13apiutil.CopyrightC()
14
15print """
16/* DO NOT EDIT - THIS FILE GENERATED BY THE NULLfuncs.py SCRIPT */
17
18#include "cr_error.h"
19#include "stub.h"
20"""
21
22for func_name in keys:
23 return_type = apiutil.ReturnType(func_name)
24 params = apiutil.Parameters(func_name)
25
26 print "static %s SPULOAD_APIENTRY NULL_%s( %s )" % (return_type, func_name, apiutil.MakeDeclarationString(params))
27 print "{"
28 print "\t/* do nothing */"
29 print "\tcrWarning(\"YOU ARE CALLING A NULLED FUNCTION (%s)\");" % func_name
30 for (name, type, vecSize) in params:
31 print "\t(void) %s;" % name
32 if return_type != "void":
33 print "\treturn 0;"
34 print "}"
35 print ""
36
37
38print "DECLEXPORT(SPUDispatchTable) stubNULLDispatch = {"
39for func_name in keys:
40 print "\tNULL_%s," % (func_name)
41print "\tNULL, /* copyList */"
42print "\tNULL, /* copy_of */"
43print "\t0, /* mark */"
44print "\tNULL /* server */"
45print "};"
46
47print ""
48print "/* Declare and initialize the glim dispatch table here so that we */"
49print "/* can initialize all entries to no-op routines. */"
50print "SPUDispatchTable glim = {"
51for func_name in keys:
52 print "\tNULL_%s," % (func_name)
53print "\tNULL, /* copyList */"
54print "\tNULL, /* copy_of */"
55print "\t0, /* mark */"
56print "\tNULL /* server */"
57print "};"
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette