DIRECTORY FS, IO, 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 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 This module provides efficient filing operations for ropes. For reading, the files are mapped in and block 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 Êݘšœ ™ Jšœ#™#Jšœ"™"Jšœ ™ Jšœ$™$—J™šœ;™;J™GJ™Z—J˜šÏk ˜ Jšœ˜Jšœ˜Jšœ˜—J˜Jšœœ˜!J˜Jšœœœ˜J˜šÏnœœœ œ˜4JšÏc$™$JšŸ'™'JšŸ™J˜—š žœœ œœ œ˜BJšŸœŸ9™VJ˜—šžœœ œ œ œœœœœ˜UJšŸ'™'JšŸ-™-JšŸ.™.J˜—šž œœ œœ œœœœœ˜]JšŸœŸ™4J˜—JšŸ™J˜š žœœ œœœ˜.JšŸ™J˜—šžœœ œœœœœœœ˜MJšŸC™CJ˜—Jšœ˜J˜J˜—…—i