-- Copyright (C) 1985 by Xerox Corporation.  All rights reserved.
-- Stub file  was translated on May 2, 1985 4:15:55 pm PDT by Lupine of March 15, 1985 2:49:13 pm PST
-- Source interface ComputeServerUser came from file ComputeServerUser.bcd, which was created on May 2, 1985 4:15:36 pm PDT with version stamp 1#325#17375234616 from source of November 26, 1984 3:36:43 pm PST.

-- The RPC stub modules for ComputeServerUser are:
--   ComputeServerUserRpcControl.mesa;
--   ComputeServerUserRpcClientImpl.mesa;
--   ComputeServerUserRpcBinderImpl.mesa;
--   ComputeServerUserRpcServerImpl.mesa.

-- The parameters for this translation are:
--   Target language = Cedar
--   Default parameter passing = VALUE
--   Deallocate server heap arguments = TRUE
--   Inline RpcServerImpl dispatcher stubs = TRUE
--   Declare signals = TRUE
--   Warn about short POINTER ("MDS") allocations = TRUE
--   Maximum number of dynamic heap NEWs = 50, MDS NEWs = 50
--   Acceptable parameter protocols = VersionRange[1..1].


DIRECTORY
  PupDefs,
  Rope,
  UserCredentials,
  ComputeServerUser,
  ComputeServerUserRpcControl USING [InterMdsCallsOnly, LupineProtocolVersion,
      ProcedureIndex, SignalIndex],
  RPC USING [EncryptionKey, InterfaceName, Principal, standardZones,
      Zones],
  RPCLupine --USING SOME OF [Call, DataLength, Dispatcher, ExportHandle,
      -- ExportInterface, GetStubPkt, maxDataLength, maxPrincipalLength,
      -- maxShortStringLength, pktOverhead, ReceiveExtraPkt, SendPrelimPkt,
      -- StartCall, StartSignal, StubPkt, UnexportInterface]--,
  LupineRuntime --USING SOME OF [BindingError, CheckPktLength, CopyFromPkt,
      -- CopyFromMultiplePkts, CopyToPkt, CopyToMultiplePkts, defaultZones,
      -- DispatchingError, FinishThisPkt, ListHeader, MarshalingError,
      -- MarshalingExprError, MarshalAtom, MarshalRope, NilHeader, ProtocolError,
      -- RopeHeader, RpcPktDoubleWord, RuntimeError, SequenceHeader, SHORT,
      -- StartNextPkt, StringHeader, StubPktDoubleWord, TranslationError,
      -- UnmarshalingError, UnmarshalingExprError, UnmarshalAtom, UnmarshalRope,
      -- WordsForChars]--,
  Atom --USING SOME OF [GetPName, MakeAtom]--;


ComputeServerUserRpcServerImpl: MONITOR
  IMPORTS ComputeServerUser, RpcPrivate: RPCLupine, Lupine: LupineRuntime,
      Atom, Rope
  EXPORTS ComputeServerUserRpcControl
  SHARES  ComputeServerUser, ComputeServerUserRpcControl, Rope
  = BEGIN OPEN ComputeServerUser, RpcControl: ComputeServerUserRpcControl,
      RpcPublic: RPC;


-- Standard remote binding routines.

  bound: BOOLEAN ← FALSE;
  myInterface: RpcPrivate.ExportHandle;
  paramZones: RpcPublic.Zones ← RpcPublic.standardZones;

  ExportInterface: PUBLIC ENTRY SAFE PROCEDURE [
        interfaceName: RpcPublic.InterfaceName,
        user: RpcPublic.Principal,
        password: RpcPublic.EncryptionKey,
        parameterStorage: RpcPublic.Zones ] =
    TRUSTED BEGIN ENABLE UNWIND => NULL;
    IsNull: PROCEDURE [string: Rope.ROPE] RETURNS [BOOLEAN] =
      INLINE {RETURN[string.Length[] = 0]};
    IF bound THEN Lupine.BindingError;
    myInterface ← RpcPrivate.ExportInterface [
      interface: [
        type: IF ~IsNull[interfaceName.type]
          THEN interfaceName.type ELSE "ComputeServerUser~1#325#17375234616",
        instance: interfaceName.instance,
        version: interfaceName.version ],
      user: user,  password: password,
      dispatcher: ServerDispatcher,
      localOnly: RpcControl.InterMdsCallsOnly,
      stubProtocol: RpcControl.LupineProtocolVersion ];
    paramZones ← [
      gc: IF parameterStorage.gc # NIL
        THEN parameterStorage.gc ELSE Lupine.defaultZones.gc,
      heap: IF parameterStorage.heap # NIL
        THEN parameterStorage.heap ELSE Lupine.defaultZones.heap,
      mds: IF parameterStorage.mds # NIL
        THEN parameterStorage.mds ELSE Lupine.defaultZones.mds ];
    bound ← TRUE;
    END;

  UnexportInterface: PUBLIC ENTRY SAFE PROCEDURE =
    TRUSTED BEGIN ENABLE UNWIND => NULL;
    IF ~bound THEN Lupine.BindingError;
    myInterface ← RpcPrivate.UnexportInterface[myInterface];
    paramZones ← RpcPublic.standardZones;
    bound ← FALSE;
    END;


