<> <> <> <> DIRECTORY CD, CDIOExtras, TokenIO; CDIOExtrasImpl: CEDAR PROGRAM IMPORTS TokenIO EXPORTS CDIOExtras = BEGIN <<>> ReadPos: PUBLIC PROC [] RETURNS [CD.Position] = BEGIN p: CD.Position; p.x _ TokenIO.ReadInt[]; p.y _ TokenIO.ReadInt[]; RETURN [p] END; WritePos: PUBLIC PROC [p: CD.Position] = BEGIN TokenIO.WriteInt[p.x]; TokenIO.WriteInt[p.y]; END; ReadRect: PUBLIC PROC [] RETURNS [CD.Rect] = BEGIN r: CD.Rect; r.x1 _ TokenIO.ReadInt[]; r.y1 _ TokenIO.ReadInt[]; r.x2 _ TokenIO.ReadInt[]; r.y2 _ TokenIO.ReadInt[]; RETURN [r] END; WriteRect: PUBLIC PROC[r: CD.Rect] = BEGIN TokenIO.WriteInt[r.x1]; TokenIO.WriteInt[r.y1]; TokenIO.WriteInt[r.x2]; TokenIO.WriteInt[r.y2]; END; END.