<> <> <> <> <> <> <> DIRECTORY Rope USING [ROPE]; SystemNames: CEDAR DEFINITIONS ~ { ROPE: TYPE ~ Rope.ROPE; UserName: PROC RETURNS [ROPE]; <<... returns the short name of the current user; "wyatt", for example.>> MachineName: PROC RETURNS [ROPE]; <<... returns the short name of the current machine; "chorus", for example.>> Release: TYPE ~ { current, previous, next }; ReleaseName: PROC [release: Release ¬ $current] RETURNS [ROPE]; <<... returns the Cedar release number (without patch number) as a rope.>> <> < "7.3">> < "7.2">> <<>> ReleaseDir: PROC [dir: ROPE ¬ NIL, release: Release ¬ $current] RETURNS [ROPE]; <<... appends a release number to the directory as follows:>> <> < "Cedar7.3">> < "DATools7.2">> ReleaseSubDir: PROC [subDirs: ROPE ¬ NIL, release: Release ¬ $current] RETURNS [ROPE]; <<... inserts the release number in front of the subdirectory as follows:>> <> < "7.3">> < "7.3/Top">> < "7.2/Foo/Bar">> ReleaseOption: TYPE ~ {releaseDir, releaseSubDir, releaseOmitted}; MachineLocalDir: PROC [subDirs: ROPE ¬ NIL, option: ReleaseOption ¬ $releaseSubDir, release: Release ¬ $current] RETURNS [ROPE]; <> < "/tmp/Cedar/7.3/">> < "/tmp/Cedar/7.3/Commands/">> < "/tmp/Cedar/Users/Wyatt/">> <<>> CedarDir: PROC [subDirs: ROPE ¬ NIL, release: Release ¬ $current, dir: ROPE ¬ NIL] RETURNS [ROPE]; <> < "/Cedar7.3/">> < "/Cedar7.3/Top/">> < "/Cedar7.2/Top/">> < "/CedarChest7.3/Top/">> <<>> SimpleHomeDirectory: PROC RETURNS [ROPE]; <> UserCedarDir: PROC [subDirs: ROPE, option: SystemNames.ReleaseOption ¬ $releaseOmitted, release: SystemNames.Release ¬ $current] RETURNS [ROPE]; <<... constructs a path in the current user's cedar home directory, which is .cedar (this is a directory in which programs can put files that the user does not need to know about; it can be a vux or an ux directory)>> <> < "~/.cedar/">> < "~/.cedar/tipc/">> < "~/.cedar/7.3/System/">> }.