VirtualBox

source: vbox/trunk/src/VBox/Additions/3D/win/VBoxGL/opengl32_defs.py

Last change on this file was 103999, checked in by vboxsync, 8 weeks ago

Addition/3D,Additions/WINNT/Graphics: Updates for mesa-24.0.2 (not enabled yet). bugref:10606

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1"""
2Copyright (C) 2024 Oracle and/or its affiliates.
3
4This file is part of VirtualBox base platform packages, as
5available from https://www.virtualbox.org.
6
7This program is free software; you can redistribute it and/or
8modify it under the terms of the GNU General Public License
9as published by the Free Software Foundation, in version 3 of the
10License.
11
12This program is distributed in the hope that it will be useful, but
13WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with this program; if not, see <https://www.gnu.org/licenses>.
19
20SPDX-License-Identifier: GPL-3.0-only
21"""
22
23import sys
24
25#
26# Strip @d from function names:
27# glAccum@8 @7
28# DrvCopyContext@12
29#
30def GenerateDef():
31
32 # Read lines from input file
33 in_file = open(sys.argv[1], "r")
34 if not in_file:
35 print("Error: couldn't open %s file!" % sys.argv[1])
36 sys.exit()
37
38 lines = in_file.readlines()
39
40 in_file.close()
41
42 # Write def file
43 out_file = open(sys.argv[2], "w")
44 if not out_file:
45 print("Error: couldn't open %s file!" % sys.argv[2])
46 sys.exit()
47
48 out_file.write('EXPORTS\n')
49
50 for line in lines:
51 line = line.strip()
52 if len(line) == 0:
53 continue
54
55 line_parts = line.split()
56 if len(line_parts) == 0:
57 continue
58
59 name_parts = line_parts[0].split('@')
60 if len(name_parts) != 2:
61 continue
62
63 out_line = name_parts[0]
64 if len(line_parts) > 1:
65 numSpaces = 30 - len(name_parts[0])
66 out_line = out_line + ' '*numSpaces + line_parts[1]
67
68 out_file.write('\t' + out_line + '\n')
69
70 out_file.close()
71
72GenerateDef()
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use