Tweak the function-locating regexp to handle the slightly special
case of openpam_log(3) better. Also work around a mysterious Perl bug by using a loop to emulate the 'g' regexp flag. git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@228 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
parent
151085d688
commit
af75375820
1 changed files with 3 additions and 3 deletions
|
@ -32,7 +32,7 @@
|
|||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# $P4: //depot/projects/openpam/misc/gendoc.pl#21 $
|
||||
# $P4: //depot/projects/openpam/misc/gendoc.pl#22 $
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
@ -141,7 +141,7 @@ sub parse_source($) {
|
|||
|
||||
$func = $fn;
|
||||
$func =~ s,^(?:.*/)?([^/]+)\.c$,$1,;
|
||||
if ($source !~ m,\n \* ([\S ]+)\n \*/\n\n([\S ]+)\n$func\((.*?)\)\n\{,s) {
|
||||
if ($source !~ m,\n \* ([\S ]+)\n \*/\n\n([\S ]+)\n_?$func\((.*?)\)\n\{,s) {
|
||||
warn("$fn: can't find $func\n");
|
||||
return undef;
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ sub parse_source($) {
|
|||
s/\s*=(struct \w+(?: \*)?)\b\s*/\n.Vt $1\n/gs;
|
||||
s/\s*:([a-z_]+)\b\s*/\n.Va $1\n/gs;
|
||||
s/\s*;([a-z_]+)\b\s*/\n.Dv $1\n/gs;
|
||||
if (s/\s*=([a-z_]+)\b\s*/\n.Xr $1 3\n/gs) {
|
||||
while (s/\s*=([a-z_]+)\b\s*/\n.Xr $1 3\n/s) {
|
||||
++$xref{"$1 3"};
|
||||
}
|
||||
s/\s*\"(?=\w)/\n.Do\n/gs;
|
||||
|
|
Loading…
Reference in a new issue