You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2001/01/08 00:42:07 UTC

cvs commit: modperl-2.0/lib/Apache ParseSource.pm

dougm       01/01/07 15:42:07

  Modified:    lib/Apache ParseSource.pm
  Log:
  pickup cmd_parms, command_rec and module structures
  
  Revision  Changes    Path
  1.2       +11 -2     modperl-2.0/lib/Apache/ParseSource.pm
  
  Index: ParseSource.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/lib/Apache/ParseSource.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParseSource.pm	2001/01/07 23:18:58	1.1
  +++ ParseSource.pm	2001/01/07 23:42:07	1.2
  @@ -75,7 +75,7 @@
       }
   
       my @includes;
  -    my $unwanted = join '|', qw(ap_listen);
  +    my $unwanted = join '|', qw(ap_listen internal);
       File::Find::finddepth({
                              wanted => sub {
                                  return unless /\.h$/;
  @@ -143,11 +143,12 @@
   
       my %seen;
       my $prefix = join '|', qw(ap_ apr_ apu_);
  +    my $other  = join '|', qw(_rec module);
   
       my @structures;
   
       while (my($type, $elts) = each %$typedef_structs) {
  -        next unless $type =~ /^($prefix)/o or $type =~ /_rec$/;
  +        next unless $type =~ /^($prefix)/o or $type =~ /($other)$/o;
   
           next if $seen{$type}++;
   
  @@ -225,10 +226,18 @@
       my %typedef;
   
       my $apache_file = 0;
  +    my %typedef_aliases =
  +      (cmd_parms_struct => 'cmd_parms',
  +       command_struct => 'command_rec',
  +       module_struct => 'module');
   
  +    my $alias_re = join '|', keys %typedef_aliases;
  +
       while (<$cmd>) {
           #C::Scan cannot parse this
           s/const\s+char\s*\*\s+const\s*\*/const char **/g;
  +
  +        s/\b($alias_re)\b/$typedef_aliases{$1}/o;
   
           if (m(^\s*\#\s*	        # Leading hash
                 (line\s*)?	# 1: Optional line