VirtualBox

source: vbox/trunk/src/VBox/Additions/common/crOpenGL/tsfuncs.py@ 68643

Last change on this file since 68643 was 63942, checked in by vboxsync, 8 years ago

OpenGL: fixed the most annoying coding style flaws, mainly removing spaces after '(' and before ')', no semantic change

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.1 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
6from __future__ import print_function
7import sys
8
9import apiutil
10
11
12apiutil.CopyrightC()
13
14print("""
15/* DO NOT EDIT - THIS FILE GENERATED BY THE tsfuncs.py SCRIPT */
16
17#include "stub.h"
18""")
19
20keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
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 ts_%s(%s)" % (return_type, func_name, apiutil.MakeDeclarationString(params) ))
27 print("{")
28 print("\tSPUDispatchTable *tab = (SPUDispatchTable *) crGetTSD(&stub.dispatchTSD);")
29
30 if return_type != "void":
31 print("\treturn ", end=" ")
32
33 print("\ttab->%s(%s);" % (func_name, apiutil.MakeCallString(params)))
34 print("}")
35 print("")
36
37
38print("SPUDispatchTable stubThreadsafeDispatch = {")
39
40for func_name in keys:
41 print("\tts_%s," % func_name)
42
43print("\tNULL, /* copyList */")
44print("\tNULL, /* copy_of */")
45print("\t0, /* mark */")
46print("\tNULL /* server */")
47print("};")
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