TargetConversionsPrivate.mesa
Copyright Ó 1986, 1988, 1991 by Xerox Corporation. All rights reserved.
Russ Atkinson (RRA) July 26, 1988 0:58:47 am PDT
DIRECTORY
TargetConversions USING [BitIndex, bitsPerWord, ByteSequence];
TargetConversionsPrivate: CEDAR DEFINITIONS = BEGIN OPEN TargetConversions;
Reader: TYPE = REF ReaderRep;
ReaderRep: TYPE = RECORD [
bitsRead: INT ¬ 0,
bytesRead: INT ¬ 0,
lastByteIndex: INT ¬ 0,
bitsLength: INT ¬ 0,
partialWord: Bits32 ¬ nullBits32,
buffer: ByteSequence ¬ NIL
];
Writer: TYPE = REF WriterRep;
WriterRep: TYPE = RECORD [
bitsWritten: INT ¬ 0,
bitPos: INT ¬ 0,
partialWord: Bits32 ¬ nullBits32,
dirty: BOOL ¬ FALSE,
buffer: REF TEXT ¬ NIL
];
Bits32: TYPE = PACKED ARRAY BitIndex OF [0..1];
nullBits32: Bits32 = LOOPHOLE[LONG[0]];
Bytes: TYPE = PACKED ARRAY ByteIndex OF BYTE;
nullBytes: Bytes = LOOPHOLE[LONG[0]];
ByteIndex: TYPE = [0..bitsPerWord/8);
ByteLength: TYPE = [0..bitsPerWord/8];
END.