(FILECREATED "27-Aug-86 15:12:13" {QV}<NOTECARDS>1.3K>NEXT>FGHPATCH099.;1 2341   

      changes to:  (VARS FGHPATCH099COMS)
		   (FNS NC.ReadLink))


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

(PRETTYCOMPRINT FGHPATCH099COMS)

(RPAQQ FGHPATCH099COMS ((* * Fix to unnumbered problem with different versions of WRITE.IMAGEOBJ -- 
			     discovered by Kris while tryting to convert hos files.)
			  (* * Redefined from NCDATABASE)
			  (FNS NC.ReadLink)))
(* * Fix to unnumbered problem with different versions of WRITE.IMAGEOBJ -- discovered by Kris
 while tryting to convert hos files.)

(* * Redefined from NCDATABASE)

(DEFINEQ

(NC.ReadLink
  [LAMBDA (Stream)                                           (* edited: "27-Aug-86 15:10")

          (* * Read a single Link DATAYPE instance from Stream)



          (* * Link identifier and CR)



          (* * rht 11/25/85: Now handles case of version 2 style link.)



          (* * fgh 8/27/86 Put in Kludge to handle problem with some versions of WRITE.IMAGEOBJ that put in an extra CR 
	  before the stuff.)


    (LET ((FirstChar (NC.ReadPtr Stream 1)))
         (COND
	   ((ZEROP FirstChar)

          (* * Version Number 0 means end of list of links)


	     NIL)
	   ((EQ FirstChar 1)

          (* * The link info for a version 3 style link.)


	     (PROG1 (create Link
				UID ← (NC.ReadUID Stream)
				SourceCard ← (NC.CardOrCardHolderFromUID (NC.ReadUID Stream)
									   (NC.ReadUID Stream))
				DestinationCard ← (NC.CardOrCardHolderFromUID (NC.ReadUID Stream)
										(NC.ReadUID Stream))
				AnchorMode ← (READ Stream)
				Label ← (READ Stream)
				DisplayMode ← (READ Stream))

          (* * Get that damn CR)


		      (BIN Stream)))
	   ((EQ FirstChar 13)

          (* * KLUDGE to account for fact that some versions of WRITE.IMAGEOBJ put a CR before beginning the actual stuff.)


	     (NC.ReadLink Stream))
	   (T 

          (* * Version 2 style link. Move back over the left parantheses and read the link as a list.)


	      (SETFILEPTR Stream (SUB1 (GETFILEPTR Stream)))
	      (READ Stream])
)
(PUTPROPS FGHPATCH099 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (666 2259 (NC.ReadLink 676 . 2257)))))
STOP