DIRECTORY CIFS USING [ErrorCode], Font USING [Key], Rope USING [ROPE]; UFFileManager: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; Key: TYPE = Font.Key; FontFile: TYPE = REF FontFilePermission; FontFilePermission: TYPE; KeyOf: PROCEDURE [fileName: ROPE] RETURNS [key: Key]; KeyOfRefText: PROCEDURE [fileName: REF TEXT] RETURNS [key: Key]; InitProc: TYPE = PROCEDURE [key: Key, fontFile: FontFile] RETURNS [REF]; Open: PROCEDURE [key: Key, initProc: InitProc _ NIL] RETURNS [fontFile: FontFile]; GetData: PROCEDURE [fontFile: FontFile] RETURNS [REF]; Status: PROCEDURE [fontFile: FontFile] RETURNS [errorCode: CIFS.ErrorCode, errorMsg: ROPE, ok: BOOLEAN]; Pointer: UNSAFE PROCEDURE [fontFile: FontFile] RETURNS [origin: LONG POINTER]; NameOf: PROCEDURE [key: Key] RETURNS [fileName: ROPE]; Size: PROCEDURE [fontFile: FontFile] RETURNS [sizeInSixteenBitWords: INT]; InBounds: UNSAFE PROCEDURE [fontFile: FontFile, blockAddress: LONG POINTER, sizeInWords: NAT _ 1] RETURNS [BOOLEAN]; Action: TYPE = {open, close, openFailed}; FontFileWatcher: TYPE = PROCEDURE [key: Key, action: Action]; RegisterFontFileWatcher: PROCEDURE [fontFileWatcher: FontFileWatcher]; PermissionCount: PROCEDURE RETURNS [INT]; EnumerateOpenFontFiles: PROCEDURE [visit: PROC[ROPE]]; END. RUFFileManager.mesa Created January 7, 1983 Last edit by Michael Plass on January 19, 1983 3:34 pm Last edit by Doug Wyatt on September 30, 1983 5:45 pm This simply looks up the file name in a table, after putting it into a canonical form. For use where the client would rather not build a rope. A FontFile is a REF that the client is supposed to hold on to for as long as it has any pointers into the file; dropping this REF is considered to be declaration that it is OK to close the file, although it typically not closed right away. The FontFile ideally should be stored together with all the pointers derived from it, so they will all go away at the same time. The initProc is called when the file is first opened, and may validate the file format and build some cached structures for later use. Gets the data cached by the init proc. Use this to find out if the Open went well. This is how to get to the contents of the file. The pointers derived this way should be considered to be to readonly data. These procedures are for informational purposes. Just in case the client forgets the file name associated with the key. For finding out the size of the file. For paraniod clients (best to be paranoid when interpreting a binary file). These are for keeping an eye on the opening and closing activity. Only one watcher may be registered at a time. ΚH˜Jšœ™Jšœ™Jšœ6™6Jšœ5™5J˜šΟk ˜ Jšœœ ˜Jšœœ˜Jšœœœ˜J˜—Jšœœ˜"Jš˜Iunitšœœœ˜Kšœœ ˜Kšœ œœ˜(Jšœœ˜šΟnœ œ œœ ˜5J™V—š ž œ œ œœœ ˜@J™7—Kš žœœ œ œœ˜Hšžœ œ!œœ˜RJšœω™ω—šžœ œœœ˜6Jšœ&™&—š žœ œœ œœœ˜hJ™+—š žœœ œœ œœ˜NJ™{—™0šžœ œ œ œ˜6J™F—šžœ œœœ˜JJ™%—šžœœ œ$œœœœœ˜tJ™K——™pKšœœ˜)Kšžœœ œ˜=Kšžœ œ$˜FKšžœ œœœ˜)Kšžœ œ œœ˜6—Kšœ˜J˜—…—τ Ž