From: Chris Hanson Date: Mon, 24 Oct 2005 02:51:23 +0000 (+0000) Subject: LENGTH operation is valid for both input _and_ output files. X-Git-Tag: 20090517-FFI~1202 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=63b45632a157dc6ccaf138e469271bb399ffcd8d;p=mit-scheme.git LENGTH operation is valid for both input _and_ output files. --- 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)))