(FILECREATED "23-Apr-87 19:47:46" {QV}<NOTECARDS>1.3K>NEXT>NCLISTCARD.;18 4720   

      changes to:  (FNS NC.EvaluateListCardSubstance)

      previous date: " 5-Apr-87 20:01:58" {QV}<NOTECARDS>1.3K>NEXT>NCLISTCARD.;17)


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

(PRETTYCOMPRINT NCLISTCARDCOMS)

(RPAQQ NCLISTCARDCOMS ((* * The list card -- just a Lisp list stored on the file!)
			 (FNS NC.AddListCard NC.ListCardCopyFn NC.ListCardCreateFn NC.ListCardEditFn 
			      NC.ListCardGetFn NC.ListCardPutFn NC.EvaluateListCardSubstance)
			 (P (NC.AddListCard))
			 (FNS NCAddStub.ListCard)))
(* * The list card -- just a Lisp list stored on the file!)

(DEFINEQ

(NC.AddListCard
  (LAMBDA NIL                                                (* rht: "14-Jul-86 00:53")

          (* * rht 7/14/86: No longer has a QuitFn.)


    (NC.AddCardType (QUOTE List)
		      (QUOTE NoteCard)
		      (BQUOTE ((MakeFn , (FUNCTION NC.ListCardCreateFn))
				 (EditFn , (FUNCTION NC.ListCardEditFn))
				 (GetFn , (FUNCTION NC.ListCardGetFn))
				 (PutFn , (FUNCTION NC.ListCardPutFn))
				 (CopyFn , (FUNCTION NC.ListCardCopyFn))
				 (MarkDirtyFn , (FUNCTION NILL))
				 (DirtyPFn , (FUNCTION NILL))
				 (QuitFn , (FUNCTION NILL))))
		      (QUOTE ((LinkAnchorModesSupported NIL))))))

(NC.ListCardCopyFn
  (LAMBDA (Card FromStream ToStream Length)                  (* fgh: "21-Nov-85 21:11")

          (* * Copy a list substance from FromStream to ToStream.)



          (* * Copy the bytes,)



          (* * fgh 11/20/85 NoteCards now handles the start and end ptrs -- passing the from ptrs as args and properly 
	  setting the to ptrs.)



          (* * fgh 11/21/85 Now passes length instead of start and end ptrs.)


    (LET* ((FromStartPtr (GETFILEPTR FromStream))
	   (FromEndPtr (PLUS Length FromStartPtr)))
          (COPYBYTES FromStream ToStream FromStartPtr FromEndPtr))
    T))

(NC.ListCardCreateFn
  (LAMBDA (Card Title NoDisplayFlg InitialSetting)           (* fgh: "17-Nov-85 15:59")

          (* * Make a list substance.)


    (NC.SetSubstance Card InitialSetting)
    Card))

(NC.ListCardEditFn
  (LAMBDA NIL                                                (* fgh: "14-Nov-85 00:51")
    (NC.ReportError NIL "Cannot edit a list substance")))

(NC.ListCardGetFn
  [LAMBDA (Card Length Stream)                               (* rht: " 1-Nov-86 15:57")

          (* * Get the list substance from the disk)



          (* * fgh 11/20/85 NoteCards now passes start and end ptrs down.)



          (* * fgh 11/21/85 Now passes length instead of start and end ptrs.)



          (* * rht 1/23/86: Now takes Stream as arg instead of computing from Card.)



          (* * rht 11/1/86: Now uses our readtable when reading.)


    (DECLARE (GLOBALVARS NC.OrigReadTable))
    (READ Stream NC.OrigReadTable])

(NC.ListCardPutFn
  [LAMBDA (Card Stream)                                      (* rht: " 1-Nov-86 15:57")
                                                             (* Put list substance)

          (* * fgh 11/20/85 NoteCards now takes care of setting the start and end pointers for the substance.)



          (* * rht 1/23/86: Now takes Stream as arg instead of computing from Card.)



          (* * fgh 2/6/86 Now returns version number.)



          (* * rht 11/1/86: Now uses our readtable when printing.)


    (DECLARE (GLOBALVARS NC.OrigReadTable))
    (PRINT (NC.FetchSubstance Card)
	     Stream NC.OrigReadTable)
    0])

(NC.EvaluateListCardSubstance
  [LAMBDA (Card Message InterestedWindow)                    (* rht: "19-Apr-87 19:54")

          (* * Evaluate the contents of a list card.)



          (* * rht 4/2/87: Added InterestedWindow arg.)



          (* * rht 4/19/87: Now clears InterestedWindow before printing.)


    (OR InterestedWindow (SETQ InterestedWindow (NC.CoerceToInterestedWindow Card)))
    (if Message
	then (NC.PrintMsg InterestedWindow T Message))
    (ERSETQ (for Item in (NCP.CardSubstance Card) do (ERRORSET Item])
)
(NC.AddListCard)
(DEFINEQ

(NCAddStub.ListCard
  (LAMBDA NIL                                                (* kirk: "19-Jun-86 20:52")

          (* * kirk 18Jun86 Add the text card stub)


    (NC.AddCardTypeStub (QUOTE List)
			  (QUOTE NoteCard)
			  (QUOTE NCLISTCARD))))
)
(PUTPROPS NCLISTCARD COPYRIGHT ("Xerox Corporation" 1985 1986 1987))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (704 4322 (NC.AddListCard 714 . 1387) (NC.ListCardCopyFn 1389 . 2039) (
NC.ListCardCreateFn 2041 . 2260) (NC.ListCardEditFn 2262 . 2438) (NC.ListCardGetFn 2440 . 3037) (
NC.ListCardPutFn 3039 . 3721) (NC.EvaluateListCardSubstance 3723 . 4320)) (4340 4629 (
NCAddStub.ListCard 4350 . 4627)))))
STOP