-- FileReader.Mesa
-- written by Paxton. March 1981
-- last written by Paxton. August 20, 1982 1:51 pm
Last Edited by: Lamming, May 4, 1983 5:07 pm
DIRECTORY
File,
Rope,
IO,
CIFS,
RopeReader,
System;
FileReader: CEDAR DEFINITIONS =
BEGIN
ROPE: TYPE = Rope.ROPE;
Offset: TYPE = INT;
FileType: TYPE = {Tioga1, Tioga2, Simple};
Reply: TYPE = REF ReplyRec;
ReplyRec: TYPE = RECORD [
control, comment, text: RopeReader.Ref,  -- used by tioga 1 mechanism
fileType:FileType,        -- Tioga1 / Tioga2
fileRope: ROPE,         -- the internal rope
version:INT,          -- Tioga2 version stamp
textStart, textLen, controlStart, controlLen : Offset]; -- offsets used by Tioga1 
Open: PROC [fileName: ROPE, start, len: Offset, okToMapFile: BOOLEAN]
RETURNS [reply:FileReader.Reply, fh: CIFS.OpenFile, createDate: System.GreenwichMeanTime];
OpenC: PROC [file: File.Capability, start, len: Offset, okToMapFile: BOOLEAN]
RETURNS [reply:FileReader.Reply, createDate: System.GreenwichMeanTime];
FromRope: PROC [rope: ROPE, start, len: Offset]
RETURNS [reply:Reply];
FromStream: PROC [stream: IO.Handle, len: Offset]
RETURNS [reply:Reply];
END.