: 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 )
[ CAIRO_FORMAT_ARGB32 ] dip first2 over width>stride
: sqlite-open ( path -- db )
normalize-path
- "void*" <c-object>
+ void* <c-object>
[ sqlite3_open sqlite-check-result ] keep *void* ;
: sqlite-close ( db -- )
sqlite3_close sqlite-check-result ;
: 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
drop *void* ;
<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 ;
unix vectors io.buffers io.backend io.encodings math.parser
continuations system libc namespaces make io.timeouts
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 ;
QUALIFIED: io
IN: io.backend.unix
: wait-for-stdin ( stdin -- n )
[ 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 ;
:: refill-stdin ( buffer stdin size -- )
TUPLE: windows-file-info < file-info attributes ;
: get-compressed-file-size ( path -- n )
- "DWORD" <c-object> [ GetCompressedFileSize ] keep
+ DWORD <c-object> [ GetCompressedFileSize ] keep
over INVALID_FILE_SIZE = [
win32-error-string throw
] [
: volume-information ( normalized-path -- volume-name volume-serial max-component flags type )
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
[ GetVolumeInformation win32-error=0/f ] 7 nkeep
drop 5 nrot drop
utf16n alien>string ;
: 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 ;
: calculate-file-system-info ( file-system-info -- file-system-info' )
ret 0 = [
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
] if ;
[ handle>> handle>> ]
[ buffer>> ]
[ buffer>> buffer-length ]
- [ drop "DWORD" <c-object> ]
+ [ drop DWORD <c-object> ]
[ FileArgs-overlapped ]
} cleave <FileArgs> ;
0 socket dup io-error <fd> init-fd |dispose ;
: 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 -- )
[ gai_strerror throw ] unless-zero ;
SIO_GET_EXTENSION_FUNCTION_POINTER
WSAID_CONNECTEX
GUID heap-size
- "void*" <c-object>
+ void* <c-object>
[
- "void*" heap-size
- "DWORD" <c-object>
+ void* heap-size
+ DWORD <c-object>
f
f
WSAIoctl SOCKET_ERROR = [
CONSTANT: factor-crypto-container "FactorCryptoContainer"
:: (acquire-crypto-context) ( provider type flags -- handle ret )
- "HCRYPTPROV" <c-object> :> handle
+ HCRYPTPROV <c-object> :> handle
handle
factor-crypto-container
provider
[ t ] [
{ t f t } >bool-array underlying>>
- { 1 0 1 } "bool" heap-size {
+ { 1 0 1 } bool heap-size {
{ 1 [ >char-array ] }
{ 4 [ >uint-array ] }
} case underlying>> =
{
"alien.strings"
"cpu.x86"
- "destructors"
"environment"
"libc"
}
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 macosx? cpu x86.32? and ] [ [ 592 ] [ "ud" heap-size ] unit-test ] }
- { [ os macosx? 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.64? and ] [ [ 656 ] [ ud heap-size ] unit-test ] }
[ ]
} cond
\ No newline at end of file
CONSTANT: _SS_MAXSIZE 128
: _SS_ALIGNSIZE ( -- n )
- "__int64_t" heap-size ; inline
+ __int64_t heap-size ; inline
: _SS_PAD1SIZE ( -- n )
_SS_ALIGNSIZE 2 - ; inline
: com-query-interface ( interface iid -- interface' )
[
- "void*" malloc-object &free
+ void* malloc-object &free
[ IUnknown::QueryInterface ole32-error ] keep *void*
] with-destructors ;
{ GL_VERTEX_ARRAY GL_NORMAL_ARRAY } [
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
] [
ni>>