Fix combinators so that directory. can infer on Unix
parent
67c8fd8182
commit
f44d8f4cf5
|
@ -76,9 +76,11 @@ M: integer user-groups ( id -- seq )
|
|||
: all-groups ( -- seq )
|
||||
[ getgrent dup ] [ group-struct>group ] [ drop ] produce ;
|
||||
|
||||
: <group-cache> ( -- assoc )
|
||||
all-groups [ [ id>> ] keep ] H{ } map>assoc ;
|
||||
|
||||
: with-group-cache ( quot -- )
|
||||
all-groups [ [ id>> ] keep ] H{ } map>assoc
|
||||
group-cache rot with-variable ; inline
|
||||
[ <group-cache> group-cache ] dip with-variable ; inline
|
||||
|
||||
: real-group-id ( -- id )
|
||||
getgid ; inline
|
||||
|
|
|
@ -41,9 +41,11 @@ PRIVATE>
|
|||
|
||||
SYMBOL: user-cache
|
||||
|
||||
: <user-cache> ( -- assoc )
|
||||
all-users [ [ uid>> ] keep ] H{ } map>assoc ;
|
||||
|
||||
: with-user-cache ( quot -- )
|
||||
all-users [ [ uid>> ] keep ] H{ } map>assoc
|
||||
user-cache rot with-variable ; inline
|
||||
[ <user-cache> user-cache ] dip with-variable ; inline
|
||||
|
||||
GENERIC: user-passwd ( obj -- passwd )
|
||||
|
||||
|
|
Loading…
Reference in New Issue