Last change
on this file since 24107 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.2 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 | import apiutil
|
---|
8 |
|
---|
9 |
|
---|
10 | apiutil.CopyrightC()
|
---|
11 |
|
---|
12 | print """
|
---|
13 |
|
---|
14 | /* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED BY spuchange.py SCRIPT */
|
---|
15 |
|
---|
16 | #include "cr_spu.h"
|
---|
17 | #include "cr_error.h"
|
---|
18 |
|
---|
19 | void crSPUChangeInterface( SPUDispatchTable *table, void *orig_func, void *new_func )
|
---|
20 | {
|
---|
21 | struct _copy_list_node *temp;
|
---|
22 | if (table->mark == 1)
|
---|
23 | {
|
---|
24 | return;
|
---|
25 | }
|
---|
26 | if (orig_func == new_func)
|
---|
27 | {
|
---|
28 | return;
|
---|
29 | }
|
---|
30 | table->mark = 1;
|
---|
31 | """
|
---|
32 |
|
---|
33 | keys = apiutil.GetDispatchedFunctions(sys.argv[1]+"/APIspec.txt")
|
---|
34 | for func_name in keys:
|
---|
35 | print '\tif ((void *)table->%s == orig_func)' % func_name
|
---|
36 | print '\t{'
|
---|
37 | print '\t\ttable->%s = (%sFunc_t)new_func;' % (func_name, func_name)
|
---|
38 | print '\t\tfor (temp = table->copyList ; temp ; temp = temp->next)'
|
---|
39 | print '\t\t{'
|
---|
40 | print '\t\t\tcrSPUChangeInterface( temp->copy, orig_func, new_func );'
|
---|
41 | print '\t\t}'
|
---|
42 | print '\t}'
|
---|
43 |
|
---|
44 | print """
|
---|
45 | if (table->copy_of != NULL)
|
---|
46 | {
|
---|
47 | crSPUChangeInterface( table->copy_of, orig_func, new_func );
|
---|
48 | }
|
---|
49 | for (temp = table->copyList ; temp ; temp = temp->next)
|
---|
50 | {
|
---|
51 | crSPUChangeInterface( temp->copy, orig_func, new_func );
|
---|
52 | }
|
---|
53 | table->mark = 0;
|
---|
54 | """
|
---|
55 | print '}'
|
---|
Note:
See
TracBrowser
for help on using the repository browser.