diff --git a/extra/io/sockets/impl/impl.factor b/extra/io/sockets/impl/impl.factor index 5b0790ca2d..498430fdbc 100755 --- a/extra/io/sockets/impl/impl.factor +++ b/extra/io/sockets/impl/impl.factor @@ -90,7 +90,7 @@ M: inet6 parse-sockaddr { [ dup AF_INET = ] [ T{ inet4 } ] } { [ dup AF_INET6 = ] [ T{ inet6 } ] } { [ dup AF_UNIX = ] [ T{ local } ] } - { [ t ] [ f ] } + [ f ] } cond nip ; M: f parse-sockaddr nip ; diff --git a/extra/io/unix/files/files.factor b/extra/io/unix/files/files.factor index 39c18b4601..ed54eb26f3 100755 --- a/extra/io/unix/files/files.factor +++ b/extra/io/unix/files/files.factor @@ -76,16 +76,16 @@ M: unix copy-file ( from to -- ) 2bi ; : stat>type ( stat -- type ) - stat-st_mode { - { [ dup S_ISREG ] [ +regular-file+ ] } - { [ dup S_ISDIR ] [ +directory+ ] } - { [ dup S_ISCHR ] [ +character-device+ ] } - { [ dup S_ISBLK ] [ +block-device+ ] } - { [ dup S_ISFIFO ] [ +fifo+ ] } - { [ dup S_ISLNK ] [ +symbolic-link+ ] } - { [ dup S_ISSOCK ] [ +socket+ ] } - { [ t ] [ +unknown+ ] } - } cond nip ; + stat-st_mode S_IFMT bitand { + { S_IFREG [ +regular-file+ ] } + { S_IFDIR [ +directory+ ] } + { S_IFCHR [ +character-device+ ] } + { S_IFBLK [ +block-device+ ] } + { S_IFIFO [ +fifo+ ] } + { S_IFLNK [ +symbolic-link+ ] } + { S_IFSOCK [ +socket+ ] } + [ drop +unknown+ ] + } case ; : stat>file-info ( stat -- info ) { diff --git a/extra/io/unix/launcher/launcher.factor b/extra/io/unix/launcher/launcher.factor index 82852f6311..2c1e6261c0 100755 --- a/extra/io/unix/launcher/launcher.factor +++ b/extra/io/unix/launcher/launcher.factor @@ -55,7 +55,7 @@ USE: unix { [ pick string? ] [ redirect-file ] } { [ pick +closed+ eq? ] [ redirect-closed ] } { [ pick +inherit+ eq? ] [ redirect-closed ] } - { [ t ] [ redirect-stream ] } + [ redirect-stream ] } cond ; : ?closed dup +closed+ eq? [ drop "/dev/null" ] when ; diff --git a/extra/io/windows/nt/backend/backend.factor b/extra/io/windows/nt/backend/backend.factor index 822973b85b..3c490b780c 100755 --- a/extra/io/windows/nt/backend/backend.factor +++ b/extra/io/windows/nt/backend/backend.factor @@ -39,7 +39,7 @@ M: winnt add-completion ( handle -- ) GetLastError { { [ dup expected-io-error? ] [ 2drop t ] } { [ dup eof? ] [ drop t swap set-port-eof? f ] } - { [ t ] [ (win32-error-string) throw ] } + [ (win32-error-string) throw ] } cond ] [ drop t diff --git a/extra/io/windows/nt/files/files.factor b/extra/io/windows/nt/files/files.factor index 3232ab6ff3..f2615b67de 100755 --- a/extra/io/windows/nt/files/files.factor +++ b/extra/io/windows/nt/files/files.factor @@ -25,7 +25,7 @@ M: winnt root-directory? ( path -- ? ) { [ dup length 2 = ] [ dup second CHAR: : = ] } && nip ] [ t ] } - { [ t ] [ f ] } + [ f ] } cond nip ; ERROR: not-absolute-path ; diff --git a/extra/io/windows/nt/launcher/launcher.factor b/extra/io/windows/nt/launcher/launcher.factor index 97de248d24..f57902608f 100755 --- a/extra/io/windows/nt/launcher/launcher.factor +++ b/extra/io/windows/nt/launcher/launcher.factor @@ -55,7 +55,7 @@ IN: io.windows.nt.launcher { [ pick +inherit+ eq? ] [ redirect-inherit ] } { [ pick +closed+ eq? ] [ redirect-closed ] } { [ pick string? ] [ redirect-file ] } - { [ t ] [ redirect-stream ] } + [ redirect-stream ] } cond ; : default-stdout ( args -- handle ) diff --git a/extra/io/windows/nt/monitors/monitors.factor b/extra/io/windows/nt/monitors/monitors.factor index 164b529b61..87e6280118 100755 --- a/extra/io/windows/nt/monitors/monitors.factor +++ b/extra/io/windows/nt/monitors/monitors.factor @@ -58,13 +58,13 @@ M: winnt ( path recursive? -- monitor ) : parse-action ( action -- changed ) { - { [ dup FILE_ACTION_ADDED = ] [ +add-file+ ] } - { [ dup FILE_ACTION_REMOVED = ] [ +remove-file+ ] } - { [ dup FILE_ACTION_MODIFIED = ] [ +modify-file+ ] } - { [ dup FILE_ACTION_RENAMED_OLD_NAME = ] [ +rename-file+ ] } - { [ dup FILE_ACTION_RENAMED_NEW_NAME = ] [ +rename-file+ ] } - { [ t ] [ +modify-file+ ] } - } cond nip ; + { \ FILE_ACTION_ADDED [ +add-file+ ] } + { \ FILE_ACTION_REMOVED [ +remove-file+ ] } + { \ FILE_ACTION_MODIFIED [ +modify-file+ ] } + { \ FILE_ACTION_RENAMED_OLD_NAME [ +rename-file+ ] } + { \ FILE_ACTION_RENAMED_NEW_NAME [ +rename-file+ ] } + [ drop +modify-file+ ] + } case ; : memory>u16-string ( alien len -- string ) [ memory>byte-array ] keep 2/ c-ushort-array> >string ;