From ffd7de02d6412b1b754bb27bc0a411ca5328bd77 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Fri, 20 Nov 2009 01:37:24 -0600 Subject: [PATCH] Update a few places that used string C type names to use words; fixes some deploy tests --- basis/cairo/cairo.factor | 2 +- basis/db/sqlite/lib/lib.factor | 4 ++-- basis/images/memory/memory.factor | 2 +- basis/io/backend/unix/unix.factor | 4 ++-- basis/io/files/info/windows/windows.factor | 16 ++++++++-------- basis/io/files/windows/windows.factor | 2 +- basis/io/sockets/unix/unix.factor | 2 +- basis/io/sockets/windows/nt/nt.factor | 6 +++--- basis/random/windows/windows.factor | 2 +- .../specialized-arrays-tests.factor | 2 +- basis/tools/deploy/shaker/shaker.factor | 1 - basis/tools/disassembler/udis/udis-tests.factor | 6 +++--- basis/unix/bsd/netbsd/netbsd.factor | 2 +- basis/windows/com/com.factor | 2 +- extra/bunny/model/model.factor | 2 +- 15 files changed, 27 insertions(+), 28 deletions(-) diff --git a/basis/cairo/cairo.factor b/basis/cairo/cairo.factor index 074798a1b2..38398ae228 100755 --- a/basis/cairo/cairo.factor +++ b/basis/cairo/cairo.factor @@ -16,7 +16,7 @@ ERROR: cairo-error message ; : check-surface ( surface -- ) cairo_surface_status (check-cairo) ; -: width>stride ( width -- stride ) "uint" heap-size * ; inline +: width>stride ( width -- stride ) uint heap-size * ; inline : ( data dim -- surface ) [ CAIRO_FORMAT_ARGB32 ] dip first2 over width>stride diff --git a/basis/db/sqlite/lib/lib.factor b/basis/db/sqlite/lib/lib.factor index 163026f5ff..53034d148a 100644 --- a/basis/db/sqlite/lib/lib.factor +++ b/basis/db/sqlite/lib/lib.factor @@ -32,14 +32,14 @@ ERROR: sqlite-sql-error < sql-error n string ; : sqlite-open ( path -- db ) normalize-path - "void*" + void* [ 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*" "void*" + utf8 encode dup length void* void* [ sqlite3_prepare_v2 sqlite-check-result ] 2keep drop *void* ; diff --git a/basis/images/memory/memory.factor b/basis/images/memory/memory.factor index ccf891d770..883a097511 100644 --- a/basis/images/memory/memory.factor +++ b/basis/images/memory/memory.factor @@ -10,7 +10,7 @@ IN: images.memory > 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 -- ) diff --git a/basis/io/files/info/windows/windows.factor b/basis/io/files/info/windows/windows.factor index 9f0e4534e9..d317a717bd 100755 --- a/basis/io/files/info/windows/windows.factor +++ b/basis/io/files/info/windows/windows.factor @@ -20,7 +20,7 @@ IN: io.files.info.windows TUPLE: windows-file-info < file-info attributes ; : get-compressed-file-size ( path -- n ) - "DWORD" [ GetCompressedFileSize ] keep + DWORD [ GetCompressedFileSize ] keep over INVALID_FILE_SIZE = [ 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 ) MAX_PATH 1 + [ ] keep - "DWORD" - "DWORD" - "DWORD" + DWORD + DWORD + DWORD MAX_PATH 1 + [ ] keep [ GetVolumeInformation win32-error=0/f ] 7 nkeep drop 5 nrot drop @@ -110,9 +110,9 @@ M: windows link-info ( path -- info ) utf16n alien>string ; : file-system-space ( normalized-path -- available-space total-space free-space ) - "ULARGE_INTEGER" - "ULARGE_INTEGER" - "ULARGE_INTEGER" + ULARGE_INTEGER + ULARGE_INTEGER + ULARGE_INTEGER [ GetDiskFreeSpaceEx win32-error=0/f ] 3keep ; : 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 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 ; diff --git a/basis/io/files/windows/windows.factor b/basis/io/files/windows/windows.factor index ca5c9b3c4a..3a088a1730 100755 --- a/basis/io/files/windows/windows.factor +++ b/basis/io/files/windows/windows.factor @@ -64,7 +64,7 @@ C: FileArgs [ handle>> handle>> ] [ buffer>> ] [ buffer>> buffer-length ] - [ drop "DWORD" ] + [ drop DWORD ] [ FileArgs-overlapped ] } cleave ; diff --git a/basis/io/sockets/unix/unix.factor b/basis/io/sockets/unix/unix.factor index 71ad5a5758..cdf7e54408 100755 --- a/basis/io/sockets/unix/unix.factor +++ b/basis/io/sockets/unix/unix.factor @@ -17,7 +17,7 @@ IN: io.sockets.unix 0 socket dup io-error init-fd |dispose ; : set-socket-option ( fd level opt -- ) - [ handle-fd ] 2dip 1 "int" heap-size setsockopt io-error ; + [ handle-fd ] 2dip 1 dup byte-length setsockopt io-error ; M: unix addrinfo-error ( n -- ) [ gai_strerror throw ] unless-zero ; diff --git a/basis/io/sockets/windows/nt/nt.factor b/basis/io/sockets/windows/nt/nt.factor index 7cc21c9611..937dae347a 100755 --- a/basis/io/sockets/windows/nt/nt.factor +++ b/basis/io/sockets/windows/nt/nt.factor @@ -16,10 +16,10 @@ M: winnt WSASocket-flags ( -- DWORD ) SIO_GET_EXTENSION_FUNCTION_POINTER WSAID_CONNECTEX GUID heap-size - "void*" + void* [ - "void*" heap-size - "DWORD" + void* heap-size + DWORD f f WSAIoctl SOCKET_ERROR = [ diff --git a/basis/random/windows/windows.factor b/basis/random/windows/windows.factor index 38c118de92..757540c4c6 100644 --- a/basis/random/windows/windows.factor +++ b/basis/random/windows/windows.factor @@ -16,7 +16,7 @@ M: windows-crypto-context dispose ( tuple -- ) CONSTANT: factor-crypto-container "FactorCryptoContainer" :: (acquire-crypto-context) ( provider type flags -- handle ret ) - "HCRYPTPROV" :> handle + HCRYPTPROV :> handle handle factor-crypto-container provider diff --git a/basis/specialized-arrays/specialized-arrays-tests.factor b/basis/specialized-arrays/specialized-arrays-tests.factor index dd561e9d46..ef2654be45 100755 --- a/basis/specialized-arrays/specialized-arrays-tests.factor +++ b/basis/specialized-arrays/specialized-arrays-tests.factor @@ -20,7 +20,7 @@ SPECIALIZED-ARRAYS: bool ushort char uint float ulonglong ; [ 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>> = diff --git a/basis/tools/deploy/shaker/shaker.factor b/basis/tools/deploy/shaker/shaker.factor index e4ed7d72ae..4e117e11b5 100755 --- a/basis/tools/deploy/shaker/shaker.factor +++ b/basis/tools/deploy/shaker/shaker.factor @@ -31,7 +31,6 @@ IN: tools.deploy.shaker { "alien.strings" "cpu.x86" - "destructors" "environment" "libc" } diff --git a/basis/tools/disassembler/udis/udis-tests.factor b/basis/tools/disassembler/udis/udis-tests.factor index 9ad3dbbcc2..df3ef41365 100644 --- a/basis/tools/disassembler/udis/udis-tests.factor +++ b/basis/tools/disassembler/udis/udis-tests.factor @@ -2,8 +2,8 @@ IN: tools.disassembler.udis.tests 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 diff --git a/basis/unix/bsd/netbsd/netbsd.factor b/basis/unix/bsd/netbsd/netbsd.factor index 15b173c311..6bef08abe3 100644 --- a/basis/unix/bsd/netbsd/netbsd.factor +++ b/basis/unix/bsd/netbsd/netbsd.factor @@ -130,7 +130,7 @@ CONSTANT: _UTX_HOSTSIZE 256 CONSTANT: _SS_MAXSIZE 128 : _SS_ALIGNSIZE ( -- n ) - "__int64_t" heap-size ; inline + __int64_t heap-size ; inline : _SS_PAD1SIZE ( -- n ) _SS_ALIGNSIZE 2 - ; inline diff --git a/basis/windows/com/com.factor b/basis/windows/com/com.factor index 9628b890fb..33164f52c4 100755 --- a/basis/windows/com/com.factor +++ b/basis/windows/com/com.factor @@ -35,7 +35,7 @@ FUNCTION: void ReleaseStgMedium ( LPSTGMEDIUM pmedium ) ; : com-query-interface ( interface iid -- interface' ) [ - "void*" malloc-object &free + void* malloc-object &free [ IUnknown::QueryInterface ole32-error ] keep *void* ] with-destructors ; diff --git a/extra/bunny/model/model.factor b/extra/bunny/model/model.factor index b9923d5976..cfe95956c0 100755 --- a/extra/bunny/model/model.factor +++ b/extra/bunny/model/model.factor @@ -93,7 +93,7 @@ M: bunny-buffers bunny-geom { 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>>