]> gitweb.factorcode.org Git - factor.git/commitdiff
Add vocab: for vocab-relative paths
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 16 Feb 2009 01:53:21 +0000 (19:53 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 16 Feb 2009 01:53:21 +0000 (19:53 -0600)
60 files changed:
basis/bootstrap/help/help.factor
basis/bootstrap/stage2.factor
basis/cpu/ppc/linux/bootstrap.factor
basis/cpu/ppc/macosx/bootstrap.factor
basis/cpu/x86/32/bootstrap.factor
basis/cpu/x86/64/bootstrap.factor
basis/cpu/x86/64/unix/bootstrap.factor
basis/cpu/x86/64/winnt/bootstrap.factor
basis/help/html/html.factor
basis/html/templates/chloe/chloe-tests.factor
basis/html/templates/fhtml/fhtml-tests.factor
basis/http/http-tests.factor
basis/images/bitmap/bitmap-tests.factor
basis/io/encodings/8-bit/8-bit.factor
basis/io/encodings/chinese/chinese.factor
basis/io/encodings/iana/iana.factor
basis/io/encodings/japanese/japanese.factor
basis/io/sockets/secure/secure-tests.factor
basis/io/sockets/secure/secure.factor
basis/io/sockets/secure/unix/debug/debug.factor
basis/mime/types/types.factor
basis/openssl/openssl-tests.factor
basis/porter-stemmer/porter-stemmer-tests.factor
basis/syndication/syndication-tests.factor
basis/tools/crossref/crossref-tests.factor
basis/tools/deploy/deploy-tests.factor
basis/tools/deploy/shaker/shaker.factor
basis/tools/vocabs/vocabs.factor
basis/unicode/breaks/breaks-tests.factor
basis/unicode/breaks/breaks.factor
basis/unicode/collation/collation-tests.factor
basis/unicode/collation/collation.factor
basis/unicode/data/data.factor
basis/unicode/normalize/normalize-tests.factor
basis/unicode/script/script.factor
basis/xml/entities/html/html.factor
basis/xml/tests/encodings.factor
basis/xml/tests/funny-dtd.factor
basis/xml/tests/soap.factor
basis/xml/tests/test.factor
basis/xml/tests/xmltest.factor
basis/xml/tests/xmode-dtd.factor
basis/xml/writer/writer-tests.factor
basis/xmode/catalog/catalog.factor
basis/xmode/utilities/utilities-tests.factor
core/bootstrap/primitives.factor
core/bootstrap/stage1.factor
core/io/encodings/encodings-tests.factor
core/io/files/files-tests.factor
core/io/io-tests.factor
core/io/pathnames/pathnames.factor
core/parser/parser-tests.factor
core/vocabs/loader/loader.factor
core/vocabs/vocabs.factor
extra/benchmark/crc32/crc32.factor
extra/benchmark/md5/md5.factor
extra/benchmark/sha1/sha1.factor
extra/benchmark/xml/xml.factor
extra/webapps/todo/todo.factor
extra/websites/concatenative/concatenative.factor

index 145738ff4507792f5ce7bebbf0effbfd95409e04..bd994a160d2183b654a5315313da15ba8e7b2422 100644 (file)
@@ -10,7 +10,7 @@ IN: bootstrap.help
 
     t load-help? set-global
 
-    [ drop ] load-vocab-hook [
+    [ vocab ] load-vocab-hook [
         dictionary get values
         [ docs-loaded?>> not ] filter
         [ load-docs ] each
index b521244fe0ae73abf32b170eaff1713b1cff0a89..070618ebb487eaa39c9266aaa71d21d19b393af6 100644 (file)
@@ -93,9 +93,9 @@ SYMBOL: bootstrap-time
         "tools.deploy.shaker" run
     ] [
         "staging" get [
-            "resource:basis/bootstrap/finish-staging.factor" run-file
+            "vocab:bootstrap/finish-staging.factor" run-file
         ] [
-            "resource:basis/bootstrap/finish-bootstrap.factor" run-file
+            "vocab:bootstrap/finish-bootstrap.factor" run-file
         ] if
 
         "output-image" get save-image-and-exit
@@ -104,6 +104,6 @@ SYMBOL: bootstrap-time
     drop
     [
         load-help? off
-        "resource:basis/bootstrap/bootstrap-error.factor" run-file
+        "vocab:bootstrap/bootstrap-error.factor" run-file
     ] with-scope
 ] recover
index fd9bab48355246db6ba547a21f7bab6f4a763429..cf6517b664739cb052ef723481ba0228bb5f5630 100644 (file)
@@ -6,5 +6,5 @@ IN: bootstrap.ppc
 : c-area-size ( -- n ) 10 bootstrap-cells ;
 : lr-save ( -- n ) bootstrap-cell ;
 
-<< "resource:basis/cpu/ppc/bootstrap.factor" parse-file parsed >>
+<< "vocab:cpu/ppc/bootstrap.factor" parse-file parsed >>
 call
index f2ddc42688cdc7d667ec942471e312709781c2ff..0c383c2fb08f77c04665d7f7ccac9c4374a4687f 100644 (file)
@@ -6,5 +6,5 @@ IN: bootstrap.ppc
 : c-area-size ( -- n ) 14 bootstrap-cells ;
 : lr-save ( -- n ) 2 bootstrap-cells ;
 
-<< "resource:basis/cpu/ppc/bootstrap.factor" parse-file parsed >>
+<< "vocab:cpu/ppc/bootstrap.factor" parse-file parsed >>
 call
index f29dec128ca8e82463dbfe2d04d5fbf0a68a47b3..5d88f699b8ab2270829c853f41b022a614cdb8ce 100644 (file)
@@ -30,5 +30,5 @@ IN: bootstrap.x86
     (JMP) drop
 ] rc-relative rt-primitive 1 jit-primitive jit-define
 
-<< "resource:basis/cpu/x86/bootstrap.factor" parse-file parsed >>
+<< "vocab:cpu/x86/bootstrap.factor" parse-file parsed >>
 call
index efa3de3065a681933ab059358f3903f59d5075e7..ddf5791009bceab67485523b644f7dfe8694af1d 100644 (file)
@@ -30,5 +30,5 @@ IN: bootstrap.x86
     temp1 JMP                                   ! go
 ] rc-absolute-cell rt-primitive 1 rex-length + jit-primitive jit-define
 
-<< "resource:basis/cpu/x86/bootstrap.factor" parse-file parsed >>
+<< "vocab:cpu/x86/bootstrap.factor" parse-file parsed >>
 call
