(FILECREATED "26-Jan-87 17:47:20" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH187.;1 2877 changes to: (VARS RHTPATCH187COMS)) (* Copyright (c) 1987 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT RHTPATCH187COMS) (RPAQQ RHTPATCH187COMS ((* * Fix to bug 364: NCP.GetLinks breaks with too many args to NCONC.) (* * NOTE: THIS REQUIRES RECOMPILING NCPROGINT SINCE MACROS WERE CHANGED.) (* * Changes to NCPROGINT) (MACROS NCP.MapLinks NCP.MapLinksOfType))) (* * Fix to bug 364: NCP.GetLinks breaks with too many args to NCONC.) (* * NOTE: THIS REQUIRES RECOMPILING NCPROGINT SINCE MACROS WERE CHANGED.) (* * Changes to NCPROGINT) (DECLARE: EVAL@COMPILE (DEFMACRO NCP.MapLinks (NoteFile Function &OPTIONAL CollectResultPredicate) (* * Map down all links in the current notefile, performing LinkFn to each.) (* * rht 11/18/85: Updated to handle new notefile and card object formats. Now allows collection of links satisfying CollectResultPredicate.) (* * rht 7/17/86: rearranged slightly.) (* * rht 1/26/87: Now uses MAPCONC rather than APPLY'ing NCONC.) (BQUOTE (MAPCONC (NCP.MapCards , NoteFile (FUNCTION (LAMBDA (Card) (if , CollectResultPredicate then (for Link in ( NC.RetrieveToLinks Card) when (APPLY* , CollectResultPredicate Link) collect (APPLY* , Function Link)) else (for Link in ( NC.RetrieveToLinks Card) do (APPLY* , Function Link))))) , (AND CollectResultPredicate (BQUOTE (FUNCTION TRUE)))) (FUNCTION (LAMBDA (X) X))))) (DEFMACRO NCP.MapLinksOfType (Types NoteFile Function &OPTIONAL CollectResultPredicate) (* * Map down all links in the given notefile, having one of the given types.) (* * rht 7/17/86: rearranged slightly.) (* * rht 1/26/87: Now uses MAPCONC rather than APPLY'ing NCONC.) (BQUOTE (MAPCONC (NCP.MapCards , NoteFile (FUNCTION (LAMBDA (Card) (if , CollectResultPredicate then (for Link in (NC.RetrieveToLinks Card) when (AND (FMEMB (NCP.LinkType Link) (MKLIST , Types)) (APPLY* , CollectResultPredicate Link)) collect (APPLY* , Function Link)) else (for Link in (NC.RetrieveToLinks Card) when (FMEMB (NCP.LinkType Link) (MKLIST , Types)) do (APPLY* , Function Link))))) , (AND CollectResultPredicate (BQUOTE (FUNCTION TRUE)))) (FUNCTION (LAMBDA (X) X))))) ) (PUTPROPS RHTPATCH187 COPYRIGHT ("Xerox Corporation" 1987)) (DECLARE: DONTCOPY (FILEMAP (NIL))) STOP