Commit a8b09d11 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

Add function prototypes.

Change the way functions are called and either alter their declaration order or predeclare them so perl can check the prototypes.
parent 4cf122d2
...@@ -20,7 +20,7 @@ package c_function; ...@@ -20,7 +20,7 @@ package c_function;
use strict; use strict;
sub new { sub new($) {
my $proto = shift; my $proto = shift;
my $class = ref($proto) || $proto; my $class = ref($proto) || $proto;
my $self = {}; my $self = {};
...@@ -29,7 +29,7 @@ sub new { ...@@ -29,7 +29,7 @@ sub new {
return $self; return $self;
} }
sub file { sub file($$) {
my $self = shift; my $self = shift;
my $file = \${$self->{FILE}}; my $file = \${$self->{FILE}};
...@@ -40,7 +40,7 @@ sub file { ...@@ -40,7 +40,7 @@ sub file {
return $$file; return $$file;
} }
sub begin_line { sub begin_line($$) {
my $self = shift; my $self = shift;
my $begin_line = \${$self->{BEGIN_LINE}}; my $begin_line = \${$self->{BEGIN_LINE}};
...@@ -51,7 +51,7 @@ sub begin_line { ...@@ -51,7 +51,7 @@ sub begin_line {
return $$begin_line; return $$begin_line;
} }
sub begin_column { sub begin_column($$) {
my $self = shift; my $self = shift;
my $begin_column = \${$self->{BEGIN_COLUMN}}; my $begin_column = \${$self->{BEGIN_COLUMN}};
...@@ -62,7 +62,7 @@ sub begin_column { ...@@ -62,7 +62,7 @@ sub begin_column {
return $$begin_column; return $$begin_column;
} }
sub end_line { sub end_line($$) {
my $self = shift; my $self = shift;
my $end_line = \${$self->{END_LINE}}; my $end_line = \${$self->{END_LINE}};
...@@ -73,7 +73,7 @@ sub end_line { ...@@ -73,7 +73,7 @@ sub end_line {
return $$end_line; return $$end_line;
} }
sub end_column { sub end_column($$) {
my $self = shift; my $self = shift;
my $end_column = \${$self->{END_COLUMN}}; my $end_column = \${$self->{END_COLUMN}};
...@@ -84,7 +84,7 @@ sub end_column { ...@@ -84,7 +84,7 @@ sub end_column {
return $$end_column; return $$end_column;
} }
sub linkage { sub linkage($$) {
my $self = shift; my $self = shift;
my $linkage = \${$self->{LINKAGE}}; my $linkage = \${$self->{LINKAGE}};
...@@ -95,7 +95,7 @@ sub linkage { ...@@ -95,7 +95,7 @@ sub linkage {
return $$linkage; return $$linkage;
} }
sub return_type { sub return_type($$) {
my $self = shift; my $self = shift;
my $return_type = \${$self->{RETURN_TYPE}}; my $return_type = \${$self->{RETURN_TYPE}};
...@@ -106,7 +106,7 @@ sub return_type { ...@@ -106,7 +106,7 @@ sub return_type {
return $$return_type; return $$return_type;
} }
sub calling_convention { sub calling_convention($$) {
my $self = shift; my $self = shift;
my $calling_convention = \${$self->{CALLING_CONVENTION}}; my $calling_convention = \${$self->{CALLING_CONVENTION}};
...@@ -117,7 +117,7 @@ sub calling_convention { ...@@ -117,7 +117,7 @@ sub calling_convention {
return $$calling_convention; return $$calling_convention;
} }
sub name { sub name($$) {
my $self = shift; my $self = shift;
my $name = \${$self->{NAME}}; my $name = \${$self->{NAME}};
...@@ -128,7 +128,7 @@ sub name { ...@@ -128,7 +128,7 @@ sub name {
return $$name; return $$name;
} }
sub argument_types { sub argument_types($$) {
my $self = shift; my $self = shift;
my $argument_types = \${$self->{ARGUMENT_TYPES}}; my $argument_types = \${$self->{ARGUMENT_TYPES}};
...@@ -139,7 +139,7 @@ sub argument_types { ...@@ -139,7 +139,7 @@ sub argument_types {
return $$argument_types; return $$argument_types;
} }
sub argument_names { sub argument_names($$) {
my $self = shift; my $self = shift;
my $argument_names = \${$self->{ARGUMENT_NAMES}}; my $argument_names = \${$self->{ARGUMENT_NAMES}};
...@@ -150,7 +150,7 @@ sub argument_names { ...@@ -150,7 +150,7 @@ sub argument_names {
return $$argument_names; return $$argument_names;
} }
sub statements_line { sub statements_line($$) {
my $self = shift; my $self = shift;
my $statements_line = \${$self->{STATEMENTS_LINE}}; my $statements_line = \${$self->{STATEMENTS_LINE}};
...@@ -161,7 +161,7 @@ sub statements_line { ...@@ -161,7 +161,7 @@ sub statements_line {
return $$statements_line; return $$statements_line;
} }
sub statements_column { sub statements_column($$) {
my $self = shift; my $self = shift;
my $statements_column = \${$self->{STATEMENTS_COLUMN}}; my $statements_column = \${$self->{STATEMENTS_COLUMN}};
...@@ -172,7 +172,7 @@ sub statements_column { ...@@ -172,7 +172,7 @@ sub statements_column {
return $$statements_column; return $$statements_column;
} }
sub statements { sub statements($$) {
my $self = shift; my $self = shift;
my $statements = \${$self->{STATEMENTS}}; my $statements = \${$self->{STATEMENTS}};
......
...@@ -22,7 +22,9 @@ use strict; ...@@ -22,7 +22,9 @@ use strict;
use output qw($output); use output qw($output);
sub new { sub _refresh($);
sub new($) {
my $proto = shift; my $proto = shift;
my $class = ref($proto) || $proto; my $class = ref($proto) || $proto;
my $self = {}; my $self = {};
...@@ -34,7 +36,7 @@ sub new { ...@@ -34,7 +36,7 @@ sub new {
######################################################################## ########################################################################
# set_find_align_callback # set_find_align_callback
# #
sub set_find_align_callback { sub set_find_align_callback($$) {
my $self = shift; my $self = shift;
my $find_align = \${$self->{FIND_ALIGN}}; my $find_align = \${$self->{FIND_ALIGN}};
...@@ -45,7 +47,7 @@ sub set_find_align_callback { ...@@ -45,7 +47,7 @@ sub set_find_align_callback {
######################################################################## ########################################################################
# set_find_kind_callback # set_find_kind_callback
# #
sub set_find_kind_callback { sub set_find_kind_callback($$) {
my $self = shift; my $self = shift;
my $find_kind = \${$self->{FIND_KIND}}; my $find_kind = \${$self->{FIND_KIND}};
...@@ -56,7 +58,7 @@ sub set_find_kind_callback { ...@@ -56,7 +58,7 @@ sub set_find_kind_callback {
######################################################################## ########################################################################
# set_find_size_callback # set_find_size_callback
# #
sub set_find_size_callback { sub set_find_size_callback($$) {
my $self = shift; my $self = shift;
my $find_size = \${$self->{FIND_SIZE}}; my $find_size = \${$self->{FIND_SIZE}};
...@@ -67,7 +69,7 @@ sub set_find_size_callback { ...@@ -67,7 +69,7 @@ sub set_find_size_callback {
######################################################################## ########################################################################
# set_find_count_callback # set_find_count_callback
# #
sub set_find_count_callback { sub set_find_count_callback($$) {
my $self = shift; my $self = shift;
my $find_count = \${$self->{FIND_COUNT}}; my $find_count = \${$self->{FIND_COUNT}};
...@@ -75,7 +77,7 @@ sub set_find_count_callback { ...@@ -75,7 +77,7 @@ sub set_find_count_callback {
$$find_count = shift; $$find_count = shift;
} }
sub kind { sub kind($$) {
my $self = shift; my $self = shift;
my $kind = \${$self->{KIND}}; my $kind = \${$self->{KIND}};
my $dirty = \${$self->{DIRTY}}; my $dirty = \${$self->{DIRTY}};
...@@ -91,7 +93,7 @@ sub kind { ...@@ -91,7 +93,7 @@ sub kind {
return $$kind; return $$kind;
} }
sub _name { sub _name($$) {
my $self = shift; my $self = shift;
my $_name = \${$self->{_NAME}}; my $_name = \${$self->{_NAME}};
my $dirty = \${$self->{DIRTY}}; my $dirty = \${$self->{DIRTY}};
...@@ -103,7 +105,7 @@ sub _name { ...@@ -103,7 +105,7 @@ sub _name {
return $$_name; return $$_name;
} }
sub name { sub name($$) {
my $self = shift; my $self = shift;
my $name = \${$self->{NAME}}; my $name = \${$self->{NAME}};
my $dirty = \${$self->{DIRTY}}; my $dirty = \${$self->{DIRTY}};
...@@ -122,7 +124,7 @@ sub name { ...@@ -122,7 +124,7 @@ sub name {
} }
} }
sub pack { sub pack($$) {
my $self = shift; my $self = shift;
my $pack = \${$self->{PACK}}; my $pack = \${$self->{PACK}};
my $dirty = \${$self->{DIRTY}}; my $dirty = \${$self->{DIRTY}};
...@@ -134,7 +136,7 @@ sub pack { ...@@ -134,7 +136,7 @@ sub pack {
return $$pack; return $$pack;
} }
sub align { sub align($) {
my $self = shift; my $self = shift;
my $align = \${$self->{ALIGN}}; my $align = \${$self->{ALIGN}};
...@@ -144,7 +146,7 @@ sub align { ...@@ -144,7 +146,7 @@ sub align {
return $$align; return $$align;
} }
sub fields { sub fields($) {
my $self = shift; my $self = shift;
my $count = $self->field_count; my $count = $self->field_count;
...@@ -157,7 +159,7 @@ sub fields { ...@@ -157,7 +159,7 @@ sub fields {
return @fields; return @fields;
} }
sub field_base_sizes { sub field_base_sizes($) {
my $self = shift; my $self = shift;
my $field_base_sizes = \${$self->{FIELD_BASE_SIZES}}; my $field_base_sizes = \${$self->{FIELD_BASE_SIZES}};
...@@ -166,7 +168,7 @@ sub field_base_sizes { ...@@ -166,7 +168,7 @@ sub field_base_sizes {
return $$field_base_sizes; return $$field_base_sizes;
} }
sub field_aligns { sub field_aligns($) {
my $self = shift; my $self = shift;
my $field_aligns = \${$self->{FIELD_ALIGNS}}; my $field_aligns = \${$self->{FIELD_ALIGNS}};
...@@ -175,7 +177,7 @@ sub field_aligns { ...@@ -175,7 +177,7 @@ sub field_aligns {
return $$field_aligns; return $$field_aligns;
} }
sub field_count { sub field_count($) {
my $self = shift; my $self = shift;
my $field_type_names = \${$self->{FIELD_TYPE_NAMES}}; my $field_type_names = \${$self->{FIELD_TYPE_NAMES}};
...@@ -185,7 +187,7 @@ sub field_count { ...@@ -185,7 +187,7 @@ sub field_count {
return $count; return $count;
} }
sub field_names { sub field_names($$) {
my $self = shift; my $self = shift;
my $field_names = \${$self->{FIELD_NAMES}}; my $field_names = \${$self->{FIELD_NAMES}};
my $dirty = \${$self->{DIRTY}}; my $dirty = \${$self->{DIRTY}};
...@@ -197,7 +199,7 @@ sub field_names { ...@@ -197,7 +199,7 @@ sub field_names {
return $$field_names; return $$field_names;
} }
sub field_offsets { sub field_offsets($) {
my $self = shift; my $self = shift;
my $field_offsets = \${$self->{FIELD_OFFSETS}}; my $field_offsets = \${$self->{FIELD_OFFSETS}};
...@@ -206,7 +208,7 @@ sub field_offsets { ...@@ -206,7 +208,7 @@ sub field_offsets {
return $$field_offsets; return $$field_offsets;
} }
sub field_sizes { sub field_sizes($) {
my $self = shift; my $self = shift;
my $field_sizes = \${$self->{FIELD_SIZES}}; my $field_sizes = \${$self->{FIELD_SIZES}};
...@@ -215,7 +217,7 @@ sub field_sizes { ...@@ -215,7 +217,7 @@ sub field_sizes {
return $$field_sizes; return $$field_sizes;
} }
sub field_type_names { sub field_type_names($$) {
my $self = shift; my $self = shift;
my $field_type_names = \${$self->{FIELD_TYPE_NAMES}}; my $field_type_names = \${$self->{FIELD_TYPE_NAMES}};
my $dirty = \${$self->{DIRTY}}; my $dirty = \${$self->{DIRTY}};
...@@ -227,7 +229,7 @@ sub field_type_names { ...@@ -227,7 +229,7 @@ sub field_type_names {
return $$field_type_names; return $$field_type_names;
} }
sub size { sub size($) {
my $self = shift; my $self = shift;
my $size = \${$self->{SIZE}}; my $size = \${$self->{SIZE}};
...@@ -237,7 +239,7 @@ sub size { ...@@ -237,7 +239,7 @@ sub size {
return $$size; return $$size;
} }
sub _refresh { sub _refresh($) {
my $self = shift; my $self = shift;
my $dirty = \${$self->{DIRTY}}; my $dirty = \${$self->{DIRTY}};
...@@ -369,7 +371,7 @@ sub _refresh { ...@@ -369,7 +371,7 @@ sub _refresh {
package c_type_field; package c_type_field;
sub new { sub new($$$) {
my $proto = shift; my $proto = shift;
my $class = ref($proto) || $proto; my $class = ref($proto) || $proto;
my $self = {}; my $self = {};
...@@ -384,7 +386,7 @@ sub new { ...@@ -384,7 +386,7 @@ sub new {
return $self; return $self;
} }
sub align { sub align($) {
my $self = shift; my $self = shift;
my $type = \${$self->{TYPE}}; my $type = \${$self->{TYPE}};
my $number = \${$self->{NUMBER}}; my $number = \${$self->{NUMBER}};
...@@ -394,7 +396,7 @@ sub align { ...@@ -394,7 +396,7 @@ sub align {
return $$field_aligns[$$number]; return $$field_aligns[$$number];
} }
sub base_size { sub base_size($) {
my $self = shift; my $self = shift;
my $type = \${$self->{TYPE}}; my $type = \${$self->{TYPE}};
my $number = \${$self->{NUMBER}}; my $number = \${$self->{NUMBER}};
...@@ -404,7 +406,7 @@ sub base_size { ...@@ -404,7 +406,7 @@ sub base_size {
return $$field_base_sizes[$$number]; return $$field_base_sizes[$$number];
} }
sub name { sub name($) {
my $self = shift; my $self = shift;
my $type = \${$self->{TYPE}}; my $type = \${$self->{TYPE}};
my $number = \${$self->{NUMBER}}; my $number = \${$self->{NUMBER}};
...@@ -414,7 +416,7 @@ sub name { ...@@ -414,7 +416,7 @@ sub name {
return $$field_names[$$number]; return $$field_names[$$number];
} }
sub offset { sub offset($) {
my $self = shift; my $self = shift;
my $type = \${$self->{TYPE}}; my $type = \${$self->{TYPE}};
my $number = \${$self->{NUMBER}}; my $number = \${$self->{NUMBER}};
...@@ -424,7 +426,7 @@ sub offset { ...@@ -424,7 +426,7 @@ sub offset {
return $$field_offsets[$$number]; return $$field_offsets[$$number];
} }
sub size { sub size($) {
my $self = shift; my $self = shift;
my $type = \${$self->{TYPE}}; my $type = \${$self->{TYPE}};
my $number = \${$self->{NUMBER}}; my $number = \${$self->{NUMBER}};
...@@ -434,7 +436,7 @@ sub size { ...@@ -434,7 +436,7 @@ sub size {
return $$field_sizes[$$number]; return $$field_sizes[$$number];
} }
sub type_name { sub type_name($) {
my $self = shift; my $self = shift;
my $type = \${$self->{TYPE}}; my $type = \${$self->{TYPE}};
my $number = \${$self->{NUMBER}}; my $number = \${$self->{NUMBER}};
......
...@@ -27,14 +27,14 @@ require Exporter; ...@@ -27,14 +27,14 @@ require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT = qw(
&file_absolutize &file_normalize file_absolutize file_normalize
&file_directory file_directory
&file_type &files_filter file_type files_filter
&file_skip &files_skip file_skip files_skip
&get_c_files get_c_files
&get_h_files get_h_files
&get_makefile_in_files get_makefile_in_files
&get_spec_files get_spec_files
); );
@EXPORT_OK = qw( @EXPORT_OK = qw(
$current_dir $wine_dir $winapi_dir $winapi_check_dir $current_dir $wine_dir $winapi_dir $winapi_check_dir
...@@ -46,7 +46,39 @@ use output qw($output); ...@@ -46,7 +46,39 @@ use output qw($output);
use File::Find; use File::Find;
sub file_type { sub file_normalize($) {
local $_ = shift;
foreach my $dir (split(m%/%, $current_dir)) {
if(s%^(\.\./)*\.\./$dir/%%) {
if(defined($1)) {
$_ = "$1$_";
}
}
}
while(m%^(.*?)([^/\.]+)/\.\./(.*?)$%) {
if($2 ne "." && $2 ne "..") {
$_ = "$1$3";
}
}
return $_;
}
sub file_absolutize($) {
local $_ = shift;
$_ = file_normalize($_);
if(!s%^$wine_dir/%%) {
$_ = "$current_dir/$_";
}
s%^\./%%;
return $_;
}
sub file_type($) {
local $_ = shift; local $_ = shift;
$_ = file_absolutize($_); $_ = file_absolutize($_);
...@@ -59,7 +91,7 @@ sub file_type { ...@@ -59,7 +91,7 @@ sub file_type {
return "winelib"; return "winelib";
} }
sub files_filter { sub files_filter($@) {
my $type = shift; my $type = shift;
my @files; my @files;
...@@ -72,7 +104,7 @@ sub files_filter { ...@@ -72,7 +104,7 @@ sub files_filter {
return @files; return @files;
} }
sub file_skip { sub file_skip($) {
local $_ = shift; local $_ = shift;
$_ = file_absolutize($_); $_ = file_absolutize($_);
...@@ -87,7 +119,7 @@ sub file_skip { ...@@ -87,7 +119,7 @@ sub file_skip {
return 0; return 0;
} }
sub files_skip { sub files_skip(@) {
my @files; my @files;
foreach my $file (@_) { foreach my $file (@_) {
if(!file_skip($file)) { if(!file_skip($file)) {
...@@ -98,39 +130,7 @@ sub files_skip { ...@@ -98,39 +130,7 @@ sub files_skip {
return @files; return @files;
} }
sub file_absolutize { sub file_directory($) {
local $_ = shift;
$_ = file_normalize($_);
if(!s%^$wine_dir/%%) {
$_ = "$current_dir/$_";
}
s%^\./%%;
return $_;
}
sub file_normalize {
local $_ = shift;
foreach my $dir (split(m%/%, $current_dir)) {
if(s%^(\.\./)*\.\./$dir/%%) {
if(defined($1)) {
$_ = "$1$_";
}
}
}
while(m%^(.*?)([^/\.]+)/\.\./(.*?)$%) {
if($2 ne "." && $2 ne "..") {
$_ = "$1$3";
}
}
return $_;
}
sub file_directory {
local $_ = shift; local $_ = shift;
s%/?[^/]*$%%; s%/?[^/]*$%%;
...@@ -143,7 +143,7 @@ sub file_directory { ...@@ -143,7 +143,7 @@ sub file_directory {
return $_; return $_;
} }
sub _get_files { sub _get_files($$;$) {
my $pattern = shift; my $pattern = shift;
my $type = shift; my $type = shift;
my $dir = shift; my $dir = shift;
...@@ -178,9 +178,9 @@ sub _get_files { ...@@ -178,9 +178,9 @@ sub _get_files {
return @files; return @files;
} }
sub get_c_files { return _get_files('\.c$', @_); } sub get_c_files($;$) { return _get_files('\.c$', $_[0], $_[1]); }
sub get_h_files { return _get_files('\.h$', @_); } sub get_h_files($;$) { return _get_files('\.h$', $_[0], $_[1]); }
sub get_spec_files { return _get_files('\.spec$', @_); } sub get_spec_files($;$) { return _get_files('\.spec$', $_[0], $_[1]); }
sub get_makefile_in_files { return _get_files('^Makefile.in$', @_); } sub get_makefile_in_files($;$) { return _get_files('^Makefile.in$', $_[0], $_[1]); }
1; 1;
...@@ -20,7 +20,7 @@ package function; ...@@ -20,7 +20,7 @@ package function;
use strict; use strict;
sub new { sub new($) {
my $proto = shift; my $proto = shift;
my $class = ref($proto) || $proto; my $class = ref($proto) || $proto;
my $self = {}; my $self = {};
...@@ -29,7 +29,7 @@ sub new { ...@@ -29,7 +29,7 @@ sub new {
return $self; return $self;
} }
sub file { sub file($$) {
my $self = shift; my $self = shift;
my $file = \${$self->{FILE}}; my $file = \${$self->{FILE}};
...@@ -40,7 +40,7 @@ sub file { ...@@ -40,7 +40,7 @@ sub file {
return $$file; return $$file;
} }
sub debug_channels { sub debug_channels($$) {
my $self = shift; my $self = shift;
my $debug_channels = \${$self->{DEBUG_CHANNELS}}; my $debug_channels = \${$self->{DEBUG_CHANNELS}};
...@@ -51,7 +51,7 @@ sub debug_channels { ...@@ -51,7 +51,7 @@ sub debug_channels {
return $$debug_channels; return $$debug_channels;
} }
sub documentation_line { sub documentation_line($$) {
my $self = shift; my $self = shift;
my $documentation_line = \${$self->{DOCUMENTATION_LINE}}; my $documentation_line = \${$self->{DOCUMENTATION_LINE}};
...@@ -62,7 +62,7 @@ sub documentation_line { ...@@ -62,7 +62,7 @@ sub documentation_line {
return $$documentation_line; return $$documentation_line;
} }
sub documentation { sub documentation($$) {
my $self = shift; my $self = shift;
my $documentation = \${$self->{DOCUMENTATION}}; my $documentation = \${$self->{DOCUMENTATION}};
...@@ -73,7 +73,7 @@ sub documentation { ...@@ -73,7 +73,7 @@ sub documentation {
return $$documentation; return $$documentation;
} }
sub function_line { sub function_line($$) {
my $self = shift; my $self = shift;
my $function_line = \${$self->{FUNCTION_LINE}}; my $function_line = \${$self->{FUNCTION_LINE}};
...@@ -84,7 +84,7 @@ sub function_line { ...@@ -84,7 +84,7 @@ sub function_line {
return $$function_line; return $$function_line;
} }
sub linkage { sub linkage($$) {
my $self = shift; my $self = shift;
my $linkage = \${$self->{LINKAGE}}; my $linkage = \${$self->{LINKAGE}};
...@@ -95,7 +95,7 @@ sub linkage { ...@@ -95,7 +95,7 @@ sub linkage {
return $$linkage; return $$linkage;
} }
sub return_type { sub return_type($$) {
my $self = shift; my $self = shift;
my $return_type = \${$self->{RETURN_TYPE}}; my $return_type = \${$self->{RETURN_TYPE}};
...@@ -106,7 +106,7 @@ sub return_type { ...@@ -106,7 +106,7 @@ sub return_type {
return $$return_type; return $$return_type;
} }
sub calling_convention { sub calling_convention($$) {
my $self = shift; my $self = shift;
my $calling_convention = \${$self->{CALLING_CONVENTION}}; my $calling_convention = \${$self->{CALLING_CONVENTION}};
...@@ -117,7 +117,7 @@ sub calling_convention { ...@@ -117,7 +117,7 @@ sub calling_convention {
return $$calling_convention; return $$calling_convention;
} }
sub internal_name { sub internal_name($$) {
my $self = shift; my $self = shift;
my $internal_name = \${$self->{INTERNAL_NAME}}; my $internal_name = \${$self->{INTERNAL_NAME}};
...@@ -128,7 +128,7 @@ sub internal_name { ...@@ -128,7 +128,7 @@ sub internal_name {
return $$internal_name; return $$internal_name;
} }
sub argument_types { sub argument_types($$) {
my $self = shift; my $self = shift;
my $argument_types = \${$self->{ARGUMENT_TYPES}}; my $argument_types = \${$self->{ARGUMENT_TYPES}};
...@@ -139,7 +139,7 @@ sub argument_types { ...@@ -139,7 +139,7 @@ sub argument_types {
return $$argument_types; return $$argument_types;
} }
sub argument_names { sub argument_names($$) {
my $self = shift; my $self = shift;
my $argument_names = \${$self->{ARGUMENT_NAMES}}; my $argument_names = \${$self->{ARGUMENT_NAMES}};
...@@ -150,7 +150,7 @@ sub argument_names { ...@@ -150,7 +150,7 @@ sub argument_names {
return $$argument_names; return $$argument_names;
} }
sub argument_documentations { sub argument_documentations($$) {
my $self = shift; my $self = shift;
my $argument_documentations = \${$self->{ARGUMENT_DOCUMENTATIONS}}; my $argument_documentations = \${$self->{ARGUMENT_DOCUMENTATIONS}};
...@@ -161,7 +161,7 @@ sub argument_documentations { ...@@ -161,7 +161,7 @@ sub argument_documentations {
return $$argument_documentations; return $$argument_documentations;
} }
sub statements_line { sub statements_line($$) {
my $self = shift; my $self = shift;
my $statements_line = \${$self->{STATEMENTS_LINE}}; my $statements_line = \${$self->{STATEMENTS_LINE}};
...@@ -172,7 +172,7 @@ sub statements_line { ...@@ -172,7 +172,7 @@ sub statements_line {
return $$statements_line; return $$statements_line;
} }
sub statements { sub statements($$) {
my $self = shift; my $self = shift;
my $statements = \${$self->{STATEMENTS}}; my $statements = \${$self->{STATEMENTS}};
......
...@@ -25,7 +25,7 @@ BEGIN { ...@@ -25,7 +25,7 @@ BEGIN {
} }
use config qw( use config qw(
&file_absolutize &file_normalize file_absolutize file_normalize
$current_dir $wine_dir $current_dir $wine_dir
); );
use output qw($output); use output qw($output);
...@@ -49,20 +49,20 @@ open(IN, "($command) 2>&1 |"); ...@@ -49,20 +49,20 @@ open(IN, "($command) 2>&1 |");
while(<IN>) { while(<IN>) {
chomp; chomp;
if(!&make_parser::line($_)) { if(!make_parser::line($_)) {
next; next;
} }
if($message) { if($message) {
if($file && $line) { if($file && $line) {
if($directory && $directory ne "." && $file !~ m%^/%) { if($directory && $directory ne "." && $file !~ m%^/%) {
$output->write(&file_normalize("$directory/$file") . ":$line: $message\n"); $output->write(file_normalize("$directory/$file") . ":$line: $message\n");
} else { } else {
$output->write("$file:$line: $message\n"); $output->write("$file:$line: $message\n");
} }
} elsif($file) { } elsif($file) {
if($directory && $directory ne "." && $file !~ m%^/%) { if($directory && $directory ne "." && $file !~ m%^/%) {
$output->write(&file_normalize("$directory/$file") . ": $message\n"); $output->write(file_normalize("$directory/$file") . ": $message\n");
} else { } else {
$output->write("$file: $message\n"); $output->write("$file: $message\n");
} }
......
...@@ -11,7 +11,7 @@ BEGIN { ...@@ -11,7 +11,7 @@ BEGIN {
use setup qw($current_dir $wine_dir); use setup qw($current_dir $wine_dir);
use lib $setup::winapi_dir; use lib $setup::winapi_dir;
use config qw(&get_spec_files &get_makefile_in_files); use config qw(get_spec_files get_makefile_in_files);
use output qw($output); use output qw($output);
use util qw(replace_file); use util qw(replace_file);
......
...@@ -25,13 +25,13 @@ require Exporter; ...@@ -25,13 +25,13 @@ require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw(); @EXPORT = qw();
@EXPORT_OK = qw($options &parse_comma_list &parse_value); @EXPORT_OK = qw($options parse_comma_list parse_value);
use vars qw($options); use vars qw($options);
use output qw($output); use output qw($output);
sub parse_comma_list { sub parse_comma_list($$) {
my $prefix = shift; my $prefix = shift;
my $value = shift; my $value = shift;
...@@ -48,7 +48,7 @@ sub parse_comma_list { ...@@ -48,7 +48,7 @@ sub parse_comma_list {
} }
} }
sub parse_value { sub parse_value($$) {
my $prefix = shift; my $prefix = shift;
my $value = shift; my $value = shift;
...@@ -61,7 +61,9 @@ use strict; ...@@ -61,7 +61,9 @@ use strict;
use output qw($output); use output qw($output);
sub new { sub options_set($$);
sub new($$$$) {
my $proto = shift; my $proto = shift;
my $class = ref($proto) || $proto; my $class = ref($proto) || $proto;
my $self = {}; my $self = {};
...@@ -199,7 +201,7 @@ sub new { ...@@ -199,7 +201,7 @@ sub new {
sub DESTROY { sub DESTROY {
} }
sub parse_files { sub parse_files($) {
my $self = shift; my $self = shift;
my $arguments = \@{$self->{_ARGUMENTS}}; my $arguments = \@{$self->{_ARGUMENTS}};
...@@ -279,7 +281,7 @@ sub parse_files { ...@@ -279,7 +281,7 @@ sub parse_files {
@$directories = sort(keys(%dirs)); @$directories = sort(keys(%dirs));
} }
sub options_set { sub options_set($$) {
my $self = shift; my $self = shift;
my $options_long = \%{$self->{_OPTIONS_LONG}}; my $options_long = \%{$self->{_OPTIONS_LONG}};
...@@ -315,7 +317,7 @@ sub options_set { ...@@ -315,7 +317,7 @@ sub options_set {
} }
} }
sub show_help { sub show_help($) {
my $self = shift; my $self = shift;
my $options_long = \%{$self->{_OPTIONS_LONG}}; my $options_long = \%{$self->{_OPTIONS_LONG}};
...@@ -391,7 +393,7 @@ sub AUTOLOAD { ...@@ -391,7 +393,7 @@ sub AUTOLOAD {
} }
} }
sub arguments { sub arguments($) {
my $self = shift; my $self = shift;
my $arguments = \@{$self->{_ARGUMENTS}}; my $arguments = \@{$self->{_ARGUMENTS}};
...@@ -399,7 +401,7 @@ sub arguments { ...@@ -399,7 +401,7 @@ sub arguments {
return @$arguments; return @$arguments;
} }
sub c_files { sub c_files($) {
my $self = shift; my $self = shift;
my $c_files = \@{$self->{_C_FILES}}; my $c_files = \@{$self->{_C_FILES}};
...@@ -411,7 +413,7 @@ sub c_files { ...@@ -411,7 +413,7 @@ sub c_files {
return @$c_files; return @$c_files;
} }
sub h_files { sub h_files($) {
my $self = shift; my $self = shift;
my $h_files = \@{$self->{_H_FILES}}; my $h_files = \@{$self->{_H_FILES}};
...@@ -423,7 +425,7 @@ sub h_files { ...@@ -423,7 +425,7 @@ sub h_files {
return @$h_files; return @$h_files;
} }
sub directories { sub directories($) {
my $self = shift; my $self = shift;
my $directories = \@{$self->{_DIRECTORIES}}; my $directories = \@{$self->{_DIRECTORIES}};
......
...@@ -33,15 +33,17 @@ use config qw($current_dir $wine_dir $winapi_dir); ...@@ -33,15 +33,17 @@ use config qw($current_dir $wine_dir $winapi_dir);
use options qw($options); use options qw($options);
use output qw($output); use output qw($output);
sub import { sub import(@) {
$Exporter::ExportLevel++; $Exporter::ExportLevel++;
&Exporter::import(@_); Exporter::import(@_);
$Exporter::ExportLevel--; $Exporter::ExportLevel--;
$tests = 'tests'->new; $tests = 'tests'->new;
} }
sub new { sub parse_tests_file($);
sub new($) {
my $proto = shift; my $proto = shift;
my $class = ref($proto) || $proto; my $class = ref($proto) || $proto;
my $self = {}; my $self = {};
...@@ -52,7 +54,7 @@ sub new { ...@@ -52,7 +54,7 @@ sub new {
return $self; return $self;
} }
sub parse_tests_file { sub parse_tests_file($) {
my $self = shift; my $self = shift;
my $file = "tests.dat"; my $file = "tests.dat";
...@@ -90,7 +92,7 @@ sub parse_tests_file { ...@@ -90,7 +92,7 @@ sub parse_tests_file {
close(IN); close(IN);
} }
sub get_tests { sub get_tests($$) {
my $self = shift; my $self = shift;
my $tests = \%{$self->{TESTS}}; my $tests = \%{$self->{TESTS}};
...@@ -112,7 +114,7 @@ sub get_tests { ...@@ -112,7 +114,7 @@ sub get_tests {
return sort(keys(%tests)); return sort(keys(%tests));
} }
sub get_test_dirs { sub get_test_dirs($$) {
my $self = shift; my $self = shift;
my $tests = \%{$self->{TESTS}}; my $tests = \%{$self->{TESTS}};
...@@ -135,7 +137,7 @@ sub get_test_dirs { ...@@ -135,7 +137,7 @@ sub get_test_dirs {
return sort(keys(%test_dirs)); return sort(keys(%test_dirs));
} }
sub get_sections { sub get_sections($$$) {
my $self = shift; my $self = shift;
my $tests = \%{$self->{TESTS}}; my $tests = \%{$self->{TESTS}};
...@@ -175,7 +177,7 @@ sub get_sections { ...@@ -175,7 +177,7 @@ sub get_sections {
return sort(keys(%sections)); return sort(keys(%sections));
} }
sub get_section { sub get_section($$$$) {
my $self = shift; my $self = shift;
my $tests = \%{$self->{TESTS}}; my $tests = \%{$self->{TESTS}};
......
...@@ -20,7 +20,7 @@ package type; ...@@ -20,7 +20,7 @@ package type;
use strict; use strict;
sub new { sub new($) {
my $proto = shift; my $proto = shift;
my $class = ref($proto) || $proto; my $class = ref($proto) || $proto;
my $self = {}; my $self = {};
......
...@@ -25,8 +25,8 @@ require Exporter; ...@@ -25,8 +25,8 @@ require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw( @EXPORT = qw(
&append_file &edit_file &read_file &replace_file append_file edit_file read_file replace_file
&normalize_set &is_subset normalize_set is_subset
); );
@EXPORT_OK = qw(); @EXPORT_OK = qw();
%EXPORT_TAGS = (); %EXPORT_TAGS = ();
...@@ -34,7 +34,7 @@ require Exporter; ...@@ -34,7 +34,7 @@ require Exporter;
######################################################################## ########################################################################
# _compare_files # _compare_files
sub _compare_files { sub _compare_files($$) {
my $file1 = shift; my $file1 = shift;
my $file2 = shift; my $file2 = shift;
...@@ -54,7 +54,7 @@ sub _compare_files { ...@@ -54,7 +54,7 @@ sub _compare_files {
######################################################################## ########################################################################
# append_file # append_file
sub append_file { sub append_file($$@) {
my $filename = shift; my $filename = shift;
my $function = shift; my $function = shift;
...@@ -68,7 +68,7 @@ sub append_file { ...@@ -68,7 +68,7 @@ sub append_file {
######################################################################## ########################################################################
# edit_file # edit_file
sub edit_file { sub edit_file($$@) {
my $filename = shift; my $filename = shift;
my $function = shift; my $function = shift;
...@@ -93,7 +93,7 @@ sub edit_file { ...@@ -93,7 +93,7 @@ sub edit_file {
######################################################################## ########################################################################
# read_file # read_file
sub read_file { sub read_file($$@) {
my $filename = shift; my $filename = shift;
my $function = shift; my $function = shift;
...@@ -107,7 +107,7 @@ sub read_file { ...@@ -107,7 +107,7 @@ sub read_file {
######################################################################## ########################################################################
# replace_file # replace_file
sub replace_file { sub replace_file($$@) {
my $filename = shift; my $filename = shift;
my $function = shift; my $function = shift;
...@@ -130,7 +130,7 @@ sub replace_file { ...@@ -130,7 +130,7 @@ sub replace_file {
######################################################################## ########################################################################
# normalize_set # normalize_set
sub normalize_set { sub normalize_set($) {
local $_ = shift; local $_ = shift;
if(!defined($_)) { if(!defined($_)) {
...@@ -148,7 +148,7 @@ sub normalize_set { ...@@ -148,7 +148,7 @@ sub normalize_set {
######################################################################## ########################################################################
# is_subset # is_subset
sub is_subset { sub is_subset($$) {
my $subset = shift; my $subset = shift;
my $set = shift; my $set = shift;
......
...@@ -165,7 +165,7 @@ use base qw(_options); ...@@ -165,7 +165,7 @@ use base qw(_options);
use strict; use strict;
sub report_module { sub report_module($$) {
my $self = shift; my $self = shift;
my $refvalue = $self->{MODULE}; my $refvalue = $self->{MODULE};
...@@ -178,7 +178,7 @@ sub report_module { ...@@ -178,7 +178,7 @@ sub report_module {
} }
} }
sub report_argument_forbidden { sub report_argument_forbidden($$) {
my $self = shift; my $self = shift;
my $refargument_forbidden = $self->{ARGUMENT_FORBIDDEN}; my $refargument_forbidden = $self->{ARGUMENT_FORBIDDEN};
...@@ -187,7 +187,7 @@ sub report_argument_forbidden { ...@@ -187,7 +187,7 @@ sub report_argument_forbidden {
return $$refargument_forbidden->{active} && (!$$refargument_forbidden->{filter} || $$refargument_forbidden->{hash}->{$type}); return $$refargument_forbidden->{active} && (!$$refargument_forbidden->{filter} || $$refargument_forbidden->{hash}->{$type});
} }
sub report_argument_kind { sub report_argument_kind($$) {
my $self = shift; my $self = shift;
my $refargument_kind = $self->{ARGUMENT_KIND}; my $refargument_kind = $self->{ARGUMENT_KIND};
......
...@@ -40,7 +40,7 @@ if($options->progress) { ...@@ -40,7 +40,7 @@ if($options->progress) {
######################################################################## ########################################################################
# cleanup_file # cleanup_file
sub cleanup_file { sub cleanup_file($$$) {
local *IN = shift; local *IN = shift;
local *OUT = shift; local *OUT = shift;
...@@ -57,8 +57,8 @@ sub cleanup_file { ...@@ -57,8 +57,8 @@ sub cleanup_file {
local $_ = ""; local $_ = "";
if ($#comments == 0) { if ($#comments == 0) {
my $comment = $comments[0]; my $comment = $comments[0];
$_ = "$indent/*$comment */"; $_ = "$indent/*$comment */";
} elsif ($#comments > 0) { } elsif ($#comments > 0) {
$_ = "$indent/*\n"; $_ = "$indent/*\n";
foreach my $comment (@comments) { foreach my $comment (@comments) {
......
...@@ -25,7 +25,7 @@ BEGIN { ...@@ -25,7 +25,7 @@ BEGIN {
} }
use config qw( use config qw(
&file_type &files_skip &files_filter &get_spec_files file_type files_skip files_filter get_spec_files
$current_dir $wine_dir $winapi_dir $winapi_check_dir $current_dir $wine_dir $winapi_dir $winapi_check_dir
); );
use output qw($output); use output qw($output);
...@@ -99,7 +99,7 @@ if($options->spec_files || $options->winetest) { ...@@ -99,7 +99,7 @@ if($options->spec_files || $options->winetest) {
my %specifications; my %specifications;
sub documentation_specifications { sub documentation_specifications($) {
my $function = shift; my $function = shift;
my @debug_channels = @{$function->debug_channels}; my @debug_channels = @{$function->debug_channels};
...@@ -161,7 +161,7 @@ sub documentation_specifications { ...@@ -161,7 +161,7 @@ sub documentation_specifications {
my %module_pseudo_stub; my %module_pseudo_stub;
sub statements_pseudo_stub { sub statements_pseudo_stub($) {
my $function = shift; my $function = shift;
my $pseudo_stub = 0; my $pseudo_stub = 0;
...@@ -415,7 +415,7 @@ if($options->implemented && !$options->pseudo_implemented) { ...@@ -415,7 +415,7 @@ if($options->implemented && !$options->pseudo_implemented) {
} }
} }
sub output_function { sub output_function($$$$$) {
local *OUT = shift; local *OUT = shift;
my $type = shift; my $type = shift;
my $ordinal = shift; my $ordinal = shift;
......
...@@ -25,10 +25,10 @@ BEGIN { ...@@ -25,10 +25,10 @@ BEGIN {
} }
use config qw( use config qw(
&file_type &files_filter file_type files_filter
&file_skip &files_skip file_skip files_skip
&file_normalize file_normalize
&get_spec_files get_spec_files
$current_dir $wine_dir $winapi_dir $winapi_check_dir $current_dir $wine_dir $winapi_dir $winapi_check_dir
); );
use output qw($output); use output qw($output);
...@@ -44,9 +44,9 @@ use winapi_c_parser; ...@@ -44,9 +44,9 @@ use winapi_c_parser;
use c_parser; use c_parser;
use type; use type;
use winapi_fixup_documentation qw(&fixup_documentation); use winapi_fixup_documentation qw(fixup_documentation);
use winapi_fixup_editor; use winapi_fixup_editor;
use winapi_fixup_statements qw(&fixup_statements); use winapi_fixup_statements qw(fixup_statements);
my @c_files = $options->c_files; my @c_files = $options->c_files;
@c_files = files_skip(@c_files); @c_files = files_skip(@c_files);
......
...@@ -25,7 +25,7 @@ require Exporter; ...@@ -25,7 +25,7 @@ require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw(); @EXPORT = qw();
@EXPORT_OK = qw(&fixup_documentation); @EXPORT_OK = qw(fixup_documentation);
use config qw($current_dir $wine_dir); use config qw($current_dir $wine_dir);
use modules qw($modules); use modules qw($modules);
...@@ -35,7 +35,7 @@ use winapi qw($win16api $win32api @winapis); ...@@ -35,7 +35,7 @@ use winapi qw($win16api $win32api @winapis);
my %documentation_line_used; my %documentation_line_used;
sub fixup_documentation { sub fixup_documentation($$) {
my $function = shift; my $function = shift;
my $editor = shift; my $editor = shift;
......
...@@ -26,7 +26,7 @@ use winapi qw($win16api $win32api @winapis); ...@@ -26,7 +26,7 @@ use winapi qw($win16api $win32api @winapis);
use util; use util;
sub new { sub new($$) {
my $proto = shift; my $proto = shift;
my $class = ref($proto) || $proto; my $class = ref($proto) || $proto;
my $self = {}; my $self = {};
...@@ -39,7 +39,7 @@ sub new { ...@@ -39,7 +39,7 @@ sub new {
return $self; return $self;
} }
sub add_trigger { sub add_trigger($$$) {
my $self = shift; my $self = shift;
my $triggers = \%{$self->{TRIGGERS}}; my $triggers = \%{$self->{TRIGGERS}};
...@@ -54,7 +54,7 @@ sub add_trigger { ...@@ -54,7 +54,7 @@ sub add_trigger {
push @{$$triggers{$line}}, $action; push @{$$triggers{$line}}, $action;
} }
sub replace { sub replace($$$$$$) {
my $self = shift; my $self = shift;
my $begin_line = shift; my $begin_line = shift;
...@@ -78,7 +78,7 @@ sub replace { ...@@ -78,7 +78,7 @@ sub replace {
}); });
} }
sub flush { sub flush($) {
my $self = shift; my $self = shift;
my $file = \${$self->{FILE}}; my $file = \${$self->{FILE}};
...@@ -189,7 +189,7 @@ my %delete_line; ...@@ -189,7 +189,7 @@ my %delete_line;
my %spec_file; my %spec_file;
sub flush_old { sub flush_old($) {
my $self = shift; my $self = shift;
my $file = ${$self->{FILE}}; my $file = ${$self->{FILE}};
...@@ -357,7 +357,7 @@ sub flush_old { ...@@ -357,7 +357,7 @@ sub flush_old {
%spec_file = (); %spec_file = ();
} }
sub delete_line { sub delete_line($$$) {
my $self = shift; my $self = shift;
my $line = shift; my $line = shift;
...@@ -366,7 +366,7 @@ sub delete_line { ...@@ -366,7 +366,7 @@ sub delete_line {
$delete_line{$line} = $pattern; $delete_line{$line} = $pattern;
} }
sub insert_line { sub insert_line($$$) {
my $self = shift; my $self = shift;
my $line = shift; my $line = shift;
...@@ -375,7 +375,7 @@ sub insert_line { ...@@ -375,7 +375,7 @@ sub insert_line {
$insert_line{$line} = $insert; $insert_line{$line} = $insert;
} }
sub substitute_line { sub substitute_line($$$$) {
my $self = shift; my $self = shift;
my $line = shift; my $line = shift;
...@@ -386,7 +386,7 @@ sub substitute_line { ...@@ -386,7 +386,7 @@ sub substitute_line {
$substitute_line{$line}{replace} = $replace; $substitute_line{$line}{replace} = $replace;
} }
sub replace_spec_file { sub replace_spec_file($$$$) {
my $self = shift; my $self = shift;
my $module = shift; my $module = shift;
......
...@@ -25,7 +25,7 @@ require Exporter; ...@@ -25,7 +25,7 @@ require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw(); @EXPORT = qw();
@EXPORT_OK = qw(&fixup_statements); @EXPORT_OK = qw(fixup_statements);
use config qw($wine_dir); use config qw($wine_dir);
use options qw($options); use options qw($options);
...@@ -33,15 +33,15 @@ use output qw($output); ...@@ -33,15 +33,15 @@ use output qw($output);
use c_parser; use c_parser;
use winapi_module_user qw( use winapi_module_user qw(
&get_message_result_kind get_message_result_kind
&get_message_wparam_kind get_message_wparam_kind
&get_message_lparam_kind get_message_lparam_kind
); );
######################################################################## ########################################################################
# fixup_function_call # fixup_function_call
sub fixup_function_call { sub fixup_function_call($$) {
my $name = shift; my $name = shift;
my @arguments = @{(shift)};; my @arguments = @{(shift)};;
...@@ -51,7 +51,7 @@ sub fixup_function_call { ...@@ -51,7 +51,7 @@ sub fixup_function_call {
######################################################################## ########################################################################
# _parse_makelong # _parse_makelong
sub _parse_makelong { sub _parse_makelong($) {
local $_ = shift; local $_ = shift;
my $low; my $low;
...@@ -88,7 +88,7 @@ sub _parse_makelong { ...@@ -88,7 +88,7 @@ sub _parse_makelong {
######################################################################## ########################################################################
# fixup_function_call_2_windowsx # fixup_function_call_2_windowsx
sub fixup_user_message_2_windowsx { sub fixup_user_message_2_windowsx($$) {
my $name = shift; my $name = shift;
(my $hwnd, my $msg, my $wparam, my $lparam) = @{(shift)}; (my $hwnd, my $msg, my $wparam, my $lparam) = @{(shift)};
...@@ -182,7 +182,7 @@ sub fixup_user_message_2_windowsx { ...@@ -182,7 +182,7 @@ sub fixup_user_message_2_windowsx {
######################################################################## ########################################################################
# _get_messages # _get_messages
sub _get_messages { sub _get_messages($) {
local $_ = shift; local $_ = shift;
if(/^(?:BM|CB|EM|LB|STM|WM)_\w+(.*?)$/) { if(/^(?:BM|CB|EM|LB|STM|WM)_\w+(.*?)$/) {
...@@ -206,7 +206,7 @@ sub _get_messages { ...@@ -206,7 +206,7 @@ sub _get_messages {
######################################################################## ########################################################################
# _fixup_user_message # _fixup_user_message
sub _fixup_user_message { sub _fixup_user_message($$) {
my $name = shift; my $name = shift;
(my $hwnd, my $msg, my $wparam, my $lparam) = @{(shift)}; (my $hwnd, my $msg, my $wparam, my $lparam) = @{(shift)};
...@@ -215,14 +215,14 @@ sub _fixup_user_message { ...@@ -215,14 +215,14 @@ sub _fixup_user_message {
my $wkind; my $wkind;
my $lkind; my $lkind;
foreach my $msg (_get_messages($msg)) { foreach my $msg (_get_messages($msg)) {
my $new_wkind = &get_message_wparam_kind($msg); my $new_wkind = get_message_wparam_kind($msg);
if(defined($wkind) && $new_wkind ne $wkind) { if(defined($wkind) && $new_wkind ne $wkind) {
$output->write("messsages used together do not have the same type\n"); $output->write("messsages used together do not have the same type\n");
} else { } else {
$wkind = $new_wkind; $wkind = $new_wkind;
} }
my $new_lkind = &get_message_lparam_kind($msg); my $new_lkind = get_message_lparam_kind($msg);
if(defined($lkind) && $new_lkind ne $lkind) { if(defined($lkind) && $new_lkind ne $lkind) {
$output->write("messsages used together do not have the same type\n"); $output->write("messsages used together do not have the same type\n");
} else { } else {
...@@ -274,7 +274,7 @@ sub _fixup_user_message { ...@@ -274,7 +274,7 @@ sub _fixup_user_message {
######################################################################## ########################################################################
# fixup_statements # fixup_statements
sub fixup_statements { sub fixup_statements($$) {
my $function = shift; my $function = shift;
my $editor = shift; my $editor = shift;
......
...@@ -26,13 +26,13 @@ require Exporter; ...@@ -26,13 +26,13 @@ require Exporter;
@ISA = qw(Exporter); @ISA = qw(Exporter);
@EXPORT = qw(); @EXPORT = qw();
@EXPORT_OK = qw( @EXPORT_OK = qw(
&is_user_function is_user_function
&get_message_result_type get_message_result_type
&get_message_result_kind get_message_result_kind
&get_message_wparam_type get_message_wparam_type
&get_message_wparam_kind get_message_wparam_kind
&get_message_lparam_type get_message_lparam_type
&get_message_lparam_kind get_message_lparam_kind
); );
use config qw($wine_dir); use config qw($wine_dir);
...@@ -48,7 +48,7 @@ my $message; ...@@ -48,7 +48,7 @@ my $message;
######################################################################## ########################################################################
# is_user_function # is_user_function
sub is_user_function { sub is_user_function($) {
my $name = shift; my $name = shift;
if($name =~ /^(?:DefWindowProc|SendMessage)[AW]?$/) { if($name =~ /^(?:DefWindowProc|SendMessage)[AW]?$/) {
} }
...@@ -558,7 +558,7 @@ $message = { ...@@ -558,7 +558,7 @@ $message = {
######################################################################## ########################################################################
# _get_kind # _get_kind
sub _get_kind { sub _get_kind($) {
local $_ = shift; local $_ = shift;
if(!$_) { if(!$_) {
...@@ -575,7 +575,7 @@ sub _get_kind { ...@@ -575,7 +575,7 @@ sub _get_kind {
######################################################################## ########################################################################
# get_message_result_type # get_message_result_type
sub get_message_result_type { sub get_message_result_type($) {
my $name = shift; my $name = shift;
return $$message{$name}{result}; return $$message{$name}{result};
} }
...@@ -583,14 +583,14 @@ sub get_message_result_type { ...@@ -583,14 +583,14 @@ sub get_message_result_type {
######################################################################## ########################################################################
# get_message_result_kind # get_message_result_kind
sub get_message_result_kind { sub get_message_result_kind(@) {
return _get_kind(get_message_result_type(@_)); return _get_kind(get_message_result_type(@_));
} }
######################################################################## ########################################################################
# get_message_wparam_type # get_message_wparam_type
sub get_message_wparam_type { sub get_message_wparam_type($) {
my $name = shift; my $name = shift;
return $$message{$name}{wparam}; return $$message{$name}{wparam};
} }
...@@ -598,14 +598,14 @@ sub get_message_wparam_type { ...@@ -598,14 +598,14 @@ sub get_message_wparam_type {
######################################################################## ########################################################################
# get_message_wparam_kind # get_message_wparam_kind
sub get_message_wparam_kind { sub get_message_wparam_kind(@) {
return _get_kind(get_message_wparam_type(@_)); return _get_kind(get_message_wparam_type(@_));
} }
######################################################################## ########################################################################
# get_message_lparam_type # get_message_lparam_type
sub get_message_lparam_type { sub get_message_lparam_type($) {
my $name = shift; my $name = shift;
return $$message{$name}{lparam}; return $$message{$name}{lparam};
} }
...@@ -613,14 +613,14 @@ sub get_message_lparam_type { ...@@ -613,14 +613,14 @@ sub get_message_lparam_type {
######################################################################## ########################################################################
# get_message_lparam_kind # get_message_lparam_kind
sub get_message_lparam_kind { sub get_message_lparam_kind(@) {
return _get_kind(get_message_lparam_type(@_)); return _get_kind(get_message_lparam_type(@_));
} }
######################################################################## ########################################################################
# _parse_file # _parse_file
sub _parse_file { sub _parse_file($$$) {
my $file = shift; my $file = shift;
my $found_preprocessor = shift; my $found_preprocessor = shift;
my $found_comment = shift; my $found_comment = shift;
...@@ -666,7 +666,7 @@ sub _parse_file { ...@@ -666,7 +666,7 @@ sub _parse_file {
######################################################################## ########################################################################
# _get_tuple_arguments # _get_tuple_arguments
sub _get_tuple_arguments { sub _get_tuple_arguments($) {
local $_ = shift; local $_ = shift;
my $parser = new c_parser; my $parser = new c_parser;
...@@ -688,7 +688,7 @@ sub _get_tuple_arguments { ...@@ -688,7 +688,7 @@ sub _get_tuple_arguments {
# _parse_windowsx_h # _parse_windowsx_h
sub _parse_windowsx_h { sub _parse_windowsx_h($$$) {
my $last_comment; my $last_comment;
my $found_preprocessor = sub { my $found_preprocessor = sub {
...@@ -867,7 +867,7 @@ sub _parse_windowsx_h { ...@@ -867,7 +867,7 @@ sub _parse_windowsx_h {
######################################################################## ########################################################################
# _parse_winuser_h # _parse_winuser_h
sub _parse_winuser_h { sub _parse_winuser_h($$$) {
my %not_found = (); my %not_found = ();
my $found_preprocessor = sub { my $found_preprocessor = sub {
......
...@@ -25,7 +25,7 @@ BEGIN { ...@@ -25,7 +25,7 @@ BEGIN {
} }
use config qw( use config qw(
&file_type &files_skip &files_filter file_type files_skip files_filter
$current_dir $wine_dir $winapi_dir $winapi_check_dir $current_dir $wine_dir $winapi_dir $winapi_check_dir
); );
use output qw($output); use output qw($output);
...@@ -172,7 +172,7 @@ my %align_kludge_reported = ("FILETIME" => 1, "LARGE_INTEGER" => 1); ...@@ -172,7 +172,7 @@ my %align_kludge_reported = ("FILETIME" => 1, "LARGE_INTEGER" => 1);
my %size_kludge_reported = ("FILETIME" => 1, "LARGE_INTEGER" => 1); my %size_kludge_reported = ("FILETIME" => 1, "LARGE_INTEGER" => 1);
my %size_parse_reported; my %size_parse_reported;
sub _find_align_kind_size { sub _find_align_kind_size($) {
my $type_name = shift; my $type_name = shift;
local $_ = $type_name; local $_ = $type_name;
...@@ -309,26 +309,26 @@ sub _find_align_kind_size { ...@@ -309,26 +309,26 @@ sub _find_align_kind_size {
return ($align, $kind, $size); return ($align, $kind, $size);
} }
sub find_align { sub find_align($) {
my $type_name = shift; my $type_name = shift;
(my $align, my $kind, my $size) = _find_align_kind_size($type_name); (my $align, my $kind, my $size) = _find_align_kind_size($type_name);
return $align; return $align;
} }
sub find_kind { sub find_kind($) {
my $type_name = shift; my $type_name = shift;
(my $align, my $kind, my $size) = _find_align_kind_size($type_name); (my $align, my $kind, my $size) = _find_align_kind_size($type_name);
return $kind; return $kind;
} }
sub find_size { sub find_size($) {
my $type_name = shift; my $type_name = shift;
(my $align, my $kind, my $size) = _find_align_kind_size($type_name); (my $align, my $kind, my $size) = _find_align_kind_size($type_name);
return $size; return $size;
} }
sub find_count { sub find_count($) {
my $count = shift; my $count = shift;
return $defines{$count}; return $defines{$count};
} }
...@@ -454,7 +454,7 @@ foreach my $file (@files) { ...@@ -454,7 +454,7 @@ foreach my $file (@files) {
######################################################################## ########################################################################
# output_header # output_header
sub output_header { sub output_header($$$) {
local *OUT = shift; local *OUT = shift;
my $test_dir = shift; my $test_dir = shift;
...@@ -595,7 +595,7 @@ sub output_header { ...@@ -595,7 +595,7 @@ sub output_header {
######################################################################## ########################################################################
# output_footer # output_footer
sub output_footer { sub output_footer($$$) {
local *OUT = shift; local *OUT = shift;
my $test_dir = shift; my $test_dir = shift;
...@@ -612,7 +612,7 @@ sub output_footer { ...@@ -612,7 +612,7 @@ sub output_footer {
######################################################################## ########################################################################
# output_test_pack_type # output_test_pack_type
sub output_test_pack_type { sub output_test_pack_type($$$$$$) {
local *OUT = shift; local *OUT = shift;
my $type_name2type = shift; my $type_name2type = shift;
...@@ -696,7 +696,8 @@ sub output_test_pack_type { ...@@ -696,7 +696,8 @@ sub output_test_pack_type {
} }
} }
sub output_test_pack_fields { sub output_test_pack_fields($$$$$$$);
sub output_test_pack_fields($$$$$$$) {
local *OUT = shift; local *OUT = shift;
my $type_name2type = shift; my $type_name2type = shift;
...@@ -745,7 +746,7 @@ sub output_test_pack_fields { ...@@ -745,7 +746,7 @@ sub output_test_pack_fields {
######################################################################## ########################################################################
# output_test_pack # output_test_pack
sub output_test_pack { sub output_test_pack($$$$) {
local *OUT = shift; local *OUT = shift;
my $test_dir = shift; my $test_dir = shift;
...@@ -812,7 +813,7 @@ sub output_test_pack { ...@@ -812,7 +813,7 @@ sub output_test_pack {
######################################################################## ########################################################################
# output_file # output_file
sub output_file { sub output_file($$$$) {
local *OUT = shift; local *OUT = shift;
my $test_dir = shift; my $test_dir = shift;
......
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