(FILECREATED "14-Feb-86 20:25:12" {QV}<NOTECARDS>1.3K>RHTPATCH027.;6 3472   

      changes to:  (VARS RHTPATCH027COMS)
		   (FNS NC.BuildVerticalBarREADTABLE)

      previous date: " 4-Feb-86 11:11:31" {QV}<NOTECARDS>1.3K>RHTPATCH027.;5)


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

(PRETTYCOMPRINT RHTPATCH027COMS)

(RPAQQ RHTPATCH027COMS ((* * This stuff makes it possible for UIDs encountered by PRINT when 
			     writing card's proplists, to be written down in a way that can be read 
			     back by READ.)
			  (* * This is all new and belongs in NCDATABASE)
			  (GLOBALVARS NC.VerticalBarREADTABLE)
			  (FNS NC.BuildVerticalBarREADTABLE)
			  (INITVARS (NC.VerticalBarREADTABLE (NC.BuildVerticalBarREADTABLE)))
			  (FNS NC.ReassembleUID NC.DisassembleUID)
			  (P (DEFPRINT (QUOTE UID)
				       (FUNCTION NC.DisassembleUID)))))
(* * This stuff makes it possible for UIDs encountered by PRINT when writing card's proplists,
 to be written down in a way that can be read back by READ.)

(* * This is all new and belongs in NCDATABASE)

(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS NC.VerticalBarREADTABLE)
)
(DEFINEQ

(NC.BuildVerticalBarREADTABLE
  (LAMBDA NIL                                                (* rht: "30-Jan-86 17:37")

          (* * Return a new readtable formed from the primary readtable by changing verticalbar's syntax class to be that of 
	  terminal readtable.)


    (LET ((NewReadTable (COPYREADTABLE NIL)))
         (SETSYNTAX 124 (GETSYNTAX 124 T)
		      NewReadTable)
     NewReadTable)))
)

(RPAQ? NC.VerticalBarREADTABLE (NC.BuildVerticalBarREADTABLE))
(DEFINEQ

(NC.ReassembleUID
  (LAMBDA (UID0 UID1 UID2 UID3 UID4 UID5 UID6)               (* rht: "30-Jan-86 16:54")

          (* * Called when a UID that was written down by PRINT after disassembling so can be reassembled into a UID.)


    (create UID
	      UID0 ← UID0
	      UID1 ← UID1
	      UID2 ← UID2
	      UID3 ← UID3
	      UID4 ← UID4
	      UID5 ← UID5
	      UID6 ← UID6)))

(NC.DisassembleUID
  (LAMBDA (UID Stream)                                       (* rht: " 4-Feb-86 11:08")

          (* * This is called when PRINT, PRIN1, etc. try to print instance of UID datatype. Returns cons of readmacro 
	  character and list to be written down which when eval'ed at read time will reassemble the UID.)



          (* * rht 1/31/86: Now checks Stream arg and only disassembles if going to a notecards stream.)



          (* * rht 2/1/86: It's too slow to check whether Stream is for a notefile. Now just check whether there's a non-nil 
	  and non-T Stream.)



          (* * rht 2/4/86: Also be sure Stream is not a window stream.)


    (if (AND Stream (NEQ Stream (QUOTE T))
		 (NOT (IMAGESTREAMP Stream)))
	then (push SSs Stream)
	       (CONS (QUOTE %|.)
		       (LIST (FUNCTION NC.ReassembleUID)
			       (ffetch (UID UID0) of UID)
			       (ffetch (UID UID1) of UID)
			       (ffetch (UID UID2) of UID)
			       (ffetch (UID UID3) of UID)
			       (ffetch (UID UID4) of UID)
			       (ffetch (UID UID5) of UID)
			       (ffetch (UID UID6) of UID)))
      else NIL)))
)
(DEFPRINT (QUOTE UID)
	  (FUNCTION NC.DisassembleUID))
(PUTPROPS RHTPATCH027 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (1167 1608 (NC.BuildVerticalBarREADTABLE 1177 . 1606)) (1677 3335 (NC.ReassembleUID 1687
 . 2082) (NC.DisassembleUID 2084 . 3333)))))
STOP