parent
21c3dfaa34
commit
f2c2eafafb
|
@ -296,7 +296,7 @@ sub options_set {
|
|||
if(/^default$/) {
|
||||
$$refvalue = $$option{default};
|
||||
} elsif(/^all$/) {
|
||||
if($name !~ /^help|debug|verbose|module$/) {
|
||||
if($name !~ /^(?:help|debug|verbose|module)$/) {
|
||||
if(ref($$refvalue) ne "HASH") {
|
||||
$$refvalue = 1;
|
||||
} else {
|
||||
|
@ -304,7 +304,7 @@ sub options_set {
|
|||
}
|
||||
}
|
||||
} elsif(/^none$/) {
|
||||
if($name !~ /^help|debug|verbose|module$/) {
|
||||
if($name !~ /^(?:help|debug|verbose|module)$/) {
|
||||
if(ref($$refvalue) ne "HASH") {
|
||||
$$refvalue = 0;
|
||||
} else {
|
||||
|
@ -367,8 +367,6 @@ sub show_help {
|
|||
}
|
||||
}
|
||||
if($default == $current) {
|
||||
$output->write("$description (default)\n");
|
||||
} else {
|
||||
$output->write("$description\n");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,6 +159,48 @@ void
|
|||
LPCWSTR
|
||||
LPWSTR
|
||||
|
||||
%%cabinet.dll
|
||||
|
||||
%long
|
||||
|
||||
BOOL
|
||||
HFCI
|
||||
HFDI
|
||||
INT_PTR
|
||||
TCOMP
|
||||
USHORT
|
||||
int
|
||||
|
||||
%ptr
|
||||
|
||||
PCCAB
|
||||
PERF
|
||||
PFDICABINETINFO
|
||||
PFNALLOC
|
||||
PFNCLOSE
|
||||
PFNFCIALLOC
|
||||
PFNFCICLOSE
|
||||
PFNFCIDELETE
|
||||
PFNFCIFILEPLACED
|
||||
PFNFCIFREE
|
||||
PFNFCIGETNEXTCABINET
|
||||
PFNFCIGETOPENINFO
|
||||
PFNFCIGETTEMPFILE
|
||||
PFNFCIOPEN
|
||||
PFNFCIREAD
|
||||
PFNFCISEEK
|
||||
PFNFCISTATUS
|
||||
PFNFCIWRITE
|
||||
PFNFDIDECRYPT
|
||||
PFNFDINOTIFY
|
||||
PFNFREE
|
||||
PFNOPEN
|
||||
PFNREAD
|
||||
PFNSEEK
|
||||
PFNWRITE
|
||||
char *
|
||||
void *
|
||||
|
||||
%%comcat.dll
|
||||
|
||||
%long
|
||||
|
@ -881,6 +923,7 @@ LPVOID
|
|||
LPVOID *
|
||||
LPWORD
|
||||
LPWSTR *
|
||||
MEMMANINFO *
|
||||
NUMBERFMTA *
|
||||
NUMBERFMTW *
|
||||
OFSTRUCT *
|
||||
|
@ -1270,6 +1313,7 @@ __non_rtti_object *
|
|||
_onexit_t
|
||||
_onexit_t **
|
||||
_se_translator_function
|
||||
_stati64 *
|
||||
bad_cast *
|
||||
bad_typeid *
|
||||
char *
|
||||
|
@ -1459,6 +1503,7 @@ LPCVOID *
|
|||
LPDWORD
|
||||
LPDWORD *
|
||||
LPRTL_RWLOCK
|
||||
LPTIME_ZONE_INFORMATION
|
||||
LPVOID
|
||||
LPVOID *
|
||||
LPWSTR *
|
||||
|
@ -1504,6 +1549,7 @@ PVOID
|
|||
PVOID *
|
||||
RTL_CRITICAL_SECTION *
|
||||
STRING *
|
||||
TIME_ZONE_INFORMATION *
|
||||
UINT *
|
||||
ULONG *
|
||||
ULONGLONG *
|
||||
|
@ -2984,6 +3030,7 @@ INTERNET_STATUS_CALLBACK
|
|||
LPBYTE
|
||||
LPCSTR *
|
||||
LPCVOID
|
||||
LPCWSTR *
|
||||
LPDWORD
|
||||
LPINTERNET_BUFFERSA
|
||||
LPINTERNET_BUFFERSW
|
||||
|
@ -3194,6 +3241,8 @@ LPWSAOVERLAPPED
|
|||
LPWSAOVERLAPPED_COMPLETION_ROUTINE
|
||||
LPWSAPROTOCOL_INFOA
|
||||
LPWSAPROTOCOL_INFOW
|
||||
LPWSASERVICECLASSINFOA
|
||||
LPWSASERVICECLASSINFOW
|
||||
WS_fd_set *
|
||||
char *
|
||||
int *
|
||||
|
|
|
@ -40,6 +40,10 @@ sub import {
|
|||
&Exporter::import(@_);
|
||||
$Exporter::ExportLevel--;
|
||||
|
||||
if (defined($modules) && defined($win16api) && defined($win32api)) {
|
||||
return;
|
||||
}
|
||||
|
||||
require modules;
|
||||
import modules qw($modules);
|
||||
|
||||
|
@ -286,6 +290,7 @@ sub parse_spec_file {
|
|||
if($flags =~ /(?:-register|-interrupt)/) {
|
||||
if($arguments) { $arguments .= " "; }
|
||||
$arguments .= "ptr";
|
||||
$calling_convention .= " -register";
|
||||
}
|
||||
|
||||
if($external_name ne "@") {
|
||||
|
|
|
@ -76,7 +76,7 @@ my %options_long = (
|
|||
"calling-convention-win32" => { default => 1, parent => "calling-convention", description => "calling convention checking (Win32)" },
|
||||
"misplaced" => { default => 1, parent => "local", description => "check for misplaced functions" },
|
||||
"statements" => { default => 0, parent => "local", description => "check for statements inconsistances" },
|
||||
"cross-call" => { default => 0, parent => "statements", description => "check for cross calling functions" },
|
||||
"cross-call" => { default => 0, parent => ["statements", "win16", "win32"], description => "check for cross calling functions" },
|
||||
"cross-call-win32-win16" => {
|
||||
default => 0, parent => "cross-call", description => "check for cross calls between win32 and win16"
|
||||
},
|
||||
|
|
|
@ -16,6 +16,10 @@ dlls/avifil32
|
|||
|
||||
dlls/avifil32
|
||||
|
||||
% dlls/cabinet/cabinet.spec
|
||||
|
||||
dlls/cabinet
|
||||
|
||||
% dlls/comcat/comcat.spec
|
||||
|
||||
dlls/comcat
|
||||
|
|
|
@ -44,6 +44,10 @@ sub import {
|
|||
&Exporter::import(@_);
|
||||
$Exporter::ExportLevel--;
|
||||
|
||||
if (defined($modules)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$modules = 'modules'->new;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,10 +61,9 @@ use winapi_local;
|
|||
use winapi_global;
|
||||
use winapi_parser;
|
||||
|
||||
my %declared_functions;
|
||||
|
||||
my %include2info;
|
||||
{
|
||||
|
||||
if ($options->global) {
|
||||
my @files = get_h_files("winelib");
|
||||
|
||||
my $progress_current = 0;
|
||||
|
@ -152,6 +151,8 @@ if(1) {
|
|||
my $progress_current = 0;
|
||||
my $progress_max = scalar(@c_files);
|
||||
|
||||
my %declared_functions;
|
||||
|
||||
if($options->headers) {
|
||||
$progress_max += scalar(@h_files);
|
||||
|
||||
|
@ -340,14 +341,9 @@ foreach my $file (@c_files) {
|
|||
}
|
||||
}
|
||||
|
||||
foreach my $module ($function->modules) {
|
||||
$module2functions{$module}{$internal_name} = $function;
|
||||
|
||||
my @types = ($return_type);
|
||||
|
||||
my $refargument_types = $function->argument_types;
|
||||
if(defined($refargument_types)) {
|
||||
push @types, @$refargument_types;
|
||||
if ($options->global) {
|
||||
foreach my $module ($function->modules) {
|
||||
$module2functions{$module}{$internal_name} = $function;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -150,6 +150,12 @@ sub _check_function {
|
|||
my $declared_calling_convention = $winapi->function_internal_calling_convention($internal_name);
|
||||
my @declared_argument_kinds = split(/\s+/, $winapi->function_internal_arguments($internal_name));
|
||||
|
||||
my $declared_register = 0;
|
||||
if ($declared_calling_convention =~ /^(\w+) -register$/) {
|
||||
$declared_register = 1;
|
||||
$declared_calling_convention = $1;
|
||||
}
|
||||
|
||||
if($implemented_calling_convention ne $declared_calling_convention &&
|
||||
$implemented_calling_convention ne "asm" &&
|
||||
!($declared_calling_convention =~ /^pascal/ && $forbidden_return_type) &&
|
||||
|
@ -179,7 +185,7 @@ sub _check_function {
|
|||
}
|
||||
|
||||
if($#argument_types != -1 && $argument_types[$#argument_types] eq "CONTEXT *" &&
|
||||
$internal_name !~ /^(Get|Set)ThreadContext$/) # FIXME: Kludge
|
||||
$internal_name =~ /^(?:RtlRaiseException|RtlUnwind|NtRaiseException)$/) # FIXME: Kludge
|
||||
{
|
||||
$#argument_types--;
|
||||
}
|
||||
|
@ -220,6 +226,10 @@ sub _check_function {
|
|||
}
|
||||
} @argument_types;
|
||||
|
||||
if ($declared_register && $argument_kinds[$#argument_kinds] ne "context86") {
|
||||
$output->write("function declared as register, but CONTEXT86 * is not last argument\n");
|
||||
}
|
||||
|
||||
for my $n (0..$#argument_kinds) {
|
||||
if(!defined($argument_kinds[$n]) || !defined($declared_argument_kinds[$n])) { next; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue