Fix Windows bootstrap

db4
U-SLAVA-DFB8FF805\Slava 2008-08-27 11:52:46 -05:00
parent 917ff90fa1
commit 5edf8b0cb4
3 changed files with 7 additions and 8 deletions

View File

@ -123,7 +123,7 @@ SYMBOLS: +read-only+ +hidden+ +system+
+not-content-indexed+ +encrypted+ ; +not-content-indexed+ +encrypted+ ;
: win32-file-attribute ( n attr symbol -- n ) : win32-file-attribute ( n attr symbol -- n )
>r dupd mask? [ r> , ] [ r> drop ] if ; >r dupd mask? r> swap [ , ] [ drop ] if ;
: win32-file-attributes ( n -- seq ) : win32-file-attributes ( n -- seq )
[ [

View File

@ -33,11 +33,9 @@ TUPLE: CreateProcess-args
CreateProcess-args >tuple< CreateProcess win32-error=0/f ; CreateProcess-args >tuple< CreateProcess win32-error=0/f ;
: count-trailing-backslashes ( str n -- str n ) : count-trailing-backslashes ( str n -- str n )
>r "\\" ?tail [ >r "\\" ?tail r> swap [
r> 1+ count-trailing-backslashes 1+ count-trailing-backslashes
] [ ] when ;
r>
] if ;
: fix-trailing-backslashes ( str -- str' ) : fix-trailing-backslashes ( str -- str' )
0 count-trailing-backslashes 0 count-trailing-backslashes

View File

@ -1,10 +1,11 @@
! Copyright (C) 2007 Doug Coleman. ! Copyright (C) 2007 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: kernel macros sequences slots words classes.tuple ; USING: kernel macros sequences slots words classes.tuple
quotations combinators ;
IN: classes.tuple.lib IN: classes.tuple.lib
: reader-slots ( seq -- quot ) : reader-slots ( seq -- quot )
[ slot-spec-reader ] map [ get-slots ] curry ; [ slot-spec-reader 1quotation ] map [ cleave ] curry ;
MACRO: >tuple< ( class -- ) MACRO: >tuple< ( class -- )
all-slots rest-slice reader-slots ; all-slots rest-slice reader-slots ;