5 # Free Software Foundation
7 # This file is part of the libiberty library.
8 # Libiberty is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Library General Public
10 # License as published by the Free Software Foundation; either
11 # version 2 of the License, or (at your option) any later version.
13 # Libiberty is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # Library General Public License for more details.
18 # You should have received a copy of the GNU Library General Public
19 # License along with libiberty; see the file COPYING.LIB. If not,
20 # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 # Boston, MA 02111-1307, USA.
23 # Originally written by DJ Delorie <dj@redhat.com>
26 # This is a trivial script which checks the lists of C and O files in
27 # the Makefile for consistency.
37 &missing
() if $mode eq "missing";
38 &undoc
() if $mode eq "undoc";
43 ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~
45 ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
49 ######################################################################
54 while ($f = readdir S
) {
59 while ($f = readdir S
) {
69 for $f (sort keys %have) {
70 next unless $have{$f};
75 for $f (sort keys %listed) {
76 if ($f =~ /(.*)\.c$/) {
78 if (! $listed{"$base.o"}) {
85 ######################################################################
90 while ($file = readdir S
) {
91 if ($file =~ /\.texi$/) {
92 open(T
, "$srcdir/$file");
94 if (/^\@deftype[^\(]* ([^\s\(]+) *\(/) {
100 if ($file =~ /\.c$/) {
101 open(C
, "$srcdir/$file");
103 if (/\@undocumented (\S+)/) {
111 while ($_ =~ /\([^\)]*$/) {
116 s/ VPARAMS([ \(])/$1/;
117 s/PREFIX\(([^\)]*)\)/byte_$1/;
118 if (/^static [^\(]* ([^\s\(]+) *\(.*\)$/) {
126 # $out = join(' ', sort keys %documented);
130 system "etags $srcdir/*.c $srcdir/../include/*.h";
136 $filename =~ s/[\r\n]+$//;
137 $filename =~ s/,\d+$//;
138 $filename =~ s@
.*[/\\]@@
;
141 if ($filename =~ /\.c$/ ) {
142 next unless /^[_a-zA-Z]/;
144 next unless /^\# *define/;
147 next if $filename =~ /mpw\.c/;
158 next if $documented{$_};
161 if ($seen_in{$_} ne $filename) {
164 $seen_in{$_} = $filename;
168 delete $saw{$k} if $saw{$k} > 1;
171 for $k (sort keys %saw) {
172 $fromfile{$seen_in{$k}} .= " " if $fromfile{$seen_in{$k}};
173 $fromfile{$seen_in{$k}} .= $k;
176 for $f (sort keys %fromfile) {
177 $out = "$f: $fromfile{$f}";