Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
465673a3
Commit
465673a3
authored
Nov 01, 2013
by
Rico Schüller
Committed by
Alexandre Julliard
Nov 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Fix some style issues.
parent
3c08b95b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
56 deletions
+52
-56
make_opengl
dlls/opengl32/make_opengl
+52
-56
No files found.
dlls/opengl32/make_opengl
View file @
465673a3
...
@@ -210,10 +210,9 @@ sub ConvertType($)
...
@@ -210,10 +210,9 @@ sub ConvertType($)
);
);
foreach
my
$org
(
reverse
sort
keys
%
hash
)
{
foreach
my
$org
(
reverse
sort
keys
%
hash
)
{
if
(
$type
=~
/$org/
)
{
if
(
$type
=~
/^(.*)$org(.*)$/
)
{
my
(
$before
,
$after
)
=
(
$type
=~
/^(.*)$org(.*)$/
);
return
"$1$hash{$org}$2"
;
return
"$before$hash{$org}$after"
;
}
}
}
}
return
$type
;
return
$type
;
}
}
...
@@ -229,10 +228,9 @@ sub ConvertVarName($)
...
@@ -229,10 +228,9 @@ sub ConvertVarName($)
"far"
=>
"farParam"
);
"far"
=>
"farParam"
);
foreach
my
$org
(
keys
%
hash
)
{
foreach
my
$org
(
keys
%
hash
)
{
if
(
$type
=~
/$org/
)
{
if
(
$type
=~
/^(.*)$org(.*)$/
)
{
my
(
$before
,
$after
)
=
(
$type
=~
/^(.*)$org(.*)$/
);
return
"$1$hash{$org}$2"
;
return
"$before$hash{$org}$after"
;
}
}
}
}
return
$type
;
return
$type
;
}
}
...
@@ -255,22 +253,20 @@ sub GenerateThunk($$$$)
...
@@ -255,22 +253,20 @@ sub GenerateThunk($$$$)
# If for opengl_norm.c, generate a nice heading otherwise Patrik won't be happy :-)
# If for opengl_norm.c, generate a nice heading otherwise Patrik won't be happy :-)
# Patrik says: Well I would be even happier if a (OPENGL32.@) was added as well. Done. :-)
# Patrik says: Well I would be even happier if a (OPENGL32.@) was added as well. Done. :-)
if
(
$comment
eq
1
)
{
if
(
$comment
eq
1
)
{
$ret
=
"$ret
/***********************************************************************\n"
;
$ret
.=
"
/***********************************************************************\n"
;
$ret
=
"$ret
* $name (OPENGL32.\@)\n"
;
$ret
.=
"
* $name (OPENGL32.\@)\n"
;
$ret
=
"$ret
*/\n"
;
$ret
.=
"
*/\n"
;
}
}
$ret
=
$ret
.
ConvertType
(
$func_ref
->
[
0
])
.
" WINAPI $name( "
;
$ret
.=
ConvertType
(
$func_ref
->
[
0
])
.
" WINAPI $name( "
;
for
(
my
$i
=
0
;
$i
<
@
{
$func_ref
->
[
1
]};
$i
++
)
{
for
(
my
$i
=
0
;
$i
<
@
{
$func_ref
->
[
1
]};
$i
++
)
{
## Quick debug code :-)
my
$type
=
$func_ref
->
[
1
]
->
[
$i
]
->
[
0
];
## print $func_ref->[1]->[$i]->[1] . "\n";
my
$name
=
ConvertVarName
(
$func_ref
->
[
1
]
->
[
$i
]
->
[
1
]);
my
$type
=
$func_ref
->
[
1
]
->
[
$i
]
->
[
0
];
$ret
.=
ConvertType
(
$type
)
.
" $name"
;
my
$name
=
ConvertVarName
(
$func_ref
->
[
1
]
->
[
$i
]
->
[
1
]);
$call_arg
.=
$name
;
$ret
.=
ConvertType
(
$type
)
.
" $name"
;
if
(
$type
=~
/\*/
)
{
$call_arg
.=
$name
;
$trace_arg
.=
"%p"
;
if
(
$type
=~
/\*/
)
{
$trace_arg
.=
"%p"
;
$trace_call_arg
.=
$name
;
$trace_call_arg
.=
$name
;
}
elsif
(
defined
$debug_conv
{
$type
})
{
}
elsif
(
defined
$debug_conv
{
$type
})
{
if
(
$debug_conv
{
$type
}
=~
/(.*),(.*)/
)
if
(
$debug_conv
{
$type
}
=~
/(.*),(.*)/
)
{
{
$trace_arg
.=
$1
;
$trace_arg
.=
$1
;
...
@@ -281,40 +277,40 @@ sub GenerateThunk($$$$)
...
@@ -281,40 +277,40 @@ sub GenerateThunk($$$$)
$trace_arg
.=
$debug_conv
{
$type
};
$trace_arg
.=
$debug_conv
{
$type
};
$trace_call_arg
.=
$name
;
$trace_call_arg
.=
$name
;
}
}
}
}
else
{
printf
"Unknown type %s\n"
,
$type
;
}
else
{
printf
"Unknown type %s\n"
,
$type
;
}
if
(
$i
+
1
<
@
{
$func_ref
->
[
1
]})
{
if
(
$i
+
1
<
@
{
$func_ref
->
[
1
]})
{
$ret
.=
", "
;
$ret
.=
", "
;
$call_arg
.=
", "
;
$call_arg
.=
", "
;
$trace_call_arg
.=
", "
;
$trace_call_arg
.=
", "
;
$trace_arg
.=
", "
;
$trace_arg
.=
", "
;
}
else
{
}
else
{
$ret
.=
" "
;
$ret
.=
" "
;
$call_arg
.=
" "
;
$call_arg
.=
" "
;
$trace_call_arg
.=
" "
;
$trace_call_arg
.=
" "
;
}
}
}
}
$ret
.=
'void '
if
(
!
@
{
$func_ref
->
[
1
]});
$ret
.=
'void '
if
(
!
@
{
$func_ref
->
[
1
]});
$ret
.=
") {\n"
;
$ret
.=
") {\n"
;
$ret
.=
" const struct opengl_funcs *funcs = NtCurrentTeb()->glTable;\n"
;
$ret
.=
" const struct opengl_funcs *funcs = NtCurrentTeb()->glTable;\n"
;
if
(
$func_ref
->
[
0
]
ne
"void"
&&
$gen_thread_safe
)
{
if
(
$func_ref
->
[
0
]
ne
"void"
&&
$gen_thread_safe
)
{
$ret
=
"$ret
"
.
ConvertType
(
$func_ref
->
[
0
])
.
" ret_value;\n"
;
$ret
.=
"
"
.
ConvertType
(
$func_ref
->
[
0
])
.
" ret_value;\n"
;
}
}
if
(
$gen_traces
)
{
if
(
$gen_traces
)
{
$ret
=
"$ret
TRACE(\"($trace_arg)\\n\""
;
$ret
.=
"
TRACE(\"($trace_arg)\\n\""
;
if
(
$trace_arg
ne
""
)
{
if
(
$trace_arg
ne
""
)
{
$ret
.=
", $trace_call_arg"
;
$ret
.=
", $trace_call_arg"
;
}
}
$ret
=
"$ret
);\n"
;
$ret
.=
"
);\n"
;
}
}
if
(
$gen_thread_safe
)
{
if
(
$gen_thread_safe
)
{
$ret
.=
" ENTER_GL();\n"
;
$ret
.=
" ENTER_GL();\n"
;
$ret
.=
" "
;
$ret
.=
" "
;
if
(
$func_ref
->
[
0
]
ne
"void"
)
{
if
(
$func_ref
->
[
0
]
ne
"void"
)
{
$ret
.=
"ret_value = "
;
$ret
.=
"ret_value = "
;
}
}
$ret
.=
"funcs->$prefix.p_$name( $call_arg);\n"
;
$ret
.=
"funcs->$prefix.p_$name( $call_arg);\n"
;
$ret
.=
" LEAVE_GL();\n"
;
$ret
.=
" LEAVE_GL();\n"
;
if
(
$func_ref
->
[
0
]
ne
"void"
)
{
if
(
$func_ref
->
[
0
]
ne
"void"
)
{
$ret
.=
" return ret_value;\n"
$ret
.=
" return ret_value;\n"
}
}
...
@@ -326,7 +322,7 @@ sub GenerateThunk($$$$)
...
@@ -326,7 +322,7 @@ sub GenerateThunk($$$$)
}
}
$ret
.=
"funcs->$prefix.p_$name( $call_arg);\n"
;
$ret
.=
"funcs->$prefix.p_$name( $call_arg);\n"
;
}
}
$ret
=
"$ret
}\n"
;
$ret
.=
"
}\n"
;
# Return this string....
# Return this string....
return
$ret
;
return
$ret
;
...
@@ -341,10 +337,10 @@ sub generate_null_func($$)
...
@@ -341,10 +337,10 @@ sub generate_null_func($$)
$ret
=
"static "
.
ConvertType
(
$func_ref
->
[
0
])
.
" null_$name( "
;
$ret
=
"static "
.
ConvertType
(
$func_ref
->
[
0
])
.
" null_$name( "
;
for
(
my
$i
=
0
;
$i
<
@
{
$func_ref
->
[
1
]};
$i
++
)
{
for
(
my
$i
=
0
;
$i
<
@
{
$func_ref
->
[
1
]};
$i
++
)
{
my
$type
=
$func_ref
->
[
1
]
->
[
$i
]
->
[
0
];
my
$type
=
$func_ref
->
[
1
]
->
[
$i
]
->
[
0
];
my
$name
=
ConvertVarName
(
$func_ref
->
[
1
]
->
[
$i
]
->
[
1
]);
my
$name
=
ConvertVarName
(
$func_ref
->
[
1
]
->
[
$i
]
->
[
1
]);
$ret
.=
ConvertType
(
$type
)
.
" $name"
;
$ret
.=
ConvertType
(
$type
)
.
" $name"
;
$ret
.=
","
if
(
$i
+
1
<
@
{
$func_ref
->
[
1
]});
$ret
.=
","
if
(
$i
+
1
<
@
{
$func_ref
->
[
1
]});
$ret
.=
" "
;
$ret
.=
" "
;
}
}
$ret
.=
'void '
if
(
!
@
{
$func_ref
->
[
1
]});
$ret
.=
'void '
if
(
!
@
{
$func_ref
->
[
1
]});
...
@@ -368,7 +364,7 @@ sub get_func_proto($$$)
...
@@ -368,7 +364,7 @@ sub get_func_proto($$$)
$ret
.=
" "
.
sprintf
(
$format
,
$name
)
.
"("
;
$ret
.=
" "
.
sprintf
(
$format
,
$name
)
.
"("
;
for
(
my
$i
=
0
;
$i
<
@
{
$func
->
[
1
]};
$i
++
)
for
(
my
$i
=
0
;
$i
<
@
{
$func
->
[
1
]};
$i
++
)
{
{
$ret
.=
ConvertType
(
$func
->
[
1
]
->
[
$i
]
->
[
0
]);
$ret
.=
ConvertType
(
$func
->
[
1
]
->
[
$i
]
->
[
0
]);
$ret
.=
","
if
(
$i
+
1
<
@
{
$func
->
[
1
]});
$ret
.=
","
if
(
$i
+
1
<
@
{
$func
->
[
1
]});
}
}
$ret
.=
"void"
unless
@
{
$func
->
[
1
]};
$ret
.=
"void"
unless
@
{
$func
->
[
1
]};
...
@@ -882,14 +878,14 @@ open(SPEC, ">$spec_file");
...
@@ -882,14 +878,14 @@ open(SPEC, ">$spec_file");
foreach
(
sort
keys
%
norm_functions
)
{
foreach
(
sort
keys
%
norm_functions
)
{
my
$args
=
" "
;
my
$args
=
" "
;
for
(
my
$i
=
0
;
$i
<
@
{
$norm_functions
{
$_
}
->
[
1
]};
$i
++
)
{
for
(
my
$i
=
0
;
$i
<
@
{
$norm_functions
{
$_
}
->
[
1
]};
$i
++
)
{
my
$type
=
$norm_functions
{
$_
}
->
[
1
]
->
[
$i
]
->
[
0
];
my
$type
=
$norm_functions
{
$_
}
->
[
1
]
->
[
$i
]
->
[
0
];
if
(
$type
=~
/\*/
)
{
if
(
$type
=~
/\*/
)
{
$args
.=
"ptr "
;
$args
.=
"ptr "
;
}
elsif
(
defined
(
$arg_conv
{
$type
}))
{
}
elsif
(
defined
(
$arg_conv
{
$type
}))
{
$args
.=
"$@$arg_conv{$type}[0] "
;
$args
.=
"$@$arg_conv{$type}[0] "
;
}
else
{
}
else
{
die
"No conversion for GL type $type...\n"
;
die
"No conversion for GL type $type...\n"
;
}
}
}
}
$args
=
substr
(
$args
,
1
,
-
1
);
$args
=
substr
(
$args
,
1
,
-
1
);
print
SPEC
"@ stdcall $_($args)\n"
;
print
SPEC
"@ stdcall $_($args)\n"
;
...
@@ -1003,7 +999,7 @@ foreach (sort keys %ext_functions) {
...
@@ -1003,7 +999,7 @@ foreach (sort keys %ext_functions) {
my
$func_ref
=
$ext_functions
{
$_
};
my
$func_ref
=
$ext_functions
{
$_
};
print
EXT
" { \"$_\", \"$func_ref->[2]\", $_ }"
;
print
EXT
" { \"$_\", \"$func_ref->[2]\", $_ }"
;
if
(
$i
!=
$count
-
1
)
{
if
(
$i
!=
$count
-
1
)
{
print
EXT
","
;
print
EXT
","
;
}
}
$i
++
;
$i
++
;
print
EXT
"\n"
;
print
EXT
"\n"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment