6 # doco.perl - 24 Jan 18:09:40 EST 2001
7 # Addi - (addi@umich.edu)
9 # Extract documentation and help from the source files
11 # -f <files> list FIXME comments for files
12 # -f list FIXME comments for all files
13 # -d <file> list pod comments from file
15 my $comm = shift or USAGE();
26 for my $file (@files) {
27 local(*FH, $/); open(FH,"< $file") or die $!;
28 my $data = <FH>; close(FH);
29 while( $data =~ m/FIXME:(.*?)\*\//sg ) {
30 printf("%10.10s:%5d %s\n", $file, ptol($data, pos($data)), $1);
40 local(*FH, $/); open(FH, "< $file") or die $!;
41 my $data = <FH>; close(FH);
42 $data =~ s/^(=item)/\n$1/mg;
43 $data =~ s/^(=cut)/\n~~~~~~~~\n\n$1\n\n/mg;
45 open(FH,"|pod2text ") or die "Cannot run pod2text: $!\n";
55 doco.perl [-f files| stuff]
57 -f <files> list FIXME comments for files.
58 -f list FIXME comments for all files.
67 open(FH,"$BASE/MANIFEST") or die "Cannot open MANIFEST file: $!\n";
70 return grep { m/\.(c|im)\s*$/ } @MANIFEST;
73 # string position to line number in string
78 $lcnt++ while(substr($str,0,$pos)=~m/\n/g);