diff --git a/core/checksums/checksums.factor b/core/checksums/checksums.factor index 849d7821dd..08a13297d1 100644 --- a/core/checksums/checksums.factor +++ b/core/checksums/checksums.factor @@ -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 ; -: checksum-file ( path checksum -- n ) +: checksum-file ( path checksum -- value ) >r binary r> checksum-stream ; : hex-string ( seq -- str ) diff --git a/extra/benchmark/sha1/sha1.factor b/extra/benchmark/sha1/sha1.factor index c43f780135..d5ff5673c2 100644 --- a/extra/benchmark/sha1/sha1.factor +++ b/extra/benchmark/sha1/sha1.factor @@ -1,4 +1,4 @@ -USING: checksum checksums.sha1 io.files kernel ; +USING: checksums checksums.sha1 io.files kernel ; IN: benchmark.sha1 : sha1-primes-list ( -- ) diff --git a/extra/crypto/hmac/hmac.factor b/extra/crypto/hmac/hmac.factor index 9770a3a266..fe77aa8969 100755 --- a/extra/crypto/hmac/hmac.factor +++ b/extra/crypto/hmac/hmac.factor @@ -1,19 +1,19 @@ 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.encodings.binary ; IN: crypto.hmac : sha1-hmac ( Ko Ki -- hmac ) initialize-sha1 process-sha1-block - (stream>sha1) get-sha1 + stream>sha1 get-sha1 initialize-sha1 >r process-sha1-block r> process-sha1-block get-sha1 ; : md5-hmac ( Ko Ki -- hmac ) initialize-md5 process-md5-block - (stream>md5) get-md5 + stream>md5 get-md5 initialize-md5 >r process-md5-block r> process-md5-block get-md5 ; diff --git a/extra/farkup/farkup.factor b/extra/farkup/farkup.factor index 1b8e698758..15b7b4b72c 100755 --- a/extra/farkup/farkup.factor +++ b/extra/farkup/farkup.factor @@ -64,8 +64,10 @@ MEMO: eq ( -- parser ) ] with-string-writer ; : check-url ( href -- href' ) - dup { "http://" "https://" "ftp://" } [ head? ] with contains? - [ drop "/" ] unless ; + CHAR: : over member? [ + dup { "http://" "https://" "ftp://" } [ head? ] with contains? + [ drop "/" ] unless + ] when ; : escape-link ( href text -- href-esc text-esc ) >r check-url escape-quoted-string r> escape-string ; diff --git a/extra/io/encodings/iana/iana-docs.factor b/extra/io/encodings/iana/iana-docs.factor index 3542012a85..d4a7a65797 100644 --- a/extra/io/encodings/iana/iana-docs.factor +++ b/extra/io/encodings/iana/iana-docs.factor @@ -2,7 +2,7 @@ USING: help.syntax help.markup ; IN: io.encodings.iana 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)." } ; HELP: encoding>name diff --git a/extra/io/encodings/iana/iana.factor b/extra/io/encodings/iana/iana.factor index 301b027637..24badaf683 100644 --- a/extra/io/encodings/iana/iana.factor +++ b/extra/io/encodings/iana/iana.factor @@ -27,10 +27,10 @@ VALUE: n>e-table } ; PRIVATE> -: name>encoding ( string -- encoding ) +: name>encoding ( name -- encoding ) n>e-table at ; -: encoding>name ( encoding -- string ) +: encoding>name ( encoding -- name ) e>n-table at ; swap - [ file-http-date "last-modified" set-header ] + [ "last-modified" set-header ] [ '[ ,