Francois Gouget : winapi: Add some more __stdcall synonyms.

Alexandre Julliard julliard at winehq.org
Mon Jan 9 15:22:29 CST 2017


Module: wine
Branch: master
Commit: b9181615a905904de55c43a2f411143b78ea086e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b9181615a905904de55c43a2f411143b78ea086e

Author: Francois Gouget <fgouget at free.fr>
Date:   Sat Jan  7 14:55:14 2017 +0100

winapi: Add some more __stdcall synonyms.

Signed-off-by: Francois Gouget <fgouget at free.fr>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/winapi/c_parser.pm        | 4 ++--
 tools/winapi/winapi_function.pm | 4 ++--
 tools/winapi/winapi_local.pm    | 4 ++--
 tools/winapi/winapi_parser.pm   | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/tools/winapi/c_parser.pm b/tools/winapi/c_parser.pm
index 8bb40d5..d42e04a 100644
--- a/tools/winapi/c_parser.pm
+++ b/tools/winapi/c_parser.pm
@@ -37,7 +37,7 @@ use c_type;
 my $CALL_CONVENTION="__cdecl|__stdcall|" .
                     "__RPC_API|__RPC_STUB|__RPC_USER|" .
 		    "CALLBACK|CDECL|NTAPI|PASCAL|RPC_ENTRY|RPC_VAR_ENTRY|" .
-		    "VFWAPI|VFWAPIV|WINAPI|WINAPIV|APIENTRY|";
+		    "SEC_ENTRY|VFWAPI|VFWAPIV|WINGDIPAPI|WMIAPI|WINAPI|WINAPIV|APIENTRY|";
 
 
 sub parse_c_function($$$$$);
@@ -1735,7 +1735,7 @@ sub parse_c_variable($$$$$$$)
             $type = $self->_format_c_type($type);
 
             last finished;
-        } elsif(s/^((?:enum\s+|interface\s+|struct\s+|union\s+)?\w+\b(?:\s*\*)*\s*\(\s*(?:$CALL_CONVENTION)?(?:\s*\*)*)\s*(\w+)\s*(\)\s*\(.*?\))$//s) {
+        } elsif(s/^((?:enum\s+|interface\s+|struct\s+|union\s+)?\w+\b(?:\s*\*)*\s*\(\s*(?:$CALL_CONVENTION)?(?:\s+DECLSPEC_[A-Z]+)?(?:\s*\*)*)\s*(\w+)\s*(\)\s*\(.*?\))$//s) {
             $type = $self->_format_c_type("$sign$1$3");
             $name = $2;
 
diff --git a/tools/winapi/winapi_function.pm b/tools/winapi/winapi_function.pm
index 023fbf5..633e9ea 100644
--- a/tools/winapi/winapi_function.pm
+++ b/tools/winapi/winapi_function.pm
@@ -309,7 +309,7 @@ sub calling_convention16($) {
     } elsif(/^(?:VFWAPIV|WINAPIV)$/) {
 	if(!defined($suffix)) { return undef; }
 	return "pascal$suffix"; # FIXME: Is this correct?
-    } elsif(/^(?:__stdcall|__RPC_STUB|__RPC_USER|NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/) {
+    } elsif(/^(?:__stdcall|__RPC_STUB|__RPC_USER|NET_API_FUNCTION|RPC_ENTRY|SEC_ENTRY|VFWAPI|WINGDIPAPI|WMIAPI|WINAPI|CALLBACK)$/) {
 	if(!defined($suffix)) { return undef; }
 	return "pascal$suffix";
     } elsif($_ eq "__asm") {
@@ -327,7 +327,7 @@ sub calling_convention32($) {
 	return "cdecl";
     } elsif(/^(?:VFWAPIV|WINAPIV)$/) {
 	return "varargs";
-    } elsif(/^(?:__stdcall|__RPC_STUB|__RPC_USER|NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/) {
+    } elsif(/^(?:__stdcall|__RPC_STUB|__RPC_USER|NET_API_FUNCTION|RPC_ENTRY|SEC_ENTRY|VFWAPI|WINGDIPAPI|WMIAPI|WINAPI|CALLBACK)$/) {
 	return "stdcall";
     } elsif($_ eq "__asm") {
 	return "asm";
diff --git a/tools/winapi/winapi_local.pm b/tools/winapi/winapi_local.pm
index 5a4dcea..42dd146 100644
--- a/tools/winapi/winapi_local.pm
+++ b/tools/winapi/winapi_local.pm
@@ -85,7 +85,7 @@ sub _check_function($$$$$$) {
 	    $implemented_calling_convention = "cdecl";
 	} elsif($calling_convention =~ /^(?:VFWAPIV|WINAPIV)$/) {
 	    $implemented_calling_convention = "varargs";
-	} elsif($calling_convention =~ /^(?:__stdcall|__RPC_STUB|__RPC_USER|NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/) {
+	} elsif($calling_convention =~ /^(?:__stdcall|__RPC_STUB|__RPC_USER|NET_API_FUNCTION|RPC_ENTRY|SEC_ENTRY|VFWAPI|WINGDIPAPI|WMIAPI|WINAPI|CALLBACK)$/) {
 	    if(defined($implemented_return_kind) && $implemented_return_kind =~ /^(?:s_word|word|void)$/) {
 		$implemented_calling_convention = "pascal16";
 	    } else {
@@ -101,7 +101,7 @@ sub _check_function($$$$$$) {
 	    $implemented_calling_convention = "cdecl";
 	} elsif($calling_convention =~ /^(?:VFWAPIV|WINAPIV)$/) {
 	    $implemented_calling_convention = "varargs";
-	} elsif($calling_convention =~ /^(?:__stdcall|__RPC_STUB|__RPC_USER|APIENTRY|NET_API_FUNCTION|RPC_ENTRY|VFWAPI|WINAPI|CALLBACK)$/) {
+	} elsif($calling_convention =~ /^(?:__stdcall|__RPC_STUB|__RPC_USER|APIENTRY|NET_API_FUNCTION|RPC_ENTRY|SEC_ENTRY|VFWAPI|WINGDIPAPI|WMIAPI|WINAPI|CALLBACK)$/) {
 	    if(defined($implemented_return_kind) && $implemented_return_kind eq "longlong") {
 		$implemented_calling_convention = "stdcall"; # FIXME: Check entry flags
 	    } else {
diff --git a/tools/winapi/winapi_parser.pm b/tools/winapi/winapi_parser.pm
index 3092a7d..b24ce5f 100644
--- a/tools/winapi/winapi_parser.pm
+++ b/tools/winapi/winapi_parser.pm
@@ -28,7 +28,7 @@ my $CALL_CONVENTION="__cdecl|__stdcall|" .
                     "__RPC_API|__RPC_STUB|__RPC_USER|RPC_ENTRY|" .
 		    "RPC_VAR_ENTRY|STDMETHODCALLTYPE|NET_API_FUNCTION|" .
                     "CALLBACK|CDECL|NTAPI|PASCAL|APIENTRY|" .
-		    "VFWAPI|VFWAPIV|WINAPI|WINAPIV|";
+		    "SEC_ENTRY|VFWAPI|VFWAPIV|WINGDIPAPI|WMIAPI|WINAPI|WINAPIV|";
 
 sub parse_c_file($$) {
     my $file = shift;




More information about the wine-cvs mailing list