diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-07-11 17:57:48 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-07-11 17:57:48 +0000 |
commit | 60ed1d8c6a1833ad712cafbcb926be21a03df470 (patch) | |
tree | 34088dc4a27bacd6ada9486934679bd7446614c4 /embed.pl | |
parent | a9419b5523cf55175503760dcfdf0b3775a2952c (diff) | |
download | perl-60ed1d8c6a1833ad712cafbcb926be21a03df470.tar.gz |
integrate cfgperl changes#6224..6229 into mainline
p4raw-link: @6229 on //depot/cfgperl: 94f13a8fe911b4e5d658c1e8bb515599305c074c
p4raw-link: @6224 on //depot/cfgperl: 9e7db0fd3029ee5d3ce957e842a66c057eacd303
p4raw-id: //depot/perl@6352
p4raw-deleted: from //depot/cfgperl@6351 'delete in' lib/lib.pm
(@5608..)
p4raw-integrated: from //depot/cfgperl@6351 'copy in' t/lib/english.t
(@5586..) ext/Socket/Socket.pm (@5704..) README.hpux (@5972..)
lib/English.pm (@6034..)
p4raw-integrated: from //depot/cfgperl@6228 'copy in' op.c (@6226..)
p4raw-branched: from //depot/cfgperl@6227 'branch in' lib/lib.pm.PL
p4raw-integrated: from //depot/cfgperl@6227 'copy in' Makefile.SH
(@6182..) MANIFEST (@6192..)
p4raw-integrated: from //depot/cfgperl@6225 'merge in' embed.pl
(@6221..)
Diffstat (limited to 'embed.pl')
-rwxr-xr-x | embed.pl | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -1081,8 +1081,8 @@ my %apidocs; my %gutsdocs; my %docfuncs; -sub autodoc ($) { # parse a file and extract documentation info - my($fh) = @_; +sub autodoc ($$) { # parse a file and extract documentation info + my($fh,$file) = @_; my($in, $doc); FUNC: @@ -1100,14 +1100,14 @@ DOC: $docs = "\n$docs" if $docs and $docs !~ /^\n/; if ($flags =~ /m/) { if ($flags =~ /A/) { - $apidocs{$name} = [$flags, $docs, $ret, @args]; + $apidocs{$name} = [$flags, $docs, $ret, $file, @args]; } else { - $gutsdocs{$name} = [$flags, $docs, $ret, @args]; + $gutsdocs{$name} = [$flags, $docs, $ret, $file, @args]; } } else { - $docfuncs{$name} = [$flags, $docs, $ret, @args]; + $docfuncs{$name} = [$flags, $docs, $ret, $file, @args]; } if ($doc =~ /^=for/) { $in = $doc; @@ -1119,7 +1119,7 @@ DOC: sub docout ($$$) { # output the docs for one function my($fh, $name, $docref) = @_; - my($flags, $docs, $ret, @args) = @$docref; + my($flags, $docs, $ret, $file, @args) = @$docref; $docs .= "NOTE: the perl_ form of this function is deprecated.\n\n" if $flags =~ /p/; @@ -1137,12 +1137,13 @@ sub docout ($$$) { # output the docs for one function print $fh "(" . join(", ", @args) . ")"; print $fh "\n\n"; } + print $fh "=for hackers\nFound in file $file\n\n"; } my $file; for $file (glob('*.c'), glob('*.h')) { open F, "< $file" or die "Cannot open $file for docs: $!\n"; - autodoc(\*F); + autodoc(\*F,$file); close F or die "Error closing $file: $!\n"; } @@ -1159,10 +1160,12 @@ walk_table { # load documented functions into approriate hash if ($flags =~ /A/) { my $docref = delete $docfuncs{$func}; warn "no docs for $func\n" unless $docref and @$docref; - $apidocs{$func} = [$docref->[0] . 'A', $docref->[1], $retval, @args]; + $apidocs{$func} = [$docref->[0] . 'A', $docref->[1], $retval, + $docref->[3], @args]; } else { my $docref = delete $docfuncs{$func}; - $gutsdocs{$func} = [$docref->[0], $docref->[1], $retval, @args]; + $gutsdocs{$func} = [$docref->[0], $docref->[1], $retval, + $docref->[3], @args]; } } return ""; |