DIRECTORY RopeReader, Rope; 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]; Start: PROC; -- for initialization only END. ā-- RopeEditingAlloc.mesa -- written by Bill Paxton, March 1981 -- last edit by McGregor, June 10, 1982 2:31 pm -- 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 -- ***** Initialization Ę°˜JšĪc™Jš&™&Jš/™/J˜JšĪk ˜ J˜ J˜J˜Jšœžœ˜%Jšž˜J˜Jšœ žœ˜)Jšœžœžœ ˜Jšžœžœžœ˜J˜šĪn œžœžœ˜Jšžœžœžœ˜/—Jš9™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šŸœžœ˜'J˜Jšžœ˜J˜J˜—…—&ļ