configure: remove AC_PATH_XTRA macro
[AROS.git] / tools / sfdc / Dump.pl
blob6363f1342ab4a4a144a4364d2d0431b81b3a9ee9
2 ### Class Dump: Dump SFD info #################################################
4 BEGIN {
5 package Dump;
7 sub new {
8 my $proto = shift;
9 my %params = @_;
10 my $class = ref($proto) || $proto;
11 my $self = {};
12 $self->{SFD} = $params{'sfd'};
13 bless ($self, $class);
14 return $self;
17 sub header {
18 my $self = shift;
19 my $sfd = $self->{SFD};
21 print "SFD information\n";
22 print "¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n";
23 print "Copyright: $$sfd{'copyright'}\n";
24 print "RCS ID: $$sfd{'id'}\n";
25 print "Module name: $$sfd{'libname'}\n";
26 print "Module base: $$sfd{'base'}\n";
27 print "Module base type: $$sfd{'basetype'}\n";
28 print "Module base names: $$sfd{'basename'}, $$sfd{'BASENAME'}, ";
29 print "$$sfd{'Basename'}\n";
30 print "\n";
31 print "Include files: ";
32 print join ("\n ", @{$$sfd{'includes'}});
33 print "\n";
34 print "Type definitions: ";
35 if ($#{@{$sfd->{typedefs}}} != -1) {
36 print join ("\n ", @{$$sfd{'typedefs'}});
38 print "\n";
39 print "\n";
42 sub function {
43 my $self = shift;
44 my %params = @_;
45 my $prototype = $params{'prototype'};
46 my $sfd = $self->{SFD};
48 print "* Line $$prototype{'line'}: $$prototype{'funcname'}()\n";
49 print " Type: " . ucfirst $$prototype{'type'} . "\n";
50 print " Subtype: $prototype->{subtype}\n";
51 if ($prototype->{real_funcname} ne '') {
52 print " Real function name:\t$$prototype{'real_funcname'}\n";
54 print " Visibility: ";
55 print $$prototype{'private'} == 0 ? "Public\n" : "Private\n";
56 print " Library offset/bias: -$$prototype{'bias'}\n";
57 print " Available since: V$$prototype{'version'}\n";
58 print " Comment: $$prototype{'comment'}\n";
59 print "\n";
60 print " No return: ";
61 print $prototype->{nr} ? "Yes\n" : "No\n";
62 print " No base: ";
63 print $prototype->{nb} ? "Yes\n" : "No\n";
64 print "\n";
65 print " Return value: $$prototype{'return'}\n";
66 print " Arguments: ";
67 print join (",\n\t\t\t\t", @{$$prototype{'args'}});
68 print "\n";
69 print " Argument names: ";
70 print join (", ", @{$$prototype{'argnames'}});
71 print "\n";
72 print " Local arguments: ";
73 print join (",\n\t\t\t\t", @{$$prototype{'___args'}});
74 print "\n";
75 print " Local argument names: ";
76 print join (", ", @{$$prototype{'___argnames'}});
77 print "\n";
78 print " Argument types: ";
79 print join (",\n\t\t\t\t", @{$$prototype{'argtypes'}});
80 print "\n";
82 print "\n";
84 # value => $proto_line,
86 # $$prototype{'return'} = $return;
87 # $$prototype{'funcname'} = $name;
88 # @{$$prototype{'args'}} = ();
89 # @{$$prototype{'regs'}} = split(/,/,lc $registers); # Make regs lower case
90 # @{$$prototype{'argnames'}} = (); # Initialize array
91 # @{$$prototype{'argtypes'}} = (); # Initialize array
94 sub footer {
95 print "\n";