DIRECTORY FS USING [OpenFile], IO USING [STREAM], Rope USING [ROPE]; RopeIO: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; ToFile: PROC [fileName, rope: ROPE, start: INT _ 0]; ToFileC: PROC [openFile: FS.OpenFile, rope: ROPE, start: INT _ 0]; FromFile: PROC [fileName: ROPE, start: INT _ 0, len: INT _ LAST[INT]] RETURNS [ROPE]; FromFileC: PROC [openFile: FS.OpenFile, start: INT _ 0, len: INT _ LAST[INT]] RETURNS [ROPE]; PutRope: PROC [stream: IO.STREAM, rope: ROPE]; GetRope: PROC [stream: IO.STREAM, len: INT _ LAST[INT]] RETURNS [rope: ROPE]; END. ΦRopeIO.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. written by Bill Paxton, August 1982 Paxton, September 13, 1982 9:42 am Maxwell, January 5, 1983 8:36 am Russ Atkinson, July 21, 1983 7:39 pm Michael Plass, February 14, 1985 1:40:09 pm PST This module provides efficient filing operations for ropes. For reading, the files are copied to large buffers. For writing, the characters from the ropes are block copied into large buffers for output. write the rope on the specified file starts writing at given address in file truncates file to end of rope like ToFile but uses openFile instead of file name (writes to new version, you betcha) create rope from the contents of a file starts reading at given start address in file pretends that start+len is the end of the file like FromFile but uses openFile instead of file name **** IO Stream Operations **** does a series of IO.PutBlock's reads up to len chars from stream (via GetBlock's) and makes a rope Κ˜šœ ™ Icodešœ Οmœ1™