"stdcall" -> stdcall

release
Joe Groff 2010-03-31 19:29:04 -07:00
parent a6ee4232bb
commit f3dd625de6
22 changed files with 64 additions and 64 deletions

View File

@ -6,7 +6,7 @@ IN: alien.libraries
HELP: <library>
{ $values
{ "path" "a pathname string" } { "abi" "the ABI used by the library, either " { $snippet cdecl } " or " { $snippet "stdcall" } }
{ "path" "a pathname string" } { "abi" "the ABI used by the library, either " { $snippet cdecl } " or " { $snippet stdcall } }
{ "library" library } }
{ $description "Opens a C library using the path and ABI parameters and outputs a library tuple." }
{ $notes "User code should use " { $link add-library } " so that the opened library is added to a global hashtable, " { $link libraries } "." } ;
@ -19,7 +19,7 @@ HELP: library
{ $description "Looks up a library by its logical name. The library object is a hashtable with the following keys:"
{ $list
{ { $snippet "name" } " - the full path of the C library binary" }
{ { $snippet "abi" } " - the ABI used by the library, either " { $snippet cdecl } " or " { $snippet "stdcall" } }
{ { $snippet "abi" } " - the ABI used by the library, either " { $snippet cdecl } " or " { $snippet stdcall } }
{ { $snippet "dll" } " - an instance of the " { $link dll } " class; only set if the library is loaded" }
}
} ;

View File

@ -412,7 +412,7 @@ M: array dlsym-valid? '[ _ dlsym ] any? ;
3array ;
: alien-invoke-dlsym ( params -- symbols dll )
[ dup abi>> "stdcall" = [ stdcall-mangle ] [ function>> ] if ]
[ dup abi>> stdcall = [ stdcall-mangle ] [ function>> ] if ]
[ library>> load-library ]
bi 2dup check-dlsym ;

View File

@ -21,7 +21,7 @@ IN: compiler.tests.alien
"f-cdecl" libfactor-ffi-tests-path cdecl add-library
"f-stdcall" libfactor-ffi-tests-path "stdcall" add-library
"f-stdcall" libfactor-ffi-tests-path stdcall add-library
>>
LIBRARY: f-cdecl
@ -117,11 +117,11 @@ FUNCTION: TINY ffi_test_17 int x ;
unit-test
: indirect-test-3 ( a b c d ptr -- result )
int { int int int int } "stdcall" alien-indirect
int { int int int int } stdcall alien-indirect
gc ;
[ f ] [ "f-stdcall" load-library f = ] unit-test
[ "stdcall" ] [ "f-stdcall" library abi>> ] unit-test
[ stdcall ] [ "f-stdcall" library abi>> ] unit-test
: ffi_test_18 ( w x y z -- int )
int "f-stdcall" "ffi_test_18" { int int int int }

View File

@ -292,7 +292,7 @@ M:: x86.32 %binary-float-function ( dst src1 src2 func -- )
dst float-function-return ;
: stdcall? ( params -- ? )
abi>> "stdcall" = ;
abi>> stdcall = ;
: funny-large-struct-return? ( params -- ? )
#! MINGW ABI incompatibility disaster

View File

@ -57,7 +57,7 @@ TUPLE: ConnectEx-args port
} cleave
int
{ SOCKET void* int PVOID DWORD LPDWORD void* }
"stdcall" alien-indirect drop
stdcall alien-indirect drop
winsock-error-string [ throw ] when* ; inline
M: object establish-connection ( client-out remote -- )

View File

@ -8,4 +8,4 @@ FUNCTION: void* wglGetProcAddress ( c-string name ) ;
: gl-function-context ( -- context ) wglGetCurrentContext ; inline
: gl-function-address ( name -- address ) wglGetProcAddress ; inline
: gl-function-calling-convention ( -- str ) "stdcall" ; inline
: gl-function-calling-convention ( -- str ) stdcall ; inline

View File