index 20a953b6d509969fd0cf424fc3dc1832d501aac7..e48a20a9de9fc7a834381c439a19bd7abf0fbbda 100644 (file)
@@ -7,5 +7,5 @@ IN: bootstrap.x86
 : stack-frame-size ( -- n ) 4 bootstrap-cells ;
 : arg ( -- reg ) RDI ;
 
-<< "resource:basis/cpu/x86/64/bootstrap.factor" parse-file parsed >>
+<< "vocab:cpu/x86/64/bootstrap.factor" parse-file parsed >>
 call
index 3accca400f84f97108e5648be2ea30d6b41fa8f2..ff15ef27afc48bb096334f31c915af4bf3f040d5 100644 (file)
@@ -7,5 +7,5 @@ IN: bootstrap.x86
 : stack-frame-size ( -- n ) 8 bootstrap-cells ;
 : arg ( -- reg ) RCX ;
 
-<< "resource:basis/cpu/x86/64/bootstrap.factor" parse-file parsed >>
+<< "vocab:cpu/x86/64/bootstrap.factor" parse-file parsed >>
 call
index cccf320e4437ac3b787865c7eeefcb44ecd647c0..f8d06064f0e37af31caeeb64c126e8e4260abe1e 100644 (file)
@@ -54,7 +54,7 @@ M: f topic>filename* drop \ f topic>filename* ;
 M: topic url-of topic>filename ;
 
 : help-stylesheet ( -- string )
-    "resource:basis/help/html/stylesheet.css" ascii file-contents
+    "vocab:help/html/stylesheet.css" ascii file-contents
     [XML <style><-></style> XML] ;
 
 : help>html ( topic -- xml )
index 4e454dcee408862efd3d765be144947bb2029a3f..86f86a8468e8b62bd4c88b312de78b842497a8c9 100644 (file)
@@ -10,7 +10,7 @@ IN: html.templates.chloe.tests
     "?>" split1 nip ; inline
 
 : test-template ( name -- template )
