3
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
4
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
6
## This program is distributed under the terms and conditions of the GNU
7
## General Public License Version 2 as published by the Free Software
8
## Foundation or, at your option, any later version.
18
return "#define $_[0] $_[1]"
24
return "typedef $_[1] $_[0];"
27
# function pointer type declaration
31
return join(' ', "typedef", $_[1]->{rtype},
32
"($api * PFN" . (uc $_[0]) . "PROC)",
33
"(" . $_[1]->{parms} . ")") . ";";
37
sub make_pfn_alias($%)
40
return join(" ", "#define", $_[0], $type . "EW_GET_FUN(" . prefixname($_[0]) . ")")
53
foreach my $ext (sort @extlist)
55
my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext);
57
make_separator($extname);
58
print "#ifndef $extname\n#define $extname 1\n";
59
output_tokens($tokens, \&make_define);
60
output_types($types, \&make_type);
61
output_exacts($exacts, \&make_exact);
62
output_decls($functions, \&make_pfn_type);
63
output_decls($functions, \&make_pfn_alias);
65
my $extvar = $extname;
66
$extvar =~ s/GL(X*)_/GL$1EW_/;
68
print "\n#define $extvar " . $type . "EW_GET_VAR(" . prefix_varname($extvar) . ")\n";
69
print "\n#endif /* $extname */\n\n";
3
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
4
## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
6
## This program is distributed under the terms and conditions of the GNU
7
## General Public License Version 2 as published by the Free Software
8
## Foundation or, at your option, any later version.
18
return "#define $_[0] $_[1]"
24
return "typedef $_[1] $_[0];"
27
# function pointer type declaration
31
return join(' ', "typedef", $_[1]->{rtype},
32
"($api * PFN" . (uc $_[0]) . "PROC)",
33
"(" . $_[1]->{parms} . ")") . ";";
37
sub make_pfn_alias($%)
40
return join(" ", "#define", $_[0], $type . "EW_GET_FUN(" . prefixname($_[0]) . ")")
53
foreach my $ext (sort @extlist)
55
my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext);
57
make_separator($extname);
58
print "#ifndef $extname\n#define $extname 1\n";
59
output_tokens($tokens, \&make_define);
60
output_types($types, \&make_type);
61
output_exacts($exacts, \&make_exact);
62
output_decls($functions, \&make_pfn_type);
63
output_decls($functions, \&make_pfn_alias);
65
my $extvar = $extname;
66
$extvar =~ s/GL(X*)_/GL$1EW_/;
68
print "\n#define $extvar " . $type . "EW_GET_VAR(" . prefix_varname($extvar) . ")\n";
69
print "\n#endif /* $extname */\n\n";