@ -609,7 +609,7 @@ SYMBOL: trace-messages?
! return 0 if you handle the message, else just let DefWindowProc return its val
: ui-wndproc ( -- object )
uint { void* uint long long } "stdcall" [
uint { void* uint long long } stdcall [
pick
trace-messages? get-global [ dup windows-message-name name>> print flush ] when
wm-handlers get-global at* [ call ] [ drop DefWindowProc ] if

View File

@ -1,14 +1,14 @@
USING: alien sequences alien.libraries ;
{
{ "advapi32" "\\windows\\coredll.dll" "stdcall" }
{ "gdi32" "\\windows\\coredll.dll" "stdcall" }
{ "user32" "\\windows\\coredll.dll" "stdcall" }
{ "kernel32" "\\windows\\coredll.dll" "stdcall" }
{ "winsock" "\\windows\\ws2.dll" "stdcall" }
{ "mswsock" "\\windows\\ws2.dll" "stdcall" }
{ "libc" "\\windows\\coredll.dll" "stdcall" }
{ "libm" "\\windows\\coredll.dll" "stdcall" }
! { "gl" "libGLES_CM.dll" "stdcall" }
! { "glu" "libGLES_CM.dll" "stdcall" }
{ "ole32" "ole32.dll" "stdcall" }
{ "advapi32" "\\windows\\coredll.dll" stdcall }
{ "gdi32" "\\windows\\coredll.dll" stdcall }
{ "user32" "\\windows\\coredll.dll" stdcall }
{ "kernel32" "\\windows\\coredll.dll" stdcall }
{ "winsock" "\\windows\\ws2.dll" stdcall }
{ "mswsock" "\\windows\\ws2.dll" stdcall }
{ "libc" "\\windows\\coredll.dll" stdcall }
{ "libm" "\\windows\\coredll.dll" stdcall }
! { "gl" "libGLES_CM.dll" stdcall }
! { "glu" "libGLES_CM.dll" stdcall }
{ "ole32" "ole32.dll" stdcall }
} [ first3 add-library ] each

View File

@ -12,7 +12,7 @@ MACRO: com-invoke ( n return parameters -- )
[ 2nip length ] 3keep
'[
_ npick *void* _ cell * alien-cell _ _
"stdcall" alien-indirect
stdcall alien-indirect
] ;
TUPLE: com-interface-definition word parent iid functions ;

View File

@ -114,7 +114,7 @@ unless
] [
first2 (finish-thunk)
] bi*
"stdcall" swap compile-alien-callback
stdcall swap compile-alien-callback
] 2map ;
: (make-callbacks) ( implementations -- sequence )

View File

@ -4,7 +4,7 @@ USING: alien.c-types alien.libraries alien.syntax classes.struct
kernel math windows.types windows.ole32 ;
IN: windows.ddk.hid
<< "hid" "hid.dll" "stdcall" add-library >>
<< "hid" "hid.dll" stdcall add-library >>
LIBRARY: hid
TYPEDEF: LONG NTSTATUS

View File

@ -4,7 +4,7 @@ USING: literals windows.kernel32 math alien.syntax windows.types classes.struct
alien.c-types windows.errors windows.ole32 windows.advapi32 alien.libraries ;
IN: windows.ddk.setupapi
<< "setupapi" "setupapi.dll" "stdcall" add-library >>
<< "setupapi" "setupapi.dll" stdcall add-library >>
LIBRARY: setupapi
TYPEDEF: DWORDLONG SP_LOG_TOKEN

View File

@ -4,7 +4,7 @@ USING: alien.c-types alien.syntax classes.struct windows.kernel32
windows.types alien.libraries ;
IN: windows.ddk.winusb
<< "winusb" "winusb.dll" "stdcall" add-library >>
<< "winusb" "winusb.dll" stdcall add-library >>
LIBRARY: winusb
TYPEDEF: PVOID WINUSB_INTERFACE_HANDLE

View File

@ -21,7 +21,7 @@ STRUCT: DWM_BLURBEHIND
: full-window-margins ( -- MARGINS )
-1 -1 -1 -1 <MARGINS> ; inline
<< "dwmapi" "dwmapi.dll" "stdcall" add-library >>
<< "dwmapi" "dwmapi.dll" stdcall add-library >>
LIBRARY: dwmapi

View File

@ -1,35 +1,35 @@
USING: alien sequences alien.libraries ;
{
{ "advapi32" "advapi32.dll" "stdcall" }
{ "dinput" "dinput8.dll" "stdcall" }
{ "gdi32" "gdi32.dll" "stdcall" }
{ "user32" "user32.dll" "stdcall" }
{ "kernel32" "kernel32.dll" "stdcall" }
{ "winsock" "ws2_32.dll" "stdcall" }
{ "mswsock" "mswsock.dll" "stdcall" }
{ "shell32" "shell32.dll" "stdcall" }
{ "advapi32" "advapi32.dll" stdcall }
{ "dinput" "dinput8.dll" stdcall }
{ "gdi32" "gdi32.dll" stdcall }
{ "user32" "user32.dll" stdcall }
{ "kernel32" "kernel32.dll" stdcall }
{ "winsock" "ws2_32.dll" stdcall }
{ "mswsock" "mswsock.dll" stdcall }
{ "shell32" "shell32.dll" stdcall }
{ "libc" "msvcrt.dll" cdecl }
{ "libm" "msvcrt.dll" cdecl }
{ "gl" "opengl32.dll" "stdcall" }
{ "glu" "glu32.dll" "stdcall" }
{ "ole32" "ole32.dll" "stdcall" }
{ "usp10" "usp10.dll" "stdcall" }
{ "psapi" "psapi.dll" "stdcall" }
{ "xinput" "xinput1_3.dll" "stdcall" }
{ "dxgi" "dxgi.dll" "stdcall" }
{ "d2d1" "d2d1.dll" "stdcall" }
{ "d3d9" "d3d9.dll" "stdcall" }
{ "d3d10" "d3d10.dll" "stdcall" }
{ "d3d10_1" "d3d10_1.dll" "stdcall" }
{ "d3d11" "d3d11.dll" "stdcall" }
{ "d3dcompiler" "d3dcompiler_42.dll" "stdcall" }
{ "d3dcsx" "d3dcsx_42.dll" "stdcall" }
{ "d3dx9" "d3dx9_42.dll" "stdcall" }
{ "d3dx10" "d3dx10_42.dll" "stdcall" }
{ "d3dx11" "d3dx11_42.dll" "stdcall" }
{ "dwrite" "dwrite.dll" "stdcall" }
{ "x3daudio" "x3daudio1_6.dll" "stdcall" }
{ "xactengine" "xactengine3_5.dll" "stdcall" }
{ "xapofx" "xapofx1_3.dll" "stdcall" }
{ "xaudio2" "xaudio2_5.dll" "stdcall" }
{ "gl" "opengl32.dll" stdcall }
{ "glu" "glu32.dll" stdcall }
{ "ole32" "ole32.dll" stdcall }
{ "usp10" "usp10.dll" stdcall }
{ "psapi" "psapi.dll" stdcall }
{ "xinput" "xinput1_3.dll" stdcall }
{ "dxgi" "dxgi.dll" stdcall }
{ "d2d1" "d2d1.dll" stdcall }
{ "d3d9" "d3d9.dll" stdcall }
{ "d3d10" "d3d10.dll" stdcall }
{ "d3d10_1" "d3d10_1.dll" stdcall }
{ "d3d11" "d3d11.dll" stdcall }
{ "d3dcompiler" "d3dcompiler_42.dll" stdcall }
{ "d3dcsx" "d3dcsx_42.dll" stdcall }
{ "d3dx9" "d3dx9_42.dll" stdcall }
{ "d3dx10" "d3dx10_42.dll" stdcall }
{ "d3dx11" "d3dx11_42.dll" stdcall }
{ "dwrite" "dwrite.dll" stdcall }
{ "x3daudio" "x3daudio1_6.dll" stdcall }
{ "xactengine" "xactengine3_5.dll" stdcall }
{ "xapofx" "xapofx1_3.dll" stdcall }
{ "xaudio2" "xaudio2_5.dll" stdcall }
} [ first3 add-library ] each

