2 ### Class StubAROS: Create an AROS stub file ##################################
11 my $class = ref($proto) || $proto;
12 my $self = $class->SUPER::new
( @_ );
13 bless ($self, $class);
20 $self->SUPER::header
(@_);
22 print "#include <aros/libcall.h>\n";
29 my $prototype = $params{'prototype'};
30 my $sfd = $self->{SFD
};
32 if ($prototype->{type
} eq 'function') {
36 if (!$prototype->{nb
}) {
37 print " BASE_EXT_DECL\n";
40 if (!$prototype->{nr
}) {
41 print " $prototype->{return} _res = ($prototype->{return}) ";
47 printf "AROS_LC%d%s($prototype->{return}, $prototype->{funcname},\n",
48 $prototype->{numargs
},
49 $$prototype{'return'} eq 'void'
50 || $$prototype{'return'} eq 'VOID' ?
"NR" : "";
53 $self->SUPER::function_start
(@_);
60 my $prototype = $params{'prototype'};
61 my $argtype = $params{'argtype'};
62 my $argname = $params{'argname'};
63 my $argreg = $params{'argreg'};
64 my $argnum = $params{'argnum'};
65 my $sfd = $self->{SFD
};
67 if ($$prototype{'type'} eq 'function') {
68 print " AROS_LCA($argtype, $argname, " . (uc $argreg) . "),\n";
71 $self->SUPER::function_arg
(@_);
78 my $prototype = $params{'prototype'};
79 my $sfd = $self->{SFD
};
81 if ($$prototype{'type'} eq 'function') {
82 if ($prototype->{nb
}) {
86 for my $i (0 .. $#{$prototype->{regs}}) {
87 if ($prototype->{regs
}[$i] eq 'a6') {
88 $bt = $prototype->{argtypes
}[$i];
89 $bn =$prototype->{___argnames
}[$i];
94 printf " $bt, $bn, %d, $sfd->{Basename});\n",
95 $prototype->{bias
} / 6;
98 printf " $sfd->{basetype}, BASE_NAME, %d, $sfd->{Basename});\n",
99 $prototype->{bias
} / 6;
102 if (!$prototype->{nr
}) {
103 print " return _res;\n";
109 $self->SUPER::function_end
(@_);