<<>> <> <> <> <> <> <> <> DIRECTORY Atom, IO, Rope; UnparserBuffer: CEDAR DEFINITIONS = <> BEGIN Nat: TYPE ~ INTEGER[0..INTEGER.LAST]; ROPE: TYPE = Rope.ROPE; PropList: TYPE = Atom.PropList; CharSet: TYPE ~ [0..256); --just like in TiogaAccess Handle: TYPE = REF PublicParts; PublicParts: TYPE = RECORD [ margin: NAT ¬ 80, <> width: ARRAY CHAR OF INTEGER ¬ ALL [1], spacers: LIST OF CHAR ¬ NIL, <> <> output: BufferOutput, ps: Privates ¬ NIL ]; <> BufferOutputKind: TYPE = {stream}; BufferOutput: TYPE = RECORD [ variant: SELECT kind: BufferOutputKind FROM stream => [stream: IO.STREAM], <> <> <> <> ENDCASE]; Privates: TYPE = REF PrivateParts; PrivateParts: TYPE; BogusInput: ERROR [msg: ROPE]; Create: PROC [publics: PublicParts, miserable: BOOL ¬ TRUE, newline: ROPE ¬ NIL, debug: BOOL ¬ FALSE] RETURNS [Handle]; <> <> <> NewInittedHandle: PROC [publics: PublicParts] RETURNS [Handle]; <<= Create[miserable: FALSE]>> <> <> <> CreatePrivates: PROC [margin: NAT ¬ 80] RETURNS [Privates]; XCreatePrivates: PROC [margin: Nat ¬ 80, miserable: BOOL ¬ TRUE, newline: ROPE ¬ NIL, debug: BOOL ¬ FALSE] RETURNS [Privates]; Init: PROC [h: Handle]; <> Setb: PROC [h: Handle]; <> Endb: PROC [h: Handle]; <> Bp: PROC [h: Handle, cond: BreakCondition, offset: INTEGER, sep: ROPE]; <> BreakCondition: TYPE = {width, lookLeft, united, always}; XBp: PROC [h: Handle, cond: XBreakCondition, offset: INTEGER, sep: ROPE]; <> XBreakCondition: TYPE = {never, miser, width, lookLeft, united, always}; <> <<>> Charb: PROC [h: Handle, ch: CHAR]; <> Ropeb: PROC [h: Handle, r: ROPE]; <> Textb: PROC [h: Handle, rt: REF READONLY TEXT, startIndex: NAT ¬ 0, count: NAT ¬ NAT.LAST]; <> <<>> Atomb: PROC [h: Handle, a: ATOM]; <> Newlineb: PROC [h: Handle, offset: INTEGER] = INLINE {Bp[h, always, offset, NIL]}; <> Looksb: PROC [h: Handle, looks: ROPE]; <> CharPropsb: PROC [h: Handle, props: --immutable--PropList]; <> CharSetb: PROC [h: Handle, charSet: CharSet]; <> <<>> <> NodeFormatb: PROC [h: Handle, format: ATOM]; NodeCommentb: PROC [h: Handle, comment: BOOL]; NodePropsb: PROC [h: Handle, props: --immutable--PropList]; END.