summaryrefslogtreecommitdiff
path: root/support/list_hooks.pl
diff options
context:
space:
mode:
authorBen Laurie <ben@apache.org>2002-05-06 12:04:56 +0000
committerBen Laurie <ben@apache.org>2002-05-06 12:04:56 +0000
commitd63f22c782551f61e5687a7df4a77dd881de914f (patch)
tree9b8d9ad56dff3085a53b50473cc464581f924b2b /support/list_hooks.pl
parent4c32a98befd6c76277c792be479a8295eae14689 (diff)
downloadhttpd-d63f22c782551f61e5687a7df4a77dd881de914f.tar.gz
Be more tolerant.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94957 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/list_hooks.pl')
-rwxr-xr-xsupport/list_hooks.pl21
1 files changed, 15 insertions, 6 deletions
diff --git a/support/list_hooks.pl b/support/list_hooks.pl
index c52c567142..6de9b41d12 100755
--- a/support/list_hooks.pl
+++ b/support/list_hooks.pl
@@ -4,20 +4,20 @@ use strict;
use Carp;
-my $path=shift;
+my $path=shift || '.';
findInDir($path);
foreach my $hook (sort keys %::Hooks) {
my $h=$::Hooks{$hook};
for my $x (qw(declared implemented type args)) {
- croak "$hook datum '$x' missing" if !exists $h->{$x};
+ print "$hook datum '$x' missing\n" if !exists $h->{$x};
}
print "$hook\n";
- print " declared in $h->{declared}\n";
- print " implemented in $h->{implemented}\n";
- print " type is $h->{type}\n";
- print " $h->{ret} $hook($h->{args})\n";
+ print " declared in $h->{declared}\n" if defined $h->{declared};
+ print " implemented in $h->{implemented}\n" if defined $h->{implemented};
+ print " type is $h->{type}\n" if defined $h->{type};
+ print " $h->{ret} $hook($h->{args})\n" if defined $h->{args};
print "\n";
}
@@ -61,6 +61,15 @@ sub scanFile {
$::Hooks{$name}->{declared}=$file;
$::Hooks{$name}->{ret}=$ret;
$::Hooks{$name}->{args}=$args;
+ } elsif(/AP_DECLARE_HOOK\(([^,]+),([^,]+)/) {
+# really we should swallow subsequent lines to get the arguments...
+ my $name=$2;
+ my $ret=$1;
+ croak "$name declared twice! ($_)"
+ if exists $::Hooks{$name}->{declared};
+ $::Hooks{$name}->{declared}=$file;
+ $::Hooks{$name}->{ret}=$ret;
+ $::Hooks{$name}->{args}='???';
}
if(/AP_IMPLEMENT_HOOK_()(VOID)\(([^,\s]+)/
|| /AP_IMPLEMENT(_OPTIONAL|)_HOOK_(.*?)\([^,]+?\s*,\s*([^,\s]+)/) {