View File

@ -8,7 +8,7 @@ IN: opencl.ffi
{ [ os windows? ] [ "OpenCL.dll" ] }
{ [ os macosx? ] [ "/System/Library/Frameworks/OpenCL.framework/OpenCL" ] }
{ [ os unix? ] [ "libOpenCL.so" ] }
} cond "stdcall" add-library >>
} cond stdcall add-library >>
LIBRARY: opencl
! cl_platform.h

View File

@ -13,7 +13,7 @@ USING: alien kernel system combinators alien.syntax ;
IN: cryptlib.libcl
<< "libcl" {
{ [ win32? ] [ "cl32.dll" "stdcall" ] }
{ [ win32? ] [ "cl32.dll" stdcall ] }
{ [ macosx? ] [ "libcl.dylib" cdecl ] }
{ [ unix? ] [ "libcl.so" cdecl ] }
} cond add-library >>

View File

@ -6,7 +6,7 @@ USING: alien alien.syntax combinators kernel system ;
IN: db.mysql.ffi
<< "mysql" {
{ [ os winnt? ] [ "libmySQL.dll" "stdcall" ] }
{ [ os winnt? ] [ "libmySQL.dll" stdcall ] }
{ [ os macosx? ] [ "libmysqlclient.14.dylib" cdecl ] }
{ [ os unix? ] [ "libmysqlclient.so.14" cdecl ] }
} cond add-library >>

View File

@ -10,7 +10,7 @@ USING: alien alien.syntax combinators kernel system ;
IN: ldap.libldap
<< "libldap" {
{ [ win32? ] [ "libldap.dll" "stdcall" ] }
{ [ win32? ] [ "libldap.dll" stdcall ] }
{ [ macosx? ] [ "libldap.dylib" cdecl ] }
{ [ unix? ] [ "libldap.so" cdecl ] }
} cond add-library >>

View File

@ -5,7 +5,7 @@ combinators alien.c-types strings sequences namespaces make
words math threads io.encodings.ascii ;
IN: odbc
<< "odbc" "odbc32.dll" "stdcall" add-library >>
<< "odbc" "odbc32.dll" stdcall add-library >>
LIBRARY: odbc

View File

@ -12,7 +12,7 @@ USING: alien alien.syntax combinators kernel system ;
IN: oracle.liboci
"oci" {
{ [ os winnt? ] [ "oci.dll" "stdcall" ] }
{ [ os winnt? ] [ "oci.dll" stdcall ] }
{ [ os macosx? ] [ "$DYLD_LIBRARY_PATH/libclntsh.dylib" cdecl ] }
{ [ os unix? ] [ "$DYLD_LIBRARY_PATH/libclntsh.so.10.1" cdecl ] }
} cond add-library

View File

@ -10,7 +10,7 @@ USING: alien alien.syntax combinators system ;
IN: pdf.libhpdf
<< "libhpdf" {
{ [ win32? ] [ "libhpdf.dll" "stdcall" ] }
{ [ win32? ] [ "libhpdf.dll" stdcall ] }
{ [ macosx? ] [ "libhpdf.dylib" cdecl ] }
{ [ unix? ] [ "$LD_LIBRARY_PATH/libhpdf.so" cdecl ] }
} cond add-library >>