-- Copyright (C) 1985 by Xerox Corporation.  All rights reserved.
-- Stub file  was translated on May 4, 1985 10:43:35 pm PDT by Lupine of March 15, 1985 2:49:13 pm PST
-- Source interface ComputeServerCallbacks came from file ComputeServerCallbacks.bcd, which was created on May 4, 1985 10:43:10 pm PDT with version stamp 317#56#35156063743 from source of May 4, 1985 10:42:35 pm PDT.

-- The RPC stub modules for ComputeServerCallbacks are:
--   ComputeServerCallbacksRpcControl.mesa;
--   ComputeServerCallbacksRpcClientImpl.mesa;
--   ComputeServerCallbacksRpcBinderImpl.mesa;
--   ComputeServerCallbacksRpcServerImpl.mesa.

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


DIRECTORY
  BasicTime,
  FS,
  IO,
  PupDefs,
  Rope,
  RPC,
  ComputeServerCallbacks,
  ComputeServerCallbacksRpcControl USING [InterMdsCallsOnly, LupineProtocolVersion,
      ProcedureIndex, SignalIndex],
  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]--;


ComputeServerCallbacksRpcServerImpl: MONITOR
  IMPORTS ComputeServerCallbacks, RpcPrivate: RPCLupine, Lupine: LupineRuntime,
      Atom, Rope
  EXPORTS ComputeServerCallbacksRpcControl
  SHARES  ComputeServerCallbacks, ComputeServerCallbacksRpcControl,
      Rope
  = BEGIN OPEN ComputeServerCallbacks, RpcControl: ComputeServerCallbacksRpcControl,
      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 "ComputeServerCallbacks~317#56#35156063743",
        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

      Error --ERROR [error: FS.ErrorDesc]-- =>
        BEGIN
        ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
            transferIndex (0): RpcControl.SignalIndex ← Error];
        argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
        pktLength: RpcPrivate.DataLength ← 1;
        lastPkt: BOOLEAN;
        RpcPrivate.StartSignal[signalPkt: pkt];
        argPkt.transferIndex ← Error;
        BEGIN  -- Marshal error: FS.ErrorDesc to pkt.data[pktLength].
          pktLength ← Lupine.CopyToPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: @error, dataLength: SIZE[FS.ErrorDesc], alwaysOnePkt:
              FALSE];
          BEGIN OPEN record: error;
          BEGIN  -- Marshal record.code: ATOM to pkt.data[pktLength].
            pktLength ← Lupine.MarshalAtom[record.code, pkt, pktLength];
            END;  -- Marshal record.code.
          BEGIN  -- Marshal record.explanation: ROPE to pkt.data[pktLength].
            pktLength ← Lupine.MarshalRope[record.explanation, pkt,
                pktLength, FALSE];
            END;  -- Marshal record.explanation.
          END;  -- OPEN record: error.
          END;  -- Marshal error.
        [returnLength: , lastPkt: lastPkt] ←
          RpcPrivate.Call[ pkt: pkt, callLength: pktLength,
              maxReturnLength: 0];
        Lupine.RuntimeError;  -- Impossible to RESUME an ERROR.
        END;  -- Error.

      END;  -- Catch public signals.


    -- Call public procedures (still in dispatcher).

    SELECT LOOPHOLE[pkt.data[0], RpcControl.ProcedureIndex] FROM
      rSetDefaultWDir => RETURN[
        rSetDefaultWDirStub[pkt: pkt, callLength: callLength, lastPkt:
            lastPkt, localConversation: localConversation]];
      rGetDefaultWDir => RETURN[
        rGetDefaultWDirStub[pkt: pkt, callLength: callLength, lastPkt:
            lastPkt, localConversation: localConversation]];
      rExpandName => RETURN[
        rExpandNameStub[pkt: pkt, callLength: callLength, lastPkt:
            lastPkt, localConversation: localConversation]];
      rFileInfo => RETURN[
        rFileInfoStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rStartEnumerateForInfo => RETURN[
        rStartEnumerateForInfoStub[pkt: pkt, callLength: callLength,
            lastPkt: lastPkt, localConversation: localConversation]];
      rNextEnumerateForInfo => RETURN[
        rNextEnumerateForInfoStub[pkt: pkt, callLength: callLength,
            lastPkt: lastPkt, localConversation: localConversation]];
      rStartEnumerateForNames => RETURN[
        rStartEnumerateForNamesStub[pkt: pkt, callLength: callLength,
            lastPkt: lastPkt, localConversation: localConversation]];
      rNextEnumerateForNames => RETURN[
        rNextEnumerateForNamesStub[pkt: pkt, callLength: callLength,
            lastPkt: lastPkt, localConversation: localConversation]];
      rDoneEnumerate => RETURN[
        rDoneEnumerateStub[pkt: pkt, callLength: callLength, lastPkt:
            lastPkt, localConversation: localConversation]];
      rOpen => RETURN[
        rOpenStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rCreate => RETURN[
        rCreateStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rOpenOrCreate => RETURN[
        rOpenOrCreateStub[pkt: pkt, callLength: callLength, lastPkt:
            lastPkt, localConversation: localConversation]];
      rGetClass => RETURN[
        rGetClassStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rSameFile => RETURN[
        rSameFileStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rGetName => RETURN[
        rGetNameStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rGetInfo => RETURN[
        rGetInfoStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rSetPageCount => RETURN[
        rSetPageCountStub[pkt: pkt, callLength: callLength, lastPkt:
            lastPkt, localConversation: localConversation]];
      rSetByteCountAndCreatedTime => RETURN[
        rSetByteCountAndCreatedTimeStub[pkt: pkt, callLength: callLength,
            lastPkt: lastPkt, localConversation: localConversation]];
      rRead => RETURN[
        rReadStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rWrite => RETURN[
        rWriteStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rClose => RETURN[
        rCloseStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rCopy => RETURN[
        rCopyStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rDelete => RETURN[
        rDeleteStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rRename => RETURN[
        rRenameStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      rSetKeep => RETURN[
        rSetKeepStub[pkt: pkt, callLength: callLength, lastPkt: lastPkt,
            localConversation: localConversation]];
      ENDCASE => RETURN[Lupine.DispatchingError[]];

    END;  -- ServerDispatcher


-- Public procedure dispatcher stubs.

  rSetDefaultWDirStub: --PROCEDURE [dir: RPC.ShortROPE]-- RpcPrivate.Dispatcher
      =
    BEGIN
    dir: RPC.ShortROPE;
    pktLength: RpcPrivate.DataLength ← 1;
    BEGIN  -- Unmarshal dir: RPC.ShortROPE from pkt.data[pktLength].
      [dir, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE];
      END;  -- Unmarshal dir.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    rSetDefaultWDir[dir];
    pktLength ← 0;
    RETURN[returnLength: pktLength];
    END;  -- rSetDefaultWDirStub.

  rGetDefaultWDirStub: --PROCEDURE RETURNS [anonP1id1822039: RPC.ShortROPE]--
      RpcPrivate.Dispatcher =
    BEGIN
    anonP1id1822039: RPC.ShortROPE;
    pktLength: RpcPrivate.DataLength;
    Lupine.CheckPktLength[pkt: pkt, pktLength: 1];
    [anonP1id1822039] ← rGetDefaultWDir[];
    pktLength ← 0;
    BEGIN  -- Marshal anonP1id1822039: RPC.ShortROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[anonP1id1822039, pkt, pktLength,
          TRUE];
      END;  -- Marshal anonP1id1822039.
    RETURN[returnLength: pktLength];
    END;  -- rGetDefaultWDirStub.

  rExpandNameStub: --PROCEDURE [name: ROPE, wDir: RPC.ShortROPE] RETURNS
      -- [fullFName: ROPE, cp: FS.ComponentPositions, dirOmitted: BOOLEAN]--
      RpcPrivate.Dispatcher =
    BEGIN
    name: ROPE;
    wDir: RPC.ShortROPE;
    fullFName: ROPE;
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        cp (0): FS.ComponentPositions, dirOmitted (12): BOOLEAN];
    resPkt: LONG POINTER TO ResultOverlay;
    pktLength: RpcPrivate.DataLength ← 1;
    BEGIN  -- Unmarshal name: ROPE from pkt.data[pktLength].
      [name, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE];
      END;  -- Unmarshal name.
    BEGIN  -- Unmarshal wDir: RPC.ShortROPE from pkt.data[pktLength].
      [wDir, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE];
      END;  -- Unmarshal wDir.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    resPkt ← @pkt.data[0];
    [fullFName, resPkt.cp, resPkt.dirOmitted] ←
      rExpandName[name, wDir];
    pktLength ← 13;
    BEGIN  -- Marshal fullFName: ROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[fullFName, pkt, pktLength, FALSE];
      END;  -- Marshal fullFName.
    RETURN[returnLength: pktLength];
    END;  -- rExpandNameStub.

  rFileInfoStub: --PROCEDURE [name: ROPE, wantedCreatedTime: BasicTime.GMT,
      -- remoteCheck: BOOLEAN, wDir: RPC.ShortROPE]
    -- RETURNS [fullFName: ROPE, attachedTo: ROPE, keep: CARDINAL,
        -- bytes: INT, created: BasicTime.GMT]-- RpcPrivate.Dispatcher
        =
    BEGIN
    name: ROPE;
    wantedCreatedTime: BasicTime.GMT;
    remoteCheck: BOOLEAN;
    wDir: RPC.ShortROPE;
    fullFName: ROPE;
    attachedTo: ROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, wantedCreatedTime
        (1): BasicTime.GMT, remoteCheck (3): BOOLEAN];
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        keep (0): CARDINAL, bytes (1): INT, created (3): BasicTime.GMT];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    resPkt: LONG POINTER TO ResultOverlay;
    pktLength: RpcPrivate.DataLength ← 4;
    BEGIN  -- OnePkt.
    onePkt: BOOLEAN = lastPkt;
    IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
      [wantedCreatedTime: wantedCreatedTime, remoteCheck: remoteCheck]
          ← argPkt↑;
      END;
    BEGIN  -- Unmarshal name: ROPE from pkt.data[pktLength].
      [name, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE];
      END;  -- Unmarshal name.
    BEGIN  -- Unmarshal wDir: RPC.ShortROPE from pkt.data[pktLength].
      [wDir, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE];
      END;  -- Unmarshal wDir.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    resPkt ← @pkt.data[0];
    IF onePkt
      THEN [fullFName, attachedTo, resPkt.keep, resPkt.bytes, resPkt.created]
          ←
          rFileInfo[name, argPkt.wantedCreatedTime, argPkt.remoteCheck,
              wDir]
      ELSE [fullFName, attachedTo, resPkt.keep, resPkt.bytes, resPkt.created]
          ←
          rFileInfo[name, wantedCreatedTime, remoteCheck, wDir];
    END;  -- OnePkt.
    pktLength ← 5;
    BEGIN  -- Marshal fullFName: ROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[fullFName, pkt, pktLength, FALSE];
      END;  -- Marshal fullFName.
    BEGIN  -- Marshal attachedTo: ROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[attachedTo, pkt, pktLength, FALSE];
      END;  -- Marshal attachedTo.
    RETURN[returnLength: pktLength];
    END;  -- rFileInfoStub.

  rStartEnumerateForInfoStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- pattern: ROPE, wDir: RPC.ShortROPE]
    -- RETURNS [fullFName: ROPE, attachedTo: ROPE, created: BasicTime.GMT,
        -- bytes: INT, keep: CARDINAL, continue: BOOLEAN]-- RpcPrivate.Dispatcher
        =
    BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    pattern: ROPE;
    wDir: RPC.ShortROPE;
    fullFName: ROPE;
    attachedTo: ROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress];
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        created (0): BasicTime.GMT, bytes (2): INT, keep (4): CARDINAL,
        continue (5): BOOLEAN];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    resPkt: LONG POINTER TO ResultOverlay;
    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 pattern: ROPE from pkt.data[pktLength].
      [pattern, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE];
      END;  -- Unmarshal pattern.
    BEGIN  -- Unmarshal wDir: RPC.ShortROPE from pkt.data[pktLength].
      [wDir, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE];
      END;  -- Unmarshal wDir.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    resPkt ← @pkt.data[0];
    IF onePkt
      THEN [fullFName, attachedTo, resPkt.created, resPkt.bytes, resPkt.keep,
          resPkt.continue] ←
          rStartEnumerateForInfo[argPkt.listenerPupAddress, pattern,
              wDir]
      ELSE [fullFName, attachedTo, resPkt.created, resPkt.bytes, resPkt.keep,
          resPkt.continue] ←
          rStartEnumerateForInfo[listenerPupAddress, pattern, wDir];
    END;  -- OnePkt.
    pktLength ← 6;
    BEGIN  -- Marshal fullFName: ROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[fullFName, pkt, pktLength, FALSE];
      END;  -- Marshal fullFName.
    BEGIN  -- Marshal attachedTo: ROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[attachedTo, pkt, pktLength, FALSE];
      END;  -- Marshal attachedTo.
    RETURN[returnLength: pktLength];
    END;  -- rStartEnumerateForInfoStub.

  rNextEnumerateForInfoStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress]
      -- RETURNS [fullFName: ROPE, attachedTo: ROPE, created: BasicTime.GMT,
      -- bytes: INT, keep: CARDINAL, continue: BOOLEAN]-- RpcPrivate.Dispatcher
      =
    BEGIN
    fullFName: ROPE;
    attachedTo: ROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress];
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        created (0): BasicTime.GMT, bytes (2): INT, keep (4): CARDINAL,
        continue (5): BOOLEAN];
    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];
    [fullFName, attachedTo, resPkt.created, resPkt.bytes, resPkt.keep,
        resPkt.continue] ←
      rNextEnumerateForInfo[argPkt.listenerPupAddress];
    pktLength ← 6;
    BEGIN  -- Marshal fullFName: ROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[fullFName, pkt, pktLength, FALSE];
      END;  -- Marshal fullFName.
    BEGIN  -- Marshal attachedTo: ROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[attachedTo, pkt, pktLength, FALSE];
      END;  -- Marshal attachedTo.
    RETURN[returnLength: pktLength];
    END;  -- rNextEnumerateForInfoStub.

  rStartEnumerateForNamesStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- pattern: ROPE, wDir: RPC.ShortROPE]
    -- RETURNS [fullFName: ROPE, continue: BOOLEAN]-- RpcPrivate.Dispatcher
        =
    BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    pattern: ROPE;
    wDir: RPC.ShortROPE;
    fullFName: ROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress];
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        continue (0): BOOLEAN];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    resPkt: LONG POINTER TO ResultOverlay;
    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 pattern: ROPE from pkt.data[pktLength].
      [pattern, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE];
      END;  -- Unmarshal pattern.
    BEGIN  -- Unmarshal wDir: RPC.ShortROPE from pkt.data[pktLength].
      [wDir, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE];
      END;  -- Unmarshal wDir.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    resPkt ← @pkt.data[0];
    IF onePkt
      THEN [fullFName, resPkt.continue] ←
          rStartEnumerateForNames[argPkt.listenerPupAddress, pattern,
              wDir]
      ELSE [fullFName, resPkt.continue] ←
          rStartEnumerateForNames[listenerPupAddress, pattern, wDir];
    END;  -- OnePkt.
    pktLength ← 1;
    BEGIN  -- Marshal fullFName: ROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[fullFName, pkt, pktLength, FALSE];
      END;  -- Marshal fullFName.
    RETURN[returnLength: pktLength];
    END;  -- rStartEnumerateForNamesStub.

  rNextEnumerateForNamesStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress]
      -- RETURNS [fullFName: ROPE, continue: BOOLEAN]-- RpcPrivate.Dispatcher
      =
    BEGIN
    fullFName: ROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress];
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        continue (0): BOOLEAN];
    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];
    [fullFName, resPkt.continue] ←
      rNextEnumerateForNames[argPkt.listenerPupAddress];
    pktLength ← 1;
    BEGIN  -- Marshal fullFName: ROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[fullFName, pkt, pktLength, FALSE];
      END;  -- Marshal fullFName.
    RETURN[returnLength: pktLength];
    END;  -- rNextEnumerateForNamesStub.

  rDoneEnumerateStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress]--
      RpcPrivate.Dispatcher =
    BEGIN
    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];
    rDoneEnumerate[argPkt.listenerPupAddress];
    pktLength ← 0;
    RETURN[returnLength: pktLength];
    END;  -- rDoneEnumerateStub.

  rOpenStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress, name:
      -- ROPE, lock: FS.Lock, wantedCreatedTime: BasicTime.GMT, remoteCheck:
      -- BOOLEAN, wDir: RPC.ShortROPE, forceRemoteOpen: BOOL]
    -- RETURNS [globalNameToOpen: ROPE, openFile: OpenFile]-- RpcPrivate.Dispatcher
        =
    BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    name: ROPE;
    lock: FS.Lock;
    wantedCreatedTime: BasicTime.GMT;
    remoteCheck: BOOLEAN;
    wDir: RPC.ShortROPE;
    forceRemoteOpen: BOOL;
    globalNameToOpen: ROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, lock (4): FS.Lock, wantedCreatedTime (5):
        BasicTime.GMT, remoteCheck (7): BOOLEAN, forceRemoteOpen (8): BOOL];
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        openFile (0): OpenFile];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    resPkt: LONG POINTER TO ResultOverlay;
    pktLength: RpcPrivate.DataLength ← 9;
    BEGIN  -- OnePkt.
    onePkt: BOOLEAN = lastPkt;
    IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
      [listenerPupAddress: listenerPupAddress, lock: lock, wantedCreatedTime:
          wantedCreatedTime, remoteCheck: remoteCheck, forceRemoteOpen:
          forceRemoteOpen] ← argPkt↑;
      END;
    BEGIN  -- Unmarshal name: ROPE from pkt.data[pktLength].
      [name, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE];
      END;  -- Unmarshal name.
    BEGIN  -- Unmarshal wDir: RPC.ShortROPE from pkt.data[pktLength].
      [wDir, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE];
      END;  -- Unmarshal wDir.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    resPkt ← @pkt.data[0];
    IF onePkt
      THEN [globalNameToOpen, resPkt.openFile] ←
          rOpen[argPkt.listenerPupAddress, name, argPkt.lock, argPkt.wantedCreatedTime,
              argPkt.remoteCheck, wDir, argPkt.forceRemoteOpen]
      ELSE [globalNameToOpen, resPkt.openFile] ←
          rOpen[listenerPupAddress, name, lock, wantedCreatedTime,
              remoteCheck, wDir, forceRemoteOpen];
    END;  -- OnePkt.
    pktLength ← 2;
    BEGIN  -- Marshal globalNameToOpen: ROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[globalNameToOpen, pkt, pktLength,
          FALSE];
      END;  -- Marshal globalNameToOpen.
    RETURN[returnLength: pktLength];
    END;  -- rOpenStub.

  rCreateStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- name: ROPE, setPages: BOOLEAN, pages: INT, setKeep: BOOLEAN, keep:
      -- CARDINAL, wDir: RPC.ShortROPE]
    -- RETURNS [anonP1id1822397: OpenFile]-- RpcPrivate.Dispatcher
        =
    BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    name: ROPE;
    setPages: BOOLEAN;
    pages: INT;
    setKeep: BOOLEAN;
    keep: CARDINAL;
    wDir: RPC.ShortROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, setPages (4): BOOLEAN, pages (5): INT,
        setKeep (7): BOOLEAN, keep (8): CARDINAL];
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        anonP1id1822397 (0): OpenFile];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    resPkt: LONG POINTER TO ResultOverlay;
    pktLength: RpcPrivate.DataLength ← 9;
    BEGIN  -- OnePkt.
    onePkt: BOOLEAN = lastPkt;
    IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
      [listenerPupAddress: listenerPupAddress, setPages: setPages,
          pages: pages, setKeep: setKeep, keep: keep] ← argPkt↑;
      END;
    BEGIN  -- Unmarshal name: ROPE from pkt.data[pktLength].
      [name, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE];
      END;  -- Unmarshal name.
    BEGIN  -- Unmarshal wDir: RPC.ShortROPE from pkt.data[pktLength].
      [wDir, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE];
      END;  -- Unmarshal wDir.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    resPkt ← @pkt.data[0];
    IF onePkt
      THEN [resPkt.anonP1id1822397] ← rCreate[argPkt.listenerPupAddress,
          name, argPkt.setPages, argPkt.pages, argPkt.setKeep, argPkt.keep,
          wDir]
      ELSE [resPkt.anonP1id1822397] ← rCreate[listenerPupAddress, name,
          setPages, pages, setKeep, keep, wDir];
    END;  -- OnePkt.
    pktLength ← 2;
    RETURN[returnLength: pktLength];
    END;  -- rCreateStub.

  rOpenOrCreateStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- name: ROPE, keep: CARDINAL, pages: INT, wDir: RPC.ShortROPE]
    -- RETURNS [anonP1id1822436: OpenFile]-- RpcPrivate.Dispatcher
        =
    BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    name: ROPE;
    keep: CARDINAL;
    pages: INT;
    wDir: RPC.ShortROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, keep (4): CARDINAL, pages (5): INT];
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        anonP1id1822436 (0): OpenFile];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    resPkt: LONG POINTER TO ResultOverlay;
    pktLength: RpcPrivate.DataLength ← 7;
    BEGIN  -- OnePkt.
    onePkt: BOOLEAN = lastPkt;
    IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
      [listenerPupAddress: listenerPupAddress, keep: keep, pages: pages]
          ← argPkt↑;
      END;
    BEGIN  -- Unmarshal name: ROPE from pkt.data[pktLength].
      [name, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE];
      END;  -- Unmarshal name.
    BEGIN  -- Unmarshal wDir: RPC.ShortROPE from pkt.data[pktLength].
      [wDir, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE];
      END;  -- Unmarshal wDir.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    resPkt ← @pkt.data[0];
    IF onePkt
      THEN [resPkt.anonP1id1822436] ← rOpenOrCreate[argPkt.listenerPupAddress,
          name, argPkt.keep, argPkt.pages, wDir]
      ELSE [resPkt.anonP1id1822436] ← rOpenOrCreate[listenerPupAddress,
          name, keep, pages, wDir];
    END;  -- OnePkt.
    pktLength ← 2;
    RETURN[returnLength: pktLength];
    END;  -- rOpenOrCreateStub.

  rGetClassStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- file: OpenFile] RETURNS [anonP1id1822460: ATOM]-- RpcPrivate.Dispatcher
      =
    BEGIN
    anonP1id1822460: ATOM;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, file (4): OpenFile];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength;
    Lupine.CheckPktLength[pkt: pkt, pktLength: 6];
    [anonP1id1822460] ← rGetClass[argPkt.listenerPupAddress, argPkt.file];
    pktLength ← 0;
    BEGIN  -- Marshal anonP1id1822460: ATOM to pkt.data[pktLength].
      pktLength ← Lupine.MarshalAtom[anonP1id1822460, pkt, pktLength];
      END;  -- Marshal anonP1id1822460.
    RETURN[returnLength: pktLength];
    END;  -- rGetClassStub.

  rSameFileStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- file1: OpenFile, file2: OpenFile]
    -- RETURNS [anonP1id1822489: BOOLEAN]-- RpcPrivate.Dispatcher =
    BEGIN
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, file1 (4): OpenFile, file2 (6): OpenFile];
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        anonP1id1822489 (0): BOOLEAN];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength;
    Lupine.CheckPktLength[pkt: pkt, pktLength: 8];
    [resPkt.anonP1id1822489] ← rSameFile[argPkt.listenerPupAddress,
        argPkt.file1, argPkt.file2];
    pktLength ← 1;
    RETURN[returnLength: pktLength];
    END;  -- rSameFileStub.

  rGetNameStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- file: OpenFile] RETURNS [fullFName: ROPE, attachedTo: ROPE]--
      RpcPrivate.Dispatcher =
    BEGIN
    fullFName: ROPE;
    attachedTo: ROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, file (4): OpenFile];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength;
    Lupine.CheckPktLength[pkt: pkt, pktLength: 6];
    [fullFName, attachedTo] ←
      rGetName[argPkt.listenerPupAddress, argPkt.file];
    pktLength ← 0;
    BEGIN  -- Marshal fullFName: ROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[fullFName, pkt, pktLength, FALSE];
      END;  -- Marshal fullFName.
    BEGIN  -- Marshal attachedTo: ROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[attachedTo, pkt, pktLength, FALSE];
      END;  -- Marshal attachedTo.
    RETURN[returnLength: pktLength];
    END;  -- rGetNameStub.

  rGetInfoStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- file: OpenFile] RETURNS [keep: CARDINAL, pages: INT, bytes: INT,
      -- created: BasicTime.GMT, lock: FS.Lock]-- RpcPrivate.Dispatcher
      =
    BEGIN
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, file (4): OpenFile];
    ResultOverlay: TYPE = MACHINE DEPENDENT RECORD [
        keep (0): CARDINAL, pages (1): INT, bytes (3): INT, created (5):
        BasicTime.GMT, lock (7): FS.Lock];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    resPkt: LONG POINTER TO ResultOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength;
    Lupine.CheckPktLength[pkt: pkt, pktLength: 6];
    [resPkt.keep, resPkt.pages, resPkt.bytes, resPkt.created, resPkt.lock]
        ←
      rGetInfo[argPkt.listenerPupAddress, argPkt.file];
    pktLength ← 8;
    RETURN[returnLength: pktLength];
    END;  -- rGetInfoStub.

  rSetPageCountStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- file: OpenFile, pages: INT]-- RpcPrivate.Dispatcher =
    BEGIN
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, file (4): OpenFile, pages (6): INT];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength;
    Lupine.CheckPktLength[pkt: pkt, pktLength: 8];
    rSetPageCount[argPkt.listenerPupAddress, argPkt.file, argPkt.pages];
    pktLength ← 0;
    RETURN[returnLength: pktLength];
    END;  -- rSetPageCountStub.

  rSetByteCountAndCreatedTimeStub: --PROCEDURE [listenerPupAddress:
      -- PupDefs.PupAddress, file: OpenFile, bytes: INT, created: BasicTime.GMT]--
      RpcPrivate.Dispatcher =
    BEGIN
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, file (4): OpenFile, bytes (6): INT, created
        (8): BasicTime.GMT];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength;
    Lupine.CheckPktLength[pkt: pkt, pktLength: 10];
    rSetByteCountAndCreatedTime[argPkt.listenerPupAddress, argPkt.file,
        argPkt.bytes, argPkt.created];
    pktLength ← 0;
    RETURN[returnLength: pktLength];
    END;  -- rSetByteCountAndCreatedTimeStub.

  rReadStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress, file:
      -- OpenFile, from: INT, nPages: INT, pageBuffer: RESULTPageBuffer]--
      RpcPrivate.Dispatcher =
    BEGIN
    pageBuffer: RESULTPageBuffer;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, file (4): OpenFile, from (6): INT, nPages
        (8): INT];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength ← 10;
    MaxHeapAllocs: CARDINAL = 1;
    heapAllocVector: ARRAY [1..MaxHeapAllocs] OF LONG POINTER←ALL[NIL];
    BEGIN ENABLE UNWIND => BEGIN  -- Free storage.
        FOR ptr: CARDINAL IN [1..LENGTH[heapAllocVector]] DO
          IF heapAllocVector[ptr] = NIL THEN EXIT;
          paramZones.heap.FREE[@heapAllocVector[ptr]];
          ENDLOOP;
        END;  -- Free storage.
      BEGIN  -- Unmarshal pageBuffer: RESULTPageBuffer from pkt.data[pktLength].
        DescriptorType: TYPE = RECORD [SEQUENCE COMPUTED CARDINAL OF
            WORD];
        descLength: Lupine.SequenceHeader;
        descLength ← Lupine.RpcPktDoubleWord[pkt, pktLength]↑;
        pktLength ← pktLength + 2;
        pageBuffer ← DESCRIPTOR[
          (heapAllocVector[1] ← paramZones.heap.NEW[DescriptorType[Lupine.SHORT[descLength]]]),
          Lupine.SHORT[descLength]];
        NULL;  -- Call by result, use uninitialized descriptor.
        END;  -- Unmarshal pageBuffer.
      Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
      rRead[argPkt.listenerPupAddress, argPkt.file, argPkt.from, argPkt.nPages,
          pageBuffer];
      pktLength ← 0;
      BEGIN  -- Marshal pageBuffer: RESULTPageBuffer to pkt.data[pktLength].
        IF pktLength+2 > RpcPrivate.maxDataLength
          THEN pktLength ← Lupine.StartNextPkt[pkt: pkt, pktLength:
              pktLength];
        Lupine.RpcPktDoubleWord[pkt, pktLength]↑ ← (IF BASE[pageBuffer]=NIL
            THEN 0 ELSE LENGTH[pageBuffer]);
        pktLength ← pktLength + 2;
        IF BASE[pageBuffer] # NIL THEN
          pktLength ← Lupine.CopyToPkt[pkt: pkt, pktLength: pktLength,
              dataAdr: BASE[pageBuffer], dataLength: SIZE[WORD]*LENGTH[pageBuffer],
              alwaysOnePkt: FALSE];
        END;  -- Marshal pageBuffer.
      END;  -- ENABLE UNWIND => Free storage.
    FOR ptr: CARDINAL IN [1..LENGTH[heapAllocVector]] DO
      IF heapAllocVector[ptr] = NIL THEN EXIT;
      paramZones.heap.FREE[@heapAllocVector[ptr]];
      ENDLOOP;
    RETURN[returnLength: pktLength];
    END;  -- rReadStub.

  rWriteStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- file: OpenFile, to: INT, nPages: INT, pageBuffer: VALUEPageBuffer]--
      RpcPrivate.Dispatcher =
    BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    file: OpenFile;
    to: INT;
    nPages: INT;
    pageBuffer: VALUEPageBuffer;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, file (4): OpenFile, to (6): INT, nPages
        (8): INT];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength ← 10;
    MaxHeapAllocs: CARDINAL = 1;
    heapAllocVector: ARRAY [1..MaxHeapAllocs] OF LONG POINTER←ALL[NIL];
    BEGIN ENABLE UNWIND => BEGIN  -- Free storage.
        FOR ptr: CARDINAL IN [1..LENGTH[heapAllocVector]] DO
          IF heapAllocVector[ptr] = NIL THEN EXIT;
          paramZones.heap.FREE[@heapAllocVector[ptr]];
          ENDLOOP;
        END;  -- Free storage.
      BEGIN  -- OnePkt.
      onePkt: BOOLEAN = lastPkt;
      IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
        [listenerPupAddress: listenerPupAddress, file: file, to: to,
            nPages: nPages] ← argPkt↑;
        END;
      BEGIN  -- Unmarshal pageBuffer: VALUEPageBuffer from pkt.data[pktLength].
        DescriptorType: TYPE = RECORD [SEQUENCE COMPUTED CARDINAL OF
            WORD];
        descLength: Lupine.SequenceHeader;
        IF pktLength+2 > RpcPrivate.maxDataLength
          THEN pktLength ← Lupine.FinishThisPkt[pkt: pkt, pktLength:
              pktLength];
        descLength ← Lupine.RpcPktDoubleWord[pkt, pktLength]↑;
        pktLength ← pktLength + 2;
        pageBuffer ← DESCRIPTOR[
          (heapAllocVector[1] ← paramZones.heap.NEW[DescriptorType[Lupine.SHORT[descLength]]]),
          Lupine.SHORT[descLength]];
        pktLength ← Lupine.CopyFromPkt[pkt: pkt, pktLength: pktLength,
            dataAdr: BASE[pageBuffer], dataLength: SIZE[WORD]*LENGTH[pageBuffer],
            alwaysOnePkt: FALSE];
        END;  -- Unmarshal pageBuffer.
      Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
      IF onePkt
        THEN rWrite[argPkt.listenerPupAddress, argPkt.file, argPkt.to,
            argPkt.nPages, pageBuffer]
        ELSE rWrite[listenerPupAddress, file, to, nPages, pageBuffer];
      END;  -- OnePkt.
      pktLength ← 0;
      END;  -- ENABLE UNWIND => Free storage.
    FOR ptr: CARDINAL IN [1..LENGTH[heapAllocVector]] DO
      IF heapAllocVector[ptr] = NIL THEN EXIT;
      paramZones.heap.FREE[@heapAllocVector[ptr]];
      ENDLOOP;
    RETURN[returnLength: pktLength];
    END;  -- rWriteStub.

  rCloseStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- file: OpenFile]-- RpcPrivate.Dispatcher =
    BEGIN
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, file (4): OpenFile];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength;
    Lupine.CheckPktLength[pkt: pkt, pktLength: 6];
    rClose[argPkt.listenerPupAddress, argPkt.file];
    pktLength ← 0;
    RETURN[returnLength: pktLength];
    END;  -- rCloseStub.

  rCopyStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress, from:
      -- ROPE, to: ROPE, setKeep: BOOLEAN, keep: CARDINAL, wantedCreatedTime:
      -- BasicTime.GMT, remoteCheck: BOOLEAN, attach: BOOLEAN, wDir: RPC.ShortROPE]
    -- RETURNS [toFName: ROPE]-- RpcPrivate.Dispatcher =
    BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    from: ROPE;
    to: ROPE;
    setKeep: BOOLEAN;
    keep: CARDINAL;
    wantedCreatedTime: BasicTime.GMT;
    remoteCheck: BOOLEAN;
    attach: BOOLEAN;
    wDir: RPC.ShortROPE;
    toFName: ROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, setKeep (4): BOOLEAN, keep (5): CARDINAL,
        wantedCreatedTime (6): BasicTime.GMT, remoteCheck (8): BOOLEAN,
        attach (9): BOOLEAN];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength ← 10;
    BEGIN  -- OnePkt.
    onePkt: BOOLEAN = lastPkt;
    IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
      [listenerPupAddress: listenerPupAddress, setKeep: setKeep, keep:
          keep, wantedCreatedTime: wantedCreatedTime, remoteCheck: remoteCheck,
          attach: attach] ← argPkt↑;
      END;
    BEGIN  -- Unmarshal from: ROPE from pkt.data[pktLength].
      [from, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE];
      END;  -- Unmarshal from.
    BEGIN  -- Unmarshal to: ROPE from pkt.data[pktLength].
      [to, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE];
      END;  -- Unmarshal to.
    BEGIN  -- Unmarshal wDir: RPC.ShortROPE from pkt.data[pktLength].
      [wDir, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE];
      END;  -- Unmarshal wDir.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    IF onePkt
      THEN [toFName] ← rCopy[argPkt.listenerPupAddress, from, to, argPkt.setKeep,
          argPkt.keep, argPkt.wantedCreatedTime, argPkt.remoteCheck, argPkt.attach,
          wDir]
      ELSE [toFName] ← rCopy[listenerPupAddress, from, to, setKeep,
          keep, wantedCreatedTime, remoteCheck, attach, wDir];
    END;  -- OnePkt.
    pktLength ← 0;
    BEGIN  -- Marshal toFName: ROPE to pkt.data[pktLength].
      pktLength ← Lupine.MarshalRope[toFName, pkt, pktLength, FALSE];
      END;  -- Marshal toFName.
    RETURN[returnLength: pktLength];
    END;  -- rCopyStub.

  rDeleteStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- name: ROPE, wantedCreatedTime: BasicTime.GMT, wDir: RPC.ShortROPE]--
      RpcPrivate.Dispatcher =
    BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    name: ROPE;
    wantedCreatedTime: BasicTime.GMT;
    wDir: RPC.ShortROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, wantedCreatedTime (4): BasicTime.GMT];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength ← 6;
    BEGIN  -- OnePkt.
    onePkt: BOOLEAN = lastPkt;
    IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
      [listenerPupAddress: listenerPupAddress, wantedCreatedTime: wantedCreatedTime]
          ← argPkt↑;
      END;
    BEGIN  -- Unmarshal name: ROPE from pkt.data[pktLength].
      [name, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE];
      END;  -- Unmarshal name.
    BEGIN  -- Unmarshal wDir: RPC.ShortROPE from pkt.data[pktLength].
      [wDir, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE];
      END;  -- Unmarshal wDir.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    IF onePkt
      THEN rDelete[argPkt.listenerPupAddress, name, argPkt.wantedCreatedTime,
          wDir]
      ELSE rDelete[listenerPupAddress, name, wantedCreatedTime, wDir];
    END;  -- OnePkt.
    pktLength ← 0;
    RETURN[returnLength: pktLength];
    END;  -- rDeleteStub.

  rRenameStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- from: ROPE, to: ROPE, setKeep: BOOLEAN, keep: CARDINAL, wantedCreatedTime:
      -- BasicTime.GMT, wDir: RPC.ShortROPE]-- RpcPrivate.Dispatcher =
    BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    from: ROPE;
    to: ROPE;
    setKeep: BOOLEAN;
    keep: CARDINAL;
    wantedCreatedTime: BasicTime.GMT;
    wDir: RPC.ShortROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, setKeep (4): BOOLEAN, keep (5): CARDINAL,
        wantedCreatedTime (6): BasicTime.GMT];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength ← 8;
    BEGIN  -- OnePkt.
    onePkt: BOOLEAN = lastPkt;
    IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
      [listenerPupAddress: listenerPupAddress, setKeep: setKeep, keep:
          keep, wantedCreatedTime: wantedCreatedTime] ← argPkt↑;
      END;
    BEGIN  -- Unmarshal from: ROPE from pkt.data[pktLength].
      [from, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE];
      END;  -- Unmarshal from.
    BEGIN  -- Unmarshal to: ROPE from pkt.data[pktLength].
      [to, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE];
      END;  -- Unmarshal to.
    BEGIN  -- Unmarshal wDir: RPC.ShortROPE from pkt.data[pktLength].
      [wDir, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE];
      END;  -- Unmarshal wDir.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    IF onePkt
      THEN rRename[argPkt.listenerPupAddress, from, to, argPkt.setKeep,
          argPkt.keep, argPkt.wantedCreatedTime, wDir]
      ELSE rRename[listenerPupAddress, from, to, setKeep, keep, wantedCreatedTime,
          wDir];
    END;  -- OnePkt.
    pktLength ← 0;
    RETURN[returnLength: pktLength];
    END;  -- rRenameStub.

  rSetKeepStub: --PROCEDURE [listenerPupAddress: PupDefs.PupAddress,
      -- name: ROPE, keep: CARDINAL, wDir: RPC.ShortROPE]-- RpcPrivate.Dispatcher
      =
    BEGIN
    listenerPupAddress: PupDefs.PupAddress;
    name: ROPE;
    keep: CARDINAL;
    wDir: RPC.ShortROPE;
    ArgumentOverlay: TYPE = MACHINE DEPENDENT RECORD [
        transferIndex (0): RpcControl.ProcedureIndex, listenerPupAddress
        (1): PupDefs.PupAddress, keep (4): CARDINAL];
    argPkt: LONG POINTER TO ArgumentOverlay = @pkt.data[0];
    pktLength: RpcPrivate.DataLength ← 5;
    BEGIN  -- OnePkt.
    onePkt: BOOLEAN = lastPkt;
    IF ~onePkt THEN BEGIN  -- Must move statics from pkt now.
      [listenerPupAddress: listenerPupAddress, keep: keep] ← argPkt↑;
      END;
    BEGIN  -- Unmarshal name: ROPE from pkt.data[pktLength].
      [name, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, FALSE];
      END;  -- Unmarshal name.
    BEGIN  -- Unmarshal wDir: RPC.ShortROPE from pkt.data[pktLength].
      [wDir, pktLength] ← Lupine.UnmarshalRope[pkt, pktLength, TRUE];
      END;  -- Unmarshal wDir.
    Lupine.CheckPktLength[pkt: pkt, pktLength: pktLength];
    IF onePkt
      THEN rSetKeep[argPkt.listenerPupAddress, name, argPkt.keep, wDir]
      ELSE rSetKeep[listenerPupAddress, name, keep, wDir];
    END;  -- OnePkt.
    pktLength ← 0;
    RETURN[returnLength: pktLength];
    END;  -- rSetKeepStub.


-- Marshall/Unmarshal procedures.


-- No module initialization.

END.  -- ComputeServerCallbacksRpcServerImpl.