DIRECTORY BasicTime USING [GMT], Rope USING [ROPE]; GiveAndTake: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; GMT: TYPE ~ BasicTime.GMT; defaultWorldName: ROPE; NoSuchPackage: ERROR [packageName: ROPE, worldName: ROPE]; MalformedTorch: SIGNAL [packageName: ROPE, worldName: ROPE]; TakePackage: PROC [packageName: ROPE, worldName: ROPE ¬ defaultWorldName, forcibly: BOOL ¬ FALSE] RETURNS [ok: BOOL, owner: ROPE, takenDate: GMT]; GivePackage: PROC [packageName: ROPE, worldName: ROPE ¬ defaultWorldName] RETURNS [yoursToGive: BOOL]; PackageTaken: PROC [packageName: ROPE, worldName: ROPE ¬ defaultWorldName] RETURNS [taken: BOOL, owner: ROPE, takenDate: GMT]; PackageMine: PROC [packageName: ROPE, worldName: ROPE ¬ defaultWorldName] RETURNS [BOOL]; EnumerateTakenPackages: PROC [worldName: ROPE ¬ defaultWorldName, proc: PROC [packageName: ROPE, owner: ROPE, takenDate: GMT] RETURNS [quit: BOOL ¬ FALSE]]; END. X GiveAndTake.mesa Copyright Σ 1990, 1991, 1992 by Xerox Corporation. All rights reserved. Last changed by Pavel on April 24, 1990 2:01 pm PDT Michael Plass, January 23, 1992 12:28 pm PST This signal is usually not resumable. Only EnumerateTakenPackages raises it resumably. Attempts to grab the torch for the named package in the named world, with the new owner being the current user. ok is TRUE if the grab was successful (i.e., the torch was free). If forcibly, then the grab always succeeds, stealing the torch from the former owner. owner and takenDate describe the current owner of the torch and when they grabbed it, regardless of whether or not ok is TRUE. ! NoSuchPackage, MalformedTorch, PFS.Error Releases the torch for the named package in the named world if it's owned by the current user, returning FALSE otherwise. ! NoSuchPackage, MalformedTorch, PFS.Error Determines whether or not the torch for the named package in the named world is free and, if so, who grabbed it and when. ! NoSuchPackage, MalformedTorch, PFS.Error Determines whether or not the torch for the named package in the named world is owned by the current user ! NoSuchPackage, MalformedTorch, PFS.Error Calls proc on the pertinent information about every currently-grabbed torch in the named world. The enumeration halts if quit is ever TRUE. ! MalformedTorch, PFS.Error Κk•NewlineDelimiter –(cedarcode) style™™Jšœ Οeœ=™HJ™3J™,—Icode˜šΟk ˜ Kšœ žœžœ˜Kšœžœžœ˜—K˜K˜KšΠln œžœž ˜šœž˜K˜Kšžœžœžœ˜Kšžœžœ žœ˜K˜šœžœ˜K˜—KšΟn œžœžœ žœ˜:K˜š œžœžœ žœ˜