From c711146209cf9fbda5fe2f11368c6c43949798f7 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Wed, 30 Jul 2003 23:01:46 +0000 Subject: [PATCH] r5410: *** empty log message *** --- io-openmcl.lisp | 12 ++++++++++++ io.lisp | 13 +------------ kmrcl.asd | 5 +++-- 3 files changed, 16 insertions(+), 14 deletions(-) create mode 100644 io-openmcl.lisp diff --git a/io-openmcl.lisp b/io-openmcl.lisp new file mode 100644 index 0000000..a42e98c --- /dev/null +++ b/io-openmcl.lisp @@ -0,0 +1,12 @@ +(in-package #:kmrcl) + +(defun open-device-stream (path direction) + (let* ((mode (ecase direction + (:input #$O_RDONLY) + (:output #$O_WRONLY) + (:io #$O_RDWR))) + (fd (ccl::fd-open (ccl::native-translated-namestring path) mode))) + (if (< fd 0) + (ccl::signal-file-error fd path) + (ccl::make-fd-stream fd :direction direction)))) + diff --git a/io.lisp b/io.lisp index 9c591c7..4134bd6 100644 --- a/io.lisp +++ b/io.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: io.lisp,v 1.13 2003/07/30 22:23:25 kevin Exp $ +;;;; $Id: io.lisp,v 1.14 2003/07/30 23:01:46 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -169,17 +169,6 @@ #-allegro (write-string (write-to-string n) s)) -#+openmcl -(defun open-device-stream (path direction) - (let* ((mode (ecase direction - (:input #$O_RDONLY) - (:output #$O_WRONLY) - (:io #$O_RDWR))) - (fd (ccl::fd-open (ccl::native-translated-namestring path) mode))) - (if (< fd 0) - (ccl::signal-file-error fd path) - (ccl::make-fd-stream fd :direction direction)))) - (defun null-output-stream () #-openmcl diff --git a/kmrcl.asd b/kmrcl.asd index a14a6e3..e62e5c9 100644 --- a/kmrcl.asd +++ b/kmrcl.asd @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: kmrcl.asd,v 1.43 2003/07/23 22:07:48 kevin Exp $ +;;;; $Id: kmrcl.asd,v 1.44 2003/07/30 23:01:46 kevin Exp $ ;;;; ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -37,7 +37,8 @@ (:file "functions" :depends-on ("macros")) (:file "lists" :depends-on ("macros")) (:file "seqs" :depends-on ("macros")) - (:file "io" :depends-on ("macros")) + (:file "io-openmcl" :depends-on ("macros")) + (:file "io" :depends-on ("macros" "io-openmcl")) (:file "console" :depends-on ("macros")) (:file "strings" :depends-on ("macros" "seqs")) (:file "strmatch" :depends-on ("strings")) -- 2.34.1