Update a few places that used string C type names to use words; fixes some deploy tests
parent
24c3ddbbde
commit
ffd7de02d6
|
@ -16,7 +16,7 @@ ERROR: cairo-error message ;
|
||||||
|
|
||||||
: check-surface ( surface -- ) cairo_surface_status (check-cairo) ;
|
: check-surface ( surface -- ) cairo_surface_status (check-cairo) ;
|
||||||
|
|
||||||
: width>stride ( width -- stride ) "uint" heap-size * ; inline
|
: width>stride ( width -- stride ) uint heap-size * ; inline
|
||||||
|
|
||||||
: <image-surface> ( data dim -- surface )
|
: <image-surface> ( data dim -- surface )
|
||||||
[ CAIRO_FORMAT_ARGB32 ] dip first2 over width>stride
|
[ CAIRO_FORMAT_ARGB32 ] dip first2 over width>stride
|
||||||
|
|
|
@ -32,14 +32,14 @@ ERROR: sqlite-sql-error < sql-error n string ;
|
||||||
|
|
||||||
: sqlite-open ( path -- db )
|
: sqlite-open ( path -- db )
|
||||||
normalize-path
|
normalize-path
|
||||||
"void*" <c-object>
|
void* <c-object>
|
||||||
[ sqlite3_open sqlite-check-result ] keep *void* ;
|
[ sqlite3_open sqlite-check-result ] keep *void* ;
|
||||||
|
|
||||||
: sqlite-close ( db -- )
|
: sqlite-close ( db -- )
|
||||||
sqlite3_close sqlite-check-result ;
|
sqlite3_close sqlite-check-result ;
|
||||||
|
|
||||||
: sqlite-prepare ( db sql -- handle )
|
: sqlite-prepare ( db sql -- handle )
|
||||||
utf8 encode dup length "void*" <c-object> "void*" <c-object>
|
utf8 encode dup length void* <c-object> void* <c-object>
|
||||||
[ sqlite3_prepare_v2 sqlite-check-result ] 2keep
|
[ sqlite3_prepare_v2 sqlite-check-result ] 2keep
|
||||||
drop *void* ;
|
drop *void* ;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ IN: images.memory
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
: bitmap-size ( dim -- n ) product "uint" heap-size * ;
|
: bitmap-size ( dim -- n ) product uint heap-size * ;
|
||||||
|
|
||||||
: malloc-bitmap-data ( dim -- alien ) bitmap-size 1 calloc &free ;
|
: malloc-bitmap-data ( dim -- alien ) bitmap-size 1 calloc &free ;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ kernel.private math io.ports sequences strings sbufs threads
|
||||||
unix vectors io.buffers io.backend io.encodings math.parser
|
unix vectors io.buffers io.backend io.encodings math.parser
|
||||||
continuations system libc namespaces make io.timeouts
|
continuations system libc namespaces make io.timeouts
|
||||||
io.encodings.utf8 destructors destructors.private accessors
|
io.encodings.utf8 destructors destructors.private accessors
|
||||||
summary combinators locals unix.time fry
|
summary combinators locals unix.time unix.types fry
|
||||||
io.backend.unix.multiplexers ;
|
io.backend.unix.multiplexers ;
|
||||||
QUALIFIED: io
|
QUALIFIED: io
|
||||||
IN: io.backend.unix
|
IN: io.backend.unix
|
||||||
|
@ -151,7 +151,7 @@ M: stdin dispose*
|
||||||
|
|
||||||
: wait-for-stdin ( stdin -- n )
|
: wait-for-stdin ( stdin -- n )
|
||||||
[ control>> CHAR: X over io:stream-write1 io:stream-flush ]
|
[ control>> CHAR: X over io:stream-write1 io:stream-flush ]
|
||||||
[ size>> "ssize_t" heap-size swap io:stream-read *int ]
|
[ size>> ssize_t heap-size swap io:stream-read *int ]
|
||||||
bi ;
|
bi ;
|
||||||
|
|
||||||
:: refill-stdin ( buffer stdin size -- )
|
:: refill-stdin ( buffer stdin size -- )
|
||||||
|
|
|
@ -20,7 +20,7 @@ IN: io.files.info.windows
|
||||||
TUPLE: windows-file-info < file-info attributes ;
|
TUPLE: windows-file-info < file-info attributes ;
|
||||||
|
|
||||||
: get-compressed-file-size ( path -- n )
|
: get-compressed-file-size ( path -- n )
|
||||||
"DWORD" <c-object> [ GetCompressedFileSize ] keep
|
DWORD <c-object> [ GetCompressedFileSize ] keep
|
||||||
over INVALID_FILE_SIZE = [
|
over INVALID_FILE_SIZE = [
|
||||||
win32-error-string throw
|
win32-error-string throw
|
||||||
] [
|
] [
|
||||||
|
@ -100,9 +100,9 @@ M: windows link-info ( path -- info )
|
||||||
|
|
||||||
: volume-information ( normalized-path -- volume-name volume-serial max-component flags type )
|
: volume-information ( normalized-path -- volume-name volume-serial max-component flags type )
|
||||||
MAX_PATH 1 + [ <ushort-array> ] keep
|
MAX_PATH 1 + [ <ushort-array> ] keep
|
||||||
"DWORD" <c-object>
|
DWORD <c-object>
|
||||||
"DWORD" <c-object>
|
DWORD <c-object>
|
||||||
"DWORD" <c-object>
|
DWORD <c-object>
|
||||||
MAX_PATH 1 + [ <ushort-array> ] keep
|
MAX_PATH 1 + [ <ushort-array> ] keep
|
||||||
[ GetVolumeInformation win32-error=0/f ] 7 nkeep
|
[ GetVolumeInformation win32-error=0/f ] 7 nkeep
|
||||||
drop 5 nrot drop
|
drop 5 nrot drop
|
||||||
|
@ -110,9 +110,9 @@ M: windows link-info ( path -- info )
|
||||||
utf16n alien>string ;
|
utf16n alien>string ;
|
||||||
|
|
||||||
: file-system-space ( normalized-path -- available-space total-space free-space )
|
: file-system-space ( normalized-path -- available-space total-space free-space )
|
||||||
"ULARGE_INTEGER" <c-object>
|
ULARGE_INTEGER <c-object>
|
||||||
"ULARGE_INTEGER" <c-object>
|
ULARGE_INTEGER <c-object>
|
||||||
"ULARGE_INTEGER" <c-object>
|
ULARGE_INTEGER <c-object>
|
||||||
[ GetDiskFreeSpaceEx win32-error=0/f ] 3keep ;
|
[ GetDiskFreeSpaceEx win32-error=0/f ] 3keep ;
|
||||||
|
|
||||||
: calculate-file-system-info ( file-system-info -- file-system-info' )
|
: calculate-file-system-info ( file-system-info -- file-system-info' )
|
||||||
|
@ -160,7 +160,7 @@ M: winnt file-system-info ( path -- file-system-info )
|
||||||
ret 0 = [
|
ret 0 = [
|
||||||
ret win32-error-string throw
|
ret win32-error-string throw
|
||||||
] [
|
] [
|
||||||
names names-length *uint "ushort" heap-size * head
|
names names-length *uint ushort heap-size * head
|
||||||
utf16n alien>string CHAR: \0 split
|
utf16n alien>string CHAR: \0 split
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ C: <FileArgs> FileArgs
|
||||||
[ handle>> handle>> ]
|
[ handle>> handle>> ]
|
||||||
[ buffer>> ]
|
[ buffer>> ]
|
||||||
[ buffer>> buffer-length ]
|
[ buffer>> buffer-length ]
|
||||||
[ drop "DWORD" <c-object> ]
|
[ drop DWORD <c-object> ]
|
||||||
[ FileArgs-overlapped ]
|
[ FileArgs-overlapped ]
|
||||||
} cleave <FileArgs> ;
|
} cleave <FileArgs> ;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ IN: io.sockets.unix
|
||||||
0 socket dup io-error <fd> init-fd |dispose ;
|
0 socket dup io-error <fd> init-fd |dispose ;
|
||||||
|
|
||||||
: set-socket-option ( fd level opt -- )
|
: set-socket-option ( fd level opt -- )
|
||||||
[ handle-fd ] 2dip 1 <int> "int" heap-size setsockopt io-error ;
|
[ handle-fd ] 2dip 1 <int> dup byte-length setsockopt io-error ;
|
||||||
|
|
||||||
M: unix addrinfo-error ( n -- )
|
M: unix addrinfo-error ( n -- )
|
||||||
[ gai_strerror throw ] unless-zero ;
|
[ gai_strerror throw ] unless-zero ;
|
||||||
|
|
|
@ -16,10 +16,10 @@ M: winnt WSASocket-flags ( -- DWORD )
|
||||||
SIO_GET_EXTENSION_FUNCTION_POINTER
|
SIO_GET_EXTENSION_FUNCTION_POINTER
|
||||||
WSAID_CONNECTEX
|
WSAID_CONNECTEX
|
||||||
GUID heap-size
|
GUID heap-size
|
||||||
"void*" <c-object>
|
void* <c-object>
|
||||||
[
|
[
|
||||||
"void*" heap-size
|
void* heap-size
|
||||||
"DWORD" <c-object>
|
DWORD <c-object>
|
||||||
f
|
f
|
||||||
f
|
f
|
||||||
WSAIoctl SOCKET_ERROR = [
|
WSAIoctl SOCKET_ERROR = [
|
||||||
|
|
|
@ -16,7 +16,7 @@ M: windows-crypto-context dispose ( tuple -- )
|
||||||
CONSTANT: factor-crypto-container "FactorCryptoContainer"
|
CONSTANT: factor-crypto-container "FactorCryptoContainer"
|
||||||
|
|
||||||
:: (acquire-crypto-context) ( provider type flags -- handle ret )
|
:: (acquire-crypto-context) ( provider type flags -- handle ret )
|
||||||
"HCRYPTPROV" <c-object> :> handle
|
HCRYPTPROV <c-object> :> handle
|
||||||
handle
|
handle
|
||||||
factor-crypto-container
|
factor-crypto-container
|
||||||
provider
|
provider
|
||||||
|
|
|
@ -20,7 +20,7 @@ SPECIALIZED-ARRAYS: bool ushort char uint float ulonglong ;
|
||||||
|
|
||||||
[ t ] [
|
[ t ] [
|
||||||
{ t f t } >bool-array underlying>>
|
{ t f t } >bool-array underlying>>
|
||||||
{ 1 0 1 } "bool" heap-size {
|
{ 1 0 1 } bool heap-size {
|
||||||
{ 1 [ >char-array ] }
|
{ 1 [ >char-array ] }
|
||||||
{ 4 [ >uint-array ] }
|
{ 4 [ >uint-array ] }
|
||||||
} case underlying>> =
|
} case underlying>> =
|
||||||
|
|
|
@ -31,7 +31,6 @@ IN: tools.deploy.shaker
|
||||||
{
|
{
|
||||||
"alien.strings"
|
"alien.strings"
|
||||||
"cpu.x86"
|
"cpu.x86"
|
||||||
"destructors"
|
|
||||||
"environment"
|
"environment"
|
||||||
"libc"
|
"libc"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,8 @@ IN: tools.disassembler.udis.tests
|
||||||
USING: tools.disassembler.udis tools.test alien.c-types system combinators kernel ;
|
USING: tools.disassembler.udis tools.test alien.c-types system combinators kernel ;
|
||||||
|
|
||||||
{
|
{
|
||||||
{ [ os linux? cpu x86.64? and ] [ [ 656 ] [ "ud" heap-size ] unit-test ] }
|
{ [ os linux? cpu x86.64? and ] [ [ 656 ] [ ud heap-size ] unit-test ] }
|
||||||
{ [ os macosx? cpu x86.32? and ] [ [ 592 ] [ "ud" heap-size ] unit-test ] }
|
{ [ os macosx? cpu x86.32? and ] [ [ 592 ] [ ud heap-size ] unit-test ] }
|
||||||
{ [ os macosx? cpu x86.64? and ] [ [ 656 ] [ "ud" heap-size ] unit-test ] }
|
{ [ os macosx? cpu x86.64? and ] [ [ 656 ] [ ud heap-size ] unit-test ] }
|
||||||
[ ]
|
[ ]
|
||||||
} cond
|
} cond
|
|
@ -130,7 +130,7 @@ CONSTANT: _UTX_HOSTSIZE 256
|
||||||
CONSTANT: _SS_MAXSIZE 128
|
CONSTANT: _SS_MAXSIZE 128
|
||||||
|
|
||||||
: _SS_ALIGNSIZE ( -- n )
|
: _SS_ALIGNSIZE ( -- n )
|
||||||
"__int64_t" heap-size ; inline
|
__int64_t heap-size ; inline
|
||||||
|
|
||||||
: _SS_PAD1SIZE ( -- n )
|
: _SS_PAD1SIZE ( -- n )
|
||||||
_SS_ALIGNSIZE 2 - ; inline
|
_SS_ALIGNSIZE 2 - ; inline
|
||||||
|
|
|
@ -35,7 +35,7 @@ FUNCTION: void ReleaseStgMedium ( LPSTGMEDIUM pmedium ) ;
|
||||||
|
|
||||||
: com-query-interface ( interface iid -- interface' )
|
: com-query-interface ( interface iid -- interface' )
|
||||||
[
|
[
|
||||||
"void*" malloc-object &free
|
void* malloc-object &free
|
||||||
[ IUnknown::QueryInterface ole32-error ] keep *void*
|
[ IUnknown::QueryInterface ole32-error ] keep *void*
|
||||||
] with-destructors ;
|
] with-destructors ;
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ M: bunny-buffers bunny-geom
|
||||||
{ GL_VERTEX_ARRAY GL_NORMAL_ARRAY } [
|
{ GL_VERTEX_ARRAY GL_NORMAL_ARRAY } [
|
||||||
GL_FLOAT 0 0 buffer-offset glNormalPointer
|
GL_FLOAT 0 0 buffer-offset glNormalPointer
|
||||||
[
|
[
|
||||||
nv>> "float" heap-size * buffer-offset
|
nv>> c:float heap-size * buffer-offset
|
||||||
[ 3 GL_FLOAT 0 ] dip glVertexPointer
|
[ 3 GL_FLOAT 0 ] dip glVertexPointer
|
||||||
] [
|
] [
|
||||||
ni>>
|
ni>>
|
||||||
|
|
Loading…
Reference in New Issue