-    "resource:basis/html/templates/chloe/test/"
+    "vocab:html/templates/chloe/test/"
     prepend <chloe> ;
 
 [ "Hello world" ] [
index 6cebb55688127bf5c1c68d73a934fc8df49535b1..55cf90c2dd18744b7d14ab413a42aed82bb26157 100644 (file)
@@ -4,7 +4,7 @@ tools.test sequences parser splitting prettyprint ;
 IN: html.templates.fhtml.tests
 
 : test-template ( path -- ? )
-    "resource:basis/html/templates/fhtml/test/"
+    "vocab:html/templates/fhtml/test/"
     prepend
     [ ".fhtml" append <fhtml> [ call-template ] with-string-writer ]
     [ ".html" append utf8 file-contents ] bi
index 4f685945aab391365085126ffe528e4748c8cb7b..229d05615ece724efdc3256e626cd2f7cd2c121f 100644 (file)
@@ -213,7 +213,7 @@ test-db [
     <dispatcher>
         add-quit-action
         <dispatcher>
-            "resource:basis/http/test" <static> >>default
+            "vocab:http/test" <static> >>default
         "nested" add-responder
         <action>
             [ URL" redirect-loop" <temporary-redirect> ] >>display
@@ -226,7 +226,7 @@ test-db [
     >url clone "port" get >>port ;
 
 [ t ] [
-    "resource:basis/http/test/foo.html" ascii file-contents
+    "vocab:http/test/foo.html" ascii file-contents
     "http://localhost/nested/foo.html" add-port http-get nip =
 ] unit-test
 
index 102c13c2955aa07e6e8e3661e7d8bed6a519445a..e250d81ae5843ac0a9ebe4784cf0ff304d751d40 100644 (file)
@@ -3,16 +3,16 @@ io.files io.files.unique kernel tools.test ;
 IN: images.bitmap.tests
 
 : test-bitmap24 ( -- path )
-    "resource:basis/images/test-images/thiswayup24.bmp" ;
+    "vocab:images/test-images/thiswayup24.bmp" ;
 
 : test-bitmap8 ( -- path )
-    "resource:basis/images/test-images/rgb8bit.bmp" ;
+    "vocab:images/test-images/rgb8bit.bmp" ;
 
 : test-bitmap4 ( -- path )
-    "resource:basis/images/test-images/rgb4bit.bmp" ;
+    "vocab:images/test-images/rgb4bit.bmp" ;
 
 : test-bitmap1 ( -- path )
-    "resource:basis/images/test-images/1bit.bmp" ;
+    "vocab:images/test-images/1bit.bmp" ;
 
 [ t ]
 [
index a11edeb703d43fe9a671041eb646d31364cf0b08..b3519a79906b73f143174f26cc8862a70d96f330 100644 (file)
@@ -33,7 +33,7 @@ IN: io.encodings.8-bit
 } ;
 
 : encoding-file ( file-name -- stream )
-    "resource:basis/io/encodings/8-bit/" swap ".TXT"
+    "vocab:io/encodings/8-bit/" swap ".TXT"
     3append ascii <file-reader> ;
 
 : process-contents ( lines -- assoc )
index b0013b6e08fecc585761bad8a2a9bfb4b8fd5e63..1d6ef52d8d46e984544f4ffc104ec9c6bdf7cf43 100644 (file)
@@ -80,7 +80,7 @@ VALUE: gb>u
 VALUE: u>gb
 VALUE: mapping
 
-"resource:basis/io/encodings/chinese/gb-18030-2000.xml"
+"vocab:io/encodings/chinese/gb-18030-2000.xml"
 ascii <file-reader> xml>gb-data
 [ ranges-u>gb to: u>gb ] [ ranges-gb>u to: gb>u ] bi
 >biassoc to: mapping
index 6afae924292620cf3fb746931cf3193d1323de98..07b0429696ec18da6c44e2cf3cb28d919d0e0665 100644 (file)
@@ -44,7 +44,7 @@ ERROR: missing-name encoding ;
 
 PRIVATE>
 
-"resource:basis/io/encodings/iana/character-sets"
+"vocab:io/encodings/iana/character-sets"
 utf8 <file-reader> make-aliases aliases set-global
 
 n>e-table [ initial-n>e ] initialize
index 194ade377b244b827237ea739285e5f1ac0f8762..8f38f597ca8097085b9c7e1ee347fbafb4b94541 100644 (file)
@@ -44,10 +44,10 @@ TUPLE: jis assoc ;
 : make-jis ( filename -- jis )
     ascii file-lines process-jis <jis> ;
 
-"resource:basis/io/encodings/japanese/CP932.txt"
+"vocab:io/encodings/japanese/CP932.txt"
 make-jis to: windows-31j-table
 
-"resource:basis/io/encodings/japanese/sjis-0208-1997-std.txt"
+"vocab:io/encodings/japanese/sjis-0208-1997-std.txt"
 make-jis to: shift-jis-table
 
 : small? ( char -- ? )
index 557bba52d267c66b71fb86a05cdfcfbccf1b4aee..b5af1301688b9e1e97b5c87facefe3e8520166b9 100644 (file)
@@ -5,8 +5,8 @@ USING: accessors kernel io.sockets io.sockets.secure tools.test ;
 
 [ ] [
     <secure-config>
-        "resource:basis/openssl/test/server.pem" >>key-file
-        "resource:basis/openssl/test/dh1024.pem" >>dh-file
+        "vocab:openssl/test/server.pem" >>key-file
+        "vocab:openssl/test/dh1024.pem" >>dh-file
         "password" >>password
     [ ] with-secure-context
 ] unit-test
index c4a1475f4871b5c76cada33ddfafc1b18cb078ff..bff2dbaf1a22d4e3765ef3f7760200efb6fd749e 100644 (file)
@@ -26,7 +26,7 @@ ephemeral-key-bits ;
     secure-config new
         SSLv23 >>method
         1024 >>ephemeral-key-bits
-        "resource:basis/openssl/cacert.pem" >>ca-file
+        "vocab:openssl/cacert.pem" >>ca-file
         t >>verify ;
 
 TUPLE: secure-context config handle disposed ;
index d32cdee2ed7e9fc8a865ee80dccca0c1968cca50..10df82ae7bf28ee8b4ad186219fae9a56eb61d98 100644 (file)
@@ -5,7 +5,7 @@ IN: io.sockets.secure.unix.debug
 
 : with-test-context ( quot -- )
     <secure-config>
-        "resource:basis/openssl/test/server.pem" >>key-file
-        "resource:basis/openssl/test/dh1024.pem" >>dh-file
+        "vocab:openssl/test/server.pem" >>key-file
+        "vocab:openssl/test/dh1024.pem" >>dh-file
         "password" >>password
     swap with-secure-context ; inline
index ac5233c543292b16e764aa966ed2622bc5ba2e11..5693aa9162c451e9678bab641928a133a468aff9 100644 (file)
@@ -5,7 +5,7 @@ splitting kernel namespaces fry memoize ;
 IN: mime.types
 
 MEMO: mime-db ( -- seq )
-    "resource:basis/mime/types/mime.types" ascii file-lines
+    "vocab:mime/types/mime.types" ascii file-lines
     [ "#" head? not ] filter [ " \t" split harvest ] map harvest ;
 
 : nonstandard-mime-types ( -- assoc )
index 93af70b3e082b57497500d8539fc04189e9821ad..aaae521a62b74502f3feedf9abd6fdedaeb2330e 100644 (file)
@@ -4,17 +4,17 @@ openssl namespaces accessors tools.test continuations kernel ;
 openssl secure-socket-backend [
     [ ] [
         <secure-config>
-            "resource:basis/openssl/test/server.pem" >>key-file
-            "resource:basis/openssl/test/root.pem" >>ca-file
-            "resource:basis/openssl/test/dh1024.pem" >>dh-file
+            "vocab:openssl/test/server.pem" >>key-file
+            "vocab:openssl/test/root.pem" >>ca-file
+            "vocab:openssl/test/dh1024.pem" >>dh-file
             "password" >>password
         [ ] with-secure-context
     ] unit-test
 
     [
         <secure-config>
-            "resource:basis/openssl/test/server.pem" >>key-file
-            "resource:basis/openssl/test/root.pem" >>ca-file
+            "vocab:openssl/test/server.pem" >>key-file
+            "vocab:openssl/test/root.pem" >>ca-file
             "wrong password" >>password
         [ ] with-secure-context
     ] must-fail
index 72bf5c0bb5adcbf46bf3356e939c868ef2b14324..4403541608af786b488d99642a5380a7a6951c8e 100644 (file)
@@ -57,8 +57,8 @@ io.files io.encodings.utf8 ;
 [ "mate" ] [ "mate" step5 "" like ] unit-test
 
 [ { } ] [
-    "resource:basis/porter-stemmer/test/voc.txt" utf8 file-lines
+    "vocab:porter-stemmer/test/voc.txt" utf8 file-lines
     [ stem ] map
-    "resource:basis/porter-stemmer/test/output.txt" utf8 file-lines
+    "vocab:porter-stemmer/test/output.txt" utf8 file-lines
     [ 2array ] 2map [ first2 = not ] filter
 ] unit-test
index 8cfdc9e1d54ddfa2e22ce867e486d28a703e5b64..616ce2723a6a2d23767730a90a15de805da7cd3d 100644 (file)
@@ -25,7 +25,7 @@ IN: syndication.tests
             f
         }
     }
-} ] [ "resource:basis/syndication/test/rss1.xml" load-news-file ] unit-test
+} ] [ "vocab:syndication/test/rss1.xml" load-news-file ] unit-test
 [ T{
     feed
     f
@@ -42,5 +42,5 @@ IN: syndication.tests
             T{ timestamp f 2003 12 13 8 29 29 T{ duration f 0 0 0 -4 0 0 } }
         }
     }
-} ] [ "resource:basis/syndication/test/atom.xml" load-news-file ] unit-test
-[ ] [ "resource:basis/syndication/test/atom.xml" load-news-file feed>xml xml>string drop ] unit-test
+} ] [ "vocab:syndication/test/atom.xml" load-news-file ] unit-test
+[ ] [ "vocab:syndication/test/atom.xml" load-news-file feed>xml xml>string drop ] unit-test
index 3d09802576bb68f3e566f4cc97826c3eb6c06815..d4f2fea2e5c97229f1cf1198ab71c55e46243f90 100755 (executable)
@@ -7,7 +7,7 @@ GENERIC: foo
 
 M: integer foo + ;
 
-"resource:basis/tools/crossref/test/foo.factor" run-file
+"vocab:tools/crossref/test/foo.factor" run-file
 
 [ t ] [ integer \ foo method \ + usage member? ] unit-test
 [ t ] [ \ foo usage [ pathname? ] any? ] unit-test
index 8b36947f439921ba0bebaa26220f95406290a2ca..600b1d8d55108bcde1d6ee38c7c03d45fb871577 100644 (file)
@@ -65,7 +65,7 @@ M: quit-responder call-responder*
 [ ] [\r
     <dispatcher>\r
         add-quot-responder\r
-        "resource:basis/http/test" <static> >>default\r
+        "vocab:http/test" <static> >>default\r
 \r
     test-httpd\r
 ] unit-test\r
