From 7ec2ba15ef18bc0a2ec05e075758eb5f315c8a13 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sun, 16 Jan 2022 17:33:09 -0800 Subject: [PATCH] classes.struct: moving to new/boa instead of / --- basis/alien/complex/complex-tests.factor | 3 +-- basis/alien/complex/functor/functor.factor | 2 +- basis/calendar/unix/unix.factor | 2 +- basis/calendar/windows/windows.factor | 6 +++--- basis/classes/struct/struct.factor | 1 + basis/cocoa/messages/messages.factor | 2 +- basis/cocoa/types/types.factor | 5 ++--- basis/compiler/tests/alien.factor | 4 ++-- basis/compression/zlib/zlib.factor | 6 +++--- basis/core-foundation/core-foundation.factor | 3 +-- basis/core-foundation/fsevents/fsevents.factor | 2 +- .../launch-services/launch-services.factor | 2 +- basis/core-graphics/types/types.factor | 9 +++------ basis/game/input/dinput/dinput.factor | 10 +++++----- basis/game/input/xinput/xinput.factor | 4 ++-- basis/images/loader/gdiplus/gdiplus.factor | 3 +-- .../unix/multiplexers/epoll/epoll.factor | 2 +- .../unix/multiplexers/kqueue/kqueue.factor | 2 +- basis/io/backend/unix/unix.factor | 2 +- basis/io/directories/unix/linux/linux.factor | 2 +- basis/io/directories/unix/unix.factor | 2 +- basis/io/directories/windows/windows.factor | 2 +- .../io/files/info/unix/freebsd/freebsd.factor | 4 ++-- basis/io/files/info/unix/linux/linux.factor | 4 ++-- basis/io/files/info/unix/macosx/macosx.factor | 4 ++-- basis/io/files/info/unix/unix.factor | 2 +- basis/io/files/info/windows/windows.factor | 4 ++-- basis/io/files/windows/windows.factor | 10 +++++----- basis/io/launcher/windows/windows.factor | 4 ++-- basis/io/sockets/sockets.factor | 10 +++++----- basis/io/sockets/unix/unix.factor | 4 ++-- basis/linux/input-events/ffi/ffi.factor | 2 +- basis/math/floats/half/half-tests.factor | 2 +- basis/random/sfmt/sfmt.factor | 2 +- .../specialized-arrays-tests.factor | 2 +- basis/system-info/windows/windows.factor | 6 +++--- basis/tools/deploy/windows/ico/ico.factor | 2 +- basis/tools/ps/windows/windows.factor | 4 ++-- basis/ui/backend/gtk/gtk.factor | 2 +- basis/ui/backend/windows/windows.factor | 18 +++++++++--------- basis/ui/backend/x11/x11.factor | 6 +++--- basis/ui/text/pango/pango.factor | 4 ++-- basis/unix/groups/groups.factor | 2 +- basis/unix/process/process.factor | 2 +- basis/unix/stat/stat.factor | 4 ++-- basis/unix/time/time.factor | 6 +++--- basis/unix/unix.factor | 2 +- .../directx/dinput/constants/constants.factor | 4 ++-- .../dragdrop-listener/dragdrop-listener.factor | 4 ++-- basis/windows/dropfiles/dropfiles.factor | 2 +- basis/windows/dwmapi/dwmapi.factor | 5 ++--- basis/windows/hardware/hardware.factor | 2 +- basis/windows/iphlpapi/iphlpapi.factor | 2 +- basis/windows/offscreen/offscreen.factor | 2 +- basis/windows/ole32/ole32.factor | 4 ++-- basis/windows/powrprof/powrprof.factor | 2 +- basis/windows/privileges/privileges.factor | 4 ++-- basis/windows/registry/registry.factor | 2 +- basis/windows/shell32/shell32.factor | 2 +- basis/windows/streams/streams.factor | 6 +++--- basis/windows/time/time.factor | 4 ++-- basis/windows/types/types.factor | 2 +- basis/windows/uniscribe/uniscribe.factor | 2 +- basis/x11/clipboard/clipboard.factor | 2 +- basis/x11/events/events.factor | 4 ++-- basis/x11/windows/windows.factor | 4 ++-- extra/benchmark/nbody-simd/nbody-simd.factor | 2 +- .../struct-arrays/struct-arrays.factor | 2 +- extra/benchmark/yuv-to-rgb/yuv-to-rgb.factor | 2 +- extra/chipmunk/ffi/ffi.factor | 4 ++-- extra/classes/struct/vectored/vectored.factor | 2 +- extra/cuda/devices/devices.factor | 2 +- extra/file-picker/windows/windows.factor | 2 +- extra/fluids/fluids.factor | 4 ++-- extra/game/loop/benchmark/benchmark.factor | 2 +- extra/gdbm/gdbm.factor | 2 +- extra/gpu/demos/bunny/bunny.factor | 2 +- extra/io/files/acls/macosx/macosx.factor | 2 +- extra/io/files/trash/macosx/macosx.factor | 2 +- extra/io/files/trash/windows/windows.factor | 2 +- extra/io/serial/linux/linux.factor | 2 +- extra/io/serial/windows/windows.factor | 2 +- extra/macho/macho.factor | 2 +- extra/random/xoshiro/xoshiro.factor | 2 +- extra/raylib/demo/demo.factor | 2 +- extra/raylib/demo/gui/gui.factor | 2 +- .../demo/mesh-picking/mesh-picking.factor | 6 +++--- extra/terminal/linux/linux.factor | 2 +- extra/terminal/macosx/macosx.factor | 2 +- extra/terminal/windows/windows.factor | 2 +- extra/time/macosx/macosx.factor | 2 +- extra/time/unix/unix.factor | 2 +- extra/tools/time/struct/struct.factor | 4 ++-- extra/windows/fullscreen/fullscreen.factor | 6 +++--- 94 files changed, 155 insertions(+), 162 deletions(-) diff --git a/basis/alien/complex/complex-tests.factor b/basis/alien/complex/complex-tests.factor index 564f97cd38..ff9da9ce8c 100644 --- a/basis/alien/complex/complex-tests.factor +++ b/basis/alien/complex/complex-tests.factor @@ -7,8 +7,7 @@ IN: alien.complex.tests STRUCT: complex-holder { z complex-float } ; -: ( z -- alien ) - complex-holder ; +C: complex-holder { } [ C{ 1.0 2.0 } "h" set diff --git a/basis/alien/complex/functor/functor.factor b/basis/alien/complex/functor/functor.factor index 33a651a19c..26f4c60419 100644 --- a/basis/alien/complex/functor/functor.factor +++ b/basis/alien/complex/functor/functor.factor @@ -18,7 +18,7 @@ WHERE STRUCT: T-class { real N-type } { imaginary N-type } ; : ( z -- alien ) - >rect T-class >c-ptr ; + >rect T-class boa >c-ptr ; : *T ( alien -- z ) T-class memory>struct [ real>> ] [ imaginary>> ] bi rect> ; inline diff --git a/basis/calendar/unix/unix.factor b/basis/calendar/unix/unix.factor index 3fbe252511..c888e3457d 100644 --- a/basis/calendar/unix/unix.factor +++ b/basis/calendar/unix/unix.factor @@ -35,7 +35,7 @@ M: unix gmt-offset get-time gmtoff>> 3600 /mod 60 /mod ; : current-timeval ( -- timeval ) - timeval [ f gettimeofday io-error ] keep ; inline + timeval new [ f gettimeofday io-error ] keep ; inline : system-micros ( -- n ) current-timeval timeval>micros ; diff --git a/basis/calendar/windows/windows.factor b/basis/calendar/windows/windows.factor index 0fa3f2ea20..3da219bb7f 100644 --- a/basis/calendar/windows/windows.factor +++ b/basis/calendar/windows/windows.factor @@ -15,7 +15,7 @@ IN: calendar.windows [ nip >integer ] [ - 1000 * >integer ] 2bi ] - } cleave \ SYSTEMTIME ; + } cleave \ SYSTEMTIME boa ; : SYSTEMTIME>timestamp ( SYSTEMTIME -- timestamp ) { @@ -28,7 +28,7 @@ IN: calendar.windows } cleave instant ; M: windows gmt-offset - TIME_ZONE_INFORMATION + TIME_ZONE_INFORMATION new dup GetTimeZoneInformation { { TIME_ZONE_ID_INVALID [ win32-error ] } { TIME_ZONE_ID_UNKNOWN [ Bias>> ] } @@ -37,4 +37,4 @@ M: windows gmt-offset } case neg 60 /mod 0 ; M: windows now-gmt - SYSTEMTIME [ GetSystemTime ] keep SYSTEMTIME>timestamp ; + SYSTEMTIME new [ GetSystemTime ] keep SYSTEMTIME>timestamp ; diff --git a/basis/classes/struct/struct.factor b/basis/classes/struct/struct.factor index 3763d65ab1..df7896a404 100644 --- a/basis/classes/struct/struct.factor +++ b/basis/classes/struct/struct.factor @@ -162,6 +162,7 @@ M: struct-class writer-quot : offset-of ( field struct -- offset ) struct-slots slot-named offset>> ; inline +! XXX: make this faster M: struct hashcode* nip dup >c-ptr [ struct-slot-values hashcode ] [ drop 0 ] if ; inline diff --git a/basis/cocoa/messages/messages.factor b/basis/cocoa/messages/messages.factor index 780e7717b7..b4a608aa5b 100644 --- a/basis/cocoa/messages/messages.factor +++ b/basis/cocoa/messages/messages.factor @@ -40,7 +40,7 @@ super-message-senders [ H{ } clone ] initialize : ( receiver -- super ) [ ] [ object_getClass class_getSuperclass ] bi - objc-super ; + objc-super boa ; TUPLE: selector-tuple name object ; diff --git a/basis/cocoa/types/types.factor b/basis/cocoa/types/types.factor index 9c3058ab35..43e0a238ae 100644 --- a/basis/cocoa/types/types.factor +++ b/basis/cocoa/types/types.factor @@ -22,6 +22,8 @@ STRUCT: NSRange { location NSUInteger } { length NSUInteger } ; +C: NSRange + TYPEDEF: NSRange _NSRange ! The "lL" type encodings refer to 32-bit values even in 64-bit mode @@ -29,9 +31,6 @@ TYPEDEF: int long32 TYPEDEF: uint ulong32 TYPEDEF: void* unknown_type -: ( location length -- size ) - NSRange ; - STRUCT: NSFastEnumerationState { state ulong } { itemsPtr id* } diff --git a/basis/compiler/tests/alien.factor b/basis/compiler/tests/alien.factor index 7edb840226..faea5a6fe6 100644 --- a/basis/compiler/tests/alien.factor +++ b/basis/compiler/tests/alien.factor @@ -762,11 +762,11 @@ mingw? [ : fastcall-struct-return-ii-callback ( -- ptr ) test-struct-11 { int int } fastcall - [ [ + ] [ - ] 2bi test-struct-11 ] alien-callback ; + [ [ + ] [ - ] 2bi test-struct-11 boa ] alien-callback ; : fastcall-struct-return-iii-callback ( -- ptr ) test-struct-11 { int int int } fastcall - [ [ drop + ] [ - nip ] 3bi test-struct-11 ] alien-callback ; + [ [ drop + ] [ - nip ] 3bi test-struct-11 boa ] alien-callback ; { 8 } [ 3 4 fastcall-ii-callback [ fastcall-ii-indirect ] with-callback diff --git a/basis/compression/zlib/zlib.factor b/basis/compression/zlib/zlib.factor index f7318500f5..bb41d6dccd 100644 --- a/basis/compression/zlib/zlib.factor +++ b/basis/compression/zlib/zlib.factor @@ -53,12 +53,12 @@ ERROR: zlib-failed n string ; : zlib-inflate-init ( -- z_stream_s ) - z_stream + z_stream new dup ZLIB_VERSION over byte-length inflateInit_ zlib-error ; ! window can be 0, 15, 32, 47 (others?) : zlib-inflate-init2 ( window -- z_stream_s ) - [ z_stream dup ] dip + [ z_stream new dup ] dip ZLIB_VERSION pick byte-length inflateInit2_ zlib-error ; : zlib-inflate-end ( z_stream -- ) @@ -71,4 +71,4 @@ ERROR: zlib-failed n string ; inflate zlib-error ; : zlib-inflate-get-header ( z_stream -- gz_header ) - gz_header [ inflateGetHeader zlib-error ] keep ; + gz_header new [ inflateGetHeader zlib-error ] keep ; diff --git a/basis/core-foundation/core-foundation.factor b/basis/core-foundation/core-foundation.factor index e0e537b737..12ce61cf44 100644 --- a/basis/core-foundation/core-foundation.factor +++ b/basis/core-foundation/core-foundation.factor @@ -33,8 +33,7 @@ STRUCT: CFRange { location CFIndex } { length CFIndex } ; -: ( location length -- range ) - CFRange ; +C: CFRange FUNCTION: CFTypeRef CFRetain ( CFTypeRef cf ) diff --git a/basis/core-foundation/fsevents/fsevents.factor b/basis/core-foundation/fsevents/fsevents.factor index c1bf42db62..15cb7894f0 100644 --- a/basis/core-foundation/fsevents/fsevents.factor +++ b/basis/core-foundation/fsevents/fsevents.factor @@ -129,7 +129,7 @@ FUNCTION: void FSEventStreamShow ( FSEventStreamRef streamRef ) FUNCTION: CFStringRef FSEventStreamCopyDescription ( FSEventStreamRef streamRef ) : make-FSEventStreamContext ( info -- alien ) - FSEventStreamContext + FSEventStreamContext new swap >>info ; :: ( callback info paths latency flags -- event-stream ) diff --git a/basis/core-foundation/launch-services/launch-services.factor b/basis/core-foundation/launch-services/launch-services.factor index cc72a8013c..7b7a12d7be 100644 --- a/basis/core-foundation/launch-services/launch-services.factor +++ b/basis/core-foundation/launch-services/launch-services.factor @@ -126,7 +126,7 @@ ERROR: core-foundation-error n ; kLSUnknownCreator swap &CFRelease f - FSRef + FSRef new [ f LSFindApplicationForInfo cf-error ] keep fsref>string ] with-destructors ; diff --git a/basis/core-graphics/types/types.factor b/basis/core-graphics/types/types.factor index 262c241cbf..97e94adfb8 100644 --- a/basis/core-graphics/types/types.factor +++ b/basis/core-graphics/types/types.factor @@ -12,15 +12,13 @@ STRUCT: CGPoint { x CGFloat } { y CGFloat } ; -: ( x y -- point ) - CGPoint ; +C: CGPoint STRUCT: CGSize { w CGFloat } { h CGFloat } ; -: ( w h -- size ) - CGSize ; +C: CGSize STRUCT: CGRect { origin CGPoint } @@ -56,8 +54,7 @@ STRUCT: CGRect size>> h<< ; inline : ( x y w h -- rect ) - [ CGPoint ] [ CGSize ] 2bi* - CGRect ; + [ CGPoint boa ] [ CGSize boa ] 2bi* CGRect boa ; : CGRect-x-y ( alien -- origin-x origin-y ) [ CGRect-x ] [ CGRect-y ] bi ; diff --git a/basis/game/input/dinput/dinput.factor b/basis/game/input/dinput/dinput.factor index 78b8ac5444..3a69d4408a 100644 --- a/basis/game/input/dinput/dinput.factor +++ b/basis/game/input/dinput/dinput.factor @@ -41,7 +41,7 @@ SYMBOLS: +dinput+ +keyboard-device+ +keyboard-state+ get-global IDirectInputDevice8W::SetDataFormat check-ole32-error ; inline : ( size -- DIPROPDWORD ) - DIPROPDWORD [ + DIPROPDWORD new [ diph>> DIPROPDWORD heap-size >>dwSize DIPROPHEADER heap-size >>dwHeaderSize @@ -77,11 +77,11 @@ SYMBOLS: +dinput+ +keyboard-device+ +keyboard-state+ MOUSE-BUFFER-SIZE DIDEVICEOBJECTDATA +mouse-buffer+ set-global ; : device-info ( device -- DIDEVICEIMAGEINFOW ) - DIDEVICEINSTANCEW + DIDEVICEINSTANCEW new DIDEVICEINSTANCEW heap-size >>dwSize [ IDirectInputDevice8W::GetDeviceInfo check-ole32-error ] keep ; inline : device-caps ( device -- DIDEVCAPS ) - DIDEVCAPS + DIDEVCAPS new DIDEVCAPS heap-size >>dwSize [ IDirectInputDevice8W::GetCapabilities check-ole32-error ] keep ; inline @@ -190,7 +190,7 @@ TUPLE: window-rect < rect window-loc ; { 0 0 } >>dim ; : (device-notification-filter) ( -- DEV_BROADCAST_DEVICEW ) - DEV_BROADCAST_DEVICEW + DEV_BROADCAST_DEVICEW new DEV_BROADCAST_DEVICEW heap-size >>dbcc_size DBT_DEVTYP_DEVICEINTERFACE >>dbcc_devicetype ; @@ -323,7 +323,7 @@ CONSTANT: pov-values IDirectInputDevice8W::GetDeviceState check-ole32-error ; : (read-controller) ( handle template -- state ) - swap [ DIJOYSTATE2 [ get-device-state ] keep ] + swap [ DIJOYSTATE2 new [ get-device-state ] keep ] [ fill-controller-state ] [ drop f ] with-acquisition ; M: dinput-game-input-backend read-controller diff --git a/basis/game/input/xinput/xinput.factor b/basis/game/input/xinput/xinput.factor index 6a38f96e2f..0959df79f5 100644 --- a/basis/game/input/xinput/xinput.factor +++ b/basis/game/input/xinput/xinput.factor @@ -114,13 +114,13 @@ M: xinput-game-input-backend instance-id if ; M: xinput-game-input-backend read-controller - XINPUT_STATE [ XInputGetState drop ] keep + XINPUT_STATE new [ XInputGetState drop ] keep fill-controller-state ; M: xinput-game-input-backend calibrate-controller drop ; M: xinput-game-input-backend vibrate-controller - [ >vibration ] bi@ XINPUT_VIBRATION XInputSetState drop ; + [ >vibration ] bi@ XINPUT_VIBRATION boa XInputSetState drop ; M: xinput-game-input-backend read-keyboard +keyboard-device+ get diff --git a/basis/images/loader/gdiplus/gdiplus.factor b/basis/images/loader/gdiplus/gdiplus.factor index 12cb00577d..0f4835e683 100644 --- a/basis/images/loader/gdiplus/gdiplus.factor +++ b/basis/images/loader/gdiplus/gdiplus.factor @@ -17,8 +17,7 @@ os windows? [ ( x y w h -- rect ) - GpRect ; inline +C: GpRect : stream>gdi+-bitmap ( stream -- bitmap ) stream>IStream &com-release diff --git a/basis/io/backend/unix/multiplexers/epoll/epoll.factor b/basis/io/backend/unix/multiplexers/epoll/epoll.factor index b4e941bbe8..4aaf4f7a18 100644 --- a/basis/io/backend/unix/multiplexers/epoll/epoll.factor +++ b/basis/io/backend/unix/multiplexers/epoll/epoll.factor @@ -21,7 +21,7 @@ CONSTANT: max-events 256 M: epoll-mx dispose* fd>> close-file ; : make-event ( fd events -- event ) - epoll-event + epoll-event new swap >>events tuck data>> fd<< ; diff --git a/basis/io/backend/unix/multiplexers/kqueue/kqueue.factor b/basis/io/backend/unix/multiplexers/kqueue/kqueue.factor index 65fab251a4..9f9ed6ad5a 100644 --- a/basis/io/backend/unix/multiplexers/kqueue/kqueue.factor +++ b/basis/io/backend/unix/multiplexers/kqueue/kqueue.factor @@ -21,7 +21,7 @@ CONSTANT: max-events 256 M: kqueue-mx dispose* fd>> close-file ; : make-kevent ( fd filter flags -- event ) - \ kevent + \ kevent new swap >>flags swap >>filter swap >>ident ; diff --git a/basis/io/backend/unix/unix.factor b/basis/io/backend/unix/unix.factor index d42dc57567..c02eb8a9af 100644 --- a/basis/io/backend/unix/unix.factor +++ b/basis/io/backend/unix/unix.factor @@ -62,7 +62,7 @@ M: unix can-seek-handle? fd>> SEEK_CUR 0 lseek -1 = not ; M: unix handle-length - fd>> \ stat [ fstat -1 = not ] keep + fd>> \ stat new [ fstat -1 = not ] keep swap [ st_size>> ] [ drop f ] if ; ERROR: io-timeout ; diff --git a/basis/io/directories/unix/linux/linux.factor b/basis/io/directories/unix/linux/linux.factor index 8f2c61831f..d2d9550457 100644 --- a/basis/io/directories/unix/linux/linux.factor +++ b/basis/io/directories/unix/linux/linux.factor @@ -12,6 +12,6 @@ IN: io.directories.unix.linux M: linux (directory-entries) [ - dirent + dirent new '[ _ _ next-dirent ] [ >directory-entry ] produce nip ] with-unix-directory ; diff --git a/basis/io/directories/unix/unix.factor b/basis/io/directories/unix/unix.factor index 798f64d619..32b9df10b4 100644 --- a/basis/io/directories/unix/unix.factor +++ b/basis/io/directories/unix/unix.factor @@ -73,7 +73,7 @@ M: unix copy-file M: unix (directory-entries) [ - dirent + dirent new '[ _ _ next-dirent ] [ >directory-entry ] produce nip ] with-unix-directory ; diff --git a/basis/io/directories/windows/windows.factor b/basis/io/directories/windows/windows.factor index f3e54c56f9..a956eecf9a 100644 --- a/basis/io/directories/windows/windows.factor +++ b/basis/io/directories/windows/windows.factor @@ -73,7 +73,7 @@ C: windows-directory-entry M: windows (directory-entries) "\\" ?tail drop "\\*" append - WIN32_FIND_DATA + WIN32_FIND_DATA new find-first-file over [ >windows-directory-entry ] 2dip [ diff --git a/basis/io/files/info/unix/freebsd/freebsd.factor b/basis/io/files/info/unix/freebsd/freebsd.factor index 51966fdf27..3a4a376319 100644 --- a/basis/io/files/info/unix/freebsd/freebsd.factor +++ b/basis/io/files/info/unix/freebsd/freebsd.factor @@ -33,10 +33,10 @@ M: freebsd file-systems M: freebsd new-file-system-info freebsd-file-system-info new ; M: freebsd file-system-statfs - \ statfs [ statfs-func io-error ] keep ; + \ statfs new [ statfs-func io-error ] keep ; M: freebsd file-system-statvfs - \ statvfs [ statvfs-func io-error ] keep ; + \ statvfs new [ statvfs-func io-error ] keep ; M: freebsd statfs>file-system-info { diff --git a/basis/io/files/info/unix/linux/linux.factor b/basis/io/files/info/unix/linux/linux.factor index 5a2b07f054..00ef82e00d 100644 --- a/basis/io/files/info/unix/linux/linux.factor +++ b/basis/io/files/info/unix/linux/linux.factor @@ -14,7 +14,7 @@ namelen ; M: linux new-file-system-info linux-file-system-info new ; M: linux file-system-statfs - \ statfs64 [ statfs64 io-error ] keep ; + \ statfs64 new [ statfs64 io-error ] keep ; M: linux statfs>file-system-info { @@ -32,7 +32,7 @@ M: linux statfs>file-system-info } cleave ; M: linux file-system-statvfs - \ statvfs64 [ statvfs64 io-error ] keep ; + \ statvfs64 new [ statvfs64 io-error ] keep ; M: linux statvfs>file-system-info { diff --git a/basis/io/files/info/unix/macosx/macosx.factor b/basis/io/files/info/unix/macosx/macosx.factor index d78705b922..3d258c42e5 100644 --- a/basis/io/files/info/unix/macosx/macosx.factor +++ b/basis/io/files/info/unix/macosx/macosx.factor @@ -33,10 +33,10 @@ M: macosx file-systems M: macosx new-file-system-info macosx-file-system-info new ; M: macosx file-system-statfs - \ statfs64 [ statfs64-func io-error ] keep ; + \ statfs64 new [ statfs64-func io-error ] keep ; M: macosx file-system-statvfs - \ statvfs [ statvfs-func io-error ] keep ; + \ statvfs new [ statvfs-func io-error ] keep ; M: macosx statfs>file-system-info { diff --git a/basis/io/files/info/unix/unix.factor b/basis/io/files/info/unix/unix.factor index ef1f57db00..c6cdfd846c 100644 --- a/basis/io/files/info/unix/unix.factor +++ b/basis/io/files/info/unix/unix.factor @@ -190,7 +190,7 @@ CONSTANT: ALL-EXECUTE 0o0000111 unix-1970 time- duration>microseconds make-timeval ; : timestamps>byte-array ( timestamps -- byte-array ) - [ [ timestamp>timeval ] [ \ timeval ] if* ] map + [ [ timestamp>timeval ] [ \ timeval new ] if* ] map timeval >c-array ; PRIVATE> diff --git a/basis/io/files/info/windows/windows.factor b/basis/io/files/info/windows/windows.factor index 731f815b40..b4529f9b8c 100644 --- a/basis/io/files/info/windows/windows.factor +++ b/basis/io/files/info/windows/windows.factor @@ -41,7 +41,7 @@ TUPLE: windows-file-info < file-info-tuple attributes ; } cleave ; : find-first-file-stat ( path -- WIN32_FIND_DATA ) - WIN32_FIND_DATA [ + WIN32_FIND_DATA new [ FindFirstFile check-invalid-handle FindClose win32-error=0/f ] keep ; @@ -68,7 +68,7 @@ TUPLE: windows-file-info < file-info-tuple attributes ; : get-file-information ( handle -- BY_HANDLE_FILE_INFORMATION ) [ - BY_HANDLE_FILE_INFORMATION + BY_HANDLE_FILE_INFORMATION new [ GetFileInformationByHandle win32-error=0/f ] keep ] keep CloseHandle win32-error=0/f ; diff --git a/basis/io/files/windows/windows.factor b/basis/io/files/windows/windows.factor index ad18263548..233a9119ed 100644 --- a/basis/io/files/windows/windows.factor +++ b/basis/io/files/windows/windows.factor @@ -36,7 +36,7 @@ CONSTANT: share-mode } : default-security-attributes ( -- obj ) - SECURITY_ATTRIBUTES + SECURITY_ATTRIBUTES new SECURITY_ATTRIBUTES heap-size >>nLength ; TUPLE: FileArgs @@ -209,7 +209,7 @@ M: windows (wait-to-read) [ dup handle>> refill ] with-destructors drop ; : make-fd-set ( socket -- fd_set ) - fd_set swap 1array void* >c-array >>fd_array 1 >>fd_count ; + fd_set new swap 1array void* >c-array >>fd_array 1 >>fd_count ; : select-sets ( socket event -- read-fds write-fds except-fds ) [ make-fd-set ] dip +input+ = [ f f ] [ f swap f ] if ; @@ -367,7 +367,7 @@ M: windows normalize-path + normalize-path 0 WIN32_FILE_ATTRIBUTE_DATA new [ GetFileAttributesEx win32-error=0/f ] keep [ nFileSizeLow>> ] [ nFileSizeHigh>> ] bi >64bit ; @@ -389,7 +389,7 @@ M: windows home [ StreamSize>> ] bi 2array ; : file-streams-rest ( streams handle -- streams ) - WIN32_FIND_STREAM_DATA + WIN32_FIND_STREAM_DATA new [ FindNextStream ] 2keep rot zero? [ GetLastError ERROR_HANDLE_EOF = [ win32-error ] unless @@ -401,7 +401,7 @@ M: windows home : file-streams ( path -- streams ) normalize-path FindStreamInfoStandard - WIN32_FIND_STREAM_DATA + WIN32_FIND_STREAM_DATA new 0 [ FindFirstStream ] keepd over INVALID_HANDLE_VALUE = [ diff --git a/basis/io/launcher/windows/windows.factor b/basis/io/launcher/windows/windows.factor index 7829ec5d8d..7a957e3003 100644 --- a/basis/io/launcher/windows/windows.factor +++ b/basis/io/launcher/windows/windows.factor @@ -28,10 +28,10 @@ TUPLE: CreateProcess-args : default-CreateProcess-args ( -- obj ) CreateProcess-args new - STARTUPINFO + STARTUPINFO new dup class-of heap-size >>cb >>lpStartupInfo - PROCESS_INFORMATION >>lpProcessInformation + PROCESS_INFORMATION new >>lpProcessInformation TRUE >>bInheritHandles 0 >>dwCreateFlags ; diff --git a/basis/io/sockets/sockets.factor b/basis/io/sockets/sockets.factor index da1d5c5205..65e915b7f6 100644 --- a/basis/io/sockets/sockets.factor +++ b/basis/io/sockets/sockets.factor @@ -101,10 +101,10 @@ M: ipv4 protocol-family drop PF_INET ; M: ipv4 sockaddr-size drop sockaddr-in heap-size ; -M: ipv4 empty-sockaddr drop sockaddr-in ; +M: ipv4 empty-sockaddr drop sockaddr-in new ; : make-sockaddr-part ( inet -- sockaddr ) - sockaddr-in + sockaddr-in new AF_INET >>family swap port>> 0 or htons >>port ; inline @@ -173,10 +173,10 @@ M: ipv6 protocol-family drop PF_INET6 ; M: ipv6 sockaddr-size drop sockaddr-in6 heap-size ; -M: ipv6 empty-sockaddr drop sockaddr-in6 ; +M: ipv6 empty-sockaddr drop sockaddr-in6 new ; : make-sockaddr-in6-part ( inet -- sockaddr ) - sockaddr-in6 + sockaddr-in6 new AF_INET6 >>family swap port>> 0 or htons >>port ; inline @@ -306,7 +306,7 @@ HOOK: (send) io-backend ( bytes addrspec datagram -- ) HOOK: addrinfo-error-string io-backend ( n -- string ) : prepare-addrinfo ( -- addrinfo ) - addrinfo + addrinfo new PF_UNSPEC >>family IPPROTO_TCP >>protocol ; diff --git a/basis/io/sockets/unix/unix.factor b/basis/io/sockets/unix/unix.factor index fbb5515d2f..b7c615e0b8 100644 --- a/basis/io/sockets/unix/unix.factor +++ b/basis/io/sockets/unix/unix.factor @@ -163,12 +163,12 @@ M: local protocol-family drop PF_UNIX ; M: local sockaddr-size drop sockaddr-un heap-size ; -M: local empty-sockaddr drop sockaddr-un ; +M: local empty-sockaddr drop sockaddr-un new ; M: local make-sockaddr path>> absolute-path dup length 1 + max-un-path > [ "Path too long" throw ] when - sockaddr-un + sockaddr-un new AF_UNIX >>family swap utf8 string>alien >>path ; diff --git a/basis/linux/input-events/ffi/ffi.factor b/basis/linux/input-events/ffi/ffi.factor index b2d07d83c3..0691e5dfd8 100644 --- a/basis/linux/input-events/ffi/ffi.factor +++ b/basis/linux/input-events/ffi/ffi.factor @@ -160,7 +160,7 @@ CONSTANT: IOC_DIRSHIFT 30 ! SIZESHIFT + SIZEBITS : ctype-ioctl-inout ( handle id bytes type -- out ) [ call-ioctl-out ] dip deref ; inline : struct-ioctl ( handle id struct-class -- out ) - call-ioctl-out ; inline + new call-ioctl-out ; inline ! EV IOC G/S - evdev ioctl get/set ! EVIOCGVERSION EVIOCGID EVIOCGREP EVIOCSREP diff --git a/basis/math/floats/half/half-tests.factor b/basis/math/floats/half/half-tests.factor index 41371278eb..7a843cc45c 100644 --- a/basis/math/floats/half/half-tests.factor +++ b/basis/math/floats/half/half-tests.factor @@ -40,7 +40,7 @@ STRUCT: halves { 8 } [ halves heap-size ] unit-test { 3.0 } [ - halves + halves new 3.0 >>dick dick>> ] unit-test diff --git a/basis/random/sfmt/sfmt.factor b/basis/random/sfmt/sfmt.factor index 2ef4833448..d6668c1622 100644 --- a/basis/random/sfmt/sfmt.factor +++ b/basis/random/sfmt/sfmt.factor @@ -121,7 +121,7 @@ M:: sfmt generate ( sfmt -- ) dup uint-4 cast-array ; : ( seed n m mask parity -- sfmt ) - sfmt-state + sfmt-state new swap >>parity swap >>mask swap >>m diff --git a/basis/specialized-arrays/specialized-arrays-tests.factor b/basis/specialized-arrays/specialized-arrays-tests.factor index 95db87e683..84c4201ee0 100644 --- a/basis/specialized-arrays/specialized-arrays-tests.factor +++ b/basis/specialized-arrays/specialized-arrays-tests.factor @@ -64,7 +64,7 @@ SPECIALIZED-ARRAY: test-struct ] unit-test : make-point ( x y -- struct ) - test-struct ; + test-struct boa ; { 5/4 } [ 2 diff --git a/basis/system-info/windows/windows.factor b/basis/system-info/windows/windows.factor index 7e344d3c57..0af078d386 100644 --- a/basis/system-info/windows/windows.factor +++ b/basis/system-info/windows/windows.factor @@ -10,7 +10,7 @@ SPECIALIZED-ARRAY: ushort IN: system-info.windows : system-info ( -- SYSTEM_INFO ) - SYSTEM_INFO [ GetSystemInfo ] keep ; + SYSTEM_INFO new [ GetSystemInfo ] keep ; : page-size ( -- n ) system-info dwPageSize>> ; @@ -24,7 +24,7 @@ IN: system-info.windows system-info dwOemId>> 0xffff0000 bitand ; : os-version-struct ( -- os-version ) - OSVERSIONINFO + OSVERSIONINFO new OSVERSIONINFO heap-size >>dwOSVersionInfoSize dup GetVersionEx win32-error=0/f ; @@ -75,7 +75,7 @@ M: windows cpu-mhz get-processor-power-information first MaxMhz>> 1,000,000 * ; : memory-status ( -- MEMORYSTATUSEX ) - MEMORYSTATUSEX + MEMORYSTATUSEX new MEMORYSTATUSEX heap-size >>dwLength dup GlobalMemoryStatusEx win32-error=0/f ; diff --git a/basis/tools/deploy/windows/ico/ico.factor b/basis/tools/deploy/windows/ico/ico.factor index aa706c8b9d..ff4d12b77c 100644 --- a/basis/tools/deploy/windows/ico/ico.factor +++ b/basis/tools/deploy/windows/ico/ico.factor @@ -36,7 +36,7 @@ STRUCT: group-directory-entry [ { [ Width>> ] [ Height>> ] [ Colors>> ] [ Reserved>> ] [ Planes>> ] [ BitsPerPixel>> ] [ ImageSize>> ] - } cleave ] [ 1 + ] bi* group-directory-entry >c-ptr ; inline + } cleave ] [ 1 + ] bi* group-directory-entry boa >c-ptr ; inline : ico-icon ( directory-entry bytes -- subbytes ) [ [ ImageOffset>> dup ] [ ImageSize>> + ] bi ] dip subseq ; inline diff --git a/basis/tools/ps/windows/windows.factor b/basis/tools/ps/windows/windows.factor index 470318edcb..a21d8644d2 100644 --- a/basis/tools/ps/windows/windows.factor +++ b/basis/tools/ps/windows/windows.factor @@ -10,7 +10,7 @@ IN: tools.ps.windows 0 CreateToolhelp32Snapshot dup win32-error=0/f ; : default-process-entry ( -- obj ) - PROCESSENTRY32 PROCESSENTRY32 heap-size >>dwSize ; + PROCESSENTRY32 new PROCESSENTRY32 heap-size >>dwSize ; : first-process ( handle -- PROCESSENTRY32 ) default-process-entry @@ -28,7 +28,7 @@ IN: tools.ps.windows : query-information-process ( HANDLE -- PROCESS_BASIC_INFORMATION ) 0 - PROCESS_BASIC_INFORMATION [ + PROCESS_BASIC_INFORMATION new [ dup byte-length f NtQueryInformationProcess drop diff --git a/basis/ui/backend/gtk/gtk.factor b/basis/ui/backend/gtk/gtk.factor index c9a46f99ea..6ec1c80ab5 100644 --- a/basis/ui/backend/gtk/gtk.factor +++ b/basis/ui/backend/gtk/gtk.factor @@ -267,7 +267,7 @@ icon-data [ default-icon-data ] initialize : gadget-cursor-location ( gadget -- rectangle ) [ screen-loc ] [ cursor-loc&dim ] bi [ v+ ] dip [ first2 [ >fixnum ] bi@ ] bi@ - cairo_rectangle_int_t ; + cairo_rectangle_int_t boa ; : update-cursor-location ( im-context gadget -- ) gadget-cursor-location gtk_im_context_set_cursor_location ; diff --git a/basis/ui/backend/windows/windows.factor b/basis/ui/backend/windows/windows.factor index d8a32647c5..b379581df6 100644 --- a/basis/ui/backend/windows/windows.factor +++ b/basis/ui/backend/windows/windows.factor @@ -85,7 +85,7 @@ CONSTANT: pfd-flag-map H{ [ value>> ] [ 0 ] if* ; : >pfd ( attributes -- pfd ) - [ PIXELFORMATDESCRIPTOR ] dip + [ PIXELFORMATDESCRIPTOR new ] dip { [ drop PIXELFORMATDESCRIPTOR c:heap-size >>nSize ] [ drop 1 >>nVersion ] @@ -483,7 +483,7 @@ SYMBOL: nc-buttons ] if ; : make-TRACKMOUSEEVENT ( hWnd -- alien ) - TRACKMOUSEEVENT + TRACKMOUSEEVENT new swap >>hwndTrack TRACKMOUSEEVENT c:heap-size >>cbSize ; @@ -591,7 +591,7 @@ M: windows-ui-backend do-events ] if ; :: register-window-class ( class-name-ptr -- ) - WNDCLASSEX f GetModuleHandle + WNDCLASSEX new f GetModuleHandle class-name-ptr pick GetClassInfoEx 0 = [ WNDCLASSEX c:heap-size >>cbSize flags{ CS_HREDRAW CS_VREDRAW CS_OWNDC } >>style @@ -675,7 +675,7 @@ M: windows-ui-backend do-events : set-pixel-format ( pixel-format hdc -- ) swap handle>> - PIXELFORMATDESCRIPTOR SetPixelFormat win32-error=0/f ; + PIXELFORMATDESCRIPTOR new SetPixelFormat win32-error=0/f ; : setup-gl ( world -- ) [ get-dc ] keep @@ -747,18 +747,18 @@ M: windows-ui-backend system-alert : fullscreen-RECT ( hwnd -- RECT ) MONITOR_DEFAULTTONEAREST MonitorFromWindow - MONITORINFOEX + MONITORINFOEX new MONITORINFOEX c:heap-size >>cbSize [ GetMonitorInfo win32-error=0/f ] keep rcMonitor>> ; : client-area>RECT ( hwnd -- RECT ) - RECT + RECT new [ GetClientRect win32-error=0/f ] [ >c-ptr POINT cast-array [ ClientToScreen drop ] with each ] [ nip ] 2tri ; : hwnd>RECT ( hwnd -- RECT ) - RECT [ GetWindowRect win32-error=0/f ] keep ; + RECT new [ GetWindowRect win32-error=0/f ] keep ; M: windows-ui-backend (grab-input) 0 ShowCursor drop @@ -807,7 +807,7 @@ CONSTANT: fullscreen-flags flags{ WS_CAPTION WS_BORDER WS_THICKFRAME } : add-tray-icon ( title -- ) NIM_ADD - NOTIFYICONDATA + NOTIFYICONDATA new NOTIFYICONDATA heap-size >>cbSize NOTIFYICON_VERSION_4 over timeout-version>> uVersion<< NIF_TIP NIF_ICON bitor >>uFlags @@ -818,7 +818,7 @@ CONSTANT: fullscreen-flags flags{ WS_CAPTION WS_BORDER WS_THICKFRAME } : remove-tray-icon ( -- ) NIM_DELETE - NOTIFYICONDATA + NOTIFYICONDATA new NOTIFYICONDATA heap-size >>cbSize world get handle>> hWnd>> >>hWnd Shell_NotifyIcon win32-error=0/f ; diff --git a/basis/ui/backend/x11/x11.factor b/basis/ui/backend/x11/x11.factor index 8165898bc1..de09ecd035 100644 --- a/basis/ui/backend/x11/x11.factor +++ b/basis/ui/backend/x11/x11.factor @@ -254,7 +254,7 @@ M: x11-ui-backend set-title [ dpy get ] 2dip [ set-title-old ] [ set-title-new ] 3bi ; : make-fullscreen-msg ( window ? -- msg ) - XClientMessageEvent + XClientMessageEvent new ClientMessage >>type dpy get >>display XA_NET_WM_STATE >>message_type @@ -286,7 +286,7 @@ M: x11-ui-backend (open-window) tri ; : make-raise-window-msg ( window -- msg ) - XClientMessageEvent + XClientMessageEvent new ClientMessage >>type 1 >>send_event dpy get >>display @@ -341,7 +341,7 @@ PRIVATE> M: x11-ui-backend system-alert "\n\n" glue xmessage ; -: black ( -- xcolor ) 0 0 0 0 0 0 XColor ; inline +: black ( -- xcolor ) 0 0 0 0 0 0 XColor boa ; inline M:: x11-ui-backend (grab-input) ( handle -- ) handle window>> :> wnd diff --git a/basis/ui/text/pango/pango.factor b/basis/ui/text/pango/pango.factor index 6679362e29..29cbe14d93 100644 --- a/basis/ui/text/pango/pango.factor +++ b/basis/ui/text/pango/pango.factor @@ -43,8 +43,8 @@ SYMBOL: dpi ; : layout-extents ( layout -- ink-rect logical-rect ) - PangoRectangle - PangoRectangle + PangoRectangle new + PangoRectangle new [ pango_layout_get_extents ] 2keep [ PangoRectangle>rect ] bi@ ; diff --git a/basis/unix/groups/groups.factor b/basis/unix/groups/groups.factor index d214ebef83..45e24a4ced 100644 --- a/basis/unix/groups/groups.factor +++ b/basis/unix/groups/groups.factor @@ -18,7 +18,7 @@ GENERIC: group-struct ( obj -- group/f ) gr_mem>> utf8 alien>strings ; : (group-struct) ( id -- group-struct id group-struct byte-array length void* ) - [ unix.ffi:group ] dip over 4096 + [ unix.ffi:group new ] dip over 4096 [ ] keep f void* ; : check-group-struct ( group-struct ptr -- group-struct/f ) diff --git a/basis/unix/process/process.factor b/basis/unix/process/process.factor index e5570394ac..417a15b6f8 100644 --- a/basis/unix/process/process.factor +++ b/basis/unix/process/process.factor @@ -83,7 +83,7 @@ CONSTANT: POSIX_SPAWN_PCONTROL_KILL 0x0003 dup 0 = [ drop ] [ (throw-errno) ] if ; : posix-spawn-file-actions-init ( -- posix_spawn_file_actions_t ) - posix_spawn_file_actions_t + posix_spawn_file_actions_t new [ posix_spawn_file_actions_init check-posix ] keep ; : posix-spawn-file-actions-destroy ( posix_spawn_file_actions_t -- ) diff --git a/basis/unix/stat/stat.factor b/basis/unix/stat/stat.factor index 417ca094fd..67efa45e9c 100644 --- a/basis/unix/stat/stat.factor +++ b/basis/unix/stat/stat.factor @@ -24,7 +24,7 @@ TYPEDEF: fsid fsid_t << "unix.stat." os name>> append require >> : file-status ( pathname -- stat ) - \ stat [ [ stat-func ] unix-system-call drop ] keep ; + \ stat new [ [ stat-func ] unix-system-call drop ] keep ; : link-status ( pathname -- stat ) - \ stat [ [ lstat ] unix-system-call drop ] keep ; + \ stat new [ [ lstat ] unix-system-call drop ] keep ; diff --git a/basis/unix/time/time.factor b/basis/unix/time/time.factor index 71c34046d8..0935f3a7fb 100644 --- a/basis/unix/time/time.factor +++ b/basis/unix/time/time.factor @@ -13,17 +13,17 @@ STRUCT: timespec { nsec long } ; : ( sec usec -- timeval ) - timeval + timeval new swap >>usec swap >>sec ; inline : make-timeval ( us -- timeval ) - [ timeval ] dip [ + [ timeval new ] dip [ 1000000 /mod [ >>sec ] [ >>usec ] bi* ] unless-zero ; : make-timespec ( nanos -- timespec ) - [ timespec ] dip [ + [ timespec new ] dip [ 1000000000 /mod [ >>sec ] [ >>nsec ] bi* ] unless-zero ; diff --git a/basis/unix/unix.factor b/basis/unix/unix.factor index 7c61cd531f..da7b8a1594 100644 --- a/basis/unix/unix.factor +++ b/basis/unix/unix.factor @@ -73,7 +73,7 @@ M: unix open-file [ open ] unix-system-call ; : touch ( filename -- ) f [ utime ] unix-system-call drop ; : change-file-times ( filename access modification -- ) - utimbuf + utimbuf new swap >>modtime swap >>actime [ utime ] unix-system-call drop ; diff --git a/basis/windows/directx/dinput/constants/constants.factor b/basis/windows/directx/dinput/constants/constants.factor index 18a0e41750..f7ab901417 100644 --- a/basis/windows/directx/dinput/constants/constants.factor +++ b/basis/windows/directx/dinput/constants/constants.factor @@ -54,7 +54,7 @@ M: array array-base-type first ; [ fourth (flags) ] [ 4 swap nth (flag) ] } cleave - DIOBJECTDATAFORMAT ; + DIOBJECTDATAFORMAT boa ; : make-DIOBJECTDATAFORMAT-arrays ( struct array -- values vars ) [ [ ] [ first ] bi ] with @@ -73,7 +73,7 @@ M: array array-base-type first ; MACRO: ( dwFlags dwDataSize struct rgodf-array -- alien ) [ DIDATAFORMAT heap-size DIOBJECTDATAFORMAT heap-size ] 4dip [ nip length ] [ make-DIOBJECTDATAFORMAT-array-quot ] 2bi - '[ _ _ _ _ _ @ DIDATAFORMAT ] ; + '[ _ _ _ _ _ @ DIDATAFORMAT boa ] ; : (malloc-guid-symbol) ( symbol guid -- ) '[ _ malloc-byte-array ] initialize ; diff --git a/basis/windows/dragdrop-listener/dragdrop-listener.factor b/basis/windows/dragdrop-listener/dragdrop-listener.factor index c63ba98014..cb4e3677ab 100644 --- a/basis/windows/dragdrop-listener/dragdrop-listener.factor +++ b/basis/windows/dragdrop-listener/dragdrop-listener.factor @@ -8,13 +8,13 @@ windows.kernel32 windows.ole32 windows.user32 ; IN: windows.dragdrop-listener : handle-data-object ( handler: ( hdrop -- x ) data-object -- filenames ) - FORMATETC + FORMATETC new CF_HDROP >>cfFormat f >>ptd DVASPECT_CONTENT >>dwAspect -1 >>lindex TYMED_HGLOBAL >>tymed - STGMEDIUM + STGMEDIUM new [ IDataObject::GetData ] keep swap succeeded? [ dup data>> [ rot execute( hdrop -- x ) ] with-global-lock diff --git a/basis/windows/dropfiles/dropfiles.factor b/basis/windows/dropfiles/dropfiles.factor index 128b0ae185..320a2f1fe0 100644 --- a/basis/windows/dropfiles/dropfiles.factor +++ b/basis/windows/dropfiles/dropfiles.factor @@ -20,7 +20,7 @@ IN: windows.dropfiles ] with map ; ! : point-from-hdrop ( hdrop -- loc ) -! POINT [ DragQueryPoint drop ] keep [ x>> ] [ y>> ] bi 2array ; +! POINT new [ DragQueryPoint drop ] keep [ x>> ] [ y>> ] bi 2array ; : handle-wm-dropfiles ( hdrop -- ) [ filenames-from-hdrop dropped-files set-global ] [ DragFinish ] bi diff --git a/basis/windows/dwmapi/dwmapi.factor b/basis/windows/dwmapi/dwmapi.factor index 86c35a4527..3a688dbad8 100644 --- a/basis/windows/dwmapi/dwmapi.factor +++ b/basis/windows/dwmapi/dwmapi.factor @@ -11,15 +11,14 @@ STRUCT: MARGINS { cyTopHeight int } { cyBottomHeight int } ; +C: MARGINS + STRUCT: DWM_BLURBEHIND { dwFlags DWORD } { fEnable BOOL } { hRgnBlur HANDLE } { fTransitionOnMaximized BOOL } ; -: ( l r t b -- MARGINS ) - MARGINS ; inline - : full-window-margins ( -- MARGINS ) -1 -1 -1 -1 ; inline diff --git a/basis/windows/hardware/hardware.factor b/basis/windows/hardware/hardware.factor index b7d7e45167..b059479340 100644 --- a/basis/windows/hardware/hardware.factor +++ b/basis/windows/hardware/hardware.factor @@ -9,7 +9,7 @@ IN: windows.hardware BOOL { HMONITOR HDC LPRECT LPARAM } stdcall [ 4dup 4array . 3drop - MONITORINFOEX dup byte-length >>cbSize + MONITORINFOEX new dup byte-length >>cbSize [ GetMonitorInfo win32-error=0/f ] keep ... flush TRUE ] alien-callback ; diff --git a/basis/windows/iphlpapi/iphlpapi.factor b/basis/windows/iphlpapi/iphlpapi.factor index 8394b3bdf4..dac8e0a12c 100644 --- a/basis/windows/iphlpapi/iphlpapi.factor +++ b/basis/windows/iphlpapi/iphlpapi.factor @@ -386,7 +386,7 @@ FUNCTION: DWORD GetAdaptersInfo ( FUNCTION: DWORD GetNetworkParams ( PFIXED_INFO pFixedInfo, PULONG pOutBufLen ) : get-fixed-info ( -- FIXED_INFO ) - FIXED_INFO dup byte-length ulong + FIXED_INFO new dup byte-length ulong [ GetNetworkParams n>win32-error-check ] keepd ; : dns-server-ips ( -- sequence ) diff --git a/basis/windows/offscreen/offscreen.factor b/basis/windows/offscreen/offscreen.factor index 02b72388a7..7a169ec161 100644 --- a/basis/windows/offscreen/offscreen.factor +++ b/basis/windows/offscreen/offscreen.factor @@ -7,7 +7,7 @@ IN: windows.offscreen : (bitmap-info) ( dim -- BITMAPINFO ) [ - BITMAPINFO + BITMAPINFO new dup bmiHeader>> BITMAPINFOHEADER heap-size >>biSize ] dip diff --git a/basis/windows/ole32/ole32.factor b/basis/windows/ole32/ole32.factor index b4faa6da0d..26773412c8 100644 --- a/basis/windows/ole32/ole32.factor +++ b/basis/windows/ole32/ole32.factor @@ -173,13 +173,13 @@ CONSTANT: GUID-STRING-LENGTH $[ "{01234567-89ab-cdef-0123-456789abcdef}" length ] : create-guid ( -- GUID ) - GUID dup CoCreateGuid check-ole32-error ; + GUID new dup CoCreateGuid check-ole32-error ; : string>guid ( string -- guid ) "{-}" split harvest [ first3 [ hex> ] tri@ ] [ 3 tail concat 2 group [ hex> ] B{ } map-as ] bi - GUID ; + GUID boa ; : guid>string ( guid -- string ) [ diff --git a/basis/windows/powrprof/powrprof.factor b/basis/windows/powrprof/powrprof.factor index a94b4ffdf1..d3485277cc 100644 --- a/basis/windows/powrprof/powrprof.factor +++ b/basis/windows/powrprof/powrprof.factor @@ -310,7 +310,7 @@ ERROR: win32-powrprof-error n ; dup 0 = [ drop ] [ win32-powrprof-error ] if ; : get-power-capabilities ( -- struct ) - SYSTEM_POWER_CAPABILITIES + SYSTEM_POWER_CAPABILITIES new [ GetPwrCapabilities win32-error=0/f ] keep ; : get-processor-power-information ( -- structs ) diff --git a/basis/windows/privileges/privileges.factor b/basis/windows/privileges/privileges.factor index 1d124fcbfa..88b953660e 100644 --- a/basis/windows/privileges/privileges.factor +++ b/basis/windows/privileges/privileges.factor @@ -28,11 +28,11 @@ TYPEDEF: TOKEN_PRIVILEGES* PTOKEN_PRIVILEGES [ CloseHandle drop ] finally ; inline : lookup-privilege ( string -- luid ) - [ f ] dip LUID + [ f ] dip LUID new [ LookupPrivilegeValue win32-error=0/f ] keep ; :: make-token-privileges ( name enabled? -- obj ) - TOKEN_PRIVILEGES + TOKEN_PRIVILEGES new 1 >>PrivilegeCount LUID_AND_ATTRIBUTES malloc-struct &free enabled? [ SE_PRIVILEGE_ENABLED >>Attributes ] when diff --git a/basis/windows/registry/registry.factor b/basis/windows/registry/registry.factor index f6568e314f..21e326539f 100644 --- a/basis/windows/registry/registry.factor +++ b/basis/windows/registry/registry.factor @@ -132,7 +132,7 @@ TUPLE: registry-enum-key ; 0 DWORD dup :> max-value 0 DWORD dup :> max-value-data 0 DWORD dup :> security-descriptor - FILETIME dup :> last-write-time + FILETIME new dup :> last-write-time RegQueryInfoKey :> ret ret ERROR_SUCCESS = [ key diff --git a/basis/windows/shell32/shell32.factor b/basis/windows/shell32/shell32.factor index 89dd6a89ca..8dcc5ea850 100644 --- a/basis/windows/shell32/shell32.factor +++ b/basis/windows/shell32/shell32.factor @@ -125,7 +125,7 @@ FUNCTION: DWORD_PTR SHGetFileInfoW ( LPCTSTR pszPath, : shell32-file-info ( path -- err struct ) normalize-path 0 - SHFILEINFO + SHFILEINFO new [ dup byte-length SHGFI_EXETYPE SHGetFileInfoW ] keep ; SINGLETONS: diff --git a/basis/windows/streams/streams.factor b/basis/windows/streams/streams.factor index 6bbb2aa55e..74c712ddff 100644 --- a/basis/windows/streams/streams.factor +++ b/basis/windows/streams/streams.factor @@ -82,9 +82,9 @@ SPECIALIZED-ARRAY: uchar f >>pwcsName STGTY_STREAM >>type stream stream-size >>cbSize - FILETIME >>mtime - FILETIME >>ctime - FILETIME >>atime + FILETIME new >>mtime + FILETIME new >>ctime + FILETIME new >>atime STGM_READWRITE >>grfMode 0 >>grfLocksSupported GUID_NULL >>clsid diff --git a/basis/windows/time/time.factor b/basis/windows/time/time.factor index dea0e7de40..16663593c0 100644 --- a/basis/windows/time/time.factor +++ b/basis/windows/time/time.factor @@ -17,7 +17,7 @@ IN: windows.time [ windows-1601 ] dip 10,000,000 /i +second ; : windows-time ( -- n ) - FILETIME [ GetSystemTimeAsFileTime ] keep + FILETIME new [ GetSystemTimeAsFileTime ] keep FILETIME>windows-time ; : timestamp>windows-time ( timestamp -- n ) @@ -25,7 +25,7 @@ IN: windows.time >gmt windows-1601 (time-) 10,000,000 * >integer ; : windows-time>FILETIME ( n -- FILETIME ) - [ FILETIME ] dip + [ FILETIME new ] dip [ 32 bits >>dwLowDateTime ] [ -32 shift >>dwHighDateTime ] bi ; : timestamp>FILETIME ( timestamp -- FILETIME/f ) diff --git a/basis/windows/types/types.factor b/basis/windows/types/types.factor index e6edc14dd1..e6fe062242 100644 --- a/basis/windows/types/types.factor +++ b/basis/windows/types/types.factor @@ -322,7 +322,7 @@ STRUCT: PIXELFORMATDESCRIPTOR { dwDamageMask DWORD } ; : ( loc dim -- RECT ) - dupd v+ [ first2 ] bi@ RECT ; + dupd v+ [ first2 ] bi@ RECT boa ; TYPEDEF: RECT* PRECT TYPEDEF: RECT* LPRECT diff --git a/basis/windows/uniscribe/uniscribe.factor b/basis/windows/uniscribe/uniscribe.factor index 6bc7a05008..08f33b0f17 100644 --- a/basis/windows/uniscribe/uniscribe.factor +++ b/basis/windows/uniscribe/uniscribe.factor @@ -131,7 +131,7 @@ PRIVATE> [ cx>> ] [ cy>> ] bi 2array ; : dc-metrics ( dc -- metrics ) - TEXTMETRICW + TEXTMETRICW new [ GetTextMetrics drop ] keep TEXTMETRIC>metrics ; diff --git a/basis/x11/clipboard/clipboard.factor b/basis/x11/clipboard/clipboard.factor index 82913b8112..dd97faf974 100644 --- a/basis/x11/clipboard/clipboard.factor +++ b/basis/x11/clipboard/clipboard.factor @@ -57,7 +57,7 @@ TUPLE: x-clipboard atom contents ; 1 XChangeProperty drop ; : send-notify ( evt prop -- ) - XSelectionEvent + XSelectionEvent new SelectionNotify >>type swap >>property over display>> >>display diff --git a/basis/x11/events/events.factor b/basis/x11/events/events.factor index c71f0a6f23..ec4e6ed585 100644 --- a/basis/x11/events/events.factor +++ b/basis/x11/events/events.factor @@ -36,10 +36,10 @@ GENERIC: selection-request-event ( event window -- ) GENERIC: client-event ( event window -- ) : next-event ( -- event ) - dpy get XEvent [ XNextEvent drop ] keep ; + dpy get XEvent new [ XNextEvent drop ] keep ; : mask-event ( mask -- event ) - [ dpy get ] dip XEvent [ XMaskEvent drop ] keep ; + [ dpy get ] dip XEvent new [ XMaskEvent drop ] keep ; : events-queued ( mode -- n ) [ dpy get ] dip XEventsQueued ; diff --git a/basis/x11/windows/windows.factor b/basis/x11/windows/windows.factor index b0d6ce3d70..6b3cd1e3a1 100644 --- a/basis/x11/windows/windows.factor +++ b/basis/x11/windows/windows.factor @@ -28,14 +28,14 @@ CONSTANT: event-mask } : window-attributes ( visinfo -- attributes ) - XSetWindowAttributes + XSetWindowAttributes new 0 >>background_pixel 0 >>border_pixel event-mask >>event_mask swap create-colormap >>colormap ; : set-size-hints ( window -- ) - XSizeHints + XSizeHints new USPosition >>flags [ dpy get ] 2dip XSetWMNormalHints ; diff --git a/extra/benchmark/nbody-simd/nbody-simd.factor b/extra/benchmark/nbody-simd/nbody-simd.factor index 6e8a0bb3da..1c628ca431 100644 --- a/extra/benchmark/nbody-simd/nbody-simd.factor +++ b/extra/benchmark/nbody-simd/nbody-simd.factor @@ -17,7 +17,7 @@ STRUCT: body SPECIALIZED-ARRAY: body : ( location velocity mass -- body ) - [ days-per-year v*n ] [ solar-mass * ] bi* body ; inline + [ days-per-year v*n ] [ solar-mass * ] bi* body boa ; inline : ( -- body ) double-4{ 4.84143144246472090e00 -1.16032004402742839e00 -1.03622044471123109e-01 0.0 } diff --git a/extra/benchmark/struct-arrays/struct-arrays.factor b/extra/benchmark/struct-arrays/struct-arrays.factor index 6e1338d50b..42b1abdbd0 100644 --- a/extra/benchmark/struct-arrays/struct-arrays.factor +++ b/extra/benchmark/struct-arrays/struct-arrays.factor @@ -37,7 +37,7 @@ SPECIALIZED-ARRAY: point [ x>> max ] [ y>> max ] [ z>> max ] change-xyz ; inline : ( -- point ) - 0 0 0 point ; inline + 0 0 0 point boa ; inline : max-points ( points -- point ) [ max-point ] reduce ; inline diff --git a/extra/benchmark/yuv-to-rgb/yuv-to-rgb.factor b/extra/benchmark/yuv-to-rgb/yuv-to-rgb.factor index 7f47020821..a68a3fd37d 100644 --- a/extra/benchmark/yuv-to-rgb/yuv-to-rgb.factor +++ b/extra/benchmark/yuv-to-rgb/yuv-to-rgb.factor @@ -20,7 +20,7 @@ STRUCT: yuv-buffer :: fake-data ( -- rgb yuv ) 1600 :> w 1200 :> h - yuv-buffer :> buffer + yuv-buffer new :> buffer w h * 3 * :> rgb rgb buffer w >>y_width diff --git a/extra/chipmunk/ffi/ffi.factor b/extra/chipmunk/ffi/ffi.factor index d4e52711df..3a224a50ab 100644 --- a/extra/chipmunk/ffi/ffi.factor +++ b/extra/chipmunk/ffi/ffi.factor @@ -36,7 +36,7 @@ CONSTANT: CP_ALL_LAYERS 0xffffffff ! cpVect.h TYPED: cpv ( x y -- v: cpVect ) - cpVect ; inline + cpVect boa ; inline TYPED: cpvzero ( -- v: cpVect ) 0.0 0.0 cpv ; inline @@ -146,7 +146,7 @@ STRUCT: cpBB { t cpFloat } ; TYPED: cpBBNew ( l b r t -- cpbb: cpBB ) - cpBB ; inline + cpBB boa ; inline TYPED: cpBBintersects ( a: cpBB b: cpBB -- ? ) { diff --git a/extra/classes/struct/vectored/vectored.factor b/extra/classes/struct/vectored/vectored.factor index a9be5fe966..1926040f55 100644 --- a/extra/classes/struct/vectored/vectored.factor +++ b/extra/classes/struct/vectored/vectored.factor @@ -41,7 +41,7 @@ MACRO: (vectored-slots) ( struct-class -- quot: ( n -- slots... ) ) MACRO: (vectored-element>) ( struct-class -- quot: ( elt -- struct ) ) [ struct-slots [ name>> reader-word 1quotation ] map ] keep - '[ _ cleave _ ] ; + '[ _ cleave _ boa ] ; SLOT: (n) SLOT: (vectored) diff --git a/extra/cuda/devices/devices.factor b/extra/cuda/devices/devices.factor index 96ae3a8d3b..038f4d2ddd 100644 --- a/extra/cuda/devices/devices.factor +++ b/extra/cuda/devices/devices.factor @@ -20,7 +20,7 @@ IN: cuda.devices [ enumerate-cuda-devices ] dip '[ 0 _ with-cuda-context ] each ; inline : cuda-device-properties ( n -- properties ) - [ CUdevprop ] dip + [ CUdevprop new ] dip [ cuDeviceGetProperties cuda-error ] keepd ; : cuda-devices ( -- assoc ) diff --git a/extra/file-picker/windows/windows.factor b/extra/file-picker/windows/windows.factor index 8e83539fe7..dcb5642900 100644 --- a/extra/file-picker/windows/windows.factor +++ b/extra/file-picker/windows/windows.factor @@ -61,7 +61,7 @@ FUNCTION: BOOL SHGetPathFromIDList ( M: windows open-file-dialog [ - BROWSEINFO + BROWSEINFO new GetDesktopWindow >>hwndOwner "Select a file or folder" utf8 malloc-string &free >>lpszTitle BIF_BROWSEINCLUDEFILES >>ulFlags diff --git a/extra/fluids/fluids.factor b/extra/fluids/fluids.factor index 20a2033c7f..26f6494da4 100644 --- a/extra/fluids/fluids.factor +++ b/extra/fluids/fluids.factor @@ -23,7 +23,7 @@ CONSTANT: gravity { 0.0 -0.1 } particle [ p>> ] [ v>> ] bi dt v*n v+ gravity dt dt * particle m>> 2 * / v*n v+ :> p' p' particle p>> v- dt v/n :> v' - p' v' particle m>> particle_t ; inline + p' v' particle m>> particle_t boa ; inline CONSTANT: initial-particles particle_t-array{ @@ -115,6 +115,6 @@ fluids-world H{ { T{ button-down } [ [ hand-loc get float >c-array world get dim>> float >c-array v/ 2 v*n 1 v-n { 1 -1 } v* - float-array{ 0 0.2 } 2.0 particle_t suffix + float-array{ 0 0.2 } 2.0 particle_t boa suffix ] change-particles drop ] } } set-gestures diff --git a/extra/game/loop/benchmark/benchmark.factor b/extra/game/loop/benchmark/benchmark.factor index b361baefe6..cfe7fae660 100644 --- a/extra/game/loop/benchmark/benchmark.factor +++ b/extra/game/loop/benchmark/benchmark.factor @@ -13,7 +13,7 @@ STRUCT: game-loop-benchmark SPECIALIZED-VECTOR: game-loop-benchmark : ( benchmark-data-pair tick frame -- obj ) - \ game-loop-benchmark + \ game-loop-benchmark new swap >>frame# swap >>tick# swap >>benchmark-data-pair ; inline diff --git a/extra/gdbm/gdbm.factor b/extra/gdbm/gdbm.factor index 7a09649bd8..f261d3b5fe 100644 --- a/extra/gdbm/gdbm.factor +++ b/extra/gdbm/gdbm.factor @@ -70,7 +70,7 @@ DESTRUCTOR: gdbm-close : object>datum ( obj -- datum ) object>bytes [ malloc-byte-array &free ] [ length ] bi - datum ; + datum boa ; : datum>object* ( datum -- obj ? ) [ dptr>> ] [ dsize>> ] bi over diff --git a/extra/gpu/demos/bunny/bunny.factor b/extra/gpu/demos/bunny/bunny.factor index 813e846e32..2c1b2658a0 100644 --- a/extra/gpu/demos/bunny/bunny.factor +++ b/extra/gpu/demos/bunny/bunny.factor @@ -86,7 +86,7 @@ UNIFORM-TUPLE: loading-uniforms [ string>number ] map ; inline : ( vertex -- struct ) - bunny-vertex-struct + bunny-vertex-struct new swap first3 0.0 float-4-boa >>vertex ; inline : (read-line-tokens) ( seq stream -- seq ) diff --git a/extra/io/files/acls/macosx/macosx.factor b/extra/io/files/acls/macosx/macosx.factor index b7dbc4b3f1..fb56c48299 100644 --- a/extra/io/files/acls/macosx/macosx.factor +++ b/extra/io/files/acls/macosx/macosx.factor @@ -14,7 +14,7 @@ IN: io.files.acls.macosx { { ID_TYPE_UID [ user-name "user:" prepend ] } { ID_TYPE_GID [ group-name "group:" prepend ] } - ! [ uuid_string_t [ mbr_uuid_to_string io-error ] keep ] + ! [ uuid_string_t new [ mbr_uuid_to_string io-error ] keep ] } case ; : acl-error ( n -- ) -1 = [ throw-errno ] when ; inline diff --git a/extra/io/files/trash/macosx/macosx.factor b/extra/io/files/trash/macosx/macosx.factor index f7be3e4179..3865eb7ab9 100644 --- a/extra/io/files/trash/macosx/macosx.factor +++ b/extra/io/files/trash/macosx/macosx.factor @@ -54,7 +54,7 @@ FUNCTION: OSStatus FSPathMakeRefWithOptions ( : ( path -- fs-ref ) utf8 string>alien kFSPathMakeRefDoNotFollowLeafSymlink - FSRef + FSRef new [ f FSPathMakeRefWithOptions check-err ] keep ; PRIVATE> diff --git a/extra/io/files/trash/windows/windows.factor b/extra/io/files/trash/windows/windows.factor index bfae7e66ee..7697c0702f 100644 --- a/extra/io/files/trash/windows/windows.factor +++ b/extra/io/files/trash/windows/windows.factor @@ -55,7 +55,7 @@ M: windows send-to-trash ( path -- ) absolute-path native-string>alien B{ 0 0 } append malloc-byte-array &free - SHFILEOPSTRUCTW + SHFILEOPSTRUCTW new f >>hwnd FO_DELETE >>wFunc swap >>pFrom diff --git a/extra/io/serial/linux/linux.factor b/extra/io/serial/linux/linux.factor index aa060a970e..6c6e73621a 100644 --- a/extra/io/serial/linux/linux.factor +++ b/extra/io/serial/linux/linux.factor @@ -23,7 +23,7 @@ IN: io.serial.linux stream>> in>> handle>> fd>> ; : get-fd-termios ( fd -- serial ) - termios [ tcgetattr io-error ] keep ; + termios new [ tcgetattr io-error ] keep ; : set-termios ( serial -- ) [ serial-fd get-fd-termios ] keep termios<< ; diff --git a/extra/io/serial/windows/windows.factor b/extra/io/serial/windows/windows.factor index 4ea3d5e9e4..c76fff77ef 100644 --- a/extra/io/serial/windows/windows.factor +++ b/extra/io/serial/windows/windows.factor @@ -10,7 +10,7 @@ IN: io.serial.windows : get-comm-state ( duplex -- dcb ) in>> handle>> - DCB [ GetCommState win32-error=0/f ] keep ; + DCB new [ GetCommState win32-error=0/f ] keep ; : set-comm-state ( duplex dcb -- ) [ in>> handle>> ] dip diff --git a/extra/macho/macho.factor b/extra/macho/macho.factor index 557571962f..472ceb76b7 100644 --- a/extra/macho/macho.factor +++ b/extra/macho/macho.factor @@ -959,7 +959,7 @@ TYPED: load-commands ( macho: mach_header_32/64 -- load-commands ) : sections-array ( segment-commands -- sections-array ) [ dup first segment_command_64? - [ section_64 ] [ section ] if , + [ section_64 ] [ section ] if new , segment-commands [ segment-sections [ , ] each ] each ] { } make ; diff --git a/extra/random/xoshiro/xoshiro.factor b/extra/random/xoshiro/xoshiro.factor index acfff6c26f..a76aafc0b3 100644 --- a/extra/random/xoshiro/xoshiro.factor +++ b/extra/random/xoshiro/xoshiro.factor @@ -23,7 +23,7 @@ CONSTANT: LONG-JUMP-256 { STRUCT: xoshiro-256-star-star { s0 ulonglong } { s1 ulonglong } { s2 ulonglong } { s3 ulonglong } ; : ( s0 s1 s2 s3 -- obj ) - xoshiro-256-star-star + xoshiro-256-star-star new swap >>s3 swap >>s2 swap >>s1 diff --git a/extra/raylib/demo/demo.factor b/extra/raylib/demo/demo.factor index c9957e27cc..52a6dd7088 100644 --- a/extra/raylib/demo/demo.factor +++ b/extra/raylib/demo/demo.factor @@ -24,7 +24,7 @@ SYMBOL: player : setup-game-vars ( -- ) get-screen-width 2 / get-screen-height 2 / - Vector2 player set ; + Vector2 boa player set ; ! Make this cleaner : change-player-position ( -- ) diff --git a/extra/raylib/demo/gui/gui.factor b/extra/raylib/demo/gui/gui.factor index 6e598212df..32bb6fd698 100644 --- a/extra/raylib/demo/gui/gui.factor +++ b/extra/raylib/demo/gui/gui.factor @@ -12,7 +12,7 @@ IN: raylib.demo.gui 60 set-target-fps ; : button-rec ( -- button ) - 50 50 100 100 Rectangle ; + 50 50 100 100 Rectangle boa ; : white-background ( -- ) RAYWHITE clear-background ; diff --git a/extra/raylib/demo/mesh-picking/mesh-picking.factor b/extra/raylib/demo/mesh-picking/mesh-picking.factor index 7be1459b92..dec8196f73 100644 --- a/extra/raylib/demo/mesh-picking/mesh-picking.factor +++ b/extra/raylib/demo/mesh-picking/mesh-picking.factor @@ -12,7 +12,7 @@ CONSTANT: screen-height 800 screen-width screen-height "raylib [models] example - mesh-picking" init-window ; : make-camera ( -- camera ) - Camera3D + Camera3D new 20 30 20 >>position 0 10 0 >>target 0 1.6 0 >>up @@ -46,7 +46,7 @@ CONSTANT: screen-height 800 TUPLE: hit-state name color nearest-hit ; : ( -- obj ) "None" WHITE - RayCollision + RayCollision new most-positive-finite-float >>distance f >>hit hit-state boa ; @@ -127,7 +127,7 @@ SYMBOL: mesh-picking-frame ! LOG_ALL set-trace-log-level [ make-camera :> camera - Ray :> ray + Ray new :> ray init-assets :> ( tower triangle ) f :> bary! diff --git a/extra/terminal/linux/linux.factor b/extra/terminal/linux/linux.factor index 7d3120f5cc..3069bfecbc 100644 --- a/extra/terminal/linux/linux.factor +++ b/extra/terminal/linux/linux.factor @@ -20,7 +20,7 @@ STRUCT: winsize PRIVATE> M: unix (terminal-size) - stdout-handle fileno TIOCGWINSZ winsize + stdout-handle fileno TIOCGWINSZ winsize new [ ioctl ] keep swap 0 < [ drop 0 0 ] [ diff --git a/extra/terminal/macosx/macosx.factor b/extra/terminal/macosx/macosx.factor index 0c58e03e83..d7d682a16b 100644 --- a/extra/terminal/macosx/macosx.factor +++ b/extra/terminal/macosx/macosx.factor @@ -36,7 +36,7 @@ MEMO: TIOCGWINSZ ( -- x ) CHAR: t 104 winsize heap-size _IOCR ; PRIVATE> M: macosx (terminal-size) - stdout-handle fileno TIOCGWINSZ winsize + stdout-handle fileno TIOCGWINSZ winsize new [ ioctl ] keep swap 0 < [ drop 0 0 ] [ diff --git a/extra/terminal/windows/windows.factor b/extra/terminal/windows/windows.factor index ce7d2b719e..f30eef9981 100644 --- a/extra/terminal/windows/windows.factor +++ b/extra/terminal/windows/windows.factor @@ -8,7 +8,7 @@ IN: terminal.windows M: windows (terminal-size) STD_OUTPUT_HANDLE GetStdHandle - CONSOLE_SCREEN_BUFFER_INFO + CONSOLE_SCREEN_BUFFER_INFO new [ GetConsoleScreenBufferInfo ] keep swap zero? [ drop 0 0 ] [ diff --git a/extra/time/macosx/macosx.factor b/extra/time/macosx/macosx.factor index 98521f64ed..17f33abfe6 100644 --- a/extra/time/macosx/macosx.factor +++ b/extra/time/macosx/macosx.factor @@ -7,7 +7,7 @@ IN: time.macosx M: macosx adjust-time-monotonic timestamp>timeval - \ timeval + \ timeval new [ adjtime io-error ] keep dup binary-zero? [ drop instant ] [ diff --git a/extra/time/unix/unix.factor b/extra/time/unix/unix.factor index 19129b360b..076c22bf2d 100644 --- a/extra/time/unix/unix.factor +++ b/extra/time/unix/unix.factor @@ -5,7 +5,7 @@ system time unix unix.time ; IN: time.unix : timestamp>timezone ( timestamp -- timezone ) - gmt-offset>> duration>minutes 1 \ timezone ; inline + gmt-offset>> duration>minutes 1 \ timezone boa ; inline M: unix set-system-time [ unix-1970 time- duration>microseconds >integer make-timeval ] diff --git a/extra/tools/time/struct/struct.factor b/extra/tools/time/struct/struct.factor index 16a0549ec5..f13edf085d 100644 --- a/extra/tools/time/struct/struct.factor +++ b/extra/tools/time/struct/struct.factor @@ -15,14 +15,14 @@ STRUCT: benchmark-data-pair { stop benchmark-data } ; : ( -- benchmark-data ) - \ benchmark-data + \ benchmark-data new nano-count >>time data-room >>data-room code-room >>code-room callback-room >>callback-room ; inline : ( start stop -- benchmark-data-pair ) - \ benchmark-data-pair + \ benchmark-data-pair new swap >>stop swap >>start ; inline diff --git a/extra/windows/fullscreen/fullscreen.factor b/extra/windows/fullscreen/fullscreen.factor index ff06dcade5..e892fac138 100644 --- a/extra/windows/fullscreen/fullscreen.factor +++ b/extra/windows/fullscreen/fullscreen.factor @@ -14,7 +14,7 @@ IN: windows.fullscreen GetDesktopWindow hwnd>hmonitor ; :: (monitor-info>devmodes) ( monitor-info n -- ) - DEVMODE + DEVMODE new DEVMODE heap-size >>dmSize flags{ DM_BITSPERPEL DM_PELSWIDTH DM_PELSHEIGHT } >>dmFields :> devmode @@ -31,7 +31,7 @@ IN: windows.fullscreen [ 0 (monitor-info>devmodes) ] { } make ; : hmonitor>monitor-info ( HMONITOR -- monitor-info ) - MONITORINFOEX + MONITORINFOEX new MONITORINFOEX heap-size >>cbSize [ GetMonitorInfo win32-error=0/f ] keep ; @@ -48,7 +48,7 @@ IN: windows.fullscreen desktop-hmonitor hmonitor>monitor-info ; : desktop-RECT ( -- RECT ) - GetDesktopWindow RECT [ GetWindowRect win32-error=0/f ] keep ; + GetDesktopWindow RECT new [ GetWindowRect win32-error=0/f ] keep ; ERROR: display-change-error n ; -- 2.34.1