]> gitweb.factorcode.org Git - factor.git/blob - basis/unix/utmpx/netbsd/netbsd.factor
93092a7cbfd26c53e3274a28dbb73adc2faf691f
[factor.git] / basis / unix / utmpx / netbsd / netbsd.factor
1 ! Copyright (C) 2008 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.syntax unix unix.utmpx unix.ffi.bsd.netbsd accessors
4 system kernel combinators ;
5 IN: unix.utmpx.netbsd
6
7 TUPLE: netbsd-utmpx-record < utmpx-record
8 termination exit sockaddr ;
9
10 M: netbsd new-utmpx-record ( -- utmpx-record )
11     netbsd-utmpx-record new ;
12
13 M: netbsd utmpx>utmpx-record ( utmpx -- record )
14     [ new-utmpx-record ] dip
15     [
16         ut_exit>>
17         [ e_termination>> >>termination ]
18         [ e_exit>> >>exit ] bi
19     ]
20     [ ut_ss>> >>sockaddr ] bi ;