To to: Convert [0], file: Convert [252], ~typeExported, #links: 73, links: 0: ** unbound ** GMT 1: ** unbound ** AtomFromTimePrecision 2: ** unbound ** TimePrecisionFromAtom 4: ** unbound ** AtomFromErrorType 5: ** unbound ** ErrorTypeFromAtom 10: ** unbound ** DRealFromRope 25: ** unbound ** RopeFromDInt 26: ** unbound ** RopeFromDCard 39: ** unbound ** AppendDCard 54: ** unbound ** DRealFtoRope 55: ** unbound ** AppendDRealF 56: ** unbound ** AtomFromNetFormat 57: ** unbound ** NetFormatFromAtom IO [596], file: IO [264], ~typeExported, #links: 102, links: 4: ** unbound ** AtomFromErrorCode 5: ** unbound ** ErrorCodeFromAtom 63: ** unbound ** AtomFromTokenKind 64: ** unbound ** TokenKindFromAtom 65: ** unbound ** AtomFromTokenError 66: ** unbound ** TokenErrorFromAtom 71: ** unbound ** GetDReal From Convert.mesa: RopeFromPupAddress: PROC [address: Pup.Address, format: NetFormat ¬ octal] RETURNS [ROPE]; RopeFromPupNet: PROC [net: Pup.Net, format: NetFormat ¬ octal] RETURNS [ROPE]; RopeFromPupHost: PROC [host: Pup.Host, format: NetFormat ¬ octal] RETURNS [ROPE]; RopeFromPupSocket: PROC [socket: Pup.Socket, format: NetFormat ¬ octal] RETURNS [ROPE]; PupAddressFromRope: PROC [r: ROPE] RETURNS [Pup.Address]; PupNetFromRope: PROC [r: ROPE] RETURNS [Pup.Net]; PupHostFromRope: PROC [r: ROPE] RETURNS [Pup.Host]; PupSocketFromRope: PROC [r: ROPE] RETURNS [Pup.Socket]; AppendPupAddress: PROC [to: REF TEXT, address: Pup.Address, format: NetFormat ¬ octal] RETURNS [REF TEXT]; AppendPupNet: PROC [to: REF TEXT, net: Pup.Net, format: NetFormat ¬ octal] RETURNS [REF TEXT]; AppendPupHost: PROC [to: REF TEXT, host: Pup.Host, format: NetFormat ¬ octal] RETURNS [REF TEXT]; AppendPupSocket: PROC [to: REF TEXT, socket: Pup.Socket, format: NetFormat ¬ octal] RETURNS [REF TEXT]; ConvertImpl PupAddressFromRope: PUBLIC PROC [name: ROPE] RETURNS [Pup.Address] = { pAddr: Pup.Address ¬ Pup.nullAddress; length: INT = Rope.Length[name]; net, host: CARDINAL ¬ 0; socket: CARD ¬ 0; IF length = 0 THEN RETURN[pAddr]; FOR i: INT IN [0..length) DO c: CHAR ¬ name.Fetch[i]; SELECT c FROM '# => { IF net # 0 OR socket > LAST[BYTE] THEN Error[syntax, 0]; net ¬ host; host ¬ socket; socket ¬ 0; }; IN ['0..'7] => { -- must be octal IF socket > LAST[CARD]/8 THEN Error[syntax, 0]; socket ¬ socket*8 + CARDINAL[c - '0]; }; ENDCASE => Error[syntax, 0]; ENDLOOP; IF net > LAST[BYTE] THEN Error[syntax, 0]; IF host > LAST[BYTE] THEN Error[syntax, 0]; pAddr.net ¬ [net]; pAddr.host ¬ [host]; IF socket # 0 THEN pAddr.socket ¬ SocketFromCard[socket]; RETURN[pAddr]; }; PupNetFromRope: PUBLIC PROC [r: ROPE] RETURNS [Pup.Net] = { this: CARD; ok: BOOL; [this, ok] ¬ PupCardFromRope[r, LAST[BYTE]]; IF ok THEN RETURN[[this]]; Error[syntax, 0]; }; PupHostFromRope: PUBLIC PROC [r: ROPE] RETURNS [Pup.Host] = { this: CARD; ok: BOOL; [this, ok] ¬ PupCardFromRope[r, LAST[BYTE]]; IF ok THEN RETURN[[this]]; Error[syntax, 0]; }; PupSocketFromRope: PUBLIC PROC [r: ROPE] RETURNS [Pup.Socket] = { this: CARD; ok: BOOL; [this, ok] ¬ PupCardFromRope[r, LAST[CARD]]; IF ok THEN RETURN[SocketFromCard[this]]; Error[syntax, 0]; }; RopeFromPupAddress: PUBLIC PROC [address: Pup.Address, format: NetFormat ¬ octal] RETURNS [ROPE] = { base: Base = 8; net, host, result: ROPE; IF format # octal THEN Error[invalidNetFormat, 0]; net ¬ RopeFromCard[address.net, base, FALSE]; host ¬ RopeFromCard[address.host, base, FALSE]; result ¬ Rope.Cat[net, "#", host, "#"]; IF address.socket # Pup.nullSocket THEN result ¬ result.Cat[RopeFromCard[CardFromSocket[address.socket], base, FALSE] ]; RETURN[result]; }; RopeFromPupNet: PUBLIC PROC[net: Pup.Net, format: NetFormat ¬ octal] RETURNS [ROPE] = { IF format # octal THEN Error[invalidNetFormat, 0]; RETURN[Rope.Concat[RopeFromCard[net, 8, FALSE], "#"] ]; }; RopeFromPupHost: PUBLIC PROC[host: Pup.Host, format: NetFormat ¬ octal] RETURNS [ROPE] = { IF format # octal THEN Error[invalidNetFormat, 0]; RETURN[Rope.Concat[RopeFromCard[host,8, FALSE], "#"] ]; }; RopeFromPupSocket: PUBLIC PROC[socket: Pup.Socket, format: NetFormat ¬ octal] RETURNS [ROPE] = { IF format # octal THEN Error[invalidNetFormat, 0]; RETURN[ RopeFromCard[CardFromSocket[socket], 8, FALSE] ]; }; AppendPupAddress: PUBLIC PROC [to: REF TEXT, address: Pup.Address, format: NetFormat ¬ octal] RETURNS [REF TEXT] = { base: Base = 8; IF format # octal THEN Error[invalidNetFormat, 0]; to ¬ AppendCard[to, address.net, base, FALSE]; to ¬ AppendChar[to, '#]; to ¬ AppendCard[to, address.host, base, FALSE]; to ¬ AppendChar[to, '#]; IF address.socket # Pup.nullSocket THEN to ¬ AppendCard[to, CardFromSocket[address.socket], base, FALSE]; RETURN[to]; }; AppendPupNet: PUBLIC PROC [to: REF TEXT, net: Pup.Net, format: NetFormat ¬ octal] RETURNS [REF TEXT] = { IF format # octal THEN Error[invalidNetFormat, 0]; to ¬ AppendCard[to, net, 8, FALSE]; RETURN[AppendChar[to, '#]]; }; AppendPupHost: PUBLIC PROC [to: REF TEXT, host: Pup.Host, format: NetFormat ¬ octal] RETURNS [REF TEXT] = { IF format # octal THEN Error[invalidNetFormat, 0]; to ¬ AppendCard[to, host, 8, FALSE]; RETURN[AppendChar[to, '#]]; }; AppendPupSocket: PUBLIC PROC [to: REF TEXT, socket: Pup.Socket, format: NetFormat ¬ octal] RETURNS [REF TEXT] = { IF format # octal THEN Error[invalidNetFormat, 0]; RETURN[AppendCard[to, CardFromSocket[socket], 8, FALSE] ]; }; PupCardFromRope: PROC [r: ROPE, max: CARD] RETURNS [this: CARD, ok: BOOL] = { length: INT = Rope.Length[r]; this ¬ 0; ok ¬ FALSE; IF length = 0 THEN RETURN; FOR i: INT IN [0..length) DO c: CHAR = r.Fetch[i]; SELECT c FROM '# => EXIT; IN ['0..'7] => this ¬ this*8 + CARD[c - '0]; ENDCASE => RETURN; ENDLOOP; ok ¬ (this <= max); }; SocketFromCard: PROC [c: CARD] RETURNS [Pup.Socket] = { RETURN[LOOPHOLE[c]]}; CardFromSocket: PROC [p: Pup.Socket] RETURNS [CARD] = { RETURN[LOOPHOLE[p]]}; From IOFinalization.mesa: DIRECTORY PFinalize USING [FinalizationQueue]; IOFinalization: CEDAR DEFINITIONS ~ BEGIN queue: PFinalize.FinalizationQueue; -- IOCommonImpl enables finalization to this queue finalizeStreams: BOOL; -- but only if this boolean flag is TRUE END. From IOCommonImpl.mesa: finalizeStreams: PUBLIC BOOL ¬ FALSE; queue: PUBLIC PFinalize.FinalizationQueue ¬ PFinalize.NewFQ[]; CreateStream: PUBLIC PROC [ streamProcs: REF StreamProcs, streamData: REF ANY, backingStream: STREAM ¬ NIL] RETURNS [stream: STREAM] = { stream ¬ NEW[IO.STREAMRecord ¬ [ streamProcs: streamProcs, streamData: streamData, backingStream: backingStream] ]; IF finalizeStreams THEN [] ¬ PFinalize.EnableFinalization[object: stream, fq: queue]; }; Close: PUBLIC PROC [self: STREAM, abort: BOOL ¬ FALSE] = { self.streamProcs.close[self, abort]; IF finalizeStreams THEN self.streamProcs ¬ closedStreamProcs; -- a bit of a hack -MFP }; InlineLookupProc: PROC [self: STREAM, operation: ATOM] RETURNS [proc: REF ANY] = --INLINE (workaround for a compiler bug)-- { FOR l: Atom.PropList ¬ self.streamProcs.propList, l.rest UNTIL l = NIL DO IF l.first.key = operation THEN RETURN[l.first.val]; ENDLOOP; }; f Converts the Pup stuff to ROPEs. ! Error[invalidNetFormat] if format = productSoftware. Parses ROPEs and makes the Pup stuff from it. Raises Error[syntax] if not parsable. Append the Pup stuff to REF TEXT. ! Error[invalidNetFormat] if format = productSoftware. Pup Network Address Formatting IOFinalization.mesa Copyright Σ 1989, 1991, by Xerox Corporation. All rights reserved. Michael Plass, July 24, 1989 10:47:59 am PDT A place to hold dropped STREAMs. "Standard implementation" means "try property list, then try backing stream, then do something simple (e.g. Error[NotImplementedForThisStream])" Κ ΐ–(cedardoc) style•NewlineDelimiter ™˜JšœpΟyœœ ˜Ξ—˜IcodešΟnœΟkœ4ŸœŸœ˜[KšžœŸœ,ŸœŸœ˜OKšžœŸœ.ŸœŸœ˜RšžœŸœ2ŸœŸœ˜XKšœ ™ Kšœ6™6—KšžœŸœŸœŸœ˜9KšžœŸœŸœŸœ ˜1KšžœŸœŸœŸœ ˜3šžœŸœŸœŸœ˜7KšœT™TK™—KšžœŸœŸœŸœ3ŸœŸœŸœ˜jKšž œŸœŸœŸœ+ŸœŸœŸœ˜^Kšž œŸœŸœŸœ-ŸœŸœŸœ˜ašžœŸœŸœŸœ1ŸœŸœŸœ˜gKšœ!™!Kšœ6™6K™—J˜—˜ head™š žœŸœŸœŸœŸœ˜FKšœ%˜%KšœŸœ˜ Kšœ Ÿœ˜KšœŸœ˜KšŸœ ŸœŸœ˜!šŸœŸœŸœ Ÿ˜KšœŸœ˜šŸœŸ˜ šœ˜Kš Ÿœ Ÿœ ŸœŸœŸœ˜8K˜ Kšœ˜Kšœ ˜ Kšœ˜—šŸœΟc˜"KšŸœ ŸœŸœŸœ˜/KšœŸœ ˜%Kšœ˜—KšŸœ˜—KšŸœ˜—KšŸœŸœŸœŸœ˜*KšŸœŸœŸœŸœ˜+K˜K˜KšŸœ Ÿœ'˜9KšŸœ˜Kšœ˜K˜—š žœŸœŸœŸœŸœ˜;KšœŸœ˜ KšœŸœ˜ Kšœ ŸœŸœ˜,KšŸœŸœŸœ ˜K˜K˜K˜—š žœŸœŸœŸœŸœ˜=KšœŸœ˜ KšœŸœ˜ Kšœ ŸœŸœ˜,KšŸœŸœŸœ ˜K˜K˜K˜—š žœŸœŸœŸœŸœ˜AKšœŸœ˜ KšœŸœ˜ Kšœ ŸœŸœ˜,KšŸœŸœŸœ˜(K˜K˜K˜—šžœŸœŸœ2˜QKšœŸœŸœ˜Kšœ˜KšœŸœ˜KšŸœŸœ˜2Kšœ&Ÿœ˜-Kšœ(Ÿœ˜/Kšœ'˜'šŸœ!Ÿ˜'KšœGŸœ˜P—KšŸœ ˜K˜K˜—š žœŸœŸœ*ŸœŸœ˜WKšŸœŸœ˜2KšŸœ"Ÿœ ˜7K˜—K˜šžœŸœŸœ+˜GKšœŸœŸœ˜KšŸœŸœ˜2KšŸœ"Ÿœ ˜7K˜—K˜šžœŸœŸœ/˜MKšœŸœŸœ˜KšŸœŸœ˜2KšŸœ*Ÿœ˜9K˜K˜—šžœŸœŸœŸœŸœ3ŸœŸœŸœ˜tKšœ˜KšŸœŸœ˜2Kšœ'Ÿœ˜.Kšœ˜Kšœ(Ÿœ˜/Kšœ˜šŸœ!Ÿ˜'Kšœ:Ÿœ˜B—KšŸœ˜ K˜K˜—šž œŸœŸœŸœŸœ+ŸœŸœŸœ˜hKšŸœŸœ˜2KšœŸœ˜#KšŸœ˜K˜K˜—šž œŸœŸœŸœŸœ-ŸœŸœŸœ˜kKšŸœŸœ˜2KšœŸœ˜$KšŸœ˜K˜K˜—šžœŸœŸœŸœŸœ1ŸœŸœŸœ˜qKšŸœŸœ˜2KšŸœ+Ÿœ˜:K˜K˜—šžœŸœŸœŸœŸœŸœŸœ˜MKšœŸœ˜Kšœ ˜ KšœŸœ˜ KšŸœ ŸœŸœ˜šŸœŸœŸœ Ÿ˜KšœŸœ˜šŸœŸ˜ KšœŸœ˜ KšŸœŸœ ˜,KšŸœŸœ˜—KšŸœ˜—Kšœ˜K˜K˜—š žœŸœŸœŸœŸ˜7KšœŸœ˜K˜—š žœŸœŸœŸœŸ˜7KšœŸœ˜—K˜——šœ˜šœ™Kšœ Οeœ8™CK™,K™K™ —K˜KšŸ œ Ÿœ˜.K˜KšžœŸœŸ ˜!šœŸ˜K˜Kšœ$ 2˜VKšœŸœ (˜@—K˜KšŸœ˜K˜—˜KšœŸœŸœŸœ˜%KšœŸœ1˜>šž œŸœŸœ˜Kš œ ŸœŸœŸœŸœŸœ˜OKšŸœ Ÿœ˜šœ ŸœŸœ˜ KšœR˜R—K•StartOfExpansion6[object: REF ANY, fq: PFinalize.FinalizationQueue]šŸœŸœ>˜UKšœ˜K˜—š žœŸœŸœŸœ ŸœŸœ˜:Kšœ$˜$KšŸœŸœ' ˜UKšœ˜—K˜Kšœ™šžœŸœŸœ ŸœŸœŸœŸœ˜NKšœŸ*œ˜.šŸœ6ŸœŸœŸ˜IKšŸœŸœŸœ˜5KšŸœ˜—K˜K˜—K˜J˜——…—š'ΐ