support for logical pathnames in streams - gcl.git - GNU Common Lisp

index : gcl.git
GNU Common Lisp
summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamm Maguire <camm@debian.org>2013年11月26日 21:37:38 +0000
committerCamm Maguire <camm@debian.org>2013年11月26日 21:37:38 +0000
commit9abb8b64e81d015d6c358d2fc065e75efb2d6456 (patch)
tree24ef12f4b157e061f97045012a14194bf12bae2c
parent4ef73b1a5bafbeb51f7976befa86d273b83b05d5 (diff)
downloadgcl-9abb8b64e81d015d6c358d2fc065e75efb2d6456.tar.gz
support for logical pathnames in streams
Diffstat
-rwxr-xr-xgcl/lsp/gcl_iolib.lsp 11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcl/lsp/gcl_iolib.lsp b/gcl/lsp/gcl_iolib.lsp
index 8177beb53..00980d3d0 100755
--- a/gcl/lsp/gcl_iolib.lsp
+++ b/gcl/lsp/gcl_iolib.lsp
@@ -707,15 +707,16 @@
((check-type tp (member character integer)))))
(defun open (f &key (direction :input)
- (element-type 'character etp)
+ (element-type 'character)
(if-exists nil iesp)
(if-does-not-exist nil idnesp)
(external-format :default))
+ (let* ((f (pathname f))
+ (f1 (if (typep f 'logical-pathname) (translate-logical-pathname f) f))
+ (s (open-int f1 direction (restrict-stream-element-type element-type)
+ if-exists iesp if-does-not-exist idnesp external-format)))
+ (when (typep s 'stream) (c-set-stream-object1 s f) s)))
- (declare (optimize (safety 2)))
-
- (when etp (setq element-type (restrict-stream-element-type element-type)))
- (open-int f direction element-type if-exists iesp if-does-not-exist idnesp external-format))
(defun load (f &rest args)
(values (apply 'load1 f args)))
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月02日 01:15:38 +0000

AltStyle によって変換されたページ (->オリジナル) /