From: Joe Groff Date: Thu, 1 Apr 2010 02:29:04 +0000 (-0700) Subject: "stdcall" -> stdcall X-Git-Tag: 0.97~4720^2~22^2~23^2~25 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=f3dd625de6c50baefff1977c692f634fb2f0dfa8 "stdcall" -> stdcall --- diff --git a/basis/alien/libraries/libraries-docs.factor b/basis/alien/libraries/libraries-docs.factor index be1a7c7ad6..7ee953581a 100644 --- a/basis/alien/libraries/libraries-docs.factor +++ b/basis/alien/libraries/libraries-docs.factor @@ -6,7 +6,7 @@ IN: alien.libraries HELP: { $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" } } } ; diff --git a/basis/compiler/codegen/codegen.factor b/basis/compiler/codegen/codegen.factor index d82ced8a1d..d8f0823d44 100755 --- a/basis/compiler/codegen/codegen.factor +++ b/basis/compiler/codegen/codegen.factor @@ -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 ; diff --git a/basis/compiler/tests/alien.factor b/basis/compiler/tests/alien.factor index a813c530f7..71efe8a929 100755 --- a/basis/compiler/tests/alien.factor +++ b/basis/compiler/tests/alien.factor @@ -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 } diff --git a/basis/cpu/x86/32/32.factor b/basis/cpu/x86/32/32.factor index 38e60cddf9..c96d961d65 100755 --- a/basis/cpu/x86/32/32.factor +++ b/basis/cpu/x86/32/32.factor @@ -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 diff --git a/basis/io/sockets/windows/nt/nt.factor b/basis/io/sockets/windows/nt/nt.factor index 8eb2df5b46..7a961518a0 100644 --- a/basis/io/sockets/windows/nt/nt.factor +++ b/basis/io/sockets/windows/nt/nt.factor @@ -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 -- ) diff --git a/basis/opengl/gl/windows/windows.factor b/basis/opengl/gl/windows/windows.factor index 8bceb865e2..2ac9894b9a 100644 --- a/basis/opengl/gl/windows/windows.factor +++ b/basis/opengl/gl/windows/windows.factor @@ -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 diff --git a/basis/ui/backend/windows/windows.factor b/basis/ui/backend/windows/windows.factor index 8a4ae9853f..626faf4274 100644 --- a/basis/ui/backend/windows/windows.factor +++ b/basis/ui/backend/windows/windows.factor @@ -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 diff --git a/basis/windows/ce/ce.factor b/basis/windows/ce/ce.factor index ff6a9ad4fc..614a535ea0 100644 --- a/basis/windows/ce/ce.factor +++ b/basis/windows/ce/ce.factor @@ -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 diff --git a/basis/windows/com/syntax/syntax.factor b/basis/windows/com/syntax/syntax.factor index 78a3c0e6d2..9d74ac49f8 100644 --- a/basis/windows/com/syntax/syntax.factor +++ b/basis/windows/com/syntax/syntax.factor @@ -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 ; diff --git a/basis/windows/com/wrapper/wrapper.factor b/basis/windows/com/wrapper/wrapper.factor index 25861659dc..6f92c8b860 100644 --- a/basis/windows/com/wrapper/wrapper.factor +++ b/basis/windows/com/wrapper/wrapper.factor @@ -114,7 +114,7 @@ unless ] [ first2 (finish-thunk) ] bi* - "stdcall" swap compile-alien-callback + stdcall swap compile-alien-callback ] 2map ; : (make-callbacks) ( implementations -- sequence ) diff --git a/basis/windows/ddk/hid/hid.factor b/basis/windows/ddk/hid/hid.factor index 9c8a55ee7c..25c2642e34 100644 --- a/basis/windows/ddk/hid/hid.factor +++ b/basis/windows/ddk/hid/hid.factor @@ -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 diff --git a/basis/windows/ddk/setupapi/setupapi.factor b/basis/windows/ddk/setupapi/setupapi.factor index 06d32725f7..45ecebee74 100644 --- a/basis/windows/ddk/setupapi/setupapi.factor +++ b/basis/windows/ddk/setupapi/setupapi.factor @@ -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 diff --git a/basis/windows/ddk/winusb/winusb.factor b/basis/windows/ddk/winusb/winusb.factor index 3b98e7e8ca..12ce137901 100644 --- a/basis/windows/ddk/winusb/winusb.factor +++ b/basis/windows/ddk/winusb/winusb.factor @@ -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 diff --git a/basis/windows/dwmapi/dwmapi.factor b/basis/windows/dwmapi/dwmapi.factor index 998846ebc2..8f68643e0a 100644 --- a/basis/windows/dwmapi/dwmapi.factor +++ b/basis/windows/dwmapi/dwmapi.factor @@ -21,7 +21,7 @@ STRUCT: DWM_BLURBEHIND : full-window-margins ( -- MARGINS ) -1 -1 -1 -1 ; inline -<< "dwmapi" "dwmapi.dll" "stdcall" add-library >> +<< "dwmapi" "dwmapi.dll" stdcall add-library >> LIBRARY: dwmapi diff --git a/basis/windows/nt/nt.factor b/basis/windows/nt/nt.factor index 2de60e524d..4b119ba5fa 100644 --- a/basis/windows/nt/nt.factor +++ b/basis/windows/nt/nt.factor @@ -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 diff --git a/extra/opencl/ffi/ffi.factor b/extra/opencl/ffi/ffi.factor index 8f0400dd20..9ee2135cb6 100644 --- a/extra/opencl/ffi/ffi.factor +++ b/extra/opencl/ffi/ffi.factor @@ -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 diff --git a/unmaintained/cryptlib/libcl/libcl.factor b/unmaintained/cryptlib/libcl/libcl.factor index f38ee856a1..8895d0b3a6 100644 --- a/unmaintained/cryptlib/libcl/libcl.factor +++ b/unmaintained/cryptlib/libcl/libcl.factor @@ -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 >> diff --git a/unmaintained/db/mysql/ffi/ffi.factor b/unmaintained/db/mysql/ffi/ffi.factor index 1f50035a81..98fd0b38cb 100644 --- a/unmaintained/db/mysql/ffi/ffi.factor +++ b/unmaintained/db/mysql/ffi/ffi.factor @@ -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 >> diff --git a/unmaintained/ldap/libldap/libldap.factor b/unmaintained/ldap/libldap/libldap.factor index 83d31ed968..9b7dd36a69 100644 --- a/unmaintained/ldap/libldap/libldap.factor +++ b/unmaintained/ldap/libldap/libldap.factor @@ -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 >> diff --git a/unmaintained/odbc/odbc.factor b/unmaintained/odbc/odbc.factor index 06d47b8937..6dcddb5bd5 100644 --- a/unmaintained/odbc/odbc.factor +++ b/unmaintained/odbc/odbc.factor @@ -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 diff --git a/unmaintained/oracle/liboci/liboci.factor b/unmaintained/oracle/liboci/liboci.factor index 71473ea7c8..4e8ebfc860 100644 --- a/unmaintained/oracle/liboci/liboci.factor +++ b/unmaintained/oracle/liboci/liboci.factor @@ -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 diff --git a/unmaintained/pdf/libhpdf/libhpdf.factor b/unmaintained/pdf/libhpdf/libhpdf.factor index a3d5dd574f..c365f6944f 100644 --- a/unmaintained/pdf/libhpdf/libhpdf.factor +++ b/unmaintained/pdf/libhpdf/libhpdf.factor @@ -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 >>