SchemeSys.mesa
Copyright Ó 1988, 1991 by Xerox Corporation. All rights reserved.
Michael Plass, February 21, 1989 1:07:46 pm PST
System-dependent features needed by Scheme
~
BEGIN
IsFileStream:
PROC [stream:
IO.
STREAM]
RETURNS [
BOOL];
GetFileNameForStream:
PROC [stream:
IO.
STREAM]
RETURNS [Rope.
ROPE];
GetFileCreateDateForStream:
PROC [stream:
IO.
STREAM]
RETURNS [Rope.
ROPE];
GetPort:
PROC [param:
REF
ANY, in:
BOOL]
RETURNS [
IO.
STREAM];
DoWithPort:
PROC [port:
IO.
STREAM, proc:
PROC, in:
BOOL];
SetPort:
PROC [port:
IO.
STREAM, in:
BOOL];
Changes the current input or output port
DoWithPorts:
PROC [in, out:
IO.
STREAM, proc:
PROC];
Used by ReadEvalPrintLoop to provide info for GetPort; also a handy place to put system-dependent recovery for uncaught errors.
DoWithIOErrorCatch:
PROC [proc:
PROC];
OpenFile:
PROC [fileName: Rope.
ROPE, in:
BOOL]
RETURNS [
IO.
STREAM];
FindFileToLoad:
PROC [loadeeName: Rope.
ROPE, inner:
PROC [port:
IO.
STREAM, doExpand:
BOOL]];
Does the file search rules for load, calling inner with the result. Catches IO errors and raises Complain instead.
GetRope:
PROC [self:
IO.
STREAM, len:
INT ¬
INT.
LAST, demand:
BOOL ¬
FALSE]
RETURNS [Rope.
ROPE];
To work around a bug in PCedar IO.GetRope.
DebugPrint:
PROC [where:
ATOM, any:
REF];
For conditional debugging output
DebugPrintSwitch:
PROC [control:
REF];
Controls output of debug print; NIL means no debug output, see impl for other interpretations