(FILECREATED "18-Jul-86 16:49:57" {QV}<NOTECARDS>1.3K>RHTPATCH079.;2 1958   

      changes to:  (FNS NC.ValidLinkP)
		   (VARS RHTPATCH079COMS)

      previous date: "18-Jul-86 16:47:15" {QV}<NOTECARDS>1.3K>RHTPATCH079.;1)


(* Copyright (c) 1986 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT RHTPATCH079COMS)

(RPAQQ RHTPATCH079COMS ((* * Changes to NCLINKS)
			  (FNS NC.IDAlphOrder NC.ValidLinkP)))
(* * Changes to NCLINKS)

(DEFINEQ

(NC.IDAlphOrder
  (LAMBDA (LinkOrCard1 LinkOrCard2)                          (* rht: "18-Jul-86 15:20")

          (* * Return T if Card1's title is alphabetically before Card2's)



          (* * rht 7/18/86: Now can accept either links or cards as arg.)


    (ALPHORDER (NCP.CardTitle (if (NC.ValidLinkP LinkOrCard1)
				      then (fetch (Link DestinationCard) of LinkOrCard1)
				    else LinkOrCard1))
		 (NCP.CardTitle (if (NC.ValidLinkP LinkOrCard2)
				      then (fetch (Link DestinationCard) of LinkOrCard2)
				    else LinkOrCard2)))))

(NC.ValidLinkP
  (LAMBDA (Link)                                             (* rht: "18-Jul-86 16:49")
                                                             (* Check Link to see if it is a valid NOTECARDLINK, 
							     incvluding check that the NoteCard specified by 
							     DESTINATIONID is an active card.)

          (* * kirk 15Nov85: deleted use of DatabaseStream)



          (* * rht 7/18/86: Was actually reading in the destination card from notefile! No more.)


    (LET (DestinationCard)
         (AND (type? Link Link)
		(NEQ (fetch (Link UID) of Link)
		       -1)
		(NC.ValidCardP (fetch (Link DestinationCard) of Link))
		(NC.ValidCardP (fetch (Link SourceCard) of Link))))))
)
(PUTPROPS RHTPATCH079 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (459 1876 (NC.IDAlphOrder 469 . 1094) (NC.ValidLinkP 1096 . 1874)))))
STOP