DIRECTORY AMBridge USING [TVToLC], AMTypes USING [IndexToTV, TV], IO USING [PutF], PrintTV USING [RegisterRefPrintProc, RegisterTVPrintProc, RefPrintProc, TVPrintProc], Pup USING [Address, Host, Net, Socket], PupType USING [CardFromSocket]; PupDebug: CEDAR PROGRAM IMPORTS AMBridge, AMTypes, IO, PrintTV, PupType = { PrintRefPupAddress: PrintTV.RefPrintProc = { foo: REF READONLY Pup.Address _ NARROW[ref]; socket: LONG CARDINAL _ PupType.CardFromSocket[foo.socket]; IO.PutF[stream, "%B#%B#%B", [integer[foo.net]], [integer[foo.host]], [cardinal[socket]] ]; }; PrintTVPupAddress: PrintTV.TVPrintProc = TRUSTED { foo: Pup.Address; socket: LONG CARDINAL; netTV: AMTypes.TV _ AMTypes.IndexToTV[tv, 1]; hostTV: AMTypes.TV _ AMTypes.IndexToTV[tv, 2]; socketTV: AMTypes.TV _ AMTypes.IndexToTV[tv, 3]; socketTVa: AMTypes.TV _ AMTypes.IndexToTV[socketTV, 1]; socketTVb: AMTypes.TV _ AMTypes.IndexToTV[socketTV, 2]; socketTVc: AMTypes.TV _ AMTypes.IndexToTV[socketTV, 3]; socketTVd: AMTypes.TV _ AMTypes.IndexToTV[socketTV, 4]; foo.net _ [AMBridge.TVToLC[netTV]]; foo.host _ [AMBridge.TVToLC[hostTV]]; foo.socket.a _ AMBridge.TVToLC[socketTVa]; foo.socket.b _ AMBridge.TVToLC[socketTVb]; foo.socket.c _ AMBridge.TVToLC[socketTVc]; foo.socket.d _ AMBridge.TVToLC[socketTVd]; socket _ PupType.CardFromSocket[foo.socket]; IO.PutF[stream, "%B#%B#%B", [cardinal[foo.net]], [cardinal[foo.host]], [cardinal[socket]] ]; }; PrintTVPupNet: PrintTV.TVPrintProc = TRUSTED { net: Pup.Net; net _ [AMBridge.TVToLC[tv]]; IO.PutF[stream, "%B", [cardinal[net]] ]; }; PrintTVPupHost: PrintTV.TVPrintProc = TRUSTED { host: Pup.Host; host _ [AMBridge.TVToLC[tv]]; IO.PutF[stream, "%B", [cardinal[host]] ]; }; PrintTVPupSocket: PrintTV.TVPrintProc = TRUSTED { socket: Pup.Socket; socketTVa: AMTypes.TV _ AMTypes.IndexToTV[tv, 1]; socketTVb: AMTypes.TV _ AMTypes.IndexToTV[tv, 2]; socketTVc: AMTypes.TV _ AMTypes.IndexToTV[tv, 3]; socketTVd: AMTypes.TV _ AMTypes.IndexToTV[tv, 4]; socket.a _ AMBridge.TVToLC[socketTVa]; socket.b _ AMBridge.TVToLC[socketTVb]; socket.c _ AMBridge.TVToLC[socketTVc]; socket.d _ AMBridge.TVToLC[socketTVd]; IO.PutF[stream, "%B", [cardinal[PupType.CardFromSocket[socket]]] ]; }; PrintTV.RegisterRefPrintProc[CODE[Pup.Address], PrintRefPupAddress]; PrintTV.RegisterTVPrintProc[CODE[Pup.Address], PrintTVPupAddress]; PrintTV.RegisterTVPrintProc[CODE[Pup.Net], PrintTVPupNet]; PrintTV.RegisterTVPrintProc[CODE[Pup.Host], PrintTVPupHost]; PrintTV.RegisterTVPrintProc[CODE[Pup.Socket], PrintTVPupSocket]; }. PupDebug.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Hal Murray, February 5, 1986 5:50:35 am PST [ref: REF READONLY ANY, data: REF ANY, stream: STREAM, depth: INT _ 4, width: INT _ 32, verbose: BOOL _ FALSE] RETURNS [useOld: BOOL _ FALSE] [tv: TV, data: REF ANY, stream: STREAM, depth: INT _ 4, width: INT _ 32, verbose: BOOL _ FALSE] RETURNS [useOld: BOOL _ FALSE] [tv: TV, data: REF ANY, stream: STREAM, depth: INT _ 4, width: INT _ 32, verbose: BOOL _ FALSE] RETURNS [useOld: BOOL _ FALSE] [tv: TV, data: REF ANY, stream: STREAM, depth: INT _ 4, width: INT _ 32, verbose: BOOL _ FALSE] RETURNS [useOld: BOOL _ FALSE] [tv: TV, data: REF ANY, stream: STREAM, depth: INT _ 4, width: INT _ 32, verbose: BOOL _ FALSE] RETURNS [useOld: BOOL _ FALSE] ส‹˜codešœ ™ Kšœ ฯmœ1™