fix usings

db4
Doug Coleman 2008-08-14 23:54:57 -05:00
parent 5cc5d347ae
commit b333583da4
5 changed files with 10 additions and 12 deletions

View File

@ -15,9 +15,8 @@ M: invalid-baud summary ( invalid-baud -- string )
" not supported" 3append ;
HOOK: lookup-baud os ( m -- n )
HOOK: open-serial os ( serial -- serial' )
M: serial dispose ( serial -- ) stream>> dispose ;
HOOK: open-serial os ( serial -- stream )
{
{ [ os unix? ] [ "serial.unix" ] }
{ [ os unix? ] [ "io.serial.unix" ] }
} cond require

View File

@ -1,6 +1,6 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.syntax kernel math.bitfields sequences system serial ;
USING: alien.syntax kernel math.bitfields sequences system io.serial ;
IN: io.serial.unix
M: bsd lookup-baud ( m -- n )

View File

@ -1,6 +1,6 @@
! Copyright (C) 2008 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: assocs alien.syntax kernel serial system unix ;
USING: assocs alien.syntax kernel io.serial system unix ;
IN: io.serial.unix
: TCSANOW 0 ; inline

View File

@ -4,6 +4,6 @@ USING: combinators system vocabs.loader ;
IN: io.serial.unix.termios
{
{ [ os linux? ] [ "serial.unix.termios.linux" ] }
{ [ os bsd? ] [ "serial.unix.termios.bsd" ] }
{ [ os linux? ] [ "io.serial.unix.termios.linux" ] }
{ [ os bsd? ] [ "io.serial.unix.termios.bsd" ] }
} cond require

View File

@ -2,12 +2,12 @@
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien.c-types alien.syntax combinators io.ports
io.streams.duplex io.unix.backend system kernel math math.bitfields
vocabs.loader unix serial serial.unix.termios ;
vocabs.loader unix io.serial io.serial.unix.termios ;
IN: io.serial.unix
<< {
{ [ os linux? ] [ "serial.unix.linux" ] }
{ [ os bsd? ] [ "serial.unix.bsd" ] }
{ [ os linux? ] [ "io.serial.unix.linux" ] }
{ [ os bsd? ] [ "io.serial.unix.bsd" ] }
} cond require >>
FUNCTION: speed_t cfgetispeed ( termios* t ) ;
@ -31,9 +31,8 @@ FUNCTION: int cfsetspeed ( termios* t, speed_t s ) ;
: <file-rw> ( path -- stream ) open-rw fd>duplex-stream ;
M: unix open-serial ( serial -- serial' )
dup
path>> { O_RDWR O_NOCTTY O_NDELAY } flags file-mode open-file
fd>duplex-stream >>stream ;
fd>duplex-stream ;
: serial-fd ( serial -- fd )
stream>> in>> handle>> fd>> ;