]> gitweb.factorcode.org Git - factor.git/commitdiff
removed <filebr>, <filebw>, renamed <filecr> to <file-reader>, <filecw> to <file...
authorSlava Pestov <slava@factorcode.org>
Sat, 29 Jan 2005 05:07:56 +0000 (05:07 +0000)
committerSlava Pestov <slava@factorcode.org>
Sat, 29 Jan 2005 05:07:56 +0000 (05:07 +0000)
TODO.FACTOR.txt
library/bootstrap/image.factor
library/hashtables.factor
library/httpd/file-responder.factor
library/httpd/httpd.factor
library/io/logging.factor
library/io/stream-impl.factor
library/syntax/parse-stream.factor
library/tools/jedit.factor

index 3ec887c84fe6d219907a72a45aa2f3a557b6ae77..9dca8e1508b069f0c644b7dcdc8fe7dab5145543 100644 (file)
 - nicer way to combine two paths\r
 - add a socket timeout\r
 - rename f* words to stream-*\r
-- <file[bc][rw]> is badly named -- <file-reader>, <file-writer>\r
 \r
 + kernel:\r
 \r
 - ppc register decls\r
 - cat, reverse-cat primitives\r
-- first-class hashtables\r
 \r
 + misc:\r
 \r
@@ -63,6 +61,7 @@
 - browser responder for word links in HTTPd\r
 - worddef props\r
 - prettyprint: when unparse called due to recursion, write a link\r
+- vectors: ensure its ok with bignum indices\r
 \r
 + httpd:\r
 \r
index 2594c13fc9af101d2ce1fe934f9958992269f963..b5337eb04fceda82b1fbc041cf465ff8969ac8ab 100644 (file)
@@ -352,16 +352,15 @@ M: hashtable ' ( hashtable -- pointer )
     ] ifte ;
 
 : write-image ( image file -- )
-    <filebw> [ [ write-word ] vector-each ] with-stream ;
+    <file-writer> [ [ write-word ] vector-each ] with-stream ;
 
 : with-minimal-image ( quot -- image )
     [
         300000 <vector> image set
-        521 <hashtable> "objects" set
+        <namespace> "objects" set
         ! Note that this is a vector that we can side-effect,
         ! since ; ends up using this variable from nested
         ! parser namespaces.
-        1000 <vector> "word-fixups" set
         call
         image get
     ] with-scope ;
index 73a31e081a4de5dba9b52199c5fb19543b3d35e0..fb3162dd426fd458ca35f3e657bcfe7e293f0dfb 100644 (file)
@@ -106,7 +106,7 @@ IN: hashtables
 
 : grow-hash ( hash -- )
     #! A good way to earn a living.
-    dup hash-size 3 * 2 /i <array> swap set-hash-array ;
+    dup hash-size 2 * <array> swap set-hash-array ;
 
 : (hash>alist) ( alist n hash -- alist )
     2dup bucket-count >= [
index ea4d8c45b36f953879150d571600226ddd7a3419..61231fd17fe2bfeb4067ddfaea6ca3b295fe9bb4 100644 (file)
@@ -54,7 +54,7 @@ USE: unparser
     over file-length file-response  "method" get "head" = [
         drop
     ] [
-        <filebr> stdio get fcopy
+        <file-reader> stdio get fcopy
     ] ifte ;
 
 : serve-file ( filename -- )
index a55fcdff08ad2ff6797d2abe6110220a61f99cbf..2d597f79fe66c1621ec324755bb6e30870f334aa 100644 (file)
@@ -41,7 +41,7 @@ USE: url-encoding
 : httpd-log-stream ( -- stream )
     #! Set httpd-log-file to save httpd log to a file.
     "httpd-log-file" get dup [
-        <filecr>
+        <file-reader>
     ] [
         drop stdio get
     ] ifte ;
index 07b97e50c3b4a7264db998d69c604a82f23d8385..4627bc6a53a849a7d794cb437574bb756c63aa27 100644 (file)
@@ -51,4 +51,4 @@ USE: unparser
     [ stdio get "log" set call ] with-scope ;
 
 : with-log-file ( file quot -- )
-    [ swap <filecr> "log" set call ] with-scope ;
+    [ swap <file-reader> "log" set call ] with-scope ;
index bd756b11c61953c3cf2622fa25e041a8b12a446f..a69eb54885d771ca0c813ab2083bad10d9ab0156 100644 (file)
@@ -64,18 +64,12 @@ M: fd-stream fclose ( -- )
 C: fd-stream ( in out -- stream )
     [ "out" set "in" set ] extend ;
 
-: <filecr> ( path -- stream )
+: <file-reader> ( path -- stream )
     t f open-file <fd-stream> ;
 
-: <filecw> ( path -- stream )
+: <file-writer> ( path -- stream )
     f t open-file <fd-stream> ;
 
-: <filebr> ( path -- stream )
-    <filecr> ;
-
-: <filebw> ( path -- stream )
-    <filecw> ;
-
 : init-stdio ( -- )
     stdin stdout <fd-stream> <stdio-stream> stdio set ;
 
@@ -94,4 +88,4 @@ C: fd-stream ( in out -- stream )
     "resource-path" get [ "." ] unless* ;
 
 : <resource-stream> ( path -- stream )
-    resource-path swap cat2 <filecr> ;
+    resource-path swap cat2 <file-reader> ;
index 2c84fa87d92ad4bac9792bcb40bf7d7f80ee4a23..61411844723aae081fcc8a17e5c19e35250b80fb 100644 (file)
@@ -75,7 +75,7 @@ USE: strings
     [ file-vocabs (parse-stream) ] with-scope ;
 
 : parse-file ( file -- quot )
-    dup <filecr> parse-stream ;
+    dup <file-reader> parse-stream ;
 
 : run-file ( file -- )
     #! Run a file. The file is read with the default IN:/USE:
@@ -83,7 +83,7 @@ USE: strings
     parse-file call ;
 
 : (parse-file) ( file -- quot )
-    dup <filecr> (parse-stream) ;
+    dup <file-reader> (parse-stream) ;
 
 : (run-file) ( file -- )
     #! Run a file. The file is read with the same IN:/USE: as
index 39ee372a61a022e7437e6b22c0dc8f9f746c79dd..5d30a9105b57585e965c75597bf60ad2cd1e98b7 100644 (file)
@@ -41,7 +41,7 @@ USE: words
     [ "~" get "/.jedit/server" cat2 ] unless* ;
 
 : jedit-server-info ( -- port auth )
-    jedit-server-file <filecr> [
+    jedit-server-file <file-reader> [
         read drop
         read parse-number
         read parse-number