Add function prototypes.
Change the way functions are called and either alter their declaration order or predeclare them so perl can check the prototypes.
This commit is contained in:
parent
4cf122d2aa
commit
a8b09d11ca
|
@ -20,7 +20,7 @@ package c_function;
|
|||
|
||||
use strict;
|
||||
|
||||
sub new {
|
||||
sub new($) {
|
||||
my $proto = shift;
|
||||
my $class = ref($proto) || $proto;
|
||||
my $self = {};
|
||||
|
@ -29,7 +29,7 @@ sub new {
|
|||
return $self;
|
||||
}
|
||||
|
||||
sub file {
|
||||
sub file($$) {
|
||||
my $self = shift;
|
||||
my $file = \${$self->{FILE}};
|
||||
|
||||
|
@ -40,7 +40,7 @@ sub file {
|
|||
return $$file;
|
||||
}
|
||||
|
||||
sub begin_line {
|
||||
sub begin_line($$) {
|
||||
my $self = shift;
|
||||
my $begin_line = \${$self->{BEGIN_LINE}};
|
||||
|
||||
|
@ -51,7 +51,7 @@ sub begin_line {
|
|||
return $$begin_line;
|
||||
}
|
||||
|
||||
sub begin_column {
|
||||
sub begin_column($$) {
|
||||
my $self = shift;
|
||||
my $begin_column = \${$self->{BEGIN_COLUMN}};
|
||||
|
||||
|
@ -62,7 +62,7 @@ sub begin_column {
|
|||
return $$begin_column;
|
||||
}
|
||||
|
||||
sub end_line {
|
||||
sub end_line($$) {
|
||||
my $self = shift;
|
||||
my $end_line = \${$self->{END_LINE}};
|
||||
|
||||
|
@ -73,7 +73,7 @@ sub end_line {
|
|||
return $$end_line;
|
||||
}
|
||||
|
||||
sub end_column {
|
||||
sub end_column($$) {
|
||||
my $self = shift;
|
||||
my $end_column = \${$self->{END_COLUMN}};
|
||||
|
||||
|
@ -84,7 +84,7 @@ sub end_column {
|
|||
return $$end_column;
|
||||
}
|
||||
|
||||
sub linkage {
|
||||
sub linkage($$) {
|
||||
my $self = shift;
|
||||
my $linkage = \${$self->{LINKAGE}};
|
||||
|
||||
|
@ -95,7 +95,7 @@ sub linkage {
|
|||
return $$linkage;
|
||||
}
|
||||
|
||||
sub return_type {
|
||||
sub return_type($$) {
|
||||
my $self = shift;
|
||||
my $return_type = \${$self->{RETURN_TYPE}};
|
||||
|
||||
|
@ -106,7 +106,7 @@ sub return_type {
|
|||
return $$return_type;
|
||||
}
|
||||
|
||||
sub calling_convention {
|
||||
sub calling_convention($$) {
|
||||
my $self = shift;
|
||||
my $calling_convention = \${$self->{CALLING_CONVENTION}};
|
||||
|
||||
|
@ -117,7 +117,7 @@ sub calling_convention {
|
|||
return $$calling_convention;
|
||||
}
|
||||
|
||||
sub name {
|
||||
sub name($$) {
|
||||
my $self = shift;
|
||||
my $name = \${$self->{NAME}};
|
||||
|
||||
|
@ -128,7 +128,7 @@ sub name {
|
|||
return $$name;
|
||||
}
|
||||
|
||||
sub argument_types {
|
||||
sub argument_types($$) {
|
||||
my $self = shift;
|
||||
my $argument_types = \${$self->{ARGUMENT_TYPES}};
|
||||
|
||||
|
@ -139,7 +139,7 @@ sub argument_types {
|
|||
return $$argument_types;
|
||||
}
|
||||
|
||||
sub argument_names {
|
||||
sub argument_names($$) {
|
||||
my $self = shift;
|
||||
my $argument_names = \${$self->{ARGUMENT_NAMES}};
|
||||
|
||||
|
@ -150,7 +150,7 @@ sub argument_names {
|
|||
return $$argument_names;
|
||||
}
|
||||
|
||||
sub statements_line {
|
||||
sub statements_line($$) {
|
||||
my $self = shift;
|
||||
my $statements_line = \${$self->{STATEMENTS_LINE}};
|
||||
|
||||
|
@ -161,7 +161,7 @@ sub statements_line {
|
|||
return $$statements_line;
|
||||
}
|
||||
|
||||
sub statements_column {
|
||||
sub statements_column($$) {
|
||||
my $self = shift;
|
||||
my $statements_column = \${$self->{STATEMENTS_COLUMN}};
|
||||
|
||||
|
@ -172,7 +172,7 @@ sub statements_column {
|
|||
return $$statements_column;
|
||||
}
|
||||
|
||||
sub statements {
|
||||
sub statements($$) {
|
||||
my $self = shift;
|
||||
my $statements = \${$self->{STATEMENTS}};
|
||||
|
||||
|
|
|
@ -41,10 +41,20 @@ my $CALL_CONVENTION="__cdecl|__stdcall|" .
|
|||
"WINE_UNUSED";
|
||||
|
||||
|
||||
sub parse_c_function($$$$$);
|
||||
sub parse_c_function_call($$$$$$$$);
|
||||
sub parse_c_preprocessor($$$$);
|
||||
sub parse_c_statements($$$$);
|
||||
sub parse_c_tuple($$$$$$$);
|
||||
sub parse_c_type($$$$$);
|
||||
sub parse_c_typedef($$$$);
|
||||
sub parse_c_variable($$$$$$$);
|
||||
|
||||
|
||||
########################################################################
|
||||
# new
|
||||
#
|
||||
sub new {
|
||||
sub new($$) {
|
||||
my $proto = shift;
|
||||
my $class = ref($proto) || $proto;
|
||||
my $self = {};
|
||||
|
@ -83,7 +93,7 @@ sub new {
|
|||
########################################################################
|
||||
# set_found_comment_callback
|
||||
#
|
||||
sub set_found_comment_callback {
|
||||
sub set_found_comment_callback($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $found_comment = \${$self->{FOUND_COMMENT}};
|
||||
|
@ -94,7 +104,7 @@ sub set_found_comment_callback {
|
|||
########################################################################
|
||||
# set_found_declaration_callback
|
||||
#
|
||||
sub set_found_declaration_callback {
|
||||
sub set_found_declaration_callback($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $found_declaration = \${$self->{FOUND_DECLARATION}};
|
||||
|
@ -105,7 +115,7 @@ sub set_found_declaration_callback {
|
|||
########################################################################
|
||||
# set_found_function_callback
|
||||
#
|
||||
sub set_found_function_callback {
|
||||
sub set_found_function_callback($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $found_function = \${$self->{FOUND_FUNCTION}};
|
||||
|
@ -116,7 +126,7 @@ sub set_found_function_callback {
|
|||
########################################################################
|
||||
# set_found_function_call_callback
|
||||
#
|
||||
sub set_found_function_call_callback {
|
||||
sub set_found_function_call_callback($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $found_function_call = \${$self->{FOUND_FUNCTION_CALL}};
|
||||
|
@ -127,7 +137,7 @@ sub set_found_function_call_callback {
|
|||
########################################################################
|
||||
# set_found_line_callback
|
||||
#
|
||||
sub set_found_line_callback {
|
||||
sub set_found_line_callback($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $found_line = \${$self->{FOUND_LINE}};
|
||||
|
@ -138,7 +148,7 @@ sub set_found_line_callback {
|
|||
########################################################################
|
||||
# set_found_preprocessor_callback
|
||||
#
|
||||
sub set_found_preprocessor_callback {
|
||||
sub set_found_preprocessor_callback($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $found_preprocessor = \${$self->{FOUND_PREPROCESSOR}};
|
||||
|
@ -149,7 +159,7 @@ sub set_found_preprocessor_callback {
|
|||
########################################################################
|
||||
# set_found_statement_callback
|
||||
#
|
||||
sub set_found_statement_callback {
|
||||
sub set_found_statement_callback($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $found_statement = \${$self->{FOUND_STATEMENT}};
|
||||
|
@ -160,7 +170,7 @@ sub set_found_statement_callback {
|
|||
########################################################################
|
||||
# set_found_type_callback
|
||||
#
|
||||
sub set_found_type_callback {
|
||||
sub set_found_type_callback($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $found_type = \${$self->{FOUND_TYPE}};
|
||||
|
@ -171,7 +181,7 @@ sub set_found_type_callback {
|
|||
########################################################################
|
||||
# set_found_variable_callback
|
||||
#
|
||||
sub set_found_variable_callback {
|
||||
sub set_found_variable_callback($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $found_variable = \${$self->{FOUND_VARIABLE}};
|
||||
|
@ -183,7 +193,7 @@ sub set_found_variable_callback {
|
|||
########################################################################
|
||||
# _format_c_type
|
||||
|
||||
sub _format_c_type {
|
||||
sub _format_c_type($$) {
|
||||
my $self = shift;
|
||||
|
||||
local $_ = shift;
|
||||
|
@ -207,73 +217,12 @@ sub _format_c_type {
|
|||
}
|
||||
|
||||
|
||||
########################################################################
|
||||
# _parse_c
|
||||
|
||||
sub _parse_c {
|
||||
my $self = shift;
|
||||
|
||||
my $pattern = shift;
|
||||
my $refcurrent = shift;
|
||||
my $refline = shift;
|
||||
my $refcolumn = shift;
|
||||
|
||||
my $refmatch = shift;
|
||||
|
||||
local $_ = $$refcurrent;
|
||||
my $line = $$refline;
|
||||
my $column = $$refcolumn;
|
||||
|
||||
my $match;
|
||||
if(s/^(?:$pattern)//s) {
|
||||
$self->_update_c_position($&, \$line, \$column);
|
||||
$match = $&;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$self->_parse_c_until_one_of("\\S", \$_, \$line, \$column);
|
||||
|
||||
$$refcurrent = $_;
|
||||
$$refline = $line;
|
||||
$$refcolumn = $column;
|
||||
|
||||
$$refmatch = $match;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# _parse_c_error
|
||||
|
||||
sub _parse_c_error {
|
||||
my $self = shift;
|
||||
|
||||
local $_ = shift;
|
||||
my $line = shift;
|
||||
my $column = shift;
|
||||
my $context = shift;
|
||||
my $message = shift;
|
||||
|
||||
$message = "parse error" if !$message;
|
||||
|
||||
# Why did I do this?
|
||||
if($output->prefix) {
|
||||
# $output->write("\n");
|
||||
$output->prefix("");
|
||||
}
|
||||
|
||||
$self->_parse_c_warning($_, $line, $column, $context, $message);
|
||||
|
||||
exit 1;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# _parse_c_warning
|
||||
#
|
||||
# FIXME: Use caller (See man perlfunc)
|
||||
|
||||
sub _parse_c_warning {
|
||||
sub _parse_c_warning($$$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
local $_ = shift;
|
||||
|
@ -306,10 +255,99 @@ sub _parse_c_warning {
|
|||
}
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# _parse_c_error
|
||||
|
||||
sub _parse_c_error($$$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
local $_ = shift;
|
||||
my $line = shift;
|
||||
my $column = shift;
|
||||
my $context = shift;
|
||||
my $message = shift;
|
||||
|
||||
$message = "parse error" if !$message;
|
||||
|
||||
# Why did I do this?
|
||||
if($output->prefix) {
|
||||
# $output->write("\n");
|
||||
$output->prefix("");
|
||||
}
|
||||
|
||||
$self->_parse_c_warning($_, $line, $column, $context, $message);
|
||||
|
||||
exit 1;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# _update_c_position
|
||||
|
||||
sub _update_c_position($$$$) {
|
||||
my $self = shift;
|
||||
|
||||
local $_ = shift;
|
||||
my $refline = shift;
|
||||
my $refcolumn = shift;
|
||||
|
||||
my $line = $$refline;
|
||||
my $column = $$refcolumn;
|
||||
|
||||
while($_) {
|
||||
if(s/^[^\n\t\'\"]*//s) {
|
||||
$column += length($&);
|
||||
}
|
||||
|
||||
if(s/^\'//) {
|
||||
$column++;
|
||||
while(/^./ && !s/^\'//) {
|
||||
s/^([^\'\\]*)//s;
|
||||
$column += length($1);
|
||||
if(s/^\\//) {
|
||||
$column++;
|
||||
if(s/^(.)//s) {
|
||||
$column += length($1);
|
||||
if($1 eq "0") {
|
||||
s/^(\d{0,3})//s;
|
||||
$column += length($1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$column++;
|
||||
} elsif(s/^\"//) {
|
||||
$column++;
|
||||
while(/^./ && !s/^\"//) {
|
||||
s/^([^\"\\]*)//s;
|
||||
$column += length($1);
|
||||
if(s/^\\//) {
|
||||
$column++;
|
||||
if(s/^(.)//s) {
|
||||
$column += length($1);
|
||||
if($1 eq "0") {
|
||||
s/^(\d{0,3})//s;
|
||||
$column += length($1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$column++;
|
||||
} elsif(s/^\n//) {
|
||||
$line++;
|
||||
$column = 0;
|
||||
} elsif(s/^\t//) {
|
||||
$column = $column + 8 - $column % 8;
|
||||
}
|
||||
}
|
||||
|
||||
$$refline = $line;
|
||||
$$refcolumn = $column;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# __parse_c_until_one_of
|
||||
|
||||
sub __parse_c_until_one_of {
|
||||
sub __parse_c_until_one_of($$$$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $characters = shift;
|
||||
|
@ -432,7 +470,7 @@ sub __parse_c_until_one_of {
|
|||
########################################################################
|
||||
# _parse_c_until_one_of
|
||||
|
||||
sub _parse_c_until_one_of {
|
||||
sub _parse_c_until_one_of($$$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $characters = shift;
|
||||
|
@ -447,7 +485,7 @@ sub _parse_c_until_one_of {
|
|||
########################################################################
|
||||
# _parse_c_on_same_level_until_one_of
|
||||
|
||||
sub _parse_c_on_same_level_until_one_of {
|
||||
sub _parse_c_on_same_level_until_one_of($$$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $characters = shift;
|
||||
|
@ -459,74 +497,10 @@ sub _parse_c_on_same_level_until_one_of {
|
|||
return $self->__parse_c_until_one_of($characters, 1, $refcurrent, $refline, $refcolumn, $match);
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# _update_c_position
|
||||
|
||||
sub _update_c_position {
|
||||
my $self = shift;
|
||||
|
||||
local $_ = shift;
|
||||
my $refline = shift;
|
||||
my $refcolumn = shift;
|
||||
|
||||
my $line = $$refline;
|
||||
my $column = $$refcolumn;
|
||||
|
||||
while($_) {
|
||||
if(s/^[^\n\t\'\"]*//s) {
|
||||
$column += length($&);
|
||||
}
|
||||
|
||||
if(s/^\'//) {
|
||||
$column++;
|
||||
while(/^./ && !s/^\'//) {
|
||||
s/^([^\'\\]*)//s;
|
||||
$column += length($1);
|
||||
if(s/^\\//) {
|
||||
$column++;
|
||||
if(s/^(.)//s) {
|
||||
$column += length($1);
|
||||
if($1 eq "0") {
|
||||
s/^(\d{0,3})//s;
|
||||
$column += length($1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$column++;
|
||||
} elsif(s/^\"//) {
|
||||
$column++;
|
||||
while(/^./ && !s/^\"//) {
|
||||
s/^([^\"\\]*)//s;
|
||||
$column += length($1);
|
||||
if(s/^\\//) {
|
||||
$column++;
|
||||
if(s/^(.)//s) {
|
||||
$column += length($1);
|
||||
if($1 eq "0") {
|
||||
s/^(\d{0,3})//s;
|
||||
$column += length($1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$column++;
|
||||
} elsif(s/^\n//) {
|
||||
$line++;
|
||||
$column = 0;
|
||||
} elsif(s/^\t//) {
|
||||
$column = $column + 8 - $column % 8;
|
||||
}
|
||||
}
|
||||
|
||||
$$refline = $line;
|
||||
$$refcolumn = $column;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# parse_c_block
|
||||
|
||||
sub parse_c_block {
|
||||
sub parse_c_block($$$$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $refcurrent = shift;
|
||||
|
@ -590,7 +564,7 @@ sub parse_c_block {
|
|||
########################################################################
|
||||
# parse_c_declaration
|
||||
|
||||
sub parse_c_declaration {
|
||||
sub parse_c_declaration($$$$$$$$$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $found_declaration = \${$self->{FOUND_DECLARATION}};
|
||||
|
@ -694,7 +668,7 @@ sub parse_c_declaration {
|
|||
########################################################################
|
||||
# parse_c_declarations
|
||||
|
||||
sub parse_c_declarations {
|
||||
sub parse_c_declarations($$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $refcurrent = shift;
|
||||
|
@ -704,10 +678,46 @@ sub parse_c_declarations {
|
|||
return 1;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# _parse_c
|
||||
|
||||
sub _parse_c($$$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $pattern = shift;
|
||||
my $refcurrent = shift;
|
||||
my $refline = shift;
|
||||
my $refcolumn = shift;
|
||||
|
||||
my $refmatch = shift;
|
||||
|
||||
local $_ = $$refcurrent;
|
||||
my $line = $$refline;
|
||||
my $column = $$refcolumn;
|
||||
|
||||
my $match;
|
||||
if(s/^(?:$pattern)//s) {
|
||||
$self->_update_c_position($&, \$line, \$column);
|
||||
$match = $&;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$self->_parse_c_until_one_of("\\S", \$_, \$line, \$column);
|
||||
|
||||
$$refcurrent = $_;
|
||||
$$refline = $line;
|
||||
$$refcolumn = $column;
|
||||
|
||||
$$refmatch = $match;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# parse_c_enum
|
||||
|
||||
sub parse_c_enum {
|
||||
sub parse_c_enum($$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $refcurrent = shift;
|
||||
|
@ -781,7 +791,7 @@ sub parse_c_enum {
|
|||
########################################################################
|
||||
# parse_c_expression
|
||||
|
||||
sub parse_c_expression {
|
||||
sub parse_c_expression($$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $refcurrent = shift;
|
||||
|
@ -837,7 +847,7 @@ sub parse_c_expression {
|
|||
########################################################################
|
||||
# parse_c_file
|
||||
|
||||
sub parse_c_file {
|
||||
sub parse_c_file($$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $found_comment = \${$self->{FOUND_COMMENT}};
|
||||
|
@ -1152,7 +1162,7 @@ sub parse_c_file {
|
|||
########################################################################
|
||||
# parse_c_function
|
||||
|
||||
sub parse_c_function {
|
||||
sub parse_c_function($$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $file = \${$self->{FILE}};
|
||||
|
@ -1304,7 +1314,7 @@ sub parse_c_function {
|
|||
########################################################################
|
||||
# parse_c_function_call
|
||||
|
||||
sub parse_c_function_call {
|
||||
sub parse_c_function_call($$$$$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $refcurrent = shift;
|
||||
|
@ -1352,7 +1362,7 @@ sub parse_c_function_call {
|
|||
########################################################################
|
||||
# parse_c_preprocessor
|
||||
|
||||
sub parse_c_preprocessor {
|
||||
sub parse_c_preprocessor($$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $found_preprocessor = \${$self->{FOUND_PREPROCESSOR}};
|
||||
|
@ -1402,7 +1412,7 @@ sub parse_c_preprocessor {
|
|||
########################################################################
|
||||
# parse_c_statement
|
||||
|
||||
sub parse_c_statement {
|
||||
sub parse_c_statement($$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $refcurrent = shift;
|
||||
|
@ -1486,7 +1496,7 @@ sub parse_c_statement {
|
|||
########################################################################
|
||||
# parse_c_statements
|
||||
|
||||
sub parse_c_statements {
|
||||
sub parse_c_statements($$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $refcurrent = shift;
|
||||
|
@ -1583,7 +1593,7 @@ sub parse_c_statements {
|
|||
########################################################################
|
||||
# parse_c_struct_union
|
||||
|
||||
sub parse_c_struct_union {
|
||||
sub parse_c_struct_union($$$$$$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $refcurrent = shift;
|
||||
|
@ -1681,7 +1691,7 @@ sub parse_c_struct_union {
|
|||
########################################################################
|
||||
# parse_c_tuple
|
||||
|
||||
sub parse_c_tuple {
|
||||
sub parse_c_tuple($$$$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $refcurrent = shift;
|
||||
|
@ -1757,7 +1767,7 @@ sub parse_c_tuple {
|
|||
########################################################################
|
||||
# parse_c_type
|
||||
|
||||
sub parse_c_type {
|
||||
sub parse_c_type($$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $refcurrent = shift;
|
||||
|
@ -1799,7 +1809,7 @@ sub parse_c_type {
|
|||
########################################################################
|
||||
# parse_c_typedef
|
||||
|
||||
sub parse_c_typedef {
|
||||
sub parse_c_typedef($$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $create_type = \${$self->{CREATE_TYPE}};
|
||||
|
@ -1920,7 +1930,7 @@ sub parse_c_typedef {
|
|||
########################################################################
|
||||
# parse_c_variable
|
||||
|
||||
sub parse_c_variable {
|
||||
sub parse_c_variable($$$$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $found_variable = \${$self->{FOUND_VARIABLE}};
|
||||
|
|
|
@ -22,7 +22,9 @@ use strict;
|
|||
|
||||
use output qw($output);
|
||||
|
||||
sub new {
|
||||
sub _refresh($);
|
||||
|
||||
sub new($) {
|
||||
my $proto = shift;
|
||||
my $class = ref($proto) || $proto;
|
||||
my $self = {};
|
||||
|
@ -34,7 +36,7 @@ sub new {
|
|||
########################################################################
|
||||
# set_find_align_callback
|
||||
#
|
||||
sub set_find_align_callback {
|
||||
sub set_find_align_callback($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $find_align = \${$self->{FIND_ALIGN}};
|
||||
|
@ -45,7 +47,7 @@ sub set_find_align_callback {
|
|||
########################################################################
|
||||
# set_find_kind_callback
|
||||
#
|
||||
sub set_find_kind_callback {
|
||||
sub set_find_kind_callback($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $find_kind = \${$self->{FIND_KIND}};
|
||||
|
@ -56,7 +58,7 @@ sub set_find_kind_callback {
|
|||
########################################################################
|
||||
# set_find_size_callback
|
||||
#
|
||||
sub set_find_size_callback {
|
||||
sub set_find_size_callback($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $find_size = \${$self->{FIND_SIZE}};
|
||||
|
@ -67,7 +69,7 @@ sub set_find_size_callback {
|
|||
########################################################################
|
||||
# set_find_count_callback
|
||||
#
|
||||
sub set_find_count_callback {
|
||||
sub set_find_count_callback($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $find_count = \${$self->{FIND_COUNT}};
|
||||
|
@ -75,7 +77,7 @@ sub set_find_count_callback {
|
|||
$$find_count = shift;
|
||||
}
|
||||
|
||||
sub kind {
|
||||
sub kind($$) {
|
||||
my $self = shift;
|
||||
my $kind = \${$self->{KIND}};
|
||||
my $dirty = \${$self->{DIRTY}};
|
||||
|
@ -91,7 +93,7 @@ sub kind {
|
|||
return $$kind;
|
||||
}
|
||||
|
||||
sub _name {
|
||||
sub _name($$) {
|
||||
my $self = shift;
|
||||
my $_name = \${$self->{_NAME}};
|
||||
my $dirty = \${$self->{DIRTY}};
|
||||
|
@ -103,7 +105,7 @@ sub _name {
|
|||
return $$_name;
|
||||
}
|
||||
|
||||
sub name {
|
||||
sub name($$) {
|
||||
my $self = shift;
|
||||
my $name = \${$self->{NAME}};
|
||||
my $dirty = \${$self->{DIRTY}};
|
||||
|
@ -122,7 +124,7 @@ sub name {
|
|||
}
|
||||
}
|
||||
|
||||
sub pack {
|
||||
sub pack($$) {
|
||||
my $self = shift;
|
||||
my $pack = \${$self->{PACK}};
|
||||
my $dirty = \${$self->{DIRTY}};
|
||||
|
@ -134,7 +136,7 @@ sub pack {
|
|||
return $$pack;
|
||||
}
|
||||
|
||||
sub align {
|
||||
sub align($) {
|
||||
my $self = shift;
|
||||
|
||||
my $align = \${$self->{ALIGN}};
|
||||
|
@ -144,7 +146,7 @@ sub align {
|
|||
return $$align;
|
||||
}
|
||||
|
||||
sub fields {
|
||||
sub fields($) {
|
||||
my $self = shift;
|
||||
|
||||
my $count = $self->field_count;
|
||||
|
@ -157,7 +159,7 @@ sub fields {
|
|||
return @fields;
|
||||
}
|
||||
|
||||
sub field_base_sizes {
|
||||
sub field_base_sizes($) {
|
||||
my $self = shift;
|
||||
my $field_base_sizes = \${$self->{FIELD_BASE_SIZES}};
|
||||
|
||||
|
@ -166,7 +168,7 @@ sub field_base_sizes {
|
|||
return $$field_base_sizes;
|
||||
}
|
||||
|
||||
sub field_aligns {
|
||||
sub field_aligns($) {
|
||||
my $self = shift;
|
||||
my $field_aligns = \${$self->{FIELD_ALIGNS}};
|
||||
|
||||
|
@ -175,7 +177,7 @@ sub field_aligns {
|
|||
return $$field_aligns;
|
||||
}
|
||||
|
||||
sub field_count {
|
||||
sub field_count($) {
|
||||
my $self = shift;
|
||||
my $field_type_names = \${$self->{FIELD_TYPE_NAMES}};
|
||||
|
||||
|
@ -185,7 +187,7 @@ sub field_count {
|
|||
return $count;
|
||||
}
|
||||
|
||||
sub field_names {
|
||||
sub field_names($$) {
|
||||
my $self = shift;
|
||||
my $field_names = \${$self->{FIELD_NAMES}};
|
||||
my $dirty = \${$self->{DIRTY}};
|
||||
|
@ -197,7 +199,7 @@ sub field_names {
|
|||
return $$field_names;
|
||||
}
|
||||
|
||||
sub field_offsets {
|
||||
sub field_offsets($) {
|
||||
my $self = shift;
|
||||
my $field_offsets = \${$self->{FIELD_OFFSETS}};
|
||||
|
||||
|
@ -206,7 +208,7 @@ sub field_offsets {
|
|||
return $$field_offsets;
|
||||
}
|
||||
|
||||
sub field_sizes {
|
||||
sub field_sizes($) {
|
||||
my $self = shift;
|
||||
my $field_sizes = \${$self->{FIELD_SIZES}};
|
||||
|
||||
|
@ -215,7 +217,7 @@ sub field_sizes {
|
|||
return $$field_sizes;
|
||||
}
|
||||
|
||||
sub field_type_names {
|
||||
sub field_type_names($$) {
|
||||
my $self = shift;
|
||||
my $field_type_names = \${$self->{FIELD_TYPE_NAMES}};
|
||||
my $dirty = \${$self->{DIRTY}};
|
||||
|
@ -227,7 +229,7 @@ sub field_type_names {
|
|||
return $$field_type_names;
|
||||
}
|
||||
|
||||
sub size {
|
||||
sub size($) {
|
||||
my $self = shift;
|
||||
|
||||
my $size = \${$self->{SIZE}};
|
||||
|
@ -237,7 +239,7 @@ sub size {
|
|||
return $$size;
|
||||
}
|
||||
|
||||
sub _refresh {
|
||||
sub _refresh($) {
|
||||
my $self = shift;
|
||||
|
||||
my $dirty = \${$self->{DIRTY}};
|
||||
|
@ -369,7 +371,7 @@ sub _refresh {
|
|||
|
||||
package c_type_field;
|
||||
|
||||
sub new {
|
||||
sub new($$$) {
|
||||
my $proto = shift;
|
||||
my $class = ref($proto) || $proto;
|
||||
my $self = {};
|
||||
|
@ -384,7 +386,7 @@ sub new {
|
|||
return $self;
|
||||
}
|
||||
|
||||
sub align {
|
||||
sub align($) {
|
||||
my $self = shift;
|
||||
my $type = \${$self->{TYPE}};
|
||||
my $number = \${$self->{NUMBER}};
|
||||
|
@ -394,7 +396,7 @@ sub align {
|
|||
return $$field_aligns[$$number];
|
||||
}
|
||||
|
||||
sub base_size {
|
||||
sub base_size($) {
|
||||
my $self = shift;
|
||||
my $type = \${$self->{TYPE}};
|
||||
my $number = \${$self->{NUMBER}};
|
||||
|
@ -404,7 +406,7 @@ sub base_size {
|
|||
return $$field_base_sizes[$$number];
|
||||
}
|
||||
|
||||
sub name {
|
||||
sub name($) {
|
||||
my $self = shift;
|
||||
my $type = \${$self->{TYPE}};
|
||||
my $number = \${$self->{NUMBER}};
|
||||
|
@ -414,7 +416,7 @@ sub name {
|
|||
return $$field_names[$$number];
|
||||
}
|
||||
|
||||
sub offset {
|
||||
sub offset($) {
|
||||
my $self = shift;
|
||||
my $type = \${$self->{TYPE}};
|
||||
my $number = \${$self->{NUMBER}};
|
||||
|
@ -424,7 +426,7 @@ sub offset {
|
|||
return $$field_offsets[$$number];
|
||||
}
|
||||
|
||||
sub size {
|
||||
sub size($) {
|
||||
my $self = shift;
|
||||
my $type = \${$self->{TYPE}};
|
||||
my $number = \${$self->{NUMBER}};
|
||||
|
@ -434,7 +436,7 @@ sub size {
|
|||
return $$field_sizes[$$number];
|
||||
}
|
||||
|
||||
sub type_name {
|
||||
sub type_name($) {
|
||||
my $self = shift;
|
||||
my $type = \${$self->{TYPE}};
|
||||
my $number = \${$self->{NUMBER}};
|
||||
|
|
|
@ -27,14 +27,14 @@ require Exporter;
|
|||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(
|
||||
&file_absolutize &file_normalize
|
||||
&file_directory
|
||||
&file_type &files_filter
|
||||
&file_skip &files_skip
|
||||
&get_c_files
|
||||
&get_h_files
|
||||
&get_makefile_in_files
|
||||
&get_spec_files
|
||||
file_absolutize file_normalize
|
||||
file_directory
|
||||
file_type files_filter
|
||||
file_skip files_skip
|
||||
get_c_files
|
||||
get_h_files
|
||||
get_makefile_in_files
|
||||
get_spec_files
|
||||
);
|
||||
@EXPORT_OK = qw(
|
||||
$current_dir $wine_dir $winapi_dir $winapi_check_dir
|
||||
|
@ -46,71 +46,7 @@ use output qw($output);
|
|||
|
||||
use File::Find;
|
||||
|
||||
sub file_type {
|
||||
local $_ = shift;
|
||||
|
||||
$_ = file_absolutize($_);
|
||||
|
||||
m%^(?:libtest|rc|server|tests|tools)/% && return "";
|
||||
m%^(?:programs|debugger|miscemu)/% && return "wineapp";
|
||||
m%^(?:libs)/% && return "library";
|
||||
m%^windows/x11drv/wineclipsrv\.c$% && return "application";
|
||||
|
||||
return "winelib";
|
||||
}
|
||||
|
||||
sub files_filter {
|
||||
my $type = shift;
|
||||
|
||||
my @files;
|
||||
foreach my $file (@_) {
|
||||
if(file_type($file) eq $type) {
|
||||
push @files, $file;
|
||||
}
|
||||
}
|
||||
|
||||
return @files;
|
||||
}
|
||||
|
||||
sub file_skip {
|
||||
local $_ = shift;
|
||||
|
||||
$_ = file_absolutize($_);
|
||||
|
||||
m%^(?:libtest|programs|rc|server|tests|tools)/% && return 1;
|
||||
m%^(?:debugger|miscemu|libs|server)/% && return 1;
|
||||
m%^dlls/wineps/data/% && return 1;
|
||||
m%^windows/x11drv/wineclipsrv\.c$% && return 1;
|
||||
m%^dlls/winmm/wineoss/midipatch\.c$% && return 1;
|
||||
m%(?:glue|spec)\.c$% && return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub files_skip {
|
||||
my @files;
|
||||
foreach my $file (@_) {
|
||||
if(!file_skip($file)) {
|
||||
push @files, $file;
|
||||
}
|
||||
}
|
||||
|
||||
return @files;
|
||||
}
|
||||
|
||||
sub file_absolutize {
|
||||
local $_ = shift;
|
||||
|
||||
$_ = file_normalize($_);
|
||||
if(!s%^$wine_dir/%%) {
|
||||
$_ = "$current_dir/$_";
|
||||
}
|
||||
s%^\./%%;
|
||||
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub file_normalize {
|
||||
sub file_normalize($) {
|
||||
local $_ = shift;
|
||||
|
||||
foreach my $dir (split(m%/%, $current_dir)) {
|
||||
|
@ -130,7 +66,71 @@ sub file_normalize {
|
|||
return $_;
|
||||
}
|
||||
|
||||
sub file_directory {
|
||||
sub file_absolutize($) {
|
||||
local $_ = shift;
|
||||
|
||||
$_ = file_normalize($_);
|
||||
if(!s%^$wine_dir/%%) {
|
||||
$_ = "$current_dir/$_";
|
||||
}
|
||||
s%^\./%%;
|
||||
|
||||
return $_;
|
||||
}
|
||||
|
||||
sub file_type($) {
|
||||
local $_ = shift;
|
||||
|
||||
$_ = file_absolutize($_);
|
||||
|
||||
m%^(?:libtest|rc|server|tests|tools)/% && return "";
|
||||
m%^(?:programs|debugger|miscemu)/% && return "wineapp";
|
||||
m%^(?:libs)/% && return "library";
|
||||
m%^windows/x11drv/wineclipsrv\.c$% && return "application";
|
||||
|
||||
return "winelib";
|
||||
}
|
||||
|
||||
sub files_filter($@) {
|
||||
my $type = shift;
|
||||
|
||||
my @files;
|
||||
foreach my $file (@_) {
|
||||
if(file_type($file) eq $type) {
|
||||
push @files, $file;
|
||||
}
|
||||
}
|
||||
|
||||
return @files;
|
||||
}
|
||||
|
||||
sub file_skip($) {
|
||||
local $_ = shift;
|
||||
|
||||
$_ = file_absolutize($_);
|
||||
|
||||
m%^(?:libtest|programs|rc|server|tests|tools)/% && return 1;
|
||||
m%^(?:debugger|miscemu|libs|server)/% && return 1;
|
||||
m%^dlls/wineps/data/% && return 1;
|
||||
m%^windows/x11drv/wineclipsrv\.c$% && return 1;
|
||||
m%^dlls/winmm/wineoss/midipatch\.c$% && return 1;
|
||||
m%(?:glue|spec)\.c$% && return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub files_skip(@) {
|
||||
my @files;
|
||||
foreach my $file (@_) {
|
||||
if(!file_skip($file)) {
|
||||
push @files, $file;
|
||||
}
|
||||
}
|
||||
|
||||
return @files;
|
||||
}
|
||||
|
||||
sub file_directory($) {
|
||||
local $_ = shift;
|
||||
|
||||
s%/?[^/]*$%%;
|
||||
|
@ -143,7 +143,7 @@ sub file_directory {
|
|||
return $_;
|
||||
}
|
||||
|
||||
sub _get_files {
|
||||
sub _get_files($$;$) {
|
||||
my $pattern = shift;
|
||||
my $type = shift;
|
||||
my $dir = shift;
|
||||
|
@ -178,9 +178,9 @@ sub _get_files {
|
|||
return @files;
|
||||
}
|
||||
|
||||
sub get_c_files { return _get_files('\.c$', @_); }
|
||||
sub get_h_files { return _get_files('\.h$', @_); }
|
||||
sub get_spec_files { return _get_files('\.spec$', @_); }
|
||||
sub get_makefile_in_files { return _get_files('^Makefile.in$', @_); }
|
||||
sub get_c_files($;$) { return _get_files('\.c$', $_[0], $_[1]); }
|
||||
sub get_h_files($;$) { return _get_files('\.h$', $_[0], $_[1]); }
|
||||
sub get_spec_files($;$) { return _get_files('\.spec$', $_[0], $_[1]); }
|
||||
sub get_makefile_in_files($;$) { return _get_files('^Makefile.in$', $_[0], $_[1]); }
|
||||
|
||||
1;
|
||||
|
|
|
@ -20,7 +20,7 @@ package function;
|
|||
|
||||
use strict;
|
||||
|
||||
sub new {
|
||||
sub new($) {
|
||||
my $proto = shift;
|
||||
my $class = ref($proto) || $proto;
|
||||
my $self = {};
|
||||
|
@ -29,7 +29,7 @@ sub new {
|
|||
return $self;
|
||||
}
|
||||
|
||||
sub file {
|
||||
sub file($$) {
|
||||
my $self = shift;
|
||||
my $file = \${$self->{FILE}};
|
||||
|
||||
|
@ -40,7 +40,7 @@ sub file {
|
|||
return $$file;
|
||||
}
|
||||
|
||||
sub debug_channels {
|
||||
sub debug_channels($$) {
|
||||
my $self = shift;
|
||||
my $debug_channels = \${$self->{DEBUG_CHANNELS}};
|
||||
|
||||
|
@ -51,7 +51,7 @@ sub debug_channels {
|
|||
return $$debug_channels;
|
||||
}
|
||||
|
||||
sub documentation_line {
|
||||
sub documentation_line($$) {
|
||||
my $self = shift;
|
||||
my $documentation_line = \${$self->{DOCUMENTATION_LINE}};
|
||||
|
||||
|
@ -62,7 +62,7 @@ sub documentation_line {
|
|||
return $$documentation_line;
|
||||
}
|
||||
|
||||
sub documentation {
|
||||
sub documentation($$) {
|
||||
my $self = shift;
|
||||
my $documentation = \${$self->{DOCUMENTATION}};
|
||||
|
||||
|
@ -73,7 +73,7 @@ sub documentation {
|
|||
return $$documentation;
|
||||
}
|
||||
|
||||
sub function_line {
|
||||
sub function_line($$) {
|
||||
my $self = shift;
|
||||
my $function_line = \${$self->{FUNCTION_LINE}};
|
||||
|
||||
|
@ -84,7 +84,7 @@ sub function_line {
|
|||
return $$function_line;
|
||||
}
|
||||
|
||||
sub linkage {
|
||||
sub linkage($$) {
|
||||
my $self = shift;
|
||||
my $linkage = \${$self->{LINKAGE}};
|
||||
|
||||
|
@ -95,7 +95,7 @@ sub linkage {
|
|||
return $$linkage;
|
||||
}
|
||||
|
||||
sub return_type {
|
||||
sub return_type($$) {
|
||||
my $self = shift;
|
||||
my $return_type = \${$self->{RETURN_TYPE}};
|
||||
|
||||
|
@ -106,7 +106,7 @@ sub return_type {
|
|||
return $$return_type;
|
||||
}
|
||||
|
||||
sub calling_convention {
|
||||
sub calling_convention($$) {
|
||||
my $self = shift;
|
||||
my $calling_convention = \${$self->{CALLING_CONVENTION}};
|
||||
|
||||
|
@ -117,7 +117,7 @@ sub calling_convention {
|
|||
return $$calling_convention;
|
||||
}
|
||||
|
||||
sub internal_name {
|
||||
sub internal_name($$) {
|
||||
my $self = shift;
|
||||
my $internal_name = \${$self->{INTERNAL_NAME}};
|
||||
|
||||
|
@ -128,7 +128,7 @@ sub internal_name {
|
|||
return $$internal_name;
|
||||
}
|
||||
|
||||
sub argument_types {
|
||||
sub argument_types($$) {
|
||||
my $self = shift;
|
||||
my $argument_types = \${$self->{ARGUMENT_TYPES}};
|
||||
|
||||
|
@ -139,7 +139,7 @@ sub argument_types {
|
|||
return $$argument_types;
|
||||
}
|
||||
|
||||
sub argument_names {
|
||||
sub argument_names($$) {
|
||||
my $self = shift;
|
||||
my $argument_names = \${$self->{ARGUMENT_NAMES}};
|
||||
|
||||
|
@ -150,7 +150,7 @@ sub argument_names {
|
|||
return $$argument_names;
|
||||
}
|
||||
|
||||
sub argument_documentations {
|
||||
sub argument_documentations($$) {
|
||||
my $self = shift;
|
||||
my $argument_documentations = \${$self->{ARGUMENT_DOCUMENTATIONS}};
|
||||
|
||||
|
@ -161,7 +161,7 @@ sub argument_documentations {
|
|||
return $$argument_documentations;
|
||||
}
|
||||
|
||||
sub statements_line {
|
||||
sub statements_line($$) {
|
||||
my $self = shift;
|
||||
my $statements_line = \${$self->{STATEMENTS_LINE}};
|
||||
|
||||
|
@ -172,7 +172,7 @@ sub statements_line {
|
|||
return $$statements_line;
|
||||
}
|
||||
|
||||
sub statements {
|
||||
sub statements($$) {
|
||||
my $self = shift;
|
||||
my $statements = \${$self->{STATEMENTS}};
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ BEGIN {
|
|||
}
|
||||
|
||||
use config qw(
|
||||
&file_absolutize &file_normalize
|
||||
file_absolutize file_normalize
|
||||
$current_dir $wine_dir
|
||||
);
|
||||
use output qw($output);
|
||||
|
@ -49,20 +49,20 @@ open(IN, "($command) 2>&1 |");
|
|||
while(<IN>) {
|
||||
chomp;
|
||||
|
||||
if(!&make_parser::line($_)) {
|
||||
if(!make_parser::line($_)) {
|
||||
next;
|
||||
}
|
||||
|
||||
if($message) {
|
||||
if($file && $line) {
|
||||
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 {
|
||||
$output->write("$file:$line: $message\n");
|
||||
}
|
||||
} elsif($file) {
|
||||
if($directory && $directory ne "." && $file !~ m%^/%) {
|
||||
$output->write(&file_normalize("$directory/$file") . ": $message\n");
|
||||
$output->write(file_normalize("$directory/$file") . ": $message\n");
|
||||
} else {
|
||||
$output->write("$file: $message\n");
|
||||
}
|
||||
|
|
|
@ -20,8 +20,6 @@ package make_parser;
|
|||
|
||||
use strict;
|
||||
|
||||
use strict;
|
||||
|
||||
use setup qw($current_dir $wine_dir $winapi_dir $winapi_check_dir);
|
||||
|
||||
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
|
||||
|
@ -36,6 +34,16 @@ use vars qw($directory $tool $file $line $message);
|
|||
use output qw($output);
|
||||
use options qw($options);
|
||||
|
||||
|
||||
#sub command($);
|
||||
#sub gcc_output($$);
|
||||
#sub ld_output($$);
|
||||
#sub make_output($$);
|
||||
#sub winebuild_output($$);
|
||||
#sub wmc_output($$);
|
||||
#sub wrc_output($$);
|
||||
|
||||
|
||||
########################################################################
|
||||
# global
|
||||
########################################################################
|
||||
|
@ -47,7 +55,7 @@ my $function;
|
|||
# error
|
||||
########################################################################
|
||||
|
||||
sub error {
|
||||
sub error($) {
|
||||
my $where = shift;
|
||||
|
||||
if(!defined($where)) {
|
||||
|
@ -76,127 +84,11 @@ sub error {
|
|||
exit 1;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# line
|
||||
########################################################################
|
||||
|
||||
sub line {
|
||||
local $_ = shift;
|
||||
|
||||
$file = "";
|
||||
$line = "";
|
||||
$message = "";
|
||||
|
||||
$current = $_;
|
||||
|
||||
my ($new_tool, $read_files, $write_files, $remove_files) = command($_);
|
||||
if(defined($new_tool)) {
|
||||
$tool = $new_tool;
|
||||
|
||||
$function = "";
|
||||
|
||||
my $progress = "";
|
||||
if($directory && $directory ne ".") {
|
||||
$progress .= "$directory: ";
|
||||
}
|
||||
if($tool) {
|
||||
$progress .= "$tool: ";
|
||||
}
|
||||
|
||||
if($tool =~ /^(?:cd|make)$/) {
|
||||
# Nothing
|
||||
} elsif($tool eq "ld"/) {
|
||||
foreach my $file (@{$read_files}) {
|
||||
$output->lazy_progress("${progress}reading '$file'");
|
||||
}
|
||||
my $file = $$write_files[0];
|
||||
$output->progress("$progress: writing '$file'");
|
||||
} elsif($tool eq "rm") {
|
||||
foreach my $file (@{$remove_files}) {
|
||||
$output->lazy_progress("${progress}removing '$file'");
|
||||
}
|
||||
} else {
|
||||
if($#$read_files >= 0) {
|
||||
$progress .= "read[" . join(" ", @{$read_files}) . "]";
|
||||
}
|
||||
if($#$write_files >= 0) {
|
||||
if($#$read_files >= 0) {
|
||||
$progress .= ", ";
|
||||
}
|
||||
$progress .= "write[" . join(" ", @{$write_files}) . "]";
|
||||
}
|
||||
if($#$remove_files >= 0) {
|
||||
if($#$read_files >= 0 || $#$write_files >= 0) {
|
||||
$progress .= ", ";
|
||||
}
|
||||
$progress .= "remove[" . join(" ", @{$remove_files}) . "]";
|
||||
}
|
||||
|
||||
$output->progress($progress);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
my $make = $options->make;
|
||||
|
||||
if(/^Wine build complete\.$/) {
|
||||
# Nothing
|
||||
} elsif(/^(.*?) is newer than (.*?), please rerun (.*?)\!$/) {
|
||||
$message = "$_";
|
||||
} elsif(/^(.*?) is older than (.*?), please rerun (.*?)$/) {
|
||||
$message = "$_";
|
||||
} elsif(/^\`(.*?)\' is up to date.$/) {
|
||||
$tool = "make";
|
||||
make_output($1, $_);
|
||||
} elsif(s/^$make(?:\[(\d+)\])?:\s*//) {
|
||||
$tool = "make";
|
||||
make_output($1, $_);
|
||||
} elsif(!defined($tool)) {
|
||||
error("line");
|
||||
} elsif($tool eq "make") {
|
||||
make_output($1, $_);
|
||||
} elsif($tool eq "bison" && /^conflicts:\s+\d+\s+shift\/reduce$/) {
|
||||
# Nothing
|
||||
} elsif($tool eq "gcc" && /^(?:In file included |\s*)from (.+?):(\d+)[,:]$/) {
|
||||
# Nothing
|
||||
} elsif($tool =~ /^(?:gcc|ld)$/ && s/^(.+?\.s?o)(?:\(.*?\))?:\s*//) {
|
||||
$tool = "ld";
|
||||
ld_output($1, $_)
|
||||
} elsif($tool =~ /^(?:gcc|ld)$/ && s/^(.*?)ld:\s*//) {
|
||||
$tool = "ld";
|
||||
ld_output("", $_)
|
||||
} elsif($tool =~ /^(?:gcc|ld)$/ && s/^collect2:\s*//) {
|
||||
$tool = "ld";
|
||||
ld_output("collect2", $_);
|
||||
} elsif($tool eq "gcc" && s/^(.+?\.[chly]):\s*//) {
|
||||
gcc_output($1, $_);
|
||||
} elsif($tool eq "ld" && s/^(.+?\.c):(?:\d+:)?\s*//) {
|
||||
ld_output($1, $_);
|
||||
} elsif($tool eq "winebuild" && s/^(.+?\.spec):\s*//) {
|
||||
winebuild_output($1, $_);
|
||||
} elsif($tool eq "wmc" && s/^(.+?\.mc):\s*//) {
|
||||
wmc_output($1, $_);
|
||||
} elsif($tool eq "wrc" && s/^(.+?\.rc):\s*//) {
|
||||
wrc_output($1, $_);
|
||||
} elsif($tool eq "cd" && s/^\/bin\/sh:\s*cd:\s*//) {
|
||||
parse_cd_output($_);
|
||||
} elsif(/^\s*$/) {
|
||||
# Nothing
|
||||
} else {
|
||||
error("line");
|
||||
}
|
||||
|
||||
$file =~ s/^\.\///;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# make_output
|
||||
########################################################################
|
||||
|
||||
sub make_output {
|
||||
sub make_output($$) {
|
||||
my $level = shift;
|
||||
local $_ = shift;
|
||||
|
||||
|
@ -257,92 +149,11 @@ sub make_output {
|
|||
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# command
|
||||
########################################################################
|
||||
|
||||
sub command {
|
||||
local $_ = shift;
|
||||
|
||||
my $tool;
|
||||
my $file;
|
||||
my $read_files = ["<???>"];
|
||||
my $write_files = ["<???>"];
|
||||
my $remove_files = [];
|
||||
|
||||
s/^\s*(.*?)\s*$/$1/;
|
||||
|
||||
if(s/^\[\s+-d\s+(.*?)\s+\]\s+\|\|\s+//) {
|
||||
# Nothing
|
||||
}
|
||||
|
||||
if(s/^ar\s+//) {
|
||||
$tool = "ar";
|
||||
($read_files, $write_files) = ar_command($_);
|
||||
} elsif(s/^as\s+//) {
|
||||
$tool = "as";
|
||||
($read_files, $write_files) = as_command($_);
|
||||
} elsif(s/^bison\s+//) {
|
||||
$tool = "bison";
|
||||
($read_files, $write_files) = bison_command($_);
|
||||
} elsif(s/^cd\s+//) {
|
||||
$tool = "cd";
|
||||
($read_files, $write_files) = cd_command($_);
|
||||
} elsif(s/^flex\s+//) {
|
||||
$tool = "flex";
|
||||
($read_files, $write_files) = flex_command($_);
|
||||
} elsif(s/^for\s+//) {
|
||||
$tool = "for";
|
||||
($read_files, $write_files) = for_command($_);
|
||||
} elsif(s/^\/usr\/bin\/install\s+//) {
|
||||
$tool = "install";
|
||||
($read_files, $write_files) = install_command($_);
|
||||
} elsif(s/^ld\s+//) {
|
||||
$tool = "ld";
|
||||
($read_files, $write_files) = ld_command($_);
|
||||
} elsif(s/^\/sbin\/ldconfig\s+//) {
|
||||
$tool = "ldconfig";
|
||||
($read_files, $write_files) = ldconfig_command();
|
||||
} elsif(s/^gcc\s+//) {
|
||||
$tool = "gcc";
|
||||
($read_files, $write_files) = gcc_command($_);
|
||||
} elsif(s/^(?:(?:\.\.\/)+|\.\/)tools\/makedep\s+//) {
|
||||
$tool = "makedep";
|
||||
($read_files, $write_files) = makedep_command($_);
|
||||
} elsif(s/^mkdir\s+//) {
|
||||
$tool = "mkdir";
|
||||
($read_files, $write_files) = mkdir_command($_);
|
||||
} elsif(s/^ranlib\s+//) {
|
||||
$tool = "ranlib";
|
||||
($read_files, $write_files) = ranlib_command($_);
|
||||
} elsif(s/^rm\s+//) {
|
||||
$tool = "rm";
|
||||
($read_files, $write_files, $remove_files) = rm_command($_);
|
||||
} elsif(s/^sed\s+//) {
|
||||
$tool = "sed";
|
||||
($read_files, $write_files) = sed_command($_);
|
||||
} elsif(s/^strip\s+//) {
|
||||
$tool = "sed";
|
||||
($read_files, $write_files) = strip_command($_);
|
||||
} elsif(s/^LD_LIBRARY_PATH="(?:(?:\.\.\/)*unicode)?:\$LD_LIBRARY_PATH"\s+(?:\.\.\/)*tools\/winebuild\/winebuild\s+//) {
|
||||
$tool = "winebuild";
|
||||
($read_files, $write_files) = winebuild_command($_);
|
||||
} elsif(s/^LD_LIBRARY_PATH="(?:(?:\.\.\/)*unicode)?:\$LD_LIBRARY_PATH"\s+(?:\.\.\/)*tools\/wmc\/wmc\s+//) {
|
||||
$tool = "wmc";
|
||||
($read_files, $write_files) = wmc_command($_);
|
||||
} elsif(s/^LD_LIBRARY_PATH="(?:(?:\.\.\/)*unicode)?:\$LD_LIBRARY_PATH"\s+(?:\.\.\/)*tools\/wrc\/wrc\s+//) {
|
||||
$tool = "wrc";
|
||||
($read_files, $write_files) = wrc_command($_);
|
||||
}
|
||||
|
||||
return ($tool, $read_files, $write_files, $remove_files);
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# ar_command
|
||||
########################################################################
|
||||
|
||||
sub ar_command {
|
||||
sub ar_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
my $read_files;
|
||||
|
@ -364,7 +175,7 @@ sub ar_command {
|
|||
# as_command
|
||||
########################################################################
|
||||
|
||||
sub as_command {
|
||||
sub as_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
my $read_files;
|
||||
|
@ -384,7 +195,7 @@ sub as_command {
|
|||
# bision_command
|
||||
########################################################################
|
||||
|
||||
sub bison_command {
|
||||
sub bison_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
return ([], []);
|
||||
|
@ -394,7 +205,7 @@ sub bison_command {
|
|||
# cd_command
|
||||
########################################################################
|
||||
|
||||
sub cd_command {
|
||||
sub cd_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
return ([], []);
|
||||
|
@ -404,7 +215,7 @@ sub cd_command {
|
|||
# cd_output
|
||||
########################################################################
|
||||
|
||||
sub cd_output {
|
||||
sub cd_output($) {
|
||||
local $_ = shift;
|
||||
|
||||
if(/^(.*?): No such file or directory/) {
|
||||
|
@ -416,7 +227,7 @@ sub cd_output {
|
|||
# flex_command
|
||||
########################################################################
|
||||
|
||||
sub flex_command {
|
||||
sub flex_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
return ([], []);
|
||||
|
@ -426,7 +237,7 @@ sub flex_command {
|
|||
# for_command
|
||||
########################################################################
|
||||
|
||||
sub for_command {
|
||||
sub for_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
return ([], []);
|
||||
|
@ -436,7 +247,7 @@ sub for_command {
|
|||
# gcc_command
|
||||
########################################################################
|
||||
|
||||
sub gcc_command {
|
||||
sub gcc_command($) {
|
||||
my $read_files;
|
||||
my $write_files;
|
||||
|
||||
|
@ -474,7 +285,7 @@ sub gcc_command {
|
|||
# gcc_output
|
||||
########################################################################
|
||||
|
||||
sub gcc_output {
|
||||
sub gcc_output($$) {
|
||||
$file = shift;
|
||||
local $_ = shift;
|
||||
|
||||
|
@ -606,7 +417,7 @@ sub gcc_output {
|
|||
# install_command
|
||||
########################################################################
|
||||
|
||||
sub install_command {
|
||||
sub install_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
return ([], []);
|
||||
|
@ -616,7 +427,7 @@ sub install_command {
|
|||
# ld_command
|
||||
########################################################################
|
||||
|
||||
sub ld_command {
|
||||
sub ld_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
my $read_files;
|
||||
|
@ -636,7 +447,7 @@ sub ld_command {
|
|||
# ld_output
|
||||
########################################################################
|
||||
|
||||
sub ld_output {
|
||||
sub ld_output($$) {
|
||||
$file = shift;
|
||||
local $_ = shift;
|
||||
|
||||
|
@ -663,7 +474,7 @@ sub ld_output {
|
|||
# ldconfig_command
|
||||
########################################################################
|
||||
|
||||
sub ldconfig_command {
|
||||
sub ldconfig_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
return ([], []);
|
||||
|
@ -673,7 +484,7 @@ sub ldconfig_command {
|
|||
# makedep_command
|
||||
########################################################################
|
||||
|
||||
sub makedep_command {
|
||||
sub makedep_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
return ([], []);
|
||||
|
@ -683,7 +494,7 @@ sub makedep_command {
|
|||
# mkdir_command
|
||||
########################################################################
|
||||
|
||||
sub mkdir_command {
|
||||
sub mkdir_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
return ([], []);
|
||||
|
@ -693,7 +504,7 @@ sub mkdir_command {
|
|||
# ranlib_command
|
||||
########################################################################
|
||||
|
||||
sub ranlib_command {
|
||||
sub ranlib_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
my $read_files;
|
||||
|
@ -709,7 +520,7 @@ sub ranlib_command {
|
|||
# rm_command
|
||||
########################################################################
|
||||
|
||||
sub rm_command {
|
||||
sub rm_command($) {
|
||||
local $_ = shift;
|
||||
s/^-f\s*//;
|
||||
return ([], [], [split(/\s+/, $_)]);
|
||||
|
@ -719,7 +530,7 @@ sub rm_command {
|
|||
# sed_command
|
||||
########################################################################
|
||||
|
||||
sub sed_command {
|
||||
sub sed_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
return ([], []);
|
||||
|
@ -729,7 +540,7 @@ sub sed_command {
|
|||
# strip_command
|
||||
########################################################################
|
||||
|
||||
sub strip_command {
|
||||
sub strip_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
return ([], []);
|
||||
|
@ -739,7 +550,7 @@ sub strip_command {
|
|||
# winebuild_command
|
||||
########################################################################
|
||||
|
||||
sub winebuild_command {
|
||||
sub winebuild_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
return ([], []);
|
||||
|
@ -749,7 +560,7 @@ sub winebuild_command {
|
|||
# winebuild_output
|
||||
########################################################################
|
||||
|
||||
sub winebuild_output {
|
||||
sub winebuild_output($$) {
|
||||
$file = shift;
|
||||
local $_ = shift;
|
||||
|
||||
|
@ -760,7 +571,7 @@ sub winebuild_output {
|
|||
# wmc_command
|
||||
########################################################################
|
||||
|
||||
sub wmc_command {
|
||||
sub wmc_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
my $read_files;
|
||||
|
@ -785,7 +596,7 @@ sub wmc_command {
|
|||
# wmc_output
|
||||
########################################################################
|
||||
|
||||
sub wmc_output {
|
||||
sub wmc_output($$) {
|
||||
$file = shift;
|
||||
local $_ = shift;
|
||||
}
|
||||
|
@ -794,7 +605,7 @@ sub wmc_output {
|
|||
# wrc_command
|
||||
########################################################################
|
||||
|
||||
sub wrc_command {
|
||||
sub wrc_command($) {
|
||||
local $_ = shift;
|
||||
|
||||
my $read_files;
|
||||
|
@ -819,9 +630,206 @@ sub wrc_command {
|
|||
# wrc_output
|
||||
########################################################################
|
||||
|
||||
sub wrc_output {
|
||||
sub wrc_output($$) {
|
||||
$file = shift;
|
||||
local $_ = shift;
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# command
|
||||
########################################################################
|
||||
|
||||
sub command($) {
|
||||
local $_ = shift;
|
||||
|
||||
my $tool;
|
||||
my $file;
|
||||
my $read_files = ["<???>"];
|
||||
my $write_files = ["<???>"];
|
||||
my $remove_files = [];
|
||||
|
||||
s/^\s*(.*?)\s*$/$1/;
|
||||
|
||||
if(s/^\[\s+-d\s+(.*?)\s+\]\s+\|\|\s+//) {
|
||||
# Nothing
|
||||
}
|
||||
|
||||
if(s/^ar\s+//) {
|
||||
$tool = "ar";
|
||||
($read_files, $write_files) = ar_command($_);
|
||||
} elsif(s/^as\s+//) {
|
||||
$tool = "as";
|
||||
($read_files, $write_files) = as_command($_);
|
||||
} elsif(s/^bison\s+//) {
|
||||
$tool = "bison";
|
||||
($read_files, $write_files) = bison_command($_);
|
||||
} elsif(s/^cd\s+//) {
|
||||
$tool = "cd";
|
||||
($read_files, $write_files) = cd_command($_);
|
||||
} elsif(s/^flex\s+//) {
|
||||
$tool = "flex";
|
||||
($read_files, $write_files) = flex_command($_);
|
||||
} elsif(s/^for\s+//) {
|
||||
$tool = "for";
|
||||
($read_files, $write_files) = for_command($_);
|
||||
} elsif(s/^\/usr\/bin\/install\s+//) {
|
||||
$tool = "install";
|
||||
($read_files, $write_files) = install_command($_);
|
||||
} elsif(s/^ld\s+//) {
|
||||
$tool = "ld";
|
||||
($read_files, $write_files) = ld_command($_);
|
||||
} elsif(s/^\/sbin\/ldconfig\s+//) {
|
||||
$tool = "ldconfig";
|
||||
($read_files, $write_files) = ldconfig_command();
|
||||
} elsif(s/^gcc\s+//) {
|
||||
$tool = "gcc";
|
||||
($read_files, $write_files) = gcc_command($_);
|
||||
} elsif(s/^(?:(?:\.\.\/)+|\.\/)tools\/makedep\s+//) {
|
||||
$tool = "makedep";
|
||||
($read_files, $write_files) = makedep_command($_);
|
||||
} elsif(s/^mkdir\s+//) {
|
||||
$tool = "mkdir";
|
||||
($read_files, $write_files) = mkdir_command($_);
|
||||
} elsif(s/^ranlib\s+//) {
|
||||
$tool = "ranlib";
|
||||
($read_files, $write_files) = ranlib_command($_);
|
||||
} elsif(s/^rm\s+//) {
|
||||
$tool = "rm";
|
||||
($read_files, $write_files, $remove_files) = rm_command($_);
|
||||
} elsif(s/^sed\s+//) {
|
||||
$tool = "sed";
|
||||
($read_files, $write_files) = sed_command($_);
|
||||
} elsif(s/^strip\s+//) {
|
||||
$tool = "sed";
|
||||
($read_files, $write_files) = strip_command($_);
|
||||
} elsif(s/^LD_LIBRARY_PATH="(?:(?:\.\.\/)*unicode)?:\$LD_LIBRARY_PATH"\s+(?:\.\.\/)*tools\/winebuild\/winebuild\s+//) {
|
||||
$tool = "winebuild";
|
||||
($read_files, $write_files) = winebuild_command($_);
|
||||
} elsif(s/^LD_LIBRARY_PATH="(?:(?:\.\.\/)*unicode)?:\$LD_LIBRARY_PATH"\s+(?:\.\.\/)*tools\/wmc\/wmc\s+//) {
|
||||
$tool = "wmc";
|
||||
($read_files, $write_files) = wmc_command($_);
|
||||
} elsif(s/^LD_LIBRARY_PATH="(?:(?:\.\.\/)*unicode)?:\$LD_LIBRARY_PATH"\s+(?:\.\.\/)*tools\/wrc\/wrc\s+//) {
|
||||
$tool = "wrc";
|
||||
($read_files, $write_files) = wrc_command($_);
|
||||
}
|
||||
|
||||
return ($tool, $read_files, $write_files, $remove_files);
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# line
|
||||
########################################################################
|
||||
|
||||
sub line($) {
|
||||
local $_ = shift;
|
||||
|
||||
$file = "";
|
||||
$line = "";
|
||||
$message = "";
|
||||
|
||||
$current = $_;
|
||||
|
||||
my ($new_tool, $read_files, $write_files, $remove_files) = command($_);
|
||||
if(defined($new_tool)) {
|
||||
$tool = $new_tool;
|
||||
|
||||
$function = "";
|
||||
|
||||
my $progress = "";
|
||||
if($directory && $directory ne ".") {
|
||||
$progress .= "$directory: ";
|
||||
}
|
||||
if($tool) {
|
||||
$progress .= "$tool: ";
|
||||
}
|
||||
|
||||
if($tool =~ /^(?:cd|make)$/) {
|
||||
# Nothing
|
||||
} elsif($tool eq "ld"/) {
|
||||
foreach my $file (@{$read_files}) {
|
||||
$output->lazy_progress("${progress}reading '$file'");
|
||||
}
|
||||
my $file = $$write_files[0];
|
||||
$output->progress("$progress: writing '$file'");
|
||||
} elsif($tool eq "rm") {
|
||||
foreach my $file (@{$remove_files}) {
|
||||
$output->lazy_progress("${progress}removing '$file'");
|
||||
}
|
||||
} else {
|
||||
if($#$read_files >= 0) {
|
||||
$progress .= "read[" . join(" ", @{$read_files}) . "]";
|
||||
}
|
||||
if($#$write_files >= 0) {
|
||||
if($#$read_files >= 0) {
|
||||
$progress .= ", ";
|
||||
}
|
||||
$progress .= "write[" . join(" ", @{$write_files}) . "]";
|
||||
}
|
||||
if($#$remove_files >= 0) {
|
||||
if($#$read_files >= 0 || $#$write_files >= 0) {
|
||||
$progress .= ", ";
|
||||
}
|
||||
$progress .= "remove[" . join(" ", @{$remove_files}) . "]";
|
||||
}
|
||||
|
||||
$output->progress($progress);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
my $make = $options->make;
|
||||
|
||||
if(/^Wine build complete\.$/) {
|
||||
# Nothing
|
||||
} elsif(/^(.*?) is newer than (.*?), please rerun (.*?)\!$/) {
|
||||
$message = "$_";
|
||||
} elsif(/^(.*?) is older than (.*?), please rerun (.*?)$/) {
|
||||
$message = "$_";
|
||||
} elsif(/^\`(.*?)\' is up to date.$/) {
|
||||
$tool = "make";
|
||||
make_output($1, $_);
|
||||
} elsif(s/^$make(?:\[(\d+)\])?:\s*//) {
|
||||
$tool = "make";
|
||||
make_output($1, $_);
|
||||
} elsif(!defined($tool)) {
|
||||
error("line");
|
||||
} elsif($tool eq "make") {
|
||||
make_output($1, $_);
|
||||
} elsif($tool eq "bison" && /^conflicts:\s+\d+\s+shift\/reduce$/) {
|
||||
# Nothing
|
||||
} elsif($tool eq "gcc" && /^(?:In file included |\s*)from (.+?):(\d+)[,:]$/) {
|
||||
# Nothing
|
||||
} elsif($tool =~ /^(?:gcc|ld)$/ && s/^(.+?\.s?o)(?:\(.*?\))?:\s*//) {
|
||||
$tool = "ld";
|
||||
ld_output($1, $_)
|
||||
} elsif($tool =~ /^(?:gcc|ld)$/ && s/^(.*?)ld:\s*//) {
|
||||
$tool = "ld";
|
||||
ld_output("", $_)
|
||||
} elsif($tool =~ /^(?:gcc|ld)$/ && s/^collect2:\s*//) {
|
||||
$tool = "ld";
|
||||
ld_output("collect2", $_);
|
||||
} elsif($tool eq "gcc" && s/^(.+?\.[chly]):\s*//) {
|
||||
gcc_output($1, $_);
|
||||
} elsif($tool eq "ld" && s/^(.+?\.c):(?:\d+:)?\s*//) {
|
||||
ld_output($1, $_);
|
||||
} elsif($tool eq "winebuild" && s/^(.+?\.spec):\s*//) {
|
||||
winebuild_output($1, $_);
|
||||
} elsif($tool eq "wmc" && s/^(.+?\.mc):\s*//) {
|
||||
wmc_output($1, $_);
|
||||
} elsif($tool eq "wrc" && s/^(.+?\.rc):\s*//) {
|
||||
wrc_output($1, $_);
|
||||
} elsif($tool eq "cd" && s/^\/bin\/sh:\s*cd:\s*//) {
|
||||
parse_cd_output($_);
|
||||
} elsif(/^\s*$/) {
|
||||
# Nothing
|
||||
} else {
|
||||
error("line");
|
||||
}
|
||||
|
||||
$file =~ s/^\.\///;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -11,7 +11,7 @@ BEGIN {
|
|||
|
||||
use setup qw($current_dir $wine_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 util qw(replace_file);
|
||||
|
||||
|
|
|
@ -25,13 +25,13 @@ require Exporter;
|
|||
|
||||
@ISA = qw(Exporter);
|
||||
@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 output qw($output);
|
||||
|
||||
sub parse_comma_list {
|
||||
sub parse_comma_list($$) {
|
||||
my $prefix = shift;
|
||||
my $value = shift;
|
||||
|
||||
|
@ -48,7 +48,7 @@ sub parse_comma_list {
|
|||
}
|
||||
}
|
||||
|
||||
sub parse_value {
|
||||
sub parse_value($$) {
|
||||
my $prefix = shift;
|
||||
my $value = shift;
|
||||
|
||||
|
@ -61,7 +61,9 @@ use strict;
|
|||
|
||||
use output qw($output);
|
||||
|
||||
sub new {
|
||||
sub options_set($$);
|
||||
|
||||
sub new($$$$) {
|
||||
my $proto = shift;
|
||||
my $class = ref($proto) || $proto;
|
||||
my $self = {};
|
||||
|
@ -199,7 +201,7 @@ sub new {
|
|||
sub DESTROY {
|
||||
}
|
||||
|
||||
sub parse_files {
|
||||
sub parse_files($) {
|
||||
my $self = shift;
|
||||
|
||||
my $arguments = \@{$self->{_ARGUMENTS}};
|
||||
|
@ -279,7 +281,7 @@ sub parse_files {
|
|||
@$directories = sort(keys(%dirs));
|
||||
}
|
||||
|
||||
sub options_set {
|
||||
sub options_set($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $options_long = \%{$self->{_OPTIONS_LONG}};
|
||||
|
@ -315,7 +317,7 @@ sub options_set {
|
|||
}
|
||||
}
|
||||
|
||||
sub show_help {
|
||||
sub show_help($) {
|
||||
my $self = shift;
|
||||
|
||||
my $options_long = \%{$self->{_OPTIONS_LONG}};
|
||||
|
@ -391,7 +393,7 @@ sub AUTOLOAD {
|
|||
}
|
||||
}
|
||||
|
||||
sub arguments {
|
||||
sub arguments($) {
|
||||
my $self = shift;
|
||||
|
||||
my $arguments = \@{$self->{_ARGUMENTS}};
|
||||
|
@ -399,7 +401,7 @@ sub arguments {
|
|||
return @$arguments;
|
||||
}
|
||||
|
||||
sub c_files {
|
||||
sub c_files($) {
|
||||
my $self = shift;
|
||||
|
||||
my $c_files = \@{$self->{_C_FILES}};
|
||||
|
@ -411,7 +413,7 @@ sub c_files {
|
|||
return @$c_files;
|
||||
}
|
||||
|
||||
sub h_files {
|
||||
sub h_files($) {
|
||||
my $self = shift;
|
||||
|
||||
my $h_files = \@{$self->{_H_FILES}};
|
||||
|
@ -423,7 +425,7 @@ sub h_files {
|
|||
return @$h_files;
|
||||
}
|
||||
|
||||
sub directories {
|
||||
sub directories($) {
|
||||
my $self = shift;
|
||||
|
||||
my $directories = \@{$self->{_DIRECTORIES}};
|
||||
|
|
|
@ -33,15 +33,17 @@ use config qw($current_dir $wine_dir $winapi_dir);
|
|||
use options qw($options);
|
||||
use output qw($output);
|
||||
|
||||
sub import {
|
||||
sub import(@) {
|
||||
$Exporter::ExportLevel++;
|
||||
&Exporter::import(@_);
|
||||
Exporter::import(@_);
|
||||
$Exporter::ExportLevel--;
|
||||
|
||||
$tests = 'tests'->new;
|
||||
}
|
||||
|
||||
sub new {
|
||||
sub parse_tests_file($);
|
||||
|
||||
sub new($) {
|
||||
my $proto = shift;
|
||||
my $class = ref($proto) || $proto;
|
||||
my $self = {};
|
||||
|
@ -52,7 +54,7 @@ sub new {
|
|||
return $self;
|
||||
}
|
||||
|
||||
sub parse_tests_file {
|
||||
sub parse_tests_file($) {
|
||||
my $self = shift;
|
||||
|
||||
my $file = "tests.dat";
|
||||
|
@ -90,7 +92,7 @@ sub parse_tests_file {
|
|||
close(IN);
|
||||
}
|
||||
|
||||
sub get_tests {
|
||||
sub get_tests($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $tests = \%{$self->{TESTS}};
|
||||
|
@ -112,7 +114,7 @@ sub get_tests {
|
|||
return sort(keys(%tests));
|
||||
}
|
||||
|
||||
sub get_test_dirs {
|
||||
sub get_test_dirs($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $tests = \%{$self->{TESTS}};
|
||||
|
@ -135,7 +137,7 @@ sub get_test_dirs {
|
|||
return sort(keys(%test_dirs));
|
||||
}
|
||||
|
||||
sub get_sections {
|
||||
sub get_sections($$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $tests = \%{$self->{TESTS}};
|
||||
|
@ -175,7 +177,7 @@ sub get_sections {
|
|||
return sort(keys(%sections));
|
||||
}
|
||||
|
||||
sub get_section {
|
||||
sub get_section($$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $tests = \%{$self->{TESTS}};
|
||||
|
|
|
@ -20,7 +20,7 @@ package type;
|
|||
|
||||
use strict;
|
||||
|
||||
sub new {
|
||||
sub new($) {
|
||||
my $proto = shift;
|
||||
my $class = ref($proto) || $proto;
|
||||
my $self = {};
|
||||
|
|
|
@ -25,8 +25,8 @@ require Exporter;
|
|||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw(
|
||||
&append_file &edit_file &read_file &replace_file
|
||||
&normalize_set &is_subset
|
||||
append_file edit_file read_file replace_file
|
||||
normalize_set is_subset
|
||||
);
|
||||
@EXPORT_OK = qw();
|
||||
%EXPORT_TAGS = ();
|
||||
|
@ -34,7 +34,7 @@ require Exporter;
|
|||
########################################################################
|
||||
# _compare_files
|
||||
|
||||
sub _compare_files {
|
||||
sub _compare_files($$) {
|
||||
my $file1 = shift;
|
||||
my $file2 = shift;
|
||||
|
||||
|
@ -54,7 +54,7 @@ sub _compare_files {
|
|||
########################################################################
|
||||
# append_file
|
||||
|
||||
sub append_file {
|
||||
sub append_file($$@) {
|
||||
my $filename = shift;
|
||||
my $function = shift;
|
||||
|
||||
|
@ -68,7 +68,7 @@ sub append_file {
|
|||
########################################################################
|
||||
# edit_file
|
||||
|
||||
sub edit_file {
|
||||
sub edit_file($$@) {
|
||||
my $filename = shift;
|
||||
my $function = shift;
|
||||
|
||||
|
@ -93,7 +93,7 @@ sub edit_file {
|
|||
########################################################################
|
||||
# read_file
|
||||
|
||||
sub read_file {
|
||||
sub read_file($$@) {
|
||||
my $filename = shift;
|
||||
my $function = shift;
|
||||
|
||||
|
@ -107,7 +107,7 @@ sub read_file {
|
|||
########################################################################
|
||||
# replace_file
|
||||
|
||||
sub replace_file {
|
||||
sub replace_file($$@) {
|
||||
my $filename = shift;
|
||||
my $function = shift;
|
||||
|
||||
|
@ -130,7 +130,7 @@ sub replace_file {
|
|||
########################################################################
|
||||
# normalize_set
|
||||
|
||||
sub normalize_set {
|
||||
sub normalize_set($) {
|
||||
local $_ = shift;
|
||||
|
||||
if(!defined($_)) {
|
||||
|
@ -148,7 +148,7 @@ sub normalize_set {
|
|||
########################################################################
|
||||
# is_subset
|
||||
|
||||
sub is_subset {
|
||||
sub is_subset($$) {
|
||||
my $subset = shift;
|
||||
my $set = shift;
|
||||
|
||||
|
|
|
@ -35,9 +35,17 @@ use output qw($output);
|
|||
|
||||
use vars qw($modules);
|
||||
|
||||
sub import {
|
||||
sub found_shared_internal_function($$);
|
||||
sub function_external_calling_convention_in_module($$$);
|
||||
sub function_internal_module($$);
|
||||
sub is_function_stub_in_module($$$);
|
||||
sub new($$$);
|
||||
sub parse_api_file($$);
|
||||
sub parse_spec_file($$);
|
||||
|
||||
sub import(@) {
|
||||
$Exporter::ExportLevel++;
|
||||
&Exporter::import(@_);
|
||||
Exporter::import(@_);
|
||||
$Exporter::ExportLevel--;
|
||||
|
||||
if (defined($modules) && defined($win16api) && defined($win32api)) {
|
||||
|
@ -69,7 +77,7 @@ sub import {
|
|||
}
|
||||
|
||||
|
||||
sub new {
|
||||
sub new($$$) {
|
||||
my $proto = shift;
|
||||
my $class = ref($proto) || $proto;
|
||||
my $self = {};
|
||||
|
@ -102,15 +110,15 @@ sub new {
|
|||
return $self;
|
||||
}
|
||||
|
||||
sub win16api {
|
||||
sub win16api() {
|
||||
return $win16api;
|
||||
}
|
||||
|
||||
sub win32api {
|
||||
sub win32api() {
|
||||
return $win32api;
|
||||
}
|
||||
|
||||
sub parse_api_file {
|
||||
sub parse_api_file($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $allowed_kind = \%{$self->{ALLOWED_KIND}};
|
||||
|
@ -217,7 +225,7 @@ sub parse_api_file {
|
|||
close(IN);
|
||||
}
|
||||
|
||||
sub parse_spec_file {
|
||||
sub parse_spec_file($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $function_internal_arguments = \%{$self->{FUNCTION_INTERNAL_ARGUMENTS}};
|
||||
|
@ -468,14 +476,14 @@ sub parse_spec_file {
|
|||
$$module_files{$module} = $file;
|
||||
}
|
||||
|
||||
sub name {
|
||||
sub name($) {
|
||||
my $self = shift;
|
||||
my $name = \${$self->{NAME}};
|
||||
|
||||
return $$name;
|
||||
}
|
||||
|
||||
sub is_allowed_kind {
|
||||
sub is_allowed_kind($$) {
|
||||
my $self = shift;
|
||||
my $allowed_kind = \%{$self->{ALLOWED_KIND}};
|
||||
|
||||
|
@ -488,7 +496,7 @@ sub is_allowed_kind {
|
|||
|
||||
}
|
||||
|
||||
sub allow_kind {
|
||||
sub allow_kind($$) {
|
||||
my $self = shift;
|
||||
my $allowed_kind = \%{$self->{ALLOWED_KIND}};
|
||||
|
||||
|
@ -497,7 +505,7 @@ sub allow_kind {
|
|||
$$allowed_kind{$kind}++;
|
||||
}
|
||||
|
||||
sub is_limited_type {
|
||||
sub is_limited_type($$) {
|
||||
my $self = shift;
|
||||
my $allowed_modules_limited = \%{$self->{ALLOWED_MODULES_LIMITED}};
|
||||
|
||||
|
@ -506,7 +514,7 @@ sub is_limited_type {
|
|||
return $$allowed_modules_limited{$type};
|
||||
}
|
||||
|
||||
sub is_allowed_type_in_module {
|
||||
sub is_allowed_type_in_module($$) {
|
||||
my $self = shift;
|
||||
my $allowed_modules = \%{$self->{ALLOWED_MODULES}};
|
||||
my $allowed_modules_limited = \%{$self->{ALLOWED_MODULES_LIMITED}};
|
||||
|
@ -523,7 +531,7 @@ sub is_allowed_type_in_module {
|
|||
return 0;
|
||||
}
|
||||
|
||||
sub allow_type_in_module {
|
||||
sub allow_type_in_module($$) {
|
||||
my $self = shift;
|
||||
my $allowed_modules = \%{$self->{ALLOWED_MODULES}};
|
||||
|
||||
|
@ -535,7 +543,7 @@ sub allow_type_in_module {
|
|||
}
|
||||
}
|
||||
|
||||
sub type_used_in_module {
|
||||
sub type_used_in_module($$) {
|
||||
my $self = shift;
|
||||
my $used_modules = \%{$self->{USED_MODULES}};
|
||||
|
||||
|
@ -549,7 +557,7 @@ sub type_used_in_module {
|
|||
return ();
|
||||
}
|
||||
|
||||
sub types_not_used {
|
||||
sub types_not_used($) {
|
||||
my $self = shift;
|
||||
my $used_modules = \%{$self->{USED_MODULES}};
|
||||
my $allowed_modules = \%{$self->{ALLOWED_MODULES}};
|
||||
|
@ -565,7 +573,7 @@ sub types_not_used {
|
|||
return $not_used;
|
||||
}
|
||||
|
||||
sub types_unlimited_used_in_modules {
|
||||
sub types_unlimited_used_in_modules($) {
|
||||
my $self = shift;
|
||||
|
||||
my $used_modules = \%{$self->{USED_MODULES}};
|
||||
|
@ -589,7 +597,7 @@ sub types_unlimited_used_in_modules {
|
|||
return $used_types;
|
||||
}
|
||||
|
||||
sub translate_argument {
|
||||
sub translate_argument($$) {
|
||||
my $self = shift;
|
||||
my $translate_argument = \%{$self->{TRANSLATE_ARGUMENT}};
|
||||
|
||||
|
@ -598,7 +606,7 @@ sub translate_argument {
|
|||
return $$translate_argument{$type};
|
||||
}
|
||||
|
||||
sub declare_argument {
|
||||
sub declare_argument($$$) {
|
||||
my $self = shift;
|
||||
my $translate_argument = \%{$self->{TRANSLATE_ARGUMENT}};
|
||||
|
||||
|
@ -608,14 +616,14 @@ sub declare_argument {
|
|||
$$translate_argument{$type} = $kind;
|
||||
}
|
||||
|
||||
sub all_declared_types {
|
||||
sub all_declared_types($) {
|
||||
my $self = shift;
|
||||
my $translate_argument = \%{$self->{TRANSLATE_ARGUMENT}};
|
||||
|
||||
return sort(keys(%$translate_argument));
|
||||
}
|
||||
|
||||
sub is_allowed_type_format {
|
||||
sub is_allowed_type_format($$$$) {
|
||||
my $self = shift;
|
||||
my $type_format = \%{$self->{TYPE_FORMAT}};
|
||||
|
||||
|
@ -651,14 +659,14 @@ sub is_allowed_type_format {
|
|||
return 0;
|
||||
}
|
||||
|
||||
sub all_modules {
|
||||
sub all_modules($) {
|
||||
my $self = shift;
|
||||
my $modules = \%{$self->{MODULES}};
|
||||
|
||||
return sort(keys(%$modules));
|
||||
}
|
||||
|
||||
sub is_module {
|
||||
sub is_module($$) {
|
||||
my $self = shift;
|
||||
my $modules = \%{$self->{MODULES}};
|
||||
|
||||
|
@ -667,7 +675,7 @@ sub is_module {
|
|||
return $$modules{$name};
|
||||
}
|
||||
|
||||
sub module_file {
|
||||
sub module_file($$) {
|
||||
my $self = shift;
|
||||
|
||||
my $module = shift;
|
||||
|
@ -677,14 +685,14 @@ sub module_file {
|
|||
return $$module_files{$module};
|
||||
}
|
||||
|
||||
sub all_internal_functions {
|
||||
sub all_internal_functions($) {
|
||||
my $self = shift;
|
||||
my $function_internal_calling_convention = \%{$self->{FUNCTION_INTERNAL_CALLING_CONVENTION}};
|
||||
|
||||
return sort(keys(%$function_internal_calling_convention));
|
||||
}
|
||||
|
||||
sub all_internal_functions_in_module {
|
||||
sub all_internal_functions_in_module($$) {
|
||||
my $self = shift;
|
||||
my $function_internal_calling_convention = \%{$self->{FUNCTION_INTERNAL_CALLING_CONVENTION}};
|
||||
my $function_internal_module = \%{$self->{FUNCTION_INTERNAL_MODULE}};
|
||||
|
@ -701,14 +709,14 @@ sub all_internal_functions_in_module {
|
|||
return sort(@names);
|
||||
}
|
||||
|
||||
sub all_external_functions {
|
||||
sub all_external_functions($) {
|
||||
my $self = shift;
|
||||
my $function_external_name = \%{$self->{FUNCTION_EXTERNAL_NAME}};
|
||||
|
||||
return sort(keys(%$function_external_name));
|
||||
}
|
||||
|
||||
sub all_external_functions_in_module {
|
||||
sub all_external_functions_in_module($$) {
|
||||
my $self = shift;
|
||||
my $function_external_name = \%{$self->{FUNCTION_EXTERNAL_NAME}};
|
||||
my $function_external_module = \%{$self->{FUNCTION_EXTERNAL_MODULE}};
|
||||
|
@ -725,7 +733,7 @@ sub all_external_functions_in_module {
|
|||
return sort(@names);
|
||||
}
|
||||
|
||||
sub all_functions_in_module {
|
||||
sub all_functions_in_module($$) {
|
||||
my $self = shift;
|
||||
my $module_external_calling_convention = \%{$self->{MODULE_EXTERNAL_CALLING_CONVENTION}};
|
||||
|
||||
|
@ -734,7 +742,7 @@ sub all_functions_in_module {
|
|||
return sort(keys(%{$$module_external_calling_convention{$module}}));
|
||||
}
|
||||
|
||||
sub all_broken_forwards {
|
||||
sub all_broken_forwards($) {
|
||||
my $self = shift;
|
||||
my $function_forward = \%{$self->{FUNCTION_FORWARD}};
|
||||
|
||||
|
@ -755,7 +763,7 @@ sub all_broken_forwards {
|
|||
}
|
||||
|
||||
|
||||
sub function_internal_ordinal {
|
||||
sub function_internal_ordinal($$) {
|
||||
my $self = shift;
|
||||
my $function_internal_ordinal = \%{$self->{FUNCTION_INTERNAL_ORDINAL}};
|
||||
|
||||
|
@ -764,7 +772,7 @@ sub function_internal_ordinal {
|
|||
return $$function_internal_ordinal{$name};
|
||||
}
|
||||
|
||||
sub function_external_ordinal {
|
||||
sub function_external_ordinal($$) {
|
||||
my $self = shift;
|
||||
my $function_external_ordinal = \%{$self->{FUNCTION_EXTERNAL_ORDINAL}};
|
||||
|
||||
|
@ -773,7 +781,7 @@ sub function_external_ordinal {
|
|||
return $$function_external_ordinal{$name};
|
||||
}
|
||||
|
||||
sub function_internal_calling_convention {
|
||||
sub function_internal_calling_convention($$) {
|
||||
my $self = shift;
|
||||
my $function_internal_calling_convention = \%{$self->{FUNCTION_INTERNAL_CALLING_CONVENTION}};
|
||||
|
||||
|
@ -782,7 +790,7 @@ sub function_internal_calling_convention {
|
|||
return $$function_internal_calling_convention{$name};
|
||||
}
|
||||
|
||||
sub function_external_calling_convention {
|
||||
sub function_external_calling_convention($$) {
|
||||
my $self = shift;
|
||||
my $function_external_calling_convention = \%{$self->{FUNCTION_EXTERNAL_CALLING_CONVENTION}};
|
||||
|
||||
|
@ -791,7 +799,7 @@ sub function_external_calling_convention {
|
|||
return $$function_external_calling_convention{$name};
|
||||
}
|
||||
|
||||
sub function_external_calling_convention_in_module {
|
||||
sub function_external_calling_convention_in_module($$$) {
|
||||
my $self = shift;
|
||||
my $module_external_calling_convention = \%{$self->{MODULE_EXTERNAL_CALLING_CONVENTION}};
|
||||
|
||||
|
@ -801,7 +809,7 @@ sub function_external_calling_convention_in_module {
|
|||
return $$module_external_calling_convention{$module}{$name};
|
||||
}
|
||||
|
||||
sub function_internal_name {
|
||||
sub function_internal_name($$) {
|
||||
my $self = shift;
|
||||
my $function_internal_name = \%{$self->{FUNCTION_INTERNAL_NAME}};
|
||||
|
||||
|
@ -810,7 +818,7 @@ sub function_internal_name {
|
|||
return $$function_internal_name{$name};
|
||||
}
|
||||
|
||||
sub function_external_name {
|
||||
sub function_external_name($$) {
|
||||
my $self = shift;
|
||||
my $function_external_name = \%{$self->{FUNCTION_EXTERNAL_NAME}};
|
||||
|
||||
|
@ -819,7 +827,7 @@ sub function_external_name {
|
|||
return $$function_external_name{$name};
|
||||
}
|
||||
|
||||
sub function_forward_final_destination {
|
||||
sub function_forward_final_destination($$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $function_forward = \%{$self->{FUNCTION_FORWARD}};
|
||||
|
@ -836,7 +844,7 @@ sub function_forward_final_destination {
|
|||
return ($forward_module, $forward_name);
|
||||
}
|
||||
|
||||
sub is_function {
|
||||
sub is_function($$) {
|
||||
my $self = shift;
|
||||
my $function_internal_calling_convention = \%{$self->{FUNCTION_INTERNAL_CALLING_CONVENTION}};
|
||||
|
||||
|
@ -845,14 +853,14 @@ sub is_function {
|
|||
return $$function_internal_calling_convention{$name};
|
||||
}
|
||||
|
||||
sub all_shared_internal_functions {
|
||||
sub all_shared_internal_functions($$) {
|
||||
my $self = shift;
|
||||
my $function_shared = \%{$self->{FUNCTION_SHARED}};
|
||||
|
||||
return sort(keys(%$function_shared));
|
||||
}
|
||||
|
||||
sub is_shared_internal_function {
|
||||
sub is_shared_internal_function($$) {
|
||||
my $self = shift;
|
||||
my $function_shared = \%{$self->{FUNCTION_SHARED}};
|
||||
|
||||
|
@ -861,7 +869,7 @@ sub is_shared_internal_function {
|
|||
return $$function_shared{$name};
|
||||
}
|
||||
|
||||
sub found_shared_internal_function {
|
||||
sub found_shared_internal_function($$) {
|
||||
my $self = shift;
|
||||
my $function_shared = \%{$self->{FUNCTION_SHARED}};
|
||||
|
||||
|
@ -870,7 +878,7 @@ sub found_shared_internal_function {
|
|||
$$function_shared{$name} = 1;
|
||||
}
|
||||
|
||||
sub function_internal_arguments {
|
||||
sub function_internal_arguments($$) {
|
||||
my $self = shift;
|
||||
my $function_internal_arguments = \%{$self->{FUNCTION_INTERNAL_ARGUMENTS}};
|
||||
|
||||
|
@ -879,7 +887,7 @@ sub function_internal_arguments {
|
|||
return $$function_internal_arguments{$name};
|
||||
}
|
||||
|
||||
sub function_external_arguments {
|
||||
sub function_external_arguments($$) {
|
||||
my $self = shift;
|
||||
my $function_external_arguments = \%{$self->{FUNCTION_EXTERNAL_ARGUMENTS}};
|
||||
|
||||
|
@ -888,7 +896,7 @@ sub function_external_arguments {
|
|||
return $$function_external_arguments{$name};
|
||||
}
|
||||
|
||||
sub function_internal_module {
|
||||
sub function_internal_module($$) {
|
||||
my $self = shift;
|
||||
my $function_internal_module = \%{$self->{FUNCTION_INTERNAL_MODULE}};
|
||||
|
||||
|
@ -897,7 +905,7 @@ sub function_internal_module {
|
|||
return $$function_internal_module{$name};
|
||||
}
|
||||
|
||||
sub function_external_module {
|
||||
sub function_external_module($$) {
|
||||
my $self = shift;
|
||||
my $function_external_module = \%{$self->{FUNCTION_EXTERNAL_MODULE}};
|
||||
|
||||
|
@ -906,7 +914,7 @@ sub function_external_module {
|
|||
return $$function_external_module{$name};
|
||||
}
|
||||
|
||||
sub function_wine_extension {
|
||||
sub function_wine_extension($$$) {
|
||||
my $self = shift;
|
||||
my $function_wine_extension = \%{$self->{FUNCTION_WINE_EXTENSION}};
|
||||
|
||||
|
@ -916,7 +924,7 @@ sub function_wine_extension {
|
|||
return $$function_wine_extension{$module}{$name};
|
||||
}
|
||||
|
||||
sub is_function_stub {
|
||||
sub is_function_stub($$$) {
|
||||
my $self = shift;
|
||||
my $module_external_calling_convention = \%{$self->{MODULE_EXTERNAL_CALLING_CONVENTION}};
|
||||
|
||||
|
@ -929,7 +937,7 @@ sub is_function_stub {
|
|||
return 0;
|
||||
}
|
||||
|
||||
sub is_function_stub_in_module {
|
||||
sub is_function_stub_in_module($$$) {
|
||||
my $self = shift;
|
||||
my $module_external_calling_convention = \%{$self->{MODULE_EXTERNAL_CALLING_CONVENTION}};
|
||||
|
||||
|
@ -946,7 +954,7 @@ sub is_function_stub_in_module {
|
|||
# class methods
|
||||
#
|
||||
|
||||
sub _get_all_module_internal_ordinal {
|
||||
sub _get_all_module_internal_ordinal($$) {
|
||||
my $winapi = shift;
|
||||
my $internal_name = shift;
|
||||
|
||||
|
@ -986,24 +994,24 @@ sub _get_all_module_internal_ordinal {
|
|||
return @entries;
|
||||
}
|
||||
|
||||
sub get_all_module_internal_ordinal16 {
|
||||
return _get_all_module_internal_ordinal($win16api, @_);
|
||||
sub get_all_module_internal_ordinal16($) {
|
||||
return _get_all_module_internal_ordinal($win16api, $_[0]);
|
||||
}
|
||||
|
||||
sub get_all_module_internal_ordinal32 {
|
||||
return _get_all_module_internal_ordinal($win32api, @_);
|
||||
sub get_all_module_internal_ordinal32($) {
|
||||
return _get_all_module_internal_ordinal($win32api, $_[0]);
|
||||
}
|
||||
|
||||
sub get_all_module_internal_ordinal {
|
||||
sub get_all_module_internal_ordinal($) {
|
||||
my @entries = ();
|
||||
foreach my $winapi (@winapis) {
|
||||
push @entries, _get_all_module_internal_ordinal($winapi, @_);
|
||||
push @entries, _get_all_module_internal_ordinal($winapi, $_[0]);
|
||||
}
|
||||
|
||||
return @entries;
|
||||
}
|
||||
|
||||
sub _get_all_module_external_ordinal {
|
||||
sub _get_all_module_external_ordinal($$) {
|
||||
my $winapi = shift;
|
||||
my $external_name = shift;
|
||||
|
||||
|
@ -1043,18 +1051,18 @@ sub _get_all_module_external_ordinal {
|
|||
return @entries;
|
||||
}
|
||||
|
||||
sub get_all_module_external_ordinal16 {
|
||||
return _get_all_module_external_ordinal($win16api, @_);
|
||||
sub get_all_module_external_ordinal16($) {
|
||||
return _get_all_module_external_ordinal($win16api, $_[0]);
|
||||
}
|
||||
|
||||
sub get_all_module_external_ordinal32 {
|
||||
return _get_all_module_external_ordinal($win32api, @_);
|
||||
sub get_all_module_external_ordinal32($) {
|
||||
return _get_all_module_external_ordinal($win32api, $_[0]);
|
||||
}
|
||||
|
||||
sub get_all_module_external_ordinal {
|
||||
sub get_all_module_external_ordinal($) {
|
||||
my @entries = ();
|
||||
foreach my $winapi (@winapis) {
|
||||
push @entries, _get_all_module_external_ordinal($winapi, @_);
|
||||
push @entries, _get_all_module_external_ordinal($winapi, $_[0]);
|
||||
}
|
||||
|
||||
return @entries;
|
||||
|
|
|
@ -165,7 +165,7 @@ use base qw(_options);
|
|||
|
||||
use strict;
|
||||
|
||||
sub report_module {
|
||||
sub report_module($$) {
|
||||
my $self = shift;
|
||||
my $refvalue = $self->{MODULE};
|
||||
|
||||
|
@ -178,7 +178,7 @@ sub report_module {
|
|||
}
|
||||
}
|
||||
|
||||
sub report_argument_forbidden {
|
||||
sub report_argument_forbidden($$) {
|
||||
my $self = shift;
|
||||
my $refargument_forbidden = $self->{ARGUMENT_FORBIDDEN};
|
||||
|
||||
|
@ -187,7 +187,7 @@ sub report_argument_forbidden {
|
|||
return $$refargument_forbidden->{active} && (!$$refargument_forbidden->{filter} || $$refargument_forbidden->{hash}->{$type});
|
||||
}
|
||||
|
||||
sub report_argument_kind {
|
||||
sub report_argument_kind($$) {
|
||||
my $self = shift;
|
||||
my $refargument_kind = $self->{ARGUMENT_KIND};
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ if($options->progress) {
|
|||
########################################################################
|
||||
# cleanup_file
|
||||
|
||||
sub cleanup_file {
|
||||
sub cleanup_file($$$) {
|
||||
local *IN = shift;
|
||||
local *OUT = shift;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ BEGIN {
|
|||
}
|
||||
|
||||
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
|
||||
);
|
||||
use output qw($output);
|
||||
|
@ -99,7 +99,7 @@ if($options->spec_files || $options->winetest) {
|
|||
|
||||
my %specifications;
|
||||
|
||||
sub documentation_specifications {
|
||||
sub documentation_specifications($) {
|
||||
my $function = shift;
|
||||
|
||||
my @debug_channels = @{$function->debug_channels};
|
||||
|
@ -161,7 +161,7 @@ sub documentation_specifications {
|
|||
|
||||
my %module_pseudo_stub;
|
||||
|
||||
sub statements_pseudo_stub {
|
||||
sub statements_pseudo_stub($) {
|
||||
my $function = shift;
|
||||
|
||||
my $pseudo_stub = 0;
|
||||
|
@ -415,7 +415,7 @@ if($options->implemented && !$options->pseudo_implemented) {
|
|||
}
|
||||
}
|
||||
|
||||
sub output_function {
|
||||
sub output_function($$$$$) {
|
||||
local *OUT = shift;
|
||||
my $type = shift;
|
||||
my $ordinal = shift;
|
||||
|
|
|
@ -25,10 +25,10 @@ BEGIN {
|
|||
}
|
||||
|
||||
use config qw(
|
||||
&file_type &files_filter
|
||||
&file_skip &files_skip
|
||||
&file_normalize
|
||||
&get_spec_files
|
||||
file_type files_filter
|
||||
file_skip files_skip
|
||||
file_normalize
|
||||
get_spec_files
|
||||
$current_dir $wine_dir $winapi_dir $winapi_check_dir
|
||||
);
|
||||
use output qw($output);
|
||||
|
@ -44,9 +44,9 @@ use winapi_c_parser;
|
|||
use c_parser;
|
||||
use type;
|
||||
|
||||
use winapi_fixup_documentation qw(&fixup_documentation);
|
||||
use winapi_fixup_documentation qw(fixup_documentation);
|
||||
use winapi_fixup_editor;
|
||||
use winapi_fixup_statements qw(&fixup_statements);
|
||||
use winapi_fixup_statements qw(fixup_statements);
|
||||
|
||||
my @c_files = $options->c_files;
|
||||
@c_files = files_skip(@c_files);
|
||||
|
|
|
@ -25,7 +25,7 @@ require Exporter;
|
|||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw();
|
||||
@EXPORT_OK = qw(&fixup_documentation);
|
||||
@EXPORT_OK = qw(fixup_documentation);
|
||||
|
||||
use config qw($current_dir $wine_dir);
|
||||
use modules qw($modules);
|
||||
|
@ -35,7 +35,7 @@ use winapi qw($win16api $win32api @winapis);
|
|||
|
||||
my %documentation_line_used;
|
||||
|
||||
sub fixup_documentation {
|
||||
sub fixup_documentation($$) {
|
||||
my $function = shift;
|
||||
my $editor = shift;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ use winapi qw($win16api $win32api @winapis);
|
|||
|
||||
use util;
|
||||
|
||||
sub new {
|
||||
sub new($$) {
|
||||
my $proto = shift;
|
||||
my $class = ref($proto) || $proto;
|
||||
my $self = {};
|
||||
|
@ -39,7 +39,7 @@ sub new {
|
|||
return $self;
|
||||
}
|
||||
|
||||
sub add_trigger {
|
||||
sub add_trigger($$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $triggers = \%{$self->{TRIGGERS}};
|
||||
|
@ -54,7 +54,7 @@ sub add_trigger {
|
|||
push @{$$triggers{$line}}, $action;
|
||||
}
|
||||
|
||||
sub replace {
|
||||
sub replace($$$$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $begin_line = shift;
|
||||
|
@ -78,7 +78,7 @@ sub replace {
|
|||
});
|
||||
}
|
||||
|
||||
sub flush {
|
||||
sub flush($) {
|
||||
my $self = shift;
|
||||
|
||||
my $file = \${$self->{FILE}};
|
||||
|
@ -189,7 +189,7 @@ my %delete_line;
|
|||
|
||||
my %spec_file;
|
||||
|
||||
sub flush_old {
|
||||
sub flush_old($) {
|
||||
my $self = shift;
|
||||
|
||||
my $file = ${$self->{FILE}};
|
||||
|
@ -357,7 +357,7 @@ sub flush_old {
|
|||
%spec_file = ();
|
||||
}
|
||||
|
||||
sub delete_line {
|
||||
sub delete_line($$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $line = shift;
|
||||
|
@ -366,7 +366,7 @@ sub delete_line {
|
|||
$delete_line{$line} = $pattern;
|
||||
}
|
||||
|
||||
sub insert_line {
|
||||
sub insert_line($$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $line = shift;
|
||||
|
@ -375,7 +375,7 @@ sub insert_line {
|
|||
$insert_line{$line} = $insert;
|
||||
}
|
||||
|
||||
sub substitute_line {
|
||||
sub substitute_line($$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $line = shift;
|
||||
|
@ -386,7 +386,7 @@ sub substitute_line {
|
|||
$substitute_line{$line}{replace} = $replace;
|
||||
}
|
||||
|
||||
sub replace_spec_file {
|
||||
sub replace_spec_file($$$$) {
|
||||
my $self = shift;
|
||||
|
||||
my $module = shift;
|
||||
|
|
|
@ -25,7 +25,7 @@ require Exporter;
|
|||
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw();
|
||||
@EXPORT_OK = qw(&fixup_statements);
|
||||
@EXPORT_OK = qw(fixup_statements);
|
||||
|
||||
use config qw($wine_dir);
|
||||
use options qw($options);
|
||||
|
@ -33,15 +33,15 @@ use output qw($output);
|
|||
|
||||
use c_parser;
|
||||
use winapi_module_user qw(
|
||||
&get_message_result_kind
|
||||
&get_message_wparam_kind
|
||||
&get_message_lparam_kind
|
||||
get_message_result_kind
|
||||
get_message_wparam_kind
|
||||
get_message_lparam_kind
|
||||
);
|
||||
|
||||
########################################################################
|
||||
# fixup_function_call
|
||||
|
||||
sub fixup_function_call {
|
||||
sub fixup_function_call($$) {
|
||||
my $name = shift;
|
||||
my @arguments = @{(shift)};;
|
||||
|
||||
|
@ -51,7 +51,7 @@ sub fixup_function_call {
|
|||
########################################################################
|
||||
# _parse_makelong
|
||||
|
||||
sub _parse_makelong {
|
||||
sub _parse_makelong($) {
|
||||
local $_ = shift;
|
||||
|
||||
my $low;
|
||||
|
@ -88,7 +88,7 @@ sub _parse_makelong {
|
|||
########################################################################
|
||||
# fixup_function_call_2_windowsx
|
||||
|
||||
sub fixup_user_message_2_windowsx {
|
||||
sub fixup_user_message_2_windowsx($$) {
|
||||
my $name = shift;
|
||||
(my $hwnd, my $msg, my $wparam, my $lparam) = @{(shift)};
|
||||
|
||||
|
@ -182,7 +182,7 @@ sub fixup_user_message_2_windowsx {
|
|||
########################################################################
|
||||
# _get_messages
|
||||
|
||||
sub _get_messages {
|
||||
sub _get_messages($) {
|
||||
local $_ = shift;
|
||||
|
||||
if(/^(?:BM|CB|EM|LB|STM|WM)_\w+(.*?)$/) {
|
||||
|
@ -206,7 +206,7 @@ sub _get_messages {
|
|||
########################################################################
|
||||
# _fixup_user_message
|
||||
|
||||
sub _fixup_user_message {
|
||||
sub _fixup_user_message($$) {
|
||||
my $name = shift;
|
||||
(my $hwnd, my $msg, my $wparam, my $lparam) = @{(shift)};
|
||||
|
||||
|
@ -215,14 +215,14 @@ sub _fixup_user_message {
|
|||
my $wkind;
|
||||
my $lkind;
|
||||
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) {
|
||||
$output->write("messsages used together do not have the same type\n");
|
||||
} else {
|
||||
$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) {
|
||||
$output->write("messsages used together do not have the same type\n");
|
||||
} else {
|
||||
|
@ -274,7 +274,7 @@ sub _fixup_user_message {
|
|||
########################################################################
|
||||
# fixup_statements
|
||||
|
||||
sub fixup_statements {
|
||||
sub fixup_statements($$) {
|
||||
my $function = shift;
|
||||
my $editor = shift;
|
||||
|
||||
|
|
|
@ -26,13 +26,13 @@ require Exporter;
|
|||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw();
|
||||
@EXPORT_OK = qw(
|
||||
&is_user_function
|
||||
&get_message_result_type
|
||||
&get_message_result_kind
|
||||
&get_message_wparam_type
|
||||
&get_message_wparam_kind
|
||||
&get_message_lparam_type
|
||||
&get_message_lparam_kind
|
||||
is_user_function
|
||||
get_message_result_type
|
||||
get_message_result_kind
|
||||
get_message_wparam_type
|
||||
get_message_wparam_kind
|
||||
get_message_lparam_type
|
||||
get_message_lparam_kind
|
||||
);
|
||||
|
||||
use config qw($wine_dir);
|
||||
|
@ -48,7 +48,7 @@ my $message;
|
|||
########################################################################
|
||||
# is_user_function
|
||||
|
||||
sub is_user_function {
|
||||
sub is_user_function($) {
|
||||
my $name = shift;
|
||||
if($name =~ /^(?:DefWindowProc|SendMessage)[AW]?$/) {
|
||||
}
|
||||
|
@ -558,7 +558,7 @@ $message = {
|
|||
########################################################################
|
||||
# _get_kind
|
||||
|
||||
sub _get_kind {
|
||||
sub _get_kind($) {
|
||||
local $_ = shift;
|
||||
|
||||
if(!$_) {
|
||||
|
@ -575,7 +575,7 @@ sub _get_kind {
|
|||
########################################################################
|
||||
# get_message_result_type
|
||||
|
||||
sub get_message_result_type {
|
||||
sub get_message_result_type($) {
|
||||
my $name = shift;
|
||||
return $$message{$name}{result};
|
||||
}
|
||||
|
@ -583,14 +583,14 @@ sub get_message_result_type {
|
|||
########################################################################
|
||||
# get_message_result_kind
|
||||
|
||||
sub get_message_result_kind {
|
||||
sub get_message_result_kind(@) {
|
||||
return _get_kind(get_message_result_type(@_));
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# get_message_wparam_type
|
||||
|
||||
sub get_message_wparam_type {
|
||||
sub get_message_wparam_type($) {
|
||||
my $name = shift;
|
||||
return $$message{$name}{wparam};
|
||||
}
|
||||
|
@ -598,14 +598,14 @@ sub get_message_wparam_type {
|
|||
########################################################################
|
||||
# get_message_wparam_kind
|
||||
|
||||
sub get_message_wparam_kind {
|
||||
sub get_message_wparam_kind(@) {
|
||||
return _get_kind(get_message_wparam_type(@_));
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# get_message_lparam_type
|
||||
|
||||
sub get_message_lparam_type {
|
||||
sub get_message_lparam_type($) {
|
||||
my $name = shift;
|
||||
return $$message{$name}{lparam};
|
||||
}
|
||||
|
@ -613,14 +613,14 @@ sub get_message_lparam_type {
|
|||
########################################################################
|
||||
# get_message_lparam_kind
|
||||
|
||||
sub get_message_lparam_kind {
|
||||
sub get_message_lparam_kind(@) {
|
||||
return _get_kind(get_message_lparam_type(@_));
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# _parse_file
|
||||
|
||||
sub _parse_file {
|
||||
sub _parse_file($$$) {
|
||||
my $file = shift;
|
||||
my $found_preprocessor = shift;
|
||||
my $found_comment = shift;
|
||||
|
@ -666,7 +666,7 @@ sub _parse_file {
|
|||
########################################################################
|
||||
# _get_tuple_arguments
|
||||
|
||||
sub _get_tuple_arguments {
|
||||
sub _get_tuple_arguments($) {
|
||||
local $_ = shift;
|
||||
|
||||
my $parser = new c_parser;
|
||||
|
@ -688,7 +688,7 @@ sub _get_tuple_arguments {
|
|||
# _parse_windowsx_h
|
||||
|
||||
|
||||
sub _parse_windowsx_h {
|
||||
sub _parse_windowsx_h($$$) {
|
||||
my $last_comment;
|
||||
|
||||
my $found_preprocessor = sub {
|
||||
|
@ -867,7 +867,7 @@ sub _parse_windowsx_h {
|
|||
########################################################################
|
||||
# _parse_winuser_h
|
||||
|
||||
sub _parse_winuser_h {
|
||||
sub _parse_winuser_h($$$) {
|
||||
my %not_found = ();
|
||||
|
||||
my $found_preprocessor = sub {
|
||||
|
|
|
@ -25,7 +25,7 @@ BEGIN {
|
|||
}
|
||||
|
||||
use config qw(
|
||||
&file_type &files_skip &files_filter
|
||||
file_type files_skip files_filter
|
||||
$current_dir $wine_dir $winapi_dir $winapi_check_dir
|
||||
);
|
||||
use output qw($output);
|
||||
|
@ -172,7 +172,7 @@ my %align_kludge_reported = ("FILETIME" => 1, "LARGE_INTEGER" => 1);
|
|||
my %size_kludge_reported = ("FILETIME" => 1, "LARGE_INTEGER" => 1);
|
||||
my %size_parse_reported;
|
||||
|
||||
sub _find_align_kind_size {
|
||||
sub _find_align_kind_size($) {
|
||||
my $type_name = shift;
|
||||
|
||||
local $_ = $type_name;
|
||||
|
@ -309,26 +309,26 @@ sub _find_align_kind_size {
|
|||
return ($align, $kind, $size);
|
||||
}
|
||||
|
||||
sub find_align {
|
||||
sub find_align($) {
|
||||
my $type_name = shift;
|
||||
(my $align, my $kind, my $size) = _find_align_kind_size($type_name);
|
||||
return $align;
|
||||
}
|
||||
|
||||
sub find_kind {
|
||||
sub find_kind($) {
|
||||
my $type_name = shift;
|
||||
(my $align, my $kind, my $size) = _find_align_kind_size($type_name);
|
||||
|
||||
return $kind;
|
||||
}
|
||||
|
||||
sub find_size {
|
||||
sub find_size($) {
|
||||
my $type_name = shift;
|
||||
(my $align, my $kind, my $size) = _find_align_kind_size($type_name);
|
||||
return $size;
|
||||
}
|
||||
|
||||
sub find_count {
|
||||
sub find_count($) {
|
||||
my $count = shift;
|
||||
return $defines{$count};
|
||||
}
|
||||
|
@ -454,7 +454,7 @@ foreach my $file (@files) {
|
|||
########################################################################
|
||||
# output_header
|
||||
|
||||
sub output_header {
|
||||
sub output_header($$$) {
|
||||
local *OUT = shift;
|
||||
|
||||
my $test_dir = shift;
|
||||
|
@ -595,7 +595,7 @@ sub output_header {
|
|||
########################################################################
|
||||
# output_footer
|
||||
|
||||
sub output_footer {
|
||||
sub output_footer($$$) {
|
||||
local *OUT = shift;
|
||||
|
||||
my $test_dir = shift;
|
||||
|
@ -612,7 +612,7 @@ sub output_footer {
|
|||
########################################################################
|
||||
# output_test_pack_type
|
||||
|
||||
sub output_test_pack_type {
|
||||
sub output_test_pack_type($$$$$$) {
|
||||
local *OUT = shift;
|
||||
|
||||
my $type_name2type = shift;
|
||||
|
@ -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;
|
||||
|
||||
my $type_name2type = shift;
|
||||
|
@ -745,7 +746,7 @@ sub output_test_pack_fields {
|
|||
########################################################################
|
||||
# output_test_pack
|
||||
|
||||
sub output_test_pack {
|
||||
sub output_test_pack($$$$) {
|
||||
local *OUT = shift;
|
||||
|
||||
my $test_dir = shift;
|
||||
|
@ -812,7 +813,7 @@ sub output_test_pack {
|
|||
########################################################################
|
||||
# output_file
|
||||
|
||||
sub output_file {
|
||||
sub output_file($$$$) {
|
||||
local *OUT = shift;
|
||||
|
||||
my $test_dir = shift;
|
||||
|
|
Loading…
Reference in New Issue