]> gitweb.factorcode.org Git - factor.git/commitdiff
basis/extra: switch to "vocab." os name>> append require.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 13 Nov 2014 21:00:44 +0000 (13:00 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 13 Nov 2014 21:00:44 +0000 (13:00 -0800)
basis/alien/libraries/finder/finder.factor
basis/io/monitors/monitors.factor
basis/system-info/system-info.factor
basis/tools/ps/ps.factor
basis/unix/ffi/ffi.factor
basis/webbrowser/webbrowser.factor
extra/io/serial/serial.factor
extra/terminal/terminal.factor

index 3a763cf1b80c8a2813a66d6789ae4a916fbaac89..7483b60488043a0cca1d5350bca0a32f534b3320 100644 (file)
@@ -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
index d7dc4184d08f684c34aa686a47e5024c7aa1e427..21fd11df4a2f9e7cd0d16bae4d7bd6dc89f91487 100644 (file)
@@ -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
index 2f941dbda24f83757a97701be37fdf085cea15eb..aff69511341f640df8e6e59fdc617bdfaceb2aaa 100644 (file)
@@ -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
index ce4b808fcffd6fbb92c3ba5a1a9615dd8efcb707..e890ae35f1b70b198bbcd37cfe8ea2a443fa2d86 100644 (file)
@@ -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. ;
index 599492d323070673e5588ffcc182d985a088c790..cb14612ca276645e1eefa6f9b834fb50b0ddf053 100644 (file)
@@ -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
index 232d28fda6baeefbe64118100eccbe2d01443d22..7553989ecdf957a3218c3e508b87a15abbd810ef 100644 (file)
@@ -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 ;
index e4eab07afa9235a628f2f3d09eec980e14d054bf..a4844d5f16dcb8f8f6b4cbde49a4016289a0c43d 100644 (file)
@@ -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
index 3c56922763f40bb1c7354dfc57c151df09d3c39a..996220b6cc3eafea2e894137b6161935704c6442 100644 (file)
@@ -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"