From f9ea61bf916be9c3cd7efa6cda508a9c7b033f66 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sat, 23 Mar 2013 12:08:18 -0700 Subject: [PATCH] basis/extra: Update last usages of to . --- basis/checksums/internet/internet.factor | 2 +- basis/checksums/md5/md5.factor | 2 +- basis/checksums/sha/sha.factor | 4 ++-- basis/compiler/tree/cleanup/cleanup-tests.factor | 2 +- basis/endian/endian.factor | 2 +- basis/images/loader/gtk/gtk.factor | 2 +- basis/interval-sets/interval-sets.factor | 2 +- basis/io/mmap/mmap-docs.factor | 2 +- basis/tools/hexdump/hexdump.factor | 2 +- extra/alien/data/map/map.factor | 2 +- extra/benchmark/dispatch2/dispatch2.factor | 2 +- extra/benchmark/dispatch3/dispatch3.factor | 2 +- extra/gpu/demos/bunny/bunny.factor | 2 +- extra/images/bitmap/bitmap.factor | 6 +++--- extra/images/png/png.factor | 4 ++-- extra/images/tiff/tiff.factor | 10 +++++----- 16 files changed, 24 insertions(+), 24 deletions(-) diff --git a/basis/checksums/internet/internet.factor b/basis/checksums/internet/internet.factor index 254d46d0ab..5d3b24b3e0 100644 --- a/basis/checksums/internet/internet.factor +++ b/basis/checksums/internet/internet.factor @@ -10,7 +10,7 @@ SINGLETON: internet ! RFC 1071 INSTANCE: internet checksum M: internet checksum-bytes - drop 0 swap 2 [ le> + ] each + drop 0 swap 2 [ le> + ] each [ -16 shift ] [ 0xffff bitand ] bi + [ -16 shift ] keep + bitnot 2 >le ; diff --git a/basis/checksums/md5/md5.factor b/basis/checksums/md5/md5.factor index 6a0d553ec1..3f813dd387 100644 --- a/basis/checksums/md5/md5.factor +++ b/basis/checksums/md5/md5.factor @@ -177,7 +177,7 @@ HINTS: (process-md5-block-I) { uint-array md5-state } ; : byte-array>le ( byte-array -- byte-array ) little-endian? [ - dup 4 [ + dup 4 [ [ [ 1 2 ] dip exchange-unsafe ] [ [ 0 3 ] dip exchange-unsafe ] bi ] each diff --git a/basis/checksums/sha/sha.factor b/basis/checksums/sha/sha.factor index c71cd864f2..fc4e96aee7 100644 --- a/basis/checksums/sha/sha.factor +++ b/basis/checksums/sha/sha.factor @@ -290,7 +290,7 @@ GENERIC: pad-initial-bytes ( string sha2 -- padded-string ) [ w+ a ] dip set-nth-unsafe ; inline : prepare-message-schedule ( seq sha2 -- w-seq ) - [ word-size>> [ be> ] map ] + [ word-size>> [ be> ] map ] [ block-size>> [ 0 pad-tail 16 ] keep [a,b) over '[ _ prepare-M-256 ] each @@ -352,7 +352,7 @@ M: sha-256 checksum-stream ( stream checksum -- byte-array ) } 2cleave set-nth-unsafe ; : prepare-sha1-message-schedule ( seq -- w-seq ) - 4 [ be> ] map + 4 [ be> ] map 80 0 pad-tail 16 80 [a,b) over '[ _ sha1-W ] each ; inline diff --git a/basis/compiler/tree/cleanup/cleanup-tests.factor b/basis/compiler/tree/cleanup/cleanup-tests.factor index 8e3609c838..f81f5a0937 100644 --- a/basis/compiler/tree/cleanup/cleanup-tests.factor +++ b/basis/compiler/tree/cleanup/cleanup-tests.factor @@ -483,7 +483,7 @@ cell-bits 32 = [ ] unit-test [ t ] [ - [ { array } declare 2 [ . . ] assoc-each ] + [ { array } declare 2 [ . . ] assoc-each ] \ nth-unsafe inlined? ] unit-test diff --git a/basis/endian/endian.factor b/basis/endian/endian.factor index 4f59f71f3a..4dd5ecf407 100644 --- a/basis/endian/endian.factor +++ b/basis/endian/endian.factor @@ -67,7 +67,7 @@ M: little-endian unsigned-endian> le> ; native-endianness get-global dup endianness get = [ 2drop ] [ - [ [ ] keep ] dip + [ [ ] keep ] dip little-endian = [ '[ be> _ >le ] map ] [ diff --git a/basis/images/loader/gtk/gtk.factor b/basis/images/loader/gtk/gtk.factor index 69ec5f8974..9d99076e7d 100644 --- a/basis/images/loader/gtk/gtk.factor +++ b/basis/images/loader/gtk/gtk.factor @@ -39,7 +39,7 @@ os linux? [ [ pixels h rowstride * memory>byte-array ] [ pixels rowstride h * uchar - rowstride + rowstride [ bytes-per-row head-slice ] map concat ] if ] ; diff --git a/basis/interval-sets/interval-sets.factor b/basis/interval-sets/interval-sets.factor index b06f33a413..4fdcfc3634 100644 --- a/basis/interval-sets/interval-sets.factor +++ b/basis/interval-sets/interval-sets.factor @@ -15,7 +15,7 @@ ALIAS: start first-unsafe ALIAS: end second-unsafe : find-interval ( key interval-set -- slice ) - array>> 2 + array>> 2 [ start <=> ] with search nip ; inline ERROR: not-an-interval-set obj ; diff --git a/basis/io/mmap/mmap-docs.factor b/basis/io/mmap/mmap-docs.factor index 9afc5286f5..49d44616bf 100644 --- a/basis/io/mmap/mmap-docs.factor +++ b/basis/io/mmap/mmap-docs.factor @@ -80,7 +80,7 @@ ARTICLE: "io.mmap.examples" "Memory-mapped file examples" "SPECIALIZED-ARRAY: char" "" "\"mydata.dat\" char [" - " 4 " + " 4 " " [ reverse! drop ] each" "] with-mapped-array" } diff --git a/basis/tools/hexdump/hexdump.factor b/basis/tools/hexdump/hexdump.factor index f8a8bb96aa..4d178a47b5 100644 --- a/basis/tools/hexdump/hexdump.factor +++ b/basis/tools/hexdump/hexdump.factor @@ -30,7 +30,7 @@ IN: tools.hexdump : hexdump-bytes ( bytes -- ) [ length write-header ] - [ 16 [ write-hex-line ] each-index ] bi ; + [ 16 [ write-hex-line ] each-index ] bi ; PRIVATE> diff --git a/extra/alien/data/map/map.factor b/extra/alien/data/map/map.factor index 6c93e8f4b6..43b4d258d2 100644 --- a/extra/alien/data/map/map.factor +++ b/extra/alien/data/map/map.factor @@ -51,7 +51,7 @@ INSTANCE: data-map-param immutable-sequence ] ; : [>object-param] ( class count -- quot ) - nip '[ _ ] ; + nip '[ _ ] ; : [>param] ( type -- quot ) c-type-count over c-type-name? diff --git a/extra/benchmark/dispatch2/dispatch2.factor b/extra/benchmark/dispatch2/dispatch2.factor index dc58172747..c57fbdb998 100644 --- a/extra/benchmark/dispatch2/dispatch2.factor +++ b/extra/benchmark/dispatch2/dispatch2.factor @@ -14,7 +14,7 @@ IN: benchmark.dispatch2 double-array{ 1.0 2.0 3.0 } , "hello world" 4 tail-slice , 10 f , - 100 iota 2 , + 100 iota 2 , "hello" , { { 1 2 } { 3 4 } } 0 , ?{ t f t } , diff --git a/extra/benchmark/dispatch3/dispatch3.factor b/extra/benchmark/dispatch3/dispatch3.factor index 895d487a58..a1d58474b8 100644 --- a/extra/benchmark/dispatch3/dispatch3.factor +++ b/extra/benchmark/dispatch3/dispatch3.factor @@ -30,7 +30,7 @@ M: object g drop "object" ; double-array{ 1.0 2.0 3.0 } , "hello world" 4 tail-slice , 10 f , - 100 2 , + 100 2 , "hello" , f , { { 1 2 } { 3 4 } } 0 , diff --git a/extra/gpu/demos/bunny/bunny.factor b/extra/gpu/demos/bunny/bunny.factor index 331885bdb9..03ab1dc565 100644 --- a/extra/gpu/demos/bunny/bunny.factor +++ b/extra/gpu/demos/bunny/bunny.factor @@ -124,7 +124,7 @@ UNIFORM-TUPLE: loading-uniforms a b c [ vertexes nth [ n v+ ] change-normal drop ] tri@ ; inline : calc-bunny-normals ( vertexes indexes -- ) - 3 swap + 3 swap [ [ first3 ] dip calc-bunny-normal ] curry each ; inline : normalize-bunny-normals ( vertexes -- ) diff --git a/extra/images/bitmap/bitmap.factor b/extra/images/bitmap/bitmap.factor index f637dca987..fd5df488c8 100644 --- a/extra/images/bitmap/bitmap.factor +++ b/extra/images/bitmap/bitmap.factor @@ -213,7 +213,7 @@ M: object parse-color-data* ( loading-bitmap header -- loading-bitmap ) [ nip ] [ drop color-index-length ] if read >>color-index ; : alpha-used? ( loading-bitmap -- ? ) - color-index>> 4 [ fourth 0 = ] all? not ; + color-index>> 4 [ fourth 0 = ] all? not ; GENERIC: bitmap>component-order* ( loading-bitmap header -- object ) @@ -240,12 +240,12 @@ GENERIC: bitmap>component-order* ( loading-bitmap header -- object ) : color-lookup3 ( loading-bitmap -- seq ) [ color-index>> >array ] - [ color-palette>> 3 ] bi + [ color-palette>> 3 ] bi '[ _ nth ] map concat ; : color-lookup4 ( loading-bitmap -- seq ) [ color-index>> >array ] - [ color-palette>> 4 [ 3 head-slice ] map ] bi + [ color-palette>> 4 [ 3 head-slice ] map ] bi '[ _ nth ] map concat ; ! os2v1 is 3bytes each, all others are 3 + 1 unused diff --git a/extra/images/png/png.factor b/extra/images/png/png.factor index ac60820878..f39285ad38 100644 --- a/extra/images/png/png.factor +++ b/extra/images/png/png.factor @@ -215,7 +215,7 @@ ERROR: bad-filter n ; loading-png width>> :> width loading-png bit-depth>> :> bit-depth loading-png png-components-per-pixel :> #bytes! - width height * f width :> image + width height * f width :> image bit-depth 16 = [ #bytes 2 * #bytes! @@ -228,7 +228,7 @@ ERROR: bad-filter n ; [ pass 7 < ] [ ba loading-png pass read-adam7-subimage - #bytes + #bytes pass starting-row nth row! pass starting-col nth col! diff --git a/extra/images/tiff/tiff.factor b/extra/images/tiff/tiff.factor index 2a6e184a3b..bdba422fd8 100755 --- a/extra/images/tiff/tiff.factor +++ b/extra/images/tiff/tiff.factor @@ -321,13 +321,13 @@ ERROR: bad-small-ifd-type n ; { { 1 [ ] } ! blank { 2 [ ] } ! read c strings here - { 3 [ 2 [ endian> ] map ] } - { 4 [ 4 [ endian> ] map ] } - { 5 [ 8 [ "II" unpack first2 / ] map ] } + { 3 [ 2 [ endian> ] map ] } + { 4 [ 4 [ endian> ] map ] } + { 5 [ 8 [ "II" unpack first2 / ] map ] } { 6 [ [ 8 >signed ] map ] } { 7 [ ] } ! blank - { 8 [ 2 [ endian> 16 >signed ] map ] } - { 9 [ 4 [ endian> 32 >signed ] map ] } + { 8 [ 2 [ endian> 16 >signed ] map ] } + { 9 [ 4 [ endian> 32 >signed ] map ] } { 10 [ 8 group [ "ii" unpack first2 / ] map ] } { 11 [ 4 group [ "f" unpack ] map ] } { 12 [ 8 group [ "d" unpack ] map ] }