]> gitweb.factorcode.org Git - factor.git/commitdiff
minor tweaks to make these modules load with load-everything
authorDoug Coleman <erg@jjjj.local>
Mon, 14 Jan 2008 21:42:21 +0000 (11:42 -1000)
committerDoug Coleman <erg@jjjj.local>
Mon, 14 Jan 2008 21:42:21 +0000 (11:42 -1000)
34 files changed:
extra/channels/channels-docs.factor
extra/channels/remote/remote-docs.factor
extra/channels/sniffer/backend/backend.factor [new file with mode: 0644]
extra/channels/sniffer/bsd/bsd.factor
extra/channels/sniffer/sniffer.factor
extra/coroutines/coroutines-docs.factor
extra/cryptlib/libcl/libcl.factor
extra/crypto/md5/md5-docs.factor
extra/hardware-info/backend/backend.factor [new file with mode: 0644]
extra/hardware-info/hardware-info.factor
extra/hardware-info/macosx/macosx.factor
extra/hardware-info/windows/ce/ce.factor
extra/hardware-info/windows/nt/nt.factor
extra/hardware-info/windows/windows.factor
extra/html/parser/utils/utils.factor
extra/http/basic-authentication/basic-authentication-docs.factor
extra/id3/id3-docs.factor
extra/inverse/inverse-docs.factor
extra/inverse/inverse.factor
extra/io/sniffer/backend/backend.factor [new file with mode: 0644]
extra/io/sniffer/bsd/bsd.factor
extra/io/sniffer/filter/backend/backend.factor [new file with mode: 0644]
extra/io/sniffer/filter/bsd/bsd.factor
extra/io/sniffer/filter/filter.factor
extra/io/sniffer/sniffer.factor
extra/jamshred/game/game.factor
extra/jamshred/player/player.factor
extra/json/reader/reader-docs.factor
extra/json/writer/writer-docs.factor
extra/json/writer/writer.factor
extra/lisp/listener/listener.factor
extra/mad/mad.factor
extra/parser-combinators/simple/simple-docs.factor
extra/xml-rpc/xml-rpc-docs.factor

index 8487d59e7f829aac000d2f4966b25071af2f0f8e..521a4a4ae20ca0174cb2a99472ee02247e029420 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2007 Chris Double.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: help.syntax help.markup channels ;
+USING: help.syntax help.markup ;
 IN: channels
 
 HELP: <channel>
index 5400f147f414724115eb7a5909a5a8ddcc8c8cd0..862084e1d9e4a856f0f04102d0b7e894fc971aeb 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2007 Chris Double.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: help.syntax help.markup channels channels.remote concurrency.distributed ;
+USING: help.syntax help.markup channels concurrency.distributed ;
 IN: channels.remote
 
 HELP: <remote-channel>
@@ -59,4 +59,4 @@ $nl
 { $snippet "\"myhost.com\" 9001 <node> \"ID123456\" <remote-channel>\n\"hello\" over to" } 
 ;
 
-ABOUT: { "remote-channels" "remote-channels" }
\ No newline at end of file
+ABOUT: { "remote-channels" "remote-channels" }
diff --git a/extra/channels/sniffer/backend/backend.factor b/extra/channels/sniffer/backend/backend.factor
new file mode 100644 (file)
index 0000000..c7c2e42
--- /dev/null
@@ -0,0 +1,3 @@
+USING: io.backend ;
+
+HOOK: sniff-channel io-backend ( -- channel ) 
index ba8e5ceeb99a572544dd73caf266710e5794562d..0ba267bb03a45bb4929a51c03a8194ff262d8bcf 100644 (file)
@@ -2,8 +2,9 @@
 ! See http://factorcode.org/license.txt for BSD license.
 !
 ! Wrap a sniffer in a channel