index c894a8931b6462628113305de8a1a137f3de6e32..0a0aa82c52cb937b064ffcbd38efc8633ca9dc31 100755 (executable)
@@ -42,21 +42,21 @@ IN: tools.deploy.shaker
 : strip-debugger ( -- )
     strip-debugger? "debugger" vocab and [
         "Stripping debugger" show
-        "resource:basis/tools/deploy/shaker/strip-debugger.factor"
+        "vocab:tools/deploy/shaker/strip-debugger.factor"
         run-file
     ] when ;
 
 : strip-libc ( -- )
     "libc" vocab [
         "Stripping manual memory management debug code" show
-        "resource:basis/tools/deploy/shaker/strip-libc.factor"
+        "vocab:tools/deploy/shaker/strip-libc.factor"
         run-file
     ] when ;
 
 : strip-cocoa ( -- )
     "cocoa" vocab [
         "Stripping unused Cocoa methods" show
-        "resource:basis/tools/deploy/shaker/strip-cocoa.factor"
+        "vocab:tools/deploy/shaker/strip-cocoa.factor"
         run-file
     ] when ;
 
@@ -380,7 +380,7 @@ SYMBOL: deploy-vocab
             dup next-method-quot "next-method-quot" set-word-prop
         ] assoc-each
     ] each
-    "resource:basis/tools/deploy/shaker/next-methods.factor" run-file ;
+    "vocab:tools/deploy/shaker/next-methods.factor" run-file ;
 
 : strip ( -- )
     init-stripper
index fe380e0afe6cbcf7cb56fc24ff736553ab1b65cf..6167a5be233fe5a42884d8d667c9be52563e1e45 100644 (file)
@@ -241,6 +241,12 @@ M: vocab-link summary vocab-summary ;
         swap [ "." glue ] with map\r
     ] unless-empty ;\r
 \r
+: vocab-dir? ( root name -- ? )\r
+    over\r
+    [ ".factor" vocab-dir+ append-path exists? ]\r
+    [ 2drop f ]\r
+    if ;\r
+\r
 : vocabs-in-dir ( root name -- )\r
     dupd (all-child-vocabs) [\r
         2dup vocab-dir? [ dup >vocab-link , ] when\r
index b91cb2b26cc3f39b2e9bfb617ccdc0b749deb9c8..d8e220cf1816903c568ad057922fa934c8b59b06 100644 (file)
@@ -10,10 +10,10 @@ IN: unicode.breaks.tests
         dup last-grapheme head last-grapheme ] unit-test
 
 : grapheme-break-test ( -- filename )
-    "resource:basis/unicode/breaks/GraphemeBreakTest.txt" ;
+    "vocab:unicode/breaks/GraphemeBreakTest.txt" ;
 
 : word-break-test ( -- filename )
-    "resource:basis/unicode/breaks/WordBreakTest.txt" ;
+    "vocab:unicode/breaks/WordBreakTest.txt" ;
 
 : parse-test-file ( file-name -- tests )
     utf8 file-lines
index 6bcf8b50ccda03bdf9cadec546cdabee8e2cda51..2f8daef8b216a4eb4a35fefa0f295ac41b4cc0ba 100644 (file)
@@ -127,7 +127,7 @@ to: grapheme-table
 
 VALUE: word-break-table
 
-"resource:basis/unicode/data/WordBreakProperty.txt" load-script
+"vocab:unicode/data/WordBreakProperty.txt" load-script
 to: word-break-table
 
 C-ENUM: wOther wCR wLF wNewline wExtend wFormat wKatakana wALetter wMidLetter
index d3d0b8199d5f3b1eee0757b6c17d98f4e24fa47c..f53a1382ae0591f95be8742472468ef8a1c00b74 100644 (file)
@@ -4,7 +4,7 @@ tools.test assocs words ;
 IN: unicode.collation.tests\r
 \r
 : parse-test ( -- strings )\r
-    "resource:basis/unicode/collation/CollationTest_SHIFTED.txt"\r
+    "vocab:unicode/collation/CollationTest_SHIFTED.txt"\r
     utf8 file-lines 5 tail\r
     [ ";" split1 drop " " split [ hex> ] "" map-as ] map ;\r
 \r
index a8bd788e2a4c042c1e2ab32f90c21a0306a38a87..78727b16e24eb2aa9049e50914a316f91b13a217 100755 (executable)
@@ -28,7 +28,7 @@ TUPLE: weight primary secondary tertiary ignorable? ;
     lines filter-comments\r
     [ parse-line ] H{ } map>assoc ;\r
 \r
-"resource:basis/unicode/collation/allkeys.txt"\r
+"vocab:unicode/collation/allkeys.txt"\r
 ascii <file-reader> parse-ducet to: ducet\r
 \r
 ! Fix up table for long contractions\r
index 2407b740b01162a5a5305a7957af19b0ea8ead6e..d40024eb1ea8f7eec2f2639de43f009212cb51c3 100644 (file)
@@ -38,7 +38,7 @@ VALUE: properties
     ascii file-lines [ split-; ] map ;
 
 : load-data ( -- data )
-    "resource:basis/unicode/data/UnicodeData.txt" data ;
+    "vocab:unicode/data/UnicodeData.txt" data ;
 
 : filter-comments ( lines -- lines )
     [ "#@" split first ] map harvest ;
@@ -68,7 +68,7 @@ VALUE: properties
     [ " " split [ hex> ] map ] assoc-map ;
 
 : exclusions-file ( -- filename )
-    "resource:basis/unicode/data/CompositionExclusions.txt" ;
+    "vocab:unicode/data/CompositionExclusions.txt" ;
 
 : exclusions ( -- set )
     exclusions-file utf8 file-lines
@@ -147,7 +147,7 @@ C: <code-point> code-point
 
 ! Extra properties
 : properties-lines ( -- lines )
-    "resource:basis/unicode/data/PropList.txt"
+    "vocab:unicode/data/PropList.txt"
     ascii file-lines ;
 
 : parse-properties ( -- {{[a,b],prop}} )
@@ -166,7 +166,7 @@ C: <code-point> code-point
 
 ! Special casing data
 : load-special-casing ( -- special-casing )
-    "resource:basis/unicode/data/SpecialCasing.txt" data
+    "vocab:unicode/data/SpecialCasing.txt" data
     [ length 5 = ] filter
     [ [ set-code-point ] each ] H{ } make-assoc ;
 
