Google
 

Trailing-Edge - PDP-10 Archives - -
There are no other files named in the archive.
(FILECREATED "19-SEP-78 03:33:59" <LISPUSERS>PERIODICALLYSYSOUT.;17 4392   

     changes to:  PERIODICALLYSYSOUT PERIODICALLYSYSOUTCOMS

     previous date: "18-SEP-78 04:52:43" <LISPUSERS>PERIODICALLYSYSOUT.;16)


(PRETTYCOMPRINT PERIODICALLYSYSOUTCOMS)

(RPAQQ PERIODICALLYSYSOUTCOMS ((FNS PERIODICALLYSYSOUT SETSYSOUTTIME SYSOUTEVENTS PERIODICALLYRECLAIM)
			       (VARS (LASTSYSOUTEVENTS 0)
				     (MINSYSOUTEVENTS (PROG1 10 (* minimum number of events before 
								   consider sysoutting)))
				     (BACKUPSYSOUTNAME))
			       (P (OR (ARRAYP (GETATOMVAL (QUOTE MARKASCHANGEDSTATS)))
				      (PROG ((SYSTATS (QUOTE ((EDITUNDOSAVES)
							      (MARKASCHANGEDSTATS)))))
					    (STATINIT)))
				  (* make sure that LISPXSTATS and EDITSTATS are watched)
				  (ADVISE (QUOTE MAKEFILES)
					  (QUOTE AFTER)
					  (QUOTE (OR FILES (SETSYSOUTTIME)))))
			       (ADDVARS (AFTERSYSOUTFORMS (SETSYSOUTTIME))
					(IOWAITDAEMONFORMS (PERIODICALLYSYSOUT)
							   (PERIODICALLYRECLAIM)))
			       (P (OR (GETD (QUOTE WAITFORINPUT))
				      (LOAD (QUOTE <LISPUSERS>WAITFORINPUT.COM)
					    LDFLG))
				  (LOAD? (QUOTE <LISPUSERS>IOWAITDAEMON.COM)
					 LDFLG)
				  (AND (GETD (QUOTE SETSYSOUTTIME))
				       (SETSYSOUTTIME)))
			       (LOCALVARS . T)
			       (GLOBALVARS SYSOUT.EXT LASTSYSOUTTIME BACKUPSYSOUTNAME SYSOUTPAUSETIME 
					   MINSYSOUTINTERVAL)))
(DEFINEQ

(PERIODICALLYSYSOUT
  (LAMBDA NIL                                               (* lmm "19-SEP-78 03:28")
    (PROG NIL
          (COND
	    ((IGREATERP (FQUOTIENT (IDIFFERENCE (SYSOUTEVENTS)
						MINSYSOUTEVENTS)
				   (LOADAV))
			30)
	      (PRIN1 "[sysout " T)
	      (DOBE)                                        (* give user 15 seconds to type something to abort)
	      (WAITFORINPUT 15000)
	      (RETURN (PROG1 (COND
			       ((AND (NOT (READP T))
				     (PRIN1 "on " T)
				     (ERSETQ (PROG (SYSOUTFILE VAL)
					           (DECLARE (SPECVARS SYSOUTFILE))
					           (SETQ VAL (SYSOUT (PRIN2 (OUTFILEP 
										 BACKUPSYSOUTNAME)
									    T T)))
					           (COND
						     ((LISTP VAL)
						       (POSITION T 0)
						       (PRINT VAL T T))
						     (T (SETSYSOUTTIME VAL)
							(PRIN1 "]
" T)))
					           (RETURN VAL))))
				 30)
			       (T (PRIN1 " not done]" T)
				  5))
			     (PRINTPROMPTS)))))
          (RETURN 5))))

(SETSYSOUTTIME
  (LAMBDA (SYSOUTFILENAME)              (* lmm "14-AUG-78 10:44")
                                        (* SYSOUTFILENAME is set if 
					coming back into same sysout)
    (SETQ BACKUPSYSOUTNAME (OR SYSOUTFILENAME (PACKFILENAME
				 (QUOTE DIRECTORY)
				 (USERNAME)
				 (QUOTE NAME)
				 (QUOTE BACKUP)
				 (QUOTE EXTENSION)
				 SYSOUT.EXT
				 (QUOTE VERSION)
				 -1)))
    (SETQ LASTSYSOUTEVENTS (SYSOUTEVENTS))))

(SYSOUTEVENTS
  (LAMBDA NIL                           (* lmm "18-SEP-78 04:41")
    (IPLUS (OPENR (LOC EDITUNDOSAVES))
	   (ITIMES 2 (OPENR (LOC MARKASCHANGEDSTATS))))))

(PERIODICALLYRECLAIM
  (LAMBDA NIL                           (* lmm "14-AUG-78 10:38")
    (COND
      ((AND (FGREATERP .3 (LOADAV))
	    (ILESSP (GCTRP)
		    (IQUOTIENT (MINFS)
			       4)))
	(RECLAIM)
	30)
      (T 10))))
)

(RPAQ LASTSYSOUTEVENTS 0)

(RPAQ MINSYSOUTEVENTS (PROG1 10 (* minimum number of events before consider sysoutting)))

(RPAQ BACKUPSYSOUTNAME NIL)
(OR (ARRAYP (GETATOMVAL (QUOTE MARKASCHANGEDSTATS)))
    (PROG ((SYSTATS (QUOTE ((EDITUNDOSAVES)
			    (MARKASCHANGEDSTATS)))))
	  (STATINIT)))
(* make sure that LISPXSTATS and EDITSTATS are watched)
(ADVISE (QUOTE MAKEFILES)
	(QUOTE AFTER)
	(QUOTE (OR FILES (SETSYSOUTTIME))))

(ADDTOVAR AFTERSYSOUTFORMS (SETSYSOUTTIME))

(ADDTOVAR IOWAITDAEMONFORMS (PERIODICALLYSYSOUT)
			    (PERIODICALLYRECLAIM))
(OR (GETD (QUOTE WAITFORINPUT))
    (LOAD (QUOTE <LISPUSERS>WAITFORINPUT.COM)
	  LDFLG))
(LOAD? (QUOTE <LISPUSERS>IOWAITDAEMON.COM)
       LDFLG)
(AND (GETD (QUOTE SETSYSOUTTIME))
     (SETSYSOUTTIME))
(DECLARE: DOEVAL@COMPILE DONTCOPY

(LOCALVARS . T)
)
(DECLARE: DOEVAL@COMPILE DONTCOPY

(ADDTOVAR GLOBALVARS SYSOUT.EXT LASTSYSOUTTIME BACKUPSYSOUTNAME SYSOUTPAUSETIME MINSYSOUTINTERVAL)
)
(DECLARE: DONTCOPY
  (FILEMAP (NIL (1425 3372 (PERIODICALLYSYSOUT 1437 . 2465) (SETSYSOUTTIME 2469 . 2939) (SYSOUTEVENTS 
2943 . 3123) (PERIODICALLYRECLAIM 3127 . 3369)))))
STOP