DIRECTORY OldAlpineEnvironment, OldAlpineFile, AlpineFile; OldPageActionsImpl: PROGRAM IMPORTS OldAlpineFile, AlpineFile EXPORTS OldAlpineFile = BEGIN OPEN OldAlpineFile; ReadPages: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID, pageRun: PageRun, pageBuffer: RESULTPageBuffer, lock: LockOption _ [read, wait]] = BEGIN Work: PROC ~ { AlpineFile.ReadPages [conversation, openFileID, pageRun, pageBuffer, lock]; }; DoWork[Work]; END; WritePages: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID, pageRun: PageRun, pageBuffer: VALUEPageBuffer, lock: LockOption _ [update, wait]] = BEGIN Work: PROC ~ { AlpineFile.WritePages [conversation, openFileID, pageRun, pageBuffer, lock]; }; DoWork[Work]; END; LockPages: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID, pageRun: PageRun, lock: LockOption _ [read, wait]] = BEGIN Work: PROC ~ { AlpineFile.LockPages [conversation, openFileID, pageRun, lock]; }; DoWork[Work]; END; UnlockPages: PUBLIC PROCEDURE [conversation: Conversation, openFileID: OpenFileID, pageRun: PageRun] = BEGIN Work: PROC ~ { AlpineFile.UnlockPages [conversation, openFileID, pageRun]; }; DoWork[Work]; END; DoWork: PROC [work: PROC] RETURNS [] ~ { accessReason: OldAlpineEnvironment.NeededAccess; lockReason: OldAlpineEnvironment.LockFailure; operationReason: OldAlpineEnvironment.OperationFailure; unknownWhat: OldAlpineEnvironment.UnknownType; { ENABLE { AlpineFile.AccessFailed => {accessReason _ missingAccess; GOTO accessFailed}; AlpineFile.LockFailed => { lockReason _ SELECT why FROM conflict, cantConvert => conflict, timeout => timeout, ENDCASE => ERROR; GOTO lockFailed}; AlpineFile.OperationFailed => {operationReason _ why; GOTO operationFailed}; AlpineFile.StaticallyInvalid => {GOTO staticallyInvalid}; AlpineFile.Unknown => {unknownWhat _ what; GOTO unknown}; }; work[]; EXITS accessFailed => ERROR OldAlpineFile.AccessFailed[accessReason]; lockFailed => ERROR OldAlpineFile.LockFailed[lockReason]; operationFailed => ERROR OldAlpineFile.OperationFailed[operationReason]; staticallyInvalid => ERROR OldAlpineFile.StaticallyInvalid; unknown => ERROR OldAlpineFile.Unknown[unknownWhat]; }; }; END. hOldPageActionsImpl.mesa Copyright c 1984 by Xerox Corporation. All rights reserved. Carl Hauser, January 8, 1987 2:41:00 pm PST Last edited by: Taft on May 25, 1983 5:30 pm MBrown on January 30, 1984 11:41:00 am PST Last Edited by: Kupfer, August 6, 1984 3:37:01 pm PDT Loose ends: 1. At present, writes which go directly to the base (because they are above highWaterMark) are not logged at all. This will need to be revised when duplicate logging is implemented, and also has some interactions with the backup system. OldAlpineFile. Carl Hauser, October 4, 1985 1:37:02 pm PDT Change "Log" to "AlpineLog" Κβ– "cedar" style˜Jšœ™šœ Οmœ1™