1999-09-23 17:14:20 +02:00
|
|
|
package winapi_options;
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
sub parser_comma_list {
|
|
|
|
my $prefix = shift;
|
|
|
|
my $value = shift;
|
|
|
|
if(defined($prefix) && $prefix eq "no") {
|
|
|
|
return { active => 0, filter => 0, hash => {} };
|
|
|
|
} elsif(defined($value)) {
|
|
|
|
my %names;
|
|
|
|
for my $name (split /,/, $value) {
|
|
|
|
$names{$name} = 1;
|
|
|
|
}
|
|
|
|
return { active => 1, filter => 1, hash => \%names };
|
|
|
|
} else {
|
|
|
|
return { active => 1, filter => 0, hash => {} };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
my %options = (
|
|
|
|
"debug" => { default => 0, description => "debug mode" },
|
|
|
|
"help" => { default => 0, description => "help mode" },
|
|
|
|
"verbose" => { default => 0, description => "verbose mode" },
|
|
|
|
|
1999-10-24 23:45:39 +02:00
|
|
|
"progress" => { default => 1, description => "show progress" },
|
|
|
|
|
1999-09-23 17:14:20 +02:00
|
|
|
"win16" => { default => 1, description => "Win16 checking" },
|
|
|
|
"win32" => { default => 1, description => "Win32 checking" },
|
|
|
|
|
|
|
|
"shared" => { default => 0, description => "show shared functions between Win16 and Win32" },
|
|
|
|
"shared-segmented" => { default => 0, description => "segmented shared functions between Win16 and Win32 checking" },
|
|
|
|
|
2000-07-15 23:32:55 +02:00
|
|
|
"config" => { default => 1, parent => "local", description => "check configuration include consistancy" },
|
1999-10-24 23:45:39 +02:00
|
|
|
"config-unnessary" => { default => 0, parent => "config", description => "check for unnessary #include \"config.h\"" },
|
|
|
|
|
2000-04-06 22:11:04 +02:00
|
|
|
"spec-mismatch" => { default => 0, description => "spec file mismatch checking" },
|
|
|
|
|
1999-09-23 17:14:20 +02:00
|
|
|
"local" => { default => 1, description => "local checking" },
|
|
|
|
"module" => {
|
|
|
|
default => { active => 1, filter => 0, hash => {} },
|
|
|
|
parent => "local",
|
|
|
|
parser => \&parser_comma_list,
|
|
|
|
description => "module filter"
|
|
|
|
},
|
|
|
|
|
|
|
|
"argument" => { default => 1, parent => "local", description => "argument checking" },
|
|
|
|
"argument-count" => { default => 1, parent => "argument", description => "argument count checking" },
|
|
|
|
"argument-forbidden" => {
|
1999-10-24 23:45:39 +02:00
|
|
|
default => { active => 1, filter => 0, hash => {} },
|
1999-09-23 17:14:20 +02:00
|
|
|
parent => "argument",
|
|
|
|
parser => \&parser_comma_list,
|
|
|
|
description => "argument forbidden checking"
|
|
|
|
},
|
|
|
|
"argument-kind" => {
|
2000-06-11 22:02:29 +02:00
|
|
|
default => { active => 1, filter => 1, hash => { double => 1 } },
|
1999-09-23 17:14:20 +02:00
|
|
|
parent => "argument",
|
|
|
|
parser => \&parser_comma_list,
|
|
|
|
description => "argument kind checking"
|
|
|
|
},
|
2000-06-07 04:11:42 +02:00
|
|
|
"calling-convention" => { default => 1, parent => "local", description => "calling convention checking" },
|
|
|
|
"calling-convention-win16" => { default => 0, parent => "calling-convention", description => "calling convention checking (Win16)" },
|
|
|
|
"calling-convention-win32" => { default => 1, parent => "calling-convention", description => "calling convention checking (Win32)" },
|
2000-04-24 20:02:32 +02:00
|
|
|
"misplaced" => { default => 1, parent => "local", description => "check for misplaced functions" },
|
2000-05-11 23:46:17 +02:00
|
|
|
"statements" => { default => 0, parent => "local", description => "check for statements inconsistances" },
|
2000-05-24 01:37:51 +02:00
|
|
|
"cross-call" => { default => 0, parent => "statements", description => "check for cross calling functions" },
|
2000-04-29 16:24:11 +02:00
|
|
|
"cross-call-win32-win16" => {
|
|
|
|
default => 0, parent => "cross-call", description => "check for cross calls between win32 and win16"
|
|
|
|
},
|
|
|
|
"cross-call-unicode-ascii" => {
|
|
|
|
default => 0, parent => "cross-call", description => "check for cross calls between Unicode and ASCII"
|
2001-01-20 03:16:31 +01:00
|
|
|
},
|
2000-05-11 23:46:17 +02:00
|
|
|
"debug-messages" => { default => 0, parent => "statements", description => "check for debug messages inconsistances" },
|
2000-04-06 22:11:04 +02:00
|
|
|
|
2001-01-20 03:16:31 +01:00
|
|
|
"documentation" => {
|
|
|
|
default => 1,
|
|
|
|
parent => "local",
|
|
|
|
description => "check for documentation inconsistances"
|
|
|
|
},
|
|
|
|
"documentation-pedantic" => {
|
|
|
|
default => 0,
|
|
|
|
parent => "documentation",
|
|
|
|
description => "be pendantic when checking for documentation inconsistances"
|
|
|
|
},
|
|
|
|
|
|
|
|
"documentation-arguments" => {
|
|
|
|
default => 1,
|
|
|
|
parent => "documentation",
|
|
|
|
description => "check for arguments documentation inconsistances\n"
|
|
|
|
},
|
|
|
|
"documentation-comment-indent" => {
|
|
|
|
default => 0,
|
|
|
|
parent => "documentation", description => "check for documentation comment indent inconsistances"
|
|
|
|
},
|
|
|
|
"documentation-comment-width" => {
|
|
|
|
default => 0,
|
|
|
|
parent => "documentation", description => "check for documentation comment width inconsistances"
|
|
|
|
},
|
|
|
|
"documentation-ordinal" => {
|
|
|
|
default => 0,
|
|
|
|
parent => "documentation",
|
|
|
|
description => "check for documentation ordinal inconsistances\n"
|
|
|
|
},
|
|
|
|
|
|
|
|
"prototype" => {default => 0, parent => ["local", "headers"], description => "prototype checking" },
|
2000-04-06 22:11:04 +02:00
|
|
|
"global" => { default => 1, description => "global checking" },
|
2000-05-24 01:37:51 +02:00
|
|
|
"declared" => { default => 1, parent => "global", description => "declared checking" },
|
2000-12-21 22:05:52 +01:00
|
|
|
"implemented" => { default => 0, parent => "local", description => "implemented checking" },
|
1999-10-24 23:45:39 +02:00
|
|
|
"implemented-win32" => { default => 0, parent => "implemented", description => "implemented as win32 checking" },
|
2000-04-06 22:11:04 +02:00
|
|
|
"include" => { default => 1, parent => "global", description => "include checking" },
|
|
|
|
"headers" => { default => 0, parent => "global", description => "headers checking" },
|
2000-05-24 01:37:51 +02:00
|
|
|
"headers-duplicated" => { default => 0, parent => "headers", description => "duplicated function declarations checking" },
|
|
|
|
"headers-misplaced" => { default => 0, parent => "headers", description => "misplaced function declarations checking" },
|
2000-04-06 22:11:04 +02:00
|
|
|
"stubs" => { default => 0, parent => "global", description => "stubs checking" }
|
1999-09-23 17:14:20 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
my %short_options = (
|
|
|
|
"d" => "debug",
|
|
|
|
"?" => "help",
|
|
|
|
"v" => "verbose"
|
|
|
|
);
|
|
|
|
|
|
|
|
sub new {
|
|
|
|
my $proto = shift;
|
|
|
|
my $class = ref($proto) || $proto;
|
|
|
|
my $self = {};
|
|
|
|
bless ($self, $class);
|
|
|
|
|
2000-04-29 16:24:11 +02:00
|
|
|
my $output = \${$self->{OUTPUT}};
|
|
|
|
|
|
|
|
$$output = shift;
|
1999-09-23 17:14:20 +02:00
|
|
|
my $refarguments = shift;
|
2000-04-06 22:11:04 +02:00
|
|
|
my $wine_dir = shift;
|
1999-09-23 17:14:20 +02:00
|
|
|
|
2000-04-15 22:39:55 +02:00
|
|
|
$self->options_set("default");
|
1999-09-23 17:14:20 +02:00
|
|
|
|
2000-04-06 22:11:04 +02:00
|
|
|
my $c_files = \@{$self->{C_FILES}};
|
|
|
|
my $h_files = \@{$self->{H_FILES}};
|
1999-09-23 17:14:20 +02:00
|
|
|
my $module = \${$self->{MODULE}};
|
|
|
|
my $global = \${$self->{GLOBAL}};
|
|
|
|
|
2000-05-24 01:37:51 +02:00
|
|
|
my @files;
|
|
|
|
|
2000-04-29 16:24:11 +02:00
|
|
|
if($wine_dir eq ".") {
|
|
|
|
$$global = 1;
|
|
|
|
} else {
|
|
|
|
$$global = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
while(defined($_ = shift @$refarguments)) {
|
2000-04-15 22:39:55 +02:00
|
|
|
if(/^--(all|none)$/) {
|
|
|
|
$self->options_set("$1");
|
|
|
|
next;
|
|
|
|
} elsif(/^-([^=]*)(=(.*))?$/) {
|
1999-09-23 17:14:20 +02:00
|
|
|
my $name;
|
|
|
|
my $value;
|
|
|
|
if(defined($2)) {
|
|
|
|
$name = $1;
|
|
|
|
$value = $3;
|
|
|
|
} else {
|
|
|
|
$name = $1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if($name =~ /^([^-].*)$/) {
|
|
|
|
$name = $short_options{$1};
|
|
|
|
} else {
|
|
|
|
$name =~ s/^-(.*)$/$1/;
|
|
|
|
}
|
|
|
|
|
|
|
|
my $prefix;
|
2000-04-15 22:39:55 +02:00
|
|
|
if(defined($name) && $name =~ /^no-(.*)$/) {
|
1999-09-23 17:14:20 +02:00
|
|
|
$name = $1;
|
|
|
|
$prefix = "no";
|
|
|
|
if(defined($value)) {
|
2000-04-29 16:24:11 +02:00
|
|
|
$$output->write("options with prefix 'no' can't take parameters\n");
|
|
|
|
|
|
|
|
return undef;
|
1999-09-23 17:14:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-04-15 22:39:55 +02:00
|
|
|
my $option;
|
|
|
|
if(defined($name)) {
|
|
|
|
$option = $options{$name};
|
|
|
|
}
|
|
|
|
|
1999-09-23 17:14:20 +02:00
|
|
|
if(defined($option)) {
|
|
|
|
my $key = $$option{key};
|
|
|
|
my $parser = $$option{parser};
|
|
|
|
my $refvalue = \${$self->{$key}};
|
2000-05-24 01:37:51 +02:00
|
|
|
my @parents = ();
|
|
|
|
|
|
|
|
if(defined($$option{parent})) {
|
|
|
|
if(ref($$option{parent}) eq "ARRAY") {
|
|
|
|
@parents = @{$$option{parent}};
|
|
|
|
} else {
|
|
|
|
@parents = $$option{parent};
|
|
|
|
}
|
|
|
|
}
|
2000-04-15 22:39:55 +02:00
|
|
|
|
1999-09-23 17:14:20 +02:00
|
|
|
if(defined($parser)) {
|
|
|
|
$$refvalue = &$parser($prefix,$value);
|
|
|
|
} else {
|
|
|
|
if(defined($value)) {
|
|
|
|
$$refvalue = $value;
|
|
|
|
} elsif(!defined($prefix)) {
|
|
|
|
$$refvalue = 1;
|
|
|
|
} else {
|
|
|
|
$$refvalue = 0;
|
|
|
|
}
|
|
|
|
}
|
2000-04-15 22:39:55 +02:00
|
|
|
|
|
|
|
if((ref($$refvalue) eq "HASH" && $$refvalue->{active}) || $$refvalue) {
|
2000-05-24 01:37:51 +02:00
|
|
|
while($#parents >= 0) {
|
|
|
|
my @old_parents = @parents;
|
|
|
|
@parents = ();
|
|
|
|
foreach my $parent (@old_parents) {
|
|
|
|
my $parentkey = $options{$parent}{key};
|
|
|
|
my $refparentvalue = \${$self->{$parentkey}};
|
|
|
|
|
|
|
|
$$refparentvalue = 1;
|
|
|
|
|
|
|
|
if(defined($options{$parent}{parent})) {
|
|
|
|
if(ref($options{$parent}{parent}) eq "ARRAY") {
|
|
|
|
push @parents, @{$options{$parent}{parent}};
|
|
|
|
} else {
|
|
|
|
push @parents, $options{$parent}{parent};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2000-04-15 22:39:55 +02:00
|
|
|
}
|
|
|
|
}
|
1999-09-23 17:14:20 +02:00
|
|
|
next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(/^--module-dlls$/) {
|
2000-04-15 22:39:55 +02:00
|
|
|
my @dirs = `cd dlls && find . -type d ! -name CVS`;
|
1999-09-23 17:14:20 +02:00
|
|
|
my %names;
|
|
|
|
for my $dir (@dirs) {
|
|
|
|
chomp $dir;
|
|
|
|
$dir =~ s/^\.\/(.*)$/$1/;
|
|
|
|
next if $dir eq "";
|
|
|
|
$names{$dir} = 1;
|
|
|
|
}
|
|
|
|
$$module = { active => 1, filter => 1, hash => \%names };
|
|
|
|
}
|
|
|
|
elsif(/^-(.*)$/) {
|
2000-04-29 16:24:11 +02:00
|
|
|
$$output->write("unknown option: $_\n");
|
|
|
|
|
|
|
|
return undef;
|
1999-09-23 17:14:20 +02:00
|
|
|
} else {
|
2000-04-29 16:24:11 +02:00
|
|
|
if(!-e $_) {
|
|
|
|
$$output->write("$_: no such file or directory\n");
|
|
|
|
|
|
|
|
return undef;
|
|
|
|
}
|
|
|
|
|
2000-05-24 01:37:51 +02:00
|
|
|
push @files, $_;
|
1999-09-23 17:14:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-05-18 02:07:31 +02:00
|
|
|
if($self->help) {
|
|
|
|
return $self;
|
|
|
|
}
|
|
|
|
|
2000-05-24 01:37:51 +02:00
|
|
|
my @paths = ();
|
|
|
|
my @c_files = ();
|
|
|
|
my @h_files = ();
|
|
|
|
foreach my $file (@files) {
|
|
|
|
if($file =~ /\.c$/) {
|
|
|
|
push @c_files, $file;
|
|
|
|
} elsif($file =~ /\.h$/) {
|
|
|
|
push @h_files, $file;
|
|
|
|
} else {
|
|
|
|
push @paths, $file;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if($#c_files == -1 && $#h_files == -1 &&
|
|
|
|
($#paths == -1 || ($#paths == 0 && $paths[0] eq $wine_dir)))
|
|
|
|
{
|
|
|
|
@paths = ".";
|
|
|
|
push @h_files, "$wine_dir/include";
|
1999-09-23 17:14:20 +02:00
|
|
|
} else {
|
2000-04-15 22:39:55 +02:00
|
|
|
$$global = 0;
|
1999-09-23 17:14:20 +02:00
|
|
|
}
|
1999-09-29 12:22:00 +02:00
|
|
|
|
2000-05-24 01:37:51 +02:00
|
|
|
if($#paths != -1 || $#c_files != -1) {
|
|
|
|
my $c_command = "find " . join(" ", @paths, @c_files) . " -name \\*.c";
|
|
|
|
my %found;
|
|
|
|
@$c_files = sort(map {
|
|
|
|
s/^\.\/(.*)$/$1/;
|
|
|
|
if(defined($found{$_}) || /glue\.c|spec\.c$/) {
|
|
|
|
();
|
|
|
|
} else {
|
|
|
|
$found{$_}++;
|
|
|
|
$_;
|
|
|
|
}
|
|
|
|
} split(/\n/, `$c_command`));
|
|
|
|
}
|
2000-04-06 22:11:04 +02:00
|
|
|
|
2000-05-24 01:37:51 +02:00
|
|
|
if($#h_files != -1) {
|
|
|
|
my $h_command = "find " . join(" ", @h_files) . " -name \\*.h";
|
|
|
|
my %found;
|
1999-09-29 12:22:00 +02:00
|
|
|
|
2000-05-24 01:37:51 +02:00
|
|
|
@$h_files = sort(map {
|
|
|
|
s/^\.\/(.*)$/$1/;
|
|
|
|
if(defined($found{$_})) {
|
|
|
|
();
|
|
|
|
} else {
|
|
|
|
$found{$_}++;
|
|
|
|
$_;
|
|
|
|
}
|
|
|
|
} split(/\n/, `$h_command`));
|
|
|
|
}
|
1999-09-23 17:14:20 +02:00
|
|
|
return $self;
|
|
|
|
}
|
|
|
|
|
2000-12-02 00:51:33 +01:00
|
|
|
sub DESTROY {
|
|
|
|
}
|
|
|
|
|
2000-04-15 22:39:55 +02:00
|
|
|
sub options_set {
|
|
|
|
my $self = shift;
|
|
|
|
|
|
|
|
local $_ = shift;
|
|
|
|
for my $name (sort(keys(%options))) {
|
|
|
|
my $option = $options{$name};
|
|
|
|
my $key = uc($name);
|
|
|
|
$key =~ tr/-/_/;
|
|
|
|
$$option{key} = $key;
|
|
|
|
my $refvalue = \${$self->{$key}};
|
|
|
|
|
|
|
|
if(/^default$/) {
|
|
|
|
$$refvalue = $$option{default};
|
|
|
|
} elsif(/^all$/) {
|
|
|
|
if($name !~ /^help|debug|verbose|module$/) {
|
|
|
|
if(ref($$refvalue) ne "HASH") {
|
|
|
|
$$refvalue = 1;
|
|
|
|
} else {
|
|
|
|
$$refvalue = { active => 1, filter => 0, hash => {} };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} elsif(/^none$/) {
|
|
|
|
if($name !~ /^help|debug|verbose|module$/) {
|
|
|
|
if(ref($$refvalue) ne "HASH") {
|
|
|
|
$$refvalue = 0;
|
|
|
|
} else {
|
|
|
|
$$refvalue = { active => 0, filter => 0, hash => {} };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1999-09-23 17:14:20 +02:00
|
|
|
sub show_help {
|
|
|
|
my $self = shift;
|
|
|
|
|
|
|
|
my $maxname = 0;
|
|
|
|
for my $name (sort(keys(%options))) {
|
|
|
|
if(length($name) > $maxname) {
|
|
|
|
$maxname = length($name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
print "usage: winapi-check [--help] [<files>]\n";
|
|
|
|
print "\n";
|
|
|
|
for my $name (sort(keys(%options))) {
|
|
|
|
my $option = $options{$name};
|
|
|
|
my $description = $$option{description};
|
|
|
|
my $default = $$option{default};
|
2000-04-15 22:39:55 +02:00
|
|
|
my $current = ${$self->{$$option{key}}};
|
|
|
|
|
|
|
|
my $value = $current;
|
1999-09-23 17:14:20 +02:00
|
|
|
|
|
|
|
my $output;
|
2000-04-15 22:39:55 +02:00
|
|
|
if(ref($value) ne "HASH") {
|
|
|
|
if($value) {
|
1999-09-23 17:14:20 +02:00
|
|
|
$output = "--no-$name";
|
|
|
|
} else {
|
|
|
|
$output = "--$name";
|
|
|
|
}
|
|
|
|
} else {
|
2000-04-15 22:39:55 +02:00
|
|
|
if($value->{active}) {
|
1999-09-23 17:14:20 +02:00
|
|
|
$output = "--[no-]$name\[=<value>]";
|
|
|
|
} else {
|
|
|
|
$output = "--$name\[=<value>]";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
print "$output";
|
2000-04-15 22:39:55 +02:00
|
|
|
for (0..(($maxname - length($name) + 17) - (length($output) - length($name) + 1))) { print " "; }
|
|
|
|
if(ref($value) ne "HASH") {
|
|
|
|
if($value) {
|
|
|
|
print "Disable ";
|
1999-09-23 17:14:20 +02:00
|
|
|
} else {
|
2000-04-15 22:39:55 +02:00
|
|
|
print "Enable ";
|
1999-09-23 17:14:20 +02:00
|
|
|
}
|
|
|
|
} else {
|
2000-04-15 22:39:55 +02:00
|
|
|
if($value->{active}) {
|
|
|
|
print "(Disable) ";
|
1999-09-23 17:14:20 +02:00
|
|
|
} else {
|
2000-04-15 22:39:55 +02:00
|
|
|
print "Enable ";
|
1999-09-23 17:14:20 +02:00
|
|
|
}
|
|
|
|
}
|
2000-04-15 22:39:55 +02:00
|
|
|
if($default == $current) {
|
|
|
|
print "$description (default)\n";
|
|
|
|
} else {
|
|
|
|
print "$description\n";
|
|
|
|
}
|
1999-09-23 17:14:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sub AUTOLOAD {
|
|
|
|
my $self = shift;
|
|
|
|
|
|
|
|
my $name = $winapi_options::AUTOLOAD;
|
|
|
|
$name =~ s/^.*::(.[^:]*)$/\U$1/;
|
|
|
|
|
|
|
|
my $refvalue = $self->{$name};
|
|
|
|
if(!defined($refvalue)) {
|
|
|
|
die "<internal>: winapi_options.pm: member $name does not exists\n";
|
|
|
|
}
|
2000-04-15 22:39:55 +02:00
|
|
|
|
|
|
|
if(ref($$refvalue) ne "HASH") {
|
|
|
|
return $$refvalue;
|
|
|
|
} else {
|
|
|
|
return $$refvalue->{active};
|
|
|
|
}
|
1999-09-23 17:14:20 +02:00
|
|
|
}
|
|
|
|
|
2000-04-06 22:11:04 +02:00
|
|
|
sub c_files { my $self = shift; return @{$self->{C_FILES}}; }
|
|
|
|
|
|
|
|
sub h_files { my $self = shift; return @{$self->{H_FILES}}; }
|
1999-09-23 17:14:20 +02:00
|
|
|
|
|
|
|
sub report_module {
|
|
|
|
my $self = shift;
|
2000-04-15 22:39:55 +02:00
|
|
|
my $refvalue = $self->{MODULE};
|
1999-09-23 17:14:20 +02:00
|
|
|
|
|
|
|
my $name = shift;
|
|
|
|
|
|
|
|
if(defined($name)) {
|
2000-04-15 22:39:55 +02:00
|
|
|
return $$refvalue->{active} && (!$$refvalue->{filter} || $$refvalue->{hash}->{$name});
|
1999-09-23 17:14:20 +02:00
|
|
|
} else {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sub report_argument_forbidden {
|
|
|
|
my $self = shift;
|
2000-04-15 22:39:55 +02:00
|
|
|
my $refargument_forbidden = $self->{ARGUMENT_FORBIDDEN};
|
1999-09-23 17:14:20 +02:00
|
|
|
|
|
|
|
my $type = shift;
|
|
|
|
|
2000-04-15 22:39:55 +02:00
|
|
|
return $$refargument_forbidden->{active} && (!$$refargument_forbidden->{filter} || $$refargument_forbidden->{hash}->{$type});
|
1999-09-23 17:14:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
sub report_argument_kind {
|
|
|
|
my $self = shift;
|
2000-04-15 22:39:55 +02:00
|
|
|
my $refargument_kind = $self->{ARGUMENT_KIND};
|
1999-09-23 17:14:20 +02:00
|
|
|
|
|
|
|
my $kind = shift;
|
|
|
|
|
2000-04-15 22:39:55 +02:00
|
|
|
return $$refargument_kind->{active} && (!$$refargument_kind->{filter} || $$refargument_kind->{hash}->{$kind});
|
1999-09-23 17:14:20 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|