AdobeP75V2ClientImpl.Mesa
Copyright Ó 1989, 1992 by Xerox Corporation. All rights reserved.
Generated by BJackson.pa at March 27, 1990 2:04:25 pm PST
using Sirocco [2.0] of February 10, 1989 6:26:26 pm PST
Bill Jackson (bj) March 27, 1990 10:26:19 pm PST
Philip James, March 20, 1991 9:05 am PST
Christian Jacobi, April 7, 1992 4:51 pm PDT
DIRECTORY
CrRPC,
CrRPCBuggy,
TimeP15V2,
CHNameP2V0,
BasicTime,
Rope,
BulkDataP0V1,
AdobeP75V2;
AdobeP75V2ClientImpl: CEDAR PROGRAM
IMPORTS CrRPC, CrRPCBuggy, Rope
EXPORTS AdobeP75V2 ~ {
OPEN AdobeP75V2;
Errors
FileNotFound: PUBLIC FileNotFoundType ~ CODE;
ServerDown: PUBLIC ServerDownType ~ CODE;
ParameterInconsistency: PUBLIC ParameterInconsistencyType ~ CODE;
ObsoleteVersion: PUBLIC ObsoleteVersionType ~ CODE;
SysDescChanging: PUBLIC SysDescChangingType ~ CODE;
CantDetermineLocOfARs: PUBLIC CantDetermineLocOfARsType ~ CODE;
SystemAlreadyExists: PUBLIC SystemAlreadyExistsType ~ CODE;
NoAdobeServiceAtServer: PUBLIC NoAdobeServiceAtServerType ~ CODE;
CommunicationError: PUBLIC CommunicationErrorType ~ CODE;
IllegalLogin: PUBLIC IllegalLoginType ~ CODE;
Others: PUBLIC OthersType ~ CODE;
SystemNotRegistered: PUBLIC SystemNotRegisteredType ~ CODE;
Error: PUBLIC ErrorType ~ CODE;
Xxx: PUBLIC XxxType ~ CODE;
UnknownSystem: PUBLIC UnknownSystemType ~ CODE;
Spare2: PUBLIC Spare2Type ~ CODE;
Spare1: PUBLIC Spare1Type ~ CODE;
CourierTimedOut: PUBLIC CourierTimedOutType ~ CODE;
TooManyConnections: PUBLIC TooManyConnectionsType ~ CODE;
ServerUnreachable: PUBLIC ServerUnreachableType ~ CODE;
GetErrorProc
GetError: CrRPC.GetErrorProc ~ {
SELECT errNum FROM
5 => ERROR FileNotFound[];
7 => ERROR ServerDown[];
10 => ERROR ParameterInconsistency[];
11 => ERROR ObsoleteVersion[];
13 => ERROR SysDescChanging[];
2 => ERROR CantDetermineLocOfARs[];
4 => ERROR SystemAlreadyExists[];
8 => ERROR NoAdobeServiceAtServer[];
0 => ERROR CommunicationError[];
3 => ERROR IllegalLogin[];
14 => ERROR Others[];
12 => ERROR SystemNotRegistered[];
99 => {
why: Problem;
why ¬ VAL[CrRPC.GetCard16[s]];
ERROR Error[why]
};
31 => ERROR Xxx[];
1 => ERROR UnknownSystem[];
17 => ERROR Spare2[];
16 => ERROR Spare1[];
9 => ERROR CourierTimedOut[];
15 => ERROR TooManyConnections[];
6 => ERROR ServerUnreachable[];
ENDCASE => {
ERROR CrRPC.Error[h, remoteError, "Unexpected Remote Error"];
};
};
Remote Procedures --
GetSystemDescription: PUBLIC GetSystemDescriptionType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
};
GetResults: CrRPC.GetResultsProc ~ {
description.name ¬ CrRPC.GetRope[s];
description.host ¬ CrRPC.GetRope[s];
description.directory ¬ CrRPC.GetRope[s];
description.refCount ¬ CrRPC.GetCard16[s];
description.version ¬ CrRPC.GetCard32[s];
description.fieldList ¬ UProc1[h, s];
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~14 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
GetVersion: PUBLIC GetVersionType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
};
GetResults: CrRPC.GetResultsProc ~ {
version ¬ CrRPC.GetCard32[s];
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~12 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
MakeAcceleratorFileForField: PUBLIC MakeAcceleratorFileForFieldType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
CrRPC.PutRope[s, fieldName];
MProc2[h, s, fieldList];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~22 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
UpdateAccelerators: PUBLIC UpdateAcceleratorsType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
MProc3[h, s, arSet];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~5 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
GetStartOrStopTime: PUBLIC GetStartOrStopTimeType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
CrRPC.PutCard16[s, ORD[which]];
};
GetResults: CrRPC.GetResultsProc ~ {
startOrStopTime ¬ CrRPC.GetCard32[s];
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~20 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
GetResidentSystems: PUBLIC GetResidentSystemsType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
};
GetResults: CrRPC.GetResultsProc ~ {
systems ¬ UProc4[h, s];
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~17 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
CompletedUpdate: PUBLIC CompletedUpdateType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
CrRPC.PutCard32[s, arNumber];
CrRPC.PutCard32[s, 0];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~8 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
CountQL: PROCEDURE [arSet: SetOfARs] RETURNS [count: CARDINAL ¬ 0] = {
FOR i: CARD IN [0..arSet.len) DO
count ¬ count + arSet.body[i].runLength;
ENDLOOP;
};
UProcExtra: PROCEDURE [h: CrRPC.Handle, s: CrRPC.STREAM, numARs, numFields: CARDINAL] RETURNS [accInfo: AcceleratorInfo] = {
accInfo ¬ NEW[AcceleratorInfoRec[numARs]];
FOR i: CARD IN [0..accInfo.len) DO
accInfo.body[i] ¬ NEW[FieldDataRec[numFields]];
FOR j: CARD IN [0..accInfo.body[i].len] DO
accInfo.body[i].body[j] ¬ CrRPC.GetRope[s];
ENDLOOP;
ENDLOOP;
};
GetAcceleratorInfo: PUBLIC GetAcceleratorInfoType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
tmp222: CARD16 ¬ 0;
CrRPC.PutRope[s, instance.target.system];
CrRPC.PutCard32[s, instance.version];
tmp222 ¬ MProc3Plus1[h, s, arSet];
MProc2Plus1[h, s, fieldList, tmp222];
CrRPCBuggy.PutBulkDataSinkBuggy[h, s, to];
};
GetResults: CrRPC.GetResultsProc ~ {
accInfo ← UProcExtra[h, s, CountQL[arSet], fieldList.length];
NULL
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~21 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
PutStartOrStopTime: PUBLIC PutStartOrStopTimeType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
CrRPC.PutCard16[s, ORD[which]];
CrRPC.PutCard32[s, startOrStopTime];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~19 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
ChangeLocationOfARs: PUBLIC ChangeLocationOfARsType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
CrRPC.PutRope[s, newLocation.host];
CrRPC.PutRope[s, newLocation.directory];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~10 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
ChangeFieldList: PUBLIC ChangeFieldListType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, instance.target.system];
CrRPC.PutCard32[s, instance.version];
MProc5[h, s, changes];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~11 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
VerifyVersion: PUBLIC VerifyVersionType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, instance.target.system];
CrRPC.PutCard32[s, instance.version];
};
GetResults: CrRPC.GetResultsProc ~ {
ok ¬ CrRPC.GetBool[s];
};
ok ¬ FALSE;
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~18 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
PutSubmitNumber: PUBLIC PutSubmitNumberType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
CrRPC.PutCard32[s, submitNumber];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~1 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
GetSystemDefaultUserFile: PUBLIC GetSystemDefaultUserFileType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
CrRPCBuggy.PutBulkDataSinkBuggy[h, s, to];
};
GetResults: CrRPC.GetResultsProc ~ {
bytesInFile ← CrRPC.GetCard16[s];
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~16 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
LookupARs: PUBLIC LookupARsType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, instance.target.system];
CrRPC.PutCard32[s, instance.version];
CrRPC.PutRope[s, query.name];
CrRPC.PutCard16[s, ORD[query.value.relationalOp]];
CrRPC.PutCard16[s, ORD[query.value.relationalOp]];
CrRPC.PutCard16[s, ORD[query.value.value.type]];
MProc6Plus1[h, s, query.value.value, boundSet.len];
MProc3[h, s, boundSet];
CrRPC.PutCard16[s, 0];
};
GetResults: CrRPC.GetResultsProc ~ {
arSet ¬ UProc7[h, s];
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~4 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
AboutToStore: PUBLIC AboutToStoreType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, instance.target.system];
CrRPC.PutCard32[s, arNumber];
CrRPC.PutCard32[s, instance.version];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~6 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
ReadLastARNumber: PUBLIC ReadLastARNumberType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
};
GetResults: CrRPC.GetResultsProc ~ {
lastAR ¬ CrRPC.GetCard32[s];
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~2 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
UpdateAcceleratorField: PUBLIC UpdateAcceleratorFieldType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, instance.target.system];
CrRPC.PutCard32[s, arNumber];
CrRPC.PutCard32[s, instance.version];
CrRPC.PutRope[s, fieldName];
MProc6Plus2[h, s, field];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~7 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
PutSystemDescription: PUBLIC PutSystemDescriptionType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
CrRPC.PutRope[s, description.name];
CrRPC.PutRope[s, description.host];
CrRPC.PutRope[s, description.directory];
CrRPC.PutCard16[s, description.refCount];
CrRPC.PutCard32[s, description.version];
MProc2[h, s, description.fieldList];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~13 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
GetNextSubmitNumber: PUBLIC GetNextSubmitNumberType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
};
GetResults: CrRPC.GetResultsProc ~ {
submitNumber ¬ CrRPC.GetCard32[s];
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~0 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
PutSystemDefaultUserFile: PUBLIC PutSystemDefaultUserFileType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
CrRPC.PutBulkDataSource[h, s, from];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~15 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
GetLocationOfARs: PUBLIC GetLocationOfARsType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
};
GetResults: CrRPC.GetResultsProc ~ {
referenceToARs ¬ UProc8[h, s];
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~9 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
SubmitFailed: PUBLIC SubmitFailedType ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutRope[s, target.system];
CrRPC.PutCard32[s, arNumber];
CrRPC.PutCard32[s, version];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~75, remotePgmVersion~2, remoteProc~3 , putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
Unmarshal / Marshal Procs --
MProc6: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: FieldItemObject] ~ {
CrRPC.PutCard16[s, ORD[val.type]];
CrRPC.PutRope[s, val.name];
FOR i10: ToolType IN ToolType DO
CrRPC.PutRope[s, val.defaultInfo[i10].default];
CrRPC.PutBool[s, val.defaultInfo[i10].systemMust];
CrRPC.PutInt16[s, val.defaultInfo[i10].place.ord];
CrRPC.PutInt16[s, val.defaultInfo[i10].place.co];
CrRPC.PutCard16[s, val.defaultInfo[i10].width];
ENDLOOP;
WITH val SELECT FROM
it: REF FieldItemObjectRec.arId => {
NULL; -- RECORD [] --
};
it: REF FieldItemObjectRec.dateTime => {
NULL; -- RECORD [] --
};
it: REF FieldItemObjectRec.numeric => {
NULL; -- RECORD [] --
};
it: REF FieldItemObjectRec.fixedLengthString => {
CrRPC.PutCard16[s, it.maxLength];
};
it: REF FieldItemObjectRec.enumerated => {
CrRPC.PutCard16[s, it.field];
MProc15[h, s, it.possibilities];
};
it: REF FieldItemObjectRec.string => {
NULL; -- RECORD [] --
};
ENDCASE;
};
MProc6Plus2: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: FieldItemValue] ~ {
CrRPC.PutCard16[s, ORD[val.type]];
WITH val SELECT FROM
it: REF FieldItemValueRec.arId => {
CrRPC.PutCard32[s, it.ar];
};
it: REF FieldItemValueRec.dateTime => {
IF it.time = BasicTime.nullGMT THEN
CrRPC.PutCard32[s, 0]
ELSE
CrRPC.PutInt32[s, LOOPHOLE[it.time]];
};
it: REF FieldItemValueRec.numeric => {
lo, hi: CARD16;
lo ¬ it.number MOD (LAST[CARD16] + 1);
hi ¬ (it.number - lo ) / (LAST[CARD16] + 1);
CrRPC.PutCard16[s, hi];
CrRPC.PutCard16[s, lo];
};
it: REF FieldItemValueRec.fixedLengthString => {
r: Rope.ROPE ¬ it.string;
IF r = NIL OR r.Length = 0 OR Rope.IsEmpty[r] THEN
CrRPC.PutCard16[s, 0]
ELSE
CrRPC.PutRope[s, r];
CrRPC.PutCard16[s, it.maxLength];
};
it: REF FieldItemValueRec.enumerated => {
CrRPC.PutCard16[s, it.enumVal];
};
ENDCASE;
};
MProc6Plus1: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: FieldItemValue, len: CARD] ~ {
WITH val SELECT FROM
it: REF FieldItemValueRec.arId => {
CrRPC.PutCard32[s, it.ar];
CrRPC.PutCard16[s, len];
};
it: REF FieldItemValueRec.dateTime => {
CrRPC.PutCard16[s, len];
CrRPC.PutInt32[s, LOOPHOLE[it.time]];
};
it: REF FieldItemValueRec.numeric => {
c: CARD16 ¬ it.number;
CrRPC.PutCard16[s, len];
CrRPC.PutCard16[s, c];
CrRPC.PutCard16[s, 0];
};
it: REF FieldItemValueRec.fixedLengthString => {
CrRPC.PutRope[s, it.string];
CrRPC.PutCard16[s, len];
CrRPC.PutCard16[s, it.maxLength];
};
it: REF FieldItemValueRec.enumerated => {
c: CARD16 ¬ it.enumVal;
CrRPC.PutCard16[s, len];
CrRPC.PutCard16[s, c];
};
ENDCASE;
};
MProc5: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: ChangeList] ~ {
CrRPC.PutCard16[s, val.length];
FOR i17: CARDINAL IN [0..val.length) DO
CrRPC.PutRope[s, val.seq[i17].oldFieldName];
MProc18[h, s, val.seq[i17].newItem];
ENDLOOP;
};
MProc2: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: FieldList] ~ {
CrRPC.PutCard16[s, val.length];
FOR i19: CARDINAL IN [0..val.length) DO
MProc6[h, s, val.flSeq[i19]];
ENDLOOP;
};
MProc2Plus1: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: FieldList, lastRunLength: CARD16] ~ {
CrRPC.PutCard16[s, val.length];
CrRPC.PutCard16[s, lastRunLength];
CrRPC.PutCard16[s, 0];
CrRPC.PutCard16[s, val.length];
CrRPC.PutCard16[s, val.length];
FOR i19: CARDINAL IN [0..val.length) DO
CrRPC.PutRope[s, val.flSeq[i19].name];
ENDLOOP;
};
MProc15: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: KeyedPossibilities] ~ {
CrRPC.PutCard16[s, val.length];
FOR i20: CARDINAL IN [0..val.length) DO
CrRPC.PutCard16[s, val.seq[i20].keyedDependency];
MProc21[h, s, val.seq[i20].enumRecs];
ENDLOOP;
};
MProc3: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: SetOfARs] ~ {
tmp111: CARD16 ¬ 0;
CrRPC.PutCard16[s, val.len];
CrRPC.PutCard16[s, val.len];
FOR i22: CARDINAL IN [0..val.len) DO
CrRPC.PutCard32[s, val.body[i22].startValue];
tmp111 ¬ val.body[i22].runLength;
CrRPC.PutCard16[s, tmp111];
CrRPC.PutCard16[s, tmp111];
CrRPC.PutCard16[s, 0];
ENDLOOP;
};
MProc3Plus1: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: SetOfARs] RETURNS [lastRunLength: CARD16 ¬ 0] ~ {
tmp111: CARD16 ¬ 0;
CrRPC.PutCard16[s, val.len];
CrRPC.PutCard16[s, val.len];
CrRPC.PutCard16[s, val.len];
FOR i22: CARDINAL IN [0..val.len) DO
CrRPC.PutCard32[s, val.body[i22].startValue];
tmp111 ¬ val.body[i22].runLength;
lastRunLength ¬ tmp111;
CrRPC.PutCard16[s, tmp111];
IF i22 # val.len-1 THEN {
CrRPC.PutCard16[s, tmp111];
CrRPC.PutCard16[s, 0];
};
ENDLOOP;
};
UProc1: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: FieldList] ~ {
{
length24: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[FieldListArray[length24]];
FOR i23: CARDINAL IN [0..length24) DO
res.flSeq[i23] ¬ UProc25[h, s];
ENDLOOP;
};
};
UProc7: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: SetOfARs] ~ {
{
length27: CARDINAL;
length27 ¬ CrRPC.GetCard16[s];
length27 ¬ CrRPC.GetCard16[s];
length27 ¬ CrRPC.GetCard16[s];
res ¬ NEW[SetOfARsObject[length27]];
FOR i26: CARDINAL IN [0..length27) DO
res.body[i26].startValue ¬ CrRPC.GetCard32[s];
res.body[i26].runLength ¬ CrRPC.GetCard16[s];
res.body[i26].runLength ¬ CrRPC.GetCard16[s];
[] ¬ CrRPC.GetCard16[s];
ENDLOOP;
};
};
UProc4: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: DatabaseSequence] ~ {
{
length29: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[DatabaseSequenceObject[length29]];
FOR i28: CARDINAL IN [0..length29) DO
res.body[i28] ¬ CrRPC.GetRope[s];
ENDLOOP;
};
};
MProc21: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: EnumeratedSequence] ~ {
CrRPC.PutCard16[s, val.length];
FOR i30: CARDINAL IN [0..val.length) DO
CrRPC.PutRope[s, val.seq[i30].tag];
CrRPC.PutCard16[s, val.seq[i30].item];
ENDLOOP;
};
UProc8: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: NSName] ~ {
{
tmp1, tmp2: CARD32 ¬ 0;
tmp3: CARD ¬ 0;
res ¬ NEW[NSNameObject];
tmp1 ¬ CrRPC.GetCard32[s];
tmp2 ¬ CrRPC.GetCard32[s];
tmp3 ¬ CrRPC.GetCard16[s];
res.org ¬ CrRPC.GetRope[s];
res.domain ¬ CrRPC.GetRope[s];
res.local ¬ CrRPC.GetRope[s];
length32: CARDINAL ~ CrRPC.GetCard16[s];
res ← NEW[ReferenceObject[length32]];
FOR i31: CARDINAL IN [0..length32) DO
res.body[i31] ← CrRPC.GetCard16[s];
ENDLOOP;
};
};
UProc25: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: FieldItemObject] ~ {
{
tag33: FieldType ~ VAL[CrRPC.GetCard16[s]];
temp34: ROPE ¬ CrRPC.GetRope[s];
temp34a: ToolData;
length44a: CARD16;
FOR i35a: ToolType IN ToolType DO
temp34a[i35a] ¬ NEW[DefaultInfoObject];
temp34a[i35a].default ¬ CrRPC.GetRope[s];
length44a ¬ CrRPC.GetCard16[s];
temp34a[i35a].systemMust ¬ (length44a # 0);
temp34a[i35a].place.ord ¬ CrRPC.GetInt16[s];
temp34a[i35a].place.co ¬ CrRPC.GetInt16[s];
temp34a[i35a].width ¬ CrRPC.GetCard16[s];
ENDLOOP;
SELECT tag33 FROM
arId => {
res ¬ NEW[FieldItemObjectRec.arId ¬ [temp34, NIL, temp34a, arId[]]] };
dateTime => {
res ¬ NEW[FieldItemObjectRec.dateTime ¬ [temp34, NIL, temp34a, dateTime[]]] };
numeric => {
res ¬ NEW[FieldItemObjectRec.numeric ¬ [temp34, NIL, temp34a, numeric[]]] };
fixedLengthString => {
tempLength: CARD16 ¬ CrRPC.GetCard16[s];
res ¬ NEW[FieldItemObjectRec.fixedLengthString ¬
[temp34, NIL, temp34a, fixedLengthString[tempLength]]] };
enumerated => {
badLength: CARDINAL ~ CrRPC.GetCard16[s];
tmpDependsOn: CARDINAL ¬ CrRPC.GetCard16[s];
tmpPoss: KeyedPossibilities ¬ UProc40[h, s, length44a];
res ¬ NEW[FieldItemObjectRec.enumerated ¬
[temp34, NIL, temp34a, enumerated[tmpDependsOn, tmpPoss]]] };
string => {
res ¬ NEW[FieldItemObjectRec.string ¬ [temp34, NIL, temp34a, string[]]] };
ENDCASE => ERROR;
SELECT tag33 FROM
arId => {
temp34: ARField;
FOR i35: CARDINAL IN [0..6) DO
temp34.tools[i35].default ← CrRPC.GetRope[s];
temp34.tools[i35].required ← CrRPC.GetBool[s];
temp34.tools[i35].place.ord ← CrRPC.GetInt16[s];
temp34.tools[i35].place.co ← CrRPC.GetInt16[s];
temp34.tools[i35].width ← CrRPC.GetCard16[s];
ENDLOOP;
temp34.ar.null ← 0;
res ← NEW[FieldItemObjectRec.ar ← [ar[temp34]]] };
time => {
temp34: TimeField;
FOR i36: CARDINAL IN [0..6) DO
temp34.tools[i36].default ← CrRPC.GetRope[s];
temp34.tools[i36].required ← CrRPC.GetBool[s];
temp34.tools[i36].place.ord ← CrRPC.GetInt16[s];
temp34.tools[i36].place.co ← CrRPC.GetInt16[s];
temp34.tools[i36].width ← CrRPC.GetCard16[s];
ENDLOOP;
temp34.time.null ← 0;
res ← NEW[FieldItemObjectRec.time ← [time[temp34]]] };
numeric => {
temp34: NumericField;
FOR i37: CARDINAL IN [0..6) DO
temp34.tools[i37].default ← CrRPC.GetRope[s];
temp34.tools[i37].required ← CrRPC.GetBool[s];
temp34.tools[i37].place.ord ← CrRPC.GetInt16[s];
temp34.tools[i37].place.co ← CrRPC.GetInt16[s];
temp34.tools[i37].width ← CrRPC.GetCard16[s];
ENDLOOP;
temp34.numeric.null ← 0;
res ← NEW[FieldItemObjectRec.numeric ← [numeric[temp34]]] };
bounded => {
temp34: BoundedField;
FOR i38: CARDINAL IN [0..6) DO
temp34.tools[i38].default ← CrRPC.GetRope[s];
temp34.tools[i38].required ← CrRPC.GetBool[s];
temp34.tools[i38].place.ord ← CrRPC.GetInt16[s];
temp34.tools[i38].place.co ← CrRPC.GetInt16[s];
temp34.tools[i38].width ← CrRPC.GetCard16[s];
ENDLOOP;
temp34.bounded ← CrRPC.GetCard16[s];
res ← NEW[FieldItemObjectRec.bounded ← [bounded[temp34]]] };
enumerated => {
temp34: EnumeratedField;
length44: CARDINAL; -- LOOPHOLE[temp34.tools[5].required];
FOR i39: CARDINAL IN [0..6) DO
temp34.tools[i39].default ← CrRPC.GetRope[s];
length44 ← CrRPC.GetCard16[s];
temp34.tools[i39].required ← ( length44 # 0 ); -- CrRPC.GetBool[s];
temp34.tools[i39].place.ord ← CrRPC.GetInt16[s];
temp34.tools[i39].place.co ← CrRPC.GetInt16[s];
temp34.tools[i39].width ← CrRPC.GetCard16[s];
ENDLOOP;
{
badLength: CARDINAL ~ CrRPC.GetCard16[s];
temp34.field ← CrRPC.GetCard16[s];
temp34.possibilities ← UProc40[h, s, length44];
};
res ← NEW[FieldItemObjectRec.enumerated ← [enumerated[temp34]]] };
string => {
temp34: StringField;
FOR i41: CARDINAL IN [0..6) DO
temp34.tools[i41].default ← CrRPC.GetRope[s];
temp34.tools[i41].required ← CrRPC.GetBool[s];
temp34.tools[i41].place.ord ← CrRPC.GetInt16[s];
temp34.tools[i41].place.co ← CrRPC.GetInt16[s];
temp34.tools[i41].width ← CrRPC.GetCard16[s];
ENDLOOP;
temp34.string.null ← 0;
res ← NEW[FieldItemObjectRec.string ← [string[temp34]]] };
ENDCASE => ERROR;
};
};
MProc18: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: ChangeItemValue] ~ {
CrRPC.PutCard16[s, ORD[val.type]];
WITH val SELECT FROM
it: REF ChangeItemValueObject.add => {
MProc6[h, s, it.newFlItem];
};
it: REF ChangeItemValueObject.modify => {
MProc6[h, s, it.newFlItem];
};
it: REF ChangeItemValueObject.remove => {
NULL; -- RECORD [] --
};
ENDCASE;
};
UProc40: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, length44: CARDINAL]
RETURNS [res: KeyedPossibilities] ~ {
length44: CARDINAL ~ CrRPC.GetCard16[s];
misplaced: CARDINAL ¬ CrRPC.GetCard16[s]; -- IF ( i43 = 0 )
res ¬ NEW[KeyedPossibilitiesSeq[length44]];
FOR i43: CARDINAL IN [0..length44) DO
UProc45: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, length47: CARDINAL]
RETURNS [res: EnumeratedSequence] ~ {
length47: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[EnumeratedSequenceType[length47]];
FOR i46: CARDINAL IN [0..length47) DO
res.seq[i46].tag ¬ CrRPC.GetRope[s];
IF ( ( i46 = length47.PRED ) AND ( i43 # length44.PRED ) )
THEN misplaced ¬ CrRPC.GetCard16[s];
res.seq[i46].item ¬ CrRPC.GetCard16[s];
ENDLOOP;
};
res.seq[i43].keyedDependency ¬ CrRPC.GetCard16[s];
res.seq[i43].enumRecs ¬ UProc45[h, s, misplaced];
ENDLOOP;
};
}...