Minor fixes and reorganizations.

This commit is contained in:
Patrik Stridvall 1999-11-07 23:35:03 +00:00 committed by Alexandre Julliard
parent 21d90b509f
commit 2e46eb04e4
5 changed files with 52 additions and 16 deletions

View File

@ -19,6 +19,10 @@ sub new {
my $configure_in_file = shift; my $configure_in_file = shift;
my $config_h_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"); $$output->progress("$api_file");
open(IN, "< $api_file"); open(IN, "< $api_file");

View File

@ -10,9 +10,11 @@ sub new {
my $progress = \${$self->{PROGRESS}}; my $progress = \${$self->{PROGRESS}};
my $last_progress = \${$self->{LAST_PROGRESS}}; my $last_progress = \${$self->{LAST_PROGRESS}};
my $progress_count = \${$self->{PROGRESS_COUNT}};
$$progress = ""; $$progress = "";
$$last_progress = ""; $$last_progress = "";
$progress_count = 0;
return $self; return $self;
} }
@ -22,8 +24,11 @@ sub show_progress {
my $self = shift; my $self = shift;
my $progress = \${$self->{PROGRESS}}; my $progress = \${$self->{PROGRESS}};
my $last_progress = \${$self->{LAST_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; print STDERR $$progress;
$$last_progress = $$progress; $$last_progress = $$progress;
} }
@ -33,6 +38,9 @@ sub hide_progress {
my $self = shift; my $self = shift;
my $progress = \${$self->{PROGRESS}}; my $progress = \${$self->{PROGRESS}};
my $last_progress = \${$self->{LAST_PROGRESS}}; my $last_progress = \${$self->{LAST_PROGRESS}};
my $progress_count = \${$self->{PROGRESS_COUNT}};
$$progress_count--;
if($$last_progress) { if($$last_progress) {
my $message; my $message;
@ -50,18 +58,20 @@ sub update_progress {
my $last_progress = \${$self->{LAST_PROGRESS}}; my $last_progress = \${$self->{LAST_PROGRESS}};
my $prefix = ""; my $prefix = "";
for (1..length($$last_progress)) {
$prefix .= "";
}
my $suffix = ""; my $suffix = "";
my $diff = length($$last_progress)-length($$progress); if($$last_progress) {
if($diff > 0) { for (1..length($$last_progress)) {
for (1..$diff) { $prefix .= "";
$suffix .= " ";
} }
for (1..$diff) {
$suffix .= ""; my $diff = length($$last_progress)-length($$progress);
if($diff > 0) {
for (1..$diff) {
$suffix .= " ";
}
for (1..$diff) {
$suffix .= "";
}
} }
} }
print STDERR $prefix . $$progress . $suffix; print STDERR $prefix . $$progress . $suffix;
@ -79,10 +89,10 @@ sub progress {
sub write { sub write {
my $self = shift; my $self = shift;
my $last_progress = \${$self->{LAST_PROGRESS}};
my $message = shift; my $message = shift;
$self->hide_progress; $self->hide_progress;
print STDERR $message; print STDERR $message;
$self->show_progress; $self->show_progress;

View File

@ -465,6 +465,8 @@ LPPROCESS_HEAP_ENTRY *
LPPROCESS_INFORMATION LPPROCESS_INFORMATION
LPPROGRESS_ROUTINE LPPROGRESS_ROUTINE
LPRASCONNA LPRASCONNA
LPRASDIALPARAMS
LPRASENTRYNAME
LPRASTERIZER_STATUS LPRASTERIZER_STATUS
LPRECT LPRECT
LPRGNDATA LPRGNDATA
@ -675,6 +677,7 @@ short *
struct _TEB * struct _TEB *
struct ThunkDataCommon * struct ThunkDataCommon *
struct find_t * struct find_t *
struct netent *
struct sockaddr * struct sockaddr *
struct stat * struct stat *
struct timeval * struct timeval *

View File

@ -78,15 +78,34 @@ my %includes;
} split(/\n/, `find . -name \\*.h`); } split(/\n/, `find . -name \\*.h`);
foreach my $file (@files) { foreach my $file (@files) {
my $file_dir = $file;
if(!($file_dir =~ s/(.*?)\/[^\/]*$/$1/)) {
$file_dir = ".";
}
$includes{$file} = { name => $file }; $includes{$file} = { name => $file };
open(IN, "< $file"); open(IN, "< $file");
while(<IN>) { while(<IN>) {
if(/^\s*\#\s*include\s*\"(.*?)\"/) { 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); 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; my $progress_output;
@ -245,7 +264,7 @@ foreach my $file ($options->files) {
my $conditional = 0; my $conditional = 0;
my $found_include = sub { my $found_include = sub {
local $_ = shift; local $_ = shift;
if(/^\"config.h\"/) { if(/^\"(config\.h|native\.h)\"/) {
$config++; $config++;
} }
}; };

View File

@ -65,7 +65,7 @@ my %options = (
"declared" => { default => 1, parent => "global", description => "declared checking" }, "declared" => { default => 1, parent => "global", description => "declared checking" },
"implemented" => { default => 1, parent => "global", description => "implemented checking" }, "implemented" => { default => 1, parent => "global", description => "implemented checking" },
"implemented-win32" => { default => 0, parent => "implemented", description => "implemented as win32 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 = ( my %short_options = (