DIRECTORY Arpa USING [Address, nullAddress], Rope USING [ROPE], SunRPCAuth USING [Conversation], SunYP USING [EachMapNameProc] ; SunYPAgent: CEDAR DEFINITIONS ~ { ROPE: TYPE ~ Rope.ROPE; Handle: TYPE ~ REF Object; Object: TYPE; ObtainHandle: PROC [domainName: ROPE ¬ NIL, conversation: SunRPCAuth.Conversation ¬ NIL, serverAddress: Arpa.Address ¬ Arpa.nullAddress] RETURNS [h: Handle]; RefreshHandle: PROC [h: Handle, conversation: SunRPCAuth.Conversation ¬ NIL, serverAddress: Arpa.Address ¬ Arpa.nullAddress]; ReleaseHandle: PROC [h: Handle]; Match: PROC [h: Handle, map: ROPE, key: ROPE] RETURNS [val: REF TEXT]; First: PROC [h: Handle, map: ROPE] RETURNS [key: ROPE, val: REF TEXT]; Next: PROC [h: Handle, map: ROPE, keyBefore: ROPE] RETURNS [key: ROPE, val: REF TEXT]; MapList: PROC [h: Handle, eachMap: SunYP.EachMapNameProc]; TextSeq: TYPE ~ REF TextSeqObject; TextSeqObject: TYPE ~ RECORD [ length: CARDINAL, refText: SEQUENCE maxLength: CARDINAL OF REF TEXT ]; Tokenize: PROC [in: REF READONLY TEXT] RETURNS [out: TextSeq]; TokenizeUsingSeparator: PROC [in: REF READONLY TEXT, sepChar: CHAR, trimLeadingSpace, trimTrailingSpace: BOOL ¬ TRUE] RETURNS [out: TextSeq]; Error: ERROR [code: ATOM]; }... „ SunYPAgent.mesa Copyright Σ 1991 by Xerox Corporation. All rights reserved. Demers, November 23, 1988 6:04:08 pm PST Types Procedures Obtain a handle to talk to a server for the specified domain (or to the default domain if "domainName" is allowed to default to NIL). If a conversation is specified, that one is used; otherwise null credentials are used to create a conversation. In any case, the conversation is owned by the handle  client should not call SunRPCAuth.Terminate[c]. If a server is specified, that one is used; otherwise the agent tries to find a server. ! Error[$noYP | $domainNotFound | $timeout | $protocol]. Point h at a (another) server for the domain associated with h. If a conversation is specified, that one is used; otherwise null credentials are used to create a conversation. If a server is specified, that one is used; otherwise the agent tries to find a server. ! Error[$noYP | $domainNotFound | $timeout | $protocol]. It's okay to drop one on the floor occasionally. Find entry matching key in the given map. ! Error[$mapNotFound | $keyNotFound | $timeout | $protocol] Return the first entry in the specified map. ! Error[$noMoreEntries | $mapNotFound | $keyNotFound | $timeout | $protocol] Return the next entry in the specified map. ! Error[$noMoreEntries | $mapNotFound | $keyNotFound | $timeout | $protocol] ! Error[$moreEntries | $timeout | $protocol] Utilities For parsing values from the YP data bases Separate into tokens, delimited by white space. Separate into tokens, delimited by occurrences of sepChar. If requested, leading/trailing white space is trimmed from tokens. Error Codes: $domainNameTooLong : see SunYP for max length. $mapNameTooLong: see SunYP for max length. $keyTooLong: see SunYP for max length. $valueTooLong: see SunYP for max length. $noYP : specified server not exporting YP. $domainNotFound : can't find server for specified domain. $mapNotFound : can't find specified map on server. $keyNotFound : can't find entry with given key in map. $noMoreEntries : for Next. $moreEntries : couldn't get them all with MapList. $timeout : timed out without getting a response from server. $protocol : I'm confused. Κ–(cedarcode) style•NewlineDelimiter ™code™Kšœ Οeœ1™K™/K™—šŸœžœžœžœžœ žœ'žœžœžœ˜K™:K™B——™šŸœžœžœ˜™K™.K™*K™&K™(K™*K™9K™2K™6K™K™2K™