Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 May 2003 10:24:47 -0700 (PDT)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 31787 for review
Message-ID:  <200305241724.h4OHOlwa086696@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=31787

Change 31787 by des@des.at.des.thinksec.com on 2003/05/24 10:24:23

	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.

Affected files ...

.. //depot/projects/openpam/misc/gendoc.pl#22 edit

Differences ...

==== //depot/projects/openpam/misc/gendoc.pl#22 (text+ko) ====

@@ -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 @@
 
     $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 @@
 	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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305241724.h4OHOlwa086696>