Minor fixes and reorganizations.
This commit is contained in:
parent
21d90b509f
commit
2e46eb04e4
|
@ -19,6 +19,10 @@ sub new {
|
|||
my $configure_in_file = shift;
|
||||
my $config_h_in_file = shift;
|
||||
|
||||
$api_file =~ s/^\.\///;
|
||||
$configure_in_file =~ s/^\.\///;
|
||||
$config_h_in_file =~ s/^\.\///;
|
||||
|
||||
$$output->progress("$api_file");
|
||||
|
||||
open(IN, "< $api_file");
|
||||
|
|
|
@ -10,9 +10,11 @@ sub new {
|
|||
|
||||
my $progress = \${$self->{PROGRESS}};
|
||||
my $last_progress = \${$self->{LAST_PROGRESS}};
|
||||
my $progress_count = \${$self->{PROGRESS_COUNT}};
|
||||
|
||||
$$progress = "";
|
||||
$$last_progress = "";
|
||||
$progress_count = 0;
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
@ -22,8 +24,11 @@ sub show_progress {
|
|||
my $self = shift;
|
||||
my $progress = \${$self->{PROGRESS}};
|
||||
my $last_progress = \${$self->{LAST_PROGRESS}};
|
||||
my $progress_count = \${$self->{PROGRESS_COUNT}};
|
||||
|
||||
if($$progress) {
|
||||
$$progress_count++;
|
||||
|
||||
if($$progress_count > 0 && $$progress) {
|
||||
print STDERR $$progress;
|
||||
$$last_progress = $$progress;
|
||||
}
|
||||
|
@ -33,6 +38,9 @@ sub hide_progress {
|
|||
my $self = shift;
|
||||
my $progress = \${$self->{PROGRESS}};
|
||||
my $last_progress = \${$self->{LAST_PROGRESS}};
|
||||
my $progress_count = \${$self->{PROGRESS_COUNT}};
|
||||
|
||||
$$progress_count--;
|
||||
|
||||
if($$last_progress) {
|
||||
my $message;
|
||||
|
@ -50,11 +58,12 @@ sub update_progress {
|
|||
my $last_progress = \${$self->{LAST_PROGRESS}};
|
||||
|
||||
my $prefix = "";
|
||||
my $suffix = "";
|
||||
if($$last_progress) {
|
||||
for (1..length($$last_progress)) {
|
||||
$prefix .= "";
|
||||
}
|
||||
|
||||
my $suffix = "";
|
||||
my $diff = length($$last_progress)-length($$progress);
|
||||
if($diff > 0) {
|
||||
for (1..$diff) {
|
||||
|
@ -64,6 +73,7 @@ sub update_progress {
|
|||
$suffix .= "";
|
||||
}
|
||||
}
|
||||
}
|
||||
print STDERR $prefix . $$progress . $suffix;
|
||||
$$last_progress = $$progress;
|
||||
}
|
||||
|
@ -79,10 +89,10 @@ sub progress {
|
|||
|
||||
sub write {
|
||||
my $self = shift;
|
||||
my $last_progress = \${$self->{LAST_PROGRESS}};
|
||||
|
||||
my $message = shift;
|
||||
|
||||
|
||||
$self->hide_progress;
|
||||
print STDERR $message;
|
||||
$self->show_progress;
|
||||
|
|
|
@ -465,6 +465,8 @@ LPPROCESS_HEAP_ENTRY *
|
|||
LPPROCESS_INFORMATION
|
||||
LPPROGRESS_ROUTINE
|
||||
LPRASCONNA
|
||||
LPRASDIALPARAMS
|
||||
LPRASENTRYNAME
|
||||
LPRASTERIZER_STATUS
|
||||
LPRECT
|
||||
LPRGNDATA
|
||||
|
@ -675,6 +677,7 @@ short *
|
|||
struct _TEB *
|
||||
struct ThunkDataCommon *
|
||||
struct find_t *
|
||||
struct netent *
|
||||
struct sockaddr *
|
||||
struct stat *
|
||||
struct timeval *
|
||||
|
|
|
@ -78,15 +78,34 @@ my %includes;
|
|||
} split(/\n/, `find . -name \\*.h`);
|
||||
|
||||
foreach my $file (@files) {
|
||||
my $file_dir = $file;
|
||||
if(!($file_dir =~ s/(.*?)\/[^\/]*$/$1/)) {
|
||||
$file_dir = ".";
|
||||
}
|
||||
|
||||
$includes{$file} = { name => $file };
|
||||
|
||||
open(IN, "< $file");
|
||||
while(<IN>) {
|
||||
if(/^\s*\#\s*include\s*\"(.*?)\"/) {
|
||||
$includes{$file}{includes}{"include/$1"}++;
|
||||
my $header = $1;
|
||||
if(-e "$file_dir/$header") {
|
||||
$includes{$file}{includes}{"$file_dir/$header"}++;
|
||||
} elsif(-e "include/$header") {
|
||||
$includes{$file}{includes}{"include/$header"}++;
|
||||
} else {
|
||||
$output->write("$file: #include \"$header\" is not a local include\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
close(IN);
|
||||
}
|
||||
|
||||
my @files2 = ("acconfig.h", "poppack.h", "pshpack1.h", "pshpack2.h", "pshpack4.h", "pshpack8.h");
|
||||
|
||||
foreach my $file2 (@files2) {
|
||||
$includes{"include/$file2"}{used}++;
|
||||
}
|
||||
}
|
||||
|
||||
my $progress_output;
|
||||
|
@ -245,7 +264,7 @@ foreach my $file ($options->files) {
|
|||
my $conditional = 0;
|
||||
my $found_include = sub {
|
||||
local $_ = shift;
|
||||
if(/^\"config.h\"/) {
|
||||
if(/^\"(config\.h|native\.h)\"/) {
|
||||
$config++;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -65,7 +65,7 @@ my %options = (
|
|||
"declared" => { default => 1, parent => "global", description => "declared checking" },
|
||||
"implemented" => { default => 1, parent => "global", description => "implemented checking" },
|
||||
"implemented-win32" => { default => 0, parent => "implemented", description => "implemented as win32 checking" },
|
||||
"include" => { default => 0, parent => "global", description => "include checking" }
|
||||
"include" => { default => 1, parent => "global", description => "include checking" }
|
||||
);
|
||||
|
||||
my %short_options = (
|
||||
|
|
Loading…
Reference in New Issue