(DEFINE-FILE-INFO PACKAGE "IL" READTABLE "INTERLISP" BASE 10) (FILECREATED "23-Oct-88 22:11:56" {QV}<NOTECARDS>1.3LNEXT>RGPATCH085.;4 6165 changes to%: (VARS RGPATCH085COMS) previous date%: "20-Oct-88 20:23:10" {QV}<NOTECARDS>1.3LNEXT>RGPATCH085.;3) (* " Copyright (c) 1988 by Xerox Corporation. All rights reserved. ") (PRETTYCOMPRINT RGPATCH085COMS) (RPAQQ RGPATCH085COMS [(FNS LOOKUP.NS.FILE.SERVER NC.ForceDatabaseClose NC.OwnWriteLockP NC.RemoteHostP NC.SetWriteLock NC.UnSetWriteLock NC.NoticeNoteFile) (ADDVARS (CH.PROPERTIES (NOTECARDS.SERVER 10051]) (DEFINEQ (LOOKUP.NS.FILE.SERVER [LAMBDA (NAME TYPE FULLFLG) (* ; "Edited 20-Oct-88 17:05 by Randy.Gobbel") (CADR (CH.RETRIEVE.ITEM NAME (OR TYPE 'FILESERVER) 'NSADDRESS]) (NC.ForceDatabaseClose [LAMBDA (NoteFile Don'tMenuFlg) (* ; "Edited 23-Oct-88 21:48 by Randy.Gobbel") (* ;; "Really close the database, i.e.. bypass the ADVISE on CLOSEF that prevents closing of the database.") (* ;; "rht 1/8/86: Now smashes old notefile object to remove cycles. Don't you love interlisp gc'er?") (* ;; "rht 5/1/86: Save Menu on notefile object when smashing.") (* ;; "rht 7/6/86: Only closes notefile's stream if there is an open one.") (* ;; "fgh 9/1/86 Now saves the Device vector when cleaning up the NoteFile object.") (* ;; "pmi 5/19/87: Replaced call to NC.RemoveNoteFileFromHashArray with NC.RemoveNoteFile as part of general cleanup.") (* ;; "pmi 8/19/87: Added call calls to NC.NoticeNoteFile and NC.ResetNoteFileInterface.") (* ;; "rg 10/23/88: Back off of the %"smash everything%" strategy - now just NILs things that we think need it.") (CLOSEF? (fetch (NoteFile Stream) of NoteFile)) (* ;; "Smash the cardcache and userdata fields of all card objects for this notefile to remove circular links.") (ADD.PROCESS (LIST (FUNCTION NC.CleanupCardObjects) (fetch (NoteFile HashArray) of NoteFile))) (replace (NoteFile Stream) of NoteFile with NIL) (replace (NoteFile HashArray) of NoteFile with NIL) (replace (NoteFile LinkLabelsCard) of NoteFile with NIL) (replace (NoteFile TableOfContentsCard) of NoteFile with NIL) (replace (NoteFile ToBeFiledCard) of NoteFile with NIL) (replace (NoteFile OrphansCard) of NoteFile with NIL) (replace (NoteFile RegistryCard) of NoteFile with NIL) (replace (NoteFile ReservedCards) of NoteFile with NIL) (replace (NoteFile IndexNumsFreeList) of NoteFile with NIL) (* ;;; "Reset the notefile menu icon to look closed.") (NC.ResetNoteFileInterface NoteFile) (* ;;; "Make sure the notefile has been noticed.") (NC.NoticeNoteFile NoteFile) (if Don'tMenuFlg then (NC.RemoveNoteFile NoteFile)) NoteFile]) (NC.OwnWriteLockP [LAMBDA (Card CardPart) (* Feuerman "30-Jul-86 15:41") (* * Returns T if the CLIENT thinks that he owns the writelock for the given card part. NOTE THIS SAYS NOTHING ABOUT WHAT THE SERVER THINKS!!) (PROG [(OldValue (NC.FetchUserDataProp Card (PACK* CardPart 'WRITELOCK] (RETURN (COND ((NUMBERP OldValue) (GREATERP OldValue 0)) (T OldValue]) (NC.RemoteHostP [LAMBDA (PATTERN HOSTNAME) (* ; "Edited 19-Jul-88 14:40 by Randy.Gobbel") (* ;; "Returns T if the file pattern is to be located on a NoteCardsServer.") (* ;; "fgh 9/1/86 Put in checks for DSKNN for Dorado's and for CORE files.") (* ;; "rg 6/16/88: Removed calls to NCCLIENT.AREYOUTHERE - a server is a server even if it's crashed.") (* ;; "rg 7/18/88: Now calls LOOKUP.NS.SERVER, since we now have a NOTECARDS.SERVER property type - note that the property type must have been added to CH.PROPERTIES for this to work.") (PROG ([HOST (OR HOSTNAME (FILENAMEFIELD PATTERN 'HOST] ADDRESS) (RETURN (AND (NEQ HOST 'DSK) [NOT (AND (EQ (SUBATOM HOST 1 3) 'DSK) (FIXP (SUBATOM HOST 4] (NEQ HOST 'CORE) (SETQ ADDRESS (LOOKUP.NS.SERVER HOST 'NOTECARDS.SERVER]) (NC.SetWriteLock [LAMBDA (Card CardPart) (* Feuerman "30-Jul-86 15:35") (* * Adds 1 to the writelock count) (PROG [(OldCount (NC.FetchUserDataProp Card (PACK* CardPart 'WRITELOCK] (RETURN (NC.SetUserDataProp Card (PACK* CardPart 'WRITELOCK) (COND ((NUMBERP OldCount) (ADD1 OldCount)) (T 1]) (NC.UnSetWriteLock [LAMBDA (Card CardPart) (* Feuerman "30-Jul-86 16:27") (* * Subtracts 1 to the writelock count) (PROG [(OldCount (NC.FetchUserDataProp Card (PACK* CardPart 'WRITELOCK] (RETURN (NC.SetUserDataProp Card (PACK* CardPart 'WRITELOCK) (COND ((AND (NUMBERP OldCount) (GREATERP OldCount 0)) (SUB1 OldCount)) (T 0]) (NC.NoticeNoteFile [LAMBDA (NoteFileOrFileName) (* ; "Edited 20-Oct-88 14:22 by Randy.Gobbel") (* ;; "store NoteFile in HashArray, a NoteFiles hash array.") (* ;; "fgh 5/23/86 First created.") (* ;; "pmi 5/27/87: Broke into two functions: one to add the filename to list of noticed files, and one to put the notefile in the notefile hash array.") (NC.StoreNoteFileInHashArray NoteFileOrFileName) (NC.NoticeNoteFileName NoteFileOrFileName]) ) (ADDTOVAR CH.PROPERTIES (NOTECARDS.SERVER 10051)) (PUTPROPS RGPATCH085 COPYRIGHT ("Xerox Corporation" 1988)) (DECLARE%: DONTCOPY (FILEMAP (NIL (647 6028 (LOOKUP.NS.FILE.SERVER 657 . 869) (NC.ForceDatabaseClose 871 . 3040) ( NC.OwnWriteLockP 3042 . 3540) (NC.RemoteHostP 3542 . 4527) (NC.SetWriteLock 4529 . 4995) ( NC.UnSetWriteLock 4997 . 5532) (NC.NoticeNoteFile 5534 . 6026))))) STOP