moving structs around

Doug Coleman 2008-10-06 18:18:33 -05:00
parent dd56cd4a4f
commit 4eb3f73483
3 changed files with 11 additions and 10 deletions

View File

@ -1,5 +1,7 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.syntax arrays calendar USING: alien alien.c-types alien.syntax arrays calendar
kernel structs math unix unix.time namespaces system ; kernel math unix unix.time namespaces system ;
IN: calendar.unix IN: calendar.unix
: make-timeval ( ms -- timeval ) : make-timeval ( ms -- timeval )

View File

@ -3,6 +3,14 @@
USING: kernel alien.syntax alien.c-types math unix.types ; USING: kernel alien.syntax alien.c-types math unix.types ;
IN: unix.time IN: unix.time
C-STRUCT: timeval
{ "long" "sec" }
{ "long" "usec" } ;
C-STRUCT: timespec
{ "time_t" "sec" }
{ "long" "nsec" } ;
C-STRUCT: tm C-STRUCT: tm
{ "int" "sec" } ! Seconds: 0-59 (K&R says 0-61?) { "int" "sec" } ! Seconds: 0-59 (K&R says 0-61?)
{ "int" "min" } ! Minutes: 0-59 { "int" "min" } ! Minutes: 0-59

View File

@ -29,15 +29,6 @@ C-STRUCT: group
{ "int" "gr_gid" } { "int" "gr_gid" }
{ "char**" "gr_mem" } ; { "char**" "gr_mem" } ;
C-STRUCT: timeval
{ "long" "sec" }
{ "long" "usec" } ;
C-STRUCT: timespec
{ "time_t" "sec" }
{ "long" "nsec" } ;
LIBRARY: factor LIBRARY: factor
FUNCTION: void clear_err_no ( ) ; FUNCTION: void clear_err_no ( ) ;