KipperSupport.mesa (created: December 6, 1985 9:35:33 am PST)
Copyright Ó 1985, 1986, 1987 by Xerox Corporation. All rights reserved.
Sturgis, January 6, 1986 1:07:11 pm PST
Bill Jackson (bj) October 19, 1988 3:01:11 pm PDT
DIRECTORY
IO USING [ STREAM ],
RefTab USING [ Ref ],
Rope USING [ ROPE ];
KipperSupport: CEDAR DEFINITIONS ~ {
Kipper types
Kipperer: TYPE ~ REF KippererBody;
KippererBody: TYPE ~ RECORD [
stream: IO.STREAM,
refCounter: CARD32,
refTable: RefTab.Ref,
private: REF
];
UnKipperer: TYPE ~ REF UnKippererBody;
UnKippererBody: TYPE ~ RECORD [
stream: IO.STREAM,
refCounter: CARD32,
refTable: RefTab.Ref,
private: REF
];
Creation procedures
CreateKipperer: PROC [ s: IO.STREAM ] RETURNS [ Kipperer ];
CreateUnKipperer: PROC [ s: IO.STREAM ] RETURNS [ UnKipperer ];
! Error[reason]
Error: ERROR [ reason: Reason ];
Reason: TYPE ~ {
notAKipperStream, -- stream bytes do not contain expected key
wrongKipperVersion, -- stream bytes do not contain expected version number
unsupportedVersion -- stream bytes contain a version known, but unimplemented
};
Client callable procedures
KipperBool: PROC [ k: Kipperer, bool: BOOL ];
UnKipperBool: PROC [ u: UnKipperer ] RETURNS [ bool: BOOL ];
KipperCard16: PROC [ k: Kipperer, card16: CARD16 ];
UnKipperCard16: PROC [ u: UnKipperer ] RETURNS [ card16: CARD16 ];
KipperCard32: PROC [ k: Kipperer, card32: CARD32 ];
UnKipperCard32: PROC [ u: UnKipperer ] RETURNS [ card32: CARD32 ];
KipperChar: PROC [ k: Kipperer, char: CHAR ];
UnKipperChar: PROC [ u: UnKipperer ] RETURNS [ char: CHAR ];
KipperInt16: PROC [ k: Kipperer, int16: INT16 ];
UnKipperInt16: PROC [ u: UnKipperer ] RETURNS [ int16: INT16 ];
KipperInt32: PROC [ k: Kipperer, int32: INT32 ];
UnKipperInt32: PROC [ u: UnKipperer ] RETURNS [ int32: INT32 ];
KipperNat31: PROC [ k: Kipperer, nat: NAT ];
UnKipperNat31: PROC [ u: UnKipperer ] RETURNS [ nat: NAT ];
KipperReal: PROC [ k: Kipperer, real: REAL ];
UnKipperReal: PROC [ u: UnKipperer ] RETURNS [ real: REAL ];
KipperRefText: PROC [ k: Kipperer, refText: REF TEXT ];
UnKipperRefText: PROC [ u: UnKipperer ] RETURNS [ refText: REF TEXT ];
KipperRope: PROC [ k: Kipperer, rope: Rope.ROPE ];
UnKipperRope: PROC [ u: UnKipperer ] RETURNS [ rope: Rope.ROPE ];
KipperWord: PROC [ k: Kipperer, word: WORD ];
UnKipperWord: PROC [ u: UnKipperer ] RETURNS [ word: WORD ];
Private Procedures called by generated stubs
KipperRef: PROC [ k: Kipperer, r: REF ANY ] RETURNS [ kipperTheBody: BOOL ];
UnKipperRef: PROC [ u: UnKipperer ] RETURNS [ kipperTheBody: BOOL, ref: REF ANY ];
RecordUnKipperedRef: PROC [ u: UnKipperer, r: REF ANY ];
}.