index 1242e1d358cca1b0f58b1722934672755fd3ab13..f3ecb96af97dc72c1d17fd4f96b9dd22d3531a38 100644 (file)
@@ -23,7 +23,7 @@ IN: unicode.normalize.tests
 [ "\u00d55c" ] [ "\u001112\u001161\u0011ab" nfc ] unit-test
 
 : parse-test ( -- tests )
-    "resource:basis/unicode/normalize/NormalizationTest.txt"
+    "vocab:unicode/normalize/NormalizationTest.txt"
     utf8 file-lines filter-comments
     [ ";" split 5 head [ " " split [ hex> ] "" map-as ] map ] map ;
 
index aaa6767685f17bcaeaac02563f1c19f30b6c506e..383f9e3de3ca4c225325af461283327d29e1f888 100644 (file)
@@ -9,7 +9,7 @@ IN: unicode.script
 
 VALUE: script-table
 
-"resource:basis/unicode/script/Scripts.txt" load-script
+"vocab:unicode/script/Scripts.txt" load-script
 to: script-table
 
 : script-of ( char -- script )
index f1e52319f198ff88d5cf599813ebea661fd50f34..04c0b66063f311d8745b3f0b18823d178817c06d 100644 (file)
@@ -11,7 +11,7 @@ VALUE: html-entities
 
 : get-html ( -- table )
     { "lat1" "special" "symbol" } [
-        "resource:basis/xml/entities/html/xhtml-"
+        "vocab:xml/entities/html/xhtml-"
         swap ".ent" 3append read-entities-file
     ] map first3 assoc-union assoc-union ;
 
index aec3e40a52d1799e558b64140b2c17705106d91c..2f1d73f9ca8087840b2cc3640dc985bbc9c2fabf 100644 (file)
@@ -1,15 +1,15 @@
 USING: xml xml.data xml.traversal tools.test accessors kernel
 io.encodings.8-bit ;
 
-[ "\u000131" ] [ "resource:basis/xml/tests/latin5.xml" file>xml children>string ] unit-test
-[ "\u0000e9" ] [ "resource:basis/xml/tests/latin1.xml" file>xml children>string ] unit-test
-[ "\u0000e9" ] [ "resource:basis/xml/tests/spaces.xml" file>xml children>string ] unit-test
-[ "\u0000e9" ] [ "resource:basis/xml/tests/utf8.xml" file>xml children>string ] unit-test
-[ "\u0000e9" ] [ "resource:basis/xml/tests/utf16.xml" file>xml children>string ] unit-test
-[ "\u0000e9" ] [ "resource:basis/xml/tests/utf16be.xml" file>xml children>string ] unit-test
-[ "\u0000e9" ] [ "resource:basis/xml/tests/utf16le.xml" file>xml children>string ] unit-test
-[ "\u0000e9" ] [ "resource:basis/xml/tests/utf16be-bom.xml" file>xml children>string ] unit-test
-[ "\u0000e9" ] [ "resource:basis/xml/tests/utf16le-bom.xml" file>xml children>string ] unit-test
-[ "\u0000e9" ] [ "resource:basis/xml/tests/prologless.xml" file>xml children>string ] unit-test
-[ "e" ] [ "resource:basis/xml/tests/ascii.xml" file>xml children>string ] unit-test
-[ "\u0000e9" "x" ] [ "resource:basis/xml/tests/unitag.xml" file>xml [ name>> main>> ] [ children>string ] bi ] unit-test
+[ "\u000131" ] [ "vocab:xml/tests/latin5.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "vocab:xml/tests/latin1.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "vocab:xml/tests/spaces.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "vocab:xml/tests/utf8.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "vocab:xml/tests/utf16.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "vocab:xml/tests/utf16be.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "vocab:xml/tests/utf16le.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "vocab:xml/tests/utf16be-bom.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "vocab:xml/tests/utf16le-bom.xml" file>xml children>string ] unit-test
+[ "\u0000e9" ] [ "vocab:xml/tests/prologless.xml" file>xml children>string ] unit-test
+[ "e" ] [ "vocab:xml/tests/ascii.xml" file>xml children>string ] unit-test
+[ "\u0000e9" "x" ] [ "vocab:xml/tests/unitag.xml" file>xml [ name>> main>> ] [ children>string ] bi ] unit-test
index 1160af62bc191158c1f06acb4a04ef0ca06207d1..e9a38ae96b1ec5580efaeb9b3751fe8f0648f527 100644 (file)
@@ -4,6 +4,6 @@ IN: xml.tests
 USING: xml xml.writer io.files io.encodings.utf8 tools.test kernel ;
 
 [ t ] [
-    "resource:basis/xml/tests/funny-dtd.xml" utf8 file-contents string>xml
+    "vocab:xml/tests/funny-dtd.xml" utf8 file-contents string>xml
     dup xml>string string>xml =
 ] unit-test
index 3d1ac2379e0fd18446a0e5e8b349991593267739..464002b0605ffa3192091be8abfb03ff7f6063de 100644 (file)
@@ -10,6 +10,6 @@ IN: xml.tests
     [ assemble-data ] map ;
 
 [ "http://www.foxnews.com/oreilly/" ] [
-    "resource:basis/xml/tests/soap.xml" file>xml
+    "vocab:xml/tests/soap.xml" file>xml
     parse-result first first
 ] unit-test
index 03721327368bb15d31336a1fd2afa050ffae722f..818a28c892896584e9385da9083fd6e524b06d7d 100644 (file)
@@ -13,11 +13,11 @@ sequences.deep accessors io.streams.string ;
 
 SYMBOL: xml-file
 [ ] [
-    "resource:basis/xml/tests/test.xml"
+    "vocab:xml/tests/test.xml"
     [ file>xml ] with-html-entities xml-file set
 ] unit-test
 [ t ] [
-    "resource:basis/xml/tests/test.xml" binary file-contents
+    "vocab:xml/tests/test.xml" binary file-contents
     [ bytes>xml ] with-html-entities xml-file get =
 ] unit-test
 [ "1.0" ] [ xml-file get prolog>> version>> ] unit-test
index 80472fc788806cb5d5a371eac309cba95653e091..2ab9ff98dd7b8ff0e2abbdeca263c0df9d703544 100644 (file)
@@ -17,7 +17,7 @@ TUPLE: xml-test id uri sections description type ;
 : parse-tests ( xml -- tests )
     "TEST" tags-named [ >xml-test ] map ;
 
-: base "resource:basis/xml/tests/xmltest/" ;
+: base "vocab:xml/tests/xmltest/" ;
 
 MACRO: drop-output ( quot -- newquot )
     dup infer out>> '[ @ _ ndrop ] ;
