ThisMachine.mesa
Copyright Ó 1986, 1991 by Xerox Corporation. All rights reserved.
Hal Murray, January 20, 1986 5:28:29 pm PST
Doug Wyatt, December 11, 1986 12:09:19 pm PST
JKF August 31, 1988 3:20:49 pm PDT
This interface returns only ROPEs. The idea is to avoid compilation dependencies for things like profile processing or herald windows that really don't care about the details of network addressing. Using an atom (rather than an enumerated type) as the parameter allows for extensions without recompiling, at the cost of the documentation (the comments below) being out of date.
DIRECTORY
Rope USING [ROPE];
ThisMachine: CEDAR DEFINITIONS
= BEGIN
ROPE: TYPE = Rope.ROPE;
Name: PROC [ATOM ¬ NIL] RETURNS [ROPE];
Returns NIL if any troubles, for example when a server is down.
NIL, $Arpa => "Shark.PARC.Xerox.COM"
$XNS => "Shark:PARC:Xerox"
$Pup => "Shark"
Address: PROC [ATOM ¬ NIL] RETURNS [ROPE];
Returns NIL if any troubles, for example when a server is down.
Beware: A machine may have more than one address.
NIL, $Arpa => "[1.2.3.4]"
$XNS => "0-003.1-435-140-188."
$Pup => "3#313#"
ProcessorID: PROC [ATOM ¬ NIL] RETURNS [ROPE];
$Decimal, $ProductSoftware => "1-435-140-188"
$Hex => "558A805CH" Note trailing H. A leading 0 will be added if appropriate.
NIL, $Octal => "12542500134" No trailing B.
END.