configure: remove AC_PATH_XTRA macro
[AROS.git] / tools / sfdc / MacroAOS4.pl
blobdb4d8df85dda618cf153553cfe59920e4fea2d24
2 ### Class MacroAOS4: Create a AOS4-style macro file ###########################
4 BEGIN {
5 package MacroAOS4;
6 use vars qw(@ISA);
7 @ISA = qw( Macro );
9 sub new {
10 my $proto = shift;
11 my $class = ref($proto) || $proto;
12 my $self = $class->SUPER::new( @_ );
13 my $sfd = $self->{SFD};
14 bless ($self, $class);
16 $self->{savetype} = '';
17 $self->{CALLBASE} = "I$sfd->{BaseName}";
18 return $self;
21 sub function_start {
22 my $self = shift;
23 my %params = @_;
24 my $prototype = $params{'prototype'};
25 my $sfd = $self->{SFD};
27 $self->{savetype} = $prototype->{type};
29 if ($prototype->{type} eq 'function' ||
30 $prototype->{type} eq 'cfunction' ||
31 $prototype->{type} eq 'varargs') {
32 printf " (((struct $sfd->{BaseName}IFace *)(___base))->$prototype->{funcname})(";
33 $prototype->{type} = 'cfunction';
35 else {
36 $self->SUPER::function_start (@_);
40 sub function_end {
41 my $self = shift;
42 my %params = @_;
43 my $prototype = $params{'prototype'};
44 my $sfd = $self->{SFD};
46 $prototype->{type} = $self->{savetype};
48 if ($prototype->{type} eq 'function' ||
49 $prototype->{type} eq 'cfunction' ||
50 $prototype->{type} eq 'varargs') {
51 print ")\n";
53 else {
54 $self->SUPER::function_end (@_);