From 63b45632a157dc6ccaf138e469271bb399ffcd8d Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 24 Oct 2005 02:51:23 +0000 Subject: [PATCH] LENGTH operation is valid for both input _and_ output files. --- v7/src/runtime/fileio.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/v7/src/runtime/fileio.scm b/v7/src/runtime/fileio.scm index 5062c7048..7b42cf2a5 100644 --- a/v7/src/runtime/fileio.scm +++ b/v7/src/runtime/fileio.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: fileio.scm,v 1.23 2005/10/24 02:47:47 cph Exp $ +$Id: fileio.scm,v 1.24 2005/10/24 02:51:23 cph Exp $ Copyright 1991,1993,1994,1995,1996,1999 Massachusetts Institute of Technology Copyright 2001,2004,2005 Massachusetts Institute of Technology @@ -53,7 +53,9 @@ USA. (pathname #f read-only #t)) (define (operation/length port) - (channel-file-length (port/input-channel port))) + (channel-file-length + (or (port/input-channel port) + (port/output-channel port)))) (define (operation/pathname port) (fstate-pathname (port/state port))) -- 2.25.1