diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-04-17 15:47:13 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2013-05-23 14:32:40 +0200 |
commit | e8e591c9e54c36d7ebf5510f581c0061e7853f90 (patch) | |
tree | c8a8eb1c9eb94e2c1ff333744c68f1e5d204a16c /autodoc.pl | |
parent | 7882b24ab46e0bf0639d072e21ab7cf7e0fcd042 (diff) | |
download | perl-e8e591c9e54c36d7ebf5510f581c0061e7853f90.tar.gz |
autodoc.pl now uses regen/embed_lib.pl to parse embed.fnc
Previously it had its own custom parsing code for embed.fnc.
Diffstat (limited to 'autodoc.pl')
-rw-r--r-- | autodoc.pl | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/autodoc.pl b/autodoc.pl index f727a218cc..d243592ef1 100644 --- a/autodoc.pl +++ b/autodoc.pl @@ -31,6 +31,7 @@ if (@ARGV) { or die "Couldn't chdir to '$workdir': $!"; } require 'regen/regen_lib.pl'; +require 'regen/embed_lib.pl'; # # See database of global and static function prototypes in embed.fnc @@ -312,25 +313,10 @@ _EOB_ read_only_bottom_close_and_rename($fh); } -open IN, "embed.fnc" or die $!; - -while (<IN>) { - chomp; - next if /^:/; - while (s|\\\s*$||) { - $_ .= <IN>; - chomp; - } - s/\s+$//; - next if /^\s*(#|$)/; - - my ($flags, $retval, $func, @args) = split /\s*\|\s*/, $_; - - next unless $func; - - s/\b(NN|NULLOK)\b\s+//g for @args; - $func =~ s/\t//g; # clean up fields from embed.pl - $retval =~ s/\t//; +foreach (@{(setup_embed())[0]}) { + next if @$_ < 2; + my ($flags, $retval, $func, @args) = @$_; + s/\b(?:NN|NULLOK)\b\s+//g for @args; $funcflags{$func} = { flags => $flags, |