Bug fixes

Slava Pestov 2008-09-18 22:08:12 -05:00
parent 1b875b8bf7
commit 4ce3cc4141
3 changed files with 13 additions and 10 deletions

View File

@ -13,4 +13,4 @@ IN: bootstrap.random
[ [
[ 32 random-bits ] with-system-random [ 32 random-bits ] with-system-random
<mersenne-twister> random-generator set-global <mersenne-twister> random-generator set-global
] "generator.random" add-init-hook ] "bootstrap.random" add-init-hook

View File

@ -1,9 +1,10 @@
! Copyright (C) 2004, 2008 Slava Pestov, Daniel Ehrenberg. ! Copyright (C) 2004, 2008 Slava Pestov, Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: io.backend io.files.private io hashtables kernel math USING: io.backend io.files.private io hashtables kernel
memory namespaces sequences strings assocs arrays definitions kernel.private math memory namespaces sequences strings assocs
system combinators splitting sbufs continuations destructors arrays definitions system combinators splitting sbufs
io.encodings io.encodings.binary init accessors math.order ; continuations destructors io.encodings io.encodings.binary init
accessors math.order ;
IN: io.files IN: io.files
HOOK: (file-reader) io-backend ( path -- stream ) HOOK: (file-reader) io-backend ( path -- stream )
@ -194,7 +195,9 @@ SYMBOL: current-directory
[ [
cwd current-directory set-global cwd current-directory set-global
image parent-directory cwd prepend-path "resource-path" set-global 13 getenv cwd prepend-path \ image set-global
14 getenv cwd prepend-path \ vm set-global
image parent-directory "resource-path" set-global
] "io.files" add-init-hook ] "io.files" add-init-hook
: resource-path ( path -- newpath ) : resource-path ( path -- newpath )

View File

@ -55,15 +55,15 @@ UNION: unix bsd solaris linux ;
PRIVATE> PRIVATE>
: image ( -- path ) \ image get-global ;
: vm ( -- path ) \ vm get-global ;
[ [
8 getenv string>cpu \ cpu set-global 8 getenv string>cpu \ cpu set-global
9 getenv string>os \ os set-global 9 getenv string>os \ os set-global
] "system" add-init-hook ] "system" add-init-hook
: image ( -- path ) 13 getenv ;
: vm ( -- path ) 14 getenv ;
: embedded? ( -- ? ) 15 getenv ; : embedded? ( -- ? ) 15 getenv ;
: os-envs ( -- assoc ) : os-envs ( -- assoc )