Fixing deployment
parent
ed7af26003
commit
8b956d1efa
|
@ -262,8 +262,8 @@ M: long-long-type box-return ( type -- )
|
|||
r> add*
|
||||
] when ;
|
||||
|
||||
: malloc-file-contents ( path -- alien )
|
||||
binary file-contents malloc-byte-array ;
|
||||
: malloc-file-contents ( path -- alien len )
|
||||
binary file-contents dup malloc-byte-array swap length ;
|
||||
|
||||
[
|
||||
[ alien-cell ]
|
||||
|
|
|
@ -222,10 +222,7 @@ M: pathname <=> [ pathname-string ] compare ;
|
|||
>r <file-reader> r> with-stream ; inline
|
||||
|
||||
: file-contents ( path encoding -- str )
|
||||
dupd [ file-info file-info-size read ] with-file-reader ;
|
||||
|
||||
! : file-contents ( path encoding -- str )
|
||||
! dupd [ file-length read ] with-file-reader ;
|
||||
<file-reader> contents ;
|
||||
|
||||
: with-file-writer ( path encoding quot -- )
|
||||
>r <file-writer> r> with-stream ; inline
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
! Copyright (C) 2003, 2007 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: hashtables generic kernel math namespaces sequences strings
|
||||
continuations assocs io.styles sbufs ;
|
||||
USING: hashtables generic kernel math namespaces sequences
|
||||
continuations assocs io.styles ;
|
||||
IN: io
|
||||
|
||||
GENERIC: stream-readln ( stream -- str )
|
||||
|
@ -88,4 +88,6 @@ SYMBOL: stderr
|
|||
[ [ readln dup ] [ ] [ drop ] unfold ] with-stream ;
|
||||
|
||||
: contents ( stream -- str )
|
||||
2048 <sbuf> [ stream-copy ] keep >string ;
|
||||
[
|
||||
[ 65536 read dup ] [ ] [ drop ] unfold concat f like
|
||||
] with-stream ;
|
||||
|
|
|
@ -13,5 +13,6 @@ USING: vocabs.loader sequences ;
|
|||
"tools.threads"
|
||||
"tools.vocabs"
|
||||
"tools.vocabs.browser"
|
||||
"tools.vocabs.monitor"
|
||||
"editors"
|
||||
} [ require ] each
|
||||
|
|
|
@ -3,5 +3,3 @@ io.unix.launcher io.unix.mmap io.backend
|
|||
combinators namespaces system vocabs.loader sequences ;
|
||||
|
||||
"io.unix." os append require
|
||||
|
||||
"tools.vocabs.monitor" require
|
||||
|
|
|
@ -13,5 +13,3 @@ USE: io.windows.files
|
|||
USE: io.backend
|
||||
|
||||
T{ windows-nt-io } set-io-backend
|
||||
|
||||
"tools.vocabs.monitor" require
|
||||
|
|
|
@ -133,9 +133,10 @@ IN: tools.deploy.shaker
|
|||
strip-io? [ io.backend:io-backend , ] when
|
||||
|
||||
[
|
||||
io.backend:io-backend
|
||||
io.backend:io-backend ,
|
||||
"default-buffer-size" "io.nonblocking" lookup ,
|
||||
] { "alarms" "io" "tools" } strip-vocab-globals %
|
||||
] { } make
|
||||
{ "alarms" "io" "tools" } strip-vocab-globals %
|
||||
|
||||
strip-dictionary? [
|
||||
{ } { "cpu" } strip-vocab-globals %
|
||||
|
@ -193,7 +194,7 @@ IN: tools.deploy.shaker
|
|||
global swap
|
||||
'[ drop , member? not ] assoc-subset
|
||||
[ drop string? not ] assoc-subset ! strip CLI args
|
||||
dup keys .
|
||||
dup keys unparse show
|
||||
21 setenv
|
||||
] [ drop ] if ;
|
||||
|
||||
|
|
|
@ -73,10 +73,7 @@ M: freetype-renderer free-fonts ( world -- )
|
|||
] keep *void* ;
|
||||
|
||||
: open-face ( font style -- face )
|
||||
ttf-name ttf-path
|
||||
dup malloc-file-contents
|
||||
swap file-info file-info-size
|
||||
(open-face) ;
|
||||
ttf-name ttf-path malloc-file-contents (open-face) ;
|
||||
|
||||
SYMBOL: dpi
|
||||
|
||||
|
|
Loading…
Reference in New Issue