index 4408655d9c9db144c590ebab366e1337af8af79c..ae223bf82f8d6b3a17ce89eea920e23ed4be9222 100644 (file)
@@ -4,5 +4,5 @@ USING: xml xml.data kernel tools.test ;
 IN: xml.tests
 
 [ t ] [
-    "resource:basis/xmode/xmode.dtd" file>dtd dtd?
+    "vocab:xmode/xmode.dtd" file>dtd dtd?
 ] unit-test
index 23fb7a50749870709603ca0ad7d53c745cf72496..f2802abbe0ae7f49394f85b5b5bf90df26fb6b5f 100644 (file)
@@ -61,7 +61,7 @@ IN: xml.writer.tests
 [ "<foo>         bar            </foo>" string>xml pprint-xml>string ] unit-test
 [ "<foo'>" ] [ "<foo'>" <unescaped> xml>string ] unit-test
 
-: test-file "resource:basis/xml/writer/test.xml" ;
+: test-file "vocab:xml/writer/test.xml" ;
 
 [ ] [ "<?xml version='1.0' encoding='UTF-16BE'?><x/>" string>xml test-file utf8 [ write-xml ] with-file-writer ] unit-test
 [ "x" ] [ test-file file>xml body>> name>> main>> ] unit-test
index 4e3af0af5613998deb548a265993a7f86881521c..47186d2090c754c587cc04618b1654b2fe28777c 100644 (file)
@@ -25,7 +25,7 @@ TAGS>
     ] keep ;
 
 MEMO: modes ( -- modes )
-    "resource:basis/xmode/modes/catalog"
+    "vocab:xmode/modes/catalog"
     file>xml parse-modes-tag ;
 
 MEMO: mode-names ( -- modes )
@@ -37,7 +37,7 @@ MEMO: mode-names ( -- modes )
 MEMO: (load-mode) ( name -- rule-sets )
     modes at [
         file>>
-        "resource:basis/xmode/modes/" prepend
+        "vocab:xmode/modes/" prepend
         utf8 <file-reader> parse-mode
     ] [
         "text" (load-mode)
index 45238ca2b18bcf1e0688b52f21c88f9b1211873a..1339430cf8d06a036660b0dafca66e0e7732a407 100644 (file)
@@ -47,6 +47,6 @@ TAGS>
         "PUBLIC"
     }
 ] [
-    "resource:basis/xmode/utilities/test.xml"
+    "vocab:xmode/utilities/test.xml"
     file>xml parse-company-tag
 ] unit-test
index f1e8b8b65e14d662eb5a1e02d75d1b12da5ddd5c..ceeab571b848a38b41a0c9eeff051e076c44ea21 100644 (file)
@@ -16,9 +16,9 @@ crossref off
 
 H{ } clone sub-primitives set
 
-"resource:core/bootstrap/syntax.factor" parse-file
+"vocab:bootstrap/syntax.factor" parse-file
 
-"resource:basis/cpu/" architecture get {
+"vocab:cpu/" architecture get {
     { "x86.32" "x86/32" }
     { "winnt-x86.64" "x86/64/winnt" }
     { "unix-x86.64" "x86/64/unix" }
@@ -27,7 +27,7 @@ H{ } clone sub-primitives set
     { "arm" "arm" }
 } at "/bootstrap.factor" 3append parse-file
 
-"resource:core/bootstrap/layouts/layouts.factor" parse-file
+"vocab:bootstrap/layouts/layouts.factor" parse-file
 
 ! Now we have ( syntax-quot arch-quot layouts-quot ) on the stack
 
index 9a40796bda48600dd80497d6a691bf5c080a9f8e..1da2dfee59c36bd363479685456c124c0f40a35e 100644 (file)
@@ -9,7 +9,7 @@ IN: bootstrap.stage1
 
 "Bootstrap stage 1..." print flush
 
-"resource:core/bootstrap/primitives.factor" run-file
+"vocab:bootstrap/primitives.factor" run-file
 
 load-help? off
 { "resource:core" } vocab-roots set
@@ -40,7 +40,7 @@ load-help? off
     "bootstrap.layouts" require
 
     [
-        "resource:basis/bootstrap/stage2.factor"
+        "vocab:bootstrap/stage2.factor"
         dup exists? [
             run-file
         ] [
index ea74490858d6bbe61ed612c543127bdf0a0fd0a0..cb066dd3a5247003787a3ccb6322395b65692222 100644 (file)
@@ -4,7 +4,7 @@ namespaces accessors io.encodings ;
 IN: io.streams.encodings.tests
 
 [ { } ]
-[ "resource:core/io/test/empty-file.txt" ascii <file-reader> lines ]
+[ "vocab:io/test/empty-file.txt" ascii <file-reader> lines ]
 unit-test
 
 : lines-test ( stream -- line1 line2 )
@@ -14,7 +14,7 @@ unit-test
     "This is a line."
     "This is another line."
 ] [
-    "resource:core/io/test/windows-eol.txt"
+    "vocab:io/test/windows-eol.txt"
     ascii <file-reader> lines-test
 ] unit-test
 
@@ -22,7 +22,7 @@ unit-test
     "This is a line."
     "This is another line."
 ] [
-    "resource:core/io/test/mac-os-eol.txt"
+    "vocab:io/test/mac-os-eol.txt"
     ascii <file-reader> lines-test
 ] unit-test
 
@@ -30,7 +30,7 @@ unit-test
     "This is a line."
     "This is another line."
 ] [
-    "resource:core/io/test/unix-eol.txt"
+    "vocab:io/test/unix-eol.txt"
     ascii <file-reader> lines-test
 ] unit-test
 
index 152d1bb85d228b65953df779f182979ed72693a1..c49fcb7aea819ad23dce1cd7abc64c12fd4ab5bf 100644 (file)
@@ -14,14 +14,14 @@ IN: io.files.tests
 [
     "This is a line.\rThis is another line.\r"
 ] [
-    "resource:core/io/test/mac-os-eol.txt" latin1 <file-reader>
+    "vocab:io/test/mac-os-eol.txt" latin1 <file-reader>
     [ 500 read ] with-input-stream
 ] unit-test
 
 [
     255
 ] [
-    "resource:core/io/test/binary.txt" latin1 <file-reader>
+    "vocab:io/test/binary.txt" latin1 <file-reader>
     [ read1 ] with-input-stream >fixnum
 ] unit-test
 
