2
# use this program to generate interface informations for the cairo library
3
# to be used in the glue code
4
# output: list of declarations for proxy function pointers, macros to link symbols, converted source for cairo_renderer.cpp
6
# by M. Gubinelli, 12/2008
17
open (FILE, "<", $filename) or die "Failed to read file $filename : $! \n";
25
while ($whole_file =~ m#cairo_public([^;]*)#sg) {
31
s/ (cairo_[a-z_]*)/ \(\*tm_\1\)/;
32
#m/(tm_cairo_[a-z_]*)/;
34
$acc .= $l . " --> " . $_ . ";\n";
42
$filename = "cairo_renderer.cpp";
43
open (FILE, "<", $filename) or die "Failed to read file $filename : $! \n";
46
$source_file = <FILE>;
57
foreach $decl (keys %b) {
58
if ($source_file =~ /$decl/) {
59
# print $decl . ";\n";
60
$acc_int .= "extern " . $b{$decl} . ";\n";
61
$acc_link .= "tm_" . $decl . " = " . $decl . ";\n";
62
$acc_dynlink .= "CAIRO_LINK(" . $decl . ", tm_" . $decl . ");\n";
66
print $acc_int . "\n" ;
67
print $acc_link . "\n" ;
68
print $acc_dynlink . "\n" ;
70
foreach $decl (keys %b) {
71
$source_file =~ s/$decl/tm_$decl/g;
74
$filename = "cairo_renderer.cpp.transated";
75
open (FILE, ">", $filename) or die "Failed to read file $filename : $! \n";
76
print FILE $source_file;
b'\\ No newline at end of file'