]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/unix/groups/groups.factor
factor: use ??if instead of ?if-old
[factor.git] / basis / unix / groups / groups.factor
index 2e2318fe378826a45c8681c792c89b5345c74467..a2f01550bc3e7b0cdc2a3ac0e312c0279a26a681 100644 (file)
@@ -48,12 +48,13 @@ M: string group-struct
 PRIVATE>
 
 : group-name ( id -- string )
-    dup group-cache get [
-        ?at [ name>> ] [ number>string ] if
-    ] [
-        group-struct [ gr_name>> ] [ f ] if*
-    ] if*
-    [ ] [ number>string ] ?if ;
+    [
+        group-cache get [
+            ?at [ name>> ] [ number>string ] if
+        ] [
+            group-struct [ gr_name>> ] [ f ] if*
+        ] if*
+    ] [ number>string ] ?unless ;
 
 : group-id ( string -- id/f )
     group-struct dup [ gr_gid>> ] when ;