DIRECTORY Rope USING [ROPE], RopeReader USING [CharsArray]; RopeEditingAlloc: CEDAR DEFINITIONS = BEGIN CharsArray: TYPE = RopeReader.CharsArray; Chars: TYPE = REF CharsArray; ROPE: TYPE = Rope.ROPE; AllocChars: PROC [len: NAT] RETURNS [chars: Chars, start: NAT, base: ROPE]; AllocWords: PROC [nwords: NAT] RETURNS [chars: Chars, start: NAT, base: ROPE]; TryAllocAdjacent: PROC [base: ROPE, start: NAT, len: NAT] RETURNS [ok: BOOLEAN, chars: Chars]; GetBlock: PROC RETURNS [blk: REF TEXT]; FreeBlock: PROC [blk: REF TEXT]; END. ėRopeEditingAlloc.mesa written by Bill Paxton, March 1981 last edit by McGregor, June 10, 1982 2:31 pm Doug Wyatt, January 17, 1984 11:38:24 am PST -- for use by routines in RopeFrom. not for general use. -- allocates room for len characters -- chars is the array to hold them starting at start -- base is rope pointing to the entire chars array -- for use by routines in RopeFrom. not for general use. -- ensures that start is even, i.e., start on word boundary -- for use by routines in RopeFrom. not for general use. -- if base is current CharsArray -- and start is current next free loc in base -- and there are at least len free chars remaining -- then allocates those chars and returns true -- these provide a cache of text buffers Ę­˜šœ™Jšœ#™#Jšœ,™,J™,—J˜šĪk ˜ Jšœœœ˜Jšœ œ˜J˜—Jšœœ˜%Jš˜J˜Jšœ œ˜)Jšœœœ ˜Jšœœœ˜J˜šĪn œœœ˜Jšœœœ˜/—JšĪc9™9JšŸ$™$JšŸ4™4JšŸ2™2J˜šž œœ œ˜Jšœœœ˜/—JšŸ9™9JšŸ;™;J˜š žœœœ œœ˜9Jšœœ˜$—JšŸ9™9JšŸ ™ JšŸ-™-JšŸ2™2JšŸ.™.J˜JšŸ(™(J˜Jš žœœœœœ˜'Jšž œœœœ˜ J˜Jšœ˜J˜J˜—…—ĩ