cvs commit: modperl-2.0/lib/Apache ParseSource.pm
dougm 02/03/01 10:44:36 Modified:lib/Apache ParseSourcepm Log: skip header files that #include apr_optionalh Revision ChangesPath 136 +2 -1 modperl-20/lib/Apache/ParseSourcepm Index: ParseSourcepm === RCS file: /home/cvs/modperl-20/lib/Apache/ParseSourcepm,v retrieving revision 135 retrieving revision 136 diff -u -r135 -r136 --- ParseSourcepm21 Feb 2002 01:50:41 - 135 +++ ParseSourcepm1 Mar 2002 18:44:36 - 136 -105,7 +105,8 my includes; my $unwanted = join '|', qw(ap_listen internal version apr_optional mod_include mod_cgi mod_proxy -mod_ssl ssl_ apr_anylock apr_rmm); +mod_ssl ssl_ apr_anylock apr_rmm +ap_config mod_log_config); for my $dir (dirs) { File::Find::finddepth({
cvs commit: modperl-2.0/lib/Apache ParseSource.pm
stas01/09/27 09:03:49 Modified:lib/Apache ParseSource.pm Log: - add the apr_table constants Revision ChangesPath 1.29 +1 -0 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.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- ParseSource.pm2001/09/25 17:30:31 1.28 +++ ParseSource.pm2001/09/27 16:03:49 1.29 @@ -143,6 +143,7 @@ log= [qw(APLOG_)], }, APR = { +table = [qw{APR_OVERLAP_TABLES_}], poll = [qw{APR_POLL}], common= [qw{APR_SUCCESS}], error = [qw{APR_E}],
cvs commit: modperl-2.0/lib/Apache ParseSource.pm
dougm 01/09/25 09:33:30 Modified:lib/Apache ParseSource.pm Log: skip mod_cgi.h Revision ChangesPath 1.27 +1 -1 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.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- ParseSource.pm2001/09/06 16:40:11 1.26 +++ ParseSource.pm2001/09/25 16:33:30 1.27 @@ -88,7 +88,7 @@ my @includes; my $unwanted = join '|', qw(ap_listen internal version -apr_optional mod_include +apr_optional mod_include mod_cgi mod_ssl ssl_); for my $dir (@dirs) {
cvs commit: modperl-2.0/lib/Apache ParseSource.pm
dougm 01/09/06 09:40:11 Modified:lib/Apache ParseSource.pm Log: only generate table .pm's if content has changed Submitted by: Stas Bekman [EMAIL PROTECTED] Reviewed by: dougm Revision ChangesPath 1.26 +26 -4 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.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- ParseSource.pm2001/09/06 05:26:52 1.25 +++ ParseSource.pm2001/09/06 16:40:11 1.26 @@ -410,8 +410,6 @@ $file = $tdir/$subdir/$file; } -open my $pm, '', $file or die open $file: $!; - # sort the hashes (including nested ones) for a consistent dump canonsort(\$data); @@ -422,7 +420,7 @@ my $version = $self-VERSION; my $date = scalar localtime; -print $pm EOF; +my $new_content = EOF; package $name; # !! @@ -435,7 +433,31 @@ 1; EOF -close $pm; + +my $old_content = ''; +if (-e $file) { +open my $pm, '', $file or die open $file: $!; +local $/ = undef; # slurp the file +$old_content = $pm; +close $pm; +} + +my $overwrite = 1; +if ($old_content) { +# strip the date line, which will never be the same before +# comparing +my $table_header = qr{^\#\s!.*}; +(my $old = $old_content) =~ s/$table_header//mg; +(my $new = $new_content) =~ s/$table_header//mg; +$overwrite = 0 if $old eq $new; +} + +if ($overwrite) { +open my $pm, '', $file or die open $file: $!; +print $pm $new_content; +close $pm; +} + } # canonsort(\$data);
cvs commit: modperl-2.0/lib/Apache ParseSource.pm
dougm 01/08/19 09:29:44 Modified:lib/Apache ParseSource.pm Log: skip ssl headers Revision ChangesPath 1.22 +2 -1 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.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- ParseSource.pm2001/08/01 02:03:50 1.21 +++ ParseSource.pm2001/08/19 16:29:44 1.22 @@ -88,7 +88,8 @@ my @includes; my $unwanted = join '|', qw(ap_listen internal version -apr_optional mod_include); +apr_optional mod_include +mod_ssl ssl_); for my $dir (@dirs) { File::Find::finddepth({
cvs commit: modperl-2.0/lib/Apache ParseSource.pm
dougm 01/04/19 10:22:57 Modified:lib/Apache ParseSource.pm Log: generate tables into the xs/tables/current directory, pickup apr_read_type enum Revision ChangesPath 1.16 +4 -3 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.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- ParseSource.pm2001/04/18 05:27:39 1.15 +++ ParseSource.pm2001/04/19 17:22:54 1.16 @@ -165,7 +165,7 @@ my %enums_wanted = ( Apache = { map { $_, 1 } qw(cmd_how input_mode filter_type) }, -APR = { map { $_, 1 } qw(apr_shutdown_how) }, +APR = { map { $_, 1 } qw(apr_shutdown_how apr_read_type) }, ); my $defines_unwanted = join '|', qw{ @@ -390,8 +390,9 @@ my($subdir) = (split '::', $name)[0]; -if (-d "lib/$subdir") { -$file = "lib/$subdir/$file"; +my $tdir = 'xs/tables/current'; +if (-d "$tdir/$subdir") { +$file = "$tdir/$subdir/$file"; } open my $pm, '', $file or die "open $file: $!";
cvs commit: modperl-2.0/lib/Apache ParseSource.pm
dougm 01/04/17 22:27:39 Modified:lib/Apache ParseSource.pm Log: pickup apache_filter and input_mode constants Revision ChangesPath 1.15 +3 -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.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- ParseSource.pm2001/04/12 00:48:02 1.14 +++ ParseSource.pm2001/04/18 05:27:39 1.15 @@ -164,7 +164,7 @@ } my %enums_wanted = ( -Apache = { map { $_, 1 } qw(cmd_how) }, +Apache = { map { $_, 1 } qw(cmd_how input_mode filter_type) }, APR = { map { $_, 1 } qw(apr_shutdown_how) }, ); @@ -225,7 +225,8 @@ my($name, $e) = $self-parse_enum($fh); return unless $name; -$name =~ s/_e$//; +$name =~ s/^ap_//; +$name =~ s/_(e|t)$//; my $class; for (keys %enums_wanted) {
cvs commit: modperl-2.0/lib/Apache ParseSource.pm
dougm 01/04/11 17:48:02 Modified:lib/Apache ParseSource.pm Log: filter some junk out Revision ChangesPath 1.14 +2 -1 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.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- ParseSource.pm2001/04/11 22:38:17 1.13 +++ ParseSource.pm2001/04/12 00:48:02 1.14 @@ -169,7 +169,7 @@ ); my $defines_unwanted = join '|', qw{ -HTTP_VERSION +HTTP_VERSION APR_EOL_STR }; sub get_constants { @@ -183,6 +183,7 @@ while ($fh) { if (s/^\#define\s+(\w+)\s+.*/$1/) { chomp; +next if /_H$/; next if $seen{$_}++; $self-handle_constant(\%constants); }
cvs commit: modperl-2.0/lib/Apache ParseSource.pm
dougm 01/03/04 16:04:55 Modified:lib/Apache ParseSource.pm Log: skip version.h (e.g. automake generated and not public) Revision ChangesPath 1.12 +2 -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.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ParseSource.pm2001/03/04 23:22:49 1.11 +++ ParseSource.pm2001/03/05 00:04:55 1.12 @@ -87,13 +87,13 @@ } my @includes; -my $unwanted = join '|', qw(ap_listen internal); +my $unwanted = join '|', qw(ap_listen internal version); for my $dir (@dirs) { File::Find::finddepth({ wanted = sub { return unless /\.h$/; - return if /($unwanted)/o; + return if /^($unwanted)/o; my $dir = $File::Find::dir; push @includes, "$dir/$_"; },
cvs commit: modperl-2.0/lib/Apache ParseSource.pm
dougm 01/02/18 13:52:51 Modified:lib/Apache ParseSource.pm Log: a few changes for subclass-able-ness Revision ChangesPath 1.6 +22 -7 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.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ParseSource.pm2001/02/02 04:53:48 1.5 +++ ParseSource.pm2001/02/18 21:52:51 1.6 @@ -50,11 +50,15 @@ my $c = C::Scan-new(filename = $self-{scan_filename}); -$c-set(includeDirs = $self-config-includes); +$c-set(includeDirs = $self-includes); bless $c, 'Apache::ParseSource::Scan'; } +sub include_dir { shift-config-apxs(-q = 'INCLUDEDIR') } + +sub includes { shift-config-includes } + sub find_includes { my $self = shift; @@ -62,7 +66,7 @@ require File::Find; -my $dir = $self-config-apxs(-q = 'INCLUDEDIR'); +my $dir = $self-include_dir; unless (-d $dir) { die "could not find include directory"; @@ -154,6 +158,10 @@ return \@e; } +sub wanted_functions { +join '|', qw(ap_ apr_ apu_); +} + sub get_functions { my $self = shift; @@ -165,7 +173,7 @@ my $fdecls = $c-get($key); my %seen; -my $wanted = join '|', qw(ap_ apr_ apu_); +my $wanted = $self-wanted_functions; my @functions; @@ -174,6 +182,10 @@ next unless $name =~ /^($wanted)/o; next if $seen{$name}++; +for (qw(static __inline__)) { +$rtype =~ s/^$_\s+//; +} + my $func = { name = $name, return_type = $rtype, @@ -250,9 +262,11 @@ require Data::Dumper; local $Data::Dumper::Indent = 1; + +my($subdir) = (split '::', $name)[0]; -if (-d "lib/Apache") { -$file = "lib/Apache/$file"; +if (-d "lib/$subdir") { +$file = "lib/$subdir/$file"; } open my $pm, '', $file or die "open $file: $!"; @@ -260,14 +274,15 @@ my $dump = Data::Dumper-new([$data], [$name])-Dump; -my $package = __PACKAGE__; +my $package = ref($self) || $self; +my $version = $self-VERSION; my $date = scalar localtime; print $pm EOF; package $name; # !! -# ! WARNING: generated by $package/$VERSION +# ! WARNING: generated by $package/$version # ! $date # ! do NOT edit, any changes will be lost ! # !!