unix.groups: cleanup using.
parent
7d5df2c8a2
commit
4bf402fc24
|
@ -1,11 +1,9 @@
|
||||||
! Copyright (C) 2008 Doug Coleman.
|
! Copyright (C) 2008 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors alien alien.c-types alien.data alien.strings
|
USING: accessors alien.c-types alien.data assocs byte-arrays
|
||||||
assocs byte-arrays classes.struct combinators
|
classes.struct combinators continuations fry grouping
|
||||||
combinators.short-circuit continuations fry io.encodings.utf8
|
io.encodings.utf8 kernel math math.parser namespaces sequences
|
||||||
kernel math math.parser namespaces sequences splitting strings
|
strings unix unix.ffi unix.users unix.utilities ;
|
||||||
unix unix.ffi unix.users unix.utilities ;
|
|
||||||
QUALIFIED: grouping
|
|
||||||
IN: unix.groups
|
IN: unix.groups
|
||||||
|
|
||||||
TUPLE: group id name passwd members ;
|
TUPLE: group id name passwd members ;
|
||||||
|
@ -20,7 +18,7 @@ GENERIC: group-struct ( obj -- group/f )
|
||||||
gr_mem>> utf8 alien>strings ;
|
gr_mem>> utf8 alien>strings ;
|
||||||
|
|
||||||
: (group-struct) ( id -- group-struct id group-struct byte-array length void* )
|
: (group-struct) ( id -- group-struct id group-struct byte-array length void* )
|
||||||
[ \ unix.ffi:group <struct> ] dip over 4096
|
[ unix.ffi:group <struct> ] dip over 4096
|
||||||
[ <byte-array> ] keep f void* <ref> ;
|
[ <byte-array> ] keep f void* <ref> ;
|
||||||
|
|
||||||
: check-group-struct ( group-struct ptr -- group-struct/f )
|
: check-group-struct ( group-struct ptr -- group-struct/f )
|
||||||
|
|
Loading…
Reference in New Issue