! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.data calendar calendar.private
-classes.struct kernel math system unix unix.time unix.types ;
+classes.struct kernel math system libc unix unix.time unix.types ;
IN: calendar.unix
: timeval>seconds ( timeval -- seconds )
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.data alien.strings
-alien.syntax kernel layouts sequences system unix
+alien.syntax kernel layouts libc sequences system unix
environment io.encodings.utf8 unix.utilities vocabs
combinators alien.accessors unix.ffi ;
IN: environment.unix
! See http://factorcode.org/license.txt for BSD license.
USING: accessors classes.struct kernel destructors bit-arrays
sequences assocs specialized-arrays math namespaces
-locals fry unix unix.linux.epoll unix.time io.ports
+libc locals fry unix unix.linux.epoll unix.time io.ports
io.backend.unix io.backend.unix.multiplexers ;
SPECIALIZED-ARRAY: epoll-event
IN: io.backend.unix.multiplexers.epoll
USING: alien alien.c-types alien.data alien.syntax generic
assocs kernel kernel.private math io.ports sequences strings
sbufs threads unix unix.ffi unix.stat vectors io.buffers io.backend
-io.encodings math.parser continuations system libc namespaces
+io.encodings io.files math.parser continuations system libc namespaces
make io.timeouts io.encodings.utf8 destructors
destructors.private accessors summary combinators locals
unix.time unix.types fry io.backend.unix.multiplexers
! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: alien.c-types alien.data io.directories.unix kernel
+USING: alien.c-types alien.data io.directories.unix kernel libc
system unix classes.struct unix.ffi ;
IN: io.directories.unix.linux
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.c-types alien.syntax combinators csv
io.backend io.encodings.utf8 io.files io.files.info
-io.files.unix kernel math.order namespaces sequences sorting
-system unix unix.statfs.linux unix.statvfs.linux io.files.links
+io.files.unix libc libc.linux kernel math.order namespaces sequences
+sorting system unix unix.statfs.linux unix.statvfs.linux io.files.links
arrays io.files.info.unix assocs io.pathnames unix.types
classes.struct ;
FROM: csv => delimiter ;
! Copyright (C) 2005, 2008 Slava Pestov, Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: unix byte-arrays kernel io.backend.unix math.bitwise
-io.ports io.files io.files.private io.pathnames environment
+io.ports io.files io.files.private io.pathnames libc environment
destructors system unix.ffi literals ;
IN: io.files.unix
USING: accessors alien.c-types alien.data arrays assocs
combinators continuations environment io io.backend
io.backend.unix io.files io.files.private io.files.unix
-io.launcher io.pathnames io.ports kernel math namespaces
-sequences strings system threads unix unix.process unix.ffi
-simple-tokenizer ;
+io.launcher io.pathnames io.ports kernel libc math
+namespaces sequences strings system threads unix unix.process
+unix.ffi simple-tokenizer ;
IN: io.launcher.unix
: get-arguments ( process -- seq )
USING: kernel io.backend io.monitors io.monitors.recursive
io.files io.pathnames io.buffers io.ports io.timeouts
io.backend.unix io.encodings.utf8 unix.linux.inotify assocs
-namespaces make threads continuations init math math.bitwise
+namespaces make threads continuations init libc math math.bitwise
sets alien alien.strings alien.c-types vocabs.loader accessors
system hashtables destructors unix classes.struct literals ;
FROM: namespaces => set ;
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.data system kernel unix math sequences
-io.backend.unix io.ports specialized-arrays accessors unix.ffi ;
+io.backend.unix io.ports libc specialized-arrays accessors unix.ffi ;
QUALIFIED: io.pipes
SPECIALIZED-ARRAY: int
IN: io.pipes.unix
-! Copyright (C) 2004, 2008 Slava Pestov, Ivan Tikhonov.
+! Copyright (C) 2004, 2008 Slava Pestov, Ivan Tikhonov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien alien.c-types alien.data alien.strings
classes.struct combinators destructors io.backend.unix
-io.encodings.utf8 io.pathnames io.sockets.private kernel libc
-locals math namespaces sequences system unix unix.ffi vocabs ;
+io.encodings.utf8 io.files io.pathnames io.sockets.private kernel
+libc locals math namespaces sequences system unix
+unix.ffi vocabs ;
EXCLUDE: io => read write ;
EXCLUDE: io.sockets => accept ;
IN: io.sockets.unix
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien alien.c-types alien.destructors alien.syntax assocs
combinators continuations destructors destructors.private kernel math
-namespaces prettyprint sequences sets summary system vocabs ;
+namespaces prettyprint sequences sets summary system vocabs vocabs.parser ;
IN: libc
-<< "libc." os unparse append require >>
+<< "libc." os unparse append use-vocab >>
LIBRARY: factor
USING: kernel alien.c-types alien.data alien.strings sequences
math alien.syntax unix namespaces continuations threads assocs
-io.backend.unix io.encodings.utf8 unix.types unix.utilities fry
-unix.ffi ;
+io.backend.unix io.encodings.utf8 libc unix.types unix.utilities
+fry unix.ffi ;
IN: unix.process
! Low-level Unix process launching utilities. These are used
! See http://factorcode.org/license.txt for BSD license.
USING: accessors assocs command-line concurrency.messaging
continuations init io.backend io.files io.monitors io.pathnames
-kernel namespaces sequences sets splitting threads fry
+kernel libc namespaces sequences sets splitting threads fry
tr vocabs vocabs.loader vocabs.refresh vocabs.cache
io.files.links ;
IN: vocabs.refresh.monitor
GENERIC: drain ( port handle -- event/f )
GENERIC: refill ( port handle -- event/f )
-HOOK: wait-for-fd ( handle event -- )
+HOOK: wait-for-fd io-backend ( handle event -- )
MIXIN: file-reader
MIXIN: file-writer