-- Public procedure dispatcher and public signal and error catcher.

  ServerDispatcher: --PROCEDURE [pkt: RPCPkt, callLength: DataLength,
      -- lastPkt: BOOLEAN, localConversation: Conversation] RETURNS [returnLength:
      -- DataLength]-- RpcPrivate.Dispatcher =
    BEGIN

    -- Catch public signals.

      ENABLE BEGIN

      END;  -- Catch public signals.


    -- Call public procedures (still in dispatcher).

    SELECT LOOPHOLE[pkt.data[0], RpcControl.ProcedureIndex] FROM
      rBoolean => RETURN[
        rBooleanStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rNumber => RETURN[
        rNumberStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rToken => RETURN[
        rTokenStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rListOfTokens => RETURN[
        rListOfTokensStub[pkt: pkt, callLength: callLength, lastPkt:
            lastPkt, localConversation: localConversation]];
      rLine => RETURN[
        rLineStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rGetProfileName => RETURN[
        rGetProfileNameStub[pkt: pkt, callLength: callLength, lastPkt:
            lastPkt, localConversation: localConversation]];
      rGetState => RETURN[
        rGetStateStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rGet => RETURN[
        rGetStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      ENDCASE => RETURN[Lupine.DispatchingError[]];

    END;  -- ServerDispatcher


-- Public procedure dispatcher stubs.

  rBooleanStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- key: Rope.ROPE, default: BOOLEAN]
    -- RETURNS [value: BOOLEAN]-- RpcPrivate.Dispatcher =
    INLINE BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    key: Rope.ROPE;
    default: BOOLEAN;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, default (4): BOOLEAN];
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        value (0): BOOLEAN];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    resPkt: LONG POINTER TO ResultOverlay;
    pktLength: RpcPrivate.DataLength ← 5;
    BEGIN  -- OnePkt.
    onePkt: BOOLEAN = lastPkt;
    IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
      [listenerPupAddress: listenerPupAddress, default: default] ←
          argPkt↑;
      END;
    BEGIN  -- Unmarshal key: Rope.ROPE from pkt.data[pktLength].
      ropeIsNIL: Lupine.NilHeader;
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength:
            pktLength];
      ropeIsNIL ← pkt.data[pktLength];  pktLength ← pktLength+1;
      IF ropeIsNIL
        THEN key ← NIL
        ELSE BEGIN
          ropeLength: Lupine.RopeHeader;
          textRope: Rope.Text;
          ropeLength ← pkt.data[pktLength];  pktLength ← pktLength+1;
          IF ropeLength > LAST[NAT]
            THEN Lupine.UnmarshalingError;
          key ← textRope ← Rope.NewText[size: ropeLength];
          pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength: Lupine.WordsForChars[ropeLength],
              alwaysOnePkt: FALSE];
          END;  -- IF ropeIsNIL.
      END;  -- Unmarshal key.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    resPkt ← @pkt.data[0];
    IF onePkt
      THEN [resPkt.value] ← rBoolean[argPkt.listenerPupAddress, key,
          argPkt.default]
      ELSE [resPkt.value] ← rBoolean[listenerPupAddress, key, default];
    END;  -- OnePkt.
    pktLength ← 1;
    RETURN[returnLength: pktLength];
    END;  -- rBooleanStub.

  rNumberStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- key: Rope.ROPE, default: INT]
    -- RETURNS [value: INT]-- RpcPrivate.Dispatcher =
    INLINE BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    key: Rope.ROPE;
    default: INT;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, default (4): INT];
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        value (0): INT];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    resPkt: LONG POINTER TO ResultOverlay;
    pktLength: RpcPrivate.DataLength ← 6;
    BEGIN  -- OnePkt.
    onePkt: BOOLEAN = lastPkt;
    IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
      [listenerPupAddress: listenerPupAddress, default: default] ←
          argPkt↑;
      END;
    BEGIN  -- Unmarshal key: Rope.ROPE from pkt.data[pktLength].
      ropeIsNIL: Lupine.NilHeader;
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength:
            pktLength];
      ropeIsNIL ← pkt.data[pktLength];  pktLength ← pktLength+1;
      IF ropeIsNIL
        THEN key ← NIL
        ELSE BEGIN
          ropeLength: Lupine.RopeHeader;
          textRope: Rope.Text;
          ropeLength ← pkt.data[pktLength];  pktLength ← pktLength+1;
          IF ropeLength > LAST[NAT]
            THEN Lupine.UnmarshalingError;
          key ← textRope ← Rope.NewText[size: ropeLength];
          pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength: Lupine.WordsForChars[ropeLength],
              alwaysOnePkt: FALSE];
          END;  -- IF ropeIsNIL.
      END;  -- Unmarshal key.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    resPkt ← @pkt.data[0];
    IF onePkt
      THEN [resPkt.value] ← rNumber[argPkt.listenerPupAddress, key,
          argPkt.default]
      ELSE [resPkt.value] ← rNumber[listenerPupAddress, key, default];
    END;  -- OnePkt.
    pktLength ← 2;
    RETURN[returnLength: pktLength];
    END;  -- rNumberStub.

  rTokenStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- key: Rope.ROPE, default: Rope.ROPE]
    -- RETURNS [value: Rope.ROPE]-- RpcPrivate.Dispatcher =
    INLINE BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    key: Rope.ROPE;
    default: Rope.ROPE;
    value: Rope.ROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength ← 4;
    BEGIN  -- OnePkt.
    onePkt: BOOLEAN = lastPkt;
    IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
      [listenerPupAddress: listenerPupAddress] ← argPkt↑;
      END;
    BEGIN  -- Unmarshal key: Rope.ROPE from pkt.data[pktLength].
      ropeIsNIL: Lupine.NilHeader;
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength:
            pktLength];
      ropeIsNIL ← pkt.data[pktLength];  pktLength ← pktLength+1;
      IF ropeIsNIL
        THEN key ← NIL
        ELSE BEGIN
          ropeLength: Lupine.RopeHeader;
          textRope: Rope.Text;
          ropeLength ← pkt.data[pktLength];  pktLength ← pktLength+1;
          IF ropeLength > LAST[NAT]
            THEN Lupine.UnmarshalingError;
          key ← textRope ← Rope.NewText[size: ropeLength];
          pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength: Lupine.WordsForChars[ropeLength],
              alwaysOnePkt: FALSE];
          END;  -- IF ropeIsNIL.
      END;  -- Unmarshal key.
    BEGIN  -- Unmarshal default: Rope.ROPE from pkt.data[pktLength].
      ropeIsNIL: Lupine.NilHeader;
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength:
            pktLength];
      ropeIsNIL ← pkt.data[pktLength];  pktLength ← pktLength+1;
      IF ropeIsNIL
        THEN default ← NIL
        ELSE BEGIN
          ropeLength: Lupine.RopeHeader;
          textRope: Rope.Text;
          ropeLength ← pkt.data[pktLength];  pktLength ← pktLength+1;
          IF ropeLength > LAST[NAT]
            THEN Lupine.UnmarshalingError;
          default ← textRope ← Rope.NewText[size: ropeLength];
          pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength: Lupine.WordsForChars[ropeLength],
              alwaysOnePkt: FALSE];
          END;  -- IF ropeIsNIL.
      END;  -- Unmarshal default.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    IF onePkt
      THEN [value] ← rToken[argPkt.listenerPupAddress, key, default]
      ELSE [value] ← rToken[listenerPupAddress, key, default];
    END;  -- OnePkt.
    pktLength ← 0;
    BEGIN  -- Marshal value: Rope.ROPE to pkt.data[pktLength].
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.StartNextPkt[pkt: pkt, pktLength: pktLength];
      pkt.data[pktLength] ← value=NIL;  pktLength ← pktLength+1;
      IF value # NIL
        THEN BEGIN
          textRope: Rope.Text = Rope.InlineFlatten[r: value];
          pkt.data[pktLength] ← textRope.length;  pktLength ← pktLength+1;
          pktLength ← Lupine.CopyToPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength: Lupine.WordsForChars[textRope.length],
              alwaysOnePkt: FALSE];
          END;  -- IF value # NIL.
      END;  -- Marshal value.
    RETURN[returnLength: pktLength];
    END;  -- rTokenStub.

  rListOfTokensStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- key: Rope.ROPE, default: LIST OF Rope.ROPE]
    -- RETURNS [value: LIST OF Rope.ROPE]-- RpcPrivate.Dispatcher =
    INLINE BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    key: Rope.ROPE;
    default: LIST OF Rope.ROPE;
    value: LIST OF Rope.ROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength ← 4;
    BEGIN  -- OnePkt.
    onePkt: BOOLEAN = lastPkt;
    IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
      [listenerPupAddress: listenerPupAddress] ← argPkt↑;
      END;
    BEGIN  -- Unmarshal key: Rope.ROPE from pkt.data[pktLength].
      ropeIsNIL: Lupine.NilHeader;
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength:
            pktLength];
      ropeIsNIL ← pkt.data[pktLength];  pktLength ← pktLength+1;
      IF ropeIsNIL
        THEN key ← NIL
        ELSE BEGIN
          ropeLength: Lupine.RopeHeader;
          textRope: Rope.Text;
          ropeLength ← pkt.data[pktLength];  pktLength ← pktLength+1;
          IF ropeLength > LAST[NAT]
            THEN Lupine.UnmarshalingError;
          key ← textRope ← Rope.NewText[size: ropeLength];
          pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength: Lupine.WordsForChars[ropeLength],
              alwaysOnePkt: FALSE];
          END;  -- IF ropeIsNIL.
      END;  -- Unmarshal key.
    BEGIN  -- Unmarshal default: LIST OF Rope.ROPE from pkt.data[pktLength].
      lastNode: LIST OF Rope.ROPE ← (default ← NIL);
      listLength: Lupine.ListHeader;
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength:
            pktLength];
      listLength ← Lupine.RpcPktDoubleWord[pkt, pktLength]↑;
      pktLength ← pktLength + 2;
      WHILE listLength > 0 DO
        thisNode1: LIST OF Rope.ROPE = paramZones.gc.CONS[--DefaultValue--,NIL];
        BEGIN  -- Unmarshal thisNode1.first: Rope.ROPE from pkt.data[pktLength].
          ropeIsNIL: Lupine.NilHeader;
          IF pktLength+2 > RpcPrivate.maxDataLength
            THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength:
                pktLength];
          ropeIsNIL ← pkt.data[pktLength];  pktLength ← pktLength+1;
          IF ropeIsNIL
            THEN thisNode1.first ← NIL
            ELSE BEGIN
              ropeLength: Lupine.RopeHeader;
              textRope: Rope.Text;
              ropeLength ← pkt.data[pktLength];  pktLength ← pktLength+1;
              IF ropeLength > LAST[NAT]
                THEN Lupine.UnmarshalingError;
              thisNode1.first ← textRope ← Rope.NewText[size: ropeLength];
              pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength,
                  dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength:
                  Lupine.WordsForChars[ropeLength], alwaysOnePkt: FALSE];
              END;  -- IF ropeIsNIL.
          END;  -- Unmarshal thisNode1.first.
        IF lastNode # NIL
          THEN lastNode ← (lastNode.rest ← thisNode1)
          ELSE lastNode ← (default ← thisNode1);
        listLength ← listLength - 1;
        ENDLOOP;  -- WHILE listLength > 0.
      END;  -- Unmarshal default.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    IF onePkt
      THEN [value] ← rListOfTokens[argPkt.listenerPupAddress, key,
          default]
      ELSE [value] ← rListOfTokens[listenerPupAddress, key, default];
    END;  -- OnePkt.
    pktLength ← 0;
    BEGIN  -- Marshal value: LIST OF Rope.ROPE to pkt.data[pktLength].
      thisNode1: LIST OF Rope.ROPE;
      listLength: Lupine.ListHeader ← 0;
      FOR thisNode1 ← value, thisNode1.rest UNTIL thisNode1 = NIL DO
        listLength ← listLength + 1;  ENDLOOP;
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.StartNextPkt[pkt: pkt, pktLength: pktLength];
      Lupine.RpcPktDoubleWord[pkt, pktLength]↑ ← listLength;
      pktLength ← pktLength + 2;
      FOR thisNode1 ← value, thisNode1.rest UNTIL thisNode1 = NIL DO
        BEGIN  -- Marshal thisNode1.first: Rope.ROPE to pkt.data[pktLength].
          IF pktLength+2 > RpcPrivate.maxDataLength
            THEN pktLength ← Lupine.StartNextPkt[pkt: pkt, pktLength:
                pktLength];
          pkt.data[pktLength] ← thisNode1.first=NIL;  pktLength ← pktLength+1;
          IF thisNode1.first # NIL
            THEN BEGIN
              textRope: Rope.Text = Rope.InlineFlatten[r: thisNode1.first];
              pkt.data[pktLength] ← textRope.length;  pktLength ← pktLength+1;
              pktLength ← Lupine.CopyToPkt[pkt: pkt, pktLength: pktLength,
                  dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength:
                  Lupine.WordsForChars[textRope.length], alwaysOnePkt:
                  FALSE];
              END;  -- IF thisNode1.first # NIL.
          END;  -- Marshal thisNode1.first.
        ENDLOOP;  -- FOR thisNode1.
      END;  -- Marshal value.
    RETURN[returnLength: pktLength];
    END;  -- rListOfTokensStub.

  rLineStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress, key:
      -- Rope.ROPE, default: Rope.ROPE]
    -- RETURNS [value: Rope.ROPE]-- RpcPrivate.Dispatcher =
    INLINE BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    key: Rope.ROPE;
    default: Rope.ROPE;
    value: Rope.ROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength ← 4;
    BEGIN  -- OnePkt.
    onePkt: BOOLEAN = lastPkt;
    IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
      [listenerPupAddress: listenerPupAddress] ← argPkt↑;
      END;
    BEGIN  -- Unmarshal key: Rope.ROPE from pkt.data[pktLength].
      ropeIsNIL: Lupine.NilHeader;
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength:
            pktLength];
      ropeIsNIL ← pkt.data[pktLength];  pktLength ← pktLength+1;
      IF ropeIsNIL
        THEN key ← NIL
        ELSE BEGIN
          ropeLength: Lupine.RopeHeader;
          textRope: Rope.Text;
          ropeLength ← pkt.data[pktLength];  pktLength ← pktLength+1;
          IF ropeLength > LAST[NAT]
            THEN Lupine.UnmarshalingError;
          key ← textRope ← Rope.NewText[size: ropeLength];
          pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength: Lupine.WordsForChars[ropeLength],
              alwaysOnePkt: FALSE];
          END;  -- IF ropeIsNIL.
      END;  -- Unmarshal key.
    BEGIN  -- Unmarshal default: Rope.ROPE from pkt.data[pktLength].
      ropeIsNIL: Lupine.NilHeader;
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength:
            pktLength];
      ropeIsNIL ← pkt.data[pktLength];  pktLength ← pktLength+1;
      IF ropeIsNIL
        THEN default ← NIL
        ELSE BEGIN
          ropeLength: Lupine.RopeHeader;
          textRope: Rope.Text;
          ropeLength ← pkt.data[pktLength];  pktLength ← pktLength+1;
          IF ropeLength > LAST[NAT]
            THEN Lupine.UnmarshalingError;
          default ← textRope ← Rope.NewText[size: ropeLength];
          pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength: Lupine.WordsForChars[ropeLength],
              alwaysOnePkt: FALSE];
          END;  -- IF ropeIsNIL.
      END;  -- Unmarshal default.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    IF onePkt
      THEN [value] ← rLine[argPkt.listenerPupAddress, key, default]
      ELSE [value] ← rLine[listenerPupAddress, key, default];
    END;  -- OnePkt.
    pktLength ← 0;
    BEGIN  -- Marshal value: Rope.ROPE to pkt.data[pktLength].
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.StartNextPkt[pkt: pkt, pktLength: pktLength];
      pkt.data[pktLength] ← value=NIL;  pktLength ← pktLength+1;
      IF value # NIL
        THEN BEGIN
          textRope: Rope.Text = Rope.InlineFlatten[r: value];
          pkt.data[pktLength] ← textRope.length;  pktLength ← pktLength+1;
          pktLength ← Lupine.CopyToPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength: Lupine.WordsForChars[textRope.length],
              alwaysOnePkt: FALSE];
          END;  -- IF value # NIL.
      END;  -- Marshal value.
    RETURN[returnLength: pktLength];
    END;  -- rLineStub.

  rGetProfileNameStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress]
      -- RETURNS [anonP1id1653456: Rope.ROPE]-- RpcPrivate.Dispatcher =
    INLINE BEGIN
    anonP1id1653456: Rope.ROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength;
    Lupine.CheckPktLength[pkt: pkt, pktLength: 4];
    [anonP1id1653456] ← rGetProfileName[argPkt.listenerPupAddress];
    pktLength ← 0;
    BEGIN  -- Marshal anonP1id1653456: Rope.ROPE to pkt.data[pktLength].
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.StartNextPkt[pkt: pkt, pktLength: pktLength];
      pkt.data[pktLength] ← anonP1id1653456=NIL;  pktLength ← pktLength+1;
      IF anonP1id1653456 # NIL
        THEN BEGIN
          textRope: Rope.Text = Rope.InlineFlatten[r: anonP1id1653456];
          pkt.data[pktLength] ← textRope.length;  pktLength ← pktLength+1;
          pktLength ← Lupine.CopyToPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength: Lupine.WordsForChars[textRope.length],
              alwaysOnePkt: FALSE];
          END;  -- IF anonP1id1653456 # NIL.
      END;  -- Marshal anonP1id1653456.
    RETURN[returnLength: pktLength];
    END;  -- rGetProfileNameStub.

  rGetStateStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress]
      -- RETURNS [anonP1id1653475: UserCredentials.State]-- RpcPrivate.Dispatcher
      =
    INLINE BEGIN
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress];
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        anonP1id1653475 (0): UserCredentials.State];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength;
    Lupine.CheckPktLength[pkt: pkt, pktLength: 4];
    [resPkt.anonP1id1653475] ← rGetState[argPkt.listenerPupAddress];
    pktLength ← 1;
    RETURN[returnLength: pktLength];
    END;  -- rGetStateStub.

  rGetStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress] RETURNS
      -- [name: Rope.ROPE, password: Rope.ROPE]-- RpcPrivate.Dispatcher
      =
    INLINE BEGIN
    name: Rope.ROPE;
    password: Rope.ROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength;
    Lupine.CheckPktLength[pkt: pkt, pktLength: 4];
    [name, password] ←
      rGet[argPkt.listenerPupAddress];
    pktLength ← 0;
    BEGIN  -- Marshal name: Rope.ROPE to pkt.data[pktLength].
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.StartNextPkt[pkt: pkt, pktLength: pktLength];
      pkt.data[pktLength] ← name=NIL;  pktLength ← pktLength+1;
      IF name # NIL
        THEN BEGIN
          textRope: Rope.Text = Rope.InlineFlatten[r: name];
          pkt.data[pktLength] ← textRope.length;  pktLength ← pktLength+1;
          pktLength ← Lupine.CopyToPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength: Lupine.WordsForChars[textRope.length],
              alwaysOnePkt: FALSE];
          END;  -- IF name # NIL.
      END;  -- Marshal name.
    BEGIN  -- Marshal password: Rope.ROPE to pkt.data[pktLength].
      IF pktLength+2 > RpcPrivate.maxDataLength
        THEN pktLength ← Lupine.StartNextPkt[pkt: pkt, pktLength: pktLength];
      pkt.data[pktLength] ← password=NIL;  pktLength ← pktLength+1;
      IF password # NIL
        THEN BEGIN
          textRope: Rope.Text = Rope.InlineFlatten[r: password];
          pkt.data[pktLength] ← textRope.length;  pktLength ← pktLength+1;
          pktLength ← Lupine.CopyToPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: BASE[DESCRIPTOR[textRope.text]], dataLength: Lupine.WordsForChars[textRope.length],
              alwaysOnePkt: FALSE];
          END;  -- IF password # NIL.
      END;  -- Marshal password.
    RETURN[returnLength: pktLength];
    END;  -- rGetStub.


-- No module initialization.

END.  -- ComputeServerUserRpcServerImpl.