Commit af1601b0 authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

Minor fixes and additions.

parent f0083008
......@@ -38,6 +38,7 @@ BITMAPINFO *
BITMAPINFOHEADER *
BOOL16 *
BSTR16 *
BYTE *
CLASSENTRY *
CLSID *
COLORREF *
......@@ -104,7 +105,6 @@ LPCLSID
LPCOMSTAT16
LPCONVCONTEXT16
LPCONVINFO16
LPCURSORINFO
LPCVOID
LPDCB16
LPDEVMODEA
......
......@@ -62,6 +62,7 @@ HWAVEIN
HWAVEOUT
HWINSTA
INT
IPAddr
KEY_INFORMATION_CLASS
KEY_VALUE_INFORMATION_CLASS
LANGID
......@@ -83,6 +84,7 @@ OLE_SERVER_USE
PHANDLE
PHPROVIDER
PIO_APC_ROUTINE
PIP_OPTION_INFORMATION
PLSA_HANDLE
PLSA_OBJECT_ATTRIBUTES
PLSA_UNICODE_STRING
......@@ -139,8 +141,8 @@ CLSID *
CODEPAGE_ENUMPROCA
CODEPAGE_ENUMPROCW
COLORADJUSTMENT *
CONST
CONTEXT *
CONTEXT86 *
COSERVERINFO *
CRITICAL_SECTION *
CRTDLL_FILE *
......@@ -167,6 +169,7 @@ ENUMRESNAMEPROCA
ENUMRESNAMEPROCW
ENUMRESTYPEPROCA
ENUMRESTYPEPROCW
ENUMPASSWORDPROC
EXCEPTION_RECORD *
FARPROC
FARPROC *
......@@ -197,7 +200,6 @@ HMIDIIN *
HMIDIOUT *
HMIDISTRM *
HMODULE *
HMRU
HOOKPROC
HPCSTR
HPSTR
......@@ -210,6 +212,7 @@ IDataObject *
IDataObject **
IDropSource *
IDropTarget *
IErrorInfo *
ILockBytes *
IMAGEINFO *
IMAGELISTDRAWPARAMS *
......@@ -225,6 +228,7 @@ IStream *
ITypeLib *
ITypeLib **
IUnknown *
LARGE_INTEGER *
LHCLIENTDOC *
LHSERVER *
LHSERVERDOC *
......@@ -279,6 +283,7 @@ LPCPROPSHEETHEADERA
LPCPROPSHEETHEADERW
LPCPROPSHEETPAGEA
LPCPROPSHEETPAGEW
LPCREATEMRULIST
LPCSTR *
LPCTBBUTTON
LPCVOID
......@@ -310,6 +315,7 @@ LPDRAWTEXTPARAMS
LPDROPTARGET
LPDSENUMCALLBACKA
LPDWORD
LPDWORD *
LPENHMETAHEADER
LPENUMFORMATETC *
LPENUMOLEVERB *
......@@ -401,7 +407,6 @@ LPMODULEINFO
LPMONIKER
LPMONIKER *
LPMONITORINFO
LPMRUINFO
LPMSG
LPMSGBOXPARAMSA
LPMSGBOXPARAMSW
......@@ -501,6 +506,7 @@ LPSYSTEMTIME
LPSYSTEM_INFO
LPSYSTEM_POWER_STATUS
LPTHREAD_START_ROUTINE
LPTHREADENTRY
LPTIMECALLBACK
LPTIMECAPS
LPTIME_ZONE_INFORMATION
......@@ -525,6 +531,7 @@ LPXFORM
MAT2 *
MENUITEMINFOA *
MENUITEMINFOW *
METAFILEPICT *
METARECORD *
MFENUMPROC
MIDIHDR *
......@@ -635,6 +642,7 @@ SCROLLINFO *
SECURITY_ATTRIBUTES *
SECURITY_DESCRIPTOR *
SECURITY_INFORMATION *
SECURITY_QUALITY_OF_SERVICE *
SHFILEINFOA *
SHFILEINFOW *
SNB
......
......@@ -170,6 +170,7 @@ sub parse_spec_file {
if($header) {
if(/^name\s*(\S*)/) { $module = $1; }
if(/^type\s*(\w+)/) { $type = $1; }
if(/^\d+/) { $header = 0 };
next;
}
......@@ -186,14 +187,30 @@ sub parse_spec_file {
# FIXME: Internal name existing more than once not handled properly
$$function_arguments{$internal_name} = $arguments;
$$function_calling_convention{$internal_name} = $calling_convention;
$$function_module{$internal_name} = "$module";
if(!$$function_module{$internal_name}) {
$$function_module{$internal_name} = "$module";
} elsif($$function_module{$internal_name} !~ /$module/) {
$$function_module{$internal_name} .= " & $module";
}
} elsif(/^(\d+)\s+stub\s+(\S+)$/) {
my $external_name = $2;
$ordinal = $1;
$$function_stub{$external_name} = 1;
$$function_module{$external_name} = $module;
my $internal_name;
if($type eq "win16") {
$internal_name = $external_name . "16";
} else {
$internal_name = $external_name;
}
# FIXME: Internal name existing more than once not handled properly
$$function_stub{$internal_name} = 1;
if(!$$function_module{$internal_name}) {
$$function_module{$internal_name} = "$module";
} elsif($$function_module{$internal_name} !~ /$module/) {
$$function_module{$internal_name} .= " & $module";
}
} elsif(/^\d+\s+(equate|long|word|extern|forward)/) {
# ignore
} else {
......
......@@ -101,8 +101,8 @@ my %includes;
close(IN);
}
my @files2 = ("acconfig.h", "poppack.h", "pshpack1.h", "pshpack2.h", "pshpack4.h", "pshpack8.h");
my @files2 = ("acconfig.h", "poppack.h", "pshpack1.h", "pshpack2.h", "pshpack4.h", "pshpack8.h",
"storage.h", "ver.h");
foreach my $file2 (@files2) {
$includes{"include/$file2"}{used}++;
}
......@@ -264,7 +264,7 @@ foreach my $file ($options->files) {
my $conditional = 0;
my $found_include = sub {
local $_ = shift;
if(/^\"(config\.h|native\.h)\"/) {
if(/^\"config\.h\"/) {
$config++;
}
};
......
......@@ -13,10 +13,10 @@ sub check_function {
my $winapi = shift;
my $module = $winapi->function_module($name);
if($winapi->name eq "win16") {
my $name16 = $name;
$name16 =~ s/16$//;
$name16 =~ s/16$//;
if($name16 ne $name && $winapi->function_stub($name16)) {
if($options->implemented) {
&$output("function implemented but declared as stub in .spec file");
......@@ -106,7 +106,13 @@ sub check_function {
} elsif($#argument_types != -1 && $argument_types[$#argument_types] eq "...") {
&$output("function not declared as vararg");
}
if($#argument_types != -1 && $argument_types[$#argument_types] eq "CONTEXT *" &&
$name !~ /^(Get|Set)ThreadContext$/)
{
$#argument_types--;
}
if($name =~ /^CRTDLL__ftol|CRTDLL__CIpow$/) {
# ignore
} else {
......
......@@ -31,6 +31,7 @@ sub parse_c_file {
$function = "";
};
my %regs_entrypoints;
my @comments = ();
my $level = 0;
my $again = 0;
......@@ -146,7 +147,9 @@ sub parse_c_file {
$return_type =~ s/\s*\*\s*/*/g;
$return_type =~ s/(\*+)/ $1/g;
$name =~ s/^REGS_FUNC\((.*?)\)/$1/;
if($regs_entrypoints{$name}) {
$name = $regs_entrypoints{$name};
}
$arguments =~ y/\t\n/ /;
$arguments =~ s/^\s*(.*?)\s*$/$1/;
......@@ -158,7 +161,7 @@ sub parse_c_file {
$argument =~ s/^\s*(.*?)\s*$/$1/;
#print " " . ($n + 1) . ": '$argument'\n";
$argument =~ s/^(IN OUT(?=\s)|IN(?=\s)|OUT(?=\s)|\s*)\s*//;
$argument =~ s/^(const(?=\s)|\s*)\s*//;
$argument =~ s/^(const(?=\s)|CONST(?=\s)|\s*)\s*//;
if($argument =~ /^...$/) {
$argument = "...";
} elsif($argument =~ /^((struct\s+|union\s+|enum\s+)?\w+)\s*((\*\s*?)*)\s*/) {
......@@ -238,6 +241,9 @@ sub parse_c_file {
&$function_begin($documentation,"UINT", "WINAPI", "waveOut" . $2, \@arguments32);
&$function_end;
}
} elsif(/DEFINE_REGS_ENTRYPOINT_\d+\(\s*(\S*)\s*,\s*([^\s,\)]*).*?\)/s) {
$_ = $'; $again = 1;
$regs_entrypoints{$2} = $1;
} elsif(/;/s) {
$_ = $'; $again = 1;
} elsif(/\{/s) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment