From 4eb3f734839ccb02ce5fb0004ec53d39dd0eeee5 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 6 Oct 2008 18:18:33 -0500 Subject: [PATCH] moving structs around --- basis/calendar/unix/unix.factor | 4 +++- basis/unix/time/time.factor | 8 ++++++++ basis/unix/unix.factor | 9 --------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/basis/calendar/unix/unix.factor b/basis/calendar/unix/unix.factor index 679cc69fad..fcdfcc8a67 100644 --- a/basis/calendar/unix/unix.factor +++ b/basis/calendar/unix/unix.factor @@ -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 -kernel structs math unix unix.time namespaces system ; +kernel math unix unix.time namespaces system ; IN: calendar.unix : make-timeval ( ms -- timeval ) diff --git a/basis/unix/time/time.factor b/basis/unix/time/time.factor index 67611ae193..b6471e9892 100644 --- a/basis/unix/time/time.factor +++ b/basis/unix/time/time.factor @@ -3,6 +3,14 @@ USING: kernel alien.syntax alien.c-types math unix.types ; IN: unix.time +C-STRUCT: timeval + { "long" "sec" } + { "long" "usec" } ; + +C-STRUCT: timespec + { "time_t" "sec" } + { "long" "nsec" } ; + C-STRUCT: tm { "int" "sec" } ! Seconds: 0-59 (K&R says 0-61?) { "int" "min" } ! Minutes: 0-59 diff --git a/basis/unix/unix.factor b/basis/unix/unix.factor index 8ccc14f44d..a68274f09b 100644 --- a/basis/unix/unix.factor +++ b/basis/unix/unix.factor @@ -29,15 +29,6 @@ C-STRUCT: group { "int" "gr_gid" } { "char**" "gr_mem" } ; -C-STRUCT: timeval - { "long" "sec" } - { "long" "usec" } ; - -C-STRUCT: timespec - { "time_t" "sec" } - { "long" "nsec" } ; - - LIBRARY: factor FUNCTION: void clear_err_no ( ) ;