Fix problems found by builder

db4
Slava Pestov 2008-05-01 20:02:34 -05:00
parent 1bd8b19ff5
commit a1ea2655ed
7 changed files with 13 additions and 11 deletions

View File

@ -18,7 +18,7 @@ M: checksum checksum-stream >r contents r> checksum-bytes ;
M: checksum checksum-lines >r B{ CHAR: \n } join r> checksum-bytes ; M: checksum checksum-lines >r B{ CHAR: \n } join r> checksum-bytes ;
: checksum-file ( path checksum -- n ) : checksum-file ( path checksum -- value )
>r binary <file-reader> r> checksum-stream ; >r binary <file-reader> r> checksum-stream ;
: hex-string ( seq -- str ) : hex-string ( seq -- str )

View File

@ -1,4 +1,4 @@
USING: checksum checksums.sha1 io.files kernel ; USING: checksums checksums.sha1 io.files kernel ;
IN: benchmark.sha1 IN: benchmark.sha1
: sha1-primes-list ( -- ) : sha1-primes-list ( -- )

View File

@ -1,19 +1,19 @@
USING: arrays combinators crypto.common checksums checksums.md5 USING: arrays combinators crypto.common checksums checksums.md5
checksums.sha1 crypto.md5.private io io.binary io.files checksums.sha1 checksums.md5.private io io.binary io.files
io.streams.byte-array kernel math math.vectors memoize sequences io.streams.byte-array kernel math math.vectors memoize sequences
io.encodings.binary ; io.encodings.binary ;
IN: crypto.hmac IN: crypto.hmac
: sha1-hmac ( Ko Ki -- hmac ) : sha1-hmac ( Ko Ki -- hmac )
initialize-sha1 process-sha1-block initialize-sha1 process-sha1-block
(stream>sha1) get-sha1 stream>sha1 get-sha1
initialize-sha1 initialize-sha1
>r process-sha1-block r> >r process-sha1-block r>
process-sha1-block get-sha1 ; process-sha1-block get-sha1 ;
: md5-hmac ( Ko Ki -- hmac ) : md5-hmac ( Ko Ki -- hmac )
initialize-md5 process-md5-block initialize-md5 process-md5-block
(stream>md5) get-md5 stream>md5 get-md5
initialize-md5 initialize-md5
>r process-md5-block r> >r process-md5-block r>
process-md5-block get-md5 ; process-md5-block get-md5 ;

View File

@ -64,8 +64,10 @@ MEMO: eq ( -- parser )
] with-string-writer ; ] with-string-writer ;
: check-url ( href -- href' ) : check-url ( href -- href' )
dup { "http://" "https://" "ftp://" } [ head? ] with contains? CHAR: : over member? [
[ drop "/" ] unless ; dup { "http://" "https://" "ftp://" } [ head? ] with contains?
[ drop "/" ] unless
] when ;
: escape-link ( href text -- href-esc text-esc ) : escape-link ( href text -- href-esc text-esc )
>r check-url escape-quoted-string r> escape-string ; >r check-url escape-quoted-string r> escape-string ;

View File

@ -2,7 +2,7 @@ USING: help.syntax help.markup ;
IN: io.encodings.iana IN: io.encodings.iana
HELP: name>encoding HELP: name>encoding
{ $values { "string" "an encoding name" } { "encoding" "an encoding descriptor" } } { $values { "name" "an encoding name" } { "encoding" "an encoding descriptor" } }
{ "Given an IANA-registered encoding name, find the encoding descriptor that represents it, or " { $code f } " if it is not found (either not implemented in Factor or not registered)." } ; { "Given an IANA-registered encoding name, find the encoding descriptor that represents it, or " { $code f } " if it is not found (either not implemented in Factor or not registered)." } ;
HELP: encoding>name HELP: encoding>name

View File

@ -27,10 +27,10 @@ VALUE: n>e-table
} ; } ;
PRIVATE> PRIVATE>
: name>encoding ( string -- encoding ) : name>encoding ( name -- encoding )
n>e-table at ; n>e-table at ;
: encoding>name ( encoding -- string ) : encoding>name ( encoding -- name )
e>n-table at ; e>n-table at ;
<PRIVATE <PRIVATE

View File

@ -9,7 +9,7 @@ IN: xmode.code2html.responder
[ [
drop drop
"text/html" <content> swap "text/html" <content> swap
[ file-http-date "last-modified" set-header ] [ "last-modified" set-header ]
[ [
'[ '[
, ,