-USING: kernel channels channels.sniffer concurrency io
-io.sniffer io.sniffer.bsd io.unix.backend ;
+USING: kernel channels channels.sniffer.backend concurrency io
+io.sniffer.backend io.sniffer.bsd io.unix.backend ;
+IN: channels.sniffer.bsd
 
 M: unix-io sniff-channel ( -- channel ) 
   "/dev/bpf0" "en1" <sniffer-spec> <sniffer> <channel> [
index 8edd035ccae2c6eb345d91440ba48860dd68d453..150220122547f50a5c1a91d43f98016ff5f96c0b 100755 (executable)
@@ -3,11 +3,9 @@
 !
 ! Wrap a sniffer in a channel
 USING: kernel channels concurrency io io.backend
-io.sniffer system vocabs.loader ;
+io.sniffer io.sniffer.backend system vocabs.loader ;
 
 : (sniff-channel) ( stream channel -- ) 
   4096 pick stream-read-partial over to (sniff-channel) ;
 
-HOOK: sniff-channel io-backend ( -- channel ) 
-
 bsd? [ "channels.sniffer.bsd" require ] when
index ed3788db48d440b78df21cbabd7f57c7c106f1bf..327c60e01785c34e48488afccf452c95ba21563f 100644 (file)
@@ -1,5 +1,6 @@
 ! Copyright (C) 2005 Chris Double, 2007 Clemens Hofreither.
-USING: help.markup help.syntax coroutines ;
+USING: help.markup help.syntax ;
+IN: coroutines
 
 HELP: cocreate
 { $values { "quot" "a quotation with stack effect ( value -- )" } { "co" "a coroutine" } }
@@ -51,4 +52,4 @@ HELP: coterminate
 HELP: current-coro
 { $description "Variable which contains the currently executing coroutine, or " { $link f } " if none is executing. User code should treat this variable as read-only." }
 { $see-also cocreate coresume coyield }
-;
\ No newline at end of file
+;
index 3cc0d5009598dda9ec293eabaed1d9ab69b5fb60..38e6817f6c6862be1fb200c3893c3a5b5ca036f1 100644 (file)
@@ -12,14 +12,11 @@ USING: alien kernel system combinators alien.syntax ;
 
 IN: cryptlib.libcl
 
-: load-libcl ( -- )
-    "libcl" {
+<< "libcl" {
         { [ win32? ] [ "cl32.dll" "stdcall" ] }
         { [ macosx? ] [ "libcl.dylib" "cdecl" ] }
         { [ unix? ] [ "libcl.so" "cdecl" ] }
-    } cond add-library ; parsing
-
-load-libcl
+    } cond add-library >>
 
 ! ===============================================
 ! Machine-dependant types
index 53c737554b27a681ad2b189bf3cd5d2d5c8598d1..fd8bf3f74dd6bf4a4affda1c3091b84555752b38 100644 (file)
@@ -1,5 +1,6 @@
 USING: help.markup help.syntax kernel math sequences quotations
-crypto.common crypto.md5 ;
+crypto.common ;
+IN: crypto.md5
 
 HELP: stream>md5
 { $values { "stream" "a stream" } { "byte-array" "md5 hash" } }
diff --git a/extra/hardware-info/backend/backend.factor b/extra/hardware-info/backend/backend.factor
new file mode 100644 (file)
index 0000000..d79678d
--- /dev/null
@@ -0,0 +1,14 @@
+IN: hardware-info.backend
+
+SYMBOL: os
+HOOK: cpus os ( -- n )
+
+HOOK: memory-load os ( -- n )
+HOOK: physical-mem os ( -- n )
+HOOK: available-mem os ( -- n )
+HOOK: total-page-file os ( -- n )
+HOOK: available-page-file os ( -- n )
+HOOK: total-virtual-mem os ( -- n )
+HOOK: available-virtual-mem os ( -- n )
+HOOK: available-virtual-extended-mem os ( -- n )
+
index 9b3c969dc3edc6a85512cdbf8e06e557c7beb98f..0515646a5fe063acb4066a4b5c67eda7613cb9ef 100755 (executable)
@@ -1,26 +1,15 @@
-USING: alien.syntax math prettyprint system combinators
-vocabs.loader ;
+USING: alien.syntax kernel math prettyprint system
+combinators vocabs.loader hardware-info.backend ;
 IN: hardware-info
 
-SYMBOL: os
-HOOK: cpus os ( -- n )
-
-HOOK: memory-load os ( -- n )
-HOOK: physical-mem os ( -- n )
-HOOK: available-mem os ( -- n )
-HOOK: total-page-file os ( -- n )
-HOOK: available-page-file os ( -- n )
-HOOK: total-virtual-mem os ( -- n )
-HOOK: available-virtual-mem os ( -- n )
-HOOK: available-virtual-extended-mem os ( -- n )
-
 : kb. ( x -- ) 10 2^ /f . ;
 : megs. ( x -- ) 20 2^ /f . ;
 : gigs. ( x -- ) 30 2^ /f . ;
 
-{
+<< {
     { [ windows? ] [ "hardware-info.windows" ] }
     { [ linux? ] [ "hardware-info.linux" ] }
     { [ macosx? ] [ "hardware-info.macosx" ] }
-} cond require
+    { [ t ] [ f ] }
+} cond [ require ] when* >>
 
index ad3060944e04534f415770b32a04c2128ceeeef7..c246a951867e37515829dd2bc323a14283f0b67c 100644 (file)
@@ -1,5 +1,5 @@
 USING: alien alien.c-types alien.syntax byte-arrays kernel
-namespaces sequences unix hardware-info ;
+namespaces sequences unix hardware-info.backend ;
 IN: hardware-info.macosx
 
 TUPLE: macosx ;
index 42fd9e53438423465f5fe2ede76de736d5c41b97..9fb15ef823b2621da63c18575762c8e7dafe261a 100644 (file)
@@ -1,5 +1,6 @@
 USING: alien.c-types hardware-info hardware-info.windows
-kernel math namespaces windows windows.kernel32 ;
+kernel math namespaces windows windows.kernel32
+hardware-info.backend ;
 IN: hardware-info.windows.ce
 
 T{ wince } os set-global
@@ -29,5 +30,3 @@ M: wince total-virtual-mem ( -- n )
 
 M: wince available-virtual-mem ( -- n )
     memory-status MEMORYSTATUS-dwAvailVirtual ;
-
-
index 2b2522e6ee9f2cb507677afe4feaf18c6102d541..f412754cdf39cd5226e1d4722d49a570bfd895dc 100644 (file)
@@ -1,5 +1,5 @@
 USING: alien alien.c-types hardware-info hardware-info.windows
-kernel libc math namespaces
+kernel libc math namespaces hardware-info.backend
 windows windows.advapi32 windows.kernel32 ;
 IN: hardware-info.windows.nt
 
index 5352d646981d3132102f43da6d75e0865fcbdc26..a49e4f254acc39b215ad4ffa08cdf0405cd21c32 100755 (executable)
@@ -1,6 +1,6 @@
 USING: alien alien.c-types kernel libc math namespaces
-windows windows.kernel32 windows.advapi32 hardware-info
-words combinators vocabs.loader ;
+windows windows.kernel32 windows.advapi32
+words combinators vocabs.loader hardware-info.backend ;
 IN: hardware-info.windows
 
 TUPLE: wince ;
@@ -70,7 +70,8 @@ M: windows cpus ( -- n )
 : system-windows-directory ( -- str )
     \ GetSystemWindowsDirectory get-directory ;
 
-{
+<< {
     { [ wince? ] [ "hardware-info.windows.ce" ] }
     { [ winnt? ] [ "hardware-info.windows.nt" ] }
-} cond require
+    { [ t ] [ f ] }
+} cond [ require ] when* >>
index febd1716eda60238a01c74397ccf7698b09cb8f8..b574799b38efcb4e01325c8ed7964d4d0c50a197 100644 (file)
@@ -2,7 +2,6 @@ USING: assocs circular combinators continuations hashtables
 hashtables.private io kernel math
 namespaces prettyprint quotations sequences splitting
 state-parser strings ;
-USING: html.parser ;
 IN: html.parser.utils
 
 : string-parse-end?
index 9add842db66f66b2db5662c45b78b9654e6bc247..68d6e6bf1dac0cb3ba238ce2654c24816d39d059 100644 (file)
@@ -1,6 +1,7 @@
 ! Copyright (C) 2007 Chris Double.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: help.markup help.syntax http.basic-authentication crypto.sha2 ;
+USING: help.markup help.syntax crypto.sha2 ;
+IN: http.basic-authentication
 
 HELP: realms
 { $description 
@@ -65,4 +66,4 @@ $nl
 "it is best to use Basic Authentication with SSL."  ;
 
 IN: http.basic-authentication
-ABOUT: { "http-authentication" "basic-authentication" }
\ No newline at end of file
+ABOUT: { "http-authentication" "basic-authentication" }
index 47edee7437a56823979c1a397cbc3186e428b68d..8083514c0d3c67379ef3e478ef628fc13e93925f 100644 (file)
@@ -1,6 +1,7 @@
 ! Coyright (C) 2007 Adam Wendt
 ! See http://factorcode.org/license.txt for BSD license.
-USING: id3 help.syntax help.markup ;
+USING: help.syntax help.markup ;
+IN: id3
 
 ARTICLE: "id3-tags" "ID3 Tags"
 "The " { $vocab-link "id3" } " vocabulary is used to read ID3 tags from MP3 audio streams."
index f8ae3bfbdb4111708d42ae49017a2d4885228b15..8204f7174c109c00e3832b55cdfaa4fd34607ab9 100644 (file)
@@ -1,4 +1,5 @@
-USING: inverse help.syntax help.markup ;
+USING: help.syntax help.markup ;
+IN: inverse
 
 HELP: [undo]
 { $values { "quot" "a quotation" } { "undo" "the inverse of the quotation" } }
index cade645dded229932a5dd0f035e1a48c17b13a90..b97748514cd9dee36516de3caebfddda486a1615 100644 (file)
@@ -63,7 +63,9 @@ UNION: explicit-inverse normal-inverse math-inverse pop-inverse ;
     {
         { [ dup word? not over symbol? or ] [ , ] }
         { [ dup explicit-inverse? ] [ , ] }
-        { [ dup compound? over { if dispatch } member? not and ]
+        ! { [ dup compound? over { if dispatch } member? not and ]
+          ! [ word-def [ inline-word ] each ] }
+        { [ dup word? over { if dispatch } member? not and ]
           [ word-def [ inline-word ] each ] }
         { [ drop t ] [ "Quotation is not invertible" throw ] }
     } cond ;
diff --git a/extra/io/sniffer/backend/backend.factor b/extra/io/sniffer/backend/backend.factor
new file mode 100644 (file)
index 0000000..53bf37a
--- /dev/null
@@ -0,0 +1,6 @@
+USING: io.backend kernel system vocabs.loader ;
+IN: io.sniffer.backend
+
+SYMBOL: sniffer-type
+TUPLE: sniffer ;
+HOOK: <sniffer> io-backend ( obj -- sniffer )
index 91266b7be3a41680cfbf03e600e3f508da4ccc8f..6a0d092807c667a47bf320beaa1faba5d7cbb8c5 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2007 Elie Chaftari, Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien.c-types alien.syntax destructors hexdump io
-io.buffers io.nonblocking io.sniffer io.sockets io.streams.lines
+io.buffers io.nonblocking io.sockets io.streams.lines
 io.unix.backend io.unix.files kernel libc locals math qualified
-sequences ;
+sequences io.sniffer.backend ;
 QUALIFIED: unix
 IN: io.sniffer.bsd
 
diff --git a/extra/io/sniffer/filter/backend/backend.factor b/extra/io/sniffer/filter/backend/backend.factor
new file mode 100644 (file)
index 0000000..dade8bd
--- /dev/null
@@ -0,0 +1,17 @@
+USING: byte-arrays combinators io io.backend
+io.sockets.headers io.sniffer.backend kernel
+prettyprint sequences ;
+IN: io.sniffer.filter.backend
+
+HOOK: sniffer-loop io-backend ( stream -- )
+HOOK: packet. io-backend ( string -- )
+
+: (packet.) ( string -- )
+    dup 14 head >byte-array
+    "--Ethernet Header--" print
+        dup etherneth.
+    dup etherneth-type {
+        ! HEX: 800 [ ] ! IP
+        ! HEX: 806 [ ] ! ARP
+        [ "Unknown type: " write .h ]
+    } case 2drop ;
index c6882352d07f25f232abd6bb042b27e7e5f395c4..c18cae41e5e409362e6e58b54e3dbcb0f19c451d 100644 (file)
@@ -1,7 +1,8 @@
 USING: alien.c-types hexdump io io.backend io.sockets.headers
 io.sockets.headers.bsd kernel io.sniffer io.sniffer.bsd
-io.sniffer.filter io.streams.string io.unix.backend math
-sequences system byte-arrays ;
+io.streams.string io.unix.backend math
+sequences system byte-arrays io.sniffer.filter.backend
+io.sniffer.filter.backend io.sniffer.backend ;
 IN: io.sniffer.filter.bsd
 
 ! http://www.iana.org/assignments/ethernet-numbers
index 3240810e7fea0f5efe161d27b399bdcaf4e1f57c..91c0ab5a5c04795c8177015604cdb382d457a819 100755 (executable)
@@ -1,19 +1,8 @@
 USING: alien.c-types byte-arrays combinators hexdump io
 io.backend io.streams.string io.sockets.headers kernel math
-prettyprint io.sniffer sequences system vocabs.loader ;
+prettyprint io.sniffer sequences system vocabs.loader
+io.sniffer.filter.backend ;
 IN: io.sniffer.filter
 
-HOOK: sniffer-loop io-backend ( stream -- )
-HOOK: packet. io-backend ( string -- )
-
-: (packet.) ( string -- )
-    dup 14 head >byte-array
-    "--Ethernet Header--" print
-        dup etherneth.
-    dup etherneth-type {
-        ! HEX: 800 [ ] ! IP
-        ! HEX: 806 [ ] ! ARP
-        [ "Unknown type: " write .h ]
-    } case 2drop ;
 
 bsd? [ "io.sniffer.filter.bsd" require ] when
index 04491ca709f713763d2a6db4149b849e91d1ca96..6fd74f9e1c8030cb38b5b522721f7aa3dfe9c818 100755 (executable)
@@ -1,10 +1,4 @@
 USING: io.backend kernel system vocabs.loader ;
 IN: io.sniffer
 
-SYMBOL: sniffer-type
-
-TUPLE: sniffer ;
-
-HOOK: <sniffer> io-backend ( obj -- sniffer )
-
 bsd? [ "io.sniffer.bsd" require ] when
index 667d81aeb41f467d678cab873011cccac92177b6..fe517d68fdd3ce1e896c05f8ee0ff8ed6089bf98 100644 (file)
@@ -1,4 +1,4 @@
-USING: kernel opengl arrays sequences jamshred jamshred.tunnel
+USING: kernel opengl arrays sequences jamshred.tunnel
 jamshred.player math.vectors ;
 IN: jamshred.game
 
index ddbd03eeb99ab3fcdad04c54d292765b08946691..4daecf29a2d2af5df01d69d015466044a88864ec 100644 (file)
@@ -1,4 +1,4 @@
-USING: colors jamshred.game jamshred.oint jamshred.tunnel kernel
+USING: colors jamshred.oint jamshred.tunnel kernel
 math math.constants sequences ;
 IN: jamshred.player
 
index 43edb6c43d96e12a3522db45b8a73d08dc0bfe58..ea4dcbf954e77bbad8664b803470e3d57f9436fb 100644 (file)
@@ -1,7 +1,8 @@
 ! Copyright (C) 2006 Chris Double.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: help.markup help.syntax json.reader ;
+USING: help.markup help.syntax ;
+IN: json.reader
 
 HELP: json> "( string -- object )"
 { $values { "string" "a string in JSON format" } { "object" "yhe object deserialized from the JSON string" } }
-{ $description "Deserializes the JSON formatted string into a Factor object. JSON objects are converted to Factor hashtables. All other JSON objects convert to their obvious Factor equivalents." } ;
\ No newline at end of file
+{ $description "Deserializes the JSON formatted string into a Factor object. JSON objects are converted to Factor hashtables. All other JSON objects convert to their obvious Factor equivalents." } ;
index cc26f7484387f2f87e07a9f3d1b0f858f719dc3a..21aa8b2cb5d453405a870d2748b7e8bd2215f47e 100644 (file)
@@ -1,6 +1,7 @@
 ! Copyright (C) 2006 Chris Double.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: help.markup help.syntax json.writer ;
+USING: help.markup help.syntax ;
+IN: json.writer
 
 HELP: >json "( obj -- string )"
 { $values { "obj" "an object" } { "string" "the object converted to JSON format" } }
index 4370a38411e78575c29ad429ebfc177c582c0ba7..6c7d6cebb2cc6648774af2f630ef4de2b99f802b 100644 (file)
@@ -13,7 +13,7 @@ GENERIC: json-print ( obj -- )
   [ json-print ] string-out ;
 
 M: f json-print ( f -- )
-  "false" write ;
+  drop "false" write ;
 
 M: string json-print ( obj -- )
   CHAR: " write1 "\"" split "\\\"" join CHAR: \r swap remove "\n" split "\\r\\n" join write CHAR: " write1 ;
index 5af44ba3620295178a40b931e65a7e5ea7071fda..91f0bb2a8d12c7d34482b2f5bf927edec69cc6e5 100644 (file)
@@ -5,7 +5,7 @@ USING: kernel parser namespaces io prettyprint math arrays sequences
 
 IN: lisp.listener
 
-: parse-stdio ( -- quot/f ) stdio get parse-interactive ;
+: parse-stdio ( -- quot/f ) stdio get read-quot ;
 
 : stuff? ( -- ? ) datastack length 0 > ;
 
@@ -25,4 +25,4 @@ use [ clone ] change
 { "lisp" "lisp.syntax" } add-use
 ! [ listener-hook get call prompt. lisp-listen ] until-quit
 until-quit
-] with-scope ;
\ No newline at end of file
+] with-scope ;
index 27b053352b389eaaa6bd6f6f45b7e7dbcfe58e8b..ce65c066b4e00e52627b2c57242f2fe7b5d0ebd9 100644 (file)
@@ -4,14 +4,11 @@
 USING: alien alien.c-types alien.syntax combinators kernel math system ;
 IN: mad
 
-: load-mad-library ( -- )
-  "mad" {
+<< "mad" {
     { [ macosx? ] [ "libmad.0.dylib" ] }
     { [ unix? ] [ "libmad.so" ] }
     { [ windows? ] [ "mad.dll" ] }
-  } cond "cdecl" add-library ; parsing
-
-load-mad-library
+  } cond "cdecl" add-library >>
 
 LIBRARY: mad
 
index c2cca6e4a097a3a60d38575a561c606cd892d7f2..bba37ca4caeba5832c7268444a2cfe9b39150abe 100755 (executable)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2006 Chris Double.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: help.syntax help.markup parser-combinators
-parser-combinators.simple ;
+USING: help.syntax help.markup parser-combinators ;
+IN: parser-combinators.simple
 
 HELP: 'digit'
 { $values 
index 323e103d4c2c379882aa85d1b838230b79f78a89..8c20df1fd02d93349777e43a43fb495638d55456 100644 (file)
@@ -1,4 +1,5 @@
-USING: xml-rpc help.syntax help.markup ;
+USING: help.syntax help.markup ;
+IN: xml-rpc
 
 HELP: send-rpc
 { $values { "rpc" "an RPC data type" } { "xml" "an XML document" } }