(FILECREATED "21-Mar-85 16:12:40" {ERIS}<LISPCORE>LISPUSERS>PPLISTFILE.;10 6988   

      changes to:  (FNS PPLISTFILE FILEPRINT PRINT.* PRINT.DECLARE: PRINT.DEFINEQ PRINT.VAR 
			PRINT.FILECREATED)
		   (VARS TOPLEVELPRINTMACROS PPLISTFILECOMS)

      previous date: "20-Mar-85 16:02:33" {ERIS}<LISPCORE>LISPUSERS>PPLISTFILE.;7)


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

(PRETTYCOMPRINT PPLISTFILECOMS)

(RPAQQ PPLISTFILECOMS ((FNS CENTERPRINT FILEPRINT PPLISTFILE PRINT.* PRINT.DECLARE: PRINT.FILECREATED 
			    PRINT.DEFINEQ PRINT.VAR)
		       (VARS TOPLEVELPRINTMACROS)))
(DEFINEQ

(CENTERPRINT
(LAMBDA (STR TOSTREAM) (* lmm "19-Mar-85 12:59") (DSPXPOSITION (PLUS (DSPLEFTMARGIN NIL TOSTREAM) (
QUOTIENT (DIFFERENCE (DIFFERENCE (DSPRIGHTMARGIN NIL TOSTREAM) (DSPLEFTMARGIN NIL TOSTREAM)) (
STRINGWIDTH STR TOSTREAM)) 2)) TOSTREAM) (PRIN1 STR TOSTREAM) (TERPRI TOSTREAM)))

(FILEPRINT
  [LAMBDA (EXPR)                                             (* lmm "21-Mar-85 13:49")
    (LET ((MACRO (ASSOC (CAR EXPR)
			TOPLEVELPRINTMACROS)))
      (if [AND MACRO (NEQ EXPR (SETQ EXPR (APPLY* (CDR MACRO)
						  EXPR]
	else (NEWPRINTDEF EXPR])

(PPLISTFILE
  [LAMBDA (FILE TOSTREAM TYPE)                               (* lmm "21-Mar-85 16:00")
    (RESETLST (RESETSAVE PRETTYFLG T)
	      (LET ([STR (OPENSTREAM FILE (QUOTE INPUT)
				     NIL NIL (QUOTE ((SEQUENTIAL T]
		 FN)
		[RESETSAVE (OUTPUT (COND
				     [(NOT TOSTREAM)
				       (OPENIMAGESTREAM (QUOTE {SCRATCH})
							(OR TYPE (PRINTERTYPE]
				     (T (SETQ TOSTREAM (GETSTREAM TOSTREAM (QUOTE OUTPUT]
		(SETQ FN (FULLNAME STR))
		(RESETSAVE **COMMENT**FLG)
		(PROGN (AND TOSTREAM (RESETSAVE NIL (LIST [FUNCTION (LAMBDA (X)
							      (CLOSEF? X)
							      (AND RESETSTATE (DELFILE X]
							  TOSTREAM)))
		       (RESETSAVE NIL (LIST (QUOTE CLOSEF?)
					    STR)))
		(DSPFONT DEFAULTFONT)
		(bind INDEX EXPR while (NEQ (QUOTE STOP)
					    (SETQ EXPR (READ STR FILERDTBL)))
		   do (FILEPRINT EXPR)
		      (RPTQ 2 (TERPRI))
		   finally (PROGN (DSPNEWPAGE)
				  (DSPFONT BOLDFONT)
				  (LET [(DT (GETFILEINFO STR (QUOTE CREATIONDATE]
				    (CENTERPRINT (if DT
						     then (CONCAT FN "		" DT)
						   else FN)))
				  (DSPFONT DEFAULTFONT)
				  (CENTERPRINT (CONCAT "-- Listed on " (DATE)
						       " --"))
				  (TERPRI))                  (* Create and print index for each type.
							     Print only one index per type, even when there are 
							     multiple "find" methods for each type.)
			   (for TYPE in (bind (TYPES ←(LIST (QUOTE FNS))) for X in INDEX
					   do [for (Y ← TYPES) by (CDR Y) repeatwhile (CDR Y)
						 when (EQ (CADR X)
							  (CAR Y))
						 do (RETURN) finally (RPLACD Y (LIST (CADR X]
					   finally (RETURN TYPES))
			      do (PrintOneTypeIndex TYPE INDEX))
			   (PROGN (TERPRI)
				  (DRAWLINE (DSPLEFTMARGIN)
					    (DSPYPOSITION)
					    (DSPRIGHTMARGIN)
					    (DSPYPOSITION)
					    (STRINGWIDTH " ")
					    (QUOTE PAINT)
					    NIL BLACKSHADE)
				  (TERPRI))
			   (RETURN STR))
		(OR TOSTREAM (PROGN (SEND.FILE.TO.PRINTER (CLOSEF (OUTPUT))
							  NIL
							  (LIST (QUOTE DOCUMENT.NAME)
								FN))
				    (QUOTE printed])

(PRINT.*
  [LAMBDA (EXPR)                                             (* lmm "21-Mar-85 13:50")
    [COND
      ((EQ (CADR EXPR)
	   (QUOTE *))                                        (* Form-feed if super-comment indicated.
							     Use * no matter what current COMMENTFLG is.)
	(DSPNEWPAGE))
      (T (RPTQ 3 (TERPRI]
    (printout NIL .FONT LAMBDAFONT EXPR .FONT DEFAULTFONT T T])

(PRINT.DECLARE:
  [LAMBDA (EXPR)                                             (* lmm "21-Mar-85 13:50")
    (PRIN1 "(")
    [bind LASTX for X in EXPR do (COND
				   ((NLISTP X)
				     (PRIN1 (SETQ LASTX X))
				     (SPACES 1))
				   ((STRPOS "@WHEN" LASTX)
				     (PRINTDEF X NIL T))
				   (T (TERPRI)
				      (FILEPRINT X]
    (printout NIL ")" T])

(PRINT.FILECREATED
  [LAMBDA (FC)                                               (* lmm "21-Mar-85 14:00")
    (printout NIL .FONT DEFAULTFONT "(" .P2 (pop FC)
	      , .P2 (pop FC)
	      , .FONT LAMBDAFONT .P2 (pop FC)
	      , .FONT DEFAULTFONT)
    (if (FIXP (CAR FC))
	then (PRIN2 (pop FC)))
    (if FC
	then (TERPRI)
	     (bind (MARGIN ←(DSPLEFTMARGIN)) while FC do (SELECTQ (CAR FC)
								  ((changes previous)
								    (DSPLEFTMARGIN MARGIN)
								    (printout NIL T -6 (pop FC)
									      ,
									      (pop FC)
									      ,)
								    (DSPLEFTMARGIN (DSPXPOSITION)))
								  (if (LISTP (CAR FC))
								      then (PRINT (pop FC))
								    else (PRIN2 (pop FC))
									 (SPACES 1)))
		finally (DSPLEFTMARGIN MARGIN)))
    (PRIN1 ")")
    (TERPRI])

(PRINT.DEFINEQ
  [LAMBDA (EXPR)                                             (* lmm "21-Mar-85 13:49")
    (printout NIL "(DEFINEQ" T T)
    (for Y in (CDR EXPR) do (printout NIL T "(" .FONT LAMBDAFONT (CAR Y)
				      T .FONT DEFAULTFONT .PPFTL (CDR Y)
				      ")" T T T))
    (printout NIL ")" T])

(PRINT.VAR
  [LAMBDA (VAREXP)                                           (* lmm "21-Mar-85 13:49")
    (PROG (TEM (LASTCOL (DSPRIGHTMARGIN)))
          (TERPRI)
          (printout NIL "(" (CAR VAREXP)
		    , .FONT PRETTYCOMFONT .P2 (CADR VAREXP)
		    .FONT DEFAULTFONT , .PPVTL (CDDR VAREXP)
		    ")" T])
)

(RPAQQ TOPLEVELPRINTMACROS ((RECORD . PRINT.VAR)
			    (TYPERECORD . PRINT.VAR)
			    (PROPRECORD . PRINT.VAR)
			    (HASHLINK . PRINT.VAR)
			    (ACCESSFN . PRINT.VAR)
			    (ACCESSFNS . PRINT.VAR)
			    (HASHRECORD . PRINT.VAR)
			    (ATOMRECORD . PRINT.VAR)
			    (ARRAYRECORD . PRINT.VAR)
			    (DATATYPE . PRINT.VAR)
			    (BLOCKRECORD . PRINT.VAR)
			    (ASSOCRECORD . PRINT.VAR)
			    (CACCESSFNS . PRINT.VAR)
			    (ARRAYBLOCK . PRINT.VAR)
			    (SYNONYM . PRINT.VAR)
			    (DEFINEQ . PRINT.DEFINEQ)
			    (RPAQ . PRINT.VAR)
			    (RPAQQ . PRINT.VAR)
			    (DECLARE: . PRINT.DECLARE:)
			    (PUTPROPS . PRINT.VAR)
			    (* . PRINT.*)
			    (FILECREATED . PRINT.FILECREATED)))
(PUTPROPS PPLISTFILE COPYRIGHT ("Xerox Corporation" 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (615 6197 (CENTERPRINT 625 . 918) (FILEPRINT 920 . 1228) (PPLISTFILE 1230 . 3688) (
PRINT.* 3690 . 4123) (PRINT.DECLARE: 4125 . 4551) (PRINT.FILECREATED 4553 . 5503) (PRINT.DEFINEQ 5505
 . 5850) (PRINT.VAR 5852 . 6195)))))
STOP