index cf6b935215bc1493b20167f76a0cacd44a0bc1ab..f0cbd33114db657fdb6310686546e77cf8c3a41f 100644 (file)
@@ -2,7 +2,7 @@ USING: io parser tools.test words ;
 IN: io.tests
 
 [ f ] [
-    "resource:core/io/test/no-trailing-eol.factor" run-file
+    "vocab:io/test/no-trailing-eol.factor" run-file
     "foo" "io.tests" lookup
 ] unit-test
 
index 1673e730830ba3d30596d14afe8b764540f93e1a..96ac87282611248a0125d9d9c1308f5598c83d0a 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2004, 2008 Slava Pestov, Doug Coleman.
+! Copyright (C) 2004, 2009 Slava Pestov, Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors combinators io.backend kernel math math.order
 namespaces sequences splitting strings system ;
@@ -71,10 +71,17 @@ PRIVATE>
         [ f ]
     } cond ;
 
+: special-path? ( path -- rest ? )
+    {
+        { [ "resource:" ?head ] [ t ] }
+        { [ "vocab:" ?head ] [ t ] }
+        [ f ]
+    } cond ;
+
 : absolute-path? ( path -- ? )
     {
         { [ dup empty? ] [ f ] }
-        { [ dup "resource:" head? ] [ t ] }
+        { [ dup special-path? nip ] [ t ] }
         { [ os windows? ] [ windows-absolute-path? ] }
         { [ dup first path-separator? ] [ t ] }
         [ f ]
@@ -107,7 +114,7 @@ PRIVATE>
     dup root-directory? [
         trim-tail-separators
         dup last-path-separator [ 1+ tail ] [
-            drop "resource:" ?head [ file-name ] when
+            drop special-path? [ file-name ] when
         ] if
     ] unless ;
 
@@ -117,6 +124,8 @@ PRIVATE>
 : resource-path ( path -- newpath )
     "resource-path" get prepend-path ;
 
+GENERIC: vocab-path ( path -- newpath )
+
 GENERIC: (normalize-path) ( path -- path' )
 
 M: string (normalize-path)
@@ -124,7 +133,12 @@ M: string (normalize-path)
         trim-head-separators resource-path
         (normalize-path)
     ] [
-        current-directory get prepend-path
+        "vocab:" ?head [
+            trim-head-separators vocab-path
+            (normalize-path)
+        ] [
+            current-directory get prepend-path
+        ] if
     ] if ;
 
 M: object normalize-path ( path -- path' )
index 2870be9a4f5a798337b34448c3e644f8ce66fe46..3fcf48941340b62a3231d214e86c980ae99cdde9 100644 (file)
@@ -402,7 +402,7 @@ IN: parser.tests
     [ t ] [ "foo" "parser.tests" lookup symbol? ] unit-test
 ] times
 
-[ "resource:core/parser/test/assert-depth.factor" run-file ]
+[ "vocab:parser/test/assert-depth.factor" run-file ]
 [ got>> { 1 2 3 } sequence= ]
 must-fail-with
 
index 48e8737fd25f0edbddfbec2e051d86c3347da400..00c4df92a63ab88e07a07c9cc24a60920691cb89 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2007, 2008 Eduardo Cavazos, Slava Pestov.
+! Copyright (C) 2007, 2009 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: namespaces make sequences io io.files io.pathnames kernel
 assocs words vocabs definitions parser continuations hashtables
@@ -18,33 +18,33 @@ V{
 : add-vocab-root ( root -- )
     vocab-roots get adjoin ;
 
-: vocab-dir ( vocab -- dir )
-    vocab-name { { CHAR: . CHAR: / } } substitute ;
-
-: vocab-dir+ ( vocab str/f -- path )
-    [ vocab-name "." split ] dip
-    [ [ dup peek ] dip append suffix ] when*
-    "/" join ;
-
-: vocab-dir? ( root name -- ? )
-    over
-    [ ".factor" vocab-dir+ append-path exists? ]
-    [ 2drop f ]
-    if ;
-
 SYMBOL: root-cache
 
-H{ } clone root-cache set-global
+root-cache [ H{ } clone ] initialize
+
+ERROR: not-found-in-roots path ;
 
 <PRIVATE
 
-: (find-vocab-root) ( name -- path/f )
-    vocab-roots get swap [ vocab-dir? ] curry find nip ;
+: find-root-for ( path -- path/f )
+    vocab-roots get [ prepend-path exists? ] with find nip ;
+
+M: string vocab-path ( string -- path/f )
+    dup find-root-for [ prepend-path ] [ not-found-in-roots ] if* ;
 
 PRIVATE>
 
+: vocab-dir ( vocab -- dir )
+    vocab-name { { CHAR: . CHAR: / } } substitute ;
+
+: vocab-dir+ ( vocab str/f -- path )
+    [ vocab-name "." split ] dip
+    [ [ dup peek ] dip append suffix ] when*
+    "/" join ;
+
 : find-vocab-root ( vocab -- path/f )
-    vocab-name dup root-cache get at [ ] [ (find-vocab-root) ] ?if ;
+    vocab-name dup root-cache get at
+    [ ] [ ".factor" vocab-dir+ find-root-for ] ?if ;
 
 : vocab-append-path ( vocab path -- newpath )
     swap find-vocab-root dup [ prepend-path ] [ 2drop f ] if ;
@@ -104,14 +104,14 @@ SYMBOL: blacklist
 : add-to-blacklist ( error vocab -- )
     vocab-name blacklist get dup [ set-at ] [ 3drop ] if ;
 
-GENERIC: (load-vocab) ( name -- )
+GENERIC: (load-vocab) ( name -- vocab )
 
 M: vocab (load-vocab)
     [
         dup source-loaded?>> +parsing+ eq? [
             dup source-loaded?>> [ dup load-source ] unless
             dup docs-loaded?>> [ dup load-docs ] unless
-        ] unless drop
+        ] unless
     ] [ [ swap add-to-blacklist ] keep rethrow ] recover ;
 
 M: vocab-link (load-vocab)
@@ -120,22 +120,15 @@ M: vocab-link (load-vocab)
 M: string (load-vocab)
     create-vocab (load-vocab) ;
 
-[
-    [
-        dup vocab-name blacklist get at* [ rethrow ] [
-            drop dup find-vocab-root
-            [ [ (load-vocab) ] with-compiler-errors ]
-            [ dup vocab [ drop ] [ no-vocab ] if ]
-            if
-        ] if
-    ] with-compiler-errors
-] load-vocab-hook set-global
-
 PRIVATE>
 
-: vocab-where ( vocab -- loc )
-    vocab-source-path dup [ 1 2array ] when ;
-
-M: vocab where vocab-where ;
+[
+    dup vocab-name blacklist get at* [ rethrow ] [
+        drop dup find-vocab-root
+        [ [ (load-vocab) ] with-compiler-errors ]
+        [ dup vocab [ ] [ no-vocab ] ?if ]
+        if
+    ] if
+] load-vocab-hook set-global
 
-M: vocab-link where vocab-where ;
+M: vocab-spec where vocab-source-path dup [ 1 2array ] when ;
index fb9ce5467239a21e5d2672832bfc176e63846ce0..977eac2b35950846616337b3e498324813484a50 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2007, 2008 Eduardo Cavazos, Slava Pestov.
+! Copyright (C) 2007, 2009 Eduardo Cavazos, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors assocs strings kernel sorting namespaces
 sequences definitions ;
@@ -21,18 +21,26 @@ SYMBOL: +done+
         swap >>name
         H{ } clone >>words ;
 
-GENERIC: vocab-name ( vocab-spec -- name )
+TUPLE: vocab-link name ;
 
-GENERIC: vocab ( vocab-spec -- vocab )
+C: <vocab-link> vocab-link
 
-M: vocab vocab ;
+UNION: vocab-spec vocab vocab-link ;
 
-M: object vocab ( name -- vocab ) vocab-name dictionary get at ;
+GENERIC: vocab-name ( vocab-spec -- name )
 
 M: vocab vocab-name name>> ;
 
+M: vocab-link vocab-name name>> ;
+
 M: string vocab-name ;
 
+GENERIC: vocab ( vocab-spec -- vocab )
+
+M: vocab vocab ;
+
+M: object vocab ( name -- vocab ) vocab-name dictionary get at ;
+
 GENERIC: vocab-words ( vocab-spec -- words )
 
 M: vocab vocab-words words>> ;
@@ -62,11 +70,6 @@ M: f vocab-main ;
 
 ERROR: no-vocab name ;
 
-SYMBOL: load-vocab-hook ! ( name -- )
-
-: load-vocab ( name -- vocab )
-    dup load-vocab-hook get call vocab ;
-
 : vocabs ( -- seq )
     dictionary get keys natural-sort ;
 
@@ -88,17 +91,6 @@ SYMBOL: load-vocab-hook ! ( name -- )
 : child-vocabs ( vocab -- seq )
     vocab-name vocabs [ child-vocab? ] with filter ;
 
-TUPLE: vocab-link name ;
-
-: <vocab-link> ( name -- vocab-link )
-    vocab-link boa ;
-
-M: vocab-link hashcode* name>> hashcode* ;
-
-M: vocab-link vocab-name name>> ;
-
-UNION: vocab-spec vocab vocab-link ;
-
 GENERIC: >vocab-link ( name -- vocab )
 
 M: vocab-spec >vocab-link ;
@@ -110,3 +102,7 @@ M: string >vocab-link dup vocab [ ] [ <vocab-link> ] ?if ;
     vocab-name dictionary get delete-at ;
 
 M: vocab-spec forget* forget-vocab ;
+
+SYMBOL: load-vocab-hook ! ( name -- vocab )
+
+: load-vocab ( name -- vocab ) load-vocab-hook get call ;
\ No newline at end of file
index 2fea4eb1f198062a23bf50dc5c995f7fa002e0df..03d1585574bc5b23165c313d181d8a03547177f6 100755 (executable)
@@ -3,7 +3,7 @@ IN: benchmark.crc32
 
 : crc32-file ( -- )
     10 [
-        "resource:basis/mime/multipart/multipart-tests.factor"
+        "vocab:mime/multipart/multipart-tests.factor"
         crc32 checksum-file drop
     ] times ;
 
index 24578ec677a799c8760155ddb921967ed50de0c7..5030cb69041bcc6a8a6db58386c5d590448fe6b2 100644 (file)
@@ -2,6 +2,6 @@ USING: checksums checksums.md5 io.files kernel ;
 IN: benchmark.md5
 
 : md5-file ( -- )
-    "resource:basis/mime/multipart/multipart-tests.factor" md5 checksum-file drop ;
+    "vocab:mime/multipart/multipart-tests.factor" md5 checksum-file drop ;
 
 MAIN: md5-file
index 585368e836b2190d68d9d4feea5d48dfb386e7a6..8e19ba9a8fd8e2d8c26f93eab19db4ed5fa00b31 100644 (file)
@@ -2,6 +2,6 @@ USING: checksums checksums.sha1 io.files kernel ;
 IN: benchmark.sha1
 
 : sha1-file ( -- )
-    "resource:basis/mime/multipart/multipart-tests.factor" sha1 checksum-file drop ;
+    "vocab:mime/multipart/multipart-tests.factor" sha1 checksum-file drop ;
 
 MAIN: sha1-file
index a32a98a13308e0d2a0aa0f30ba47026e562c379f..5f8955b97c7a847e8eace917e81758d0a4e89237 100644 (file)
@@ -5,7 +5,7 @@ sequences xml ;
 IN: benchmark.xml
 
 : xml-benchmark ( -- )
-    "resource:basis/xmode/modes/" [
+    "vocab:xmode/modes/" [
         [ utf8 <file-reader> read-xml drop ] each
     ] with-directory-files ;
 
index 6ef60c198facbf1bee8e72e5fa410b71c02b76ce..4f6edee03121130a3b005961bb76f47727e73c7a 100755 (executable)
@@ -143,8 +143,8 @@ io.sockets.secure ;
 : <todo-secure-config> ( -- config )
     ! This is only suitable for testing!
     <secure-config>
-        "resource:basis/openssl/test/dh1024.pem" >>dh-file
-        "resource:basis/openssl/test/server.pem" >>key-file
+        "vocab:openssl/test/dh1024.pem" >>dh-file
+        "vocab:openssl/test/server.pem" >>key-file
         "password" >>password ;
 
 : <todo-app> ( -- responder )
index 35a1129338f4f6714b476aa47f3fb35248be997d..d7b132d4f23502660b148a2bb8a839cf9463e64f 100644 (file)
@@ -69,8 +69,8 @@ SYMBOL: dh-file
     init-factor-db ;
 
 : init-testing ( -- )
-    "resource:basis/openssl/test/dh1024.pem" dh-file set-global
-    "resource:basis/openssl/test/server.pem" key-file set-global
+    "vocab:openssl/test/dh1024.pem" dh-file set-global
+    "vocab:openssl/test/server.pem" key-file set-global
     "password" key-password set-global
     common-configuration
     <factor-website>