2013-06-04 21:09:52 -04:00
|
|
|
! Copyright (C) 2013 Doug Coleman.
|
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
|
|
|
|
USING: accessors calendar.unix combinators kernel system
|
|
|
|
|
unix.ffi unix.utmpx ;
|
|
|
|
|
IN: unix.utmpx.macosx
|
|
|
|
|
|
2020-09-09 17:41:17 -04:00
|
|
|
M: macosx utmpx>utmpx-record
|
2013-06-04 21:09:52 -04:00
|
|
|
[ new-utmpx-record ] dip {
|
|
|
|
|
[ ut_user>> _UTX_USERSIZE memory>string >>user ]
|
|
|
|
|
[ ut_id>> _UTX_IDSIZE memory>string >>id ]
|
|
|
|
|
[ ut_line>> _UTX_LINESIZE memory>string >>line ]
|
|
|
|
|
[ ut_pid>> >>pid ]
|
|
|
|
|
[ ut_type>> >>type ]
|
|
|
|
|
[ ut_tv>> timeval>unix-time >>timestamp ]
|
|
|
|
|
[ ut_host>> _UTX_HOSTSIZE memory>string >>host ]
|
|
|
|
|
} cleave ;
|