Yet another major reorganization and a few new features.
diff --git a/tools/winapi_check/winapi_check b/tools/winapi_check/winapi_check
index d79be72..0c64082 100755
--- a/tools/winapi_check/winapi_check
+++ b/tools/winapi_check/winapi_check
@@ -26,7 +26,7 @@
);
use modules;
use nativeapi;
-use output;
+use output qw($output);
use preprocessor;
use util qw(&is_subset);
use winapi;
@@ -34,21 +34,9 @@
use winapi_function;
use winapi_local;
use winapi_global;
-use winapi_options;
+use winapi_check_options qw($options);
use winapi_parser;
-my $output = 'output'->new;
-
-my $options = winapi_options->new($output, \@ARGV, $wine_dir);
-if(!defined($options)) {
- $output->write("usage: winapi_check [--help] [<files>]\n");
-
- exit 1;
-} elsif($options->help) {
- $options->show_help;
- exit;
-}
-
my $modules = 'modules'->new($options, $output, $wine_dir, $current_dir, \&file_type, "$winapi_check_dir/modules.dat");
my $win16api = 'winapi'->new($options, $output, "win16", "$winapi_check_dir/win16");
@@ -140,10 +128,12 @@
my $found_function = sub {
my $function = shift;
- $output->prefix($function->prefix);
+ $output->prefix_callback(sub { return $function->prefix; });
my $function_line = $function->function_line;
+ my $linkage = $function->linkage;
my $internal_name = $function->internal_name;
+ my $external_name = $function->external_name;
my $statements = $function->statements;
if($options->headers_misplaced &&
@@ -154,7 +144,9 @@
$output->write("declaration misplaced\n");
}
- if(!defined($statements)) {
+ if(defined($external_name) && !defined($statements) &&
+ ($linkage eq "" || $linkage eq "extern"))
+ {
my $previous_function = $declared_functions{$internal_name};
if(!defined($previous_function)) {
$declared_functions{$internal_name} = $function;
@@ -171,7 +163,7 @@
my $argument = shift;
};
- winapi_parser::parse_c_file $options, $output, $file, $found_function, $found_preprocessor;
+ &winapi_parser::parse_c_file($options, $file, $found_function, $found_preprocessor);
}
}
@@ -182,6 +174,8 @@
my %functions = ();
my %includes = ();
+ $includes{$file}++;
+
my $file_module16 = $modules->allowed_modules_in_file("$current_dir/$file");
my $file_module32 = $modules->allowed_modules_in_file("$current_dir/$file");
@@ -198,7 +192,7 @@
my $found_function = sub {
my $function = shift;
- $output->prefix($function->prefix);
+ $output->prefix_callback(sub { return $function->prefix; });
my $internal_name = $function->internal_name;
$functions{$internal_name} = $function;
@@ -210,20 +204,44 @@
my $linkage = $function->linkage;
my $return_type = $function->return_type;
my $calling_convention = $function->calling_convention;
- my @argument_types = @{$function->argument_types};
- my @argument_names = @{$function->argument_names};
- my @argument_documentations = @{$function->argument_documentations};
my $statements = $function->statements;
my $module16 = $function->module16;
my $module32 = $function->module32;
+ my $external_name = $function->external_name;
my $external_name16 = $function->external_name16;
my $external_name32 = $function->external_name32;
+ if(defined($external_name) && !defined($statements) &&
+ ($linkage eq "" || $linkage eq "extern"))
+ {
+ my $previous_function = $declared_functions{$internal_name};
+ if(!defined($previous_function)) {
+ $declared_functions{$internal_name} = $function;
+ } else {
+ my $file = $previous_function->file;
+ my $function_line = $previous_function->function_line;
+
+ my $header = $file;
+ $header =~ s%^(include|$file_dir)/%%;
+ if($header !~ m%^msvcrt/% || $file_dir =~ m%^dlls/msvcrt%) {
+ $output->write("duplicate declaration (first declaration at $file:$function_line)\n");
+ }
+ }
+ }
+
foreach my $module ($function->modules) {
$module2functions{$module}{$internal_name} = $function;
- for my $type ($return_type, @argument_types) {
+
+ my @types = ($return_type);
+
+ my $refargument_types = $function->argument_types;
+ if(defined($refargument_types)) {
+ push @types, @$refargument_types;
+ }
+
+ for my $type (@types) {
$type_found{$module}{$type}++;
}
}
@@ -240,16 +258,36 @@
}
}
- if($options->headers_needed && defined($declared_function)) {
+ if($options->headers && $options->headers_needed &&
+ defined($declared_function) && defined($external_name) &&
+ defined($statements))
+ {
my $needed_include = $declared_function->file;
if(!defined($includes{$needed_include})) {
my $header = $needed_include;
$header =~ s%^(include|$file_dir)/%%;
- $output->write("prototype not included: #include \"$header\" is needed\n");
+ if($header !~ m%^msvcrt/% || $file_dir =~ m%^dlls/msvcrt%) {
+ $output->write("prototype not included: #include \"$header\" is needed\n");
+ }
}
}
+ if($options->local && $options->argument) {
+ &winapi_local::check_function($function);
+ }
+
+ if($options->local && $options->statements) {
+ &winapi_local::check_statements(\%functions, $function);
+ }
+
+ if($options->local && $options->documentation &&
+ (defined($module16) || defined($module32)) &&
+ $linkage ne "static" && ($linkage ne "" || defined($statements)))
+ {
+ &winapi_documentation::check_documentation($function);
+ }
+
if(1) {
# FIXME: Not correct
if(defined($external_name16)) {
@@ -316,36 +354,9 @@
}
}
}
-
- if($options->local && $options->argument) {
- if($options->win16 && $options->report_module($module16)) {
- winapi_local::check_function $options, $output,
- $return_type, $calling_convention, $external_name16, $internal_name, [@argument_types], $nativeapi, $win16api;
- }
- if($options->win32 && $options->report_module($module32)) {
- winapi_local::check_function $options, $output,
- $return_type, $calling_convention, $external_name32, $internal_name, [@argument_types], $nativeapi, $win32api;
- }
- }
-
- if($options->local && $options->statements) {
- if($options->win16 && $options->report_module($module16)) {
- winapi_local::check_statements $options, $output, $win16api, \%functions, $function;
- }
-
- if($options->win32 && $options->report_module($module32)) {
- winapi_local::check_statements $options, $output, $win32api, \%functions, $function;
- }
- }
-
- if($options->local && $options->documentation &&
- (defined($module16) || defined($module32)) &&
- $linkage ne "static" && ($linkage ne "" || defined($statements)))
- {
- winapi_documentation::check_documentation $options, $output, $win16api, $win32api, $modules, $function;
- }
- $output->prefix("");
}
+
+ $output->prefix("");
};
my $config = 0;
@@ -500,7 +511,7 @@
}
};
- winapi_parser::parse_c_file $options, $output, $file, $found_function, $found_preprocessor;
+ &winapi_parser::parse_c_file($options, $file, $found_function, $found_preprocessor);
if($options->config_unnessary) {
if($config && $conditional == 0) {
@@ -508,7 +519,7 @@
}
}
- winapi_local::check_file $options, $output, $file, \%functions;
+ &winapi_local::check_file($file, \%functions);
}
$output->hide_progress;
@@ -565,7 +576,7 @@
}
if($options->global) {
- winapi_documentation::report_documentation $options, $output;
+ &winapi_documentation::report_documentation;
if($options->headers_unused) {
foreach my $name (sort(keys(%include2info))) {
@@ -577,8 +588,7 @@
}
}
- winapi_global::check $options, $output, $win16api, $nativeapi, \%type_found if $options->win16;
- winapi_global::check $options, $output, $win32api, $nativeapi, \%type_found if $options->win32;
+ &winapi_global::check(\%type_found);
$modules->global_report;
$nativeapi->global_report;
diff --git a/tools/winapi_check/winapi_documentation.pm b/tools/winapi_check/winapi_documentation.pm
index 36eb438..695f11a 100644
--- a/tools/winapi_check/winapi_documentation.pm
+++ b/tools/winapi_check/winapi_documentation.pm
@@ -3,7 +3,11 @@
use strict;
use config qw($current_dir $wine_dir);
+use modules qw($modules);
use nativeapi qw($nativeapi);
+use options qw($options);
+use output qw($output);
+use winapi qw($win16api $win32api @winapis);
my %comment_width;
my %comment_indent;
@@ -12,11 +16,6 @@
sub check_documentation {
local $_;
- my $options = shift;
- my $output = shift;
- my $win16api = shift;
- my $win32api = shift;
- my $modules = shift;
my $function = shift;
my $file = $function->file;
@@ -29,7 +28,6 @@
my $ordinal32 = $function->ordinal32;
my $documentation = $function->documentation;
my $documentation_line = $function->documentation_line;
- my @argument_documentations = @{$function->argument_documentations};
my $documentation_error = 0;
my $documentation_warning = 0;
@@ -159,12 +157,16 @@
}
if($options->documentation_arguments) {
- my $n = 0;
- for my $argument_documentation (@argument_documentations) {
- $n++;
- if($argument_documentation ne "") {
- if($argument_documentation !~ /^\/\*\s+\[(?:in|out|in\/out|\?\?\?)\].*?\*\/$/s) {
- $output->write("argument $n documentation: \\\n$argument_documentation\n");
+ my $refargument_documentations = $function->argument_documentations;
+
+ if(defined($refargument_documentations)) {
+ my $n = 0;
+ for my $argument_documentation (@$refargument_documentations) {
+ $n++;
+ if($argument_documentation ne "") {
+ if($argument_documentation !~ /^\/\*\s+\[(?:in|out|in\/out|\?\?\?)\].*?\*\/$/s) {
+ $output->write("argument $n documentation: \\\n$argument_documentation\n");
+ }
}
}
}
@@ -172,9 +174,6 @@
}
sub report_documentation {
- my $options = shift;
- my $output = shift;
-
if($options->documentation_comment_indent) {
foreach my $indent (sort(keys(%comment_indent))) {
my $count = $comment_indent{$indent};
diff --git a/tools/winapi_check/winapi_function.pm b/tools/winapi_check/winapi_function.pm
index a43ff57..6a3d0ec 100644
--- a/tools/winapi_check/winapi_function.pm
+++ b/tools/winapi_check/winapi_function.pm
@@ -74,13 +74,27 @@
}
}
+sub external_name {
+ my $self = shift;
+
+ foreach my $winapi (@winapis) {
+ my $external_name = $self->_external_name($winapi, @_);
+
+ if(defined($external_name)) {
+ return $external_name;
+ }
+ }
+
+ return undef;
+}
+
sub external_name16 { my $self = shift; return $self->_external_name($win16api, @_); }
sub external_name32 { my $self = shift; return $self->_external_name($win32api, @_); }
sub external_names16 { my $self = shift; return $self->_external_names($win16api, @_); }
sub external_names32 { my $self = shift; return $self->_external_names($win32api, @_); }
-sub external_names { my $self = shift; return ($self->external_names16,$self->external_names32); }
+sub external_names { my $self = shift; return ($self->external_names16, $self->external_names32); }
########################################################################
# module
@@ -201,10 +215,14 @@
my $return_type = $self->return_type;
my $internal_name = $self->internal_name;
my $calling_convention = $self->calling_convention;
- my @argument_types = @{$self->argument_types};
- if($#argument_types < 0) {
- @argument_types = ("void");
+ my $refargument_types = $self->argument_types;
+ my @argument_types = ();
+ if(defined($refargument_types)) {
+ @argument_types = @$refargument_types;
+ if($#argument_types < 0) {
+ @argument_types = ("void");
+ }
}
my $prefix = "";
@@ -326,10 +344,14 @@
sub _argument_kinds {
my $self = shift;
my $winapi = shift;
- my @argument_types = @{$self->argument_types};
+ my $refargument_types = $self->argument_types;
+
+ if(!defined($refargument_types)) {
+ return undef;
+ }
my @argument_kinds;
- foreach my $argument_type (@argument_types) {
+ foreach my $argument_type (@$refargument_types) {
my $argument_kind = $winapi->translate_argument($argument_type);
if(defined($argument_kind) && $argument_kind eq "longlong") {
diff --git a/tools/winapi_check/winapi_global.pm b/tools/winapi_check/winapi_global.pm
index 7249062..bb302e5 100644
--- a/tools/winapi_check/winapi_global.pm
+++ b/tools/winapi_check/winapi_global.pm
@@ -1,12 +1,26 @@
package winapi_global;
use strict;
-
+
+use nativeapi qw($nativeapi);
+use options qw($options);
+use output qw($output);
+use winapi qw($win16api $win32api @winapis);
+
sub check {
- my $options = shift;
- my $output = shift;
+ my $type_found = shift;
+
+ if($options->win16) {
+ _check($win16api, $type_found);
+ }
+
+ if($options->win32) {
+ _check($win32api, $type_found);
+ }
+}
+
+sub _check {
my $winapi = shift;
- my $nativeapi = shift;
my $type_found = shift;
my $winver = $winapi->name;
diff --git a/tools/winapi_check/winapi_local.pm b/tools/winapi_check/winapi_local.pm
index 2c73d75..a4c5231 100644
--- a/tools/winapi_check/winapi_local.pm
+++ b/tools/winapi_check/winapi_local.pm
@@ -2,16 +2,51 @@
use strict;
+use nativeapi qw($nativeapi);
+use options qw($options);
+use output qw($output);
+use winapi qw($win16api $win32api @winapis);
+
sub check_function {
- my $options = shift;
- my $output = shift;
+ my $function = shift;
+
+ my $return_type = $function->return_type;
+ my $calling_convention = $function->calling_convention;
+ my $calling_convention16 = $function->calling_convention16;
+ my $calling_convention32 = $function->calling_convention32;
+ my $internal_name = $function->internal_name;
+ my $external_name16 = $function->external_name16;
+ my $external_name32 = $function->external_name32;
+ my $module16 = $function->module16;
+ my $module32 = $function->module32;
+ my $refargument_types = $function->argument_types;
+
+ if(!defined($refargument_types)) {
+ return;
+ }
+
+ if($options->win16 && $options->report_module($module16)) {
+ _check_function($return_type,
+ $calling_convention, $external_name16,
+ $internal_name, $refargument_types,
+ $win16api);
+ }
+
+ if($options->win32 && $options->report_module($module32)) {
+ _check_function($return_type,
+ $calling_convention, $external_name32,
+ $internal_name, $refargument_types,
+ $win32api);
+ }
+}
+
+sub _check_function {
my $return_type = shift;
my $calling_convention = shift;
my $external_name = shift;
my $internal_name = shift;
my $refargument_types = shift;
my @argument_types = @$refargument_types;
- my $nativeapi = shift;
my $winapi = shift;
my $module = $winapi->function_internal_module($internal_name);
@@ -212,8 +247,22 @@
}
sub check_statements {
- my $options = shift;
- my $output = shift;
+ my $functions = shift;
+ my $function = shift;
+
+ my $module16 = $function->module16;
+ my $module32 = $function->module32;
+
+ if($options->win16 && $options->report_module($module16)) {
+ _check_statements($win16api, $functions, $function);
+ }
+
+ if($options->win32 && $options->report_module($module32)) {
+ _check_statements($win16api, $functions, $function);
+ }
+}
+
+sub _check_statements {
my $winapi = shift;
my $functions = shift;
my $function = shift;
@@ -288,8 +337,6 @@
}
sub check_file {
- my $options = shift;
- my $output = shift;
my $file = shift;
my $functions = shift;
diff --git a/tools/winapi_check/winapi_options.pm b/tools/winapi_check/winapi_options.pm
index 21b9f2a..73b617c 100644
--- a/tools/winapi_check/winapi_options.pm
+++ b/tools/winapi_check/winapi_options.pm
@@ -2,6 +2,18 @@
use strict;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
+require Exporter;
+
+@ISA = qw(Exporter);
+@EXPORT = qw(&parse_comma_list);
+@EXPORT_OK = qw($options);
+
+use vars qw($options);
+
+use config qw($current_dir $wine_dir);
+use output qw($output);
+
sub parser_comma_list {
my $prefix = shift;
my $value = shift;
@@ -138,12 +150,6 @@
my $self = {};
bless ($self, $class);
- my $output = \${$self->{OUTPUT}};
-
- $$output = shift;
- my $refarguments = shift;
- my $wine_dir = shift;
-
$self->options_set("default");
my $c_files = \@{$self->{C_FILES}};
@@ -160,7 +166,7 @@
$$global = 0;
}
- while(defined($_ = shift @$refarguments)) {
+ while(defined($_ = shift @ARGV)) {
if(/^--(all|none)$/) {
$self->options_set("$1");
next;
@@ -185,7 +191,7 @@
$name = $1;
$prefix = "no";
if(defined($value)) {
- $$output->write("options with prefix 'no' can't take parameters\n");
+ $output->write("options with prefix 'no' can't take parameters\n");
return undef;
}
@@ -258,12 +264,12 @@
$$module = { active => 1, filter => 1, hash => \%names };
}
elsif(/^-(.*)$/) {
- $$output->write("unknown option: $_\n");
+ $output->write("unknown option: $_\n");
return undef;
} else {
if(!-e $_) {
- $$output->write("$_: no such file or directory\n");
+ $output->write("$_: no such file or directory\n");
return undef;
}
@@ -329,6 +335,9 @@
}
} split(/\n/, `$h_command`));
}
+
+ $options = $self;
+
return $self;
}
diff --git a/tools/winapi_check/winapi_parser.pm b/tools/winapi_check/winapi_parser.pm
index 8e99f83..077ce10 100644
--- a/tools/winapi_check/winapi_parser.pm
+++ b/tools/winapi_check/winapi_parser.pm
@@ -2,11 +2,11 @@
use strict;
+use output qw($output);
use winapi_function;
sub parse_c_file {
my $options = shift;
- my $output = shift;
my $file = shift;
my $function_found_callback = shift;
my $preprocessor_found_callback = shift;
@@ -39,13 +39,17 @@
$argument_names = shift;
$argument_documentations = shift;
- if($#$argument_names == -1) {
+ if(defined($argument_names) && defined($argument_types) &&
+ $#$argument_names == -1)
+ {
foreach my $n (0..$#$argument_types) {
push @$argument_names, "";
}
}
- if($#$argument_documentations == -1) {
+ if(defined($argument_documentations) &&
+ $#$argument_documentations == -1)
+ {
foreach my $n (0..$#$argument_documentations) {
push @$argument_documentations, "";
}
@@ -69,9 +73,15 @@
$function->return_type($return_type);
$function->calling_convention($calling_convention);
$function->internal_name($internal_name);
- $function->argument_types([@$argument_types]);
- $function->argument_names([@$argument_names]);
- $function->argument_documentations([@$argument_documentations]);
+ if(defined($argument_types)) {
+ $function->argument_types([@$argument_types]);
+ }
+ if(defined($argument_names)) {
+ $function->argument_names([@$argument_names]);
+ }
+ if(defined($argument_documentations)) {
+ $function->argument_documentations([@$argument_documentations]);
+ }
$function->statements($statements);
&$function_found_callback($function);
@@ -351,53 +361,89 @@
&$function_end;
}
} elsif(/__ASM_GLOBAL_FUNC\(\s*(.*?)\s*,/s) {
+ my @lines = split(/\n/, $&);
+ my $function_line = $. - scalar(@lines) + 1;
+
$_ = $'; $again = 1;
- my @arguments = ();
+
&$function_begin($documentation_line, $documentation,
- $function_line, "", "void", "__asm", $1, \@arguments);
+ $function_line, "", "void", "__asm", $1);
+ $statements = "";
&$function_end;
- } elsif(/DC_(GET_X_Y|GET_VAL_16)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)/s) {
+ } elsif(/DC_(GET_X_Y_16|GET_VAL_16)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)/s){
+ my @lines = split(/\n/, $&);
+ my $function_line = $. - scalar(@lines) + 1;
+
$_ = $'; $again = 1;
+
+ my $return16 = $2 . "16";
+ my $name16 = $3 . "16";
+
+ $return16 =~ s/^(COLORREF|DWORD)16$/$1/;
+
my @arguments = ("HDC16");
&$function_begin($documentation_line, $documentation,
- $function_line, "", $2, "WINAPI", $3, \@arguments);
+ $function_line, "", $return16, "WINAPI", $name16, \@arguments);
+ $statements = "";
&$function_end;
- } elsif(/DC_(GET_VAL)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,.*?\)/s) {
+ } elsif(/DC_(GET_VAL_32)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,.*?\)/s) {
+ my @lines = split(/\n/, $&);
+ my $function_line = $. - scalar(@lines) + 1;
+
$_ = $'; $again = 1;
- my $return16 = $3 . "16";
- my $return32 = $3;
- my $name16 = $2 . "16";
- my $name32 = $2;
- my @arguments16 = ("HDC16");
+
+ my $return32 = $2;
+ my $name32 = $3;
my @arguments32 = ("HDC");
- if($name16 eq "COLORREF16") { $name16 = "COLORREF"; }
+ &$function_end;
+ &$function_begin($documentation_line, $documentation,
+ $function_line, "", $return32, "WINAPI", $name32, \@arguments32);
+ $statements = "";
+ &$function_end;
+ } elsif(/DC_(GET_VAL_EX_16)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)/s) {
+ my @lines = split(/\n/, $&);
+ my $function_line = $. - scalar(@lines) + 1;
- &$function_begin($documentation_line, $documentation,
- $function_line, "", $name16, "WINAPI", $return16, \@arguments16);
- &$function_end;
- &$function_begin($documentation_line, $documentation,
- $function_line, "", $name32, "WINAPI", $return32, \@arguments32);
- &$function_end;
- } elsif(/DC_(GET_VAL_EX)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)/s) {
$_ = $'; $again = 1;
+
my @arguments16 = ("HDC16", "LP" . $5 . "16");
- my @arguments32 = ("HDC", "LP" . $5);
&$function_begin($documentation_line, $documentation,
$function_line, "", "BOOL16", "WINAPI", $2 . "16", \@arguments16);
+ $statements = "";
&$function_end;
+ } elsif(/DC_(GET_VAL_EX_32)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)/s) {
+ my @lines = split(/\n/, $&);
+ my $function_line = $. - scalar(@lines) + 1;
+
+ $_ = $'; $again = 1;
+
+ my @arguments32 = ("HDC", "LP" . $5);
&$function_begin($documentation_line, $documentation,
$function_line, "", "BOOL", "WINAPI", $2, \@arguments32);
+ $statements = "";
&$function_end;
- } elsif(/DC_(SET_MODE)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)/s) {
+ } elsif(/DC_(SET_MODE_16)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)/s) {
+ my @lines = split(/\n/, $&);
+ my $function_line = $. - scalar(@lines) + 1;
+
$_ = $'; $again = 1;
+
my @arguments16 = ("HDC16", "INT16");
- my @arguments32 = ("HDC", "INT");
&$function_begin($documentation_line, $documentation,
$function_line, "", "INT16", "WINAPI", $2 . "16", \@arguments16);
+ $statements = "";
&$function_end;
+ } elsif(/DC_(SET_MODE_32)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)/s) {
+ my @lines = split(/\n/, $&);
+ my $function_line = $. - scalar(@lines) + 1;
+
+ $_ = $'; $again = 1;
+
+ my @arguments32 = ("HDC", "INT");
&$function_begin($documentation_line, $documentation,
$function_line, "", "INT", "WINAPI", $2, \@arguments32);
+ $statements = "";
&$function_end;
} elsif(/WAVEIN_SHORTCUT_0\s*\(\s*(.*?)\s*,\s*(.*?)\s*\)/s) {
$_ = $'; $again = 1;
@@ -405,27 +451,39 @@
my @arguments32 = ("HWAVEIN");
&$function_begin($documentation_line, $documentation,
$function_line, "", "UINT16", "WINAPI", "waveIn" . $1 . "16", \@arguments16);
+ $statements = "";
&$function_end;
&$function_begin($documentation_line, $documentation,
$function_line, "", "UINT", "WINAPI", "waveIn" . $1, \@arguments32);
+ $statements = "";
&$function_end;
} elsif(/WAVEOUT_SHORTCUT_0\s*\(\s*(.*?)\s*,\s*(.*?)\s*\)/s) {
+ my @lines = split(/\n/, $&);
+ my $function_line = $. - scalar(@lines) + 1;
+
$_ = $'; $again = 1;
+
my @arguments16 = ("HWAVEOUT16");
my @arguments32 = ("HWAVEOUT");
&$function_begin($documentation_line, $documentation,
$function_line, "", "UINT16", "WINAPI", "waveOut" . $1 . "16", \@arguments16);
+ $statements = "";
&$function_end;
&$function_begin($documentation_line, $documentation,
$function_line, "", "UINT", "WINAPI", "waveOut" . $1, \@arguments32);
&$function_end;
} elsif(/WAVEOUT_SHORTCUT_(1|2)\s*\(\s*(.*?)\s*,\s*(.*?)\s*,\s*(.*?)\s*\)/s) {
+ my @lines = split(/\n/, $&);
+ my $function_line = $. - scalar(@lines) + 1;
+
$_ = $'; $again = 1;
+
if($1 eq "1") {
my @arguments16 = ("HWAVEOUT16", $4);
my @arguments32 = ("HWAVEOUT", $4);
&$function_begin($documentation_line, $documentation,
$function_line, "", "UINT16", "WINAPI", "waveOut" . $2 . "16", \@arguments16);
+ $statements = "";
&$function_end;
&$function_begin($documentation_line, $documentation,
$function_line, "", "UINT", "WINAPI", "waveOut" . $2, \@arguments32);
@@ -435,6 +493,7 @@
my @arguments32 = ("UINT", $4);
&$function_begin($documentation_line, $documentation,
$function_line, "", "UINT16", "WINAPI", "waveOut". $2 . "16", \@arguments16);
+ $statements = "";
&$function_end;
&$function_begin($documentation_line, $documentation,
$function_line, "", "UINT", "WINAPI", "waveOut" . $2, \@arguments32);