Changeset 228 in openpam


Ignore:
Timestamp:
May 24, 2003, 7:24:23 PM (15 years ago)
Author:
Dag-Erling Smørgrav
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/misc/gendoc.pl

    r227 r228  
    3333# SUCH DAMAGE.
    3434#
    35 # $P4: //depot/projects/openpam/misc/gendoc.pl#21 $
     35# $P4: //depot/projects/openpam/misc/gendoc.pl#22 $
    3636#
    3737
     
    142142    $func = $fn;
    143143    $func =~ s,^(?:.*/)?([^/]+)\.c$,$1,;
    144     if ($source !~ m,\n \* ([\S ]+)\n \*/\n\n([\S ]+)\n$func\((.*?)\)\n\{,s) {
     144    if ($source !~ m,\n \* ([\S ]+)\n \*/\n\n([\S ]+)\n_?$func\((.*?)\)\n\{,s) {
    145145        warn("$fn: can't find $func\n");
    146146        return undef;
     
    236236        s/\s*:([a-z_]+)\b\s*/\n.Va $1\n/gs;
    237237        s/\s*;([a-z_]+)\b\s*/\n.Dv $1\n/gs;
    238         if (s/\s*=([a-z_]+)\b\s*/\n.Xr $1 3\n/gs) {
     238        while (s/\s*=([a-z_]+)\b\s*/\n.Xr $1 3\n/s) {
    239239            ++$xref{"$1 3"};
    240240        }
Note: See TracChangeset for help on using the changeset viewer.