AdobeP75V2ServerImpl.Mesa
Copyright Ó 1989, 1992 by Xerox Corporation. All rights reserved.
Generated by BJackson.pa at March 27, 1990 2:04:39 pm PST
using Sirocco [2.0] of February 10, 1989 6:26:26 pm PST
Philip James, March 19, 1991 4:45 pm PST
Christian Jacobi, April 7, 1992 5:01 pm PDT
NOTE: Search for XXX to find problem
DIRECTORY
CrRPC,
BasicTime,
TimeP15V2,
CHNameP2V0,
BulkDataP0V1,
AdobeP75V2;
AdobeP75V2ServerImpl: CEDAR PROGRAM
IMPORTS CrRPC, AdobeP75V2 ~ {
OPEN AdobeP75V2;
GetSystemDescriptionCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
description: Description;
{
target.system ¬ CrRPC.GetRope[s];
};
[description] ¬ GetSystemDescription[h, target];
beginReturn[h];
{
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];
MProc48[h, s, description.fieldList];
};
};
GetVersionCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
version: CARD32;
{
target.system ¬ CrRPC.GetRope[s];
};
[version] ¬ GetVersion[h, target];
beginReturn[h];
{
CrRPC.PutCard32[s, version];
};
};
MakeAcceleratorFileForFieldCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
fieldName: ROPE;
fieldList: FieldList;
{
target.system ¬ CrRPC.GetRope[s];
};
{
fieldName ¬ CrRPC.GetRope[s];
};
{
fieldList ¬ UProc49[h, s];
};
[] ¬ MakeAcceleratorFileForField[h, target, fieldName, fieldList];
beginReturn[h];
};
UpdateAcceleratorsCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
arSet: SetOfARs;
{
target.system ¬ CrRPC.GetRope[s];
};
{
arSet ¬ UProc50[h, s];
};
[] ¬ UpdateAccelerators[h, target, arSet];
beginReturn[h];
};
GetStartOrStopTimeCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
which: StartOrStop;
startOrStopTime: CARD32;
{
target.system ¬ CrRPC.GetRope[s];
};
{
which ¬ VAL[CrRPC.GetCard16[s]];
};
[startOrStopTime] ¬ GetStartOrStopTime[h, target, which];
beginReturn[h];
{
CrRPC.PutCard32[s, startOrStopTime];
};
};
GetResidentSystemsCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
systems: DatabaseSequence;
[systems] ¬ GetResidentSystems[h];
beginReturn[h];
{
MProc51[h, s, systems];
};
};
CompletedUpdateCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
arNumber: CARD32;
{
target.system ¬ CrRPC.GetRope[s];
};
{
arNumber ¬ CrRPC.GetCard32[s];
};
[] ¬ CompletedUpdate[h, target, arNumber];
beginReturn[h];
};
GetAcceleratorInfoCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
instance: StaticTarget;
arSet: SetOfARs;
fieldList: FieldList;
to: CrRPC.BulkDataSink;
{
instance.target.system ¬ CrRPC.GetRope[s];
instance.version ¬ CrRPC.GetCard32[s];
};
{
arSet ¬ UProc50[h, s];
};
{
fieldList ¬ UProc49[h, s];
};
TRUSTED {
to ¬ CrRPC.GetBulkDataSink[h, s];
};
[] ¬ GetAcceleratorInfo[h, instance, arSet, fieldList, to];
beginReturn[h];
};
PutStartOrStopTimeCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
which: StartOrStop;
startOrStopTime: CARD32;
{
target.system ¬ CrRPC.GetRope[s];
};
{
which ¬ VAL[CrRPC.GetCard16[s]];
};
{
startOrStopTime ¬ CrRPC.GetCard32[s];
};
[] ¬ PutStartOrStopTime[h, target, which, startOrStopTime];
beginReturn[h];
};
ChangeLocationOfARsCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
newLocation: LocationTarget;
{
target.system ¬ CrRPC.GetRope[s];
};
{
newLocation.host ¬ CrRPC.GetRope[s];
newLocation.directory ¬ CrRPC.GetRope[s];
};
[] ¬ ChangeLocationOfARs[h, target, newLocation];
beginReturn[h];
};
ChangeFieldListCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
instance: StaticTarget;
changes: ChangeList;
{
instance.target.system ¬ CrRPC.GetRope[s];
instance.version ¬ CrRPC.GetCard32[s];
};
{
changes ¬ UProc52[h, s];
};
[] ¬ ChangeFieldList[h, instance, changes];
beginReturn[h];
};
VerifyVersionCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
instance: StaticTarget;
ok: BOOLEAN;
{
instance.target.system ¬ CrRPC.GetRope[s];
instance.version ¬ CrRPC.GetCard32[s];
};
[ok] ¬ VerifyVersion[h, instance];
beginReturn[h];
{
CrRPC.PutBool[s, ok];
};
};
PutSubmitNumberCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
submitNumber: CARD32;
{
target.system ¬ CrRPC.GetRope[s];
};
{
submitNumber ¬ CrRPC.GetCard32[s];
};
[] ¬ PutSubmitNumber[h, target, submitNumber];
beginReturn[h];
};
GetSystemDefaultUserFileCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
to: CrRPC.BulkDataSink;
bytesInFile: CARD16 ¬ 0; --XXX Gets no reasonable value ChJ April 7, 1992
{
target.system ¬ CrRPC.GetRope[s];
};
TRUSTED {
to ¬ CrRPC.GetBulkDataSink[h, s];
};
--[bytesInFile] ¬-- GetSystemDefaultUserFile[h, target, to];
beginReturn[h];
{
CrRPC.PutCard16[s, bytesInFile];
};
};
LookupARsCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
instance: StaticTarget;
query: QueryItem;
boundSet: SetOfARs;
arSet: SetOfARs;
{
instance.target.system ¬ CrRPC.GetRope[s];
instance.version ¬ CrRPC.GetCard32[s];
};
{
query.name ¬ CrRPC.GetRope[s];
query.value.relationalOp ¬ VAL[CrRPC.GetCard16[s]];
query.value.value ¬ UProc54[h, s];
};
{
boundSet ¬ UProc50[h, s];
};
[arSet] ¬ LookupARs[h, instance, query, boundSet];
beginReturn[h];
{
MProc54[h, s, arSet];
};
};
AboutToStoreCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
instance: StaticTarget;
arNumber: CARD32;
{
instance.target.system ¬ CrRPC.GetRope[s];
instance.version ¬ CrRPC.GetCard32[s];
};
{
arNumber ¬ CrRPC.GetCard32[s];
};
[] ¬ AboutToStore[h, instance, arNumber];
beginReturn[h];
};
ReadLastARNumberCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
lastAR: CARD32;
{
target.system ¬ CrRPC.GetRope[s];
};
[lastAR] ¬ ReadLastARNumber[h, target];
beginReturn[h];
{
CrRPC.PutCard32[s, lastAR];
};
};
UpdateAcceleratorFieldCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
instance: StaticTarget;
arNumber: CARD32;
field: FieldItemObject;
{
instance.target.system ¬ CrRPC.GetRope[s];
instance.version ¬ CrRPC.GetCard32[s];
};
{
arNumber ¬ CrRPC.GetCard32[s];
};
{
field ¬ UProc53[h, s];
};
-- took out for lack of time to fix
[] ← UpdateAcceleratorField[h, instance, arNumber, field];
beginReturn[h];
};
PutSystemDescriptionCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
description: Description;
{
target.system ¬ CrRPC.GetRope[s];
};
{
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 ¬ UProc49[h, s];
};
[] ¬ PutSystemDescription[h, target, description];
beginReturn[h];
};
GetNextSubmitNumberCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
submitNumber: CARD32;
{
target.system ¬ CrRPC.GetRope[s];
};
[submitNumber] ¬ GetNextSubmitNumber[h, target];
beginReturn[h];
{
CrRPC.PutCard32[s, submitNumber];
};
};
PutSystemDefaultUserFileCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
from: CrRPC.BulkDataSource;
{
target.system ¬ CrRPC.GetRope[s];
};
TRUSTED {
from ¬ CrRPC.GetBulkDataSource[h, s];
};
[] ¬ PutSystemDefaultUserFile[h, target, from];
beginReturn[h];
};
GetLocationOfARsCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
referenceToARs: NSName;
{
target.system ¬ CrRPC.GetRope[s];
};
[referenceToARs] ¬ GetLocationOfARs[h, target];
beginReturn[h];
{
MProc55[h, s, referenceToARs];
};
};
SubmitFailedCaller: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, beginReturn: CrRPC.BeginReturnProc] ~ {
target: Target;
arNumber: CARD32;
version: CARD32;
{
target.system ¬ CrRPC.GetRope[s];
};
{
arNumber ¬ CrRPC.GetCard32[s];
};
{
version ¬ CrRPC.GetCard32[s];
};
[] ¬ SubmitFailed[h, target, arNumber, version];
beginReturn[h];
};
Server: CrRPC.ServerProc ~ {
[h: Handle, s: STREAM, pgm: CARD32, pgmVersion: CARD16, proc: CARD16, beginReturn: BeginReturnProc, beginError: BeginErrorProc, beginReject: BeginRejectProc]
ENABLE {
AdobeP75V2.FileNotFound => { -- (5 )
beginError[h, 5 ];
GOTO Finished;
};
AdobeP75V2.ServerDown => { -- (7 )
beginError[h, 7 ];
GOTO Finished;
};
AdobeP75V2.ParameterInconsistency => { -- (10 )
beginError[h, 10 ];
GOTO Finished;
};
AdobeP75V2.ObsoleteVersion => { -- (11 )
beginError[h, 11 ];
GOTO Finished;
};
AdobeP75V2.SysDescChanging => { -- (13 )
beginError[h, 13 ];
GOTO Finished;
};
AdobeP75V2.CantDetermineLocOfARs => { -- (2 )
beginError[h, 2 ];
GOTO Finished;
};
AdobeP75V2.SystemAlreadyExists => { -- (4 )
beginError[h, 4 ];
GOTO Finished;
};
AdobeP75V2.NoAdobeServiceAtServer => { -- (8 )
beginError[h, 8 ];
GOTO Finished;
};
AdobeP75V2.CommunicationError => { -- (0 )
beginError[h, 0 ];
GOTO Finished;
};
AdobeP75V2.IllegalLogin => { -- (3 )
beginError[h, 3 ];
GOTO Finished;
};
AdobeP75V2.Others => { -- (14 )
beginError[h, 14 ];
GOTO Finished;
};
AdobeP75V2.SystemNotRegistered => { -- (12 )
beginError[h, 12 ];
GOTO Finished;
};
AdobeP75V2.Error => { -- (99 )
beginError[h, 99 ];
CrRPC.PutCard16[s, ORD[why]];
GOTO Finished;
};
AdobeP75V2.Xxx => { -- (31 )
beginError[h, 31 ];
GOTO Finished;
};
AdobeP75V2.UnknownSystem => { -- (1 )
beginError[h, 1 ];
GOTO Finished;
};
AdobeP75V2.Spare2 => { -- (17 )
beginError[h, 17 ];
GOTO Finished;
};
AdobeP75V2.Spare1 => { -- (16 )
beginError[h, 16 ];
GOTO Finished;
};
AdobeP75V2.CourierTimedOut => { -- (9 )
beginError[h, 9 ];
GOTO Finished;
};
AdobeP75V2.TooManyConnections => { -- (15 )
beginError[h, 15 ];
GOTO Finished;
};
AdobeP75V2.ServerUnreachable => { -- (6 )
beginError[h, 6 ];
GOTO Finished;
};
};
IF (pgmVersion # 2) THEN {
beginReject[h, CrRPC.noSuchVersion];
CrRPC.PutCard16[s, 2]; --low
CrRPC.PutCard16[s, 2]; --high
RETURN
};
SELECT proc FROM
14 => GetSystemDescriptionCaller[h, s, beginReturn];
12 => GetVersionCaller[h, s, beginReturn];
22 => MakeAcceleratorFileForFieldCaller[h, s, beginReturn];
5 => UpdateAcceleratorsCaller[h, s, beginReturn];
20 => GetStartOrStopTimeCaller[h, s, beginReturn];
17 => GetResidentSystemsCaller[h, s, beginReturn];
8 => CompletedUpdateCaller[h, s, beginReturn];
21 => GetAcceleratorInfoCaller[h, s, beginReturn];
19 => PutStartOrStopTimeCaller[h, s, beginReturn];
10 => ChangeLocationOfARsCaller[h, s, beginReturn];
11 => ChangeFieldListCaller[h, s, beginReturn];
18 => VerifyVersionCaller[h, s, beginReturn];
1 => PutSubmitNumberCaller[h, s, beginReturn];
16 => GetSystemDefaultUserFileCaller[h, s, beginReturn];
4 => LookupARsCaller[h, s, beginReturn];
6 => AboutToStoreCaller[h, s, beginReturn];
2 => ReadLastARNumberCaller[h, s, beginReturn];
7 => UpdateAcceleratorFieldCaller[h, s, beginReturn];
13 => PutSystemDescriptionCaller[h, s, beginReturn];
0 => GetNextSubmitNumberCaller[h, s, beginReturn];
15 => PutSystemDefaultUserFileCaller[h, s, beginReturn];
9 => GetLocationOfARsCaller[h, s, beginReturn];
3 => SubmitFailedCaller[h, s, beginReturn];
ENDCASE => {
beginReject[h, CrRPC.noSuchProcedure];
};
EXITS
Finished => { NULL };
};
Unmarshal / Marshal Procs --
UProc53: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: FieldItemObject] ~ {
{
tag56: FieldType ~ VAL[CrRPC.GetCard16[s]];
temp57a: ROPE ¬ CrRPC.GetRope[s];
temp58a: ToolData;
FOR i58a: ToolType IN ToolType DO
temp58a[i58a] ¬ NEW[DefaultInfoObject];
temp58a[i58a].default ¬ CrRPC.GetRope[s];
temp58a[i58a].systemMust ¬ CrRPC.GetBool[s];
temp58a[i58a].place.ord ¬ CrRPC.GetInt16[s];
temp58a[i58a].place.co ¬ CrRPC.GetInt16[s];
temp58a[i58a].width ¬ CrRPC.GetCard16[s];
ENDLOOP;
SELECT tag56 FROM
arId => {
temp57: ARField;
temp57.name ← CrRPC.GetRope[s];
FOR i58: CARDINAL IN [0..6) DO
temp57.tools[i58].default ← CrRPC.GetRope[s];
temp57.tools[i58].required ← CrRPC.GetBool[s];
temp57.tools[i58].place.ord ← CrRPC.GetInt16[s];
temp57.tools[i58].place.co ← CrRPC.GetInt16[s];
temp57.tools[i58].width ← CrRPC.GetCard16[s];
ENDLOOP;
temp57.ar.null ← 0;
res ¬ NEW[FieldItemObjectRec.arId ¬ [temp57a, NIL, temp58a, arId[]]] };
dateTime => {
temp57: TimeField;
temp57.name ← CrRPC.GetRope[s];
FOR i59: CARDINAL IN [0..6) DO
temp57.tools[i59].default ← CrRPC.GetRope[s];
temp57.tools[i59].required ← CrRPC.GetBool[s];
temp57.tools[i59].place.ord ← CrRPC.GetInt16[s];
temp57.tools[i59].place.co ← CrRPC.GetInt16[s];
temp57.tools[i59].width ← CrRPC.GetCard16[s];
ENDLOOP;
temp57.time.null ← 0;
res ¬ NEW[FieldItemObjectRec.dateTime ¬ [temp57a, NIL, temp58a, dateTime[]]] };
numeric => {
temp57: NumericField;
temp57.name ← CrRPC.GetRope[s];
FOR i60: CARDINAL IN [0..6) DO
temp57.tools[i60].default ← CrRPC.GetRope[s];
temp57.tools[i60].required ← CrRPC.GetBool[s];
temp57.tools[i60].place.ord ← CrRPC.GetInt16[s];
temp57.tools[i60].place.co ← CrRPC.GetInt16[s];
temp57.tools[i60].width ← CrRPC.GetCard16[s];
ENDLOOP;
temp57.numeric.null ← 0;
res ¬ NEW[FieldItemObjectRec.numeric ¬ [temp57a, NIL, temp58a, numeric[]]] };
fixedLengthString => {
tempLen: CARD16;
temp57: BoundedField;
temp57.name ← CrRPC.GetRope[s];
FOR i61: CARDINAL IN [0..6) DO
temp57.tools[i61].default ← CrRPC.GetRope[s];
temp57.tools[i61].required ← CrRPC.GetBool[s];
temp57.tools[i61].place.ord ← CrRPC.GetInt16[s];
temp57.tools[i61].place.co ← CrRPC.GetInt16[s];
temp57.tools[i61].width ← CrRPC.GetCard16[s];
ENDLOOP;
tempLen ¬ CrRPC.GetCard16[s];
res ¬ NEW[FieldItemObjectRec.fixedLengthString ¬ [temp57a, NIL, temp58a, fixedLengthString[tempLen]]] };
enumerated => {
tempPoss: KeyedPossibilities;
tempDepend: CARD16;
temp57: EnumeratedField;
temp57.name ← CrRPC.GetRope[s];
FOR i62: CARDINAL IN [0..6) DO
temp57.tools[i62].default ← CrRPC.GetRope[s];
temp57.tools[i62].required ← CrRPC.GetBool[s];
temp57.tools[i62].place.ord ← CrRPC.GetInt16[s];
temp57.tools[i62].place.co ← CrRPC.GetInt16[s];
temp57.tools[i62].width ← CrRPC.GetCard16[s];
ENDLOOP;
tempDepend ¬ CrRPC.GetCard16[s];
tempPoss ¬ UProc63[h, s];
res ¬ NEW[FieldItemObjectRec.enumerated ¬ [temp57a, NIL, temp58a, enumerated[tempDepend, tempPoss]]] };
string => {
temp57: StringField;
temp57.name ← CrRPC.GetRope[s];
FOR i64: CARDINAL IN [0..6) DO
temp57.tools[i64].default ← CrRPC.GetRope[s];
temp57.tools[i64].required ← CrRPC.GetBool[s];
temp57.tools[i64].place.ord ← CrRPC.GetInt16[s];
temp57.tools[i64].place.co ← CrRPC.GetInt16[s];
temp57.tools[i64].width ← CrRPC.GetCard16[s];
ENDLOOP;
temp57.string.null ← 0;
res ¬ NEW[FieldItemObjectRec.string ¬ [temp57a, NIL, temp58a, string[]]] };
ENDCASE => ERROR;
};
};
does the wrong THING !!!
UProc54: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: FieldItemValue] ~ {
{
tag56: FieldType ~ VAL[CrRPC.GetCard16[s]];
temp57a: ROPE ¬ CrRPC.GetRope[s];
temp58a: ToolData;
FOR i58a: ToolType IN ToolType DO
temp58a[i58a] ¬ NEW[DefaultInfoObject];
temp58a[i58a].default ¬ CrRPC.GetRope[s];
temp58a[i58a].systemMust ¬ CrRPC.GetBool[s];
temp58a[i58a].place.ord ¬ CrRPC.GetInt16[s];
temp58a[i58a].place.co ¬ CrRPC.GetInt16[s];
temp58a[i58a].width ¬ CrRPC.GetCard16[s];
ENDLOOP;
SELECT tag56 FROM
arId => {
temp57: ARField;
temp57.name ← CrRPC.GetRope[s];
FOR i58: CARDINAL IN [0..6) DO
temp57.tools[i58].default ← CrRPC.GetRope[s];
temp57.tools[i58].required ← CrRPC.GetBool[s];
temp57.tools[i58].place.ord ← CrRPC.GetInt16[s];
temp57.tools[i58].place.co ← CrRPC.GetInt16[s];
temp57.tools[i58].width ← CrRPC.GetCard16[s];
ENDLOOP;
temp57.ar.null ← 0;
res ¬ NEW[FieldItemValueRec.arId ¬ [arId[0]]] };
dateTime => {
temp57: TimeField;
temp57.name ← CrRPC.GetRope[s];
FOR i59: CARDINAL IN [0..6) DO
temp57.tools[i59].default ← CrRPC.GetRope[s];
temp57.tools[i59].required ← CrRPC.GetBool[s];
temp57.tools[i59].place.ord ← CrRPC.GetInt16[s];
temp57.tools[i59].place.co ← CrRPC.GetInt16[s];
temp57.tools[i59].width ← CrRPC.GetCard16[s];
ENDLOOP;
temp57.time.null ← 0;
res ¬ NEW[FieldItemValueRec.dateTime ¬ [dateTime[BasicTime.nullGMT]]] };
numeric => {
temp57: NumericField;
temp57.name ← CrRPC.GetRope[s];
FOR i60: CARDINAL IN [0..6) DO
temp57.tools[i60].default ← CrRPC.GetRope[s];
temp57.tools[i60].required ← CrRPC.GetBool[s];
temp57.tools[i60].place.ord ← CrRPC.GetInt16[s];
temp57.tools[i60].place.co ← CrRPC.GetInt16[s];
temp57.tools[i60].width ← CrRPC.GetCard16[s];
ENDLOOP;
temp57.numeric.null ← 0;
res ¬ NEW[FieldItemValueRec.numeric ¬ [numeric[0]]] };
fixedLengthString => {
tempLen: CARD16;
temp57: BoundedField;
temp57.name ← CrRPC.GetRope[s];
FOR i61: CARDINAL IN [0..6) DO
temp57.tools[i61].default ← CrRPC.GetRope[s];
temp57.tools[i61].required ← CrRPC.GetBool[s];
temp57.tools[i61].place.ord ← CrRPC.GetInt16[s];
temp57.tools[i61].place.co ← CrRPC.GetInt16[s];
temp57.tools[i61].width ← CrRPC.GetCard16[s];
ENDLOOP;
tempLen ¬ CrRPC.GetCard16[s];
res ¬ NEW[FieldItemValueRec.fixedLengthString ¬ [fixedLengthString[NIL]]] };
enumerated => {
tempPoss: KeyedPossibilities;
tempDepend: CARD16;
temp57: EnumeratedField;
temp57.name ← CrRPC.GetRope[s];
FOR i62: CARDINAL IN [0..6) DO
temp57.tools[i62].default ← CrRPC.GetRope[s];
temp57.tools[i62].required ← CrRPC.GetBool[s];
temp57.tools[i62].place.ord ← CrRPC.GetInt16[s];
temp57.tools[i62].place.co ← CrRPC.GetInt16[s];
temp57.tools[i62].width ← CrRPC.GetCard16[s];
ENDLOOP;
tempDepend ¬ CrRPC.GetCard16[s];
tempPoss ¬ UProc63[h, s];
res ¬ NEW[FieldItemValueRec.enumerated ¬ [enumerated[0]]] };
string => {
temp57: StringField;
temp57.name ← CrRPC.GetRope[s];
FOR i64: CARDINAL IN [0..6) DO
temp57.tools[i64].default ← CrRPC.GetRope[s];
temp57.tools[i64].required ← CrRPC.GetBool[s];
temp57.tools[i64].place.ord ← CrRPC.GetInt16[s];
temp57.tools[i64].place.co ← CrRPC.GetInt16[s];
temp57.tools[i64].width ← CrRPC.GetCard16[s];
ENDLOOP;
temp57.string.null ← 0;
res ← NEW[FieldItemValueRec.string ← [string[NIL]]] };
ENDCASE => ERROR;
};
};
MProc51: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: DatabaseSequence] ~ {
CrRPC.PutCard16[s, val.length];
FOR i65: CARDINAL IN [0..val.length) DO
CrRPC.PutRope[s, val.body[i65]];
ENDLOOP;
};
MProc48: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: FieldList] ~ {
CrRPC.PutCard16[s, val.length];
FOR i66: CARDINAL IN [0..val.length) DO
MProc67[h, s, val.flSeq[i66]];
ENDLOOP;
};
MProc55: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: NSName] ~ {
CrRPC.PutRope[s, val.org];
CrRPC.PutRope[s, val.domain];
CrRPC.PutRope[s, val.local];
CrRPC.PutCard16[s, val.length];
FOR i68: CARDINAL IN [0..val.length) DO
CrRPC.PutCard16[s, val.body[i68]];
ENDLOOP;
};
MProc54: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: SetOfARs] ~ {
CrRPC.PutCard16[s, val.len];
FOR i69: CARDINAL IN [0..val.len) DO
CrRPC.PutCard32[s, val.body[i69].startValue];
CrRPC.PutCard32[s, val.body[i69].runLength];
ENDLOOP;
};
UProc52: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: ChangeList] ~ {
{
length71: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[Changes[length71]];
FOR i70: CARDINAL IN [0..length71) DO
res.seq[i70].oldFieldName ¬ CrRPC.GetRope[s];
res.seq[i70].newItem ¬ UProc72[h, s];
ENDLOOP;
};
};
UProc49: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: FieldList] ~ {
{
length74: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[FieldListArray[length74]];
FOR i73: CARDINAL IN [0..length74) DO
res.flSeq[i73] ¬ UProc53[h, s];
ENDLOOP;
};
};
UProc72: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: ChangeItemValue] ~ {
{
tag75: ChangeType ~ VAL[CrRPC.GetCard16[s]];
SELECT tag75 FROM
add => {
temp76: FieldItemObject;
temp76 ¬ UProc53[h, s];
res ¬ NEW[ChangeItemValueObject.add ¬ [add[temp76]]] };
modify => {
temp76: FieldItemObject;
temp76 ¬ UProc53[h, s];
res ¬ NEW[ChangeItemValueObject.modify ¬ [modify[temp76]]] };
remove => {
temp76: EmptyRecord;
temp76.null ¬ 0;
res ¬ NEW[ChangeItemValueObject.remove ¬ [remove[]]] };
ENDCASE => ERROR;
};
};
UProc63: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: KeyedPossibilities] ~ {
{
length78: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[KeyedPossibilitiesSeq[length78]];
FOR i77: CARDINAL IN [0..length78) DO
res.seq[i77].keyedDependency ¬ CrRPC.GetCard16[s];
res.seq[i77].enumRecs ¬ UProc79[h, s];
ENDLOOP;
};
};
UProc50: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: SetOfARs] ~ {
{
length81: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[SetOfARsObject[length81]];
FOR i80: CARDINAL IN [0..length81) DO
res.body[i80].startValue ¬ CrRPC.GetCard32[s];
res.body[i80].runLength ¬ CrRPC.GetCard32[s];
ENDLOOP;
};
};
MProc67: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: FieldItemObject] ~ {
CrRPC.PutCard16[s, ORD[val.type]];
CrRPC.PutRope[s, val.name];
FOR i83a: ToolType IN ToolType DO
CrRPC.PutRope[s, val.defaultInfo[i83a].default];
CrRPC.PutBool[s, val.defaultInfo[i83a].systemMust];
CrRPC.PutInt16[s, val.defaultInfo[i83a].place.ord];
CrRPC.PutInt16[s, val.defaultInfo[i83a].place.co];
CrRPC.PutCard16[s, val.defaultInfo[i83a].width];
ENDLOOP;
WITH val SELECT FROM
it: REF FieldItemObjectRec.arId => {
CrRPC.PutRope[s, it^.ar.name];
FOR i83: CARDINAL IN [0..6) DO
CrRPC.PutRope[s, it^.ar.tools[i83].default];
CrRPC.PutBool[s, it^.ar.tools[i83].required];
CrRPC.PutInt16[s, it^.ar.tools[i83].place.ord];
CrRPC.PutInt16[s, it^.ar.tools[i83].place.co];
CrRPC.PutCard16[s, it^.ar.tools[i83].width];
ENDLOOP;
NULL; -- RECORD [] --
};
it: REF FieldItemObjectRec.dateTime => {
CrRPC.PutRope[s, it^.time.name];
FOR i84: CARDINAL IN [0..6) DO
CrRPC.PutRope[s, it^.time.tools[i84].default];
CrRPC.PutBool[s, it^.time.tools[i84].required];
CrRPC.PutInt16[s, it^.time.tools[i84].place.ord];
CrRPC.PutInt16[s, it^.time.tools[i84].place.co];
CrRPC.PutCard16[s, it^.time.tools[i84].width];
ENDLOOP;
NULL; -- RECORD [] --
};
it: REF FieldItemObjectRec.numeric => {
CrRPC.PutRope[s, it^.numeric.name];
FOR i85: CARDINAL IN [0..6) DO
CrRPC.PutRope[s, it^.numeric.tools[i85].default];
CrRPC.PutBool[s, it^.numeric.tools[i85].required];
CrRPC.PutInt16[s, it^.numeric.tools[i85].place.ord];
CrRPC.PutInt16[s, it^.numeric.tools[i85].place.co];
CrRPC.PutCard16[s, it^.numeric.tools[i85].width];
ENDLOOP;
NULL; -- RECORD [] --
};
it: REF FieldItemObjectRec.fixedLengthString => {
CrRPC.PutRope[s, it^.bounded.name];
FOR i86: CARDINAL IN [0..6) DO
CrRPC.PutRope[s, it^.bounded.tools[i86].default];
CrRPC.PutBool[s, it^.bounded.tools[i86].required];
CrRPC.PutInt16[s, it^.bounded.tools[i86].place.ord];
CrRPC.PutInt16[s, it^.bounded.tools[i86].place.co];
CrRPC.PutCard16[s, it^.bounded.tools[i86].width];
ENDLOOP;
CrRPC.PutCard16[s, it.maxLength];
};
it: REF FieldItemObjectRec.enumerated => {
CrRPC.PutRope[s, it^.enumerated.name];
FOR i87: CARDINAL IN [0..6) DO
CrRPC.PutRope[s, it^.enumerated.tools[i87].default];
CrRPC.PutBool[s, it^.enumerated.tools[i87].required];
CrRPC.PutInt16[s, it^.enumerated.tools[i87].place.ord];
CrRPC.PutInt16[s, it^.enumerated.tools[i87].place.co];
CrRPC.PutCard16[s, it^.enumerated.tools[i87].width];
ENDLOOP;
CrRPC.PutCard16[s, it.field];
MProc88[h, s, it.possibilities];
};
it: REF FieldItemObjectRec.string => {
CrRPC.PutRope[s, it^.string.name];
FOR i89: CARDINAL IN [0..6) DO
CrRPC.PutRope[s, it^.string.tools[i89].default];
CrRPC.PutBool[s, it^.string.tools[i89].required];
CrRPC.PutInt16[s, it^.string.tools[i89].place.ord];
CrRPC.PutInt16[s, it^.string.tools[i89].place.co];
CrRPC.PutCard16[s, it^.string.tools[i89].width];
ENDLOOP;
NULL; -- RECORD [] --
};
ENDCASE;
};
UProc79: PROC [h: CrRPC.Handle, s: CrRPC.STREAM] RETURNS [res: EnumeratedSequence] ~ {
{
length91: CARDINAL ~ CrRPC.GetCard16[s];
res ¬ NEW[EnumeratedSequenceType[length91]];
FOR i90: CARDINAL IN [0..length91) DO
res.seq[i90].tag ¬ CrRPC.GetRope[s];
res.seq[i90].item ¬ CrRPC.GetCard16[s];
ENDLOOP;
};
};
MProc88: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: KeyedPossibilities] ~ {
CrRPC.PutCard16[s, val.length];
FOR i92: CARDINAL IN [0..val.length) DO
CrRPC.PutCard16[s, val.seq[i92].keyedDependency];
MProc93[h, s, val.seq[i92].enumRecs];
ENDLOOP;
};
MProc93: PROC [h: CrRPC.Handle, s: CrRPC.STREAM, val: EnumeratedSequence] ~ {
CrRPC.PutCard16[s, val.length];
FOR i94: CARDINAL IN [0..val.length) DO
CrRPC.PutRope[s, val.seq[i94].tag];
CrRPC.PutCard16[s, val.seq[i94].item];
ENDLOOP;
};
CrRPC.RegisterServerProcs[pgm~75, serverProc~Server, pgmLoVersion~2, pgmHiVersion~2];
CrRPC.EnsureListener[class~$SPP];
}...