SoftcardVersacolorTestImpl.mesa
Copyright Ó 1988 by Xerox Corporation. All rights reserved.
written by Christian Le Cocq, November 14, 1988
Test of the Sparc side of the Print server
DIRECTORY
Basics,
IO,
Rope,
SoftcardRemoteCall;
SoftcardVersacolorTestImpl: CEDAR PROGRAM
IMPORTS Basics, IO, Rope, SoftcardRemoteCall
EXPORTS Export
~ BEGIN
CallPrinter: PUBLIC PROC [file: Rope.ROPE, copies: CARD ← 1, first: CARD ← 0, last: CARDCARD.LAST] RETURNS [r: CARD32] ~ {
Description of the procedure.
PutArgs: PROC [ub: Basics.UnsafeBlock] ~ TRUSTED {
t: REF TEXTNEW[TEXT[argsByteSize]];
s: IO.STREAMIO.TOS[text: t];
IO.PutFWord[s, Basics.FFromCard32[copies]];
IO.PutFWord[s, Basics.FFromCard32[first]];
IO.PutFWord[s, Basics.FFromCard32[last]];
IO.PutRope[s, file];
IO.Close[s];
IF t.length#argsByteSize THEN ERROR;
s ← IO.TIS[t];
[] ← IO.UnsafeGetBlock[s, ub];
};
argsByteSize: CARD32 ← Rope.Length[file]+3*BYTES[CARD];
[] ← SoftcardRemoteCall.CallRProc[$VersacolorPrint, argsByteSize, PutArgs];
};
END.