1
0
mirror of synced 2026-05-02 22:33:48 +00:00

Tedit readonly files, cleanup filesets printfn (#532)

* FILESETS, TEDITWINDOW, TEDIT-PF-SEE

Add DTDECLARE to EXPORTFILES, fix TEDIT so that READONLY windows and processes are collected

* PRINTFN:  Eliminate PMORE
This commit is contained in:
rmkaplan
2021-10-21 09:56:36 -07:00
committed by GitHub
parent c7a219fd22
commit 08bdd34e69
6 changed files with 88 additions and 99 deletions

View File

@@ -1,12 +1,13 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "28-Sep-2021 23:52:49" 
{DSK}<Users>kaplan>Local>medley3.5>git-medley>sources>PRINTFN.;24 13993
(FILECREATED "17-Oct-2021 18:00:43" 
{DSK}<Users>kaplan>Local>medley3.5>git-medley>sources>PRINTFN.;29 13073
changes to%: (FNS PRINTFNDEF PFCOPYBYTES)
changes to%: (VARS PRINTFNCOMS)
(FNS PRINTFN)
previous date%: " 8-Aug-2021 15:15:00"
{DSK}<Users>kaplan>Local>medley3.5>git-medley>sources>PRINTFN.;17)
previous date%: " 8-Oct-2021 00:20:48"
{DSK}<Users>kaplan>Local>medley3.5>git-medley>sources>PRINTFN.;28)
(* ; "
@@ -17,12 +18,12 @@ Copyright (c) 1986-1987, 1990, 1999, 2018, 2021 by Venue & Xerox Corporation.
(RPAQQ PRINTFNCOMS
[(* * PRINTFN)
(FNS PF PF* PMORE PRINTFN PRINTFNDEF FINDFNDEF PFCOPYBYTES DISPLAYP)
(INITVARS PFDEFAULT (LASTFNDEF))
(FNS PF PF* PRINTFN PRINTFNDEF FINDFNDEF PFCOPYBYTES DISPLAYP)
(INITVARS (PFDEFAULT 'PFCOPYBYTES))
(DECLARE%: DONTCOPY (MACROS PFPRINCHAR PFOUTCHAR))
(P (MOVD? 'COPYBYTES 'PFCOPYBYTES))
(USERMACROS PF)
(GLOBALVARS **COMMENT**FLG LASTFNDEF LASTWORD PFDEFAULT FILERDTBL USEMAPFLG)
(GLOBALVARS **COMMENT**FLG LASTWORD PFDEFAULT FILERDTBL USEMAPFLG)
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA PF* PF)
(NLAML)
(LAMA])
@@ -86,21 +87,11 @@ Copyright (c) 1986-1987, 1990, 1999, 2018, 2021 by Venue & Xerox Corporation.
(APPLY (FUNCTION PF)
FN])
(PMORE
[LAMBDA NIL (* lmm " 9-AUG-78 17:21")
(* lmm "17-MAY-78 15:38")
(PRINTFNDEF (CAR LASTFNDEF)
T
(CADDR LASTFNDEF)
-1
(CADDDR LASTFNDEF])
(PRINTFN
[LAMBDA (FN FROMFILE TOFILE) (* lmm "14-Aug-84 14:16")
[LAMBDA (FN FROMFILE TOFILE) (* ; "Edited 17-Oct-2021 18:00 by rmk:")
(PROG ((LOC (FINDFNDEF FN FROMFILE)))
(COND
((LISTP LOC)
(SETQ LASTFNDEF LOC)
(PRINTFNDEF (CAR LOC)
TOFILE
(CADR LOC)
@@ -112,36 +103,29 @@ Copyright (c) 1986-1987, 1990, 1999, 2018, 2021 by Venue & Xerox Corporation.
(T (printout TOFILE FN " not found on " LOC "." T])
(PRINTFNDEF
[LAMBDA (SRCFIL DSTFIL START END TYPE) (* ; "Edited 28-Sep-2021 23:52 by rmk:")
[LAMBDA (SRCFIL DSTFIL START END TYPE) (* ; "Edited 7-Oct-2021 20:51 by rmk:")
(* ;; "RMK: It wasn't clear what PFDEFAULT was doing, or why. I've assigned it a meaning here: the name of the function to call to print a function on a display stream. Initialized to PFCOPYBYTES")
(RESETLST
(PROG (TEM)
[COND
((SETQ TEM (GETSTREAM DSTFIL 'OUTPUT T))
(SETQ DSTFIL TEM))
(T (RESETSAVE (SETQ DSTFIL (OPENSTREAM DSTFIL 'OUTPUT))
'(PROGN (CLOSEF? OLDVALUE]
[COND
((SETQ TEM (GETSTREAM SRCFIL 'INPUT T))
(RESETSAVE NIL (LIST 'SETFILEPTR TEM (GETFILEPTR TEM)))
(SETQ SRCFIL TEM))
(T (RESETSAVE (SETQ SRCFIL (OPENSTREAM SRCFIL 'INPUT))
'(PROGN (CLOSEF? OLDVALUE]
(PRIN1 "{from " DSTFIL)
(PRIN2 (FULLNAME SRCFIL)
DSTFIL T)
(PRIN1 "}
" DSTFIL))
(* ;; "RMK: Originally the last test was (EQ TYPE 'MAC). I think this was a typo for MAP, since that argument is set to MAP in FINDFNDEF. If the typo is fixed, we would end up in the COPYBYTES clause, which we don't generally want. So changed it also to a NEQ.")
(* ;; "PFDEFAULT is passed as the TYPE argument on the call from COPYALLBYTES, basically to force COPYBYTES and not do the format and font translations. It defaults to NIL, not COPYBYTES. I don't understand what this is trying to control. Note that the last argument of PFCOPYBYTES (PFDEFAULT here) is ignored.")
(COND
((OR (NOT (DISPLAYP DSTFIL))
(EQ PFDEFAULT 'COPYBYTES)
(NEQ TYPE 'MAP))
(COPYBYTES SRCFIL DSTFIL START END))
(T (PFCOPYBYTES SRCFIL DSTFIL START END PFDEFAULT)))
(LET (TEM)
[COND
((SETQ TEM (GETSTREAM DSTFIL 'OUTPUT T))
(SETQ DSTFIL TEM))
(T (RESETSAVE (SETQ DSTFIL (OPENSTREAM DSTFIL 'OUTPUT))
'(PROGN (CLOSEF? OLDVALUE]
[COND
((SETQ TEM (GETSTREAM SRCFIL 'INPUT T))
(RESETSAVE NIL (LIST 'SETFILEPTR TEM (GETFILEPTR TEM)))
(SETQ SRCFIL TEM))
(T (RESETSAVE (SETQ SRCFIL (OPENSTREAM SRCFIL 'INPUT))
'(PROGN (CLOSEF? OLDVALUE]
(PRINTOUT DSTFIL "{from " .P2 (FULLNAME SRCFIL)
"}" T))
(APPLY* (CL:IF (DISPLAYP DSTFIL)
PFDEFAULT
(FUNCTION COPYBYTES))
SRCFIL DSTFIL START END)
(TERPRI DSTFIL))])
(FINDFNDEF
@@ -168,11 +152,11 @@ Copyright (c) 1986-1987, 1990, 1999, 2018, 2021 by Venue & Xerox Corporation.
(T FULL])
(PFCOPYBYTES
[LAMBDA (SRCFIL DSTFIL START END FLG) (* ; "Edited 28-Sep-2021 23:35 by rmk:")
[LAMBDA (SRCFIL DSTFIL START END) (* ; "Edited 8-Oct-2021 00:17 by rmk:")
(* ; "Edited 24-Mar-93 14:16 by rmk:")
(* lmm "28-Sep-86 14:38")
(* ;; "RMK: What does FLG do? It isn't referenced. It seems to be passed as the value of PFDEFAULT from PRINTFNDEF, and that variable is initialized to NIL. Remove both, eventually?")
(* ;; "RMK: What does FLG do? It isn't referenced. It seems to be passed as the value of PFDEFAULT from PRINTFNDEF, and that variable is initialized to NIL. I'm removing it.")
(* ;; " copy from SRCFIL to DSTFIL, paying attention to font changes. Other stuff about truncating lines gone away. Interprets all possible EOL conventions as EOL. Has to call \INCHAR-\INCCODE macros in order to keep track of character count--READDCODE doesn't do that.")
@@ -241,9 +225,7 @@ Copyright (c) 1986-1987, 1990, 1999, 2018, 2021 by Venue & Xerox Corporation.
(IMAGESTREAMTYPEP STRM 'TEXT])
)
(RPAQ? PFDEFAULT NIL)
(RPAQ? LASTFNDEF )
(RPAQ? PFDEFAULT 'PFCOPYBYTES)
(DECLARE%: DONTCOPY
(DECLARE%: EVAL@COMPILE
@@ -283,7 +265,7 @@ Copyright (c) 1986-1987, 1990, 1999, 2018, 2021 by Venue & Xerox Corporation.
(ADDTOVAR EDITCOMSA PF)
(DECLARE%: DOEVAL@COMPILE DONTCOPY
(GLOBALVARS **COMMENT**FLG LASTFNDEF LASTWORD PFDEFAULT FILERDTBL USEMAPFLG)
(GLOBALVARS **COMMENT**FLG LASTWORD PFDEFAULT FILERDTBL USEMAPFLG)
)
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS
@@ -295,7 +277,6 @@ Copyright (c) 1986-1987, 1990, 1999, 2018, 2021 by Venue & Xerox Corporation.
)
(PUTPROPS PRINTFN COPYRIGHT ("Venue & Xerox Corporation" 1986 1987 1990 1999 2018 2021))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (1134 11871 (PF 1144 . 3839) (PF* 3841 . 4135) (PMORE 4137 . 4456) (PRINTFN 4458 . 5049)
(PRINTFNDEF 5051 . 6790) (FINDFNDEF 6792 . 7816) (PFCOPYBYTES 7818 . 11621) (DISPLAYP 11623 . 11869))
)))
(FILEMAP (NIL (1145 10976 (PF 1155 . 3850) (PF* 3852 . 4146) (PRINTFN 4148 . 4718) (PRINTFNDEF 4720 .
5903) (FINDFNDEF 5905 . 6929) (PFCOPYBYTES 6931 . 10726) (DISPLAYP 10728 . 10974)))))
STOP