From f586f5913a38a3d25beacc510080de59a9f1d3b3 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 25 Sep 2005 06:15:29 +0000 Subject: [PATCH] ifte -> if --- contrib/aim/aim.factor | 6 +++--- contrib/aim/net-bytes.factor | 20 ++++++-------------- contrib/crypto/sha1.factor | 2 +- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/contrib/aim/aim.factor b/contrib/aim/aim.factor index e839ef6f3d..458b4230d6 100644 --- a/contrib/aim/aim.factor +++ b/contrib/aim/aim.factor @@ -153,7 +153,7 @@ SYMBOL: message head-short head-short head-string [ { - { [ dup 1 = ] [ drop name get write head-short HEX: 20 bitand [ " is away." ] [ " is online." ] ifte writeln ] } + { [ dup 1 = ] [ drop name get write head-short HEX: 20 bitand [ " is away." ] [ " is online." ] if writeln ] } { [ dup 2 = ] [ drop ] } { [ dup 3 = ] [ drop name get write " went online at " write head-short unparse writeln ] } { [ dup 4 = ] [ drop name get write head-short " has been idle for " writeln ] } @@ -367,11 +367,11 @@ SYMBOL: message execute opcode get swap hash dup [ execute ] [ unhandled-opcode drop - ] ifte + ] if ] [ unhandled-family-opcode drop - ] ifte + ] if unscoped-stream get empty? [ incomplete-opcode ] unless ] with-unscoped-stream ; diff --git a/contrib/aim/net-bytes.factor b/contrib/aim/net-bytes.factor index 6e65559f7d..48c2b1cdf0 100644 --- a/contrib/aim/net-bytes.factor +++ b/contrib/aim/net-bytes.factor @@ -40,28 +40,20 @@ SYMBOL: unscoped-stack unscoped-stack get dup length 1 > [ [ pop ] keep nip peek unscoped-stream set ] [ pop drop - ] ifte ; + ] if ; : with-unscoped-stream ( stream quot -- ) save-current-scope catch set-previous-scope [ dup [ unscoped-stream get stream-close ] when rethrow ] when ; - ! dup [ unscoped-stream get stream-close - ! ] [ - ! unscoped-stream get contents dup empty? [ - ! drop - ! ] [ "Remainder of stream: " writeln hexdump - ! ] ifte - ! ] ifte - : close-unscoped-stream ( -- ) unscoped-stream get stream-close ; : >endian ( obj n -- str ) - big-endian get [ >be ] [ >le ] ifte ; + big-endian get [ >be ] [ >le ] if ; : endian> ( obj n -- str ) - big-endian get [ be> ] [ le> ] ifte ; + big-endian get [ be> ] [ le> ] if ; : >byte ( byte -- str ) unit >string ; @@ -122,9 +114,9 @@ SYMBOL: unscoped-stack [ ! partial line [ 2dup swap nth (print-hex-digit) " " write ] repeat dup length 16 swap - [ " " write ] repeat - ] ifte + ] if dup length - [ 2dup swap nth dup printable? [ write1 ] [ "." write drop ] ifte ] repeat + [ 2dup swap nth dup printable? [ write1 ] [ "." write drop ] if ] repeat terpri drop ; : (num-full-lines) ( bytes -- ) @@ -138,7 +130,7 @@ SYMBOL: unscoped-stack : (print-bytes) ( bytes -- ) dup (num-full-lines) [ over (get-slice) (print-hex-line) ] repeat - dup (num-full-lines) over (get-last-slice) dup empty? [ 3drop ] [ (print-hex-line) 2drop ] ifte ; + dup (num-full-lines) over (get-last-slice) dup empty? [ 3drop ] [ (print-hex-line) 2drop ] if ; : (print-length) ( len -- ) [ diff --git a/contrib/crypto/sha1.factor b/contrib/crypto/sha1.factor index d01a15d7d5..a08a2f6ff4 100644 --- a/contrib/crypto/sha1.factor +++ b/contrib/crypto/sha1.factor @@ -81,7 +81,7 @@ SYMBOL: K [ nth-int-be w get push ] 2keep ] [ dup sha1-W w get push - ] ifte + ] if ] repeat ; : init-letters ( -- )