Commit 2e46eb04 authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

Minor fixes and reorganizations.

parent 21d90b50
......@@ -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,18 +58,20 @@ sub update_progress {
my $last_progress = \${$self->{LAST_PROGRESS}};
my $prefix = "";
for (1..length($$last_progress)) {
$prefix .= "";
}
my $suffix = "";
my $diff = length($$last_progress)-length($$progress);
if($diff > 0) {
for (1..$diff) {
$suffix .= " ";
if($$last_progress) {
for (1..length($$last_progress)) {
$prefix .= "";
}
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;
......@@ -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 = (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment