diff --git a/basis/alien/libraries/finder/finder.factor b/basis/alien/libraries/finder/finder.factor index 3a763cf1b8..7483b60488 100644 --- a/basis/alien/libraries/finder/finder.factor +++ b/basis/alien/libraries/finder/finder.factor @@ -1,5 +1,4 @@ -USING: combinators kernel sequences system vocabs -alien.libraries ; +USING: accessors kernel sequences system vocabs ; IN: alien.libraries.finder HOOK: find-library* os ( name -- path/f ) @@ -14,8 +13,4 @@ HOOK: find-library* os ( name -- path/f ) dup [ find-library* ] map-find drop [ nip ] [ ?first "library_not_found" or ] if* ; -{ - { [ os macosx? ] [ "alien.libraries.finder.macosx" ] } - { [ os linux? ] [ "alien.libraries.finder.linux" ] } - { [ os windows? ] [ "alien.libraries.finder.windows" ] } -} cond require +"alien.libraries.finder." os name>> append require diff --git a/basis/io/monitors/monitors.factor b/basis/io/monitors/monitors.factor index d7dc4184d0..21fd11df4a 100644 --- a/basis/io/monitors/monitors.factor +++ b/basis/io/monitors/monitors.factor @@ -1,9 +1,8 @@ ! Copyright (C) 2008, 2010 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: io.backend kernel continuations destructors namespaces -sequences assocs hashtables sorting arrays threads boxes -io.timeouts accessors concurrency.mailboxes fry -system vocabs combinators ; +USING: accessors concurrency.mailboxes continuations destructors +fry io.backend io.timeouts kernel namespaces sequences system +vocabs ; IN: io.monitors HOOK: init-monitors io-backend ( -- ) @@ -74,8 +73,4 @@ SYMBOL: +rename-file+ : run-monitor ( path recursive? quot -- ) '[ [ @ t ] loop ] with-monitor ; inline -{ - { [ os macosx? ] [ "io.monitors.macosx" require ] } - { [ os linux? ] [ "io.monitors.linux" require ] } - { [ os windows? ] [ "io.monitors.windows" require ] } -} cond +"io.monitors." os name>> append require diff --git a/basis/system-info/system-info.factor b/basis/system-info/system-info.factor index 2f941dbda2..aff6951134 100644 --- a/basis/system-info/system-info.factor +++ b/basis/system-info/system-info.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: combinators io kernel math math.parser system +USING: accessors io kernel math math.parser sequences system vocabs ; IN: system-info @@ -28,9 +28,5 @@ HOOK: available-virtual-extended-mem os ( -- n ) "CPUs: " write cpus number>string write nl "CPU Speed: " write cpu-mhz ghz nl "Physical RAM: " write physical-mem megs nl ; - -<< { - { [ os windows? ] [ "system-info.windows" ] } - { [ os linux? ] [ "system-info.linux" ] } - { [ os macosx? ] [ "system-info.macosx" ] } -} cond [ require ] when* >> + +"system-info." os name>> append require diff --git a/basis/tools/ps/ps.factor b/basis/tools/ps/ps.factor index ce4b808fcf..e890ae35f1 100644 --- a/basis/tools/ps/ps.factor +++ b/basis/tools/ps/ps.factor @@ -1,15 +1,11 @@ ! Copyright (C) 2012-2013 Doug Coleman, John Benediktsson. ! See http://factorcode.org/license.txt for BSD license. -USING: combinators prettyprint sequences sorting system vocabs ; +USING: accessors prettyprint sequences sorting system vocabs ; IN: tools.ps HOOK: ps os ( -- assoc ) -{ - { [ os macosx? ] [ "tools.ps.macosx" ] } - { [ os linux? ] [ "tools.ps.linux" ] } - { [ os windows? ] [ "tools.ps.windows" ] } -} cond require +"tools.ps." os name>> append require : ps. ( -- ) ps sort-keys { "PID" "CMD" } prefix simple-table. ; diff --git a/basis/unix/ffi/ffi.factor b/basis/unix/ffi/ffi.factor index 599492d323..cb14612ca2 100644 --- a/basis/unix/ffi/ffi.factor +++ b/basis/unix/ffi/ffi.factor @@ -1,18 +1,11 @@ ! Copyright (C) 2010 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: alien alien.c-types alien.data alien.libraries -alien.syntax classes.struct combinators system unix.time +USING: accessors alien alien.c-types alien.data alien.libraries +alien.syntax classes.struct sequences system unix.time unix.types vocabs ; IN: unix.ffi -<< - -{ - { [ os linux? ] [ "unix.ffi.linux" require ] } - { [ os macosx? ] [ "unix.ffi.macosx" require ] } -} cond - ->> +<< "unix.ffi." os name>> append require >> CONSTANT: PROT_NONE 0 CONSTANT: PROT_READ 1 diff --git a/basis/webbrowser/webbrowser.factor b/basis/webbrowser/webbrowser.factor index 232d28fda6..7553989ecd 100644 --- a/basis/webbrowser/webbrowser.factor +++ b/basis/webbrowser/webbrowser.factor @@ -1,18 +1,14 @@ ! Copyright (C) 2011 John Benediktsson ! See http://factorcode.org/license.txt for BSD license -USING: combinators combinators.short-circuit io.pathnames -present sequences strings system ui.operations urls vocabs ; +USING: accessors combinators.short-circuit io.pathnames +sequences strings system ui.operations urls vocabs ; IN: webbrowser HOOK: open-file os ( path -- ) -{ - { [ os macosx? ] [ "webbrowser.macosx" ] } - { [ os linux? ] [ "webbrowser.linux" ] } - { [ os windows? ] [ "webbrowser.windows" ] } -} cond require +"webbrowser." os name>> append require : open-url ( url -- ) >url open-file ; diff --git a/extra/io/serial/serial.factor b/extra/io/serial/serial.factor index e4eab07afa..a4844d5f16 100644 --- a/extra/io/serial/serial.factor +++ b/extra/io/serial/serial.factor @@ -1,8 +1,7 @@ ! Copyright (C) 2008 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors alien.c-types assocs combinators destructors -kernel math math.bitwise math.parser sequences summary system -vocabs io ; +USING: accessors destructors io kernel math.parser sequences +summary system vocabs ; IN: io.serial TUPLE: serial-port < disposable stream path baud @@ -30,7 +29,4 @@ M: serial-port dispose* ( serial -- ) stream>> dispose ; : with-serial-port ( serial-port quot -- ) [ open-serial ] dip with-duplex-stream ; inline -{ - { [ os linux? ] [ "io.serial.linux" ] } - { [ os windows? ] [ "io.serial.windows" ] } -} cond require +"io.serial." os name>> append require diff --git a/extra/terminal/terminal.factor b/extra/terminal/terminal.factor index 3c56922763..996220b6cc 100644 --- a/extra/terminal/terminal.factor +++ b/extra/terminal/terminal.factor @@ -1,18 +1,14 @@ ! Copyright (C) 2012 John Benediktsson ! See http://factorcode.org/license.txt for BSD license -USING: arrays combinators environment kernel math math.parser +USING: accessors arrays environment kernel math math.parser sequences system vocabs ; IN: terminal HOOK: (terminal-size) os ( -- columns lines ) -{ - { [ os macosx? ] [ "terminal.macosx" ] } - { [ os linux? ] [ "terminal.linux" ] } - { [ os windows? ] [ "terminal.windows" ] } -} cond require +"terminal." os name>> append require : terminal-size ( -- dim ) "COLUMNS" "LINES"