VirtualBox

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

最後變更 在這個檔案從61946是 16381,由 vboxsync 提交於 16 年 前

crOpenGL: some initial functionality on linux

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.4 KB
 
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 "};"
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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