- 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
- 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
] 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 ;
: 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 >= [
over file-length file-response "method" get "head" = [
drop
] [
- <filebr> stdio get fcopy
+ <file-reader> stdio get fcopy
] ifte ;
: serve-file ( filename -- )
: 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 ;
[ 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 ;
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 ;
"resource-path" get [ "." ] unless* ;
: <resource-stream> ( path -- stream )
- resource-path swap cat2 <filecr> ;
+ resource-path swap cat2 <file-reader> ;
[ 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:
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
[ "~" 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