DIRECTORY UserPineDefs USING [Transaction], Rope USING [ROPE]; Juniper: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; Transaction: TYPE = REF TransactionObject; TransactionObject: TYPE; LFH: TYPE [8]; Error: ERROR [ec: JuniperErrorType]; JuniperErrorType: TYPE = MACHINE DEPENDENT {transactionReset, notDone, (LAST[CARDINAL]) }; StartPine: PROC []; InitializePine: PROC []; FinalizePine: PROC []; LookupFile: PROC [t: Transaction, name: ROPE] RETURNS [success: BOOLEAN, file: LFH]; CreateFile: PROC [t: Transaction, name: ROPE] RETURNS [LFH]; BeginTransaction: PROC [server, user, password: ROPE _ NIL] RETURNS [t: Transaction, welcomeText: ROPE]; CommitTransaction: PROC [t: Transaction]; AbortTransaction: PROC [t: Transaction]; EndTransaction: PROC [t: Transaction]; TransactionFromUserPineDefsTrans: UNSAFE PROC [u: UserPineDefs.Transaction] RETURNS [t: Transaction]; UserPineDefsTransFromTransaction: UNSAFE PROC [t: Transaction] RETURNS [u: UserPineDefs.Transaction]; END. Created by MBrown on January 27, 1981 1:29 PM Changed by MBrown on 29-Jan-81 12:07:08 Changed by Russ Atkinson on 26-May-81 14:48:11 Changed by MBrown on 7-Dec-81 9:46:20 Changed by MBrown on August 20, 1982 11:17 am τJuniper.mesa Safe Cedar interface to Juniper transactions and directories, not to Juniper files. For use with FileIO for Juniper file access. Last edited by: MBrown on August 26, 1982 2:29 pm Russ Atkinson on 26-May-81 14:47:23 Warren Teitelman on May 26, 1982 4:41 pm 1. Types and Errors This is the safe replacement for UserPineDefs.Transaction. This is a unique ID for a Juniper file. LFH stands for "long file handle" (includes file UID plus pack ID, machine ID). transactionReset means that the transaction has been aborted; notDone means that it has not (but probably should be). Juniper passes back much more specific information, which is mapped into the two classes above. It is just not possible to define what Juniper calls will raise what signals. Always be prepared to catch Error, or land in the debugger. 2. Starting Pine Call this and let it return before doing ANYTHING else with Pine! Start traps don't work. Increases Pine share count by 1. When share count becomes 1, some overhead processes are created. Decreases Pine share count by 1. When share count becomes 0, some overhead processes are destroyed. 3. Juniper Files Looks for file with given name on machine of transaction t. success = FALSE means that lookup failed. No server name should be specified as part of name. Creates a file with given name on machine of transaction t. No server name should be specified as part of name. 4. Juniper Transactions Returns a valid transaction on the given server, and the welcome text obtained from the server. Server defaults to "Juniper", and user to currently logged-in user (password defaults when user does). Commits t, turns t's write locks into read locks. t remains valid. (Sometimes called "checkpoint".) Aborts t, releases all of t's locks. t becomes invalid. Commits t, releases all of t's locks. t becomes invalid. Escape to Pine (for hardy souls) Change Log Added AbortTransaction. CedarString -> Rope Rope.Ref -> ROPE. Added the escapes to Pine, format this file using Tioga nodes. ΚΤ– "Cedar" style˜head1šΟc ™ Ibodyš™šœ™Jš!™!Jš#™#š(™(J™——šΟk ˜ Jšœ žœ˜!Jšœžœžœ˜J˜—šœ žœž œ˜Jšž˜Jšžœžœžœ˜—J˜—š™Jšœ žœžœ˜*šœžœ˜J™:—šžœžœ˜Jšx™xJ˜—Jšœžœ˜$š œžœžœž œžœžœ˜ZJšu™uJ™λJ˜J˜——š™šΟn œžœ˜JšZ™ZJ˜—šŸœžœ˜Jšb™bJ˜—šŸ œžœ˜Jšd™d——š™š Ÿ œžœžœžœ žœžœ˜TJš›™›J˜—š Ÿ œžœžœžœžœ˜™>—L˜J˜——…—ΖŽ