DIRECTORY BasicTime USING [GMT], IO USING [STREAM], Rope USING [ROPE]; MimSysOps: CEDAR DEFINITIONS = BEGIN OPEN BasicTime, IO, Rope; Interceptor: TYPE = REF InterceptorRecord; InterceptorRecord: TYPE = RECORD [ open: OpenProc, close: CloseProc, delete: DeleteProc, data: REF ¬ NIL ]; OpenProc: TYPE = PROC [interceptor: Interceptor, name: ROPE, kind: OpenKind] RETURNS [stream: STREAM, err: ROPE, time: GMT]; OpenKind: TYPE = {read, write, writeLog}; CloseProc: TYPE = PROC [interceptor: Interceptor, stream: STREAM, abortAndDelete: BOOL] RETURNS [err: ROPE]; DeleteProc: TYPE = PROC [interceptor: Interceptor, name: ROPE] RETURNS [err: ROPE]; Intercept: PROC [interceptor: Interceptor] RETURNS [old: Interceptor]; Open: PROC [name: ROPE, kind: OpenKind] RETURNS [stream: STREAM, err: ROPE, time: BasicTime.GMT]; Close: PROC [stream: STREAM, abortAndDelete: BOOL ¬ FALSE] RETURNS [err: ROPE]; Delete: PROC [name: ROPE] RETURNS [err: ROPE]; Cleanup: PROC [abortAndDelete: BOOL]; MappedFile: TYPE = REF MappedFileRecord; MappedFileRecord: TYPE; Map: PROC [name: ROPE] RETURNS [mf: MappedFile, err: ROPE]; UnMap: PROC [mf: MappedFile]; MapBase: PROC [mf: MappedFile] RETURNS [LONG POINTER]; MapLength: PROC [mf: MappedFile] RETURNS [CARD]; END. X MimSysOps.mesa Copyright Σ 1987, 1988, 1991 by Xerox Corporation. All rights reserved. Russ Atkinson (RRA) December 12, 1988 3:47:55 pm PST Opens the named file and returns a stream to it. If the stream cannot be opened then an error message is returned. Closes the given stream. If abortAndDelete, then abort all output operations and delete the associated file (if any). Otherwise, normal close is performed. Deletes the named file (returning a messge if not possible). Intercepts the system operations, returning the previous interceptor (if any). Opens the file via the current interceptor proc. Closes the stream via the current interceptor proc. If abortAndDelete, then all I/O operations on files opened with kind in {read, write} will be aborted, and all files opened with kind = write will be deleted. Deletes the named file (returning a messge if not possible). Closes all open streams managed by MimSysOps. Opens the named file and maps it into memory, returning a MappedFile object if the opeinging was successful, and an error message if the opening was not successful. Unmaps the file. The memory will not necessarily become invalid, but the user should not continue to use it. Returns the address of the first word in the memory for the mapped file. NIL is returned for invaid mapped files. Returns the # of bytes in the mapped file. ΚΫ–(cedarcode) style•NewlineDelimiter ™code™Kšœ Οeœ=™HK™4—˜šΟk ˜ Kšœ žœžœ˜Kšžœžœžœ˜Kšœžœžœ˜K˜——š Οn œžœž œžœžœ žœ˜>K˜Kšœ žœžœ˜*šœžœžœ˜"Kšœ˜Kšœ˜Kšœ˜Kšœžœž˜Kšœ˜K˜—šœ žœžœ!žœžœ žœžœžœ˜|Kšœ žœ˜)K™s—š œ žœžœ#žœžœžœžœ˜lKšœ™—š œ žœžœ!žœžœžœ˜SKšœ<™<—K˜šŸ œžœžœ˜FKšœN™NK™—šŸœžœžœžœ žœžœžœ˜aK™0K˜—šŸœžœ žœžœžœžœžœ˜OKšœΣ™ΣK˜—š Ÿœžœžœžœžœ˜.Kšœ<™