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 )
|
: all-groups ( -- seq )
|
||||||
[ getgrent dup ] [ group-struct>group ] [ drop ] produce ;
|
[ getgrent dup ] [ group-struct>group ] [ drop ] produce ;
|
||||||
|
|
||||||
|
: <group-cache> ( -- assoc )
|
||||||
|
all-groups [ [ id>> ] keep ] H{ } map>assoc ;
|
||||||
|
|
||||||
: with-group-cache ( quot -- )
|
: with-group-cache ( quot -- )
|
||||||
all-groups [ [ id>> ] keep ] H{ } map>assoc
|
[ <group-cache> group-cache ] dip with-variable ; inline
|
||||||
group-cache rot with-variable ; inline
|
|
||||||
|
|
||||||
: real-group-id ( -- id )
|
: real-group-id ( -- id )
|
||||||
getgid ; inline
|
getgid ; inline
|
||||||
|
|
|
@ -41,9 +41,11 @@ PRIVATE>
|
||||||
|
|
||||||
SYMBOL: user-cache
|
SYMBOL: user-cache
|
||||||
|
|
||||||
|
: <user-cache> ( -- assoc )
|
||||||
|
all-users [ [ uid>> ] keep ] H{ } map>assoc ;
|
||||||
|
|
||||||
: with-user-cache ( quot -- )
|
: with-user-cache ( quot -- )
|
||||||
all-users [ [ uid>> ] keep ] H{ } map>assoc
|
[ <user-cache> user-cache ] dip with-variable ; inline
|
||||||
user-cache rot with-variable ; inline
|
|
||||||
|
|
||||||
GENERIC: user-passwd ( obj -- passwd )
|
GENERIC: user-passwd ( obj -- passwd )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue