(FILECREATED "18-Feb-87 12:01:29" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH200.;3 2765 changes to: (VARS RHTPATCH200COMS) (FNS NCP.AllLinks NCP.DeleteLinkType) previous date: "18-Feb-87 10:56:45" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH200.;1) (* Copyright (c) 1987 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT RHTPATCH200COMS) (RPAQQ RHTPATCH200COMS ((* * Fixes bug in NCP.DeleteLinkType reported by Ramana.) (* * Change to NCPROGINT) (FNS NCP.DeleteLinkType NCP.AllLinks))) (* * Fixes bug in NCP.DeleteLinkType reported by Ramana.) (* * Change to NCPROGINT) (DEFINEQ (NCP.DeleteLinkType (LAMBDA (LinkType NoteFile) (* rht: "18-Feb-87 10:57") (* * Checks for any instance of LinkType in the current database. If can't find any then delete the link label, otherwise error out.) (* * rht 11/18/85: Updated to handle new notefile and card object formats.) (* * rht 11/16/86: Changed call to NCP.ReportError) (* * rht 2/18/87: Fixed call to NCP.AllLinks to take NoteFile arg.) (DECLARE (GLOBALVARS NC.SystemLinkLabels)) (COND ((NOT (FMEMB LinkType (NCP.LinkTypes NoteFile))) (NCP.ReportError "NCP.DeleteLinkType" (CONCAT "No such link type: " LinkType ".")) NIL) ((FMEMB LinkType NC.SystemLinkLabels) (NCP.ReportError "NCP.DeleteLinkType" (CONCAT "Can't delete system link type: " LinkType ".")) NIL) ((for Link in (NCP.AllLinks NoteFile) thereis (EQ LinkType (fetch (Link Label) of Link))) (NCP.ReportError "NCP.DeleteLinkType" (CONCAT "Link type currently in use: " LinkType ". Can't delete.")) NIL) (T (NC.StoreLinkLabels NoteFile (REMOVE LinkType (NCP.UserLinkTypes NoteFile))) LinkType)))) (NCP.AllLinks (LAMBDA (NoteFile) (* rht: "18-Feb-87 12:00") (* * Return a list of all links in the current database.) (* * rht 11/18/85: Updated to handle new notefile and card object formats. Note that it doesn't call NCONC to flatten the lists in case someone else is holding a pointer to the value returned by NC.RetrieveToLinks.) (* * rht 2/18/87: Changed to call MAPCONC instead of APPLY'ing APPEND. Note call to APPEND to prevent flatten'ing of original lists.) (MAPCONC (NC.MapCards NoteFile (FUNCTION NC.RetrieveToLinks) (FUNCTION TRUE)) (FUNCTION (LAMBDA (X) (APPEND X)))))) ) (PUTPROPS RHTPATCH200 COPYRIGHT ("Xerox Corporation" 1987)) (DECLARE: DONTCOPY (FILEMAP (NIL (619 2683 (NCP.DeleteLinkType 629 . 1935) (NCP.AllLinks 1937 . 2681))))) STOP