diff --git a/README.md b/README.md
index 0be8c760..6a8f13d0 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,14 @@
# Medley
-This repository is for the Lisp environment of [Medley](https://interlisp.org).
+The [Medley Interlisp Project](https://interlisp.org) aims to preserve, revive, and modernize the [Interlisp](https://interlisp.org) software development environment for rapid prototyping, research and Artificial Intelligence created at Xerox PARC since the 1970s.
-[Install and Run](https://interlisp.org/software/install-and-run) covers ways to install and start up Medley on Linux systems, MacOS, and Windows (with or without WSL).
+This repository is for the Lisp environment of the [Medley](https://interlisp.org) release of Interlisp. Other repositories hold additional subsystems and applications such as [Maiko](https://github.com/Interlisp/maiko), the implementation (in C) of the Medley virtual machine, the [LOOPS](https://github.com/Interlisp/loops) object-oriented extension of Interlisp, and the [NoteCards](https://github.com/Interlisp/notecards) hypermedia system.
+
+[Install and Run](https://interlisp.org/software/install-and-run) covers ways to install and start up Medley on Linux systems, MacOS, Windows (with or without WSL), and in a web browser.
[Using Medley](https://interlisp.org/software/using-medley/) has an overview and pointers to documentation.
-[Interlisp/maiko](https://github.com/Interlisp/maiko), is the repo for the implementation (in C) of the Medley virtual machine.
+The [Glossary](https://interlisp.org/history/glossary) defines system-specific terms such as "loadup" and "sysout".
## Releases
@@ -67,25 +69,9 @@ If you have a high-resolution display, note that much of the graphics was design
Medley presumes you have a 3-button mouse; the scroll-wheel on some mice acts as one, with some difficulty. Go into XQuartz Preferences/Input and check "Emulate three button mouse" option.
-### Running Medley Interlisp (obsolete)
+### Running Medley Interlisp
-The `run-medley` script in this repo sets up some convenient defaults. Running Medley can be done by typing:
-```
-$ cd medley
-$ ./run-medley
-```
-
-Or, if you wish to start Medley up with a different SYSOUT:
-
-```
-$ cd medley
-$ ./run-medley
-```
-The first time the system is run it loads the system image that comes
-with the system. When you exit the system (or "do a `SaveVM`" menu
-option) the state of your machine is saved in a file named
-`~/lisp.virtualmem`. Subsequent system startups load the
-`~/lisp.virtualmem` image by default.
+The primer [Medley Interlisp for the Newcomer](https://primer.interlisp.org) eases new users into the Interlisp environment. It assumes no prior knowledge of Lisp and covers the user interface, programming and debugging, windows and graphics, and more. We recommend consulting this document to learn how to run and use the system.
### Exiting The System
@@ -123,7 +109,7 @@ Each directory should have a README.md, but briefly
* BUILDING.md -- instructions on how to make your own loadups
* clos -- early implementation of Common Lisp Object System
* CLTL2 -- files submitted to bring Medley up to the conformance to "Common Lisp, the Language" 2nd edition. Not enough to conform to the ANSI standard lisp.
-* docs -- Documentation files (in TEdit format, PDFs, or online help; look [here](https://github.com/Interlisp/medley/Documentation))
+* docs -- Documentation files (in TEdit format, PDFs, or online help
* fonts -- raster fonts (or font widths) in various resolutions for display, postscript, interpress, press formats
* greetfiles -- various configuration setups
* internal -- These _were_ internal to Venue
diff --git a/greetfiles/APPS-INIT b/greetfiles/APPS-INIT
index 21f74cec..defae498 100644
--- a/greetfiles/APPS-INIT
+++ b/greetfiles/APPS-INIT
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "26-Nov-2025 12:30:08" {DSK}larry>il>MEDLEY>GREETFILES>APPS-INIT.;2 23361
+(FILECREATED " 1-Feb-2026 13:41:02" {WMEDLEY}APPS-INIT.;11 22926
- :EDIT-BY "lmm"
+ :EDIT-BY rmk
- :CHANGES-TO (FNS Apps.CreateButtons)
+ :CHANGES-TO (FNS XCL-USER::EXEC¬INTERLISP)
- :PREVIOUS-DATE "25-Feb-2024 13:56:23" {DSK}larry>il>MEDLEY>GREETFILES>APPS-INIT.;1)
+ :PREVIOUS-DATE " 1-Feb-2026 07:58:14" {WMEDLEY}APPS-INIT.;9)
(PRETTYCOMPRINT APPS-INITCOMS)
@@ -19,7 +19,7 @@
(Apps.RoomsActivated NIL))
(FNS Apps.InitNotecards Apps.SetUpNOTECARDSDIRECTORIES Apps.DoInit Apps.CreateButtons
Apps.CreateLabel Apps.ActivateCLOS Apps.ActivateRooms Apps.ShowDoc
- XCL-USER::EXEC_INTERLISP Apps.AroundExitFn)
+ XCL-USER::EXEC¬INTERLISP Apps.AroundExitFn)
(DECLARE%: DONTEVAL@LOAD DOCOPY (P (Apps.DoInit)))
(DECLARE%: FIRST DONTEVAL@LOAD DOCOPY (P (BKSYSBUF " "])
@@ -35,52 +35,53 @@
(RPAQ? Apps.RoomsActivated NIL)
(DEFINEQ
-(Apps.InitNotecards
+(Apps.InitNotecards
[LAMBDA (DoNotRefreshButtons)
- (DECLARE (GLOBALVARS BackgroundMenuCommands BackgroundMenu))
- (* ; "Edited 19-Jan-2023 11:57 by FGH")
- (* ; "Edited 7-Dec-2022 11:14 by FGH")
- (* ; "Edited 12-Nov-2022 14:41 by FGH")
- (* ; "Edited 11-Sep-2022 01:09 by fgh")
- (* ; "Edited 7-Feb-2022 20:22 by tp7")
+ (DECLARE (GLOBALVARS BackgroundMenuCommands BackgroundMenu))
+ (* ; "Edited 1-Feb-2026 00:00 by rmk")
+ (* ; "Edited 19-Jan-2023 11:57 by FGH")
+ (* ; "Edited 7-Dec-2022 11:14 by FGH")
+ (* ; "Edited 12-Nov-2022 14:41 by FGH")
+ (* ; "Edited 11-Sep-2022 01:09 by fgh")
+ (* ; "Edited 7-Feb-2022 20:22 by tp7")
(LET* [[SRCDIR (OR (UNIX-GETENV 'NOTEFILESSRC)
- (AND (UNIX-GETENV 'NC_INSTALLDIR)
- (CONCAT (UNIX-GETENV 'NC_INSTALLDIR)
+ (AND (UNIX-GETENV 'NC¬INSTALLDIR)
+ (CONCAT (UNIX-GETENV 'NC¬INSTALLDIR)
"/notefiles"))
(LET ((SUBDIR "notecards/notefiles"))
- (for DIR in (LIST (CONCAT (MEDLEYDIR)
+ (for DIR in (LIST (CONCAT (MEDLEYDIR)
SUBDIR)
(CONCAT (MEDLEYDIR)
"../" SUBDIR)
(CONCAT (MEDLEYDIR)
- "../../" SUBDIR)) thereis (DIRECTORYNAME DIR]
+ "../../" SUBDIR)) thereis (DIRECTORYNAME DIR]
(DESTDIR (OR (UNIX-GETENV 'NOTEFILESDIR)
- (AND (UNIX-GETENV 'MEDLEY_USERDIR)
- (CONCAT (UNIX-GETENV 'MEDLEY_USERDIR)
+ (AND (UNIX-GETENV 'MEDLEY¬USERDIR)
+ (CONCAT (UNIX-GETENV 'MEDLEY¬USERDIR)
"/notefiles"))
(CONCAT LOGINDIR "notefiles"]
- [if (AND (NOT (DIRECTORYNAME DESTDIR))
+ [if (AND (NOT (DIRECTORYNAME DESTDIR))
(DIRECTORYNAME SRCDIR))
- then (for NF in (DIRECTORY (CONCAT SRCDIR "/*"))
- do (COPYFILE NF (PACKFILENAME 'HOST "DSK" 'DIRECTORY DESTDIR 'NAME
+ then (for NF in (DIRECTORY (CONCAT SRCDIR "/*"))
+ do (COPYFILE NF (PACKFILENAME 'HOST "DSK" 'DIRECTORY DESTDIR 'NAME
(FILENAMEFIELD NF 'NAME)
'EXTENSION
(FILENAMEFIELD NF 'EXTENSION)
'VERSION
(FILENAMEFIELD NF 'VERSION]
(LET* ((PW-REGION (WINDOWPROP PROMPTWINDOW 'REGION))
- (LEFT (IPLUS (fetch (REGION RIGHT) of PW-REGION)
+ (LEFT (IPLUS (fetch (REGION RIGHT) of PW-REGION)
20))
- (BOTTOM (fetch (REGION BOTTOM) of PW-REGION)))
- (NC.BringUpNoteCardsIcon (create POSITION
+ (BOTTOM (fetch (REGION BOTTOM) of PW-REGION)))
+ (NC.BringUpNoteCardsIcon (create POSITION
XCOORD _ LEFT
YCOORD _ BOTTOM)))
(NC.FileBrowserMenu NC.NoteCardsIconWindow (PACKFILENAME 'HOST "DSK" 'DIRECTORY DESTDIR
'NAME "*" 'EXTENSION "notefile")
(CREATEREGION 50 (IDIFFERENCE SCREENHEIGHT 700)
550 220))
- (if (NULL (SASSOC 'NoteCards BackgroundMenuCommands))
- then (PROGN [SETQ BackgroundMenuCommands (APPEND BackgroundMenuCommands
+ (if (NULL (SASSOC 'NoteCards BackgroundMenuCommands))
+ then (PROGN [SETQ BackgroundMenuCommands (APPEND BackgroundMenuCommands
(LIST '(NoteCards (
NC.BringUpNoteCardsIcon
)
@@ -89,59 +90,61 @@
]
(SETQ BackgroundMenu NIL)))
(SETQ Apps.NotecardsActivated T)
- (if (NOT DoNotRefreshButtons)
- then (Apps.CreateButtons])
+ (if (NOT DoNotRefreshButtons)
+ then (Apps.CreateButtons])
-(Apps.SetUpNOTECARDSDIRECTORIES
+(Apps.SetUpNOTECARDSDIRECTORIES
[LAMBDA NIL
- (* ;; "Find the location of the Notecards directory and call NC.SetUpNOTECARDSDIRECTORIES.")
+ (* ;; "Find the location of the Notecards directory and call NC.SetUpNOTECARDSDIRECTORIES.")
- (* ;; " This is needed to make sure that lazy loading of Notecard types works.")
+ (* ;; " This is needed to make sure that lazy loading of Notecard types works.")
(LET* [(LOC1 (CONCAT MEDLEYDIR "notecards>"))
(LOC2 (CONCAT MEDLEYDIR "..>notecards>"))
(LOC3 (CONCAT MEDLEYDIR "..>..>notecards>"))
- (NCDIR (for LOC in (LIST LOC1 LOC2 LOC3) thereis (OR (INFILEP (CONCAT LOC
+ (NCDIR (for LOC in (LIST LOC1 LOC2 LOC3) thereis (OR (INFILEP (CONCAT LOC
"system>NOTECARDS"))
(INFILEP (CONCAT LOC
"system>NOTECARDS.LCOM"
]
- (if NCDIR
- then [SETQ NCDIR (OR (INFILEP (CONCAT NCDIR "system>NOTECARDS"))
+ (if NCDIR
+ then [SETQ NCDIR (OR (INFILEP (CONCAT NCDIR "system>NOTECARDS"))
(INFILEP (CONCAT NCDIR "system>NOTECARDS.LCOM"]
(SETQ NCDIR (SUBSTRING NCDIR 1 (IDIFFERENCE (STRPOS "system>NOTECARDS" NCDIR)
1)))
(NC.SetUpNOTECARDSDIRECTORIES NCDIR)
T
- else (PRIN1 "Warning: Notecards directory could not be found." T)
+ else (PRIN1 "Warning: Notecards directory could not be found." T)
(PRIN1 "Hence, NOTECARDSDIRECTORIES is probably not set correctly" T)
(PRIN1 "and Notecards will not work properly." T)
NIL])
-(Apps.DoInit
+(Apps.DoInit
[LAMBDA NIL
- (* ;; "Edited 19-Jan-2023 12:43 by FGH")
+ (* ;; "Edited 31-Jan-2026 23:57 by rmk")
- (* ;; "Edited 17-Jan-2023 23:23 by FGH")
+ (* ;; "Edited 19-Jan-2023 12:43 by FGH")
- (* ;; "Edited 7-Dec-2022 11:14 by FGH")
+ (* ;; "Edited 17-Jan-2023 23:23 by FGH")
- (* ;; "Edited 12-Nov-2022 13:57 by FGH")
+ (* ;; "Edited 7-Dec-2022 11:14 by FGH")
- (* ;; "Edited 12-Oct-2022 20:23 by fgh")
+ (* ;; "Edited 12-Nov-2022 13:57 by FGH")
- (* ;; "Edited 6-Sep-2022 17:22 by fgh")
+ (* ;; "Edited 12-Oct-2022 20:23 by fgh")
- (* ;; "Edited 4-Sep-2022 16:44 by larry")
+ (* ;; "Edited 6-Sep-2022 17:22 by fgh")
- (* ;; "Edited 18-Mar-2022 18:53 by fgh")
+ (* ;; "Edited 4-Sep-2022 16:44 by larry")
- (* ;; "Edited 17-Dec-2021 22:05 by fgh")
+ (* ;; "Edited 18-Mar-2022 18:53 by fgh")
+
+ (* ;; "Edited 17-Dec-2021 22:05 by fgh")
(PROGN
- (* ;; " Adjust windows so that the exec window and the prompt window don't overlap")
+ (* ;; " Adjust windows so that the exec window and the prompt window don't overlap")
[MAPC (OPENWINDOWS)
(FUNCTION (LAMBDA (W)
@@ -152,90 +155,92 @@
(IDIFFERENCE SCREENHEIGHT 18)))
((STREQUAL (WINDOWPROP W 'TITLE)
"Prompt Window")
- (PROGN (MOVEW W (create POSITION
+ (PROGN (MOVEW W (create POSITION
XCOORD _ 50
YCOORD _ (IDIFFERENCE SCREENHEIGHT 120)))
(CLEARW W)))
((STREQUAL (WINDOWPROP W 'TITLE)
"Exec (XCL)")
(PROGN (WINDOWPROP W 'TITLE "Exec (INTERLISP)")
- (MOVEW W (create POSITION
+ (MOVEW W (create POSITION
XCOORD _ 50
YCOORD _ (IDIFFERENCE SCREENHEIGHT 460]
- (* ;; " Set up INITIALSLST based on information passed in from the Linux environment")
+ (* ;; " Set up INITIALSLST based on information passed in from the Linux environment")
- [SETQ INITIALSLST (LIST (LIST USERNAME (UNIX-GETENV 'MEDLEY_FIRSTNAME)
- (UNIX-GETENV 'MEDLEY_INITIALS]
+ [SETQ INITIALSLST (LIST (LIST USERNAME (UNIX-GETENV 'MEDLEY¬FIRSTNAME)
+ (UNIX-GETENV 'MEDLEY¬INITIALS]
(LOAD '{DSK}/usr/local/interlisp/medley/lispusers/HELPSYS.LCOM T)
- (* ;; "change to interlisp exec if required")
+ (* ;; "change to interlisp exec if required")
(COND
- ((OR (STRING-EQUAL (UNIX-GETENV 'MEDLEY_EXEC)
+ ((OR (STRING-EQUAL (UNIX-GETENV 'MEDLEY¬EXEC)
"inter")
(STRING-EQUAL (UNIX-GETENV 'NCO)
"true"))
- (BKSYSBUF "(EXEC_INTERLISP)")))
+ (BKSYSBUF "(EXEC¬INTERLISP)")))
- (* ;; "Always Activate CLOS")
+ (* ;; "Always Activate CLOS")
- (Apps.ActivateCLOS)
+ (Apps.ActivateCLOS)
- (* ;; " activate Notecards if requested")
+ (* ;; " activate Notecards if requested")
(COND
- ((STRING-EQUAL (UNIX-GETENV 'RUN_NOTECARDS)
+ ((STRING-EQUAL (UNIX-GETENV 'RUN¬NOTECARDS)
"true")
- (Apps.InitNotecards T)))
+ (Apps.InitNotecards T)))
- (* ;; " activate Rooms if requested")
+ (* ;; " activate Rooms if requested")
(COND
- ((STRING-EQUAL (UNIX-GETENV 'RUN_ROOMS)
+ ((STRING-EQUAL (UNIX-GETENV 'RUN¬ROOMS)
"true")
- (Apps.ActivateRooms T)))
+ (Apps.ActivateRooms T)))
- (* ;; " create the Documentation and ROOMS, Notecards Activation Buttons, if needed")
+ (* ;; " create the Documentation and ROOMS, Notecards Activation Buttons, if needed")
- (Apps.CreateButtons T)
+ (Apps.CreateButtons T)
- (* ;; " Make sure Notecards doesn't try to load its HASH file in NC.PostGreet")
+ (* ;; " Make sure Notecards doesn't try to load its HASH file in NC.PostGreet")
(SETTOPVAL '\NC.SourceAccessFlg NIL)
- (* ;; "Setup NOTECARDSDIRECTORIES.")
+ (* ;; "Setup NOTECARDSDIRECTORIES.")
- (Apps.SetUpNOTECARDSDIRECTORIES)
+ (Apps.SetUpNOTECARDSDIRECTORIES)
- (* ;; "Add AROUNDEXITFN to ensure NOTECARDSDIRECTORIES get reset after LOGOUT, etc.")
+ (* ;; "Add AROUNDEXITFN to ensure NOTECARDSDIRECTORIES get reset after LOGOUT, etc.")
(SETQ AROUNDEXITFNS (LSUBST '(MEDLEY-INIT-VARS Apps.AroundExitFn)
'MEDLEY-INIT-VARS AROUNDEXITFNS])
-(Apps.CreateButtons
- [LAMBDA (DoDocsToo) (* ; "Edited 26-Nov-2025 12:29 by lmm")
- (* ; "Edited 13-Dec-2022 12:51 by frank")
- (* ; "Edited 7-Dec-2022 11:28 by FGH")
- (* ; "Edited 5-Dec-2022 17:31 by FGH")
- (* ; "Edited 12-Nov-2022 14:52 by FGH")
+(Apps.CreateButtons
+ [LAMBDA (DoDocsToo) (* ; "Edited 31-Jan-2026 23:59 by rmk")
+ (* ; "Edited 26-Nov-2025 12:29 by lmm")
+ (* ; "Edited 13-Dec-2022 12:51 by frank")
+ (* ; "Edited 7-Dec-2022 11:28 by FGH")
+ (* ; "Edited 5-Dec-2022 17:31 by FGH")
+ (* ; "Edited 12-Nov-2022 14:52 by FGH")
- (* ;; " Create buttons for Documentation and to activate Rooms, Notecards ")
+ (* ;; " Create buttons for Documentation and to activate Rooms, Notecards ")
- (* ;; "Note: due to bug in DELETE-BUTTON need to create Doc buttons last. This will make sure that the NoteCards/Rooms buttons get properl deleted when they are activated. But the Doc buttons will not necessariy get deleted properly (but then there is never a need for them to be deleted).")
+ (* ;; "Note: due to bug in DELETE-BUTTON need to create Doc buttons last. This will make sure that the NoteCards/Rooms buttons get properl deleted when they are activated. But the Doc buttons will not necessariy get deleted properly (but then there is never a need for them to be deleted).")
- (LET* ((FEATURES (LIST (LIST Apps.NotecardsActivated '(Apps.InitNotecards)
+
+ (LET* ((FEATURES (LIST (LIST Apps.NotecardsActivated '(Apps.InitNotecards)
"NOTECARDS")
- (LIST Apps.RoomsActivated '(Apps.ActivateRooms)
+ (LIST Apps.RoomsActivated '(Apps.ActivateRooms)
"ROOMS")))
- (FEATURES-LABELS (for FEATURE in FEATURES collect (CADDR FEATURE)))
+ (FEATURES-LABELS (for FEATURE in FEATURES collect (CADDR FEATURE)))
(DOCS (LIST (LIST "https://interlisp.org/docs/medley/orientation/" "BASICS")
(LIST "https://primer.interlisp.org/" "PRIMER")
(LIST "https://interlisp.org/documentation/IRM.pdf" "MANUAL")
- (LIST "https://interlisp.org/documentation/notecards_user_guide_v1.2.pdf"
+ (LIST "https://interlisp.org/documentation/notecards¬user-guide¬v1.2.pdf"
"NOTECARDS")
(LIST "https://interlisp.org/documentation/ROOMSTECHDESC.pdf" "ROOMS")))
- (DOCS-LABELS (for DOC in DOCS collect (CADR DOC)))
+ (DOCS-LABELS (for DOC in DOCS collect (CADR DOC)))
(RIGHTMARGINISH 140)
(SECTION1YPOS 225)
(YPOSDELTA 55)
@@ -249,31 +254,31 @@
(IWS NIL)
(BUTTONS NIL))
- (* ;; "First remove/re-create feature buttons")
+ (* ;; "First remove/re-create feature buttons")
- (for W in (OPENWINDOWS) when (MEMBER (WINDOWPROP W 'ICONLABEL)
- (LIST "ACTIVATE" "FEATURES")) do (CLOSEW W))
- (for B in *ALL-BUTTONS* when (AND (EQ (WINDOWPROP B 'Apps.BUTTON)
+ (for W in (OPENWINDOWS) when (MEMBER (WINDOWPROP W 'ICONLABEL)
+ (LIST "ACTIVATE" "FEATURES")) do (CLOSEW W))
+ (for B in *ALL-BUTTONS* when (AND (EQ (WINDOWPROP B 'Apps.BUTTON)
'FEATURE)
(MEMBER (BUTTON-LABEL B)
- FEATURES-LABELS)) do (DELETE-BUTTON B))
- [if FEATURES-REQUIREDP
- then [SETQ IWS (LIST (Apps.CreateLabel "ACTIVATE" (IDIFFERENCE SCREENWIDTH
+ FEATURES-LABELS)) do (DELETE-BUTTON B))
+ [if FEATURES-REQUIREDP
+ then [SETQ IWS (LIST (Apps.CreateLabel "ACTIVATE" (IDIFFERENCE SCREENWIDTH
(IDIFFERENCE RIGHTMARGINISH 50
))
(IDIFFERENCE SCREENHEIGHT (IDIFFERENCE SECTION2YPOS 20)))
- (Apps.CreateLabel "FEATURES" (IDIFFERENCE SCREENWIDTH
+ (Apps.CreateLabel "FEATURES" (IDIFFERENCE SCREENWIDTH
(IDIFFERENCE RIGHTMARGINISH 50
))
(IDIFFERENCE SCREENHEIGHT SECTION2YPOS]
- (SETQ BUTTONS (for FEATURE in FEATURES
- collect (OR (CAR FEATURE)
+ (SETQ BUTTONS (for FEATURE in FEATURES
+ collect (OR (CAR FEATURE)
(LET (B)
(SETQ BUTTONY-FEATURES (IPLUS BUTTONY-FEATURES
YPOSDELTA))
[SETQ B (CREATE-BUTTON (CADR FEATURE)
(CADDR FEATURE)
- (create POSITION
+ (create POSITION
XCOORD _ (IDIFFERENCE
SCREENWIDTH
RIGHTMARGINISH)
@@ -284,30 +289,30 @@
(WINDOWPROP B 'Apps.BUTTON 'FEATURE)
B]
- (* ;; "Then if needed, remove/recreate documentation buttons")
+ (* ;; "Then if needed, remove/recreate documentation buttons")
- (if DoDocsToo
- then (for W in (OPENWINDOWS) when (MEMBER (WINDOWPROP W 'ICONLABEL)
+ (if DoDocsToo
+ then (for W in (OPENWINDOWS) when (MEMBER (WINDOWPROP W 'ICONLABEL)
(LIST "DOCUMENTATION"))
- do (CLOSEW W))
- (for B in *ALL-BUTTONS* when (AND (EQ (WINDOWPROP B 'Apps.BUTTON)
+ do (CLOSEW W))
+ (for B in *ALL-BUTTONS* when (AND (EQ (WINDOWPROP B 'Apps.BUTTON)
'DOC)
(MEMBER (BUTTON-LABEL B)
- DOCS-LABELS)) do (DELETE-BUTTON B))
- (SETQ IWS (CONS (Apps.CreateLabel "DOCUMENTATION" (IDIFFERENCE SCREENWIDTH
+ DOCS-LABELS)) do (DELETE-BUTTON B))
+ (SETQ IWS (CONS (Apps.CreateLabel "DOCUMENTATION" (IDIFFERENCE SCREENWIDTH
(IDIFFERENCE
RIGHTMARGINISH 50)
)
(IDIFFERENCE SCREENHEIGHT SECTION1YPOS))
IWS))
- (SETQ BUTTONS (APPEND (for DOC in DOCS
- collect (LET (B)
+ (SETQ BUTTONS (APPEND (for DOC in DOCS
+ collect (LET (B)
(SETQ BUTTONY-DOCS (IPLUS BUTTONY-DOCS
YPOSDELTA))
[SETQ B (CREATE-BUTTON (LIST 'Apps.ShowDoc
(CAR DOC))
(CADR DOC)
- (create POSITION
+ (create POSITION
XCOORD _
(IDIFFERENCE
SCREENWIDTH
@@ -319,30 +324,30 @@
(WINDOWPROP B 'Apps.BUTTON 'DOC)
B))
BUTTONS)))
- [for B in BUTTONS do (COND
+ [for B in BUTTONS do (COND
((WINDOWP B)
(WINDOWPROP B 'RIGHTBUTTONFN 'NILL)
(WINDOWPROP B 'BUTTONEVENTFN (FUNCTION (LAMBDA (BUTTON)
- (if (LASTMOUSESTATE
+ (if (LASTMOUSESTATE
(ONLY LEFT))
- then (EXECUTE-BUTTON
+ then (EXECUTE-BUTTON
BUTTON]
- [for IW in IWS do (COND
+ [for IW in IWS do (COND
((WINDOWP IW)
(WINDOWPROP IW 'RIGHTBUTTONFN 'NILL]
- (for B in BUTTONS when (WINDOWP B) collect B])
+ (for B in BUTTONS when (WINDOWP B) collect B])
-(Apps.CreateLabel
- [LAMBDA (Text CenterX BottomY) (* ; "Edited 5-Dec-2022 16:49 by FGH")
+(Apps.CreateLabel
+ [LAMBDA (Text CenterX BottomY) (* ; "Edited 5-Dec-2022 16:49 by FGH")
(LET* ((DS (DSPCREATE))
(FONT (DSPFONT '(HELVETICA 18 BOLD)
DS))
(SR (STRINGREGION Text DS))
- (BMW (fetch (REGION WIDTH) of SR))
- (BMH (IPLUS (fetch (REGION HEIGHT) of SR)
- (fetch (REGION BOTTOM) of SR)))
+ (BMW (fetch (REGION WIDTH) of SR))
+ (BMH (IPLUS (fetch (REGION HEIGHT) of SR)
+ (fetch (REGION BOTTOM) of SR)))
(BM (BITMAPCREATE BMW BMH))
- (POS (create POSITION
+ (POS (create POSITION
XCOORD _ (IDIFFERENCE CenterX (IQUOTIENT BMW 2))
YCOORD _ BottomY))
IW)
@@ -352,12 +357,12 @@
(WINDOWPROP IW 'ICONLABEL Text)
IW])
-(Apps.ActivateCLOS
+(Apps.ActivateCLOS
[LAMBDA NIL
- (DECLARE (GLOBALVARS BackgroundMenuCommands BackgroundMenu))
- (* ; "Edited 12-Nov-2022 14:41 by FGH")
- (if (NULL (SASSOC "CLOS Browse Class" BackgroundMenuCommands))
- then (PROGN [SETQ BackgroundMenuCommands
+ (DECLARE (GLOBALVARS BackgroundMenuCommands BackgroundMenu))
+ (* ; "Edited 12-Nov-2022 14:41 by FGH")
+ (if (NULL (SASSOC "CLOS Browse Class" BackgroundMenuCommands))
+ then (PROGN [SETQ BackgroundMenuCommands
(APPEND BackgroundMenuCommands
(LIST '("CLOS Browse Class" (CLOS-BROWSER::BROWSE-CLASS)
"Bring up a class browser."
@@ -372,27 +377,27 @@
]
(SETQ BackgroundMenu NIL])
-(Apps.ActivateRooms
+(Apps.ActivateRooms
[LAMBDA (DoNotRefreshButtons)
- (DECLARE (GLOBALVARS BackgroundMenuCommands ROOMS:*SUITE-DIRECTORIES*))
- (* ; "Edited 7-Dec-2022 11:13 by FGH")
- (* ; "Edited 12-Nov-2022 14:56 by FGH")
- (if (NULL (SASSOC "Rooms" BackgroundMenuCommands))
- then (ROOMS:RESET))
- (SETQ ROOMS:*SUITE-DIRECTORIES* (CONS (CONCAT (UNIX-GETENV 'MEDLE_USERDIR)
+ (DECLARE (GLOBALVARS BackgroundMenuCommands ROOMS:*SUITE-DIRECTORIES*))
+ (* ; "Edited 7-Dec-2022 11:13 by FGH")
+ (* ; "Edited 12-Nov-2022 14:56 by FGH")
+ (if (NULL (SASSOC "Rooms" BackgroundMenuCommands))
+ then (ROOMS:RESET))
+ (SETQ ROOMS:*SUITE-DIRECTORIES* (CONS (CONCAT (UNIX-GETENV 'MEDLEY¬USERDIR)
"/suites")
ROOMS:*SUITE-DIRECTORIES*))
(SETQ Apps.RoomsActivated T)
(PROMPTPRINT "
ROOMS functionality is now available via the Background Menu")
- (if (NOT DoNotRefreshButtons)
- then (Apps.CreateButtons])
+ (if (NOT DoNotRefreshButtons)
+ then (Apps.CreateButtons])
-(Apps.ShowDoc
- [LAMBDA (URL) (* ; "Edited 18-Jan-2023 20:26 by FGH")
+(Apps.ShowDoc
+ [LAMBDA (URL) (* ; "Edited 18-Jan-2023 20:26 by FGH")
(ShellBrowse URL])
-(XCL-USER::EXEC_INTERLISP
+(XCL-USER::EXEC¬INTERLISP
[LAMBDA NIL (* ; "Edited 18-Mar-2022 18:53 by fgh")
(PROGN [MAPC (OPENWINDOWS)
(FUNCTION (LAMBDA (W)
@@ -406,10 +411,10 @@
(XCL:SET-DEFAULT-EXEC-TYPE 'INTERLISP)
(XCL:SET-EXEC-TYPE 'INTERLISP])
-(Apps.AroundExitFn
+(Apps.AroundExitFn
[LAMBDA (EVENT)
- (if (MEMB EVENT '(AFTERLOGOUT AFTERSYSOUT AFTERSAVEVM))
- then (Apps.SetUpNOTECARDSDIRECTORIES])
+ (if (MEMB EVENT '(AFTERLOGOUT AFTERSYSOUT AFTERSAVEVM))
+ then (Apps.SetUpNOTECARDSDIRECTORIES])
)
(DECLARE%: DONTEVAL@LOAD DOCOPY
@@ -420,8 +425,8 @@
(BKSYSBUF " ")
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (1184 23227 (Apps.InitNotecards 1194 . 5056) (Apps.SetUpNOTECARDSDIRECTORIES 5058 . 6613
-) (Apps.DoInit 6615 . 10212) (Apps.CreateButtons 10214 . 19123) (Apps.CreateLabel 19125 . 19935) (
-Apps.ActivateCLOS 19937 . 21286) (Apps.ActivateRooms 21288 . 22139) (Apps.ShowDoc 22141 . 22290) (
-XCL-USER::EXEC_INTERLISP 22292 . 23064) (Apps.AroundExitFn 23066 . 23225)))))
+ (FILEMAP (NIL (1153 22792 (Apps.InitNotecards 1163 . 5006) (Apps.SetUpNOTECARDSDIRECTORIES 5008 . 6527
+) (Apps.DoInit 6529 . 10067) (Apps.CreateButtons 10069 . 18820) (Apps.CreateLabel 18822 . 19592) (
+Apps.ActivateCLOS 19594 . 20919) (Apps.ActivateRooms 20921 . 21730) (Apps.ShowDoc 21732 . 21871) (
+XCL-USER::EXEC¬INTERLISP 21873 . 22645) (Apps.AroundExitFn 22647 . 22790)))))
STOP
diff --git a/greetfiles/APPS-INIT.LCOM b/greetfiles/APPS-INIT.LCOM
index bcf9748c..bfde24fd 100644
Binary files a/greetfiles/APPS-INIT.LCOM and b/greetfiles/APPS-INIT.LCOM differ
diff --git a/internal/TEDIT-DEBUG b/internal/TEDIT-DEBUG
index 32b6966f..7b08db5c 100644
--- a/internal/TEDIT-DEBUG
+++ b/internal/TEDIT-DEBUG
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "13-Oct-2025 16:52:28" {WMEDLEY}TEDIT-DEBUG.;175 138298
+(FILECREATED " 7-Feb-2026 17:00:39" {WMEDLEY}TEDIT-DEBUG.;178 138742
:EDIT-BY rmk
- :CHANGES-TO (FNS SP)
+ :CHANGES-TO (FNS TEDIT-DEBUG)
- :PREVIOUS-DATE "29-Jul-2025 11:42:21" {WMEDLEY}TEDIT-DEBUG.;174)
+ :PREVIOUS-DATE " 7-Feb-2026 10:41:45" {WMEDLEY}TEDIT-DEBUG.;177)
(PRETTYCOMPRINT TEDIT-DEBUGCOMS)
@@ -540,7 +540,8 @@
(RETURN PC])
(SL
- [LAMBDA (FIRSTLINE LASTLINE PANE TOBJ OFILE) (* ; "Edited 17-Apr-2025 13:36 by rmk")
+ [LAMBDA (FIRSTLINE LASTLINE PANE TOBJ OFILE) (* ; "Edited 9-Jan-2026 11:12 by rmk")
+ (* ; "Edited 17-Apr-2025 13:36 by rmk")
(* ; "Edited 15-Apr-2025 13:57 by rmk")
(* ; "Edited 11-Apr-2025 12:15 by rmk")
(* ; "Edited 29-Mar-2025 20:27 by rmk")
@@ -580,6 +581,7 @@
(SETQ PANE (pop LINES))
(SETQ PNO (pop LINES))
(DEBUGOUTPUT (DEBUGOUTPUT.STREAM OFILE WTYPE TITLE NIL '(TERMINAL 8))
+ (RESETSAVE (LINELENGTH MAX.SMALLP OFILE))
(PRINTOUT OFILE .FONT '(TERMINAL 8)
"Pane " PNO " = " PANE T)
(PRINTOUT OFILE .FONT '(TERMINAL 8)
@@ -805,7 +807,8 @@
else (RETURN OUTFILE))))])
(SHOWLINE
- [LAMBDA (LINE FILE TEXTOBJ) (* ; "Edited 20-Nov-2024 00:31 by rmk")
+ [LAMBDA (LINE FILE TEXTOBJ) (* ; "Edited 9-Jan-2026 11:09 by rmk")
+ (* ; "Edited 20-Nov-2024 00:31 by rmk")
(* ; "Edited 17-Nov-2024 15:56 by rmk")
(* ; "Edited 9-Nov-2024 10:37 by rmk")
(* ; "Edited 1-Sep-2024 16:49 by rmk")
@@ -836,7 +839,7 @@
"*"
" ")
.FONT
- '(TERMINAL 6)
+ '(TERMINAL 8)
" ")
(if (GETLD LINE LDUMMY)
then (PRINTOUT FILE -8 (CL:IF (GETLD LINE LDUMMY)
@@ -2480,7 +2483,8 @@
(DEFINEQ
(TEDIT-DEBUG
- [LAMBDA (DONTOVERLOAD) (* ; "Edited 9-Aug-2024 13:20 by rmk")
+ [LAMBDA (DONTOVERLOAD) (* ; "Edited 7-Feb-2026 17:00 by rmk")
+ (* ; "Edited 9-Aug-2024 13:20 by rmk")
(* ; "Edited 16-Jul-2024 12:37 by rmk")
(* ; "Edited 6-Jul-2024 21:16 by rmk")
(* ; "Edited 10-Jun-2024 14:21 by rmk")
@@ -2493,6 +2497,7 @@
(* ; "Edited 3-Dec-2023 21:00 by rmk")
(* ; "Edited 29-Nov-2023 10:49 by rmk")
(* ; "Edited 24-Nov-2023 12:53 by rmk")
+ (DRIBBLE "TEDIT-DEBUG.DRIBBLE")
(CL:WHEN (DIRECTORYNAMEP (MEDLEYDIR "../oldtedit/"))
(PSEUDOHOST 'OT (MEDLEYDIR "../oldtedit/")))
(FILESLOAD (NOERROR FROM LOADUPS)
@@ -2511,7 +2516,8 @@
(FILESLOAD (NOERROR)
{OT}OTWHEREIS)
(PRINTOUT T T "Connected to " (PSEUDOFILENAME (MEDLEYDIR "library/tedit"))
- T])
+ T)
+ (DRIBBLE])
)
(DEFINEQ
@@ -2579,33 +2585,33 @@
(ADDTOVAR LAMA )
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (5115 7674 (GTO 5125 . 5375) (GTS 5377 . 7148) (GTW 7150 . 7306) (GSEL 7308 . 7672)) (
-7707 8828 (TEST.TEMPLATE 7717 . 8826)) (8829 9764 (TESTACTION 8839 . 9762)) (9789 23604 (IPC 9799 .
-11303) (ILINES 11305 . 13846) (ISEL 13848 . 14459) (ITS 14461 . 16185) (IPANES 16187 . 16422) (ITL
-16424 . 16843) (IHIST 16845 . 19507) (IPCTB 19509 . 19935) (IMB 19937 . 20696) (ICL 20698 . 21399) (
-IPL 21401 . 21941) (ICARET 21943 . 22470) (INSPECTPIECES 22472 . 23602)) (23626 52365 (SP 23636 .
-28751) (SL 28753 . 32588) (SSP 32590 . 34292) (SPF 34294 . 36824) (SLF 36826 . 45959) (SHOWLINE 45961
- . 49523) (SLL 49525 . 50272) (STBYTES 50274 . 52000) (SSEL 52002 . 52363)) (52366 64879 (STL 52376 .
-61377) (CLEARTHISLINE 61379 . 61859) (CHARSLOTP 61861 . 63180) (\TLVALIDATE 63182 . 64877)) (64880
-70253 (NTHPIECE 64890 . 66022) (NPIECES 66024 . 66889) (NTHPIECECHAR 66891 . 68199) (SELPIECE 68201 .
-68643) (PIECENUM 68645 . 69364) (PCBYTES 69366 . 70251)) (70254 72728 (FILEBYTES 70264 . 71688) (
-TFILEBYTES 71690 . 72726)) (72729 74051 (TRELMOVE 72739 . 72982) (TSCROLL 72984 . 73150) (TSCROLL*
-73152 . 74049)) (74052 77101 (TRY 74062 . 75331) (TEDITCLOSEW 75333 . 75676) (PARALASTWITHOUTEOL 75678
- . 76563) (FIXPARALAST 76565 . 77099)) (77102 91989 (SPPRINT 77112 . 83937) (SPPRINT.CHAR 83939 .
-84923) (SPPRINT.OBJ 84925 . 87983) (SHOWPIECEBYTES 87985 . 89541) (CHECKPLENGTHS 89543 . 90000) (SBT
-90002 . 91139) (COPYPCHAIN 91141 . 91987)) (91990 94051 (POSLINE 92000 . 94049)) (94052 94935 (
-PRESPLIT 94062 . 94933)) (94936 96649 (ALLTL 94946 . 96199) (NTHCHARSLOT 96201 . 96647)) (96675 106888
- (PLCHAIN 96685 . 97213) (PRINTLINE 97215 . 100205) (SL.GETLINES 100207 . 103500) (CHECKLINES 103502
- . 104482) (COLLECTLINES 104484 . 104736) (NTHLINE 104738 . 105743) (HEIGHT 105745 . 106033) (LINEBOTS
- 106035 . 106886)) (106889 109337 (IPC.DECODEARGS 106899 . 109335)) (109338 109931 (SPF1 109348 .
-109929)) (109960 112338 (SLF.FATPLEN 109970 . 110829) (FILEPIECE 110831 . 112336)) (112371 113139 (
-SELTEDIT 112381 . 113137)) (113209 118821 (PPARA 113219 . 113641) (PRUN 113643 . 115119) (
-ADDLINEPOSITIONS 115121 . 116548) (SBR 116550 . 117204) (SBC 117206 . 118819)) (118878 120654 (OLDWI
-118888 . 119263) (COMP 119265 . 119460) (DFR 119462 . 120652)) (120655 121688 (DFGV 120665 . 121191) (
-GDIRECTORIES 121193 . 121686)) (121689 128254 (TTEST 121699 . 126231) (LTEST 126233 . 127598) (THC
-127600 . 128252)) (128568 129260 (SHOWSAFE 128578 . 129258)) (129313 129760 (MYH 129323 . 129758)) (
-130005 131100 (DFVENUE 130015 . 130894) (VSEE 130896 . 131098)) (131101 131555 (PTT 131111 . 131553))
-(131914 133495 (DEBUGOUTPUT.STREAM 131924 . 133493)) (133496 135812 (TEDIT-DEBUG 133506 . 135810)) (
-135813 136305 (HEXTOHILO 135823 . 136163) (CW 136165 . 136303)) (136306 138042 (TRENAME 136316 .
-138040)))))
+ (FILEMAP (NIL (5124 7683 (GTO 5134 . 5384) (GTS 5386 . 7157) (GTW 7159 . 7315) (GSEL 7317 . 7681)) (
+7716 8837 (TEST.TEMPLATE 7726 . 8835)) (8838 9773 (TESTACTION 8848 . 9771)) (9798 23613 (IPC 9808 .
+11312) (ILINES 11314 . 13855) (ISEL 13857 . 14468) (ITS 14470 . 16194) (IPANES 16196 . 16431) (ITL
+16433 . 16852) (IHIST 16854 . 19516) (IPCTB 19518 . 19944) (IMB 19946 . 20705) (ICL 20707 . 21408) (
+IPL 21410 . 21950) (ICARET 21952 . 22479) (INSPECTPIECES 22481 . 23611)) (23635 52650 (SP 23645 .
+28760) (SL 28762 . 32764) (SSP 32766 . 34468) (SPF 34470 . 37000) (SLF 37002 . 46135) (SHOWLINE 46137
+ . 49808) (SLL 49810 . 50557) (STBYTES 50559 . 52285) (SSEL 52287 . 52648)) (52651 65164 (STL 52661 .
+61662) (CLEARTHISLINE 61664 . 62144) (CHARSLOTP 62146 . 63465) (\TLVALIDATE 63467 . 65162)) (65165
+70538 (NTHPIECE 65175 . 66307) (NPIECES 66309 . 67174) (NTHPIECECHAR 67176 . 68484) (SELPIECE 68486 .
+68928) (PIECENUM 68930 . 69649) (PCBYTES 69651 . 70536)) (70539 73013 (FILEBYTES 70549 . 71973) (
+TFILEBYTES 71975 . 73011)) (73014 74336 (TRELMOVE 73024 . 73267) (TSCROLL 73269 . 73435) (TSCROLL*
+73437 . 74334)) (74337 77386 (TRY 74347 . 75616) (TEDITCLOSEW 75618 . 75961) (PARALASTWITHOUTEOL 75963
+ . 76848) (FIXPARALAST 76850 . 77384)) (77387 92274 (SPPRINT 77397 . 84222) (SPPRINT.CHAR 84224 .
+85208) (SPPRINT.OBJ 85210 . 88268) (SHOWPIECEBYTES 88270 . 89826) (CHECKPLENGTHS 89828 . 90285) (SBT
+90287 . 91424) (COPYPCHAIN 91426 . 92272)) (92275 94336 (POSLINE 92285 . 94334)) (94337 95220 (
+PRESPLIT 94347 . 95218)) (95221 96934 (ALLTL 95231 . 96484) (NTHCHARSLOT 96486 . 96932)) (96960 107173
+ (PLCHAIN 96970 . 97498) (PRINTLINE 97500 . 100490) (SL.GETLINES 100492 . 103785) (CHECKLINES 103787
+ . 104767) (COLLECTLINES 104769 . 105021) (NTHLINE 105023 . 106028) (HEIGHT 106030 . 106318) (LINEBOTS
+ 106320 . 107171)) (107174 109622 (IPC.DECODEARGS 107184 . 109620)) (109623 110216 (SPF1 109633 .
+110214)) (110245 112623 (SLF.FATPLEN 110255 . 111114) (FILEPIECE 111116 . 112621)) (112656 113424 (
+SELTEDIT 112666 . 113422)) (113494 119106 (PPARA 113504 . 113926) (PRUN 113928 . 115404) (
+ADDLINEPOSITIONS 115406 . 116833) (SBR 116835 . 117489) (SBC 117491 . 119104)) (119163 120939 (OLDWI
+119173 . 119548) (COMP 119550 . 119745) (DFR 119747 . 120937)) (120940 121973 (DFGV 120950 . 121476) (
+GDIRECTORIES 121478 . 121971)) (121974 128539 (TTEST 121984 . 126516) (LTEST 126518 . 127883) (THC
+127885 . 128537)) (128853 129545 (SHOWSAFE 128863 . 129543)) (129598 130045 (MYH 129608 . 130043)) (
+130290 131385 (DFVENUE 130300 . 131179) (VSEE 131181 . 131383)) (131386 131840 (PTT 131396 . 131838))
+(132199 133780 (DEBUGOUTPUT.STREAM 132209 . 133778)) (133781 136256 (TEDIT-DEBUG 133791 . 136254)) (
+136257 136749 (HEXTOHILO 136267 . 136607) (CW 136609 . 136747)) (136750 138486 (TRENAME 136760 .
+138484)))))
STOP
diff --git a/internal/TEDIT-DEBUG.LCOM b/internal/TEDIT-DEBUG.LCOM
index f3afda41..7b7aa101 100644
Binary files a/internal/TEDIT-DEBUG.LCOM and b/internal/TEDIT-DEBUG.LCOM differ
diff --git a/internal/loadups/LOADUP-APPS b/internal/loadups/LOADUP-APPS
index ec4cde71..3e8cd112 100644
--- a/internal/loadups/LOADUP-APPS
+++ b/internal/loadups/LOADUP-APPS
@@ -1,13 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED " 9-Mar-2025 20:03:27" {DSK}frank>il>medley>internal>loadups>LOADUP-APPS.;10 3274
+(FILECREATED " 1-Feb-2026 13:45:36" {WMEDLEY}loadups>LOADUP-APPS.;3 3343
- :EDIT-BY "frank"
+ :EDIT-BY rmk
:CHANGES-TO (FNS LOADUP-APPS)
- :PREVIOUS-DATE " 9-Mar-2025 19:42:36" {DSK}frank>il>medley>internal>loadups>LOADUP-APPS.;8
-)
+ :PREVIOUS-DATE " 9-Mar-2025 20:03:27" {WMEDLEY}loadups>LOADUP-APPS.;2)
(PRETTYCOMPRINT LOADUP-APPSCOMS)
@@ -21,7 +20,8 @@
(DEFINEQ
(LOADUP-APPS
- [LAMBDA NIL (* ; "Edited 9-Mar-2025 20:02 by frank")
+ [LAMBDA NIL (* ; "Edited 1-Feb-2026 13:45 by rmk")
+ (* ; "Edited 9-Mar-2025 20:02 by frank")
(* ; "Edited 2-Jan-2025 20:38 by lmm")
(* ; "Edited 2-Jan-2025 06:30 by larry")
@@ -46,7 +46,7 @@
"/system"))
NOTECARDS))
(Apps.RemoveBackgroundMenuItem 'NoteCards) (* ; "")
- (PUTASSOC 'NOTECARDS (LIST (UNIX-GETENV 'NOTECARDS_COMMIT_ID))
+ (PUTASSOC 'NOTECARDS (LIST (UNIX-GETENV 'NOTECARDS¬COMMIT¬ID))
SYSOUTCOMMITS)
(* ;; "======================")
@@ -78,7 +78,7 @@
(* ;; "")
- (PUTASSOC 'MEDLEY (LIST (UNIX-GETENV 'LOADUP_COMMIT_ID))
+ (PUTASSOC 'MEDLEY (LIST (UNIX-GETENV 'LOADUP¬COMMIT¬ID))
SYSOUTCOMMITS)
(PRINTOUT T "commits-- " SYSOUTCOMMITS T])
@@ -95,5 +95,5 @@
Apps.SBG])
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (656 3251 (LOADUP-APPS 666 . 2579) (Apps.RemoveBackgroundMenuItem 2581 . 3249)))))
+ (FILEMAP (NIL (616 3320 (LOADUP-APPS 626 . 2648) (Apps.RemoveBackgroundMenuItem 2650 . 3318)))))
STOP
diff --git a/internal/loadups/LOADUP-APPS.LCOM b/internal/loadups/LOADUP-APPS.LCOM
index 54800c0d..a35022b5 100644
Binary files a/internal/loadups/LOADUP-APPS.LCOM and b/internal/loadups/LOADUP-APPS.LCOM differ
diff --git a/internal/loadups/LOADUP-FULL b/internal/loadups/LOADUP-FULL
index 037dd5cd..f6289eff 100644
--- a/internal/loadups/LOADUP-FULL
+++ b/internal/loadups/LOADUP-FULL
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "28-Dec-2025 12:06:12" {WMEDLEY}loadups>LOADUP-FULL.;35 5759
+(FILECREATED "14-Feb-2026 00:42:39" {WMEDLEY}loadups>LOADUP-FULL.;38 5967
:EDIT-BY rmk
:CHANGES-TO (FNS LOADUP-FULL)
- :PREVIOUS-DATE "20-Sep-2025 14:18:19" {WMEDLEY}loadups>LOADUP-FULL.;34)
+ :PREVIOUS-DATE "13-Feb-2026 00:47:52" {WMEDLEY}loadups>LOADUP-FULL.;37)
(PRETTYCOMPRINT LOADUP-FULLCOMS)
@@ -47,7 +47,9 @@
(PRINTOUT T "FULL fonts loaded" T])
(LOADUP-FULL
- [LAMBDA (DRIBBLEFILE) (* ; "Edited 28-Dec-2025 12:06 by rmk")
+ [LAMBDA (DRIBBLEFILE) (* ; "Edited 14-Feb-2026 00:42 by rmk")
+ (* ; "Edited 5-Feb-2026 10:26 by rmk")
+ (* ; "Edited 28-Dec-2025 12:06 by rmk")
(* ; "Edited 1-Sep-2025 11:59 by rmk")
(* ; "Edited 18-Aug-2025 12:09 by rmk")
(* ; "Edited 21-Jun-2025 23:33 by rmk")
@@ -77,16 +79,16 @@
(DIRECTORYNAME T)
T T) (* ; "For FONTSAVAILABLE lookup")
(LOADUP '(POSTSCRIPTSTREAM)) (* ; " to get PSCFONT.READFONT")
- (LOADFULLFONTS)
(LISTPUT IDLE.PROFILE 'TIMEOUT 0)
(SETQQ *DEFAULT-CLEANUP-COMPILER* BCOMPL)
(* ;; "RMK: 2025: PRESS was after CHAT")
(LOADUP '(CHAT INTERPRESS TEDIT HRULE TEDIT-CHAT READNUMBER EDITBITMAP FILEBROWSER THINFILES
- GRAPHER SPY WHERE-IS COPYFILES MSANALYZE MSPARSE MASTERSCOPE UNIXPRINT ISO8859IO
- HELPSYS DINFO CLIPBOARD MODERNIZE WHEELSCROLL PRETTYFILEINDEX WHO-LINE UNIXCOMM
- UNIXCHAT UNIXYCD))
+ GRAPHER SPY WHERE-IS COPYFILES MSANALYZE MSPARSE MASTERSCOPE UNIXPRINT HELPSYS
+ DINFO CLIPBOARD MODERNIZE WHEELSCROLL PRETTYFILEINDEX WHO-LINE UNIXCOMM UNIXCHAT
+ UNIXYCD))
+ (LOADFULLFONTS)
(COND
((WINDOWP *WHO-LINE*)
(CLOSEW *WHO-LINE*)))
@@ -101,5 +103,5 @@
(FIXMETA)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (456 5721 (LOADFULLFONTS 466 . 2601) (LOADUP-FULL 2603 . 5471) (FIXMETA 5473 . 5719)))))
+ (FILEMAP (NIL (456 5929 (LOADFULLFONTS 466 . 2601) (LOADUP-FULL 2603 . 5679) (FIXMETA 5681 . 5927)))))
STOP
diff --git a/internal/loadups/LOADUP-FULL.LCOM b/internal/loadups/LOADUP-FULL.LCOM
index 4b6d5511..b6d976e2 100644
Binary files a/internal/loadups/LOADUP-FULL.LCOM and b/internal/loadups/LOADUP-FULL.LCOM differ
diff --git a/internal/loadups/LOADUP-LISP b/internal/loadups/LOADUP-LISP
index 8eaa2a18..9d7dca17 100644
--- a/internal/loadups/LOADUP-LISP
+++ b/internal/loadups/LOADUP-LISP
@@ -1,13 +1,14 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "XCL" BASE 10)
-(FILECREATED " 3-Feb-2026 11:59:42"
-|{DSK}briggs>Projects>medley>internal>loadups>LOADUP-LISP.;12| 7475
+(FILECREATED "26-Mar-2026 18:38:22"
+|{DSK}briggs>Projects>medley>internal>loadups>LOADUP-LISP.;14| 7604
- :EDIT-BY |nhb|
+ :EDIT-BY "briggs"
:CHANGES-TO (FNS LOADUP-LISP)
- :PREVIOUS-DATE "28-Jan-2026 14:30:48" |{DSK}new-LOADUP-LISP.;1|)
+ :PREVIOUS-DATE "22-Feb-2026 14:15:31"
+|{DSK}briggs>Projects>medley>internal>loadups>LOADUP-LISP.;13|)
(PRETTYCOMPRINT LOADUP-LISPCOMS)
@@ -20,7 +21,8 @@
(DEFINEQ
(LOADUP-LISP
- (LAMBDA (DRIBBLEFILE) (* \; "Edited 3-Feb-2026 11:59 by nhb")
+ (LAMBDA (DRIBBLEFILE) (* \; "Edited 26-Mar-2026 18:38 by briggs")
+ (* \; "Edited 22-Feb-2026 14:15 by rmk")
(* \; "Edited 28-Jan-2026 14:30 by lmm")
(* \; "Edited 27-Dec-2025 15:02 by rmk")
(* \; "Edited 16-Oct-2025 16:55 by rmk")
@@ -96,9 +98,9 @@
(* |;;| "Also, UNICODE is split into UNICODE-TABLES and UNICODE, so the tables are loaded before their MCCS/Uncode client functions are installed. Functions in UFS now depend on those translations so that filenames can have characters outside of Ascii. ")
- (LOADUP '(UNICODE-TABLES UNICODE CMLPATHNAME HPRINT AARITH ADISPLAY HLDISPLAY FONTPROFILE MENU
- WINDOWOBJ WINDOWSCROLL WINDOW WINDOWICON PAINTW ATTACHEDWINDOW XXGEOM XXFILL
- DEXEC INSPECT DESCRIBE CMLARRAYINSPECTOR EDITINTERFACE TTYIN))
+ (LOADUP '(CMLPATHNAME HPRINT AARITH ADISPLAY HLDISPLAY FONTPROFILE MENU WINDOWOBJ WINDOWSCROLL
+ WINDOW WINDOWICON PAINTW ATTACHEDWINDOW XXGEOM XXFILL DEXEC INSPECT DESCRIBE
+ CMLARRAYINSPECTOR EDITINTERFACE TTYIN))
(LOADUP '(BREAK-AND-TRACE))
(LOADUP '(FASDUMP XCL-COMPILER ADVISE))
@@ -149,5 +151,5 @@
(GLOBALVARS MAKESYSFILENAME MEDLEY-INIT-VARS MEDLEYDIR SYSTEMINITVARS USERRECLST)
)
(DECLARE\: DONTCOPY
- (FILEMAP (NIL (652 7269 (LOADUP-LISP 662 . 7267)))))
+ (FILEMAP (NIL (695 7398 (LOADUP-LISP 705 . 7396)))))
STOP
diff --git a/internal/loadups/LOADUP-LISP.LCOM b/internal/loadups/LOADUP-LISP.LCOM
index e81c7000..2bbfe60e 100644
Binary files a/internal/loadups/LOADUP-LISP.LCOM and b/internal/loadups/LOADUP-LISP.LCOM differ
diff --git a/internal/loadups/man-page/loadup.1 b/internal/loadups/man-page/loadup.1
index d31156d8..4702ca50 100644
--- a/internal/loadups/man-page/loadup.1
+++ b/internal/loadups/man-page/loadup.1
@@ -111,11 +111,11 @@ output directory called \f[I]gitinfo\f[R] which contains the git commit,
git branch and git status information for the directory at the time the
loadup is run.
.PP
-Only one instance (per ) of loadup can be run at a time.
+Only one instance (per ) of loadup can be run at a time.
There is lock file to prevent simultaneous loadups in the work directory
(named \f[B]\f[BI]lock\f[B]\f[R]) that can be manually removed.
-The lock can also be automatically overridden (see the \[en]override
-flag below).
+The lock can also be automatically overridden (see the --override flag
+below).
Alternatively, if a lock is encountered at run time, the user will be
asked to choose whether to override or simply exit the loadup.
.PP
@@ -130,7 +130,7 @@ But Medley can be installed in multiple places on any given machine and
hence MEDLEYDIR is computed on each invocation of loadup.
.SH OPTIONS
.TP
-\f[B]-z [+], --man [+], -man [+], -h [+], \[en]help [+]\f[R]
+\f[B]-z [+], --man [+], -man [+], -h [+], --help [+]\f[R]
Print this manual page on the screen.
If the \f[B]+\f[R] parameter is specified, then no pager is used when
displaying the man page.
@@ -138,7 +138,7 @@ displaying the man page.
\f[B]-t STAGE, --target STAGE, -target STAGE\f[R]
Run the sequential loadup procedure until the STAGE is complete,
starting from the files created by the previously run STAGE specified in
-the \[en]start option.
+the --start option.
.RS
.PP
STAGE can be one of the following:
@@ -175,7 +175,7 @@ Full.sysout is copied into the loadups directory.
.RS
.PP
a, apps, 5: Run the loadup sequence through Stage 5 (apps.sysout).
-Also run the Aux stage as if \[en]aux option had been specified.
+Also run the Aux stage as if --aux option had been specified.
Apps.sysout and the Aux files are copied into the loadups directory.
.RE
.RE
@@ -185,7 +185,7 @@ Apps.sysout and the Aux files are copied into the loadups directory.
a-, apps-, 5-: Run the loadup sequence through Stage 5 (apps.sysout).
The Aux stage is not run unless otherwise specified.
Apps.sysout is copied into the loadups directory.
-Also run the Aux stage as if \[en]aux option had been specified.
+Also run the Aux stage as if --aux option had been specified.
.RE
.RE
.TP
@@ -245,22 +245,22 @@ If this stage complete successfully, these files are copied into
loadups.
.TP
\f[B]-i, --init, -init, -1\f[R]
-Synonym for \[lq]\[en]target init\[rq]
+Synonym for \[lq]--target init\[rq]
.TP
\f[B]-m, --mid, -mid, -2\f[R]
-Synonym for \[lq]\[en]target mid\[rq]
+Synonym for \[lq]--target mid\[rq]
.TP
\f[B]-l, --lisp, -lisp, -3\f[R]
-Synonym for \[lq]\[en]target lisp\[rq]
+Synonym for \[lq]--target lisp\[rq]
.TP
\f[B]-f, --full. -full, -4\f[R]
-Synonym for \[lq]\[en]target full\[rq]
+Synonym for \[lq]--target full\[rq]
.TP
\f[B]-a, --apps, -apps, -5\f[R]
-Synonym for \[lq]\[en]target apps\[rq]
+Synonym for \[lq]--target apps\[rq]
.TP
\f[B]-a-, --apps-, -apps-, -5-\f[R]
-Synonym for \[lq]\[en]target apps\[rq]
+Synonym for \[lq]--target apps\[rq]
.TP
\f[B]-ov, --override, -override\f[R]
Automatically override the lock that prevents two loadups from running
@@ -300,14 +300,14 @@ contained in the working directory.
If the \f[B]+\f[R] parameter is used, then instead of deleting just the
versioned files, all files and subdirectories are deleted except for
those contained in the working directory.
-If \f[B]+\f[R] is used and there is no working directory and
-\f[I]\[en]tag TAG\f[R] is also specified, then the tagged loadups
-directory (/loadups/tagged/TAG) is also deleted.
+If \f[B]+\f[R] is used and there is no working directory and \f[I]--tag
+TAG\f[R] is also specified, then the tagged loadups directory
+(/loadups/tagged/TAG) is also deleted.
.TP
\f[B]-th [+], --thin [+], -thin [+]\f[R]
Equivalent to specifying both -tw [+] and -tl [+].
-If \f[I]\[en]tag TAG\f[R] is also specified and the \f[B]+\f[R]
-parameter is used here, then the tagged loadups directory
+If \f[I]--tag TAG\f[R] is also specified and the \f[B]+\f[R] parameter
+is used here, then the tagged loadups directory
(/loadups/tagged/TAG) is removed.
.TP
\f[B]-d DIR, --maikodir DIR, -maikodir DIR\f[R]
@@ -328,38 +328,36 @@ commonly used in running Medley in the absence of an Xwindows server.
.PP
The defaults for the Options context-dependent and somewhat complicated
due to the goal of maintaining compatibility with legacy loadup scripts.
-All of the following defaults rules hold independent of the
-\[en]maikodir (-d) option.
+All of the following defaults rules hold independent of the --maikodir
+(-d) option.
.IP "1." 3
-If none of \[en]target, \[en]start, \[en]aux, and \[en]db are specified,
-then:
+If none of --target, --start, --aux, and --db are specified, then:
.RS
.PP
1A.
-If neither \[en]thinw nor \[en]thinl are specified, the options default
-to:
+If neither --thinw nor --thinl are specified, the options default to:
.RE
.RS
.RS
.PP
-\f[B]\[en]target full \[en]start 0 \[en]aux\f[R]
+\f[B]--target full --start 0 --aux\f[R]
.RE
.RE
.RS
.PP
1B.
-If either \[en]thinw or \[en]thinl are specified, no loadups are run.
+If either --thinw or --thinl are specified, no loadups are run.
.RE
.IP "2." 3
-If neither \[en]start nor \[en]target are specified but either -aux or
--db or both are, then \[en]start defaults to \f[I]full\f[R] and
-\[en]target is irrelevant.
+If neither --start nor --target are specified but either -aux or -db or
+both are, then --start defaults to \f[I]full\f[R] and --target is
+irrelevant.
.IP "3." 3
-If \[en]start is specified and \[en]target is not, then \[en]target
-defaults to \f[I]full\f[R]
+If --start is specified and --target is not, then --target defaults to
+\f[I]full\f[R]
.IP "4." 3
-If \[en]target is specified and \[en]start is not, then \[en]start
-defaults to \f[I]0\f[R]
+If --target is specified and --start is not, then --start defaults to
+\f[I]0\f[R]
.SH EXAMPLES
.PP
\f[B]./loadup -full -s lisp\f[R] : run loadup thru Stage 4 (full.sysout)
@@ -368,14 +366,14 @@ starting from existing Stage 3 outputs (lisp.sysout).
\f[B]./loadup --target full --start lisp\f[R] : run loadup thru Stage 4
(full.sysout) starting from existing Stage 3 outputs (lisp.sysout).
.PP
-\f[B]./loadup -5 \[en]aux\f[R] : run loadup from the beginning thru
-Stage 5 (apps.sysout) then run the Aux \[lq]stage\[rq] to create
+\f[B]./loadup -5 --aux\f[R] : run loadup from the beginning thru Stage 5
+(apps.sysout) then run the Aux \[lq]stage\[rq] to create
\f[I]whereis.hash\f[R] and \f[I]exports.all\f[R]
.PP
\f[B]./loadup -db\f[R] : just run the DB \[lq]stage\[rq] starting from
an existing full.sysout; do not run any of the sequential stages.
.PP
-\f[B]./loadup \[en]maikodir \[ti]/il/newmaiko\f[R] : run loadup sequence
+\f[B]./loadup --maikodir \[ti]/il/newmaiko\f[R] : run loadup sequence
from beginning to full plus the loadup Aux stage, while using
\f[I]\[ti]/il/newmaiko\f[R] as the location for the lde executables when
running Medley.
diff --git a/internal/loadups/man-page/loadup.1.gz b/internal/loadups/man-page/loadup.1.gz
index 2ae4135e..8500f0a9 100644
Binary files a/internal/loadups/man-page/loadup.1.gz and b/internal/loadups/man-page/loadup.1.gz differ
diff --git a/internal/loadups/man-page/loadup.1.md b/internal/loadups/man-page/loadup.1.md
index 957dad2d..44bfcbc3 100644
--- a/internal/loadups/man-page/loadup.1.md
+++ b/internal/loadups/man-page/loadup.1.md
@@ -52,7 +52,7 @@ Loadup does all of its work in a work directory (\/loadups/build). T
If \ is a git directory, then a file is created in the loadups output directory called *gitinfo* which contains the git commit, git branch and git status information for the directory at the time the loadup is run.
-Only one instance (per \) of loadup can be run at a time. There is lock file to prevent simultaneous loadups in the work directory (named ***lock***) that can be manually removed. The lock can also be automatically overridden (see the --override flag below). Alternatively, if a lock is encountered at run time, the user will be asked to choose whether to override or simply exit the loadup.
+Only one instance (per \) of loadup can be run at a time. There is lock file to prevent simultaneous loadups in the work directory (named ***lock***) that can be manually removed. The lock can also be automatically overridden (see the \-\-override flag below). Alternatively, if a lock is encountered at run time, the user will be asked to choose whether to override or simply exit the loadup.
Note: **MEDLEYDIR** is an environment variable set by the loadup script. It is set to the top level directory of the Medley installation that contains the specific loadup script that
is invoked after all symbolic links are resolved. In the standard global installation this will
@@ -61,12 +61,12 @@ hence MEDLEYDIR is computed on each invocation of loadup.
OPTIONS
=======
-**-z [+], \-\-man [+], \-man [+], -h [+], --help [+]**
+**-z [+], \-\-man [+], \-man [+], -h [+], \-\-help [+]**
: Print this manual page on the screen. If the **+** parameter is specified, then no pager is used when
displaying the man page.
**-t STAGE, \-\-target STAGE, -target STAGE**
-: Run the sequential loadup procedure until the STAGE is complete, starting from the files created by the previously run STAGE specified in the --start option.
+: Run the sequential loadup procedure until the STAGE is complete, starting from the files created by the previously run STAGE specified in the \-\-start option.
>STAGE can be one of the following:
@@ -78,9 +78,9 @@ displaying the man page.
>>f, full, 4: Run the loadup sequence through Stage 4 (full.sysout). Full.sysout is copied into the loadups directory.
->>a, apps, 5: Run the loadup sequence through Stage 5 (apps.sysout). Also run the Aux stage as if --aux option had been specified. Apps.sysout and the Aux files are copied into the loadups directory.
+>>a, apps, 5: Run the loadup sequence through Stage 5 (apps.sysout). Also run the Aux stage as if \-\-aux option had been specified. Apps.sysout and the Aux files are copied into the loadups directory.
->>a-, apps-, 5-: Run the loadup sequence through Stage 5 (apps.sysout). The Aux stage is not run unless otherwise specified. Apps.sysout is copied into the loadups directory. Also run the Aux stage as if --aux option had been specified.
+>>a-, apps-, 5-: Run the loadup sequence through Stage 5 (apps.sysout). The Aux stage is not run unless otherwise specified. Apps.sysout is copied into the loadups directory. Also run the Aux stage as if \-\-aux option had been specified.
**-s STAGE \-\-start STAGE, -start STAGE**
@@ -105,22 +105,22 @@ displaying the man page.
: Run the DB loadup stage, creating the *fuller.database* file. If this stage complete successfully, these files are copied into loadups.
**-i, \-\-init, -init, -1**
-: Synonym for "--target init"
+: Synonym for "\-\-target init"
**-m, \-\-mid, -mid, -2**
-: Synonym for "--target mid"
+: Synonym for "\-\-target mid"
**-l, \-\-lisp, -lisp, -3**
-: Synonym for "--target lisp"
+: Synonym for "\-\-target lisp"
**-f, \-\-full. -full, -4**
-: Synonym for "--target full"
+: Synonym for "\-\-target full"
**-a, \-\-apps, -apps, -5**
-: Synonym for "--target apps"
+: Synonym for "\-\-target apps"
**-a-, \-\-apps-, -apps-, -5-**
-: Synonym for "--target apps"
+: Synonym for "\-\-target apps"
**-ov, \-\-override, -override**
: Automatically override the lock that prevents two loadups from running simultaneously. If this flag is not set and an active lock is encountered, the user will be asked to choose whether to override or exit.
@@ -149,11 +149,11 @@ working directory (and all files and subdirectories it contains) is deleted.
files except for those contained in the working directory.
If the **+** parameter is used, then instead of deleting just the versioned files, all files and
subdirectories are deleted except for those contained in the working directory. If **+** is used and
-there is no working directory and *--tag TAG* is also specified,
+there is no working directory and *\-\-tag TAG* is also specified,
then the tagged loadups directory (\/loadups/tagged/TAG) is also deleted.
**-th [+], \-\-thin [+], -thin [+]**
-: Equivalent to specifying both -tw [+] and -tl [+]. If *--tag TAG* is also specified and
+: Equivalent to specifying both -tw [+] and -tl [+]. If *\-\-tag TAG* is also specified and
the **+** parameter is used here, then the tagged loadups directory (\/loadups/tagged/TAG)
is removed.
@@ -168,21 +168,21 @@ running Medley in the absence of an Xwindows server.
DEFAULTS
====
-The defaults for the Options context-dependent and somewhat complicated due to the goal of maintaining compatibility with legacy loadup scripts. All of the following defaults rules hold independent of the --maikodir (-d) option.
+The defaults for the Options context-dependent and somewhat complicated due to the goal of maintaining compatibility with legacy loadup scripts. All of the following defaults rules hold independent of the \-\-maikodir (-d) option.
-1. If none of --target, --start, --aux, and --db are specified, then:
+1. If none of \-\-target, \-\-start, \-\-aux, and \-\-db are specified, then:
->1A. If neither --thinw nor --thinl are specified, the options default to:
+>1A. If neither \-\-thinw nor \-\-thinl are specified, the options default to:
->> **--target full --start 0 --aux**
+>> **\-\-target full \-\-start 0 \-\-aux**
->1B. If either --thinw or --thinl are specified, no loadups are run.
+>1B. If either \-\-thinw or \-\-thinl are specified, no loadups are run.
-2. If neither --start nor --target are specified but either -aux or -db or both are, then --start defaults to *full* and --target is irrelevant.
+2. If neither \-\-start nor \-\-target are specified but either -aux or -db or both are, then \-\-start defaults to *full* and \-\-target is irrelevant.
-3. If --start is specified and --target is not, then --target defaults to *full*
+3. If \-\-start is specified and \-\-target is not, then \-\-target defaults to *full*
-4. If --target is specified and --start is not, then --start defaults to *0*
+4. If \-\-target is specified and \-\-start is not, then \-\-start defaults to *0*
EXAMPLES
====
@@ -190,11 +190,11 @@ EXAMPLES
**./loadup \-\-target full \-\-start lisp** : run loadup thru Stage 4 (full.sysout) starting from existing Stage 3 outputs (lisp.sysout).
-**./loadup -5 --aux** : run loadup from the beginning thru Stage 5 (apps.sysout) then run the Aux "stage" to create *whereis.hash* and *exports.all*
+**./loadup -5 \-\-aux** : run loadup from the beginning thru Stage 5 (apps.sysout) then run the Aux "stage" to create *whereis.hash* and *exports.all*
**./loadup -db** : just run the DB "stage" starting from an existing full.sysout; do not run any of the sequential stages.
-**./loadup --maikodir ~/il/newmaiko** : run loadup sequence from beginning to full plus the loadup Aux stage, while using *~/il/newmaiko* as the location for the lde executables when running Medley.
+**./loadup \-\-maikodir ~/il/newmaiko** : run loadup sequence from beginning to full plus the loadup Aux stage, while using *~/il/newmaiko* as the location for the lde executables when running Medley.
**./loadup -full** : run loadup sequence from beginning thru full
diff --git a/internal/loadups/man-page/man_loadup.html b/internal/loadups/man-page/man_loadup.html
index 54e80a8f..94868db4 100644
--- a/internal/loadups/man-page/man_loadup.html
+++ b/internal/loadups/man-page/man_loadup.html
@@ -83,11 +83,11 @@ the work directory after the loadup completes.
the loadups output directory called gitinfo which contains the
git commit, git branch and git status information for the directory at
the time the loadup is run.
-Only one instance (per <MEDLEIDIR>) of loadup can be run at a
+
Only one instance (per <MEDLEYDIR>) of loadup can be run at a
time. There is lock file to prevent simultaneous loadups in the work
directory (named lock) that can be manually
removed. The lock can also be automatically overridden (see the
-–override flag below). Alternatively, if a lock is encountered at run
+--override flag below). Alternatively, if a lock is encountered at run
time, the user will be asked to choose whether to override or simply
exit the loadup.
Note: MEDLEYDIR is an environment variable set by
@@ -99,7 +99,8 @@ installed in multiple places on any given machine and hence MEDLEYDIR is
computed on each invocation of loadup.
OPTIONS
-- -z [+], --man [+], -man [+], -h [+], –help [+]
+- -z [+], --man [+], -man [+], -h [+], --help
+[+]
-
Print this manual page on the screen. If the +
parameter is specified, then no pager is used when displaying the man
@@ -109,7 +110,7 @@ page.
-
Run the sequential loadup procedure until the STAGE is complete,
starting from the files created by the previously run STAGE specified in
-the –start option.
+the --start option.
STAGE can be one of the following:
i, init, 1: Run the loadup sequence through Stage 1 (init.dlinit).
@@ -129,13 +130,13 @@ Full.sysout is copied into the loadups directory.
a, apps, 5: Run the loadup sequence through Stage 5 (apps.sysout).
-Also run the Aux stage as if –aux option had been specified. Apps.sysout
-and the Aux files are copied into the loadups directory.
+Also run the Aux stage as if --aux option had been specified.
+Apps.sysout and the Aux files are copied into the loadups directory.
a-, apps-, 5-: Run the loadup sequence through Stage 5 (apps.sysout).
The Aux stage is not run unless otherwise specified. Apps.sysout is
-copied into the loadups directory. Also run the Aux stage as if –aux
+copied into the loadups directory. Also run the Aux stage as if --aux
option had been specified.
@@ -181,27 +182,27 @@ loadups.
- -i, --init, -init, -1
-
-
Synonym for “–target initâ€
+Synonym for “--target initâ€
- -m, --mid, -mid, -2
-
-
Synonym for “–target midâ€
+Synonym for “--target midâ€
- -l, --lisp, -lisp, -3
-
-
Synonym for “–target lispâ€
+Synonym for “--target lispâ€
- -f, --full. -full, -4
-
-
Synonym for “–target fullâ€
+Synonym for “--target fullâ€
- -a, --apps, -apps, -5
-
-
Synonym for “–target appsâ€
+Synonym for “--target appsâ€
- -a-, --apps-, -apps-, -5-
-
-
Synonym for “–target appsâ€
+Synonym for “--target appsâ€
- -ov, --override, -override
-
@@ -245,13 +246,13 @@ contained in the working directory. If the + parameter
is used, then instead of deleting just the versioned files, all files
and subdirectories are deleted except for those contained in the working
directory. If + is used and there is no working
-directory and –tag TAG is also specified, then the tagged
+directory and --tag TAG is also specified, then the tagged
loadups directory (<MEDLEYDIR>/loadups/tagged/TAG) is also
deleted.
- -th [+], --thin [+], -thin [+]
-
-
Equivalent to specifying both -tw [+] and -tl [+]. If –tag
+Equivalent to specifying both -tw [+] and -tl [+]. If --tag
TAG is also specified and the + parameter is used
here, then the tagged loadups directory
(<MEDLEYDIR>/loadups/tagged/TAG) is removed.
@@ -277,24 +278,24 @@ absence of an Xwindows server.
The defaults for the Options context-dependent and somewhat
complicated due to the goal of maintaining compatibility with legacy
loadup scripts. All of the following defaults rules hold independent of
-the –maikodir (-d) option.
+the --maikodir (-d) option.
-If none of –target, –start, –aux, and –db are specified,
+
If none of --target, --start, --aux, and --db are specified,
then:
-1A. If neither –thinw nor –thinl are specified, the options default
+
1A. If neither --thinw nor --thinl are specified, the options default
to:
-–target full –start 0 –aux
+--target full --start 0 --aux
-1B. If either –thinw or –thinl are specified, no loadups are
+
1B. If either --thinw or --thinl are specified, no loadups are
run.
-If neither –start nor –target are specified but either -aux or
--db or both are, then –start defaults to full and –target is
+
If neither --start nor --target are specified but either -aux or
+-db or both are, then --start defaults to full and --target is
irrelevant.
-If –start is specified and –target is not, then –target defaults
-to full
-If –target is specified and –start is not, then –start defaults
-to 0
+If --start is specified and --target is not, then --target
+defaults to full
+If --target is specified and --start is not, then --start
+defaults to 0
EXAMPLES
./loadup -full -s lisp : run loadup thru Stage 4
@@ -302,12 +303,12 @@ to 0
./loadup --target full --start lisp : run loadup
thru Stage 4 (full.sysout) starting from existing Stage 3 outputs
(lisp.sysout).
-./loadup -5 –aux : run loadup from the beginning
+
./loadup -5 --aux : run loadup from the beginning
thru Stage 5 (apps.sysout) then run the Aux “stage†to create
whereis.hash and exports.all
./loadup -db : just run the DB “stage†starting from
an existing full.sysout; do not run any of the sequential stages.
-./loadup –maikodir ~/il/newmaiko : run loadup
+
./loadup --maikodir ~/il/newmaiko : run loadup
sequence from beginning to full plus the loadup Aux stage, while using
~/il/newmaiko as the location for the lde executables when
running Medley.
diff --git a/internal/loadups/starter.sysout b/internal/loadups/starter.sysout
index 19d5b6a4..21543ecf 100644
Binary files a/internal/loadups/starter.sysout and b/internal/loadups/starter.sysout differ
diff --git a/library/CLIPBOARD b/library/CLIPBOARD
index df92fffe..23454b56 100644
--- a/library/CLIPBOARD
+++ b/library/CLIPBOARD
@@ -1,13 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "25-Sep-2025 15:00:01"
-{DSK}kaplan>Local>medley3.5>working-medley>library>CLIPBOARD.;28 8305
+(FILECREATED "23-Feb-2026 12:35:55" {WMEDLEY}CLIPBOARD.;29 8228
:EDIT-BY rmk
- :CHANGES-TO (FNS PUTCLIPBOARD CLIPBOARD-COPY-STREAM)
+ :CHANGES-TO (VARS CLIPBOARDCOMS)
- :PREVIOUS-DATE "21-Apr-2024 09:12:04" {WMEDLEY}CLIPBOARD.;18)
+ :PREVIOUS-DATE "25-Sep-2025 15:00:01" {WMEDLEY}CLIPBOARD.;28)
(PRETTYCOMPRINT CLIPBOARDCOMS)
@@ -18,7 +17,7 @@
CLIPBOARD-PASTE-STREAM)
(FNS SEDIT.COPYTOCLIPBOARD)
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DOCOPY (FILES (SYSLOAD)
- UNIXCOMM UNICODE)
+ UNIXCOMM)
(P (INSTALL-CLIPBOARD)))
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA)
(NLAML)
@@ -148,7 +147,7 @@
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DOCOPY
(FILESLOAD (SYSLOAD)
- UNIXCOMM UNICODE)
+ UNIXCOMM)
(INSTALL-CLIPBOARD)
@@ -162,7 +161,7 @@
(ADDTOVAR LAMA )
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (1167 6486 (INSTALL-CLIPBOARD 1177 . 2504) (GETCLIPBOARD 2506 . 2880) (PUTCLIPBOARD 2882
- . 4306) (PASTEFROMCLIPBOARD 4308 . 5226) (CLIPBOARD-COPY-STREAM 5228 . 5762) (CLIPBOARD-PASTE-STREAM
-5764 . 6484)) (6487 8026 (SEDIT.COPYTOCLIPBOARD 6497 . 8024)))))
+ (FILEMAP (NIL (1098 6417 (INSTALL-CLIPBOARD 1108 . 2435) (GETCLIPBOARD 2437 . 2811) (PUTCLIPBOARD 2813
+ . 4237) (PASTEFROMCLIPBOARD 4239 . 5157) (CLIPBOARD-COPY-STREAM 5159 . 5693) (CLIPBOARD-PASTE-STREAM
+5695 . 6415)) (6418 7957 (SEDIT.COPYTOCLIPBOARD 6428 . 7955)))))
STOP
diff --git a/library/CLIPBOARD.LCOM b/library/CLIPBOARD.LCOM
index b077be28..a883c160 100644
Binary files a/library/CLIPBOARD.LCOM and b/library/CLIPBOARD.LCOM differ
diff --git a/library/MASTERSCOPE b/library/MASTERSCOPE
index a6006ac2..4fc6d972 100644
--- a/library/MASTERSCOPE
+++ b/library/MASTERSCOPE
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "24-Aug-2025 13:45:51" {WMEDLEY}MASTERSCOPE.;30 197199
+(FILECREATED "16-Feb-2026 13:34:31" {WMEDLEY}MASTERSCOPE.;41 197959
:EDIT-BY rmk
- :CHANGES-TO (FNS MSINTERPRET)
+ :CHANGES-TO (FNS MSOUTPUT)
- :PREVIOUS-DATE " 5-Apr-2025 11:49:04" {WMEDLEY}MASTERSCOPE.;29)
+ :PREVIOUS-DATE " 8-Feb-2026 22:38:50" {WMEDLEY}MASTERSCOPE.;40)
(PRETTYCOMPRINT MASTERSCOPECOMS)
@@ -847,34 +847,25 @@
(T (CDR (FASSOC Y MSDATABASELST])
(MSSTOREDATA
- [LAMBDA (FNNAME FNDATA) (* lmm " 1-JUN-81 23:19")
+ [LAMBDA (FNNAME FNDATA) (* ; "Edited 8-Feb-2026 18:42 by lmm")
+ (* lmm " 1-JUN-81 23:19")
(PROG [NEWREL (KWN (PARSERELATION 'KNOWN]
- (SETQ MSDBEMPTY NIL)
-
- (* Database for FNNAME about to become inconsistant -
- mark it as changed)
-
+ (SETQ MSDBEMPTY NIL) (* Database for FNNAME about to become
+ inconsistant -
+ mark it as changed)
(PUTHASH FNNAME T MSCHANGEDARRAY)
-
- (* * Now update the database)
+
+ (* * Now update the database)
(for TAB in MSDATABASELST when (AND (NOT (FMEMB (CAR TAB)
- NODUMPRELATIONS))
- (NEQ (CDDR TAB)
- T)) do (SETQ NEWREL
- (MSCOLLECTDATA
- (CAR TAB)))
- (STORETABLE FNNAME TAB
- NEWREL))
+ NODUMPRELATIONS))
+ (NEQ (CDDR TAB)
+ T)) do (SETQ NEWREL (MSCOLLECTDATA (CAR TAB)))
+ (STORETABLE FNNAME TAB NEWREL))
[OR (TESTRELATION FNNAME KWN)
- (PUTTABLE FNNAME T (CADR (FASSOC 'NOBIND MSDATABASELST]
-
- (* Table NOBIND is for those functions which don't do very much.
- The idea is that the test that a function has been analyzed is whether it
- binds variables are calls functions, etc.
- However, for those functions which have no such entries,
- (e.g. their definition is (LAMBDA NIL NIL)) need to still be able to know
- that they were.)
+ (PUTTABLE FNNAME T (CADR (FASSOC 'UNBOUND MSDATABASELST]
+
+ (* ;; "Table UNBOUND is for those functions which don't do very much. The idea is that the test that a function has been analyzed is whether it binds variables are calls functions, etc. However, for those functions which have no such entries, (e.g. their definition is (LAMBDA NIL NIL)) need to still be able to know that they were.")
(PUTHASH FNNAME NIL MSCHANGEDARRAY])
@@ -911,7 +902,7 @@
((CALL 25 . 50)
(BIND 10 . 10)
[NLAMBDA 10 . 10]
- (NOBIND 10)
+ (UNBOUND 10)
(RECORD 20 . 10)
(CREATE 2 . 2)
(FETCH 10 . 10)
@@ -1120,9 +1111,10 @@
(DEFINEQ
(MSVBTABLES
- [LAMBDA (VERB MOD) (* ; "Edited 30-Jun-87 10:32 by jrb:")
-
- (* ;; "The call to MSUSERVBTABLES checks a user hash table to allow extensions.")
+ [LAMBDA (VERB MOD) (* ; "Edited 8-Feb-2026 18:44 by lmm")
+ (* ; "Edited 30-Jun-87 10:32 by jrb:")
+
+ (* ;; "The call to MSUSERVBTABLES checks a user hash table to allow extensions.")
[COND
((LISTP VERB)
@@ -1159,10 +1151,10 @@
(IS (SELECTQ MOD
(FIELDS '((FETCH)
(REPLACE)))
- (FNS '(CALL NOBIND REF (CALL)
+ (FNS '(CALL UNBOUND REF (CALL)
(APPLY)))
- (KNOWN '(CALL NOBIND REF))
- (NIL '(CALL NOBIND REF (CALL)
+ (KNOWN '(CALL UNBOUND REF))
+ (NIL '(CALL UNBOUND REF (CALL)
(BIND)
(REFFREE)
(REF)
@@ -1192,7 +1184,7 @@
(TYPE '((0)))
NIL))
(KNOWN (SELECTQ MOD
- (NIL '(CALL NOBIND REF))
+ (NIL '(CALL UNBOUND REF))
NIL))
(PROG (SELECTQ MOD
(NIL 'PROG)
@@ -1258,23 +1250,20 @@
(DEFINEQ
(BUILDGETRELQ
- [LAMBDA (X) (* ; "Edited 16-Jun-87 12:36 by jrb:")
-
+ [LAMBDA (X) (* ; "Edited 8-Feb-2026 19:24 by lmm")
+ (* ; "Edited 16-Jun-87 12:36 by jrb:")
(PROG ([VAR (COND
((LITATOM (CADR X))
(CADR X))
(T '$$1]
FORM F1)
- [for REL in (MSVBTABLES (CAR X))
- do [SETQ F1 (LIST 'GETTABLE VAR (LIST (COND
- ((CADDR X)
- 'CDDR)
- (T 'CADR))
- (LIST 'FASSOC (KWOTE REL)
- 'MSDATABASELST]
- (SETQ FORM (COND
- (FORM (LIST 'UNION F1 FORM))
- (T F1]
+ [for REL in (MSVBTABLES (CAR X)) do [SETQ F1 `(GETTABLE ,VAR (,(CL:IF (CL:THIRD X)
+ 'CDDR
+ 'CADR)
+ (FASSOC ',REL MSDATABASELST]
+ (SETQ FORM (COND
+ (FORM (LIST 'UNION F1 FORM))
+ (T F1]
(RETURN (COND
((EQ VAR (CADR X))
FORM)
@@ -2577,7 +2566,7 @@
(* ; "interactive routines")
-(RPAQ MASTERSCOPEDATE "24-Aug-2025")
+(RPAQ MASTERSCOPEDATE "16-Feb-2026")
(ADDTOVAR HISTORYCOMS %.)
(DEFINEQ
@@ -2616,15 +2605,14 @@
(GO ERLP])
(MASTERSCOPEXEC
- [LAMBDA (X LINE) (* ; "Edited 17-Jun-87 16:57 by jrb:")
- (* Called via the LISPX in
- MASTERSCOPE)
+ [LAMBDA (X LINE) (* ; "Edited 8-Feb-2026 18:46 by lmm")
+ (* ; "Edited 17-Jun-87 16:57 by jrb:")
+ (* Called via the LISPX in MASTERSCOPE)
(* ;
- "Merged from smL Loops Masterscope by JRB")
-
+ "Merged from smL Loops Masterscope by JRB")
(PROG (MASTERSCOPECOMMAND)
(AND [OR [COND
- ((NULL LINE) (* Single entry on line)
+ ((NULL LINE) (* ; "Single entry on line")
(OR (NOT (LITATOM X))
(OR (NEQ (EVALV X)
'NOBIND)
@@ -2633,17 +2621,14 @@
(FGETD X)
(LISTP LINE)
(OR [COND
- ((NULL (CDR LINE)) (* "EDITF ] " OR SETQ
- (A B) TYPE ENTRY)
+ ((NULL (CDR LINE)) (* ;
+ "'EDITF ] ' OR SETQ (A B) TYPE ENTRY")
(OR (NULL (CAR LINE))
(LISTP (CAR LINE]
(EQ (ARGTYPE X)
3]
- (RETURN))
-
- (* If MASTERSCOPEXEC returns NIL, then LISPX will handle the event as a
- normal typin)
-
+ (RETURN)) (* ;
+ "If MASTERSCOPEXEC returns NIL, then LISPX will handle the event as a normal typin")
(SETQ MASTERSCOPECOMMAND (CONS X LINE))
(SELECTQ (CAR MASTERSCOPECOMMAND)
((OK STOP BYE ok stop)
@@ -2651,11 +2636,8 @@
NIL)
LISPXVALUE
[AND (LISTP LISPXHIST)
- (FRPLACA LISPXHIST (CONS '%. (CAR LISPXHIST]
-
- (* Make sure the event shows up with a %.
- in it)
-
+ (FRPLACA LISPXHIST (CONS '%. (CAR LISPXHIST] (* ;
+ "Make sure the event shows up with a . in it")
(SETQ LISPXVALUE (MSINTERPRET MASTERSCOPECOMMAND))
(RETURN T])
)
@@ -3516,13 +3498,17 @@
(ERROR!])
(MSOUTPUT
- [LAMBDA (FILE) (* ; "Edited 5-Apr-2025 11:48 by rmk")
+ [LAMBDA (FILE) (* ; "Edited 16-Feb-2026 13:34 by rmk")
+ (* ; "Edited 5-Feb-2026 01:01 by rmk")
+ (* ; "Edited 18-Nov-2025 14:01 by rmk")
+ (* ; "Edited 8-Nov-2025 23:21 by rmk")
+ (* ; "Edited 5-Apr-2025 11:48 by rmk")
(* ; "Edited 14-Jul-2024 08:41 by rmk")
(* ; "Edited 5-Jul-2024 11:54 by rmk")
(* ; "Edited 12-Jun-90 20:43 by teruuchi")
(LET ((LLENGTH FILELINELENGTH))
[COND
- ((AND (LITATOM FILE)
+ [(AND (LITATOM FILE)
(MEMB (U-CASE FILE)
'(TEDIT :TEDIT))
(GETD (FUNCTION TEDIT)))
@@ -3530,12 +3516,14 @@
(* ;;
"If no TEDIT, leave the current OUTPUT. The readtable for seprs etc is the current readtable.")
- [SETQ FILE (TEXTSTREAM (TEDIT NIL 'Masterscope NIL `(LEAVETTY T TITLE Masterscope FONT
- ,DEFAULTFONT BOUNDTABLE
- ,(TEDIT.ATOMBOUND.READTABLE]
+ [SETQ FILE (OPENTEXTSTREAM NIL NIL `(FONT ,DEFAULTFONT BOUNDTABLE ,(
+ TEDIT.ATOMBOUND.READTABLE
+ ]
(SETQ LLENGTH T)
- (TEDIT.DEFER.UPDATES FILE '(READONLY QUIET))
- (RESETSAVE NIL (LIST 'CLOSEF FILE)))
+ (RESETSAVE NIL `(PROGN (CL:UNLESS RESETSTATE
+ (TEDIT ,FILE 'Masterscope NIL
+ '(TITLE Masterscope READONLY QUIET LEAVETTY T)))
+ (CLOSEF? ,FILE]
((OPENP FILE 'OUTPUT))
(T (SETQ FILE (OPENSTREAM FILE 'OUTPUT))
(RESETSAVE NIL (LIST 'CLOSEF FILE]
@@ -3742,36 +3730,36 @@
(ADDTOVAR LAMA MSEDITE MSEDITF)
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (3263 19510 (UPDATEFN 3273 . 4890) (MSGETDEF 4892 . 6298) (MSNOTICEFILE 6300 . 8693) (
-MSSHOWUSE 8695 . 14676) (MSUPDATEFN1 14678 . 15366) (MSUPDATE 15368 . 17794) (MSNLAMBDACHECK 17796 .
-18678) (MSCOLLECTDATA 18680 . 19508)) (19511 20410 (UPDATECHANGED 19521 . 19884) (UPDATECHANGED1 19886
- . 20408)) (20984 21407 (MSCLOSEFILES 20994 . 21405)) (22088 26520 (MSDESCRIBE 22098 . 24886) (
-MSDESCRIBE1 24888 . 25951) (FMAPRINT 25953 . 26518)) (26613 27053 (MSPRINTHELPFILE 26623 . 27051)) (
-27103 30241 (TEMPLATE 27113 . 28534) (GETTEMPLATE 28536 . 28671) (SETTEMPLATE 28673 . 30239)) (31111
-36035 (ADDTEMPLATEWORD 31121 . 31793) (MSADDANALYZE 31795 . 33293) (MSADDMODIFIER 33295 . 34376) (
-MSADDRELATION 34378 . 35125) (MSADDTYPE 35127 . 36033)) (37536 42757 (MSMARKCHANGE1 37546 . 38340) (
-MSINIT 38342 . 39523) (GETVERBTABLES 39525 . 40078) (MSSTOREDATA 40080 . 41759) (STORETABLE 41761 .
-42755)) (44158 49228 (PARSERELATION 44168 . 44768) (PARSERELATION1 44770 . 46225) (GETRELATION 46227
- . 47256) (MAPRELATION 47258 . 48392) (TESTRELATION 48394 . 49226)) (49229 50869 (ADDHASH 49239 .
-49717) (SUBHASH 49719 . 49947) (MAKEHASH 49949 . 50093) (MSREHASH 50095 . 50548) (EQMEMBHASH 50550 .
-50867)) (51208 57423 (MSVBTABLES 51218 . 56997) (MSUSERVBTABLES 56999 . 57421)) (57506 59717 (
-BUILDGETRELQ 57516 . 58622) (BUILDTESTRELQ 58624 . 59715)) (59888 60276 (MSERASE 59898 . 60274)) (
-60277 64737 (DUMPDATABASE 60287 . 62852) (DUMPDATABASE1 62854 . 63199) (READATABASE 63201 . 64735)) (
-65819 94878 (MSCHECKBLOCKS 65829 . 69649) (MSCHECKBLOCK 69651 . 78271) (MSCHECKFNINBLOCK 78273 . 81273
-) (MSCHECKBLOCKBASIC 81275 . 83695) (MSCHECKBOUNDFREE 83697 . 85596) (GLOBALVARP 85598 . 85765) (
-PRINTERROR 85767 . 88983) (MSCHECKVARS1 88985 . 91938) (UNECCSPEC 91940 . 92218) (NECCSPEC 92220 .
-92567) (SPECVARP 92569 . 93096) (SHORTLST 93098 . 93554) (DOERROR 93556 . 94266) (MSMSGPRINT 94268 .
-94876)) (96022 110850 (MSPATHS 96032 . 99434) (MSPATHS1 99436 . 103671) (MSPATHS2 103673 . 107083) (
-MSONPATH 107085 . 108313) (MSPATHS4 108315 . 109397) (DASHES 109399 . 109925) (DOTABS 109927 . 110168)
- (BELOWMARKER 110170 . 110633) (MSPATHSPRINTFN 110635 . 110848)) (111236 114660 (MSFIND 111246 .
-111521) (MSEDITF 111523 . 112523) (MSEDITE 112525 . 113562) (EDITGETDEF 113564 . 114658)) (115602
-124203 (MSMARKCHANGED 115612 . 117336) (CHANGEMACRO 117338 . 118043) (CHANGEVAR 118045 . 118361) (
-CHANGEI.S. 118363 . 119696) (CHANGERECORD 119698 . 120569) (MSNEEDUNSAVE 120571 . 121563) (UNSAVEFNS
-121565 . 124201)) (124636 128126 (%. 124646 . 124786) (MASTERSCOPE 124788 . 125314) (MASTERSCOPE1
-125316 . 126184) (MASTERSCOPEXEC 126186 . 128124)) (128165 167815 (MSINTERPRETSET 128175 . 156709) (
-MSINTERPA 156711 . 157245) (MSGETBLOCKDEC 157247 . 159760) (LISTHARD 159762 . 160980) (MSMEMBSET
-160982 . 161127) (MSLISTSET 161129 . 161494) (MSHASHLIST 161496 . 161663) (MSHASHLIST1 161665 . 161991
-) (CHECKPATHS 161993 . 162633) (ONFILE 162635 . 167813)) (167816 191377 (MSINTERPRET 167826 . 183881)
-(VERBNOTICELIST 183883 . 184993) (MSOUTPUT 184995 . 186505) (MSCHECKEMPTY 186507 . 187711) (
-CHECKFORCHANGED 187713 . 188233) (MSSOLVE 188235 . 191375)))))
+ (FILEMAP (NIL (3260 19507 (UPDATEFN 3270 . 4887) (MSGETDEF 4889 . 6295) (MSNOTICEFILE 6297 . 8690) (
+MSSHOWUSE 8692 . 14673) (MSUPDATEFN1 14675 . 15363) (MSUPDATE 15365 . 17791) (MSNLAMBDACHECK 17793 .
+18675) (MSCOLLECTDATA 18677 . 19505)) (19508 20407 (UPDATECHANGED 19518 . 19881) (UPDATECHANGED1 19883
+ . 20405)) (20981 21404 (MSCLOSEFILES 20991 . 21402)) (22085 26517 (MSDESCRIBE 22095 . 24883) (
+MSDESCRIBE1 24885 . 25948) (FMAPRINT 25950 . 26515)) (26610 27050 (MSPRINTHELPFILE 26620 . 27048)) (
+27100 30238 (TEMPLATE 27110 . 28531) (GETTEMPLATE 28533 . 28668) (SETTEMPLATE 28670 . 30236)) (31108
+36032 (ADDTEMPLATEWORD 31118 . 31790) (MSADDANALYZE 31792 . 33290) (MSADDMODIFIER 33292 . 34373) (
+MSADDRELATION 34375 . 35122) (MSADDTYPE 35124 . 36030)) (37533 42629 (MSMARKCHANGE1 37543 . 38337) (
+MSINIT 38339 . 39520) (GETVERBTABLES 39522 . 40075) (MSSTOREDATA 40077 . 41631) (STORETABLE 41633 .
+42627)) (44031 49101 (PARSERELATION 44041 . 44641) (PARSERELATION1 44643 . 46098) (GETRELATION 46100
+ . 47129) (MAPRELATION 47131 . 48265) (TESTRELATION 48267 . 49099)) (49102 50742 (ADDHASH 49112 .
+49590) (SUBHASH 49592 . 49820) (MAKEHASH 49822 . 49966) (MSREHASH 49968 . 50421) (EQMEMBHASH 50423 .
+50740)) (51081 57397 (MSVBTABLES 51091 . 56971) (MSUSERVBTABLES 56973 . 57395)) (57480 59783 (
+BUILDGETRELQ 57490 . 58688) (BUILDTESTRELQ 58690 . 59781)) (59954 60342 (MSERASE 59964 . 60340)) (
+60343 64803 (DUMPDATABASE 60353 . 62918) (DUMPDATABASE1 62920 . 63265) (READATABASE 63267 . 64801)) (
+65885 94944 (MSCHECKBLOCKS 65895 . 69715) (MSCHECKBLOCK 69717 . 78337) (MSCHECKFNINBLOCK 78339 . 81339
+) (MSCHECKBLOCKBASIC 81341 . 83761) (MSCHECKBOUNDFREE 83763 . 85662) (GLOBALVARP 85664 . 85831) (
+PRINTERROR 85833 . 89049) (MSCHECKVARS1 89051 . 92004) (UNECCSPEC 92006 . 92284) (NECCSPEC 92286 .
+92633) (SPECVARP 92635 . 93162) (SHORTLST 93164 . 93620) (DOERROR 93622 . 94332) (MSMSGPRINT 94334 .
+94942)) (96088 110916 (MSPATHS 96098 . 99500) (MSPATHS1 99502 . 103737) (MSPATHS2 103739 . 107149) (
+MSONPATH 107151 . 108379) (MSPATHS4 108381 . 109463) (DASHES 109465 . 109991) (DOTABS 109993 . 110234)
+ (BELOWMARKER 110236 . 110699) (MSPATHSPRINTFN 110701 . 110914)) (111302 114726 (MSFIND 111312 .
+111587) (MSEDITF 111589 . 112589) (MSEDITE 112591 . 113628) (EDITGETDEF 113630 . 114724)) (115668
+124269 (MSMARKCHANGED 115678 . 117402) (CHANGEMACRO 117404 . 118109) (CHANGEVAR 118111 . 118427) (
+CHANGEI.S. 118429 . 119762) (CHANGERECORD 119764 . 120635) (MSNEEDUNSAVE 120637 . 121629) (UNSAVEFNS
+121631 . 124267)) (124702 128312 (%. 124712 . 124852) (MASTERSCOPE 124854 . 125380) (MASTERSCOPE1
+125382 . 126250) (MASTERSCOPEXEC 126252 . 128310)) (128351 168001 (MSINTERPRETSET 128361 . 156895) (
+MSINTERPA 156897 . 157431) (MSGETBLOCKDEC 157433 . 159946) (LISTHARD 159948 . 161166) (MSMEMBSET
+161168 . 161313) (MSLISTSET 161315 . 161680) (MSHASHLIST 161682 . 161849) (MSHASHLIST1 161851 . 162177
+) (CHECKPATHS 162179 . 162819) (ONFILE 162821 . 167999)) (168002 192137 (MSINTERPRET 168012 . 184067)
+(VERBNOTICELIST 184069 . 185179) (MSOUTPUT 185181 . 187265) (MSCHECKEMPTY 187267 . 188471) (
+CHECKFORCHANGED 188473 . 188993) (MSSOLVE 188995 . 192135)))))
STOP
diff --git a/library/MASTERSCOPE.DFASL b/library/MASTERSCOPE.DFASL
index 585c6b98..590dfb79 100644
Binary files a/library/MASTERSCOPE.DFASL and b/library/MASTERSCOPE.DFASL differ
diff --git a/library/POSTSCRIPTSTREAM b/library/POSTSCRIPTSTREAM
index dc945efb..c715c964 100644
--- a/library/POSTSCRIPTSTREAM
+++ b/library/POSTSCRIPTSTREAM
@@ -1,13 +1,13 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "27-Jan-2026 17:57:49" {DSK}matt>Interlisp>medley>library>POSTSCRIPTSTREAM.;4 258423
+(FILECREATED "12-Feb-2026 12:19:03" {DSK}matt>Interlisp>medley>library>POSTSCRIPTSTREAM.;6 258522
:EDIT-BY "mth"
- :CHANGES-TO (FNS POSTSCRIPT.STARTPAGE)
+ :CHANGES-TO (FNS PSCFONT.READFONT)
- :PREVIOUS-DATE "27-Jan-2026 13:15:17"
-{DSK}matt>Interlisp>medley>library>POSTSCRIPTSTREAM.;3)
+ :PREVIOUS-DATE "27-Jan-2026 17:57:49"
+{DSK}matt>Interlisp>medley>library>POSTSCRIPTSTREAM.;5)
(PRETTYCOMPRINT POSTSCRIPTSTREAMCOMS)
@@ -574,22 +574,24 @@
(DEFINEQ
(PSCFONT.READFONT
- [LAMBDA (FONTFILENAME) (* ; "Edited 5-Oct-93 17:19 by rmk:")
- (* ; "Edited 1-Sep-89 10:55 by jds")
+ [LAMBDA (FONTFILENAME) (* ; "Edited 12-Feb-2026 12:01 by mth")
+ (* ; "Edited 5-Oct-93 17:19 by rmk:")
+ (* ; "Edited 1-Sep-89 10:55 by jds")
- (* ;; "Read one of Matt Heffron's .PSC files, to get postscript font metrics. First check to see if incore cache as information indexed under the file's name.")
+ (* ;; "Read one of Matt Heffron's .PSC files, to get postscript font metrics. First check to see if incore cache has information indexed under the file's name.")
(LET (FID W [S (OPENSTREAM FONTFILENAME 'INPUT NIL '((SEQUENTIAL T]
- (PF (create PSCFONT)))
+ (PF (create PSCFONT))
+ (*PACKAGE* (CL:FIND-PACKAGE "INTERLISP")))
[replace (PSCFONT FID) of PF with (SETQ FID (READ S (FIND-READTABLE "INTERLISP"]
- (* ;; "Read until we hit a 255 byte, marking the end of the font-id section.")
+ (* ;; "Read until we hit a 255 byte, marking the end of the font-id section.")
(CL:DO NIL
((EQ (BIN S)
255))
- (* ;; "Body of the loop is empty, the test does all of the work")
+ (* ;; "Body of the loop is empty, the test does all of the work")
)
(replace (PSCFONT IL-FONTID) of PF with (CAR FID))
@@ -601,13 +603,12 @@
(for C from 0 to 255 do (SETA W C (\WIN S)))
(CLOSEF S)
- (* ;;
- "PATCH JDS 9/1/89: The afm font reader made fonts too tall. This should fix things pro tem.")
+ (* ;;
+ "PATCH JDS 9/1/89: The afm font reader made fonts too tall. This should fix things pro tem.")
- (replace (PSCFONT ASCENT) of PF with (- 1000 (fetch (PSCFONT DESCENT)
- OF PF)))
+ (replace (PSCFONT ASCENT) of PF with (- 1000 (fetch (PSCFONT DESCENT) OF PF)))
(PUSH POSTSCRIPTFONTCACHE (CONS (L-CASE (FILENAMEFIELD FONTFILENAME 'NAME))
- (CREATE PSCFONT USING PF)))
+ (CREATE PSCFONT USING PF)))
PF])
(PSCFONT.SPELLFILE
@@ -4392,37 +4393,37 @@
(ADDTOVAR LAMA POSTSCRIPT.PUTCOMMAND)
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (22370 32689 (POSTSCRIPT.INIT 22380 . 29295) (POSTSCRIPT.PUTRGBCOLOR 29297 . 30319) (
-\PSC.COLOR.TO.RGB 30321 . 32687)) (33675 69097 (PSCFONT.READFONT 33685 . 35593) (PSCFONT.SPELLFILE
-35595 . 36408) (PSCFONT.COERCEFILE 36410 . 37982) (PSCFONTFROMCACHE.SPELLFILE 37984 . 38969) (
-PSCFONTFROMCACHE.COERCEFILE 38971 . 40623) (PSCFONT.WRITEFONT 40625 . 41640) (READ-AFM-FILE 41642 .
-47513) (CONVERT-AFM-FILES 47515 . 48727) (POSTSCRIPT.GETFONTID 48729 . 50124) (POSTSCRIPT.FONTCREATE
-50126 . 63020) (\POSTSCRIPT.SPECIALFONT.SCALEDWIDTHS 63022 . 65419) (POSTSCRIPT.FONTSAVAILABLE 65421
- . 67708) (POSTSCRIPT.FONTEXISTS? 67710 . 69095)) (69098 79007 (OPENPOSTSCRIPTSTREAM 69108 . 78673) (
-CLOSEPOSTSCRIPTSTREAM 78675 . 79005)) (79052 85378 (POSTSCRIPT.HARDCOPYW 79062 . 82169) (
-POSTSCRIPT.TEDIT 82171 . 82623) (POSTSCRIPTFILEP 82625 . 84113) (MAKEEPSFILE 84115 . 85376)) (85379
-129123 (POSTSCRIPT.BITMAPSCALE 85389 . 87845) (POSTSCRIPT.CLOSESTRING 87847 . 88400) (
-POSTSCRIPT.ENDPAGE 88402 . 89293) (POSTSCRIPT.OUTSTR 89295 . 90512) (POSTSCRIPT.PUTBITMAPBYTES 90514
- . 98985) (POSTSCRIPT.PUTCOMMAND 98987 . 99976) (POSTSCRIPT.SET-FAKE-LANDSCAPE 99978 . 104498) (
-POSTSCRIPT.SHOWACCUM 104500 . 106655) (POSTSCRIPT.STARTPAGE 106657 . 109359) (\POSTSCRIPTTAB 109361 .
-110158) (\PS.BOUTFIXP 110160 . 111440) (\PS.SCALEHACK 111442 . 114085) (\PS.SCALEREGION 114087 .
-114647) (\SCALEDBITBLT.PSC 114649 . 118959) (\SETPOS.PSC 118961 . 119442) (\SETXFORM.PSC 119444 .
-122028) (\STRINGWIDTH.PSC 122030 . 122503) (\SWITCHFONTS.PSC 122505 . 127997) (\TERPRI.PSC 127999 .
-129121)) (129158 183014 (\BITBLT.PSC 129168 . 129720) (\BLTSHADE.PSC 129722 . 134383) (\CHARWIDTH.PSC
-134385 . 134892) (\CREATECHARSET.PSC 134894 . 136250) (\DRAWARC.PSC 136252 . 138630) (\DRAWCIRCLE.PSC
-138632 . 140883) (\DRAWCURVE.PSC 140885 . 144729) (\DRAWELLIPSE.PSC 144731 . 147095) (\DRAWLINE.PSC
-147097 . 149837) (\DRAWPOINT.PSC 149839 . 150415) (\DRAWPOLYGON.PSC 150417 . 153546) (
-\DSPBOTTOMMARGIN.PSC 153548 . 154235) (\DSPCLIPPINGREGION.PSC 154237 . 155612) (\DSPCOLOR.PSC 155614
- . 156545) (\DSPFONT.PSC 156547 . 160184) (\DSPLEFTMARGIN.PSC 160186 . 160872) (\DSPLINEFEED.PSC
-160874 . 161464) (\DSPPUSHSTATE.PSC 161466 . 162926) (\DSPPOPSTATE.PSC 162928 . 166413) (\DSPRESET.PSC
- 166415 . 167080) (\DSPRIGHTMARGIN.PSC 167082 . 167771) (\DSPROTATE.PSC 167773 . 168772) (
-\DSPSCALE.PSC 168774 . 169726) (\DSPSCALE2.PSC 169728 . 170568) (\DSPSPACEFACTOR.PSC 170570 . 171491)
-(\DSPTOPMARGIN.PSC 171493 . 172064) (\DSPTRANSLATE.PSC 172066 . 174097) (\DSPXPOSITION.PSC 174099 .
-174663) (\DSPYPOSITION.PSC 174665 . 175256) (\FILLCIRCLE.PSC 175258 . 177483) (\FILLPOLYGON.PSC 177485
- . 180722) (\FIXLINELENGTH.PSC 180724 . 182043) (\MOVETO.PSC 182045 . 182815) (\NEWPAGE.PSC 182817 .
-183012)) (183070 205216 (\POSTSCRIPT.CHANGECHARSET 183080 . 183798) (\POSTSCRIPT.OUTCHARFN 183800 .
-196070) (\POSTSCRIPT.PRINTSLUG 196072 . 197796) (\POSTSCRIPT.SPECIALOUTCHARFN 197798 . 200149) (
-\UPDATE.PSC 200151 . 201397) (\POSTSCRIPT.ACCENTFN 201399 . 202341) (\POSTSCRIPT.ACCENTPAIR 202343 .
-205214)) (205314 206959 (\PSC.SPACEDISP 205324 . 205603) (\PSC.SPACEWID 205605 . 206224) (\PSC.SYMBOLS
- 206226 . 206957)) (207068 210059 (\POSTSCRIPT.NSHASH 207078 . 210057)))))
+ (FILEMAP (NIL (22366 32685 (POSTSCRIPT.INIT 22376 . 29291) (POSTSCRIPT.PUTRGBCOLOR 29293 . 30315) (
+\PSC.COLOR.TO.RGB 30317 . 32683)) (33671 69196 (PSCFONT.READFONT 33681 . 35692) (PSCFONT.SPELLFILE
+35694 . 36507) (PSCFONT.COERCEFILE 36509 . 38081) (PSCFONTFROMCACHE.SPELLFILE 38083 . 39068) (
+PSCFONTFROMCACHE.COERCEFILE 39070 . 40722) (PSCFONT.WRITEFONT 40724 . 41739) (READ-AFM-FILE 41741 .
+47612) (CONVERT-AFM-FILES 47614 . 48826) (POSTSCRIPT.GETFONTID 48828 . 50223) (POSTSCRIPT.FONTCREATE
+50225 . 63119) (\POSTSCRIPT.SPECIALFONT.SCALEDWIDTHS 63121 . 65518) (POSTSCRIPT.FONTSAVAILABLE 65520
+ . 67807) (POSTSCRIPT.FONTEXISTS? 67809 . 69194)) (69197 79106 (OPENPOSTSCRIPTSTREAM 69207 . 78772) (
+CLOSEPOSTSCRIPTSTREAM 78774 . 79104)) (79151 85477 (POSTSCRIPT.HARDCOPYW 79161 . 82268) (
+POSTSCRIPT.TEDIT 82270 . 82722) (POSTSCRIPTFILEP 82724 . 84212) (MAKEEPSFILE 84214 . 85475)) (85478
+129222 (POSTSCRIPT.BITMAPSCALE 85488 . 87944) (POSTSCRIPT.CLOSESTRING 87946 . 88499) (
+POSTSCRIPT.ENDPAGE 88501 . 89392) (POSTSCRIPT.OUTSTR 89394 . 90611) (POSTSCRIPT.PUTBITMAPBYTES 90613
+ . 99084) (POSTSCRIPT.PUTCOMMAND 99086 . 100075) (POSTSCRIPT.SET-FAKE-LANDSCAPE 100077 . 104597) (
+POSTSCRIPT.SHOWACCUM 104599 . 106754) (POSTSCRIPT.STARTPAGE 106756 . 109458) (\POSTSCRIPTTAB 109460 .
+110257) (\PS.BOUTFIXP 110259 . 111539) (\PS.SCALEHACK 111541 . 114184) (\PS.SCALEREGION 114186 .
+114746) (\SCALEDBITBLT.PSC 114748 . 119058) (\SETPOS.PSC 119060 . 119541) (\SETXFORM.PSC 119543 .
+122127) (\STRINGWIDTH.PSC 122129 . 122602) (\SWITCHFONTS.PSC 122604 . 128096) (\TERPRI.PSC 128098 .
+129220)) (129257 183113 (\BITBLT.PSC 129267 . 129819) (\BLTSHADE.PSC 129821 . 134482) (\CHARWIDTH.PSC
+134484 . 134991) (\CREATECHARSET.PSC 134993 . 136349) (\DRAWARC.PSC 136351 . 138729) (\DRAWCIRCLE.PSC
+138731 . 140982) (\DRAWCURVE.PSC 140984 . 144828) (\DRAWELLIPSE.PSC 144830 . 147194) (\DRAWLINE.PSC
+147196 . 149936) (\DRAWPOINT.PSC 149938 . 150514) (\DRAWPOLYGON.PSC 150516 . 153645) (
+\DSPBOTTOMMARGIN.PSC 153647 . 154334) (\DSPCLIPPINGREGION.PSC 154336 . 155711) (\DSPCOLOR.PSC 155713
+ . 156644) (\DSPFONT.PSC 156646 . 160283) (\DSPLEFTMARGIN.PSC 160285 . 160971) (\DSPLINEFEED.PSC
+160973 . 161563) (\DSPPUSHSTATE.PSC 161565 . 163025) (\DSPPOPSTATE.PSC 163027 . 166512) (\DSPRESET.PSC
+ 166514 . 167179) (\DSPRIGHTMARGIN.PSC 167181 . 167870) (\DSPROTATE.PSC 167872 . 168871) (
+\DSPSCALE.PSC 168873 . 169825) (\DSPSCALE2.PSC 169827 . 170667) (\DSPSPACEFACTOR.PSC 170669 . 171590)
+(\DSPTOPMARGIN.PSC 171592 . 172163) (\DSPTRANSLATE.PSC 172165 . 174196) (\DSPXPOSITION.PSC 174198 .
+174762) (\DSPYPOSITION.PSC 174764 . 175355) (\FILLCIRCLE.PSC 175357 . 177582) (\FILLPOLYGON.PSC 177584
+ . 180821) (\FIXLINELENGTH.PSC 180823 . 182142) (\MOVETO.PSC 182144 . 182914) (\NEWPAGE.PSC 182916 .
+183111)) (183169 205315 (\POSTSCRIPT.CHANGECHARSET 183179 . 183897) (\POSTSCRIPT.OUTCHARFN 183899 .
+196169) (\POSTSCRIPT.PRINTSLUG 196171 . 197895) (\POSTSCRIPT.SPECIALOUTCHARFN 197897 . 200248) (
+\UPDATE.PSC 200250 . 201496) (\POSTSCRIPT.ACCENTFN 201498 . 202440) (\POSTSCRIPT.ACCENTPAIR 202442 .
+205313)) (205413 207058 (\PSC.SPACEDISP 205423 . 205702) (\PSC.SPACEWID 205704 . 206323) (\PSC.SYMBOLS
+ 206325 . 207056)) (207167 210158 (\POSTSCRIPT.NSHASH 207177 . 210156)))))
STOP
diff --git a/library/POSTSCRIPTSTREAM.LCOM b/library/POSTSCRIPTSTREAM.LCOM
index 74ceb4d1..1778b1df 100644
Binary files a/library/POSTSCRIPTSTREAM.LCOM and b/library/POSTSCRIPTSTREAM.LCOM differ
diff --git a/library/UNICODE b/library/UNICODE
deleted file mode 100644
index cf86b540..00000000
--- a/library/UNICODE
+++ /dev/null
@@ -1,1503 +0,0 @@
-(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-
-(FILECREATED "23-Oct-2025 08:31:21" {WMEDLEY}UNICODE.;211 82245
-
- :EDIT-BY rmk
-
- :CHANGES-TO (FNS UTOMCODE UTF8.INCCODEFN UTOMCODE? UTF8.PEEKCCODEFN)
- (VARS UNICODECOMS)
- (MACROS UNICODE.SMALLP)
-
- :PREVIOUS-DATE "22-Oct-2025 23:28:51" {WMEDLEY}UNICODE.;210)
-
-
-(PRETTYCOMPRINT UNICODECOMS)
-
-(RPAQQ UNICODECOMS
- (
- (* ;; "Unicode external formats and MCCS-to-Unicode mapping functions. Must be loaded after UNICODE-TABLES.")
-
- (COMS (* ; "External formats")
- (FNS UTF8.OUTCHARFN UTF8.SLUG.OUTCHARFN UTF8.INCCODEFN UTF8.PEEKCCODEFN
- \UTF8.BACKCCODEFN)
- (FNS UTF16BE.OUTCHARFN UTF16BE.INCCODEFN UTF16BE.PEEKCCODEFN \UTF16BE.BACKCCODEFN)
- (FNS UTF16LE.OUTCHARFN UTF16LE.INCCODEFN UTF16LE.PEEKCCODEFN \UTF16LE.BACKCCODEFN)
- (FNS READBOM WRITEBOM)
- (INITVARS (EXTERNALEOL 'LF))
- (FNS MAKE-UNICODE-FORMATS)
- (P (MAKE-UNICODE-FORMATS EXTERNALEOL))
- (ADDVARS (*DEFAULT-EXTERNALFORMATS* (UNIX :UTF-8)))
- (FNS UTF8.BINCODE \UTF8.FETCHCODE)
- (FNS UTF8.VALIDATE NUTF8-BYTE1-BYTES NUTF8-CODE-BYTES NUTF8-STRING-BYTES N-MCHARS)
- (DECLARE%: EVAL@COMPILE DONTCOPY (MACROS UNICODE.TRANSLATE \UTF8.GETBASEBYTE
- UNICODE.SMALLP)))
-
- (* ;; "")
-
-
- (* ;; "These come after the translation tables have been loaded, since the Unix file names needed to read the mapping files depend on the UTF8 string coercions. Those functions are defined as EVQ in UFS, cannot be used until the tables exist. This assumes that previous files have only 7-bit MCCS characters in their names.")
-
- (FNS MTOUCODE UTOMCODE MTOUCODE? UTOMCODE? MTOUSTRING UTOMSTRING MTOUTF8STRING UTF8TOMSTRING)
- (FNS XTOUCODE UTOXCODE XTOUCODE? UTOXCODE? XTOUSTRING UTOXSTRING XTOUTF8STRING)
-
- (* ;; "")
-
- (COMS (* ; "Write Unicode mapping files")
- (FNS WRITE-UNICODE-MAPPING WRITE-UNICODE-INCLUDED WRITE-UNICODE-MAPPING-HEADER
- WRITE-UNICODE-MAPPING-FILENAME)
- (FNS XCCS-UTF8-AFTER-OPEN)
-
- (* ;; "Automate dumping of a documentation prefix")
-
- [DECLARE%: EVAL@COMPILE DONTCOPY (CONSTANTS (MISSINGCODE (CL:PARSE-INTEGER "FFFE"
- :RADIX 16))
- (UNDEFINEDCODE (CL:PARSE-INTEGER "FFFF" :RADIX
- 16]
- (VARS UNICODE-MAPPING-HEADER))
- (FNS UTF8HEXSTRING)
- (COMS (* ; "debugging")
- (FNS SHOWCHARS)
- (DECLARE%: DOEVAL@LOAD DONTCOPY (MACROS HEXCHAR OCTALCHAR)))
- (DECLARE%: EVAL@COMPILE DONTCOPY (FILES (LOADCOMP)
- UNICODE-EXPORTS))
- (PROP (FILETYPE)
- UNICODE)))
-
-
-
-(* ;;
-"Unicode external formats and MCCS-to-Unicode mapping functions. Must be loaded after UNICODE-TABLES."
-)
-
-
-
-
-(* ; "External formats")
-
-(DEFINEQ
-
-(UTF8.OUTCHARFN
- [LAMBDA (STREAM CHARCODE RAW) (* ; "Edited 24-Apr-2025 15:43 by rmk")
- (* ; "Edited 20-Jan-2025 20:45 by rmk")
- (* ; "Edited 31-Jan-2024 00:32 by rmk")
- (* ; "Edited 8-Aug-2021 13:02 by rmk:")
- (* ; "Edited 17-Aug-2020 08:45 by rmk:")
- (* ; "Edited 30-Jan-2020 23:08 by rmk:")
-
- (* ;; "Perhaps the translation table should already do the mapping for EOL to LF, but that seems to be a separate property of the stream. Also, CRLF=2 bytes.")
-
- (* ;; "Print UTF8 sequence for CHARCODE. Do not do MCCS to Unicode translation if RAW.")
-
- (IF (EQ CHARCODE (CHARCODE EOL))
- THEN (FREPLACE (STREAM CHARPOSITION) OF STREAM WITH 0)
- (\BOUTEOL STREAM)
- ELSE (CHANGE (FFETCH (STREAM CHARPOSITION) OF STREAM)
- (IPLUS16 1 DATUM))
- (FOR C INSIDE (CL:IF RAW
- CHARCODE
- (UNICODE.TRANSLATE CHARCODE *MCCSTOUNICODE*))
- DO (IF (ILESSP C 128)
- THEN (\BOUT STREAM C)
- ELSEIF (ILESSP C 2048)
- THEN (* ; "x800")
- (\BOUT STREAM (LOGOR (LLSH 3 6)
- (LRSH C 6)))
- (\BOUT STREAM (LOGOR (LLSH 2 6)
- (LOADBYTE C 0 6)))
- ELSEIF (ILESSP C 65536)
- THEN (* ; "x10000")
- (\BOUT STREAM (LOGOR (LLSH 7 5)
- (LRSH C 12)))
- (\BOUT STREAM (LOGOR (LLSH 2 6)
- (LOADBYTE C 6 6)))
- (\BOUT STREAM (LOGOR (LLSH 2 6)
- (LOADBYTE C 0 6)))
- ELSEIF (ILESSP C 2097152)
- THEN (* ; "x200000")
- (\BOUT STREAM (LOGOR (LLSH 15 4)
- (LRSH C 18)))
- (\BOUT STREAM (LOGOR (LLSH 2 6)
- (LOADBYTE C 12 6)))
- (\BOUT STREAM (LOGOR (LLSH 2 6)
- (LOADBYTE C 6 6)))
- (\BOUT STREAM (LOGOR (LLSH 2 6)
- (LOADBYTE C 0 6)))
- ELSE (ERROR "CHARCODE too big for UTF8" C])
-
-(UTF8.SLUG.OUTCHARFN
- [LAMBDA (STREAM CODE RAW) (* ; "Edited 24-Apr-2025 15:43 by rmk")
- (* ; "Edited 21-Jan-2025 18:37 by rmk")
- (* ; "Edited 14-Jan-2025 12:39 by rmk")
-
- (* ;; "Produces Unicode Representative FFFD as a slug for MCCS unmapped characters")
-
- (UTF8.OUTCHARFN STREAM (OR (CL:IF RAW
- CODE
- (XTOUCODE? CODE))
- (CONSTANT (HEXNUM? "FFFD")))
- T])
-
-(UTF8.INCCODEFN
- [LAMBDA (STREAM COUNTP RAW) (* ; "Edited 23-Oct-2025 08:31 by rmk")
- (* ; "Edited 24-Apr-2025 15:44 by rmk")
- (* ; "Edited 2-Feb-2024 11:44 by rmk")
- (* ; "Edited 30-Jan-2024 22:56 by rmk")
- (* ; "Edited 6-Aug-2021 16:02 by rmk:")
- (* ; "Edited 6-Aug-2020 17:13 by rmk:")
-
- (* ;; "Do not do UNICODE to MCSS translation if RAW.")
-
- (* ;; "Test for smallp because the stream's End-of-file operation may suppress the error")
-
- (DECLARE (USEDFREE *BYTECOUNTER*))
- (LET (BYTE1 BYTE2 BYTE3 BYTE4 CODE (COUNT 1))
- (SETQ BYTE1 (\BIN STREAM))
-
- (* ;; "Distinguish on header bytes (modulo peculiar EOF behavior--the caller will get whatever ended up in BYTE1")
-
- (CL:WHEN (SMALLP BYTE1)
- [SETQ CODE (if (ILEQ BYTE1 127)
- then
- (* ;;
- "Test first: Ascii is the common case. EOL requires its own translation")
-
- (SELCHARQ BYTE1
- (CR (SELECTC (fetch (STREAM EOLCONVENTION) of STREAM)
- (CR.EOLC (* ; "Also eq BYTE1")
- (CHARCODE EOL))
- (CRLF.EOLC (if (EQ (CHARCODE LF)
- (\PEEKBIN STREAM T))
- then (\BIN STREAM)
- (CL:WHEN COUNTP (SETQ COUNT 2))
- (CHARCODE EOL)
- else BYTE1))
- BYTE1))
- (LF (CL:IF (EQ LF.EOLC (fetch (STREAM EOLCONVENTION)
- of STREAM))
- (CHARCODE EOL)
- BYTE1))
- BYTE1)
- elseif (ILEQ BYTE1 223)
- then (* ; "2 bytes")
- (SETQ COUNT 2)
- (SETQ BYTE2 (\BIN STREAM))
- (CL:WHEN (OR (NOT (SMALLP BYTE2))
- (ILESSP BYTE2 128))
- (ERROR "INVALID UTF8 SEQUENCE" (LIST BYTE1 BYTE2)))
- (LOGOR (LLSH (LOADBYTE BYTE1 0 5)
- 6)
- (LOADBYTE BYTE2 0 6))
- elseif (ILEQ BYTE1 239)
- then (* ; "3 bytes")
- (SETQ BYTE2 (\BIN STREAM))
- (CL:WHEN (OR (NOT (SMALLP BYTE2))
- (ILESSP BYTE2 128))
- (ERROR "INVALID UTF8 SEQUENCE" (LIST BYTE1 BYTE2)))
- (SETQ BYTE3 (\BIN STREAM))
- (CL:WHEN (OR (NOT (SMALLP BYTE3))
- (ILESSP BYTE3 128))
- (ERROR "INVALID UTF8 SEQUENCE" (LIST BYTE1 BYTE2 BYTE3)))
- (SETQ COUNT 3)
- (LOGOR (LLSH (LOADBYTE BYTE1 0 4)
- 12)
- (LLSH (LOADBYTE BYTE2 0 6)
- 6)
- (LOADBYTE BYTE3 0 6))
- else (* ; "4 bytes")
- (SETQ BYTE2 (\BIN STREAM))
- (CL:WHEN (OR (NOT (SMALLP BYTE2))
- (ILESSP BYTE2 128))
- (ERROR "INVALID UTF8 SEQUENCE" (LIST BYTE1 BYTE2)))
- (SETQ BYTE3 (\BIN STREAM))
- (CL:WHEN (OR (NOT (SMALLP BYTE3))
- (ILESSP BYTE3 128))
- (ERROR "INVALID UTF8 SEQUENCE" (LIST BYTE1 BYTE2 BYTE3)))
- (SETQ BYTE4 (\BIN STREAM))
- (CL:WHEN (OR (NOT (SMALLP BYTE4))
- (ILESSP BYTE4 128))
- (ERROR "INVALID UTF8 SEQUENCE" (LIST BYTE1 BYTE2 BYTE3 BYTE4)))
- (SETQ COUNT 4)
- (LOGOR (LLSH (LOADBYTE BYTE1 0 3)
- 18)
- (LLSH (LOADBYTE BYTE2 0 6)
- 12)
- (LLSH (LOADBYTE BYTE3 0 6)
- 6)
- (LOADBYTE BYTE4 0 6])
- (CL:UNLESS RAW
- (SETQ CODE (UNICODE.TRANSLATE (UNICODE.SMALLP CODE)
- *UNICODETOMCCS*)))
- (CL:WHEN COUNTP (SETQ *BYTECOUNTER* COUNT))
- CODE])
-
-(UTF8.PEEKCCODEFN
- [LAMBDA (STREAM NOERROR RAW) (* ; "Edited 23-Oct-2025 08:26 by rmk")
- (* ; "Edited 24-Apr-2025 15:44 by rmk")
- (* ; "Edited 2-Feb-2024 11:48 by rmk")
- (* ; "Edited 14-Jun-2021 22:53 by rmk:")
-
- (* ;; "Modeled this after \EUCPEEK on LLREAD. In the multi-byte (non-ASCII) case, backs the file pointer to the beginning by the proper number of \BACKFILEPTRs, and returns a count of 0. Returns NIL if NOERROR and either invalid UTF8 or end of file.")
-
- (* ;; "Could be that the caller takes care of backing up the file position if the number of binned-bytes is returned.")
-
- (* ;; "Do not do UNICODE to MCCS translation if RAW")
-
- (PROG (BYTE1 BYTE2 BYTE3 BYTE4 CODE)
- (SETQ BYTE1 (\PEEKBIN STREAM NOERROR))
-
- (* ;; "Distinguish on header bytex")
-
- (CL:UNLESS BYTE1 (RETURN NIL))
- [if (ILEQ BYTE1 127)
- then
- (* ;;
- "Test first: Ascii is the common case. No need to back up, since we peeked.")
-
- (SETQ CODE BYTE1)
- elseif [ILEQ BYTE1 223 (* ; "2 bytes")
- (BIN STREAM)
- (SETQ BYTE2 (\PEEKBIN STREAM NOERROR))
- (\BACKFILEPTR STREAM)
- (if (AND BYTE2 (IGEQ BYTE2 128))
- then (SETQ CODE (LOGOR (LLSH (LOADBYTE BYTE1 0 5)
- 6)
- (LOADBYTE BYTE2 0 6)))
- elseif NOERROR
- else (ERROR "INVALID UTF8 SEQUENCE" (LIST BYTE1 BYTE2]
- elseif (ILEQ BYTE1 239)
- then (* ; "3 bytes")
- (BIN STREAM)
- (CL:UNLESS (AND (SETQ BYTE2 (\PEEKBIN STREAM NOERROR))
- (IGEQ BYTE2 128))
- (\BACKFILEPTR STREAM)
- (OR NOERROR (ERROR "INVALID UTF8 SEQUENCE" (LIST BYTE1 BYTE2)))
- (RETURN CODE))
- (BIN STREAM)
- (SETQ BYTE3 (\PEEKBIN STREAM NOERROR)) (* ;
- "PEEK the last, no need to back it up")
- (\BACKFILEPTR STREAM)
- (\BACKFILEPTR STREAM)
- (if (AND BYTE3 (IGEQ BYTE3 128))
- then (SETQ CODE (LOGOR (LLSH (LOADBYTE BYTE1 0 4)
- 12)
- (LLSH (LOADBYTE BYTE2 0 6)
- 6)
- (LOADBYTE BYTE3 0 6)))
- elseif NOERROR
- else (ERROR "INVALID UTF8 SEQUENCE" (LIST BYTE1 BYTE2 BYTE3)))
- else (* ; "4 bytes")
- (BIN STREAM)
- (CL:UNLESS (AND (SETQ BYTE2 (\PEEKBIN STREAM NOERROR))
- (IGEQ BYTE2 128))
- (\BACKFILEPTR STREAM)
- (OR NOERROR (ERROR "INVALID UTF8 SEQUENCE" (LIST BYTE1 BYTE2)))
- (RETURN CODE))
- (BIN STREAM)
- (CL:UNLESS (AND (SETQ BYTE3 (\PEEKBIN STREAM NOERROR))
- (IGEQ BYTE3 128))
- (\BACKFILEPTR STREAM)
- (\BACKFILEPTR STREAM)
- (OR NOERROR (ERROR "INVALID UTF8 SEQUENCE" (LIST BYTE1 BYTE2 BYTE3)))
- (RETURN CODE))
- (BIN STREAM)
- (SETQ BYTE4 (\PEEKBIN STREAM NOERROR))
- (\BACKFILEPTR STREAM)
- (\BACKFILEPTR STREAM)
- (\BACKFILEPTR STREAM)
- (if (AND BYTE4 (IGEQ BYTE4 128))
- then (SETQ CODE (LOGOR (LLSH (LOADBYTE BYTE1 0 3)
- 18)
- (LLSH (LOADBYTE BYTE2 0 6)
- 12)
- (LLSH (LOADBYTE BYTE3 0 6)
- 6)
- (LOADBYTE BYTE4 0 6)))
- elseif NOERROR
- else (ERROR "INVALID UTF8 SEQUENCE" (LIST BYTE1 BYTE2 BYTE3 BYTE4]
- (CL:WHEN (AND CODE (NOT RAW))
- (SETQ CODE (UNICODE.TRANSLATE (UNICODE.SMALLP CODE)
- *UNICODETOMCCS*)))
- (RETURN CODE])
-
-(\UTF8.BACKCCODEFN
- [LAMBDA (STREAM COUNTP RAW) (* ; "Edited 19-Jul-2022 15:30 by rmk")
- (* ; "Edited 6-Aug-2021 16:04 by rmk:")
-
- (* ;; "\BACKFILEPTR is NIL at beginning of FILE. Presumably a little bit more efficient if we decoded the UTF8 bytes backwards and didn't do the peek, but probably not worth the complexity. ")
-
- (DECLARE (USEDFREE *BYTECOUNTER*))
- (BIND (C _ 0) WHILE (IF (\BACKFILEPTR STREAM)
- THEN (ADD C -1)
- (EQ 2 (LRSH (\PEEKBIN STREAM)
- 6))
- ELSE (CL:WHEN COUNTP (SETQ *BYTECOUNTER* C))
- (RETURN NIL)) REPEATUNTIL (EQ C -4)
- FINALLY (CL:WHEN COUNTP (SETQ *BYTECOUNTER* C))
- (RETURN (UTF8.PEEKCCODEFN STREAM NIL RAW])
-)
-(DEFINEQ
-
-(UTF16BE.OUTCHARFN
- [LAMBDA (STREAM CHARCODE RAW) (* ; "Edited 24-Apr-2025 15:44 by rmk")
- (* ; "Edited 31-Jan-2024 00:32 by rmk")
- (* ; "Edited 8-Aug-2021 13:09 by rmk:")
- (* ; "Edited 30-Jan-2020 23:08 by rmk:")
-
- (* ;; "PRINT UTF16 sequence for CHARCODE. Do not do MCCS to UNICODE translation if RAW.")
-
- (* ;; "Not sure about EOL conversion if truly %"raw%"")
-
- (IF (EQ CHARCODE (CHARCODE EOL))
- THEN (FREPLACE (STREAM CHARPOSITION) OF STREAM WITH 0)
- ELSE (CHANGE (FFETCH (STREAM CHARPOSITION) OF STREAM)
- (IPLUS16 1 DATUM)))
- (FOR C INSIDE (CL:IF RAW
- CHARCODE
- (UNICODE.TRANSLATE CHARCODE *MCCSTOUNICODE*)) DO (\WOUT STREAM C])
-
-(UTF16BE.INCCODEFN
- [LAMBDA (STREAM COUNTP RAW) (* ; "Edited 24-Apr-2025 15:45 by rmk")
- (* ; "Edited 10-Mar-2024 12:00 by rmk")
- (* ; "Edited 6-Aug-2021 16:05 by rmk:")
-
- (* ;;
- "Do not do UNICODE to MCCS translation if RAW. Test for SMALLPin case of funky EOF behavior")
-
- (DECLARE (USEDFREE *BYTECOUNTER*))
- (LET (CODE BYTE1 BYTE2 COUNT)
- (IF [AND (SMALLP (SETQ BYTE1 (\BIN STREAM)))
- (SMALLP (SETQ BYTE2 (\BIN STREAM]
- THEN (SETQ COUNT 2)
- (SETQ CODE (create WORD
- HIBYTE _ (\BIN STREAM)
- LOBYTE _ (\BIN STREAM)))
- (CL:UNLESS RAW
- (SETQ CODE (UNICODE.TRANSLATE CODE *UNICODETOMCCS*)))
- (CL:WHEN COUNTP (SETQ *BYTECOUNTER* COUNT))
- CODE
- ELSE (ERROR "ODD NUMBER OF BYTES IN UTF16 FILE" STREAM])
-
-(UTF16BE.PEEKCCODEFN
- [LAMBDA (STREAM NOERROR RAW) (* ; "Edited 24-Apr-2025 15:45 by rmk")
- (* ; "Edited 10-Mar-2024 12:01 by rmk")
- (* ; "Edited 14-Jun-2021 22:58 by rmk:")
-
- (* ;; "Could be that the caller takes care of backing up the file position if the number of binned-bytes is returned.")
-
- (* ;; "Do not do UNICODE to MCCS translation if RAW")
-
- (LET (BYTE1 BYTE2 CODE)
- (SETQ BYTE1 (\PEEKBIN STREAM NOERROR))
- (IF BYTE1
- THEN (\BIN STREAM)
- (SETQ BYTE2 (\PEEKBIN STREAM NOERROR))
- (\BACKFILEPTR STREAM)
- (IF BYTE2
- THEN (SETQ CODE (create WORD
- HIBYTE _ BYTE1
- LOBYTE _ BYTE2))
- (CL:IF RAW
- CODE
- (UNICODE.TRANSLATE CODE *UNICODETOMCCS*))
- ELSEIF NOERROR
- THEN NIL)
- ELSEIF NOERROR
- THEN NIL
- ELSE (ERROR "INVALID UTF16 CHARACTER" (LIST BYTE1 BYTE2])
-
-(\UTF16BE.BACKCCODEFN
- [LAMBDA (STREAM COUNTP RAW) (* ; "Edited 24-Apr-2025 15:28 by rmk")
- (* ; "Edited 10-Mar-2024 12:02 by rmk")
- (* ; "Edited 19-Jul-2022 15:14 by rmk")
- (* ; "Edited 6-Aug-2021 16:07 by rmk:")
-
- (* ;; "\BACKFILEPTR is NIL at beginning of FILE, do nothing.")
-
- (DECLARE (USEDFREE *BYTECOUNTER*))
- (CL:WHEN (\BACKFILEPTR STREAM)
- (LET (CODE (BYTE2 (\PEEKBIN STREAM)))
- (IF (\BACKFILEPTR STREAM)
- THEN (CL:WHEN COUNTP (SETQ *BYTECOUNTER* -2))
- (SETQ CODE (create WORD
- HIBYTE _ (\PEEKBIN STREAM)
- LOBYTE _ BYTE2))
- (CL:IF RAW
- CODE
- (UNICODE.TRANSLATE CODE *UNICODETOMCCS*))
- ELSEIF COUNTP
- THEN (SETQ *BYTECOUNTER* -1)
- NIL)))])
-)
-(DEFINEQ
-
-(UTF16LE.OUTCHARFN
- [LAMBDA (STREAM CHARCODE RAW) (* ; "Edited 24-Apr-2025 15:45 by rmk")
- (* ; "Edited 10-Mar-2024 11:58 by rmk")
- (* ; "Edited 8-Aug-2021 13:09 by rmk:")
- (* ; "Edited 30-Jan-2020 23:08 by rmk:")
-
- (* ;; "PRINT UTF16 sequence for CHARCODE. Do not do MCCS to UNICODE translation if RAW.")
-
- (* ;; "Not sure about EOL conversion if truly %"raw%"")
-
- (IF (EQ CHARCODE (CHARCODE EOL))
- THEN (FREPLACE (STREAM CHARPOSITION) OF STREAM WITH 0)
- ELSE (CHANGE (FFETCH (STREAM CHARPOSITION) OF STREAM)
- (IPLUS16 1 DATUM)))
- (FOR C INSIDE (CL:IF RAW
- CHARCODE
- (UNICODE.TRANSLATE CHARCODE *MCCSTOUNICODE*))
- DO (BOUT STREAM (fetch LOBYTE of CHARCODE))
- (BOUT STREAM (fetch HIBYTE of CHARCODE])
-
-(UTF16LE.INCCODEFN
- [LAMBDA (STREAM COUNTP RAW) (* ; "Edited 24-Apr-2025 15:45 by rmk")
- (* ; "Edited 10-Mar-2024 12:03 by rmk")
- (* ; "Edited 6-Aug-2021 16:05 by rmk:")
-
- (* ;;
- "Do not do UNICODE to MCCS translation if RAW. Test for SMALLPin case of funky EOF behavior")
-
- (DECLARE (USEDFREE *BYTECOUNTER*))
- (LET (CODE BYTE1 BYTE2 COUNT)
- (IF [AND (SMALLP (SETQ BYTE1 (\BIN STREAM)))
- (SMALLP (SETQ BYTE2 (\BIN STREAM]
- THEN (SETQ COUNT 2)
- (SETQ CODE (create WORD
- LOBYTE _ (\BIN STREAM)
- HIBYTE _ (\BIN STREAM)))
- (CL:UNLESS RAW
- (SETQ CODE (UNICODE.TRANSLATE CODE *UNICODETOMCCS*)))
- (CL:WHEN COUNTP (SETQ *BYTECOUNTER* COUNT))
- CODE
- ELSE (ERROR "ODD NUMBER OF BYTES IN UTF16 FILE" STREAM])
-
-(UTF16LE.PEEKCCODEFN
- [LAMBDA (STREAM NOERROR RAW) (* ; "Edited 24-Apr-2025 15:46 by rmk")
- (* ; "Edited 10-Mar-2024 11:43 by rmk")
- (* ; "Edited 14-Jun-2021 22:58 by rmk:")
-
- (* ;; "Could be that the caller takes care of backing up the file position if the number of binned-bytes is returned.")
-
- (* ;; "Do not do UNICODE to MCCS translation if RAW")
-
- (LET (BYTE1 BYTE2 CODE)
- (SETQ BYTE1 (\PEEKBIN STREAM NOERROR))
- (IF BYTE1
- THEN (\BIN STREAM)
- (SETQ BYTE2 (\PEEKBIN STREAM NOERROR))
- (\BACKFILEPTR STREAM)
- (IF BYTE2
- THEN (SETQ CODE (LOGOR (LLSH BYTE2 8)
- BYTE1))
- (CL:IF RAW
- CODE
- (UNICODE.TRANSLATE CODE *UNICODETOMCCS*))
- ELSEIF NOERROR
- THEN NIL)
- ELSEIF NOERROR
- THEN NIL
- ELSE (ERROR "INVALID UTF16 CHARACTER" (LIST BYTE1 BYTE2])
-
-(\UTF16LE.BACKCCODEFN
- [LAMBDA (STREAM COUNTP RAW) (* ; "Edited 24-Apr-2025 15:28 by rmk")
- (* ; "Edited 10-Mar-2024 12:04 by rmk")
- (* ; "Edited 19-Jul-2022 15:14 by rmk")
- (* ; "Edited 6-Aug-2021 16:07 by rmk:")
-
- (* ;; "\BACKFILEPTR is NIL at beginning of FILE, do nothing.")
-
- (DECLARE (USEDFREE *BYTECOUNTER*))
- (CL:WHEN (\BACKFILEPTR STREAM)
- (LET (CODE (BYTE2 (\PEEKBIN STREAM)))
- (IF (\BACKFILEPTR STREAM)
- THEN (CL:WHEN COUNTP (SETQ *BYTECOUNTER* -2))
- (SETQ CODE (create WORD
- HIBYTE _ BYTE2
- LOBYTE _ (\PEEKBIN STREAM)))
- (CL:IF RAW
- CODE
- (UNICODE.TRANSLATE CODE *UNICODETOMCCS*))
- ELSEIF COUNTP
- THEN (SETQ *BYTECOUNTER* -1)
- NIL)))])
-)
-(DEFINEQ
-
-(READBOM
- [LAMBDA (STREAM COUNTP) (* ; "Edited 17-Jan-2025 11:29 by rmk")
- (* ; "Edited 11-Mar-2024 23:53 by rmk")
- (* ; "Edited 10-Mar-2024 13:01 by rmk")
-
- (* ;; "If COUNTP, this must be under a generic \INCCODE that binds *BYTECOUNTER*")
-
- (* ;; "Reads and decodes the BOM bytes. If BOM ispresent, the stream is left at the first following byte, otherwise the stream is reset to its position on entry (presumably 0).")
-
- (* ;; "I used the UNHEXTRING constants so that the hex bytes are visible in the code, maybe there's another function that does that?")
-
- (DECLARE (USEDFREE *BYTECOUNTER*))
- (SELECTC (\PEEKBIN STREAM T)
- ((HEXNUM? "EF")
- (BIN STREAM)
- (if (EQ (CONSTANT (HEXNUM? "BB"))
- (\PEEKBIN STREAM T))
- then (BIN STREAM)
- (if (EQ (CONSTANT (HEXNUM? "BF"))
- (\PEEKBIN STREAM T))
- then (BIN STREAM)
- (CL:WHEN COUNTP (add *BYTECOUNTER* 3))
- :UTF-8
- else (\BACKFILEPTR STREAM))
- else (\BACKFILEPTR STREAM)))
- ((HEXNUM? "FE")
- (BIN STREAM)
- (if (EQ (CONSTANT (HEXNUM? "FF"))
- (\PEEKBIN STREAM T))
- then (BIN STREAM)
- (CL:WHEN COUNTP (add *BYTECOUNTER* 2))
- :UTF-16BE
- else (\BACKFILEPTR STREAM)))
- ((HEXNUM? "FF")
- (BIN STREAM)
- (if (EQ (CONSTANT (HEXNUM? "FE"))
- (\PEEKBIN STREAM T))
- then (BIN STREAM)
- (CL:WHEN COUNTP (add *BYTECOUNTER* 2))
- :UTF-16LE
- else (\BACKFILEPTR STREAM)))
- NIL])
-
-(WRITEBOM
- [LAMBDA (STREAM FORMAT) (* ; "Edited 17-Jan-2025 11:29 by rmk")
- (* ; "Edited 16-Mar-2024 20:53 by rmk")
- (* ; "Edited 11-Mar-2024 23:53 by rmk")
- (* ; "Edited 10-Mar-2024 13:01 by rmk")
-
- (* ;; "Writes a BOM that represents FORMAT (:UTF-8, :UTF16-BE, :UTF16-LE")
-
- (SELECTQ FORMAT
- (:UTF-8 (BOUT STREAM (CONSTANT (HEXNUM? "EF")))
- (BOUT STREAM (CONSTANT (HEXNUM? "BB")))
- (BOUT STREAM (CONSTANT (HEXNUM? "BF"))))
- (:UTF-16BE (BOUT STREAM (CONSTANT (HEXNUM? "FE")))
- (BOUT STREAM (CONSTANT (HEXNUM? "FF"))))
- (:UTF-16LE (BOUT STREAM (CONSTANT (HEXNUM? "FF")))
- (BOUT STREAM (HEXNUM? "FE")))
- NIL])
-)
-
-(RPAQ? EXTERNALEOL 'LF)
-(DEFINEQ
-
-(MAKE-UNICODE-FORMATS
- [LAMBDA (EXTERNALEOL) (* ; "Edited 17-Jan-2025 18:38 by rmk")
- (* ; "Edited 10-Mar-2024 11:55 by rmk")
- (* ; "Edited 8-Dec-2023 15:19 by rmk")
- (* ; "Edited 19-Jul-2022 15:36 by rmk")
- (* ; "Edited 6-Aug-2021 16:08 by rmk:")
-
- (* ;; "RAW formats do not do XCCS/Unicode translation, just deal with the byte encoding.")
-
- (* ;; "The EXTERNALEOL specifies the EOLCONVENTION of the stream, particularly to produce output files with the desired convention. On input the macro \CHECKEOLC (LLREAD) coerces only that coding to the internal EOL, which is a mistake.")
-
- (MAKE-EXTERNALFORMAT :UTF-8 (FUNCTION UTF8.INCCODEFN)
- (FUNCTION UTF8.PEEKCCODEFN)
- (FUNCTION \UTF8.BACKCCODEFN)
- (FUNCTION UTF8.OUTCHARFN)
- NIL EXTERNALEOL NIL NIL NIL (FUNCTION NILL))
- (MAKE-EXTERNALFORMAT :UTF-8-RAW [FUNCTION (LAMBDA (STREAM COUNTP)
- (UTF8.INCCODEFN STREAM COUNTP T]
- [FUNCTION (LAMBDA (STREAM NOERROR)
- (UTF8.PEEKCCODEFN STREAM NOERROR T]
- [FUNCTION (LAMBDA (STREAM COUNTP)
- (\UTF8.BACKCCODEFN STREAM COUNTP T]
- [FUNCTION (LAMBDA (STREAM CHARCODE)
- (UTF8.OUTCHARFN STREAM CHARCODE T]
- NIL EXTERNALEOL NIL NIL NIL (FUNCTION NILL))
- (MAKE-EXTERNALFORMAT :UTF-16BE (FUNCTION UTF16BE.INCCODEFN)
- (FUNCTION UTF16BE.PEEKCCODEFN)
- (FUNCTION \UTF16BE.BACKCCODEFN)
- (FUNCTION UTF16BE.OUTCHARFN)
- NIL EXTERNALEOL NIL NIL NIL (FUNCTION NILL))
- (MAKE-EXTERNALFORMAT :UTF-16BE-RAW [FUNCTION (LAMBDA (STREAM COUNTP)
- (UTF16BE.INCCODEFN STREAM COUNTP T]
- [FUNCTION (LAMBDA (STREAM NOERROR)
- (UTF16BE.PEEKCCODEFN STREAM NOERROR T]
- [FUNCTION (LAMBDA (STREAM COUNTP)
- (\UTF16BE.BACKCCODEFN STREAM COUNTP T]
- [FUNCTION (LAMBDA (STREAM CHARCODE)
- (UTF16BE.OUTCHARFN STREAM CHARCODE T]
- NIL EXTERNALEOL NIL NIL NIL (FUNCTION NILL))
- (MAKE-EXTERNALFORMAT :UTF-16LE (FUNCTION UTF16LE.INCCODEFN)
- (FUNCTION UTF16LE.PEEKCCODEFN)
- (FUNCTION \UTF16LE.BACKCCODEFN)
- (FUNCTION UTF16LE.OUTCHARFN)
- NIL EXTERNALEOL NIL NIL NIL (FUNCTION NILL))
- (MAKE-EXTERNALFORMAT :UTF-16LE-RAW [FUNCTION (LAMBDA (STREAM COUNTP)
- (UTF16LE.INCCODEFN STREAM COUNTP T]
- [FUNCTION (LAMBDA (STREAM NOERROR)
- (UTF16LE.PEEKCCODEFN STREAM NOERROR T]
- [FUNCTION (LAMBDA (STREAM COUNTP)
- (\UTF16LE.BACKCCODEFN STREAM COUNTP T]
- [FUNCTION (LAMBDA (STREAM CHARCODE)
- (UTF16LE.OUTCHARFN STREAM CHARCODE T]
- NIL EXTERNALEOL NIL NIL NIL (FUNCTION NILL))
- (\INSTALL.EXTERNALFORMAT (create EXTERNALFORMAT using (FIND-FORMAT :UTF-8)
- NAME _ :UTF-8-SLUG OUTCHARFN _
- (FUNCTION UTF8.SLUG.OUTCHARFN])
-)
-
-(MAKE-UNICODE-FORMATS EXTERNALEOL)
-
-(ADDTOVAR *DEFAULT-EXTERNALFORMATS* (UNIX :UTF-8))
-(DEFINEQ
-
-(UTF8.BINCODE
- [LAMBDA (STREAM RAW) (* ; "Edited 24-Apr-2025 15:28 by rmk")
- (* ; "Edited 4-Feb-2024 01:06 by rmk")
- (* ; "Edited 1-Feb-2024 11:21 by rmk")
- (* ; "Edited 28-Dec-2023 13:32 by rmk")
- (* ; "Edited 6-Aug-2021 16:02 by rmk:")
- (* ; "Edited 6-Aug-2020 17:13 by rmk:")
-
- (* ;; "Decodes a UTF8 character code by binning from STREAM ")
-
- (* ;; "The validity of STREAM is guaranteed by the caller (presumably TEDIT), we aren't testing here for the validity of the trailing bytes.")
-
- (* ;; "This doesn't do EOL conversion or translation, unlike UTF8.INCCODEFN.")
-
- (LET ((BYTE1 (BIN STREAM))
- CODE)
- [SETQ CODE (if (ILEQ BYTE1 127)
- then BYTE1
- elseif (ILEQ BYTE1 223)
- then (* ; "2 bytes")
- (LOGOR (LLSH (LOADBYTE BYTE1 0 5)
- 6)
- (LOADBYTE (BIN STREAM)
- 0 6))
- elseif (ILEQ BYTE1 239)
- then (* ; "3 bytes")
- (LOGOR (LLSH (LOADBYTE BYTE1 0 4)
- 12)
- (LLSH (LOADBYTE (BIN STREAM)
- 0 6)
- 6)
- (LOADBYTE (BIN STREAM)
- 0 6))
- else (* ; "4 bytes")
- (LOGOR (LLSH (LOADBYTE BYTE1 0 3)
- 18)
- (LLSH (LOADBYTE (BIN STREAM)
- 0 6)
- 12)
- (LLSH (LOADBYTE (BIN STREAM)
- 0 6)
- 6)
- (LOADBYTE (BIN STREAM)
- 0 6]
- (CL:IF RAW
- CODE
- (UNICODE.TRANSLATE CODE *UNICODETOMCCS*))])
-
-(\UTF8.FETCHCODE
- [LAMBDA (CODESIZE BUFFER BYTEOFFSET) (* ; "Edited 28-Dec-2023 13:32 by rmk")
- (* ; "Edited 6-Aug-2021 16:02 by rmk:")
- (* ; "Edited 6-Aug-2020 17:13 by rmk:")
-
- (* ;; "Decodes a UTF8 byte sequence of size CODESIZE in BUFFER starting at BYTEOFFSET.")
-
- (* ;; "The validity of the thesize, buffer, and offset are guaranteed by the caller.")
-
- (LET ((BYTE1 (\GETBASEBYTE BUFFER BYTEOFFSET))
- BYTE2 BYTE3 BYTE4)
- (SELECTQ CODESIZE
- (2 (SETQ BYTE2 (\UTF8.GETBASEBYTE BUFFER (IPLUS 1 BYTEOFFSET)))
- (LOGOR (LLSH (LOADBYTE BYTE1 0 5)
- 6)
- (LOADBYTE BYTE2 0 6)))
- (3 (SETQ BYTE2 (\UTF8.GETBASEBYTE BUFFER (IPLUS 1 BYTEOFFSET)))
- (SETQ BYTE3 (\UTF8.GETBASEBYTE BUFFER (IPLUS 2 BYTEOFFSET)))
- (LOGOR (LLSH (LOADBYTE BYTE1 0 4)
- 12)
- (LLSH (LOADBYTE BYTE2 0 6)
- 6)
- (LOADBYTE BYTE3 0 6)))
- (4 (SETQ BYTE2 (\UTF8.GETBASEBYTE BUFFER (IPLUS 1 BYTEOFFSET)))
- (SETQ BYTE3 (\UTF8.GETBASEBYTE BUFFER (IPLUS 2 BYTEOFFSET)))
- (SETQ BYTE4 (\UTF8.GETBASEBYTE BUFFER (IPLUS 3 BYTEOFFSET)))
- (LOGOR (LLSH (LOADBYTE BYTE1 0 3)
- 18)
- (LLSH (LOADBYTE BYTE2 0 6)
- 12)
- (LLSH (LOADBYTE BYTE3 0 6)
- 6)
- (LOADBYTE BYTE4 0 6)))
- (1 BYTE1)
- (SHOULDNT])
-)
-(DEFINEQ
-
-(UTF8.VALIDATE
- [LAMBDA (STREAM BYTE) (* ; "Edited 2-Feb-2024 12:03 by rmk")
- (* ; "Edited 28-Dec-2023 11:57 by rmk")
- (* ; "Edited 6-Aug-2021 16:02 by rmk:")
- (* ; "Edited 6-Aug-2020 17:13 by rmk:")
-
- (* ;; "Returns the codesize if the bytes starting at STREAM's current position form a valid UTF-8 sequence.")
-
- (* ;; "If BYTE is provided, it is interpreted as the just-read header byte with the stream is positioned just after it.")
-
- (* ;; "Test for smallp because the stream's End-of-file operation may suppress the error--otherwise an error will happen if the streams runs out of necessary bytes.")
-
- (* ;; "For valid sequences, returns the same value as UTF8-SIZE-FROM-BYTE1, but this reads/validates the rest of the bytes. On a non-NILreturn the stream is positioned before the header byte of the next putative code. The stream position is uncertain on a NIL return.")
-
- (* ;; "")
-
- (* ;; "Distinguish on the header byte BYTE. Not SMALLP presumably if ENDOFSTREAMOP did something unusual.")
-
- (CL:UNLESS BYTE
- (SETQ BYTE (BIN STREAM)))
- (CL:WHEN (SMALLP BYTE)
- (if (ILEQ BYTE 127)
- then 1
- elseif (ILEQ BYTE 223)
- then (* ; " 2 bytes")
- (CL:UNLESS (OR [NOT (SMALLP (SETQ BYTE (BIN STREAM]
- (ILESSP BYTE 128))
- 2)
- elseif (ILEQ BYTE 239)
- then (* ; "3 bytes")
- (CL:UNLESS (OR (OR [NOT (SMALLP (SETQ BYTE (BIN STREAM]
- (ILESSP BYTE 128))
- (OR [NOT (SMALLP (SETQ BYTE (BIN STREAM]
- (ILESSP BYTE 128)))
- 3)
- else (* ; "4 bytes")
- (CL:UNLESS (OR (OR [NOT (SMALLP (SETQ BYTE (BIN STREAM]
- (ILESSP BYTE 128))
- (OR [NOT (SMALLP (SETQ BYTE (BIN STREAM]
- (ILESSP BYTE 128))
- (OR [NOT (SMALLP (SETQ BYTE (BIN STREAM]
- (ILESSP BYTE 128)))
- 4)))])
-
-(NUTF8-BYTE1-BYTES
- [LAMBDA (BYTE1) (* ; "Edited 3-Feb-2024 15:00 by rmk")
- (* ; "Edited 8-Jan-2024 10:57 by rmk")
- (* ; "Edited 28-Jun-2022 00:02 by rmk")
- (* ; "Edited 10-Aug-2020 12:35 by rmk:")
-
- (* ;; "Returns the number of bytes in a UTF8 code representation whose first byte is BYTEE1. ")
-
- (IF (ILEQ BYTE1 127)
- THEN 1
- ELSEIF (ILEQ BYTE1 223)
- THEN 2
- ELSEIF (ILEQ BYTE1 239)
- THEN 3
- ELSE 4])
-
-(NUTF8-CODE-BYTES
- [LAMBDA (CODE) (* ; "Edited 3-Feb-2024 14:42 by rmk")
- (* ; "Edited 8-Jan-2024 10:57 by rmk")
- (* ; "Edited 28-Jun-2022 00:02 by rmk")
- (* ; "Edited 10-Aug-2020 12:35 by rmk:")
-
- (* ;; "Returns the number of bytes needed to encode in UTF8 a number headed by BYTE. ")
-
- (IF (ILESSP CODE 128)
- THEN 1
- ELSEIF (ILESSP CODE 2048)
- THEN (* ; "x800")
- 2
- ELSEIF (ILESSP CODE 65536)
- THEN (* ; "x10000")
- 3
- ELSEIF (ILESSP CODE 2097152)
- THEN (* ; "x200000")
- 4
- ELSE (ERROR "INVALID UTF-8 CODE"])
-
-(NUTF8-STRING-BYTES
- [LAMBDA (STRING RAW) (* ; "Edited 2-Sep-2025 10:40 by rmk")
- (* ; "Edited 24-Apr-2025 15:37 by rmk")
- (* ; "Edited 3-Feb-2024 21:32 by rmk")
- (* ; "Edited 10-Aug-2020 09:06 by rmk:")
-
- (* ;; "Returns the number of bytes it would take to represent STRING in UTF8, assuming it is an MCCS string unless RAWFLG. ")
-
- (for I C from 1 while (SETQ C (NTHCHARCODE STRING I)) sum (NUTF8-CODE-BYTES (CL:IF RAW
- C
- (MTOUCODE C))])
-
-(N-MCHARS
- [LAMBDA (UTF8STRING) (* ; "Edited 9-Sep-2025 08:35 by rmk")
-
- (* ;; "Returns the number of MCCS characters coded in UTF8STRING")
-
- (for I B from 1 while (SETQ B (NTHCHARCODE UTF8STRING I)) by (NUTF8-BYTE1-BYTES B) count T])
-)
-(DECLARE%: EVAL@COMPILE DONTCOPY
-(DECLARE%: EVAL@COMPILE
-
-(PUTPROPS UNICODE.TRANSLATE MACRO [OPENLAMBDA (CODE TRANSLATION-TABLE DONTFAKE RETURNALL)
-
- (* ;; "If RETURNALL and there are alternatives in the RANG, the list is returned. Othewise just the first one if the fake flag allows ")
-
- (LET [(RANGE (OR (GETHASH CODE TRANSLATION-TABLE)
- (UNICODE.UNMAPPED CODE TRANSLATION-TABLE
- DONTFAKE]
- (CL:WHEN RANGE
- (if (AND RETURNALL (CDR RANGE))
- then RANGE
- else (SETQ RANGE (CAR RANGE))
- (CL:IF DONTFAKE
- (TRUECODEP RANGE TRANSLATION-TABLE)
- RANGE)))])
-
-(PUTPROPS \UTF8.GETBASEBYTE MACRO ((BASE OFFSET ERROR?) (* ;
- "Fetches the OFFSET'th byte from BASE, checking for UTF-8 validity if ERROR?")
- (IF ERROR?
- THEN (LET ((BYTE (\GETBASEBYTE BASE OFFSET)))
- (CL:WHEN (ILESSP BYTE 128)
- (ERROR "INVALID UTF8 BYTE" BYTE))
- BYTE)
- ELSE (\GETBASEBYTE BASE OFFSET))))
-
-(PUTPROPS UNICODE.SMALLP MACRO [OPENLAMBDA (UNICODE) (* ;
- "Cananonicalizes a large UNICODE for EQ hash-testing")
- (OR (SMALLP UNICODE)
- (CAR (OR (MEMBER UNICODE *LARGEUNICODES*)
- (PUSH *LARGEUNICODES* UNICODE])
-)
-)
-
-
-
-(* ;; "")
-
-
-
-
-(* ;;
-"These come after the translation tables have been loaded, since the Unix file names needed to read the mapping files depend on the UTF8 string coercions. Those functions are defined as EVQ in UFS, cannot be used until the tables exist. This assumes that previous files have only 7-bit MCCS characters in their names."
-)
-
-(DEFINEQ
-
-(MTOUCODE
- [LAMBDA (MCODE) (* ; "Edited 4-Sep-2025 15:10 by rmk")
- (* ; "Edited 24-Apr-2025 10:19 by rmk")
- (* ; "Edited 9-Aug-2020 09:04 by rmk:")
- (UNICODE.TRANSLATE MCODE *MCCSTOUNICODE*])
-
-(UTOMCODE
- [LAMBDA (UNICODE) (* ; "Edited 23-Oct-2025 08:23 by rmk")
- (* ; "Edited 24-Apr-2025 10:17 by rmk")
- (* ; "Edited 16-Jan-2025 23:46 by rmk")
- (* ; "Edited 9-Aug-2020 09:04 by rmk:")
- (UNICODE.TRANSLATE (UNICODE.SMALLP UNICODE)
- *UNICODETOMCCS*])
-
-(MTOUCODE?
- [LAMBDA (MCODE) (* ; "Edited 4-Sep-2025 15:09 by rmk")
- (* ; "Edited 24-Apr-2025 10:18 by rmk")
- (* ; "Edited 20-Jan-2025 20:38 by rmk")
- (* ; "Edited 18-Jan-2025 11:44 by rmk")
- (* ; "Edited 15-Jan-2025 19:51 by rmk")
- (* ; "Edited 14-Jan-2025 13:14 by rmk")
- (* ; "Edited 9-Aug-2020 09:04 by rmk:")
-
- (* ;; "Returns the Unix range-code(s) corresponding to MCODE if there are true mapppings, otherwise NIL. Alternative codes are returned in a list, the code itself is returned for a singleton.")
-
- (UNICODE.TRANSLATE MCODE *MCCSTOUNICODE* T T])
-
-(UTOMCODE?
- [LAMBDA (UNICODE) (* ; "Edited 23-Oct-2025 08:24 by rmk")
- (* ; "Edited 24-Apr-2025 10:18 by rmk")
- (* ; "Edited 19-Jan-2025 21:14 by rmk")
- (* ; "Edited 18-Jan-2025 11:46 by rmk")
- (* ; "Edited 15-Jan-2025 19:51 by rmk")
- (* ; "Edited 14-Jan-2025 13:14 by rmk")
- (* ; "Edited 9-Aug-2020 09:04 by rmk:")
-
- (* ;; "Returns the MCCS range-code(s) corresponding to UNICODE if there are true mapppings, otherwise NIL. ")
-
- (* ;;
- " NOTE: Alternative codes are returned in a list, the code itself is returned for a singleton.")
-
- (* ;; "Canonicalize unicodes outside of the 16-bit plane")
-
- (UNICODE.TRANSLATE (UNICODE.SMALLP UNICODE)
- *UNICODETOMCCS* T T])
-
-(MTOUSTRING
- [LAMBDA (MSTRING DESTRUCTIVE) (* ; "Edited 2-Sep-2025 12:19 by rmk")
- (* ; "Edited 29-Apr-2025 12:01 by rmk")
-
- (* ;; "Converts MCCS codes in MSTRING to Unicodes.")
-
- (for I MCODE (USTRING _ (CL:IF DESTRUCTIVE
- MSTRING
- (CONCAT MSTRING))) from 1 while (SETQ MCODE (NTHCHARCODE MSTRING I))
- do (RPLCHARCODE USTRING I (MTOUCODE MCODE)) finally (RETURN USTRING])
-
-(UTOMSTRING
- [LAMBDA (USTRING DESTRUCTIVE) (* ; "Edited 2-Sep-2025 12:18 by rmk")
- (* ; "Edited 29-Apr-2025 12:00 by rmk")
-
- (* ;; "Converts Unicodes to MCCS codes in USTRING.")
-
- (for I UCODE (MSTRING _ (CL:IF DESTRUCTIVE
- USTRING
- (CONCAT USTRING))) from 1 while (SETQ UCODE (NTHCHARCODE USTRING I))
- do (RPLCHARCODE MSTRING I (UTOMCODE UCODE)) finally (RETURN MSTRING])
-
-(MTOUTF8STRING
- [LAMBDA (MSTRING) (* ; "Edited 9-Sep-2025 07:51 by rmk")
- (* ; "Edited 4-Sep-2025 15:13 by rmk")
- (* ; "Edited 2-Sep-2025 11:12 by rmk")
- (* ; "Edited 24-Apr-2025 15:37 by rmk")
- (* ; "Edited 3-Feb-2024 14:55 by rmk")
- (* ; "Edited 10-Aug-2020 21:42 by rmk:")
-
- (* ;;
- "Produces a string that contains the UTF8 bytes that represent the characters in MSTRING. ")
-
- (* ;; "The resulting string will not be directly interpretable inside Medley.")
-
- (if (if (STRINGP MSTRING)
- then (OR (ffetch (STRINGP FATSTRINGP) of MSTRING)
- (thereis C instring MSTRING suchthat (IGEQ C 128)))
- elseif (LITATOM MSTRING)
- then (OR (ffetch (LITATOM FATPNAMEP) of MSTRING)
- (thereis C inatom MSTRING suchthat (IGEQ C 128)))
- else T)
- then (LET [(USTR (ALLOCSTRING (NUTF8-STRING-BYTES MSTRING]
- (for I UCODE MCODE (SINDEX _ 0) from 1 while (SETQ MCODE (NTHCHARCODE MSTRING I))
- do (SETQ UCODE (MTOUCODE MCODE))
- (if (ILESSP UCODE 128)
- then (RPLCHARCODE USTR (ADD SINDEX 1)
- UCODE)
- elseif (ILESSP UCODE 2048)
- then (* ; "x800")
- (RPLCHARCODE USTR (ADD SINDEX 1)
- (LOGOR (LLSH 3 6)
- (LRSH UCODE 6)))
- (RPLCHARCODE USTR (ADD SINDEX 1)
- (LOGOR (LLSH 2 6)
- (LOADBYTE UCODE 0 6)))
- elseif (ILESSP UCODE 65536)
- then (* ; "x10000")
- (RPLCHARCODE USTR (ADD SINDEX 1)
- (LOGOR (LLSH 7 5)
- (LRSH UCODE 12)))
- (RPLCHARCODE USTR (ADD SINDEX 1)
- (LOGOR (LLSH 2 6)
- (LOADBYTE UCODE 6 6)))
- (RPLCHARCODE USTR (ADD SINDEX 1)
- (LOGOR (LLSH 2 6)
- (LOADBYTE UCODE 0 6)))
- elseif (ILESSP UCODE 2097152)
- then (* ; "x200000")
- (RPLCHARCODE USTR (ADD SINDEX 1)
- (LOGOR (LLSH 15 4)
- (LRSH UCODE 18)))
- (RPLCHARCODE USTR (ADD SINDEX 1)
- (LOGOR (LLSH 2 6)
- (LOADBYTE UCODE 12 6)))
- (RPLCHARCODE USTR (ADD SINDEX 1)
- (LOGOR (LLSH 2 6)
- (LOADBYTE UCODE 6 6)))
- (RPLCHARCODE USTR (ADD SINDEX 1)
- (LOGOR (LLSH 2 6)
- (LOADBYTE UCODE 0 6)))
- else (SHOULDNT)))
- USTR)
- else MSTRING])
-
-(UTF8TOMSTRING
- [LAMBDA (UTF8STRING) (* ; "Edited 22-Oct-2025 22:00 by rmk")
- (* ; "Edited 16-Oct-2025 14:39 by rmk")
- (* ; "Edited 9-Sep-2025 08:59 by rmk")
- (CL:UNLESS (OR (STRINGP UTF8STRING)
- (LITATOM UTF8STRING))
- (SETQ UTF8STRING (MKSTRING UTF8STRING)))
- (CL:WHEN (ffetch (STRINGP FATSTRINGP) of UTF8STRING)
- (\ILLEGAL.ARG UTF8STRING))
- (LET* ((NMCHARS (N-MCHARS UTF8STRING))
- (MSTRING (ALLOCSTRING NMCHARS)))
- [for M NBYTES BYTE1 (BASE _ (ffetch (STRINGP BASE) of UTF8STRING)) from 1 to NMCHARS
- as OFFSET from (fetch (STRINGP OFFST) of MSTRING) by NBYTES
- do (SETQ BYTE1 (\GETBASEBYTE BASE OFFSET))
- (SETQ NBYTES (NUTF8-BYTE1-BYTES BYTE1))
- (RPLCHARCODE MSTRING M (UTOMCODE (\UTF8.FETCHCODE NBYTES BASE OFFSET]
- MSTRING])
-)
-(DEFINEQ
-
-(XTOUCODE
- [LAMBDA (XCODE) (* ; "Edited 4-Sep-2025 15:09 by rmk")
- (* ; "Edited 24-May-2025 23:16 by rmk")
- (* ; "Edited 24-Apr-2025 15:27 by rmk")
- (* ; "Edited 9-Aug-2020 09:04 by rmk:")
- (UNICODE.TRANSLATE (XTOMCODE XCODE)
- *MCCSTOUNICODE*])
-
-(UTOXCODE
- [LAMBDA (UNICODE) (* ; "Edited 24-May-2025 23:17 by rmk")
- (* ; "Edited 24-Apr-2025 15:28 by rmk")
- (* ; "Edited 16-Jan-2025 23:46 by rmk")
- (* ; "Edited 9-Aug-2020 09:04 by rmk:")
- (MTOXCODE (UNICODE.TRANSLATE UNICODE *UNICODETOMCCS*])
-
-(XTOUCODE?
- [LAMBDA (XCCSCODE) (* ; "Edited 24-May-2025 23:18 by rmk")
- (* ; "Edited 24-Apr-2025 15:27 by rmk")
- (* ; "Edited 20-Jan-2025 20:38 by rmk")
- (* ; "Edited 18-Jan-2025 11:44 by rmk")
- (* ; "Edited 15-Jan-2025 19:51 by rmk")
- (* ; "Edited 14-Jan-2025 13:14 by rmk")
- (* ; "Edited 9-Aug-2020 09:04 by rmk:")
-
- (* ;; "Returns the Unix range-code(s) corresponding to XCCSCODE if there are true mapppings, otherwise NIL. Alternative codes are returned in a list, the code itself is returned for a singleton.")
-
- (UNICODE.TRANSLATE (XTOMCODE XCCSCODE)
- *MCCSTOUNICODE* T T])
-
-(UTOXCODE?
- [LAMBDA (UNICODE) (* ; "Edited 24-May-2025 23:19 by rmk")
- (* ; "Edited 24-Apr-2025 15:28 by rmk")
- (* ; "Edited 19-Jan-2025 21:14 by rmk")
- (* ; "Edited 18-Jan-2025 11:46 by rmk")
- (* ; "Edited 15-Jan-2025 19:51 by rmk")
- (* ; "Edited 14-Jan-2025 13:14 by rmk")
- (* ; "Edited 9-Aug-2020 09:04 by rmk:")
-
- (* ;; "Returns the XCCS range-code(s) corresponding to UNICODE if there are true mapppings, otherwise NIL. ")
-
- (* ;;
- " NOTE: Alternative codes are returned in a list, the code itself is returned for a singleton.")
-
- (MTOXCODE (UNICODE.TRANSLATE UNICODE *UNICODETOMCCS* T T])
-
-(XTOUSTRING
- [LAMBDA (XSTRING DESTRUCTIVE) (* ; "Edited 2-Sep-2025 12:00 by rmk")
- (* ; "Edited 29-Apr-2025 12:01 by rmk")
-
- (* ;; "Converts XCCS codes in XSTRING to Unicodes.")
-
- (for I UCODE XCODE (USTRING _ (CL:IF DESTRUCTIVE
- XSTRING
- (CONCAT XSTRING))) from 1 while (SETQ XCODE (NTHCHARCODE
- XSTRING I))
- do (RPLCHARCODE USTRING I (XTOUCODE XCODE)) finally (RETURN USTRING])
-
-(UTOXSTRING
- [LAMBDA (USTRING DESTRUCTIVE) (* ; "Edited 2-Sep-2025 11:54 by rmk")
- (* ; "Edited 29-Apr-2025 12:00 by rmk")
-
- (* ;; "Converts Unicodes in USTRING to XCCS codes.")
-
- (for I XCODE UCODE (XSTRING _ (CL:IF DESTRUCTIVE
- USTRING
- (CONCAT USTRING))) from 1 while (SETQ UCODE (NTHCHARCODE
- USTRING I))
- unless (EQ UCODE (SETQ XCODE (UTOXCODE UCODE))) do (RPLCHARCODE XSTRING I XCODE)
- finally (RETURN XSTRING])
-
-(XTOUTF8STRING
- [LAMBDA (XSTRING) (* ; "Edited 4-Sep-2025 18:37 by rmk")
- (* ; "Edited 2-Sep-2025 11:37 by rmk")
- (* ; "Edited 29-Apr-2025 12:53 by rmk")
- (* ; "Edited 24-Apr-2025 15:42 by rmk")
- (* ; "Edited 3-Feb-2024 14:55 by rmk")
- (* ; "Edited 10-Aug-2020 21:42 by rmk:")
-
- (* ;; "Produces a string that contains the UTF8 bytes that represent the characters in XSTRING. Applies the ")
-
- (* ;; "The resulting string will not be interpretable inside Medley.")
-
- (for I C (MSTRING _ (CONCAT XSTRING)) from 1 while (SETQ C (NTHCHARCODE XSTRING I))
- do (RPLCHARCODE MSTRING I (XTOMCODE C)) finally (RETURN (MTOUTF8STRING MSTRING])
-)
-
-
-
-(* ;; "")
-
-
-
-
-(* ; "Write Unicode mapping files")
-
-(DEFINEQ
-
-(WRITE-UNICODE-MAPPING
- [LAMBDA (MAPPING INCLUDECHARSETS FILE EMPTYOK) (* ; "Edited 4-Jan-2024 22:44 by rmk")
- (* ; "Edited 16-Aug-2020 16:56 by rmk:")
-
- (* ;; "Writes a symbol unicode mapping file. Mapping is a list of (XCCS-code Unicode) pairs, which may contain codes in multiple character sets.")
-
- (* ;; "If FILE is NIL, it defaults to a name XCCS- followed by the octal character sets in the mapping, in the unicode/XEROX directory.")
-
- (* ;; "The output lines are of the form x0XXXx0UUUU# Unicode-char")
-
- (* ;;
- "If INCLUDECHARSETS=T then the mappings are split up into separate per-character set files.")
-
- (* ;; "Otherwise, all and only mappings included in thos charsets are included in a single output file--an implicit subset.")
-
- (IF (AND (EQ INCLUDECHARSETS T)
- (NULL FILE))
- THEN (IF MAPPING
- THEN (FOR CSI F IN XCCS-SET-NAMES WHEN (SETQ F (WRITE-UNICODE-MAPPING MAPPING
- (CAR CSI)
- NIL T)) COLLECT F)
- ELSE (PRINTOUT T "THERE ARE NO MAPPINGS" T)
- NIL)
- ELSE
- (LET
- (IMAPPING CSETINFO RANGES)
- (CL:MULTIPLE-VALUE-SETQ (IMAPPING CSETINFO RANGES)
- (WRITE-UNICODE-INCLUDED MAPPING INCLUDECHARSETS))
- (IF IMAPPING
- THEN (CL:WITH-OPEN-FILE
- (STREAM (WRITE-UNICODE-MAPPING-FILENAME FILE CSETINFO RANGES)
- :DIRECTION :OUTPUT :IF-EXISTS :NEW-VERSION :EXTERNAL-FORMAT :UTF-8-RAW)
- (WRITE-UNICODE-MAPPING-HEADER STREAM CSETINFO RANGES)
- (SORT IMAPPING T)
- (FOR M CSET LEFTC FIRSTRIGHTC CSI IN IMAPPING
- DO (SETQ LEFTC (CAR M))
- (SETQ FIRSTRIGHTC (CADR M))
- (CL:UNLESS (EQ CSET (LRSH LEFTC 8))
- (SETQ CSET (LRSH LEFTC 8))
- (SETQ CSI (ASSOC CSET CSETINFO))
- (PRINTOUT STREAM T "# " .P2 (CADR CSI)
- " "
- (CADDR CSI)
- T))
- (PRINTOUT STREAM "0x" (HEXSTRING LEFTC 4)
- %#
- (FOR RIGHTC IN (CDR M) DO (PRINTOUT NIL " " "0x" (HEXSTRING RIGHTC 4)))
- " # "
- (SELECTC FIRSTRIGHTC
- (UNDEFINEDCODE
- (* ;; "FFFF")
-
- "UNDEFINED")
- (MISSINGCODE
- (* ;; "FFFE")
-
- "MISSING")
- (IF (ILESSP FIRSTRIGHTC 32)
- THEN (* ; "Control chars")
- [CONCAT "^" (CHARACTER (IPLUS FIRSTRIGHTC (CHARCODE @]
- ELSE (CHARACTER FIRSTRIGHTC)))
- T))
- (FULLNAME STREAM))
- ELSEIF (NOT EMPTYOK)
- THEN (PRINTOUT T "THERE ARE NO MAPPINGS")
- (CL:WHEN INCLUDECHARSETS
- (PRINTOUT T " FOR " .PPVTL (MKLIST INCLUDECHARSETS)
- T))
- NIL])
-
-(WRITE-UNICODE-INCLUDED
- [LAMBDA (MAPPING INCLUDECHARSETS) (* ; "Edited 4-Aug-2020 17:47 by rmk:")
-
- (* ;; "CSETINFO is a list of (num string name) for each included character set.")
-
- (LET (CHARSETS CSETINFO RANGES ICSETS IMAPPING)
-
- (* ;; "Normalize the INCLUDECHARSETS, then reduce MAPPING to the included mappings")
-
- [SETQ ICSETS (FOR C POS KNOWN INSIDE (OR INCLUDECHARSETS (FOR CSI IN
- XCCS-SET-NAMES
- COLLECT (CAR CSI)))
- JOIN [SETQ KNOWN (OR (SASSOC C XCCS-SET-NAMES)
- (FIND N IN XCCS-SET-NAMES
- SUCHTHAT (EQ C (CADR N)))
- (HELP "UNKNOWN CHARACTER SET" (OCTALSTRING C]
- (IF (SETQ POS (STRPOS "-" (CAR KNOWN)))
- THEN (FOR I FROM (CL:PARSE-INTEGER (SUBSTRING
- (CAR KNOWN)
- 1
- (SUB1 POS))
- :RADIX 8)
- TO (CL:PARSE-INTEGER (SUBSTRING (CAR KNOWN)
- (ADD1 POS))
- :RADIX 8)
- COLLECT (LIST I (OCTALSTRING I)
- (CADR KNOWN)))
- ELSE (CONS (CONS (CL:PARSE-INTEGER (CAR KNOWN)
- :RADIX 8)
- KNOWN]
- (SETQ IMAPPING (FOR M CSI IN MAPPING WHEN (SETQ CSI (ASSOC (LRSH (CAR M)
- 8)
- ICSETS))
- COLLECT
-
- (* ;; "The attested subset of INCLUDED")
-
- (CL:UNLESS (MEMB CSI CSETINFO)
- (PUSH CSETINFO CSI))
- M))
-
- (* ;; "Sort as numbers, not octal strings, then group into consecutive ranges")
-
- (SETQ CSETINFO (SORT CSETINFO T))
- [SETQ RANGES (FOR CTAIL C START END ON (FOR CSI IN CSETINFO
- COLLECT (CAR CSI)) WHILE CTAIL
- COLLECT (SETQ START (CAR CTAIL))
- (SETQ END START)
- (CONS START (WHILE [AND (CDR CTAIL)
- (EQ END (SUB1 (CADR CTAIL]
- COLLECT (SETQ CTAIL (CDR CTAIL))
- (SETQ END (CAR CTAIL]
-
- (* ;; "Split out groups of less than 3. But if a range exhaustively covers a known subset (like JIS), replace by the name")
-
- [SETQ RANGES (FOR R STR KNOWN LAST IN RANGES
- JOIN (SETQ LAST (CAR (LAST R)))
- (IF (EQ (CAR R)
- LAST)
- THEN (CONS (OCTALSTRING (CAR R)))
- ELSEIF (SETQ KNOWN (SASSOC (SETQ STR (CONCAT (OCTALSTRING
- (CAR R))
- "-"
- (OCTALSTRING LAST)))
- XCCS-SET-NAMES))
- THEN (CONS (CADR KNOWN))
- ELSEIF (CDDR R)
- THEN (CONS STR)
- ELSE (LIST (OCTALSTRING (CAR R))
- (OCTALSTRING LAST]
- (CL:VALUES IMAPPING CSETINFO RANGES])
-
-(WRITE-UNICODE-MAPPING-HEADER
- [LAMBDA (STREAM CSETINFO RANGES) (* ; "Edited 5-Jan-2024 13:24 by rmk")
- (* ; "Edited 4-Aug-2020 17:38 by rmk:")
-
- (* ;; "Writes the standard per-file header information")
-
- (FOR LINE IN UNICODE-MAPPING-HEADER
- DO (PRINTOUT STREAM "#" 2)
- (SELECTQ LINE
- (XCCSCHARACTERSETS
- (PRINTOUT STREAM " XCCS charset")
- (IF (CDR CSETINFO)
- THEN (PRINTOUT STREAM "s:" -4)
- (FOR R IN RANGES DO (PRINTOUT STREAM R " "))
- ELSE (* ; "Singleton")
- (PRINTOUT STREAM ": " -4 (CADAR CSETINFO)
- " "
- (CADDAR CSETINFO)))
- (TERPRI STREAM))
- (DATE (PRINTOUT STREAM " Date:" -13 (DATE (DATEFORMAT NO.TIME NO.LEADING.SPACES)
- )
- T))
- (PRINTOUT STREAM LINE T)))
- (TERPRI STREAM])
-
-(WRITE-UNICODE-MAPPING-FILENAME
- [LAMBDA (FILE CSETINFO RANGES) (* ; "Edited 4-Aug-2020 19:34 by rmk:")
- (PACKFILENAME 'BODY [OR FILE (CONCATLIST
- (CONS 'XCCS- (IF (CDR CSETINFO)
- THEN (FOR RTAIL R ON RANGES
- JOIN (SETQ R (CAR RTAIL))
- (SETQ R
- (CL:IF (LISTP R)
- (LIST (CAR R)
- "-"
- (CDR R))
- (CONS R)))
- (CL:IF (CDR RTAIL)
- (NCONC1 R ","))
- R)
- ELSE (LIST (CADAR CSETINFO)
- "="
- (CADDAR CSETINFO]
- 'DIRECTORY
- (CAR UNICODEDIRECTORIES)
- 'EXTENSION
- 'TXT])
-)
-(DEFINEQ
-
-(XCCS-UTF8-AFTER-OPEN
- [LAMBDA (STREAM ACCESS PARAMETERS) (* ; "Edited 3-Jan-2024 10:27 by rmk")
- (* ; "Edited 13-Aug-2020 11:54 by rmk:")
-
- (* ;;
- "If added to STREAM-AFTER-OPEN-FNS, causes mapping files to be opened as UTF-8. For development")
-
- (CL:WHEN (AND (STRPOS "XCCS-" (U-CASE (FULLNAME STREAM)))
- [EQ 'TXT (U-CASE (FILENAMEFIELD (FULLNAME STREAM)
- 'EXTENSION]
- (NOT (ASSOC 'EXTERNALFORMAT PARAMETERS)))
- (STREAMPROP STREAM 'EXTERNALFORMAT :UTF-8))])
-)
-
-
-
-(* ;; "Automate dumping of a documentation prefix")
-
-(DECLARE%: EVAL@COMPILE DONTCOPY
-(DECLARE%: EVAL@COMPILE
-
-(RPAQ MISSINGCODE (CL:PARSE-INTEGER "FFFE" :RADIX 16))
-
-(RPAQ UNDEFINEDCODE (CL:PARSE-INTEGER "FFFF" :RADIX 16))
-
-
-(CONSTANTS (MISSINGCODE (CL:PARSE-INTEGER "FFFE" :RADIX 16))
- (UNDEFINEDCODE (CL:PARSE-INTEGER "FFFF" :RADIX 16)))
-)
-)
-
-(RPAQQ UNICODE-MAPPING-HEADER
- ("" " Name: XCCS (Version 2.0) to Unicode" " Unicode version: 3.0"
- XCCSCHARACTERSETS " Table version: 0.1" " Table format: Format A"
- DATE " Author: Ron Kaplan " ""
- "This file contains mappings from the Xerox Character Code Standard (version"
- "2.0, 1990) into Unicode 3.0. standard codes. That is an extension of the"
- "version of XCCS corresponding to the fonts in the Medley system." ""
- "The format of this file conforms to the format of the other Unicode-supplied"
- "mapping files:" " Three white-space (tab or spaces) separated columns:"
- " Column 1 is the XCCS code (as hex 0xXXXX)"
- " Column 2 is the corresponding Unicode (as hex 0xXXXX)"
- " Column 3 (after #) is a comment column. For convenience, it contains the"
- " Unicode character itself and the Unicode character names when available."
- "Unicode FFFF is used for undefined XCCS codes (Column 3 = UNDEFINED"
- "Unicode FFFE is used for XCCS codes that have not yet been filled in."
- "(Column 3 = MISSING)" "" "This file is encoded in UTF-8, so that the Unicode characters"
- "are properly displayed in Column 3 and can be edited by standard"
- "Unicode-enabled editors (e.g. Mac Textedit)." ""
- "This file can also be read by the function"
- "READ-UNICODE-MAPPING in the UNICODE Medley library package." ""
- "The entries are in XCCS order and grouped by character sets. In front of"
- "the mappings, for convenience, there is a line with the octal XCCS"
- "character set, after #." ""
- "Note that a given XCCS code might map to codes in several different Unicode"
- "positions, since there are repetitions in the Unicode standard." ""
- "For more details, see the associated README.TXT file." ""
- "Any comments or problems, contact "))
-(DEFINEQ
-
-(UTF8HEXSTRING
- [LAMBDA (CHARCODE) (* ; "Edited 10-Aug-2020 08:33 by rmk:")
-
- (* ;; "Utility to produces the UTF8 hexstring representing CODE")
-
- (HEXSTRING (IF (ILESSP CHARCODE 128)
- THEN CHARCODE
- ELSEIF (ILESSP CHARCODE 2048)
- THEN (* ; "x800")
- (LOGOR (LLSH (LOGOR (LLSH 3 6)
- (LRSH CHARCODE 6))
- 8)
- (LOGOR (LLSH 2 6)
- (LOADBYTE CHARCODE 0 6)))
- ELSEIF (ILESSP CHARCODE 65536)
- THEN (* ; "x10000")
- (LOGOR (LLSH (LOGOR (LLSH 7 5)
- (LRSH CHARCODE 12))
- 16)
- (LLSH (LOGOR (LLSH 2 6)
- (LOADBYTE CHARCODE 6 6))
- 8)
- (LOGOR (LLSH 2 6)
- (LOADBYTE CHARCODE 0 6)))
- ELSEIF (ILESSP CHARCODE 2097152)
- THEN (* ; "x200000")
- (LOGOR (LLSH (LOGOR (LLSH 15 4)
- (LRSH CHARCODE 18))
- 24)
- (LLSH (LOGOR (LLSH 2 6)
- (LOADBYTE CHARCODE 12 6))
- 16)
- (LLSH (LOGOR (LLSH 2 6)
- (LOADBYTE CHARCODE 6 6))
- 8)
- (LOGOR (LLSH 2 6)
- (LOADBYTE CHARCODE 0 6)))
- ELSE (ERROR "CHARCODE too big for UTF8" CHARCODE])
-)
-
-
-
-(* ; "debugging")
-
-(DEFINEQ
-
-(SHOWCHARS
- [LAMBDA (FONT FROMCHAR TOCHAR ONELINE) (* ; "Edited 5-Oct-2025 17:41 by rmk")
- (* ; "Edited 7-Sep-2025 20:29 by rmk")
- (* ; "Edited 2-Sep-2025 10:26 by rmk")
- (* ; "Edited 24-Jul-2025 11:30 by rmk")
- (* ; "Edited 8-Jun-2025 20:05 by rmk")
- (* ; "Edited 26-Jan-2024 14:18 by mth")
- (* ; "Edited 1-Aug-2020 09:27 by rmk:")
- [SETQ FONT (FONTCREATE (OR FONT '(CLASSIC 12]
- (RESETLST
- [LET ((OLDFONT (DSPFONT NIL T))
- CHARS)
- (CL:UNLESS (CHARCODEP FROMCHAR)
- (SETQ FROMCHAR (OR (CHARCODE.DECODE FROMCHAR T)
- FROMCHAR)))
- (SETQ CHARS (if (LISTP FROMCHAR)
- elseif (CHARCODEP FROMCHAR)
- then (CL:UNLESS (CHARCODEP TOCHAR)
- (SETQ TOCHAR (OR (CHARCODE.DECODE TOCHAR)
- FROMCHAR)))
- (for C from FROMCHAR to TOCHAR collect C)
- else (CHCON FROMCHAR)))
- [RESETSAVE OLDFONT '(PROGN (DSPFONT OLDVALUE]
- (TERPRI)
- (for C in CHARS do (PRINTOUT T .FONT OLDFONT (CONCAT (OCTALSTRING (\CHARSET C))
- ","
- (OCTALSTRING (\CHAR8CODE C)))
- 10 .FONT FONT (CHARACTER C))
- (CL:UNLESS ONELINE (PRINTOUT T T])
- (TERPRI])
-)
-(DECLARE%: DOEVAL@LOAD DONTCOPY
-(DECLARE%: EVAL@COMPILE
-
-(PUTPROPS HEXCHAR MACRO ((CODE)
- (HEXSTRING CODE)))
-
-(PUTPROPS OCTALCHAR MACRO [(CODE)
- (CONCAT (OCTALSTRING (\CHARSET CODE))
- ","
- (OCTALSTRING (LOGAND CODE 255])
-)
-)
-(DECLARE%: EVAL@COMPILE DONTCOPY
-
-(FILESLOAD (LOADCOMP)
- UNICODE-EXPORTS)
-)
-
-(PUTPROPS UNICODE FILETYPE :TCOMPL)
-(DECLARE%: DONTCOPY
- (FILEMAP (NIL (3488 19026 (UTF8.OUTCHARFN 3498 . 6514) (UTF8.SLUG.OUTCHARFN 6516 . 7180) (
-UTF8.INCCODEFN 7182 . 13035) (UTF8.PEEKCCODEFN 13037 . 18044) (\UTF8.BACKCCODEFN 18046 . 19024)) (
-19027 23717 (UTF16BE.OUTCHARFN 19037 . 20056) (UTF16BE.INCCODEFN 20058 . 21183) (UTF16BE.PEEKCCODEFN
-21185 . 22525) (\UTF16BE.BACKCCODEFN 22527 . 23715)) (23718 28441 (UTF16LE.OUTCHARFN 23728 . 24844) (
-UTF16LE.INCCODEFN 24846 . 25971) (UTF16LE.PEEKCCODEFN 25973 . 27249) (\UTF16LE.BACKCCODEFN 27251 .
-28439)) (28442 31489 (READBOM 28452 . 30521) (WRITEBOM 30523 . 31487)) (31519 35084 (
-MAKE-UNICODE-FORMATS 31529 . 35082)) (35181 39675 (UTF8.BINCODE 35191 . 37879) (\UTF8.FETCHCODE 37881
- . 39673)) (39676 45303 (UTF8.VALIDATE 39686 . 42283) (NUTF8-BYTE1-BYTES 42285 . 43022) (
-NUTF8-CODE-BYTES 43024 . 44081) (NUTF8-STRING-BYTES 44083 . 44979) (N-MCHARS 44981 . 45301)) (47785
-57213 (MTOUCODE 47795 . 48182) (UTOMCODE 48184 . 48710) (MTOUCODE? 48712 . 49745) (UTOMCODE? 49747 .
-50916) (MTOUSTRING 50918 . 51503) (UTOMSTRING 51505 . 52090) (MTOUTF8STRING 52092 . 56098) (
-UTF8TOMSTRING 56100 . 57211)) (57214 62916 (XTOUCODE 57224 . 57742) (UTOXCODE 57744 . 58252) (
-XTOUCODE? 58254 . 59315) (UTOXCODE? 59317 . 60400) (XTOUSTRING 60402 . 61095) (UTOXSTRING 61097 .
-61838) (XTOUTF8STRING 61840 . 62914)) (62979 74247 (WRITE-UNICODE-MAPPING 62989 . 66739) (
-WRITE-UNICODE-INCLUDED 66741 . 71463) (WRITE-UNICODE-MAPPING-HEADER 71465 . 72713) (
-WRITE-UNICODE-MAPPING-FILENAME 72715 . 74245)) (74248 74924 (XCCS-UTF8-AFTER-OPEN 74258 . 74922)) (
-77449 79666 (UTF8HEXSTRING 77459 . 79664)) (79693 81735 (SHOWCHARS 79703 . 81733)))))
-STOP
diff --git a/library/UNICODE-TABLES b/library/UNICODE-TABLES
index 71d05c08..cd429286 100644
--- a/library/UNICODE-TABLES
+++ b/library/UNICODE-TABLES
@@ -1,19 +1,22 @@
-(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10 FORMAT UTF-8)
-(FILECREATED "22-Oct-2025 23:28:42" {WMEDLEY}UNICODE-TABLES.;4 34028
+(FILECREATED "22-Feb-2026 10:44:33" {WMEDLEY}UNICODE-TABLES.;20 44960
:EDIT-BY rmk
- :CHANGES-TO (VARS UNICODE-TABLESCOMS)
+ :CHANGES-TO (FNS ALL-UNICODE-MAPPINGS GET-MCCS-UNICODE-MAPPING INVERT-UNICODE-MAPPING
+ MAKE-UNICODE-TRANSLATION-TABLES MERGE-UNICODE-TRANSLATION-TABLES
+ READ-UNICODE-MAPPING-FILENAMES)
+ (VARS UNICODE-TABLESCOMS)
- :PREVIOUS-DATE "16-Oct-2025 16:47:54" {WMEDLEY}UNICODE-TABLES.;3)
+ :PREVIOUS-DATE "22-Feb-2026 09:15:20" {WMEDLEY}UNICODE-TABLES.;16)
(PRETTYCOMPRINT UNICODE-TABLESCOMS)
(RPAQQ UNICODE-TABLESCOMS
[
- (* ;; "Read Unicode mapping tables. A separate file before UNICODE in the loadup, because the tables must be loaded while UTF8TOMCODE and MCODETOUTF8 are still equivalenced to EVQ. This file has to come before UNICODE in the loadup sequence.")
+ (* ;; "This is code for reading/writing the XCCS-to-UNICODE mapping tables. It runs offline, when UNICODE-UTF8 is modified. ")
(COMS (* ; "Read Unicode mapping files")
(INITVARS (UNICODEDIRECTORIES NIL))
@@ -22,22 +25,32 @@
(FNS READ-UNICODE-MAPPING-FILENAMES READ-UNICODE-MAPPING))
(COMS (* ;
"Make translation tables for UTF external formats")
- (FNS MAKE-UNICODE-TRANSLATION-TABLES XCCSTOMCCS-MAPPING
- MERGE-UNICODE-TRANSLATION-TABLES UNICODE.UNMAPPED UNICODE-EXTEND-TRANSLATION?)
+ (FNS MAKE-UNICODE-TRANSLATION-TABLES GET-MCCS-UNICODE-MAPPING INVERT-UNICODE-MAPPING
+ XCCSTOMCCS-MAPPING)
(FNS ALL-UNICODE-MAPPINGS XCCSJAPANESECHARSETS)
- (INITVARS (*MCCSTOUNICODE*)
- (*UNICODETOMCCS*)
- (*MCCS-LOADED-CHARSETS*)
- (*UNICODE-LOADED-CHARSETS*)
- (*LARGEUNICODES*))
- [DECLARE%: DONTEVAL@LOAD DOCOPY (P (MAKE-UNICODE-TRANSLATION-TABLES 'ALL]
+ (COMS (* ; "Write Unicode mapping files")
+ (FNS WRITE-UNICODE-MAPPING WRITE-UNICODE-INCLUDED WRITE-UNICODE-MAPPING-HEADER
+ WRITE-UNICODE-MAPPING-FILENAME)
+ (FNS XCCS-UTF8-AFTER-OPEN)
+
+ (* ;; "Automate dumping of a documentation prefix")
+
+ [DECLARE%: EVAL@COMPILE DONTCOPY (CONSTANTS (MISSINGCODE (CL:PARSE-INTEGER "FFFE"
+ :RADIX 16))
+ (UNDEFINEDCODE (CL:PARSE-INTEGER "FFFF"
+ :RADIX 16]
+ (VARS UNICODE-MAPPING-HEADER))
+ (FNS UTF8HEXSTRING)
+ (COMS (* ; "debugging")
+ (FNS SHOWCHARS)
+ (DECLARE%: DOEVAL@LOAD DONTCOPY (MACROS HEXCHAR OCTALCHAR)))
(DECLARE%: EVAL@COMPILE DONTCOPY (FILES (LOADCOMP)
UNICODE-EXPORTS])
(* ;;
-"Read Unicode mapping tables. A separate file before UNICODE in the loadup, because the tables must be loaded while UTF8TOMCODE and MCODETOUTF8 are still equivalenced to EVQ. This file has to come before UNICODE in the loadup sequence."
+"This is code for reading/writing the XCCS-to-UNICODE mapping tables. It runs offline, when UNICODE-UTF8 is modified. "
)
@@ -94,7 +107,8 @@
(DEFINEQ
(READ-UNICODE-MAPPING-FILENAMES
- [LAMBDA (FILESPEC) (* ; "Edited 16-Oct-2025 16:43 by rmk")
+ [LAMBDA (FILESPEC) (* ; "Edited 21-Feb-2026 18:14 by rmk")
+ (* ; "Edited 16-Oct-2025 16:43 by rmk")
(* ; "Edited 4-Sep-2025 00:11 by rmk")
(* ; "Edited 27-Jan-2025 16:46 by rmk")
(* ; "Edited 21-Jan-2025 22:51 by rmk")
@@ -107,51 +121,47 @@
(* ;; "FILESPEC can be a file name, character-set name, the name of a collection of character sets, an XCCS character code, or a list of those. Maps those into the names of files that contain the indicated Unicode mappings.")
- (CL:REMOVE-DUPLICATES [for F X CSI inside (if (EQ FILESPEC 'ALL)
- then
- (* ;;
+ (for F X CSI inside (if (EQ FILESPEC 'ALL)
+ then
+ (* ;;
"Perhaps should figure out which files in the directories and subdirectories are relevant?")
- (for N in XCCS-CHARSETS
- collect (CAR N))
- else FILESPEC)
- join
- (* ;; "Last case hopes to pick up all the tables that are grouped together in a subdirectory (e.g. if F is JIS)")
+ (for N in XCCS-CHARSETS collect (CAR N))
+ else FILESPEC)
+ join
+ (* ;; "Last case hopes to pick up all the tables that are grouped together in a subdirectory (e.g. if F is JIS)")
- (OR (CL:WHEN (CHARCODEP F) (* ;
+ [OR (CL:WHEN (CHARCODEP F) (* ;
"An XCCS code can retrieve its character set")
- (for D FN (FOCTAL _ (OCTALSTRING (LRSH F 8))) inside
- UNICODEDIRECTORIES
- when (SETQ FN (FILDIR (PACKFILENAME 'DIRECTORY D
- 'BODY
- (CONCAT 'XCCS- FOCTAL
- '=*)
- 'EXTENSION
- 'TXT
- 'VERSION "")))
- do (RETURN FN)))
- (MKLIST (FINDFILE (PACKFILENAME 'BODY F 'EXTENSION 'TXT
- 'VERSION "")
- T UNICODEDIRECTORIES))
- (for D inside UNICODEDIRECTORIES
- when [SETQ $$VAL (OR (FILDIR (PACKFILENAME 'NAME
- (CONCAT "XCCS-*=" F)
- 'EXTENSION
- 'TXT
- 'VERSION "" 'BODY D))
- (FILDIR (PACKFILENAME 'NAME
- (CONCAT "XCCS-" F "=*")
- 'EXTENSION
- 'TXT
- 'VERSION "" 'BODY D]
- do (RETURN $$VAL))
- (AND (SETQ CSI (ASSOC F XCCS-CHARSETS))
- (READ-UNICODE-MAPPING-FILENAMES (CDR CSI)))
- (for D inside UNICODEDIRECTORIES
- when (DIRECTORYNAMEP (SETQ D (CONCAT D ">" F ">")))
- join (FILDIR (CONCAT D ">*.TXT;"]
- :TEST
- (FUNCTION STRING.EQUAL])
+ (for D FN (FOCTAL ↠(OCTALSTRING (LRSH F 8))) inside UNICODEDIRECTORIES
+ when (SETQ FN (DIRECTORY (PACKFILENAME 'DIRECTORY D 'BODY (CONCAT 'XCCS-
+ FOCTAL
+ '=*)
+ 'EXTENSION
+ 'TXT
+ 'VERSION ""))) do (RETURN FN)))
+ (MKLIST (FINDFILE (PACKFILENAME 'BODY F 'EXTENSION 'TXT 'VERSION "")
+ T UNICODEDIRECTORIES))
+ (for D inside UNICODEDIRECTORIES
+ when [SETQ $$VAL (OR (DIRECTORY (PACKFILENAME 'NAME (CONCAT "XCCS-*=" F)
+ 'EXTENSION
+ 'TXT
+ 'VERSION "" 'BODY D))
+ (DIRECTORY (PACKFILENAME 'NAME (CONCAT "XCCS-" F "=*")
+ 'EXTENSION
+ 'TXT
+ 'VERSION "" 'BODY D]
+ do (RETURN $$VAL))
+ (AND (SETQ CSI (ASSOC F XCCS-CHARSETS))
+ (READ-UNICODE-MAPPING-FILENAMES (CDR CSI)))
+ (for D inside UNICODEDIRECTORIES when (DIRECTORYNAMEP (SETQ D
+ (CONCAT D ">" F ">")))
+ join (DIRECTORY (CONCAT D ">*.TXT;"]
+ finally (* ;
+ "CL:REMOVE-DUPLICATES doesn't exist in MAKEINIT")
+ (RETURN (for FTAIL on $$VAL unless (thereis FF in (CDR FTAIL)
+ suchthat (STRING-EQUAL (CAR FTAIL)
+ FF)) collect (CAR FTAIL])
(READ-UNICODE-MAPPING
[LAMBDA (FILESPEC PRINT NOERROR) (* ; "Edited 16-Oct-2025 11:25 by rmk")
@@ -179,7 +189,7 @@
(* ;; "")
(RESETLST
- (for FILE STREAM [SEPBITTABLE _ (MAKEBITTABLE (CHARCODE (TAB SPACE] in (
+ (for FILE STREAM [SEPBITTABLE ↠(MAKEBITTABLE (CHARCODE (TAB SPACE] in (
READ-UNICODE-MAPPING-FILENAMES
FILESPEC)
join
@@ -221,7 +231,8 @@
(DEFINEQ
(MAKE-UNICODE-TRANSLATION-TABLES
- [LAMBDA (MAPPING REINSTALL) (* ; "Edited 11-Oct-2025 11:54 by rmk")
+ [LAMBDA (MAPPING REINSTALL) (* ; "Edited 21-Feb-2026 22:42 by rmk")
+ (* ; "Edited 11-Oct-2025 11:54 by rmk")
(* ; "Edited 4-Sep-2025 00:30 by rmk")
(* ; "Edited 24-Apr-2025 15:47 by rmk")
(* ; "Edited 31-Jan-2025 17:46 by rmk")
@@ -232,26 +243,13 @@
(* ; "Edited 3-Feb-2024 00:24 by rmk")
(* ; "Edited 30-Jan-2024 09:54 by rmk")
(* ; "Edited 21-Aug-2021 13:12 by rmk:")
+ (SETQ MAPPING (GET-MCCS-UNICODE-MAPPING MAPPING))
- (* ;; "MAPPING is the list of numeric code correspondence pairs constructed by applying READ-UNICODE-MAPPING to XCCS-to-Unicode mapping files. This applies the XCCS-to-MCCS translations, and then updates or produces two recoding arrays, one maps left-side codes into right-side codes (e.g. MCCS or ISO8859-1 to Unicode), for printing, the other maps right-side (Unicode) codes to corresponding right-side codes (e.g. MCCS).")
- (* ; "Edited 17-Aug-2020 08:46 by rmk:")
- (CL:UNLESS [AND (LISTP MAPPING)
- (FOR PAIR R IN MAPPING AS I TO 10
- ALWAYS (AND (LISTP PAIR)
- (CHARCODEP (CAR PAIR))
- [FIXP (SETQ R (CAR (MKLIST (CADR PAIR]
- (CHARCODEP (IABS R]
-
- (* ;; "Seems like the argument is not already a list of mapping pairs (perhaps with a combiner), presumably a list of charsets to be read.")
-
- (SETQ MAPPING (READ-UNICODE-MAPPING MAPPING)))
- (SETQ MAPPING (XCCSTOMCCS-MAPPING MAPPING))
-
- (* ;; "This updates or produces two recoding arrays, one maps left-side codes into right-side codes (e.g. XCCS or ISO8859-1 to Unicode), for printing, the other maps right-side (Unicode) codes to corresponding right-side codes (e.g. XCCS).")
+ (* ;; "This updates or produces two recoding arrays, one maps left-side codes into right-side codes (e.g. MCCS to Unicode), for printing, the other maps right-side (Unicode) codes to corresponding right-side codes (e.g. MCCS).")
(* ;; "")
- (* ;; "If REINSTALL is T, the new mapping vectors replace the current maps in the *XCCSTOUNICODE* and *UNICODETOXCCS* global variables. Otherwise we create new tables (mostly for comparison and debugging).")
+ (* ;; "If REINSTALL is T, the new mapping vectors replace the current maps in the *MCCSTOUNICODE* and *UNICODETOMCCS* global variables. Otherwise we create new tables (mostly for comparison and debugging).")
(* ;; "")
@@ -270,6 +268,55 @@
(SETQ *NEXT-PRIVATE-UNICODE* FIRST-PRIVATE-UNICODE))
(MERGE-UNICODE-TRANSLATION-TABLES NIL MAPPING])
+(GET-MCCS-UNICODE-MAPPING
+ [LAMBDA (MAPPING) (* ; "Edited 22-Feb-2026 00:29 by rmk")
+
+ (* ;; "MAPPING is the list of numeric code correspondence pairs mapping MCCS-to-Unicode, or a specification of XCCS-to-Unicode files to be read and converted to MCCS-to-UNICODE.")
+
+ (SORT (if [AND (LISTP MAPPING)
+ (for PAIR R in MAPPING as I to 10
+ always (AND (LISTP PAIR)
+ (CHARCODEP (CAR PAIR))
+ [FIXP (SETQ R (CAR (MKLIST (CADR PAIR]
+ (CHARCODEP (IABS R]
+ then
+ (* ;; "The argument is already a list of MCCS-to-UNICODE mapping pairs")
+
+ MAPPING
+ else
+ (* ;; "Mapping files are is read as XCCS-UNICODE, make it MCCS")
+
+ (XCCSTOMCCS-MAPPING (READ-UNICODE-MAPPING MAPPING)))
+ T])
+
+(INVERT-UNICODE-MAPPING
+ [LAMBDA (MAPPING) (* ; "Edited 22-Feb-2026 00:39 by rmk")
+
+ (* ;; "MAPPING is a list of pairs that map domain codes to range codes (presumably MCCS to UNICODE). This produces an inverted list of pairs that map the range into the domain (Unicode to MCCS) ")
+
+ (LET (INVERTED)
+ (SETQ INVERTED (SORT (for P D R OLDR in MAPPING eachtime (SETQ D (CAR P))
+ (SETQ R (CADR P))
+
+ (* ;;
+ "We don't do combiners, but we are allowing non-SMALLP's")
+ unless (OR (LISTP D)
+ (LISTP R)) collect (LIST R D))
+ T))
+
+ (* ;; "If MAPPING contains two pairs that map to the same U (e.g. (M1 U) and (M2 U)), we want the inverse table to collect them into a single pair (U M1 M2) instead of two pairs (U M1) (U M2), with the lowest M code first. Those pairs represent alternative inverse mappings. There are no duplicates/alternative table entries in the M-to-U direction.")
+
+ (* ;; "The SORT above means that multiple inverted pairs for the same U will be next to each other in the list.")
+
+ [for PTAIL PTAIL2 U MS on INVERTED eachtime (SETQ U (CAAR PTAIL))
+ when (SETQ MS (for old PTAIL2 P2 on PTAIL eachtime (SETQ P2 (CADR PTAIL2))
+ while (EQ U (CAR P2)) collect (CADR P2)))
+ do (RPLACD PTAIL (CDR PTAIL2))
+ (RPLACD (CAR PTAIL)
+ (SORT (CONS (CADR (CAR PTAIL))
+ MS]
+ INVERTED])
+
(XCCSTOMCCS-MAPPING
[LAMBDA (XTOUMAPPING) (* ; "Edited 11-Oct-2025 12:57 by rmk")
@@ -292,152 +339,12 @@
XTOMCODES)))
finally (push XTOUMAPPING (CHARCODE (DEL DEL)))
(RETURN XTOUMAPPING])
-
-(MERGE-UNICODE-TRANSLATION-TABLES
- [LAMBDA (INVERSE MAPPING TABLE INVERSETABLE) (* ; "Edited 11-Oct-2025 10:24 by rmk")
- (* ; "Edited 24-Apr-2025 15:28 by rmk")
- (* ; "Edited 1-Feb-2025 21:42 by rmk")
- (* ; "Edited 26-Jan-2025 12:58 by rmk")
- (* ; "Edited 22-Jan-2025 08:20 by rmk")
- (* ; "Edited 19-Jan-2025 15:58 by rmk")
- (* ; "Edited 18-Jan-2025 11:49 by rmk")
- (* ; "Edited 27-Mar-2024 12:10 by rmk")
- (* ; "Edited 3-Feb-2024 12:46 by rmk")
- (* ; "Edited 31-Jan-2024 10:06 by rmk")
-
- (* ;; "MAPPINGS is a list of pairs that map domain codes to range codes. TABLE and INVERSETABLE default to *MCCSTOUNICODE* *UNICODETOMCCS* respectively. ")
-
- (CL:UNLESS TABLE
- [SETQ TABLE (OR *MCCSTOUNICODE* (SETQ *MCCSTOUNICODE* (HASHARRAY (LENGTH MAPPING])
- (CL:UNLESS INVERSETABLE
- [SETQ INVERSETABLE (OR *UNICODETOMCCS* (SETQ *UNICODETOMCCS* (HASHARRAY (LENGTH MAPPING])
- (for M D R OLDR in MAPPING first (CL:IF INVERSE (swap TABLE INVERSETABLE))
- eachtime (SETQ D (CAR M))
- (SETQ R (CADR M))
-
- (* ;; "We don't do combiners, but we are allowing non-SMALLP's")
- unless (OR (LISTP D)
- (LISTP R)) do
- (* ;; "The (CONS R OLDR) deals with alternatives: (U X1) (U X2) => (U (X1 X2)), lowest code first. Those are only possible in the U-to-X direction when the tables contain (X1 U) and (X2 U). There are no duplicates/alternative table entries in the X-to-U direction.")
-
- (SETQ OLDR (GETHASH D TABLE))
- (CL:UNLESS (MEMB R OLDR)
- (PUTHASH D (SORT (CONS R OLDR))
- TABLE))
- (swap D R)
- (SETQ OLDR (GETHASH D INVERSETABLE))
- (CL:UNLESS (MEMB R OLDR)
- (PUTHASH D (SORT (CONS R OLDR))
- INVERSETABLE)))
- (LIST TABLE INVERSETABLE])
-
-(UNICODE.UNMAPPED
- [LAMBDA (CODE TABLE DONTFAKE) (* ; "Edited 24-Apr-2025 15:48 by rmk")
- (* ; "Edited 22-Jan-2025 08:19 by rmk")
- (* ; "Edited 19-Jan-2025 22:02 by rmk")
- (* ; "Edited 18-Jan-2025 12:02 by rmk")
- (* ; "Edited 2-Feb-2024 23:52 by rmk")
- (* ; "Edited 31-Jan-2024 10:07 by rmk")
- (* ; "Edited 11-Aug-2020 20:23 by rmk:")
-
- (* ;; "This is the slow fall-out when UNICODE.TRANSLATE determines that CODE has no fast mapping in TRANSLATION-TABLE.")
-
- (* ;; "")
-
- (* ;; "If we have not already installed the mapping segment for that code, we try to retrieve it from the numberic file. If that segment mapping doesn't exist or doesn't have an entry for CODE, we fake up a mapping with a negative range in both directions. One way or the other, there will be an entry for that segment in both mapping vectors.")
-
- (* ;; "")
-
- (PROG ((INVERSE (EQ TABLE *UNICODETOMCCS*))
- RANGE HASH)
-
- (* ;; "If we already looked up CODE's character set in a file, then we have already filled in its information in the translation table. If it didn't have a code for a particular character, then we fake it here. Faked codes are negative, so we can detect them easily, and interpret them with IABS.")
-
- (CL:WHEN (AND (UNICODE-EXTEND-TRANSLATION? CODE TABLE)
- (SETQ RANGE (GETHASH CODE TABLE)))
-
- (* ;; "We might have gotten the segment that didn't have an entry for CODE.")
-
- (RETURN RANGE))
-
- (* ;; "")
-
- (CL:UNLESS DONTFAKE
-
- (* ;; "Our attempt at extending the known tables did not provide a mapping for CODE. So we fake it up with the next unused private code in the code space. ")
-
- (* ;; "The number of possible faked mappings is determined by the number of private-use Unicodes, since the MCCS character space is pretty sparse. The codes don't have to come from the same part of the code space, and the NEXTCODEs are saved in global variables. The last available codes are constants.")
-
- (CL:WHEN (IEQP *NEXT-PRIVATE-MCCSCODE* LAST-PRIVATE-MCCSCODE)
- (* ;
- "Same number of available codes both ways")
- (ERROR "EXHAUSTED RANGE FOR UNMAPPED CODES"))
- (if INVERSE
- then (SETQ RANGE *NEXT-PRIVATE-MCCSCODE*)
- (add *NEXT-PRIVATE-MCCSCODE* 1)
- else (SETQ RANGE *NEXT-PRIVATE-UNICODE*)
- (add *NEXT-PRIVATE-UNICODE* 1))
- (MERGE-UNICODE-TRANSLATION-TABLES INVERSE (CONS (LIST CODE RANGE)))
-
- (* ;; "CONS because of LIST convention so we can eventually distinguish combiners.")
-
- (RETURN (CONS RANGE)))])
-
-(UNICODE-EXTEND-TRANSLATION?
- [LAMBDA (CODE TABLE) (* ; "Edited 11-Oct-2025 09:49 by rmk")
- (* ; "Edited 4-Sep-2025 00:34 by rmk")
- (* ; "Edited 29-Jun-2025 16:44 by rmk")
- (* ; "Edited 24-Apr-2025 15:49 by rmk")
- (* ; "Edited 26-Jan-2025 11:26 by rmk")
- (* ; "Edited 21-Jan-2025 22:31 by rmk")
- (* ; "Edited 18-Jan-2025 12:40 by rmk")
- (* ; "Edited 13-Jan-2025 23:50 by rmk")
- (* ; "Edited 26-Aug-2024 16:49 by rmk")
- (* ; "Edited 27-Mar-2024 23:02 by rmk")
- (* ; "Edited 5-Feb-2024 13:48 by rmk")
- (* ; "Edited 3-Feb-2024 12:40 by rmk")
-
- (* ;; "There is currently no mapping for CODE in TABLE, hopefully just because the relevant character-set mapping has not been installed. We infer from TABLE whether CODE is an MCCS or UNICODE code and look for the proper mapping table (forward or inverted) for its character set. ")
-
- (* ;; "We record which character sets we have already expanded so we don't do them again.")
-
- (LET ((CHARSET (\CHARSET CODE))
- (INVERSE (EQ TABLE *UNICODETOMCCS*))
- MAPPING FILE)
-
- (* ;; "If we already looked for CHARSET in the file and found anything, it has already been merged. Otherwise, it would just fail again")
-
- (CL:UNLESS (MEMB CHARSET (CL:IF INVERSE
- *UNICODE-LOADED-CHARSETS*
- *MCCS-LOADED-CHARSETS*))
-
- (* ;; "Don't try this charset again.")
-
- (CL:IF INVERSE
- (push *UNICODE-LOADED-CHARSETS* CHARSET)
- (push *MCCS-LOADED-CHARSETS* CHARSET))
- (SETQ FILE (FINDFILE (CL:IF INVERSE
- 'UNICODE-TO-MCCS-MAPPINGS
- 'MCCS-TO-UNICODE-MAPPINGS)
- T UNICODEDIRECTORIES))
-
- (* ;; "The mappings files are indexed by CHARSET.")
-
- (CL:WHEN [AND FILE (SETQ MAPPING (CL:WITH-OPEN-FILE (STREAM FILE :INPUT)
- (CL:WHEN (FILEPOS (CONCAT "[" CHARSET " ")
- STREAM NIL NIL NIL T)
- (READ STREAM]
-
- (* ;;
- "Merge MAPPING into both tables, respecting the direction indicated by TABLE. ")
-
- (MERGE-UNICODE-TRANSLATION-TABLES INVERSE MAPPING)
- T))])
)
(DEFINEQ
(ALL-UNICODE-MAPPINGS
- [LAMBDA (INVERTED FILE) (* ; "Edited 24-Apr-2025 15:51 by rmk")
+ [LAMBDA (INVERTED FILE) (* ; "Edited 22-Feb-2026 10:42 by rmk")
+ (* ; "Edited 24-Apr-2025 15:51 by rmk")
(* ; "Edited 31-Jan-2025 17:46 by rmk")
(* ; "Edited 26-Jan-2025 13:40 by rmk")
(* ; "Edited 22-Jan-2025 14:07 by rmk")
@@ -453,38 +360,32 @@
(* ;; "The first index level segments all the domain codes according to their character sets. The segments are sorted by character set, the pairs within each segment are sorted by their domain codes. ")
(* ;;
- "E.g. if INVERTED=NIL and given a XCCS code, the lookup for the corresponding Unicode(s) is")
+ "E.g. if INVERTED=NIL and given a MCCS code, the lookup for the corresponding Unicode(s) is")
- (* ;; " (CADR (ASSOC MCCSCODE (\CHARSET MCCSCODE) INDEX)))).")
+ (* ;; " (CAR (GETMULTI INDEX (\CHARSET MCCSCODE) MCCSCODE).")
(* ;; "If FILE is not NIL, the result is written to a file. If FILE is T, the file is either MCCS-TO-UNICODE-MAPPINGS.TXT or UNICODE-TO-MCCS-MAPPINGS.TXT, depending on INVERTED.")
- (LET (INDEX)
- (for PAIR DOMAIN RANGE CHARSET in (READ-UNICODE-MAPPING 'ALL) eachtime (SETQ DOMAIN
- (CAR PAIR))
- (SETQ RANGE (CADR PAIR))
-
- (* ;;
- "(LISTP RANGE) is a combiner, ignored for now.")
- unless (LISTP RANGE) do (CL:WHEN INVERTED (SWAP DOMAIN RANGE))
+ (LET [INDEX (MAPPING (GET-MCCS-UNICODE-MAPPING 'ALL]
+ (for PAIR in (CL:IF INVERTED
+ (INVERT-UNICODE-MAPPING MAPPING)
+ MAPPING) unless (LISTP (CADR PAIR)) do
+ (* ;;
+ "(LISTP (CADR PAIR) is a combiner, ignored for now.")
- (* ;;
+ (* ;;
"One segment for each high-byte character set. This aligns with UNICODE-EXTEND.TRANSLATION?")
- [SETQ CHARSET (OR (ASSOC (\CHARSET DOMAIN)
- INDEX)
- (CAR (push INDEX (CONS (\CHARSET DOMAIN]
+ (* ;; "For alternative mappings (in the U-to-M direction) we end up with (D R1 R2 ...). (CAR (GETMULTI)) is the first (and almost always) the only one.")
- (* ;; "For alternative mappings (in the U-to-M direction) we end up with (D R1 R2 ...). (CADR is the first (and almost always) the only one.")
-
- (pushnew [CDR (OR (ASSOC DOMAIN (CDR CHARSET))
- (CAR (push (CDR CHARSET)
- (CONS DOMAIN]
- RANGE))
+ (PUSHMULTI-NEW INDEX
+ (\CHARSET (CAR PAIR))
+ (CAR PAIR)
+ (CADR PAIR)))
(* ;; "Push the charset mappings down an extra CONS, so that a subsequent READ will get them all after a FILEPOS search for super-paren [")
- [for CS in INDEX do (for M in (CDR CS) when (CDDR M) do
+ (for CS in INDEX do (for M in (CDR CS) when (CDDR M) do
(* ;;
"Sort the range alternatives, if any")
@@ -494,7 +395,7 @@
(* ;; "Sort by domain codes and push down a level")
(change (CDR CS)
- (CONS (SORT DATUM T]
+ (SORT DATUM T)))
(SETQ INDEX (SORT INDEX T)) (* ; "Sort character sets")
(if FILE
then (SETQ FILE (PACKFILENAME 'BODY (if (NEQ FILE T)
@@ -544,18 +445,347 @@
(FULLNAME STREAM))))])
)
-(RPAQ? *MCCSTOUNICODE* )
-(RPAQ? *UNICODETOMCCS* )
-(RPAQ? *MCCS-LOADED-CHARSETS* )
+(* ; "Write Unicode mapping files")
-(RPAQ? *UNICODE-LOADED-CHARSETS* )
+(DEFINEQ
-(RPAQ? *LARGEUNICODES* )
-(DECLARE%: DONTEVAL@LOAD DOCOPY
+(WRITE-UNICODE-MAPPING
+ [LAMBDA (MAPPING INCLUDECHARSETS FILE EMPTYOK) (* ; "Edited 4-Jan-2024 22:44 by rmk")
+ (* ; "Edited 16-Aug-2020 16:56 by rmk:")
-(MAKE-UNICODE-TRANSLATION-TABLES 'ALL)
+ (* ;; "Writes a symbol unicode mapping file. Mapping is a list of (XCCS-code Unicode) pairs, which may contain codes in multiple character sets.")
+
+ (* ;; "If FILE is NIL, it defaults to a name XCCS- followed by the octal character sets in the mapping, in the unicode/XEROX directory.")
+
+ (* ;; "The output lines are of the form x0XXXx0UUUU# Unicode-char")
+
+ (* ;;
+ "If INCLUDECHARSETS=T then the mappings are split up into separate per-character set files.")
+
+ (* ;; "Otherwise, all and only mappings included in thos charsets are included in a single output file--an implicit subset.")
+
+ (IF (AND (EQ INCLUDECHARSETS T)
+ (NULL FILE))
+ THEN (IF MAPPING
+ THEN (FOR CSI F IN XCCS-SET-NAMES WHEN (SETQ F (WRITE-UNICODE-MAPPING MAPPING
+ (CAR CSI)
+ NIL T)) COLLECT F)
+ ELSE (PRINTOUT T "THERE ARE NO MAPPINGS" T)
+ NIL)
+ ELSE
+ (LET
+ (IMAPPING CSETINFO RANGES)
+ (CL:MULTIPLE-VALUE-SETQ (IMAPPING CSETINFO RANGES)
+ (WRITE-UNICODE-INCLUDED MAPPING INCLUDECHARSETS))
+ (IF IMAPPING
+ THEN (CL:WITH-OPEN-FILE
+ (STREAM (WRITE-UNICODE-MAPPING-FILENAME FILE CSETINFO RANGES)
+ :DIRECTION :OUTPUT :IF-EXISTS :NEW-VERSION :EXTERNAL-FORMAT :UTF-8-RAW)
+ (WRITE-UNICODE-MAPPING-HEADER STREAM CSETINFO RANGES)
+ (SORT IMAPPING T)
+ (FOR M CSET LEFTC FIRSTRIGHTC CSI IN IMAPPING
+ DO (SETQ LEFTC (CAR M))
+ (SETQ FIRSTRIGHTC (CADR M))
+ (CL:UNLESS (EQ CSET (LRSH LEFTC 8))
+ (SETQ CSET (LRSH LEFTC 8))
+ (SETQ CSI (ASSOC CSET CSETINFO))
+ (PRINTOUT STREAM T "# " .P2 (CADR CSI)
+ " "
+ (CADDR CSI)
+ T))
+ (PRINTOUT STREAM "0x" (HEXSTRING LEFTC 4)
+ %#
+ (FOR RIGHTC IN (CDR M) DO (PRINTOUT NIL " " "0x" (HEXSTRING RIGHTC 4)))
+ " # "
+ (SELECTC FIRSTRIGHTC
+ (UNDEFINEDCODE
+ (* ;; "FFFF")
+
+ "UNDEFINED")
+ (MISSINGCODE
+ (* ;; "FFFE")
+
+ "MISSING")
+ (IF (ILESSP FIRSTRIGHTC 32)
+ THEN (* ; "Control chars")
+ [CONCAT "↑" (CHARACTER (IPLUS FIRSTRIGHTC (CHARCODE @]
+ ELSE (CHARACTER FIRSTRIGHTC)))
+ T))
+ (FULLNAME STREAM))
+ ELSEIF (NOT EMPTYOK)
+ THEN (PRINTOUT T "THERE ARE NO MAPPINGS")
+ (CL:WHEN INCLUDECHARSETS
+ (PRINTOUT T " FOR " .PPVTL (MKLIST INCLUDECHARSETS)
+ T))
+ NIL])
+
+(WRITE-UNICODE-INCLUDED
+ [LAMBDA (MAPPING INCLUDECHARSETS) (* ; "Edited 4-Aug-2020 17:47 by rmk:")
+
+ (* ;; "CSETINFO is a list of (num string name) for each included character set.")
+
+ (LET (CHARSETS CSETINFO RANGES ICSETS IMAPPING)
+
+ (* ;; "Normalize the INCLUDECHARSETS, then reduce MAPPING to the included mappings")
+
+ [SETQ ICSETS (FOR C POS KNOWN INSIDE (OR INCLUDECHARSETS (FOR CSI IN XCCS-SET-NAMES
+ COLLECT (CAR CSI)))
+ JOIN [SETQ KNOWN (OR (SASSOC C XCCS-SET-NAMES)
+ (FIND N IN XCCS-SET-NAMES
+ SUCHTHAT (EQ C (CADR N)))
+ (HELP "UNKNOWN CHARACTER SET" (OCTALSTRING C]
+ (IF (SETQ POS (STRPOS "-" (CAR KNOWN)))
+ THEN (FOR I FROM (CL:PARSE-INTEGER (SUBSTRING (CAR KNOWN)
+ 1
+ (SUB1 POS))
+ :RADIX 8)
+ TO (CL:PARSE-INTEGER (SUBSTRING (CAR KNOWN)
+ (ADD1 POS))
+ :RADIX 8) COLLECT (LIST I (OCTALSTRING I)
+ (CADR KNOWN)))
+ ELSE (CONS (CONS (CL:PARSE-INTEGER (CAR KNOWN)
+ :RADIX 8)
+ KNOWN]
+ (SETQ IMAPPING (FOR M CSI IN MAPPING WHEN (SETQ CSI (ASSOC (LRSH (CAR M)
+ 8)
+ ICSETS))
+ COLLECT
+
+ (* ;; "The attested subset of INCLUDED")
+
+ (CL:UNLESS (MEMB CSI CSETINFO)
+ (PUSH CSETINFO CSI))
+ M))
+
+ (* ;; "Sort as numbers, not octal strings, then group into consecutive ranges")
+
+ (SETQ CSETINFO (SORT CSETINFO T))
+ [SETQ RANGES (FOR CTAIL C START END ON (FOR CSI IN CSETINFO COLLECT (CAR CSI)) WHILE CTAIL
+ COLLECT (SETQ START (CAR CTAIL))
+ (SETQ END START)
+ (CONS START (WHILE [AND (CDR CTAIL)
+ (EQ END (SUB1 (CADR CTAIL]
+ COLLECT (SETQ CTAIL (CDR CTAIL))
+ (SETQ END (CAR CTAIL]
+
+ (* ;; "Split out groups of less than 3. But if a range exhaustively covers a known subset (like JIS), replace by the name")
+
+ [SETQ RANGES (FOR R STR KNOWN LAST IN RANGES
+ JOIN (SETQ LAST (CAR (LAST R)))
+ (IF (EQ (CAR R)
+ LAST)
+ THEN (CONS (OCTALSTRING (CAR R)))
+ ELSEIF (SETQ KNOWN (SASSOC (SETQ STR (CONCAT (OCTALSTRING
+ (CAR R))
+ "-"
+ (OCTALSTRING LAST)))
+ XCCS-SET-NAMES))
+ THEN (CONS (CADR KNOWN))
+ ELSEIF (CDDR R)
+ THEN (CONS STR)
+ ELSE (LIST (OCTALSTRING (CAR R))
+ (OCTALSTRING LAST]
+ (CL:VALUES IMAPPING CSETINFO RANGES])
+
+(WRITE-UNICODE-MAPPING-HEADER
+ [LAMBDA (STREAM CSETINFO RANGES) (* ; "Edited 5-Jan-2024 13:24 by rmk")
+ (* ; "Edited 4-Aug-2020 17:38 by rmk:")
+
+ (* ;; "Writes the standard per-file header information")
+
+ (FOR LINE IN UNICODE-MAPPING-HEADER
+ DO (PRINTOUT STREAM "#" 2)
+ (SELECTQ LINE
+ (XCCSCHARACTERSETS
+ (PRINTOUT STREAM " XCCS charset")
+ (IF (CDR CSETINFO)
+ THEN (PRINTOUT STREAM "s:" -4)
+ (FOR R IN RANGES DO (PRINTOUT STREAM R " "))
+ ELSE (* ; "Singleton")
+ (PRINTOUT STREAM ": " -4 (CADAR CSETINFO)
+ " "
+ (CADDAR CSETINFO)))
+ (TERPRI STREAM))
+ (DATE (PRINTOUT STREAM " Date:" -13 (DATE (DATEFORMAT NO.TIME NO.LEADING.SPACES)
+ )
+ T))
+ (PRINTOUT STREAM LINE T)))
+ (TERPRI STREAM])
+
+(WRITE-UNICODE-MAPPING-FILENAME
+ [LAMBDA (FILE CSETINFO RANGES) (* ; "Edited 4-Aug-2020 19:34 by rmk:")
+ (PACKFILENAME 'BODY [OR FILE (CONCATLIST
+ (CONS 'XCCS- (IF (CDR CSETINFO)
+ THEN (FOR RTAIL R ON RANGES
+ JOIN (SETQ R (CAR RTAIL))
+ (SETQ R (CL:IF (LISTP R)
+ (LIST (CAR R)
+ "-"
+ (CDR R))
+ (CONS R)))
+ (CL:IF (CDR RTAIL)
+ (NCONC1 R ","))
+ R)
+ ELSE (LIST (CADAR CSETINFO)
+ "="
+ (CADDAR CSETINFO]
+ 'DIRECTORY
+ (CAR UNICODEDIRECTORIES)
+ 'EXTENSION
+ 'TXT])
+)
+(DEFINEQ
+
+(XCCS-UTF8-AFTER-OPEN
+ [LAMBDA (STREAM ACCESS PARAMETERS) (* ; "Edited 3-Jan-2024 10:27 by rmk")
+ (* ; "Edited 13-Aug-2020 11:54 by rmk:")
+
+ (* ;;
+ "If added to STREAM-AFTER-OPEN-FNS, causes mapping files to be opened as UTF-8. For development")
+
+ (CL:WHEN (AND (STRPOS "XCCS-" (U-CASE (FULLNAME STREAM)))
+ [EQ 'TXT (U-CASE (FILENAMEFIELD (FULLNAME STREAM)
+ 'EXTENSION]
+ (NOT (ASSOC 'EXTERNALFORMAT PARAMETERS)))
+ (STREAMPROP STREAM 'EXTERNALFORMAT :UTF-8))])
+)
+
+
+
+(* ;; "Automate dumping of a documentation prefix")
+
+(DECLARE%: EVAL@COMPILE DONTCOPY
+(DECLARE%: EVAL@COMPILE
+
+(RPAQ MISSINGCODE (CL:PARSE-INTEGER "FFFE" :RADIX 16))
+
+(RPAQ UNDEFINEDCODE (CL:PARSE-INTEGER "FFFF" :RADIX 16))
+
+
+(CONSTANTS (MISSINGCODE (CL:PARSE-INTEGER "FFFE" :RADIX 16))
+ (UNDEFINEDCODE (CL:PARSE-INTEGER "FFFF" :RADIX 16)))
+)
+)
+
+(RPAQQ UNICODE-MAPPING-HEADER
+ ("" " Name: XCCS (Version 2.0) to Unicode" " Unicode version: 3.0"
+ XCCSCHARACTERSETS " Table version: 0.1" " Table format: Format A"
+ DATE " Author: Ron Kaplan " ""
+ "This file contains mappings from the Xerox Character Code Standard (version"
+ "2.0, 1990) into Unicode 3.0. standard codes. That is an extension of the"
+ "version of XCCS corresponding to the fonts in the Medley system." ""
+ "The format of this file conforms to the format of the other Unicode-supplied"
+ "mapping files:" " Three white-space (tab or spaces) separated columns:"
+ " Column 1 is the XCCS code (as hex 0xXXXX)"
+ " Column 2 is the corresponding Unicode (as hex 0xXXXX)"
+ " Column 3 (after #) is a comment column. For convenience, it contains the"
+ " Unicode character itself and the Unicode character names when available."
+ "Unicode FFFF is used for undefined XCCS codes (Column 3 = UNDEFINED"
+ "Unicode FFFE is used for XCCS codes that have not yet been filled in."
+ "(Column 3 = MISSING)" "" "This file is encoded in UTF-8, so that the Unicode characters"
+ "are properly displayed in Column 3 and can be edited by standard"
+ "Unicode-enabled editors (e.g. Mac Textedit)." ""
+ "This file can also be read by the function"
+ "READ-UNICODE-MAPPING in the UNICODE Medley library package." ""
+ "The entries are in XCCS order and grouped by character sets. In front of"
+ "the mappings, for convenience, there is a line with the octal XCCS"
+ "character set, after #." ""
+ "Note that a given XCCS code might map to codes in several different Unicode"
+ "positions, since there are repetitions in the Unicode standard." ""
+ "For more details, see the associated README.TXT file." ""
+ "Any comments or problems, contact "))
+(DEFINEQ
+
+(UTF8HEXSTRING
+ [LAMBDA (CHARCODE) (* ; "Edited 10-Aug-2020 08:33 by rmk:")
+
+ (* ;; "Utility to produces the UTF8 hexstring representing CODE")
+
+ (HEXSTRING (IF (ILESSP CHARCODE 128)
+ THEN CHARCODE
+ ELSEIF (ILESSP CHARCODE 2048)
+ THEN (* ; "x800")
+ (LOGOR (LLSH (LOGOR (LLSH 3 6)
+ (LRSH CHARCODE 6))
+ 8)
+ (LOGOR (LLSH 2 6)
+ (LOADBYTE CHARCODE 0 6)))
+ ELSEIF (ILESSP CHARCODE 65536)
+ THEN (* ; "x10000")
+ (LOGOR (LLSH (LOGOR (LLSH 7 5)
+ (LRSH CHARCODE 12))
+ 16)
+ (LLSH (LOGOR (LLSH 2 6)
+ (LOADBYTE CHARCODE 6 6))
+ 8)
+ (LOGOR (LLSH 2 6)
+ (LOADBYTE CHARCODE 0 6)))
+ ELSEIF (ILESSP CHARCODE 2097152)
+ THEN (* ; "x200000")
+ (LOGOR (LLSH (LOGOR (LLSH 15 4)
+ (LRSH CHARCODE 18))
+ 24)
+ (LLSH (LOGOR (LLSH 2 6)
+ (LOADBYTE CHARCODE 12 6))
+ 16)
+ (LLSH (LOGOR (LLSH 2 6)
+ (LOADBYTE CHARCODE 6 6))
+ 8)
+ (LOGOR (LLSH 2 6)
+ (LOADBYTE CHARCODE 0 6)))
+ ELSE (ERROR "CHARCODE too big for UTF8" CHARCODE])
+)
+
+
+
+(* ; "debugging")
+
+(DEFINEQ
+
+(SHOWCHARS
+ [LAMBDA (FONT FROMCHAR TOCHAR ONELINE) (* ; "Edited 5-Oct-2025 17:41 by rmk")
+ (* ; "Edited 7-Sep-2025 20:29 by rmk")
+ (* ; "Edited 2-Sep-2025 10:26 by rmk")
+ (* ; "Edited 24-Jul-2025 11:30 by rmk")
+ (* ; "Edited 8-Jun-2025 20:05 by rmk")
+ (* ; "Edited 26-Jan-2024 14:18 by mth")
+ (* ; "Edited 1-Aug-2020 09:27 by rmk:")
+ [SETQ FONT (FONTCREATE (OR FONT '(CLASSIC 12]
+ (RESETLST
+ [LET ((OLDFONT (DSPFONT NIL T))
+ CHARS)
+ (CL:UNLESS (CHARCODEP FROMCHAR)
+ (SETQ FROMCHAR (OR (CHARCODE.DECODE FROMCHAR T)
+ FROMCHAR)))
+ (SETQ CHARS (if (LISTP FROMCHAR)
+ elseif (CHARCODEP FROMCHAR)
+ then (CL:UNLESS (CHARCODEP TOCHAR)
+ (SETQ TOCHAR (OR (CHARCODE.DECODE TOCHAR)
+ FROMCHAR)))
+ (for C from FROMCHAR to TOCHAR collect C)
+ else (CHCON FROMCHAR)))
+ [RESETSAVE OLDFONT '(PROGN (DSPFONT OLDVALUE]
+ (TERPRI)
+ (for C in CHARS do (PRINTOUT T .FONT OLDFONT (CONCAT (OCTALSTRING (\CHARSET C))
+ ","
+ (OCTALSTRING (\CHAR8CODE C)))
+ 10 .FONT FONT (CHARACTER C))
+ (CL:UNLESS ONELINE (PRINTOUT T T])
+ (TERPRI])
+)
+(DECLARE%: DOEVAL@LOAD DONTCOPY
+(DECLARE%: EVAL@COMPILE
+
+(PUTPROPS HEXCHAR MACRO ((CODE)
+ (HEXSTRING CODE)))
+
+(PUTPROPS OCTALCHAR MACRO [(CODE)
+ (CONCAT (OCTALSTRING (\CHARSET CODE))
+ ","
+ (OCTALSTRING (LOGAND CODE 255])
+)
)
(DECLARE%: EVAL@COMPILE DONTCOPY
@@ -563,9 +793,12 @@
UNICODE-EXPORTS)
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (3341 12542 (READ-UNICODE-MAPPING-FILENAMES 3351 . 8301) (READ-UNICODE-MAPPING 8303 .
-12540)) (12609 26839 (MAKE-UNICODE-TRANSLATION-TABLES 12619 . 16379) (XCCSTOMCCS-MAPPING 16381 . 17598
-) (MERGE-UNICODE-TRANSLATION-TABLES 17600 . 20253) (UNICODE.UNMAPPED 20255 . 23579) (
-UNICODE-EXTEND-TRANSLATION? 23581 . 26837)) (26840 33676 (ALL-UNICODE-MAPPINGS 26850 . 32339) (
-XCCSJAPANESECHARSETS 32341 . 33674)))))
+ (FILEMAP (NIL (4107 12829 (READ-UNICODE-MAPPING-FILENAMES 4117 . 8586) (READ-UNICODE-MAPPING 8588 .
+12827)) (12896 19704 (MAKE-UNICODE-TRANSLATION-TABLES 12906 . 15666) (GET-MCCS-UNICODE-MAPPING 15668
+ . 16688) (INVERT-UNICODE-MAPPING 16690 . 18483) (XCCSTOMCCS-MAPPING 18485 . 19702)) (19705 26328 (
+ALL-UNICODE-MAPPINGS 19715 . 24991) (XCCSJAPANESECHARSETS 24993 . 26326)) (26373 37135 (
+WRITE-UNICODE-MAPPING 26383 . 30127) (WRITE-UNICODE-INCLUDED 30129 . 34441) (
+WRITE-UNICODE-MAPPING-HEADER 34443 . 35691) (WRITE-UNICODE-MAPPING-FILENAME 35693 . 37133)) (37136
+37812 (XCCS-UTF8-AFTER-OPEN 37146 . 37810)) (40337 42426 (UTF8HEXSTRING 40347 . 42424)) (42453 44495 (
+SHOWCHARS 42463 . 44493)))))
STOP
diff --git a/library/UNICODE-TABLES.LCOM b/library/UNICODE-TABLES.LCOM
index d339e038..88ca0dcb 100644
Binary files a/library/UNICODE-TABLES.LCOM and b/library/UNICODE-TABLES.LCOM differ
diff --git a/library/UNICODE.LCOM b/library/UNICODE.LCOM
deleted file mode 100644
index b14e049a..00000000
Binary files a/library/UNICODE.LCOM and /dev/null differ
diff --git a/library/UNIXCOMM b/library/UNIXCOMM
index 02c27436..978d96cf 100644
--- a/library/UNIXCOMM
+++ b/library/UNIXCOMM
@@ -1,14 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED " 2-Sep-2025 12:06:52"
-{DSK}kaplan>Local>medley3.5>working-medley>library>UNIXCOMM.;14 14825
+(FILECREATED " 5-Feb-2026 18:38:23" {WMEDLEY}UNIXCOMM.;15 14717
:EDIT-BY rmk
:CHANGES-TO (FNS FORK-UNIX)
- :PREVIOUS-DATE "29-Apr-2025 22:45:47"
-{DSK}kaplan>Local>medley3.5>working-medley>library>UNIXCOMM.;13)
+ :PREVIOUS-DATE " 2-Sep-2025 12:06:52" {WMEDLEY}UNIXCOMM.;14)
(PRETTYCOMPRINT UNIXCOMMCOMS)
@@ -74,13 +72,11 @@
else (SUBRCALL UNIX-HANDLECOMM 4])
(FORK-UNIX
- [LAMBDA (STR) (* ; "Edited 2-Sep-2025 12:03 by rmk")
+ [LAMBDA (STR) (* ; "Edited 5-Feb-2026 18:38 by rmk")
+ (* ; "Edited 2-Sep-2025 12:03 by rmk")
(* ; "Edited 29-Apr-2025 22:45 by rmk")
(* ; "Edited 25-May-88 15:47 by drc:")
-
- (* ;; "MTOUBYTES converts MCCS codes to Unicodes, and then lays out the bytes of the UTF-8 encoding of those characters. ")
-
- (SUBRCALL UNIX-HANDLECOMM 0 (MTOUTF8STRING (\DTEST STR 'ONED-ARRAY])
+ (SUBRCALL UNIX-HANDLECOMM 0 (MTOSYSSTRING (\DTEST STR 'ONED-ARRAY])
(UNIX-KILL
[LAMBDA (CONN) (* ; "Edited 25-May-88 16:04 by drc:")
@@ -321,10 +317,10 @@
(PUTPROPS UNIXCOMM FILETYPE COMPILE-FILE)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (1903 7339 (FORK-SHELL 1913 . 3110) (FORK-UNIX 3112 . 3659) (UNIX-KILL 3661 . 3850) (
-UNIX-WRITE 3852 . 4563) (CREATE-SHELL-STREAM 4565 . 5449) (CREATE-PROCESS-STREAM 5451 . 6290) (
-UNIXCOMM-AROUNDEXITFN 6292 . 7337)) (7387 12578 (INITIALIZE-SHELL-DEVICE 7397 . 8825) (
-UNIX-GET-NEXT-BUFFER 8827 . 11027) (UNIX-BACKFILEPTR 11029 . 11441) (UNIX-STREAM-EOFP 11443 . 11924) (
-UNIX-STREAM-OUT 11926 . 12182) (UNIX-STREAM-CLOSE 12184 . 12576)) (12826 14532 (
-CREATE-UNIX-SOCKET-STREAM 12836 . 13642) (ACCEPT-UNIX-SOCKET-STREAM 13644 . 14530)))))
+ (FILEMAP (NIL (1821 7231 (FORK-SHELL 1831 . 3028) (FORK-UNIX 3030 . 3551) (UNIX-KILL 3553 . 3742) (
+UNIX-WRITE 3744 . 4455) (CREATE-SHELL-STREAM 4457 . 5341) (CREATE-PROCESS-STREAM 5343 . 6182) (
+UNIXCOMM-AROUNDEXITFN 6184 . 7229)) (7279 12470 (INITIALIZE-SHELL-DEVICE 7289 . 8717) (
+UNIX-GET-NEXT-BUFFER 8719 . 10919) (UNIX-BACKFILEPTR 10921 . 11333) (UNIX-STREAM-EOFP 11335 . 11816) (
+UNIX-STREAM-OUT 11818 . 12074) (UNIX-STREAM-CLOSE 12076 . 12468)) (12718 14424 (
+CREATE-UNIX-SOCKET-STREAM 12728 . 13534) (ACCEPT-UNIX-SOCKET-STREAM 13536 . 14422)))))
STOP
diff --git a/library/UNIXCOMM.DFASL b/library/UNIXCOMM.DFASL
new file mode 100644
index 00000000..119a6d03
Binary files /dev/null and b/library/UNIXCOMM.DFASL differ
diff --git a/library/UNIXPRINT b/library/UNIXPRINT
index c637e5cb..9be14555 100644
--- a/library/UNIXPRINT
+++ b/library/UNIXPRINT
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "25-Jan-2026 11:09:09" {WMEDLEY}UNIXPRINT.;15 11553
+(FILECREATED " 5-Feb-2026 18:37:09" {WMEDLEY}UNIXPRINT.;17 11663
:EDIT-BY rmk
- :CHANGES-TO (FNS UnixPrint)
+ :CHANGES-TO (FNS UnixShellQuote)
- :PREVIOUS-DATE "18-Jan-2026 08:44:40" {WMEDLEY}UNIXPRINT.;14)
+ :PREVIOUS-DATE "25-Jan-2026 11:09:09" {WMEDLEY}UNIXPRINT.;15)
(PRETTYCOMPRINT UNIXPRINTCOMS)
@@ -130,7 +130,8 @@
(UnixShellQuote
[LAMBDA (STRING)
- (DECLARE (LOCALVARS . T)) (* ; "Edited 18-Jan-2026 08:34 by rmk")
+ (DECLARE (LOCALVARS . T)) (* ; "Edited 5-Feb-2026 18:37 by rmk")
+ (* ; "Edited 18-Jan-2026 08:34 by rmk")
(* ; "Edited 19-Apr-89 21:14 by TAL")
(LET* ((X (CHCON STRING))
(CT X)
@@ -155,9 +156,9 @@
(CHARCODE SPACE))
(T C))
(SETQ CT (CDR CT]
- (MTOUTF8STRING (COND
- (FLG (CONCATCODES X))
- (T STRING])
+ (MTOSYSSTRING (CL:IF FLG
+ (CONCATCODES X)
+ STRING)])
(UnixTempFile
[LAMBDA (Prefix DontOpen) (* ; "Edited 28-Apr-93 13:49 by rmk:")
@@ -251,6 +252,6 @@
(ADDTOVAR LAMA )
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (1046 10887 (UnixPrint 1056 . 6392) (UnixShellQuote 6394 . 7977) (UnixTempFile 7979 .
-9202) (UnixPrintCommand 9204 . 10885)))))
+ (FILEMAP (NIL (1051 10997 (UnixPrint 1061 . 6397) (UnixShellQuote 6399 . 8087) (UnixTempFile 8089 .
+9312) (UnixPrintCommand 9314 . 10995)))))
STOP
diff --git a/library/UNIXPRINT.DFASL b/library/UNIXPRINT.DFASL
index 6b582ab0..8338e31b 100644
Binary files a/library/UNIXPRINT.DFASL and b/library/UNIXPRINT.DFASL differ
diff --git a/library/lafite/LAFITE-INDENT b/library/lafite/LAFITE-INDENT
index c6f15824..70948f71 100644
--- a/library/lafite/LAFITE-INDENT
+++ b/library/lafite/LAFITE-INDENT
@@ -1,13 +1,10 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "15-Feb-2025 14:11:54" {WMEDLEY}lafite>LAFITE-INDENT.;4 26926
+(FILECREATED "18-Feb-2026 15:47:08" {WMEDLEY}LAFITE>LAFITE-INDENT.;2 26210
:EDIT-BY rmk
- :CHANGES-TO (FNS TEDIT-INDENT-BREAK-LONG-LINES TEDIT-INDENT-SELECTION TEDIT-OPEN-LINE
- TEDIT-MAKE-LINES-EXPLICIT TEDIT-INDENT-SET-INDENT)
-
- :PREVIOUS-DATE "15-Feb-2025 09:21:58" {WMEDLEY}lafite>LAFITE-INDENT.;3)
+ :PREVIOUS-DATE "22-Jan-87 01:34:36" {WMEDLEY}LAFITE>LAFITE-INDENT.;1)
(PRETTYCOMPRINT LAFITE-INDENTCOMS)
@@ -133,10 +130,14 @@
max-length max-length])
(TEDIT-INDENT-BREAK-LONG-LINES
- [LAMBDA (text-stream explicit-paragraph-breaks?) (* ; "Edited 15-Feb-2025 14:07 by rmk")
- (* smL "21-Jan-87 16:03")
-
-(* ;;; "Break the current selection into explicit lines, each having no more than *TEDIT-INDENT-LINE-LENGTH* characters. --- If the flag *TEDIT-INDENT-KEEP-LINE-BREAKS* is false, existing line breaks in the current selection are removed. --- This is intended to be used in Lafite, where one wants to indent a piece of a forwarded document, but can be used in any TEdit document")
+ [LAMBDA (text-stream explicit-paragraph-breaks?) (* smL "21-Jan-87 16:03")
+
+ (* * Break the current selection into explicit lines, each having no more than
+ *TEDIT-INDENT-LINE-LENGTH* characters. -
+ If the flag *TEDIT-INDENT-KEEP-LINE-BREAKS* is false, existing line breaks in
+ the current selection are removed. -
+ This is intended to be used in Lafite, where one wants to indent a piece of a
+ forwarded document, but can be used in any TEdit document)
(LET ((selection (TEDIT.GETSEL text-stream)))
(TEDIT-INDENT-REPLACE-SELECTION
@@ -144,13 +145,11 @@
(CONCATLIST (for string on (TEDIT-INDENT-SEPERATE-PARAGRAPHS (TEDIT.SEL.AS.STRING
text-stream selection)
explicit-paragraph-breaks?)
- bind [hanging-indent _ (AND [NOT (EQP (GETLD (CAR (GETSEL selection L1))
- LCHAR1)
- (TEDIT.SELPROP selection 'CH#]
- (DIFFERENCE (TEDIT.SELPROP selection
- 'CH#)
- (GETLD (CAR (GETSEL selection L1))
- LCHAR1]
+ bind [hanging-indent _
+ (AND (NOT (EQP (fetch CHAR1 of (CAR (fetch L1 of selection)))
+ (fetch CH# of selection)))
+ (DIFFERENCE (fetch CH# of selection)
+ (fetch CHAR1 of (CAR (fetch L1 of selection]
join (PROG1 (LIST (TEDIT-INDENT-ADD-INDENTATION (CAR string)
"" *TEDIT-INDENT-LINE-LENGTH* hanging-indent)
*eol-string*)
@@ -185,10 +184,15 @@
'RIGHT])
(TEDIT-INDENT-SELECTION
- [LAMBDA (text-stream explicit-paragraph-breaks?) (* ; "Edited 15-Feb-2025 14:07 by rmk")
- (* smL "21-Jan-87 16:00")
-
-(* ;;; "Indent the current selection by prefacing each line with the value of *TEDIT-INDENT-STRING*, and inserting line breaks after each *TEDIT-INDENT-LINE-LENGTH* characters. --- If the flag *TEDIT-INDENT-KEEP-LINE-BREAKS* is false, existing line breaks in the current selection are removed. --- This is intended to be used in Lafite, where one wants to indent a piece of a forwarded document, but can be used in any TEdit document")
+ [LAMBDA (text-stream explicit-paragraph-breaks?) (* smL "21-Jan-87 16:00")
+
+ (* * Indent the current selection by prefacing each line with the value of
+ *TEDIT-INDENT-STRING*, and inserting line breaks after each
+ *TEDIT-INDENT-LINE-LENGTH* characters. -
+ If the flag *TEDIT-INDENT-KEEP-LINE-BREAKS* is false, existing line breaks in
+ the current selection are removed. -
+ This is intended to be used in Lafite, where one wants to indent a piece of a
+ forwarded document, but can be used in any TEdit document)
(LET ((selection (TEDIT.GETSEL text-stream)))
(TEDIT-INDENT-REPLACE-SELECTION
@@ -196,13 +200,11 @@
(CONCATLIST (for string on (TEDIT-INDENT-SEPERATE-PARAGRAPHS (TEDIT.SEL.AS.STRING
text-stream selection)
explicit-paragraph-breaks?)
- bind [hanging-indent _ (AND [NOT (EQP (GETLD (CAR (GETSEL selection L1))
- LCHAR1)
- (TEDIT.SELPROP selection 'CH#]
- (DIFFERENCE (TEDIT.SELPROP selection
- 'CH#)
- (GETLD (CAR (GETSEL selection L1))
- LCHAR1]
+ bind [hanging-indent _
+ (AND (NOT (EQP (fetch CHAR1 of (CAR (fetch L1 of selection)))
+ (fetch CH# of selection)))
+ (DIFFERENCE (fetch CH# of selection)
+ (fetch CHAR1 of (CAR (fetch L1 of selection]
join (PROG1 (LIST (TEDIT-INDENT-ADD-INDENTATION (CAR string)
*TEDIT-INDENT-STRING* *TEDIT-INDENT-LINE-LENGTH*
hanging-indent)
@@ -232,19 +234,18 @@
else (\TEDIT-INDENT-SEPERATE-PARAGRAPHS string NIL])
(TEDIT-INDENT-SET-INDENT
- [LAMBDA (text-stream) (* ; "Edited 15-Feb-2025 09:21 by rmk")
- (* smL "12-Sep-86 17:09")
+ [LAMBDA (text-stream) (* smL "12-Sep-86 17:09")
+
+ (* * Prompt the user for a new indentation string)
-(* ;;; "Prompt the user for a new indentation string")
-
- (LET* ((window (\TEDIT.PRIMARYPANE text-stream))
+ (LET* ((window (fetch \WINDOW of (TEXTOBJ text-stream)))
(pwindow (if window
then (GETPROMPTWINDOW (if (LISTP window)
then (CAR window)
else window))
else PROMPTWINDOW)))
(CLEARW pwindow)
- (SETQ *TEDIT-INDENT-STRING* (PROMPTFORWORD "New indent string: " *TEDIT-INDENT-STRING* NIL
+ (SETQ *TEDIT-INDENT-STRING* (PROMPTFORWORD "New indent string: " *TEDIT-INDENT-STRING* NIL
pwindow NIL NIL (LIST (CHARCODE EOL])
(TEDIT-INDENT-STRIP-INDENTATION
@@ -269,34 +270,36 @@
else string])
(TEDIT-MAKE-LINES-EXPLICIT
- [LAMBDA (text-stream) (* ; "Edited 15-Feb-2025 09:20 by rmk")
- (* smL " 8-Sep-86 18:20")
-
-(* ;;; "Take the current selection and replace all TEdit end-of-lines with explicit line breaks. --- This is intended to be used in Lafite, where it is sometimes nice to know that anyone receiving the msg will see the same line breaks that you see. see, but can be used in any TEdit document")
+ [LAMBDA (text-stream) (* smL " 8-Sep-86 18:20")
+
+ (* * Take the current selection and replace all TEdit end-of-lines with
+ explicit line breaks. -
+ This is intended to be used in Lafite, where it is sometimes nice to know that
+ anyone receiving the msg will see the same line breaks that you see.
+ see, but can be used in any TEdit document)
(LET ((selection (TEDIT.GETSEL text-stream)))
- [for i in (bind (this-line _ (CAR (GETSEL selection L1)))
- [last-line _ (CAR (LAST (GETSEL selection LN]
- repeatuntil (PROGN (SETQ this-line (GETLD this-line NEXTLINE))
- (EQ this-line last-line)) collect (GETLD this-line LCHARLIM)
- ) do (TEDIT.SETSEL text-stream i 1 'LEFT T)
- (TEDIT.INSERT text-stream (CONSTANT (CHARACTER (CHARCODE EOL]
+ [for i in (bind (this-line _ (CAR (fetch L1 of selection)))
+ [last-line _ (CAR (LAST (fetch LN of selection]
+ repeatuntil (PROGN (SETQ this-line (fetch NEXTLINE of this-line))
+ (EQ this-line last-line)) collect (fetch CHARLIM
+ of this-line))
+ do (TEDIT.SETSEL text-stream i 1 'LEFT T)
+ (TEDIT.INSERT text-stream (CONSTANT (CHARACTER (CHARCODE EOL]
(TEDIT.SETSEL text-stream selection NIL 'RIGHT])
(TEDIT-OPEN-LINE
- [LAMBDA (text-stream) (* ; "Edited 15-Feb-2025 14:09 by rmk")
- (* smL "17-Sep-86 11:13")
-
-(* ;;; "Open a new line at the current position.")
+ [LAMBDA (text-stream) (* smL "17-Sep-86 11:13")
+
+ (* * Open a new line at the current position.)
(LET ((selection (TEDIT.GETSEL text-stream)))
- (TEDIT.INSERT text-stream (CONCAT *eol-string* (ALLOCSTRING
- (DIFFERENCE (TEDIT.SELPROP selection
- 'CH#)
- (GETLD (CAR (GETSEL selection L1))
- LCHAR1))
- " ")))
- (if (ZEROP (TEDIT.SELPROP selection 'LENGTH))
+ (TEDIT.INSERT text-stream (CONCAT *eol-string*
+ (ALLOCSTRING [DIFFERENCE (fetch CH# of selection)
+ (fetch CHAR1
+ of (CAR (fetch L1 of selection]
+ " ")))
+ (if (ZEROP (fetch DCH of selection))
then (TEDIT.SETSEL text-stream selection])
(TEDIT-REMOVE-INDENT
@@ -433,12 +436,12 @@
"Break long lines by inserting explicit 's"
]
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (4363 24314 (TEDIT-INDENT-ADD-INDENTATION 4373 . 6941) (TEDIT-INDENT-BREAK-LINE 6943 .
-8876) (TEDIT-INDENT-BREAK-LONG-LINES 8878 . 10828) (TEDIT-INDENT-FIND-BREAKPOINT 10830 . 11653) (
-TEDIT-INDENT-REPLACE-SELECTION 11655 . 12212) (TEDIT-INDENT-SELECTION 12214 . 14283) (
-TEDIT-INDENT-SELECTION-KEEPING-LINEBREAKS 14285 . 14564) (TEDIT-INDENT-SEPERATE-PARAGRAPHS 14566 .
-15295) (TEDIT-INDENT-SET-INDENT 15297 . 16143) (TEDIT-INDENT-STRIP-INDENTATION 16145 . 17365) (
-TEDIT-MAKE-LINES-EXPLICIT 17367 . 18517) (TEDIT-OPEN-LINE 18519 . 19453) (TEDIT-REMOVE-INDENT 19455 .
-20225) (\TEDIT-INDENT-COUNT-SPACES 20227 . 20828) (\TEDIT-INDENT-FIND-PARAGRAPH-END 20830 . 21801) (
-\TEDIT-INDENT-SEPERATE-LINES 21803 . 22601) (\TEDIT-INDENT-SEPERATE-PARAGRAPHS 22603 . 24312)))))
+ (FILEMAP (NIL (4193 23598 (TEDIT-INDENT-ADD-INDENTATION 4203 . 6771) (TEDIT-INDENT-BREAK-LINE 6773 .
+8706) (TEDIT-INDENT-BREAK-LONG-LINES 8708 . 10475) (TEDIT-INDENT-FIND-BREAKPOINT 10477 . 11300) (
+TEDIT-INDENT-REPLACE-SELECTION 11302 . 11859) (TEDIT-INDENT-SELECTION 11861 . 13762) (
+TEDIT-INDENT-SELECTION-KEEPING-LINEBREAKS 13764 . 14043) (TEDIT-INDENT-SEPERATE-PARAGRAPHS 14045 .
+14774) (TEDIT-INDENT-SET-INDENT 14776 . 15550) (TEDIT-INDENT-STRIP-INDENTATION 15552 . 16772) (
+TEDIT-MAKE-LINES-EXPLICIT 16774 . 17979) (TEDIT-OPEN-LINE 17981 . 18737) (TEDIT-REMOVE-INDENT 18739 .
+19509) (\TEDIT-INDENT-COUNT-SPACES 19511 . 20112) (\TEDIT-INDENT-FIND-PARAGRAPH-END 20114 . 21085) (
+\TEDIT-INDENT-SEPERATE-LINES 21087 . 21885) (\TEDIT-INDENT-SEPERATE-PARAGRAPHS 21887 . 23596)))))
STOP
diff --git a/library/lafite/LAFITE-INDENT.LCOM b/library/lafite/LAFITE-INDENT.LCOM
index 21cd24f7..3f36b45a 100644
Binary files a/library/lafite/LAFITE-INDENT.LCOM and b/library/lafite/LAFITE-INDENT.LCOM differ
diff --git a/library/lafite/LAFITE-PRIVATEDL b/library/lafite/LAFITE-PRIVATEDL
index a6c0c484..b4c5e2af 100644
--- a/library/lafite/LAFITE-PRIVATEDL
+++ b/library/lafite/LAFITE-PRIVATEDL
@@ -1,30 +1,28 @@
-(DEFINE-FILE-INFO §READTABLE "INTERLISP" §PACKAGE "INTERLISP")
-(FILECREATED "19-Jan-87 23:56:51" {ERIS}LISPCORE>LAFITEPRIVATEDL.;1 10080
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
- previous date%: "19-Jan-87 23:47:54" {PHYLUM}KOTO>LAFITEPRIVATEDL.;2)
+(FILECREATED "18-Feb-2026 15:50:14" {WMEDLEY}lafite>LAFITE-PRIVATEDL.;2 9719
+
+ :EDIT-BY rmk
+
+ :CHANGES-TO (FNS \GV.PARSERECIPIENTS1 \GV.PARSE.PRIVATE.DISTRIBUTION.LIST))
-(* "
-Copyright (c) 1986, 1987 by Xerox Corporation. All rights reserved.
-")
+(PRETTYCOMPRINT LAFITE-PRIVATEDLCOMS)
-(PRETTYCOMPRINT LAFITEPRIVATEDLCOMS)
-
-(RPAQQ LAFITEPRIVATEDLCOMS ((* * LAFITEDL.EXT is the default extension for dl files when no extension
- is specified)
- (* * LAFITEDLDIRECTORIES is a list of directories to be searched after
- the connected directory and the LAFITEDEFAULTHOST&DIR in order to
- locate a dl file when no host or directory is specified)
- (INITVARS (LAFITEDL.EXT 'DL)
- (LAFITEDLDIRECTORIES NIL))
- (* * no functions are user callable)
- (FNS \GV.PARSERECIPIENTS1 \GV.PARSE.PRIVATE.DISTRIBUTION.LIST)
- (* Lafite's readtable for parsing addresses needs to have CR as a
- SEPRCHAR so that lines from a text file can all be parsed at once.
- This has no effect on normal operation since before private dls no CR
- was ever passed to the parser)
- (P (SETSYNTAX (CHARCODE CR)
- 'SEPRCHAR ADDRESSPARSERRDTBL))))
+(RPAQQ LAFITE-PRIVATEDLCOMS
+ ((* * LAFITEDL.EXT is the default extension for dl files when no extension is specified)
+ (* * LAFITEDLDIRECTORIES is a list of directories to be searched after the connected
+ directory and the LAFITEDEFAULTHOST&DIR in order to locate a dl file when no host or
+ directory is specified)
+ (INITVARS (LAFITEDL.EXT 'DL)
+ (LAFITEDLDIRECTORIES NIL))
+ (* * no functions are user callable)
+ (FNS \GV.PARSERECIPIENTS1 \GV.PARSE.PRIVATE.DISTRIBUTION.LIST)
+ (* Lafite's readtable for parsing addresses needs to have CR as a SEPRCHAR so that lines from
+ a text file can all be parsed at once. This has no effect on normal operation since before
+ private dls no CR was ever passed to the parser)
+ (P (SETSYNTAX (CHARCODE CR)
+ 'SEPRCHAR ADDRESSPARSERRDTBL))))
(* * LAFITEDL.EXT is the default extension for dl files when no extension is specified)
(* * LAFITEDLDIRECTORIES is a list of directories to be searched after the connected directory and the
@@ -39,7 +37,7 @@ Copyright (c) 1986, 1987 by Xerox Corporation. All rights reserved.
(DEFINEQ
(\GV.PARSERECIPIENTS1
- [LAMBDA (FIELD REGISTRY INTERNALFLG EDITWINDOW) (* N.H.Briggs "19-Jan-87 23:44")
+ [LAMBDA (FIELD REGISTRY INTERNALFLG EDITWINDOW) (* N.H.Briggs "19-Jan-87 23:44")
(* ;;; "INTERNALFLG = T means produce addresses to give Grapevine; NIL means give human-readable addresses")
@@ -73,8 +71,8 @@ Copyright (c) 1986, 1987 by Xerox Corporation. All rights reserved.
(CHARCODE %"))
(HELP]
(OR REGISTRY (SETQ REGISTRY DEFAULTREGISTRY))
-
- (* ;; "first just collect all the atoms using a special readtable ")
+
+ (* ;; "first just collect all the atoms using a special readtable ")
(SETQ ADDRESSES (when (SETQ ADDR (until (OR (EOFP FIELDSTREAM)
(EQ (SETQ TOKEN (READ FIELDSTREAM
@@ -107,14 +105,13 @@ Copyright (c) 1986, 1987 by Xerox Corporation. All rights reserved.
(EQ (CADDR ADDRESS)
';))
then
-
- (* ;; "it's a private dl --- foo:;")
+ (* ;; "it's a private dl --- foo:;")
- (\GV.PARSE.PRIVATE.DISTRIBUTION.LIST ADDRESS REGISTRY INTERNALFLG
+ (\GV.PARSE.PRIVATE.DISTRIBUTION.LIST ADDRESS REGISTRY INTERNALFLG
EDITWINDOW)
else
-
- (* ;; "ADDRESS will only get rebound if there is an address with <>'s in it ")
+ (* ;;
+ "ADDRESS will only get rebound if there is an address with <>'s in it ")
(SETQ VALIDRECIPIENT (\GV.PARSE.SINGLE.ADDRESS
(COND
@@ -128,8 +125,8 @@ Copyright (c) 1986, 1987 by Xerox Corporation. All rights reserved.
((OR T INTERNALFLG (NULL REALADDRESS))
VALIDRECIPIENT)
(T
-
- (* ;; "Need to figure out how to make GETREGISTRY of this work, and remove duplicates in MAKEANSWERFORM before we can enable this")
+
+ (* ;; "Need to figure out how to make GETREGISTRY of this work, and remove duplicates in MAKEANSWERFORM before we can enable this")
(\GV.REPACKADDRESS (APPEND (LDIFF ADDRESS OPEN)
(LIST '< VALIDRECIPIENT
@@ -137,7 +134,7 @@ Copyright (c) 1986, 1987 by Xerox Corporation. All rights reserved.
(CDR CLOSE])
(\GV.PARSE.PRIVATE.DISTRIBUTION.LIST
- [LAMBDA (DL REGISTRY INTERNALFLG EDITWINDOW) (* N.H.Briggs "19-Jan-87 23:45")
+ [LAMBDA (DL REGISTRY INTERNALFLG EDITWINDOW) (* N.H.Briggs "19-Jan-87 23:45")
(LET* [(FILENAME (FINDFILE (PACKFILENAME.STRING 'BODY (CAR DL)
'EXTENSION LAFITEDL.EXT)
T
@@ -162,10 +159,10 @@ Copyright (c) 1986, 1987 by Xerox Corporation. All rights reserved.
file can all be parsed at once. This has no effect on normal operation since before private dls no CR
was ever passed to the parser)
+
(SETSYNTAX (CHARCODE CR)
'SEPRCHAR ADDRESSPARSERRDTBL)
-(PUTPROPS LAFITEPRIVATEDL COPYRIGHT ("Xerox Corporation" 1986 1987))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (1965 9682 (\GV.PARSERECIPIENTS1 1975 . 8562) (\GV.PARSE.PRIVATE.DISTRIBUTION.LIST 8564
- . 9680)))))
+ (FILEMAP (NIL (1617 9389 (\GV.PARSERECIPIENTS1 1627 . 8273) (\GV.PARSE.PRIVATE.DISTRIBUTION.LIST 8275
+ . 9387)))))
STOP
diff --git a/library/lafite/LAFITE-PRIVATEDL.LCOM b/library/lafite/LAFITE-PRIVATEDL.LCOM
new file mode 100644
index 00000000..9792b71a
Binary files /dev/null and b/library/lafite/LAFITE-PRIVATEDL.LCOM differ
diff --git a/library/sketch/SKETCH b/library/sketch/SKETCH
index 9feb5bf9..2935c983 100644
--- a/library/sketch/SKETCH
+++ b/library/sketch/SKETCH
@@ -1,13 +1,10 @@
-(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10 FORMAT UTF-8)
-(FILECREATED "24-Dec-2025 14:48:39" {WMEDLEY}SKETCH>SKETCH.;16 491600
+(FILECREATED "19-Feb-2026 22:27:48" {WMEDLEY}sketch>SKETCH.;17 509947
:EDIT-BY rmk
- :CHANGES-TO (VARS SKETCHCOMS)
- (FNS SK.INCLUDE.FILE SK.GET.IMAGEOBJ.FROM.FILE SKETCH.PUT SKETCH.FLUSH.EXISTING)
-
- :PREVIOUS-DATE "30-Nov-2025 10:10:57" {WMEDLEY}SKETCH>SKETCH.;11)
+ :PREVIOUS-DATE "24-Dec-2025 14:48:39" {WMEDLEY}sketch>SKETCH.;16)
(PRETTYCOMPRINT SKETCHCOMS)
@@ -285,7 +282,7 @@
(T ""))
" then type 'RETURN'.
-To abort loading the new version of Sketch, type '^'."])
+To abort loading the new version of Sketch, type '↑'."])
)
)
(DECLARE%: FIRST DOCOPY DONTEVAL@LOAD
@@ -300,18 +297,17 @@ To abort loading the new version of Sketch, type '^'."])
(DEFINEQ
(SKETCH.FROM.A.FILE
- [LAMBDA NIL (* rrb "24-Jun-86 11:40")
-
- (* reads a file name from the user and calls sketch on it.)
-
+ [LAMBDA NIL (* rrb "24-Jun-86 11:40")
+ (* reads a file name from the user and
+ calls sketch on it.)
(PROG ((NAME (PopUpWindowAndGetAtom "Sketch file name: ")))
(RETURN (AND NAME (SKETCH NAME])
(SK.PUT.ON.FILE
[LAMBDA (SKETCHW) (* ; "Edited 6-Apr-87 18:18 by rrb")
(* saves a sketch on a Tedit file.)
-
- (* also changes the name of the sketch to be the same as the name of the file.)
+
+ (* also changes the name of the sketch to be the same as the name of the file.)
(PROG ((SKETCH (INSURE.SKETCH (SKETCH.FROM.VIEWER SKETCHW)))
NOWNAME NEWNAME TEXTSTREAM)
@@ -321,10 +317,8 @@ To abort loading the new version of Sketch, type '^'."])
(RETURN NIL))
(SETQ NEWNAME (SKETCH.PUT NEWNAME SKETCH SKETCHW))
[COND
- ((AND NEWNAME (NEQ NOWNAME NEWNAME))
-
- (* change the name of the sketch to be the same as the file name.)
-
+ ((AND NEWNAME (NEQ NOWNAME NEWNAME)) (* change the name of the sketch to be
+ the same as the file name.)
(replace (SKETCH SKETCHNAME) of SKETCH with NEWNAME)
(* change the titles of the viewers
onto this sketch.)
@@ -461,15 +455,14 @@ To abort loading the new version of Sketch, type '^'."])
(RETURN (IMAGEOBJPROP IMAGEOBJ 'OBJECTDATUM])
(SK.GET.FROM.FILE
- [LAMBDA (SKETCHW) (* rrb " 1-Oct-86 18:24")
-
- (* retrieves a sketch from a file clobbering any existing sketch.)
-
+ [LAMBDA (SKETCHW) (* rrb " 1-Oct-86 18:24")
+ (* retrieves a sketch from a file
+ clobbering any existing sketch.)
(COND
((SK.CONFIRM.DESTRUCTION SKETCHW "Press LEFT to delete current elements before GET.")
-
- (* put the delete on the history list so that it can be undone.
- This leaves the gotten file there as well but seems better than nothing.)
+
+ (* put the delete on the history list so that it can be undone.
+ This leaves the gotten file there as well but seems better than nothing.)
(SK.DELETE.ELEMENT2 (fetch (SKETCH SKETCHELTS) of (INSURE.SKETCH SKETCHW))
SKETCHW)
@@ -479,21 +472,19 @@ To abort loading the new version of Sketch, type '^'."])
(T (STATUSPRINT SKETCHW "GET aborted. The INCLUDE subcommand to GET doesn't delete."])
(SKETCH.GET
- [LAMBDA (FILENAME VIEWER) (* rrb "29-Jan-86 11:21")
+ [LAMBDA (FILENAME VIEWER) (* rrb "29-Jan-86 11:21")
(* reads a sketch from a file.)
(fetch (SKETCHIMAGEOBJ SKIO.SKETCH) of (SK.GET.IMAGEOBJ.FROM.FILE FILENAME VIEWER])
)
(DEFINEQ
(SKETCH
- [LAMBDA (SKETCH WINDOW) (* rrb "17-Sep-86 10:21")
+ [LAMBDA (SKETCH WINDOW) (* rrb "17-Sep-86 10:21")
(* opens a sketch window onto the
sketch SKETCH)
(COND
- [(AND SKETCH (LITATOM SKETCH))
-
- (* assume its a filename Get the region and scale from the file.)
-
+ [(AND SKETCH (LITATOM SKETCH)) (* assume its a filename Get the
+ region and scale from the file.)
(PROG ((SKIMAGEOBJ (SK.GET.IMAGEOBJ.FROM.FILE SKETCH))
SCREENREG READSKETCH)
(SETQ SCREENREG (SK.SCALE.REGION (fetch (SKETCHIMAGEOBJ SKIO.REGION) of SKIMAGEOBJ)
@@ -517,14 +508,145 @@ To abort loading the new version of Sketch, type '^'."])
NIL NIL T T])
(SKETCHW.CREATE
-(LAMBDA (SKETCH SKETCHREGION SCREENREGION TITLE INITIALSCALE BRINGUPMENU INITIALGRID) (* ; "Edited 25-Apr-88 15:18 by drc:") (* ;;; "creates a sketch window and returns it.") (PROG (W SCALE SKPROC SKETCHSTRUCTURE) (SETQ SKETCHSTRUCTURE (SK.CHECK.SKETCH.VERSION (COND ((NULL SKETCH) (SKETCH.CREATE NIL)) ((LITATOM SKETCH) (* ; "treat it like a file name") (SKETCH.GET SKETCH)) ((type? SKETCH SKETCH) SKETCH) ((type? IMAGEOBJ SKETCH) (* ; "pull things out of the image object.") (SETQ SKPROC (IMAGEOBJPROP SKETCH (QUOTE OBJECTDATUM))) (OR (REGIONP SKETCHREGION) (SETQ SKETCHREGION (fetch (SKETCHIMAGEOBJ SKIO.REGION) of SKPROC))) (OR (NUMBERP INITIALSCALE) (SETQ INITIALSCALE (fetch (SKETCHIMAGEOBJ SKIO.SCALE) of SKPROC))) (OR (NUMBERP INITIALGRID) (SETQ INITIALGRID (fetch (SKETCHIMAGEOBJ SKIO.GRID) of SKPROC))) (fetch (SKETCHIMAGEOBJ SKIO.SKETCH) of SKPROC)) ((AND (LITATOM (CAR SKETCH)) (for ELT in (CDR SKETCH) always (GLOBALELEMENTP ELT))) (* ; "old form, probably written out by notecards, update to new form.") (PROG (X) (SETQ X (SKIO.UPDATE.FROM.OLD.FORM SKETCH)) (* ; "smash sketch so this won't have to happen every time.") (RPLACA SKETCH (CAR X)) (RPLACD SKETCH (CDR X)) (RETURN X))) (T (\ILLEGAL.ARG SKETCH))))) (SETQ W (COND ((WINDOWP SCREENREGION) (AND TITLE (WINDOWPROP SCREENREGION (QUOTE TITLE) TITLE)) SCREENREGION) (T (CREATEW (COND ((REGIONP SCREENREGION)) (T (CREATEREGION LASTMOUSEX LASTMOUSEY 20 20))) (OR TITLE (SK.WINDOW.TITLE SKETCHSTRUCTURE)) NIL T)))) (SK.SET.UP.MENUS W (NOT (OPENWP SCREENREGION)) BRINGUPMENU) (COND ((OR (REGIONP SCREENREGION) (WINDOWP SCREENREGION)) (* ; "user gave a region, don't interact") NIL) (T (* ; "let prompting for reshape show room for both menu and window.") (SHAPEW W))) (* ;; "set the right margin so that text will never run into it. This can be removed when character positions are kept in points so \DSPPRINTCHAR doesn't have to look at the right margin.") (DSPRIGHTMARGIN 64000 W) (WINDOWPROP W (QUOTE SKETCH) SKETCHSTRUCTURE) (WINDOWPROP W (QUOTE SCALE) (SETQ SCALE (COND ((NUMBERP INITIALSCALE)) ((REGIONP SKETCHREGION) (* ; "determine the scale and offsets so that the given region of the sketch fits into the given window.") (FQUOTIENT (fetch (REGION HEIGHT) of SKETCHREGION) (fetch (REGION HEIGHT) of (DSPCLIPPINGREGION NIL W)))) ((NULL SKETCHREGION) INITIAL.SCALE) (T (\ILLEGAL.ARG SKETCHREGION))))) (* ; "check to make sure a context exists on the sketch because before July 1985 it didn't exist.") (WINDOWPROP W (QUOTE SKETCHCONTEXT) (OR (GETSKETCHPROP SKETCHSTRUCTURE (QUOTE SKETCHCONTEXT)) (PUTSKETCHPROP SKETCHSTRUCTURE (QUOTE SKETCHCONTEXT) (CREATE.DEFAULT.SKETCH.CONTEXT)))) (COND ((REGIONP SKETCHREGION) (* ; "if given a region, translate to it.") (WXOFFSET (IMINUS (FIX (QUOTIENT (fetch (REGION LEFT) of SKETCHREGION) SCALE))) W) (WYOFFSET (IMINUS (FIX (QUOTIENT (fetch (REGION BOTTOM) of SKETCHREGION) SCALE))) W))) (SK.UPDATE.REGION.VIEWED W) (* ; "calculate the sketch region being viewed before mapping the sketch into it.") (MAP.SKETCHSPEC.INTO.VIEWER SKETCHSTRUCTURE W) (SK.CREATE.HOTSPOT.CACHE W) (WINDOWPROP W (QUOTE GRIDFACTOR) (COND ((NUMBERP INITIALGRID) (LEASTPOWEROF2GT INITIALGRID)) (T (SK.DEFAULT.GRIDFACTOR W)))) (WINDOWPROP W (QUOTE USEGRID) (COND (INITIALGRID T))) (WINDOWPROP W (QUOTE BUTTONEVENTFN) (FUNCTION WB.BUTTON.HANDLER)) (WINDOWPROP W (QUOTE COPYBUTTONEVENTFN) (FUNCTION SK.COPY.BUTTONEVENTFN)) (WINDOWPROP W (QUOTE COPYINSERTFN) (FUNCTION SK.COPY.INSERTFN)) (WINDOWPROP W (QUOTE RIGHTBUTTONFN) (FUNCTION WB.BUTTON.HANDLER)) (WINDOWPROP W (QUOTE CURSOROUTFN) (FUNCTION SKETCHW.OUTFN)) (WINDOWPROP W (QUOTE REPAINTFN) (FUNCTION SKETCHW.REPAINTFN)) (WINDOWADDPROP W (QUOTE RESHAPEFN) (FUNCTION SKETCHW.RESHAPEFN)) (WINDOWADDPROP W (QUOTE SHRINKFN) (FUNCTION SK.RETURN.TTY)) (WINDOWPROP W (QUOTE ICONFN) (FUNCTION SK.SHRINK.ICONCREATE)) (WINDOWADDPROP W (QUOTE EXPANDFN) (FUNCTION SK.TAKE.TTY)) (WINDOWPROP W (QUOTE SCROLLFN) (FUNCTION SKETCHW.SCROLLFN)) (WINDOWPROP W (QUOTE HARDCOPYFN) (FUNCTION SKETCHW.HARDCOPYFN)) (* ; "I'm not sure why this ever gets called but it did once so to be sure, turn it off.") (WINDOWPROP W (QUOTE PAGEFULLFN) (FUNCTION NILL)) (WINDOWPROP W (QUOTE PROCESS) (SETQ SKPROC (ADD.PROCESS (LIST (FUNCTION WB.EDITOR) (KWOTE W)) (QUOTE RESTARTABLE) T (QUOTE TTYENTRYFN) (QUOTE SK.TTYENTRYFN) (QUOTE TTYEXITFN) (QUOTE SK.TTYEXITFN)))) (WINDOWPROP W (QUOTE SCROLLEXTENTUSE) T) (WINDOWADDPROP W (QUOTE CLOSEFN) (FUNCTION SKETCHW.CLOSEFN) T) (OPENW W) (ADD.SKETCH.VIEWER SKETCHSTRUCTURE W) (SKETCHW.REPAINTFN W) (RETURN W)))
-)
+ [LAMBDA (SKETCH SKETCHREGION SCREENREGION TITLE INITIALSCALE BRINGUPMENU INITIALGRID)
+ (* ; "Edited 25-Apr-88 15:18 by drc:")
+
+(* ;;; "creates a sketch window and returns it.")
+
+ (PROG (W SCALE SKPROC SKETCHSTRUCTURE)
+ [SETQ SKETCHSTRUCTURE (SK.CHECK.SKETCH.VERSION (COND
+ ((NULL SKETCH)
+ (SKETCH.CREATE NIL))
+ ((LITATOM SKETCH)
+ (* ; "treat it like a file name")
+ (SKETCH.GET SKETCH))
+ ((type? SKETCH SKETCH)
+ SKETCH)
+ ((type? IMAGEOBJ SKETCH)
+ (* ;
+ "pull things out of the image object.")
+ (SETQ SKPROC (IMAGEOBJPROP SKETCH
+ 'OBJECTDATUM))
+ (OR (REGIONP SKETCHREGION)
+ (SETQ SKETCHREGION
+ (fetch (SKETCHIMAGEOBJ SKIO.REGION)
+ of SKPROC)))
+ (OR (NUMBERP INITIALSCALE)
+ (SETQ INITIALSCALE
+ (fetch (SKETCHIMAGEOBJ SKIO.SCALE)
+ of SKPROC)))
+ (OR (NUMBERP INITIALGRID)
+ (SETQ INITIALGRID
+ (fetch (SKETCHIMAGEOBJ SKIO.GRID)
+ of SKPROC)))
+ (fetch (SKETCHIMAGEOBJ SKIO.SKETCH)
+ of SKPROC))
+ ((AND (LITATOM (CAR SKETCH))
+ (for ELT in (CDR SKETCH)
+ always (GLOBALELEMENTP ELT)))
+ (* ;
+ "old form, probably written out by notecards, update to new form.")
+ (PROG (X)
+ (SETQ X (SKIO.UPDATE.FROM.OLD.FORM
+ SKETCH))
+ (* ;
+ "smash sketch so this won't have to happen every time.")
+ (RPLACA SKETCH (CAR X))
+ (RPLACD SKETCH (CDR X))
+ (RETURN X)))
+ (T (\ILLEGAL.ARG SKETCH]
+ [SETQ W (COND
+ ((WINDOWP SCREENREGION)
+ (AND TITLE (WINDOWPROP SCREENREGION 'TITLE TITLE))
+ SCREENREGION)
+ (T (CREATEW (COND
+ ((REGIONP SCREENREGION))
+ (T (CREATEREGION LASTMOUSEX LASTMOUSEY 20 20)))
+ (OR TITLE (SK.WINDOW.TITLE SKETCHSTRUCTURE))
+ NIL T]
+ (SK.SET.UP.MENUS W (NOT (OPENWP SCREENREGION))
+ BRINGUPMENU)
+ (COND
+ ((OR (REGIONP SCREENREGION)
+ (WINDOWP SCREENREGION)) (* ;
+ "user gave a region, don't interact")
+ NIL)
+ (T (* ;
+ "let prompting for reshape show room for both menu and window.")
+ (SHAPEW W)))
+
+ (* ;; "set the right margin so that text will never run into it. This can be removed when character positions are kept in points so \DSPPRINTCHAR doesn't have to look at the right margin.")
+
+ (DSPRIGHTMARGIN 64000 W)
+ (WINDOWPROP W 'SKETCH SKETCHSTRUCTURE)
+ [WINDOWPROP W 'SCALE (SETQ SCALE (COND
+ ((NUMBERP INITIALSCALE))
+ [(REGIONP SKETCHREGION)
+ (* ;
+ "determine the scale and offsets so that the given region of the sketch fits into the given window.")
+ (FQUOTIENT (fetch (REGION HEIGHT) of SKETCHREGION)
+ (fetch (REGION HEIGHT) of (DSPCLIPPINGREGION
+ NIL W]
+ ((NULL SKETCHREGION)
+ INITIAL.SCALE)
+ (T (\ILLEGAL.ARG SKETCHREGION]
+ (* ;
+ "check to make sure a context exists on the sketch because before July 1985 it didn't exist.")
+ [WINDOWPROP W 'SKETCHCONTEXT (OR (GETSKETCHPROP SKETCHSTRUCTURE 'SKETCHCONTEXT)
+ (PUTSKETCHPROP SKETCHSTRUCTURE 'SKETCHCONTEXT (
+ CREATE.DEFAULT.SKETCH.CONTEXT
+ ]
+ (COND
+ ((REGIONP SKETCHREGION) (* ;
+ "if given a region, translate to it.")
+ (WXOFFSET (IMINUS (FIX (QUOTIENT (fetch (REGION LEFT) of SKETCHREGION)
+ SCALE)))
+ W)
+ (WYOFFSET (IMINUS (FIX (QUOTIENT (fetch (REGION BOTTOM) of SKETCHREGION)
+ SCALE)))
+ W)))
+ (SK.UPDATE.REGION.VIEWED W) (* ;
+ "calculate the sketch region being viewed before mapping the sketch into it.")
+ (MAP.SKETCHSPEC.INTO.VIEWER SKETCHSTRUCTURE W)
+ (SK.CREATE.HOTSPOT.CACHE W)
+ [WINDOWPROP W 'GRIDFACTOR (COND
+ ((NUMBERP INITIALGRID)
+ (LEASTPOWEROF2GT INITIALGRID))
+ (T (SK.DEFAULT.GRIDFACTOR W]
+ (WINDOWPROP W 'USEGRID (COND
+ (INITIALGRID T)))
+ (WINDOWPROP W 'BUTTONEVENTFN (FUNCTION WB.BUTTON.HANDLER))
+ (WINDOWPROP W 'COPYBUTTONEVENTFN (FUNCTION SK.COPY.BUTTONEVENTFN))
+ (WINDOWPROP W 'COPYINSERTFN (FUNCTION SK.COPY.INSERTFN))
+ (WINDOWPROP W 'RIGHTBUTTONFN (FUNCTION WB.BUTTON.HANDLER))
+ (WINDOWPROP W 'CURSOROUTFN (FUNCTION SKETCHW.OUTFN))
+ (WINDOWPROP W 'REPAINTFN (FUNCTION SKETCHW.REPAINTFN))
+ (WINDOWADDPROP W 'RESHAPEFN (FUNCTION SKETCHW.RESHAPEFN))
+ (WINDOWADDPROP W 'SHRINKFN (FUNCTION SK.RETURN.TTY))
+ (WINDOWPROP W 'ICONFN (FUNCTION SK.SHRINK.ICONCREATE))
+ (WINDOWADDPROP W 'EXPANDFN (FUNCTION SK.TAKE.TTY))
+ (WINDOWPROP W 'SCROLLFN (FUNCTION SKETCHW.SCROLLFN))
+ (WINDOWPROP W 'HARDCOPYFN (FUNCTION SKETCHW.HARDCOPYFN))
+ (* ;
+ "I'm not sure why this ever gets called but it did once so to be sure, turn it off.")
+ (WINDOWPROP W 'PAGEFULLFN (FUNCTION NILL))
+ [WINDOWPROP W 'PROCESS (SETQ SKPROC (ADD.PROCESS (LIST (FUNCTION WB.EDITOR)
+ (KWOTE W))
+ 'RESTARTABLE T 'TTYENTRYFN 'SK.TTYENTRYFN
+ 'TTYEXITFN
+ 'SK.TTYEXITFN]
+ (WINDOWPROP W 'SCROLLEXTENTUSE T)
+ (WINDOWADDPROP W 'CLOSEFN (FUNCTION SKETCHW.CLOSEFN)
+ T)
+ (OPENW W)
+ (ADD.SKETCH.VIEWER SKETCHSTRUCTURE W)
+ (SKETCHW.REPAINTFN W)
+ (RETURN W])
(SKETCH.RESET
- [LAMBDA (SKETCH) (* rrb "11-Dec-85 11:24")
-
- (* resets a sketch structure and all of the viewers onto it.)
-
+ [LAMBDA (SKETCH) (* rrb "11-Dec-85 11:24")
+ (* resets a sketch structure and all
+ of the viewers onto it.)
(PROG ((SKSTRUC (INSURE.SKETCH SKETCH))) (* delete all sketch elements)
(replace (SKETCH SKETCHTCELL) of SKSTRUC with (CONS))
(for VIEWER in (ALL.SKETCH.VIEWERS SKSTRUC) do (SKED.CLEAR.SELECTION VIEWER)
@@ -541,19 +663,18 @@ To abort loading the new version of Sketch, type '^'."])
(WINDOWPROP VIEWER 'SKETCHCHANGED NIL])
(SKETCHW.FIG.CHANGED
- [LAMBDA (W) (* rrb "29-Nov-84 17:59")
-
- (* W is a sketch window that is being reshaped.
- Mark this fact in case it came out of a document.)
+ [LAMBDA (W) (* rrb "29-Nov-84 17:59")
+
+ (* W is a sketch window that is being reshaped.
+ Mark this fact in case it came out of a document.)
(OR (WINDOWPROP W 'SKETCHCHANGED)
(WINDOWPROP W 'SKETCHCHANGED 'OLD])
(SK.WINDOW.TITLE
- [LAMBDA (SKETCH) (* rrb " 7-May-85 14:00")
-
- (* returns the window title of a window onto a sketch.)
-
+ [LAMBDA (SKETCH) (* rrb " 7-May-85 14:00")
+ (* returns the window title of a
+ window onto a sketch.)
(COND
((fetch (SKETCH SKETCHNAME) of SKETCH)
(CONCAT "Viewer onto " (fetch (SKETCH SKETCHNAME) of SKETCH)))
@@ -561,23 +682,22 @@ To abort loading the new version of Sketch, type '^'."])
(EDITSLIDE
[LAMBDA (SKETCH LANDSCAPE) (* ; "Edited 20-Feb-87 10:44 by rrb")
-
- (* creates a sketch in a window the size of a screen.)
-
+ (* creates a sketch in a window the
+ size of a screen.)
(SKETCHW.CREATE SKETCH NIL (COND
(LANDSCAPE (GETBOXREGION 780 612))
(T (GETBOXREGION 612 770)))
NIL NIL T 16.0])
(EDITSKETCH
- [LAMBDA (SLIDENAME) (* rrb "14-Nov-84 17:15")
+ [LAMBDA (SLIDENAME) (* rrb "14-Nov-84 17:15")
(* edits a named sketch)
(SKETCHW.CREATE (SETQ SLIDENAME (OR SLIDENAME (GENSYM "SLIDE")))
NIL NIL NIL NIL T 16.0)
SLIDENAME])
(ADD.SKETCH.TO.VIEWER
- [LAMBDA (SKETCHTOADD VIEWER ABOUTDEFAULTS?) (* rrb "20-Mar-86 15:55")
+ [LAMBDA (SKETCHTOADD VIEWER ABOUTDEFAULTS?) (* rrb "20-Mar-86 15:55")
(* adds the element in SKETCHTOADD to
the sketch TOSKETCH)
(PROG ([ADDSKETCH (COND
@@ -594,12 +714,12 @@ To abort loading the new version of Sketch, type '^'."])
(COND
((OR (NULL ABOUTDEFAULTS?)
(MENU (create MENU
- ITEMS _ '((Yes T "Will use the defaults of the retrieved sketch."
+ ITEMS ↠'((Yes T "Will use the defaults of the retrieved sketch."
)
(No NIL "Will not change the defaults."))
- CENTERFLG _ T
- TITLE _ "Use the defaults from the retrieved sketch?"
- MENUCOLUMNS _ 2)))
+ CENTERFLG ↠T
+ TITLE ↠"Use the defaults from the retrieved sketch?"
+ MENUCOLUMNS ↠2)))
(PUTSKETCHPROP TOSKETCH 'SKETCHCONTEXT DEFAULTS)
(WINDOWPROP VIEWER 'SKETCHCONTEXT DEFAULTS]
(SK.ADD.ELEMENTS.TO.SKETCH (fetch (SKETCH SKETCHELTS) of ADDSKETCH)
@@ -614,12 +734,12 @@ To abort loading the new version of Sketch, type '^'."])
(PUTSKETCHPROP TOSKETCH SKPROP (GETSKETCHPROP ADDSKETCH SKPROP])
(SK.ADD.ELEMENTS.TO.SKETCH
- [LAMBDA (ELTS SKW) (* rrb "10-Mar-86 16:50")
+ [LAMBDA (ELTS SKW) (* rrb "10-Mar-86 16:50")
(* adds a list of elements to a sketch)
(for ELT in ELTS do
-
- (* clear the priority so that they get a priority based on their position in
- the new sketch.)
+
+ (* clear the priority so that they get a priority based on their position in the
+ new sketch.)
(SK.SET.ELEMENT.PRIORITY ELT NIL)
(SK.ADD.ELEMENT ELT SKW])
@@ -630,7 +750,7 @@ To abort loading the new version of Sketch, type '^'."])
(* ; "allows the user to set a default")
(* allows the user to set a default)
(\CURSOR.IN.MIDDLE.MENU (create MENU
- ITEMS _ '[(Line SKETCH.SET.BRUSH.SIZE
+ ITEMS ↠'[(Line SKETCH.SET.BRUSH.SIZE
"Sets the characteristics of the default brush."
(SUBITEMS (Size SKETCH.SET.BRUSH.SIZE
"Sets the size of the default brush"
@@ -708,16 +828,16 @@ To abort loading the new version of Sketch, type '^'."])
("All figures" SK.SET.FEEDBACK.ALWAYS
"Most elements are shown while they are being entered.
This will be slow for arcs and curves."]
- CENTERFLG _ T
- WHENSELECTEDFN _ (FUNCTION SK.POPUP.SELECTIONFN)
- MENUFONT _ (FONTPROP (FONTCREATE BOLDFONT)
+ CENTERFLG ↠T
+ WHENSELECTEDFN ↠(FUNCTION SK.POPUP.SELECTIONFN)
+ MENUFONT ↠(FONTPROP (FONTCREATE BOLDFONT)
'SPEC])
(SK.POPUP.SELECTIONFN
- [LAMBDA (ITEM MENU) (* rrb " 3-Sep-85 14:27")
-
- (* * calls the function appropriate for the item selected from the command menu
- associated with a figure window.)
+ [LAMBDA (ITEM MENU) (* rrb " 3-Sep-85 14:27")
+
+ (* * calls the function appropriate for the item selected from the command menu
+ associated with a figure window.)
(* uses SKW freely from enclosing call
to MENU.)
(CLOSEPROMPTWINDOW SKW)
@@ -725,16 +845,16 @@ This will be slow for arcs and curves."]
SKW])
(GETSKETCHWREGION
- [LAMBDA (SKETCHWINDOW) (* rrb "11-Jul-86 15:48")
+ [LAMBDA (SKETCHWINDOW) (* rrb "11-Jul-86 15:48")
(UNSCALE.REGION (GETWREGION SKETCHWINDOW)
(VIEWER.SCALE SKETCHWINDOW])
(SK.ADD.ELEMENT
- [LAMBDA (GELT SKETCHW DONTCLEARCURSOR GROUPFLG DONTCALLWHENADDEDFN)
+ [LAMBDA (GELT SKETCHW DONTCLEARCURSOR GROUPFLG DONTCALLWHENADDEDFN)
(* rrb "30-Aug-86 15:08")
-
- (* adds a new element to a sketch window and handles propagation to all other
- figure windows)
+
+ (* adds a new element to a sketch window and handles propagation to all other
+ figure windows)
(COND
(GELT (PROG ([GELTTOADD (COND
@@ -755,24 +875,24 @@ This will be slow for arcs and curves."]
(RETURN ADDEDELT])
(SK.ADD.PRIORITY.ELEMENT.TO.SKETCH
- [LAMBDA (SKETCH ELEMENT PRIORITY) (* rrb "10-Mar-86 18:48")
-
- (* * adds an element to a sketch at its place according to PRIORITY.)
+ [LAMBDA (SKETCH ELEMENT PRIORITY) (* rrb "10-Mar-86 18:48")
+
+ (* * adds an element to a sketch at its place according to PRIORITY.)
(PROG ((SKELTSCELL (fetch (SKETCH SKETCHTCELL) of SKETCH)))
(RETURN (COND
([OR (NULL (CAR SKELTSCELL))
(NOT (LESSP PRIORITY (SK.ELEMENT.PRIORITY (CADR SKELTSCELL]
-
- (* special cases of no elements or this element being greater than any others.
- This means the other part of the COND doesn't have to worry about the TCONC
- format.)
+
+ (* special cases of no elements or this element being greater than any others.
+ This means the other part of the COND doesn't have to worry about the TCONC
+ format.)
(TCONC SKELTSCELL ELEMENT))
[(LESSP PRIORITY (SK.ELEMENT.PRIORITY (CAAR SKELTSCELL)))
-
- (* special check for first element. This allows the others to be handled by
- replacing the tail of the element before.)
+
+ (* special check for first element. This allows the others to be handled by
+ replacing the tail of the element before.)
(RPLACA SKELTSCELL (CONS ELEMENT (CAR SKELTSCELL]
(T (for SKELTTAIL on (CAR SKELTSCELL) when (LESSP PRIORITY (SK.ELEMENT.PRIORITY
@@ -781,41 +901,40 @@ This will be slow for arcs and curves."]
(RETURN ELEMENT])
(SK.ELTS.BY.PRIORITY
- [LAMBDA (GELTA GELTB) (* rrb "10-Mar-86 17:57")
-
- (* * sort function for sketch global elements that sorts by priority.)
+ [LAMBDA (GELTA GELTB) (* rrb "10-Mar-86 17:57")
+
+ (* * sort function for sketch global elements that sorts by priority.)
(ILESSP (SK.ELEMENT.PRIORITY GELTA)
(SK.ELEMENT.PRIORITY GELTB])
(SK.ORDER.ELEMENTS
- [LAMBDA (GSKETCHELEMENTS) (* rrb "10-Mar-86 16:30")
-
- (* * puts a list of sketch global elements in order by priority.)
+ [LAMBDA (GSKETCHELEMENTS) (* rrb "10-Mar-86 16:30")
+
+ (* * puts a list of sketch global elements in order by priority.)
(SORT GSKETCHELEMENTS (FUNCTION SK.ELTS.BY.PRIORITY])
(SK.ADD.PRIORITY.LOCAL.ELEMENT.TO.SKETCH
- [LAMBDA (LOCALSKETCHELTS LOCALELEMENT) (* rrb "26-Mar-86 10:21")
-
- (* * adds an element to a sketch at its place according to PRIORITY.)
+ [LAMBDA (LOCALSKETCHELTS LOCALELEMENT) (* rrb "26-Mar-86 10:21")
+
+ (* * adds an element to a sketch at its place according to PRIORITY.)
(PROG [(PRIORITY (SK.ELEMENT.PRIORITY (fetch (SCREENELT GLOBALPART) of LOCALELEMENT]
(RETURN (COND
([OR (NULL (CDAR LOCALSKETCHELTS))
(NOT (LESSP PRIORITY (SK.ELEMENT.PRIORITY (fetch (SCREENELT GLOBALPART)
of (CADR LOCALSKETCHELTS]
-
- (* special cases of no elements in which case the local elements has only a
- name or this element being greater than any others.
- This means the other part of the COND doesn't have to worry about the TCONC
- format.)
+
+ (* special cases of no elements in which case the local elements has only a name
+ or this element being greater than any others.
+ This means the other part of the COND doesn't have to worry about the TCONC
+ format.)
(TCONC LOCALSKETCHELTS LOCALELEMENT))
- (T
-
- (* the first element of LOCALSKETCHELTS is the name of the sketch.)
-
+ (T (* the first element of
+ LOCALSKETCHELTS is the name of the
+ sketch.)
(for SKELTTAIL on (CAR LOCALSKETCHELTS)
when [LESSP PRIORITY (SK.ELEMENT.PRIORITY (fetch (SCREENELT GLOBALPART)
of (CADR SKELTTAIL]
@@ -823,21 +942,20 @@ This will be slow for arcs and curves."]
(RETURN LOCALELEMENT])
(SK.ADD.ELEMENTS
- [LAMBDA (ELEMENTS SKW) (* rrb "10-Mar-86 17:57")
-
- (* adds a list of global elements to a viewer but doesn't make an entry on the
- history list.)
-
- (* sorts the elements so that their relative priority remains the same.)
+ [LAMBDA (ELEMENTS SKW) (* rrb "10-Mar-86 17:57")
+ (* adds a list of global elements to a viewer but doesn't make an entry on the
+ history list.)
+ (* sorts the elements so that their
+ relative priority remains the same.)
(for ELT in (SK.ORDER.ELEMENTS ELEMENTS) do (SK.SET.ELEMENT.PRIORITY ELT NIL)
(SK.ADD.ELEMENT ELT SKW])
(SK.CHECK.WHENADDEDFN
- [LAMBDA (VIEWER GELT) (* rrb "19-Oct-85 17:36")
-
- (* checks if the sketch has a when added fn and if so, calls it and interprets
- the result. Returns a list of the elements that should be deleted.)
+ [LAMBDA (VIEWER GELT) (* rrb "19-Oct-85 17:36")
+
+ (* checks if the sketch has a when added fn and if so, calls it and interprets
+ the result. Returns a list of the elements that should be deleted.)
(PROG ((SKETCH (INSURE.SKETCH VIEWER))
ADDFN RESULT)
@@ -853,34 +971,32 @@ This will be slow for arcs and curves."]
(T (RETURN GELT])
(SK.APPLY.MENU.COMMAND
- [LAMBDA (COMMAND SKETCHW) (* rrb " 3-Jan-85 13:17")
-
- (* calls the function appropriate for the item selected from the command menu
- associated with a figure window.)
-
- (* This is a separate function so it can be called by both pop up and fixed
- menu operations.)
+ [LAMBDA (COMMAND SKETCHW) (* rrb " 3-Jan-85 13:17")
+
+ (* calls the function appropriate for the item selected from the command menu
+ associated with a figure window.)
+
+ (* This is a separate function so it can be called by both pop up and fixed menu
+ operations.)
(COND
((NULL COMMAND)
NIL)
- ((type? SKETCHTYPE COMMAND)
-
- (* if the selected item is an element type, add an instance.)
-
+ ((type? SKETCHTYPE COMMAND) (* if the selected item is an element
+ type, add an instance.)
(SKETCHW.ADD.INSTANCE COMMAND SKETCHW))
[(LISTP COMMAND) (* EVAL it)
(EVAL (APPEND COMMAND (CONS (KWOTE SKETCHW]
(T (APPLY* COMMAND SKETCHW])
(SK.DELETE.ELEMENT1
- [LAMBDA (OLDGELT SKETCHW GROUPFLG) (* rrb "19-Oct-85 17:09")
-
- (* deletes an element to a sketch window and handles propagation to all other
- figure windows)
-
- (* GROUPFLG indicates that this is part of a group operation and hence display
- and image object deleted fns don't need to be called.)
+ [LAMBDA (OLDGELT SKETCHW GROUPFLG) (* rrb "19-Oct-85 17:09")
+
+ (* deletes an element to a sketch window and handles propagation to all other
+ figure windows)
+
+ (* GROUPFLG indicates that this is part of a group operation and hence display
+ and image object deleted fns don't need to be called.)
(PROG ((SKETCH (SKETCH.FROM.VIEWER SKETCHW))
LOCALELT) (* delete the element to the sketch.)
@@ -898,10 +1014,9 @@ This will be slow for arcs and curves."]
(RETURN OLDGELT])
(SK.MARK.DIRTY
- [LAMBDA (SKETCH) (* rrb " 1-Oct-86 18:15")
-
- (* marks a sketch as having been changed.
- Puts a flag on its viewers.)
+ [LAMBDA (SKETCH) (* rrb " 1-Oct-86 18:15")
+ (* marks a sketch as having been
+ changed. Puts a flag on its viewers.)
(* checks first because this is faster
than always putting.)
(for SKW in (ALL.SKETCH.VIEWERS SKETCH) do (OR (EQ (WINDOWPROP SKW 'SKETCHCHANGED)
@@ -909,18 +1024,15 @@ This will be slow for arcs and curves."]
(WINDOWPROP SKW 'SKETCHCHANGED T])
(SK.MARK.UNDIRTY
- [LAMBDA (SKETCH) (* rrb "29-Nov-84 18:03")
-
- (* marks a sketch as having been changed.
- Puts a flag on its viewers.)
-
+ [LAMBDA (SKETCH) (* rrb "29-Nov-84 18:03")
+ (* marks a sketch as having been
+ changed. Puts a flag on its viewers.)
(for SKW in (ALL.SKETCH.VIEWERS SKETCH) do (WINDOWPROP SKW 'SKETCHCHANGED 'OLD])
(SK.MENU.AND.RETURN.FIELD
- [LAMBDA (ELEMENTTYPE) (* rrb "11-May-84 16:03")
-
- (* returns a field list of the field to be changed.)
-
+ [LAMBDA (ELEMENTTYPE) (* rrb "11-May-84 16:03")
+ (* returns a field list of the field
+ to be changed.)
(PROG ((ITEMS (CHANGEABLEFIELDITEMS ELEMENTTYPE)))
(RETURN (COND
((NULL ITEMS)
@@ -928,20 +1040,20 @@ This will be slow for arcs and curves."]
[(NULL (CDR ITEMS))
(EVAL (CADR (CAR ITEMS]
(T (MENU (create MENU
- ITEMS _ ITEMS
- CENTERFLG _ T
- TITLE _ "Choose which property to change"])
+ ITEMS ↠ITEMS
+ CENTERFLG ↠T
+ TITLE ↠"Choose which property to change"])
(SKETCH.SET.BRUSH.SHAPE
- [LAMBDA (W) (* rrb "11-Dec-84 15:31")
+ [LAMBDA (W) (* rrb "11-Dec-84 15:31")
(* Sets the shape of the current brush)
(PROG [(NEWSHAPE (PAINTW.READBRUSHSHAPE))
(NOWBRUSH (fetch (SKETCHCONTEXT SKETCHBRUSH) of (WINDOWPROP W 'SKETCHCONTEXT]
(RETURN (AND NEWSHAPE (replace (SKETCHCONTEXT SKETCHBRUSH) of (WINDOWPROP W 'SKETCHCONTEXT)
- with (create BRUSH using NOWBRUSH BRUSHSHAPE _ NEWSHAPE])
+ with (create BRUSH using NOWBRUSH BRUSHSHAPE ↠NEWSHAPE])
(SKETCH.SET.BRUSH.SIZE
- [LAMBDA (W) (* rrb "12-Jan-85 10:13")
+ [LAMBDA (W) (* rrb "12-Jan-85 10:13")
(* sets the size of the current brush)
(SK.SET.DEFAULT.BRUSH.SIZE [READBRUSHSIZE (fetch (BRUSH BRUSHSIZE)
of (fetch (SKETCHCONTEXT SKETCHBRUSH)
@@ -949,10 +1061,10 @@ This will be slow for arcs and curves."]
W])
(SKETCHW.CLOSEFN
- [LAMBDA (SKW) (* rrb " 1-Oct-86 17:44")
-
- (* close function for a viewer. Removes itself from the list of viewers.)
-
+ [LAMBDA (SKW) (* rrb " 1-Oct-86 17:44")
+ (* close function for a viewer.
+ Removes itself from the list of
+ viewers.)
(PROG (PROCINFO)
[COND
[(SETQ PROCINFO (WINDOWPROP SKW 'DOCUMENTINFO)) (* this window came from a tedit
@@ -966,9 +1078,9 @@ This will be slow for arcs and curves."]
(COND
([OR (TTY.PROCESSP (THIS.PROCESS))
(TTY.PROCESSP (WINDOWPROP SKW 'PROCESS]
-
- (* if this process or the sketch process has the tty, give it back to the Tedit
- that this window came from.)
+
+ (* if this process or the sketch process has the tty, give it back to the Tedit
+ that this window came from.)
(AND [PROCESSP (SETQ PROCINFO (WINDOWPROP (fetch (SKETCHDOCUMENTINFO
FROMTEDITWINDOW)
@@ -984,11 +1096,11 @@ This will be slow for arcs and curves."]
(WINDOWADDPROP SKW 'OPENFN 'SKETCHW.REOPENFN])
(SK.CONFIRM.DESTRUCTION
- [LAMBDA (VIEWER MSG) (* rrb " 1-Oct-86 17:37")
-
- (* some destructive operation is about to take place, if the viewer is dirty,
- confirm that this is what is intended. If so, return T.
- If not, NIL.)
+ [LAMBDA (VIEWER MSG) (* rrb " 1-Oct-86 17:37")
+
+ (* some destructive operation is about to take place, if the viewer is dirty,
+ confirm that this is what is intended. If so, return T.
+ If not, NIL.)
(COND
((OR (WINDOWPROP VIEWER 'DONTQUERYCHANGES)
@@ -1007,45 +1119,43 @@ This will be slow for arcs and curves."]
(T NIL])
(SKETCHW.OUTFN
- [LAMBDA (SKW) (* rrb "24-Jan-85 10:06")
-
- (* the cursor is leaving the window, updates any structures that may be spread
- out for efficiency.)
+ [LAMBDA (SKW) (* rrb "24-Jan-85 10:06")
+
+ (* the cursor is leaving the window, updates any structures that may be spread
+ out for efficiency.)
NIL])
(SKETCHW.REOPENFN
- [LAMBDA (SKW) (* rrb " 7-Feb-84 11:31")
-
- (* reopenfn for viewers. Adds it back onto the list of global viewers.)
-
+ [LAMBDA (SKW) (* rrb " 7-Feb-84 11:31")
+ (* reopenfn for viewers.
+ Adds it back onto the list of global
+ viewers.)
(ADD.SKETCH.VIEWER (WINDOWPROP SKW 'SKETCH)
SKW)
(WINDOWPROP SKW 'PROCESS (ADD.PROCESS (LIST (FUNCTION WB.EDITOR)
(KWOTE SKW])
(MAKE.LOCAL.SKETCH
- [LAMBDA (SKETCH SKETCHREGION SCALE STREAM EVERYTHINGFLG) (* rrb "22-Apr-85 16:45")
-
- (* * calculate the local parts for the region of the sketch at a given scale.
- EVERYTHINGFLG provides a way to override the inside check.
- This is necessary because the inside check works on local elements.
- When the inside check is change to work on global elements, this can be
- removed.)
+ [LAMBDA (SKETCH SKETCHREGION SCALE STREAM EVERYTHINGFLG) (* rrb "22-Apr-85 16:45")
+
+ (* * calculate the local parts for the region of the sketch at a given scale.
+ EVERYTHINGFLG provides a way to override the inside check.
+ This is necessary because the inside check works on local elements.
+ When the inside check is change to work on global elements, this can be removed.)
(for SKELT in (fetch (SKETCH SKETCHELTS) of (INSURE.SKETCH SKETCH))
when (OR EVERYTHINGFLG (SK.INSIDE.REGION SKELT SKETCHREGION))
collect (SK.LOCAL.FROM.GLOBAL SKELT STREAM SCALE])
(MAP.SKETCHSPEC.INTO.VIEWER
- [LAMBDA (SKETCH SKW) (* rrb "12-May-85 17:02")
-
- (* creates the local parts of a sketch and puts it onto the viewer.)
-
+ [LAMBDA (SKETCH SKW) (* rrb "12-May-85 17:02")
+ (* creates the local parts of a sketch
+ and puts it onto the viewer.)
(PROG ((SKREGION (WINDOWPROP SKW 'REGION.VIEWED))
SPECS)
-
- (* local specs are kept as a TCONC cell so that additions to the end are fast.)
+
+ (* local specs are kept as a TCONC cell so that additions to the end are fast.)
(RETURN (WINDOWPROP SKW 'SKETCHSPECS (CONS [SETQ SPECS
(CONS (fetch (SKETCH SKETCHNAME) of SKETCH)
@@ -1058,29 +1168,27 @@ This will be slow for arcs and curves."]
(LAST SPECS])
(SKETCHW.REPAINTFN
- [LAMBDA (W REG STOPIFMOUSEDOWN NEWGRIDFLG) (* rrb "21-Feb-86 10:38")
+ [LAMBDA (W REG STOPIFMOUSEDOWN NEWGRIDFLG) (* rrb "21-Feb-86 10:38")
(* redisplays the sketch in a window)
(* for now ignore the region.)
-
- (* if STOPIFMOUSEDOWN is T, it displays some but stops if the button left or
- middle button is still down and returns STOPPED)
+
+ (* if STOPIFMOUSEDOWN is T, it displays some but stops if the button left or
+ middle button is still down and returns STOPPED)
(DSPOPERATION 'PAINT W)
- (DSPRIGHTMARGIN 65000 W)
-
- (* I don't know exactly how scrolling ever gets turned on but it has.)
-
+ (DSPRIGHTMARGIN 65000 W) (* I don't know exactly how scrolling
+ ever gets turned on but it has.)
(DSPSCROLL 'OFF W)
(PROG1 (SKETCHW.REPAINTFN1 W REG (AND STOPIFMOUSEDOWN (SETUPTIMER AUTOZOOM.REPAINT.TIME))
NEWGRIDFLG)
(SKED.SELECTION.FEEDBACK W])
(SKETCHW.REPAINTFN1
- [LAMBDA (SKW REGION TIMER NEWGRIDFLG) (* rrb "11-Jul-86 15:51")
-
- (* Draws all of the local elements in the sketch window SKW.
- internal function to SKETCHW.REPAINTFN This entry is provided so that
- SK.DRAWFIGURE.IF can RETFROM it if the timer has expired and a button is down.)
+ [LAMBDA (SKW REGION TIMER NEWGRIDFLG) (* rrb "11-Jul-86 15:51")
+
+ (* Draws all of the local elements in the sketch window SKW.
+ internal function to SKETCHW.REPAINTFN This entry is provided so that
+ SK.DRAWFIGURE.IF can RETFROM it if the timer has expired and a button is down.)
(MAPSKETCHSPECS (LOCALSPECS.FROM.VIEWER SKW)
(COND
@@ -1094,25 +1202,25 @@ This will be slow for arcs and curves."]
(SK.DISPLAY.GRID.POINTS SKW NEWGRIDFLG])
(SK.DRAWFIGURE.IF
- [LAMBDA (SCREENELT STREAM REGION SCALE) (* rrb "22-Jan-85 11:34")
-
- (* draws an element of a sketch in a window.
- If the free variable TIMER has expired and a button is down, it RETFROMs the
- repainting function.)
+ [LAMBDA (SCREENELT STREAM REGION SCALE) (* rrb "22-Jan-85 11:34")
+
+ (* draws an element of a sketch in a window.
+ If the free variable TIMER has expired and a button is down, it RETFROMs the
+ repainting function.)
(PROG1 (SK.DRAWFIGURE SCREENELT STREAM REGION SCALE)
- (AND TIMER (MOUSESTATE (OR LEFT MIDDLE))
- (TIMEREXPIRED? TIMER)
- (RETFROM 'SKETCHW.REPAINTFN1 'STOPPED])
+ (AND TIMER (MOUSESTATE (OR LEFT MIDDLE))
+ (TIMEREXPIRED? TIMER)
+ (RETFROM 'SKETCHW.REPAINTFN1 'STOPPED)))])
(SKETCHW.SCROLLFN
- [LAMBDA (SKW XDELTA YDELTA CONTINUOUSFLG) (* rrb "11-Jul-86 15:51")
-
- (* scroll function for a sketch window. It must check to see which elements
- need to get added and deleted from the ones currently viewed as a result of the
- scrolling. Also if an element gets added, the clipping region must be expanded
- because part of the display of the object may be in the already visible part of
- the window.)
+ [LAMBDA (SKW XDELTA YDELTA CONTINUOUSFLG) (* rrb "11-Jul-86 15:51")
+
+ (* scroll function for a sketch window. It must check to see which elements need
+ to get added and deleted from the ones currently viewed as a result of the
+ scrolling. Also if an element gets added, the clipping region must be expanded
+ because part of the display of the object may be in the already visible part of
+ the window.)
(PROG ([SKETCH (fetch (SKETCH SKETCHELTS) of (INSURE.SKETCH (SKETCH.FROM.VIEWER SKW]
(NOWREG (DSPCLIPPINGREGION NIL SKW))
@@ -1148,22 +1256,20 @@ This will be slow for arcs and curves."]
(fetch (REGION WIDTH) of NOWREG)
(fetch (REGION HEIGHT) of NOWREG)))
(SETQ SCALE (VIEWER.SCALE SKW]
-
- (* update the current image to contain the things that will be there after the
- scroll, then scroll.)
+
+ (* update the current image to contain the things that will be there after the
+ scroll, then scroll.)
[for GELT in SKETCH do (SETQ INNEW? (SK.INSIDE.REGION GELT NEWREGION))
(COND
[(SETQ LOCALELT (SK.LOCAL.ELT.FROM.GLOBALPART GELT SKW))
-
- (* if it is not supposed to be in the new region, remove it.)
-
+ (* if it is not supposed to be in the
+ new region, remove it.)
(OR INNEW? (COND
((REGIONSINTERSECTP NEWLOCALREGION (SK.ITEM.REGION
LOCALELT))
-
- (* part of image may overlap the part of sketch that is still showing)
-
+ (* part of image may overlap the part
+ of sketch that is still showing)
(SK.ERASE.AND.DELETE.ITEM LOCALELT SKW))
(T (SK.DELETE.ITEM LOCALELT SKW]
(INNEW? (* just came in)
@@ -1174,11 +1280,11 @@ This will be slow for arcs and curves."]
(for GELT in NEWONES do (SKETCH.ADD.AND.DISPLAY1 GELT SKW SCALE])
(SKETCHW.RESHAPEFN
- [LAMBDA (SKW OLDIMAGE IMAGEREGION OLDSCREENREGION) (* rrb "11-Jul-86 15:51")
-
- (* reshape function for a sketch window.
- It must check to see which elements need to get added and deleted from the ones
- currently viewed as a result of the reshaping.)
+ [LAMBDA (SKW OLDIMAGE IMAGEREGION OLDSCREENREGION) (* rrb "11-Jul-86 15:51")
+
+ (* reshape function for a sketch window. It must check to see which elements need
+ to get added and deleted from the ones currently viewed as a result of the
+ reshaping.)
(PROG ([SKETCH (fetch (SKETCH SKETCHELTS) of (INSURE.SKETCH (SKETCH.FROM.VIEWER SKW]
(NOWREG (DSPCLIPPINGREGION NIL SKW))
@@ -1188,22 +1294,20 @@ This will be slow for arcs and curves."]
(RESHAPEBYREPAINTFN SKW OLDIMAGE IMAGEREGION OLDSCREENREGION)
[SETQ NEWREGION (UNSCALE.REGION (SETQ NEWLOCALREGION (DSPCLIPPINGREGION NIL SKW))
(SETQ SCALE (VIEWER.SCALE SKW]
-
- (* update the current image to contain the things that will be there after the
- scroll, then scroll.)
+
+ (* update the current image to contain the things that will be there after the
+ scroll, then scroll.)
[for GELT in SKETCH do (SETQ INNEW? (SK.INSIDE.REGION GELT NEWREGION))
(COND
[(SETQ LOCALELT (SK.LOCAL.ELT.FROM.GLOBALPART GELT SKW))
-
- (* if it is not supposed to be in the new region, remove it.)
-
+ (* if it is not supposed to be in the
+ new region, remove it.)
(OR INNEW? (COND
((REGIONSINTERSECTP NEWLOCALREGION (SK.ITEM.REGION
LOCALELT))
-
- (* part of image may overlap the part of sketch that is still showing)
-
+ (* part of image may overlap the part
+ of sketch that is still showing)
(SK.ERASE.AND.DELETE.ITEM LOCALELT SKW))
(T (SK.DELETE.ITEM LOCALELT SKW]
(INNEW? (* just came in)
@@ -1213,11 +1317,11 @@ This will be slow for arcs and curves."]
(for GELT in NEWONES do (SKETCH.ADD.AND.DISPLAY1 GELT SKW SCALE])
(SK.UPDATE.EVENT.SELECTION
- [LAMBDA (HOTSPOTCACHE X1 Y1 X2 Y2 SCALE WINDOW COPYMODE DELETEMODE)
+ [LAMBDA (HOTSPOTCACHE X1 Y1 X2 Y2 SCALE WINDOW COPYMODE DELETEMODE)
(* rrb "31-Jan-85 11:35")
-
- (* * internal function to SK.COPY.BUTTONEVENTFN that determines the elements
- within the given bounds and selects or deselects them.)
+
+ (* * internal function to SK.COPY.BUTTONEVENTFN that determines the elements
+ within the given bounds and selects or deselects them.)
(PROG (SELITEMS)
(RETURN (COND
@@ -1243,12 +1347,12 @@ This will be slow for arcs and curves."]
DELETEMODE])
(LIGHTGRAYWINDOW
- [LAMBDA (WINDOW) (* rrb "28-Jun-84 10:27")
+ [LAMBDA (WINDOW) (* rrb "28-Jun-84 10:27")
(DSPFILL NIL 1 'INVERT WINDOW)
WINDOW])
(SK.ADD.SPACES
- [LAMBDA (STRLST) (* rrb "19-Jul-85 15:11")
+ [LAMBDA (STRLST) (* rrb "19-Jul-85 15:11")
(* adds eols between the elements of
STRLST)
(for STR in STRLST join (COND
@@ -1262,15 +1366,15 @@ This will be slow for arcs and curves."]
"])
(SK.SKETCH.MENU
- [LAMBDA (SKW) (* rrb "12-Sep-85 11:50")
+ [LAMBDA (SKW) (* rrb "12-Sep-85 11:50")
(* brings up the normal sketch command
menu.)
(SK.MIDDLE.TITLEFN SKW T])
(SK.CHECK.IMAGEOBJ.WHENDELETEDFN
- [LAMBDA (GELT SKETCHW) (* rrb "19-Oct-85 17:10")
-
- (* check to see if a when deleted function needs to be applied and applies it.)
+ [LAMBDA (GELT SKETCHW) (* rrb "19-Oct-85 17:10")
+
+ (* check to see if a when deleted function needs to be applied and applies it.)
(SELECTQ (fetch (GLOBALPART GTYPE) of GELT)
(SKIMAGEOBJ (* deleting an image object apply
@@ -1282,7 +1386,7 @@ This will be slow for arcs and curves."]
NIL])
(SK.APPLY.IMAGEOBJ.WHENDELETEDFN
- [LAMBDA (GELT SKETCHW) (* rrb "30-Jul-85 15:35")
+ [LAMBDA (GELT SKETCHW) (* rrb "30-Jul-85 15:35")
(* applies the when deleted function
for an image object.)
(PROG (IMAGEOBJ FN)
@@ -1292,21 +1396,20 @@ This will be slow for arcs and curves."]
INDIVIDUALGLOBALPART)
of GELT)))
'WHENDELETEDFN))
- (NEQ FN 'NILL))
-
- (* documentation calls for passing text streams as well but there aren't any.)
-
+ (NEQ FN 'NILL)) (* documentation calls for passing
+ text streams as well but there aren't
+ any.)
(APPLY* FN IMAGEOBJ SKETCHW])
(SK.RETURN.TTY
- [LAMBDA (W) (* rrb "29-Aug-85 11:09")
+ [LAMBDA (W) (* rrb "29-Aug-85 11:09")
(* gives up the tty when the window is
shrunken.)
(AND (TTY.PROCESSP (WINDOWPROP W 'PROCESS))
(TTY.PROCESS T])
(SK.TAKE.TTY
- [LAMBDA (W) (* rrb "29-Aug-85 11:10")
+ [LAMBDA (W) (* rrb "29-Aug-85 11:10")
(* takes the tty when the window is
expanded)
(TTY.PROCESS (WINDOWPROP W 'PROCESS])
@@ -1322,11 +1425,11 @@ This will be slow for arcs and curves."]
[LAMBDA (ITEMS TITLE) (* ; "Edited 6-Nov-2025 22:36 by rmk")
(* rrb "14-Jul-86 13:43")
(create MENU
- ITEMS _ ITEMS
- CENTERFLG _ T
- WHENSELECTEDFN _ (FUNCTION SKETCHW.SELECTIONFN)
- MENUFONT _ (FONTCREATE BOLDFONT)
- TITLE _ TITLE])
+ ITEMS ↠ITEMS
+ CENTERFLG ↠T
+ WHENSELECTEDFN ↠(FUNCTION SKETCHW.SELECTIONFN)
+ MENUFONT ↠(FONTCREATE BOLDFONT)
+ TITLE ↠TITLE])
(SKETCH.COMMANDMENU.ITEMS
[LAMBDA (ADDFIXITEM ELEMENTTYPES VIEWER) (* rrb "24-Sep-86 18:11")
@@ -1587,34 +1690,35 @@ This will be slow for arcs and curves."]
'((inspect INSPECT.SKETCH "Calls the Inspector on the figure data structures."])
(CREATE.SKETCHW.COMMANDMENU
- [LAMBDA (MENUTITLE ADDFIXITEM ELEMENTTYPES VIEWER) (* rrb " 6-May-86 15:22")
+ [LAMBDA (MENUTITLE ADDFIXITEM ELEMENTTYPES VIEWER) (* rrb " 6-May-86 15:22")
(* returns the control menu for a
figure window.)
(SKETCH.COMMANDMENU (SKETCH.COMMANDMENU.ITEMS ADDFIXITEM ELEMENTTYPES VIEWER)
MENUTITLE])
(SKETCHW.SELECTIONFN
- [LAMBDA (ITEM MENU) (* rrb "31-Jan-86 11:34")
-
- (* calls the function appropriate for the item selected from the command menu
- associated with a figure window.)
+ [LAMBDA (ITEM MENU) (* rrb "31-Jan-86 11:34")
+
+ (* calls the function appropriate for the item selected from the command menu
+ associated with a figure window.)
(PROG [(SKW (WINDOWPROP (WFROMMENU MENU)
'MAINWINDOW]
- (RETURN (RESETLST (COND
- ((OBTAIN.MONITORLOCK (SKETCH.MONITORLOCK SKW)
- T T) (* clear the prompt window if there is
+ (RETURN (RESETLST
+ (COND
+ ((OBTAIN.MONITORLOCK (SKETCH.MONITORLOCK SKW)
+ T T) (* clear the prompt window if there is
one.)
- (CLOSEPROMPTWINDOW SKW) (* reset the line being drawn if there
+ (CLOSEPROMPTWINDOW SKW) (* reset the line being drawn if there
is one.)
- (RESET.LINE.BEING.INPUT SKW)
- (SK.APPLY.MENU.COMMAND (CADR ITEM)
- SKW))
- (T (STATUSPRINT SKW "
-" "Sketch operation in progress. Please wait."])
+ (RESET.LINE.BEING.INPUT SKW)
+ (SK.APPLY.MENU.COMMAND (CADR ITEM)
+ SKW))
+ (T (STATUSPRINT SKW "
+" "Sketch operation in progress. Please wait."))))])
(SKETCH.MONITORLOCK
- [LAMBDA (VIEWER) (* rrb "31-Jan-86 10:20")
+ [LAMBDA (VIEWER) (* rrb "31-Jan-86 10:20")
(* returns the monitorlock for a
sketch)
(OR (WINDOWPROP VIEWER 'MONITORLOCK)
@@ -1623,10 +1727,9 @@ This will be slow for arcs and curves."]
(RETURN LOCK])
(SK.EVAL.AS.PROCESS
- [LAMBDA (FORM VIEWER) (* rrb "31-Jan-86 11:23")
-
- (* evals a form that grabs the sketch lock on its viewer in a process.)
-
+ [LAMBDA (FORM VIEWER) (* rrb "31-Jan-86 11:23")
+ (* evals a form that grabs the sketch
+ lock on its viewer in a process.)
(COND
((THIS.PROCESS)
(ADD.PROCESS (LIST 'SK.EVAL.WITH.LOCK (KWOTE FORM)
@@ -1638,20 +1741,18 @@ This will be slow for arcs and curves."]
(\EVAL FORM])
(SK.EVAL.WITH.LOCK
- [LAMBDA (FORM VIEWER) (* rrb "31-Jan-86 11:22")
-
- (* evals FORM in a context where it has the lock on VIEWER)
-
+ [LAMBDA (FORM VIEWER) (* rrb "31-Jan-86 11:22")
+ (* evals FORM in a context where it
+ has the lock on VIEWER)
(WITH.MONITOR (SKETCH.MONITORLOCK VIEWER)
(EVAL FORM])
)
(DEFINEQ
(SK.FIX.MENU
- [LAMBDA (SKETCHW DONTOPENFLG) (* rrb "23-Sep-86 17:59")
-
- (* attaches the menu on the right side of the viewer.)
-
+ [LAMBDA (SKETCHW DONTOPENFLG) (* rrb "23-Sep-86 17:59")
+ (* attaches the menu on the right side
+ of the viewer.)
(PROG (MENUW)
(OR (SETQ MENUW (SK.INSURE.HAS.MENU SKETCHW))
(RETURN)) (* clear the popup menu cache.)
@@ -1669,20 +1770,18 @@ This will be slow for arcs and curves."]
(OR DONTOPENFLG (OPENW MENUW])
(SK.SET.UP.MENUS
- [LAMBDA (SKETCHW DONTOPENFLG MENUSPEC) (* rrb "23-Sep-86 17:59")
+ [LAMBDA (SKETCHW DONTOPENFLG MENUSPEC) (* rrb "23-Sep-86 17:59")
(* attached the sketch menu to the
window.)
(PROG (FIXEDMENUW POPUPMENUW FIXIT?)
(COND
- ((NULL MENUSPEC)
-
- (* mark window so both menus will come up if needed.)
-
+ ((NULL MENUSPEC) (* mark window so both menus will come
+ up if needed.)
(SETQ FIXEDMENUW (SETQ POPUPMENUW T)))
((type? MENU MENUSPEC)
-
- (* put the given menu as the fixed one and establish the standard one as the
- SKETCHPOPUPMENU)
+
+ (* put the given menu as the fixed one and establish the standard one as the
+ SKETCHPOPUPMENU)
(SETQ FIXEDMENUW (MENUWINDOW MENUSPEC T))
(SETQ POPUPMENUW T)
@@ -1714,21 +1813,19 @@ This will be slow for arcs and curves."]
(AND FIXIT? (SK.FIX.MENU SKETCHW DONTOPENFLG])
(SK.INSURE.HAS.MENU
- [LAMBDA (SKETCHW) (* rrb "23-Sep-86 17:59")
+ [LAMBDA (SKETCHW) (* rrb "23-Sep-86 17:59")
(* makes sure a sketch window has a
menu.)
(PROG [(FIXEDMENU (WINDOWPROP SKETCHW 'SKETCHFIXEDMENU]
[COND
((EQ (WINDOWPROP SKETCHW 'SKETCHFIXEDMENU)
- T)
-
- (* no fixed menu yet but wants standard one, create it)
-
+ T) (* no fixed menu yet but wants
+ standard one, create it)
(WINDOWPROP SKETCHW 'SKETCHFIXEDMENU (SETQ FIXEDMENU (SK.CREATE.STANDARD.MENU SKETCHW]
(RETURN FIXEDMENU])
(SK.CREATE.STANDARD.MENU
- [LAMBDA (VIEWER) (* rrb "23-Sep-86 17:52")
+ [LAMBDA (VIEWER) (* rrb "23-Sep-86 17:52")
(* creates the standard sketch viewer
fixed menu window.)
(RESETFORM (CURSOR WAITINGCURSOR)
@@ -1736,49 +1833,44 @@ This will be slow for arcs and curves."]
T])
(SK.ADD.ITEM.TO.MENU
- [LAMBDA (OLDMENU NEWITEM) (* rrb "23-Sep-86 09:53")
-
- (* returns a menu that is like OLDMENU but has one additional item NEWITEM)
-
- (* clober enough fields to get the menu to redraw itself correctly.)
-
- (create MENU using OLDMENU ITEMS _ (APPEND (fetch (MENU ITEMS) of OLDMENU)
+ [LAMBDA (OLDMENU NEWITEM) (* rrb "23-Sep-86 09:53")
+ (* returns a menu that is like OLDMENU
+ but has one additional item NEWITEM)
+ (* clober enough fields to get the
+ menu to redraw itself correctly.)
+ (create MENU using OLDMENU ITEMS ↠(APPEND (fetch (MENU ITEMS) of OLDMENU)
(LIST NEWITEM))
- MENUCOLUMNS _ NIL MENUROWS _ NIL IMAGE _ NIL MENUGRID _
+ MENUCOLUMNS ↠NIL MENUROWS ↠NIL IMAGE ↠NIL MENUGRID â†
(create REGION
- LEFT _ 0
- BOTTOM _ 0])
+ LEFT ↠0
+ BOTTOM ↠0])
(SK.GET.VIEWER.POPUP.MENU
- [LAMBDA (SKETCHW) (* rrb "24-Sep-86 10:31")
-
- (* gets the popup menu for a viewer. If the sketch menu is open, it creates a
- standard one. If the sketch menu isn't open, it adds the fix menu item to it
- and pops it up. It is cleared each time the menu is fixed.)
+ [LAMBDA (SKETCHW) (* rrb "24-Sep-86 10:31")
+
+ (* gets the popup menu for a viewer. If the sketch menu is open, it creates a
+ standard one. If the sketch menu isn't open, it adds the fix menu item to it and
+ pops it up. It is cleared each time the menu is fixed.)
(OR (WINDOWPROP SKETCHW 'SKETCHPOPUPMENUCACHE)
(PROG [(SKETCHMENU (WINDOWPROP SKETCHW 'SKETCHFIXEDMENU]
[COND
[(OR (NULL SKETCHMENU)
(OPENWP SKETCHMENU))
-
- (* window doesn't want a fixed menu or its fixed menu is already open, check
- for a popup one)
+
+ (* window doesn't want a fixed menu or its fixed menu is already open, check for
+ a popup one)
(COND
((EQ (SETQ SKETCHMENU (WINDOWPROP SKETCHW 'SKETCHPOPUPMENU))
T)
(WINDOWPROP SKETCHW 'SKETCHPOPUPMENU (SETQ SKETCHMENU (SK.CREATE.STANDARD.MENU
SKETCHW]
- (T
-
- (* use the fixed menu with an item added to fix the menu.)
-
+ (T (* use the fixed menu with an item
+ added to fix the menu.)
[COND
- ((EQ SKETCHMENU T)
-
- (* no fixed menu yet but wants standard one, create it)
-
+ ((EQ SKETCHMENU T) (* no fixed menu yet but wants
+ standard one, create it)
(WINDOWPROP SKETCHW 'SKETCHFIXEDMENU (SETQ SKETCHMENU (
SK.CREATE.STANDARD.MENU
SKETCHW]
@@ -1792,10 +1884,10 @@ This will be slow for arcs and curves."]
(RETURN SKETCHMENU])
(SK.CLEAR.POPUP.MENU
- [LAMBDA (MENUW) (* rrb "24-Sep-86 10:34")
-
- (* clears the cache of pop up window so that the fixed menu will be used if the
- user middle buttons.)
+ [LAMBDA (MENUW) (* rrb "24-Sep-86 10:34")
+
+ (* clears the cache of pop up window so that the fixed menu will be used if the
+ user middle buttons.)
(PROG NIL
(WINDOWPROP (OR (MAINWINDOW MENUW)
@@ -1810,9 +1902,9 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SKETCH.CREATE
- [LAMBDA ARGS (* rrb " 6-Nov-85 11:16")
+ [LAMBDA ARGS (* rrb " 6-Nov-85 11:16")
(PROG [(SKETCH (create SKETCH
- SKETCHNAME _ (AND (GREATERP ARGS 0)
+ SKETCHNAME ↠(AND (GREATERP ARGS 0)
(ARG ARGS 1]
(PUTSKETCHPROP SKETCH 'SKETCHCONTEXT (CREATE.DEFAULT.SKETCH.CONTEXT))
(PUTSKETCHPROP SKETCH 'VERSION SKETCH.VERSION) (* pick out the props that are
@@ -1824,7 +1916,7 @@ This will be slow for arcs and curves."]
(RETURN SKETCH])
(GETSKETCHPROP
- [LAMBDA (SKETCH PROPERTY) (* rrb " 3-Mar-86 14:37")
+ [LAMBDA (SKETCH PROPERTY) (* rrb " 3-Mar-86 14:37")
(* retrieves the property of a sketch)
(PROG ((SKETCH (INSURE.SKETCH SKETCH))
SKETCHCONTEXT)
@@ -1862,11 +1954,11 @@ This will be slow for arcs and curves."]
PROPERTY])
(PUTSKETCHPROP
- [LAMBDA (SKETCH PROPERTY VALUE) (* rrb " 3-Mar-86 13:58")
-
- (* stores a property on a sketch Returns VALUE.
- Knows about the form of a sketch and does value checking
- (or should.))
+ [LAMBDA (SKETCH PROPERTY VALUE) (* rrb " 3-Mar-86 13:58")
+
+ (* stores a property on a sketch Returns VALUE.
+ Knows about the form of a sketch and does value checking
+ (or should.))
(PROG ((SKETCH (INSURE.SKETCH SKETCH))
SKETCHCONTEXT PLIST)
@@ -1877,13 +1969,13 @@ This will be slow for arcs and curves."]
(BRUSH (replace (SKETCHCONTEXT SKETCHBRUSH) of SKETCHCONTEXT with VALUE))
(SHAPE (replace (SKETCHCONTEXT SKETCHBRUSH) of SKETCHCONTEXT
with (create BRUSH using (fetch (SKETCHCONTEXT SKETCHBRUSH) of SKETCHCONTEXT)
- BRUSHSHAPE _ VALUE)))
+ BRUSHSHAPE ↠VALUE)))
(SIZE (replace (SKETCHCONTEXT SKETCHBRUSH) of SKETCHCONTEXT
with (create BRUSH using (fetch (SKETCHCONTEXT SKETCHBRUSH) of SKETCHCONTEXT)
- BRUSHSIZE _ VALUE)))
+ BRUSHSIZE ↠VALUE)))
(COLOR (replace (SKETCHCONTEXT SKETCHBRUSH) of SKETCHCONTEXT
with (create BRUSH using (fetch (SKETCHCONTEXT SKETCHBRUSH) of SKETCHCONTEXT)
- BRUSHCOLOR _ VALUE)))
+ BRUSHCOLOR ↠VALUE)))
(FONT (replace (SKETCHCONTEXT SKETCHFONT) of SKETCHCONTEXT with VALUE))
(TEXTALIGNMENT (replace (SKETCHCONTEXT SKETCHTEXTALIGNMENT) of SKETCHCONTEXT
with VALUE))
@@ -1896,13 +1988,13 @@ This will be slow for arcs and curves."]
(TEXTURE (replace (SKETCHCONTEXT SKETCHFILLING) of SKETCHCONTEXT
with (create SKFILLING using (fetch (SKETCHCONTEXT SKETCHFILLING)
of SKETCHCONTEXT)
- FILLING.TEXTURE _ VALUE)))
+ FILLING.TEXTURE ↠VALUE)))
((BACKCOLOR FILLINGCOLOR)
(replace (SKETCHCONTEXT SKETCHFILLING) of SKETCHCONTEXT
with (create SKFILLING using (fetch (SKETCHCONTEXT SKETCHFILLING) of
SKETCHCONTEXT
)
- FILLING.COLOR _ VALUE)))
+ FILLING.COLOR ↠VALUE)))
(LINEMODE (replace (SKETCHCONTEXT SKETCHLINEMODE) of SKETCHCONTEXT with VALUE))
(ARCDIRECTION (replace (SKETCHCONTEXT SKETCHARCDIRECTION) of SKETCHCONTEXT with VALUE))
(MOVEMODE (replace (SKETCHCONTEXT SKETCHMOVEMODE) of SKETCHCONTEXT with VALUE))
@@ -1914,23 +2006,23 @@ This will be slow for arcs and curves."]
(RETURN VALUE])
(CREATE.DEFAULT.SKETCH.CONTEXT
- [LAMBDA NIL (* rrb "23-Sep-86 10:40")
+ [LAMBDA NIL (* rrb "23-Sep-86 10:40")
(* returns a default sketch context)
(create SKETCHCONTEXT
- SKETCHBRUSH _ SK.DEFAULT.BRUSH
- SKETCHFONT _ [OR SK.DEFAULT.FONT (SK.FONT.LIST (DEFAULTFONT 'DISPLAY]
- SKETCHTEXTALIGNMENT _ SK.DEFAULT.TEXT.ALIGNMENT
- SKETCHARROWHEAD _ (create ARROWHEAD
- ARROWTYPE _ SK.DEFAULT.ARROW.TYPE
- ARROWANGLE _ SK.DEFAULT.ARROW.ANGLE
- ARROWLENGTH _ SK.DEFAULT.ARROW.LENGTH)
- SKETCHDASHING _ SK.DEFAULT.DASHING
- SKETCHUSEARROWHEAD _ NIL
- SKETCHTEXTBOXALIGNMENT _ SK.DEFAULT.TEXTBOX.ALIGNMENT
- SKETCHFILLING _ (SK.CREATE.DEFAULT.FILLING)
- SKETCHLINEMODE _ T
- SKETCHINPUTSCALE _ 1
- SKETCHDRAWINGMODE _ SK.DEFAULT.OPERATION])
+ SKETCHBRUSH ↠SK.DEFAULT.BRUSH
+ SKETCHFONT ↠[OR SK.DEFAULT.FONT (SK.FONT.LIST (DEFAULTFONT 'DISPLAY]
+ SKETCHTEXTALIGNMENT ↠SK.DEFAULT.TEXT.ALIGNMENT
+ SKETCHARROWHEAD ↠(create ARROWHEAD
+ ARROWTYPE ↠SK.DEFAULT.ARROW.TYPE
+ ARROWANGLE ↠SK.DEFAULT.ARROW.ANGLE
+ ARROWLENGTH ↠SK.DEFAULT.ARROW.LENGTH)
+ SKETCHDASHING ↠SK.DEFAULT.DASHING
+ SKETCHUSEARROWHEAD ↠NIL
+ SKETCHTEXTBOXALIGNMENT ↠SK.DEFAULT.TEXTBOX.ALIGNMENT
+ SKETCHFILLING ↠(SK.CREATE.DEFAULT.FILLING)
+ SKETCHLINEMODE ↠T
+ SKETCHINPUTSCALE ↠1
+ SKETCHDRAWINGMODE ↠SK.DEFAULT.OPERATION])
)
(PUTPROPS SKETCH.CREATE ARGNAMES (NIL (NAME . DEFAULTS&VALUES) . U))
@@ -1942,15 +2034,15 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SK.COPY.BUTTONEVENTFN
- [LAMBDA (WINDOW) (* rrb "11-Jul-86 15:51")
-
- (* * handles the button event when a copy key and/or the delete is held down.
- allows the user to select a group of the sketch elements from the sketch
- WINDOW. This is very similar to SK.SELECT.MULTIPLE.ITEMS)
-
- (* the selection protocol is left to add, right to delete.
- Multiple clicking in the same place upscales for both select and deselect.
- Sweeping will select or deselect all of the items in the swept out area.)
+ [LAMBDA (WINDOW) (* rrb "11-Jul-86 15:51")
+
+ (* * handles the button event when a copy key and/or the delete is held down.
+ allows the user to select a group of the sketch elements from the sketch WINDOW.
+ This is very similar to SK.SELECT.MULTIPLE.ITEMS)
+
+ (* the selection protocol is left to add, right to delete.
+ Multiple clicking in the same place upscales for both select and deselect.
+ Sweeping will select or deselect all of the items in the swept out area.)
(COND
([AND (TTY.PROCESSP (WINDOWPROP WINDOW 'PROCESS))
@@ -1980,10 +2072,8 @@ This will be slow for arcs and curves."]
(T 'COPYSELECT]
(DELETEMODE 'DELETE)
(T (* keys aren't still down.)
- (RETURN]
-
- (* create the cache for the elements that allow the current operation.)
-
+ (RETURN] (* create the cache for the elements
+ that allow the current operation.)
(SETQ HOTSPOTCACHE (SK.HOTSPOT.CACHE.FOR.OPERATION WINDOW OPERATION))
(COND
((NOT (SK.HAS.SOME.HOTSPOTS HOTSPOTCACHE)) (* no items don't do anything.)
@@ -2003,39 +2093,33 @@ This will be slow for arcs and curves."]
((AND (LASTMOUSESTATE UP)
(SK.BUTTONEVENT.OVERP COPYMODE DELETEMODE))
(SK.TAKE.MARKS.DOWN WINDOW HOTSPOTCACHE)
- (RETURN)))
-
- (* MIDDLEONLYFLG is used to note case of picking characters out of a sketch.)
-
+ (RETURN))) (* MIDDLEONLYFLG is used to note case
+ of picking characters out of a sketch.)
(SETQ MIDDLEONLYFLG (LASTMOUSESTATE (ONLY MIDDLE)))
SELECTLP
(GETMOUSESTATE)
(COND
- ((SK.BUTTONEVENT.OVERP COPYMODE DELETEMODE)
-
- (* user let up copy key. Put sketch into input buffer.)
-
+ ((SK.BUTTONEVENT.OVERP COPYMODE DELETEMODE) (* user let up copy key.
+ Put sketch into input buffer.)
(SETQ RETURNVAL (WINDOWPROP WINDOW 'SKETCH.SELECTIONS))
(GO EXIT))
([AND (LASTMOUSESTATE (NOT UP))
(OR (NOT (INSIDEP (WINDOWPROP WINDOW 'REGION)
LASTMOUSEX LASTMOUSEY))
(NOT (SK.BUTTONEVENT.SAME.KEYS COPYMODE DELETEMODE]
-
- (* if a button is down, and either the keystate is different from entry or the
- cursor is out of the window, stop this event.)
+
+ (* if a button is down, and either the keystate is different from entry or the
+ cursor is out of the window, stop this event.)
(SETQ RETURNVAL NIL)
- (GO EXIT)))
-
- (* cursor is still inside or buttons are up, leave sketch selected.)
-
+ (GO EXIT))) (* cursor is still inside or buttons
+ are up, leave sketch selected.)
(SETQ NEWY (LASTMOUSEY WINDOW))
(SETQ NEWX (LASTMOUSEX WINDOW))
(COND
((NEQ PREVMOUSEBUTTONS LASTMOUSEBUTTONS)
-
- (* a button has gone up or down, mark this as the origin of a new box to sweep.)
+
+ (* a button has gone up or down, mark this as the origin of a new box to sweep.)
(SETQ ORIGX NEWX)
(SETQ ORIGY NEWY)
@@ -2053,10 +2137,9 @@ This will be slow for arcs and curves."]
(for SELITEM in (LOCALSPECS.FROM.VIEWER WINDOW)
do (SK.ADD.SELECTION SELITEM WINDOW (SK.BUTTONEVENT.MARK COPYMODE
DELETEMODE]
- (T
-
- (* thing selected is a the whole sketch, clear everything and start over.)
-
+ (T (* thing selected is a the whole
+ sketch, clear everything and start
+ over.)
(for SELITEM in (LOCALSPECS.FROM.VIEWER WINDOW)
do (SK.REMOVE.SELECTION SELITEM WINDOW (SK.BUTTONEVENT.MARK COPYMODE
DELETEMODE)))
@@ -2065,16 +2148,16 @@ This will be slow for arcs and curves."]
(SETQ PREVMOUSEBUTTONS)
(GO STARTOVERLP]
[(LASTMOUSESTATE (NOT UP))
-
- (* add or delete the element if any that the point is in.
- This uses a different method which takes into account the size of the selection
- knots which the area sweep doesn't.)
+
+ (* add or delete the element if any that the point is in.
+ This uses a different method which takes into account the size of the selection
+ knots which the area sweep doesn't.)
(COND
((SETQ NOW (IN.SKETCH.ELT? HOTSPOTCACHE
(create POSITION
- XCOORD _ NEWX
- YCOORD _ NEWY)))
+ XCOORD ↠NEWX
+ YCOORD ↠NEWY)))
(COND
([OR (AND (LASTMOUSESTATE (ONLY LEFT))
(NOT (SETQ MIDDLEONLYFLG)))
@@ -2093,17 +2176,13 @@ This will be slow for arcs and curves."]
((OR (IGREATERP (IABS (IDIFFERENCE ORIGX NEWX))
SK.NO.MOVE.DISTANCE)
(IGREATERP (IABS (IDIFFERENCE ORIGY NEWY))
- SK.NO.MOVE.DISTANCE))
-
- (* make the first pick move further so that it is easier to multiple click.)
-
- (SETQ MOVEDMUCHFLG T)))
-
- (* cursor has moved more than the minimum amount since last noticed.)
-
- (* add or delete any with in the swept out area.)
-
- (SK.UPDATE.EVENT.SELECTION HOTSPOTCACHE ORIGX ORIGY NEWX NEWY SCALE WINDOW COPYMODE
+ SK.NO.MOVE.DISTANCE)) (* make the first pick move further so
+ that it is easier to multiple click.)
+ (SETQ MOVEDMUCHFLG T))) (* cursor has moved more than the
+ minimum amount since last noticed.)
+ (* add or delete any with in the swept
+ out area.)
+ (SK.UPDATE.EVENT.SELECTION HOTSPOTCACHE ORIGX ORIGY NEWX NEWY SCALE WINDOW COPYMODE
DELETEMODE)))
(SETQ OLDX NEWX)
(SETQ OLDY NEWY)
@@ -2115,11 +2194,9 @@ This will be slow for arcs and curves."]
(SK.BUTTONEVENT.MARK
COPYMODE DELETEMODE)))
(SK.TAKE.MARKS.DOWN WINDOW HOTSPOTCACHE)
- (CLOSEPROMPTWINDOW WINDOW)
-
- (* if middle was the only button used to select, return only the text
- characters.)
-
+ (CLOSEPROMPTWINDOW WINDOW) (* if middle was the only button used
+ to select, return only the text
+ characters.)
(RETURN (AND RETURNVAL (COND
[(TTY.PROCESSP (WINDOWPROP WINDOW 'PROCESS))
(* the results will be going to this
@@ -2133,7 +2210,7 @@ This will be slow for arcs and curves."]
(MIDDLEONLYFLG
(* if middle only, just get the
characters.)
- (COPYINSERT (SK.BUILD.IMAGEOBJ RETURNVAL
+ (COPYINSERT (SK.BUILD.IMAGEOBJ RETURNVAL
WINDOW T)))
(T (SK.COPY.ELEMENTS RETURNVAL WINDOW]
(DELETEMODE (* delete them)
@@ -2142,10 +2219,9 @@ This will be slow for arcs and curves."]
MIDDLEONLYFLG])
(SK.BUTTONEVENT.MARK
- [LAMBDA (COPYFLG DELETEFLG) (* rrb "29-Dec-84 19:02")
-
- (* returns the mark that should be put on the points when they are selected.)
-
+ [LAMBDA (COPYFLG DELETEFLG) (* rrb "29-Dec-84 19:02")
+ (* returns the mark that should be put
+ on the points when they are selected.)
(COND
(DELETEFLG (COND
(COPYFLG MOVESELECTIONMARK)
@@ -2153,60 +2229,53 @@ This will be slow for arcs and curves."]
(T COPYSELECTIONMARK])
(SK.BUILD.IMAGEOBJ
- [LAMBDA (SCRELTS SKW CHARSONLYFLG) (* ; "Edited 20-Jun-92 15:28 by rmk:")
- (* builds an imageobj from the list
- of screen elements.)
+ [LAMBDA (SCRELTS SKW CHARSONLYFLG) (* ; "Edited 20-Jun-92 15:28 by rmk:")
+ (* builds an imageobj from the list of
+ screen elements.)
(COND
[CHARSONLYFLG (* return only the text characters.)
(PROG ((TEXTELTS
(bind GELT for LOCALSKELT in SCRELTS
- join (SELECTQ (fetch (GLOBALPART GTYPE) of (SETQ GELT
- (fetch (SCREENELT
- GLOBALPART)
- of LOCALSKELT)))
- (TEXT (LIST (LIST (fetch (TEXT LOCATIONLATLON)
- of (SETQ GELT (fetch (GLOBALPART
+ join (SELECTQ (fetch (GLOBALPART GTYPE) of (SETQ GELT (fetch (SCREENELT GLOBALPART
+ ) of
+ LOCALSKELT
+ )))
+ (TEXT (LIST (LIST (fetch (TEXT LOCATIONLATLON)
+ of (SETQ GELT (fetch (GLOBALPART
+ INDIVIDUALGLOBALPART)
+ of GELT)))
+ GELT)))
+ (TEXTBOX (LIST (LIST (SK.TEXTBOX.TEXT.POSITION (SETQ GELT
+ (fetch (GLOBALPART
INDIVIDUALGLOBALPART
- )
- of GELT)))
- GELT)))
- (TEXTBOX (LIST (LIST (SK.TEXTBOX.TEXT.POSITION (SETQ GELT
- (fetch
- (GLOBALPART
- INDIVIDUALGLOBALPART
- )
- of GELT)))
- GELT)))
- (SKIMAGEOBJ (* grab the imageobj too.)
- (LIST (LIST (create
- POSITION
- XCOORD _ [fetch (REGION LEFT)
- of
- (fetch (SKIMAGEOBJ
- SKIMOBJ.GLOBALREGION
- )
- of (SETQ GELT
- (fetch
- (GLOBALPART
- INDIVIDUALGLOBALPART
- )
- of GELT]
- YCOORD _ (fetch (REGION BOTTOM)
- of (fetch (SKIMAGEOBJ
-
- SKIMOBJ.GLOBALREGION
- )
+ )
of GELT)))
- GELT)))
- NIL)))
+ GELT)))
+ (SKIMAGEOBJ (* grab the imageobj too.)
+ (LIST (LIST (create POSITION
+ XCOORD â†
+ [fetch (REGION LEFT)
+ of (fetch (SKIMAGEOBJ
+ SKIMOBJ.GLOBALREGION)
+ of (SETQ GELT (fetch (GLOBALPART
+
+ INDIVIDUALGLOBALPART
+ )
+ of GELT]
+ YCOORD ↠(fetch (REGION BOTTOM)
+ of (fetch (SKIMAGEOBJ
+ SKIMOBJ.GLOBALREGION
+ )
+ of GELT)))
+ GELT)))
+ NIL)))
CHARSLST) (* sort according to top from the
- left.)
+ left.)
[SORT TEXTELTS (FUNCTION (LAMBDA (A B)
(COND
- [(GREATERP (fetch (POSITION YCOORD)
- of (SETQ A (CAR A)))
- (fetch (POSITION YCOORD)
- of (SETQ B (CAR B]
+ [(GREATERP (fetch (POSITION YCOORD) of (SETQ A
+ (CAR A)))
+ (fetch (POSITION YCOORD) of (SETQ B (CAR B]
((EQUAL (fetch (POSITION YCOORD) of A)
(fetch (POSITION YCOORD) of B))
(LESSP (fetch (POSITION XCOORD) of A)
@@ -2214,78 +2283,68 @@ This will be slow for arcs and curves."]
(RETURN (COND
((EQUAL [CAR (LAST (SETQ CHARSLST
(for TEXTELT in TEXTELTS
- join (* collect relevant parts.)
- (COND
- [(EQ 'SKIMAGEOBJ (fetch (
- INDIVIDUALGLOBALPART
- GTYPE)
- of (CADR TEXTELT)))
+ join (* collect relevant parts.)
+ (COND
+ [(EQ 'SKIMAGEOBJ (fetch (INDIVIDUALGLOBALPART
+ GTYPE)
+ of (CADR TEXTELT)))
(* copy image object so that copyfn is called.
- This also copies the part of the image object that are sketch relevent
- unnecessarily but it keeps copyfn call in one place.)
+ This also copies the part of the image object that are sketch relevent
+ unnecessarily but it keeps copyfn call in one place.)
- (LIST (COPY.IMAGE.OBJECT
- (fetch (SKIMAGEOBJ SKIMAGEOBJ)
- of (CADR TEXTELT]
- (T (SK.ADD.SPACES (fetch
- (TEXT
+ (LIST (COPY.IMAGE.OBJECT (fetch (SKIMAGEOBJ
+ SKIMAGEOBJ)
+ of (CADR TEXTELT
+ ]
+ (T (SK.ADD.SPACES (fetch (TEXT
LISTOFCHARACTERS
- )
- of (CADR
- TEXTELT
- ]
+ )
+ of (CADR TEXTELT]
"
-") (* strip off the trailing EOL that
- was added.)
+") (* strip off the trailing EOL that was
+ added.)
(BUTLAST CHARSLST))
(T CHARSLST]
[(AND (NOT (CDR SCRELTS))
- (EQ (fetch (GLOBALPART GTYPE) of (fetch (SCREENELT GLOBALPART)
- of (CAR SCRELTS)))
+ (EQ (fetch (GLOBALPART GTYPE) of (fetch (SCREENELT GLOBALPART) of (CAR SCRELTS)))
'SKIMAGEOBJ))
(* ;; "RMK: singelton imageobject. Return an unencapsulated copy of it. Don't need to worry about sketch transformations that might have applied, since they don't affect imageobjects.")
- (COPY.IMAGE.OBJECT (fetch (SKIMAGEOBJ SKIMAGEOBJ) of (FETCH (GLOBALPART
- INDIVIDUALGLOBALPART
- )
- OF (fetch
- (SCREENELT GLOBALPART
- )
- of (CAR SCRELTS
- ]
+ (COPY.IMAGE.OBJECT (fetch (SKIMAGEOBJ SKIMAGEOBJ) of (FETCH (GLOBALPART INDIVIDUALGLOBALPART)
+ OF (fetch (SCREENELT GLOBALPART)
+ of (CAR SCRELTS]
(T
- (* return a sketch image object. The sketch is translated to bring its lower
- left coordinate to 0,0 so that when it is put in a document it is in a
- canonical place. Maybe don't need to do this anymore.)
+ (* return a sketch image object. The sketch is translated to bring its lower left
+ coordinate to 0,0 so that when it is put in a document it is in a canonical
+ place. Maybe don't need to do this anymore.)
(SKETCH.IMAGEOBJ [create SKETCH
using (INSURE.SKETCH SKW)
- SKETCHNAME _ NIL SKETCHELTS _
+ SKETCHNAME ↠NIL SKETCHELTS â†
(SK.SORT.GELTS.BY.PRIORITY
(bind GELT for LOCALSKELT in SCRELTS
collect (COND
- ((EQ (fetch (GLOBALPART GTYPE)
- of (SETQ GELT (fetch
- (SCREENELT
- GLOBALPART)
- of LOCALSKELT
- )))
- 'SKIMAGEOBJ)
+ ((EQ (fetch (GLOBALPART GTYPE)
+ of (SETQ GELT (fetch (SCREENELT GLOBALPART
+ ) of
+ LOCALSKELT
+ )))
+ 'SKIMAGEOBJ)
(* apply copy fn)
- (SK.COPY.IMAGEOBJ GELT))
- (T (COPY GELT]
+ (SK.COPY.IMAGEOBJ GELT))
+ (T (COPY GELT]
(SK.GLOBAL.REGION.OF.LOCAL.ELEMENTS SCRELTS (VIEWER.SCALE SKW))
(VIEWER.SCALE SKW)
(SK.GRIDFACTOR SKW])
(SK.BUTTONEVENT.OVERP
- [LAMBDA (COPYMODE DELETEMODE) (* rrb " 1-Feb-85 18:39")
-
- (* determines if this button event is over by looking at the keys that are held
- down. COPYMODE and DELETEMODE indicate the keystate at the entry point.)
+ [LAMBDA (COPYMODE DELETEMODE) (* rrb " 1-Feb-85 18:39")
+
+ (* determines if this button event is over by looking at the keys that are held
+ down. COPYMODE and DELETEMODE indicate the keystate at the entry point.)
(COND
[DELETEMODE (AND (NOT (OR (.DELETEKEYDOWNP.)
@@ -2296,21 +2355,19 @@ This will be slow for arcs and curves."]
(COPYMODE (NULL (.COPYKEYDOWNP.])
(SK.BUTTONEVENT.SAME.KEYS
- [LAMBDA (COPYMODE DELETEMODE) (* rrb " 1-Feb-85 18:39")
-
- (* determines if the same keys are held down now as were held down at the
- start. If not, the event will be stopped.
- COPYMODE and DELETEMODE indicate the keystate at the entry point.)
+ [LAMBDA (COPYMODE DELETEMODE) (* rrb " 1-Feb-85 18:39")
+
+ (* determines if the same keys are held down now as were held down at the start.
+ If not, the event will be stopped. COPYMODE and DELETEMODE indicate the keystate
+ at the entry point.)
(COND
[DELETEMODE (AND (OR (.DELETEKEYDOWNP.)
(.MOVEKEYDOWNP.))
(EQ COPYMODE (OR (.COPYKEYDOWNP.)
(.MOVEKEYDOWNP.]
- (COPYMODE
-
- (* if we are not in delete mode, ignore the state of the delete key.)
-
+ (COPYMODE (* if we are not in delete mode,
+ ignore the state of the delete key.)
(.COPYKEYDOWNP.])
)
(DECLARE%: EVAL@COMPILE
@@ -2328,18 +2385,17 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SK.SEL.AND.CHANGE
- [LAMBDA (W) (* rrb "10-Dec-85 17:07")
-
- (* allows the user to select some elements and changes them.)
-
+ [LAMBDA (W) (* rrb "10-Dec-85 17:07")
+ (* allows the user to select some
+ elements and changes them.)
(SK.CHANGE.THING (SK.SELECT.MULTIPLE.ITEMS W T NIL 'CHANGE)
W])
(SK.CHECK.WHENCHANGEDFN
- [LAMBDA (VIEWER GELT PROPERTY NEWVALUE OLDVALUE) (* rrb " 3-Jan-86 18:36")
-
- (* checks if the sketch has a whenchange fn and if so, calls it and interprets
- the result. Returns NIL if the change shouldn't be made.)
+ [LAMBDA (VIEWER GELT PROPERTY NEWVALUE OLDVALUE) (* rrb " 3-Jan-86 18:36")
+
+ (* checks if the sketch has a whenchange fn and if so, calls it and interprets
+ the result. Returns NIL if the change shouldn't be made.)
(PROG ((SKETCH (INSURE.SKETCH VIEWER))
RESULT WHENCHANGEDFN)
@@ -2353,10 +2409,10 @@ This will be slow for arcs and curves."]
(T (RETURN GELT])
(SK.CHECK.PRECHANGEFN
- [LAMBDA (VIEWER SCRELT CHANGESPEC) (* rrb "27-Jun-86 15:51")
-
- (* checks if the sketch has a prechange fn and if so, calls it and interprets
- the result. Returns NIL if the change shouldn't be made.)
+ [LAMBDA (VIEWER SCRELT CHANGESPEC) (* rrb "27-Jun-86 15:51")
+
+ (* checks if the sketch has a prechange fn and if so, calls it and interprets the
+ result. Returns NIL if the change shouldn't be made.)
(PROG ((SKETCH (INSURE.SKETCH VIEWER))
PRECHANGEFN)
@@ -2366,14 +2422,15 @@ This will be slow for arcs and curves."]
CHANGESPEC])
(SK.CHANGE.ELT
- [LAMBDA (W) (* rrb "31-Jan-86 10:46")
+ [LAMBDA (W) (* rrb "31-Jan-86 10:46")
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.CHANGE (KWOTE W))
W])
(SK.CHANGE.THING
- [LAMBDA (ELTSTOCHANGE W) (* rrb " 6-Jan-85 19:23")
-
- (* ELTSTOCHANGE is a sketch element that was selected for a CHANGE operation.)
+ [LAMBDA (ELTSTOCHANGE W) (* rrb " 6-Jan-85 19:23")
+ (* ELTSTOCHANGE is a sketch element
+ that was selected for a CHANGE
+ operation.)
(* Change according to the first one
on the list)
(PROG (FIRSTTYPE READCHANGEFN) (* find the first thing that has a
@@ -2389,15 +2446,15 @@ This will be slow for arcs and curves."]
ELTSTOCHANGE W])
(SKETCH.CHANGE.ELEMENTS
- [LAMBDA (ELEMENTS CHANGESPECS SKETCHTOUPDATE ADDHISTORY?) (* rrb " 2-Oct-86 16:38")
-
- (* Changes the elements ELEMENTS according to the change specifications
- CHANGESPECs. If SKETCHTOUPDATE is a viewer or a sketch.
- it will be updated. If ADDHISTORY is non-NIL, the changes will be added to the
- history list of SKETCHTOUPDATE which should be a viewer.
- CHANGESPECs can be a list of the line, brush, text or arc properties, e.g.
- ((TEXT BOLD) (SIZE LARGER) (DASHING (3 1 2 1))%.
- The changes will be applied to any elements for which they make sense.))
+ [LAMBDA (ELEMENTS CHANGESPECS SKETCHTOUPDATE ADDHISTORY?) (* rrb " 2-Oct-86 16:38")
+
+ (* Changes the elements ELEMENTS according to the change specifications
+ CHANGESPECs. If SKETCHTOUPDATE is a viewer or a sketch.
+ it will be updated. If ADDHISTORY is non-NIL, the changes will be added to the
+ history list of SKETCHTOUPDATE which should be a viewer.
+ CHANGESPECs can be a list of the line, brush, text or arc properties, e.g.
+ ((TEXT BOLD) (SIZE LARGER) (DASHING (3 1 2 1))%.
+ The changes will be applied to any elements for which they make sense.))
(PROG ((VIEWER (SK.VIEWER.FROM.SKETCH.ARG SKETCHTOUPDATE))
RESULT)
@@ -2408,10 +2465,10 @@ This will be slow for arcs and curves."]
VIEWER NIL NIL (NULL ADDHISTORY?])
(SK.APPLY.SINGLE.CHANGEFN
- [LAMBDA (GELEMENT CHANGEFN CHANGESPEC VIEWER) (* rrb " 2-Oct-86 10:49")
-
- (* applies a single change to an element.
- It returns a change structure that contains the old and new elements.)
+ [LAMBDA (GELEMENT CHANGEFN CHANGESPEC VIEWER) (* rrb " 2-Oct-86 10:49")
+
+ (* applies a single change to an element.
+ It returns a change structure that contains the old and new elements.)
(COND
((EQ (fetch (GLOBALPART GTYPE) of GELEMENT)
@@ -2420,10 +2477,10 @@ This will be slow for arcs and curves."]
(T (APPLY* CHANGEFN GELEMENT CHANGESPEC VIEWER])
(SK.DO.CHANGESPECS
- [LAMBDA (ELEMENT CHANGESPECS VIEWER) (* rrb " 2-Oct-86 16:31")
-
- (* returns a change structure that is the combined effects of applying all
- CHANGESPECS to ELEMENT.)
+ [LAMBDA (ELEMENT CHANGESPECS VIEWER) (* rrb " 2-Oct-86 16:31")
+
+ (* returns a change structure that is the combined effects of applying all
+ CHANGESPECS to ELEMENT.)
(* for now, pretty kludgy)
(PROG (NEWELEMENT)
(COND
@@ -2436,22 +2493,21 @@ This will be slow for arcs and curves."]
NEWELT) of NEWELEMENT
))
(T
-
- (* before one of the change specs applies, use the original element.)
-
+ (* before one of the change specs
+ applies, use the original element.)
ELEMENT))
CHANGESPEC VIEWER)
NEWELEMENT)))
(RETURN (AND NEWELEMENT (create SKHISTORYCHANGESPEC
- OLDELT _ ELEMENT
- NEWELT _ (fetch (SKHISTORYCHANGESPEC NEWELT) of NEWELEMENT)
- PROPERTY _ CHANGESPECS])
+ OLDELT ↠ELEMENT
+ NEWELT ↠(fetch (SKHISTORYCHANGESPEC NEWELT) of NEWELEMENT)
+ PROPERTY ↠CHANGESPECS])
(SK.VIEWER.FROM.SKETCH.ARG
- [LAMBDA (SKETCH) (* rrb " 2-Oct-86 10:57")
-
- (* returns the viewer that changes should be reflected in when SKETCH is passed
- in as a sketch argument.)
+ [LAMBDA (SKETCH) (* rrb " 2-Oct-86 10:57")
+
+ (* returns the viewer that changes should be reflected in when SKETCH is passed
+ in as a sketch argument.)
(COND
((NULL SKETCH)
@@ -2461,7 +2517,7 @@ This will be slow for arcs and curves."]
(CAR (ALL.SKETCH.VIEWERS SKETCH])
(SK.DO.CHANGESPEC1
- [LAMBDA (ELEMENT CHANGESPEC VIEWER) (* rrb "23-Oct-86 14:21")
+ [LAMBDA (ELEMENT CHANGESPEC VIEWER) (* rrb "23-Oct-86 14:21")
(* applies a single change spec to a
single element.)
(PROG (CHANGEASPECTFN (CHANGEHOW (CADR CHANGESPEC)))
@@ -2476,10 +2532,9 @@ This will be slow for arcs and curves."]
((TEXT NEWFONT SETSIZE SAME FAMILY&SIZE)
(SETQ CHANGEHOW CHANGESPEC)
(FUNCTION SK.CHANGE.TEXT))
- (ADDPOINT
-
- (* handle this specially because it shouldn't go inside of a group element.)
-
+ (ADDPOINT (* handle this specially because it
+ shouldn't go inside of a group
+ element.)
(RETURN (SK.ADD.KNOT.TO.ELEMENT ELEMENT CHANGEHOW)))
(BRUSHCOLOR (FUNCTION SK.CHANGE.BRUSH.COLOR))
(FILLINGCOLOR (FUNCTION SK.CHANGE.FILLING.COLOR))
@@ -2489,26 +2544,26 @@ This will be slow for arcs and curves."]
(RETURN (SK.APPLY.SINGLE.CHANGEFN ELEMENT CHANGEASPECTFN CHANGEHOW VIEWER])
(SK.CHANGEFN
- [LAMBDA (ELEMENTTYPE) (* rrb " 8-Jan-86 17:15")
-
- (* returns the changefn for an element. The only one that isnt
- SK.ELEMENTS.CHANGEFN is image objects.)
+ [LAMBDA (ELEMENTTYPE) (* rrb " 8-Jan-86 17:15")
+
+ (* returns the changefn for an element. The only one that isnt
+ SK.ELEMENTS.CHANGEFN is image objects.)
(* the changefn should return a list
of SKHISTORYCHANGESPEC instances.)
(OR (fetch (SKETCHTYPE CHANGEFN) of (GETPROP ELEMENTTYPE 'SKETCHTYPE))
(FUNCTION SK.DEFAULT.CHANGEFN])
(SK.READCHANGEFN
- [LAMBDA (ELEMENTTYPE) (* rrb " 6-Jan-85 18:29")
-
- (* used to be (OR & (FUNCTION SK.DEFAULT.CHANGEFN)) If this really isn't
- necessary, clean out SK.DEFAULT.CHANGEFN and all the things only it calls.
- If it is necessary, update it to include a readchangefn.)
+ [LAMBDA (ELEMENTTYPE) (* rrb " 6-Jan-85 18:29")
+
+ (* used to be (OR & (FUNCTION SK.DEFAULT.CHANGEFN)) If this really isn't
+ necessary, clean out SK.DEFAULT.CHANGEFN and all the things only it calls.
+ If it is necessary, update it to include a readchangefn.)
(fetch (SKETCHTYPE READCHANGEFN) of (GETPROP ELEMENTTYPE 'SKETCHTYPE])
(SK.DEFAULT.CHANGEFN
- [LAMBDA (SCRNELT W FIELD) (* rrb "14-May-84 15:57")
+ [LAMBDA (SCRNELT W FIELD) (* rrb "14-May-84 15:57")
(PROG ([FIELD (OR FIELD (SK.MENU.AND.RETURN.FIELD (fetch (SCREENELT GTYPE) of SCRNELT]
(INDVELT (fetch (SCREENELT INDIVIDUALGLOBALPART) of SCRNELT))
(NOSETVALUE "str")
@@ -2525,10 +2580,9 @@ This will be slow for arcs and curves."]
(RECLOOK (fetch (SCREENELT GTYPE) of SCRNELT))
'FETCH))
[COND
- ((LISTP FIELD)
-
- (* cadr is queryfunction which can do special input and return value checking.)
-
+ ((LISTP FIELD) (* cadr is queryfunction which can do
+ special input and return value
+ checking.)
(SETQ NEWPROPVALUE (APPLY* (CADR FIELD)
SCRNELT FIELD W NOSETVALUE)))
(T (* have NIL returned be no change.)
@@ -2550,34 +2604,33 @@ This will be slow for arcs and curves."]
(RETURN (fetch (SCREENELT GLOBALPART) of SCRNELT])
(CHANGEABLEFIELDITEMS
- [LAMBDA (ELEMENTTYPE) (* rrb "11-May-84 15:49")
-
- (* returns the list of fields that element type allows to change.
- Each field should be of the form (FIELDNAMELABEL
- (QUOTE (FIELDNAME QUERYFN)) "helpstring") -
- QUERYFN should be a function of four args%: the screen element being changed,
- the "field" returned from this function, the window the sketch is being
- displayed in, and a value to be returned if no change should be made.)
+ [LAMBDA (ELEMENTTYPE) (* rrb "11-May-84 15:49")
+
+ (* returns the list of fields that element type allows to change.
+ Each field should be of the form (FIELDNAMELABEL
+ (QUOTE (FIELDNAME QUERYFN)) "helpstring") -
+ QUERYFN should be a function of four args%: the screen element being changed, the "field"
+ returned from this function, the window the sketch is being displayed in, and a
+ value to be returned if no change should be made.)
(GETPROP ELEMENTTYPE 'CHANGEABLEFIELDITEMS])
(SK.APPLY.CHANGE.COMMAND
- [LAMBDA (CHANGEFN COMMAND SCRELTS SKW) (* rrb "24-Sep-86 16:23")
-
- (* applies a change command to the relevant elements in SCRELTS.)
-
+ [LAMBDA (CHANGEFN COMMAND SCRELTS SKW) (* rrb "24-Sep-86 16:23")
+ (* applies a change command to the
+ relevant elements in SCRELTS.)
(AND COMMAND (SK.DO.AND.RECORD.CHANGES (bind ELTCHANGE for SCRELT in SCRELTS
- when (SETQ ELTCHANGE (SK.APPLY.CHANGE.COMMAND1 CHANGEFN
+ when (SETQ ELTCHANGE (SK.APPLY.CHANGE.COMMAND1 CHANGEFN
COMMAND SCRELT SKW))
collect ELTCHANGE)
SKW])
(SK.DO.AND.RECORD.CHANGES
- [LAMBDA (LSTOFCHANGESPECS VIEWER DONTUPDATEPRIORITYFLG DONTDISPLAYFLG DONTHISTORYFLG)
+ [LAMBDA (LSTOFCHANGESPECS VIEWER DONTUPDATEPRIORITYFLG DONTDISPLAYFLG DONTHISTORYFLG)
(* rrb " 2-Oct-86 16:22")
-
- (* accepts a list of change specs and actually updates the sketch, viewer and
- history list.)
+
+ (* accepts a list of change specs and actually updates the sketch, viewer and
+ history list.)
(COND
(LSTOFCHANGESPECS [SETQ LSTOFCHANGESPEC (COND
@@ -2587,9 +2640,9 @@ This will be slow for arcs and curves."]
(SORT.CHANGESPECS.BY.NEW.PRIORITY
LSTOFCHANGESPECS))
(T
-
- (* order so that new priorities are assigned in the same relative order as the
- old ones.)
+
+ (* order so that new priorities are assigned in the same relative order as the
+ old ones.)
(SORT.CHANGESPECS.BY.OLD.PRIORITY
LSTOFCHANGESPECS]
@@ -2598,10 +2651,10 @@ This will be slow for arcs and curves."]
T])
(SK.APPLY.CHANGE.COMMAND1
- [LAMBDA (CHANGEFN COMMAND SCRELT VIEWER) (* rrb "27-Jun-86 15:48")
-
- (* applies a change command to a single screen element.
- Does the prechangefn and whenchangefn checks.)
+ [LAMBDA (CHANGEFN COMMAND SCRELT VIEWER) (* rrb "27-Jun-86 15:48")
+
+ (* applies a change command to a single screen element.
+ Does the prechangefn and whenchangefn checks.)
(PROG (FNRESULT CHANGES)
(COND
@@ -2611,9 +2664,9 @@ This will be slow for arcs and curves."]
((LISTP FNRESULT) (* result was a different change
specification.)
(SETQ COMMAND FNRESULT)))
-
- (* code was written to take a list but since prechangefn can change things at
- the elements level, every element is done individually.)
+
+ (* code was written to take a list but since prechangefn can change things at the
+ elements level, every element is done individually.)
(OR (SETQ CHANGES (APPLY* CHANGEFN (LIST SCRELT)
VIEWER COMMAND))
@@ -2627,7 +2680,7 @@ This will be slow for arcs and curves."]
CHANGES])
(SK.ELEMENTS.CHANGEFN
- [LAMBDA (SCRELTS SKW HOW) (* rrb " 2-Oct-86 16:18")
+ [LAMBDA (SCRELTS SKW HOW) (* rrb " 2-Oct-86 16:18")
(* changefn for many sketch elements.)
(PROG (CHANGEASPECTFN (CHANGEHOW (CADR HOW)))
(OR (SETQ CHANGEASPECTFN (SELECTQ (CAR HOW)
@@ -2641,10 +2694,8 @@ This will be slow for arcs and curves."]
((TEXT NEWFONT SETSIZE SAME FAMILY&SIZE)
(SETQ CHANGEHOW HOW)
(FUNCTION SK.CHANGE.TEXT))
- (ADDPOINT
-
- (* handle this specially because it only works on the first element.)
-
+ (ADDPOINT (* handle this specially because it
+ only works on the first element.)
(RETURN (LIST (SK.ADD.KNOT.TO.ELEMENT
(fetch (SCREENELT GLOBALPART)
of (CAR SCRELTS))
@@ -2660,10 +2711,10 @@ This will be slow for arcs and curves."]
CHANGEASPECTFN CHANGEHOW SKW])
(READ.POINT.TO.ADD
- [LAMBDA (SCRELT SKVIEWER) (* rrb "20-May-86 10:52")
-
- (* asks where a point should be added and where it should be.
- Return a list (AfterPt NewPt))
+ [LAMBDA (SCRELT SKVIEWER) (* rrb "20-May-86 10:52")
+
+ (* asks where a point should be added and where it should be.
+ Return a list (AfterPt NewPt))
(PROG (AFTERPT NEWPT)
(STATUSPRINT SKVIEWER "Select the point that the new point should follow.")
@@ -2678,20 +2729,18 @@ This will be slow for arcs and curves."]
(SK.MAP.INPUT.PT.TO.GLOBAL NEWPT SKVIEWER])
(GLOBAL.KNOT.FROM.LOCAL
- [LAMBDA (LOCALKNOT SCRELT) (* rrb "20-Nov-85 11:05")
-
- (* returns the global knot that corresponds to a local one.)
-
+ [LAMBDA (LOCALKNOT SCRELT) (* rrb "20-Nov-85 11:05")
+ (* returns the global knot that
+ corresponds to a local one.)
(for LKNOT in (fetch (SCREENELT HOTSPOTS) of SCRELT) as GKNOT
in (GETSKETCHELEMENTPROP (fetch (SCREENELT GLOBALPART) of SCRELT)
'DATA) when (EQUAL LKNOT LOCALKNOT) do (RETURN GKNOT])
(SK.ADD.KNOT.TO.ELEMENT
- [LAMBDA (GELTWITHKNOTS PTS) (* rrb "16-Jan-86 12:23")
-
- (* adds a point to a knot element. The point
- (CADR PTS) is added after (CAR PTS))
-
+ [LAMBDA (GELTWITHKNOTS PTS) (* rrb "16-Jan-86 12:23")
+ (* adds a point to a knot element.
+ The point (CADR PTS) is added after
+ (CAR PTS))
(PROG ((OLDKNOTS (GETSKETCHELEMENTPROP GELTWITHKNOTS 'DATA))
NEWKNOTS)
[SETQ NEWKNOTS (for KNOT in OLDKNOTS join (COND
@@ -2699,37 +2748,37 @@ This will be slow for arcs and curves."]
(LIST KNOT (CADR PTS)))
(T (LIST KNOT]
(RETURN (create SKHISTORYCHANGESPEC
- NEWELT _ (SK.CHANGE.ELEMENT.KNOTS GELTWITHKNOTS NEWKNOTS)
- OLDELT _ GELTWITHKNOTS
- PROPERTY _ 'DATA
- NEWVALUE _ NEWKNOTS
- OLDVALUE _ OLDKNOTS])
+ NEWELT ↠(SK.CHANGE.ELEMENT.KNOTS GELTWITHKNOTS NEWKNOTS)
+ OLDELT ↠GELTWITHKNOTS
+ PROPERTY ↠'DATA
+ NEWVALUE ↠NEWKNOTS
+ OLDVALUE ↠OLDKNOTS])
(SK.GROUP.CHANGEFN
- [LAMBDA (GROUPELT CHANGEASPECTFN CHANGEHOW SKW) (* rrb "10-Jan-86 12:15")
-
- (* maps a change function through all the elements of a group and returns a
- change spec event if it takes on any of them.)
+ [LAMBDA (GROUPELT CHANGEASPECTFN CHANGEHOW SKW) (* rrb "10-Jan-86 12:15")
+
+ (* maps a change function through all the elements of a group and returns a
+ change spec event if it takes on any of them.)
(PROG (NEWELT)
(SETQ NEWELT (SK.GROUP.CHANGEFN1 GROUPELT CHANGEASPECTFN CHANGEHOW SKW))
(OR NEWELT (RETURN))
(RETURN (create SKHISTORYCHANGESPEC
- NEWELT _ NEWELT
- OLDELT _ GROUPELT
- PROPERTY _ 'DATA
- NEWVALUE _ (fetch (GROUP LISTOFGLOBALELTS) of (fetch (GLOBALPART
+ NEWELT ↠NEWELT
+ OLDELT ↠GROUPELT
+ PROPERTY ↠'DATA
+ NEWVALUE ↠(fetch (GROUP LISTOFGLOBALELTS) of (fetch (GLOBALPART
INDIVIDUALGLOBALPART
) of NEWELT))
- OLDVALUE _ (fetch (GROUP LISTOFGLOBALELTS) of (fetch (GLOBALPART
+ OLDVALUE ↠(fetch (GROUP LISTOFGLOBALELTS) of (fetch (GLOBALPART
INDIVIDUALGLOBALPART
) of GROUPELT])
(SK.GROUP.CHANGEFN1
- [LAMBDA (GROUPELT CHANGEASPECTFN CHANGEHOW SKW) (* rrb "27-Jun-86 16:19")
-
- (* maps a change function through all the elements of a group and returns a new
- element if it takes on any of them.)
+ [LAMBDA (GROUPELT CHANGEASPECTFN CHANGEHOW SKW) (* rrb "27-Jun-86 16:19")
+
+ (* maps a change function through all the elements of a group and returns a new
+ element if it takes on any of them.)
(PROG ((OLDSUBELTS (fetch (GROUP LISTOFGLOBALELTS) of (fetch (GLOBALPART INDIVIDUALGLOBALPART)
of GROUPELT)))
@@ -2740,14 +2789,14 @@ This will be slow for arcs and curves."]
((EQ (fetch (GLOBALPART GTYPE) of SUBELT)
'GROUP)
(* handle a group by propagating it)
- (SK.GROUP.CHANGEFN1 SUBELT CHANGEASPECTFN
+ (SK.GROUP.CHANGEFN1 SUBELT CHANGEASPECTFN
CHANGEHOW SKW))
(T
-
- (* individual change functions return a change spec event, pull the new element
- out of it. This throws aways a lot of information about what was changed but I
- don't know any good way to save it so that it can be passed on undoing so don't
- save it.)
+
+ (* individual change functions return a change spec event, pull the new element
+ out of it. This throws aways a lot of information about what was changed but I
+ don't know any good way to save it so that it can be passed on undoing so don't
+ save it.)
(fetch (SKHISTORYCHANGESPEC NEWELT)
of (APPLY* CHANGEASPECTFN SUBELT
@@ -2756,23 +2805,21 @@ This will be slow for arcs and curves."]
NEWELT]
(OR CHANGEDFLG (RETURN))
[SETQ NEWSUBELTS (for OLDSUBELT in OLDSUBELTS as NEWSUBELT in NEWSUBELTS
- collect
-
- (* copy any unchanged elements so that user programs don't have to worry about
- them.)
-
+ collect (* copy any unchanged elements so that
+ user programs don't have to worry
+ about them.)
(OR NEWSUBELT (SK.COPY.GLOBAL.ELEMENT OLDSUBELT]
(RETURN (SK.UPDATE.GROUP.AFTER.CHANGE (create GLOBALPART
- COMMONGLOBALPART _ (fetch (GLOBALPART
+ COMMONGLOBALPART ↠(fetch (GLOBALPART
COMMONGLOBALPART
)
of GROUPELT)
- INDIVIDUALGLOBALPART _
+ INDIVIDUALGLOBALPART â†
(create GROUP using (fetch (GLOBALPART
INDIVIDUALGLOBALPART
)
of GROUPELT)
- LISTOFGLOBALELTS _
+ LISTOFGLOBALELTS â†
NEWSUBELTS])
)
(DECLARE%: DONTCOPY
@@ -2789,20 +2836,16 @@ This will be slow for arcs and curves."]
(DEFINEQ
(ADD.ELEMENT.TO.SKETCH
- [LAMBDA (GELT SKETCH) (* rrb "23-Jun-87 13:29")
+ [LAMBDA (GELT SKETCH) (* rrb "23-Jun-87 13:29")
(* changes the global sketch)
(PROG [(REALSKETCH (INSURE.SKETCH SKETCH))
(ELTPRI (\GETSKETCHELEMENTPROP1 GELT 'PRI]
[COND
((EQ (fetch (GLOBALPART GTYPE) of GELT)
- 'SKIMAGEOBJ)
-
- (* call the wheninsertedfn for this imageobj if there is one.)
-
- (PROG ((IMOBJ (fetch (SKIMAGEOBJ SKIMAGEOBJ) of (fetch (GLOBALPART
- INDIVIDUALGLOBALPART
- )
- of GELT)))
+ 'SKIMAGEOBJ) (* call the wheninsertedfn for this
+ imageobj if there is one.)
+ (PROG ((IMOBJ (fetch (SKIMAGEOBJ SKIMAGEOBJ) of (fetch (GLOBALPART INDIVIDUALGLOBALPART
+ ) of GELT)))
DATUM)
(COND
((AND (SETQ DATUM (IMAGEOBJPROP IMOBJ 'WHENINSERTEDFN))
@@ -2811,10 +2854,8 @@ This will be slow for arcs and curves."]
NIL SKETCH)))
(RETURN]
(COND
- ((NULL ELTPRI)
-
- (* give the element a priority and put it at the end)
-
+ ((NULL ELTPRI) (* give the element a priority and put
+ it at the end)
(SK.SET.ELEMENT.PRIORITY GELT (SK.POP.NEXT.PRIORITY REALSKETCH))
(TCONC (fetch (SKETCH SKETCHTCELL) of REALSKETCH)
GELT))
@@ -2822,7 +2863,7 @@ This will be slow for arcs and curves."]
(SK.MARK.DIRTY REALSKETCH])
(ADD.SKETCH.VIEWER
- [LAMBDA (SKETCH VIEWER) (* rrb " 8-APR-83 17:56")
+ [LAMBDA (SKETCH VIEWER) (* rrb " 8-APR-83 17:56")
(* adds VIEWER as a viewer of SKETCH.)
(PROG (VIEWERS)
(COND
@@ -2834,7 +2875,7 @@ This will be slow for arcs and curves."]
ALL.SKETCHES])
(REMOVE.SKETCH.VIEWER
- [LAMBDA (SKETCH VIEWER) (* rrb "26-Apr-85 16:56")
+ [LAMBDA (SKETCH VIEWER) (* rrb "26-Apr-85 16:56")
(* removes VIEWER as a viewer of
SKETCH.)
(PROG (VIEWERS)
@@ -2845,10 +2886,9 @@ This will be slow for arcs and curves."]
(SETQ ALL.SKETCHES (REMOVE VIEWERS ALL.SKETCHES])
(ALL.SKETCH.VIEWERS
- [LAMBDA (SKETCH) (* rrb " 8-APR-83 14:20")
-
- (* returns the list of all active viewers of a sketch)
-
+ [LAMBDA (SKETCH) (* rrb " 8-APR-83 14:20")
+ (* returns the list of all active
+ viewers of a sketch)
(CDR (VIEWER.BUCKET SKETCH])
(SKETCH.ALL.VIEWERS
@@ -2857,65 +2897,58 @@ This will be slow for arcs and curves."]
(ALL.SKETCH.VIEWERS (INSURE.SKETCH SKETCH])
(VIEWER.BUCKET
- [LAMBDA (SKETCH) (* rrb " 8-APR-83 14:20")
+ [LAMBDA (SKETCH) (* rrb " 8-APR-83 14:20")
(FASSOC SKETCH ALL.SKETCHES])
(ELT.INSIDE.REGION?
- [LAMBDA (GLOBALPART WORLDREG) (* rrb " 4-AUG-83 14:51")
-
- (* determines if any part of an element is inside the region WORLDREG)
-
+ [LAMBDA (GLOBALPART WORLDREG) (* rrb " 4-AUG-83 14:51")
+ (* determines if any part of an
+ element is inside the region WORLDREG)
(APPLY* (SK.INSIDEFN (fetch (GLOBALPART GTYPE) of GLOBALPART))
GLOBALPART WORLDREG])
(ELT.INSIDE.SKWP
- [LAMBDA (GLOBALPART SKETCHW) (* rrb "25-Nov-85 17:46")
-
- (* determines if a global element is in the world region of a map window.)
-
+ [LAMBDA (GLOBALPART SKETCHW) (* rrb "25-Nov-85 17:46")
+ (* determines if a global element is
+ in the world region of a map window.)
(ELT.INSIDE.REGION? GLOBALPART (SKETCH.REGION.VIEWED SKETCHW])
(SCALE.FROM.SKW
- [LAMBDA (WINDOW) (* rrb "11-MAR-83 11:52")
+ [LAMBDA (WINDOW) (* rrb "11-MAR-83 11:52")
(* gets the scale of a sketch window.)
(WINDOWPROP WINDOW 'SCALE])
(SK.ADDELT.TO.WINDOW
- [LAMBDA (PELT SKETCHW) (* rrb "10-Mar-86 14:56")
-
- (* adds a picture element to a sketch window.
- Returns the element that was added.)
-
+ [LAMBDA (PELT SKETCHW) (* rrb "10-Mar-86 14:56")
+ (* adds a picture element to a sketch
+ window. Returns the element that was
+ added.)
(COND
(PELT (SK.ADD.PRIORITY.LOCAL.ELEMENT.TO.SKETCH (WINDOWPROP SKETCHW 'SKETCHSPECS)
PELT)
[PROG ((CACHE (SK.HOTSPOT.CACHE SKETCHW)))
(COND
- (CACHE
-
- (* if there is a cache, adding an element will change it)
-
+ (CACHE (* if there is a cache, adding an
+ element will change it)
(SK.ADD.HOTSPOTS.TO.CACHE1 PELT CACHE))
- (T
-
- (* if this is the first, must set the window property too.)
-
+ (T (* if this is the first, must set the
+ window property too.)
(SK.SET.HOTSPOT.CACHE SKETCHW (SK.ADD.HOTSPOTS.TO.CACHE1 PELT CACHE]
PELT])
(SK.CALC.REGION.VIEWED
- [LAMBDA (WINDOW SCALE) (* rrb "29-APR-83 08:37")
+ [LAMBDA (WINDOW SCALE) (* rrb "29-APR-83 08:37")
(* returns the region of the sketch
visible in window.)
(UNSCALE.REGION (DSPCLIPPINGREGION NIL WINDOW)
SCALE])
(SK.DRAWFIGURE
- [LAMBDA (SCREENELT STREAM REGION SCALE) (* rrb "30-Aug-84 14:31")
-
- (* draws an element of a sketch in a window.
- Makes sure the scale of the current drawing is with in the limits of the
- element. Returns SCREENELT)
+ [LAMBDA (SCREENELT STREAM REGION SCALE) (* rrb "30-Aug-84 14:31")
+
+ (* draws an element of a sketch in a window.
+ Makes sure the scale of the current drawing is with in the limits of the element.
+ Returns SCREENELT)
(PROG (GLOBALPART)
[COND
@@ -2933,20 +2966,20 @@ This will be slow for arcs and curves."]
(RETURN SCREENELT])
(SK.DRAWFIGURE1
- [LAMBDA (ELT SKW REGION) (* rrb "14-Sep-84 16:59")
+ [LAMBDA (ELT SKW REGION) (* rrb "14-Sep-84 16:59")
(* displays a sketch element in a
window)
(APPLY* (SK.DRAWFN (fetch (SCREENELT GTYPE) of ELT))
ELT SKW REGION])
(SK.LOCAL.FROM.GLOBAL
- [LAMBDA (GELT SKSTREAM SCALE) (* rrb "11-Jul-86 15:56")
-
- (* returns the element instance of the global element GELT expanded into the
- window SKW.)
-
- (* SKSTREAM can be deleted from call once TEXT.EXPANDFN no longer needs to
- distinquish INTERPRESS stream from windows.)
+ [LAMBDA (GELT SKSTREAM SCALE) (* rrb "11-Jul-86 15:56")
+ (* returns the element instance of the
+ global element GELT expanded into the
+ window SKW.)
+
+ (* SKSTREAM can be deleted from call once TEXT.EXPANDFN no longer needs to
+ distinquish INTERPRESS stream from windows.)
(PROG ((SCRELT (APPLY* (SK.EXPANDFN (fetch (GLOBALPART GTYPE) of GELT))
GELT
@@ -2962,10 +2995,10 @@ This will be slow for arcs and curves."]
(RETURN SCRELT])
(SKETCH.REGION.VIEWED
- [LAMBDA (VIEWER NEWREGION) (* rrb "23-Apr-87 12:20")
-
- (* returns the region in sketch coordinates of the area visible in SKETCHW.)
-
+ [LAMBDA (VIEWER NEWREGION) (* rrb "23-Apr-87 12:20")
+ (* returns the region in sketch
+ coordinates of the area visible in
+ SKETCHW.)
(COND
[(IMAGEOBJP VIEWER) (* it is a sketch image object)
(PROG ([SK? (LISTP (IMAGEOBJPROP VIEWER 'OBJECTDATUM]
@@ -2973,62 +3006,57 @@ This will be slow for arcs and curves."]
(COND
[(type? SKETCH (FETCH (SKETCHIMAGEOBJ SKIO.SKETCH) OF SK?))
(RETURN (PROG1 (fetch (SKETCHIMAGEOBJ SKIO.REGION) of SK?)
- (COND
- (NEWREGION (COND
- ((REGIONP NEWREGION)
- (replace (SKETCHIMAGEOBJ SKIO.REGION)
- of SK? with NEWREGION))
- ((SETQ NEWVIEW (SKETCH.VIEW.FROM.NAME NEWREGION
- VIEWER))
- (replace (SKETCHIMAGEOBJ SKIO.REGION)
- of SK? with NEWVIEW))
- ((EQ NEWREGION 'HOME)
-
- (* change scale to 1.0 and set lower left of region viewed to
- (0,0)%.)
-
- NIL)
- (T
-
- (* HOME and named views aren't supported for image object sketches.)
-
- (\ILLEGAL.ARG NEWREGION]
+ [COND
+ (NEWREGION (COND
+ ((REGIONP NEWREGION)
+ (replace (SKETCHIMAGEOBJ SKIO.REGION) of SK?
+ with NEWREGION))
+ ((SETQ NEWVIEW (SKETCH.VIEW.FROM.NAME NEWREGION VIEWER
+ ))
+ (replace (SKETCHIMAGEOBJ SKIO.REGION) of SK?
+ with NEWVIEW))
+ ((EQ NEWREGION 'HOME)
+ (* change scale to 1.0 and set lower
+ left of region viewed to
+ (0,0)%.)
+ NIL)
+ (T (* HOME and named views aren't
+ supported for image object sketches.)
+ (\ILLEGAL.ARG NEWREGION])]
(T (ERROR "not a sketch image object" VIEWER]
[(WINDOWP VIEWER)
(PROG1 (WINDOWPROP VIEWER 'REGION.VIEWED)
- (COND
- (NEWREGION (PROG (NEWVIEW)
- (RETURN (COND
- ((REGIONP NEWREGION)
- (SKETCH.GLOBAL.REGION.ZOOM VIEWER NEWREGION))
- ((EQ NEWREGION 'HOME)
- (SKETCH.HOME VIEWER))
- ((SETQ NEWVIEW (SKETCH.VIEW.FROM.NAME NEWREGION
- VIEWER))
- (SK.MOVE.TO.VIEW VIEWER NEWVIEW))
- (T (\ILLEGAL.ARG NEWREGION]
+ [COND
+ (NEWREGION (PROG (NEWVIEW)
+ (RETURN (COND
+ ((REGIONP NEWREGION)
+ (SKETCH.GLOBAL.REGION.ZOOM VIEWER NEWREGION))
+ ((EQ NEWREGION 'HOME)
+ (SKETCH.HOME VIEWER))
+ ((SETQ NEWVIEW (SKETCH.VIEW.FROM.NAME NEWREGION VIEWER))
+ (SK.MOVE.TO.VIEW VIEWER NEWVIEW))
+ (T (\ILLEGAL.ARG NEWREGION])]
(T (\ILLEGAL.ARG VIEWER])
(SKETCH.VIEW.FROM.NAME
- [LAMBDA (VIEWNAME SKETCHW) (* rrb "25-Nov-85 17:55")
-
- (* returns the view structure for a view given its name.)
-
+ [LAMBDA (VIEWNAME SKETCHW) (* rrb "25-Nov-85 17:55")
+ (* returns the view structure for a
+ view given its name.)
(for SAVEDVIEW in (GETSKETCHPROP (INSURE.SKETCH SKETCHW)
'VIEWS) when (EQUAL VIEWNAME (fetch (SKETCHVIEW VIEWNAME) of SAVEDVIEW))
do (RETURN SAVEDVIEW])
(SK.UPDATE.REGION.VIEWED
- [LAMBDA (SKW) (* rrb "11-Jul-86 15:51")
+ [LAMBDA (SKW) (* rrb "11-Jul-86 15:51")
(* updates the REGION.VIEWED property
of a window.)
(WINDOWPROP SKW 'REGION.VIEWED (SK.CALC.REGION.VIEWED SKW (VIEWER.SCALE SKW])
(SKETCH.ADD.AND.DISPLAY
- [LAMBDA (GELT SKETCHW DONTCLEARCURSOR) (* rrb "14-Nov-84 17:12")
-
- (* adds a new element to a sketch window and handles propagation to all other
- figure windows)
+ [LAMBDA (GELT SKETCHW DONTCLEARCURSOR) (* rrb "14-Nov-84 17:12")
+
+ (* adds a new element to a sketch window and handles propagation to all other
+ figure windows)
(COND
(GELT (SK.ADD.HISTEVENT 'ADD (LIST GELT)
@@ -3036,10 +3064,9 @@ This will be slow for arcs and curves."]
(SK.ADD.ELEMENT GELT SKETCHW DONTCLEARCURSOR])
(SKETCH.ADD.AND.DISPLAY1
- [LAMBDA (GELT SKETCHW SCALE NODISPLAYFLG) (* rrb "11-Jul-86 15:51")
-
- (* displays a sketch element and adds it to the window.)
-
+ [LAMBDA (GELT SKETCHW SCALE NODISPLAYFLG) (* rrb "11-Jul-86 15:51")
+ (* displays a sketch element and adds
+ it to the window.)
(COND
(GELT (COND
(NODISPLAYFLG (SK.ADD.ITEM GELT SKETCHW))
@@ -3047,19 +3074,18 @@ This will be slow for arcs and curves."]
SKETCHW NIL (OR SCALE (VIEWER.SCALE SKETCHW])
(SK.ADD.ITEM
- [LAMBDA (GELT SKETCHW) (* rrb "10-APR-83 13:38")
-
- (* adds a global element to a window. Returns the local element that was
- actually added.)
+ [LAMBDA (GELT SKETCHW) (* rrb "10-APR-83 13:38")
+
+ (* adds a global element to a window. Returns the local element that was actually
+ added.)
(SK.ADDELT.TO.WINDOW (SK.LOCAL.FROM.GLOBAL GELT SKETCHW)
SKETCHW])
(SKETCHW.ADD.INSTANCE
- [LAMBDA (TYPE SKW) (* rrb "14-Nov-84 17:08")
-
- (* reads an instance of type TYPE from the user and displays it in SKW.)
-
+ [LAMBDA (TYPE SKW) (* rrb "14-Nov-84 17:08")
+ (* reads an instance of type TYPE from
+ the user and displays it in SKW.)
(PROG ((ELT (SK.INPUT TYPE SKW)))
(AND ELT (SKETCH.ADD.AND.DISPLAY ELT SKW))
(RETURN ELT])
@@ -3072,14 +3098,14 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SK.SEL.AND.DELETE
- [LAMBDA (W) (* rrb "10-Dec-85 17:08")
+ [LAMBDA (W) (* rrb "10-Dec-85 17:08")
(* lets the user select elements and
deletes them)
(SK.DELETE.ELEMENT (SK.SELECT.MULTIPLE.ITEMS W T NIL 'DELETE)
W])
(SK.ERASE.AND.DELETE.ITEM
- [LAMBDA (SELELT SKW NODISPLAYFLG) (* rrb "30-Jul-85 15:36")
+ [LAMBDA (SELELT SKW NODISPLAYFLG) (* rrb "30-Jul-85 15:36")
(* removes a sketch element from a
viewer.)
(COND
@@ -3087,11 +3113,11 @@ This will be slow for arcs and curves."]
(SK.DELETE.ITEM SELELT SKW])
(REMOVE.ELEMENT.FROM.SKETCH
- [LAMBDA (GELT SKETCH INSIDEGROUPFLG) (* rrb "26-Sep-86 13:24")
-
- (* changes the global sketch Returns the element or the group element
- containing the element if the element was found in the sketch.
- If INSIDEGROUPFLG is T, it will go inside of groups.)
+ [LAMBDA (GELT SKETCH INSIDEGROUPFLG) (* rrb "26-Sep-86 13:24")
+
+ (* changes the global sketch Returns the element or the group element containing
+ the element if the element was found in the sketch.
+ If INSIDEGROUPFLG is T, it will go inside of groups.)
(PROG ((SKETCHDATA (INSURE.SKETCH SKETCH)))
(COND
@@ -3108,10 +3134,10 @@ This will be slow for arcs and curves."]
(T (RETURN NIL])
(SK.DELETE.ELEMENT
- [LAMBDA (ELTSTODEL SKETCHW ELTSFORHISTORY) (* rrb "30-Dec-85 16:19")
-
- (* deletes a list of element to a sketch window and handles propagation to all
- other figure windows)
+ [LAMBDA (ELTSTODEL SKETCHW ELTSFORHISTORY) (* rrb "30-Dec-85 16:19")
+
+ (* deletes a list of element to a sketch window and handles propagation to all
+ other figure windows)
(SKED.CLEAR.SELECTION SKETCHW)
(AND ELTSTODEL (SK.DELETE.ELEMENT2 (for SCRELT in ELTSTODEL collect (fetch (SCREENELT GLOBALPART)
@@ -3119,10 +3145,10 @@ This will be slow for arcs and curves."]
SKETCHW ELTSFORHISTORY])
(SK.DELETE.ELEMENT2
- [LAMBDA (GELTSTODEL SKETCHW ELTSFORHISTORY) (* rrb "30-Dec-85 16:18")
-
- (* deletes a list of global elements and adds it to the history list depending
- upon ELTSFORHISTORY)
+ [LAMBDA (GELTSTODEL SKETCHW ELTSFORHISTORY) (* rrb "30-Dec-85 16:18")
+
+ (* deletes a list of global elements and adds it to the history list depending
+ upon ELTSFORHISTORY)
(PROG (DELETEDELTS)
(SETQ DELETEDELTS (SK.CHECK.WHENDELETEDFN SKETCHW GELTSTODEL))
@@ -3134,15 +3160,14 @@ This will be slow for arcs and curves."]
(RETURN DELETEDELTS])
(SK.DELETE.KNOT
- [LAMBDA (W) (* rrb "31-Jan-86 10:47")
-
- (* lets the user select a knot in a curve or wire and deletes it.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:47")
+ (* lets the user select a knot in a
+ curve or wire and deletes it.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.DELETE.KNOT (KWOTE W))
W])
(SK.SEL.AND.DELETE.KNOT
- [LAMBDA (W) (* rrb "10-Dec-85 17:03")
+ [LAMBDA (W) (* rrb "10-Dec-85 17:03")
(* lets the user select a knot and
deletes it.)
(PROG [(KNOTELTS (SUBSET (LOCALSPECS.FROM.VIEWER W)
@@ -3160,7 +3185,7 @@ This will be slow for arcs and curves."]
KNOTELTS W])
(SK.DELETE.ELEMENT.KNOT
- [LAMBDA (LOCALKNOT SCRELTS SKW) (* rrb " 9-Jan-86 19:45")
+ [LAMBDA (LOCALKNOT SCRELTS SKW) (* rrb " 9-Jan-86 19:45")
(* deletes a knot from a curve or wire
element.)
(SKED.CLEAR.SELECTION SKW)
@@ -3196,11 +3221,11 @@ This will be slow for arcs and curves."]
screen)
(SK.UPDATE.ELEMENTS (SETQ CHANGES
(CONS (create SKHISTORYCHANGESPEC
- NEWELT _ NEWELT
- OLDELT _ GLOBALPART
- PROPERTY _ 'DATA
- NEWVALUE _ NEWKNOTS
- OLDVALUE _ GLOBALKNOTS)))
+ NEWELT ↠NEWELT
+ OLDELT ↠GLOBALPART
+ PROPERTY ↠'DATA
+ NEWVALUE ↠NEWKNOTS
+ OLDVALUE ↠GLOBALKNOTS)))
SKW)
(SK.ADD.HISTEVENT 'CHANGE CHANGES SKW]
(T (* delete the whole element.)
@@ -3208,11 +3233,11 @@ This will be slow for arcs and curves."]
SKW])
(SK.CHECK.WHENDELETEDFN
- [LAMBDA (VIEWER GELTS) (* rrb "30-Dec-85 16:15")
-
- (* checks if the sketch has a when deleted fn and if so, creates the list of
- global elements and interprets the result.
- Returns a list of the elements that should be deleted.)
+ [LAMBDA (VIEWER GELTS) (* rrb "30-Dec-85 16:15")
+
+ (* checks if the sketch has a when deleted fn and if so, creates the list of
+ global elements and interprets the result.
+ Returns a list of the elements that should be deleted.)
(PROG ((SKETCH (INSURE.SKETCH VIEWER))
RESULT DELETEFN)
@@ -3228,10 +3253,9 @@ This will be slow for arcs and curves."]
(T (RETURN GELTS])
(SK.CHECK.PREEDITFN
- [LAMBDA (VIEWER OLDELT) (* rrb " 9-Dec-85 11:52")
-
- (* checks if the sketch has a preedit fn and if so, calls it)
-
+ [LAMBDA (VIEWER OLDELT) (* rrb " 9-Dec-85 11:52")
+ (* checks if the sketch has a preedit
+ fn and if so, calls it)
(PROG ((SKETCH (INSURE.SKETCH VIEWER))
PREEDITFN)
(COND
@@ -3241,20 +3265,20 @@ This will be slow for arcs and curves."]
'DON'T])
(SK.CHECK.END.INITIAL.EDIT
- [LAMBDA (VIEWER NEWELT) (* rrb "15-Jan-86 15:20")
-
- (* called when the edit of a newly created text element is ended.
- Calls the when changed fn.)
+ [LAMBDA (VIEWER NEWELT) (* rrb "15-Jan-86 15:20")
+
+ (* called when the edit of a newly created text element is ended.
+ Calls the when changed fn.)
(SK.CHECK.WHENCHANGEDFN VIEWER NEWELT 'DATA NIL (fetch (TEXT LISTOFCHARACTERS)
of (fetch (GLOBALPART INDIVIDUALGLOBALPART)
of NEWELT])
(SK.CHECK.WHENPOINTDELETEDFN
- [LAMBDA (VIEWER SCRELT CONTROLPOINT) (* rrb " 3-Jan-86 15:32")
-
- (* checks if the sketch has a prechange fn and if so, calls it and interprets
- the result. Returns NIL if the point should not be deleted.)
+ [LAMBDA (VIEWER SCRELT CONTROLPOINT) (* rrb " 3-Jan-86 15:32")
+
+ (* checks if the sketch has a prechange fn and if so, calls it and interprets the
+ result. Returns NIL if the point should not be deleted.)
(PROG ((SKETCH (INSURE.SKETCH VIEWER))
RESULT PRECHANGEFN)
@@ -3269,21 +3293,21 @@ This will be slow for arcs and curves."]
(T (RETURN SCRELT])
(SK.ERASE.ELT
- [LAMBDA (ELT WINDOW REGION) (* rrb "30-Aug-86 15:08")
+ [LAMBDA (ELT WINDOW REGION) (* rrb "30-Aug-86 15:08")
(* erases a sketch element)
(DSPOPERATION 'ERASE WINDOW)
(SK.DRAWFIGURE ELT WINDOW REGION (VIEWER.SCALE WINDOW))
(DSPOPERATION 'PAINT WINDOW])
(SK.DELETE.ELT
- [LAMBDA (W) (* rrb "31-Jan-86 10:48")
+ [LAMBDA (W) (* rrb "31-Jan-86 10:48")
(* lets the user select an element and
deletes it.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.DELETE (KWOTE W))
W])
(SK.DELETE.ITEM
- [LAMBDA (ELT SKETCHW) (* rrb "12-May-85 18:10")
+ [LAMBDA (ELT SKETCHW) (* rrb "12-May-85 18:10")
(* deletes an element from a window)
(COND
(ELT (DELFROMTCONC (WINDOWPROP SKETCHW 'SKETCHSPECS)
@@ -3292,10 +3316,10 @@ This will be slow for arcs and curves."]
ELT])
(DELFROMTCONC
- [LAMBDA (TCONCCELL ELEMENT) (* rrb "26-Sep-86 13:24")
-
- (* deletes an element from a TCONC cell list.
- Returns T if the element was deleted, NIL if it wasn't a member.)
+ [LAMBDA (TCONCCELL ELEMENT) (* rrb "26-Sep-86 13:24")
+
+ (* deletes an element from a TCONC cell list.
+ Returns T if the element was deleted, NIL if it wasn't a member.)
(COND
((EQ ELEMENT (CAAR TCONCCELL)) (* first element)
@@ -3307,10 +3331,8 @@ This will be slow for arcs and curves."]
(T (* remove first element.)
(RPLACA TCONCCELL (CDAR TCONCCELL]
T)
- ((EQ ELEMENT (CADR TCONCCELL))
-
- (* elt to delete is the last one on the list, do special case.)
-
+ ((EQ ELEMENT (CADR TCONCCELL)) (* elt to delete is the last one on
+ the list, do special case.)
(for TAIL on (CAR TCONCCELL) when (EQ (CDR TAIL)
(CDR TCONCCELL)) do
(* update the TCONC last entry)
@@ -3331,24 +3353,24 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SK.COPY.ELT
- [LAMBDA (W) (* rrb "31-Jan-86 10:49")
+ [LAMBDA (W) (* rrb "31-Jan-86 10:49")
(* lets the user select an element and
copies it.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.COPY (KWOTE W))
W])
(SK.SEL.AND.COPY
- [LAMBDA (W) (* rrb "10-Dec-85 17:08")
+ [LAMBDA (W) (* rrb "10-Dec-85 17:08")
(* lets the user select elements and
copies them.)
(SK.COPY.ELEMENTS (SK.SELECT.MULTIPLE.ITEMS W T NIL 'COPY)
W])
(SK.COPY.ELEMENTS
- [LAMBDA (SCRELTS SKW) (* rrb " 1-Oct-86 19:12")
-
- (* create a bitmap of the thing being moved and get its new position.
- Then translate all the pieces.)
+ [LAMBDA (SCRELTS SKW) (* rrb " 1-Oct-86 19:12")
+
+ (* create a bitmap of the thing being moved and get its new position.
+ Then translate all the pieces.)
(AND SCRELTS (PROG (FIGINFO FIRSTHOTSPOT GHOTSPOT LOWLFT NEWGPOS DELTAPOS NEWELTS COPYFN SKETCH
COPYARGS COPYPLACEDYETFLG) (* call PRECOPYFN.)
@@ -3360,12 +3382,12 @@ This will be slow for arcs and curves."]
[COND
((EQ DELTAPOS 'DON'T)
(RETURN))
- ((POSITIONP DELTAPOS)
-
- (* PRECOPYFN returned a position, don't bother to check for multiple copies.)
-
- (* value returned is the delta by which to move the point.
- Set up new position)
+ ((POSITIONP DELTAPOS) (* PRECOPYFN returned a position,
+ don't bother to check for multiple
+ copies.)
+
+ (* value returned is the delta by which to move the point.
+ Set up new position)
(RETURN (SK.ADD.COPY.OF.ELEMENTS SKW SCRELTS (OR COPYARGS (SETQ COPYARGS
(
@@ -3378,9 +3400,9 @@ This will be slow for arcs and curves."]
(SETQ GHOTSPOT (GETSKETCHELEMENTPROP (fetch (SCREENELT GLOBALPART)
of (CAR SCRELTS))
'POSITION))
-
- (* move the image by the first hotspot of the first element chosen.
- This will align the image on the grid correctly.)
+
+ (* move the image by the first hotspot of the first element chosen.
+ This will align the image on the grid correctly.)
PLACECOPYLP
(COND
@@ -3402,19 +3424,18 @@ This will be slow for arcs and curves."]
]
SKW))
(CLOSEPROMPTWINDOW SKW))
- (COPYPLACEDYETFLG
-
- (* already one copy down, close prompt window so user knows copy mode is over.)
-
+ (COPYPLACEDYETFLG (* already one copy down, close prompt
+ window so user knows copy mode is
+ over.)
(CLOSEPROMPTWINDOW SKW)
(RETURN NIL))
(T (STATUSPRINT SKW "Position was outside the window. Copy not placed.")
(RETURN NIL)))
[SETQ DELTAPOS (create POSITION
- XCOORD _ (DIFFERENCE (fetch (POSITION XCOORD)
+ XCOORD ↠(DIFFERENCE (fetch (POSITION XCOORD)
of NEWGPOS)
(fetch (POSITION XCOORD) of GHOTSPOT))
- YCOORD _ (DIFFERENCE (fetch (POSITION YCOORD)
+ YCOORD ↠(DIFFERENCE (fetch (POSITION YCOORD)
of NEWGPOS)
(fetch (POSITION YCOORD) of GHOTSPOT]
(SK.ADD.COPY.OF.ELEMENTS SKW SCRELTS (OR COPYARGS (SETQ COPYARGS (
@@ -3428,10 +3449,10 @@ This will be slow for arcs and curves."]
(T (CLOSEPROMPTWINDOW SKW])
(SK.ADD.COPY.OF.ELEMENTS
- [LAMBDA (VIEWER SCRELEMENTS GLOBALELEMENTS NEWPOSDELTA) (* rrb " 1-Oct-86 19:13")
-
- (* internal function for copying elements.
- Adds a copy of SCRELEMENTS moved by NEWPOSDELTA to VIEWER and calls the copyfn.)
+ [LAMBDA (VIEWER SCRELEMENTS GLOBALELEMENTS NEWPOSDELTA) (* rrb " 1-Oct-86 19:13")
+
+ (* internal function for copying elements.
+ Adds a copy of SCRELEMENTS moved by NEWPOSDELTA to VIEWER and calls the copyfn.)
(PROG (SKETCH NEWELTS COPYFN X)
(AND (SETQ COPYFN (GETSKETCHPROP (SETQ SKETCH (INSURE.SKETCH VIEWER))
@@ -3440,11 +3461,8 @@ This will be slow for arcs and curves."]
(COND
((EQ X 'DON'T)
(RETURN))
- ((POSITIONP X)
-
- (* value returned is the position to put the copy.
- Set up new position)
-
+ ((POSITIONP X) (* value returned is the position to
+ put the copy. Set up new position)
(SETQ NEWPOSDELTA X)))
[SETQ NEWELTS (SK.SORT.GELTS.BY.PRIORITY (COND
((AND (LISTP X)
@@ -3461,35 +3479,32 @@ This will be slow for arcs and curves."]
(SK.ADD.HISTEVENT 'COPY NEWELTS VIEWER])
(SK.GLOBAL.FROM.LOCAL.ELEMENTS
- [LAMBDA (SCRELTS)
-
- (* returns the global elements from a list of screen elements)
-
+ [LAMBDA (SCRELTS) (* returns the global elements from a
+ list of screen elements)
(for SCRELT in SCRELTS collect (fetch (SCREENELT GLOBALPART) of SCRELT])
(SK.COPY.ITEM
- [LAMBDA (SELELT GLOBALDELTAPOS W) (* rrb "24-Jun-87 15:12")
-
- (* SELELT is a sketch element that was selected for a copy operation.
- GLOBALDELTAPOS is the amount the new item is to be offset from the old.)
+ [LAMBDA (SELELT GLOBALDELTAPOS W) (* rrb "24-Jun-87 15:12")
+
+ (* SELELT is a sketch element that was selected for a copy operation.
+ GLOBALDELTAPOS is the amount the new item is to be offset from the old.)
(PROG ((OLDGLOBAL (fetch (SCREENELT GLOBALPART) of SELELT)))
[COND
((EQ (fetch (GLOBALPART GTYPE) of OLDGLOBAL)
'SKIMAGEOBJ)
-
- (* copying an image obj. Don't call its when copied fn.
- was changed to call the WHENINSERTEDFN instead when it acutally gets
- inserted.)
+
+ (* copying an image obj. Don't call its when copied fn.
+ was changed to call the WHENINSERTEDFN instead when it acutally gets inserted.)
(SETQ OLDGLOBAL (SK.COPY.IMAGEOBJ OLDGLOBAL W]
(RETURN (SK.TRANSLATE.GLOBALPART OLDGLOBAL GLOBALDELTAPOS])
(SK.INSERT.SKETCH
- [LAMBDA (W SKETCH REGION SCALE) (* rrb "30-Sep-86 18:29")
-
- (* * inserts the sketch SKETCH into the sketch window W.
- Called by the copy insert function for sketch windows.)
+ [LAMBDA (W SKETCH REGION SCALE) (* rrb "30-Sep-86 18:29")
+
+ (* * inserts the sketch SKETCH into the sketch window W.
+ Called by the copy insert function for sketch windows.)
(AND SKETCH (PROG (LOCALSCRELTS FIGINFO FIRSTHOTSPOT LOWLFT NEWPOS WINDOWSCALE NEWELTS)
(* map inserted elements into new
@@ -3498,7 +3513,7 @@ This will be slow for arcs and curves."]
([NOT (EQUAL SCALE (SETQ WINDOWSCALE (VIEWER.SCALE W]
(* change the scale of the sketch and
the region.)
- [SETQ SKETCH (create SKETCH using SKETCH SKETCHELTS _
+ [SETQ SKETCH (create SKETCH using SKETCH SKETCHELTS â†
(SK.TRANSFORM.GLOBAL.ELEMENTS
(fetch (SKETCH SKETCHELTS) of SKETCH)
(FUNCTION
@@ -3510,9 +3525,9 @@ This will be slow for arcs and curves."]
(SETQ FIGINFO (SK.FIGUREIMAGE LOCALSCRELTS REGION))
[SETQ FIRSTHOTSPOT (CAR (fetch (SCREENELT HOTSPOTS) of (CAR LOCALSCRELTS]
(SETQ LOWLFT (fetch (SKFIGUREIMAGE SKFIGURE.LOWERLEFT) of FIGINFO))
-
- (* move the image by the first hotspot of the first element chosen.
- This will align the image on the grid correctly.)
+
+ (* move the image by the first hotspot of the first element chosen.
+ This will align the image on the grid correctly.)
(COND
([SETQ NEWPOS (fetch (INPUTPT INPUT.POSITION)
@@ -3534,11 +3549,11 @@ This will be slow for arcs and curves."]
(SETQ NEWELTS (MAPCOLLECTSKETCHSPECS LOCALSCRELTS (FUNCTION SK.COPY.ITEM)
(SK.MAP.FROM.WINDOW.TO.NEAREST.GRID
(create POSITION
- XCOORD _ (IDIFFERENCE (fetch (POSITION XCOORD)
+ XCOORD ↠(IDIFFERENCE (fetch (POSITION XCOORD)
of NEWPOS)
(fetch (POSITION XCOORD)
of FIRSTHOTSPOT))
- YCOORD _ (IDIFFERENCE (fetch (POSITION YCOORD)
+ YCOORD ↠(IDIFFERENCE (fetch (POSITION YCOORD)
of NEWPOS)
(fetch (POSITION YCOORD)
of FIRSTHOTSPOT)))
@@ -3556,37 +3571,35 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SK.MOVE.ELT
- [LAMBDA (W) (* rrb "31-Jan-86 10:49")
-
- (* lets the user select one or more elements and move them.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:49")
+ (* lets the user select one or more
+ elements and move them.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.MOVE (KWOTE W))
W])
(SK.MOVE.ELT.OR.PT
- [LAMBDA (W) (* rrb "31-Jan-86 10:49")
-
- (* lets the user select one or more elements and move them.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:49")
+ (* lets the user select one or more
+ elements and move them.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.MOVE (KWOTE W)
T)
W])
(SK.APPLY.DEFAULT.MOVE
- [LAMBDA (W) (* rrb " 2-Jun-85 12:52")
-
- (* applies the default move mode which can be either points, elements or both.)
-
+ [LAMBDA (W) (* rrb " 2-Jun-85 12:52")
+ (* applies the default move mode which
+ can be either points, elements or
+ both.)
(SELECTQ (fetch (SKETCHCONTEXT SKETCHMOVEMODE) of (WINDOWPROP W 'SKETCHCONTEXT))
(POINTS (SK.MOVE.POINTS W))
(ELEMENTS (SK.MOVE.ELT W))
(SK.MOVE.ELT.OR.PT W])
(SK.SEL.AND.MOVE
- [LAMBDA (W PTFLG) (* rrb "10-Dec-85 17:06")
-
- (* lets the user select either a control point or one or more elements and move
- them.)
+ [LAMBDA (W PTFLG) (* rrb "10-Dec-85 17:06")
+
+ (* lets the user select either a control point or one or more elements and move
+ them.)
(SK.MOVE.ELEMENTS [COND
((EQ PTFLG 'ONLY)
@@ -3597,7 +3610,7 @@ This will be slow for arcs and curves."]
W])
(SK.MOVE.ELEMENTS
- [LAMBDA (SCRELTS SKW) (* rrb "11-Jul-86 15:51")
+ [LAMBDA (SCRELTS SKW) (* rrb "11-Jul-86 15:51")
(SKED.CLEAR.SELECTION SKW)
(COND
((NULL SCRELTS))
@@ -3616,16 +3629,14 @@ This will be slow for arcs and curves."]
GLOBALPART)
of SCRELT)
'MOVE)) do (RETURN SCRELT]
-
- (* only protected elements at this point, shouldn't happen but don't cause an
- error.)
-
+ (* only protected elements at this
+ point, shouldn't happen but don't
+ cause an error.)
(RETURN NIL)))
[COND
([NULL (SETQ OTHERHOTSPOTS (REMOVE SCRELTS (fetch (SCREENELT HOTSPOTS) of SKETCHELT]
-
- (* only one control point, move it with the move element function.)
-
+ (* only one control point, move it
+ with the move element function.)
(RETURN (SK.MOVE.ELEMENTS (LIST SKETCHELT)
SKW] (* call sketch premovefn if given.)
[AND (SETQ MOVEFN (GETSKETCHPROP (SETQ SKETCH (INSURE.SKETCH SKW))
@@ -3636,9 +3647,9 @@ This will be slow for arcs and curves."]
((EQ GDELTAPOS 'DON'T)
(RETURN))
((POSITIONP GDELTAPOS)
-
- (* value returned is the delta by which to move the point.
- Set up new position)
+
+ (* value returned is the delta by which to move the point.
+ Set up new position)
NIL)
(T (* read new position from the user)
@@ -3653,12 +3664,12 @@ This will be slow for arcs and curves."]
selected point moves.)
(SETQ GDELTAPOS (SK.MAP.FROM.WINDOW.TO.NEAREST.GRID
(create POSITION
- XCOORD _ (IDIFFERENCE (fetch (POSITION XCOORD)
+ XCOORD ↠(IDIFFERENCE (fetch (POSITION XCOORD)
of (fetch (INPUTPT
INPUT.POSITION)
of NEWPOS))
(fetch (POSITION XCOORD) of SCRELTS))
- YCOORD _ (IDIFFERENCE (fetch (POSITION YCOORD)
+ YCOORD ↠(IDIFFERENCE (fetch (POSITION YCOORD)
of (fetch (INPUTPT
INPUT.POSITION)
of NEWPOS))
@@ -3672,14 +3683,17 @@ This will be slow for arcs and curves."]
((EQ X 'DON'T)
(RETURN))
((POSITIONP X)
-
- (* value returned is the delta by which to move the point.
- Set up new position)
+
+ (* value returned is the delta by which to move the point.
+ Set up new position)
(SETQ GDELTAPOS X)))
(RETURN (SK.MOVE.THING SKETCHELT SCRELTS GDELTAPOS SKW]
- (T (* create a bitmap of the thing being moved and get its new position.
- Then translate all the pieces.)
+ (T
+
+ (* create a bitmap of the thing being moved and get its new position.
+ Then translate all the pieces.)
+
(PROG (FIGINFO FIRSTHOTSPOT NEWPOS LOWLFT IMAGEPOSX IMAGEPOSY IMAGEBM DELTAPOS CHANGES
MOVEFN X GDELTAPOS)
[AND (SETQ MOVEFN (GETSKETCHPROP (INSURE.SKETCH SKW)
@@ -3689,9 +3703,9 @@ This will be slow for arcs and curves."]
((EQ GDELTAPOS 'DON'T)
(RETURN))
((POSITIONP GDELTAPOS)
-
- (* value returned is the delta by which to move the point.
- Set up new position)
+
+ (* value returned is the delta by which to move the point.
+ Set up new position)
NIL)
(T (* read new position from the user)
@@ -3699,9 +3713,9 @@ This will be slow for arcs and curves."]
[SETQ FIRSTHOTSPOT (CAR (fetch (SCREENELT HOTSPOTS) of (CAR SCRELTS]
(SETQ IMAGEBM (fetch (SKFIGUREIMAGE SKFIGURE.BITMAP) of FIGINFO))
(SETQ LOWLFT (fetch (SKFIGUREIMAGE SKFIGURE.LOWERLEFT) of FIGINFO))
-
- (* move the image by the first hotspot of the first element chosen.
- This will align the image on the grid correctly.)
+
+ (* move the image by the first hotspot of the first element chosen.
+ This will align the image on the grid correctly.)
(SETQ IMAGEPOSX (fetch (POSITION XCOORD) of LOWLFT))
(SETQ IMAGEPOSY (fetch (POSITION YCOORD) of LOWLFT))
@@ -3728,19 +3742,19 @@ This will be slow for arcs and curves."]
(SK.SHOW.FIG.FROM.INFO IMAGEBM IMAGEPOSX IMAGEPOSY 'PAINT SKW)
(STATUSPRINT SKW "Position was outside the window, copy not placed.")
(RETURN NIL)))
-
- (* GET.BITMAP.POSITION returns the position that the cursor was in which is the
- position of the first hotspot.)
+
+ (* GET.BITMAP.POSITION returns the position that the cursor was in which is the
+ position of the first hotspot.)
(* calculate the delta that the
selected point moves.)
(SETQ GDELTAPOS (SK.MAP.FROM.WINDOW.TO.NEAREST.GRID
[SETQ DELTAPOS (create POSITION
- XCOORD _ (IDIFFERENCE
+ XCOORD ↠(IDIFFERENCE
(fetch (POSITION XCOORD)
of NEWPOS)
(fetch (POSITION XCOORD)
of FIRSTHOTSPOT))
- YCOORD _ (IDIFFERENCE
+ YCOORD ↠(IDIFFERENCE
(fetch (POSITION YCOORD)
of NEWPOS)
(fetch (POSITION YCOORD)
@@ -3749,24 +3763,24 @@ This will be slow for arcs and curves."]
(SKETCH.MOVE.ELEMENTS (for ELT in SCRELTS collect (fetch (SCREENELT GLOBALPART)
of ELT))
GDELTAPOS SKW T)
-
- (* I started noticing cases where the image was a point off on some lines and
- where the texture alignment was off so I removed this
- (COND ((AND DELTAPOS (NOT (POSITIONP X)))
- (* If the user was asked for a new position and the movefn didn't change it,
- redraw the image in case any of it was erased by the calls to SK.TRANSLATE.ITEM)
- (SK.SHOW.FIG.FROM.INFO IMAGEBM (IPLUS IMAGEPOSX
- (fetch (POSITION XCOORD) of DELTAPOS)) (IPLUS IMAGEPOSY
- (fetch (POSITION YCOORD) of DELTAPOS)) (QUOTE PAINT) SKW))))
+
+ (* I started noticing cases where the image was a point off on some lines and
+ where the texture alignment was off so I removed this
+ (COND ((AND DELTAPOS (NOT (POSITIONP X)))
+ (* If the user was asked for a new position and the movefn didn't change it,
+ redraw the image in case any of it was erased by the calls to SK.TRANSLATE.ITEM)
+ (SK.SHOW.FIG.FROM.INFO IMAGEBM (IPLUS IMAGEPOSX
+ (fetch (POSITION XCOORD) of DELTAPOS)) (IPLUS IMAGEPOSY
+ (fetch (POSITION YCOORD) of DELTAPOS)) (QUOTE PAINT) SKW))))
(CLOSEPROMPTWINDOW SKW])
(SKETCH.MOVE.ELEMENTS
- [LAMBDA (ELEMENTS DELTA SKETCHTOUPDATE ADDHISTORY?) (* rrb " 2-Oct-86 11:09")
-
- (* moves the elements ELEMENTS by the amount of position DELTA
- (XCOORD gives x amount, YCOORD gives y delta) and updates the viewers on
- SKETCHTOUPDATE if it is given.)
+ [LAMBDA (ELEMENTS DELTA SKETCHTOUPDATE ADDHISTORY?) (* rrb " 2-Oct-86 11:09")
+
+ (* moves the elements ELEMENTS by the amount of position DELTA
+ (XCOORD gives x amount, YCOORD gives y delta) and updates the viewers on
+ SKETCHTOUPDATE if it is given.)
(PROG (X MOVEFN NEWGLOBALS SKETCH GDELTAPOS VIEWER)
(OR (POSITIONP DELTA)
@@ -3775,9 +3789,9 @@ This will be slow for arcs and curves."]
(SETQ VIEWER (SK.VIEWER.FROM.SKETCH.ARG SKETCHTOUPDATE)))
(COND
[[AND SKETCH (SETQ MOVEFN (GETSKETCHPROP SKETCH 'WHENMOVEDFN]
-
- (* call the WHENMOVEDFN if any Pass the thing the user passed in if you can't
- find a viewer.)
+
+ (* call the WHENMOVEDFN if any Pass the thing the user passed in if you can't
+ find a viewer.)
(COND
((EQ (SETQ X (APPLY* MOVEFN VIEWER (for ELT in ELEMENTS
@@ -3786,9 +3800,9 @@ This will be slow for arcs and curves."]
'DON'T)
(RETURN))
((POSITIONP X)
-
- (* value returned is the delta by which to move the point.
- Set up new position)
+
+ (* value returned is the delta by which to move the point.
+ Set up new position)
(SETQ GDELTAPOS X))
(T (SETQ GDELTAPOS DELTA]
@@ -3803,11 +3817,11 @@ This will be slow for arcs and curves."]
(RETURN NEWGLOBALS])
(SKETCH.COPY.ELEMENTS
- [LAMBDA (ELEMENTS SKETCHTOUPDATE DELTA ADDHISTORY?) (* rrb "15-Dec-86 15:58")
-
- (* copies the elements ELEMENTS moving them by the amount of position DELTA
- (XCOORD gives x amount, YCOORD gives y delta) and updates the viewers on
- SKETCHTOUPDATE if it is given.)
+ [LAMBDA (ELEMENTS SKETCHTOUPDATE DELTA ADDHISTORY?) (* rrb "15-Dec-86 15:58")
+
+ (* copies the elements ELEMENTS moving them by the amount of position DELTA
+ (XCOORD gives x amount, YCOORD gives y delta) and updates the viewers on
+ SKETCHTOUPDATE if it is given.)
(PROG (X COPYFN NEWGLOBALS SKETCH GDELTAPOS VIEWER)
(COND
@@ -3819,18 +3833,18 @@ This will be slow for arcs and curves."]
(SETQ VIEWER (SK.VIEWER.FROM.SKETCH.ARG SKETCHTOUPDATE)))
(COND
[[AND SKETCH (SETQ COPYFN (GETSKETCHPROP SKETCH 'WHENCOPIEDFN]
-
- (* call the WHENCOPIEFN if any Pass the thing the user passed in if you can't
- find a viewer.)
+
+ (* call the WHENCOPIEFN if any Pass the thing the user passed in if you can't
+ find a viewer.)
(COND
((EQ (SETQ X (APPLY* COPYFN VIEWER ELEMENTS DELTA))
'DON'T)
(RETURN))
((POSITIONP X)
-
- (* value returned is the delta by which to move the point.
- Set up new position)
+
+ (* value returned is the delta by which to move the point.
+ Set up new position)
(SETQ GDELTAPOS X))
(T (SETQ GDELTAPOS DELTA]
@@ -3846,24 +3860,24 @@ This will be slow for arcs and curves."]
(RETURN NEWGLOBALS])
(\SKETCH.COPY.ELEMENT
- [LAMBDA (GLOBALELEMENT GLOBALDELTAPOS W) (* rrb "24-Jun-87 15:05")
-
- (* SELELT is a sketch element that was selected for a copy operation.
- GLOBALDELTAPOS is the amount the new item is to be offset from the old.)
+ [LAMBDA (GLOBALELEMENT GLOBALDELTAPOS W) (* rrb "24-Jun-87 15:05")
+
+ (* SELELT is a sketch element that was selected for a copy operation.
+ GLOBALDELTAPOS is the amount the new item is to be offset from the old.)
(COND
((EQ (fetch (GLOBALPART GTYPE) of GLOBALELEMENT)
'SKIMAGEOBJ) (* copying an image obj.
- Calls its when copied fn.)
+ Calls its when copied fn.)
(SK.TRANSLATE.GLOBALPART (SK.COPY.IMAGEOBJ GLOBALELEMENT W)
GLOBALDELTAPOS))
(T (SK.TRANSLATE.GLOBALPART GLOBALELEMENT GLOBALDELTAPOS])
(SK.TRANSLATE.ELEMENT
- [LAMBDA (GELT GLOBALDELTAPOS W) (* rrb "25-Sep-86 15:16")
-
- (* * GELT is a sketch element to be moved.
- GLOBALDELTAPOS is the amount the item is to be translated.)
+ [LAMBDA (GELT GLOBALDELTAPOS W) (* rrb "25-Sep-86 15:16")
+
+ (* * GELT is a sketch element to be moved.
+ GLOBALDELTAPOS is the amount the item is to be translated.)
(PROG (NEWGLOBAL)
(COND
@@ -3877,31 +3891,31 @@ This will be slow for arcs and curves."]
T])
(SK.MAKE.ELEMENT.MOVE.ARG
- [LAMBDA (SCRELT SELPOS) (* rrb " 5-Nov-85 14:35")
-
- (* makes an argument structure that is suitable to be passed to the sketch
- movefn. This is a list whose CAR is a list of the numbers of the control points
- being moved and whose CDR is the global sketch element.)
+ [LAMBDA (SCRELT SELPOS) (* rrb " 5-Nov-85 14:35")
+
+ (* makes an argument structure that is suitable to be passed to the sketch
+ movefn. This is a list whose CAR is a list of the numbers of the control points
+ being moved and whose CDR is the global sketch element.)
(CONS (CONS (for I from 1 as PT in (fetch (SCREENELT HOTSPOTS) of SCRELT)
when (EQUAL PT SELPOS) do (RETURN I)))
(fetch (SCREENELT GLOBALPART) of SCRELT])
(SK.MAKE.ELEMENTS.MOVE.ARG
- [LAMBDA (SCRELTS) (* rrb " 5-Nov-85 14:34")
-
- (* makes an argument structure that is suitable to be passed to the sketch
- movefn. This is a list whose CAR is a list of the numbers of the control points
- being moved which is in this case T and whose CDR is the global sketch element.)
+ [LAMBDA (SCRELTS) (* rrb " 5-Nov-85 14:34")
+
+ (* makes an argument structure that is suitable to be passed to the sketch
+ movefn. This is a list whose CAR is a list of the numbers of the control points
+ being moved which is in this case T and whose CDR is the global sketch element.)
(CONS T (for SCRELT in SCRELTS collect (fetch (SCREENELT GLOBALPART) of SCRELT])
(SK.MAKE.POINTS.AND.ELEMENTS.MOVE.ARG
- [LAMBDA (SCRELTS SELPTS) (* rrb "21-Jan-86 17:38")
-
- (* makes an argument structure that is suitable to be passed to the sketch
- movefn. This is a list of lists each of whose CAR is a list of the numbers of
- the control points being moved and whose CDR is the global sketch element.)
+ [LAMBDA (SCRELTS SELPTS) (* rrb "21-Jan-86 17:38")
+
+ (* makes an argument structure that is suitable to be passed to the sketch
+ movefn. This is a list of lists each of whose CAR is a list of the numbers of the
+ control points being moved and whose CDR is the global sketch element.)
(for SCRELT in SCRELTS collect (CONS (bind NOTALL for I from 1 as PT
in (fetch (SCREENELT HOTSPOTS) of SCRELT)
@@ -3913,13 +3927,13 @@ This will be slow for arcs and curves."]
(fetch (SCREENELT GLOBALPART) of SCRELT])
(SK.SHOW.FIG.FROM.INFO
- [LAMBDA (IMAGEBM XOFFSET YOFFSET OPERATION WINDOW) (* rrb "14-Nov-84 14:20")
+ [LAMBDA (IMAGEBM XOFFSET YOFFSET OPERATION WINDOW) (* rrb "14-Nov-84 14:20")
(* puts a bitmap onto the sketch
window.)
(BITBLT IMAGEBM 0 0 WINDOW XOFFSET YOFFSET NIL NIL 'INPUT OPERATION])
(SK.MOVE.THING
- [LAMBDA (SKETCHELT LOCALPT GDELTAPOS SKW) (* rrb "27-Jun-86 14:04")
+ [LAMBDA (SKETCHELT LOCALPT GDELTAPOS SKW) (* rrb "27-Jun-86 14:04")
(* moves a control point in a sketch
element.)
(PROG (OLDGLOBAL NEWGLOBAL) (* calculate the delta that the
@@ -3933,26 +3947,26 @@ This will be slow for arcs and curves."]
(RETURN NEWGLOBAL])
(UPDATE.ELEMENT.IN.SKETCH
- [LAMBDA (OLDGELT NEWGELT SKETCH SKW DONTUPDATEPRIORITYFLG) (* rrb "26-Sep-86 13:35")
+ [LAMBDA (OLDGELT NEWGELT SKETCH SKW DONTUPDATEPRIORITYFLG) (* rrb "26-Sep-86 13:35")
(* changes the global sketch)
-
- (* returns NIL if the old global sketch element is not found in SKETCH.
- This can happen if things are undone out of order.)
+
+ (* returns NIL if the old global sketch element is not found in SKETCH.
+ This can happen if things are undone out of order.)
(PROG ((SKETCHSTRUCTURE (INSURE.SKETCH SKETCH))
SKETCHELEMENTS)
-
- (* if old and new are the same, the change was done destructively;
- otherwise clobber the new one in.)
+
+ (* if old and new are the same, the change was done destructively;
+ otherwise clobber the new one in.)
[COND
((EQ OLDGELT NEWGELT))
((OR (NULL DONTUPDATEPRIORITYFLG)
(EQ (SK.ELEMENT.PRIORITY OLDGELT)
(SK.ELEMENT.PRIORITY NEWGELT)))
-
- (* same priorities so just clobber the old elements place in the list with the
- new one.)
+
+ (* same priorities so just clobber the old elements place in the list with the
+ new one.)
(OR (for GELTTAIL on (fetch (SKETCH SKETCHELTS) of SKETCHSTRUCTURE)
when (EQ (CAR GELTTAIL)
@@ -3964,9 +3978,9 @@ This will be slow for arcs and curves."]
(RETURN T))
(RETURN)))
(T
-
- (* priority has changed so order of this element in the list may need to be
- changed.)
+
+ (* priority has changed so order of this element in the list may need to be
+ changed.)
(REMOVE.ELEMENT.FROM.SKETCH OLDGELT SKETCHSTRUCTURE)
(SK.ADD.PRIORITY.ELEMENT.TO.SKETCH SKETCHSTRUCTURE NEWGELT (SK.ELEMENT.PRIORITY
@@ -3975,19 +3989,19 @@ This will be slow for arcs and curves."]
(RETURN T])
(SK.UPDATE.ELEMENT
- [LAMBDA (OLDGLOBAL NEWGLOBAL SKETCHW REDRAWIFSAMEFLG DONTUPDATEPRIORITYFLG DONTDISPLAYFLG)
+ [LAMBDA (OLDGLOBAL NEWGLOBAL SKETCHW REDRAWIFSAMEFLG DONTUPDATEPRIORITYFLG DONTDISPLAYFLG)
(* rrb "24-Sep-86 17:32")
-
- (* replaces an old element with a new one.
- The global part of the old one may be the same as the new global part.
- This also handles propagation to other windows that have the same figure
- displayed.)
+
+ (* replaces an old element with a new one.
+ The global part of the old one may be the same as the new global part.
+ This also handles propagation to other windows that have the same figure
+ displayed.)
(PROG ((SKETCH (SKETCH.FROM.VIEWER SKETCHW))
UPDATEDELT)
-
- (* update the element in the sketch first.
- If this returns NIL, the element was not found in the sketch.)
+
+ (* update the element in the sketch first.
+ If this returns NIL, the element was not found in the sketch.)
(OR (UPDATE.ELEMENT.IN.SKETCH OLDGLOBAL NEWGLOBAL SKETCH SKETCHW DONTUPDATEPRIORITYFLG)
(RETURN NIL)) (* do the window that the interaction
@@ -3996,19 +4010,19 @@ This will be slow for arcs and curves."]
DONTDISPLAYFLG)) (* propagate to other windows.)
(for SKW in (ALL.SKETCH.VIEWERS SKETCH) when (NEQ SKW SKETCHW)
do
-
- (* the position may have changed which means that it may have moved in or out
- of a viewer.)
+
+ (* the position may have changed which means that it may have moved in or out of
+ a viewer.)
(SK.UPDATE.ELEMENT1 OLDGLOBAL NEWGLOBAL SKW REDRAWIFSAMEFLG DONTDISPLAYFLG))
(RETURN UPDATEDELT])
(SK.UPDATE.ELEMENTS
- [LAMBDA (CHANGEEVENTS WINDOW DONTUPDATEPRIORITYFLG DONTDISPLAYFLG)
+ [LAMBDA (CHANGEEVENTS WINDOW DONTUPDATEPRIORITYFLG DONTDISPLAYFLG)
(* rrb "24-Sep-86 17:32")
-
- (* replaces the global parts of a list of change events and handles updating
- the screen.)
+
+ (* replaces the global parts of a list of change events and handles updating the
+ screen.)
(for CHANGEEVENT in CHANGEEVENTS do (SK.UPDATE.ELEMENT (fetch (SKHISTORYCHANGESPEC OLDELT)
of CHANGEEVENT)
@@ -4016,32 +4030,29 @@ This will be slow for arcs and curves."]
WINDOW NIL DONTUPDATEPRIORITYFLG DONTDISPLAYFLG])
(SK.UPDATE.ELEMENT1
- [LAMBDA (OLDGELT NEWGELT SKETCHW REDRAWIFSAME DONTDISPLAYFLG)
+ [LAMBDA (OLDGELT NEWGELT SKETCHW REDRAWIFSAME DONTDISPLAYFLG)
(* rrb "24-Sep-86 17:32")
-
- (* determines what action is needed wrt the viewer SKETCHW when the element
- OLDGELT is updated to NEWGELT. This works only in the given window.)
+
+ (* determines what action is needed wrt the viewer SKETCHW when the element
+ OLDGELT is updated to NEWGELT. This works only in the given window.)
(PROG (LOCALELT UPDATEFN NEWLOCAL)
(COND
[(SETQ LOCALELT (SK.LOCAL.ELT.FROM.GLOBALPART OLDGELT SKETCHW))
(COND
- (DONTDISPLAYFLG
-
- (* just do the update in the datastructure, don't change the display)
-
+ (DONTDISPLAYFLG (* just do the update in the
+ datastructure, don't change the
+ display)
(SK.DELETE.ITEM LOCALELT SKETCHW)
(RETURN (SK.ADD.ITEM NEWGELT SKETCHW)))
((EQ (SKETCH.ELEMENT.TYPE OLDGELT)
- 'SKIMAGEOBJ)
-
- (* handle imageobject case specially because changes are often in internal
- structure)
-
+ 'SKIMAGEOBJ) (* handle imageobject case specially
+ because changes are often in internal
+ structure)
(SK.DELETE.ITEM LOCALELT SKETCHW)
-
- (* erase the old image region because often the internal parts of the image
- object have been clobbered making it impossible to erase by redrawing)
+
+ (* erase the old image region because often the internal parts of the image
+ object have been clobbered making it impossible to erase by redrawing)
(DSPFILL (fetch (LOCALSKIMAGEOBJ SKIMOBJLOCALREGION) of (fetch (SCREENELT LOCALPART
)
@@ -4052,36 +4063,35 @@ This will be slow for arcs and curves."]
[[AND (EQUAL OLDGELT NEWGELT)
(NOT (MEMB (fetch (GLOBALPART GTYPE) of OLDGELT)
'(TEXT TEXTBOX]
-
- (* text and textbox are special because interactive editing reuses the same
- element after the first character but they need to use updatefns for speed.)
-
- (* replacing something by something else that is identical.
- Check here because add will not add something that is already there and
- updatefn may call add first.)
+
+ (* text and textbox are special because interactive editing reuses the same
+ element after the first character but they need to use updatefns for speed.)
+
+ (* replacing something by something else that is identical.
+ Check here because add will not add something that is already there and updatefn
+ may call add first.)
(COND
(REDRAWIFSAME
-
- (* this entry is used from the WB.BUTTON.HANDLER and deals with image objects
- which we have no control over whether they give us something new or not.)
+
+ (* this entry is used from the WB.BUTTON.HANDLER and deals with image objects
+ which we have no control over whether they give us something new or not.)
(SK.ERASE.AND.DELETE.ITEM LOCALELT SKETCHW))
(T (SK.DELETE.ITEM LOCALELT SKETCHW)
(RETURN (SK.ADD.ITEM NEWGELT SKETCHW]
((AND (SETQ UPDATEFN (SK.UPDATEFN (fetch (GLOBALPART GTYPE) of NEWGELT)))
(SETQ NEWLOCAL (APPLY* UPDATEFN LOCALELT NEWGELT SKETCHW)))
-
- (* if the old one is visible and the element has an updatefn, use it to update
- the display. Then delete the old one. The updatefn should have added the new
- one.)
+
+ (* if the old one is visible and the element has an updatefn, use it to update
+ the display. Then delete the old one. The updatefn should have added the new one.)
(SK.DELETE.ITEM LOCALELT SKETCHW)
(RETURN NEWLOCAL))
(T
-
- (* if this type doesn't have a updatefn or it returned NIL, do the erase and
- redraw method.)
+
+ (* if this type doesn't have a updatefn or it returned NIL, do the erase and
+ redraw method.)
(SK.ERASE.AND.DELETE.ITEM LOCALELT SKETCHW]
((NOT (MEMB NEWGELT (SKETCH.ELEMENTS.OF.SKETCH SKETCHW)))
@@ -4093,7 +4103,7 @@ This will be slow for arcs and curves."]
(SKETCH.ADD.AND.DISPLAY1 NEWGELT SKETCHW])
(SK.MOVE.ELEMENT.POINT
- [LAMBDA (W) (* rrb "31-Jan-86 10:50")
+ [LAMBDA (W) (* rrb "31-Jan-86 10:50")
(* lets the user select an element and
move it.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.MOVE (KWOTE W)
@@ -4108,23 +4118,22 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SK.MOVE.POINTS
- [LAMBDA (W) (* rrb "31-Jan-86 10:50")
-
- (* lets the user select a collection of points and move them.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:50")
+ (* lets the user select a collection
+ of points and move them.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.MOVE.POINTS (KWOTE W))
W])
(SK.SEL.AND.MOVE.POINTS
- [LAMBDA (W) (* rrb "17-Oct-85 11:11")
-
- (* * lets the user select a collection of control point and moves them.)
+ [LAMBDA (W) (* rrb "17-Oct-85 11:11")
+
+ (* * lets the user select a collection of control point and moves them.)
(SK.DO.MOVE.ELEMENT.POINTS (SK.SELECT.MULTIPLE.POINTS W)
W])
(SK.DO.MOVE.ELEMENT.POINTS
- [LAMBDA (SCRPTS SKW) (* rrb "30-Sep-86 18:33")
+ [LAMBDA (SCRPTS SKW) (* rrb "30-Sep-86 18:33")
(* moves a collection of points)
(SKED.CLEAR.SELECTION SKW)
(AND SCRPTS
@@ -4140,16 +4149,16 @@ This will be slow for arcs and curves."]
((EQ GDELTAPOS 'DON'T)
(RETURN))
((POSITIONP GDELTAPOS)
-
- (* value returned is the delta by which to move the point.
- Set up new position)
+
+ (* value returned is the delta by which to move the point.
+ Set up new position)
NIL)
(T (* read new position from the user)
-
- (* create a bitmap of all of the elements that have any point being moved and
- get its new position. Use only the region that contains the points.
- points plus a boarder to catch the lines of a box as large as the region.)
+
+ (* create a bitmap of all of the elements that have any point being moved and get
+ its new position. Use only the region that contains the points.
+ points plus a boarder to catch the lines of a box as large as the region.)
(SETQ NONMOVEDHOTSPOTS (SK.HOTSPOTS.NOT.ON.LIST SCRPTS SCRELTS))
[SETQ ONEPTELTS (SUBSET SCRELTS (FUNCTION (LAMBDA (ELT)
@@ -4162,9 +4171,9 @@ This will be slow for arcs and curves."]
(SETQ FIGINFO (SK.FIGUREIMAGE SCRELTS NIL (INCREASEREGION
(COND
(ONEPTELTS
-
- (* include the regions of any elements that only have one control point.
- This picks up text and groups whose image is much larger than the point.)
+
+ (* include the regions of any elements that only have one control point.
+ This picks up text and groups whose image is much larger than the point.)
(SK.UNIONREGIONS
(REGION.CONTAINING.PTS
@@ -4178,9 +4187,9 @@ This will be slow for arcs and curves."]
(SETQ FIRSTHOTSPOT (CAR SCRPTS))
(SETQ LOWLFT (fetch (SKFIGUREIMAGE SKFIGURE.LOWERLEFT) of FIGINFO))
(SETQ IMAGEBM (fetch (SKFIGUREIMAGE SKFIGURE.BITMAP) of FIGINFO))
-
- (* move the image by the first hotspot of the first element chosen.
- This will align the image on the grid correctly.)
+
+ (* move the image by the first hotspot of the first element chosen.
+ This will align the image on the grid correctly.)
(SETQ IMAGEPOSX (fetch (POSITION XCOORD) of LOWLFT))
(SETQ IMAGEPOSY (fetch (POSITION YCOORD) of LOWLFT))
@@ -4211,18 +4220,18 @@ This will be slow for arcs and curves."]
(for PT in NONMOVEDHOTSPOTS do (MARKPOINT PT SKW OTHERCONTROLPOINTMARK))
(STATUSPRINT SKW "Position was outside the window, copy not placed.")
(RETURN NIL)))
-
- (* GET.BITMAP.POSITION returns the position that the cursor was in which is the
- position of the first hotspot.)
+
+ (* GET.BITMAP.POSITION returns the position that the cursor was in which is the
+ position of the first hotspot.)
(for PT in NONMOVEDHOTSPOTS do (MARKPOINT PT SKW OTHERCONTROLPOINTMARK))
(SETQ GDELTAPOS (SK.MAP.FROM.WINDOW.TO.NEAREST.GRID
(create POSITION
- XCOORD _ (IDIFFERENCE (fetch (POSITION XCOORD)
+ XCOORD ↠(IDIFFERENCE (fetch (POSITION XCOORD)
of NEWPOS)
(fetch (POSITION XCOORD) of FIRSTHOTSPOT
))
- YCOORD _ (IDIFFERENCE (fetch (POSITION YCOORD)
+ YCOORD ↠(IDIFFERENCE (fetch (POSITION YCOORD)
of NEWPOS)
(fetch (POSITION YCOORD) of FIRSTHOTSPOT
)))
@@ -4236,9 +4245,9 @@ This will be slow for arcs and curves."]
((EQ X 'DON'T)
(RETURN))
((POSITIONP X)
-
- (* value returned is the delta by which to move the point.
- Set up new position)
+
+ (* value returned is the delta by which to move the point.
+ Set up new position)
(SETQ GDELTAPOS X)))
(SETQ NEWGLOBALS (MAPCOLLECTSKETCHSPECS SCRELTS (FUNCTION SK.MOVE.ITEM.POINTS)
@@ -4250,32 +4259,28 @@ This will be slow for arcs and curves."]
(CLOSEPROMPTWINDOW SKW])
(SK.MOVE.ITEM.POINTS
- [LAMBDA (SELELT GLOBALDELTAPOS W LOCALPTS) (* rrb "11-Jul-85 13:44")
-
- (* SELELT is a sketch element at least one of whose points was selected for a
- translate operation. GLOBALDELTAPOS is the amount the item is to be translated.
- LOCALPTS is the list of points that was selected.
- This function moves any of those that belong to SELELT and return the new
- global. If all of SELELT points are on LOCALPTS this is a SK.TRANSLATE.ITEM.)
+ [LAMBDA (SELELT GLOBALDELTAPOS W LOCALPTS) (* rrb "11-Jul-85 13:44")
+
+ (* SELELT is a sketch element at least one of whose points was selected for a
+ translate operation. GLOBALDELTAPOS is the amount the item is to be translated.
+ LOCALPTS is the list of points that was selected.
+ This function moves any of those that belong to SELELT and return the new global.
+ If all of SELELT points are on LOCALPTS this is a SK.TRANSLATE.ITEM.)
(PROG ((ELTHOTSPOTS (fetch (LOCALPART HOTSPOTS) of (fetch (SCREENELT LOCALPART) of SELELT)))
- MOVEDPTS NEWGLOBAL OLDGLOBAL NEWSCREENELT)
-
- (* this shouldn't happen but don't cause an error if it does.)
-
+ MOVEDPTS NEWGLOBAL OLDGLOBAL NEWSCREENELT) (* this shouldn't happen but don't
+ cause an error if it does.)
(OR (SETQ MOVEDPTS (INTERSECTION ELTHOTSPOTS LOCALPTS))
(RETURN))
-
- (* map the difference point onto a grid location that would have the same
- screen distance but will leave things on a power of two.)
+
+ (* map the difference point onto a grid location that would have the same screen
+ distance but will leave things on a power of two.)
(SETQ OLDGLOBAL (fetch (SCREENELT GLOBALPART) of SELELT))
(COND
((EQ (LENGTH MOVEDPTS)
- (LENGTH ELTHOTSPOTS))
-
- (* all of its hot spots have been moved, just translate it)
-
+ (LENGTH ELTHOTSPOTS)) (* all of its hot spots have been
+ moved, just translate it)
(OR (SETQ NEWGLOBAL (SK.TRANSLATE.GLOBALPART OLDGLOBAL GLOBALDELTAPOS W))
(RETURN NIL)))
((SETQ NEWGLOBAL (SK.TRANSLATE.POINTS MOVEDPTS GLOBALDELTAPOS SELELT W)))
@@ -4284,13 +4289,13 @@ This will be slow for arcs and curves."]
(RETURN NEWGLOBAL])
(SK.TRANSLATEPTSFN
- [LAMBDA (ELEMENTTYPE) (* rrb " 5-May-85 16:25")
+ [LAMBDA (ELEMENTTYPE) (* rrb " 5-May-85 16:25")
(* goes from an element type name to
its EXPANDFN)
(fetch (SKETCHTYPE TRANSLATEPTSFN) of (GETPROP ELEMENTTYPE 'SKETCHTYPE])
(SK.TRANSLATE.POINTS
- [LAMBDA (SELPTS GLOBALDELTA SKETCHELT W) (* rrb " 6-May-86 11:01")
+ [LAMBDA (SELPTS GLOBALDELTA SKETCHELT W) (* rrb " 6-May-86 11:01")
(* moves the selected points by a
global amount.)
(AND SKETCHELT (PROG ((NEWGLOBAL (APPLY* (SK.TRANSLATEPTSFN (fetch (SCREENELT GTYPE) of SKETCHELT
@@ -4302,9 +4307,9 @@ This will be slow for arcs and curves."]
(RETURN NEWGLOBAL])
(SK.SELECT.MULTIPLE.POINTS
- [LAMBDA (SKW) (* rrb "10-Dec-85 16:41")
-
- (* * allows the user to select a collection of control points.)
+ [LAMBDA (SKW) (* rrb "10-Dec-85 16:41")
+
+ (* * allows the user to select a collection of control points.)
(PROG ((INTERIOR (DSPCLIPPINGREGION NIL SKW))
SELECTABLEITEMS HOTSPOTCACHE NOW OLDX ORIGX NEWX NEWY OLDY ORIGY SELPTS PREVMOUSEBUTTONS
@@ -4320,55 +4325,50 @@ This will be slow for arcs and curves."]
(COND
((INSIDEP INTERIOR (LASTMOUSEX SKW)
(LASTMOUSEY SKW)))
- (T
-
- (* first press was outside of the window, don't select anything.)
-
+ (T (* first press was outside of the
+ window, don't select anything.)
(SK.TAKE.MARKS.DOWN SKW HOTSPOTCACHE)
(RETURN)))
SELECTLP
(COND
((MOUSESTATE UP)
(GO SHIFTDOWNLP)))
-
- (* this label provides an entry for the code that tests if the shift key is
- down.)
+
+ (* this label provides an entry for the code that tests if the shift key is down.)
SELAFTERTEST
(SETQ NEWY (LASTMOUSEY SKW))
(SETQ NEWX (LASTMOUSEX SKW))
[COND
[(NOT MOUSEINSIDE?)
-
- (* mouse is outside, don't do anything other than wait for it to come back in.
- If the user has let up all buttons, the branch to SELECTEXIT will have been
- taken.)
+
+ (* mouse is outside, don't do anything other than wait for it to come back in.
+ If the user has let up all buttons, the branch to SELECTEXIT will have been
+ taken.)
(COND
((INSIDEP INTERIOR NEWX NEWY)
(SETQ MOUSEINSIDE? T) (* restore the saved selected items.)
(for ELT in SELPTS do (SK.ADD.PT.SELECTION ELT SKW]
((NOT (INSIDEP INTERIOR NEWX NEWY))
-
- (* mouse just went outside, remove selections but save them in case mouse comes
- back in.)
+
+ (* mouse just went outside, remove selections but save them in case mouse comes
+ back in.)
(SETQ MOUSEINSIDE? NIL)
(SETQ SELPTS (WINDOWPROP SKW 'SKETCH.SELECTIONS))
(for ELT in SELPTS do (SK.REMOVE.PT.SELECTION ELT SKW)))
[(NEQ PREVMOUSEBUTTONS LASTMOUSEBUTTONS)
-
- (* another button has gone down, mark this as the origin of a new box to sweep.)
+
+ (* another button has gone down, mark this as the origin of a new box to sweep.)
(SETQ PREVMOUSEBUTTONS LASTMOUSEBUTTONS)
(SETQ ORIGX (LASTMOUSEX SKW))
- (SETQ ORIGY (LASTMOUSEY SKW))
-
- (* add or delete the element that the button press occurred on if any.)
-
+ (SETQ ORIGY (LASTMOUSEY SKW)) (* add or delete the element that the
+ button press occurred on if any.)
(AND (SETQ NOW (IN.SKETCH.ELT? HOTSPOTCACHE (create POSITION
- XCOORD _ NEWX
- YCOORD _ NEWY)
+ XCOORD ↠NEWX
+ YCOORD ↠NEWY)
T))
(COND
((LASTMOUSESTATE (ONLY LEFT)) (* add selection.)
@@ -4380,10 +4380,8 @@ This will be slow for arcs and curves."]
(SETQ SELPTS (SK.CONTROL.POINTS.IN.REGION HOTSPOTCACHE (MIN ORIGX NEWX)
(MIN ORIGY NEWY)
(MAX ORIGX NEWX)
- (MAX ORIGY NEWY]
-
- (* add or delete any with in the swept out area.)
-
+ (MAX ORIGY NEWY] (* add or delete any with in the swept
+ out area.)
(COND
((LASTMOUSESTATE (ONLY LEFT)) (* left only selects.)
(for SELPT in SELPTS do (SK.ADD.PT.SELECTION SELPT SKW)))
@@ -4394,18 +4392,14 @@ This will be slow for arcs and curves."]
(GO SELECTLP)
SHIFTDOWNLP
(COND
- ((MOUSESTATE (NOT UP))
-
- (* button went down again, initialize the button state and click position.)
-
+ ((MOUSESTATE (NOT UP)) (* button went down again, initialize
+ the button state and click position.)
(SETQ PREVMOUSEBUTTONS NIL)
(GO SELAFTERTEST))
((.SHIFTKEYDOWNP.)
[COND
- [(NOT MOUSEINSIDE?)
-
- (* mouse is outside%: if it comes back in, mark the selections.)
-
+ [(NOT MOUSEINSIDE?) (* mouse is outside%: if it comes back
+ in, mark the selections.)
(COND
((INSIDEP INTERIOR (LASTMOUSEX SKW)
(LASTMOUSEY SKW))
@@ -4424,9 +4418,9 @@ This will be slow for arcs and curves."]
(RETURN SELPTS])
(SK.CONTROL.POINTS.IN.REGION
- [LAMBDA (HOTSPOTCACHE LEFT BOTTOM RIGHT TOP) (* rrb " 6-May-85 16:22")
-
- (* * returns a list of the control points that are within LOCALREGION)
+ [LAMBDA (HOTSPOTCACHE LEFT BOTTOM RIGHT TOP) (* rrb " 6-May-85 16:22")
+
+ (* * returns a list of the control points that are within LOCALREGION)
(PROG ((RLEFT (DIFFERENCE LEFT SK.POINT.WIDTH))
(RBOTTOM (DIFFERENCE BOTTOM SK.POINT.WIDTH))
@@ -4444,17 +4438,15 @@ This will be slow for arcs and curves."]
do (COND
((ILESSP (CAR XBUCKET)
RLEFT) (* stop when X gets too small.)
- (RETURN)))
-
- (* collect the points if there are any elements cached there.)
-
+ (RETURN))) (* collect the points if there are any
+ elements cached there.)
(AND (CDR XBUCKET)
(SETQ ELTS (SK.ADD.POINT ELTS (CAR XBUCKET)
(CAR YBUCKET]
(RETURN ELTS])
(SK.ADD.PT.SELECTION
- [LAMBDA (PT WINDOW MARKBM) (* rrb " 9-May-85 10:18")
+ [LAMBDA (PT WINDOW MARKBM) (* rrb " 9-May-85 10:18")
(* adds an item to the selection list
of WINDOW.)
(COND
@@ -4463,22 +4455,21 @@ This will be slow for arcs and curves."]
(WINDOWADDPROP WINDOW 'SKETCH.SELECTIONS PT])
(SK.REMOVE.PT.SELECTION
- [LAMBDA (PT WINDOW MARKBM) (* rrb " 9-May-85 10:22")
+ [LAMBDA (PT WINDOW MARKBM) (* rrb " 9-May-85 10:22")
(* removes an item from the selection
list of WINDOW.)
(COND
((MEMBER PT (WINDOWPROP WINDOW 'SKETCH.SELECTIONS))
(MARKPOINT PT WINDOW MARKBM)
-
- (* used to call WINDOWDELPROP but it has a bug that it only removes EQ things.)
+
+ (* used to call WINDOWDELPROP but it has a bug that it only removes EQ things.)
(WINDOWPROP WINDOW 'SKETCH.SELECTIONS (REMOVE PT (WINDOWPROP WINDOW 'SKETCH.SELECTIONS])
(SK.ADD.POINT
- [LAMBDA (PTLST X Y) (* rrb " 6-May-85 16:22")
-
- (* add the point X Y to PTLST unless it is already a member.)
-
+ [LAMBDA (PTLST X Y) (* rrb " 6-May-85 16:22")
+ (* add the point X Y to PTLST unless
+ it is already a member.)
(COND
((for PT in PTLST thereis (AND (EQ (fetch (POSITION XCOORD) of PT)
X)
@@ -4486,27 +4477,25 @@ This will be slow for arcs and curves."]
Y)))
PTLST)
(T (CONS (create POSITION
- XCOORD _ X
- YCOORD _ Y)
+ XCOORD ↠X
+ YCOORD ↠Y)
PTLST])
(SK.ELTS.CONTAINING.PTS
- [LAMBDA (PTLST SKW) (* rrb " 4-May-85 15:38")
-
- (* returns the list of elements that have any points on PTLST.)
-
- (bind (HOTSPOTCACHE _ (SK.HOTSPOT.CACHE SKW))
+ [LAMBDA (PTLST SKW) (* rrb " 4-May-85 15:38")
+ (* returns the list of elements that
+ have any points on PTLST.)
+ (bind (HOTSPOTCACHE ↠(SK.HOTSPOT.CACHE SKW))
ELTS for POS in PTLST do (SETQ ELTS (UNION (SK.ELTS.FROM.HOTSPOT POS HOTSPOTCACHE)
ELTS)) finally
-
- (* reverse them so the first selected pt has its element first.)
-
+ (* reverse them so the first selected
+ pt has its element first.)
(RETURN (REVERSE ELTS])
(SK.HOTSPOTS.NOT.ON.LIST
- [LAMBDA (PTLST ELTS) (* rrb "19-Jul-85 13:18")
-
- (* returns a list of the hot spots on any of ELTS that aren't on PTLST.)
+ [LAMBDA (PTLST ELTS) (* rrb "19-Jul-85 13:18")
+
+ (* returns a list of the hot spots on any of ELTS that aren't on PTLST.)
(bind OTHERHOTSPOTS for ELT in ELTS do [for HOTSPOT in (fetch (SCREENELT HOTSPOTS) of ELT)
do (OR (MEMBER HOTSPOT PTLST)
@@ -4522,9 +4511,9 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SK.SET.MOVE.MODE
- [LAMBDA (SKW NEWMODE) (* rrb " 2-Jun-85 12:52")
-
- (* * reads a value of move command mode and makes it the default)
+ [LAMBDA (SKW NEWMODE) (* rrb " 2-Jun-85 12:52")
+
+ (* * reads a value of move command mode and makes it the default)
(PROG [(LOCALNEWMODE (OR NEWMODE (READMOVEMODE]
(RETURN (AND LOCALNEWMODE (replace (SKETCHCONTEXT SKETCHMOVEMODE)
@@ -4535,31 +4524,30 @@ This will be slow for arcs and curves."]
NIL])
(SK.SET.MOVE.MODE.POINTS
- [LAMBDA (SKW) (* rrb " 2-Jun-85 12:47")
+ [LAMBDA (SKW) (* rrb " 2-Jun-85 12:47")
(* sets the default to move mode to
points.)
(SK.SET.MOVE.MODE SKW 'POINTS])
(SK.SET.MOVE.MODE.ELEMENTS
- [LAMBDA (SKW) (* rrb " 2-Jun-85 12:48")
+ [LAMBDA (SKW) (* rrb " 2-Jun-85 12:48")
(* sets the default to move mode to
elements)
(SK.SET.MOVE.MODE SKW 'ELEMENTS])
(SK.SET.MOVE.MODE.COMBINED
- [LAMBDA (SKW) (* rrb " 2-Jun-85 12:49")
+ [LAMBDA (SKW) (* rrb " 2-Jun-85 12:49")
(* sets the default to move mode to
combined move.)
(SK.SET.MOVE.MODE SKW 'COMBINED])
(READMOVEMODE
- [LAMBDA (MENUTITLE) (* rrb " 6-Nov-85 09:54")
-
- (* interacts to get whether move mode should be points, elements or both.)
-
+ [LAMBDA (MENUTITLE) (* rrb " 6-Nov-85 09:54")
+ (* interacts to get whether move mode
+ should be points, elements or both.)
(\CURSOR.IN.MIDDLE.MENU (create MENU
- TITLE _ (OR MENUTITLE "Top level MOVE command should apply to?")
- ITEMS _ '((Points 'POINTS
+ TITLE ↠(OR MENUTITLE "Top level MOVE command should apply to?")
+ ITEMS ↠'((Points 'POINTS
"Top level MOVE command will be the same as MOVE POINTS command."
)
(Elements 'ELEMENTS
@@ -4568,84 +4556,75 @@ This will be slow for arcs and curves."]
(Combined 'COMBINED
"MOVE command will move points if a single point is clicked; elements otherwise"
))
- CENTERFLG _ T])
+ CENTERFLG ↠T])
)
(DEFINEQ
(SK.ALIGN.POINTS
- [LAMBDA (W) (* rrb "31-Jan-86 10:50")
-
- (* lets the user select a collection of points and aligns them.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:50")
+ (* lets the user select a collection
+ of points and aligns them.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.MOVE.POINTS (KWOTE W))
W])
(SK.SEL.AND.ALIGN.POINTS
- [LAMBDA (ALIGNHOW W) (* rrb "22-Jan-86 14:57")
-
- (* * lets the user select a collection of control point and aligns them.)
+ [LAMBDA (ALIGNHOW W) (* rrb "22-Jan-86 14:57")
+
+ (* * lets the user select a collection of control point and aligns them.)
(SK.DO.ALIGN.POINTS (SK.SELECT.MULTIPLE.POINTS W)
ALIGNHOW W])
(SK.ALIGN.POINTS.LEFT
- [LAMBDA (W) (* rrb "31-Jan-86 10:51")
-
- (* lets the user select a collection of points and aligns them.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:51")
+ (* lets the user select a collection
+ of points and aligns them.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.ALIGN.POINTS ''LEFT (KWOTE W))
W])
(SK.ALIGN.POINTS.RIGHT
- [LAMBDA (W) (* rrb "31-Jan-86 10:51")
-
- (* lets the user select a collection of points and aligns them.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:51")
+ (* lets the user select a collection
+ of points and aligns them.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.ALIGN.POINTS ''RIGHT (KWOTE W))
W])
(SK.ALIGN.POINTS.TOP
- [LAMBDA (W) (* rrb "31-Jan-86 10:57")
-
- (* lets the user select a collection of points and aligns them.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:57")
+ (* lets the user select a collection
+ of points and aligns them.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.ALIGN.POINTS ''TOP (KWOTE W))
W])
(SK.ALIGN.POINTS.BOTTOM
- [LAMBDA (W) (* rrb "31-Jan-86 10:58")
-
- (* lets the user select a collection of points and aligns them.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:58")
+ (* lets the user select a collection
+ of points and aligns them.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.ALIGN.POINTS ''BOTTOM (KWOTE W))
W])
(SK.EVEN.SPACE.POINTS.IN.X
- [LAMBDA (W) (* rrb "31-Jan-86 10:58")
-
- (* lets the user select a collection of points and spaces them evenly in X)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:58")
+ (* lets the user select a collection
+ of points and spaces them evenly in X)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.ALIGN.POINTS ''EVENX (KWOTE W))
W])
(SK.EVEN.SPACE.POINTS.IN.Y
- [LAMBDA (W) (* rrb "31-Jan-86 10:58")
-
- (* lets the user select a collection of points and spaces them evenly in Y)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:58")
+ (* lets the user select a collection
+ of points and spaces them evenly in Y)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.ALIGN.POINTS ''EVENY (KWOTE W))
W])
(SK.DO.ALIGN.POINTS
- [LAMBDA (SCRPTS ALIGNHOW SKW) (* rrb "12-Sep-86 18:28")
-
- (* * aligns a collection of points according to ALIGNHOW which can be LEFT
- RIGHT TOP BOTTOM EVENX or EVENY)
+ [LAMBDA (SCRPTS ALIGNHOW SKW) (* rrb "12-Sep-86 18:28")
- (SKED.CLEAR.SELECTION SKW)
-
- (* if there isn't at least two points, don't do anything.)
+ (* * aligns a collection of points according to ALIGNHOW which can be LEFT RIGHT
+ TOP BOTTOM EVENX or EVENY)
+ (SKED.CLEAR.SELECTION SKW) (* if there isn't at least two points,
+ don't do anything.)
(AND (CDR SCRPTS)
(PROG ((SELECTEDPTSTRUC (SK.GET.SELECTED.ELEMENT.STRUCTURE SCRPTS SKW))
MOSTSELBUCK LEASTSELBUCK DIMENSION LEAST MOST PREMOVEFN X NEWGLOBALS)
@@ -4659,10 +4638,8 @@ This will be slow for arcs and curves."]
'DON'T)
(RETURN))
(SETQ MOSTSELBUCK (CAR SELECTEDPTSTRUC))
- (SETQ LEASTSELBUCK (CAR SELECTEDPTSTRUC))
-
- (* find the dimension of interest and do some error checking.)
-
+ (SETQ LEASTSELBUCK (CAR SELECTEDPTSTRUC)) (* find the dimension of interest and
+ do some error checking.)
(SETQ DIMENSION (SELECTQ ALIGNHOW
((LEFT RIGHT)
'HORIZONTAL)
@@ -4789,22 +4766,22 @@ This will be slow for arcs and curves."]
N])
(SK.GET.SELECTED.ELEMENT.STRUCTURE
- [LAMBDA (SELPTS SKW) (* rrb "22-Jan-86 14:58")
-
- (* returns a list of the points and elements that each selected point on SELPTS
- corresponds to. Returns a list of lists of the form
- (SELPT (GPT1 GELT1) |...| (GPTn GELTn)))
+ [LAMBDA (SELPTS SKW) (* rrb "22-Jan-86 14:58")
- (bind (HOTSPOTCACHE _ (SK.HOTSPOT.CACHE SKW)) for POS in SELPTS
+ (* returns a list of the points and elements that each selected point on SELPTS
+ corresponds to. Returns a list of lists of the form
+ (SELPT (GPT1 GELT1) |...| (GPTn GELTn)))
+
+ (bind (HOTSPOTCACHE ↠(SK.HOTSPOT.CACHE SKW)) for POS in SELPTS
collect (CONS POS (for ELT in (SK.ELTS.FROM.HOTSPOT POS HOTSPOTCACHE)
collect (LIST (SK.CORRESPONDING.CONTROL.PT POS ELT)
ELT])
(SK.CORRESPONDING.CONTROL.PT
- [LAMBDA (SELPT SCRELEMENT) (* rrb "22-Jan-86 14:59")
-
- (* returns the global control point of an element that corresponds to the
- screen point SELPT.)
+ [LAMBDA (SELPT SCRELEMENT) (* rrb "22-Jan-86 14:59")
+
+ (* returns the global control point of an element that corresponds to the screen
+ point SELPT.)
(for I from 1 as PT in (fetch (SCREENELT HOTSPOTS) of SCRELEMENT) when (EQUAL PT SELPT)
do (RETURN (OR (SK.NTH.CONTROL.POINT (fetch (SCREENELT GLOBALPART) of SCRELEMENT)
@@ -4812,28 +4789,27 @@ This will be slow for arcs and curves."]
(SHOULDNT])
(SK.CONTROL.POINT.NUMBER
- [LAMBDA (SELPT SCRELT) (* rrb "22-Jan-86 10:54")
-
- (* returns the control point number that SELPT is on the element SCRELT)
-
+ [LAMBDA (SELPT SCRELT) (* rrb "22-Jan-86 10:54")
+ (* returns the control point number
+ that SELPT is on the element SCRELT)
(for I from 1 as HOTPT in (fetch (SCREENELT HOTSPOTS) of SCRELT) when (EQUAL SELPT HOTPT)
do (RETURN I])
(SK.DO.ALIGN.SETVALUE
- [LAMBDA (SELBUCKET VALUE DIMENSION VIEWER) (* rrb "22-Jan-86 17:23")
+ [LAMBDA (SELBUCKET VALUE DIMENSION VIEWER) (* rrb "22-Jan-86 17:23")
(* performs the alignment of a
selection bucket structure.)
- (bind (SELPT _ (CAR SELBUCKET))
- (MOVEFN _ (GETSKETCHPROP (INSURE.SKETCH VIEWER)
+ (bind (SELPT ↠(CAR SELBUCKET))
+ (MOVEFN ↠(GETSKETCHPROP (INSURE.SKETCH VIEWER)
'WHENMOVEDFN))
GDELTA X for GELTSTRUC in (CDR SELBUCKET)
when (PROG NIL
-
- (* calculate the amount that this global element point should be moved and
- apply move fn)
+
+ (* calculate the amount that this global element point should be moved and apply
+ move fn)
(* don't move it if it moves 0.0)
[SETQ GDELTA (create POSITION
- XCOORD _ (COND
+ XCOORD ↠(COND
((EQ DIMENSION 'HORIZONTAL)
(COND
([ZEROP (SETQ X (DIFFERENCE VALUE
@@ -4842,7 +4818,7 @@ This will be slow for arcs and curves."]
(RETURN))
(T X)))
(T 0))
- YCOORD _ (COND
+ YCOORD ↠(COND
((EQ DIMENSION 'VERTICAL)
(COND
([ZEROP (SETQ X (DIFFERENCE VALUE
@@ -4863,15 +4839,15 @@ This will be slow for arcs and curves."]
((EQ X 'DON'T) (* if DON'T, don't move this guy.)
(RETURN NIL))
((POSITIONP X)
-
- (* value returned is the delta by which to move the point.
- Set up new position)
+
+ (* value returned is the delta by which to move the point.
+ Set up new position)
(SETQ GDELTA X)))
(RETURN T)) join
-
- (* build the history structure here because this is where the old screen
- element is known.)
+
+ (* build the history structure here because this is where the old screen element
+ is known.)
(AND (SETQ X (SK.MOVE.ITEM.POINTS (CADR GELTSTRUC)
GDELTA VIEWER (LIST SELPT)))
@@ -4887,26 +4863,25 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SKETCH.CREATE.GROUP
- [LAMBDA (LISTOFSKETCHELEMENTS CONTROLPOINT) (* rrb " 4-Dec-85 21:38")
+ [LAMBDA (LISTOFSKETCHELEMENTS CONTROLPOINT) (* rrb " 4-Dec-85 21:38")
(* creates a sketch group element.)
(SK.CREATE.GROUP1 LISTOFSKETCHELEMENTS (OR (POSITIONP CONTROLPOINT)
(REGION.CENTER (SK.GLOBAL.REGION.OF.GLOBAL.ELEMENTS
LISTOFSKETCHELEMENTS])
(SK.CREATE.GROUP1
- [LAMBDA (GELTS CONTROLPT) (* rrb " 4-Dec-85 21:38")
+ [LAMBDA (GELTS CONTROLPT) (* rrb " 4-Dec-85 21:38")
(* creates a group element.)
(SK.UPDATE.GROUP.AFTER.CHANGE (create GLOBALPART
- INDIVIDUALGLOBALPART _
+ INDIVIDUALGLOBALPART â†
(create GROUP
- LISTOFGLOBALELTS _ GELTS
- GROUPCONTROLPOINT _ CONTROLPT])
+ LISTOFGLOBALELTS ↠GELTS
+ GROUPCONTROLPOINT ↠CONTROLPT])
(SK.UPDATE.GROUP.AFTER.CHANGE
- [LAMBDA (GROUPELT) (* rrb " 4-Dec-85 21:38")
-
- (* updates the dependent field of a group element after a change.)
-
+ [LAMBDA (GROUPELT) (* rrb " 4-Dec-85 21:38")
+ (* updates the dependent field of a
+ group element after a change.)
(PROG ((INDGROUPELT (fetch (GLOBALPART INDIVIDUALGLOBALPART) of GROUPELT))
GROUPREGION)
(SETQ GROUPREGION (SK.GLOBAL.REGION.OF.GLOBAL.ELEMENTS (fetch (GROUP LISTOFGLOBALELTS)
@@ -4917,26 +4892,25 @@ This will be slow for arcs and curves."]
(RETURN GROUPELT])
(SK.GROUP.ELTS
- [LAMBDA (W) (* rrb "31-Jan-86 10:58")
-
- (* lets the user select a collection elements and groups them.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:58")
+ (* lets the user select a collection
+ elements and groups them.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.GROUP (KWOTE W))
W])
(SK.SEL.AND.GROUP
- [LAMBDA (W) (* rrb "10-Dec-85 17:08")
+ [LAMBDA (W) (* rrb "10-Dec-85 17:08")
(* lets the user select elements and
groups them.)
(SK.GROUP.ELEMENTS (SK.SELECT.MULTIPLE.ITEMS W T NIL 'GROUP)
W])
(SK.GROUP.ELEMENTS
- [LAMBDA (SCRELTS SKW) (* rrb "11-Jul-86 15:51")
-
- (* groups the collection of elements SCRELTS.
- Does this by creating a group element, adding it and deleting the individual
- elements.)
+ [LAMBDA (SCRELTS SKW) (* rrb "11-Jul-86 15:51")
+
+ (* groups the collection of elements SCRELTS.
+ Does this by creating a group element, adding it and deleting the individual
+ elements.)
(SKED.CLEAR.SELECTION SKW)
(AND SCRELTS (PROG (GROUPELT LOCALGROUPELT) (* call the group fn if there is one.)
@@ -4948,10 +4922,9 @@ This will be slow for arcs and curves."]
SK.GLOBAL.REGION.OF.LOCAL.ELEMENTS
SCRELTS
(VIEWER.SCALE SKW)))
- SKW)))
-
- (* do grouping. This might return NIL if the when grouped function says not to.)
-
+ SKW))) (* do grouping. This might return NIL
+ if the when grouped function says not
+ to.)
(OR (SK.DO.GROUP GROUPELT SKW)
(RETURN)) (* record it on the history list.)
(SK.ADD.HISTEVENT 'GROUP (LIST (LIST GROUPELT))
@@ -4959,15 +4932,14 @@ This will be slow for arcs and curves."]
(RETURN GROUPELT])
(SK.UNGROUP.ELT
- [LAMBDA (W) (* rrb "31-Jan-86 10:58")
-
- (* lets the user select a collection elements and groups them.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:58")
+ (* lets the user select a collection
+ elements and groups them.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.UNGROUP (KWOTE W))
W])
(SK.SEL.AND.UNGROUP
- [LAMBDA (W) (* rrb "10-Dec-85 18:03")
+ [LAMBDA (W) (* rrb "10-Dec-85 18:03")
(* lets the user select elements and
groups them.)
(PROG NIL
@@ -4990,26 +4962,24 @@ This will be slow for arcs and curves."]
W])
(SK.UNGROUP.ELEMENT
- [LAMBDA (SCRELTS SKW) (* rrb "15-Jan-86 16:12")
+ [LAMBDA (SCRELTS SKW) (* rrb "15-Jan-86 16:12")
(* ungroups the first group element in
SCRELTS.)
(PROG ((GROUPELTS (for ELT in SCRELTS when (EQ (fetch (SCREENELT GTYPE) of ELT)
'GROUP) collect (fetch (SCREENELT GLOBALPART)
of ELT)))
X)
- (OR GROUPELTS (RETURN))
-
- (* do the ungrouping. this may return NIL if the ungroup fn says don't.)
-
+ (OR GROUPELTS (RETURN)) (* do the ungrouping.
+ this may return NIL if the ungroup fn
+ says don't.)
(SETQ X (for GROUPELT in GROUPELTS when (SK.DO.UNGROUP GROUPELT SKW)
collect (LIST GROUPELT)))
(AND X (SK.ADD.HISTEVENT 'UNGROUP X SKW])
(SK.GLOBAL.REGION.OF.LOCAL.ELEMENTS
- [LAMBDA (SCRELTS SCALE) (* rrb "30-Sep-86 18:33")
-
- (* returns the global region occuppied by a list of local elements.)
-
+ [LAMBDA (SCRELTS SCALE) (* rrb "30-Sep-86 18:33")
+ (* returns the global region occuppied
+ by a list of local elements.)
(PROG (GROUPREGION)
[for SCRELT in SCRELTS do (SETQ GROUPREGION (COND
(GROUPREGION
@@ -5021,10 +4991,9 @@ This will be slow for arcs and curves."]
(RETURN (UNSCALE.REGION GROUPREGION SCALE])
(SK.LOCAL.REGION.OF.LOCAL.ELEMENTS
- [LAMBDA (SCRELTS SCALE) (* rrb "30-Sep-86 18:33")
-
- (* returns the local region occupied by a list of local elements.)
-
+ [LAMBDA (SCRELTS SCALE) (* rrb "30-Sep-86 18:33")
+ (* returns the local region occupied
+ by a list of local elements.)
(bind GROUPREGION for SCRELT in SCRELTS do [SETQ GROUPREGION (COND
(GROUPREGION
(* first time because UNIONREGIONS
@@ -5036,16 +5005,15 @@ This will be slow for arcs and curves."]
finally (RETURN GROUPREGION])
(SK.GLOBAL.REGION.OF.GLOBAL.ELEMENTS
- [LAMBDA (GELTS) (* rrb "30-Sep-86 17:35")
-
- (* returns the global region occuppied by a list of global elements.)
-
+ [LAMBDA (GELTS) (* rrb "30-Sep-86 17:35")
+ (* returns the global region occuppied
+ by a list of global elements.)
(COND
[(LESSP (LENGTH GELTS)
50)
-
- (* for smallish numbers of elements, only do the cons to create the args to
- SK.UNIONREGIONS.)
+
+ (* for smallish numbers of elements, only do the cons to create the args to
+ SK.UNIONREGIONS.)
(APPLY (FUNCTION SK.UNIONREGIONS)
(for GELT in GELTS collect (SK.ELEMENT.GLOBAL.REGION GELT]
@@ -5061,10 +5029,10 @@ This will be slow for arcs and curves."]
(RETURN GROUPREGION])
(SK.UNIONREGIONS
- [LAMBDA REGIONS (* rrb "30-Sep-86 18:14")
-
- (* returns the smallest region that encloses all of REGIONS Is different from
- UNIONREGIONS because it works in floating pt)
+ [LAMBDA REGIONS (* rrb "30-Sep-86 18:14")
+
+ (* returns the smallest region that encloses all of REGIONS Is different from
+ UNIONREGIONS because it works in floating pt)
(COND
((EQ 0 REGIONS)
@@ -5095,19 +5063,19 @@ This will be slow for arcs and curves."]
TP)
(SETQ TP X]
(RETURN (create REGION
- LEFT _ LFT
- BOTTOM _ BTTM
- WIDTH _ (DIFFERENCE RGHT LFT)
- HEIGHT _ (DIFFERENCE TP BTTM])
+ LEFT ↠LFT
+ BOTTOM ↠BTTM
+ WIDTH ↠(DIFFERENCE RGHT LFT)
+ HEIGHT ↠(DIFFERENCE TP BTTM])
(SKETCH.REGION.OF.SKETCH
- [LAMBDA (SKETCH) (* rrb "23-Oct-85 11:17")
+ [LAMBDA (SKETCH) (* rrb "23-Oct-85 11:17")
(* returns the global region of a
sketch.)
(SK.GLOBAL.REGION.OF.GLOBAL.ELEMENTS (fetch (SKETCH SKETCHELTS) of (INSURE.SKETCH SKETCH])
(SK.FLASHREGION
- [LAMBDA (REGION WINDOW TEXTURE) (* rrb "30-Jul-85 15:47")
+ [LAMBDA (REGION WINDOW TEXTURE) (* rrb "30-Jul-85 15:47")
(* flashes a region)
(DSPFILL REGION TEXTURE 'INVERT WINDOW)
(DISMISS 400)
@@ -5116,7 +5084,7 @@ This will be slow for arcs and curves."]
(DEFINEQ
(INIT.GROUP.ELEMENT
- [LAMBDA NIL (* rrb "18-Oct-85 17:15")
+ [LAMBDA NIL (* rrb "18-Oct-85 17:15")
(* initializes the text box element.)
(COND
((NOT (SKETCH.ELEMENT.TYPEP 'GROUP))
@@ -5136,81 +5104,78 @@ This will be slow for arcs and curves."]
(FUNCTION GROUP.GLOBALREGIONFN])
(GROUP.DRAWFN
- [LAMBDA (GROUPELT WINDOW REGION OPERATION) (* rrb "10-Dec-85 12:38")
+ [LAMBDA (GROUPELT WINDOW REGION OPERATION) (* rrb "10-Dec-85 12:38")
(* draws a group element.)
(for ELT in (fetch (LOCALGROUP LOCALELEMENTS) of (fetch (SCREENELT LOCALPART) of GROUPELT))
do (APPLY* (SK.DRAWFN (fetch (SCREENELT GTYPE) of ELT))
ELT WINDOW REGION OPERATION])
(GROUP.EXPANDFN
- [LAMBDA (GROUPELT SCALE STREAM) (* rrb "30-Dec-85 17:30")
-
- (* creates a local group screen element from a global group element)
-
+ [LAMBDA (GROUPELT SCALE STREAM) (* rrb "30-Dec-85 17:30")
+ (* creates a local group screen
+ element from a global group element)
(PROG ((GROUPINDVELT (fetch (GLOBALPART INDIVIDUALGLOBALPART) of GROUPELT))
LOCALREGION)
(SETQ LOCALREGION (SCALE.REGION.OUT (fetch (GROUP GROUPREGION) of GROUPINDVELT)
SCALE)) (* put the position in the center.)
(RETURN (create SCREENELT
- LOCALPART _ (create LOCALGROUP
- GROUPPOSITION _ (SK.SCALE.POSITION.INTO.VIEWER
+ LOCALPART ↠(create LOCALGROUP
+ GROUPPOSITION ↠(SK.SCALE.POSITION.INTO.VIEWER
(fetch (GROUP GROUPCONTROLPOINT)
of GROUPINDVELT)
SCALE)
- LOCALGROUPREGION _ LOCALREGION
- LOCALELEMENTS _ (for ELEMENT
+ LOCALGROUPREGION ↠LOCALREGION
+ LOCALELEMENTS ↠(for ELEMENT
in (fetch (GROUP LISTOFGLOBALELTS)
of GROUPINDVELT)
- collect (SK.LOCAL.FROM.GLOBAL ELEMENT
+ collect (SK.LOCAL.FROM.GLOBAL ELEMENT
STREAM SCALE)))
- GLOBALPART _ GROUPELT])
+ GLOBALPART ↠GROUPELT])
(GROUP.INSIDEFN
- [LAMBDA (GROUPELT WREG) (* rrb "10-Jan-85 10:37")
-
- (* determines if the global group element GROUPELT is inside of WREG.)
-
+ [LAMBDA (GROUPELT WREG) (* rrb "10-Jan-85 10:37")
+ (* determines if the global group
+ element GROUPELT is inside of WREG.)
(REGIONSINTERSECTP (fetch (GROUP GROUPREGION) of (fetch (GLOBALPART INDIVIDUALGLOBALPART)
of GROUPELT))
WREG])
(GROUP.REGIONFN
- [LAMBDA (GROUPSCRELT) (* rrb "10-Dec-85 12:38")
+ [LAMBDA (GROUPSCRELT) (* rrb "10-Dec-85 12:38")
(* returns the region occuppied by a
group)
(fetch (LOCALGROUP LOCALGROUPREGION) of (fetch (SCREENELT LOCALPART) of GROUPSCRELT])
(GROUP.GLOBALREGIONFN
- [LAMBDA (GGROUPELT) (* rrb "18-Oct-85 17:13")
-
- (* returns the global region occupied by a global group element.)
-
+ [LAMBDA (GGROUPELT) (* rrb "18-Oct-85 17:13")
+ (* returns the global region occupied
+ by a global group element.)
(fetch (GROUP GROUPREGION) of (fetch (GLOBALPART INDIVIDUALGLOBALPART) of GGROUPELT])
(GROUP.TRANSLATEFN
- [LAMBDA (SKELT DELTAPOS) (* rrb "28-Apr-85 18:43")
-
- (* * returns a group element which has been translated by DELTAPOS)
+ [LAMBDA (SKELT DELTAPOS) (* rrb "28-Apr-85 18:43")
+
+ (* * returns a group element which has been translated by DELTAPOS)
(PROG ((GGROUPELT (fetch (GLOBALPART INDIVIDUALGLOBALPART) of SKELT))
NEWREG)
(SETQ NEWREG (REL.MOVE.REGION (fetch (GROUP GROUPREGION) of GGROUPELT)
(fetch (POSITION XCOORD) of DELTAPOS)
(fetch (POSITION YCOORD) of DELTAPOS)))
-
- (* makes a copy of the common global part because it includes the scales which
- may change for one of the instances.)
+
+ (* makes a copy of the common global part because it includes the scales which
+ may change for one of the instances.)
(RETURN (create GLOBALPART
- COMMONGLOBALPART _ (APPEND (fetch (GLOBALPART COMMONGLOBALPART) of SKELT))
- INDIVIDUALGLOBALPART _ (create GROUP
- GROUPREGION _ NEWREG
- LISTOFGLOBALELTS _
+ COMMONGLOBALPART ↠(APPEND (fetch (GLOBALPART COMMONGLOBALPART) of SKELT))
+ INDIVIDUALGLOBALPART ↠(create GROUP
+ GROUPREGION ↠NEWREG
+ LISTOFGLOBALELTS â†
(for SUBELT in (fetch (GROUP LISTOFGLOBALELTS)
of GGROUPELT)
collect (SK.TRANSLATE.GLOBALPART SUBELT
DELTAPOS T))
- GROUPCONTROLPOINT _ (PTPLUS
+ GROUPCONTROLPOINT ↠(PTPLUS
(fetch (GROUP
GROUPCONTROLPOINT
)
@@ -5218,15 +5183,13 @@ This will be slow for arcs and curves."]
DELTAPOS])
(GROUP.TRANSFORMFN
- [LAMBDA (GELT TRANSFORMFN TRANSFORMDATA SCALEFACTOR) (* rrb " 2-Jun-85 13:10")
-
- (* * returns a group element which has been transformed by TRANSFORMFN)
+ [LAMBDA (GELT TRANSFORMFN TRANSFORMDATA SCALEFACTOR) (* rrb " 2-Jun-85 13:10")
+
+ (* * returns a group element which has been transformed by TRANSFORMFN)
(COND
- [(EQ TRANSFORMFN (FUNCTION SK.PUT.ON.GRID))
-
- (* if putting things on a grid, move only the control point.)
-
+ [(EQ TRANSFORMFN (FUNCTION SK.PUT.ON.GRID)) (* if putting things on a grid, move
+ only the control point.)
(PROG ((GGROUPELT (fetch (GLOBALPART INDIVIDUALGLOBALPART) of GELT))
NOWPOS)
(SETQ NOWPOS (fetch (GROUP GROUPCONTROLPOINT) of GGROUPELT))
@@ -5235,34 +5198,34 @@ This will be slow for arcs and curves."]
NOWPOS]
(T (PROG ((GGROUPELT (fetch (GLOBALPART INDIVIDUALGLOBALPART) of GELT))
NEWREG)
-
- (* this transforms the old region to get the new one.
- This is not as good as recalculating the new one from the transformed elements.
- The latter is hard because the region function only works on local elements and
- here we have only global ones.)
+
+ (* this transforms the old region to get the new one.
+ This is not as good as recalculating the new one from the transformed elements.
+ The latter is hard because the region function only works on local elements and
+ here we have only global ones.)
(SETQ NEWREG (SK.TRANSFORM.REGION (fetch (GROUP GROUPREGION) of GGROUPELT)
TRANSFORMFN TRANSFORMDATA))
-
- (* the control point could also profitably be put on a grid point but no other
- elements points are so done and it would be hard.)
+
+ (* the control point could also profitably be put on a grid point but no other
+ elements points are so done and it would be hard.)
(RETURN (BOX.SET.SCALES NEWREG (create GLOBALPART
- COMMONGLOBALPART _ (fetch (GLOBALPART
+ COMMONGLOBALPART ↠(fetch (GLOBALPART
COMMONGLOBALPART
) of GELT)
- INDIVIDUALGLOBALPART _
+ INDIVIDUALGLOBALPART â†
(create GROUP
- GROUPREGION _ NEWREG
- LISTOFGLOBALELTS _
+ GROUPREGION ↠NEWREG
+ LISTOFGLOBALELTS â†
(for SUBELT
in (fetch (GROUP LISTOFGLOBALELTS)
of GGROUPELT)
- collect (SK.TRANSFORM.ELEMENT SUBELT
+ collect (SK.TRANSFORM.ELEMENT SUBELT
TRANSFORMFN
TRANSFORMDATA
SCALEFACTOR))
- GROUPCONTROLPOINT _
+ GROUPCONTROLPOINT â†
(SK.TRANSFORM.POINT (fetch (GROUP
GROUPCONTROLPOINT
)
@@ -5270,20 +5233,20 @@ This will be slow for arcs and curves."]
TRANSFORMFN TRANSFORMDATA])
(GROUP.READCHANGEFN
- [LAMBDA (SKW SCRNELTS) (* rrb "14-May-86 19:38")
+ [LAMBDA (SKW SCRNELTS) (* rrb "14-May-86 19:38")
(* reads how the user wants to change
a textbox.)
(PROG (ASPECT HOW)
(SETQ HOW (SELECTQ (SETQ ASPECT (\CURSOR.IN.MIDDLE.MENU
(create MENU
- TITLE _ "Change which part?"
- ITEMS _ [APPEND (COND
+ TITLE ↠"Change which part?"
+ ITEMS ↠[APPEND (COND
[(SKETCHINCOLORP)
'(("Brush color" 'BRUSHCOLOR
"changes the color of any lines or text in the group."
)
- ("Filling color" '
- FILLINGCOLOR
+ ("Filling color"
+ 'FILLINGCOLOR
"changes the filling color of any boxes or text boxes in the group."
]
(T NIL))
@@ -5305,7 +5268,7 @@ This will be slow for arcs and curves."]
(Text 'TEXT
"allows changing the properties of the text."
]
- CENTERFLG _ T)))
+ CENTERFLG ↠T)))
(TEXT (* handle TEXT specially because it
has several different cases.)
(AND (SETQ HOW (TEXT.READCHANGEFN SKW SCRNELTS T))
@@ -5323,13 +5286,13 @@ This will be slow for arcs and curves."]
(DEFINEQ
(REGION.CENTER
- [LAMBDA (REGION) (* rrb "11-Jan-85 18:22")
+ [LAMBDA (REGION) (* rrb "11-Jan-85 18:22")
(* returns the center of a region)
(create POSITION
- XCOORD _ (PLUS (fetch (REGION LEFT) of REGION)
+ XCOORD ↠(PLUS (fetch (REGION LEFT) of REGION)
(QUOTIENT (fetch (REGION WIDTH) of REGION)
2))
- YCOORD _ (PLUS (fetch (REGION BOTTOM) of REGION)
+ YCOORD ↠(PLUS (fetch (REGION BOTTOM) of REGION)
(QUOTIENT (fetch (REGION HEIGHT) of REGION)
2])
@@ -5350,18 +5313,16 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SK.MOVE.GROUP.CONTROL.PT
- [LAMBDA (W) (* rrb "31-Jan-86 10:59")
-
- (* lets the user move the control point of a group.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:59")
+ (* lets the user move the control
+ point of a group.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.MOVE.CONTROL.PT (KWOTE W))
W])
(SK.SEL.AND.MOVE.CONTROL.PT
- [LAMBDA (W) (* rrb "23-Jan-86 18:11")
-
- (* lets the user select a groups and move its control point.)
-
+ [LAMBDA (W) (* rrb "23-Jan-86 18:11")
+ (* lets the user select a groups and
+ move its control point.)
(PROG NIL
(RETURN (SK.MOVE.GROUP.ELEMENT.CONTROL.POINT
[SK.SELECT.ITEM W T (COND
@@ -5380,10 +5341,9 @@ This will be slow for arcs and curves."]
W])
(SK.MOVE.GROUP.ELEMENT.CONTROL.POINT
- [LAMBDA (SCRGROUPELT SKW) (* rrb "27-Jun-86 15:34")
-
- (* reads a new location of the control point for a group element.)
-
+ [LAMBDA (SCRGROUPELT SKW) (* rrb "27-Jun-86 15:34")
+ (* reads a new location of the control
+ point for a group element.)
(PROG ((GELT (fetch (SCREENELT GLOBALPART) of SCRGROUPELT))
(INDVGELT (fetch (SCREENELT INDIVIDUALGLOBALPART) of SCRGROUPELT))
OLDPOS NEWPOS NEWGROUPELT LOCALELT)
@@ -5406,19 +5366,18 @@ This will be slow for arcs and curves."]
of LOCALELT))
SKW GRAYSHADE)
(SK.ADD.HISTEVENT 'CHANGE (LIST (create SKHISTORYCHANGESPEC
- NEWELT _ NEWGROUPELT
- OLDELT _ GELT
- PROPERTY _ 'POSITION
- NEWVALUE _ NEWPOS
- OLDVALUE _ OLDPOS))
+ NEWELT ↠NEWGROUPELT
+ OLDELT ↠GELT
+ PROPERTY ↠'POSITION
+ NEWVALUE ↠NEWPOS
+ OLDVALUE ↠OLDPOS))
SKW)
(RETURN NEWGROUPELT])
(SK.READ.NEW.GROUP.CONTROL.PT
- [LAMBDA (VIEWER LOCALGROUPREGION) (* rrb "14-Jul-86 13:51")
-
- (* reads where the user wants the new control point to be.)
-
+ [LAMBDA (VIEWER LOCALGROUPREGION) (* rrb "14-Jul-86 13:51")
+ (* reads where the user wants the new
+ control point to be.)
(PROG (PT) (* outline the group)
(SK.DRAWBOX (fetch (REGION LEFT) of LOCALGROUPREGION)
(fetch (REGION BOTTOM) of LOCALGROUPREGION)
@@ -5453,7 +5412,7 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SK.DO.GROUP
- [LAMBDA (GROUPELT SKW) (* rrb "30-Sep-86 17:38")
+ [LAMBDA (GROUPELT SKW) (* rrb "30-Sep-86 17:38")
(* does a group event.
Used to undo UNGROUP too.)
(PROG (LOCALELT OKEDGELTS)
@@ -5466,17 +5425,15 @@ This will be slow for arcs and curves."]
with (SK.ORDER.ELEMENTS OKEDGELTS))
(SK.UPDATE.GROUP.AFTER.CHANGE GROUPELT)
(for GELT in OKEDGELTS do (SK.DELETE.ELEMENT1 GELT SKW T))
- (SETQ LOCALELT (SK.ADD.ELEMENT GROUPELT SKW T T T))
-
- (* flash the grouped area to let user know something happened.)
-
+ (SETQ LOCALELT (SK.ADD.ELEMENT GROUPELT SKW T T T))(* flash the grouped area to let user
+ know something happened.)
(SK.FLASHREGION (fetch (LOCALGROUP LOCALGROUPREGION) of (fetch (SCREENELT LOCALPART)
of LOCALELT))
SKW GRAYSHADE)
(RETURN LOCALELT])
(SK.CHECK.WHENGROUPEDFN
- [LAMBDA (VIEWER ELEMENTS) (* rrb "15-Jan-86 16:07")
+ [LAMBDA (VIEWER ELEMENTS) (* rrb "15-Jan-86 16:07")
(* checks the when grouped fn of a
sketch viewer.)
(PROG (GROUPFN X)
@@ -5491,7 +5448,7 @@ This will be slow for arcs and curves."]
(T ELEMENTS])
(SK.DO.UNGROUP
- [LAMBDA (GROUPELT SKW) (* rrb "11-Jul-86 15:51")
+ [LAMBDA (GROUPELT SKW) (* rrb "11-Jul-86 15:51")
(* does a ungroup event.
Used to undo GROUP too.)
(PROG NIL
@@ -5510,7 +5467,7 @@ This will be slow for arcs and curves."]
(RETURN GROUPELT])
(SK.CHECK.WHENUNGROUPEDFN
- [LAMBDA (VIEWER GROUPELT) (* rrb "15-Jan-86 16:19")
+ [LAMBDA (VIEWER GROUPELT) (* rrb "15-Jan-86 16:19")
(* checks the when ungrouped fn of a
sketch viewer.)
(PROG (UNGROUPFN)
@@ -5520,14 +5477,14 @@ This will be slow for arcs and curves."]
'DON'T])
(SK.GROUP.UNDO
- [LAMBDA (EVENTARGS SKW) (* rrb "15-Jan-86 16:12")
+ [LAMBDA (EVENTARGS SKW) (* rrb "15-Jan-86 16:12")
(* undoes a group event)
(for GRP in EVENTARGS do (SK.DO.UNGROUP (CAR GRP)
SKW))
T])
(SK.UNGROUP.UNDO
- [LAMBDA (EVENTARGS SKW) (* rrb "15-Jan-86 15:47")
+ [LAMBDA (EVENTARGS SKW) (* rrb "15-Jan-86 15:47")
(* undoes a ungroup event)
(for GRP in EVENTARGS do (SK.DO.GROUP (CAR GRP)
SKW))
@@ -5545,22 +5502,21 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SK.FREEZE.ELTS
- [LAMBDA (W) (* rrb "31-Jan-86 10:59")
-
- (* lets the user select a collection elements and freezes them.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:59")
+ (* lets the user select a collection
+ elements and freezes them.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.FREEZE (KWOTE W))
W])
(SK.SEL.AND.FREEZE
- [LAMBDA (W) (* rrb "11-Dec-85 15:30")
+ [LAMBDA (W) (* rrb "11-Dec-85 15:30")
(* lets the user select elements and
freezes them.)
(SK.FREEZE.ELEMENTS (SK.SELECT.MULTIPLE.ITEMS W T NIL 'FROZEN)
W])
(SK.FREEZE.ELEMENTS
- [LAMBDA (SCRELTS SKW) (* rrb "11-Dec-85 15:30")
+ [LAMBDA (SCRELTS SKW) (* rrb "11-Dec-85 15:30")
(* freezes the collection of elements
SCRELTS.)
(PROG (GELTS GELT)
@@ -5570,15 +5526,14 @@ This will be slow for arcs and curves."]
(SK.ADD.HISTEVENT 'FREEZE GELTS SKW])
(SK.UNFREEZE.ELT
- [LAMBDA (W) (* rrb "31-Jan-86 10:59")
-
- (* lets the user select a collection elements and unfreezes them.)
-
+ [LAMBDA (W) (* rrb "31-Jan-86 10:59")
+ (* lets the user select a collection
+ elements and unfreezes them.)
(SK.EVAL.AS.PROCESS (LIST 'SK.SEL.AND.UNFREEZE (KWOTE W))
W])
(SK.SEL.AND.UNFREEZE
- [LAMBDA (W) (* rrb "12-Dec-85 12:25")
+ [LAMBDA (W) (* rrb "12-Dec-85 12:25")
(* lets the user select elements and
freezes them.)
(PROG NIL
@@ -5600,7 +5555,7 @@ This will be slow for arcs and curves."]
W])
(SK.UNFREEZE.ELEMENTS
- [LAMBDA (SCRELTS SKW) (* rrb "11-Dec-85 15:30")
+ [LAMBDA (SCRELTS SKW) (* rrb "11-Dec-85 15:30")
(* unfreezes the collection of
elements SCRELTS.)
(PROG (GELTS GELT)
@@ -5610,24 +5565,24 @@ This will be slow for arcs and curves."]
(SK.ADD.HISTEVENT 'UNFREEZE GELTS SKW])
(SK.FREEZE.UNDO
- [LAMBDA (EVENTARGS SKW) (* rrb "11-Dec-85 15:28")
+ [LAMBDA (EVENTARGS SKW) (* rrb "11-Dec-85 15:28")
(* undoes a freeze event)
(SK.DO.UNFREEZE EVENTARGS SKW])
(SK.UNFREEZE.UNDO
- [LAMBDA (EVENTARGS SKW) (* rrb "11-Dec-85 15:28")
+ [LAMBDA (EVENTARGS SKW) (* rrb "11-Dec-85 15:28")
(* undoes a unfreeze event)
(SK.DO.FREEZE EVENTARGS SKW])
(SK.DO.FREEZE
- [LAMBDA (GELTS SKW) (* rrb "11-Dec-85 15:27")
+ [LAMBDA (GELTS SKW) (* rrb "11-Dec-85 15:27")
(* does a freeze event.
Used to undo UNFREEZE too.)
(for GELT in GELTS do (ADDSKETCHELEMENTPROP GELT 'PROTECTION 'FROZEN))
GELTS])
(SK.DO.UNFREEZE
- [LAMBDA (GELTS SKW) (* rrb "11-Dec-85 15:27")
+ [LAMBDA (GELTS SKW) (* rrb "11-Dec-85 15:27")
(* does a unfreeze event.
Used to undo FREEZE too.)
(for GELT in GELTS do (REMOVESKETCHELEMENTPROP GELT 'PROTECTION 'FROZEN))
@@ -5645,36 +5600,36 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SKETCH.ELEMENTS.OF.SKETCH
- [LAMBDA (SKETCH) (* rrb " 2-Aug-85 16:21")
-
- (* Returns the list of elements that are in SKETCH.
- SKETCH can be either a SKETCH structure, a sketch window
- (sometimes called a viewer) or a SKETCH stream
- (obtained via (OPENIMAGESTREAM (QUOTE name)
- (QUOTE SKETCH))%. If SKETCH is not a sketch, a sketch window or a sketch
- stream, it returns NIL. This can be used with sketch streams to determine the
- elements created by a call to a display function or series of functions by
- looking at the list differences; new elements are always added at the end.))
+ [LAMBDA (SKETCH) (* rrb " 2-Aug-85 16:21")
+
+ (* Returns the list of elements that are in SKETCH.
+ SKETCH can be either a SKETCH structure, a sketch window
+ (sometimes called a viewer) or a SKETCH stream
+ (obtained via (OPENIMAGESTREAM (QUOTE name)
+ (QUOTE SKETCH))%. If SKETCH is not a sketch, a sketch window or a sketch stream,
+ it returns NIL. This can be used with sketch streams to determine the elements
+ created by a call to a display function or series of functions by looking at the
+ list differences; new elements are always added at the end.))
(fetch (SKETCH SKETCHELTS) of (INSURE.SKETCH SKETCH T])
(SKETCH.LIST.OF.ELEMENTS
- [LAMBDA (SKETCH PREDICATE INSIDEGROUPSFLG) (* rrb "14-Aug-85 16:26")
-
- (* Returns a list of the sketch elements in SKETCH that satisfy PREDICATE.
- If INSIDEGROUPSFLG is T, elements that are members of a group will be
- considered too. Otherwise only top level objects are considered.
- Note%: PREDICATE will be applied to GROUP elements even when INSIDEGROUPSFLG is
- T.)
+ [LAMBDA (SKETCH PREDICATE INSIDEGROUPSFLG) (* rrb "14-Aug-85 16:26")
+
+ (* Returns a list of the sketch elements in SKETCH that satisfy PREDICATE.
+ If INSIDEGROUPSFLG is T, elements that are members of a group will be considered
+ too. Otherwise only top level objects are considered.
+ Note%: PREDICATE will be applied to GROUP elements even when INSIDEGROUPSFLG is
+ T.)
(* FOR NOW, IGNORE INSIDEGROUPSFLG)
(for ELT in (SKETCH.ELEMENTS.OF.SKETCH SKETCH) when (APPLY* PREDICATE ELT) collect ELT])
(SKETCH.ADD.ELEMENT
- [LAMBDA (ELEMENT SKETCH NODISPLAYFLG) (* rrb "30-Aug-86 15:09")
-
- (* Adds an element to a sketch. If NODISPLAYFLG is NIL, any windows currently
- displaying SKETCH will be updated to reflect ELEMENT's addition.
- If NODISPLAYFLG is T, the displays won't be updated.)
+ [LAMBDA (ELEMENT SKETCH NODISPLAYFLG) (* rrb "30-Aug-86 15:09")
+
+ (* Adds an element to a sketch. If NODISPLAYFLG is NIL, any windows currently
+ displaying SKETCH will be updated to reflect ELEMENT's addition.
+ If NODISPLAYFLG is T, the displays won't be updated.)
(PROG [(SKSTRUC (COND
((NULL SKETCH)
@@ -5691,14 +5646,14 @@ This will be slow for arcs and curves."]
(RETURN SKSTRUC])
(SKETCH.DELETE.ELEMENT
- [LAMBDA (ELEMENT SKETCH INSIDEGROUPSFLG NODISPLAYFLG) (* rrb "19-Oct-85 17:09")
-
- (* Deletes an element from a sketch. If INSIDEGROUPSFLG is T, the element will
- be deleted even if it is inside a group.
- Otherwise it will be deleted only if it is on the top level.
- If NODISPLAYFLG is NIL, any windows currently displaying SKETCH will be updated
- to reflect ELEMENT's deletion. If NODISPLAYFLG is T, the displays won't be
- updated. It returns ELEMENT if ELEMENT was deleted.)
+ [LAMBDA (ELEMENT SKETCH INSIDEGROUPSFLG NODISPLAYFLG) (* rrb "19-Oct-85 17:09")
+
+ (* Deletes an element from a sketch. If INSIDEGROUPSFLG is T, the element will be
+ deleted even if it is inside a group. Otherwise it will be deleted only if it is
+ on the top level. If NODISPLAYFLG is NIL, any windows currently displaying SKETCH
+ will be updated to reflect ELEMENT's deletion.
+ If NODISPLAYFLG is T, the displays won't be updated.
+ It returns ELEMENT if ELEMENT was deleted.)
(PROG ((SKSTRUC (INSURE.SKETCH SKETCH))
LOCALELT OLDGELT) (* delete the element to the sketch.)
@@ -5717,10 +5672,9 @@ This will be slow for arcs and curves."]
(RETURN OLDGELT])
(DELFROMGROUPELT
- [LAMBDA (ELTTODEL GROUPELT) (* rrb " 2-Aug-85 17:03")
-
- (* if ELTTODEL is a member of GROUPELT, this deletes it.)
-
+ [LAMBDA (ELTTODEL GROUPELT) (* rrb " 2-Aug-85 17:03")
+ (* if ELTTODEL is a member of
+ GROUPELT, this deletes it.)
(AND (EQ (fetch (GLOBALPART GTYPE) of GROUPELT)
'GROUP)
(PROG ((INDVGROUPELT (fetch (GLOBALPART INDIVIDUALGLOBALPART) of GROUPELT))
@@ -5733,17 +5687,17 @@ This will be slow for arcs and curves."]
(T (RETURN (for ELT in SUBELTS thereis (DELFROMGROUPELT ELTTODEL ELT])
(SKETCH.ELEMENT.TYPE
- [LAMBDA (ELEMENT) (* rrb "14-Aug-85 16:35")
+ [LAMBDA (ELEMENT) (* rrb "14-Aug-85 16:35")
(* returns the type of a global sketch
element)
(fetch (GLOBALPART GTYPE) of ELEMENT])
(SKETCH.ELEMENT.CHANGED
- [LAMBDA (SKETCH ELEMENT SKETCHWINDOW) (* rrb " 4-Feb-86 15:04")
-
- (* If ELEMENT is an element of SKETCH, its local part is recalculated.
- This is normally used to notify sketch that an image object element has
- changed. Note%: this replaces the element with another one.)
+ [LAMBDA (SKETCH ELEMENT SKETCHWINDOW) (* rrb " 4-Feb-86 15:04")
+
+ (* If ELEMENT is an element of SKETCH, its local part is recalculated.
+ This is normally used to notify sketch that an image object element has changed.
+ Note%: this replaces the element with another one.)
(PROG ((SKETCH (INSURE.SKETCH SKETCH))
OLDREG)
@@ -5763,10 +5717,9 @@ This will be slow for arcs and curves."]
(RETURN ELEMENT])
(SK.ELEMENT.CHANGED1
- [LAMBDA (SKIMAGEOBJELT OLDREGION SKETCHW) (* rrb "21-Aug-85 15:54")
-
- (* updates the display of an image object element in a window.)
-
+ [LAMBDA (SKIMAGEOBJELT OLDREGION SKETCHW) (* rrb "21-Aug-85 15:54")
+ (* updates the display of an image
+ object element in a window.)
(PROG (LOCALELT)
(COND
((SETQ LOCALELT (SK.LOCAL.ELT.FROM.GLOBALPART SKIMAGEOBJELT SKETCHW))
@@ -5778,10 +5731,10 @@ This will be slow for arcs and curves."]
(RETURN (SKETCH.ADD.AND.DISPLAY1 SKIMAGEOBJELT SKETCHW])
(SK.UPDATE.GLOBAL.IMAGE.OBJECT.ELEMENT
- [LAMBDA (SKIMOBJELT VIEWER) (* rrb " 4-Feb-86 15:04")
-
- (* updates the fields to reflect changes in the size of the image object.)
-
+ [LAMBDA (SKIMOBJELT VIEWER) (* rrb " 4-Feb-86 15:04")
+ (* updates the fields to reflect
+ changes in the size of the image
+ object.)
(PROG ((INDVSKIMOBJELT (fetch (GLOBALPART INDIVIDUALGLOBALPART) of SKIMOBJELT))
IMOBJSIZE REGION SCALE)
(SETQ IMOBJSIZE (IMAGEBOXSIZE (fetch (SKIMAGEOBJ SKIMAGEOBJ) of INDVSKIMOBJELT)
@@ -5796,11 +5749,11 @@ This will be slow for arcs and curves."]
(TIMES (fetch (IMAGEBOX YSIZE) of IMOBJSIZE)
SCALE)))
(replace (SKIMAGEOBJ SKIMOBJ.OFFSETPOS) of INDVSKIMOBJELT with (create POSITION
- XCOORD _
+ XCOORD â†
(fetch (IMAGEBOX
XKERN)
of IMOBJSIZE)
- YCOORD _
+ YCOORD â†
(fetch (IMAGEBOX
YDESC)
of IMOBJSIZE)))
@@ -5814,10 +5767,9 @@ This will be slow for arcs and curves."]
(DEFINEQ
(INSURE.SKETCH
- [LAMBDA (SK NOERRORFLG) (* rrb " 3-Oct-86 15:16")
-
- (* returns the SKETCH structure from a window, sketch stream, or a structure.)
-
+ [LAMBDA (SK NOERRORFLG) (* rrb " 3-Oct-86 15:16")
+ (* returns the SKETCH structure from a
+ window, sketch stream, or a structure.)
(SK.CHECK.SKETCH.VERSION (COND
((type? SKETCH SK)
SK)
@@ -5833,7 +5785,7 @@ This will be slow for arcs and curves."]
'SKETCH))
(T (AND (NULL NOERRORFLG)
(ERROR
- "sketch stream window doesn't have SKETCH property"
+ "sketch stream window doesn't have SKETCH property"
SK]
[(type? IMAGEOBJ SK)
(PROG [(SK? (fetch (SKETCHIMAGEOBJ SKIO.SKETCH)
@@ -5846,14 +5798,12 @@ This will be slow for arcs and curves."]
((AND (LISTP SK)
(LITATOM (CAR SK))
(for ELT in (CDR SK) always (GLOBALELEMENTP ELT)))
-
- (* old form, probably written out by notecards, update to new form.)
-
+ (* old form, probably written out by
+ notecards, update to new form.)
(PROG (X)
(SETQ X (SKIO.UPDATE.FROM.OLD.FORM SK))
-
- (* smash sketch so this won't have to happen every time.)
-
+ (* smash sketch so this won't have to
+ happen every time.)
(RPLACA SK (CAR X))
(RPLACD SK (CDR X))
(RETURN X)))
@@ -5861,16 +5811,16 @@ This will be slow for arcs and curves."]
(ERROR SK "not a SKETCH"])
(LOCALSPECS.FROM.VIEWER
- [LAMBDA (SKW) (* rrb "12-May-85 16:46")
+ [LAMBDA (SKW) (* rrb "12-May-85 16:46")
(* returns the sketch specification
displayed in the window SKW.)
(CDAR (WINDOWPROP SKW 'SKETCHSPECS])
(SK.LOCAL.ELT.FROM.GLOBALPART
- [LAMBDA (GLOBALPART SKW) (* rrb "18-MAR-83 13:09")
-
- (* returns the local element from SKW that has global part GLOBALPART -
- NIL if there isn't one.)
+ [LAMBDA (GLOBALPART SKW) (* rrb "18-MAR-83 13:09")
+
+ (* returns the local element from SKW that has global part GLOBALPART -
+ NIL if there isn't one.)
(for ELT in (LOCALSPECS.FROM.VIEWER SKW) when (EQ (fetch (SCREENELT GLOBALPART) of ELT)
GLOBALPART) do (RETURN ELT])
@@ -5881,36 +5831,33 @@ This will be slow for arcs and curves."]
(WINDOWPROP SKETCHW 'SKETCH])
(INSPECT.SKETCH
- [LAMBDA (SKW) (* rrb "18-Apr-84 14:44")
-
- (* calls the inspector on the sketch specs of a sketch window.)
-
+ [LAMBDA (SKW) (* rrb "18-Apr-84 14:44")
+ (* calls the inspector on the sketch
+ specs of a sketch window.)
(PROG ((SPECS (LOCALSPECS.FROM.VIEWER SKW)))
(COND
(SPECS (INSPECT/TOP/LEVEL/LIST SPECS])
(ELT.INSIDE.SKETCHWP
- [LAMBDA (GELT SKW) (* rrb " 8-APR-83 13:18")
-
- (* determines if a global element is in the region of a viewer)
-
+ [LAMBDA (GELT SKW) (* rrb " 8-APR-83 13:18")
+ (* determines if a global element is
+ in the region of a viewer)
(SK.INSIDE.REGION GELT (WINDOWPROP SKW 'REGION.VIEWED])
(SK.INSIDE.REGION
- [LAMBDA (GELT REGION) (* rrb "31-Aug-84 10:15")
-
- (* determines if the element GELT is inside of the global region REGION)
-
+ [LAMBDA (GELT REGION) (* rrb "31-Aug-84 10:15")
+ (* determines if the element GELT is
+ inside of the global region REGION)
(APPLY* (SK.INSIDEFN (fetch (GLOBALPART GTYPE) of GELT))
GELT REGION])
)
(DEFINEQ
(MAPSKETCHSPECS
- [LAMBDA (SKSPECS SPECFN DATUM DATUM2 DATUM3) (* rrb "10-Sep-84 14:58")
-
- (* walks through a sketch specification list and applies SPECFN to each of the
- individual elements.)
+ [LAMBDA (SKSPECS SPECFN DATUM DATUM2 DATUM3) (* rrb "10-Sep-84 14:58")
+
+ (* walks through a sketch specification list and applies SPECFN to each of the
+ individual elements.)
(AND SKSPECS (COND
((SCREENELEMENTP SKSPECS)
@@ -5920,10 +5867,10 @@ This will be slow for arcs and curves."]
(T (ERROR "unknown figure specification" SKSPECS])
(MAPCOLLECTSKETCHSPECS
- [LAMBDA (SKSPECS SPECFN DATUM DATUM2 DATUM3 DATUM4) (* rrb "26-Apr-85 09:29")
-
- (* walks through a sketch specification list and applies SPECFN to each of the
- individual (elements returning a list of the results.))
+ [LAMBDA (SKSPECS SPECFN DATUM DATUM2 DATUM3 DATUM4) (* rrb "26-Apr-85 09:29")
+
+ (* walks through a sketch specification list and applies SPECFN to each of the
+ individual (elements returning a list of the results.))
(AND SKSPECS (COND
((SCREENELEMENTP SKSPECS)
@@ -5934,10 +5881,10 @@ This will be slow for arcs and curves."]
(T (ERROR "unknown figure specification" SKSPECS])
(MAPSKETCHSPECSUNTIL
- [LAMBDA (SKETCHSPECS SPECFN DATUM DATUM2) (* rrb " 4-AUG-83 15:22")
-
- (* walks through a sketch specification list and applies SPECFN to each of the
- individual elements.)
+ [LAMBDA (SKETCHSPECS SPECFN DATUM DATUM2) (* rrb " 4-AUG-83 15:22")
+
+ (* walks through a sketch specification list and applies SPECFN to each of the
+ individual elements.)
(AND SKETCHSPECS (COND
((SKETCH.ELEMENT.NAMEP (fetch (SCREENELT GTYPE) of SKETCHSPECS))
@@ -5949,10 +5896,10 @@ This will be slow for arcs and curves."]
(T (ERROR "unknown figure specification" SKETCHSPECS])
(MAPGLOBALSKETCHSPECS
- [LAMBDA (SKSPECS SPECFN DATUM DATUM2 DATUM3) (* rrb "19-Feb-85 17:52")
-
- (* walks through a list of global sketch elements and applies SPECFN to each of
- the individual elements.)
+ [LAMBDA (SKSPECS SPECFN DATUM DATUM2 DATUM3) (* rrb "19-Feb-85 17:52")
+
+ (* walks through a list of global sketch elements and applies SPECFN to each of
+ the individual elements.)
(AND SKSPECS (COND
((GLOBALELEMENTP SKSPECS)
@@ -5963,11 +5910,11 @@ This will be slow for arcs and curves."]
(T (ERROR "unknown global sketch element" SKSPECS])
(MAPGLOBALSKETCHELEMENTS
- [LAMBDA (SKSPECS SPECFN DATUM DATUM2 DATUM3) (* rrb "24-Apr-85 15:02")
-
- (* walks through a list of global sketch elements and applies SPECFN to each of
- the individual elements. Differes from MAPGLOBALSKETCHSPECS in that it know
- about and gets inside of GROUP elements.)
+ [LAMBDA (SKSPECS SPECFN DATUM DATUM2 DATUM3) (* rrb "24-Apr-85 15:02")
+
+ (* walks through a list of global sketch elements and applies SPECFN to each of
+ the individual elements. Differes from MAPGLOBALSKETCHSPECS in that it know about
+ and gets inside of GROUP elements.)
(AND SKSPECS (COND
[(GLOBALELEMENTP SKSPECS)
@@ -5993,69 +5940,66 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SK.ADD.SELECTION
- [LAMBDA (ITEM/POS WINDOW MARKBM FIRSTFLG) (* rrb " 9-May-85 10:42")
+ [LAMBDA (ITEM/POS WINDOW MARKBM FIRSTFLG) (* rrb " 9-May-85 10:42")
(* adds an item to the selection list
of WINDOW.)
(COND
([NOT (MEMBER ITEM/POS (WINDOWPROP WINDOW 'SKETCH.SELECTIONS]
-
- (* must turning off the element's selection before adding it to the window
- selections because the display of the selection check to see if the points are
- already selected in another element.)
+
+ (* must turning off the element's selection before adding it to the window
+ selections because the display of the selection check to see if the points are
+ already selected in another element.)
(SK.SELECT.ELT ITEM/POS WINDOW MARKBM)
(WINDOWADDPROP WINDOW 'SKETCH.SELECTIONS ITEM/POS FIRSTFLG])
(SK.COPY.INSERTFN
- [LAMBDA (IMAGEOBJ SKW) (* rrb "23-Jun-87 13:25")
-
- (* * the function that gets called to insert a copy-selection into a sketch
- window. Knows how to insert sketches, everything else is text.)
+ [LAMBDA (IMAGEOBJ SKW) (* rrb "23-Jun-87 13:25")
+
+ (* * the function that gets called to insert a copy-selection into a sketch
+ window. Knows how to insert sketches, everything else is text.)
(PROG (IMAGEOBJYET SELECTION EXTENDSELECTION)
-
- (* bind the selection so that if the user has to place an image obj, it is
- restored before the characters are unBYSYSBUFed)
+
+ (* bind the selection so that if the user has to place an image obj, it is
+ restored before the characters are unBYSYSBUFed)
[bind DATUM for IMOBJ inside IMAGEOBJ
do (COND
- ((STRINGP IMOBJ)
- (BKSYSBUF IMOBJ))
- ((EQ (fetch (IMAGEOBJ IMAGEOBJFNS) of IMOBJ)
- SKETCHIMAGEFNS) (* this is a sketch imageobj)
- [COND
- ((NULL IMAGEOBJYET) (* save SELECTION and
- EXTENDSELECTION so they can be
- restored)
- (SETQ IMAGEOBJYET T)
- (SETQ SELECTION (WINDOWPROP SKW 'SELECTION))
- (SETQ EXTENDSELECTION (WINDOWPROP SKW 'EXTENDSELECTION]
- (SETQ DATUM (IMAGEOBJPROP IMOBJ 'OBJECTDATUM))
- (OR (SK.INSERT.SKETCH SKW (fetch (SKETCHIMAGEOBJ SKIO.SKETCH)
- of DATUM)
- (fetch (SKETCHIMAGEOBJ SKIO.REGION) of DATUM)
- (fetch (SKETCHIMAGEOBJ SKIO.SCALE) of DATUM))
- (RETURN)))
- (T (* insert the image object whatever
- it is)
- [COND
- ((NULL IMAGEOBJYET) (* save SELECTION and
- EXTENDSELECTION so they can be
- restored)
- (SETQ IMAGEOBJYET T)
- (SETQ SELECTION (WINDOWPROP SKW 'SELECTION))
- (SETQ EXTENDSELECTION (WINDOWPROP SKW 'EXTENDSELECTION]
- (* if the user placed it outside,
- just return)
- (OR (SK.INSERT.SKETCH SKW [SKETCH.CREATE 'DUMMYNAME 'ELEMENTS
- (LIST (SETQ DATUM (
- SK.ELEMENT.FROM.IMAGEOBJ
- IMOBJ SKW]
- (fetch (SKIMAGEOBJ SKIMOBJ.GLOBALREGION)
- of (fetch (GLOBALPART INDIVIDUALGLOBALPART)
- of DATUM))
- (VIEWER.SCALE SKW))
- (RETURN]
+ ((STRINGP IMOBJ)
+ (BKSYSBUF IMOBJ))
+ ((EQ (fetch (IMAGEOBJ IMAGEOBJFNS) of IMOBJ)
+ SKETCHIMAGEFNS) (* this is a sketch imageobj)
+ [COND
+ ((NULL IMAGEOBJYET) (* save SELECTION and EXTENDSELECTION
+ so they can be restored)
+ (SETQ IMAGEOBJYET T)
+ (SETQ SELECTION (WINDOWPROP SKW 'SELECTION))
+ (SETQ EXTENDSELECTION (WINDOWPROP SKW 'EXTENDSELECTION]
+ (SETQ DATUM (IMAGEOBJPROP IMOBJ 'OBJECTDATUM))
+ (OR (SK.INSERT.SKETCH SKW (fetch (SKETCHIMAGEOBJ SKIO.SKETCH) of DATUM)
+ (fetch (SKETCHIMAGEOBJ SKIO.REGION) of DATUM)
+ (fetch (SKETCHIMAGEOBJ SKIO.SCALE) of DATUM))
+ (RETURN)))
+ (T (* insert the image object whatever it
+ is)
+ [COND
+ ((NULL IMAGEOBJYET) (* save SELECTION and EXTENDSELECTION
+ so they can be restored)
+ (SETQ IMAGEOBJYET T)
+ (SETQ SELECTION (WINDOWPROP SKW 'SELECTION))
+ (SETQ EXTENDSELECTION (WINDOWPROP SKW 'EXTENDSELECTION]
+ (* if the user placed it outside, just
+ return)
+ (OR (SK.INSERT.SKETCH SKW [SKETCH.CREATE 'DUMMYNAME 'ELEMENTS
+ (LIST (SETQ DATUM (SK.ELEMENT.FROM.IMAGEOBJ
+ IMOBJ SKW]
+ (fetch (SKIMAGEOBJ SKIMOBJ.GLOBALREGION) of (fetch (GLOBALPART
+
+ INDIVIDUALGLOBALPART
+ ) of DATUM))
+ (VIEWER.SCALE SKW))
+ (RETURN]
(COND
(IMAGEOBJYET (* restore the selection)
(WINDOWPROP SKW 'SELECTION SELECTION)
@@ -6063,9 +6007,9 @@ This will be slow for arcs and curves."]
(SKED.SELECTION.FEEDBACK SKW])
(SCREENELEMENTP
- [LAMBDA (ELT?) (* rrb "26-Sep-86 14:53")
-
- (* * returns ELT? if it is a screen element.)
+ [LAMBDA (ELT?) (* rrb "26-Sep-86 14:53")
+
+ (* * returns ELT? if it is a screen element.)
(PROG (X)
(RETURN (AND (LISTP ELT?)
@@ -6075,10 +6019,10 @@ This will be slow for arcs and curves."]
ELT?])
(SK.ITEM.REGION
- [LAMBDA (SCRELT) (* rrb "24-Jan-85 17:46")
-
- (* SCRELT is a sketch element This function returns the region it occupies.)
-
+ [LAMBDA (SCRELT) (* rrb "24-Jan-85 17:46")
+ (* SCRELT is a sketch element This
+ function returns the region it
+ occupies.)
(PROG [(REGIONFN (SK.REGIONFN (fetch (SCREENELT GTYPE) of SCRELT]
(RETURN (COND
((OR (NULL REGIONFN)
@@ -6087,11 +6031,10 @@ This will be slow for arcs and curves."]
((APPLY* REGIONFN SCRELT])
(SK.ELEMENT.GLOBAL.REGION
- [LAMBDA (GELT) (* rrb "18-Oct-85 10:30")
-
- (* GELT is a global sketch element This function returns the global region it
- occupies.)
-
+ [LAMBDA (GELT) (* rrb "18-Oct-85 10:30")
+ (* GELT is a global sketch element
+ This function returns the global
+ region it occupies.)
(PROG [(REGIONFN (SK.GLOBAL.REGIONFN (fetch (GLOBALPART GTYPE) of GELT]
(RETURN (COND
((OR (NULL REGIONFN)
@@ -6100,15 +6043,15 @@ This will be slow for arcs and curves."]
((APPLY* REGIONFN GELT])
(SK.LOCAL.ITEMS.IN.REGION
- [LAMBDA (HOTSPOTCACHE LEFT BOTTOM RIGHT TOP) (* rrb "31-Jan-85 11:38")
-
- (* * returns a list of the LOCALITEMS that are within LOCALREGION)
-
- (* changed to take a hotspot cache instead of a list of local items.
- OLD ARGS were (HOTSPOTCACHE LOCALREGION SCALE) OLD CODE
- (PROG ((SKREGION (UNSCALE.REGION LOCALREGION SCALE)))
- (RETURN (for SCRELT in LOCALITEMS when (SK.INSIDE.REGION
- (fetch (SCREENELT GLOBALPART) of SCRELT) SKREGION) collect SCRELT))))
+ [LAMBDA (HOTSPOTCACHE LEFT BOTTOM RIGHT TOP) (* rrb "31-Jan-85 11:38")
+
+ (* * returns a list of the LOCALITEMS that are within LOCALREGION)
+
+ (* changed to take a hotspot cache instead of a list of local items.
+ OLD ARGS were (HOTSPOTCACHE LOCALREGION SCALE) OLD CODE
+ (PROG ((SKREGION (UNSCALE.REGION LOCALREGION SCALE)))
+ (RETURN (for SCRELT in LOCALITEMS when (SK.INSIDE.REGION
+ (fetch (SCREENELT GLOBALPART) of SCRELT) SKREGION) collect SCRELT))))
(PROG ((RLEFT (DIFFERENCE LEFT SK.POINT.WIDTH))
(RBOTTOM (DIFFERENCE BOTTOM SK.POINT.WIDTH))
@@ -6133,48 +6076,48 @@ This will be slow for arcs and curves."]
(RETURN ELTS])
(SK.REGIONFN
- [LAMBDA (ELEMENTTYPE) (* rrb " 5-Sep-84 16:06")
-
- (* * access fn for getting the function that returns the region of an item from
- its type.)
+ [LAMBDA (ELEMENTTYPE) (* rrb " 5-Sep-84 16:06")
+
+ (* * access fn for getting the function that returns the region of an item from
+ its type.)
(fetch (SKETCHTYPE REGIONFN) of (GETPROP ELEMENTTYPE 'SKETCHTYPE])
(SK.GLOBAL.REGIONFN
- [LAMBDA (ELEMENTTYPE) (* rrb "18-Oct-85 10:30")
-
- (* * access fn for getting the function that returns the global region of a
- global sketch element from its type.)
+ [LAMBDA (ELEMENTTYPE) (* rrb "18-Oct-85 10:30")
+
+ (* * access fn for getting the function that returns the global region of a
+ global sketch element from its type.)
(fetch (SKETCHTYPE GLOBALREGIONFN) of (GETPROP ELEMENTTYPE 'SKETCHTYPE])
(SK.REMOVE.SELECTION
- [LAMBDA (ITEM/POS WINDOW MARKBM) (* rrb " 9-May-85 10:31")
+ [LAMBDA (ITEM/POS WINDOW MARKBM) (* rrb " 9-May-85 10:31")
(* removes an item from the selection
list of WINDOW.)
(COND
((MEMBER ITEM/POS (WINDOWPROP WINDOW 'SKETCH.SELECTIONS))
-
- (* must remove element from window selections before turning off its selection
- because the display of the selection check to see if the points are still
- selected in another element.)
+
+ (* must remove element from window selections before turning off its selection
+ because the display of the selection check to see if the points are still
+ selected in another element.)
(WINDOWDELPROP WINDOW 'SKETCH.SELECTIONS ITEM/POS)
(SK.DESELECT.ELT ITEM/POS WINDOW MARKBM])
(SK.SELECT.MULTIPLE.ITEMS
- [LAMBDA (WINDOW ITEMFLG SELITEMS OPERATION) (* rrb "10-Dec-85 17:34")
-
- (* * selects allows the user to select a group of the sketch elements from the
- sketch WINDOW. If ITEMFLG is NIL, the user is allows to select control points
- as well as complete items and the returned value may be the position of a
- control point. If SELITEMS is given it is used as the items to be marked and
- selected from. Keeps control and probably shouldn't)
-
- (* the selection protocol is left to add, right to delete.
- Multiple clicking in the same place upscales for both select and deselect.
- Sweeping will select or deselect all of the items in the swept out area.
- Also it keeps control as long as a shift key is down.)
+ [LAMBDA (WINDOW ITEMFLG SELITEMS OPERATION) (* rrb "10-Dec-85 17:34")
+
+ (* * selects allows the user to select a group of the sketch elements from the
+ sketch WINDOW. If ITEMFLG is NIL, the user is allows to select control points as
+ well as complete items and the returned value may be the position of a control
+ point. If SELITEMS is given it is used as the items to be marked and selected
+ from. Keeps control and probably shouldn't)
+
+ (* the selection protocol is left to add, right to delete.
+ Multiple clicking in the same place upscales for both select and deselect.
+ Sweeping will select or deselect all of the items in the swept out area.
+ Also it keeps control as long as a shift key is down.)
(PROG ((INTERIOR (DSPCLIPPINGREGION NIL WINDOW))
SELECTABLEITEMS HOTSPOTCACHE TIMER NOW OLDX ORIGX NEWX NEWY OLDY ORIGY OUTOFFIRSTPICK
@@ -6195,45 +6138,42 @@ This will be slow for arcs and curves."]
((INSIDEP INTERIOR (LASTMOUSEX WINDOW)
(LASTMOUSEY WINDOW))
(SETQ MOUSEINSIDE? T))
- (T
-
- (* first press was outside of the window, don't select anything.)
-
+ (T (* first press was outside of the
+ window, don't select anything.)
(SK.TAKE.MARKS.DOWN WINDOW HOTSPOTCACHE)
(RETURN)))
SELECTLP
(COND
((MOUSESTATE UP)
(GO SELECTEXIT)))
-
- (* this label provides an entry for the code that tests if the shift key is
- down.)
+
+ (* this label provides an entry for the code that tests if the shift key is down.)
SELAFTERTEST
(SETQ NEWY (LASTMOUSEY WINDOW))
(SETQ NEWX (LASTMOUSEX WINDOW))
[COND
[(NOT MOUSEINSIDE?)
-
- (* mouse is outside, don't do anything other than wait for it to come back in.
- If the user has let up all buttons, the branch to SELECTEXIT will have been
- taken.)
+
+ (* mouse is outside, don't do anything other than wait for it to come back in.
+ If the user has let up all buttons, the branch to SELECTEXIT will have been
+ taken.)
(COND
((INSIDEP INTERIOR NEWX NEWY)
(SETQ MOUSEINSIDE? T) (* restore the saved selected items.)
(for ELT in SELITEMS do (SK.ADD.SELECTION ELT WINDOW]
((NOT (INSIDEP INTERIOR NEWX NEWY))
-
- (* mouse just went outside, remove selections but save them in case mouse comes
- back in.)
+
+ (* mouse just went outside, remove selections but save them in case mouse comes
+ back in.)
(SETQ MOUSEINSIDE? NIL)
(SETQ SELITEMS (WINDOWPROP WINDOW 'SKETCH.SELECTIONS))
(for ELT in SELITEMS do (SK.REMOVE.SELECTION ELT WINDOW)))
[(NEQ PREVMOUSEBUTTONS LASTMOUSEBUTTONS)
-
- (* another button has gone down, mark this as the origin of a new box to sweep.)
+
+ (* another button has gone down, mark this as the origin of a new box to sweep.)
(SETQ PREVMOUSEBUTTONS LASTMOUSEBUTTONS)
(SETQ ORIGX (LASTMOUSEX WINDOW))
@@ -6242,13 +6182,11 @@ This will be slow for arcs and curves."]
((NULL ITEMFLG) (* clear any selections that are of
single points.)
(for SEL in (WINDOWPROP WINDOW 'SKETCH.SELECTIONS) when (POSITIONP SEL)
- do (SK.REMOVE.SELECTION SEL WINDOW]
-
- (* add or delete the element that the button press occurred on if any.)
-
+ do (SK.REMOVE.SELECTION SEL WINDOW] (* add or delete the element that the
+ button press occurred on if any.)
(AND [SETQ NOW (IN.SKETCH.ELT? HOTSPOTCACHE (create POSITION
- XCOORD _ NEWX
- YCOORD _ NEWY)
+ XCOORD ↠NEWX
+ YCOORD ↠NEWY)
(AND (NULL ITEMFLG)
(LASTMOUSESTATE (ONLY LEFT))
(NULL (WINDOWPROP WINDOW 'SKETCH.SELECTIONS]
@@ -6263,25 +6201,21 @@ This will be slow for arcs and curves."]
((OR (IGREATERP (IABS (IDIFFERENCE ORIGX NEWX))
SK.NO.MOVE.DISTANCE)
(IGREATERP (IABS (IDIFFERENCE ORIGY NEWY))
- SK.NO.MOVE.DISTANCE))
-
- (* make the first pick move further so that it is easier to multiple click.)
-
- (SETQ OUTOFFIRSTPICK T)))
-
- (* cursor has moved more than the minimum amount since last noticed.)
-
- (* add or delete any with in the swept out area.)
-
+ SK.NO.MOVE.DISTANCE)) (* make the first pick move further so
+ that it is easier to multiple click.)
+ (SETQ OUTOFFIRSTPICK T))) (* cursor has moved more than the
+ minimum amount since last noticed.)
+ (* add or delete any with in the swept
+ out area.)
(COND
([AND (LASTMOUSESTATE (NOT UP))
(SETQ SELITEMS (SK.LOCAL.ITEMS.IN.REGION HOTSPOTCACHE (MIN ORIGX NEWX)
(MIN ORIGY NEWY)
(MAX ORIGX NEWX)
(MAX ORIGY NEWY]
-
- (* if selecting multiple things, it must be whole items.
- Update NOW to be an item if it isn't already.)
+
+ (* if selecting multiple things, it must be whole items.
+ Update NOW to be an item if it isn't already.)
[COND
((POSITIONP NOW)
@@ -6317,9 +6251,9 @@ This will be slow for arcs and curves."]
(SK.ADD.SELECTION (SETQ NOW (IN.SKETCH.ELT? HOTSPOTCACHE NOW))
WINDOW))
((SCREENELEMENTP NOW)
-
- (* thing now selected is an item, select all selectable items keeping the first
- one selected on the front.)
+
+ (* thing now selected is an item, select all selectable items keeping the first
+ one selected on the front.)
(for SELITEM in (SETQ NOW (CONS NOW (REMOVE NOW SELECTABLEITEMS)))
do (SK.ADD.SELECTION SELITEM WINDOW]
@@ -6327,23 +6261,19 @@ This will be slow for arcs and curves."]
(GO CLICKLP)))
SHIFTDOWNLP
(COND
- ((MOUSESTATE (NOT UP))
-
- (* button went down again, initialize the button state and click position.)
-
+ ((MOUSESTATE (NOT UP)) (* button went down again, initialize
+ the button state and click position.)
(SETQ PREVMOUSEBUTTONS NIL)
(SETQ OUTOFFIRSTPICK NIL)
(GO SELAFTERTEST))
((.SHIFTKEYDOWNP.)
-
- (* flip selection marks because if cursor is outside when shift key is let up,
- nothing is selected.)
+
+ (* flip selection marks because if cursor is outside when shift key is let up,
+ nothing is selected.)
[COND
- [(NOT MOUSEINSIDE?)
-
- (* mouse is outside%: if it comes back in, mark the selections.)
-
+ [(NOT MOUSEINSIDE?) (* mouse is outside%: if it comes back
+ in, mark the selections.)
(COND
((INSIDEP INTERIOR (LASTMOUSEX WINDOW)
(LASTMOUSEY WINDOW))
@@ -6358,24 +6288,19 @@ This will be slow for arcs and curves."]
(GO SHIFTDOWNLP)))
(SETQ SELITEMS (WINDOWPROP WINDOW 'SKETCH.SELECTIONS))
(COND
- (MOUSEINSIDE?
-
- (* unmark and remove the selected items from the window property list.)
-
+ (MOUSEINSIDE? (* unmark and remove the selected
+ items from the window property list.)
(for SEL in SELITEMS do (SK.REMOVE.SELECTION SEL WINDOW)))
- (T
-
- (* they have already been unmarked, just remove them from the window.)
-
+ (T (* they have already been unmarked,
+ just remove them from the window.)
(WINDOWPROP WINDOW 'SKETCH.SELECTIONS NIL)))
(SK.TAKE.MARKS.DOWN WINDOW HOTSPOTCACHE)
(RETURN SELITEMS])
(SKETCH.GET.ELEMENTS
- [LAMBDA (VIEWER SINGLEELEMENTFLG WHICHONES) (* rrb "17-Dec-85 15:35")
-
- (* hilites the selection points and lets the user select one or more.)
-
+ [LAMBDA (VIEWER SINGLEELEMENTFLG WHICHONES) (* rrb "17-Dec-85 15:35")
+ (* hilites the selection points and
+ lets the user select one or more.)
(PROG [[SELECTABLEITEMS (COND
((LISTP WHICHONES)
(for ELT in WHICHONES collect (COND
@@ -6395,53 +6320,49 @@ This will be slow for arcs and curves."]
collect (fetch (SCREENELT GLOBALPART) of SCRELT])
(SK.PUT.MARKS.UP
- [LAMBDA (SKETCHW HOTSPOTCACHE) (* rrb "29-Jan-85 17:40")
-
- (* makes sure the selection points are up in a window.)
-
+ [LAMBDA (SKETCHW HOTSPOTCACHE) (* rrb "29-Jan-85 17:40")
+ (* makes sure the selection points are
+ up in a window.)
(COND
((NULL (WINDOWPROP SKETCHW 'MARKS.UP))
(SK.SHOWMARKS SKETCHW HOTSPOTCACHE)
(WINDOWPROP SKETCHW 'MARKS.UP T])
(SK.TAKE.MARKS.DOWN
- [LAMBDA (SKETCHW HOTSPOTCACHE) (* rrb "29-Jan-85 17:41")
-
- (* makes sure the selection points are down in a window.)
-
+ [LAMBDA (SKETCHW HOTSPOTCACHE) (* rrb "29-Jan-85 17:41")
+ (* makes sure the selection points are
+ down in a window.)
(COND
((WINDOWPROP SKETCHW 'MARKS.UP)
(SK.SHOWMARKS SKETCHW HOTSPOTCACHE)
(WINDOWPROP SKETCHW 'MARKS.UP NIL])
(SK.TRANSLATE.GLOBALPART
- [LAMBDA (GLOBALELT DELTAPOS RETURNELTIFCANTFLG) (* rrb "19-May-86 14:52")
-
- (* GLOBALELT is a sketch element that was selected for a translate operation.
- DELTAPOS is the amount the item is to be translated.)
+ [LAMBDA (GLOBALELT DELTAPOS RETURNELTIFCANTFLG) (* rrb "19-May-86 14:52")
+
+ (* GLOBALELT is a sketch element that was selected for a translate operation.
+ DELTAPOS is the amount the item is to be translated.)
(PROG ((TRANSLATEFN (SK.TRANSLATEFN (fetch (GLOBALPART GTYPE) of GLOBALELT)))
NEWGLOBAL OLDGLOBAL ACTIVEREGION)
(RETURN (COND
((OR (NULL TRANSLATEFN)
- (EQ TRANSLATEFN 'NILL))
-
- (* if can't translate, return the same thing.
- This is probably an error condition.)
-
+ (EQ TRANSLATEFN 'NILL)) (* if can't translate, return the same
+ thing. This is probably an error
+ condition.)
GLOBALELT)
((SETQ NEWGLOBAL (APPLY* TRANSLATEFN GLOBALELT DELTAPOS))
-
- (* copy the property list so that undoing works and because this code is used
- to make copies too.)
+
+ (* copy the property list so that undoing works and because this code is used to
+ make copies too.)
(SK.COPY.ELEMENT.PROPERTY.LIST NEWGLOBAL)
[COND
([AND (SETQ ACTIVEREGION (GETSKETCHELEMENTPROP NEWGLOBAL 'ACTIVEREGION))
(EQUAL ACTIVEREGION (GETSKETCHELEMENTPROP GLOBALELT 'ACTIVEREGION]
-
- (* update the ACTIVEREGION if the element has one and it is the same in the new
- element.)
+
+ (* update the ACTIVEREGION if the element has one and it is the same in the new
+ element.)
(PUTSKETCHELEMENTPROP NEWGLOBAL 'ACTIVEREGION (REL.MOVE.REGION
ACTIVEREGION
@@ -6450,17 +6371,15 @@ This will be slow for arcs and curves."]
(fetch (POSITION YCOORD)
of DELTAPOS]
NEWGLOBAL)
- (RETURNELTIFCANTFLG
-
- (* in the case of translating a whole sketch, need to return something.)
-
+ (RETURNELTIFCANTFLG (* in the case of translating a whole
+ sketch, need to return something.)
GLOBALELT])
(SK.TRANSLATE.ITEM
- [LAMBDA (SELELT GLOBALDELTAPOS W) (* rrb "21-Jan-85 18:35")
-
- (* SELELT is a sketch element that was selected for a translate operation.
- GLOBALDELTAPOS is the amount the item is to be translated.)
+ [LAMBDA (SELELT GLOBALDELTAPOS W) (* rrb "21-Jan-85 18:35")
+
+ (* SELELT is a sketch element that was selected for a translate operation.
+ GLOBALDELTAPOS is the amount the item is to be translated.)
(PROG (NEWGLOBAL OLDGLOBAL)
(COND
@@ -6473,19 +6392,19 @@ This will be slow for arcs and curves."]
(RETURN NEWGLOBAL])
(SK.TRANSLATEFN
- [LAMBDA (ELEMENTTYPE) (* rrb " 4-Sep-84 17:01")
+ [LAMBDA (ELEMENTTYPE) (* rrb " 4-Sep-84 17:01")
(fetch (SKETCHTYPE TRANSLATEFN) of (GETPROP ELEMENTTYPE 'SKETCHTYPE])
(TRANSLATE.SKETCH
- [LAMBDA (SKETCH NEWXORG NEWYORG) (* rrb " 9-Jul-85 12:36")
-
- (* * translates all the elements in a sketch to make the new {0, 0} be NEWXORG
- NEWYORG)
+ [LAMBDA (SKETCH NEWXORG NEWYORG) (* rrb " 9-Jul-85 12:36")
+
+ (* * translates all the elements in a sketch to make the new {0, 0} be NEWXORG
+ NEWYORG)
(PROG [(DELTAPOS (create POSITION
- XCOORD _ (MINUS NEWXORG)
- YCOORD _ (MINUS NEWYORG]
- (RETURN (create SKETCH using SKETCH SKETCHELTS _ (for GELT in (fetch (SKETCH SKETCHELTS)
+ XCOORD ↠(MINUS NEWXORG)
+ YCOORD ↠(MINUS NEWYORG]
+ (RETURN (create SKETCH using SKETCH SKETCHELTS ↠(for GELT in (fetch (SKETCH SKETCHELTS)
of SKETCH)
collect (SK.TRANSLATE.GLOBALPART GELT
DELTAPOS T])
@@ -6511,7 +6430,7 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SK.INPUT.SCALE
- [LAMBDA (SKW) (* rrb " 4-Sep-85 15:35")
+ [LAMBDA (SKW) (* rrb " 4-Sep-85 15:35")
(* returns the scale that input should
be)
(PROG [(SK (WINDOWPROP SKW 'SKETCHCONTEXT]
@@ -6521,19 +6440,16 @@ This will be slow for arcs and curves."]
(RETURN NIL)))
(RETURN (COND
((fetch (SKETCHCONTEXT SKETCHINPUTSCALE) of SK))
- (T
-
- (* early form of sketch that doesn't have an input scale.)
-
+ (T (* early form of sketch that doesn't
+ have an input scale.)
(SK.UPDATE.SKETCHCONTEXT SK)
(replace (SKETCHCONTEXT SKETCHINPUTSCALE) of SK with 1.0)
1.0])
(SK.UPDATE.SKETCHCONTEXT
- [LAMBDA (SKETCHCONTEXT) (* rrb " 4-Sep-85 14:55")
-
- (* updates an instance of a sketch context to have enough fields.)
-
+ [LAMBDA (SKETCHCONTEXT) (* rrb " 4-Sep-85 14:55")
+ (* updates an instance of a sketch
+ context to have enough fields.)
(PROG ((NEWSK (CREATE.DEFAULT.SKETCH.CONTEXT)))
[COND
((GREATERP (DIFFERENCE (LENGTH NEWSK)
@@ -6543,7 +6459,7 @@ This will be slow for arcs and curves."]
(RETURN SKETCHCONTEXT])
(SK.SET.INPUT.SCALE
- [LAMBDA (W) (* rrb "19-Aug-86 11:52")
+ [LAMBDA (W) (* rrb "19-Aug-86 11:52")
(* sets the size of the
(input scale))
(SK.SET.INPUT.SCALE.VALUE (RNUMBER (CONCAT "Input scale is now " (SK.INPUT.SCALE W)
@@ -6554,15 +6470,14 @@ This will be slow for arcs and curves."]
W])
(SK.SET.INPUT.SCALE.CURRENT
- [LAMBDA (W) (* rrb "11-Jul-86 15:51")
-
- (* sets the size of the input scale to the scale of the current window.)
-
+ [LAMBDA (W) (* rrb "11-Jul-86 15:51")
+ (* sets the size of the input scale to
+ the scale of the current window.)
(SK.SET.INPUT.SCALE.VALUE (VIEWER.SCALE W)
W])
(SK.SET.INPUT.SCALE.VALUE
- [LAMBDA (NEWINPUTSCALE SKW) (* rrb "14-May-86 19:29")
+ [LAMBDA (NEWINPUTSCALE SKW) (* rrb "14-May-86 19:29")
(* sets the input scale to
NEWINPUTSCALE)
(AND (NUMBERP NEWINPUTSCALE)
@@ -6578,14 +6493,14 @@ This will be slow for arcs and curves."]
(DEFINEQ
(SK.SET.FEEDBACK.MODE
- [LAMBDA (VALUE) (* rrb "19-Nov-85 13:25")
-
- (* sets the control on how much feedback to give the user as they are entering
- new figure elements.)
+ [LAMBDA (VALUE) (* rrb "19-Nov-85 13:25")
+
+ (* sets the control on how much feedback to give the user as they are entering
+ new figure elements.)
[OR (MEMB VALUE '(POINTS T ALWAYS))
(SETQ VALUE (\CURSOR.IN.MIDDLE.MENU (create MENU
- ITEMS _ '(("Points only" 'POINTS
+ ITEMS ↠'(("Points only" 'POINTS
"Only the control points will be shown when entering elements."
)
("Fast figures" T
@@ -6594,7 +6509,7 @@ This will be slow for arcs and curves."]
("All figures" 'ALWAYS
"Most elements are shown while they are being entered.
This will be slow for arcs and curves."))
- CENTERFLG _ T]
+ CENTERFLG ↠T]
(AND VALUE (SETQ SKETCH.VERBOSE.FEEDBACK (SELECTQ VALUE
(POINTS NIL)
VALUE])
@@ -6604,10 +6519,8 @@ This will be slow for arcs and curves."))
(SK.SET.FEEDBACK.MODE 'POINTS])
(SK.SET.FEEDBACK.VERBOSE
- [LAMBDA NIL
-
- (* sets the feedback to provide images on elements that are fast.)
-
+ [LAMBDA NIL (* sets the feedback to provide images
+ on elements that are fast.)
(SK.SET.FEEDBACK.MODE T])
(SK.SET.FEEDBACK.ALWAYS
@@ -6635,8 +6548,34 @@ This will be slow for arcs and curves."))
(fetch (SKETCH SKETCHNAME) of (INSURE.SKETCH SKW])
(SK.SHRINK.ICONCREATE
-(LAMBDA (W OLD-ICON POSITION) (* ; "Edited 25-Apr-88 15:44 by drc:") (* ;;; "Create the icon that represents this window.") (LET ((ICONTITLE (WINDOWPROP W (QUOTE SKETCH.ICON.TITLE))) (TITLE (SKETCH.TITLE W)) (ICON (OR OLD-ICON (WINDOWPROP W (QUOTE ICON))))) (COND (ICON (CL:UNLESS (OR (EQUAL ICONTITLE TITLE) (NOT ICONTITLE)) (* ;; "if we built this and the title is the same, or he has already put an icon on this, then we don't need to update it.") (SETQ ICONTITLE (OR TITLE "")) (WINDOWPROP W (QUOTE SKETCH.ICON.TITLE) ICONTITLE) (ICONTITLE ICONTITLE NIL NIL ICON)) ICON) (T (* ;; "make a new icon. Give it a title of '' so it can be distinguished from an ICON that the user supplied without an ICONTITLE.") (SETQ ICONTITLE (OR TITLE "")) (WINDOWPROP W (QUOTE SKETCH.ICON.TITLE) ICONTITLE) (TITLEDICONW SKETCH.TITLED.ICON.TEMPLATE ICONTITLE (COND ((NEQ TEDIT.ICON.FONT (QUOTE NOBIND)) TEDIT.ICON.FONT) (T (DEFAULTFONT (QUOTE DISPLAY)))) POSITION T NIL (QUOTE FILE))))))
-)
+ [LAMBDA (W OLD-ICON POSITION) (* ; "Edited 25-Apr-88 15:44 by drc:")
+
+(* ;;; "Create the icon that represents this window.")
+
+ (LET [(ICONTITLE (WINDOWPROP W 'SKETCH.ICON.TITLE))
+ (TITLE (SKETCH.TITLE W))
+ (ICON (OR OLD-ICON (WINDOWPROP W 'ICON]
+ (COND
+ (ICON (CL:UNLESS (OR (EQUAL ICONTITLE TITLE)
+ (NOT ICONTITLE))
+
+ (* ;; "if we built this and the title is the same, or he has already put an icon on this, then we don't need to update it.")
+
+ (SETQ ICONTITLE (OR TITLE ""))
+ (WINDOWPROP W 'SKETCH.ICON.TITLE ICONTITLE)
+ (ICONTITLE ICONTITLE NIL NIL ICON))
+ ICON)
+ (T
+ (* ;; "make a new icon. Give it a title of '' so it can be distinguished from an ICON that the user supplied without an ICONTITLE.")
+
+ (SETQ ICONTITLE (OR TITLE ""))
+ (WINDOWPROP W 'SKETCH.ICON.TITLE ICONTITLE)
+ (TITLEDICONW SKETCH.TITLED.ICON.TEMPLATE ICONTITLE [COND
+ ((NEQ TEDIT.ICON.FONT
+ 'NOBIND)
+ TEDIT.ICON.FONT)
+ (T (DEFAULTFONT 'DISPLAY]
+ POSITION T NIL 'FILE])
)
(READVARS-FROM-STRINGS '(SKETCH.TITLED.ICON.TEMPLATE)
@@ -6840,15 +6779,15 @@ This will be slow for arcs and curves."))
(DEFINEQ
(READBRUSHSHAPE
- [LAMBDA NIL (* rrb " 6-Nov-85 09:57")
+ [LAMBDA NIL (* rrb " 6-Nov-85 09:57")
(* reads a brush shape from the user.)
(\CURSOR.IN.MIDDLE.MENU (create MENU
- CENTERFLG _ T
- TITLE _ "pick a shape"
- ITEMS _ '(ROUND SQUARE VERTICAL HORIZONTAL DIAGONAL])
+ CENTERFLG ↠T
+ TITLE ↠"pick a shape"
+ ITEMS ↠'(ROUND SQUARE VERTICAL HORIZONTAL DIAGONAL])
(READ.FUNCTION
- [LAMBDA (PRMPT W) (* rrb "11-May-84 15:41")
+ [LAMBDA (PRMPT W) (* rrb "11-May-84 15:41")
(PROG ((PROMPTWIN (GETPROMPTWINDOW W 3))
OLDTTYDS LST)
(SETQ OLDTTYDS (TTYDISPLAYSTREAM PROMPTWIN))
@@ -6861,7 +6800,7 @@ This will be slow for arcs and curves."))
(RETURN (CAR LST])
(READBRUSHSIZE
- [LAMBDA (NOWSIZE) (* rrb "19-May-86 15:44")
+ [LAMBDA (NOWSIZE) (* rrb "19-May-86 15:44")
(PROG ((N (RNUMBER (COND
(NOWSIZE (CONCAT "Current size is " NOWSIZE ". Enter new brush size."))
(T "Enter new brush size."))
@@ -6872,7 +6811,7 @@ This will be slow for arcs and curves."))
(N (ABS N])
(READANGLE
- [LAMBDA NIL (* rrb "14-May-86 19:29")
+ [LAMBDA NIL (* rrb "14-May-86 19:29")
(* interacts to get an angle from the
user.)
(PROG ((NEWVALUE (RNUMBER "Enter arc angle in degrees." NIL NIL NIL T NIL T)))
@@ -6882,38 +6821,37 @@ This will be slow for arcs and curves."))
(T NEWVALUE])
(READARCDIRECTION
- [LAMBDA (MENUTITLE) (* rrb " 6-Nov-85 09:53")
-
- (* interacts to get whether an arc should go clockwise or counterclockwise)
-
+ [LAMBDA (MENUTITLE) (* rrb " 6-Nov-85 09:53")
+ (* interacts to get whether an arc
+ should go clockwise or
+ counterclockwise)
(\CURSOR.IN.MIDDLE.MENU (create MENU
- TITLE _ (OR MENUTITLE "Which way should the arc go?")
- ITEMS _ '(("Clockwise" 'CLOCKWISE
+ TITLE ↠(OR MENUTITLE "Which way should the arc go?")
+ ITEMS ↠'(("Clockwise" 'CLOCKWISE
"The arc will be drawn clockwise from the first point to the second point."
)
("Counterclockwise" 'COUNTERCLOCKWISE
"The arc will be drawn counterclockwise from the first point to the second point."
))
- CENTERFLG _ T])
+ CENTERFLG ↠T])
)
(DEFINEQ
(SK.CHANGE.DASHING
- [LAMBDA (ELTWITHLINE DASHING SKW) (* rrb " 9-Jan-86 16:58")
-
- (* changes the line dashing of ELTWITHLINE if it has one)
-
- (* knows about the various types of sketch elements and shouldn't.)
-
+ [LAMBDA (ELTWITHLINE DASHING SKW) (* rrb " 9-Jan-86 16:58")
+ (* changes the line dashing of
+ ELTWITHLINE if it has one)
+ (* knows about the various types of
+ sketch elements and shouldn't.)
(PROG (SIZE GLINELT TYPE NEWDASHING NOWDASHING NEWELT)
(COND
((MEMB (SETQ TYPE (fetch (GLOBALPART GTYPE) of ELTWITHLINE))
'(WIRE BOX CLOSEDWIRE CLOSEDCURVE OPENCURVE CIRCLE ELLIPSE TEXTBOX ARC))
(* only works for things of wire type.)
(SETQ GLINELT (fetch (GLOBALPART INDIVIDUALGLOBALPART) of ELTWITHLINE))
-
- (* the dashing may be stored in different places for the element types.)
-
+ (* the dashing may be stored in
+ different places for the element
+ types.)
[SETQ NEWDASHING (COND
((EQ DASHING 'NONE) (* no dashing is marked with NIL)
NIL)
@@ -6931,39 +6869,37 @@ This will be slow for arcs and curves."))
(ELLIPSE (fetch (ELLIPSE DASHING) of GLINELT))
(SHOULDNT)))
(COND
- ((EQUAL NEWDASHING NOWDASHING)
-
- (* if dashing isn't changing, don't bother creating a new one and repainting.)
-
+ ((EQUAL NEWDASHING NOWDASHING) (* if dashing isn't changing, don't
+ bother creating a new one and
+ repainting.)
(RETURN)))
(SETQ NEWELT (SELECTQ TYPE
- (WIRE (create WIRE using GLINELT OPENWIREDASHING _ NEWDASHING))
- (BOX (create BOX using GLINELT BOXDASHING _ NEWDASHING))
- (ARC (create ARC using GLINELT ARCDASHING _ NEWDASHING))
- (TEXTBOX (create TEXTBOX using GLINELT TEXTBOXDASHING _ NEWDASHING))
- (CLOSEDWIRE (create CLOSEDWIRE using GLINELT CLOSEDWIREDASHING _
+ (WIRE (create WIRE using GLINELT OPENWIREDASHING ↠NEWDASHING))
+ (BOX (create BOX using GLINELT BOXDASHING ↠NEWDASHING))
+ (ARC (create ARC using GLINELT ARCDASHING ↠NEWDASHING))
+ (TEXTBOX (create TEXTBOX using GLINELT TEXTBOXDASHING ↠NEWDASHING))
+ (CLOSEDWIRE (create CLOSEDWIRE using GLINELT CLOSEDWIREDASHING â†
NEWDASHING))
- (CLOSEDCURVE (create CLOSEDCURVE using GLINELT DASHING _ NEWDASHING))
- (OPENCURVE (create OPENCURVE using GLINELT DASHING _ NEWDASHING))
- (CIRCLE (create CIRCLE using GLINELT DASHING _ NEWDASHING))
- (ELLIPSE (create ELLIPSE using GLINELT DASHING _ NEWDASHING))
+ (CLOSEDCURVE (create CLOSEDCURVE using GLINELT DASHING ↠NEWDASHING))
+ (OPENCURVE (create OPENCURVE using GLINELT DASHING ↠NEWDASHING))
+ (CIRCLE (create CIRCLE using GLINELT DASHING ↠NEWDASHING))
+ (ELLIPSE (create ELLIPSE using GLINELT DASHING ↠NEWDASHING))
(SHOULDNT)))
(RETURN (create SKHISTORYCHANGESPEC
- NEWELT _ (create GLOBALPART
- COMMONGLOBALPART _ (fetch (GLOBALPART COMMONGLOBALPART)
+ NEWELT ↠(create GLOBALPART
+ COMMONGLOBALPART ↠(fetch (GLOBALPART COMMONGLOBALPART)
of ELTWITHLINE)
- INDIVIDUALGLOBALPART _ NEWELT)
- OLDELT _ ELTWITHLINE
- PROPERTY _ 'DASHING
- NEWVALUE _ NEWDASHING
- OLDVALUE _ NOWDASHING])
+ INDIVIDUALGLOBALPART ↠NEWELT)
+ OLDELT ↠ELTWITHLINE
+ PROPERTY ↠'DASHING
+ NEWVALUE ↠NEWDASHING
+ OLDVALUE ↠NOWDASHING])
(READ.AND.SAVE.NEW.DASHING
- [LAMBDA NIL (* rrb " 6-Nov-85 09:57")
-
- (* reads a new dashing, confirms it with the user and adds it to
- SK.DASHING.PATTERNS)
-
+ [LAMBDA NIL (* rrb " 6-Nov-85 09:57")
+ (* reads a new dashing, confirms it
+ with the user and adds it to
+ SK.DASHING.PATTERNS)
(PROG (DASHING BM)
LP (COND
((NULL (SETQ DASHING (READ.NEW.DASHING))) (* user aborted)
@@ -6971,15 +6907,15 @@ This will be slow for arcs and curves."))
(SETQ BM (SK.DASHING.LABEL DASHING))
CONFIRM
(SELECTQ (\CURSOR.IN.MIDDLE.MENU (create MENU
- ITEMS _ (LIST (LIST BM T
+ ITEMS ↠(LIST (LIST BM T
"Will use this as the dashing pattern."
)
'(Yes T "Will accept this pattern.")
'(No 'NO
"Will ask you for another dashing pattern."
))
- CENTERFLG _ T
- TITLE _ "Is this pattern OK?"))
+ CENTERFLG ↠T
+ TITLE ↠"Is this pattern OK?"))
(NO (GO LP))
(T (* add dashing to global list and
return it.)
@@ -6991,15 +6927,15 @@ This will be slow for arcs and curves."))
(GO CONFIRM])
(READ.NEW.DASHING
- [LAMBDA NIL (* rrb "14-May-86 19:30")
+ [LAMBDA NIL (* rrb "14-May-86 19:30")
(* reads a value of dashing from the
user.)
(PROMPTPRINT "You will be prompted for a series of numbers which specify the number of points ON and OFF.
Enter 0 to end the dashing pattern.
Enter 'Abort' to leave the dashing unchanged.")
- (bind VAL DASHLST OFF? (ORIGPOS _ (create POSITION
- XCOORD _ LASTMOUSEX
- YCOORD _ LASTMOUSEY))
+ (bind VAL DASHLST OFF? (ORIGPOS ↠(create POSITION
+ XCOORD ↠LASTMOUSEX
+ YCOORD ↠LASTMOUSEY))
until (OR (EQ (SETQ VAL (RNUMBER (CONCAT "Enter the number of points " (COND
(OFF? 'OFF)
(T 'ON))
@@ -7017,16 +6953,16 @@ Enter 'Abort' to leave the dashing unchanged.")
(READ.DASHING.CHANGE
[LAMBDA NIL
- (DECLARE (GLOBALVARS SK.DASHING.PATTERNS)) (* rrb " 6-Nov-85 09:57")
-
- (* gets a description of how to change the arrow heads of a wire or curve.)
+ (DECLARE (GLOBALVARS SK.DASHING.PATTERNS)) (* rrb " 6-Nov-85 09:57")
+
+ (* gets a description of how to change the arrow heads of a wire or curve.)
(PROG (DASHING)
(SELECTQ [SETQ DASHING (\CURSOR.IN.MIDDLE.MENU
(create MENU
- CENTERFLG _ T
- TITLE _ "New dashing pattern?"
- ITEMS _ (APPEND (for DASHPAT in SK.DASHING.PATTERNS
+ CENTERFLG ↠T
+ TITLE ↠"New dashing pattern?"
+ ITEMS ↠(APPEND (for DASHPAT in SK.DASHING.PATTERNS
collect (LIST (CAR DASHPAT)
(KWOTE (CADR DASHPAT))
@@ -7040,10 +6976,9 @@ Enter 'Abort' to leave the dashing unchanged.")
(RETURN DASHING])
(SK.CACHE.DASHING
- [LAMBDA (DASHING BITMAP) (* rrb " 3-May-85 14:33")
-
- (* adds a dashing and its bitmap label to the global cache.)
-
+ [LAMBDA (DASHING BITMAP) (* rrb " 3-May-85 14:33")
+ (* adds a dashing and its bitmap label
+ to the global cache.)
(OR (for DASH in SK.DASHING.PATTERNS when (EQUAL (CADR DASH)
DASHING) do (RETURN T))
(COND
@@ -7057,7 +6992,7 @@ Enter 'Abort' to leave the dashing unchanged.")
DASHING])
(SK.DASHING.LABEL
- [LAMBDA (DASHING) (* rrb " 3-May-85 14:32")
+ [LAMBDA (DASHING) (* rrb " 3-May-85 14:32")
(* creates a bitmap label which shows
a dashing pattern.)
(PROG (DS BM)
@@ -7068,38 +7003,37 @@ Enter 'Abort' to leave the dashing unchanged.")
(DEFINEQ
(READ.FILLING.CHANGE
- [LAMBDA NIL (* rrb " 6-Nov-85 09:58")
+ [LAMBDA NIL (* rrb " 6-Nov-85 09:58")
(* reads a shade for the filling
texture.)
(PROG (FILLING)
(SELECTQ (SETQ FILLING (\CURSOR.IN.MIDDLE.MENU
(create MENU
- CENTERFLG _ T
- TITLE _ "New filling?"
- ITEMS _ [APPEND (for FILLPAT in SK.FILLING.PATTERNS
+ CENTERFLG ↠T
+ TITLE ↠"New filling?"
+ ITEMS ↠[APPEND (for FILLPAT in SK.FILLING.PATTERNS
collect (LIST (CAR FILLPAT)
(KWOTE (CADR FILLPAT))
"changes filling to this pattern"
))
- '(("4x4 shade" '|4X4|
+ '(("4x4 shade" '4X4
"Allows creation of a 4 bits by 4 bits shade"
)
- ("16x16 shade" '|16X16|
+ ("16x16 shade" '16X16
"Allows creation of a 16 bits by 16 bits shade"
)
("No filling" 'NONE
"no filling will be used."]
- MENUBORDERSIZE _ 1)))
- (|4X4| (RETURN (READ.AND.SAVE.NEW.FILLING)))
- (|16X16| (RETURN (READ.AND.SAVE.NEW.FILLING T)))
+ MENUBORDERSIZE ↠1)))
+ (4X4 (RETURN (READ.AND.SAVE.NEW.FILLING)))
+ (16X16 (RETURN (READ.AND.SAVE.NEW.FILLING T)))
(RETURN FILLING])
(SK.CACHE.FILLING
- [LAMBDA (FILLING) (* rrb " 8-Jun-85 14:58")
-
- (* adds a dashing and its bitmap label to the global cache.)
-
+ [LAMBDA (FILLING) (* rrb " 8-Jun-85 14:58")
+ (* adds a dashing and its bitmap label
+ to the global cache.)
(OR (for FILL in SK.FILLING.PATTERNS when (EQUAL (CADR FILL)
FILLING) do (RETURN T))
(COND
@@ -7110,11 +7044,10 @@ Enter 'Abort' to leave the dashing unchanged.")
'ADDED])
(READ.AND.SAVE.NEW.FILLING
- [LAMBDA (16X16FLG) (* rrb " 8-Jun-85 14:58")
-
- (* reads a new filling, confirms it with the user and adds it to
- SK.FILLING.PATTERNS)
-
+ [LAMBDA (16X16FLG) (* rrb " 8-Jun-85 14:58")
+ (* reads a new filling, confirms it
+ with the user and adds it to
+ SK.FILLING.PATTERNS)
(PROG (FILLING)
(COND
([NULL (SETQ FILLING (EDITSHADE (COND
@@ -7125,10 +7058,9 @@ Enter 'Abort' to leave the dashing unchanged.")
(RETURN FILLING])
(SK.FILLING.LABEL
- [LAMBDA (FILLING) (* rrb " 8-Jun-85 12:08")
-
- (* creates a bitmap label which fills it with the texture FILLING.)
-
+ [LAMBDA (FILLING) (* rrb " 8-Jun-85 12:08")
+ (* creates a bitmap label which fills
+ it with the texture FILLING.)
(PROG [(BM (BITMAPCREATE (PLUS 8 (STRINGWIDTH "16x16 shade" MENUFONT))
(FONTPROP MENUFONT 'HEIGHT]
(BLTSHADE FILLING BM)
@@ -7160,21 +7092,20 @@ Enter 'Abort' to leave the dashing unchanged.")
(DEFINEQ
(SK.GETGLOBALPOSITION
- [LAMBDA (W CURSOR) (* rrb "20-May-86 10:56")
-
- (* gets a position from the user and returns the global value of it.)
-
+ [LAMBDA (W CURSOR) (* rrb "20-May-86 10:56")
+ (* gets a position from the user and
+ returns the global value of it.)
(SK.MAP.INPUT.PT.TO.GLOBAL (SK.READ.POINT.WITH.FEEDBACK W CURSOR)
W])
(SKETCH.TRACK.ELEMENTS
- [LAMBDA (ELEMENTS VIEWER CONSTRAINTFN HOTSPOT PROMPTMSG CONSTRAINTDATA FEEDBACKFN NOINITIALERASEFLG
- NOFINALPAINTFLG) (* rrb "22-Jul-86 14:41")
-
- (* gets a point from the user by displaying an image of ELEMENTS.
- It calls CONSTRAINTFN everytime the cursor moves to allow user constraints on
- where the image is displayed. All positions and elements are in sketch
- coordinates.)
+ [LAMBDA (ELEMENTS VIEWER CONSTRAINTFN HOTSPOT PROMPTMSG CONSTRAINTDATA FEEDBACKFN NOINITIALERASEFLG
+ NOFINALPAINTFLG) (* rrb "22-Jul-86 14:41")
+
+ (* gets a point from the user by displaying an image of ELEMENTS.
+ It calls CONSTRAINTFN everytime the cursor moves to allow user constraints on
+ where the image is displayed. All positions and elements are in sketch
+ coordinates.)
(PROG (SCRELTS FIGINFO FIRSTHOTSPOT GLOBALHOTSPOT NEWPOS LOWLFT IMAGEPOSX IMAGEPOSY IMAGEBM
DELTAPOS NEWGLOBALS SKETCH GDELTAPOS)
@@ -7218,10 +7149,10 @@ Enter 'Abort' to leave the dashing unchanged.")
(RETURN (AND NEWPOS (PTDIFFERENCE NEWPOS GLOBALHOTSPOT])
(SK.PICKOUT.WHOLE.MOVE.ELEMENTS
- [LAMBDA (MOVEELTLST) (* rrb "13-Dec-85 11:54")
-
- (* returns from a list of sketch elements that are being moved, the ones that
- will be completely moved)
+ [LAMBDA (MOVEELTLST) (* rrb "13-Dec-85 11:54")
+
+ (* returns from a list of sketch elements that are being moved, the ones that
+ will be completely moved)
(COND
((EQ (CAR MOVEELTLST)
@@ -7234,32 +7165,32 @@ Enter 'Abort' to leave the dashing unchanged.")
T) collect (CDR X])
(MAP.SKETCH.ELEMENTS.INTO.VIEWER
- [LAMBDA (ELEMENTS VIEWER) (* rrb "12-Dec-85 12:25")
+ [LAMBDA (ELEMENTS VIEWER) (* rrb "12-Dec-85 12:25")
(* maps a list of elements into a
viewer)
(for SKELT in ELEMENTS collect (SK.LOCAL.FROM.GLOBAL SKELT VIEWER])
(MAP.GLOBAL.POSITION.INTO.VIEWER
- [LAMBDA (GPOS VIEWER) (* rrb "11-Jul-86 15:54")
+ [LAMBDA (GPOS VIEWER) (* rrb "11-Jul-86 15:54")
(* maps a sketch coordinate into a
viewer coordinate.)
(SK.SCALE.POSITION.INTO.VIEWER GPOS (VIEWER.SCALE VIEWER])
(SKETCH.TO.VIEWER.POSITION
- [LAMBDA (POSITION VIEWERSCALE) (* rrb "11-Jul-86 15:54")
-
- (* Transforms a position from sketch coordinates into viewer coordinates.
- VIEWERSCALE can be a scale or a viewer.)
+ [LAMBDA (POSITION VIEWERSCALE) (* rrb "11-Jul-86 15:54")
+
+ (* Transforms a position from sketch coordinates into viewer coordinates.
+ VIEWERSCALE can be a scale or a viewer.)
(SK.SCALE.POSITION.INTO.VIEWER POSITION (SK.INSURE.SCALE VIEWERSCALE])
(SKETCH.TRACK.IMAGE
- [LAMBDA (WINDOW BITMAP OPERATION MSG XOFFSET YOFFSET CONSTRAINTFN CONSTRAINTDATA FEEDBACKFN)
+ [LAMBDA (WINDOW BITMAP OPERATION MSG XOFFSET YOFFSET CONSTRAINTFN CONSTRAINTDATA FEEDBACKFN)
(* rrb "11-Jun-86 13:44")
-
- (* gets a position by tracking with a and calling a user provided constraint
- function. The spec returns is actually (ONGRID? position) so that caller can
- tell whether it was placed on grid or not.)
+
+ (* gets a position by tracking with a and calling a user provided constraint
+ function. The spec returns is actually (ONGRID? position) so that caller can tell
+ whether it was placed on grid or not.)
(PROG (WIDTH HEIGHT)
(SETQ WIDTH (BITMAPWIDTH BITMAP))
@@ -7271,15 +7202,14 @@ Enter 'Abort' to leave the dashing unchanged.")
XOFFSET YOFFSET CONSTRAINTFN CONSTRAINTDATA FEEDBACKFN])
(SK.TRACK.IMAGE1
- [LAMBDA (W BITMAP BUFFER.BITMAP WIDTH HEIGHT OPERATION XOFFSET YOFFSET CONSTRAINTFN CONSTRAINTDATA
- FEEDBACKFN) (* rrb "11-Jun-86 13:59")
-
- (* tracks BITMAP until a button goes down and comes up.
- It calls CONSTRAINTFN to determine the position at which to display the image.
- Returns a point in global space that the image was placed.)
-
- (* there is other code in BIGFONT that is probably better for this.)
+ [LAMBDA (W BITMAP BUFFER.BITMAP WIDTH HEIGHT OPERATION XOFFSET YOFFSET CONSTRAINTFN CONSTRAINTDATA
+ FEEDBACKFN) (* rrb "11-Jun-86 13:59")
+ (* tracks BITMAP until a button goes down and comes up.
+ It calls CONSTRAINTFN to determine the position at which to display the image.
+ Returns a point in global space that the image was placed.)
+ (* there is other code in BIGFONT that
+ is probably better for this.)
(PROG (READPT)
(SETQ READPT (SK.TRACK.BITMAP1 W BITMAP BUFFER.BITMAP WIDTH HEIGHT OPERATION XOFFSET
YOFFSET CONSTRAINTFN CONSTRAINTDATA FEEDBACKFN))
@@ -7293,20 +7223,20 @@ Enter 'Abort' to leave the dashing unchanged.")
(create POSITION])
(MAP.VIEWER.XY.INTO.GLOBAL
- [LAMBDA (X Y VIEWER ONGRID? SCRATCHPT) (* rrb "11-Jul-86 15:52")
-
- (* maps from an x y pair in a window to the corresponding global position.
- ONGRID? is T if the X Y should be interpreted as being on the grid.
- SCRATCHPT is a scratch position that should be clobbered with the result.)
+ [LAMBDA (X Y VIEWER ONGRID? SCRATCHPT) (* rrb "11-Jul-86 15:52")
+
+ (* maps from an x y pair in a window to the corresponding global position.
+ ONGRID? is T if the X Y should be interpreted as being on the grid.
+ SCRATCHPT is a scratch position that should be clobbered with the result.)
(PROG ((SCALE (VIEWER.SCALE VIEWER))
GRID)
[COND
(ONGRID? (SETQ GRID (SK.GRIDFACTOR VIEWER)))
(T
-
- (* map the point onto a grid location that would have the same screen position
- as the given point.)
+
+ (* map the point onto a grid location that would have the same screen position as
+ the given point.)
(SETQ GRID (GREATESTPOWEROF2LT SCALE]
(RETURN (SK.SET.POSITION (NEAREST.ON.GRID (TIMES X SCALE)
@@ -7316,43 +7246,42 @@ Enter 'Abort' to leave the dashing unchanged.")
SCRATCHPT])
(SK.SET.POSITION
- [LAMBDA (X Y POSITION) (* rrb "21-May-86 16:09")
-
- (* sets the x and y coordinate fields of a position.)
-
+ [LAMBDA (X Y POSITION) (* rrb "21-May-86 16:09")
+ (* sets the x and y coordinate fields
+ of a position.)
(replace (POSITION XCOORD) of POSITION with X)
(replace (POSITION YCOORD) of POSITION with Y)
POSITION])
(MAP.VIEWER.PT.INTO.GLOBAL
- [LAMBDA (PT VIEWER ONGRID?) (* rrb "11-Jul-86 15:52")
-
- (* maps from an PT in a window to the corresponding global position.
- ONGRID? is T if the PT should be interpreted as being on the grid.)
+ [LAMBDA (PT VIEWER ONGRID?) (* rrb "11-Jul-86 15:52")
+
+ (* maps from an PT in a window to the corresponding global position.
+ ONGRID? is T if the PT should be interpreted as being on the grid.)
(PROG ((SCALE (VIEWER.SCALE VIEWER))
GRID)
[COND
(ONGRID? (SETQ GRID (SK.GRIDFACTOR VIEWER)))
(T
-
- (* map the point onto a grid location that would have the same screen position
- as the given point.)
+
+ (* map the point onto a grid location that would have the same screen position as
+ the given point.)
(SETQ GRID (GREATESTPOWEROF2LT SCALE]
(RETURN (create POSITION
- XCOORD _ (NEAREST.ON.GRID (TIMES (fetch (POSITION XCOORD) of PT)
+ XCOORD ↠(NEAREST.ON.GRID (TIMES (fetch (POSITION XCOORD) of PT)
SCALE)
GRID)
- YCOORD _ (NEAREST.ON.GRID (TIMES (fetch (POSITION YCOORD) of PT)
+ YCOORD ↠(NEAREST.ON.GRID (TIMES (fetch (POSITION YCOORD) of PT)
SCALE)
GRID])
(VIEWER.TO.SKETCH.POSITION
- [LAMBDA (POSITION VIEWERSCALE) (* rrb "11-Jul-86 15:56")
-
- (* Transforms a position from viewer coordinates into sketch coordinates.
- VIEWERSCALE can be a scale or a viewer.)
+ [LAMBDA (POSITION VIEWERSCALE) (* rrb "11-Jul-86 15:56")
+
+ (* Transforms a position from viewer coordinates into sketch coordinates.
+ VIEWERSCALE can be a scale or a viewer.)
(SK.UNSCALE.POSITION.FROM.VIEWER POSITION (COND
((NUMBERP VIEWERSCALE))
@@ -7361,7 +7290,7 @@ Enter 'Abort' to leave the dashing unchanged.")
(T (\ILLEGAL.ARG VIEWERSCALE])
(SK.INSURE.SCALE
- [LAMBDA (VIEWERSCALE) (* rrb "11-Jul-86 15:52")
+ [LAMBDA (VIEWERSCALE) (* rrb "11-Jul-86 15:52")
(COND
((NUMBERP VIEWERSCALE))
((WINDOWP VIEWERSCALE)
@@ -7369,10 +7298,10 @@ Enter 'Abort' to leave the dashing unchanged.")
(T (\ILLEGAL.ARG VIEWERSCALE])
(SKETCH.TO.VIEWER.REGION
- [LAMBDA (REGION VIEWERSCALE) (* rrb " 6-Jun-86 14:05")
-
- (* Transforms a region from sketch coordinates into viewer coordinates.
- VIEWERSCALE can be a scale or a viewer.)
+ [LAMBDA (REGION VIEWERSCALE) (* rrb " 6-Jun-86 14:05")
+
+ (* Transforms a region from sketch coordinates into viewer coordinates.
+ VIEWERSCALE can be a scale or a viewer.)
(PROG ((SCALE (SK.INSURE.SCALE VIEWERSCALE)))
(RETURN (CREATEREGION (QUOTIENT (fetch (REGION LEFT) of REGION)
@@ -7385,175 +7314,169 @@ Enter 'Abort' to leave the dashing unchanged.")
SCALE])
(VIEWER.TO.SKETCH.REGION
- [LAMBDA (REGION VIEWERSCALE) (* rrb " 6-Jun-86 14:05")
-
- (* Transforms a region from viewer coordinates into sketch coordinates.
- VIEWERSCALE can be a scale or a viewer.)
+ [LAMBDA (REGION VIEWERSCALE) (* rrb " 6-Jun-86 14:05")
+
+ (* Transforms a region from viewer coordinates into sketch coordinates.
+ VIEWERSCALE can be a scale or a viewer.)
(UNSCALE.REGION REGION (SK.INSURE.SCALE VIEWERSCALE])
(SK.READ.POINT.WITH.FEEDBACK
- [LAMBDA (WINDOW CURSOR FEEDBACKFN FEEDBACKFNDATA BUTTONFOREXISTINGPTS CONSTRAINTFN NUMBERPADTOOFLG)
+ [LAMBDA (WINDOW CURSOR FEEDBACKFN FEEDBACKFNDATA BUTTONFOREXISTINGPTS CONSTRAINTFN NUMBERPADTOOFLG)
(* rrb "11-Jul-86 15:52")
-
- (* internal function that reads a point from the user.
- Each time the cursor moves, a feedback fn is called passing it the new X, new
- Y, WINDOW and FEEDBACKDATA It is expected to XOR something on the screen that
- tells the user something.)
- (RESETLST (RESETSAVE (CURSOR (OR CURSOR CROSSHAIRS)))
- (RESETSAVE NIL (LIST 'DSPOPERATION (DSPOPERATION 'INVERT WINDOW)
- WINDOW))
- (PROG ((USEGRID (WINDOWPROP WINDOW 'USEGRID))
- (GRID (SK.GRIDFACTOR WINDOW))
- (SCALE (VIEWER.SCALE WINDOW))
- (HOTSPOTCACHE (SK.HOTSPOT.CACHE WINDOW))
- (SCRATCHPT (AND CONSTRAINTFN (create POSITION)))
- XSCREEN YSCREEN XGRID YGRID NEWX NEWY MOUSEDOWN LASTBUTTONSTATE ONGRID? NEARPOS
- CONSTRAINTPT POSITIONPAD)
- (OR FEEDBACKFN (SETQ FEEDBACKFN 'SHOWSKETCHXY))
- [COND
- (NUMBERPADTOOFLG
-
- (* IT WOULD BE NICER TO PUT THE POSITION READER OVERTOP OF THE MENU BUT THIS
- ROUTINE IS CALLED SEVERAL TIMES BY SEVERAL OF THE POINT READERS AND IT FLIPS UP
- AND DOWN SO STILL NEEDS MORE WORK TO GET RIGHT
- (* detach the window menu so that it doesn't come to top over the position
- reader.) (AND (OPENWP (SETQ MENUW (SK.INSURE.HAS.MENU WINDOW)))
- (RESETSAVE (DETACHWINDOW MENUW) (LIST (QUOTE SK.FIX.MENU) WINDOW))))
+ (* internal function that reads a point from the user.
+ Each time the cursor moves, a feedback fn is called passing it the new X, new Y,
+ WINDOW and FEEDBACKDATA It is expected to XOR something on the screen that tells
+ the user something.)
- (RESETSAVE NIL (LIST 'CLOSEW (SETQ POSITIONPAD (
- SK.POSITION.PAD.FROM.VIEWER
- WINDOW]
- (RETURN (PROG1 (until [PROGN (GETMOUSESTATE)
- (COND
- [(AND POSITIONPAD (INSIDEP (WINDOWPROP POSITIONPAD
- 'REGION)
- LASTMOUSEX LASTMOUSEY))
- (COND
- ((AND XGRID (INSIDEP WINDOW XGRID YGRID))
+ (RESETLST
+ (RESETSAVE (CURSOR (OR CURSOR CROSSHAIRS)))
+ (RESETSAVE NIL (LIST 'DSPOPERATION (DSPOPERATION 'INVERT WINDOW)
+ WINDOW))
+ [PROG ((USEGRID (WINDOWPROP WINDOW 'USEGRID))
+ (GRID (SK.GRIDFACTOR WINDOW))
+ (SCALE (VIEWER.SCALE WINDOW))
+ (HOTSPOTCACHE (SK.HOTSPOT.CACHE WINDOW))
+ (SCRATCHPT (AND CONSTRAINTFN (create POSITION)))
+ XSCREEN YSCREEN XGRID YGRID NEWX NEWY MOUSEDOWN LASTBUTTONSTATE ONGRID? NEARPOS
+ CONSTRAINTPT POSITIONPAD)
+ (OR FEEDBACKFN (SETQ FEEDBACKFN 'SHOWSKETCHXY))
+ [COND
+ (NUMBERPADTOOFLG
+
+ (* IT WOULD BE NICER TO PUT THE POSITION READER OVERTOP OF THE MENU BUT THIS
+ ROUTINE IS CALLED SEVERAL TIMES BY SEVERAL OF THE POINT READERS AND IT FLIPS UP
+ AND DOWN SO STILL NEEDS MORE WORK TO GET RIGHT
+ (* detach the window menu so that it doesn't come to top over the position
+ reader.) (AND (OPENWP (SETQ MENUW (SK.INSURE.HAS.MENU WINDOW)))
+ (RESETSAVE (DETACHWINDOW MENUW) (LIST (QUOTE SK.FIX.MENU) WINDOW))))
+
+ (RESETSAVE NIL (LIST 'CLOSEW (SETQ POSITIONPAD (SK.POSITION.PAD.FROM.VIEWER
+ WINDOW]
+ (RETURN (PROG1 (until [PROGN (GETMOUSESTATE)
+ (COND
+ [(AND POSITIONPAD (INSIDEP (WINDOWPROP POSITIONPAD
+ 'REGION)
+ LASTMOUSEX LASTMOUSEY))
+ (COND
+ ((AND XGRID (INSIDEP WINDOW XGRID YGRID))
(* leaving the window, turn off the
last feedback.)
- (APPLY* FEEDBACKFN XGRID YGRID WINDOW
- FEEDBACKFNDATA)
- (SETQ XGRID)))
-
- (* invoke position reader If it returns a position, return it.)
+ (APPLY* FEEDBACKFN XGRID YGRID WINDOW
+ FEEDBACKFNDATA)
+ (SETQ XGRID)))
+ (* invoke position reader If it
+ returns a position, return it.)
+ (AND (SETQ YSCREEN (SK.READ.POSITION.PAD.HANDLER
+ POSITIONPAD WINDOW FEEDBACKFN
+ FEEDBACKFNDATA CONSTRAINTFN))
+ (COND
+ [(EQ YSCREEN 'ABORT)
+ (COND
+ ((EQ NUMBERPADTOOFLG 'MULTIPLE)
- (AND (SETQ YSCREEN (SK.READ.POSITION.PAD.HANDLER
- POSITIONPAD WINDOW FEEDBACKFN
- FEEDBACKFNDATA CONSTRAINTFN))
- (COND
- [(EQ YSCREEN 'ABORT)
- (COND
- ((EQ NUMBERPADTOOFLG 'MULTIPLE)
-
- (* if NUMBERPADTOOFLG is MULTIPLE, this is a context in which multiple values
- are being read and the only way to abort is to error.
- Note%: this leaves stuff on the screen.)
+ (* if NUMBERPADTOOFLG is MULTIPLE, this is a context in which multiple values are
+ being read and the only way to abort is to error.
+ Note%: this leaves stuff on the screen.)
- (ERROR!))
- (T (RETURN NIL]
- ((EQ YSCREEN 'STOP)
- (RETURN NIL))
- (T (RETURN YSCREEN]
- (MOUSEDOWN (LASTMOUSESTATE UP))
- ((LASTMOUSESTATE (OR LEFT MIDDLE RIGHT))
- (COND
- ((INSIDEP (WINDOWPROP WINDOW 'REGION)
- LASTMOUSEX LASTMOUSEY)
- (SETQ MOUSEDOWN T)
- NIL)
- (T (RETURN]
- do (SETQ NEWX (LASTMOUSEX WINDOW))
- (SETQ NEWY (LASTMOUSEY WINDOW))
- [COND
- ((OR (NEQ NEWX XSCREEN)
- (NEQ NEWY YSCREEN)
- (NEQ LASTBUTTONSTATE LASTMOUSEBUTTONS))
-
- (* cursor changed position or a button went down, check if grid pt moved.)
-
- (SKETCHW.UPDATE.LOCATORS WINDOW)
- (SETQ XSCREEN NEWX)
- (SETQ YSCREEN NEWY)
- (SETQ LASTBUTTONSTATE LASTMOUSEBUTTONS)
- [COND
- ((AND HOTSPOTCACHE (SELECTQ BUTTONFOREXISTINGPTS
- (MIDDLE (LASTMOUSESTATE MIDDLE))
- (LEFT (LASTMOUSESTATE LEFT))
- NIL)
- (SETQ NEARPOS (NEAREST.HOT.SPOT HOTSPOTCACHE NEWX
- NEWY)))
+ (ERROR!))
+ (T (RETURN NIL]
+ ((EQ YSCREEN 'STOP)
+ (RETURN NIL))
+ (T (RETURN YSCREEN]
+ (MOUSEDOWN (LASTMOUSESTATE UP))
+ ((LASTMOUSESTATE (OR LEFT MIDDLE RIGHT))
+ (COND
+ ((INSIDEP (WINDOWPROP WINDOW 'REGION)
+ LASTMOUSEX LASTMOUSEY)
+ (SETQ MOUSEDOWN T)
+ NIL)
+ (T (RETURN]
+ do (SETQ NEWX (LASTMOUSEX WINDOW))
+ (SETQ NEWY (LASTMOUSEY WINDOW))
+ [COND
+ ((OR (NEQ NEWX XSCREEN)
+ (NEQ NEWY YSCREEN)
+ (NEQ LASTBUTTONSTATE LASTMOUSEBUTTONS))
+ (* cursor changed position or a button
+ went down, check if grid pt moved.)
+ (SKETCHW.UPDATE.LOCATORS WINDOW)
+ (SETQ XSCREEN NEWX)
+ (SETQ YSCREEN NEWY)
+ (SETQ LASTBUTTONSTATE LASTMOUSEBUTTONS)
+ [COND
+ ((AND HOTSPOTCACHE (SELECTQ BUTTONFOREXISTINGPTS
+ (MIDDLE (LASTMOUSESTATE MIDDLE))
+ (LEFT (LASTMOUSESTATE LEFT))
+ NIL)
+ (SETQ NEARPOS (NEAREST.HOT.SPOT HOTSPOTCACHE NEWX
+ NEWY)))
(* on middle, pick the closest point)
- (SETQ NEWX (fetch (POSITION XCOORD) of NEARPOS))
- (SETQ NEWY (fetch (POSITION YCOORD) of NEARPOS))
- (SETQ ONGRID? NIL))
- ((SETQ ONGRID? (COND
- ((LASTMOUSESTATE RIGHT)
+ (SETQ NEWX (fetch (POSITION XCOORD) of NEARPOS))
+ (SETQ NEWY (fetch (POSITION YCOORD) of NEARPOS))
+ (SETQ ONGRID? NIL))
+ ((SETQ ONGRID? (COND
+ ((LASTMOUSESTATE RIGHT)
(* if right is down, flip sense of
using grid)
- (NOT USEGRID))
- (T
+ (NOT USEGRID))
+ (T
(* otherwise use the grid if told to.)
- USEGRID)))
- (SETQ NEWX (MAP.WINDOW.ONTO.GRID NEWX SCALE GRID))
- (SETQ NEWY (MAP.WINDOW.ONTO.GRID NEWY SCALE GRID]
- (PROGN [COND
- ([AND CONSTRAINTFN
- (POSITIONP (SETQ CONSTRAINTPT
- (APPLY* CONSTRAINTFN
- (
- MAP.VIEWER.XY.INTO.GLOBAL
- NEWX NEWY VIEWER
- ONGRID? SCRATCHPT)
- W FEEDBACKFNDATA]
- (SETQ NEWX (FIXR (QUOTIENT (fetch (POSITION
- XCOORD)
- of CONSTRAINTPT)
- SCALE)))
- (SETQ NEWY (FIXR (QUOTIENT (fetch (POSITION
- YCOORD)
- of CONSTRAINTPT)
- SCALE]
- (COND
- ((OR (NEQ XGRID NEWX)
- (NEQ YGRID NEWY))
-
- (* grid point has changed too. Call the feedback function if the point is in
- the window. If it is outside, don't show anything.)
+ USEGRID)))
+ (SETQ NEWX (MAP.WINDOW.ONTO.GRID NEWX SCALE GRID))
+ (SETQ NEWY (MAP.WINDOW.ONTO.GRID NEWY SCALE GRID]
+ (PROGN [COND
+ ([AND CONSTRAINTFN
+ (POSITIONP (SETQ CONSTRAINTPT
+ (APPLY* CONSTRAINTFN
+ (MAP.VIEWER.XY.INTO.GLOBAL
+ NEWX NEWY VIEWER ONGRID?
+ SCRATCHPT)
+ W FEEDBACKFNDATA]
+ (SETQ NEWX (FIXR (QUOTIENT (fetch (POSITION XCOORD)
+ of CONSTRAINTPT)
+ SCALE)))
+ (SETQ NEWY (FIXR (QUOTIENT (fetch (POSITION YCOORD)
+ of CONSTRAINTPT)
+ SCALE]
+ (COND
+ ((OR (NEQ XGRID NEWX)
+ (NEQ YGRID NEWY))
- (AND XGRID (INSIDEP WINDOW XGRID YGRID)
- (APPLY* FEEDBACKFN XGRID YGRID WINDOW
- FEEDBACKFNDATA))
- (AND (INSIDEP WINDOW (SETQ XGRID NEWX)
- (SETQ YGRID NEWY))
- (APPLY* FEEDBACKFN XGRID YGRID WINDOW
- FEEDBACKFNDATA]
- finally (RETURN (COND
- ((AND XGRID (INSIDEP WINDOW XGRID YGRID))
-
- (* if the cursor was outside the window when let up, return NIL)
+ (* grid point has changed too. Call the feedback function if the point is in the
+ window. If it is outside, don't show anything.)
+ (AND XGRID (INSIDEP WINDOW XGRID YGRID)
(APPLY* FEEDBACKFN XGRID YGRID WINDOW
- FEEDBACKFNDATA)
- (create INPUTPT
- INPUT.ONGRID? _ ONGRID?
- INPUT.POSITION _
- (create POSITION
- XCOORD _ XGRID
- YCOORD _ YGRID])
+ FEEDBACKFNDATA))
+ (AND (INSIDEP WINDOW (SETQ XGRID NEWX)
+ (SETQ YGRID NEWY))
+ (APPLY* FEEDBACKFN XGRID YGRID WINDOW
+ FEEDBACKFNDATA]
+ finally (RETURN (COND
+ ((AND XGRID (INSIDEP WINDOW XGRID YGRID))
+ (* if the cursor was outside the
+ window when let up, return NIL)
+ (APPLY* FEEDBACKFN XGRID YGRID WINDOW
+ FEEDBACKFNDATA)
+ (create INPUTPT
+ INPUT.ONGRID? ↠ONGRID?
+ INPUT.POSITION â†
+ (create POSITION
+ XCOORD ↠XGRID
+ YCOORD ↠YGRID])])
(SKETCH.GET.POSITION
- [LAMBDA (VIEWER CURSOR FEEDBACKFN FEEDBACKFNDATA CONSTRAINTFN)
+ [LAMBDA (VIEWER CURSOR FEEDBACKFN FEEDBACKFNDATA CONSTRAINTFN)
(* rrb "21-May-86 16:51")
(* user available version of
SK.READ.POINT.WITH.FEEDBACK.)
-
- (* reads a point from the user. Each time the cursor moves, a feedback fn is
- called passing it the new X, new Y, VIEWER and FEEDBACKDATA It is expected to
- XOR something on the screen that tells the user something.
- CONSTRAINTFN is called to constrain the read point.)
+
+ (* reads a point from the user. Each time the cursor moves, a feedback fn is
+ called passing it the new X, new Y, VIEWER and FEEDBACKDATA It is expected to XOR
+ something on the screen that tells the user something.
+ CONSTRAINTFN is called to constrain the read point.)
(PROG (READPT)
(SETQ READPT (SK.READ.POINT.WITH.FEEDBACK VIEWER CURSOR FEEDBACKFN FEEDBACKFNDATA
@@ -7574,10 +7497,10 @@ Enter 'Abort' to leave the dashing unchanged.")
(create POSITION])
(\CLOBBER.POSITION
- [LAMBDA (X Y OLDPT) (* rrb " 4-Apr-86 13:34")
-
- (* returns a position with values x and y.
- Clobbers OLDPT if it is a POSITION.)
+ [LAMBDA (X Y OLDPT) (* rrb " 4-Apr-86 13:34")
+
+ (* returns a position with values x and y.
+ Clobbers OLDPT if it is a POSITION.)
(COND
((POSITIONP OLDPT)
@@ -7587,7 +7510,7 @@ Enter 'Abort' to leave the dashing unchanged.")
(T (CREATEPOSITION X Y])
(NEAREST.HOT.SPOT
- [LAMBDA (CACHE X Y) (* rrb "31-Jul-85 10:14")
+ [LAMBDA (CACHE X Y) (* rrb "31-Jul-85 10:14")
(* returns the nearest hot spot to X Y)
(PROG ((BESTMEASURE 10000)
BESTX BESTY YDIF THISDIF)
@@ -7606,13 +7529,12 @@ Enter 'Abort' to leave the dashing unchanged.")
(SETQ BESTX (CAR XBUCKET))
(SETQ BESTY (CAR YBUCKET]
(RETURN (AND BESTX (create POSITION
- XCOORD _ BESTX
- YCOORD _ BESTY])
+ XCOORD ↠BESTX
+ YCOORD ↠BESTY])
(GETWREGION
- [LAMBDA (W NEWREGIONFN NEWREGIONFNDATA MINWIDTH MINHEIGHT)
- (* ; "Edited 12-Jun-90 13:25 by mitani")
- (* gets a region from a window)
+ [LAMBDA (W NEWREGIONFN NEWREGIONFNDATA MINWIDTH MINHEIGHT)(* ; "Edited 12-Jun-90 13:25 by mitani")
+ (* gets a region from a window)
(PROG ((REG (GETREGION MINWIDTH MINHEIGHT NIL NEWREGIONFN NEWREGIONFNDATA)))
(RETURN (CREATEREGION (IDIFFERENCE (fetch (REGION LEFT) of REG)
(DSPXOFFSET NIL W))
@@ -7622,11 +7544,10 @@ Enter 'Abort' to leave the dashing unchanged.")
(fetch (REGION HEIGHT) of REG])
(GET.BITMAP.POSITION
- [LAMBDA (WINDOW BITMAP OPERATION MSG XOFFSET YOFFSET) (* rrb "11-Jul-85 11:00")
-
- (* gets a position by tracking with a bitmap The spec returns is actually
- (ONGRID? position) so that caller can tell whether it was placed on grid or
- not.)
+ [LAMBDA (WINDOW BITMAP OPERATION MSG XOFFSET YOFFSET) (* rrb "11-Jul-85 11:00")
+
+ (* gets a position by tracking with a bitmap The spec returns is actually
+ (ONGRID? position) so that caller can tell whether it was placed on grid or not.)
(PROG (BUFFER.BITMAP WIDTH HEIGHT)
(SETQ WIDTH (BITMAPWIDTH BITMAP))
@@ -7639,16 +7560,15 @@ Enter 'Abort' to leave the dashing unchanged.")
XOFFSET YOFFSET])
(SK.TRACK.BITMAP1
- [LAMBDA (W BITMAP BUFFER.BITMAP WIDTH HEIGHT OPERATION XOFFSET YOFFSET CONSTRAINTFN CONSTRAINTDATA
- FEEDBACKFN) (* rrb "11-Jul-86 15:52")
-
- (* tracks BITMAP until a button goes down and comes up.
- It calls CONSTRAINTFN to determine the position at which to display the image.
- Returns a list of (ongrid? position) so that caller can know whether the point
- chosen was on a grid or not.)
-
- (* there is other code in BIGFONT that might be better for this.)
+ [LAMBDA (W BITMAP BUFFER.BITMAP WIDTH HEIGHT OPERATION XOFFSET YOFFSET CONSTRAINTFN CONSTRAINTDATA
+ FEEDBACKFN) (* rrb "11-Jul-86 15:52")
+ (* tracks BITMAP until a button goes down and comes up.
+ It calls CONSTRAINTFN to determine the position at which to display the image.
+ Returns a list of (ongrid? position) so that caller can know whether the point
+ chosen was on a grid or not.)
+ (* there is other code in BIGFONT that
+ might be better for this.)
(PROG [DOWN LEFT BOTTOM NEW.LEFT NEW.BOTTOM GRID.LEFT GRID.BOTTOM ONGRID? NEARPOS CONSTRAINTPT
(DSP (WINDOWPROP W 'DSP))
(USEGRID (WINDOWPROP W 'USEGRID))
@@ -7735,19 +7655,18 @@ Enter 'Abort' to leave the dashing unchanged.")
(BITBLT BUFFER.BITMAP 0 0 W (IPLUS GRID.LEFT XOFFSET)
(IPLUS GRID.BOTTOM YOFFSET)
WIDTH HEIGHT 'INPUT 'REPLACE]
-
- (* return the position if any part of the bitmap is visible.)
-
+ (* return the position if any part of
+ the bitmap is visible.)
(RETURN (AND (REGIONSINTERSECTP (DSPCLIPPINGREGION NIL DSP)
(CREATEREGION (IPLUS LEFT XOFFSET)
(IPLUS BOTTOM YOFFSET)
WIDTH HEIGHT))
(create INPUTPT
- INPUT.ONGRID? _ ONGRID?
- INPUT.POSITION _
+ INPUT.ONGRID? ↠ONGRID?
+ INPUT.POSITION â†
(create POSITION
- XCOORD _ GRID.LEFT
- YCOORD _ GRID.BOTTOM])
+ XCOORD ↠GRID.LEFT
+ YCOORD ↠GRID.BOTTOM])
)
(DECLARE%: EVAL@COMPILE
@@ -7773,10 +7692,10 @@ Enter 'Abort' to leave the dashing unchanged.")
(DEFINEQ
(SK.BRING.UP.POSITION.PAD
- [LAMBDA (VIEWER MSG OPENFLG) (* rrb "10-Jun-86 15:26")
-
- (* * brings up a position reading number pad associated with VIEWER.
- Puts it over the menu if it is up.)
+ [LAMBDA (VIEWER MSG OPENFLG) (* rrb "10-Jun-86 15:26")
+
+ (* * brings up a position reading number pad associated with VIEWER.
+ Puts it over the menu if it is up.)
(RESETFORM (RADIX 10)
(PROG ((NUMBER/READER/MAXDIGITS 8)
@@ -7793,16 +7712,16 @@ Enter 'Abort' to leave the dashing unchanged.")
(SETQ XNUMBERPAD (\POSITION.READER.NUMBERPAD DIGITFONT TOTALSWIDTH))
(SETQ YNUMBERPAD (\POSITION.READER.NUMBERPAD DIGITFONT TOTALSWIDTH))
(SETQ COMMANDPAD (create MENU
- ITEMS _ '(abort enter quit)
- CENTERFLG _ T
- MENUFONT _ DIGITFONT
- WHENHELDFN _ (FUNCTION POSITIONPAD.HELDFN)
- WHENSELECTEDFN _ (FUNCTION POSITION.PAD.READER.HANDLER)
- MENUBORDERSIZE _ 1
- MENUOUTLINESIZE _ 2
- ITEMHEIGHT _ (PLUS 6 TOTALSHEIGHT)))
-
- (* leave room for three lines and the number at the top)
+ ITEMS ↠'(abort enter quit)
+ CENTERFLG ↠T
+ MENUFONT ↠DIGITFONT
+ WHENHELDFN ↠(FUNCTION POSITIONPAD.HELDFN)
+ WHENSELECTEDFN ↠(FUNCTION POSITION.PAD.READER.HANDLER)
+ MENUBORDERSIZE ↠1
+ MENUOUTLINESIZE ↠2
+ ITEMHEIGHT ↠(PLUS 6 TOTALSHEIGHT)))
+ (* leave room for three lines and the
+ number at the top)
(* use the numberpad's width so things
look better.)
(SETQ TOTALSWIDTH (fetch (MENU IMAGEWIDTH) of XNUMBERPAD))
@@ -7812,9 +7731,9 @@ Enter 'Abort' to leave the dashing unchanged.")
MARGIN))
(SETQ WINHEIGHT (IPLUS (COND
[MSG
-
- (* if there is a msg, leave room for it at the top.
- In any case, leave room for the labels X and Y.)
+
+ (* if there is a msg, leave room for it at the top.
+ In any case, leave room for the labels X and Y.)
(ITIMES (LENGTH (SETQ MSGLINES (BREAK.MSG.INTO.LINES
MSG MSGFONT WINWIDTH)
@@ -7834,10 +7753,8 @@ Enter 'Abort' to leave the dashing unchanged.")
(MOVEW WIN (SK.PAD.READER.POSITION VIEWER WIN))
(WINDOWADDPROP WIN 'REPAINTFN (FUNCTION SK.POSITION.READER.REPAINTFN))
[COND
- (MSG
-
- (* save msg on the window so repaintfn can get at it)
-
+ (MSG (* save msg on the window so repaintfn
+ can get at it)
(WINDOWPROP WIN 'MESSAGE MSGLINES)
(WINDOWPROP WIN 'MESSAGEFONT MSGFONT)
(* note where the message begins.)
@@ -7845,9 +7762,9 @@ Enter 'Abort' to leave the dashing unchanged.")
(WINDOWPROP WIN 'MESSAGEBOTTOM (DSPYPOSITION NIL WIN]
(WINDOWPROP WIN 'DIGITFONT DIGITFONT)
(OPENW WIN)
-
- (* window is opened because of bug in ADDMENU that it doesn't work unless
- window is open.)
+
+ (* window is opened because of bug in ADDMENU that it doesn't work unless window
+ is open.)
(\POSITION.PAD.ADD.DIGIT.MENU WIN MARGIN MARGIN 'X XNUMBERPAD TOTALSWIDTH
TOTALSHEIGHT NUMBER/READER/MAXDIGITS)
@@ -7856,9 +7773,9 @@ Enter 'Abort' to leave the dashing unchanged.")
'Y YNUMBERPAD TOTALSWIDTH TOTALSHEIGHT NUMBER/READER/MAXDIGITS)
(REDISPLAYW WIN NIL T)
[ADDMENU COMMANDPAD WIN (create POSITION
- XCOORD _ (PLUS MARGIN (TIMES 2 (PLUS MARGIN
+ XCOORD ↠(PLUS MARGIN (TIMES 2 (PLUS MARGIN
TOTALSWIDTH)))
- YCOORD _ (PLUS MARGIN
+ YCOORD ↠(PLUS MARGIN
(QUOTIENT (DIFFERENCE
(fetch (MENU IMAGEHEIGHT)
of XNUMBERPAD)
@@ -7869,10 +7786,10 @@ Enter 'Abort' to leave the dashing unchanged.")
(RETURN WIN])
(SK.PAD.READER.POSITION
- [LAMBDA (VIEWER READERWINDOW) (* rrb "10-Jun-86 12:24")
-
- (* returns the lower left corner where a position reading pad should be placed
- for the sketch viewer VIEWER.)
+ [LAMBDA (VIEWER READERWINDOW) (* rrb "10-Jun-86 12:24")
+
+ (* returns the lower left corner where a position reading pad should be placed
+ for the sketch viewer VIEWER.)
(PROG ((VIEWERREGION (WINDOWPROP VIEWER 'REGION))
(READERREGION (WINDOWPROP READERWINDOW 'REGION))
@@ -7884,30 +7801,28 @@ Enter 'Abort' to leave the dashing unchanged.")
[(OR (GREATERP VLFT PWID)
(GREATERP VLFT VBTM)
(GREATERP PWID (fetch (REGION WIDTH) of VIEWERREGION)))
-
- (* the position reader will fit to the left, or there is more room on the left,
- or the position pad reader is wider than the viewer.)
+
+ (* the position reader will fit to the left, or there is more room on the left,
+ or the position pad reader is wider than the viewer.)
(create POSITION
- XCOORD _ (DIFFERENCE (MAX 10 VLFT)
+ XCOORD ↠(DIFFERENCE (MAX 10 VLFT)
PWID)
- YCOORD _ (DIFFERENCE (fetch (REGION PTOP) of VIEWERREGION)
+ YCOORD ↠(DIFFERENCE (fetch (REGION PTOP) of VIEWERREGION)
(fetch (REGION HEIGHT) of READERREGION]
(T (* more room on the bottom)
(create POSITION
- XCOORD _ (MAX 10 VLFT)
- YCOORD _ (DIFFERENCE VBTM (fetch (REGION HEIGHT) of READERREGION])
+ XCOORD ↠(MAX 10 VLFT)
+ YCOORD ↠(DIFFERENCE VBTM (fetch (REGION HEIGHT) of READERREGION])
(SK.POSITION.READER.REPAINTFN
- [LAMBDA (POSITIONPAD) (* rrb "11-Jun-86 13:28")
+ [LAMBDA (POSITIONPAD) (* rrb "11-Jun-86 13:28")
(* repaints a position pad reader)
(PROG ((MSGLINES (WINDOWPROP POSITIONPAD 'MESSAGE))
NUMBERMENU TOTALREGION)
[COND
- (MSGLINES
-
- (* if there is a msg, print it at the top.)
-
+ (MSGLINES (* if there is a msg, print it at the
+ top.)
(DSPFONT (WINDOWPROP POSITIONPAD 'MESSAGEFONT)
POSITIONPAD)
(MOVETO 0 (WINDOWPROP POSITIONPAD 'MESSAGEBOTTOM)
@@ -7915,11 +7830,9 @@ Enter 'Abort' to leave the dashing unchanged.")
(for LINE in MSGLINES do (PRIN3 LINE POSITIONPAD)
(TERPRI POSITIONPAD]
(DSPFONT (WINDOWPROP POSITIONPAD 'DIGITFONT)
- POSITIONPAD)
-
- (* the actual displaying of the menus is done by the repaintfn supplied by
- ADDMENU)
-
+ POSITIONPAD) (* the actual displaying of the menus
+ is done by the repaintfn supplied by
+ ADDMENU)
(for LABEL in '(X Y) do (SETQ NUMBERMENU (WINDOWPROP POSITIONPAD LABEL))
(SETQ TOTALREGION (GETMENUPROP NUMBERMENU 'TOTALREG))
(\READNUMBER.OUTLINEREGION TOTALREGION POSITIONPAD 2)
@@ -7931,18 +7844,15 @@ Enter 'Abort' to leave the dashing unchanged.")
(DISPLAY.POSITION.READER.TOTAL NUMBERMENU])
(SK.POSITION.PAD.FROM.VIEWER
- [LAMBDA (VIEWER) (* rrb "11-Jun-86 14:17")
-
- (* cache the position pad because it takes a while to create.
- Opens it too.)
-
+ [LAMBDA (VIEWER) (* rrb "11-Jun-86 14:17")
+ (* cache the position pad because it
+ takes a while to create.
+ Opens it too.)
(PROG (PAD)
(COND
((SETQ PAD (WINDOWPROP VIEWER 'POSITION.PAD))
- (WINDOWPROP PAD 'FINISHEDFLG NIL)
-
- (* move the pad in case the window has moved or been reshaped.)
-
+ (WINDOWPROP PAD 'FINISHEDFLG NIL) (* move the pad in case the window has
+ moved or been reshaped.)
(MOVEW PAD (SK.PAD.READER.POSITION VIEWER PAD))
(OPENW PAD) (* initialize some values)
(SK.INIT.POSITION.NUMBER.PAD.MENU (WINDOWPROP PAD 'X))
@@ -7952,24 +7862,24 @@ Enter 'Abort' to leave the dashing unchanged.")
require font search)
(RESETFORM (CURSOR WAITINGCURSOR)
(SETQ PAD (SK.BRING.UP.POSITION.PAD VIEWER
- "Select the location of the desired position in the window or enter its X and Y coordinates here."
+ "Select the location of the desired position in the window or enter its X and Y coordinates here."
T)))
(WINDOWPROP VIEWER 'POSITION.PAD PAD)
(RETURN PAD])
(SK.INIT.POSITION.NUMBER.PAD.MENU
- [LAMBDA (MNU) (* rrb "21-May-86 15:29")
+ [LAMBDA (MNU) (* rrb "21-May-86 15:29")
(* reinitializes a numberpad reader)
(PUTMENUPROP MNU 'TOTAL 0)
(PUTMENUPROP MNU 'DECIMALPOWER NIL)
(DISPLAY.POSITION.READER.TOTAL MNU])
(SK.READ.POSITION.PAD.HANDLER
- [LAMBDA (POSITIONPAD VIEWER FEEDBACKFN FEEDBACKFNDATA CONSTRAINTFN)
+ [LAMBDA (POSITIONPAD VIEWER FEEDBACKFN FEEDBACKFNDATA CONSTRAINTFN)
(* rrb "11-Jul-86 15:54")
-
- (* tracks the cursor while it is in the position pad and sets variables for
- SK.READ.POINT.WITH.FEEDBACK and returned T if it succeeded)
+
+ (* tracks the cursor while it is in the position pad and sets variables for
+ SK.READ.POINT.WITH.FEEDBACK and returned T if it succeeded)
(* uses many variable freely from
SK.READ.POINT.WITH.FEEDBACK)
(PROG (NEWX NEWY CONSTRX CONSTRY PREVX PREVY FINISHVAL (SCALE (VIEWER.SCALE VIEWER)))
@@ -7992,9 +7902,9 @@ Enter 'Abort' to leave the dashing unchanged.")
(NEQ NEWY PREVY)) (* user entered a new number)
(SETQ PREVX NEWX)
(SETQ PREVY NEWY)
-
- (* this code is differerent from the code in SK.READ.POINT.WITH.FEEDBACK in
- that is works in sketch coordinates.)
+
+ (* this code is differerent from the code in SK.READ.POINT.WITH.FEEDBACK in that
+ is works in sketch coordinates.)
[COND
([AND CONSTRAINTFN (POSITIONP (SETQ CONSTRAINTPT
@@ -8007,10 +7917,10 @@ Enter 'Abort' to leave the dashing unchanged.")
(COND
((OR (NEQ CONSTRX NEWX)
(NEQ CONSTRY NEWY))
-
- (* grid point has changed too. Update the position numberpads and Call the
- feedback function if the point is in the window.
- If it is outside, don't show anything.)
+
+ (* grid point has changed too. Update the position numberpads and Call the
+ feedback function if the point is in the window.
+ If it is outside, don't show anything.)
(PUTMENUPROP (WINDOWPROP POSITIONPAD 'X)
'TOTAL NEWX)
@@ -8025,39 +7935,36 @@ Enter 'Abort' to leave the dashing unchanged.")
(QUOTIENT (SETQ CONSTRY NEWY)
SCALE)
VIEWER FEEDBACKFNDATA]
- finally
-
- (* remove the closefn so that it doesn't get run on the way out.)
-
+ finally (* remove the closefn so that it
+ doesn't get run on the way out.)
(WINDOWDELPROP POSITIONPAD 'CLOSEFN (FUNCTION \NUMBERPAD.READER.CLOSEFN))
(AND CONSTRX (APPLY* FEEDBACKFN CONSTRX CONSTRY VIEWER FEEDBACKFNDATA))
(RETURN (COND
((MEMB FINISHVAL '(STOP ABORT))
-
- (* means the numberpad reader was closed.
- If the number pad includes the ABORT command, do what it would do, otherwise
- the program is not expecting NIL so cause an error.)
+
+ (* means the numberpad reader was closed.
+ If the number pad includes the ABORT command, do what it would do, otherwise the
+ program is not expecting NIL so cause an error.)
(RETURN FINISHVAL))
(FINISHVAL (AND CONSTRX
(SETQ FINISHVAL
(create POSITION
- XCOORD _ CONSTRX
- YCOORD _ CONSTRY))
+ XCOORD ↠CONSTRX
+ YCOORD ↠CONSTRY))
(create INPUTPT
- INPUT.ONGRID? _ 'GLOBAL
- INPUT.POSITION _ (
+ INPUT.ONGRID? ↠'GLOBAL
+ INPUT.POSITION ↠(
SK.SCALE.POSITION.INTO.VIEWER
FINISHVAL SCALE)
- INPUT.GLOBALPOSITION _ FINISHVAL)))
+ INPUT.GLOBALPOSITION ↠FINISHVAL)))
(T (* mouse left the window, return)
NIL])
(DISPLAY.POSITION.READER.TOTAL
- [LAMBDA (MNU) (* rrb "19-May-86 17:09")
-
- (* displays the number total in the box in the window.)
-
+ [LAMBDA (MNU) (* rrb "19-May-86 17:09")
+ (* displays the number total in the
+ box in the window.)
(PROG ((TOTALREG (GETMENUPROP MNU 'TOTALREG))
(DECIMALPLACES (GETMENUPROP MNU 'DECIMALPOWER))
(WIN (WFROMMENU MNU)))
@@ -8067,9 +7974,9 @@ Enter 'Abort' to leave the dashing unchanged.")
(CENTERPRINTINREGION
[COND
[DECIMALPLACES
-
- (* printing a decimal number must check to make sure the correct number of
- decimal places print.)
+
+ (* printing a decimal number must check to make sure the correct number of
+ decimal places print.)
(PROG ([TOTSTR (MKSTRING (GETMENUPROP MNU 'TOTAL]
DECPOS NAFTERDEC NCHARS)
@@ -8095,15 +8002,14 @@ Enter 'Abort' to leave the dashing unchanged.")
TOTALREG WIN])
(POSITION.PAD.READER.HANDLER
- [LAMBDA (DIGIT MNU) (* rrb "10-Jun-86 15:50")
-
- (* handles a key stroke or menu digit selection for a number pad reader.)
-
+ [LAMBDA (DIGIT MNU) (* rrb "10-Jun-86 15:50")
+ (* handles a key stroke or menu digit
+ selection for a number pad reader.)
(PROG (TOTAL POWER OPERATION TOPOFSTACK (WIN (WFROMMENU MNU)))
(SETQ TOTAL (GETMENUPROP MNU 'TOTAL))
[PUTMENUPROP MNU 'TOTAL
(SELECTQ DIGIT
- ((¬ bs)
+ ((_ bs)
(COND
((NULL (GETMENUPROP MNU 'DIGITYET))
(* bs was the first key)
@@ -8119,43 +8025,41 @@ Enter 'Abort' to leave the dashing unchanged.")
(T (PUTMENUPROP MNU 'DECIMALPOWER (SETQ POWER (SUB1 POWER)))
(* dirty but effective.)
(PROG ((TOTSTR (MKSTRING TOTAL)))
-
- (* SUBSTRING will be NIL if the total has a trailing zero.)
-
+ (* SUBSTRING will be NIL if the total
+ has a trailing zero.)
(RETURN (MKATOM (OR (SUBSTRING TOTSTR 1
(PLUS (STRPOS "." TOTSTR)
(SUB1 POWER)))
TOTSTR]
(T (* no decimal point)
(IQUOTIENT TOTAL 10))))
- (± (* +/- sign)
+ (± (* +/- sign)
(MINUS TOTAL))
- ((¸ ´ - + =) (* operation sign)
+ ((÷ × - + =) (* operation sign)
[COND
((NULL (GETMENUPROP MNU 'DIGITYET))
-
- (* last thing hit was an operation, just save this one.)
-
+ (* last thing hit was an operation,
+ just save this one.)
(PUTMENUPROP MNU 'OPERATION (COND
((EQ DIGIT '=)
NIL)
(T DIGIT)))
(RETURN))
((SETQ OPERATION (GETMENUPROP MNU 'OPERATION))
-
- (* perform the operation that is stored between the top of stack and the
- current total)
+
+ (* perform the operation that is stored between the top of stack and the current
+ total)
(COND
[(SETQ TOPOFSTACK (GETMENUPROP MNU 'TOPOFSTACK))
(* a previous value exists)
(SETQ TOTAL (SELECTQ OPERATION
- (¸ (* divide, check for 0 divisor)
+ (÷ (* divide, check for 0 divisor)
(COND
((ZEROP TOTAL)
(PROMPTPRINT "Can't divide by zero"))
(T (QUOTIENT TOPOFSTACK TOTAL))))
- (´ (* times)
+ (× (* times)
(TIMES TOPOFSTACK TOTAL))
(- (* minus)
(DIFFERENCE TOPOFSTACK TOTAL))
@@ -8203,9 +8107,8 @@ Enter 'Abort' to leave the dashing unchanged.")
[(NUMBERP DIGIT)
(COND
((NULL (GETMENUPROP MNU 'DIGITYET))
-
- (* first key hit after an operation, note this and clear the total.)
-
+ (* first key hit after an operation,
+ note this and clear the total.)
(PUTMENUPROP MNU 'DIGITYET T)
(SETQ TOTAL 0)))
(COND
@@ -8216,7 +8119,7 @@ Enter 'Abort' to leave the dashing unchanged.")
[(SETQ POWER (GETMENUPROP MNU 'DECIMALPOWER))
(* have read decimal pt)
(PUTMENUPROP MNU 'DECIMALPOWER (ADD1 POWER))
- (SETQ POWER (bind (N _ 1.0) for I from 1 to POWER
+ (SETQ POWER (bind (N ↠1.0) for I from 1 to POWER
do (SETQ N (FTIMES N 0.1)) finally (RETURN N)))
(COND
((GEQ TOTAL 0)
@@ -8232,7 +8135,7 @@ Enter 'Abort' to leave the dashing unchanged.")
(DISPLAY.POSITION.READER.TOTAL MNU])
(POSITIONPAD.HELDFN
- [LAMBDA (ITEM MENU BUTTON) (* rrb "10-Jun-86 15:29")
+ [LAMBDA (ITEM MENU BUTTON) (* rrb "10-Jun-86 15:29")
(* prints the help information for a
numberpad.)
(PROMPTPRINT (SELECTQ ITEM
@@ -8243,61 +8146,59 @@ Enter 'Abort' to leave the dashing unchanged.")
"performs the previously specified operation between the memory and the current total")
(+ "Will read another number to be added to the current total")
(- "Will read another number to be subtracted to the current total")
- (´ "Will read another number to be multiplied by the current total")
- (¸ "Will read another number and divides the current total by it")
+ (× "Will read another number to be multiplied by the current total")
+ (÷ "Will read another number and divides the current total by it")
(quit "Will stop prompting you for points.")
(abort "will abort this sketch operation.")
- (± " will change the sign of the total")
+ (± " will change the sign of the total")
(%. "will enter a decimal point.")
- ((bs ¬)
+ ((bs _)
"Will erase the last digit entered.")
(% "doesn't do anything.")
"Will put this digit on the right of the total."])
(\POSITION.PAD.ADD.DIGIT.MENU
- [LAMBDA (WIN LEFT MARGIN LABEL MENU TOTALSWIDTH TOTALSHEIGHT NUMBER/READER/MAXDIGITS)
+ [LAMBDA (WIN LEFT MARGIN LABEL MENU TOTALSWIDTH TOTALSHEIGHT NUMBER/READER/MAXDIGITS)
(* rrb "10-Jun-86 12:06")
-
- (* * adds a menu which is a number pad menu to WIN, allocates the total region
- for it.)
+
+ (* * adds a menu which is a number pad menu to WIN, allocates the total region
+ for it.)
(PROG (TOTALREGION)
(ADDMENU MENU WIN (create POSITION
- XCOORD _ LEFT
- YCOORD _ MARGIN))
+ XCOORD ↠LEFT
+ YCOORD ↠MARGIN))
(PUTMENUPROP MENU 'TOTALREG (SETQ TOTALREGION (create REGION
- LEFT _ LEFT
- BOTTOM _ (PLUS (fetch (MENU
+ LEFT ↠LEFT
+ BOTTOM ↠(PLUS (fetch (MENU
IMAGEHEIGHT
)
of MENU)
MARGIN MARGIN)
- WIDTH _ TOTALSWIDTH
- HEIGHT _ TOTALSHEIGHT)))
+ WIDTH ↠TOTALSWIDTH
+ HEIGHT ↠TOTALSHEIGHT)))
(PUTMENUPROP MENU 'TOTAL 0)
(PUTMENUPROP MENU 'MAXDIGITS NUMBER/READER/MAXDIGITS)
-
- (* put link to the menu so the window can eventually get the values.)
-
+ (* put link to the menu so the window
+ can eventually get the values.)
(WINDOWPROP WIN LABEL MENU)
(RETURN WIN])
(\POSITION.READER.NUMBERPAD
- [LAMBDA (DIGITFONT WIDTH) (* rrb "10-Jun-86 15:33")
-
- (* returns a menu which is a numberpad suitable for a position reader.)
-
+ [LAMBDA (DIGITFONT WIDTH) (* rrb "10-Jun-86 15:33")
+ (* returns a menu which is a numberpad
+ suitable for a position reader.)
(create MENU
- ITEMS _
- '(¬ ce C ¸ 1 2 3 ´ 4 5 6 - 7 8 9 + ± 0 %. =)
- MENUCOLUMNS _ 4
- CENTERFLG _ T
- MENUFONT _ DIGITFONT
- WHENHELDFN _ (FUNCTION POSITIONPAD.HELDFN)
- WHENSELECTEDFN _ (FUNCTION POSITION.PAD.READER.HANDLER)
- MENUOUTLINESIZE _ 2
- ITEMHEIGHT _ (IPLUS 2 (FONTPROP DIGITFONT 'HEIGHT))
- ITEMWIDTH _ (AND WIDTH (QUOTIENT (DIFFERENCE WIDTH 8)
+ ITEMS â†
+ '(_ ce C ÷ 1 2 3 × 4 5 6 - 7 8 9 + ± 0 %. =)
+ MENUCOLUMNS ↠4
+ CENTERFLG ↠T
+ MENUFONT ↠DIGITFONT
+ WHENHELDFN ↠(FUNCTION POSITIONPAD.HELDFN)
+ WHENSELECTEDFN ↠(FUNCTION POSITION.PAD.READER.HANDLER)
+ MENUOUTLINESIZE ↠2
+ ITEMHEIGHT ↠(IPLUS 2 (FONTPROP DIGITFONT 'HEIGHT))
+ ITEMWIDTH ↠(AND WIDTH (QUOTIENT (DIFFERENCE WIDTH 8)
4])
)
@@ -8403,13 +8304,13 @@ Enter 'Abort' to leave the dashing unchanged.")
(DEFINEQ
(SK.DRAWFN
- [LAMBDA (ELEMENTTYPE) (* rrb "17-MAR-83 22:28")
+ [LAMBDA (ELEMENTTYPE) (* rrb "17-MAR-83 22:28")
(* goes from an element type name to
its DRAWFN)
(fetch (SKETCHTYPE DRAWFN) of (GETPROP ELEMENTTYPE 'SKETCHTYPE])
(SK.TRANSFORMFN
- [LAMBDA (ELEMENTTYPE) (* rrb " 7-Feb-85 12:08")
+ [LAMBDA (ELEMENTTYPE) (* rrb " 7-Feb-85 12:08")
(* goes from an element type name to
its TRANSFORMFN)
(fetch (SKETCHTYPE TRANSFORMFN) of (GETPROP ELEMENTTYPE 'SKETCHTYPE])
@@ -8420,37 +8321,35 @@ Enter 'Abort' to leave the dashing unchanged.")
(fetch (SKETCHTYPE EXPANDFN) of (GETPROP ELEMENTTYPE 'SKETCHTYPE])
(SK.INPUT
- [LAMBDA (ELEMENTTYPE SKETCHW) (* rrb "11-MAR-83 09:54")
+ [LAMBDA (ELEMENTTYPE SKETCHW) (* rrb "11-MAR-83 09:54")
(* applies an element types input
function to a window.)
(APPLY* (fetch (SKETCHTYPE INPUTFN) of ELEMENTTYPE)
SKETCHW])
(SK.INSIDEFN
- [LAMBDA (ELEMENTTYPE) (* rrb " 4-Oct-86 11:02")
-
- (* goes from an element type name to its inside predicate)
-
+ [LAMBDA (ELEMENTTYPE) (* rrb " 4-Oct-86 11:02")
+ (* goes from an element type name to
+ its inside predicate)
(PROG (SKTYPE)
LP (COND
([NULL (SETQ SKTYPE (GETPROP ELEMENTTYPE 'SKETCHTYPE]
-
- (* unknown sketch type and this is the first place where such is encountered.)
-
+ (* unknown sketch type and this is the
+ first place where such is encountered.)
(ERROR ELEMENTTYPE "Unknown sketch type.
If you can load the file containing it, do so and type 'RETURN'.
-Otherwise, type '^'.")
+Otherwise, type '↑'.")
(GO LP)))
(RETURN (fetch (SKETCHTYPE INSIDEFN) of SKTYPE])
(SK.UPDATEFN
- [LAMBDA (ELEMENTTYPE) (* rrb "21-Dec-84 11:28")
-
- (* goes from an element type name to its updatefn The update function is called
- when an element in a window has changed.
- It will get args of the old local screen element, the new global element and
- the window. If it can update the display more efficiently than erasing and
- redrawing, it should and return the new local sketch element.)
+ [LAMBDA (ELEMENTTYPE) (* rrb "21-Dec-84 11:28")
+
+ (* goes from an element type name to its updatefn The update function is called
+ when an element in a window has changed. It will get args of the old local screen
+ element, the new global element and the window.
+ If it can update the display more efficiently than erasing and redrawing, it
+ should and return the new local sketch element.)
(fetch (SKETCHTYPE UPDATEFN) of (GETPROP ELEMENTTYPE 'SKETCHTYPE])
)
@@ -8639,11 +8538,11 @@ Otherwise, type '^'.")
(DEFINEQ
(SK.CHECK.SKETCH.VERSION
- [LAMBDA (SKETCH) (* ;
- "Edited 21-Oct-92 18:40 by sybalsky:mv:envos")
+ [LAMBDA (SKETCH) (* ;
+ "Edited 21-Oct-92 18:40 by sybalsky:mv:envos")
(* ;;
- "makes sure the sketch is the correct version. If not, it tries to update it. Returns SKETCH.")
+ "makes sure the sketch is the correct version. If not, it tries to update it. Returns SKETCH.")
(COND
((EQ (LISTGET (fetch (SKETCH SKETCHPROPS) of SKETCH)
@@ -8653,46 +8552,43 @@ Otherwise, type '^'.")
(T (SK.INSURE.RECORD.LENGTH (fetch (SKETCH SKETCHELTS) of SKETCH))
(* ;;
- "this is basically a PUTSKETCHPROP expanded in line to avoid coersions which can cause loops.")
+ "this is basically a PUTSKETCHPROP expanded in line to avoid coersions which can cause loops.")
[PROG (PLIST)
(SETQ PLIST (fetch (SKETCH SKETCHPROPS) of SKETCH))
(COND
((SETQ PLIST (fetch (SKETCH SKETCHPROPS) of SKETCH))
(LISTPUT PLIST 'VERSION SKETCH.VERSION))
- (T (replace (SKETCH SKETCHPROPS) of SKETCH with
- (LIST 'VERSION
- SKETCH.VERSION]
+ (T (replace (SKETCH SKETCHPROPS) of SKETCH with (LIST 'VERSION SKETCH.VERSION]
SKETCH])
(SK.INSURE.RECORD.LENGTH
- [LAMBDA (SKETCHELTS) (* ;
- "Edited 21-Oct-92 18:35 by sybalsky:mv:envos")
+ [LAMBDA (SKETCHELTS) (* ;
+ "Edited 21-Oct-92 18:35 by sybalsky:mv:envos")
(* ;; "makes sure the elements have the proper number of fields.")
(bind INDPART TYPE NFIELDS for ELT in SKETCHELTS
do (SETQ INDPART (fetch (GLOBALPART INDIVIDUALGLOBALPART) of ELT))
- (SETQ TYPE (fetch (INDIVIDUALGLOBALPART GTYPE) of INDPART))
- (COND
- ([OR (SETQ NFIELDS (SK.RECORD.LENGTH TYPE))
- (AND (RECLOOK TYPE)
- (SETQ SKETCH.RECORD.LENGTHS
- (NCONC1 SKETCH.RECORD.LENGTHS (LIST TYPE
- (SETQ NFIELDS
- (LENGTH (EVAL (LIST 'CREATE TYPE]
- (SK.INSURE.HAS.LENGTH INDPART NFIELDS TYPE)))
+ (SETQ TYPE (fetch (INDIVIDUALGLOBALPART GTYPE) of INDPART))
+ (COND
+ ([OR (SETQ NFIELDS (SK.RECORD.LENGTH TYPE))
+ (AND (RECLOOK TYPE)
+ (SETQ SKETCH.RECORD.LENGTHS (NCONC1 SKETCH.RECORD.LENGTHS
+ (LIST TYPE
+ (SETQ NFIELDS
+ (LENGTH (EVAL (LIST 'CREATE TYPE]
+ (SK.INSURE.HAS.LENGTH INDPART NFIELDS TYPE)))
- (* ;; "if it's not a record, either it's an unknown sketch element type or its declaration wasn't copied to the compiled file. In either case, assume it has the correct number of fields.")
+ (* ;; "if it's not a record, either it's an unknown sketch element type or its declaration wasn't copied to the compiled file. In either case, assume it has the correct number of fields.")
- (COND
- ((EQ TYPE 'GROUP) (* ;
- "recurse thru the subelements too.")
- (SK.INSURE.RECORD.LENGTH (fetch (GROUP LISTOFGLOBALELTS) of INDPART])
+ (COND
+ ((EQ TYPE 'GROUP) (* ; "recurse thru the subelements too.")
+ (SK.INSURE.RECORD.LENGTH (fetch (GROUP LISTOFGLOBALELTS) of INDPART])
(SK.INSURE.HAS.LENGTH
- [LAMBDA (LIST N TYPE) (* ;
- "Edited 21-Oct-92 18:36 by sybalsky:mv:envos")
+ [LAMBDA (LIST N TYPE) (* ;
+ "Edited 21-Oct-92 18:36 by sybalsky:mv:envos")
(* ;; "makes sure LIST is at least N long. If not, it creates a record of type TYPE and nconcs the enough fields from the end to make it be N long.")
@@ -8705,14 +8601,14 @@ Otherwise, type '^'.")
(for I from (ADD1 (LENGTH LIST)) to N collect NIL])
(SK.RECORD.LENGTH
- [LAMBDA (SKETCHRECORDTYPE) (* rrb "20-Mar-86 14:11")
+ [LAMBDA (SKETCHRECORDTYPE) (* rrb "20-Mar-86 14:11")
(CADR (ASSOC SKETCHRECORDTYPE SKETCH.RECORD.LENGTHS])
(SK.SET.RECORD.LENGTHS
- [LAMBDA NIL (* rrb "18-Oct-85 15:35")
-
- (* sets up a variable that contains the lengths of the sketch element records.)
-
+ [LAMBDA NIL (* rrb "18-Oct-85 15:35")
+ (* sets up a variable that contains
+ the lengths of the sketch element
+ records.)
(SETQ SKETCH.RECORD.LENGTHS (SK.SET.RECORD.LENGTHS.MACRO])
)
(DECLARE%: EVAL@COMPILE
@@ -8736,19 +8632,17 @@ Otherwise, type '^'.")
(DEFINEQ
(SK.ADD.EDIT.COMMAND.TO.FILE.BROWSER
- [LAMBDA NIL (* ; "Edited 12-Feb-88 16:49 by rrb")
-
- (* adds sketch as an option to the file browser edit command.)
-
+ [LAMBDA NIL (* ; "Edited 12-Feb-88 16:49 by rrb")
+ (* adds sketch as an option to the
+ file browser edit command.)
(AND (BOUNDP 'FB.MENU.ITEMS)
(PROG [(PTRX (for MITEM in FB.MENU.ITEMS when (STRING-EQUAL (CAR MITEM)
- "Edit")
- do (RETURN MITEM]
+ "Edit") do (RETURN MITEM]
(SETQ PTRX (ASSOC 'SUBITEMS PTRX))
(for SUBI in PTRX when (STRING-EQUAL (CAR SUBI)
- "Sketch") do (RETURN)
- finally (NCONC1 PTRX (LIST '"Sketch" '(FB.EDITCOMMAND SKETCH)
- "Calls the Sketch editor on selected files"])
+ "Sketch") do (RETURN)
+ finally (NCONC1 PTRX (LIST '"Sketch" '(FB.EDITCOMMAND SKETCH)
+ "Calls the Sketch editor on selected files"])
)
(SK.ADD.EDIT.COMMAND.TO.FILE.BROWSER)
@@ -8761,151 +8655,151 @@ Otherwise, type '^'.")
(ADDTOVAR LAMA SK.UNIONREGIONS SKETCH.CREATE)
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (18222 20092 (SKETCH.FLUSH.EXISTING 18232 . 20090)) (20202 31352 (SKETCH.FROM.A.FILE
-20212 . 20527) (SK.PUT.ON.FILE 20529 . 21981) (SKETCH.PUT 21983 . 24626) (SK.OUTPUT.FILE.NAME 24628 .
-25113) (SK.INCLUDE.FILE 25115 . 27981) (SK.GET.IMAGEOBJ.FROM.FILE 27983 . 30146) (SK.GET.FROM.FILE
-30148 . 31041) (SKETCH.GET 31043 . 31350)) (31353 83865 (SKETCH 31363 . 33468) (SKETCHW.CREATE 33470
- . 38044) (SKETCH.RESET 38046 . 39568) (SKETCHW.FIG.CHANGED 39570 . 39910) (SK.WINDOW.TITLE 39912 .
-40299) (EDITSLIDE 40301 . 40707) (EDITSKETCH 40709 . 41033) (ADD.SKETCH.TO.VIEWER 41035 . 43621) (
-SK.ADD.ELEMENTS.TO.SKETCH 43623 . 44137) (SKETCH.SET.A.DEFAULT 44139 . 51690) (SK.POPUP.SELECTIONFN
-51692 . 52234) (GETSKETCHWREGION 52236 . 52442) (SK.ADD.ELEMENT 52444 . 54023) (
-SK.ADD.PRIORITY.ELEMENT.TO.SKETCH 54025 . 55419) (SK.ELTS.BY.PRIORITY 55421 . 55717) (
-SK.ORDER.ELEMENTS 55719 . 55986) (SK.ADD.PRIORITY.LOCAL.ELEMENT.TO.SKETCH 55988 . 57482) (
-SK.ADD.ELEMENTS 57484 . 58008) (SK.CHECK.WHENADDEDFN 58010 . 58740) (SK.APPLY.MENU.COMMAND 58742 .
-59540) (SK.DELETE.ELEMENT1 59542 . 61120) (SK.MARK.DIRTY 61122 . 61788) (SK.MARK.UNDIRTY 61790 . 62121
-) (SK.MENU.AND.RETURN.FIELD 62123 . 62788) (SKETCH.SET.BRUSH.SHAPE 62790 . 63375) (
-SKETCH.SET.BRUSH.SIZE 63377 . 63883) (SKETCHW.CLOSEFN 63885 . 65676) (SK.CONFIRM.DESTRUCTION 65678 .
-66677) (SKETCHW.OUTFN 66679 . 66943) (SKETCHW.REOPENFN 66945 . 67357) (MAKE.LOCAL.SKETCH 67359 . 68089
-) (MAP.SKETCHSPEC.INTO.VIEWER 68091 . 69301) (SKETCHW.REPAINTFN 69303 . 70131) (SKETCHW.REPAINTFN1
-70133 . 71072) (SK.DRAWFIGURE.IF 71074 . 71596) (SKETCHW.SCROLLFN 71598 . 75791) (SKETCHW.RESHAPEFN
-75793 . 78051) (SK.UPDATE.EVENT.SELECTION 78053 . 80108) (LIGHTGRAYWINDOW 80110 . 80273) (
-SK.ADD.SPACES 80275 . 81021) (SK.SKETCH.MENU 81023 . 81345) (SK.CHECK.IMAGEOBJ.WHENDELETEDFN 81347 .
-82199) (SK.APPLY.IMAGEOBJ.WHENDELETEDFN 82201 . 83161) (SK.RETURN.TTY 83163 . 83531) (SK.TAKE.TTY
-83533 . 83863)) (83919 107334 (SKETCH.COMMANDMENU 83929 . 84353) (SKETCH.COMMANDMENU.ITEMS 84355 .
-104438) (CREATE.SKETCHW.COMMANDMENU 104440 . 104860) (SKETCHW.SELECTIONFN 104862 . 105965) (
-SKETCH.MONITORLOCK 105967 . 106438) (SK.EVAL.AS.PROCESS 106440 . 107053) (SK.EVAL.WITH.LOCK 107055 .
-107332)) (107335 115139 (SK.FIX.MENU 107345 . 108439) (SK.SET.UP.MENUS 108441 . 110742) (
-SK.INSURE.HAS.MENU 110744 . 111406) (SK.CREATE.STANDARD.MENU 111408 . 111853) (SK.ADD.ITEM.TO.MENU
-111855 . 112530) (SK.GET.VIEWER.POPUP.MENU 112532 . 114733) (SK.CLEAR.POPUP.MENU 114735 . 115137)) (
-115195 124017 (SKETCH.CREATE 115205 . 115991) (GETSKETCHPROP 115993 . 119050) (PUTSKETCHPROP 119052 .
-122984) (CREATE.DEFAULT.SKETCH.CONTEXT 122986 . 124015)) (124183 147079 (SK.COPY.BUTTONEVENTFN 124193
- . 135421) (SK.BUTTONEVENT.MARK 135423 . 135806) (SK.BUILD.IMAGEOBJ 135808 . 145723) (
-SK.BUTTONEVENT.OVERP 145725 . 146348) (SK.BUTTONEVENT.SAME.KEYS 146350 . 147077)) (147358 173173 (
-SK.SEL.AND.CHANGE 147368 . 147660) (SK.CHECK.WHENCHANGEDFN 147662 . 148368) (SK.CHECK.PRECHANGEFN
-148370 . 148971) (SK.CHANGE.ELT 148973 . 149165) (SK.CHANGE.THING 149167 . 150418) (
-SKETCH.CHANGE.ELEMENTS 150420 . 151603) (SK.APPLY.SINGLE.CHANGEFN 151605 . 152178) (SK.DO.CHANGESPECS
-152180 . 153839) (SK.VIEWER.FROM.SKETCH.ARG 153841 . 154283) (SK.DO.CHANGESPEC1 154285 . 156160) (
-SK.CHANGEFN 156162 . 156742) (SK.READCHANGEFN 156744 . 157203) (SK.DEFAULT.CHANGEFN 157205 . 159677) (
-CHANGEABLEFIELDITEMS 159679 . 160326) (SK.APPLY.CHANGE.COMMAND 160328 . 160945) (
-SK.DO.AND.RECORD.CHANGES 160947 . 162344) (SK.APPLY.CHANGE.COMMAND1 162346 . 163834) (
-SK.ELEMENTS.CHANGEFN 163836 . 166160) (READ.POINT.TO.ADD 166162 . 167106) (GLOBAL.KNOT.FROM.LOCAL
-167108 . 167568) (SK.ADD.KNOT.TO.ELEMENT 167570 . 168514) (SK.GROUP.CHANGEFN 168516 . 169728) (
-SK.GROUP.CHANGEFN1 169730 . 173171)) (173340 187073 (ADD.ELEMENT.TO.SKETCH 173350 . 175056) (
-ADD.SKETCH.VIEWER 175058 . 175726) (REMOVE.SKETCH.VIEWER 175728 . 176341) (ALL.SKETCH.VIEWERS 176343
- . 176583) (SKETCH.ALL.VIEWERS 176585 . 176845) (VIEWER.BUCKET 176847 . 176998) (ELT.INSIDE.REGION?
-177000 . 177327) (ELT.INSIDE.SKWP 177329 . 177620) (SCALE.FROM.SKW 177622 . 177872) (
-SK.ADDELT.TO.WINDOW 177874 . 178734) (SK.CALC.REGION.VIEWED 178736 . 179114) (SK.DRAWFIGURE 179116 .
-180405) (SK.DRAWFIGURE1 180407 . 180791) (SK.LOCAL.FROM.GLOBAL 180793 . 182028) (SKETCH.REGION.VIEWED
-182030 . 184717) (SKETCH.VIEW.FROM.NAME 184719 . 185149) (SK.UPDATE.REGION.VIEWED 185151 . 185543) (
-SKETCH.ADD.AND.DISPLAY 185545 . 185953) (SKETCH.ADD.AND.DISPLAY1 185955 . 186393) (SK.ADD.ITEM 186395
- . 186727) (SKETCHW.ADD.INSTANCE 186729 . 187071)) (187114 200302 (SK.SEL.AND.DELETE 187124 . 187512)
-(SK.ERASE.AND.DELETE.ITEM 187514 . 187933) (REMOVE.ELEMENT.FROM.SKETCH 187935 . 189046) (
-SK.DELETE.ELEMENT 189048 . 189606) (SK.DELETE.ELEMENT2 189608 . 190269) (SK.DELETE.KNOT 190271 .
-190562) (SK.SEL.AND.DELETE.KNOT 190564 . 191689) (SK.DELETE.ELEMENT.KNOT 191691 . 194898) (
-SK.CHECK.WHENDELETEDFN 194900 . 195680) (SK.CHECK.PREEDITFN 195682 . 196166) (
-SK.CHECK.END.INITIAL.EDIT 196168 . 196702) (SK.CHECK.WHENPOINTDELETEDFN 196704 . 197500) (SK.ERASE.ELT
- 197502 . 197838) (SK.DELETE.ELT 197840 . 198215) (SK.DELETE.ITEM 198217 . 198625) (DELFROMTCONC
-198627 . 200300)) (200341 214175 (SK.COPY.ELT 200351 . 200721) (SK.SEL.AND.COPY 200723 . 201106) (
-SK.COPY.ELEMENTS 201108 . 206736) (SK.ADD.COPY.OF.ELEMENTS 206738 . 208505) (
-SK.GLOBAL.FROM.LOCAL.ELEMENTS 208507 . 208747) (SK.COPY.ITEM 208749 . 209546) (SK.INSERT.SKETCH 209548
- . 214173)) (214215 244236 (SK.MOVE.ELT 214225 . 214500) (SK.MOVE.ELT.OR.PT 214502 . 214815) (
-SK.APPLY.DEFAULT.MOVE 214817 . 215251) (SK.SEL.AND.MOVE 215253 . 215800) (SK.MOVE.ELEMENTS 215802 .
-226674) (SKETCH.MOVE.ELEMENTS 226676 . 228607) (SKETCH.COPY.ELEMENTS 228609 . 230656) (
-\SKETCH.COPY.ELEMENT 230658 . 231383) (SK.TRANSLATE.ELEMENT 231385 . 231868) (SK.COPY.GLOBAL.ELEMENT
-231870 . 232081) (SK.MAKE.ELEMENT.MOVE.ARG 232083 . 232703) (SK.MAKE.ELEMENTS.MOVE.ARG 232705 . 233227
-) (SK.MAKE.POINTS.AND.ELEMENTS.MOVE.ARG 233229 . 234298) (SK.SHOW.FIG.FROM.INFO 234300 . 234668) (
-SK.MOVE.THING 234670 . 235576) (UPDATE.ELEMENT.IN.SKETCH 235578 . 237633) (SK.UPDATE.ELEMENT 237635 .
-239194) (SK.UPDATE.ELEMENTS 239196 . 239915) (SK.UPDATE.ELEMENT1 239917 . 243817) (
-SK.MOVE.ELEMENT.POINT 243819 . 244234)) (244299 266588 (SK.MOVE.POINTS 244309 . 244596) (
-SK.SEL.AND.MOVE.POINTS 244598 . 244903) (SK.DO.MOVE.ELEMENT.POINTS 244905 . 253562) (
-SK.MOVE.ITEM.POINTS 253564 . 255235) (SK.TRANSLATEPTSFN 255237 . 255621) (SK.TRANSLATE.POINTS 255623
- . 256524) (SK.SELECT.MULTIPLE.POINTS 256526 . 262166) (SK.CONTROL.POINTS.IN.REGION 262168 . 263589) (
-SK.ADD.PT.SELECTION 263591 . 264055) (SK.REMOVE.PT.SELECTION 264057 . 264674) (SK.ADD.POINT 264676 .
-265299) (SK.ELTS.CONTAINING.PTS 265301 . 265926) (SK.HOTSPOTS.NOT.ON.LIST 265928 . 266586)) (266746
-269542 (SK.SET.MOVE.MODE 266756 . 267427) (SK.SET.MOVE.MODE.POINTS 267429 . 267768) (
-SK.SET.MOVE.MODE.ELEMENTS 267770 . 268114) (SK.SET.MOVE.MODE.COMBINED 268116 . 268466) (READMOVEMODE
-268468 . 269540)) (269543 288298 (SK.ALIGN.POINTS 269553 . 269843) (SK.SEL.AND.ALIGN.POINTS 269845 .
-270154) (SK.ALIGN.POINTS.LEFT 270156 . 270459) (SK.ALIGN.POINTS.RIGHT 270461 . 270766) (
-SK.ALIGN.POINTS.TOP 270768 . 271069) (SK.ALIGN.POINTS.BOTTOM 271071 . 271378) (
-SK.EVEN.SPACE.POINTS.IN.X 271380 . 271700) (SK.EVEN.SPACE.POINTS.IN.Y 271702 . 272022) (
-SK.DO.ALIGN.POINTS 272024 . 282646) (SK.NTH.CONTROL.POINT 282648 . 283109) (
-SK.GET.SELECTED.ELEMENT.STRUCTURE 283111 . 283777) (SK.CORRESPONDING.CONTROL.PT 283779 . 284333) (
-SK.CONTROL.POINT.NUMBER 284335 . 284705) (SK.DO.ALIGN.SETVALUE 284707 . 288296)) (288362 301794 (
-SKETCH.CREATE.GROUP 288372 . 288861) (SK.CREATE.GROUP1 288863 . 289410) (SK.UPDATE.GROUP.AFTER.CHANGE
-289412 . 290201) (SK.GROUP.ELTS 290203 . 290484) (SK.SEL.AND.GROUP 290486 . 290872) (SK.GROUP.ELEMENTS
- 290874 . 292523) (SK.UNGROUP.ELT 292525 . 292809) (SK.SEL.AND.UNGROUP 292811 . 294480) (
-SK.UNGROUP.ELEMENT 294482 . 295418) (SK.GLOBAL.REGION.OF.LOCAL.ELEMENTS 295420 . 296342) (
-SK.LOCAL.REGION.OF.LOCAL.ELEMENTS 296344 . 297355) (SK.GLOBAL.REGION.OF.GLOBAL.ELEMENTS 297357 .
-298697) (SK.UNIONREGIONS 298699 . 301065) (SKETCH.REGION.OF.SKETCH 301067 . 301483) (SK.FLASHREGION
-301485 . 301792)) (301795 315266 (INIT.GROUP.ELEMENT 301805 . 302677) (GROUP.DRAWFN 302679 . 303129) (
-GROUP.EXPANDFN 303131 . 304694) (GROUP.INSIDEFN 304696 . 305105) (GROUP.REGIONFN 305107 . 305502) (
-GROUP.GLOBALREGIONFN 305504 . 305822) (GROUP.TRANSLATEFN 305824 . 307856) (GROUP.TRANSFORMFN 307858 .
-311338) (GROUP.READCHANGEFN 311340 . 315264)) (315267 316275 (REGION.CENTER 315277 . 315878) (
-REMOVE.LAST 315880 . 316273)) (316328 321435 (SK.MOVE.GROUP.CONTROL.PT 316338 . 316629) (
-SK.SEL.AND.MOVE.CONTROL.PT 316631 . 318035) (SK.MOVE.GROUP.ELEMENT.CONTROL.POINT 318037 . 320110) (
-SK.READ.NEW.GROUP.CONTROL.PT 320112 . 321433)) (321694 326318 (SK.DO.GROUP 321704 . 323156) (
-SK.CHECK.WHENGROUPEDFN 323158 . 323868) (SK.DO.UNGROUP 323870 . 325075) (SK.CHECK.WHENUNGROUPEDFN
-325077 . 325664) (SK.GROUP.UNDO 325666 . 325989) (SK.UNGROUP.UNDO 325991 . 326316)) (326559 331481 (
-SK.FREEZE.ELTS 326569 . 326853) (SK.SEL.AND.FREEZE 326855 . 327245) (SK.FREEZE.ELEMENTS 327247 .
-327798) (SK.UNFREEZE.ELT 327800 . 328089) (SK.SEL.AND.UNFREEZE 328091 . 329627) (SK.UNFREEZE.ELEMENTS
-329629 . 330188) (SK.FREEZE.UNDO 330190 . 330435) (SK.UNFREEZE.UNDO 330437 . 330684) (SK.DO.FREEZE
-330686 . 331079) (SK.DO.UNFREEZE 331081 . 331479)) (331711 341521 (SKETCH.ELEMENTS.OF.SKETCH 331721 .
-332556) (SKETCH.LIST.OF.ELEMENTS 332558 . 333276) (SKETCH.ADD.ELEMENT 333278 . 334353) (
-SKETCH.DELETE.ELEMENT 334355 . 336087) (DELFROMGROUPELT 336089 . 336889) (SKETCH.ELEMENT.TYPE 336891
- . 337240) (SKETCH.ELEMENT.CHANGED 337242 . 338810) (SK.ELEMENT.CHANGED1 338812 . 339463) (
-SK.UPDATE.GLOBAL.IMAGE.OBJECT.ELEMENT 339465 . 341519)) (341575 346187 (INSURE.SKETCH 341585 . 344200)
- (LOCALSPECS.FROM.VIEWER 344202 . 344562) (SK.LOCAL.ELT.FROM.GLOBALPART 344564 . 345032) (
-SKETCH.FROM.VIEWER 345034 . 345268) (INSPECT.SKETCH 345270 . 345595) (ELT.INSIDE.SKETCHWP 345597 .
-345870) (SK.INSIDE.REGION 345872 . 346185)) (346188 350518 (MAPSKETCHSPECS 346198 . 346819) (
-MAPCOLLECTSKETCHSPECS 346821 . 347570) (MAPSKETCHSPECSUNTIL 347572 . 348380) (MAPGLOBALSKETCHSPECS
-348382 . 349083) (MAPGLOBALSKETCHELEMENTS 349085 . 350516)) (350580 376472 (SK.ADD.SELECTION 350590 .
-351330) (SK.COPY.INSERTFN 351332 . 354963) (SCREENELEMENTP 354965 . 355438) (SK.ITEM.REGION 355440 .
-355927) (SK.ELEMENT.GLOBAL.REGION 355929 . 356457) (SK.LOCAL.ITEMS.IN.REGION 356459 . 358438) (
-SK.REGIONFN 358440 . 358762) (SK.GLOBAL.REGIONFN 358764 . 359122) (SK.REMOVE.SELECTION 359124 . 359852
-) (SK.SELECT.MULTIPLE.ITEMS 359854 . 370296) (SKETCH.GET.ELEMENTS 370298 . 371721) (SK.PUT.MARKS.UP
-371723 . 372062) (SK.TAKE.MARKS.DOWN 372064 . 372403) (SK.TRANSLATE.GLOBALPART 372405 . 374532) (
-SK.TRANSLATE.ITEM 374534 . 375461) (SK.TRANSLATEFN 375463 . 375659) (TRANSLATE.SKETCH 375661 . 376470)
-) (376738 379645 (SK.INPUT.SCALE 376748 . 377595) (SK.UPDATE.SKETCHCONTEXT 377597 . 378194) (
-SK.SET.INPUT.SCALE 378196 . 378845) (SK.SET.INPUT.SCALE.CURRENT 378847 . 379138) (
-SK.SET.INPUT.SCALE.VALUE 379140 . 379643)) (379696 381608 (SK.SET.FEEDBACK.MODE 379706 . 381012) (
-SK.SET.FEEDBACK.POINT 381014 . 381182) (SK.SET.FEEDBACK.VERBOSE 381184 . 381353) (
-SK.SET.FEEDBACK.ALWAYS 381355 . 381606)) (381759 383137 (SKETCH.TITLE 381769 . 382133) (
-SK.SHRINK.ICONCREATE 382135 . 383135)) (388827 391641 (READBRUSHSHAPE 388837 . 389296) (READ.FUNCTION
-389298 . 389813) (READBRUSHSIZE 389815 . 390273) (READANGLE 390275 . 390767) (READARCDIRECTION 390769
- . 391639)) (391642 402053 (SK.CHANGE.DASHING 391652 . 395600) (READ.AND.SAVE.NEW.DASHING 395602 .
-397370) (READ.NEW.DASHING 397372 . 399112) (READ.DASHING.CHANGE 399114 . 400589) (SK.CACHE.DASHING
-400591 . 401593) (SK.DASHING.LABEL 401595 . 402051)) (402054 405759 (READ.FILLING.CHANGE 402064 .
-404045) (SK.CACHE.FILLING 404047 . 404765) (READ.AND.SAVE.NEW.FILLING 404767 . 405365) (
-SK.FILLING.LABEL 405367 . 405757)) (406143 442396 (SK.GETGLOBALPOSITION 406153 . 406458) (
-SKETCH.TRACK.ELEMENTS 406460 . 409980) (SK.PICKOUT.WHOLE.MOVE.ELEMENTS 409982 . 410541) (
-MAP.SKETCH.ELEMENTS.INTO.VIEWER 410543 . 410935) (MAP.GLOBAL.POSITION.INTO.VIEWER 410937 . 411317) (
-SKETCH.TO.VIEWER.POSITION 411319 . 411678) (SKETCH.TRACK.IMAGE 411680 . 412534) (SK.TRACK.IMAGE1
-412536 . 413948) (MAP.VIEWER.XY.INTO.GLOBAL 413950 . 414944) (SK.SET.POSITION 414946 . 415282) (
-MAP.VIEWER.PT.INTO.GLOBAL 415284 . 416390) (VIEWER.TO.SKETCH.POSITION 416392 . 417027) (
-SK.INSURE.SCALE 417029 . 417289) (SKETCH.TO.VIEWER.REGION 417291 . 418097) (VIEWER.TO.SKETCH.REGION
-418099 . 418437) (SK.READ.POINT.WITH.FEEDBACK 418439 . 429442) (SKETCH.GET.POSITION 429444 . 431324) (
-\CLOBBER.POSITION 431326 . 431774) (NEAREST.HOT.SPOT 431776 . 433304) (GETWREGION 433306 . 434067) (
-GET.BITMAP.POSITION 434069 . 434853) (SK.TRACK.BITMAP1 434855 . 442394)) (442965 473851 (
-SK.BRING.UP.POSITION.PAD 442975 . 448835) (SK.PAD.READER.POSITION 448837 . 450486) (
-SK.POSITION.READER.REPAINTFN 450488 . 452272) (SK.POSITION.PAD.FROM.VIEWER 452274 . 453616) (
-SK.INIT.POSITION.NUMBER.PAD.MENU 453618 . 453968) (SK.READ.POSITION.PAD.HANDLER 453970 . 459702) (
-DISPLAY.POSITION.READER.TOTAL 459704 . 462002) (POSITION.PAD.READER.HANDLER 462004 . 470047) (
-POSITIONPAD.HELDFN 470049 . 471533) (\POSITION.PAD.ADD.DIGIT.MENU 471535 . 473114) (
-\POSITION.READER.NUMBERPAD 473116 . 473849)) (475477 478155 (SK.DRAWFN 475487 . 475853) (
-SK.TRANSFORMFN 475855 . 476236) (SK.EXPANDFN 476238 . 476515) (SK.INPUT 476517 . 476898) (SK.INSIDEFN
-476900 . 477540) (SK.UPDATEFN 477542 . 478153)) (483320 485476 (UPDATE-SKETCH 483330 . 484443) (
-EDIT-SKETCH 484445 . 485474)) (486077 490022 (SK.CHECK.SKETCH.VERSION 486087 . 487327) (
-SK.INSURE.RECORD.LENGTH 487329 . 488812) (SK.INSURE.HAS.LENGTH 488814 . 489552) (SK.RECORD.LENGTH
-489554 . 489728) (SK.SET.RECORD.LENGTHS 489730 . 490020)) (490485 491372 (
-SK.ADD.EDIT.COMMAND.TO.FILE.BROWSER 490495 . 491370)))))
+ (FILEMAP (NIL (18101 19973 (SKETCH.FLUSH.EXISTING 18111 . 19971)) (20083 31463 (SKETCH.FROM.A.FILE
+20093 . 20509) (SK.PUT.ON.FILE 20511 . 22007) (SKETCH.PUT 22009 . 24652) (SK.OUTPUT.FILE.NAME 24654 .
+25139) (SK.INCLUDE.FILE 25141 . 28007) (SK.GET.IMAGEOBJ.FROM.FILE 28009 . 30172) (SK.GET.FROM.FILE
+30174 . 31156) (SKETCH.GET 31158 . 31461)) (31464 90453 (SKETCH 31474 . 33642) (SKETCHW.CREATE 33644
+ . 43169) (SKETCH.RESET 43171 . 44794) (SKETCHW.FIG.CHANGED 44796 . 45120) (SK.WINDOW.TITLE 45122 .
+45610) (EDITSLIDE 45612 . 46123) (EDITSKETCH 46125 . 46445) (ADD.SKETCH.TO.VIEWER 46447 . 49037) (
+SK.ADD.ELEMENTS.TO.SKETCH 49039 . 49537) (SKETCH.SET.A.DEFAULT 49539 . 57098) (SK.POPUP.SELECTIONFN
+57100 . 57626) (GETSKETCHWREGION 57628 . 57830) (SK.ADD.ELEMENT 57832 . 59395) (
+SK.ADD.PRIORITY.ELEMENT.TO.SKETCH 59397 . 60751) (SK.ELTS.BY.PRIORITY 60753 . 61034) (
+SK.ORDER.ELEMENTS 61036 . 61288) (SK.ADD.PRIORITY.LOCAL.ELEMENT.TO.SKETCH 61290 . 62901) (
+SK.ADD.ELEMENTS 62903 . 63516) (SK.CHECK.WHENADDEDFN 63518 . 64232) (SK.APPLY.MENU.COMMAND 64234 .
+65074) (SK.DELETE.ELEMENT1 65076 . 66626) (SK.MARK.DIRTY 66628 . 67382) (SK.MARK.UNDIRTY 67384 . 67802
+) (SK.MENU.AND.RETURN.FIELD 67804 . 68576) (SKETCH.SET.BRUSH.SHAPE 68578 . 69161) (
+SKETCH.SET.BRUSH.SIZE 69163 . 69665) (SKETCHW.CLOSEFN 69667 . 71612) (SK.CONFIRM.DESTRUCTION 71614 .
+72596) (SKETCHW.OUTFN 72598 . 72846) (SKETCHW.REOPENFN 72848 . 73426) (MAKE.LOCAL.SKETCH 73428 . 74125
+) (MAP.SKETCHSPEC.INTO.VIEWER 74127 . 75427) (SKETCHW.REPAINTFN 75429 . 76317) (SKETCHW.REPAINTFN1
+76319 . 77241) (SK.DRAWFIGURE.IF 77243 . 77742) (SKETCHW.SCROLLFN 77744 . 82116) (SKETCHW.RESHAPEFN
+82118 . 84558) (SK.UPDATE.EVENT.SELECTION 84560 . 86599) (LIGHTGRAYWINDOW 86601 . 86760) (
+SK.ADD.SPACES 86762 . 87504) (SK.SKETCH.MENU 87506 . 87824) (SK.CHECK.IMAGEOBJ.WHENDELETEDFN 87826 .
+88663) (SK.APPLY.IMAGEOBJ.WHENDELETEDFN 88665 . 89757) (SK.RETURN.TTY 89759 . 90123) (SK.TAKE.TTY
+90125 . 90451)) (90507 114106 (SKETCH.COMMANDMENU 90517 . 90951) (SKETCH.COMMANDMENU.ITEMS 90953 .
+111036) (CREATE.SKETCHW.COMMANDMENU 111038 . 111454) (SKETCHW.SELECTIONFN 111456 . 112539) (
+SKETCH.MONITORLOCK 112541 . 113008) (SK.EVAL.AS.PROCESS 113010 . 113724) (SK.EVAL.WITH.LOCK 113726 .
+114104)) (114107 122470 (SK.FIX.MENU 114117 . 115312) (SK.SET.UP.MENUS 115314 . 117674) (
+SK.INSURE.HAS.MENU 117676 . 118418) (SK.CREATE.STANDARD.MENU 118420 . 118861) (SK.ADD.ITEM.TO.MENU
+118863 . 119759) (SK.GET.VIEWER.POPUP.MENU 119761 . 122080) (SK.CLEAR.POPUP.MENU 122082 . 122468)) (
+122526 131359 (SKETCH.CREATE 122536 . 123320) (GETSKETCHPROP 123322 . 126375) (PUTSKETCHPROP 126377 .
+130302) (CREATE.DEFAULT.SKETCH.CONTEXT 130304 . 131357)) (131525 153881 (SK.COPY.BUTTONEVENTFN 131535
+ . 143424) (SK.BUTTONEVENT.MARK 143426 . 143910) (SK.BUILD.IMAGEOBJ 143912 . 152471) (
+SK.BUTTONEVENT.OVERP 152473 . 153080) (SK.BUTTONEVENT.SAME.KEYS 153082 . 153879)) (154160 180880 (
+SK.SEL.AND.CHANGE 154170 . 154563) (SK.CHECK.WHENCHANGEDFN 154565 . 155255) (SK.CHECK.PRECHANGEFN
+155257 . 155842) (SK.CHANGE.ELT 155844 . 156032) (SK.CHANGE.THING 156034 . 157453) (
+SKETCH.CHANGE.ELEMENTS 157455 . 158617) (SK.APPLY.SINGLE.CHANGEFN 158619 . 159176) (SK.DO.CHANGESPECS
+159178 . 160932) (SK.VIEWER.FROM.SKETCH.ARG 160934 . 161360) (SK.DO.CHANGESPEC1 161362 . 163354) (
+SK.CHANGEFN 163356 . 163920) (SK.READCHANGEFN 163922 . 164364) (SK.DEFAULT.CHANGEFN 164366 . 166977) (
+CHANGEABLEFIELDITEMS 166979 . 167606) (SK.APPLY.CHANGE.COMMAND 167608 . 168325) (
+SK.DO.AND.RECORD.CHANGES 168327 . 169696) (SK.APPLY.CHANGE.COMMAND1 169698 . 171158) (
+SK.ELEMENTS.CHANGEFN 171160 . 173535) (READ.POINT.TO.ADD 173537 . 174465) (GLOBAL.KNOT.FROM.LOCAL
+174467 . 175028) (SK.ADD.KNOT.TO.ELEMENT 175030 . 176135) (SK.GROUP.CHANGEFN 176137 . 177343) (
+SK.GROUP.CHANGEFN1 177345 . 180878)) (181047 195989 (ADD.ELEMENT.TO.SKETCH 181057 . 182747) (
+ADD.SKETCH.VIEWER 182749 . 183413) (REMOVE.SKETCH.VIEWER 183415 . 184024) (ALL.SKETCH.VIEWERS 184026
+ . 184367) (SKETCH.ALL.VIEWERS 184369 . 184629) (VIEWER.BUCKET 184631 . 184778) (ELT.INSIDE.REGION?
+184780 . 185208) (ELT.INSIDE.SKWP 185210 . 185602) (SCALE.FROM.SKW 185604 . 185850) (
+SK.ADDELT.TO.WINDOW 185852 . 187019) (SK.CALC.REGION.VIEWED 187021 . 187395) (SK.DRAWFIGURE 187397 .
+188668) (SK.DRAWFIGURE1 188670 . 189050) (SK.LOCAL.FROM.GLOBAL 189052 . 190428) (SKETCH.REGION.VIEWED
+190430 . 193366) (SKETCH.VIEW.FROM.NAME 193368 . 193899) (SK.UPDATE.REGION.VIEWED 193901 . 194289) (
+SKETCH.ADD.AND.DISPLAY 194291 . 194683) (SKETCH.ADD.AND.DISPLAY1 194685 . 195224) (SK.ADD.ITEM 195226
+ . 195542) (SKETCHW.ADD.INSTANCE 195544 . 195987)) (196030 209355 (SK.SEL.AND.DELETE 196040 . 196424)
+(SK.ERASE.AND.DELETE.ITEM 196426 . 196841) (REMOVE.ELEMENT.FROM.SKETCH 196843 . 197937) (
+SK.DELETE.ELEMENT 197939 . 198481) (SK.DELETE.ELEMENT2 198483 . 199128) (SK.DELETE.KNOT 199130 .
+199522) (SK.SEL.AND.DELETE.KNOT 199524 . 200645) (SK.DELETE.ELEMENT.KNOT 200647 . 203860) (
+SK.CHECK.WHENDELETEDFN 203862 . 204625) (SK.CHECK.PREEDITFN 204627 . 205212) (
+SK.CHECK.END.INITIAL.EDIT 205214 . 205732) (SK.CHECK.WHENPOINTDELETEDFN 205734 . 206514) (SK.ERASE.ELT
+ 206516 . 206848) (SK.DELETE.ELT 206850 . 207221) (SK.DELETE.ITEM 207223 . 207627) (DELFROMTCONC
+207629 . 209353)) (209394 223511 (SK.COPY.ELT 209404 . 209770) (SK.SEL.AND.COPY 209772 . 210151) (
+SK.COPY.ELEMENTS 210153 . 215995) (SK.ADD.COPY.OF.ELEMENTS 215997 . 217811) (
+SK.GLOBAL.FROM.LOCAL.ELEMENTS 217813 . 218138) (SK.COPY.ITEM 218140 . 218904) (SK.INSERT.SKETCH 218906
+ . 223509)) (223551 253998 (SK.MOVE.ELT 223561 . 223937) (SK.MOVE.ELT.OR.PT 223939 . 224353) (
+SK.APPLY.DEFAULT.MOVE 224355 . 224956) (SK.SEL.AND.MOVE 224958 . 225489) (SK.MOVE.ELEMENTS 225491 .
+236561) (SKETCH.MOVE.ELEMENTS 236563 . 238453) (SKETCH.COPY.ELEMENTS 238455 . 240461) (
+\SKETCH.COPY.ELEMENT 240463 . 241180) (SK.TRANSLATE.ELEMENT 241182 . 241649) (SK.COPY.GLOBAL.ELEMENT
+241651 . 241862) (SK.MAKE.ELEMENT.MOVE.ARG 241864 . 242467) (SK.MAKE.ELEMENTS.MOVE.ARG 242469 . 242974
+) (SK.MAKE.POINTS.AND.ELEMENTS.MOVE.ARG 242976 . 244028) (SK.SHOW.FIG.FROM.INFO 244030 . 244394) (
+SK.MOVE.THING 244396 . 245298) (UPDATE.ELEMENT.IN.SKETCH 245300 . 247303) (SK.UPDATE.ELEMENT 247305 .
+248822) (SK.UPDATE.ELEMENTS 248824 . 249527) (SK.UPDATE.ELEMENT1 249529 . 253583) (
+SK.MOVE.ELEMENT.POINT 253585 . 253996)) (254061 277032 (SK.MOVE.POINTS 254071 . 254459) (
+SK.SEL.AND.MOVE.POINTS 254461 . 254751) (SK.DO.MOVE.ELEMENT.POINTS 254753 . 263337) (
+SK.MOVE.ITEM.POINTS 263339 . 265094) (SK.TRANSLATEPTSFN 265096 . 265476) (SK.TRANSLATE.POINTS 265478
+ . 266375) (SK.SELECT.MULTIPLE.POINTS 266377 . 272279) (SK.CONTROL.POINTS.IN.REGION 272281 . 273754) (
+SK.ADD.PT.SELECTION 273756 . 274216) (SK.REMOVE.PT.SELECTION 274218 . 274820) (SK.ADD.POINT 274822 .
+275550) (SK.ELTS.CONTAINING.PTS 275552 . 276385) (SK.HOTSPOTS.NOT.ON.LIST 276387 . 277030)) (277190
+280066 (SK.SET.MOVE.MODE 277200 . 277856) (SK.SET.MOVE.MODE.POINTS 277858 . 278193) (
+SK.SET.MOVE.MODE.ELEMENTS 278195 . 278535) (SK.SET.MOVE.MODE.COMBINED 278537 . 278883) (READMOVEMODE
+278885 . 280064)) (280067 299658 (SK.ALIGN.POINTS 280077 . 280468) (SK.SEL.AND.ALIGN.POINTS 280470 .
+280764) (SK.ALIGN.POINTS.LEFT 280766 . 281170) (SK.ALIGN.POINTS.RIGHT 281172 . 281578) (
+SK.ALIGN.POINTS.TOP 281580 . 281982) (SK.ALIGN.POINTS.BOTTOM 281984 . 282392) (
+SK.EVEN.SPACE.POINTS.IN.X 282394 . 282815) (SK.EVEN.SPACE.POINTS.IN.Y 282817 . 283238) (
+SK.DO.ALIGN.POINTS 283240 . 293968) (SK.NTH.CONTROL.POINT 293970 . 294431) (
+SK.GET.SELECTED.ELEMENT.STRUCTURE 294433 . 295084) (SK.CORRESPONDING.CONTROL.PT 295086 . 295624) (
+SK.CONTROL.POINT.NUMBER 295626 . 296097) (SK.DO.ALIGN.SETVALUE 296099 . 299656)) (299722 313949 (
+SKETCH.CREATE.GROUP 299732 . 300217) (SK.CREATE.GROUP1 300219 . 300768) (SK.UPDATE.GROUP.AFTER.CHANGE
+300770 . 301660) (SK.GROUP.ELTS 301662 . 302044) (SK.SEL.AND.GROUP 302046 . 302428) (SK.GROUP.ELEMENTS
+ 302430 . 304174) (SK.UNGROUP.ELT 304176 . 304561) (SK.SEL.AND.UNGROUP 304563 . 306228) (
+SK.UNGROUP.ELEMENT 306230 . 307298) (SK.GLOBAL.REGION.OF.LOCAL.ELEMENTS 307300 . 308323) (
+SK.LOCAL.REGION.OF.LOCAL.ELEMENTS 308325 . 309437) (SK.GLOBAL.REGION.OF.GLOBAL.ELEMENTS 309439 .
+310868) (SK.UNIONREGIONS 310870 . 313228) (SKETCH.REGION.OF.SKETCH 313230 . 313642) (SK.FLASHREGION
+313644 . 313947)) (313950 327728 (INIT.GROUP.ELEMENT 313960 . 314828) (GROUP.DRAWFN 314830 . 315276) (
+GROUP.EXPANDFN 315278 . 316951) (GROUP.INSIDEFN 316953 . 317463) (GROUP.REGIONFN 317465 . 317856) (
+GROUP.GLOBALREGIONFN 317858 . 318277) (GROUP.TRANSLATEFN 318279 . 320294) (GROUP.TRANSFORMFN 320296 .
+323798) (GROUP.READCHANGEFN 323800 . 327726)) (327729 328737 (REGION.CENTER 327739 . 328340) (
+REMOVE.LAST 328342 . 328735)) (328790 334311 (SK.MOVE.GROUP.CONTROL.PT 328800 . 329192) (
+SK.SEL.AND.MOVE.CONTROL.PT 329194 . 330699) (SK.MOVE.GROUP.ELEMENT.CONTROL.POINT 330701 . 332885) (
+SK.READ.NEW.GROUP.CONTROL.PT 332887 . 334309)) (334570 339213 (SK.DO.GROUP 334580 . 336071) (
+SK.CHECK.WHENGROUPEDFN 336073 . 336779) (SK.DO.UNGROUP 336781 . 337982) (SK.CHECK.WHENUNGROUPEDFN
+337984 . 338567) (SK.GROUP.UNDO 338569 . 338888) (SK.UNGROUP.UNDO 338890 . 339211)) (339454 344546 (
+SK.FREEZE.ELTS 339464 . 339849) (SK.SEL.AND.FREEZE 339851 . 340237) (SK.FREEZE.ELEMENTS 340239 .
+340786) (SK.UNFREEZE.ELT 340788 . 341178) (SK.SEL.AND.UNFREEZE 341180 . 342712) (SK.UNFREEZE.ELEMENTS
+342714 . 343269) (SK.FREEZE.UNDO 343271 . 343512) (SK.UNFREEZE.UNDO 343514 . 343757) (SK.DO.FREEZE
+343759 . 344148) (SK.DO.UNFREEZE 344150 . 344544)) (344776 354859 (SKETCH.ELEMENTS.OF.SKETCH 344786 .
+345599) (SKETCH.LIST.OF.ELEMENTS 345601 . 346300) (SKETCH.ADD.ELEMENT 346302 . 347360) (
+SKETCH.DELETE.ELEMENT 347362 . 349074) (DELFROMGROUPELT 349076 . 349977) (SKETCH.ELEMENT.TYPE 349979
+ . 350324) (SKETCH.ELEMENT.CHANGED 350326 . 351876) (SK.ELEMENT.CHANGED1 351878 . 352630) (
+SK.UPDATE.GLOBAL.IMAGE.OBJECT.ELEMENT 352632 . 354857)) (354913 360118 (INSURE.SKETCH 354923 . 357848)
+ (LOCALSPECS.FROM.VIEWER 357850 . 358206) (SK.LOCAL.ELT.FROM.GLOBALPART 358208 . 358660) (
+SKETCH.FROM.VIEWER 358662 . 358896) (INSPECT.SKETCH 358898 . 359324) (ELT.INSIDE.SKETCHWP 359326 .
+359700) (SK.INSIDE.REGION 359702 . 360116)) (360119 364368 (MAPSKETCHSPECS 360129 . 360734) (
+MAPCOLLECTSKETCHSPECS 360736 . 361469) (MAPSKETCHSPECSUNTIL 361471 . 362263) (MAPGLOBALSKETCHSPECS
+362265 . 362950) (MAPGLOBALSKETCHELEMENTS 362952 . 364366)) (364430 391257 (SK.ADD.SELECTION 364440 .
+365163) (SK.COPY.INSERTFN 365165 . 368588) (SCREENELEMENTP 368590 . 369048) (SK.ITEM.REGION 369050 .
+369704) (SK.ELEMENT.GLOBAL.REGION 369706 . 370386) (SK.LOCAL.ITEMS.IN.REGION 370388 . 372337) (
+SK.REGIONFN 372339 . 372645) (SK.GLOBAL.REGIONFN 372647 . 372989) (SK.REMOVE.SELECTION 372991 . 373702
+) (SK.SELECT.MULTIPLE.ITEMS 373704 . 384678) (SKETCH.GET.ELEMENTS 384680 . 386204) (SK.PUT.MARKS.UP
+386206 . 386646) (SK.TAKE.MARKS.DOWN 386648 . 387088) (SK.TRANSLATE.GLOBALPART 387090 . 389347) (
+SK.TRANSLATE.ITEM 389349 . 390260) (SK.TRANSLATEFN 390262 . 390454) (TRANSLATE.SKETCH 390456 . 391255)
+) (391523 394700 (SK.INPUT.SCALE 391533 . 392456) (SK.UPDATE.SKETCHCONTEXT 392458 . 393156) (
+SK.SET.INPUT.SCALE 393158 . 393803) (SK.SET.INPUT.SCALE.CURRENT 393805 . 394197) (
+SK.SET.INPUT.SCALE.VALUE 394199 . 394698)) (394751 396742 (SK.SET.FEEDBACK.MODE 394761 . 396055) (
+SK.SET.FEEDBACK.POINT 396057 . 396225) (SK.SET.FEEDBACK.VERBOSE 396227 . 396487) (
+SK.SET.FEEDBACK.ALWAYS 396489 . 396740)) (396893 398834 (SKETCH.TITLE 396903 . 397267) (
+SK.SHRINK.ICONCREATE 397269 . 398832)) (404524 407501 (READBRUSHSHAPE 404534 . 404995) (READ.FUNCTION
+404997 . 405508) (READBRUSHSIZE 405510 . 405964) (READANGLE 405966 . 406454) (READARCDIRECTION 406456
+ . 407499)) (407502 418694 (SK.CHANGE.DASHING 407512 . 411993) (READ.AND.SAVE.NEW.DASHING 411995 .
+413921) (READ.NEW.DASHING 413923 . 415665) (READ.DASHING.CHANGE 415667 . 417133) (SK.CACHE.DASHING
+417135 . 418238) (SK.DASHING.LABEL 418240 . 418692)) (418695 422750 (READ.FILLING.CHANGE 418705 .
+420682) (SK.CACHE.FILLING 420684 . 421503) (READ.AND.SAVE.NEW.FILLING 421505 . 422255) (
+SK.FILLING.LABEL 422257 . 422748)) (423134 459191 (SK.GETGLOBALPOSITION 423144 . 423550) (
+SKETCH.TRACK.ELEMENTS 423552 . 427053) (SK.PICKOUT.WHOLE.MOVE.ELEMENTS 427055 . 427598) (
+MAP.SKETCH.ELEMENTS.INTO.VIEWER 427600 . 427988) (MAP.GLOBAL.POSITION.INTO.VIEWER 427990 . 428366) (
+SKETCH.TO.VIEWER.POSITION 428368 . 428711) (SKETCH.TRACK.IMAGE 428713 . 429550) (SK.TRACK.IMAGE1
+429552 . 431051) (MAP.VIEWER.XY.INTO.GLOBAL 431053 . 432018) (SK.SET.POSITION 432020 . 432457) (
+MAP.VIEWER.PT.INTO.GLOBAL 432459 . 433541) (VIEWER.TO.SKETCH.POSITION 433543 . 434162) (
+SK.INSURE.SCALE 434164 . 434420) (SKETCH.TO.VIEWER.REGION 434422 . 435212) (VIEWER.TO.SKETCH.REGION
+435214 . 435536) (SK.READ.POINT.WITH.FEEDBACK 435538 . 446164) (SKETCH.GET.POSITION 446166 . 448028) (
+\CLOBBER.POSITION 448030 . 448462) (NEAREST.HOT.SPOT 448464 . 449992) (GETWREGION 449994 . 450694) (
+GET.BITMAP.POSITION 450696 . 451449) (SK.TRACK.BITMAP1 451451 . 459189)) (459760 491951 (
+SK.BRING.UP.POSITION.PAD 459770 . 465795) (SK.PAD.READER.POSITION 465797 . 467426) (
+SK.POSITION.READER.REPAINTFN 467428 . 469415) (SK.POSITION.PAD.FROM.VIEWER 469417 . 470967) (
+SK.INIT.POSITION.NUMBER.PAD.MENU 470969 . 471315) (SK.READ.POSITION.PAD.HANDLER 471317 . 477080) (
+DISPLAY.POSITION.READER.TOTAL 477082 . 479469) (POSITION.PAD.READER.HANDLER 479471 . 487925) (
+POSITIONPAD.HELDFN 487927 . 489410) (\POSITION.PAD.ADD.DIGIT.MENU 489412 . 491092) (
+\POSITION.READER.NUMBERPAD 491094 . 491949)) (493577 496432 (SK.DRAWFN 493587 . 493949) (
+SK.TRANSFORMFN 493951 . 494328) (SK.EXPANDFN 494330 . 494607) (SK.INPUT 494609 . 494986) (SK.INSIDEFN
+494988 . 495836) (SK.UPDATEFN 495838 . 496430)) (501597 503753 (UPDATE-SKETCH 501607 . 502720) (
+EDIT-SKETCH 502722 . 503751)) (504354 508314 (SK.CHECK.SKETCH.VERSION 504364 . 505476) (
+SK.INSURE.RECORD.LENGTH 505478 . 506922) (SK.INSURE.HAS.LENGTH 506924 . 507681) (SK.RECORD.LENGTH
+507683 . 507853) (SK.SET.RECORD.LENGTHS 507855 . 508312)) (508777 509719 (
+SK.ADD.EDIT.COMMAND.TO.FILE.BROWSER 508787 . 509717)))))
STOP
diff --git a/library/sketch/SKETCH.LCOM b/library/sketch/SKETCH.LCOM
index 0b292838..15cf7aa2 100644
Binary files a/library/sketch/SKETCH.LCOM and b/library/sketch/SKETCH.LCOM differ
diff --git a/library/tedit/TEDIT b/library/tedit/TEDIT
index 2522759e..5c5ff485 100644
--- a/library/tedit/TEDIT
+++ b/library/tedit/TEDIT
@@ -1,12 +1,12 @@
-(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
+(DEFINE-FILE-INFO :PACKAGE "INTERLISP" :READTABLE "INTERLISP" :BASE 10)
-(FILECREATED "24-Dec-2025 22:45:39" {WMEDLEY}TEDIT>TEDIT.;847 145111
+(FILECREATED " 2-Mar-2026 18:32:06" {WMEDLEY}tedit>TEDIT.;853 146506
:EDIT-BY rmk
:CHANGES-TO (VARS TEDITCOMS)
- :PREVIOUS-DATE "24-Dec-2025 11:23:12" {WMEDLEY}TEDIT>TEDIT.;846)
+ :PREVIOUS-DATE " 4-Feb-2026 16:02:02" {WMEDLEY}tedit>TEDIT.;852)
(PRETTYCOMPRINT TEDITCOMS)
@@ -28,9 +28,7 @@
(EXPORT (FILES (FROM LOADUPS)
EXPORTS.ALL)))
- (DECLARE%: EVAL@COMPILE DONTCOPY (FILES TEDIT-EXPORTS.ALL))
- (DECLARE%: EVAL@COMPILE DONTCOPY (FILES (LOADCOMP)
- UNICODE)))
+ (DECLARE%: EVAL@COMPILE DONTCOPY (FILES TEDIT-EXPORTS.ALL)))
[DECLARE%: EVAL@COMPILE DONTCOPY
(* ;; "Assertions go to comments if not being checked, so we see value-warnings")
@@ -47,7 +45,7 @@
(FNS TEDIT TEXTSTREAM TEXTSTREAMP COERCETEXTSTREAM TEDIT.CONCAT TEDITSTRING TEDIT-SEE
TEDIT.COPY TEDIT.DELETE TEDIT.INSERT TEDIT.TERPRI TEDIT.KILL TEDIT.QUIT TEDIT.MOVE
- TEDIT.STRINGWIDTH TEDIT.CHARWIDTH)
+ TEDIT.STRINGWIDTH TEDIT.CHARWIDTH TEDIT.PARAGRAPH.BOUNDARIES)
(FNS TEXTOBJ COERCETEXTOBJ)
(MACROS TEVAL)
(FNS TDRIBBLE)
@@ -157,11 +155,6 @@
(FILESLOAD TEDIT-EXPORTS.ALL)
)
(DECLARE%: EVAL@COMPILE DONTCOPY
-
-(FILESLOAD (LOADCOMP)
- UNICODE)
-)
-(DECLARE%: EVAL@COMPILE DONTCOPY
(* "FOLLOWING DEFINITIONS EXPORTED")(DECLARE%: EVAL@COMPILE
(PUTPROPS TEDIT-ASSERT MACRO [ARGS (COND
@@ -676,6 +669,26 @@
(CR (IMAX 6 (CHARWIDTH CH FONT)))
(TAB 36)
(CHARWIDTH CH FONT])
+
+(TEDIT.PARAGRAPH.BOUNDARIES
+ [LAMBDA (TSTREAM SELORCH# PROTECTEDNOTOK) (* ; "Edited 2-Feb-2026 23:05 by rmk")
+
+ (* ;; "Returns a pair (FIRSTCH# LASTCH#) where FIRSTCH# is the character number of the first character of the paragraph that contains the beginning of the selection, and LASTCH# is the last character number of the last character of the paragraph that contains the end of the selection.")
+
+ (* ;;
+ "If PROTECTIONNOTOK, the scans stop at any protected piece (e.g. doesn't cross menu boiler plate).")
+
+ (LET ((TEXTOBJ (TEXTOBJ TSTREAM)))
+ (CL:UNLESS SELORCH#
+ (SETQ SELORCH# (TEXTSEL TEXTOBJ)))
+ (LIST (CAR (\TEDIT.PARA.FIRST TEXTOBJ (CL:IF (type? SELECTION SELORCH#)
+ (GETSEL SELORCH# CH#)
+ SELORCH#)
+ PROTECTEDNOTOK))
+ (CAR (\TEDIT.PARA.LAST TEXTOBJ (CL:IF (type? SELECTION SELORCH#)
+ (GETSEL SELORCH# CHLAST)
+ SELORCH#)
+ PROTECTEDNOTOK])
)
(DEFINEQ
@@ -912,7 +925,8 @@
else (TEDIT.PROMPTPRINT TSTREAM "Changed object not found in document" T])
(TEDIT.MAP.OBJECTS
- [LAMBDA (TSTREAM FN FNARG COLLECT?) (* ; "Edited 25-Feb-2025 15:06 by rmk")
+ [LAMBDA (TSTREAM FN FNARG COLLECT?) (* ; "Edited 4-Feb-2026 16:01 by rmk")
+ (* ; "Edited 25-Feb-2025 15:06 by rmk")
(* ; "Edited 23-Apr-2024 09:15 by rmk")
(* ; "Edited 16-Mar-2024 10:03 by rmk")
(* ; "Edited 4-Mar-2024 16:12 by rmk")
@@ -932,8 +946,7 @@
(NIL)
(OBJECT (PUSH $$VAL OBJ))
(CH# (PUSH $$VAL CH#))
- (VALUE (PUSH $$VAL CH#)
- FNVAL)
+ (VALUE (PUSH $$VAL FNVAL))
(FIRST (RETURN (LIST CH# OBJ FNVAL)))
(PUSH $$VAL (LIST CH# OBJ FNVAL)))
(CL:WHEN (EQ FNVAL 'STOP)
@@ -1325,7 +1338,9 @@
(CL:WHEN TYPEIN (\TEDIT.SCROLL.CARET TSTREAM)))])])
(\TEDIT.MOVE
- [LAMBDA (FROMSEL TOSEL FROMTSTREAM TOTSTREAM) (* ; "Edited 7-May-2025 00:12 by rmk")
+ [LAMBDA (FROMSEL TOSEL FROMTSTREAM TOTSTREAM) (* ; "Edited 31-Jan-2026 11:48 by rmk")
+ (* ; "Edited 10-Jan-2026 01:38 by rmk")
+ (* ; "Edited 7-May-2025 00:12 by rmk")
(* ; "Edited 22-Apr-2025 09:21 by rmk")
(* ; "Edited 16-Apr-2025 09:01 by rmk")
(* ; "Edited 6-Apr-2025 14:14 by rmk")
@@ -1385,7 +1400,7 @@
(CL:WHEN (AND (FGETTOBJ TOOBJ BLUEPENDINGDELETE)
(IGREATERP TODCH 0))
(FSETTOBJ TOOBJ BLUEPENDINGDELETE NIL)
- (CL:UNLESS (\TEDIT.DELETE TOOBJ TOSEL)
+ (CL:UNLESS (\TEDIT.DELETE TOTSTREAM TOSEL)
(RETURN NIL))
(SETQ BPD T)
(CL:WHEN (EQ TOOBJ FROMOBJ) (* ; "Same text, pre-adjust the source")
@@ -1421,15 +1436,14 @@
(* ;; "Pop to accumulate into a single event (BPD, DELETE, INSERT).")
- else (\TEDIT.DELETE FROMOBJ FROMSEL NIL NIL T))
+ else (\TEDIT.DELETE FROMTSTREAM FROMSEL NIL NIL T))
(* ;; "Deletion accomplished possibly in separate FROMOBJ with its own history.")
(* ;; "")
(CL:WHEN (GETTEXTPROP TOOBJ 'COPYBYBKSYSBUF)
- (\TEDIT.FOREIGN.COPY (WFROMDS TOTSTREAM)
- FROMSEL T)
+ (\TEDIT.FOREIGN.COPY FROMSEL FROMTSTREAM T)
(CL:WHEN BPD (* ; "If no BPD, TO history is good")
(\TEDIT.HISTORYADD.COMPOSITE TOOBJ TOOBJ (LIST (\TEDIT.POPEVENT TOOBJ)
(\TEDIT.POPEVENT TOOBJ))))
@@ -1448,7 +1462,8 @@
(CL:IF BPD (\TEDIT.POPEVENT TOOBJ])])
(\TEDIT.COPY
- [LAMBDA (FROMSEL TOSEL FROMTSTREAM TOTSTREAM) (* ; "Edited 7-May-2025 00:12 by rmk")
+ [LAMBDA (FROMSEL TOSEL FROMTSTREAM TOTSTREAM) (* ; "Edited 31-Jan-2026 11:48 by rmk")
+ (* ; "Edited 7-May-2025 00:12 by rmk")
(* ; "Edited 22-Apr-2025 09:12 by rmk")
(* ; "Edited 6-Apr-2025 14:16 by rmk")
(* ; "Edited 5-Apr-2025 13:19 by rmk")
@@ -1497,8 +1512,7 @@
(* ;; "")
(CL:WHEN (GETTEXTPROP TOOBJ 'COPYBYBKSYSBUF)
- (\TEDIT.FOREIGN.COPY (WFROMDS TOTSTREAM)
- FROMSEL T)
+ (\TEDIT.FOREIGN.COPY FROMSEL FROMTSTREAM T)
(RETURN))
(* ;; "")
@@ -2331,27 +2345,27 @@
(DEFAULT.IMAGETYPE.CONVERSIONS '(TEDIT TEDIT.TO.IMAGEFILE))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (4840 7234 (MAKE-TEDIT-EXPORTS.ALL 4850 . 5396) (UPDATE-TEDIT 5398 . 6327) (EDIT-TEDIT
-6329 . 7232)) (8664 36442 (TEDIT 8674 . 11288) (TEXTSTREAM 11290 . 13179) (TEXTSTREAMP 13181 . 13565)
-(COERCETEXTSTREAM 13567 . 17778) (TEDIT.CONCAT 17780 . 21082) (TEDITSTRING 21084 . 21998) (TEDIT-SEE
-22000 . 22684) (TEDIT.COPY 22686 . 24831) (TEDIT.DELETE 24833 . 26194) (TEDIT.INSERT 26196 . 29165) (
-TEDIT.TERPRI 29167 . 30281) (TEDIT.KILL 30283 . 31265) (TEDIT.QUIT 31267 . 32633) (TEDIT.MOVE 32635 .
-33523) (TEDIT.STRINGWIDTH 33525 . 34196) (TEDIT.CHARWIDTH 34198 . 36440)) (36443 38384 (TEXTOBJ 36453
- . 36918) (COERCETEXTOBJ 36920 . 38382)) (39784 41434 (TDRIBBLE 39794 . 41432)) (41475 53371 (
-TEDIT.INSERT.OBJECT 41485 . 45192) (TEDIT.EDIT.OBJECT 45194 . 48134) (TEDIT.OBJECT.CHANGED 48136 .
-51326) (TEDIT.MAP.OBJECTS 51328 . 52899) (\TEDIT.FIRST.OBJPIECE 52901 . 53134) (\TEDIT.NEXT.OBJPIECE
-53136 . 53369)) (53394 60837 (\TEDIT.CONCAT.PAGEFRAMES 53404 . 58471) (\TEDIT.GET.PAGE.HEADINGS 58473
- . 59502) (\TEDIT.CONCAT.INSTALL.HEADINGS 59504 . 60835)) (60838 64445 (\TEDIT.MOVE.MSG 60848 . 62929)
- (\TEDIT.READONLY 62931 . 64443)) (64446 70337 (TEDIT.NCHARS 64456 . 64829) (TEDIT.RPLCHARCODE 64831
- . 67821) (TEDIT.NTHCHARCODE 67823 . 69866) (TEDIT.NTHCHAR 69868 . 70335)) (70383 127160 (\TEDIT1
-70393 . 72470) (\TEDIT.INSERT 72472 . 78585) (\TEDIT.MOVE 78587 . 86493) (\TEDIT.COPY 86495 . 91026) (
-\TEDIT.REPLACE.SELPIECES 91028 . 95564) (\TEDIT.INSERT.SELPIECES 95566 . 98563) (\TEDIT.RESTARTFN
-98565 . 101070) (\TEDIT.CHARDELETE 101072 . 104001) (\TEDIT.COPYPIECE 104003 . 109165) (
-\TEDIT.APPLY.OBJFN 109167 . 112253) (\TEDIT.DELETE 112255 . 116623) (\TEDIT.DIFFUSE.PARALOOKS 116625
- . 118896) (\TEDIT.WORDDELETE 118898 . 120513) (\TEDIT.WORDDELETE.FORWARD 120515 . 122304) (
-\TEDIT.FINISHEDIT? 122306 . 127158)) (127161 127820 (\TEDIT.THELP 127171 . 127818)) (127854 136985 (
-\TEDIT.PARAPIECES 127864 . 129838) (\TEDIT.PARACHNOS 129840 . 130732) (\TEDIT.PARA.FIRST 130734 .
-133835) (\TEDIT.PARA.LAST 133837 . 136983)) (136986 144081 (\TEDIT.WORD.FIRST 136996 . 141000) (
-\TEDIT.WORD.LAST 141002 . 144079)) (144282 144559 (TEDITSYSTEMDATE 144292 . 144557)) (144695 144902 (
-TEDIT.IMAGESOURCEP 144705 . 144900)))))
+ (FILEMAP (NIL (4738 7132 (MAKE-TEDIT-EXPORTS.ALL 4748 . 5294) (UPDATE-TEDIT 5296 . 6225) (EDIT-TEDIT
+6227 . 7130)) (8487 37486 (TEDIT 8497 . 11111) (TEXTSTREAM 11113 . 13002) (TEXTSTREAMP 13004 . 13388)
+(COERCETEXTSTREAM 13390 . 17601) (TEDIT.CONCAT 17603 . 20905) (TEDITSTRING 20907 . 21821) (TEDIT-SEE
+21823 . 22507) (TEDIT.COPY 22509 . 24654) (TEDIT.DELETE 24656 . 26017) (TEDIT.INSERT 26019 . 28988) (
+TEDIT.TERPRI 28990 . 30104) (TEDIT.KILL 30106 . 31088) (TEDIT.QUIT 31090 . 32456) (TEDIT.MOVE 32458 .
+33346) (TEDIT.STRINGWIDTH 33348 . 34019) (TEDIT.CHARWIDTH 34021 . 36263) (TEDIT.PARAGRAPH.BOUNDARIES
+36265 . 37484)) (37487 39428 (TEXTOBJ 37497 . 37962) (COERCETEXTOBJ 37964 . 39426)) (40828 42478 (
+TDRIBBLE 40838 . 42476)) (42519 54499 (TEDIT.INSERT.OBJECT 42529 . 46236) (TEDIT.EDIT.OBJECT 46238 .
+49178) (TEDIT.OBJECT.CHANGED 49180 . 52370) (TEDIT.MAP.OBJECTS 52372 . 54027) (\TEDIT.FIRST.OBJPIECE
+54029 . 54262) (\TEDIT.NEXT.OBJPIECE 54264 . 54497)) (54522 61965 (\TEDIT.CONCAT.PAGEFRAMES 54532 .
+59599) (\TEDIT.GET.PAGE.HEADINGS 59601 . 60630) (\TEDIT.CONCAT.INSTALL.HEADINGS 60632 . 61963)) (61966
+ 65573 (\TEDIT.MOVE.MSG 61976 . 64057) (\TEDIT.READONLY 64059 . 65571)) (65574 71465 (TEDIT.NCHARS
+65584 . 65957) (TEDIT.RPLCHARCODE 65959 . 68949) (TEDIT.NTHCHARCODE 68951 . 70994) (TEDIT.NTHCHAR
+70996 . 71463)) (71511 128555 (\TEDIT1 71521 . 73598) (\TEDIT.INSERT 73600 . 79713) (\TEDIT.MOVE 79715
+ . 87813) (\TEDIT.COPY 87815 . 92421) (\TEDIT.REPLACE.SELPIECES 92423 . 96959) (
+\TEDIT.INSERT.SELPIECES 96961 . 99958) (\TEDIT.RESTARTFN 99960 . 102465) (\TEDIT.CHARDELETE 102467 .
+105396) (\TEDIT.COPYPIECE 105398 . 110560) (\TEDIT.APPLY.OBJFN 110562 . 113648) (\TEDIT.DELETE 113650
+ . 118018) (\TEDIT.DIFFUSE.PARALOOKS 118020 . 120291) (\TEDIT.WORDDELETE 120293 . 121908) (
+\TEDIT.WORDDELETE.FORWARD 121910 . 123699) (\TEDIT.FINISHEDIT? 123701 . 128553)) (128556 129215 (
+\TEDIT.THELP 128566 . 129213)) (129249 138380 (\TEDIT.PARAPIECES 129259 . 131233) (\TEDIT.PARACHNOS
+131235 . 132127) (\TEDIT.PARA.FIRST 132129 . 135230) (\TEDIT.PARA.LAST 135232 . 138378)) (138381
+145476 (\TEDIT.WORD.FIRST 138391 . 142395) (\TEDIT.WORD.LAST 142397 . 145474)) (145677 145954 (
+TEDITSYSTEMDATE 145687 . 145952)) (146090 146297 (TEDIT.IMAGESOURCEP 146100 . 146295)))))
STOP
diff --git a/library/tedit/TEDIT-ABBREV b/library/tedit/TEDIT-ABBREV
index 5f3a3cc3..6c874eea 100644
--- a/library/tedit/TEDIT-ABBREV
+++ b/library/tedit/TEDIT-ABBREV
@@ -1,13 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "13-Jan-2026 17:51:55" {WMEDLEY}tedit>TEDIT-ABBREV.;55 18063
+(FILECREATED "23-Jan-2026 15:49:26" {WMEDLEY}TEDIT>TEDIT-ABBREV.;58 18256
:EDIT-BY rmk
:CHANGES-TO (FNS \TEDIT.ABBREV.EXPAND)
- (VARS TEDIT-ABBREVCOMS)
- :PREVIOUS-DATE " 8-Jan-2026 09:09:58" {WMEDLEY}tedit>TEDIT-ABBREV.;53)
+ :PREVIOUS-DATE "13-Jan-2026 17:51:55" {WMEDLEY}tedit>TEDIT-ABBREV.;55)
(PRETTYCOMPRINT TEDIT-ABBREVCOMS)
@@ -87,7 +86,9 @@
(DEFINEQ
(\TEDIT.ABBREV.EXPAND
- [LAMBDA (TSTREAM TEXTOBJ SEL) (* ; "Edited 13-Jan-2026 17:51 by rmk")
+ [LAMBDA (TSTREAM TEXTOBJ SEL) (* ; "Edited 23-Jan-2026 15:49 by rmk")
+ (* ; "Edited 20-Jan-2026 09:56 by rmk")
+ (* ; "Edited 13-Jan-2026 17:51 by rmk")
(* ; "Edited 8-Jan-2026 09:08 by rmk")
(* ; "Edited 3-Jan-2026 13:13 by rmk")
(* ; "Edited 20-Apr-2025 23:30 by rmk")
@@ -143,11 +144,11 @@
(\TEDIT.REPLACE.SELPIECES (\TEDIT.SELPIECES.FROM.STRING EXPANSION TEXTOBJ NIL
(PCHARLOOKS (\TEDIT.CHTOPC FIRSTCHNO TEXTOBJ)))
TSTREAM SEL)
- (TEDIT.PROMPTPRINT TSTREAM (CONCAT "Replaced " (CL:IF BACKSLASH
- (CONCAT (CAR ABBREV)
- "\")
- (CAR ABBREV))
- " with " EXPANSION)
+ (TEDIT.PROMPTPRINT TSTREAM (CONCAT "Replaced %"" (CL:IF BACKSLASH
+ (CONCAT (CAR ABBREV)
+ "\")
+ (CAR ABBREV))
+ "%" with %"" EXPANSION "%"")
T)
else (TEDIT.PROMPTPRINT TSTREAM "No abbreviation to expand" T])
@@ -362,7 +363,7 @@
("DATE" \TEDIT.EXPAND.DATE)
(">>DATE<<" \TEDIT.EXPAND.DATE)))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (4390 14959 (\TEDIT.ABBREV.EXPAND 4400 . 8930) (\TEDIT.ABBREV.EXPANSION 8932 . 11996) (
-\TEDIT.ABBREV.TREE 11998 . 13129) (\TEDIT.ABBREV.PARSE 13131 . 14283) (\TEDIT.ABBREV.PARSE.CHARCODE
-14285 . 14957)) (14960 15605 (\TEDIT.EXPAND.DATE 14970 . 15603)))))
+ (FILEMAP (NIL (4348 15152 (\TEDIT.ABBREV.EXPAND 4358 . 9123) (\TEDIT.ABBREV.EXPANSION 9125 . 12189) (
+\TEDIT.ABBREV.TREE 12191 . 13322) (\TEDIT.ABBREV.PARSE 13324 . 14476) (\TEDIT.ABBREV.PARSE.CHARCODE
+14478 . 15150)) (15153 15798 (\TEDIT.EXPAND.DATE 15163 . 15796)))))
STOP
diff --git a/library/tedit/TEDIT-ABBREV.LCOM b/library/tedit/TEDIT-ABBREV.LCOM
index 5cf09f86..0d3e936e 100644
Binary files a/library/tedit/TEDIT-ABBREV.LCOM and b/library/tedit/TEDIT-ABBREV.LCOM differ
diff --git a/library/tedit/TEDIT-BUTTONS b/library/tedit/TEDIT-BUTTONS
index f015ff00..bb2ccdbe 100644
--- a/library/tedit/TEDIT-BUTTONS
+++ b/library/tedit/TEDIT-BUTTONS
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "19-Oct-2025 10:44:18" {WMEDLEY}TEDIT>TEDIT-BUTTONS.;229 125526
+(FILECREATED "25-Jan-2026 09:14:04" {WMEDLEY}TEDIT>TEDIT-BUTTONS.;230 123301
:EDIT-BY rmk
- :CHANGES-TO (FNS MB.ADD)
+ :CHANGES-TO (VARS TEDIT-BUTTONSCOMS)
- :PREVIOUS-DATE "30-Apr-2025 14:09:18" {WMEDLEY}TEDIT>TEDIT-BUTTONS.;228)
+ :PREVIOUS-DATE "19-Oct-2025 10:44:18" {WMEDLEY}TEDIT>TEDIT-BUTTONS.;229)
(PRETTYCOMPRINT TEDIT-BUTTONSCOMS)
@@ -36,10 +36,9 @@
(* ;; "Mutually exclusive togggles with a single enclosing object")
- (FNS MB.NWAY.CREATE MB.NWAY.DISPLAYFN MB.NWAY.WHENOPERATEDONFN MB.NWAY.SIZEFN
- MB.NWAY.SELECT MB.NWAY.BUTTONEVENTINFN MB.NWAY.NEWMENUBUTTON MB.NWAY.COPYFN
- MB.NWAY.INIT MB.NWAY.ARRANGEBUTTONS MB.NWAY.ADDITEM MB.NWAY.FINDSUBOBJ
- MB.NWAY.SETSTATEFN)
+ (FNS MB.NWAY.CREATE MB.NWAY.DISPLAYFN MB.NWAY.SIZEFN MB.NWAY.SELECT
+ MB.NWAY.BUTTONEVENTINFN MB.NWAY.NEWMENUBUTTON MB.NWAY.COPYFN MB.NWAY.INIT
+ MB.NWAY.ARRANGEBUTTONS MB.NWAY.ADDITEM MB.NWAY.FINDSUBOBJ MB.NWAY.SETSTATEFN)
(DECLARE%: DONTEVAL@LOAD DOCOPY (P (MB.NWAY.INIT]
[COMS (* ; "TOGGLE")
(FNS MB.TOGGLE.CREATE MB.TOGGLE.DISPLAYFN MB.TOGGLE.INIT MB.SET.TOGGLE
@@ -922,39 +921,6 @@
(APPLY* (IMAGEOBJPROP SOBJ 'DISPLAYFN)
SOBJ STREAM])
-(MB.NWAY.WHENOPERATEDONFN
- [LAMBDA (OBJ PANE OPERATION SEL) (* ; "Edited 21-Oct-2024 00:26 by rmk")
- (* ; "Edited 24-Aug-2024 23:38 by rmk")
- (* ; "Edited 13-Aug-2024 23:43 by rmk")
- (* ; "Edited 2-Aug-2024 00:36 by rmk")
- (* ; "Edited 21-Jul-2024 13:17 by rmk")
- (* ; "Edited 17-Jul-2024 21:51 by rmk")
- (* ; "Edited 9-Apr-2023 15:57 by rmk")
- (* ; "Edited 13-Sep-2022 12:09 by rmk")
- (* ; "Edited 30-May-91 22:16 by jds")
-
- (* ;; "Perhaps the selected subobject should be stored here, as the state?")
-
- (* ;; "Mouse tracking and highlighting happens in the BUTTONEVENTINFN (MB.NWAYBUTTON.SELFN). The code here applies the STATECHANGEFN on the main object")
-
- (NOTUSED)
- (SELECTQ OPERATION
- (SELECTED [AND NIL (\TEDIT.THELP)
- (LET [(SELECTED (IMAGEOBJPROP OBJ 'SELECTED]
- (if (IMAGEOBJPROP OBJ 'STATECHANGEFN)
- then (\TEDIT.THELP)
- (APPLY* (IMAGEOBJPROP OBJ 'STATECHANGEFN)
- OBJ SELECTED SEL PANE)
- elseif (AND NIL SELECTED (IMAGEOBJPROP SELECTED 'STATECHANGEFN))
- then
- (* ;;
- "This is nuked out: the selected object may be should have done its own thing?")
-
- (APPLY* (IMAGEOBJPROP SELECTED 'STATECHANGEFN)
- OBJ SELECTED SEL PANE])
- ((HIGHLIGHTED UNHIGHLIGHTED DESELECTED))
- NIL])
-
(MB.NWAY.SIZEFN
[LAMBDA (OBJ STREAM CURX RIGHTMARGIN) (* ; "Edited 20-Aug-2024 15:12 by rmk")
(* ; "Edited 22-Jul-2024 11:31 by rmk")
@@ -1971,25 +1937,25 @@
(MB.FIELD.INIT)
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (3221 19357 (MB.ADD 3231 . 9943) (MB.DELETE 9945 . 10319) (MB.GET 10321 . 17091) (
-MB.GET.MBARG 17093 . 18762) (TEDIT.BACKTOMAIN 18764 . 19355)) (19401 39337 (MB.BUTTONEVENTINFN 19411
- . 20979) (MB.DISPLAYFN 20981 . 23040) (MB.SETIMAGE 23042 . 24210) (MB.SIZEFN 24212 . 25760) (
-MB.WHENOPERATEDONFN 25762 . 27711) (MB.COPYFN 27713 . 28171) (MB.GETFN 28173 . 29134) (MB.PUTFN 29136
- . 30236) (MB.SHOWSELFN 30238 . 31747) (MB.CREATE 31749 . 35772) (MB.CHANGENAME 35774 . 36256) (
-MB.INIT 36258 . 37719) (MB.TRACK.UNTIL 37721 . 38416) (MB.DON'T 38418 . 38714) (MB.SPEC.REMAINDER
-38716 . 39335)) (39499 49504 (MB.3STATE.CREATE 39509 . 40373) (MB.3STATE.DISPLAYFN 40375 . 41361) (
-MB.3STATE.SHOWSELFN 41363 . 43674) (MB.3STATE.INIT 43676 . 45087) (MB.3STATE.SETSTATEFN 45089 . 45747)
- (MB.3STATE.BUTTONEVENTINFN 45749 . 49502)) (49659 80755 (MB.NWAY.CREATE 49669 . 55852) (
-MB.NWAY.DISPLAYFN 55854 . 56717) (MB.NWAY.WHENOPERATEDONFN 56719 . 58909) (MB.NWAY.SIZEFN 58911 .
-62847) (MB.NWAY.SELECT 62849 . 66419) (MB.NWAY.BUTTONEVENTINFN 66421 . 69633) (MB.NWAY.NEWMENUBUTTON
-69635 . 70347) (MB.NWAY.COPYFN 70349 . 71316) (MB.NWAY.INIT 71318 . 72809) (MB.NWAY.ARRANGEBUTTONS
-72811 . 74782) (MB.NWAY.ADDITEM 74784 . 78933) (MB.NWAY.FINDSUBOBJ 78935 . 79449) (MB.NWAY.SETSTATEFN
-79451 . 80753)) (80834 92833 (MB.TOGGLE.CREATE 80844 . 81839) (MB.TOGGLE.DISPLAYFN 81841 . 83324) (
-MB.TOGGLE.INIT 83326 . 85125) (MB.SET.TOGGLE 85127 . 86328) (MB.TOGGLE.SETSTATEFN 86330 . 87170) (
-MB.TOGGLE.BUTTONEVENTINFN 87172 . 91488) (MB.TOGGLE.WHENOPERATEDONFN 91490 . 92831)) (92914 125447 (
-MB.FIELD.CREATE 92924 . 98375) (MB.FIELD.DISPLAYFN 98377 . 99168) (MB.FIELD.IMAGEBOXFN 99170 . 100652)
- (MB.FIELD.PREFIXCREATE 100654 . 104590) (MB.FIELD.SUFFIXCREATE 104592 . 106252) (MB.FIELD.INIT 106254
- . 108021) (MB.FIELD.WHENOPERATEDONFN 108023 . 109294) (MB.FIELD.GETSTATEFN 109296 . 113230) (
-MB.FIELD.SETSTATEFN 113232 . 118036) (MB.FIELD.BUTTONEVENTINFN 118038 . 120343) (MB.FIELD.SIZEFN
-120345 . 120585) (MB.FIELD.INSURETYPE 120587 . 125445)))))
+ (FILEMAP (NIL (3188 19324 (MB.ADD 3198 . 9910) (MB.DELETE 9912 . 10286) (MB.GET 10288 . 17058) (
+MB.GET.MBARG 17060 . 18729) (TEDIT.BACKTOMAIN 18731 . 19322)) (19368 39304 (MB.BUTTONEVENTINFN 19378
+ . 20946) (MB.DISPLAYFN 20948 . 23007) (MB.SETIMAGE 23009 . 24177) (MB.SIZEFN 24179 . 25727) (
+MB.WHENOPERATEDONFN 25729 . 27678) (MB.COPYFN 27680 . 28138) (MB.GETFN 28140 . 29101) (MB.PUTFN 29103
+ . 30203) (MB.SHOWSELFN 30205 . 31714) (MB.CREATE 31716 . 35739) (MB.CHANGENAME 35741 . 36223) (
+MB.INIT 36225 . 37686) (MB.TRACK.UNTIL 37688 . 38383) (MB.DON'T 38385 . 38681) (MB.SPEC.REMAINDER
+38683 . 39302)) (39466 49471 (MB.3STATE.CREATE 39476 . 40340) (MB.3STATE.DISPLAYFN 40342 . 41328) (
+MB.3STATE.SHOWSELFN 41330 . 43641) (MB.3STATE.INIT 43643 . 45054) (MB.3STATE.SETSTATEFN 45056 . 45714)
+ (MB.3STATE.BUTTONEVENTINFN 45716 . 49469)) (49626 78530 (MB.NWAY.CREATE 49636 . 55819) (
+MB.NWAY.DISPLAYFN 55821 . 56684) (MB.NWAY.SIZEFN 56686 . 60622) (MB.NWAY.SELECT 60624 . 64194) (
+MB.NWAY.BUTTONEVENTINFN 64196 . 67408) (MB.NWAY.NEWMENUBUTTON 67410 . 68122) (MB.NWAY.COPYFN 68124 .
+69091) (MB.NWAY.INIT 69093 . 70584) (MB.NWAY.ARRANGEBUTTONS 70586 . 72557) (MB.NWAY.ADDITEM 72559 .
+76708) (MB.NWAY.FINDSUBOBJ 76710 . 77224) (MB.NWAY.SETSTATEFN 77226 . 78528)) (78609 90608 (
+MB.TOGGLE.CREATE 78619 . 79614) (MB.TOGGLE.DISPLAYFN 79616 . 81099) (MB.TOGGLE.INIT 81101 . 82900) (
+MB.SET.TOGGLE 82902 . 84103) (MB.TOGGLE.SETSTATEFN 84105 . 84945) (MB.TOGGLE.BUTTONEVENTINFN 84947 .
+89263) (MB.TOGGLE.WHENOPERATEDONFN 89265 . 90606)) (90689 123222 (MB.FIELD.CREATE 90699 . 96150) (
+MB.FIELD.DISPLAYFN 96152 . 96943) (MB.FIELD.IMAGEBOXFN 96945 . 98427) (MB.FIELD.PREFIXCREATE 98429 .
+102365) (MB.FIELD.SUFFIXCREATE 102367 . 104027) (MB.FIELD.INIT 104029 . 105796) (
+MB.FIELD.WHENOPERATEDONFN 105798 . 107069) (MB.FIELD.GETSTATEFN 107071 . 111005) (MB.FIELD.SETSTATEFN
+111007 . 115811) (MB.FIELD.BUTTONEVENTINFN 115813 . 118118) (MB.FIELD.SIZEFN 118120 . 118360) (
+MB.FIELD.INSURETYPE 118362 . 123220)))))
STOP
diff --git a/library/tedit/TEDIT-BUTTONS.LCOM b/library/tedit/TEDIT-BUTTONS.LCOM
index 5fd32581..ae82ac19 100644
Binary files a/library/tedit/TEDIT-BUTTONS.LCOM and b/library/tedit/TEDIT-BUTTONS.LCOM differ
diff --git a/library/tedit/TEDIT-FILE b/library/tedit/TEDIT-FILE
index b529ddc8..f0c0f19b 100644
--- a/library/tedit/TEDIT-FILE
+++ b/library/tedit/TEDIT-FILE
@@ -1,12 +1,13 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "23-Oct-2025 08:49:06" {WMEDLEY}tedit>TEDIT-FILE.;656 173140
+(FILECREATED "15-Feb-2026 23:45:51" {WMEDLEY}tedit>TEDIT-FILE.;666 175062
:EDIT-BY rmk
- :CHANGES-TO (FNS \TEDIT.GET.UNFORMATTED.FILE.UTF8)
+ :CHANGES-TO (FNS \TEDIT.PUT.MCCS.SPLITPIECES \TEDIT.PUT.PCTB.NEXTNEW)
+ (VARS TEDIT-FILECOMS)
- :PREVIOUS-DATE "25-Sep-2025 21:32:46" {WMEDLEY}tedit>TEDIT-FILE.;655)
+ :PREVIOUS-DATE "14-Feb-2026 10:32:44" {WMEDLEY}tedit>TEDIT-FILE.;659)
(PRETTYCOMPRINT TEDIT-FILECOMS)
@@ -50,8 +51,9 @@
(* ;; "Putting pageframe functions are on TEDIT-PAGE)")
(FNS \TEDIT.PUT.PCTB \TEDIT.PUT.PCTB.PIECEDATA \TEDIT.PUT.TRAILER
- \TEDIT.PUT.PCTB.MERGEABLE \TEDIT.PUT.UTF8.SPLITPIECES \TEDIT.PUT.PCTB.NEXTNEW
- \TEDIT.INSERT.NEWPIECES \TEDIT.PUTRESET \ARBOUT \ATMOUT \DWOUT \STRINGOUT)
+ \TEDIT.PUT.PCTB.MERGEABLE \TEDIT.PUT.UTF8.SPLITPIECES \TEDIT.PUT.MCCS.SPLITPIECES
+ \TEDIT.PUT.PCTB.NEXTNEW \TEDIT.INSERT.NEWPIECES \TEDIT.PUTRESET \ARBOUT \ATMOUT
+ \DWOUT \STRINGOUT)
(FNS \TEDIT.PUT.CHARLOOKS.LIST \TEDIT.PUT.SINGLE.CHARLOOKS \TEDIT.PUT.CHARLOOKS
\TEDIT.PUT.CHARLOOKS1 \TEDIT.PUT.OBJECT)
(FNS \TEDIT.PUT.PARALOOKS.LIST \TEDIT.PUT.SINGLE.PARALOOKS \TEDIT.PUT.PARALOOKS))
@@ -1830,6 +1832,7 @@
(\TEDIT.PUT.PCTB
[LAMBDA (TEXTOBJ CHARSTREAM FORMATSTREAM CONTINUE KEEPSEPARATE)
+ (* ; "Edited 14-Feb-2026 10:32 by rmk")
(* ; "Edited 9-Sep-2025 21:32 by rmk")
(* ; "Edited 26-Apr-2025 00:11 by rmk")
(* ; "Edited 21-Oct-2024 00:33 by rmk")
@@ -1922,10 +1925,10 @@
(* ;; "For MCCS, CHARSET will put out the char-shifting prefix bytes as needed. In format-version 3 all the file bytes belong to a piece, no skipping in the file. TEDIT.GET calls \TEDIT.INTERPRET.XCCS.SHIFTS to shave those bytes. NSHIFTBYTES is used here if the edit will continue.")
- (CHARSET CHARSTREAM (CL:IF (MEMB (PTYPE PC)
- FAT.PTYPES)
- T
- 0))
+ (CHARSET CHARSTREAM (OR (AND (EQ EXTFORMAT :XCCS)
+ (MEMB (PTYPE PC)
+ FAT.PTYPES))
+ (PCHARSET PC)))
(SETQ NSHIFTBYTES (IDIFFERENCE (\GETFILEPTR CHARSTREAM)
OLDBYTE#)))
(do (\TEDIT.PUT.PCTB.PIECEDATA PC CHARSTREAM TEXTOBJ FORMATSTREAM OLDBYTE#)
@@ -2152,8 +2155,35 @@
(RETURN))))
NIL])
+(\TEDIT.PUT.MCCS.SPLITPIECES
+ [LAMBDA (TEXTOBJ) (* ; "Edited 15-Feb-2026 23:45 by rmk")
+
+ (* ;; "We are putting to a :MCCS format file, and MCCS doesn't support single-byte runs of non-charset 0 characters. This function splits fat pieces into subpieces with only charset-0 characters or no charset-0 characters. The former will be put out as THINFILE pieces, the latter as FATFILE2.")
+
+ (for PC FIRST0 FIRSTNON0 inpieces (\TEDIT.FIRSTPIECE TEXTOBJ)
+ when [AND (MEMB (PTYPE PC)
+ (CONSTANT (LIST FATSTRING.PTYPE FATFILE2.PTYPE UTF8.PTYPE)))
+ (SETQ FIRST0 (find I from 0 to (PLAST PC)
+ suchthat (EQ 0 (\CHARSET (\TEDIT.PIECE.NTHCHARCODE PC I]
+ do (if [SETQ FIRSTNON0 (find I from (ADD1 FIRST0) to (PLAST PC)
+ suchthat (NEQ 0 (\CHARSET (\TEDIT.PIECE.NTHCHARCODE PC I]
+ then
+ (* ;; "xxx000yyy --> xxx 000yyy or 000yyy --> 000 yyy")
+
+ (\TEDIT.SPLITPIECE PC (CL:IF (EQ FIRST0 0)
+ FIRSTNON0
+ FIRST0)
+ TEXTOBJ) (* ; "Iterate to the residual piece")
+ (SETQ PC (PREVPIECE PC))
+ elseif (NEQ 0 FIRST0)
+ then
+ (* ;; "xxx000")
+
+ (\TEDIT.SPLITPIECE PC FIRST0 TEXTOBJ])
+
(\TEDIT.PUT.PCTB.NEXTNEW
[LAMBDA (NEXTNEW PC OLDBYTE# RUNLEN EXTFORMAT TEXTOBJ EOLC NSHIFTBYTES)
+ (* ; "Edited 15-Feb-2026 15:09 by rmk")
(* ; "Edited 25-Apr-2025 08:48 by rmk")
(* ; "Edited 26-Mar-2025 09:27 by rmk")
(* ; "Edited 21-Oct-2024 00:26 by rmk")
@@ -2202,7 +2232,7 @@
"The file may have LF, but we want to restore EOL internally")
(CL:WHEN [AND (EQ THINFILE.PTYPE (PTYPE NEXTNEW))
(EQ (CHARCODE EOL)
- (\TEDIT.PIECE.NTHCHARCODE PC (PLEN PC]
+ (\TEDIT.PIECE.NTHCHARCODE PC (PLAST PC]
(if (EQ 1 (PLEN NEXTNEW))
then (FSETPC NEXTNEW PTYPE THINSTRING.PTYPE)
(FSETPC NEXTNEW PCONTENTS (ALLOCSTRING 1 (CHARCODE EOL)))
@@ -2625,7 +2655,8 @@
(DEFINEQ
(TEDITFROMLISPSOURCE
- [LAMBDA (SOURCEFILE TSTREAM PROPS USERTEMP START END) (* ; "Edited 7-Apr-2025 23:13 by rmk")
+ [LAMBDA (SOURCEFILE TSTREAM PROPS USERTEMP START END) (* ; "Edited 7-Feb-2026 17:02 by rmk")
+ (* ; "Edited 7-Apr-2025 23:13 by rmk")
(* ; "Edited 1-Apr-2025 12:54 by rmk")
(* ; "Edited 26-Mar-2025 10:02 by rmk")
(* ; "Edited 18-Feb-2025 23:34 by rmk")
@@ -2658,9 +2689,6 @@
,(TEDIT.ATOMBOUND.READTABLE (fetch (READER-ENVIRONMENT REREADTABLE)
of USERTEMP))
DEFAULTPUTEXTENSION ""))
- (TEDIT.PROMPTPRINT TSTREAM (CONCAT "Fetching " (FULLNAME SOURCEFILE)
- " ...")
- T)
(COPY.TEXT.TO.IMAGE SOURCEFILE TSTREAM)
TSTREAM])
@@ -2693,28 +2721,29 @@
(RPAQ? *TEDIT-FILE-READTABLE* (COPYREADTABLE \ORIGREADTABLE))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (5317 35576 (TEDIT.GET 5327 . 11737) (TEDIT.FORMATTEDFILEP 11739 . 13055) (
-TEDIT.FILEDATE 13057 . 14366) (TEDIT.INCLUDE 14368 . 22397) (TEDIT.RAW.INCLUDE 22399 . 23207) (
-TEDIT.PUT 23209 . 31565) (TEDIT.PUT.STREAM 31567 . 35574)) (35577 56851 (\TEDIT.GET.FOREIGN.FILE 35587
- . 39012) (\TEDIT.GET.UNFORMATTED.FILE 39014 . 43320) (\TEDIT.GET.FORMATTED.FILE 43322 . 46965) (
-\TEDIT.FORMATTEDSTREAMP 46967 . 50098) (\ARBIN 50100 . 50820) (\ATMIN 50822 . 51359) (\DWIN 51361 .
-51740) (\STRINGIN 51742 . 52450) (\TEDIT.GET.TRAILER 52452 . 55320) (\TEDIT.CACHEFILE 55322 . 56849))
-(57017 73055 (\TEDIT.GET.PIECES3 57027 . 67990) (\TEDIT.GET.PROPS3 67992 . 71214) (
-\TEDIT.MAKE.STRINGPIECE 71216 . 73053)) (73056 86482 (\TEDIT.GET.UNFORMATTED.FILE.MCCS 73066 . 79299)
-(\TEDIT.INTERPRET.MCCS.SHIFTS 79301 . 85546) (\TEDIT.CONVERT.XCCSTOMCCS 85548 . 86480)) (86504 92749 (
-\TEDIT.GET.UNFORMATTED.FILE.UTF8 86514 . 92747)) (92772 104114 (\TEDIT.GET.CHARLOOKS.LIST 92782 .
-93513) (\TEDIT.GET.SINGLE.CHARLOOKS 93515 . 100587) (\TEDIT.GET.CHARLOOKS 100589 . 102145) (
-\TEDIT.GET.PARALOOKS.INDEX 102147 . 102691) (\TEDIT.GET.CHARLOOKS.INDEX 102693 . 104112)) (104115
-111772 (\TEDIT.GET.PARALOOKS.LIST 104125 . 104747) (\TEDIT.GET.SINGLE.PARALOOKS 104749 . 111770)) (
-111773 115606 (\TEDIT.GET.OBJECT 111783 . 115604)) (115671 148934 (\TEDIT.PUT.PCTB 115681 . 125588) (
-\TEDIT.PUT.PCTB.PIECEDATA 125590 . 128788) (\TEDIT.PUT.TRAILER 128790 . 130118) (
-\TEDIT.PUT.PCTB.MERGEABLE 130120 . 133893) (\TEDIT.PUT.UTF8.SPLITPIECES 133895 . 138597) (
-\TEDIT.PUT.PCTB.NEXTNEW 138599 . 143095) (\TEDIT.INSERT.NEWPIECES 143097 . 146532) (\TEDIT.PUTRESET
-146534 . 146776) (\ARBOUT 146778 . 147502) (\ATMOUT 147504 . 148109) (\DWOUT 148111 . 148390) (
-\STRINGOUT 148392 . 148932)) (148935 161669 (\TEDIT.PUT.CHARLOOKS.LIST 148945 . 150617) (
-\TEDIT.PUT.SINGLE.CHARLOOKS 150619 . 156899) (\TEDIT.PUT.CHARLOOKS 156901 . 158240) (
-\TEDIT.PUT.CHARLOOKS1 158242 . 159293) (\TEDIT.PUT.OBJECT 159295 . 161667)) (161670 169309 (
-\TEDIT.PUT.PARALOOKS.LIST 161680 . 162582) (\TEDIT.PUT.SINGLE.PARALOOKS 162584 . 168168) (
-\TEDIT.PUT.PARALOOKS 168170 . 169307)) (169404 172833 (TEDITFROMLISPSOURCE 169414 . 172082) (
-SHELLSCRIPTP 172084 . 172313) (TEDITFROMSHELLSCRIPT 172315 . 172831)))))
+ (FILEMAP (NIL (5423 35682 (TEDIT.GET 5433 . 11843) (TEDIT.FORMATTEDFILEP 11845 . 13161) (
+TEDIT.FILEDATE 13163 . 14472) (TEDIT.INCLUDE 14474 . 22503) (TEDIT.RAW.INCLUDE 22505 . 23313) (
+TEDIT.PUT 23315 . 31671) (TEDIT.PUT.STREAM 31673 . 35680)) (35683 56957 (\TEDIT.GET.FOREIGN.FILE 35693
+ . 39118) (\TEDIT.GET.UNFORMATTED.FILE 39120 . 43426) (\TEDIT.GET.FORMATTED.FILE 43428 . 47071) (
+\TEDIT.FORMATTEDSTREAMP 47073 . 50204) (\ARBIN 50206 . 50926) (\ATMIN 50928 . 51465) (\DWIN 51467 .
+51846) (\STRINGIN 51848 . 52556) (\TEDIT.GET.TRAILER 52558 . 55426) (\TEDIT.CACHEFILE 55428 . 56955))
+(57123 73161 (\TEDIT.GET.PIECES3 57133 . 68096) (\TEDIT.GET.PROPS3 68098 . 71320) (
+\TEDIT.MAKE.STRINGPIECE 71322 . 73159)) (73162 86588 (\TEDIT.GET.UNFORMATTED.FILE.MCCS 73172 . 79405)
+(\TEDIT.INTERPRET.MCCS.SHIFTS 79407 . 85652) (\TEDIT.CONVERT.XCCSTOMCCS 85654 . 86586)) (86610 92855 (
+\TEDIT.GET.UNFORMATTED.FILE.UTF8 86620 . 92853)) (92878 104220 (\TEDIT.GET.CHARLOOKS.LIST 92888 .
+93619) (\TEDIT.GET.SINGLE.CHARLOOKS 93621 . 100693) (\TEDIT.GET.CHARLOOKS 100695 . 102251) (
+\TEDIT.GET.PARALOOKS.INDEX 102253 . 102797) (\TEDIT.GET.CHARLOOKS.INDEX 102799 . 104218)) (104221
+111878 (\TEDIT.GET.PARALOOKS.LIST 104231 . 104853) (\TEDIT.GET.SINGLE.PARALOOKS 104855 . 111876)) (
+111879 115712 (\TEDIT.GET.OBJECT 111889 . 115710)) (115777 150880 (\TEDIT.PUT.PCTB 115787 . 125844) (
+\TEDIT.PUT.PCTB.PIECEDATA 125846 . 129044) (\TEDIT.PUT.TRAILER 129046 . 130374) (
+\TEDIT.PUT.PCTB.MERGEABLE 130376 . 134149) (\TEDIT.PUT.UTF8.SPLITPIECES 134151 . 138853) (
+\TEDIT.PUT.MCCS.SPLITPIECES 138855 . 140433) (\TEDIT.PUT.PCTB.NEXTNEW 140435 . 145041) (
+\TEDIT.INSERT.NEWPIECES 145043 . 148478) (\TEDIT.PUTRESET 148480 . 148722) (\ARBOUT 148724 . 149448) (
+\ATMOUT 149450 . 150055) (\DWOUT 150057 . 150336) (\STRINGOUT 150338 . 150878)) (150881 163615 (
+\TEDIT.PUT.CHARLOOKS.LIST 150891 . 152563) (\TEDIT.PUT.SINGLE.CHARLOOKS 152565 . 158845) (
+\TEDIT.PUT.CHARLOOKS 158847 . 160186) (\TEDIT.PUT.CHARLOOKS1 160188 . 161239) (\TEDIT.PUT.OBJECT
+161241 . 163613)) (163616 171255 (\TEDIT.PUT.PARALOOKS.LIST 163626 . 164528) (
+\TEDIT.PUT.SINGLE.PARALOOKS 164530 . 170114) (\TEDIT.PUT.PARALOOKS 170116 . 171253)) (171350 174755 (
+TEDITFROMLISPSOURCE 171360 . 174004) (SHELLSCRIPTP 174006 . 174235) (TEDITFROMSHELLSCRIPT 174237 .
+174753)))))
STOP
diff --git a/library/tedit/TEDIT-FILE.LCOM b/library/tedit/TEDIT-FILE.LCOM
index 6809340d..6e1598c7 100644
Binary files a/library/tedit/TEDIT-FILE.LCOM and b/library/tedit/TEDIT-FILE.LCOM differ
diff --git a/library/tedit/TEDIT-FNKEYS b/library/tedit/TEDIT-FNKEYS
index 850b43ba..d4a6abf3 100644
--- a/library/tedit/TEDIT-FNKEYS
+++ b/library/tedit/TEDIT-FNKEYS
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "24-Nov-2025 08:40:56" {WMEDLEY}TEDIT>TEDIT-FNKEYS.;317 109076
+(FILECREATED " 8-Feb-2026 19:54:41" {WMEDLEY}tedit>TEDIT-FNKEYS.;318 109228
:EDIT-BY rmk
- :CHANGES-TO (VARS TEDIT.BASIC.CHARBINDINGS)
+ :CHANGES-TO (VARS TEDIT.BASIC.CHARBINDINGS ORIG.TEDIT.CHARACTIONS)
- :PREVIOUS-DATE "24-Nov-2025 00:38:18" {WMEDLEY}TEDIT>TEDIT-FNKEYS.;316)
+ :PREVIOUS-DATE "24-Nov-2025 08:40:56" {WMEDLEY}tedit>TEDIT-FNKEYS.;317)
(PRETTYCOMPRINT TEDIT-FNKEYSCOMS)
@@ -1776,6 +1776,8 @@
(:PRINT.MENU \TEDIT.PRINT.MENU)
(:EXPAND \TEDIT.ABBREV.EXPAND)
(:GET.OBJECT GET.OBJ.FROM.USER)
+ (:PAGENUMOBJ (TEDIT.INSERT.OBJECT (TEDIT.PAGENO.CREATE)
+ TSTREAM))
(:OPENLINE \TEDIT.KEY.OPENLINE)
(* ;; "")
@@ -1913,6 +1915,7 @@
(:PRINT.MENU "Meta,P" "Meta,p")
(:EXPAND "^X")
(:GET.OBJECT "^O")
+ (:PAGENUMOBJ "^P")
(* ;; "")
@@ -1986,30 +1989,30 @@
(RPAQ TEDIT.WORDBOUND.READTABLE (\TEDIT.WORDBOUND.READTABLE))
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (5031 23296 (TEDIT.INSTALL.CHARBINDINGS 5041 . 7892) (TEDIT.CLEAR.CHARBINDINGS 7894 .
-10914) (TEDIT.GET.CHARACTION 10916 . 13697) (TEDIT.GET.CHARBINDING 13699 . 15876) (
-TEDIT.GET.ALL.CHARBINDINGS 15878 . 18377) (TEDIT.CHARBINDINGS.INVERT 18379 . 19658) (
-TEDIT.GET.ALL.CHARACTIONS 19660 . 21982) (TEDIT.CONFLICTING.CHARBINDINGS 21984 . 23294)) (23356 33411
-(\TEDIT.KEY.CHARLOOKS 23366 . 24558) (\TEDIT.KEY.QUAD 24560 . 26653) (\TEDIT.DEFAULTSSEL 26655 . 27266
-) (\TEDIT.SETDEFAULT.FROM.SEL 27268 . 27945) (\TEDIT.KEY.SIZE 27947 . 29143) (\TEDIT.SUBSCRIPTSEL
-29145 . 29348) (\TEDIT.SUPERSCRIPTSEL 29350 . 29554) (\TEDIT.KEY.TRANSFORM 29556 . 31553) (
-\TEDIT.KEY.OPENLINE 31555 . 32009) (\TEDIT.KEY.FAMILYN 32011 . 33409)) (33412 33701 (CAP-CASECODE
-33422 . 33699)) (33735 37167 (\TEDIT.SHOWCARETLOOKS 33745 . 36260) (\TEDIT.DESCRIBEFONT 36262 . 37165)
-) (37198 52171 (\TEDIT.ONECHAR.BACKWARD 37208 . 38355) (\TEDIT.ONECHAR.FORWARD 38357 . 39593) (
-\TEDIT.ONELINE.UP 39595 . 42556) (\TEDIT.ONELINE.DOWN 42558 . 44215) (\TEDIT.ONELINE.MOVE 44217 .
-46504) (\TEDIT.ONEWORD.BACKWARD 46506 . 47694) (\TEDIT.ONEWORD.FORWARD 47696 . 48883) (
-\TEDIT.LINE.BEGIN 48885 . 49964) (\TEDIT.LINE.END 49966 . 51203) (\TEDIT.DOCUMENT.BEGIN 51205 . 51564)
- (\TEDIT.DOCUMENT.END 51566 . 52169)) (52172 55480 (\TEDIT.LINEDELETE.FORWARD 52182 . 53291) (
-\TEDIT.LINEDELETE.BACKWARD 53293 . 54432) (\TEDIT.LINEDELETE 54434 . 55478)) (55481 58009 (
-\TEDIT.KEY.NEST 55491 . 58007)) (58010 59292 (\TEDIT.KEY.WRAP 58020 . 59290)) (59383 67431 (
-\TEDIT.KEY.FIND 59393 . 64571) (\TEDIT.KEY.FIND.SEARCHSTRING 64573 . 65713) (\TEDIT.GET.TARGET.STRING
-65715 . 67429)) (67462 70094 (\TEDIT.KEY.SUBSTITUTE 67472 . 67693) (\TEDIT.MANPAGE 67695 . 68942) (
-\TEDIT.CALL.ED 68944 . 69774) (\TEDIT.SELECT.ALL 69776 . 70092)) (70121 75811 (\TEDIT.CLIPBOARD 70131
- . 71886) (\TEDIT.COPYTOCLIPBOARD 71888 . 72668) (\TEDIT.EXTRACTTOCLIPBOARD 72670 . 72865) (
-\TEDIT.WRITE.SEL 72867 . 75809)) (75977 88484 (\TEDIT.READTABLE 75987 . 76923) (
-\TEDIT.WORDBOUND.READTABLE 76925 . 79973) (TEDIT.GETSYNTAX 79975 . 81204) (TEDIT.SETSYNTAX 81206 .
-82520) (TEDIT.GETFUNCTION 82522 . 83995) (TEDIT.SETFUNCTION 83997 . 86153) (TEDIT.WORDGET 86155 .
-86416) (TEDIT.WORDSET 86418 . 87158) (TEDIT.ATOMBOUND.READTABLE 87160 . 88482)) (88585 95573 (
-TEDIT.BUTTONS.BUILD 88595 . 93841) (TEDIT.BUTTONBITMAP.FILL 93843 . 95571)) (98038 98626 (
-\TEDIT.TTCCLASS 98048 . 98624)))))
+ (FILEMAP (NIL (5054 23319 (TEDIT.INSTALL.CHARBINDINGS 5064 . 7915) (TEDIT.CLEAR.CHARBINDINGS 7917 .
+10937) (TEDIT.GET.CHARACTION 10939 . 13720) (TEDIT.GET.CHARBINDING 13722 . 15899) (
+TEDIT.GET.ALL.CHARBINDINGS 15901 . 18400) (TEDIT.CHARBINDINGS.INVERT 18402 . 19681) (
+TEDIT.GET.ALL.CHARACTIONS 19683 . 22005) (TEDIT.CONFLICTING.CHARBINDINGS 22007 . 23317)) (23379 33434
+(\TEDIT.KEY.CHARLOOKS 23389 . 24581) (\TEDIT.KEY.QUAD 24583 . 26676) (\TEDIT.DEFAULTSSEL 26678 . 27289
+) (\TEDIT.SETDEFAULT.FROM.SEL 27291 . 27968) (\TEDIT.KEY.SIZE 27970 . 29166) (\TEDIT.SUBSCRIPTSEL
+29168 . 29371) (\TEDIT.SUPERSCRIPTSEL 29373 . 29577) (\TEDIT.KEY.TRANSFORM 29579 . 31576) (
+\TEDIT.KEY.OPENLINE 31578 . 32032) (\TEDIT.KEY.FAMILYN 32034 . 33432)) (33435 33724 (CAP-CASECODE
+33445 . 33722)) (33758 37190 (\TEDIT.SHOWCARETLOOKS 33768 . 36283) (\TEDIT.DESCRIBEFONT 36285 . 37188)
+) (37221 52194 (\TEDIT.ONECHAR.BACKWARD 37231 . 38378) (\TEDIT.ONECHAR.FORWARD 38380 . 39616) (
+\TEDIT.ONELINE.UP 39618 . 42579) (\TEDIT.ONELINE.DOWN 42581 . 44238) (\TEDIT.ONELINE.MOVE 44240 .
+46527) (\TEDIT.ONEWORD.BACKWARD 46529 . 47717) (\TEDIT.ONEWORD.FORWARD 47719 . 48906) (
+\TEDIT.LINE.BEGIN 48908 . 49987) (\TEDIT.LINE.END 49989 . 51226) (\TEDIT.DOCUMENT.BEGIN 51228 . 51587)
+ (\TEDIT.DOCUMENT.END 51589 . 52192)) (52195 55503 (\TEDIT.LINEDELETE.FORWARD 52205 . 53314) (
+\TEDIT.LINEDELETE.BACKWARD 53316 . 54455) (\TEDIT.LINEDELETE 54457 . 55501)) (55504 58032 (
+\TEDIT.KEY.NEST 55514 . 58030)) (58033 59315 (\TEDIT.KEY.WRAP 58043 . 59313)) (59406 67454 (
+\TEDIT.KEY.FIND 59416 . 64594) (\TEDIT.KEY.FIND.SEARCHSTRING 64596 . 65736) (\TEDIT.GET.TARGET.STRING
+65738 . 67452)) (67485 70117 (\TEDIT.KEY.SUBSTITUTE 67495 . 67716) (\TEDIT.MANPAGE 67718 . 68965) (
+\TEDIT.CALL.ED 68967 . 69797) (\TEDIT.SELECT.ALL 69799 . 70115)) (70144 75834 (\TEDIT.CLIPBOARD 70154
+ . 71909) (\TEDIT.COPYTOCLIPBOARD 71911 . 72691) (\TEDIT.EXTRACTTOCLIPBOARD 72693 . 72888) (
+\TEDIT.WRITE.SEL 72890 . 75832)) (76000 88507 (\TEDIT.READTABLE 76010 . 76946) (
+\TEDIT.WORDBOUND.READTABLE 76948 . 79996) (TEDIT.GETSYNTAX 79998 . 81227) (TEDIT.SETSYNTAX 81229 .
+82543) (TEDIT.GETFUNCTION 82545 . 84018) (TEDIT.SETFUNCTION 84020 . 86176) (TEDIT.WORDGET 86178 .
+86439) (TEDIT.WORDSET 86441 . 87181) (TEDIT.ATOMBOUND.READTABLE 87183 . 88505)) (88608 95596 (
+TEDIT.BUTTONS.BUILD 88618 . 93864) (TEDIT.BUTTONBITMAP.FILL 93866 . 95594)) (98061 98649 (
+\TEDIT.TTCCLASS 98071 . 98647)))))
STOP
diff --git a/library/tedit/TEDIT-FNKEYS.LCOM b/library/tedit/TEDIT-FNKEYS.LCOM
index 1e667aff..e2989380 100644
Binary files a/library/tedit/TEDIT-FNKEYS.LCOM and b/library/tedit/TEDIT-FNKEYS.LCOM differ
diff --git a/library/tedit/TEDIT-LOOKS b/library/tedit/TEDIT-LOOKS
index 9c66d9ca..07d6e3b3 100644
--- a/library/tedit/TEDIT-LOOKS
+++ b/library/tedit/TEDIT-LOOKS
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED " 7-Dec-2025 16:32:32" {WMEDLEY}tedit>TEDIT-LOOKS.;460 155196
+(FILECREATED "16-Feb-2026 00:36:00" {WMEDLEY}TEDIT>TEDIT-LOOKS.;467 155443
:EDIT-BY rmk
- :CHANGES-TO (VARS TEDIT-LOOKSCOMS)
+ :CHANGES-TO (FNS \TEDIT.MCCS.TRANSLATE)
- :PREVIOUS-DATE " 6-Oct-2025 20:50:59" {WMEDLEY}tedit>TEDIT-LOOKS.;459)
+ :PREVIOUS-DATE "10-Feb-2026 11:07:12" {WMEDLEY}tedit>TEDIT-LOOKS.;465)
(PRETTYCOMPRINT TEDIT-LOOKSCOMS)
@@ -924,7 +924,8 @@
(DEFINEQ
(\TEDIT.MCCS.TRANSLATE
- [LAMBDA (TSTREAM) (* ; "Edited 6-Oct-2025 20:50 by rmk")
+ [LAMBDA (TSTREAM) (* ; "Edited 16-Feb-2026 00:35 by rmk")
+ (* ; "Edited 6-Oct-2025 20:50 by rmk")
(* ; "Edited 5-Oct-2025 10:57 by rmk")
(* ; "Edited 25-Sep-2025 21:30 by rmk")
(* ; "Edited 9-Sep-2025 21:48 by rmk")
@@ -954,19 +955,17 @@
(SETQ CLOOKS
(PCHARLOOKS PC))
CLFONT]
- do (for OFFSET OLDCODE STRING FAT from 1 to (PLEN PC) eachtime (SETQ OLDCODE
- (
- \TEDIT.PIECE.NTHCHARCODE
- PC OFFSET))
+ do (for OFFSET OLDCODE STRING FAT from 0 to (PLAST PC)
+ eachtime (SETQ OLDCODE (\TEDIT.PIECE.NTHCHARCODE PC OFFSET))
unless (EQ OLDCODE (APPLY* TOMCCSFN OLDCODE))
do
(* ;; "This piece has recoded character. Start over to convert it to a string piece with necessary code conversions. (The logic to split the original piece at just the changes while still preserving the iteration would be very complicated).")
(SETQ STRING (ALLOCSTRING (PLEN PC)))
- [for OFFSET from 1 to (PLEN PC) do (RPLCHARCODE STRING OFFSET
- (APPLY* TOMCCSFN (
+ [for I from 0 to (PLAST PC) do (RPLCHARCODE STRING (ADD1 I)
+ (APPLY* TOMCCSFN (
\TEDIT.PIECE.NTHCHARCODE
- PC OFFSET]
+ PC I]
(SETQ FAT (ffetch (STRINGP FATSTRINGP) of STRING))
(FSETPC PC PTYPE (CL:IF FAT
FATSTRING.PTYPE
@@ -1377,7 +1376,8 @@
(DEFINEQ
(\TEDIT.CHANGE.CHARLOOKS
- [LAMBDA (TSTREAM NEWLOOKS TARGETSEL) (* ; "Edited 31-Jul-2025 09:18 by rmk")
+ [LAMBDA (TSTREAM NEWLOOKS TARGETSEL) (* ; "Edited 10-Feb-2026 11:06 by rmk")
+ (* ; "Edited 31-Jul-2025 09:18 by rmk")
(* ; "Edited 22-Apr-2025 20:17 by rmk")
(* ; "Edited 21-Apr-2025 20:17 by rmk")
(* ; "Edited 20-Apr-2025 13:27 by rmk")
@@ -1403,10 +1403,12 @@
(* ;;; "Internal programmatic interface to changing character looks. DOES NOT CHANGE the current selection (unless it's the TARGETSEL).")
(PROG ((TEXTOBJ (TEXTOBJ TSTREAM))
- SELPIECES NEWLOOKSLIST FONT DIRTY) (* ;
- "Construct the set of new looks to apply:")
+ SELPIECES NEWLOOKSLIST FONT DIRTY)
(CL:UNLESS TARGETSEL
(SETQ TARGETSEL (TEXTSEL TEXTOBJ)))
+ (CL:WHEN (EQ 0 (GETSEL TARGETSEL DCH))
+ (TEDIT.PROMPTPRINT TSTREAM "No characters are selected" T)
+ (RETURN))
(CL:UNLESS (AND NEWLOOKS (FGETSEL TARGETSEL SET)
(NOT (\TEDIT.READONLY TSTREAM NIL (GETSEL TARGETSEL CH#)))
(ILEQ (GETSEL TARGETSEL CH#)
@@ -2103,7 +2105,8 @@
then (\TEDIT.CHANGE.PARALOOKS TSTREAM NEWLOOKS TARGETSEL)))])
(\TEDIT.CHANGE.PARALOOKS
- [LAMBDA (TSTREAM NEWLOOKS TARGETSEL) (* ; "Edited 21-Apr-2025 23:27 by rmk")
+ [LAMBDA (TSTREAM NEWLOOKS TARGETSEL) (* ; "Edited 10-Feb-2026 11:07 by rmk")
+ (* ; "Edited 21-Apr-2025 23:27 by rmk")
(* ; "Edited 20-Apr-2025 13:27 by rmk")
(* ; "Edited 16-Apr-2025 09:05 by rmk")
(* ; "Edited 6-Apr-2025 14:29 by rmk")
@@ -2126,6 +2129,9 @@
NEWPAGEAFTER HEADINGKEEP KEEP HARDCOPY USERINFO REVISED STYLE
CHARSTYLES COLUMN TABS DEFAULTTAB MARGINBAR))
PARAPIECES)
+ (CL:WHEN (EQ 0 (TEXTLEN TEXTOBJ))
+ (TEDIT.PROMPTPRINT TSTREAM "No text to modify" T)
+ (RETURN))
(CL:UNLESS TARGETSEL
(SETQ TARGETSEL (TEXTSEL TEXTOBJ)))
(CL:UNLESS (AND NEWLOOKS (FGETSEL TARGETSEL SET)
@@ -2458,26 +2464,26 @@
(ADDTOVAR LAMA )
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (22014 23956 (\TEDIT.CHARLOOKS.DEFPRINT 22024 . 23160) (\TEDIT.PARALOOKS.DEFPRINT 23162
- . 23954)) (24060 24446 (\TEDIT.CREATE.FACE.MENU 24070 . 24242) (\TEDIT.CREATE.SIZE.MENU 24244 . 24444
-)) (25450 27339 (\TEDIT.CHARLOOKS.FEATURE.CHECK 25460 . 27337)) (27611 52868 (
-\TEDIT.CHARLOOKS.FROM.FONT 27621 . 29905) (\TEDIT.EQCLOOKS 29907 . 32938) (\TEDIT.SAMECLOOKS 32940 .
-36111) (TEDIT.CARETLOOKS 36113 . 37659) (TEDIT.COPY.LOOKS 37661 . 40944) (
-\TEDIT.UNPARSE.CHARLOOKS.LIST 40946 . 44440) (\TEDIT.MODIFYLOOKS 44442 . 46602) (TEDIT.NEW.FONT 46604
- . 47051) (\TEDIT.CARETLOOKS.VERIFY 47053 . 47890) (\TEDIT.CARETPIECE 47892 . 48197) (
-\TEDIT.GET.INSERT.CHARLOOKS 48199 . 51246) (\TEDIT.GET.TERMSA.WIDTHS 51248 . 51664) (
-\TEDIT.PARSE.CHARLOOKS.LIST 51666 . 52866)) (52869 64996 (\TEDIT.MCCS.TRANSLATE 52879 . 58732) (
-\TEDIT.CONVERT.TO.FORMATTED 58734 . 64994)) (65868 73205 (\TEDIT.UNIQUIFY.CHARLOOKS 65878 . 67538) (
-\TEDIT.UNIQUIFY.PARALOOKS 67540 . 68807) (\TEDIT.UNIQUIFY.ALL 68809 . 70897) (
-\TEDIT.FLUSH.UNUSED.LOOKS 70899 . 73203)) (73238 85196 (TEDIT.LOOKS 73248 . 75637) (TEDIT.GET.LOOKS
-75639 . 77974) (TEDIT.SUBLOOKS 77976 . 82356) (TEDIT.FINDLOOKS 82358 . 85194)) (85197 114847 (
-\TEDIT.CHANGE.CHARLOOKS 85207 . 93985) (\TEDIT.CHANGE.CHARLOOKS.NEW 93987 . 97802) (
-\TEDIT.CHARLOOKS.CHANGE.FONT 97804 . 106111) (\TEDIT.FONT.NEXTSIZE 106113 . 107734) (\TEDIT.LOOKS
-107736 . 111065) (\TEDIT.FONTCOPY 111067 . 112568) (\TEDIT.COERCE.FONTCLASS 112570 . 113721) (
-\TEDIT.FONTCLASS.TO.FONT 113723 . 114845)) (114890 146538 (\TEDIT.EQFMTSPEC 114900 . 118115) (
-TEDIT.GET.PARALOOKS 118117 . 122164) (\TEDIT.PARSE.PARALOOKS.LIST 122166 . 130199) (TEDIT.PARALOOKS
-130201 . 131241) (\TEDIT.CHANGE.PARALOOKS 131243 . 138211) (\TEDIT.CHANGE.PARALOOKS.NEW 138213 .
-142196) (TEDIT.COPY.PARALOOKS 142198 . 144872) (\TEDIT.PARABOUNDS 144874 . 146536)) (146598 154314 (
-TEDIT.SUBPARALOOKS 146608 . 150710) (SAMEPARALOOKS 150712 . 154312)) (154315 155002 (
-\TEDIT.MARK.REVISION 154325 . 155000)))))
+ (FILEMAP (NIL (22019 23961 (\TEDIT.CHARLOOKS.DEFPRINT 22029 . 23165) (\TEDIT.PARALOOKS.DEFPRINT 23167
+ . 23959)) (24065 24451 (\TEDIT.CREATE.FACE.MENU 24075 . 24247) (\TEDIT.CREATE.SIZE.MENU 24249 . 24449
+)) (25455 27344 (\TEDIT.CHARLOOKS.FEATURE.CHECK 25465 . 27342)) (27616 52873 (
+\TEDIT.CHARLOOKS.FROM.FONT 27626 . 29910) (\TEDIT.EQCLOOKS 29912 . 32943) (\TEDIT.SAMECLOOKS 32945 .
+36116) (TEDIT.CARETLOOKS 36118 . 37664) (TEDIT.COPY.LOOKS 37666 . 40949) (
+\TEDIT.UNPARSE.CHARLOOKS.LIST 40951 . 44445) (\TEDIT.MODIFYLOOKS 44447 . 46607) (TEDIT.NEW.FONT 46609
+ . 47056) (\TEDIT.CARETLOOKS.VERIFY 47058 . 47895) (\TEDIT.CARETPIECE 47897 . 48202) (
+\TEDIT.GET.INSERT.CHARLOOKS 48204 . 51251) (\TEDIT.GET.TERMSA.WIDTHS 51253 . 51669) (
+\TEDIT.PARSE.CHARLOOKS.LIST 51671 . 52871)) (52874 64879 (\TEDIT.MCCS.TRANSLATE 52884 . 58615) (
+\TEDIT.CONVERT.TO.FORMATTED 58617 . 64877)) (65751 73088 (\TEDIT.UNIQUIFY.CHARLOOKS 65761 . 67421) (
+\TEDIT.UNIQUIFY.PARALOOKS 67423 . 68690) (\TEDIT.UNIQUIFY.ALL 68692 . 70780) (
+\TEDIT.FLUSH.UNUSED.LOOKS 70782 . 73086)) (73121 85079 (TEDIT.LOOKS 73131 . 75520) (TEDIT.GET.LOOKS
+75522 . 77857) (TEDIT.SUBLOOKS 77859 . 82239) (TEDIT.FINDLOOKS 82241 . 85077)) (85080 114853 (
+\TEDIT.CHANGE.CHARLOOKS 85090 . 93991) (\TEDIT.CHANGE.CHARLOOKS.NEW 93993 . 97808) (
+\TEDIT.CHARLOOKS.CHANGE.FONT 97810 . 106117) (\TEDIT.FONT.NEXTSIZE 106119 . 107740) (\TEDIT.LOOKS
+107742 . 111071) (\TEDIT.FONTCOPY 111073 . 112574) (\TEDIT.COERCE.FONTCLASS 112576 . 113727) (
+\TEDIT.FONTCLASS.TO.FONT 113729 . 114851)) (114896 146785 (\TEDIT.EQFMTSPEC 114906 . 118121) (
+TEDIT.GET.PARALOOKS 118123 . 122170) (\TEDIT.PARSE.PARALOOKS.LIST 122172 . 130205) (TEDIT.PARALOOKS
+130207 . 131247) (\TEDIT.CHANGE.PARALOOKS 131249 . 138458) (\TEDIT.CHANGE.PARALOOKS.NEW 138460 .
+142443) (TEDIT.COPY.PARALOOKS 142445 . 145119) (\TEDIT.PARABOUNDS 145121 . 146783)) (146845 154561 (
+TEDIT.SUBPARALOOKS 146855 . 150957) (SAMEPARALOOKS 150959 . 154559)) (154562 155249 (
+\TEDIT.MARK.REVISION 154572 . 155247)))))
STOP
diff --git a/library/tedit/TEDIT-LOOKS.LCOM b/library/tedit/TEDIT-LOOKS.LCOM
index 066f0a15..6b163d52 100644
Binary files a/library/tedit/TEDIT-LOOKS.LCOM and b/library/tedit/TEDIT-LOOKS.LCOM differ
diff --git a/library/tedit/TEDIT-MENU b/library/tedit/TEDIT-MENU
index 6794e9d7..5a14b140 100644
--- a/library/tedit/TEDIT-MENU
+++ b/library/tedit/TEDIT-MENU
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "12-Dec-2025 00:01:26" {WMEDLEY}tedit>TEDIT-MENU.;501 183343
+(FILECREATED " 9-Feb-2026 09:10:43" {WMEDLEY}tedit>TEDIT-MENU.;510 183027
:EDIT-BY rmk
- :CHANGES-TO (VARS TEDIT-MENUCOMS)
+ :CHANGES-TO (FNS \TEDIT.PAGEMENU.CREATE)
- :PREVIOUS-DATE " 7-Dec-2025 16:34:30" {WMEDLEY}tedit>TEDIT-MENU.;499)
+ :PREVIOUS-DATE "27-Jan-2026 10:42:09" {WMEDLEY}tedit>TEDIT-MENU.;508)
(PRETTYCOMPRINT TEDIT-MENUCOMS)
@@ -1381,7 +1381,8 @@
(DEFINEQ
(\TEDIT.EXPANDEDMENU.CREATE
- [LAMBDA NIL (* ; "Edited 29-May-2025 09:31 by rmk")
+ [LAMBDA NIL (* ; "Edited 25-Jan-2026 10:52 by rmk")
+ (* ; "Edited 29-May-2025 09:31 by rmk")
(* ; "Edited 8-Mar-2025 12:27 by rmk")
(* ; "Edited 7-Jan-2025 16:05 by rmk")
(* ; "Edited 8-Nov-2024 08:35 by rmk")
@@ -1463,13 +1464,15 @@
TAB
(FIELD (IDENTIFIER SERVER)
(PRELABEL "server:")
- (FIELDTYPE SYMBOL))
+ (FIELDTYPE SYMBOL)
+ (EMPTYVALUE NIL))
(FIELD (IDENTIFIER COPIES)
(PRELABEL "copies:")
+ (EMPTYVALUE 1)
(FIELDTYPE POSITIVENUMBER))
- 2
- (NWAY (IDENTIFIER SIDES)
- (BUTTONS (One% Side Duplex)))
+ 3
+ (TOGGLE (IDENTIFIER DOUBLE-SIDED)
+ (LABEL "Double-sided"))
EOL TAB TAB (FIELD (IDENTIFIER MESSAGE/PHONE#)
(PRELABEL "Message/Phone#:")
(FIELDTYPE STRING])
@@ -1546,7 +1549,8 @@
(RETURN 'DON'T])
(\TEDIT.EXPANDEDMENU.ACTIONFN
- [LAMBDA (OBJ MENUSEL MENUWINDOW MENUSTREAM MAINSTREAM) (* ; "Edited 29-May-2025 09:29 by rmk")
+ [LAMBDA (OBJ MENUSEL MENUWINDOW MENUSTREAM MAINSTREAM) (* ; "Edited 25-Jan-2026 11:05 by rmk")
+ (* ; "Edited 29-May-2025 09:29 by rmk")
(* ; "Edited 11-May-2025 15:01 by rmk")
(* ; "Edited 6-Apr-2025 14:39 by rmk")
(* ; "Edited 18-Mar-2025 23:54 by rmk")
@@ -1564,11 +1568,11 @@
(* ;
"MBFN for TEdit default menu item buttons.")
(ERSETQ (RESETLST
+ (RESETSAVE NIL (LIST [FUNCTION (LAMBDA (SEL)
+ (FSETSEL SEL SET NIL]
+ MENUSEL))
(LET ((MENUTEXTOBJ (FTEXTOBJ MENUSTREAM))
STATES STATE)
- [RESETSAVE (PROG1 OBJ
- (IMAGEOBJPROP OBJ 'MENUBUTTON.SELECTED T))
- '(AND (IMAGEOBJPROP OLDVALUE 'MENUBUTTON.SELECTED NIL]
(SELECTQ (IMAGEOBJPROP OBJ 'IDENTIFIER)
(QUIT (* ; "Is it OK to quit the main edit?")
(\TEDIT.FINISHEDIT? MAINSTREAM))
@@ -1636,29 +1640,21 @@
)
(EQ 'ON (LISTGET STATES 'CONFIRM))
(EQ 'ON (LISTGET STATES 'USENEWLOOKS])])
- (HARDCOPY (SETQ STATES (MB.GET '(SERVER COPIES SIDES MESSAGE/PHONE#)
+ (HARDCOPY (SETQ STATES (MB.GET '(SERVER COPIES DOUBLE-SIDED MESSAGE/PHONE#)
MENUSTREAM
'STATE MENUSEL))
- (LET ((SERVER (LISTGET STATES 'SERVER))
- (COPIES (LISTGET STATES 'COPIES))
- (SIDES (LISTGET STATES 'SIDES))
+ (LET ((COPIES (LISTGET STATES 'COPIES))
(MSG (LISTGET STATES 'MESSAGE/PHONE#))
PRINTOPTIONS)
- (CL:UNLESS (AND SERVER (SETQ SERVER (\TEDIT.MAKEFILENAME
- SERVER)))
- (TEDIT.PROMPTPRINT MAINSTREAM
- "Using default print server."))
(CL:WHEN COPIES
(SETQ PRINTOPTIONS (LIST '%#COPIES COPIES)))
- (CL:WHEN SIDES
- (push PRINTOPTIONS '%#SIDES (SELECTQ SIDES
- (One% Side 1)
- (Duplex 2)
- NIL)))
+ (CL:WHEN (LISTGET STATES 'DOUBLE-SIDED)
+ (push PRINTOPTIONS '%#SIDES 2))
(CL:WHEN MSG
(push PRINTOPTIONS 'MESSAGE (\TEDIT.MAKEFILENAME MSG)))
- (TEDIT.HARDCOPY MAINSTREAM NIL NIL NIL SERVER PRINTOPTIONS)))
- (ERROR))))])
+ (SEND.FILE.TO.PRINTER MAINSTREAM (LISTGET STATES 'SERVER)
+ PRINTOPTIONS)))
+ (SHOULDNT))))])
)
@@ -2371,7 +2367,9 @@
(DEFINEQ
(\TEDIT.PAGEMENU.CREATE
- [LAMBDA (TSTREAM) (* ; "Edited 5-Jun-2025 18:41 by rmk")
+ [LAMBDA (TSTREAM) (* ; "Edited 9-Feb-2026 09:09 by rmk")
+ (* ; "Edited 26-Jan-2026 12:03 by rmk")
+ (* ; "Edited 5-Jun-2025 18:41 by rmk")
(* ; "Edited 11-May-2025 14:40 by rmk")
(* ; "Edited 27-Jan-2025 08:51 by rmk")
(* ; "Edited 7-Jan-2025 15:47 by rmk")
@@ -2411,16 +2409,10 @@
EOL "Paper Size: " (NWAY (IDENTIFIER PAPERSIZE)
(BUTTONS (Letter Legal A4))
(INITSTATE Letter))
- 8
+ 16
(TOGGLE (LABEL "Landscape"))
- 7
- (FIELD (IDENTIFIER STARTINGPAGE#)
- (PRELABEL "Starting page #:")
- (LABELFONT (HELVETICA 10))
- (FIELDTYPE POSITIVENUMBER))
EOL
- (TEXT (STRING "For page: ")
- (FONT (HELVETICA 10)))
+ (TEXT (STRING "For page: "))
(NWAY (IDENTIFIER PAGEID)
(BUTTONS (|First(&Default)| Other% Left Other% Right)))
EOL
@@ -2430,8 +2422,7 @@
(* ;; "Page numbers")
5
- (TEXT (STRING "Page numbers: ")
- (FONT (HELVETICA 10)))
+ (TEXT (STRING "Page numbers: "))
(NWAY (IDENTIFIER PAGENOS)
(BUTTONS (No Yes Heading))
(INITSTATE Yes))
@@ -2454,14 +2445,18 @@
3 "Alignment:" 2 (NWAY (IDENTIFIER QUAD)
(BUTTONS (Left Centered Right))
(INITSTATE Centered))
+ EOL TAB (FIELD (IDENTIFIER FOLIOPRETEXT)
+ (PRELABEL "Text before number:"))
+ 5
+ (FIELD (IDENTIFIER FOLIOPOSTTEXT)
+ (PRELABEL "Text after number:"))
EOL
(* ;; "")
(* ;; "Margins")
- EOL 5 (TEXT (STRING "Margins: ")
- (FONT (HELVETICA 10)))
+ EOL 5 (TEXT (STRING "Margins: "))
(FIELD (IDENTIFIER LEFTMARGIN)
(PRELABEL "Left")
(POSTLABEL "picas")
@@ -2489,7 +2484,6 @@
EOL 5 (FIELD (IDENTIFIER COLUMNS)
(PRELABEL "Columns:")
- (LABELFONT (HELVETICA 10))
(INITSTATE 1)
(FIELDTYPE POSITIVENUMBER))
4
@@ -2735,7 +2729,8 @@
(TEDIT.BACKTOMAIN MENUSTREAM])
(\TEDIT.CHANGE.PAGELOOKS
- [LAMBDA (MAINTEXTSTREAM PAGELOOKS) (* ; "Edited 11-May-2025 15:04 by rmk")
+ [LAMBDA (MAINTEXTSTREAM PAGELOOKS) (* ; "Edited 27-Jan-2026 10:41 by rmk")
+ (* ; "Edited 11-May-2025 15:04 by rmk")
(* ; "Edited 24-Dec-2024 21:28 by rmk")
(* ; "Edited 20-Oct-2024 17:17 by rmk")
(* ; "Edited 30-Aug-2024 23:43 by rmk")
@@ -2754,8 +2749,8 @@
((OFF NEUTRAL)
(RPLACA PLTAIL NIL))
NIL))
- (SELECTQ PAGENOS
- (Yes (* ;
+ (SELECTQ (L-CASE PAGENOS T)
+ ((Yes T) (* ;
"Page number format specfified in pagelooks menu")
(CL:UNLESS (AND (LISTGET PAGELOOKS 'PAGENUMBERX)
(LISTGET PAGELOOKS 'PAGENUMBERY))
@@ -2776,7 +2771,7 @@
(* ;; "Page numbers formatted/printed by image object in header paragraphs")
(push PAGEPROPS 'STARTINGPAGE# (LISTGET PAGELOOKS 'STARTINGPAGE#)))
- NIL)
+ (SHOULDNT))
(CL:UNLESS (LISTGET PAGELOOKS 'COLUMNS)
(LISTPUT PAGELOOKS 'COLUMNS 1)
(RETURN))
@@ -2786,9 +2781,6 @@
(TEDIT.PROMPTPRINT MAINTEXTOBJ "Please specify the space between columns" T T)
(RETURN))
[push PAGEPROPS 'LANDSCAPE? (EQ 'ON (LISTGET PAGELOOKS 'LANDSCAPE]
-
- (* ;; "**EMPTY** may come from field values in the pagelooks menue")
-
(TEDIT.PAGEFORMAT MAINTEXTOBJ (TEDIT.SINGLE.PAGEFORMAT PAGENOS (LISTGET PAGELOOKS
'PAGENUMBERX)
(LISTGET PAGELOOKS 'PAGENUMBERY)
@@ -2907,32 +2899,32 @@
(ADDTOVAR LAMA )
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (4929 16567 (TEDIT.ADD.MENUITEM 4939 . 7056) (TEDIT.DEFAULT.MENUFN 7058 . 13779) (
-TEDIT.REMOVE.MENUITEM 13781 . 14778) (\TEDIT.CREATEMENU 14780 . 15345) (\TEDIT.MENU.WHENHELDFN 15347
- . 16252) (\TEDIT.MENU.WHENSELECTEDFN 16254 . 16565)) (17381 65416 (DRAWMARGINSCALE 17391 . 20850) (
-MARGINBAR 20852 . 27977) (MARGINBAR.CREATE 27979 . 32177) (MB.MARGINBAR.BUTTONEVENTINFN 32179 . 39981)
- (MB.MARGINBAR.SELFN.TABS 39983 . 45223) (MB.MARGINBAR.SELFN.TABS.KIND 45225 . 46160) (
-MARGINBAR.GETSTATEFN 46162 . 50149) (MARGINBAR.SETSTATEFN 50151 . 50361) (MARGINBAR.NEUTRALIZE 50363
- . 51038) (MARGINBAR.LOOKS 51040 . 54146) (MB.MARGINBAR.SIZEFN 54148 . 54934) (MB.MARGINBAR.DISPLAYFN
-54936 . 57997) (MDESCALE 57999 . 58539) (MSCALE 58541 . 58871) (MB.MARGINBAR.SHOWTAB 58873 . 61196) (
-MB.MARGINBAR.TABTRACK 61198 . 62583) (MARGINBAR.INIT 62585 . 63978) (\TEDIT.PARALOOKS.TO.MARBAR 63980
- . 65414)) (66241 73523 (TEDIT.MENUSTREAM 66251 . 67251) (TEDITMENUP 67253 . 68222) (\TEDIT.MENU.START
- 68224 . 72571) (\TEDIT.MENU.OPEN? 72573 . 72947) (\TEDIT.MENU.BUTTONEVENTFN 72949 . 73521)) (73842
-81893 (\TEDIT.MENU.CREATE 73852 . 75792) (\TEDIT.MENU.PARSE 75794 . 79483) (\TEDIT.MENU.NEUTRALIZE
-79485 . 81556) (\TEDITMENU.RECORD.UNFORMATTED 81558 . 81891)) (81959 101740 (
-\TEDIT.EXPANDEDMENU.CREATE 81969 . 87436) (\TEDIT.EXPANDEDMENU.START 87438 . 89062) (
-\TEDIT.EXPANDEDMENU.FN 89064 . 92319) (\TEDIT.EXPANDEDMENU.ACTIONFN 92321 . 101738)) (101802 121227 (
-\TEDIT.PARAMENU.CREATE 101812 . 110543) (\TEDIT.PARAMENU.START 110545 . 111799) (
-\TEDIT.APPLY.PARALOOKS 111801 . 112853) (\TEDIT.SHOW.PARALOOKS 112855 . 115572) (
-\TEDIT.PARAMENU.FILLIN 115574 . 120323) (\TEDIT.PARAMENU.RESHAPEFN 120325 . 121225)) (121421 148263 (
-\TEDIT.CHARMENU.CREATE 121431 . 124035) (\TEDIT.CHARMENU.START 124037 . 125327) (\TEDIT.CHARMENU.SPEC
-125329 . 130012) (\TEDIT.CHARMENU.PARSE 130014 . 133182) (\TEDIT.CHARMENU.FILLIN 133184 . 137814) (
-\TEDIT.SHOW.CHARLOOKS 137816 . 141361) (\TEDIT.APPLY.CHARLOOKS 141363 . 142524) (
-\TEDIT.OFFSETTYPE.STATEFN 142526 . 144489) (\TEDIT.OTHER.STATECHANGEFN 144491 . 146136) (
-\TEDIT.OTHER.SELECTFN 146138 . 148261)) (148325 177383 (\TEDIT.PAGEMENU.CREATE 148335 . 156847) (
-\TEDIT.PAGEMENU.START 156849 . 157200) (\TEDIT.SHOW.PAGELOOKS 157202 . 159088) (\TEDIT.PAGEMENU.FILLIN
- 159090 . 160640) (\TEDIT.PAGEREGION.UNPARSE 160642 . 170041) (\TEDIT.APPLY.PAGELOOKS 170043 . 171970)
- (\TEDIT.CHANGE.PAGELOOKS 171972 . 176539) (\TEDIT.PAGEMENU.CHARLOOKS.STATEFN 176541 . 177381)) (
-177384 183187 (\TEDIT.PAGEMENU.CREATE.HEADINGS 177394 . 180206) (\TEDIT.PAGEMENU.HEADINGS.SETSTATEFN
-180208 . 181633) (\TEDIT.PAGEMENU.HEADINGS.STATEFN 181635 . 183185)))))
+ (FILEMAP (NIL (4936 16574 (TEDIT.ADD.MENUITEM 4946 . 7063) (TEDIT.DEFAULT.MENUFN 7065 . 13786) (
+TEDIT.REMOVE.MENUITEM 13788 . 14785) (\TEDIT.CREATEMENU 14787 . 15352) (\TEDIT.MENU.WHENHELDFN 15354
+ . 16259) (\TEDIT.MENU.WHENSELECTEDFN 16261 . 16572)) (17388 65423 (DRAWMARGINSCALE 17398 . 20857) (
+MARGINBAR 20859 . 27984) (MARGINBAR.CREATE 27986 . 32184) (MB.MARGINBAR.BUTTONEVENTINFN 32186 . 39988)
+ (MB.MARGINBAR.SELFN.TABS 39990 . 45230) (MB.MARGINBAR.SELFN.TABS.KIND 45232 . 46167) (
+MARGINBAR.GETSTATEFN 46169 . 50156) (MARGINBAR.SETSTATEFN 50158 . 50368) (MARGINBAR.NEUTRALIZE 50370
+ . 51045) (MARGINBAR.LOOKS 51047 . 54153) (MB.MARGINBAR.SIZEFN 54155 . 54941) (MB.MARGINBAR.DISPLAYFN
+54943 . 58004) (MDESCALE 58006 . 58546) (MSCALE 58548 . 58878) (MB.MARGINBAR.SHOWTAB 58880 . 61203) (
+MB.MARGINBAR.TABTRACK 61205 . 62590) (MARGINBAR.INIT 62592 . 63985) (\TEDIT.PARALOOKS.TO.MARBAR 63987
+ . 65421)) (66248 73530 (TEDIT.MENUSTREAM 66258 . 67258) (TEDITMENUP 67260 . 68229) (\TEDIT.MENU.START
+ 68231 . 72578) (\TEDIT.MENU.OPEN? 72580 . 72954) (\TEDIT.MENU.BUTTONEVENTFN 72956 . 73528)) (73849
+81900 (\TEDIT.MENU.CREATE 73859 . 75799) (\TEDIT.MENU.PARSE 75801 . 79490) (\TEDIT.MENU.NEUTRALIZE
+79492 . 81563) (\TEDITMENU.RECORD.UNFORMATTED 81565 . 81898)) (81966 101368 (
+\TEDIT.EXPANDEDMENU.CREATE 81976 . 87654) (\TEDIT.EXPANDEDMENU.START 87656 . 89280) (
+\TEDIT.EXPANDEDMENU.FN 89282 . 92537) (\TEDIT.EXPANDEDMENU.ACTIONFN 92539 . 101366)) (101430 120855 (
+\TEDIT.PARAMENU.CREATE 101440 . 110171) (\TEDIT.PARAMENU.START 110173 . 111427) (
+\TEDIT.APPLY.PARALOOKS 111429 . 112481) (\TEDIT.SHOW.PARALOOKS 112483 . 115200) (
+\TEDIT.PARAMENU.FILLIN 115202 . 119951) (\TEDIT.PARAMENU.RESHAPEFN 119953 . 120853)) (121049 147891 (
+\TEDIT.CHARMENU.CREATE 121059 . 123663) (\TEDIT.CHARMENU.START 123665 . 124955) (\TEDIT.CHARMENU.SPEC
+124957 . 129640) (\TEDIT.CHARMENU.PARSE 129642 . 132810) (\TEDIT.CHARMENU.FILLIN 132812 . 137442) (
+\TEDIT.SHOW.CHARLOOKS 137444 . 140989) (\TEDIT.APPLY.CHARLOOKS 140991 . 142152) (
+\TEDIT.OFFSETTYPE.STATEFN 142154 . 144117) (\TEDIT.OTHER.STATECHANGEFN 144119 . 145764) (
+\TEDIT.OTHER.SELECTFN 145766 . 147889)) (147953 177067 (\TEDIT.PAGEMENU.CREATE 147963 . 156484) (
+\TEDIT.PAGEMENU.START 156486 . 156837) (\TEDIT.SHOW.PAGELOOKS 156839 . 158725) (\TEDIT.PAGEMENU.FILLIN
+ 158727 . 160277) (\TEDIT.PAGEREGION.UNPARSE 160279 . 169678) (\TEDIT.APPLY.PAGELOOKS 169680 . 171607)
+ (\TEDIT.CHANGE.PAGELOOKS 171609 . 176223) (\TEDIT.PAGEMENU.CHARLOOKS.STATEFN 176225 . 177065)) (
+177068 182871 (\TEDIT.PAGEMENU.CREATE.HEADINGS 177078 . 179890) (\TEDIT.PAGEMENU.HEADINGS.SETSTATEFN
+179892 . 181317) (\TEDIT.PAGEMENU.HEADINGS.STATEFN 181319 . 182869)))))
STOP
diff --git a/library/tedit/TEDIT-MENU.LCOM b/library/tedit/TEDIT-MENU.LCOM
index 8c35a52d..4e14a98a 100644
Binary files a/library/tedit/TEDIT-MENU.LCOM and b/library/tedit/TEDIT-MENU.LCOM differ
diff --git a/library/tedit/TEDIT-PAGE b/library/tedit/TEDIT-PAGE
index 557b9cbe..3ed7ebe6 100644
--- a/library/tedit/TEDIT-PAGE
+++ b/library/tedit/TEDIT-PAGE
@@ -1,12 +1,13 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "17-Jan-2026 12:00:08" {WMEDLEY}tedit>TEDIT-PAGE.;241 130528
+(FILECREATED "27-Jan-2026 10:30:27" {WMEDLEY}TEDIT>TEDIT-PAGE.;243 130855
:EDIT-BY rmk
- :CHANGES-TO (FNS TEDIT.TO.IMAGEFILE)
+ :CHANGES-TO (FNS TEDIT.SINGLE.PAGEFORMAT)
+ (VARS TEDIT-PAGECOMS)
- :PREVIOUS-DATE "15-Jan-2026 10:48:30" {WMEDLEY}tedit>TEDIT-PAGE.;240)
+ :PREVIOUS-DATE "17-Jan-2026 12:00:08" {WMEDLEY}TEDIT>TEDIT-PAGE.;241)
(PRETTYCOMPRINT TEDIT-PAGECOMS)
@@ -51,6 +52,7 @@
(TEDIT.SINGLE.PAGEFORMAT T 540 756 NIL 'RIGHT 72 72
72 72 NIL 1]
(FNS TEDIT.TO.IMAGEFILE)
+ [P (DEFAULT.IMAGETYPE.CONVERSIONS '(TEDIT TEDIT.TO.IMAGEFILE]
(COMS
(* ;; "Perform page layout, based on a regular expression of typed regions.")
@@ -313,7 +315,8 @@
(TEDIT.SINGLE.PAGEFORMAT
[LAMBDA (PAGE#S? PX PY PFONT PQUAD LEFT RIGHT TOP BOTTOM COLS COLWIDTH INTERCOL HEADINGS UNITS
- PAGEPROPS PAPERSIZE) (* ; "Edited 11-May-2025 14:59 by rmk")
+ PAGEPROPS PAPERSIZE) (* ; "Edited 27-Jan-2026 10:30 by rmk")
+ (* ; "Edited 11-May-2025 14:59 by rmk")
(* ; "Edited 10-Jan-2025 11:41 by rmk")
(* ; "Edited 24-Dec-2024 21:20 by rmk")
(* ; "Edited 15-Aug-2024 23:01 by rmk")
@@ -356,7 +359,8 @@
(AND INTERCOL (SETQ INTERCOL (HCSCALE SCALEFACTOR INTERCOL)))
(SETQ PAGEWIDTH (IDIFFERENCE (IDIFFERENCE PAPERWIDTH RIGHT)
LEFT))
- (CL:WHEN (EQ PAGE#S? 'Yes)
+ (CL:WHEN (MEMB (L-CASE PAGE#S? T)
+ '(T Yes))
(* ;; "This asserts that the page number's region is 4 inches wide. Why? What if the pretext/posttext is longer?")
@@ -730,6 +734,8 @@
(RETURN (CLOSEF IMAGESTREAM))))])
)
+(DEFAULT.IMAGETYPE.CONVERSIONS '(TEDIT TEDIT.TO.IMAGEFILE))
+
(* ;; "Perform page layout, based on a regular expression of typed regions.")
@@ -2056,18 +2062,18 @@
(RETURN (DREMOVE NIL $$VAL])
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (12133 15745 (\TEDIT.PARSE.PAGEFRAMES 12143 . 13922) (\TEDIT.PUT.PAGEFRAMES 13924 .
-14748) (\TEDIT.UNPARSE.PAGEFRAMES 14750 . 15743)) (15808 37825 (TEDIT.SINGLE.PAGEFORMAT 15818 . 26811)
- (TEDIT.COMPOUND.PAGEFORMAT 26813 . 27792) (TEDIT.PAGEFORMAT 27794 . 35083) (TEDIT.GET.PAGEFORMAT
-35085 . 37823)) (38112 44592 (TEDIT.TO.IMAGEFILE 38122 . 44590)) (44679 97931 (\TEDIT.FORMATBOX 44689
- . 58113) (\TEDIT.FORMATHEADING 58115 . 62761) (\TEDIT.FORMATPAGE 62763 . 71952) (\TEDIT.FORMATTEXTBOX
- 71954 . 88467) (\TEDIT.FORMATFOLIO 88469 . 93786) (\TEDIT.FORMAT.FOUNDBOX? 93788 . 95827) (
-\TEDIT.SKIP.SPECIALCOND 95829 . 97929)) (98011 103066 (\TEDIT.HARDCOPY.PAGEHEADINGS 98021 . 103064)) (
-103175 111226 (\TEDIT.HARDCOPY-COLUMN-END 103185 . 111224)) (111271 116212 (SCALEPAGEUNITS 111281 .
-112422) (SCALEPAGEXUNITS 112424 . 113194) (SCALEPAGEYUNITS 113196 . 113967) (\TEDIT.PAPERHEIGHT 113969
- . 114904) (\TEDIT.PAPERWIDTH 114906 . 116210)) (116628 120196 (ROMANNUMERALS 116638 . 120194)) (
-120235 127501 (TEDIT.PAGENO.CREATE 120245 . 120621) (\TEDIT.PAGENO.OBJINIT 120623 . 121906) (
-\TEDIT.PAGENO.BUTTONEVENTINFN 121908 . 122974) (\TEDIT.PAGENO.IMAGEBOXFN 122976 . 125126) (
-\TEDIT.PAGENO.DISPLAYFN 125128 . 126778) (\TEDIT.PAGENO.GETFN 126780 . 127172) (\TEDIT.PAGENO.PUTFN
-127174 . 127499)) (127566 130505 (\TEDIT.FORMAT.FOOTNOTE 127576 . 130503)))))
+ (FILEMAP (NIL (12248 15860 (\TEDIT.PARSE.PAGEFRAMES 12258 . 14037) (\TEDIT.PUT.PAGEFRAMES 14039 .
+14863) (\TEDIT.UNPARSE.PAGEFRAMES 14865 . 15858)) (15923 38091 (TEDIT.SINGLE.PAGEFORMAT 15933 . 27077)
+ (TEDIT.COMPOUND.PAGEFORMAT 27079 . 28058) (TEDIT.PAGEFORMAT 28060 . 35349) (TEDIT.GET.PAGEFORMAT
+35351 . 38089)) (38378 44858 (TEDIT.TO.IMAGEFILE 38388 . 44856)) (45006 98258 (\TEDIT.FORMATBOX 45016
+ . 58440) (\TEDIT.FORMATHEADING 58442 . 63088) (\TEDIT.FORMATPAGE 63090 . 72279) (\TEDIT.FORMATTEXTBOX
+ 72281 . 88794) (\TEDIT.FORMATFOLIO 88796 . 94113) (\TEDIT.FORMAT.FOUNDBOX? 94115 . 96154) (
+\TEDIT.SKIP.SPECIALCOND 96156 . 98256)) (98338 103393 (\TEDIT.HARDCOPY.PAGEHEADINGS 98348 . 103391)) (
+103502 111553 (\TEDIT.HARDCOPY-COLUMN-END 103512 . 111551)) (111598 116539 (SCALEPAGEUNITS 111608 .
+112749) (SCALEPAGEXUNITS 112751 . 113521) (SCALEPAGEYUNITS 113523 . 114294) (\TEDIT.PAPERHEIGHT 114296
+ . 115231) (\TEDIT.PAPERWIDTH 115233 . 116537)) (116955 120523 (ROMANNUMERALS 116965 . 120521)) (
+120562 127828 (TEDIT.PAGENO.CREATE 120572 . 120948) (\TEDIT.PAGENO.OBJINIT 120950 . 122233) (
+\TEDIT.PAGENO.BUTTONEVENTINFN 122235 . 123301) (\TEDIT.PAGENO.IMAGEBOXFN 123303 . 125453) (
+\TEDIT.PAGENO.DISPLAYFN 125455 . 127105) (\TEDIT.PAGENO.GETFN 127107 . 127499) (\TEDIT.PAGENO.PUTFN
+127501 . 127826)) (127893 130832 (\TEDIT.FORMAT.FOOTNOTE 127903 . 130830)))))
STOP
diff --git a/library/tedit/TEDIT-PAGE.LCOM b/library/tedit/TEDIT-PAGE.LCOM
index 79d8c691..e0e57bf5 100644
Binary files a/library/tedit/TEDIT-PAGE.LCOM and b/library/tedit/TEDIT-PAGE.LCOM differ
diff --git a/library/tedit/TEDIT-PCTREE b/library/tedit/TEDIT-PCTREE
index b1dca4b3..b31bd75c 100644
--- a/library/tedit/TEDIT-PCTREE
+++ b/library/tedit/TEDIT-PCTREE
@@ -1,14 +1,13 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "28-Jul-2025 23:25:19"
-{DSK}kaplan>Local>medley3.5>working-medley>library>tedit>TEDIT-PCTREE.;249 69193
+(FILECREATED "14-Feb-2026 13:22:06" {WMEDLEY}TEDIT>TEDIT-PCTREE.;251 68691
:EDIT-BY rmk
- :CHANGES-TO (FNS \TEDIT.MAKEPCTB)
+ :CHANGES-TO (VARS TEDIT-PCTREECOMS)
+ (FNS \TEDIT.UNLINKPIECE \TEDIT.DELETEPIECES)
- :PREVIOUS-DATE " 8-Feb-2025 20:56:54"
-{DSK}kaplan>Local>medley3.5>working-medley>library>tedit>TEDIT-PCTREE.;248)
+ :PREVIOUS-DATE "28-Jul-2025 23:25:19" {WMEDLEY}TEDIT>TEDIT-PCTREE.;249)
(PRETTYCOMPRINT TEDIT-PCTREECOMS)
@@ -37,8 +36,8 @@
(GLOBALVARS MULTIPLE-PIECE-TABLES)
(FNS \TEDIT.MAKEPCTB \TEDIT.UPDATEPCNODES \TEDIT.FIRSTPIECE \TEDIT.DELETETREE
\TEDIT.INSERTTREE \TEDIT.LASTPIECE \TEDIT.PCTOCH \TEDIT.CHTOPC \TEDIT.SET-TOTLEN
- \TEDIT.MAKE.VACANT.BTREESLOT \TEDIT.LINKNEWPIECE \TEDIT.UNLINKPIECE \TEDIT.SPLITPIECE
- \TEDIT.INSERTPIECE \TEDIT.INSERTPIECES \TEDIT.DELETEPIECES \TEDIT.ALIGNEDPIECE)
+ \TEDIT.MAKE.VACANT.BTREESLOT \TEDIT.LINKNEWPIECE \TEDIT.SPLITPIECE \TEDIT.INSERTPIECE
+ \TEDIT.INSERTPIECES \TEDIT.DELETEPIECES \TEDIT.ALIGNEDPIECE)
(COMS (* ; "Debugging ")
(FNS \TEDIT.BTVALIDATE \TEDIT.BTVALIDATE.PRINT \TEDIT.CHECK-BTREE \TEDIT.CHECK-BTREE1
\TEDIT.BTFAIL \TEDIT.MATCHPCS)
@@ -658,20 +657,6 @@
(freplace (PIECE PREVPIECE) of NEXT with NEW))
NEW])
-(\TEDIT.UNLINKPIECE
- [LAMBDA (PREV PC TEXTOBJ) (* ; "Edited 7-Feb-2025 08:04 by rmk")
- (* ; "Edited 21-Oct-2024 00:26 by rmk")
- (* ; "Edited 21-Oct-2023 17:24 by rmk")
- (* ; "Edited 30-May-2023 00:31 by rmk")
-
- (* ;; "Takes PC out of the piece chain, linking prev and next around it.")
-
- (\TEDIT.THELP 'NOTCALLED?)
- (CL:WHEN PREV
- (freplace (PIECE NEXTPIECE) of PREV with (NEXTPIECE PC)))
- (freplace (PIECE PREVPIECE) of (OR (NEXTPIECE PC)
- (FGETTOBJ TEXTOBJ SUFFIXPIECE)) with PREV])
-
(\TEDIT.SPLITPIECE
[LAMBDA (PC CHOFFSET TEXTOBJ) (* ; "Edited 21-Oct-2024 00:33 by rmk")
(* ; "Edited 17-Mar-2024 00:11 by rmk")
@@ -838,7 +823,8 @@
PIECES])
(\TEDIT.DELETEPIECES
- [LAMBDA (SELPIECES TEXTOBJ) (* ; "Edited 7-Feb-2025 08:08 by rmk")
+ [LAMBDA (SELPIECES TEXTOBJ) (* ; "Edited 14-Feb-2026 13:20 by rmk")
+ (* ; "Edited 7-Feb-2025 08:08 by rmk")
(* ; "Edited 26-Nov-2024 10:50 by rmk")
(* ; "Edited 16-Mar-2024 10:00 by rmk")
(* ; "Edited 25-Nov-2023 12:12 by rmk")
@@ -859,6 +845,11 @@
(* ;; "This may not be entirely safe against an interrupt, which only matters on the call from \INSERTSELPIECES (otherwise the data isn't yet visible). Although the tree is consistent with the remaining pieces after each deletion, the fact that we keep the SELPIECE links intact means that the remaining pieces point to pieces that are no longer in the tree. We could do a little more work to incrementally chain the deleted pieces together, one by one, as they are deleted--in the end they would all be out of the tree, and the deletion chain would have been reconnected. Alternatively, we can make the whole loop be uninterruptable. ")
(\TEDIT.BTVALIDATE '\TEDIT.DELETEPIECES 'BEFORE TEXTOBJ)
+ (CL:WHEN (type? PIECE SELPIECES)
+ (SETQ SELPIECES (create SELPIECES
+ SPFIRST _ SELPIECES
+ SPLAST _ SELPIECES
+ SPLEN _ (PLEN SELPIECES))))
(for PC PREV NEXT first (FSETTOBJ TEXTOBJ HINTPC NIL)
(SETQ PREV (PREVPIECE (GETSPC SELPIECES SPFIRST)))
(* ; "For incremental chain-update")
@@ -1113,13 +1104,13 @@
(GLOBALVARS BTVALIDATETAGS)
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (8767 56719 (\TEDIT.MAKEPCTB 8777 . 10670) (\TEDIT.UPDATEPCNODES 10672 . 12966) (
-\TEDIT.FIRSTPIECE 12968 . 14375) (\TEDIT.DELETETREE 14377 . 17651) (\TEDIT.INSERTTREE 17653 . 20398) (
-\TEDIT.LASTPIECE 20400 . 21207) (\TEDIT.PCTOCH 21209 . 23306) (\TEDIT.CHTOPC 23308 . 29485) (
-\TEDIT.SET-TOTLEN 29487 . 30275) (\TEDIT.MAKE.VACANT.BTREESLOT 30277 . 37007) (\TEDIT.LINKNEWPIECE
-37009 . 38598) (\TEDIT.UNLINKPIECE 38600 . 39420) (\TEDIT.SPLITPIECE 39422 . 44078) (
-\TEDIT.INSERTPIECE 44080 . 47352) (\TEDIT.INSERTPIECES 47354 . 50446) (\TEDIT.DELETEPIECES 50448 .
-54602) (\TEDIT.ALIGNEDPIECE 54604 . 56717)) (56747 69070 (\TEDIT.BTVALIDATE 56757 . 58298) (
-\TEDIT.BTVALIDATE.PRINT 58300 . 59665) (\TEDIT.CHECK-BTREE 59667 . 61994) (\TEDIT.CHECK-BTREE1 61996
- . 67627) (\TEDIT.BTFAIL 67629 . 68051) (\TEDIT.MATCHPCS 68053 . 69068)))))
+ (FILEMAP (NIL (8731 56217 (\TEDIT.MAKEPCTB 8741 . 10634) (\TEDIT.UPDATEPCNODES 10636 . 12930) (
+\TEDIT.FIRSTPIECE 12932 . 14339) (\TEDIT.DELETETREE 14341 . 17615) (\TEDIT.INSERTTREE 17617 . 20362) (
+\TEDIT.LASTPIECE 20364 . 21171) (\TEDIT.PCTOCH 21173 . 23270) (\TEDIT.CHTOPC 23272 . 29449) (
+\TEDIT.SET-TOTLEN 29451 . 30239) (\TEDIT.MAKE.VACANT.BTREESLOT 30241 . 36971) (\TEDIT.LINKNEWPIECE
+36973 . 38562) (\TEDIT.SPLITPIECE 38564 . 43220) (\TEDIT.INSERTPIECE 43222 . 46494) (
+\TEDIT.INSERTPIECES 46496 . 49588) (\TEDIT.DELETEPIECES 49590 . 54100) (\TEDIT.ALIGNEDPIECE 54102 .
+56215)) (56245 68568 (\TEDIT.BTVALIDATE 56255 . 57796) (\TEDIT.BTVALIDATE.PRINT 57798 . 59163) (
+\TEDIT.CHECK-BTREE 59165 . 61492) (\TEDIT.CHECK-BTREE1 61494 . 67125) (\TEDIT.BTFAIL 67127 . 67549) (
+\TEDIT.MATCHPCS 67551 . 68566)))))
STOP
diff --git a/library/tedit/TEDIT-PCTREE.LCOM b/library/tedit/TEDIT-PCTREE.LCOM
index 7f7c0e11..f0cf5a86 100644
Binary files a/library/tedit/TEDIT-PCTREE.LCOM and b/library/tedit/TEDIT-PCTREE.LCOM differ
diff --git a/library/tedit/TEDIT-SCREEN b/library/tedit/TEDIT-SCREEN
index c5d199f0..4c33bbac 100644
--- a/library/tedit/TEDIT-SCREEN
+++ b/library/tedit/TEDIT-SCREEN
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "31-Dec-2025 23:10:18" {WMEDLEY}tedit>TEDIT-SCREEN.;915 186658
+(FILECREATED " 5-Feb-2026 00:39:54" {WMEDLEY}TEDIT>TEDIT-SCREEN.;916 186880
:EDIT-BY rmk
- :CHANGES-TO (VARS TEDIT-SCREENCOMS)
+ :CHANGES-TO (FNS \TEDIT.FORMATLINE)
- :PREVIOUS-DATE " 7-Dec-2025 16:28:01" {WMEDLEY}tedit>TEDIT-SCREEN.;914)
+ :PREVIOUS-DATE "31-Dec-2025 23:10:18" {WMEDLEY}TEDIT>TEDIT-SCREEN.;915)
(PRETTYCOMPRINT TEDIT-SCREENCOMS)
@@ -654,6 +654,7 @@
(\TEDIT.FORMATLINE
[LAMBDA (TSTREAM CH#1 LINE REGION IMAGESTREAM FORMATTINGSTATE)
+ (* ; "Edited 5-Feb-2026 00:38 by rmk")
(* ; "Edited 21-Nov-2025 16:36 by rmk")
(* ; "Edited 7-Aug-2025 12:49 by rmk")
(* ; "Edited 27-Apr-2025 11:24 by rmk")
@@ -706,8 +707,10 @@
(CL:UNLESS LINE
(SETQ LINE (create LINEDESCRIPTOR)))
(CL:UNLESS IMAGESTREAM
- (SETQ IMAGESTREAM (WINDOWPROP (\TEDIT.PRIMARYPANE TSTREAM)
- 'DSP)))
+ (SETQ IMAGESTREAM (CL:IF (\TEDIT.PRIMARYPANE TSTREAM)
+ (WINDOWPROP (\TEDIT.PRIMARYPANE TSTREAM)
+ 'DSP)
+ (DSPCREATE))))
(PROG ((TEXTOBJ (FTEXTOBJ TSTREAM))
(OFFSET 0)
(TRUEASCENT -1)
@@ -2863,21 +2866,21 @@
(\TEDIT.LINE.TALLP LINE PHEIGHT))))])
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (26200 28416 (\TEDIT.LINEDESCRIPTOR.DEFPRINT 26210 . 28414)) (35870 119502 (
-\TEDIT.FORMATLINE 35880 . 70986) (\TEDIT.FORMATLINE.SETUP.PARA 70988 . 76182) (
-\TEDIT.FORMATLINE.HORIZONTAL 76184 . 81001) (\TEDIT.FORMATLINE.VERTICAL 81003 . 83454) (
-\TEDIT.FORMATLINE.JUSTIFY 83456 . 89477) (\TEDIT.FORMATLINE.TABS 89479 . 97507) (\TEDIT.SCALE.TABS
-97509 . 98300) (\TEDIT.FORMATLINE.PURGE.SPACES 98302 . 99729) (\TEDIT.FORMATLINE.FLUSH.SOFTHYPHEN
-99731 . 100808) (\TEDIT.FORMATLINE.EMPTY 100810 . 105630) (\TEDIT.FORMATLINE.UPDATELOOKS 105632 .
-111813) (\TEDIT.FORMATLINE.LASTLEGAL 111815 . 115265) (\TEDIT.LINES.ABOVE 115267 . 118878) (
-\TEDIT.CHNO.TO.YTOP 118880 . 119500)) (119779 140359 (\TEDIT.DISPLAYLINE 119789 . 132299) (
-\TEDIT.DISPLAYLINE.TABS 132301 . 135105) (\TEDIT.LINECACHE 135107 . 135835) (\TEDIT.CREATE.LINECACHE
-135837 . 136673) (\TEDIT.BLTCHAR 136675 . 139302) (\TEDIT.DIACRITIC.SHIFT 139304 . 140357)) (140974
-186635 (\TEDIT.BACKFORMAT 140984 . 143538) (\TEDIT.PREVIOUS.LINEBREAK 143540 . 146343) (
-\TEDIT.UPDATE.LINES 146345 . 152651) (\TEDIT.PANE.CREATELINES 152653 . 154943) (
-\TEDIT.SUFFIXLINE.CREATE 154945 . 156560) (\TEDIT.LINES.BELOW 156562 . 161172) (\TEDIT.MEASURED.LINES
-161174 . 163183) (\TEDIT.VALID.LASTCHNOS 163185 . 166961) (\TEDIT.VALID.NEXTCHNOS 166963 . 170437) (
-\TEDIT.LASTVALIDLINE 170439 . 175110) (\TEDIT.NEXTVALIDLINE 175112 . 178082) (
-\TEDIT.CLEARPANE.BELOW.LINE 178084 . 180190) (\TEDIT.INSERTLINE 180192 . 181578) (\TEDIT.LINE.BOTTOM
-181580 . 184810) (\TEDIT.SHOW.AT.BOTTOMP 184812 . 185922) (\TEDIT.SHOW.AT.TOPP 185924 . 186633)))))
+ (FILEMAP (NIL (26200 28416 (\TEDIT.LINEDESCRIPTOR.DEFPRINT 26210 . 28414)) (35870 119724 (
+\TEDIT.FORMATLINE 35880 . 71208) (\TEDIT.FORMATLINE.SETUP.PARA 71210 . 76404) (
+\TEDIT.FORMATLINE.HORIZONTAL 76406 . 81223) (\TEDIT.FORMATLINE.VERTICAL 81225 . 83676) (
+\TEDIT.FORMATLINE.JUSTIFY 83678 . 89699) (\TEDIT.FORMATLINE.TABS 89701 . 97729) (\TEDIT.SCALE.TABS
+97731 . 98522) (\TEDIT.FORMATLINE.PURGE.SPACES 98524 . 99951) (\TEDIT.FORMATLINE.FLUSH.SOFTHYPHEN
+99953 . 101030) (\TEDIT.FORMATLINE.EMPTY 101032 . 105852) (\TEDIT.FORMATLINE.UPDATELOOKS 105854 .
+112035) (\TEDIT.FORMATLINE.LASTLEGAL 112037 . 115487) (\TEDIT.LINES.ABOVE 115489 . 119100) (
+\TEDIT.CHNO.TO.YTOP 119102 . 119722)) (120001 140581 (\TEDIT.DISPLAYLINE 120011 . 132521) (
+\TEDIT.DISPLAYLINE.TABS 132523 . 135327) (\TEDIT.LINECACHE 135329 . 136057) (\TEDIT.CREATE.LINECACHE
+136059 . 136895) (\TEDIT.BLTCHAR 136897 . 139524) (\TEDIT.DIACRITIC.SHIFT 139526 . 140579)) (141196
+186857 (\TEDIT.BACKFORMAT 141206 . 143760) (\TEDIT.PREVIOUS.LINEBREAK 143762 . 146565) (
+\TEDIT.UPDATE.LINES 146567 . 152873) (\TEDIT.PANE.CREATELINES 152875 . 155165) (
+\TEDIT.SUFFIXLINE.CREATE 155167 . 156782) (\TEDIT.LINES.BELOW 156784 . 161394) (\TEDIT.MEASURED.LINES
+161396 . 163405) (\TEDIT.VALID.LASTCHNOS 163407 . 167183) (\TEDIT.VALID.NEXTCHNOS 167185 . 170659) (
+\TEDIT.LASTVALIDLINE 170661 . 175332) (\TEDIT.NEXTVALIDLINE 175334 . 178304) (
+\TEDIT.CLEARPANE.BELOW.LINE 178306 . 180412) (\TEDIT.INSERTLINE 180414 . 181800) (\TEDIT.LINE.BOTTOM
+181802 . 185032) (\TEDIT.SHOW.AT.BOTTOMP 185034 . 186144) (\TEDIT.SHOW.AT.TOPP 186146 . 186855)))))
STOP
diff --git a/library/tedit/TEDIT-SCREEN.LCOM b/library/tedit/TEDIT-SCREEN.LCOM
index 5181485e..93232968 100644
Binary files a/library/tedit/TEDIT-SCREEN.LCOM and b/library/tedit/TEDIT-SCREEN.LCOM differ
diff --git a/library/tedit/TEDIT-SELECTION b/library/tedit/TEDIT-SELECTION
index c6a90222..6c5bab83 100644
--- a/library/tedit/TEDIT-SELECTION
+++ b/library/tedit/TEDIT-SELECTION
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "29-Jul-2025 11:22:10" {WMEDLEY}tedit>TEDIT-SELECTION.;731 161124
+(FILECREATED "16-Feb-2026 00:38:33" {WMEDLEY}TEDIT>TEDIT-SELECTION.;738 162152
:EDIT-BY rmk
- :CHANGES-TO (FNS \TEDIT.FIND.PROTECTED.START \TEDIT.FIND.PROTECTED.END)
+ :CHANGES-TO (FNS \TEDIT.SELPIECES.CHARTRANSFORM)
- :PREVIOUS-DATE "28-Jul-2025 23:50:43" {WMEDLEY}tedit>TEDIT-SELECTION.;730)
+ :PREVIOUS-DATE "14-Jan-2026 14:32:01" {WMEDLEY}tedit>TEDIT-SELECTION.;736)
(PRETTYCOMPRINT TEDIT-SELECTIONCOMS)
@@ -73,8 +73,7 @@
(* ;; "If DCH=0, this is a caret-only selection, with no highlighting. In that case CHLIM=(ADD1 CH#) and POINT essentially indicates whether the caret blinks before or after CH#.")
- NIL (* ;
- "Was Y0: Y value of topmost line of selection")
+ SELOPERATION (* ; "NORMAL, MOVE, COPY... HOW and HOWHEIGHT are derived from the operation. Was Y0: Y value of topmost line of selection")
X0 (* ;
"X value of left edge of selection on the first line")
SELLINES (* ; "A list of (L1 L2) pairs one for each pane, to replace the separate L1 L2 lists. Was DX: Width of the selection, if it's on one line.")
@@ -1214,7 +1213,8 @@
(SETTOBJ TEXTOBJ BLUEPENDINGDELETE NIL])
(\TEDIT.SET.SEL.LOOKS
- [LAMBDA (SEL OPERATION) (* ; "Edited 6-May-2025 11:32 by rmk")
+ [LAMBDA (SEL OPERATION) (* ; "Edited 10-Jan-2026 12:30 by rmk")
+ (* ; "Edited 6-May-2025 11:32 by rmk")
(* ; "Edited 28-Feb-2025 17:45 by rmk")
(* ; "Edited 7-Nov-2024 21:50 by rmk")
(* ; "Edited 4-Oct-2024 08:40 by rmk")
@@ -1260,6 +1260,7 @@
(FSETSEL SEL HASCARET T))
(NIL)
(\TEDIT.THELP "UNKNOWN SELECTION OPERATION" OPERATION))
+ (FSETSEL SEL SELOPERATION OPERATION)
SEL])
)
(DECLARE%: EVAL@COMPILE DONTCOPY
@@ -1421,7 +1422,8 @@
'INVERT) repeatuntil (EQ L LN])
(\TEDIT.UPDATE.SEL
- [LAMBDA (TSTREAM/SEL CH# DCH POINT LOOKS CHLIM) (* ; "Edited 6-May-2025 11:36 by rmk")
+ [LAMBDA (TSTREAM/SEL CH# DCH POINT LOOKS CHLIM) (* ; "Edited 6-Jan-2026 20:18 by rmk")
+ (* ; "Edited 6-May-2025 11:36 by rmk")
(* ; "Edited 21-Apr-2025 22:50 by rmk")
(* ; "Edited 6-Apr-2025 11:47 by rmk")
(* ; "Edited 10-Jul-2024 17:25 by rmk")
@@ -1458,6 +1460,13 @@
(CL:UNLESS POINT
(SETQ POINT (GETTH CH# THPOINT CH#)))
(SETQ CH# (GETTH CH# THCH#))
+ elseif (LISTP CH#)
+ then (CL:UNLESS DCH
+ (SETQ DCH (CADR CH#)))
+ (CL:UNLESS POINT
+ (SETQ POINT (CADDR CH#)))
+ (CL:UNLESS CH#
+ (SETQ POINT (CAR CH#)))
else
(* ;;
"Get defaults from SEL (either a selection or a textobj whose SEL is indicated)")
@@ -1611,7 +1620,8 @@
(DEFINEQ
(\TEDIT.COPYSEL
- [LAMBDA (FROM TO) (* ; "Edited 3-Sep-2024 22:44 by rmk")
+ [LAMBDA (FROM TO) (* ; "Edited 11-Jan-2026 00:17 by rmk")
+ (* ; "Edited 3-Sep-2024 22:44 by rmk")
(* ; "Edited 7-Jul-2024 11:21 by rmk")
(* ; "Edited 30-Jun-2024 23:21 by rmk")
(* ; "Edited 29-Apr-2024 12:35 by rmk")
@@ -1644,6 +1654,7 @@
(FSETSEL TO HASCARET (FGETSEL FROM HASCARET))
(FSETSEL TO SELOBJ (FGETSEL FROM SELOBJ))
(FSETSEL TO ONFLG (FGETSEL FROM ONFLG))
+ (FSETSEL TO SELOPERATION (FGETSEL FROM SELOPERATION))
else (SETQ TO (create SELECTION using FROM SELTEXTSTREAM _ NIL L1 _ (COPY (FGETSEL FROM L1))
LN _ (COPY (FGETSEL FROM LN))
SELLINES _ (COPY (FGETSEL FROM SELLINES]
@@ -2030,7 +2041,8 @@
SPLASTCHAR _ (ffetch (SELPIECES SPLASTCHAR) of SP2])
(\TEDIT.SELPIECES.CHARTRANSFORM
- [LAMBDA (SELPIECES CHARFN OBJECTSTOO TSTREAM) (* ; "Edited 24-Apr-2025 16:02 by rmk")
+ [LAMBDA (SELPIECES CHARFN OBJECTSTOO TSTREAM) (* ; "Edited 16-Feb-2026 00:38 by rmk")
+ (* ; "Edited 24-Apr-2025 16:02 by rmk")
(* ; "Edited 20-Apr-2025 23:23 by rmk")
(* ; "Edited 16-Mar-2025 10:03 by rmk")
(* ; "Edited 7-Nov-2024 21:50 by rmk")
@@ -2055,10 +2067,10 @@
(* ;; "This assumes that no file piece has a PLEN greater than \MaxArrayLen characters. We rely on the piece-table reader and writer to guarantee this. If not, ALLOCSTRING will cause an error.")
- [for I from 1 to (PLEN PC)
- do (RPLCHARCODE STR I (APPLY* CHARFN (\TEDIT.PIECE.NTHCHARCODE
- PC I)
- (add INDEX 1]
+ [for I from 0 to (PLAST PC)
+ do (RPLCHARCODE STR (ADD1 I)
+ (APPLY* CHARFN (\TEDIT.PIECE.NTHCHARCODE PC I)
+ (add INDEX 1]
(if (fetch (STRINGP FATSTRINGP) of STR)
then (FSETPC PC PTYPE FATSTRING.PTYPE)
(FSETPC PC PBYTESPERCHAR 2)
@@ -2237,7 +2249,8 @@
(FGETSEL SCRSEL CH#])
(TEDIT.SELPROP
- [LAMBDA X (* ; "Edited 28-Feb-2025 17:14 by rmk")
+ [LAMBDA X (* ; "Edited 11-Jan-2026 00:18 by rmk")
+ (* ; "Edited 28-Feb-2025 17:14 by rmk")
(* ; "Edited 6-Feb-2025 16:48 by rmk")
(* ; "Edited 31-Oct-2024 18:00 by rmk")
(* ; "Edited 23-Sep-2024 23:11 by rmk")
@@ -2277,6 +2290,7 @@
(TEXTSTREAM (FGETSEL SEL SELTEXTSTREAM))
(SHADE (FGETSEL SEL HOW))
(SHADEHEIGHT (FGETSEL SEL HOWHEIGHT))
+ (SELOPERATION (FGETSEL SEL SELOPERATION))
(SET (FGETSEL SEL SET))
(\ILLEGAL.ARG PROP))
(CL:WHEN (IGREATERP X 2)
@@ -2296,6 +2310,7 @@
(CHLIM (\TEDIT.UPDATE.SEL SEL NIL (IDIFFERENCE NEWVALUE (FGETSEL SEL CH#))))
(SHADE (FSETSEL SEL HOW NEWVALUE))
(SHADEHEIGHT (FSETSEL SEL HOWHEIGHT NEWVALUE))
+ (SELOPERATION (\TEDIT.SET.SEL.LOOKS SEL NEWVALUE))
(SET (FSETSEL SEL SET NEWVALUE))
(\ILLEGAL.ARG PROP))
(CL:WHEN (FGETSEL SEL SELTEXTSTREAM)
@@ -2556,26 +2571,26 @@
(ADDTOVAR LAMA TEDIT.SELPROP)
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (15897 17718 (\TEDIT.SELECTION.DEFPRINT 15907 . 17716)) (17755 19260 (
-\TEDIT.SET.GLOBAL.SELECTIONS 17765 . 19258)) (19261 25482 (\TEDIT.SELECTED.PIECES 19271 . 20910) (
-\TEDIT.FIND.PROTECTED.END 20912 . 22706) (\TEDIT.FIND.PROTECTED.START 22708 . 24691) (
-\TEDIT.WORD.BOUND 24693 . 25480)) (25616 59723 (\TEDIT.EXTEND.SEL 25626 . 32866) (\TEDIT.SCAN.LINE
-32868 . 44541) (\TEDIT.SCAN.LINE.WORD 44543 . 49536) (\TEDIT.XYTOSEL 49538 . 56876) (\TEDIT.REGIONTYPE
- 56878 . 57897) (\TEDIT.XYTOSEL.INLINEP 57899 . 58354) (\TEDIT.XYTOSEL.LINE 58356 . 59721)) (59724
-73269 (\TEDIT.FIXSEL 59734 . 69111) (\TEDIT.CHTOLINEX 69113 . 73267)) (73270 77324 (
-\TEDIT.RESET.EXTEND.PENDING.DELETE 73280 . 74558) (\TEDIT.SET.SEL.LOOKS 74560 . 77322)) (78261 99027 (
-\TEDIT.SHOWSEL 78271 . 83247) (\TEDIT.NOSEL 83249 . 83550) (\TEDIT.SEL.OFF 83552 . 83963) (
-\TEDIT.SEL.ON 83965 . 84381) (\TEDIT.SHOWSEL.HILIGHT 84383 . 89004) (\TEDIT.UPDATE.SEL 89006 . 93221)
-(\TEDIT.CARETLINE 93223 . 93937) (\TEDIT.SEL.L1 93939 . 94622) (\TEDIT.SEL.LN 94624 . 95307) (
-\TEDIT.SEL.DELETEDCHARS 95309 . 99025)) (99028 103734 (\TEDIT.COPYSEL 99038 . 101504) (
-\TEDIT.SEL.CHANGED? 101506 . 103732)) (103765 117424 (\TEDIT.SELECT.OBJECT 103775 . 108728) (
-\TEDIT.SHOWSEL.OBJECT 108730 . 110961) (\TEDIT.CLIP.OBJECT 110963 . 112967) (\TEDIT.OPERATE.OBJECT
-112969 . 117422)) (117452 137201 (\TEDIT.SELPIECES 117462 . 121743) (\TEDIT.SELPIECES.COPY 121745 .
-124234) (\TEDIT.SELPIECES.CONCAT 124236 . 126115) (\TEDIT.SELPIECES.CHARTRANSFORM 126117 . 129576) (
-\TEDIT.SELPIECES.FROM.STRING 129578 . 134836) (\TEDIT.SELPIECES.TO.STRING 134838 . 137199)) (137254
-160955 (TEDIT.XYTOCH 137264 . 139840) (TEDIT.SELPROP 139842 . 143872) (TEDIT.GETPOINT 143874 . 145794)
- (TEDIT.GETSEL 145796 . 146672) (TEDIT.GETSEL.PARA 146674 . 147623) (TEDIT.SCANSEL 147625 . 148573) (
-TEDIT.SET.SEL.LOOKS 148575 . 150060) (TEDIT.SETSEL 150062 . 154980) (TEDIT.SHOWSEL 154982 . 156846) (
-TEDIT.SEL.AS.STRING 156848 . 159333) (TEDIT.SEL.AS.SEXPR 159335 . 160621) (TEDIT.SELECTALL 160623 .
-160953)))))
+ (FILEMAP (NIL (15888 17709 (\TEDIT.SELECTION.DEFPRINT 15898 . 17707)) (17746 19251 (
+\TEDIT.SET.GLOBAL.SELECTIONS 17756 . 19249)) (19252 25473 (\TEDIT.SELECTED.PIECES 19262 . 20901) (
+\TEDIT.FIND.PROTECTED.END 20903 . 22697) (\TEDIT.FIND.PROTECTED.START 22699 . 24682) (
+\TEDIT.WORD.BOUND 24684 . 25471)) (25607 59714 (\TEDIT.EXTEND.SEL 25617 . 32857) (\TEDIT.SCAN.LINE
+32859 . 44532) (\TEDIT.SCAN.LINE.WORD 44534 . 49527) (\TEDIT.XYTOSEL 49529 . 56867) (\TEDIT.REGIONTYPE
+ 56869 . 57888) (\TEDIT.XYTOSEL.INLINEP 57890 . 58345) (\TEDIT.XYTOSEL.LINE 58347 . 59712)) (59715
+73260 (\TEDIT.FIXSEL 59725 . 69102) (\TEDIT.CHTOLINEX 69104 . 73258)) (73261 77465 (
+\TEDIT.RESET.EXTEND.PENDING.DELETE 73271 . 74549) (\TEDIT.SET.SEL.LOOKS 74551 . 77463)) (78402 99555 (
+\TEDIT.SHOWSEL 78412 . 83388) (\TEDIT.NOSEL 83390 . 83691) (\TEDIT.SEL.OFF 83693 . 84104) (
+\TEDIT.SEL.ON 84106 . 84522) (\TEDIT.SHOWSEL.HILIGHT 84524 . 89145) (\TEDIT.UPDATE.SEL 89147 . 93749)
+(\TEDIT.CARETLINE 93751 . 94465) (\TEDIT.SEL.L1 94467 . 95150) (\TEDIT.SEL.LN 95152 . 95835) (
+\TEDIT.SEL.DELETEDCHARS 95837 . 99553)) (99556 104438 (\TEDIT.COPYSEL 99566 . 102208) (
+\TEDIT.SEL.CHANGED? 102210 . 104436)) (104469 118128 (\TEDIT.SELECT.OBJECT 104479 . 109432) (
+\TEDIT.SHOWSEL.OBJECT 109434 . 111665) (\TEDIT.CLIP.OBJECT 111667 . 113671) (\TEDIT.OPERATE.OBJECT
+113673 . 118126)) (118156 137982 (\TEDIT.SELPIECES 118166 . 122447) (\TEDIT.SELPIECES.COPY 122449 .
+124938) (\TEDIT.SELPIECES.CONCAT 124940 . 126819) (\TEDIT.SELPIECES.CHARTRANSFORM 126821 . 130357) (
+\TEDIT.SELPIECES.FROM.STRING 130359 . 135617) (\TEDIT.SELPIECES.TO.STRING 135619 . 137980)) (138035
+161983 (TEDIT.XYTOCH 138045 . 140621) (TEDIT.SELPROP 140623 . 144900) (TEDIT.GETPOINT 144902 . 146822)
+ (TEDIT.GETSEL 146824 . 147700) (TEDIT.GETSEL.PARA 147702 . 148651) (TEDIT.SCANSEL 148653 . 149601) (
+TEDIT.SET.SEL.LOOKS 149603 . 151088) (TEDIT.SETSEL 151090 . 156008) (TEDIT.SHOWSEL 156010 . 157874) (
+TEDIT.SEL.AS.STRING 157876 . 160361) (TEDIT.SEL.AS.SEXPR 160363 . 161649) (TEDIT.SELECTALL 161651 .
+161981)))))
STOP
diff --git a/library/tedit/TEDIT-SELECTION.LCOM b/library/tedit/TEDIT-SELECTION.LCOM
index 466a0b7f..1317c79c 100644
Binary files a/library/tedit/TEDIT-SELECTION.LCOM and b/library/tedit/TEDIT-SELECTION.LCOM differ
diff --git a/library/tedit/TEDIT-STREAM b/library/tedit/TEDIT-STREAM
index de978046..f88ae2ae 100644
--- a/library/tedit/TEDIT-STREAM
+++ b/library/tedit/TEDIT-STREAM
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED " 2-Dec-2025 17:50:45" {WMEDLEY}tedit>TEDIT-STREAM.;930 194007
+(FILECREATED "16-Feb-2026 12:40:44" {WMEDLEY}tedit>TEDIT-STREAM.;944 193110
:EDIT-BY rmk
- :CHANGES-TO (FNS OPENTEXTSTREAM \TEDIT.OPENTEXTFILE)
+ :CHANGES-TO (FNS \TEDIT.STREAMINIT)
- :PREVIOUS-DATE "19-Oct-2025 15:09:09" {WMEDLEY}TEDIT>TEDIT-STREAM.;927)
+ :PREVIOUS-DATE "16-Feb-2026 09:39:00" {WMEDLEY}tedit>TEDIT-STREAM.;943)
(PRETTYCOMPRINT TEDIT-STREAMCOMS)
@@ -14,8 +14,8 @@
(RPAQQ TEDIT-STREAMCOMS
[(DECLARE%: EVAL@COMPILE DONTCOPY
(EXPORT (RECORDS PIECE TEXTOBJ TEXTSTREAM)
- (MACROS NEXTPIECE PREVPIECE PLEN PTYPE PCONTENTS PCHARLOOKS PCHARSET PPARALOOKS
- PPARALAST PFPOS PBYTELEN PNEW PBINABLE PBYTESPERCHAR POBJ)
+ (MACROS NEXTPIECE PREVPIECE PLEN PLAST PTYPE PCONTENTS PCHARLOOKS PCHARSET
+ PPARALOOKS PPARALAST PFPOS PBYTELEN PNEW PBINABLE PBYTESPERCHAR POBJ)
(MACROS SETPC FSETPC GETPC FGETPC)
(MACROS THINPIECEP)
(MACROS VISIBLEPIECEP \NEXT.VISIBLE.PIECE \PREV.VISIBLE.PIECE)
@@ -43,7 +43,9 @@
(FNS \TEDIT.REOPENTEXTSTREAM \TEDIT.OPENTEXTSTREAM.PIECES \TEDIT.OPENTEXTSTREAM.PROPS
\TEDIT.OPENTEXTSTREAM.SETUP.SEL \TEDIT.OPENTEXTSTREAM.WINDOW
\TEDIT.OPENTEXTSTREAM.DEFAULTLOOKS \TEDIT.OPENTEXTFILE \TEDIT.CREATE.TEXTSTREAM
- \TEDIT.REOPEN.STREAM \TEDIT.TEXTINIT)
+ \TEDIT.REOPEN.STREAM)
+ (FNS \TEDIT.STREAMINIT TEDIT.IMAGESTREAM.OPEN)
+ (ALISTS (IMAGESTREAMTYPES TEDIT))
(* ;; "Is this being used:")
@@ -69,10 +71,7 @@
(MACROS \INSERTCH.EXTENDABLE))
(FNS \TEDIT.DELETE.SELPIECES \TEDIT.INSERTCH \TEDIT.INSERTCH.HISTORY \TEDIT.INSERTEOL
\TEDIT.INSERTCH.INSERTION \TEDIT.INSERTCH.EXTEND)
- (FNS \TEDIT.NEXTCHANGEABLE.CHNO \TEDIT.LASTCHANGEABLE.CHNO)
- (FNS \SETUPGETCH))
- (* ;
- "Deprecated, maybe still external callers")
+ (FNS \TEDIT.NEXTCHANGEABLE.CHNO \TEDIT.LASTCHANGEABLE.CHNO))
(FNS \TEDIT.INSTALL.PIECE)
[COMS (* ; "Support for TEXTPROP")
(FNS TEXTPROP GETTEXTPROP PUTTEXTPROP GETTEXTPROPS PUTTEXTPROPS TEXTPROP.ADD
@@ -83,7 +82,7 @@
(ADDVARS (INSPECTMACROS (TEXTOBJ \TEDIT.TEXTOBJ.PROPNAMES
\TEDIT.TEXTOBJ.PROPFETCHFN
\TEDIT.TEXTOBJ.PROPSTOREFN]
- (DECLARE%: DONTEVAL@LOAD DOCOPY (P (\TEDIT.TEXTINIT)))
+ (DECLARE%: DONTEVAL@LOAD DOCOPY (P (\TEDIT.STREAMINIT)))
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA)
(NLAML)
(LAMA TEXTPROP])
@@ -158,8 +157,7 @@
"The current selection within the text")
LASTARROWX (* ;
"X for next arrow up or arrow down. Was: Scratch space for the selection code")
- NIL (* ;
- "Was MOVESEL: Source for the next MOVE of text")
+ SECONDARYSEL (* ; "Holds secondary selection and operation just before the mouse leaves a window. Was MOVESEL: Source for the next MOVE of text")
NIL (* ;
"Was SHIFTEDSEL: Source for the next COPY")
NIL (* ;
@@ -395,6 +393,9 @@
(PUTPROPS PLEN MACRO ((PC)
(ffetch (PIECE PLEN) of PC)))
+(PUTPROPS PLAST MACRO ((PC)
+ (SUB1 (PLEN PC))))
+
(PUTPROPS PTYPE MACRO ((PC)
(ffetch (PIECE PTYPE) of PC)))
@@ -922,7 +923,8 @@
else (STREAMOP 'ENDOFSTREAMOP TSTREAM TSTREAM])
(\TEDIT.TEXTBACKFILEPTR
- [LAMBDA (TSTREAM) (* ; "Edited 21-Oct-2024 00:33 by rmk")
+ [LAMBDA (TSTREAM) (* ; "Edited 16-Feb-2026 08:54 by rmk")
+ (* ; "Edited 21-Oct-2024 00:33 by rmk")
(* ; "Edited 1-Feb-2024 11:25 by rmk")
(* ; "Edited 5-Jan-2024 17:57 by rmk")
(* ; "Edited 28-Dec-2023 13:34 by rmk")
@@ -954,7 +956,7 @@
then (CL:WHEN (SETQ PPC (\PREV.VISIBLE.PIECE PC))
(* ;
"Back up to last char of previous piece, if any.")
- (\TEDIT.INSTALL.PIECE TSTREAM PPC (SUB1 (PLEN PPC)))
+ (\TEDIT.INSTALL.PIECE TSTREAM PPC (PLAST PPC))
(SETQ PC PPC))
elseif (AND (MEMB (PTYPE PC)
FILE.PTYPES)
@@ -1519,7 +1521,8 @@
(\TEDIT.OPENTEXTSTREAM.DEFAULTLOOKS TEXTOBJ])
(\TEDIT.OPENTEXTSTREAM.SETUP.SEL
- [LAMBDA (TSTREAM) (* ; "Edited 21-Apr-2025 20:14 by rmk")
+ [LAMBDA (TSTREAM) (* ; "Edited 10-Jan-2026 23:53 by rmk")
+ (* ; "Edited 21-Apr-2025 20:14 by rmk")
(* ; "Edited 6-Apr-2025 14:24 by rmk")
(* ; "Edited 17-Feb-2025 08:56 by rmk")
(* ; "Edited 25-Nov-2024 14:33 by rmk")
@@ -1562,20 +1565,22 @@
(OR (CADR SELPROP)
0)
(OR (CADDR SELPROP)
- 'LEFT))
+ 'LEFT)
+ 'NORMAL)
elseif (FIXP SELPROP)
- then (\TEDIT.UPDATE.SEL SEL SELPROP 0 'LEFT)
+ then (\TEDIT.UPDATE.SEL SEL SELPROP 0 'LEFT 'NORMAL)
elseif (FGETTOBJ TEXTOBJ TXTAPPENDONLY)
then
(* ;; "Default to after the last character")
(\TEDIT.UPDATE.SEL SEL (FGETTOBJ TEXTOBJ TEXTLEN)
0
- 'RIGHT)
+ 'RIGHT
+ 'NORMAL)
else
(* ;; "Default to before the first character. UPDATE.SEL screws up the CHLIM=CH#+DCH invariant when DCH=0, it adds 1, But UPDATE.SEL adds 1 when DCH=0. That's wrong for the initial caret, so brute-force fix it here. Maybe it's wrong in general?")
- (\TEDIT.UPDATE.SEL SEL 1 0 'LEFT)
+ (\TEDIT.UPDATE.SEL SEL 1 0 'LEFT 'NORMAL)
(FSETSEL SEL CHLIM 1))
[FSETTOBJ TEXTOBJ CARETLOOKS (if (FGETSEL SEL SET)
then (* ;
@@ -1751,9 +1756,13 @@
(* ;; "Return the new value for the stream:")
NEWSTREAM])
+)
+(DEFINEQ
-(\TEDIT.TEXTINIT
- [LAMBDA NIL (* ; "Edited 23-Sep-2025 21:03 by rmk")
+(\TEDIT.STREAMINIT
+ [LAMBDA NIL (* ; "Edited 16-Feb-2026 12:40 by rmk")
+ (* ; "Edited 26-Jan-2026 16:06 by rmk")
+ (* ; "Edited 23-Sep-2025 21:03 by rmk")
(* ; "Edited 20-Sep-2025 08:48 by rmk")
(* ; "Edited 18-Sep-2025 14:52 by rmk")
(* ; "Edited 10-Jul-2025 11:28 by rmk")
@@ -1807,17 +1816,9 @@
IMSCALE _ [FUNCTION (LAMBDA NIL 1]
IMCOLOR _ (FUNCTION \TEDIT.TEXTCOLOR)))
- (* ;; "Do we need TEXT here?")
-
- (FONTPROFILE.ADDDEVICE 'TEXT 'DISPLAY)
- (ADDTOVAR IMAGESTREAMTYPES (TEXT (FONTCREATE \CREATEDISPLAYFONT)
- (CREATECHARSET \CREATECHARSET.DISPLAY)))
- (ADDTOVAR IMAGESTREAMTYPES (TEDIT (FONTCREATE \CREATEDISPLAYFONT)
- (CREATECHARSET \CREATECHARSET.DISPLAY)))
-
(* ;; "Maybe more functions later. The INCODE and BACK functions possibly need to count. If \TEXTBACKFILEPTR takes a count variable, the extra level wouldn't be needed. But INCCODE wants to go through the BIN opcode")
- (MAKE-EXTERNALFORMAT :TEXTSTREAM (FUNCTION \TEDIT.TEXTINCCODEFN)
+ (MAKE-EXTERNALFORMAT :TEDIT (FUNCTION \TEDIT.TEXTINCCODEFN)
(FUNCTION \TEDIT.TEXTPEEKBIN)
(FUNCTION \TEDIT.TEXTBACKCCODEFN)
(FUNCTION \TEDIT.TEXTOUTCHARFN)
@@ -1860,8 +1861,7 @@
FDEXTENDABLE _ NIL
TRUNCATEFILE _ (FUNCTION NILL)
WRITEPAGES _ (FUNCTION NILL)
- DEFAULTEXTERNALFORMAT _ :TEXTSTREAM))
- (* ;
+ DEFAULTEXTERNALFORMAT _ :TEDIT)) (* ;
"Only load once, not every time TEDIT-STREAM is loaded e.g. in development")
(RPAQ? *TEDIT-OLD-STREAM-ERROR-HANDLER* (CONDITION-HANDLER 'XCL:STREAM-NOT-OPEN))
(CL:SETF (CONDITION-HANDLER 'XCL:STREAM-NOT-OPEN)
@@ -1881,8 +1881,15 @@
(* ;
"Some other kind of stream, so punt to the old handler (if there is one):")
(APPLY* *TEDIT-OLD-STREAM-ERROR-HANDLER* CONDITION])
+
+(TEDIT.IMAGESTREAM.OPEN
+ [LAMBDA (FILE OPTIONS) (* ; "Edited 26-Jan-2026 23:55 by rmk")
+ (OPENTEXTSTREAM FILE NIL OPTIONS])
)
+(ADDTOVAR IMAGESTREAMTYPES (TEDIT (OPENSTREAM TEDIT.IMAGESTREAM.OPEN)
+ (CREATECHARSET \CREATECHARSET.DISPLAY)))
+
(* ;; "Is this being used:")
@@ -2249,7 +2256,8 @@
(DEFINEQ
(\TEDIT.NTHCHARCODE
- [LAMBDA (TSTREAM N) (* ; "Edited 24-Apr-2025 16:03 by rmk")
+ [LAMBDA (TSTREAM N) (* ; "Edited 15-Feb-2026 14:40 by rmk")
+ (* ; "Edited 24-Apr-2025 16:03 by rmk")
(* ; "Edited 28-Mar-2025 18:31 by rmk")
(* ; "Edited 7-Jul-2024 11:09 by rmk")
(* ; "Edited 29-Apr-2024 13:06 by rmk")
@@ -2266,11 +2274,11 @@
(CL:WHEN (AND (IGEQ N 1)
(ILEQ N (FGETTOBJ TEXTOBJ TEXTLEN)))
(\TEDIT.PIECE.NTHCHARCODE (\TEDIT.CHTOPC N TEXTOBJ T)
- (IDIFFERENCE (ADD1 N)
- START-OF-PIECE)))])
+ (IDIFFERENCE N START-OF-PIECE)))])
(\TEDIT.PIECE.NTHCHARCODE
- [LAMBDA (PC OFFSET) (* ; "Edited 24-Apr-2025 16:04 by rmk")
+ [LAMBDA (PC OFFSET) (* ; "Edited 15-Feb-2026 14:31 by rmk")
+ (* ; "Edited 24-Apr-2025 16:04 by rmk")
(* ; "Edited 21-Oct-2024 00:26 by rmk")
(* ; "Edited 29-Apr-2024 08:46 by rmk")
(* ; "Edited 22-Mar-2024 00:02 by rmk")
@@ -2282,24 +2290,24 @@
(* ; "Edited 8-Nov-2023 08:43 by rmk")
(* ; "Edited 5-Nov-2023 08:17 by rmk")
- (* ;; "Returns the OFFSETth charcode of PC, NIL if OFFSET is out of bounds. For file pieces, ensures that the backing stream is restored to its original position, so that it remains comaptible with the values (buffer, offset) in the textstream.")
+ (* ;; "Returns the OFFSETth charcode of PC, NIL if OFFSET is out of bounds. For file pieces, ensures that the backing stream is restored to its original position, so that it remains comaptible with the values (buffer, offset) in the textstream. OFFSET ranges from 0 to PLEN-1.")
- (CL:WHEN (AND (IGEQ OFFSET 1)
- (ILEQ OFFSET (PLEN PC)))
+ (CL:WHEN (AND (IGEQ OFFSET 0)
+ (ILESSP OFFSET (PLEN PC)))
[LET ((PCONTENTS (PCONTENTS PC))
FILEPOS)
(SELECTC (PTYPE PC)
- (STRING.PTYPES (NTHCHARCODE PCONTENTS OFFSET))
+ (STRING.PTYPES (NTHCHARCODE PCONTENTS (ADD1 OFFSET)))
(THINFILE.PTYPE
(SETQ FILEPOS (\GETFILEPTR PCONTENTS))
(\SETFILEPTR PCONTENTS (IPLUS (PFPOS PC)
- (SUB1 OFFSET)))
+ OFFSET))
(PROG1 (BIN PCONTENTS)
(\SETFILEPTR PCONTENTS FILEPOS)))
(FATFILE1.PTYPE
(SETQ FILEPOS (\GETFILEPTR PCONTENTS))
(\SETFILEPTR PCONTENTS (IPLUS (PFPOS PC)
- (SUB1 OFFSET)))
+ OFFSET))
(PROG1 (create WORD
HIBYTE _ (PCHARSET PC)
LOBYTE _ (BIN PCONTENTS))
@@ -2307,14 +2315,12 @@
(FATFILE2.PTYPE
(SETQ FILEPOS (\GETFILEPTR PCONTENTS))
(\SETFILEPTR PCONTENTS (IPLUS (PFPOS PC)
- (UNFOLD (SUB1 OFFSET)
- 2)))
+ (UNFOLD OFFSET 2)))
(PROG1 (\WIN PCONTENTS)
(\SETFILEPTR PCONTENTS FILEPOS)))
(UTF8.PTYPE (SETQ FILEPOS (\GETFILEPTR PCONTENTS))
[\SETFILEPTR PCONTENTS (IPLUS (PFPOS PC)
- (ITIMES (SUB1 OFFSET)
- (PBYTESPERCHAR PC]
+ (ITIMES OFFSET (PBYTESPERCHAR PC]
(PROG1 (UTF8.INCCODEFN PCONTENTS)
(\SETFILEPTR PCONTENTS FILEPOS)))
(OBJECT.PTYPE PCONTENTS)
@@ -2327,7 +2333,8 @@
(\TEDIT.THELP '\TEDIT.PIECE.NTHCHARCODE])])
(\TEDIT.RPLCHARCODE
- [LAMBDA (TSTREAM N NEWCHARCODE NEWCHARLOOKS DONTDISPLAY) (* ; "Edited 24-Apr-2025 17:24 by rmk")
+ [LAMBDA (TSTREAM N NEWCHARCODE NEWCHARLOOKS DONTDISPLAY) (* ; "Edited 16-Feb-2026 08:37 by rmk")
+ (* ; "Edited 24-Apr-2025 17:24 by rmk")
(* ; "Edited 20-Apr-2025 13:25 by rmk")
(* ; "Edited 28-Mar-2025 10:04 by rmk")
@@ -2343,16 +2350,17 @@
(DECLARE (SPECVARS START-OF-PIECE))
(replace (STREAM BINABLE) of TSTREAM with NIL)
(SETQ OLDCHAR (\TEDIT.PIECE.RPLCHARCODE TEXTOBJ (\TEDIT.CHTOPC N TEXTOBJ T)
- (ADD1 (IDIFFERENCE N START-OF-PIECE))
+ (IDIFFERENCE N START-OF-PIECE)
NEWCHARCODE NEWCHARLOOKS))
- (\TEDIT.HISTORYADD TEXTOBJ (\TEDIT.HISTORY.EVENT TEXTOBJ :ReplaceCode N NIL NIL NIL
+ (\TEDIT.HISTORYADD TEXTOBJ (\TEDIT.HISTORY.EVENT TEXTOBJ :ReplaceCode N 1 NIL NIL
OLDCHAR))
(CL:UNLESS (OR DONTDISPLAY (NOT (\TEDIT.PRIMARYPANE TEXTOBJ)))
(\TEDIT.UPDATE.LINES TSTREAM 'CHANGED N 1))
TSTREAM))])
(\TEDIT.PIECE.RPLCHARCODE
- [LAMBDA (TEXTOBJ PC OFFSET NEWCHARCODE NEWCHARLOOKS) (* ; "Edited 28-Jul-2025 23:38 by rmk")
+ [LAMBDA (TEXTOBJ PC OFFSET NEWCHARCODE NEWCHARLOOKS) (* ; "Edited 16-Feb-2026 08:41 by rmk")
+ (* ; "Edited 28-Jul-2025 23:38 by rmk")
(* ; "Edited 24-Apr-2025 16:30 by rmk")
(* ; "Edited 20-Apr-2025 13:25 by rmk")
(* ; "Edited 28-Mar-2025 10:04 by rmk")
@@ -2377,12 +2385,13 @@
"Fast case: Smash a new character code into an existing string piece with same looks. ")
(SETQ OLDCHAR (NTHCHARCODE (PCONTENTS PC)
- OFFSET))
+ (ADD1 OFFSET)))
(RPLCHARCODE (PCONTENTS PC)
- OFFSET NEWCHARCODE) (* ;
+ (ADD1 OFFSET)
+ NEWCHARCODE) (* ;
"May upgrade string from thin to fat")
(CL:WHEN (AND (EQ THINSTRING.PTYPE (PTYPE PC))
- (IGREATERP NEWCHARCODE 255))
+ (IGREATERP NEWCHARCODE \MAXTHINCHAR))
(FSETPC PC PTYPE FATSTRING.PTYPE)
(FSETPC PC PBINABLE NIL)
(FSETPC PC PBYTESPERCHAR 2)
@@ -2396,24 +2405,25 @@
(FSETPC PC PCONTENTS NEWCHARCODE)
else
(* ;;
- "PC contained character OFFSET now becomes the suffix of characters after offset.")
+ "The PC that contained character OFFSET now becomes the suffix of characters after offset.")
- (CL:UNLESS (IEQP OFFSET (PLEN PC)) (* ; "No suffix for the last character")
+ (CL:UNLESS (IEQP OFFSET (PLAST PC)) (* ; "No suffix for the last character")
(* ;;
"Chop off the suffix (essentially (\TEDIT.ALIGNEDPIECE CHNO ..) but we already have the piece")
- (\TEDIT.SPLITPIECE PC OFFSET TEXTOBJ)
+ (\TEDIT.SPLITPIECE PC (ADD1 OFFSET)
+ TEXTOBJ)
(SETQ PC (PREVPIECE PC))) (* ;
"Original PC holds the suffix, new PC ends with change position.")
- (CL:UNLESS (EQ OFFSET 1)
+ (CL:UNLESS (EQ OFFSET 0)
(SETQ PC (\TEDIT.SPLITPIECE PC (SUB1 OFFSET)
TEXTOBJ))) (* ;
"Chop off the prefix. PC is now the singleton target ")
(* ;; "OFFSET is now isolated into a one-character new piece which we smash. ")
- (SETQ OLDCHAR (\TEDIT.PIECE.NTHCHARCODE PC 1))
+ (SETQ OLDCHAR (\TEDIT.PIECE.NTHCHARCODE PC 0))
(if (IMAGEOBJP NEWCHARCODE)
then (FSETPC PC PBINABLE NIL)
(FSETPC PC PCONTENTS NEWCHARCODE)
@@ -2423,7 +2433,7 @@
else (FSETPC PC PCONTENTS (MKSTRING (CHARACTER NEWCHARCODE)))
(* ;
"Use the extend-string in INSERTCH for repeated calls?")
- (if (IGREATERP NEWCHARCODE 255)
+ (if (IGREATERP NEWCHARCODE \MAXTHINCHAR)
then (FSETPC PC PTYPE FATSTRING.PTYPE)
(FSETPC PC PBINABLE NIL)
(FSETPC PC PBYTESPERCHAR 2)
@@ -2810,7 +2820,8 @@
else (SUB1 (\TEDIT.PCTOCH PC TEXTOBJ])
(\TEDIT.LASTCHANGEABLE.CHNO
- [LAMBDA (CHNO TEXTOBJ) (* ; "Edited 26-Nov-2024 00:00 by rmk")
+ [LAMBDA (CHNO TEXTOBJ) (* ; "Edited 16-Feb-2026 08:53 by rmk")
+ (* ; "Edited 26-Nov-2024 00:00 by rmk")
(* ;; "Returns the number of the first visible character at or before CHNO, NIL if the first visible character is protected. Almost always CHNO--PCTOCH is the unusual case.")
@@ -2819,46 +2830,11 @@
CLPROTECTED) when (VISIBLEPIECEP PC)
do (RETURN (if (EQ PC FIRSTPIECE)
then CHNO
- else (IPLUS (SUB1 (PLEN PC))
+ else (IPLUS (PLAST PC)
(\TEDIT.PCTOCH PC TEXTOBJ])
)
(DEFINEQ
-(\SETUPGETCH
- [LAMBDA (CH# TEXTOBJ) (* ; "Edited 21-Oct-2024 00:26 by rmk")
- (* ; "Edited 29-Apr-2024 12:14 by rmk")
- (* ; "Edited 17-Mar-2024 00:27 by rmk")
- (* ; "Edited 23-Dec-2023 12:14 by rmk")
- (* ; "Edited 22-Aug-2022 13:04 by rmk")
- (* ; "Edited 10-Aug-2022 17:20 by rmk")
- (* ; "Edited 8-Aug-2022 15:07 by rmk")
- (* ; "Edited 31-Jul-2022 21:27 by rmk")
- (* ; "Edited 14-Apr-93 17:14 by jds")
-
-(* ;;; "Set up TEXTOBJ so that the next \GETCH will retrieve character # CH#")
-
- (* ;; "NB that 1st char in the textobj is #1.")
-
- (* ;; "NOBODY CALLS IT WITH A PIECE. CALLS |INSTALL.PIECE INSTEAD")
-
- (SETQ TEXTOBJ (TEXTOBJ))
- (LET ((TSTREAM (TEXTSTREAM TEXTOBJ)))
- (COND
- ((TYPE? PIECE CH#)
- (\TEDIT.THELP "\SETUPGETCH CALLED WITH PIECE")
- (\TEDIT.INSTALL.PIECE TSTREAM CH# 0))
- (T (LET (START-OF-PIECE PC)
- (DECLARE (SPECVARS START-OF-PIECE))
- (SETQ PC (\TEDIT.CHTOPC CH# TEXTOBJ T))
- (\TEDIT.INSTALL.PIECE TSTREAM PC (- CH# START-OF-PIECE])
-)
-
-
-
-(* ; "Deprecated, maybe still external callers")
-
-(DEFINEQ
-
(\TEDIT.INSTALL.PIECE
[LAMBDA (TSTREAM PC CHOFFSET) (* ; "Edited 21-Oct-2024 00:26 by rmk")
(* ; "Edited 18-May-2024 22:39 by rmk")
@@ -3140,7 +3116,7 @@
)
(DECLARE%: DONTEVAL@LOAD DOCOPY
-(\TEDIT.TEXTINIT)
+(\TEDIT.STREAMINIT)
)
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS
@@ -3151,34 +3127,33 @@
(ADDTOVAR LAMA TEXTPROP)
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (36705 67564 (\TEDIT.TEXTBIN 36715 . 47508) (\TEDIT.TEXTPEEKBIN 47510 . 53060) (
-\TEDIT.TEXTBACKFILEPTR 53062 . 58735) (\TEDIT.TEXTBOUT 58737 . 63354) (\TEDIT.INSTALL.FILEBUFFER 63356
- . 67562)) (68462 72753 (\TEDIT.TEXTOUTCHARFN 68472 . 70028) (\TEDIT.TEXTINCCODEFN 70030 . 70769) (
-\TEDIT.TEXTBACKCCODEFN 70771 . 71363) (\TEDIT.TEXTFORMATBYTESTREAM 71365 . 72202) (
-\TEDIT.TEXTFORMATBYTESTRING 72204 . 72751)) (72800 84875 (OPENTEXTSTREAM 72810 . 79786) (
-COPYTEXTSTREAM 79788 . 84098) (TEDIT.STREAMCHANGEDP 84100 . 84402) (TXTFILE 84404 . 84873)) (84876
-116145 (\TEDIT.REOPENTEXTSTREAM 84886 . 86238) (\TEDIT.OPENTEXTSTREAM.PIECES 86240 . 91168) (
-\TEDIT.OPENTEXTSTREAM.PROPS 91170 . 92272) (\TEDIT.OPENTEXTSTREAM.SETUP.SEL 92274 . 97515) (
-\TEDIT.OPENTEXTSTREAM.WINDOW 97517 . 100308) (\TEDIT.OPENTEXTSTREAM.DEFAULTLOOKS 100310 . 102249) (
-\TEDIT.OPENTEXTFILE 102251 . 104383) (\TEDIT.CREATE.TEXTSTREAM 104385 . 105532) (\TEDIT.REOPEN.STREAM
-105534 . 107870) (\TEDIT.TEXTINIT 107872 . 116143)) (116183 117371 (\TEDIT.TTYBOUT 116193 . 117369)) (
-117489 139172 (\TEDIT.TEXTCLOSEF 117499 . 118823) (\TEDIT.TEXTDSPFONT 118825 . 120023) (
-\TEDIT.TEXTEOFP 120025 . 121780) (\TEDIT.TEXTGETEOFPTR 121782 . 122105) (\TEDIT.TEXTSETEOFPTR 122107
- . 123394) (\TEDIT.TEXTGETFILEPTR 123396 . 126231) (\TEDIT.TEXTSETFILEINFO 126233 . 126741) (
-\TEDIT.TEXTOPENF 126743 . 127674) (\TEDIT.TEXTSETEOF 127676 . 128292) (\TEDIT.TEXTSETFILEPTR 128294 .
-130404) (\TEDIT.TEXTDSPXPOSITION 130406 . 133109) (\TEDIT.TEXTDSPYPOSITION 133111 . 133852) (
-\TEDIT.TEXTLEFTMARGIN 133854 . 134445) (\TEDIT.TEXTCOLOR 134447 . 135030) (\TEDIT.TEXTRIGHTMARGIN
-135032 . 138321) (\TEDIT.TEXTDSPCHARWIDTH 138323 . 138627) (\TEDIT.TEXTDSPSTRINGWIDTH 138629 . 138935)
- (\TEDIT.TEXTDSPLINEFEED 138937 . 139170)) (139210 151823 (\TEDIT.NTHCHARCODE 139220 . 140671) (
-\TEDIT.PIECE.NTHCHARCODE 140673 . 144583) (\TEDIT.RPLCHARCODE 144585 . 146043) (
-\TEDIT.PIECE.RPLCHARCODE 146045 . 151468) (\TEDIT.NTHCHARLOOKS 151470 . 151821)) (152870 173964 (
-\TEDIT.DELETE.SELPIECES 152880 . 156505) (\TEDIT.INSERTCH 156507 . 164546) (\TEDIT.INSERTCH.HISTORY
-164548 . 168012) (\TEDIT.INSERTEOL 168014 . 169839) (\TEDIT.INSERTCH.INSERTION 169841 . 172678) (
-\TEDIT.INSERTCH.EXTEND 172680 . 173962)) (173965 175469 (\TEDIT.NEXTCHANGEABLE.CHNO 173975 . 174690) (
-\TEDIT.LASTCHANGEABLE.CHNO 174692 . 175467)) (175470 177174 (\SETUPGETCH 175480 . 177172)) (177232
-181690 (\TEDIT.INSTALL.PIECE 177242 . 181688)) (181728 191194 (TEXTPROP 181738 . 182085) (GETTEXTPROP
-182087 . 182331) (PUTTEXTPROP 182333 . 182590) (GETTEXTPROPS 182592 . 183036) (PUTTEXTPROPS 183038 .
-183942) (TEXTPROP.ADD 183944 . 184207) (\TEDIT.TEXTPROP 184209 . 191192)) (191195 193572 (
-\TEDIT.TEXTOBJ.PROPNAMES 191205 . 192464) (\TEDIT.TEXTOBJ.PROPFETCHFN 192466 . 192982) (
-\TEDIT.TEXTOBJ.PROPSTOREFN 192984 . 193570)))))
+ (FILEMAP (NIL (36667 67629 (\TEDIT.TEXTBIN 36677 . 47470) (\TEDIT.TEXTPEEKBIN 47472 . 53022) (
+\TEDIT.TEXTBACKFILEPTR 53024 . 58800) (\TEDIT.TEXTBOUT 58802 . 63419) (\TEDIT.INSTALL.FILEBUFFER 63421
+ . 67627)) (68527 72818 (\TEDIT.TEXTOUTCHARFN 68537 . 70093) (\TEDIT.TEXTINCCODEFN 70095 . 70834) (
+\TEDIT.TEXTBACKCCODEFN 70836 . 71428) (\TEDIT.TEXTFORMATBYTESTREAM 71430 . 72267) (
+\TEDIT.TEXTFORMATBYTESTRING 72269 . 72816)) (72865 84940 (OPENTEXTSTREAM 72875 . 79851) (
+COPYTEXTSTREAM 79853 . 84163) (TEDIT.STREAMCHANGEDP 84165 . 84467) (TXTFILE 84469 . 84938)) (84941
+108146 (\TEDIT.REOPENTEXTSTREAM 84951 . 86303) (\TEDIT.OPENTEXTSTREAM.PIECES 86305 . 91233) (
+\TEDIT.OPENTEXTSTREAM.PROPS 91235 . 92337) (\TEDIT.OPENTEXTSTREAM.SETUP.SEL 92339 . 97789) (
+\TEDIT.OPENTEXTSTREAM.WINDOW 97791 . 100582) (\TEDIT.OPENTEXTSTREAM.DEFAULTLOOKS 100584 . 102523) (
+\TEDIT.OPENTEXTFILE 102525 . 104657) (\TEDIT.CREATE.TEXTSTREAM 104659 . 105806) (\TEDIT.REOPEN.STREAM
+105808 . 108144)) (108147 116372 (\TEDIT.STREAMINIT 108157 . 116189) (TEDIT.IMAGESTREAM.OPEN 116191 .
+116370)) (116560 117748 (\TEDIT.TTYBOUT 116570 . 117746)) (117866 139549 (\TEDIT.TEXTCLOSEF 117876 .
+119200) (\TEDIT.TEXTDSPFONT 119202 . 120400) (\TEDIT.TEXTEOFP 120402 . 122157) (\TEDIT.TEXTGETEOFPTR
+122159 . 122482) (\TEDIT.TEXTSETEOFPTR 122484 . 123771) (\TEDIT.TEXTGETFILEPTR 123773 . 126608) (
+\TEDIT.TEXTSETFILEINFO 126610 . 127118) (\TEDIT.TEXTOPENF 127120 . 128051) (\TEDIT.TEXTSETEOF 128053
+ . 128669) (\TEDIT.TEXTSETFILEPTR 128671 . 130781) (\TEDIT.TEXTDSPXPOSITION 130783 . 133486) (
+\TEDIT.TEXTDSPYPOSITION 133488 . 134229) (\TEDIT.TEXTLEFTMARGIN 134231 . 134822) (\TEDIT.TEXTCOLOR
+134824 . 135407) (\TEDIT.TEXTRIGHTMARGIN 135409 . 138698) (\TEDIT.TEXTDSPCHARWIDTH 138700 . 139004) (
+\TEDIT.TEXTDSPSTRINGWIDTH 139006 . 139312) (\TEDIT.TEXTDSPLINEFEED 139314 . 139547)) (139587 152583 (
+\TEDIT.NTHCHARCODE 139597 . 141123) (\TEDIT.PIECE.NTHCHARCODE 141125 . 145033) (\TEDIT.RPLCHARCODE
+145035 . 146593) (\TEDIT.PIECE.RPLCHARCODE 146595 . 152228) (\TEDIT.NTHCHARLOOKS 152230 . 152581)) (
+153630 174724 (\TEDIT.DELETE.SELPIECES 153640 . 157265) (\TEDIT.INSERTCH 157267 . 165306) (
+\TEDIT.INSERTCH.HISTORY 165308 . 168772) (\TEDIT.INSERTEOL 168774 . 170599) (\TEDIT.INSERTCH.INSERTION
+ 170601 . 173438) (\TEDIT.INSERTCH.EXTEND 173440 . 174722)) (174725 176332 (\TEDIT.NEXTCHANGEABLE.CHNO
+ 174735 . 175450) (\TEDIT.LASTCHANGEABLE.CHNO 175452 . 176330)) (176333 180791 (\TEDIT.INSTALL.PIECE
+176343 . 180789)) (180829 190295 (TEXTPROP 180839 . 181186) (GETTEXTPROP 181188 . 181432) (PUTTEXTPROP
+ 181434 . 181691) (GETTEXTPROPS 181693 . 182137) (PUTTEXTPROPS 182139 . 183043) (TEXTPROP.ADD 183045
+ . 183308) (\TEDIT.TEXTPROP 183310 . 190293)) (190296 192673 (\TEDIT.TEXTOBJ.PROPNAMES 190306 . 191565
+) (\TEDIT.TEXTOBJ.PROPFETCHFN 191567 . 192083) (\TEDIT.TEXTOBJ.PROPSTOREFN 192085 . 192671)))))
STOP
diff --git a/library/tedit/TEDIT-STREAM.LCOM b/library/tedit/TEDIT-STREAM.LCOM
index d9bbf246..f477a5e5 100644
Binary files a/library/tedit/TEDIT-STREAM.LCOM and b/library/tedit/TEDIT-STREAM.LCOM differ
diff --git a/library/tedit/TEDIT.LCOM b/library/tedit/TEDIT.LCOM
index cfdf23b6..5e803694 100644
Binary files a/library/tedit/TEDIT.LCOM and b/library/tedit/TEDIT.LCOM differ
diff --git a/library/tedit/tedit-exports.all b/library/tedit/tedit-exports.all
index 8f4f13bb..cb02912f 100644
--- a/library/tedit/tedit-exports.all
+++ b/library/tedit/tedit-exports.all
@@ -1,11 +1,11 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED "20-Oct-2025 11:20:51"
-{DSK}kaplan>Local>medley3.5>working-medley>library>tedit>tedit-exports.all;243 52506
+(FILECREATED "16-Feb-2026 08:56:58"
+{DSK}kaplan>Local>medley3.5>working-medley>library>tedit>tedit-exports.all;249 52790
:EDIT-BY rmk
- :PREVIOUS-DATE "20-Sep-2025 11:04:51" {WMEDLEY}TEDIT>tedit-exports.all;242)
+ :PREVIOUS-DATE "14-Jan-2026 14:50:53" {WMEDLEY}TEDIT>tedit-exports.all;248)
(PRETTYCOMPRINT ((E (MAPC (MKLIST FROMFILES) (FUNCTION (LAMBDA (F) (MAPC (IMPORTFILE F FLG) (FUNCTION
@@ -17,7 +17,7 @@ PRINT))))))))
(PUTPROPS FTEXTOBJ MACRO ((X) (TEXTOBJ! (CL:IF (type? TEXTOBJ X) X (GETTSTR X TEXTOBJ)))))
(GLOBALVARS CHECK-TEDIT-ASSERTIONS)
(RPAQ? CHECK-TEDIT-ASSERTIONS T)
-(PUTPROP (QUOTE TEDIT) (QUOTE IMPORTDATE) (IDATE "28-Sep-2025 11:35:06"))
+(PUTPROP (QUOTE TEDIT) (QUOTE IMPORTDATE) (IDATE " 4-Feb-2026 16:02:02"))
(RPAQQ \BTREEWORDSPERSLOT 4)
(RPAQQ \BTREEMAXCOUNT 8)
(CONSTANTS (\BTREEWORDSPERSLOT 4) (\BTREEMAXCOUNT 8))
@@ -51,13 +51,14 @@ DLEN1 DOWN2 DLEN2 DOWN3 DLEN3 DOWN4 DLEN4 DOWN5 DLEN5 DOWN6 DLEN6 DOWN7 DLEN7 DO
(\DTEST (OR (NEXTPIECE I.V.) (GO $$OUT)) (QUOTE PIECE)))))
(I.S.OPR (QUOTE backpieces) NIL (QUOTE (first (SETQ I.V. (\DTEST (OR BODY (GO $$OUT)) (QUOTE PIECE)))
by (\DTEST (OR (PREVPIECE I.V.) (GO $$OUT)) (QUOTE PIECE)))))
-(PUTPROP (QUOTE TEDIT-PCTREE) (QUOTE IMPORTDATE) (IDATE "28-Jul-2025 23:25:19"))
+(PUTPROP (QUOTE TEDIT-PCTREE) (QUOTE IMPORTDATE) (IDATE "14-Feb-2026 13:22:06"))
(DATATYPE SELECTION ((* ;;
"Description of a piece of selected text for TEdit. Text has to be selected before it can be operated on by the user. The caret is to the left of CH# if POINT is LEFT, to the keft of CHLIM if POINT is RIGHT."
) (* ;; "If DCH > 0, highlighting goes from CH# to (SUB1 CHLIM = (SUB1 (IPLUS CH# DCH)).") (* ;;
"If DCH=0, this is a caret-only selection, with no highlighting. In that case CHLIM=(ADD1 CH#) and POINT essentially indicates whether the caret blinks before or after CH#."
-) NIL (* ; "Was Y0: Y value of topmost line of selection") X0 (* ;
-"X value of left edge of selection on the first line") SELLINES (* ;
+) SELOPERATION (* ;
+"NORMAL, MOVE, COPY... HOW and HOWHEIGHT are derived from the operation. Was Y0: Y value of topmost line of selection"
+) X0 (* ; "X value of left edge of selection on the first line") SELLINES (* ;
"A list of (L1 L2) pairs one for each pane, to replace the separate L1 L2 lists. Was DX: Width of the selection, if it's on one line."
) CH# (* ; "CH# of the first selected character") XLIM (* ;
"X value of right edge of last selected character on the last line") CHLIM (* ;
@@ -127,7 +128,7 @@ TSTREAM ONLYPANE DONTFIX)))
(PUTPROPS \TEDIT.SEL.OFF MACRO ((TSTREAM SEL ONLYPANE) (* ;
"Takes down SEL in TSTREAM, where SEL defaults to the current selection") (\TEDIT.SHOWSEL SEL NIL
TSTREAM ONLYPANE)))
-(PUTPROP (QUOTE TEDIT-SELECTION) (QUOTE IMPORTDATE) (IDATE "29-Jul-2025 11:22:10"))
+(PUTPROP (QUOTE TEDIT-SELECTION) (QUOTE IMPORTDATE) (IDATE "16-Feb-2026 00:38:33"))
(RECORD TAB (TABX . TABKIND))
(RECORD TABSPEC (DEFAULTTAB . TABS))
(DATATYPE LINECACHE ((* ;; "Image cache for display lines.") LCBITMAP (* ;
@@ -208,8 +209,6 @@ ITEM collect (FIXR (FTIMES SCALE ITEM))) (FIXR (FTIMES SCALE ITEM)))))
(PUTPROPS SCALEDOWN MACRO (OPENLAMBDA (SCALE ITEM) (* ; "List = region?") (CL:IF (LISTP ITEM) (for I
in ITEM collect (FIXR (FQUOTIENT I SCALE))) (FIXR (FQUOTIENT ITEM SCALE)))))
(GLOBALVARS TEDIT.DONT.BREAK.CHARS TEDIT.DONT.LAST.CHARS)
-(ADDTOVAR CHARACTERNAMES (SOFT-HYPHEN "357,043") (NONBREAKING-HYPHEN "357,042") (NONBREAKING-SPACE
-"357,041"))
(PUTPROPS DIACRITICP MACRO (OPENLAMBDA (CHAR) (* ;; "An XCCS diacritic") (AND (SMALLP CHAR) (IGEQ CHAR
192) (ILEQ CHAR 207))))
(PUTPROPS \TEDIT.LINE.TALLP MACRO ((LINE HEIGHT) (OR (IGREATERP (FGETLD LINE LHEIGHT) 50) (IGREATERP (
@@ -260,7 +259,7 @@ NEXTAVAILABLECHARSLOT) of THISLINE))) (T $$STARTSLOT))) (SETQ $$CHARSLOTLIMIT (F
) by (PREVCHARSLOT I.V.) eachtime (SETQ CHAR (fetch (CHARSLOT CHAR) of I.V.)) (SETQ CHARW (fetch (
CHARSLOT CHARW) of I.V.)) (SETQ CHARCL (fetch (CHARSLOT CHARCL) of I.V.)) repeatuntil (EQ I.V.
$$CHARSLOTLIMIT))))) T)
-(PUTPROP (QUOTE TEDIT-SCREEN) (QUOTE IMPORTDATE) (IDATE "19-Oct-2025 00:07:29"))
+(PUTPROP (QUOTE TEDIT-SCREEN) (QUOTE IMPORTDATE) (IDATE " 5-Feb-2026 00:39:54"))
(DATATYPE PIECE ((* ;
"The piece describes either a string or part of a file. , or a generalized OBJECT.") PCONTENTS (* ;
"The background source of data for this piece (stream, string, block, object, depending on the PTYPE)."
@@ -299,9 +298,10 @@ HINTPC (* ; "Was: Space left in the type-in piece") HINTPCSTARTCH# (* ;
) DS (* ;
"NOTE: THIS IS ONLY USED INCORRECTLY BY TEDIT-CHAT Display stream where this textobj is displayed")
SEL (* ; "The current selection within the text") LASTARROWX (* ;
-"X for next arrow up or arrow down. Was: Scratch space for the selection code") NIL (* ;
-"Was MOVESEL: Source for the next MOVE of text") NIL (* ; "Was SHIFTEDSEL: Source for the next COPY")
-NIL (* ; "Was DELETESEL: Text to be deleted imminently") NIL (* ;
+"X for next arrow up or arrow down. Was: Scratch space for the selection code") SECONDARYSEL (* ;
+"Holds secondary selection and operation just before the mouse leaves a window. Was MOVESEL: Source for the next MOVE of text"
+) NIL (* ; "Was SHIFTEDSEL: Source for the next COPY") NIL (* ;
+"Was DELETESEL: Text to be deleted imminently") NIL (* ;
"Was WRIGHT: Right edge of the window (or subregion) where this is displayed") WTOP (* ;
"Top of the window/region") NIL (* ; "Was WBOTTOM: Bottom of the window/region") NIL (* ;
"Was WLEFT: Left edge of the window/region") TXTFILE (* ; "The original text file we're editing") (
@@ -372,6 +372,7 @@ IMAGEDATA _ NIL)))
(PUTPROPS NEXTPIECE MACRO ((PC) (ffetch (PIECE NEXTPIECE) of PC)))
(PUTPROPS PREVPIECE MACRO ((PC) (ffetch (PIECE PREVPIECE) of PC)))
(PUTPROPS PLEN MACRO ((PC) (ffetch (PIECE PLEN) of PC)))
+(PUTPROPS PLAST MACRO ((PC) (SUB1 (PLEN PC))))
(PUTPROPS PTYPE MACRO ((PC) (ffetch (PIECE PTYPE) of PC)))
(PUTPROPS PCONTENTS MACRO ((PC) (ffetch (PIECE PCONTENTS) of PC)))
(PUTPROPS PCHARLOOKS MACRO ((PC) (ffetch (PIECE PCHARLOOKS) of PC)))
@@ -440,7 +441,7 @@ UTF8.PTYPE UTF16BE.PTYPE UTF16LE.PTYPE)) (STRING.PTYPES (LIST THINSTRING.PTYPE F
BINABLE.PTYPES (LIST THINFILE.PTYPE THINSTRING.PTYPE)) (THIN.PTYPES (LIST THINFILE.PTYPE
THINSTRING.PTYPE)) (FAT.PTYPES (LIST FATFILE2.PTYPE FATSTRING.PTYPE FATFILE1.PTYPE)))
(GLOBALVARS \TEXTIMAGEOPS \TEXTFDEV)
-(PUTPROP (QUOTE TEDIT-STREAM) (QUOTE IMPORTDATE) (IDATE "19-Oct-2025 15:09:09"))
+(PUTPROP (QUOTE TEDIT-STREAM) (QUOTE IMPORTDATE) (IDATE "16-Feb-2026 08:56:40"))
(PUTPROPS \TEDIT.MOUSESTATE MACRO (BUTTON (* ;;
"Test to see if only the specified mouse button is down. DOES NOT call GETMOUSESTATE, so the mouse-button info is the same as the last time it was called."
) (SELECTQ (CAR BUTTON) (LEFT (QUOTE (EQ LASTMOUSEBUTTONS 4))) (MIDDLE (QUOTE (EQ LASTMOUSEBUTTONS 1))
@@ -449,12 +450,12 @@ THINSTRING.PTYPE)) (FAT.PTYPES (LIST FATFILE2.PTYPE FATSTRING.PTYPE FATFILE1.PTY
I in ARGS as J on ARGS when (NOT (STRINGP I)) collect (LIST (QUOTE OR) I (LIST (QUOTE HELP)
"TEdit consistency-check failure [RETURN to continue]: " (COND ((STRINGP (CADR J))) (T (KWOTE I))))))
)) (T (CONS COMMENTFLG ARGS)))))
-(PUTPROP (QUOTE TEDIT-COMMAND) (QUOTE IMPORTDATE) (IDATE "17-Jul-2025 00:24:49"))
+(PUTPROP (QUOTE TEDIT-COMMAND) (QUOTE IMPORTDATE) (IDATE " 8-Nov-2025 10:03:19"))
(PUTPROPS \SMALLPIN MACRO (OPENLAMBDA (STREAM) (SIGNED (create WORD HIBYTE _ (\BIN STREAM) LOBYTE _ (
\BIN STREAM)) BITSPERWORD)))
(PUTPROPS \SMALLPOUT MACRO (OPENLAMBDA (STREAM W) (* ; "Signed smallp, unlike \WOUT") (\BOUT STREAM (
LOGAND 255 (LRSH W 8))) (\BOUT STREAM (LOGAND W 255))))
-(PUTPROP (QUOTE TEDIT-FILE) (QUOTE IMPORTDATE) (IDATE "25-Sep-2025 21:32:46"))
+(PUTPROP (QUOTE TEDIT-FILE) (QUOTE IMPORTDATE) (IDATE "15-Feb-2026 23:45:51"))
(PUTPROP (QUOTE TEDIT-OLDFILE) (QUOTE IMPORTDATE) (IDATE " 8-Sep-2025 22:10:10"))
(DATATYPE CHARLOOKS ((* ;; "Describes the appearance (%"Looks%") of characters in a TEdit document.")
(* ;; "NOTE: If fields change EQCLOOKS should change too.") CLFONT (* ;
@@ -537,7 +538,7 @@ LINELEAD _ 0)
(PUTPROPS FSETPLOOKS MACRO ((PLOOKS FIELD NEWVALUE) (freplace (PARALOOKS FIELD) of PLOOKS with
NEWVALUE)))
(PUTPROPS PARALOOKS! MACRO ((PL) (\DTEST PL (QUOTE PARALOOKS))))
-(PUTPROP (QUOTE TEDIT-LOOKS) (QUOTE IMPORTDATE) (IDATE " 6-Oct-2025 20:50:59"))
+(PUTPROP (QUOTE TEDIT-LOOKS) (QUOTE IMPORTDATE) (IDATE "16-Feb-2026 00:36:00"))
(PUTPROP (QUOTE TEDIT-STYLES) (QUOTE IMPORTDATE) (IDATE "28-Jul-2025 23:25:43"))
(DATATYPE TEDITCARET (TCNOWTIME (* Used to hold the current time, when checking to see if a transition
is due) TCTHENTIME (* Time when the next transition is to take place) TCFORCEDDOWN (* TCFORCEDOWN = T
@@ -600,17 +601,18 @@ OR (CL:IF (TYPENAMEP $$BODY (QUOTE TEXTOBJ)) (FGETTOBJ $$BODY PRIMARYPANE) $$BOD
GETPANEPROP (PANEPROPS P) NEXTPANE))) (GO $$OUT))) by (OR (GETPANEPROP (PANEPROPS I.V.) PREVPANE) (GO
$$OUT)))))
(PUTPROPS ALLBUTTONSUP MACRO (NIL (ZEROP (LOGAND 7 LASTMOUSEBUTTONS))))
-(PUTPROP (QUOTE TEDIT-WINDOW) (QUOTE IMPORTDATE) (IDATE "19-Oct-2025 15:13:01"))
-(PUTPROP (QUOTE TEDIT-BUTTONS) (QUOTE IMPORTDATE) (IDATE "19-Oct-2025 10:44:18"))
-(PUTPROP (QUOTE TEDIT-MENU) (QUOTE IMPORTDATE) (IDATE "19-Oct-2025 15:14:00"))
+(PUTPROP (QUOTE TEDIT-WINDOW) (QUOTE IMPORTDATE) (IDATE " 7-Feb-2026 18:53:22"))
+(PUTPROP (QUOTE TEDIT-BUTTONS) (QUOTE IMPORTDATE) (IDATE "25-Jan-2026 09:14:04"))
+(PUTPROP (QUOTE TEDIT-MENU) (QUOTE IMPORTDATE) (IDATE " 9-Feb-2026 09:10:43"))
(PUTPROP (QUOTE TEDIT-FIND) (QUOTE IMPORTDATE) (IDATE "21-Apr-2025 22:42:57"))
-(RPAQQ \TEDIT.TTCCODES ((NONE 0) (CHARDELETE 1) (WORDDELETE 2) (DELETE 3) (FUNCTIONCALL 4) (REDO 5) (
-UNDO 6) (CMD 7) (NEXT 8) (EXPAND 9) (CHARDELETE.FORWARD 10) (WORDDELETE.FORWARD 11) (PUNCT 20) (TEXT
-21) (WHITESPACE 22)))
+(RPAQQ \TEDIT.TTCCODES ((NONE . 0) (CHARDELETE . 1) (:CHARDELETE.BACKWARD . 1) (WORDDELETE . 2) (
+:WORDDELETE.BACKWORD . 2) (DELETE . 3) (:DELETE . 3) (FN . 4) (REDO . 5) (:REDO . 5) (UNDO . 6) (:UNDO
+ . 6) (CMD . 7) (:CMD . 7) (NEXT . 8) (:NEXT . 8) (EXPAND . 9) (:EXPAND . 9) (CHARDELETE.FORWARD . 10)
+ (:CHARDELETE.FORWARD . 10) (:WORDDELETE.FORWARD . 11) (PUNCT . 20) (TEXT . 21) (WHITESPACE . 22)))
(CONSTANTS \TEDIT.TTCCODES)
-(PUTPROPS \TEDIT.TTC MACRO ((CLASS) (CONSTANT (CADR (ASSOC (QUOTE CLASS) \TEDIT.TTCCODES)))))
-(PUTPROP (QUOTE TEDIT-FNKEYS) (QUOTE IMPORTDATE) (IDATE " 7-Aug-2025 15:00:51"))
-(PUTPROP (QUOTE TEDIT-HCPY) (QUOTE IMPORTDATE) (IDATE "19-Sep-2025 17:08:05"))
+(PUTPROPS \TEDIT.TTC MACRO ((ACTION) (CONSTANT (GETMULTI \TEDIT.TTCCODES (QUOTE ACTION)))))
+(PUTPROP (QUOTE TEDIT-FNKEYS) (QUOTE IMPORTDATE) (IDATE " 8-Feb-2026 19:54:41"))
+(PUTPROP (QUOTE TEDIT-HCPY) (QUOTE IMPORTDATE) (IDATE "15-Jan-2026 11:08:15"))
(DATATYPE TEDITHISTORYEVENT ((* ;; "Describes one event on the TEdit edit history list.") THACTION (*
; "A keyword specifying what the event was") THPOINT (* ; "Was the selection to the left or right?")
THLEN (* ; "The # of chars involved") THCH# (* ; "The starting ch#") THFIRSTPIECE (* ;
@@ -659,9 +661,9 @@ REGIONPARENT FULLXPOINTER) (* ; "The parent node for this box, for sub-boxes") R
$$VALUES)) (PROG1 (CAR $$VALUES) (\,@ (FOR V IN (CAR ARGS) collect (COND (V (BQUOTE (SETQ (\, V) (POP
$$VALUES)))) (T (BQUOTE (SETQ $$VALUES (CDR $$VALUES))))))))))))
(PUTPROPS TEDIT.VALUES MACRO (ARGS (BQUOTE (LIST (\,@ ARGS)))))
-(PUTPROP (QUOTE TEDIT-PAGE) (QUOTE IMPORTDATE) (IDATE "27-Sep-2025 16:25:26"))
-(PUTPROP (QUOTE TEDIT-ABBREV) (QUOTE IMPORTDATE) (IDATE " 6-Sep-2025 00:10:45"))
-(PUTPROP (QUOTE TEDIT-TFBRAVO) (QUOTE IMPORTDATE) (IDATE " 7-Sep-2025 11:11:43"))
+(PUTPROP (QUOTE TEDIT-PAGE) (QUOTE IMPORTDATE) (IDATE "27-Jan-2026 10:30:27"))
+(PUTPROP (QUOTE TEDIT-ABBREV) (QUOTE IMPORTDATE) (IDATE "23-Jan-2026 15:49:26"))
+(PUTPROP (QUOTE TEDIT-TFBRAVO) (QUOTE IMPORTDATE) (IDATE "21-Jan-2026 12:15:57"))
(DECLARE%: DONTCOPY
(FILEMAP (NIL)))
STOP
diff --git a/library/virtualkeyboards/KEYBOARDCONFIGS b/library/virtualkeyboards/KEYBOARDCONFIGS
index e572a178..057613e6 100644
--- a/library/virtualkeyboards/KEYBOARDCONFIGS
+++ b/library/virtualkeyboards/KEYBOARDCONFIGS
@@ -1,10 +1,10 @@
-(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10 FORMAT UTF-8)
-(FILECREATED "13-Oct-2025 13:44:47" {WMEDLEY}virtualkeyboards>KEYBOARDCONFIGS.;5 59521
+(FILECREATED "19-Feb-2026 22:32:05" {WMEDLEY}virtualkeyboards>KEYBOARDCONFIGS.;6 59604
:EDIT-BY rmk
- :PREVIOUS-DATE "13-Oct-2025 12:03:23" {WMEDLEY}virtualkeyboards>KEYBOARDCONFIGS.;4)
+ :PREVIOUS-DATE "13-Oct-2025 13:44:47" {WMEDLEY}virtualkeyboards>KEYBOARDCONFIGS.;5)
(PRETTYCOMPRINT KEYBOARDCONFIGSCOMS)
@@ -57,11 +57,11 @@
(F3 (F3 ITALIC))
(F4 (F4 UCASE))
(F5 (F5 STRIKE))
- (F6 (F6 ""))
+ (F6 (F6 "^"))
(F7 (F7 SUBSCR))
(F8 (F8 SMALL))
(F9 (F9 MARGIN))
- (F10 (F10 "¬"))
+ (F10 (F10 "_"))
(F11 (F11 ""))
(F12 (F12 ""))
(LOCK ("CAPS" "LOCK"))
@@ -115,7 +115,7 @@
(THREE (|3| %# NLS))
(FOUR (|4| $ NLS))
(FIVE (|5| %% NLS))
- (SIX (|6| ^ NLS))
+ (SIX (|6| ↑ NLS))
(SEVEN (|7| & NLS))
(EIGHT (|8| * NLS))
(NINE (|9| %( NLS))))
@@ -234,7 +234,7 @@
NIL
((%" (%' %" NLS))
(+ (= + NLS))
- (- (- _ NLS))
+ (- (- ↠NLS))
(%: (; %: NLS))
(< (%, < NLS))
(> (%. > NLS))
@@ -255,13 +255,13 @@
(NUMERIC/ (/ /))
(NUMERIC0 (INS |0| NLS))
(NUMERIC1 (END |1| NLS))
- (NUMERIC2 (¯ |2| NLS))
+ (NUMERIC2 (↓ |2| NLS))
(NUMERIC3 (PGDN |3| NLS))
- (NUMERIC4 (¬ |4| NLS))
+ (NUMERIC4 (_ |4| NLS))
(NUMERIC5 (|5| |5|))
- (NUMERIC6 (® |6| NLS))
+ (NUMERIC6 (→ |6| NLS))
(NUMERIC7 (HOME |7| NLS))
- (NUMERIC8 ( |8| NLS))
+ (NUMERIC8 (^ |8| NLS))
(NUMERIC9 (PGUP |9| NLS))
(NUMERIC= (= =))
(RETURN (CR CR))
@@ -274,17 +274,17 @@
(F3 (ITALIC NOTITALIC NLS))
(F4 (UCASE LCASE NLS))
(F5 (STRIKEOUT NOTSTRIKEOUT NLS))
- (F6 ("" "" NLS))
+ (F6 ("^" "^" NLS))
(F7 (SUBSCRIPT SUPERSCRIPT NLS))
(F8 (SMALLER LARGER NLS))
(F9 (MARGINS NOTMARGINS NLS))
- (F10 ("¬" "¬" NLS))
+ (F10 ("_" "_" NLS))
(F11 (F11 NOTF11 NLS))
(F12 (F12 NOTF12 NLS)))
((%` 45 B)
(~ 45 T)
(|6| 2 B)
- (^ 2 T)
+ (↑ 2 T)
(%% 0 T)
(|5| 0 B)
($ 1 T)
@@ -523,7 +523,7 @@
(> (346 46 29 33))
(%: (362 82 29 33))
(<-%| (426 82 63 33))
- (^ (450 118 29 33))
+ (↑ (450 118 29 33))
(DEL (498 154 29 33))
(R (162 118 29 33))
(T (194 118 29 33))
@@ -556,7 +556,7 @@
(LF (LF LF))
(LOCK LOCKDOWN . LOCKUP)
(\ (\ %| NLS))
- (^ (_ ^ NLS))
+ (↑ (↠↑ NLS))
({ (%[ { NLS))
(} (%] } NLS)))
((BLANK-MIDDLE 30)
@@ -643,8 +643,8 @@
(%: 43)
(CR 44)
(<-%| 44)
- (_ 45)
- (^ 45)
+ (↠45)
+ (↑ 45)
(r 48)
(R 48)
(t 49)
@@ -744,7 +744,7 @@
NIL
((%" (%' %" NLS))
(+ (= + NLS))
- (- (- _ NLS))
+ (- (- ↠NLS))
(ESC (ESC %| NLS))
(%: (; %: NLS))
(< (%, < NLS))
@@ -757,7 +757,7 @@
(~ (%` ~ NLS)))
((%` 45)
(~ 45)
- (^ 2)
+ (↑ 2)
(|6| 2)
(w 18)
(W 18)
@@ -951,7 +951,7 @@
NIL
((%" (%' %" NLS))
(+ (= + NLS))
- (- (- _ NLS))
+ (- (- ↠NLS))
(%: (; %: NLS))
(< (%, < NLS))
(<-%| (CR CR))
@@ -962,21 +962,21 @@
(KEYBOARD METADOWN . METAUP)
(LOCK LOCKDOWN . LOCKUP)
(NEXT (2,22 2,62 NLS))
- (NUMERIC* (NUMLK ´ NLS))
+ (NUMERIC* (NUMLK × NLS))
(NUMERIC+ (HELP 2,45 NLS))
(NUMERIC, (\ %, NLS))
(NUMERIC- (SCRL - NLS))
(NUMERIC. (%| 21 NLS))
- (NUMERIC/ (BREAK ¸ NLS))
+ (NUMERIC/ (BREAK ÷ NLS))
(NUMERIC0 (INS |0| NLS))
(NUMERIC1 (END |1| NLS))
- (NUMERIC2 (¯ |2| NLS))
+ (NUMERIC2 (↓ |2| NLS))
(NUMERIC3 (PGDN |3| NLS))
- (NUMERIC4 (¬ |4| NLS))
+ (NUMERIC4 (_ |4| NLS))
(NUMERIC5 (% |5| NLS))
- (NUMERIC6 (® |6| NLS))
+ (NUMERIC6 (→ |6| NLS))
(NUMERIC7 (HOME |7| NLS))
- (NUMERIC8 ( |8| NLS))
+ (NUMERIC8 (^ |8| NLS))
(NUMERIC9 (PGUP |9| NLS))
(%` (%` ~ NLS))
({ (%[ { NLS))
@@ -987,7 +987,7 @@
(|4| 1)
($ 1)
(|6| 2)
- (^ 2)
+ (↑ 2)
(e 3)
(E 3)
(|7| 4)
@@ -1233,7 +1233,7 @@
(%. (%. > NLS))
(/ (/ ? NLS))
(\ (\ %| NLS))
- (- (- _ NLS))
+ (- (- ↠NLS))
(%` (%` ~ NLS))
(%[ (%[ { NLS))
(%] (%] } NLS))
@@ -1249,13 +1249,13 @@
(NUMERIC/ (/ /))
(NUMERIC0 (INS |0| NLS))
(NUMERIC1 (END |1| NLS))
- (NUMERIC2 (¯ |2| NLS))
+ (NUMERIC2 (↓ |2| NLS))
(NUMERIC3 (PGDN |3| NLS))
- (NUMERIC4 (¬ |4| NLS))
+ (NUMERIC4 (_ |4| NLS))
(NUMERIC5 (|5| |5|))
- (NUMERIC6 (® |6| NLS))
+ (NUMERIC6 (→ |6| NLS))
(NUMERIC7 (HOME |7| NLS))
- (NUMERIC8 ( |8| NLS))
+ (NUMERIC8 (^ |8| NLS))
(NUMERIC9 (PGUP |9| NLS))
(NUMERICENTER (CR CR))
(RALT METADOWN . METAUP)
@@ -1264,11 +1264,11 @@
(F3 (ITALIC NOTITALIC NLS))
(F4 (UCASE LCASE NLS))
(F5 (STRIKEOUT NOTSTRIKEOUT NLS))
- (F6 ("" "" NLS))
+ (F6 ("^" "^" NLS))
(F7 (SUBSCRIPT SUPERSCRIPT NLS))
(F8 (SMALLER LARGER NLS))
(F9 (MARGINS NOTMARGINS NLS))
- (F10 ("¬" "¬" NLS))
+ (F10 ("_" "_" NLS))
(F11 (F11 NOTF11 NLS))
(F12 (F12 NOTF12 NLS)))
((%' 28 B)
@@ -1276,7 +1276,7 @@
(%, 27 B)
(< 27 T)
(- 10 B)
- (_ 10 T)
+ (↠10 T)
(> 42 T)
(%. 42 B)
(/ 12 B)
@@ -1286,7 +1286,7 @@
(%# 16 T)
($ 1 T)
(%% 0 T)
- (^ 4 T)
+ (↑ 4 T)
(* 53 T)
(%( 22 T)
(%) 8 T)
@@ -1494,7 +1494,7 @@
(M (370 42 29 29))
(; (402 42 29 29))
(%: (434 42 29 29))
- (_ (466 42 29 29))
+ (↠(466 42 29 29))
(RSHIFT (498 42 53 29))
(LINEFEED (554 42 29 29))
(CONTROL (106 74 53 29))
@@ -1559,7 +1559,7 @@
(ONE (|1| + NLS))
(TWO (|2| %" NLS))
(THREE (|3| * NLS))
- (FOUR (|4| ‡ NLS))
+ (FOUR (|4|  NLS))
(SIX (|6| & NLS))
(SEVEN (|7| / NLS))
(EIGHT (|8| %( NLS))
@@ -1567,7 +1567,7 @@
(%: (%. %: NLS))
(; (%, ; NLS))
(? (%' ? NLS))
- (AUMLAUT (… „ NLS))
+ (AUMLAUT (î€ î€‚ NLS))
(CAPSLOCK CTRLDOWN . CTRLUP)
(CONTROL LOCKDOWN . LOCKUP)
(CR (CR CR))
@@ -1591,10 +1591,10 @@
(NUMERIC8 (|8| |8|))
(NUMERIC9 (|9| |9|))
(NUMERIC= (= =))
- (OUMLAUT (‚ ” NLS))
- (UUMLAUT (Š NLS))
+ (OUMLAUT (  NLS))
+ (UUMLAUT (  NLS))
(%[ (%] %[ NLS))
- (_ (- _ NLS))
+ (↠(- ↠NLS))
({ (< { NLS))
(} (> } NLS)))
((HELP 0)
@@ -1658,7 +1658,7 @@
(%. 49)
(%: 49)
(- 50)
- (_ 50)
+ (↠50)
(RSHIFT 51)
(LINEFEED 52)
(CONTROL 53)
diff --git a/library/virtualkeyboards/XKEYBOARDS b/library/virtualkeyboards/XKEYBOARDS
index a035c92a..9998bd96 100644
Binary files a/library/virtualkeyboards/XKEYBOARDS and b/library/virtualkeyboards/XKEYBOARDS differ
diff --git a/lispusers/BACKGROUNDMENU b/lispusers/BACKGROUNDMENU
index 0cb799a0..fab3e487 100644
--- a/lispusers/BACKGROUNDMENU
+++ b/lispusers/BACKGROUNDMENU
@@ -1,18 +1,17 @@
-(DEFINE-FILE-INFO §READTABLE "INTERLISP" §PACKAGE "INTERLISP")
-(FILECREATED "31-Jan-87 18:09:00" {ERIS}LYRIC>BACKGROUNDMENU.;1 7367
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
- previous date%: "31-Jan-86 11:36:13" {ERIS}KOTO>LISPUSERS>BACKGROUNDMENU.;1)
+(FILECREATED "18-Feb-2026 16:20:10" {WMEDLEY}BACKGROUNDMENU.;2 7230
+ :EDIT-BY rmk
+
+ :PREVIOUS-DATE "31-Jan-87 18:09:00" {WMEDLEY}BACKGROUNDMENU.;1)
-(* "
-Copyright (c) 1985, 1986, 1987 by Xerox Corporation. All rights reserved.
-")
(PRETTYCOMPRINT BACKGROUNDMENUCOMS)
(RPAQQ BACKGROUNDMENUCOMS ((INITVARS BackgroundMenuFixupMode BackgroundMenuSuperItem
BackgroundMenuTopLevelItems)
- (FNS BkgMenu.add.item BkgMenu.fixup BkgMenu.move.item BkgMenu.remove.item
+ (FNS BkgMenu.add.item BkgMenu.fixup BkgMenu.move.item BkgMenu.remove.item
BkgMenu.rename.item BkgMenu.reorder.items BkgMenu.subitems
\BkgMenu.locate \BkgMenu.locater \BkgMenu.remove.item
\BkgMenu.scan.item.list \BkgMenu.unremove.item)))
@@ -153,11 +152,10 @@ Copyright (c) 1985, 1986, 1987 by Xerox Corporation. All rights reserved.
else (SETQ BackgroundMenuCommands (CONS (CAR item)
BackgroundMenuCommands])
)
-(PUTPROPS BACKGROUNDMENU COPYRIGHT ("Xerox Corporation" 1985 1986 1987))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (1008 7271 (BkgMenu.add.item 1018 . 1910) (BkgMenu.fixup 1912 . 3131) (BkgMenu.move.item
- 3133 . 3557) (BkgMenu.remove.item 3559 . 3834) (BkgMenu.rename.item 3836 . 4128) (
-BkgMenu.reorder.items 4130 . 4505) (BkgMenu.subitems 4507 . 4907) (\BkgMenu.locate 4909 . 5520) (
-\BkgMenu.locater 5522 . 6089) (\BkgMenu.remove.item 6091 . 6378) (\BkgMenu.scan.item.list 6380 . 6877)
- (\BkgMenu.unremove.item 6879 . 7269)))))
+ (FILEMAP (NIL (944 7207 (BkgMenu.add.item 954 . 1846) (BkgMenu.fixup 1848 . 3067) (BkgMenu.move.item
+3069 . 3493) (BkgMenu.remove.item 3495 . 3770) (BkgMenu.rename.item 3772 . 4064) (
+BkgMenu.reorder.items 4066 . 4441) (BkgMenu.subitems 4443 . 4843) (\BkgMenu.locate 4845 . 5456) (
+\BkgMenu.locater 5458 . 6025) (\BkgMenu.remove.item 6027 . 6314) (\BkgMenu.scan.item.list 6316 . 6813)
+ (\BkgMenu.unremove.item 6815 . 7205)))))
STOP
diff --git a/lispusers/BACKGROUNDMENU.LCOM b/lispusers/BACKGROUNDMENU.LCOM
index da4e8186..bc7c8b5f 100644
Binary files a/lispusers/BACKGROUNDMENU.LCOM and b/lispusers/BACKGROUNDMENU.LCOM differ
diff --git a/lispusers/CHATSERVER b/lispusers/CHATSERVER
index 3f7130bf..8f598a84 100644
--- a/lispusers/CHATSERVER
+++ b/lispusers/CHATSERVER
@@ -1,14 +1,13 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED " 7-Sep-88 17:08:57" {ERINYES}MEDLEY>CHATSERVER.;11 47957
- changes to%: (FNS CHATSERVEROPENFN)
+(FILECREATED " 9-Feb-2026 22:25:32" {WMEDLEY}CHATSERVER.;2 45227
- previous date%: "19-May-88 00:37:49" {ERINYES}MEDLEY>CHATSERVER.;10)
+ :EDIT-BY rmk
+ :CHANGES-TO (FNS \CREATELINEBUFFER)
+
+ :PREVIOUS-DATE " 7-Sep-88 17:08:57" {WMEDLEY}CHATSERVER.;1)
-(* "
-Copyright (c) 1984, 1985, 1986, 1987, 1988 by Xerox Corporation. All rights reserved.
-")
(PRETTYCOMPRINT CHATSERVERCOMS)
@@ -40,8 +39,7 @@ Copyright (c) 1984, 1985, 1986, 1987, 1988 by Xerox Corporation. All rights res
(COMMANDS "QUIT" "SAY")
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA)
(NLAML)
- (LAMA \REMOTE.BIN
- CHATSERVEROPENFN])
+ (LAMA CHATSERVEROPENFN])
(DEFINEQ
(CHATSERVER
@@ -450,34 +448,34 @@ Copyright (c) 1984, 1985, 1986, 1987, 1988 by Xerox Corporation. All rights res
(RETURN CHARBUFFER])
(\CREATELINEBUFFER
- [LAMBDA (TERMINAL.STREAM) (* ; "Edited 13-Apr-87 22:57 by bvm:")
- (* ;;
- "Create a new stream that buffers the raw input from TERMINAL.STREAM (default is the keyboard).")
+ [LAMBDA (TERMINAL.STREAM) (* ; "Edited 9-Feb-2026 22:21 by rmk")
+ (* ; "Edited 13-Apr-87 22:57 by bvm:")
- (LET* ([STREAM (\OPENFILE '{LINEBUFFER} 'BOTH 'NEW '((CHARSET T]
+ (* ;; "This is a copy of \CREATELINEBUFFER on ATERM, except for the source of the EOFMETHOD.")
+
+ (* ;;
+ "Create a new stream that buffers the raw input from TERMINAL.STREAM (default is the keyboard).")
+
+ (LET* ([STREAM (\OPENFILE '{LINEBUFFER} 'BOTH 'NEW '((:EXTERNAL-FORMAT :THROUGH16]
(DEV (fetch (STREAM DEVICE) of STREAM))
EOFMETHOD)
(replace LINEBUFSTATE of STREAM with READING.LBS)
- (replace (LINEBUFFER KEYBOARDSTREAM) of STREAM with (OR TERMINAL.STREAM
- \KEYBOARD.STREAM))
+ (replace (LINEBUFFER KEYBOARDSTREAM) of STREAM with (OR TERMINAL.STREAM \KEYBOARD.STREAM))
(replace USERCLOSEABLE of STREAM with NIL)
- (replace USERVISIBLE of STREAM with NIL)
- (* ;
- "Other linebuffer fields default properly")
+ (replace USERVISIBLE of STREAM with NIL) (* ;
+ "Other linebuffer fields default properly")
[replace ENDOFSTREAMOP of STREAM with (FUNCTION (LAMBDA (STREAM)
- (CL:FUNCALL \RefillBufferFn]
- (if (AND TERMINAL.STREAM (NEQ (SETQ EOFMETHOD (fetch (FDEV EOFP)
- of (fetch (STREAM DEVICE)
- TERMINAL.STREAM)))
- 'NILL))
+ (CL:FUNCALL \RefillBufferFn]
+ (if (AND TERMINAL.STREAM (NEQ (SETQ EOFMETHOD (fetch (FDEV EOFP) of (fetch (STREAM DEVICE)
+ TERMINAL.STREAM)
+ ))
+ 'NILL))
then
- (* ;; "Need to install an eof method for the buffered stream that looks at TERMINAL.STREAM when the buffer runs out. This is optimized away for the normal keyboard case, which never runs out.")
+ (* ;; "Need to install an eof method for the buffered stream that looks at TERMINAL.STREAM when the buffer runs out. This is optimized away for the normal keyboard case, which never runs out.")
- (replace (STREAM DEVICE) of STREAM with (SETQ DEV (NCREATE
- 'FDEV DEV)))
- (* ;
- "Copy the basic linebuffer device")
- (replace (FDEV EOFP) of DEV with EOFMETHOD))
+ (replace (STREAM DEVICE) of STREAM with (SETQ DEV (NCREATE 'FDEV DEV)))
+ (* ; "Copy the basic linebuffer device")
+ (replace (FDEV EOFP) of DEV with EOFMETHOD))
STREAM])
(\PROMPTFORWORDBIN
@@ -650,7 +648,7 @@ Copyright (c) 1984, 1985, 1986, 1987, 1988 by Xerox Corporation. All rights res
(SETQ CHATSERVERTTBL (COPYTERMTABLE 'ORIG))
(for I from 1 to 8 do (ECHOCHAR I 'IGNORE CHATSERVERTTBL)
- (ECHOCHAR I 'IGNORE ASKUSERTTBL))
+ (ECHOCHAR I 'IGNORE ASKUSERTTBL))
(ECHOCHAR (CHARCODE CR)
'SIMULATE CHATSERVERTTBL)
@@ -715,29 +713,25 @@ Copyright (c) 1984, 1985, 1986, 1987, 1988 by Xerox Corporation. All rights res
(DECLARE%: EVAL@COMPILE
[PROGN (PUTPROPS \SYNCODE DMACRO [OPENLAMBDA (TABLE CHAR)
- (CHECK (type? CHARTABLE TABLE))
+ (CHECK (type? CHARTABLE TABLE))
(* ;
- "0 is either NONE.TC, REAL.CCE, or OTHER.RC")
- (COND
- ((IGREATERP CHAR \MAXTHINCHAR)
- (OR (AND (fetch (CHARTABLE NSCHARHASH)
- of TABLE)
- (GETHASH CHAR (fetch (CHARTABLE
- NSCHARHASH)
- of TABLE)))
- 0))
- (T (\GETBASEBYTE TABLE CHAR])
+ "0 is either NONE.TC, REAL.CCE, or OTHER.RC")
+ (COND
+ ((IGREATERP CHAR \MAXTHINCHAR)
+ (OR (AND (fetch (CHARTABLE NSCHARHASH) of TABLE)
+ (GETHASH CHAR (fetch (CHARTABLE NSCHARHASH)
+ of TABLE)))
+ 0))
+ (T (\GETBASEBYTE TABLE CHAR])
(PUTPROPS \SYNCODE MACRO [OPENLAMBDA (TABLE CHAR)
- (CHECK (type? CHARTABLE TABLE))
- (COND
- ((IGREATERP CHAR \MAXTHINCHAR)
- (OR (AND (fetch (CHARTABLE NSCHARHASH)
- of TABLE)
- (GETHASH CHAR (fetch (CHARTABLE
- NSCHARHASH)
- of TABLE)))
- 0))
- (T (\GETBASEBYTE TABLE CHAR])]
+ (CHECK (type? CHARTABLE TABLE))
+ (COND
+ ((IGREATERP CHAR \MAXTHINCHAR)
+ (OR (AND (fetch (CHARTABLE NSCHARHASH) of TABLE)
+ (GETHASH CHAR (fetch (CHARTABLE NSCHARHASH)
+ of TABLE)))
+ 0))
+ (T (\GETBASEBYTE TABLE CHAR])]
)
(DECLARE%: DONTEVAL@LOAD DOCOPY
@@ -773,10 +767,9 @@ Copyright (c) 1984, 1985, 1986, 1987, 1988 by Xerox Corporation. All rights res
(READVISE MENU CHAT RINGBELLS)
)
-(DEFCOMMAND "QUIT" ()
- (RETFROM 'CHATSERVEROPENFN))
+(DEFCOMMAND "QUIT" NIL (RETFROM 'CHATSERVEROPENFN))
-(DEFCOMMAND "SAY" (&REST LINE)
+(DEFCOMMAND "SAY" (&REST LINE)
[MAPC \PROCESSES (FUNCTION (LAMBDA (PROC)
(CL:WHEN (STRPOS "CHAT.SERVER" (PROCESS.NAME PROC))
(MAPRINT LINE (IF (EQ PROC (THIS.PROCESS))
@@ -795,53 +788,13 @@ Copyright (c) 1984, 1985, 1986, 1987, 1988 by Xerox Corporation. All rights res
(ADDTOVAR NLAML )
-(ADDTOVAR LAMA \REMOTE.BIN CHATSERVEROPENFN)
-)
-(PRETTYCOMPRINT CHATSERVERCOMS)
-
-(RPAQQ CHATSERVERCOMS
- [(FNS CHATSERVER CHATSERVERWHENCLOSEDFN CHATSERVEROPENFN DOBE REQUIRED.LOGIN SERVER-EXEC
- SWEEP.OFD \CLEARSYSBUF PROMPTFORWORD \CREATELINEBUFFER \PROMPTFORWORDBIN \REMOTE.BIN
- \REMOTE.EXEC.OUTCHARFN CHATSERVER.FONT)
- (DECLARE%: DONTEVAL@LOAD DOCOPY (VARS (DISPLAYTERMFLG 'DM))
- (INITVARS (CHATSERVER.PROFILE)
- (\SIMPLEIMAGEOPS))
- (P (SETQ CHATSERVERTTBL (COPYTERMTABLE 'ORIG))
- (for I from 1 to 8 do (ECHOCHAR I 'IGNORE CHATSERVERTTBL)
- (ECHOCHAR I 'IGNORE ASKUSERTTBL))
- (ECHOCHAR (CHARCODE CR)
- 'SIMULATE CHATSERVERTTBL)
- (ECHOCHAR (CHARCODE CR)
- 'SIMULATE ASKUSERTTBL)
- (ECHOCHAR 0 'SIMULATE ASKUSERTTBL)
- (ECHOCHAR 0 'SIMULATE CHATSERVERTTBL)))
- (ADDVARS (\SWEPT.OFDS))
- (DECLARE%: EVAL@COMPILE DONTCOPY (P (CHECKIMPORTS '(LLCHAR ATERM IMAGEIO FILEIO ATBL AOFD)
- T)))
- [COMS (FNS SIMPLECHATSERVER)
- (INITVARS (CHATSERVERWINDOW)
- (CHATSERVERWINDOWREGION '(11 228 392 190]
- (MACROS \SYNCODE)
- (DECLARE%: DONTEVAL@LOAD DOCOPY (FILES CL-TTYEDIT SIMPLECHAT)
- (ADVISE MENU CHAT RINGBELLS))
- (COMMANDS "QUIT" "SAY")
- (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA)
- (NLAML)
- (LAMA CHATSERVEROPENFN])
-(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS
-
-(ADDTOVAR NLAMA )
-
-(ADDTOVAR NLAML )
-
(ADDTOVAR LAMA CHATSERVEROPENFN)
)
-(PUTPROPS CHATSERVER COPYRIGHT ("Xerox Corporation" 1984 1985 1986 1987 1988))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (2216 38509 (CHATSERVER 2226 . 3955) (CHATSERVERWHENCLOSEDFN 3957 . 4304) (
-CHATSERVEROPENFN 4306 . 8433) (DOBE 8435 . 8481) (REQUIRED.LOGIN 8483 . 11220) (SERVER-EXEC 11222 .
-11395) (SWEEP.OFD 11397 . 11933) (\CLEARSYSBUF 11935 . 12184) (PROMPTFORWORD 12186 . 26531) (
-\CREATELINEBUFFER 26533 . 28708) (\PROMPTFORWORDBIN 28710 . 31646) (\REMOTE.BIN 31648 . 33890) (
-\REMOTE.EXEC.OUTCHARFN 33892 . 38114) (CHATSERVER.FONT 38116 . 38507)) (39151 41493 (SIMPLECHATSERVER
-39161 . 41491)))))
+ (FILEMAP (NIL (2029 38278 (CHATSERVER 2039 . 3768) (CHATSERVERWHENCLOSEDFN 3770 . 4117) (
+CHATSERVEROPENFN 4119 . 8246) (DOBE 8248 . 8294) (REQUIRED.LOGIN 8296 . 11033) (SERVER-EXEC 11035 .
+11208) (SWEEP.OFD 11210 . 11746) (\CLEARSYSBUF 11748 . 11997) (PROMPTFORWORD 11999 . 26344) (
+\CREATELINEBUFFER 26346 . 28477) (\PROMPTFORWORDBIN 28479 . 31415) (\REMOTE.BIN 31417 . 33659) (
+\REMOTE.EXEC.OUTCHARFN 33661 . 37883) (CHATSERVER.FONT 37885 . 38276)) (38905 41247 (SIMPLECHATSERVER
+38915 . 41245)))))
STOP
diff --git a/lispusers/CHATSERVER.LCOM b/lispusers/CHATSERVER.LCOM
index c83e8943..0fdda446 100644
Binary files a/lispusers/CHATSERVER.LCOM and b/lispusers/CHATSERVER.LCOM differ
diff --git a/lispusers/COMMWINDOW b/lispusers/COMMWINDOW
index 4778f182..92cda872 100644
--- a/lispusers/COMMWINDOW
+++ b/lispusers/COMMWINDOW
@@ -1,95 +1,88 @@
-(DEFINE-FILE-INFO §PACKAGE "INTERLISP" §READTABLE "INTERLISP" §BASE 10)
-(FILECREATED " 2-Apr-87 17:06:05" {ERIS}LYRIC>COMMWINDOW.;3 49786
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
- changes to%: (VARS REMOTE-CURSOR COMMWINDOWCOMS)
- (COURIERPROGRAMS COMMWINDOW)
- (FNS CLOSE-FRAME START-GET-BITS SEND-BITS FRAME-EVENT MAKE-FRAME)
- (FUNCTIONS \PILOTBITBLT)
+(FILECREATED "18-Feb-2026 16:21:29" {WMEDLEY}COMMWINDOW.;2 48680
- previous date%: " 2-Apr-87 16:54:24" {ERIS}LYRIC>COMMWINDOW.;2)
+ :EDIT-BY rmk
+ :PREVIOUS-DATE " 2-Apr-87 17:06:05" {WMEDLEY}COMMWINDOW.;1)
-(* "
-Copyright (c) 1986, 1900, 1987 by Xerox Corporation. All rights reserved.
-")
(PRETTYCOMPRINT COMMWINDOWCOMS)
-(RPAQQ COMMWINDOWCOMS (
+(RPAQQ COMMWINDOWCOMS
+ (
(* ;;; "Viewer end")
- (FNS CLOSE-FRAME GET-BITS START-GET-BITS)
- (FILES COURIERSERVE)
-
+ (FNS CLOSE-FRAME GET-BITS START-GET-BITS)
+ (FILES COURIERSERVE)
+
(* ;;; "Sender end")
- (FNS SEND-BITS SEND-TILE LISTEN-TO-VIEWER MAPTILES SHUT-DOWN-VIEWER
- CHANGE-SENDER-UPDATE-MODE)
- (FUNCTIONS INCR \PILOTBITBLT)
-
-
- (* ;; "Controling update schemes")
+ (FNS SEND-BITS SEND-TILE LISTEN-TO-VIEWER MAPTILES SHUT-DOWN-VIEWER CHANGE-SENDER-UPDATE-MODE
+ )
+ (FUNCTIONS INCR \PILOTBITBLT)
+
+ (* ;; "Controling update schemes")
- (INITVARS (COMM.DEFAULT.TRANSMIT.TYPE 'SQUARE)
- (COMM.SEND.UNCHANGED.TILES T)
- (COMM.UPDATE.MOUSE.POSITION 'Sender))
- (GLOBALVARS COMM.DEFAULT.TRANSMIT.TYPE COMM.UPDATE.MOUSE.POSITION
- COMM.SEND.UNCHANGED.TILES)
-
+ (INITVARS (COMM.DEFAULT.TRANSMIT.TYPE 'SQUARE)
+ (COMM.SEND.UNCHANGED.TILES T)
+ (COMM.UPDATE.MOUSE.POSITION 'Sender))
+ (GLOBALVARS COMM.DEFAULT.TRANSMIT.TYPE COMM.UPDATE.MOUSE.POSITION COMM.SEND.UNCHANGED.TILES)
+
(* ;;; "Pruning out unchanged screen tiles")
- (FNS PACKET-EQUAL GET-CACHED-PACKET PUT-CACHED-PACKET)
-
+ (FNS PACKET-EQUAL GET-CACHED-PACKET PUT-CACHED-PACKET)
+
(* ;;; "Low level packet exchange code")
- (CONSTANTS COMM.BAND.PACKET.TYPE COMM.CURSOR.PACKET.TYPE
- COMM.CURSOR.CLOSE.PACKET.TYPE COMM.SHUT.DOWN.PACKET.TYPE)
- (VARIABLES MAX-PACKET-BITS)
- (RECORDS COMM.XFER.PACKET)
-
+ (CONSTANTS COMM.BAND.PACKET.TYPE COMM.CURSOR.PACKET.TYPE COMM.CURSOR.CLOSE.PACKET.TYPE
+ COMM.SHUT.DOWN.PACKET.TYPE)
+ (VARIABLES MAX-PACKET-BITS)
+ (RECORDS COMM.XFER.PACKET)
+
(* ;;; "Packing and unpacking bitmaps into etherpackets")
- (FNS BMTOPACKET PACKETTOBM)
-
+ (FNS BMTOPACKET PACKETTOBM)
+
(* ;;; "Displaying the viewing machine's cursor")
- (VARS REMOTE-CURSOR)
- (INITVARS (CURSORICON NIL))
-
+ (VARS REMOTE-CURSOR)
+ (INITVARS (CURSORICON NIL))
+
(* ;;; "Manipulating the frame that outlines the region being viewed")
- (INITVARS (*FRAME-SHADE* GRAYSHADE))
- (FNS FRAME-EVENT MAKE-FRAME MOVE-FRAME SHAPE-FRAME SET-FRAME-TITLE)
-
+ (INITVARS (*FRAME-SHADE* GRAYSHADE))
+ (FNS FRAME-EVENT MAKE-FRAME MOVE-FRAME SHAPE-FRAME SET-FRAME-TITLE)
+
(* ;;; "Changing the system parameters")
- (FNS MAKE-MENUS-WINDOW MODE-MENU)
- (VARS COMM-MODES)
-
+ (FNS MAKE-MENUS-WINDOW MODE-MENU)
+ (VARS COMM-MODES)
+
(* ;;; "Initialization")
- (P (COURIER.START.SERVER))
-
+ (P (COURIER.START.SERVER))
+
(* ;;; "Unused stuff, as far as I can tell")
- (FNS FASTBITBLT)
-
+ (FNS FASTBITBLT)
+
(* ;;; "System file dependencies")
- (DECLARE%: DONTCOPY DOEVAL@COMPILE (FILES (LOADCOMP)
- LLDISPLAY LLETHER LLNS))
- (COURIERPROGRAMS COMMWINDOW)))
+ (DECLARE%: DONTCOPY DOEVAL@COMPILE (FILES (LOADCOMP)
+ LLDISPLAY LLETHER LLNS))
+ (COURIERPROGRAMS COMMWINDOW)))
@@ -236,6 +229,7 @@ Copyright (c) 1986, 1900, 1987 by Xerox Corporation. All rights reserved.
(LIST 'RETURN (LIST (NSOCKETNUMBER NS)
(USERNAME])
)
+
(FILESLOAD COURIERSERVE)
@@ -446,19 +440,18 @@ Copyright (c) 1986, 1900, 1987 by Xerox Corporation. All rights reserved.
(SETQ COMM.DEFAULT.TRANSMIT.TYPE NEW-MODE)))
)
-(DEFMACRO INCR (VAR START HEIGHT REPEATS UNTIL &REST FORMS)
+(DEFMACRO INCR (VAR START HEIGHT REPEATS UNTIL &REST FORMS)
`(CL:DO ((REPEAT-COUNT 0 (+ REPEAT-COUNT 1)))
((>= REPEAT-COUNT ,REPEATS))
- (CL:DO [(,VAR (+ ,START (CL:* REPEAT-COUNT ,HEIGHT))
- (+ ,VAR (CL:* ,REPEATS ,HEIGHT]
- (,UNTIL)
- ,@FORMS)))
-
-
-(DEFMACRO \PILOTBITBLT (XCL-USER::TABLE &OPTIONAL (XCL-USER::N 0)) (CL:ASSERT (EQL XCL-USER::N 0))
- `((OPCODES PILOTBITBLT)
- ,XCL-USER::TABLE 0))
+ (CL:DO [(,VAR (+ ,START (CL:* REPEAT-COUNT ,HEIGHT))
+ (+ ,VAR (CL:* ,REPEATS ,HEIGHT]
+ (,UNTIL)
+ ,@FORMS)))
+(DEFMACRO \PILOTBITBLT (XCL-USER::TABLE &OPTIONAL (XCL-USER::N 0))
+ (CL:ASSERT (EQL XCL-USER::N 0))
+ `((OPCODES PILOTBITBLT)
+ ,XCL-USER::TABLE 0))
@@ -525,12 +518,12 @@ Copyright (c) 1986, 1900, 1987 by Xerox Corporation. All rights reserved.
(RPAQQ COMM.SHUT.DOWN.PACKET.TYPE 4246)
+
(CONSTANTS COMM.BAND.PACKET.TYPE COMM.CURSOR.PACKET.TYPE COMM.CURSOR.CLOSE.PACKET.TYPE
COMM.SHUT.DOWN.PACKET.TYPE)
)
-(CL:DEFCONSTANT MAX-PACKET-BITS (CL:* 400 8) )
-
+(CL:DEFCONSTANT MAX-PACKET-BITS (CL:* 400 8))
(DECLARE%: EVAL@COMPILE
(ACCESSFNS COMM.XFER.PACKET ((COMMPACKET (fetch (XIP XIPCONTENTS) of DATUM)))
@@ -807,6 +800,7 @@ Copyright (c) 1986, 1900, 1987 by Xerox Corporation. All rights reserved.
(* ;;; "Initialization")
+
(COURIER.START.SERVER)
@@ -862,6 +856,7 @@ Copyright (c) 1986, 1900, 1987 by Xerox Corporation. All rights reserved.
(* ;;; "System file dependencies")
(DECLARE%: DONTCOPY DOEVAL@COMPILE
+
(FILESLOAD (LOADCOMP)
LLDISPLAY LLETHER LLNS)
)
@@ -885,14 +880,14 @@ Copyright (c) 1986, 1900, 1987 by Xerox Corporation. All rights reserved.
ERRORS
((ERROR 1 (STRING))
(USE.COURIER 2 NIL)))
-(PUTPROPS COMMWINDOW COPYRIGHT ("Xerox Corporation" 1986 1900 1987))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (3203 13134 (CLOSE-FRAME 3213 . 3364) (GET-BITS 3366 . 11655) (START-GET-BITS 11657 .
-13132)) (13189 26236 (SEND-BITS 13199 . 16020) (SEND-TILE 16022 . 19145) (LISTEN-TO-VIEWER 19147 .
-20450) (MAPTILES 20452 . 25175) (SHUT-DOWN-VIEWER 25177 . 26046) (CHANGE-SENDER-UPDATE-MODE 26048 .
-26234)) (27219 29090 (PACKET-EQUAL 27229 . 28632) (GET-CACHED-PACKET 28634 . 28949) (PUT-CACHED-PACKET
- 28951 . 29088)) (30529 34252 (BMTOPACKET 30539 . 32500) (PACKETTOBM 32502 . 34250)) (34556 38865 (
-FRAME-EVENT 34566 . 35224) (MAKE-FRAME 35226 . 37008) (MOVE-FRAME 37010 . 37280) (SHAPE-FRAME 37282 .
-38672) (SET-FRAME-TITLE 38674 . 38863)) (38915 45792 (MAKE-MENUS-WINDOW 38925 . 41284) (MODE-MENU
-41286 . 45790)) (45968 48955 (FASTBITBLT 45978 . 48953)))))
+ (FILEMAP (NIL (2306 12237 (CLOSE-FRAME 2316 . 2467) (GET-BITS 2469 . 10758) (START-GET-BITS 10760 .
+12235)) (12293 25340 (SEND-BITS 12303 . 15124) (SEND-TILE 15126 . 18249) (LISTEN-TO-VIEWER 18251 .
+19554) (MAPTILES 19556 . 24279) (SHUT-DOWN-VIEWER 24281 . 25150) (CHANGE-SENDER-UPDATE-MODE 25152 .
+25338)) (25342 25656 (INCR 25342 . 25656)) (25658 25816 (\PILOTBITBLT 25658 . 25816)) (26181 28052 (
+PACKET-EQUAL 26191 . 27594) (GET-CACHED-PACKET 27596 . 27911) (PUT-CACHED-PACKET 27913 . 28050)) (
+29490 33213 (BMTOPACKET 29500 . 31461) (PACKETTOBM 31463 . 33211)) (33517 37826 (FRAME-EVENT 33527 .
+34185) (MAKE-FRAME 34187 . 35969) (MOVE-FRAME 35971 . 36241) (SHAPE-FRAME 36243 . 37633) (
+SET-FRAME-TITLE 37635 . 37824)) (37876 44753 (MAKE-MENUS-WINDOW 37886 . 40245) (MODE-MENU 40247 .
+44751)) (44930 47917 (FASTBITBLT 44940 . 47915)))))
STOP
diff --git a/lispusers/COMMWINDOW.LCOM b/lispusers/COMMWINDOW.LCOM
index 6a102069..88c9531d 100644
Binary files a/lispusers/COMMWINDOW.LCOM and b/lispusers/COMMWINDOW.LCOM differ
diff --git a/lispusers/COMPAREDIRECTORIES b/lispusers/COMPAREDIRECTORIES
index 2531735b..36bf7841 100644
--- a/lispusers/COMPAREDIRECTORIES
+++ b/lispusers/COMPAREDIRECTORIES
@@ -1,12 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED " 8-Nov-2025 13:07:39" {WMEDLEY}COMPAREDIRECTORIES.;285 138536
+(FILECREATED "10-Feb-2026 21:28:55" {WMEDLEY}COMPAREDIRECTORIES.;286 138607
:EDIT-BY rmk
- :CHANGES-TO (FNS CD-MENUFN CDBROWSER-COPY)
+ :CHANGES-TO (FNS CD-MENUFN)
- :PREVIOUS-DATE "28-Oct-2025 14:52:05" {WMEDLEY}COMPAREDIRECTORIES.;280)
+ :PREVIOUS-DATE " 8-Nov-2025 13:07:39" {WMEDLEY}COMPAREDIRECTORIES.;285)
(PRETTYCOMPRINT COMPAREDIRECTORIESCOMS)
@@ -1983,6 +1983,8 @@
(CD-MENUFN
[LAMBDA (TBITEM MENUITEM CDBROWSER KEY)
+ (* ;; "Edited 10-Feb-2026 21:28 by rmk")
+
(* ;; "Edited 8-Nov-2025 13:06 by rmk")
(* ;; "Edited 28-Oct-2025 17:35 by rmk")
@@ -2059,11 +2061,11 @@
ELSE (FLASHWINDOW T)
(PRIN3 "No file to print" T)))
((See See% both)
- (IF (PDFFILEP FILE1)
+ (IF (AND FILE1 (PDFFILEP FILE1))
then (SEE-PDF FILE1)
- (CL:WHEN (PDFFILEP FILE2)
+ (CL:WHEN (AND FILE2 (PDFFILEP FILE2))
(SEE-PDF FILE2))
- elseif (PDFFILEP FILE2)
+ elseif (AND FILE2 (PDFFILEP FILE2))
then (SEE-PDF FILE2)
else (EXAMINEFILES FILE1 FILE2 LABEL1 LABEL2
(RELCREATEREGION (ITIMES 2 (CL:IF (LISPSOURCEFILEP FILE1)
@@ -2321,25 +2323,25 @@
(MOVD? 'NILL 'TEDIT.FILEDATE)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (2668 23647 (COMPAREDIRECTORIES 2678 . 8013) (COMPAREDIRECTORIES.INFOS 8015 . 11244) (
-COMPAREDIRECTORIES.CANDIDATES 11246 . 14631) (CDENTRIES.SELECT 14633 . 19535) (
-COMPAREDIRECTORIES.INFOS.TYPE 19537 . 20881) (MATCHNAME 20883 . 21563) (CD.INSURECDVALUE 21565 . 23179
-) (CD.UPDATEWIDTHS 23181 . 23645)) (23648 34353 (CDFILES 23658 . 29755) (CDFILES.MATCH 29757 . 31382)
-(CDFILES.PATS 31384 . 34351)) (34354 52372 (CDPRINT 34364 . 36881) (CDPRINT.HEADER 36883 . 37780) (
-CDPRINT.LINE 37782 . 41211) (CDPRINT.MAXWIDTHS 41213 . 45328) (CDPRINT.COLHEADERS 45330 . 46615) (
-CDPRINT.COLUMNS 46617 . 51737) (CDTEDIT 51739 . 52370)) (52373 61494 (CDMAP 52383 . 53815) (CDENTRY
-53817 . 54126) (CDSUBSET 54128 . 55567) (CDMERGE 55569 . 59553) (CDMERGE.COMMON 59555 . 60870) (
-CD.SORT 60872 . 61492)) (61495 69033 (BINCOMP 61505 . 65794) (EOLTYPE 65796 . 68358) (EOLTYPE.SHOW
-68360 . 69031)) (69561 82088 (FIND-UNCOMPILED-FILES 69571 . 73214) (FIND-UNSOURCED-FILES 73216 . 75600
-) (FIND-SOURCE-FILES 75602 . 77340) (FIND-COMPILED-FILES 77342 . 79219) (FIND-UNLOADED-FILES 79221 .
-80074) (FIND-LOADED-FILES 80076 . 80504) (FIND-MULTICOMPILED-FILES 80506 . 82086)) (82089 90520 (
-CREATED-AS 82099 . 86896) (SOURCE-FOR-COMPILED-P 86898 . 89825) (COMPILE-SOURCE-DATE-DIFF 89827 .
-90518)) (90521 101284 (FIX-DIRECTORY-DATES 90531 . 93981) (FIX-EQUIV-DATES 93983 . 95508) (
-COPY-COMPARED-FILES 95510 . 97331) (COPY-MISSING-FILES 97333 . 99490) (COMPILED-ON-SAME-SOURCE 99492
- . 101282)) (101478 109356 (CDBROWSER 101488 . 105455) (CDBROWSER.STRINGS 105457 . 109354)) (109518
-111254 (CD.TABLEITEM 109528 . 109748) (CD.TABLEITEM.PRINTFN 109750 . 109949) (CD.TABLEITEM.COPYFN
-109951 . 111009) (CDTABLEBROWSER.HEADING.REPAINTFN 111011 . 111252)) (111255 138020 (
-CDTABLEBROWSER.WHENSELECTEDFN 111265 . 111733) (CD.COMMANDSELECTEDFN 111735 . 117908) (CD-MENUFN
-117910 . 124301) (CD-COMPARE-FILES 124303 . 127830) (CDBROWSER-COPY 127832 . 132894) (
-CDBROWSER-DELETE-FILE 132896 . 137499) (CD-SWAPDIRS 137501 . 138018)))))
+ (FILEMAP (NIL (2653 23632 (COMPAREDIRECTORIES 2663 . 7998) (COMPAREDIRECTORIES.INFOS 8000 . 11229) (
+COMPAREDIRECTORIES.CANDIDATES 11231 . 14616) (CDENTRIES.SELECT 14618 . 19520) (
+COMPAREDIRECTORIES.INFOS.TYPE 19522 . 20866) (MATCHNAME 20868 . 21548) (CD.INSURECDVALUE 21550 . 23164
+) (CD.UPDATEWIDTHS 23166 . 23630)) (23633 34338 (CDFILES 23643 . 29740) (CDFILES.MATCH 29742 . 31367)
+(CDFILES.PATS 31369 . 34336)) (34339 52357 (CDPRINT 34349 . 36866) (CDPRINT.HEADER 36868 . 37765) (
+CDPRINT.LINE 37767 . 41196) (CDPRINT.MAXWIDTHS 41198 . 45313) (CDPRINT.COLHEADERS 45315 . 46600) (
+CDPRINT.COLUMNS 46602 . 51722) (CDTEDIT 51724 . 52355)) (52358 61479 (CDMAP 52368 . 53800) (CDENTRY
+53802 . 54111) (CDSUBSET 54113 . 55552) (CDMERGE 55554 . 59538) (CDMERGE.COMMON 59540 . 60855) (
+CD.SORT 60857 . 61477)) (61480 69018 (BINCOMP 61490 . 65779) (EOLTYPE 65781 . 68343) (EOLTYPE.SHOW
+68345 . 69016)) (69546 82073 (FIND-UNCOMPILED-FILES 69556 . 73199) (FIND-UNSOURCED-FILES 73201 . 75585
+) (FIND-SOURCE-FILES 75587 . 77325) (FIND-COMPILED-FILES 77327 . 79204) (FIND-UNLOADED-FILES 79206 .
+80059) (FIND-LOADED-FILES 80061 . 80489) (FIND-MULTICOMPILED-FILES 80491 . 82071)) (82074 90505 (
+CREATED-AS 82084 . 86881) (SOURCE-FOR-COMPILED-P 86883 . 89810) (COMPILE-SOURCE-DATE-DIFF 89812 .
+90503)) (90506 101269 (FIX-DIRECTORY-DATES 90516 . 93966) (FIX-EQUIV-DATES 93968 . 95493) (
+COPY-COMPARED-FILES 95495 . 97316) (COPY-MISSING-FILES 97318 . 99475) (COMPILED-ON-SAME-SOURCE 99477
+ . 101267)) (101463 109341 (CDBROWSER 101473 . 105440) (CDBROWSER.STRINGS 105442 . 109339)) (109503
+111239 (CD.TABLEITEM 109513 . 109733) (CD.TABLEITEM.PRINTFN 109735 . 109934) (CD.TABLEITEM.COPYFN
+109936 . 110994) (CDTABLEBROWSER.HEADING.REPAINTFN 110996 . 111237)) (111240 138091 (
+CDTABLEBROWSER.WHENSELECTEDFN 111250 . 111718) (CD.COMMANDSELECTEDFN 111720 . 117893) (CD-MENUFN
+117895 . 124372) (CD-COMPARE-FILES 124374 . 127901) (CDBROWSER-COPY 127903 . 132965) (
+CDBROWSER-DELETE-FILE 132967 . 137570) (CD-SWAPDIRS 137572 . 138089)))))
STOP
diff --git a/lispusers/COMPAREDIRECTORIES.LCOM b/lispusers/COMPAREDIRECTORIES.LCOM
index 7569b398..80f806ea 100644
Binary files a/lispusers/COMPAREDIRECTORIES.LCOM and b/lispusers/COMPAREDIRECTORIES.LCOM differ
diff --git a/lispusers/COMPILEBANG.LCOM b/lispusers/COMPILEBANG.LCOM
index c18e7e1f..0cf3f4c8 100644
Binary files a/lispusers/COMPILEBANG.LCOM and b/lispusers/COMPILEBANG.LCOM differ
diff --git a/lispusers/CONVERT-TO-UTF8 b/lispusers/CONVERT-TO-UTF8
new file mode 100644
index 00000000..52342ee1
--- /dev/null
+++ b/lispusers/CONVERT-TO-UTF8
@@ -0,0 +1,52 @@
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
+
+(FILECREATED "25-Feb-2026 09:09:57" {WMEDLEY}CONVERT-TO-UTF8.;16 2573
+
+ :EDIT-BY rmk
+
+ :CHANGES-TO (FNS CONVERT-TO-UTF8)
+
+ :PREVIOUS-DATE "24-Feb-2026 22:45:57" {WMEDLEY}CONVERT-TO-UTF8.;14)
+
+
+(PRETTYCOMPRINT CONVERT-TO-UTF8COMS)
+
+(RPAQQ CONVERT-TO-UTF8COMS ((FNS CONVERT-TO-UTF8)))
+(DEFINEQ
+
+(CONVERT-TO-UTF8
+ [LAMBDA (FILENAME FILETYPE) (* ; "Edited 25-Feb-2026 09:09 by rmk")
+
+ (* ;; "This produces a new version of the source FILENAME with :UTF-8 external format.")
+
+ (* ;; "If we had a list of problematic functions (multiple definitions on multiple files, MOVD's), we could check that against the functions in FILENAME, and at least produce a warning.")
+
+ (* ;; "Compiling may be tricky: some files have CL:COMPILE-FILE FILETYPE properties that don't correspond to the fact that they actually have only an LCOM. This tries to revert the filetype back to FAKE-COMPILE-FILE so that we don't get confused when a DFASL mysteriously appears.")
+
+ (SETQ FILENAME (PSEUDOFILENAME FILENAME))
+ (SETQ FILENAME (OR (FINDFILE FILENAME T)
+ (ERROR "FILE NOT FOUND" FILENAME)))
+ (if [EQ :UTF-8 (CL:WITH-OPEN-FILE (STREAM FILENAME :DIRECTION :INPUT)
+ (fetch (READER-ENVIRONMENT REFORMAT) of (GET-ENVIRONMENT-AND-FILEMAP STREAM
+ T]
+ then (PRINTOUT T FILENAME " is already " .P2 :UTF-8 T)
+ NIL
+ else (LOAD? (MEDLEYDIR "loadups" 'EXPORTS.ALL)) (* ; "Maybe this should load SYSEDIT ?")
+ (LOAD FILENAME 'PROP)
+ (LOADCOMP FILENAME)
+ (SETQ FILENAME (PACKFILENAME 'VERSION NIL 'BODY FILENAME))
+ (CL:WHEN [AND (EQ 'CL:COMPILE-FILE (GETPROP (ROOTFILENAME FILENAME)
+ 'FILETYPE))
+ (FINDFILE (PACKFILENAME 'EXTENSION 'LCOM 'BODY FILENAME))
+ (NOT (FINDFILE (PACKFILENAME 'EXTENSION 'DFASL 'BODY FILENAME]
+ (CL:UNLESS FILETYPE (SETQ FILETYPE :FAKE-COMPILE-FILE))
+ (PRINTOUT T "Changing FILETYPE back to " .P2 FILETYPE T)
+ (PUTPROP (ROOTFILENAME FILENAME)
+ 'FILETYPE FILETYPE))
+ [SETQ FILENAME (MAKEFILE FILENAME '(NEW :UTF-8]
+ (MAKEFILE1 FILENAME NIL '(F))
+ FILENAME])
+)
+(DECLARE%: DONTCOPY
+ (FILEMAP (NIL (406 2550 (CONVERT-TO-UTF8 416 . 2548)))))
+STOP
diff --git a/lispusers/CONVERT-TO-UTF8.LCOM b/lispusers/CONVERT-TO-UTF8.LCOM
new file mode 100644
index 00000000..413a0c22
Binary files /dev/null and b/lispusers/CONVERT-TO-UTF8.LCOM differ
diff --git a/lispusers/CONVERT-TO-UTF8.TEDIT b/lispusers/CONVERT-TO-UTF8.TEDIT
new file mode 100644
index 00000000..06488f9c
Binary files /dev/null and b/lispusers/CONVERT-TO-UTF8.TEDIT differ
diff --git a/lispusers/CROCK b/lispusers/CROCK
index ca1390de..a5199b01 100644
--- a/lispusers/CROCK
+++ b/lispusers/CROCK
@@ -1,43 +1,43 @@
-(DEFINE-FILE-INFO §READTABLE "INTERLISP" §PACKAGE "INTERLISP")
-(FILECREATED " 2-Apr-87 00:37:46" {ERIS}LYRIC>CROCK.;2 17791
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
- previous date%: "11-Jan-86 19:46:27" {PHYLUM}LYRIC>CROCK.;1)
+(FILECREATED "18-Feb-2026 16:26:31" {WMEDLEY}CROCK.;2 17189
+ :EDIT-BY rmk
+
+ :PREVIOUS-DATE " 2-Apr-87 00:37:46" {WMEDLEY}CROCK.;1)
-(* "
-Copyright (c) 1984, 1985, 1986, 1987 by Xerox Corporation. All rights reserved.
-")
(PRETTYCOMPRINT CROCKCOMS)
-(RPAQQ CROCKCOMS ((* CROCK -- By Kelly Roach *)
- (FNS CROCK CROCK.BUTTONEVENTFN CROCK.CHANGE.STYLE CROCK.CLOSEFN CROCK.PROCESS
- CROCK.RESHAPEFN CROCK.ALARM CROCK.RING.ALARM CROCK.INIT)
- (INITVARS (CROCK.DEFAULT.STYLE '(HANDS T TIMES NIL RINGS NIL NUMBERS T))
- (CROCK.STYLE.MENU)
- (CROCK.ALARMS)
- (CROCK.DATEFORMAT '(DATEFORMAT NO.SECONDS))
- [CROCK.TUNE '((1000 . 1000)
- (800 . 1000)
- (600 . 1000)
- (500 . 1000)
- (400 . 1000)
- (NIL . 500)
- (440 . 1000)
- (484 . 1000)
- (540 . 1000)
- (600 . 1000)
- (2000 . 1000)
- (1600 . 1000)
- (1200 . 1000)
- (1000 . 1000)
- (800 . 1000)
- (NIL . 500)
- (880 . 1000)
- (968 . 1000)
- (1080 . 1000)
- (1188 . 1000]
- (CROCKWINDOW))))
+(RPAQQ CROCKCOMS
+ ((* CROCK -- By Kelly Roach *)
+ (FNS CROCK CROCK.BUTTONEVENTFN CROCK.CHANGE.STYLE CROCK.CLOSEFN CROCK.PROCESS CROCK.RESHAPEFN
+ CROCK.ALARM CROCK.RING.ALARM CROCK.INIT)
+ (INITVARS (CROCK.DEFAULT.STYLE '(HANDS T TIMES NIL RINGS NIL NUMBERS T))
+ (CROCK.STYLE.MENU)
+ (CROCK.ALARMS)
+ (CROCK.DATEFORMAT '(DATEFORMAT NO.SECONDS))
+ [CROCK.TUNE '((1000 . 1000)
+ (800 . 1000)
+ (600 . 1000)
+ (500 . 1000)
+ (400 . 1000)
+ (NIL . 500)
+ (440 . 1000)
+ (484 . 1000)
+ (540 . 1000)
+ (600 . 1000)
+ (2000 . 1000)
+ (1600 . 1000)
+ (1200 . 1000)
+ (1000 . 1000)
+ (800 . 1000)
+ (NIL . 500)
+ (880 . 1000)
+ (968 . 1000)
+ (1080 . 1000)
+ (1188 . 1000]
+ (CROCKWINDOW))))
@@ -334,31 +334,31 @@ Copyright (c) 1984, 1985, 1986, 1987 by Xerox Corporation. All rights reserved.
(RPAQ? CROCK.DATEFORMAT '(DATEFORMAT NO.SECONDS))
-(RPAQ? CROCK.TUNE '((1000 . 1000)
- (800 . 1000)
- (600 . 1000)
- (500 . 1000)
- (400 . 1000)
- (NIL . 500)
- (440 . 1000)
- (484 . 1000)
- (540 . 1000)
- (600 . 1000)
- (2000 . 1000)
- (1600 . 1000)
- (1200 . 1000)
- (1000 . 1000)
- (800 . 1000)
- (NIL . 500)
- (880 . 1000)
- (968 . 1000)
- (1080 . 1000)
- (1188 . 1000)))
+(RPAQ? CROCK.TUNE
+ '((1000 . 1000)
+ (800 . 1000)
+ (600 . 1000)
+ (500 . 1000)
+ (400 . 1000)
+ (NIL . 500)
+ (440 . 1000)
+ (484 . 1000)
+ (540 . 1000)
+ (600 . 1000)
+ (2000 . 1000)
+ (1600 . 1000)
+ (1200 . 1000)
+ (1000 . 1000)
+ (800 . 1000)
+ (NIL . 500)
+ (880 . 1000)
+ (968 . 1000)
+ (1080 . 1000)
+ (1188 . 1000)))
(RPAQ? CROCKWINDOW )
-(PUTPROPS CROCK COPYRIGHT ("Xerox Corporation" 1984 1985 1986 1987))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (1940 16814 (CROCK 1950 . 2520) (CROCK.BUTTONEVENTFN 2522 . 2811) (CROCK.CHANGE.STYLE
-2813 . 5626) (CROCK.CLOSEFN 5628 . 5790) (CROCK.PROCESS 5792 . 14290) (CROCK.RESHAPEFN 14292 . 14451)
-(CROCK.ALARM 14453 . 15681) (CROCK.RING.ALARM 15683 . 16424) (CROCK.INIT 16426 . 16812)))))
+ (FILEMAP (NIL (1609 16483 (CROCK 1619 . 2189) (CROCK.BUTTONEVENTFN 2191 . 2480) (CROCK.CHANGE.STYLE
+2482 . 5295) (CROCK.CLOSEFN 5297 . 5459) (CROCK.PROCESS 5461 . 13959) (CROCK.RESHAPEFN 13961 . 14120)
+(CROCK.ALARM 14122 . 15350) (CROCK.RING.ALARM 15352 . 16093) (CROCK.INIT 16095 . 16481)))))
STOP
diff --git a/lispusers/CROCK.LCOM b/lispusers/CROCK.LCOM
index f488bb50..4bce6dbe 100644
Binary files a/lispusers/CROCK.LCOM and b/lispusers/CROCK.LCOM differ
diff --git a/lispusers/DEFAULTICON b/lispusers/DEFAULTICON
index 604d8de6..922406f7 100644
--- a/lispusers/DEFAULTICON
+++ b/lispusers/DEFAULTICON
@@ -1,14 +1,11 @@
-(DEFINE-FILE-INFO §READTABLE "INTERLISP" §PACKAGE "INTERLISP")
-(FILECREATED "13-Jan-87 01:23:25" {ERIS}LISPCORE>DEFAULTICON.;1 4586
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
- changes to%: (FNS \MAKEICONWINDOW)
+(FILECREATED "18-Feb-2026 16:26:48" {WMEDLEY}DEFAULTICON.;2 4702
- previous date%: "19-Dec-85 01:24:06" {ERIS}KOTO>LISPUSERS>DEFAULTICON.;1)
+ :EDIT-BY rmk
+ :PREVIOUS-DATE "13-Jan-87 01:23:25" {WMEDLEY}DEFAULTICON.;1)
-(* "
-Copyright (c) 1985, 1987 by Xerox Corporation. All rights reserved.
-")
(PRETTYCOMPRINT DEFAULTICONCOMS)
@@ -16,137 +13,140 @@ Copyright (c) 1985, 1987 by Xerox Corporation. All rights reserved.
(UGLYVARS \DEFAULTICON)
(INITVARS (DEFAULTICON \DEFAULTICON))
(FNS \MAKEICONWINDOW)))
+
(FILESLOAD ICONW)
-(READVARS \DEFAULTICON)
-(({(READBITMAP)(64 64
-"@@@@@@@@@@@@@@@@"
-"@@@@@@@@@@@@@@@@"
-"@@@@@@@@@@@@@@@@"
-"@@@@@@@@@@@@@@@@"
-"@@@@@@@@@@@@@@@@"
-"@@AOOOOOOOOOOH@@"
-"@@N@@@@@@@@@@G@@"
-"@C@@@@@@@@@@@@L@"
-"@D@@@@@@@@@@@@B@"
-"@H@@@@@@@@@@@@A@"
-"A@@@@@@@@@@@@@@H"
-"B@@@@@@@@@@@CO@D"
-"B@@@@@@@@@@@BDHD"
-"D@@@@@@@@@@@ABDB"
-"D@@@@@@@@@@@AODB"
-"D@@@@@@@@@@@ABLB"
-"D@@@@@@@@@@@ABDA"
-"H@@@@@@@@@@@ABDA"
-"H@@@@@@@@@@@AOHA"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"H@@@@@@@@@@@@@@A"
-"D@@@@@@@@@@@@@@B"
-"D@@@@@@@@@@@@@@B"
-"D@@@@@@@@@@@@@@B"
-"B@@@@@@@@@@@@@@D"
-"B@@@@@@@@@@@@@@D"
-"A@@@@@@@@@@@@@@H"
-"@H@@@@@@@@@@@@A@"
-"@D@@@@@@@@@@@@B@"
-"@C@@@@@@@@@@@@L@"
-"@@N@@@@@@@@@@G@@"
-"@@AOOOOOOOOOOH@@")} {(READBITMAP)(64 64
-"@@@@@@@@@@@@@@@@"
-"@@@@@@@@@@@@@@@@"
-"@@@@@@@@@@@@@@@@"
-"@@@@@@@@@@@@@@@@"
-"@@@@@@@@@@@@@@@@"
-"@@AOOOOOOOOOOH@@"
-"@@OOOOOOOOOOOO@@"
-"@COOOOOOOOOOOOL@"
-"@GOOOOOOOOOOOON@"
-"@OOOOOOOOOOOOOO@"
-"AOOOOOOOOOOOOOOH"
-"COOOOOOOOOOOOOOL"
-"COOOOOOOOOOONDOL"
-"GOOOOOOOOOOOOBGN"
-"GOOOOOOOOOOOOOGN"
-"GOOOOOOOOOOOOBON"
-"GOOOOOOOOOOOOBGO"
-"OOOOOOOOOOOOOBGO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"OOOOOOOOOOOOOOOO"
-"GOOOOOOOOOOOOOON"
-"GOOOOOOOOOOOOOON"
-"GOOOOOOOOOOOOOON"
-"COOOOOOOOOOOOOOL"
-"COOOOOOOOOOOOOOL"
-"AOOOOOOOOOOOOOOH"
-"@OOOOOOOOOOOOOO@"
-"@GOOOOOOOOOOOON@"
-"@COOOOOOOOOOOOL@"
-"@@OOOOOOOOOOOO@@"
-"@@AOOOOOOOOOOH@@")} (5 6 52 46)))
+
+(READVARS-FROM-STRINGS '(\DEFAULTICON)
+ "(({(READBITMAP)(64 64
+%"@@@@@@@@@@@@@@@@%"
+%"@@@@@@@@@@@@@@@@%"
+%"@@@@@@@@@@@@@@@@%"
+%"@@@@@@@@@@@@@@@@%"
+%"@@@@@@@@@@@@@@@@%"
+%"@@AOOOOOOOOOOH@@%"
+%"@@N@@@@@@@@@@G@@%"
+%"@C@@@@@@@@@@@@L@%"
+%"@D@@@@@@@@@@@@B@%"
+%"@H@@@@@@@@@@@@A@%"
+%"A@@@@@@@@@@@@@@H%"
+%"B@@@@@@@@@@@CO@D%"
+%"B@@@@@@@@@@@BDHD%"
+%"D@@@@@@@@@@@ABDB%"
+%"D@@@@@@@@@@@AODB%"
+%"D@@@@@@@@@@@ABLB%"
+%"D@@@@@@@@@@@ABDA%"
+%"H@@@@@@@@@@@ABDA%"
+%"H@@@@@@@@@@@AOHA%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"H@@@@@@@@@@@@@@A%"
+%"D@@@@@@@@@@@@@@B%"
+%"D@@@@@@@@@@@@@@B%"
+%"D@@@@@@@@@@@@@@B%"
+%"B@@@@@@@@@@@@@@D%"
+%"B@@@@@@@@@@@@@@D%"
+%"A@@@@@@@@@@@@@@H%"
+%"@H@@@@@@@@@@@@A@%"
+%"@D@@@@@@@@@@@@B@%"
+%"@C@@@@@@@@@@@@L@%"
+%"@@N@@@@@@@@@@G@@%"
+%"@@AOOOOOOOOOOH@@%")} {(READBITMAP)(64 64
+%"@@@@@@@@@@@@@@@@%"
+%"@@@@@@@@@@@@@@@@%"
+%"@@@@@@@@@@@@@@@@%"
+%"@@@@@@@@@@@@@@@@%"
+%"@@@@@@@@@@@@@@@@%"
+%"@@AOOOOOOOOOOH@@%"
+%"@@OOOOOOOOOOOO@@%"
+%"@COOOOOOOOOOOOL@%"
+%"@GOOOOOOOOOOOON@%"
+%"@OOOOOOOOOOOOOO@%"
+%"AOOOOOOOOOOOOOOH%"
+%"COOOOOOOOOOOOOOL%"
+%"COOOOOOOOOOONDOL%"
+%"GOOOOOOOOOOOOBGN%"
+%"GOOOOOOOOOOOOOGN%"
+%"GOOOOOOOOOOOOBON%"
+%"GOOOOOOOOOOOOBGO%"
+%"OOOOOOOOOOOOOBGO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"OOOOOOOOOOOOOOOO%"
+%"GOOOOOOOOOOOOOON%"
+%"GOOOOOOOOOOOOOON%"
+%"GOOOOOOOOOOOOOON%"
+%"COOOOOOOOOOOOOOL%"
+%"COOOOOOOOOOOOOOL%"
+%"AOOOOOOOOOOOOOOH%"
+%"@OOOOOOOOOOOOOO@%"
+%"@GOOOOOOOOOOOON@%"
+%"@COOOOOOOOOOOOL@%"
+%"@@OOOOOOOOOOOO@@%"
+%"@@AOOOOOOOOOOH@@%")} (5 6 52 46)))
+")
(RPAQ? DEFAULTICON \DEFAULTICON)
(DEFINEQ
@@ -175,7 +175,6 @@ Copyright (c) 1985, 1987 by Xerox Corporation. All rights reserved.
(WINDOWPROP icon 'HEIGHT]
icon])
)
-(PUTPROPS DEFAULTICON COPYRIGHT ("Xerox Corporation" 1985 1987))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (3170 4498 (\MAKEICONWINDOW 3180 . 4496)))))
+ (FILEMAP (NIL (3351 4679 (\MAKEICONWINDOW 3361 . 4677)))))
STOP
diff --git a/lispusers/DEFAULTSUBITEMFN b/lispusers/DEFAULTSUBITEMFN
index 9ea07293..671dd038 100644
--- a/lispusers/DEFAULTSUBITEMFN
+++ b/lispusers/DEFAULTSUBITEMFN
@@ -1,17 +1,17 @@
-(DEFINE-FILE-INFO §READTABLE "INTERLISP" §PACKAGE "INTERLISP")
-(FILECREATED " 4-Mar-87 15:59:01" {PHYLUM}LYRIC>DEFAULTSUBITEMFN.;1 1299
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
- previous date%: "31-Jan-86 17:45:55" {PHYLUM}KOTO>LISPUSERS>DEFAULTSUBITEMFN.;1)
+(FILECREATED "18-Feb-2026 16:28:38" {WMEDLEY}DEFAULTSUBITEMFN.;2 1229
+ :EDIT-BY rmk
+
+ :PREVIOUS-DATE " 4-Mar-87 15:59:01" {WMEDLEY}DEFAULTSUBITEMFN.;1)
-(* "
-Copyright (c) 1986, 1987 by Xerox Corporation. All rights reserved.
-")
(PRETTYCOMPRINT DEFAULTSUBITEMFNCOMS)
-(RPAQQ DEFAULTSUBITEMFNCOMS ((* * redefine the DEFAULTSUBITEMFN to add the EVAL keyword to the subitem menu field) (FNS DEFAULTSUBITEMFN))
-)
+(RPAQQ DEFAULTSUBITEMFNCOMS ((* * redefine the DEFAULTSUBITEMFN to add the EVAL keyword to the
+ subitem menu field)
+ (FNS DEFAULTSUBITEMFN)))
(* * redefine the DEFAULTSUBITEMFN to add the EVAL keyword to the subitem menu field)
(DEFINEQ
@@ -20,7 +20,6 @@ Copyright (c) 1986, 1987 by Xerox Corporation. All rights reserved.
(LAMBDA (MENU ITEM) (* edited%: "31-Dec-85 16:41") (* rrb "17-Aug-84 17:24") (* default subitemfn for menus. Checks the fourth element of the item for an expression of the form (SUBITEMS a b c) or if the fourth element is (EVAL form) will return the value of form. MENU and ITEM will be available during the evaluation) (PROG (TEMP) (RETURN (if (AND (LISTP ITEM) (LISTP (SETQ TEMP (CDR ITEM))) (LISTP (SETQ TEMP (CDR TEMP))) (LISTP (SETQ TEMP (CDR TEMP)))) then (SELECTQ (CAR (SETQ TEMP (LISTP (CAR TEMP)))) (SUBITEMS (CDR TEMP)) (EVAL (EVAL (CADR TEMP))) NIL)))))
)
)
-(PUTPROPS DEFAULTSUBITEMFN COPYRIGHT ("Xerox Corporation" 1986 1987))
(DECLARE%: DONTCOPY
(FILEMAP (NIL (606 1206 (DEFAULTSUBITEMFN 616 . 1204)))))
STOP
diff --git a/lispusers/DEFAULTSUBITEMFN.LCOM b/lispusers/DEFAULTSUBITEMFN.LCOM
index 98190d4c..8152410b 100644
Binary files a/lispusers/DEFAULTSUBITEMFN.LCOM and b/lispusers/DEFAULTSUBITEMFN.LCOM differ
diff --git a/lispusers/GITFNS b/lispusers/GITFNS
index 4b5cbe62..7b9e5ad3 100644
--- a/lispusers/GITFNS
+++ b/lispusers/GITFNS
@@ -1,12 +1,12 @@
-(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
+(DEFINE-FILE-INFO :PACKAGE "INTERLISP" :READTABLE "INTERLISP" :BASE 10 :FORMAT :UTF-8)
-(FILECREATED "28-Oct-2025 14:10:06" {WMEDLEY}GITFNS.;569 131593
+(FILECREATED " 2-Mar-2026 14:00:13" {WMEDLEY}GITFNS.;576 133513
:EDIT-BY rmk
- :CHANGES-TO (FNS GIT-WORKING-COMPARE-DIRECTORIES GIT-BRANCHES-COMPARE-DIRECTORIES)
+ :CHANGES-TO (FNS GIT-MY-NEXT-BRANCH)
- :PREVIOUS-DATE "28-Oct-2025 13:32:16" {WMEDLEY}GITFNS.;568)
+ :PREVIOUS-DATE "26-Feb-2026 00:39:22" {WMEDLEY}GITFNS.;575)
(PRETTYCOMPRINT GITFNSCOMS)
@@ -74,7 +74,7 @@
(* ;; "Differences")
- (FNS GIT-BRANCH-DIFF GIT-COMMIT-DIFFS GIT-BRANCH-RELATIONS)
+ (FNS GIT-BRANCH-DIFF GIT-COMMIT-DIFFS GIT-BRANCH-RELATIONS GIT-MODIFIED)
(* ;; "")
@@ -169,6 +169,7 @@
(GIT-MAKE-PROJECT
[LAMBDA (PROJECTNAME CLONEPATH WORKINGPATH EXCLUSIONS DEFAULTSUBDIRS)
+ (* ; "Edited 25-Feb-2026 23:25 by rmk")
(* ; "Edited 25-Oct-2025 16:53 by rmk")
(* ; "Edited 22-Oct-2025 12:45 by rmk")
(* ; "Edited 20-Oct-2025 18:10 by rmk")
@@ -234,9 +235,8 @@
(CL:WHEN (SETQ GITIGNORE (INFILEP (PACKFILENAME.STRING 'NAME ".gitignore" 'BODY
CLONEPATH)))
(SETQ GITIGNORE (CL:WITH-OPEN-FILE (STREAM GITIGNORE :EXTERNAL-FORMAT :UTF-8)
- (bind L until (EOFP STREAM)
- while (SETQ L (CL:READ-LINE STREAM :EOF-ERROR-P NIL
- :EOF-VALUE NIL))
+ (bind L until (EOFP STREAM) while (SETQ L (CL:READ-LINE
+ STREAM NIL))
unless (OR (EQ 0 (NCHARS L))
(STRPOS "#" L)) collect L))))
(SETQ EXCLUSIONS (CL:REMOVE-DUPLICATES (APPEND (for E inside EXCLUSIONS
@@ -274,16 +274,16 @@
"")
"for " PROJECTNAME]
(SETQ PROJECT (create GIT-PROJECT
- PROJECTNAME _ PROJECTNAME
- GITHOST _ (PACK* "{" (PSEUDOHOST PROJECTNAME CLONEPATH)
+ PROJECTNAME ↠PROJECTNAME
+ GITHOST ↠(PACK* "{" (PSEUDOHOST PROJECTNAME CLONEPATH)
"}")
- WHOST _ (AND WORKINGPATH (PACK* "{" (PSEUDOHOST (CONCAT "W"
+ WHOST ↠(AND WORKINGPATH (PACK* "{" (PSEUDOHOST (CONCAT "W"
PROJECTNAME)
WORKINGPATH)
"}"))
- EXCLUSIONS _ EXCLUSIONS
- DEFAULTSUBDIRS _ (MKLIST DEFAULTSUBDIRS)
- CLONEPATH _ CLONEPATH))
+ EXCLUSIONS ↠EXCLUSIONS
+ DEFAULTSUBDIRS ↠(MKLIST DEFAULTSUBDIRS)
+ CLONEPATH ↠CLONEPATH))
(/RPLACD [OR (ASSOC PROJECTNAME GIT-PROJECTS)
(CAR (push GIT-PROJECTS (CONS PROJECTNAME]
PROJECT)
@@ -358,7 +358,7 @@
(FIND-ANCESTOR-DIRECTORY
[LAMBDA (STARTDIR PREDFN) (* ; "Edited 8-May-2022 12:17 by rmk")
- (BIND POS (A _ STARTDIR) WHILE (SETQ POS (STRPOS "/" A -2 NIL NIL NIL FILEDIRCASEARRAY T))
+ (BIND POS (A ↠STARTDIR) WHILE (SETQ POS (STRPOS "/" A -2 NIL NIL NIL FILEDIRCASEARRAY T))
DO (SETQ A (SUBSTRING A 1 POS))
(CL:WHEN (APPLY* PREDFN A)
(RETURN A])
@@ -372,7 +372,7 @@
(GIT-CLONEP (GIT-PROJECT-PATH PROJECTNAME PROJECTPATH)
T T)
[FIND-ANCESTOR-DIRECTORY PROJECTPATH (FUNCTION (LAMBDA (A)
- (BIND D (GEN _ (\GENERATEFILES A NIL NIL 1))
+ (BIND D (GEN ↠(\GENERATEFILES A NIL NIL 1))
WHILE (SETQ D (\GENERATENEXTFILE GEN))
WHEN (GIT-CLONEP D T)
DO (RETFROM (FUNCTION
@@ -684,7 +684,7 @@
(GIT-MAINBRANCH? (GIT-WHICH-BRANCH PROJECT)
PROJECT)
- (FOR MF GF DEST (MEDLEYSUBDIRS _ (MEDLEYSUBDIRS PROJECT)) INSIDE MFILES
+ (FOR MF GF DEST (MEDLEYSUBDIRS ↠(MEDLEYSUBDIRS PROJECT)) INSIDE MFILES
COLLECT (SETQ MF (OR (FINDFILE MF NIL MEDLEYSUBDIRS)
(ERROR "FILE NOT FOUND" MF)))
(CL:UNLESS (STRING.EQUAL MF (INFILEP (PACKFILENAME 'VERSION NIL 'BODY MF))
@@ -709,7 +709,7 @@
(* ;; "Does anybody call this?")
(SETQ PROJECT (GIT-GET-PROJECT PROJECT))
- (FOR GF MF DEST (GITSUBDIRS _ (GITSUBDIRS PROJECT)) INSIDE GFILES
+ (FOR GF MF DEST (GITSUBDIRS ↠(GITSUBDIRS PROJECT)) INSIDE GFILES
COLLECT (SETQ GF (OR (FINDFILE GF NIL GITSUBDIRS)
(ERROR "FILE NOT FOUND" GF)))
(SETQ MF (MFILE4GFILE GF))
@@ -742,8 +742,8 @@
"")])
(STRIPDIR
- [LAMBDA (FILE DIRECTORY) (* ; "Edited 18-Jan-2022 16:09 by rmk")
- (* ; "Edited 8-Nov-2021 11:50 by rmk:")
+ [LAMBDA (FILE DIRECTORY) (* ; "Edited 18-Jan-2022 16:09 by rmk")
+ (* ; "Edited 8-Nov-2021 11:50 by rmk:")
(IF (STRPOS DIRECTORY FILE 1 NIL T NIL FILEDIRCASEARRAY)
THEN (SUBSTRING FILE (ADD1 (NCHARS DIRECTORY)))
ELSE FILE])
@@ -1023,7 +1023,7 @@
": ")
(IF (EQ (CAR X)
'Comments)
- THEN (FOR CC (POS _ (POSITION T)) IN (CDR X)
+ THEN (FOR CC (POS ↠(POSITION T)) IN (CDR X)
DO (IF (EQ CC T)
THEN (TERPRI T)
ELSE (PRINTOUT T .TAB0 POS CC)))
@@ -1163,7 +1163,7 @@
(* ;; "Returns the identifiers for commits in BRANCH1 but not in BUTNOTBRANCH2")
- (GIT-COMMAND (CONCAT "git log --format=%"%%h%" %"" BRANCH1 "%" %"" BUTNOTBRANCH2 "%"")
+ (GIT-COMMAND (CONCAT "git log --format=%"%%h%" %"" BRANCH1 "%" %"^" BUTNOTBRANCH2 "%"")
NIL NIL PROJECT])
(GIT-BRANCH-RELATIONS
@@ -1227,6 +1227,16 @@
then (CONS MAIN (DREMOVE MAIN (SORT DATUM)))
else (SORT DATUM]
(RETURN (LIST SUPERSETS EQUALS])
+
+(GIT-MODIFIED
+ [LAMBDA (PROJECT) (* ; "Edited 25-Dec-2025 13:39 by rmk")
+
+ (* ;;
+ "A list of files that have been modified M or introduced but not committed ??. see git help status")
+
+ (for X POS in (GIT-COMMAND "git status --porcelain")
+ when (SETQ POS (OR (STRPOS " M " X NIL NIL NIL T)
+ (STRPOS "?? " X NIL NIL NIL T))) collect (SUBSTRING X POS])
)
@@ -1353,7 +1363,7 @@
(CL:WHEN (thereis B in BRANCHES suchthat (STRPOS "HEAD detached" B))
(PRINTOUT T "Execute %"git gc%" to eliminate a branch with a detached HEAD" T))
(CL:WHEN EXCLUDEMERGED
- (SETQ BRANCHES (for B (MAINBRANCH _ (GIT-MAINBRANCH PROJECT 'LOCAL)) in BRANCHES
+ (SETQ BRANCHES (for B (MAINBRANCH ↠(GIT-MAINBRANCH PROJECT 'LOCAL)) in BRANCHES
when (EQUAL (GIT-COMMAND (CONCAT "git merge-base %"" B "%" %""
MAINBRANCH "%""))
(GIT-COMMAND (CONCAT "git rev-parse %"" B "%"")))
@@ -1392,11 +1402,11 @@
(CL:WHEN PIN?
[SETQ BRANCHES (APPEND BRANCHES '((" Pin menu" 'PinMenu])
(create MENU
- TITLE _ (OR TITLE (CONCAT (LENGTH BRANCHES)
+ TITLE ↠(OR TITLE (CONCAT (LENGTH BRANCHES)
" branches"))
- ITEMS _ BRANCHES
- MENUFONT _ DEFAULTFONT
- WHENSELECTEDFN _ (FUNCTION GIT-BRANCH-WHENSELECTEDFN)))])
+ ITEMS ↠BRANCHES
+ MENUFONT ↠DEFAULTFONT
+ WHENSELECTEDFN ↠(FUNCTION GIT-BRANCH-WHENSELECTEDFN)))])
(GIT-BRANCH-WHENSELECTEDFN
[LAMBDA (ITEM MENU BUTTON) (* ; "Edited 2-Oct-2025 23:08 by rmk")
@@ -1446,20 +1456,20 @@
eachtime [SETQ DRAFT (EQ 'true (JSON-GET JSOBJ 'isDraft] when (OR INCLUDEDRAFTS
(NOT DRAFT))
collect [SETQ PR (create PULLREQUEST
- PRNUMBER _ (JSON-GET JSOBJ 'number)
- PRNAME _ (JSON-GET JSOBJ 'headRefName)
- PRDESCRIPTION _ (JSON-GET JSOBJ 'title)
- PRSTATUS _ (CL:IF DRAFT
+ PRNUMBER ↠(JSON-GET JSOBJ 'number)
+ PRNAME ↠(JSON-GET JSOBJ 'headRefName)
+ PRDESCRIPTION ↠(JSON-GET JSOBJ 'title)
+ PRSTATUS ↠(CL:IF DRAFT
'D
(SELECTQ (MKATOM (JSON-GET JSOBJ 'reviewDecision))
- (CHANGES¬REQUESTED
+ (CHANGES_REQUESTED
'C)
- (REVIEW¬REQUIRED
+ (REVIEW_REQUIRED
" ")
'A))
- PRPROJECT _ PROJECT
- PRURL _ (JSON-GET JSOBJ 'url)
- PRLOGIN _ (JSON-GET JSOBJ '(headRepositoryOwner login]
+ PRPROJECT ↠PROJECT
+ PRURL ↠(JSON-GET JSOBJ 'url)
+ PRLOGIN ↠(JSON-GET JSOBJ '(headRepositoryOwner login]
(CL:WHEN (STRPOS ":" (fetch (PULLREQUEST PRNAME) of PR))
(* ;; "From Nick: Git commands to bring install and deal with the remotes:")
@@ -1510,8 +1520,8 @@
(LET ((RELATIONS (GIT-BRANCH-RELATIONS (for PR in PRS
collect (GITORIGIN (fetch PRNAME of PR)))
NIL T PROJECT)))
- (SORT (for PR REL LABEL PRNAME STATUS (SUPERSETS _ (CAR RELATIONS))
- (EQUALS _ (CADR RELATIONS)) in PRS
+ (SORT (for PR REL LABEL PRNAME STATUS (SUPERSETS ↠(CAR RELATIONS))
+ (EQUALS ↠(CADR RELATIONS)) in PRS
eachtime (SETQ PRNAME (fetch PRNAME of PR))
(SETQ LABEL (CONCAT "#" (fetch (PULLREQUEST PRNUMBER) of PR)
" "
@@ -1558,15 +1568,33 @@
(GIT-BRANCH-NUM (OR BRANCH (GIT-WHICH-BRANCH PROJECT T])
(GIT-MY-NEXT-BRANCH
- [LAMBDA (PROJECT) (* ; "Edited 19-May-2022 14:08 by rmk")
+ [LAMBDA (PROJECT) (* ; "Edited 2-Mar-2026 14:00 by rmk")
+ (* ; "Edited 19-May-2022 14:08 by rmk")
(* ; "Edited 8-Jan-2022 09:43 by rmk")
(* ;; "Figures out the number of my next incremental branch would be. ")
(PACK* (GIT-INITIALS)
- (ADD1 (OR (GIT-MY-BRANCHP (GIT-MY-CURRENT-BRANCH PROJECT)
- PROJECT)
- 0])
+ (LET (PROJECTLIST PROJECTENTRY NEXTNUM)
+ (CL:WITH-OPEN-FILE (STRM "{LI}GIT-MY-CURRENT-BRANCH-NUMS;1" :DIRECTION :IO
+ :IF-DOES-NOT-EXIST :CREATE :IF-EXISTS :OVERWRITE)
+ (SETQ PROJECTLIST (CL:UNLESS (EQ 0 (GETEOFPTR STRM))
+ (READ STRM)))
+ (SETQ PROJECTENTRY (ASSOC (GIT-GET-PROJECT PROJECT 'PROJECTNAME)
+ PROJECTLIST))
+ (CL:UNLESS PROJECTENTRY
+ (SETQ PROJECTENTRY (LIST (GIT-GET-PROJECT PROJECT 'PROJECTNAME)
+ (OR (GIT-MY-BRANCHP (GIT-MY-CURRENT-BRANCH
+ PROJECT)
+ PROJECT)
+ 0)))
+ (push PROJECTLIST PROJECTENTRY))
+ (SETQ NEXTNUM (ADD1 (CADR PROJECTENTRY)))
+ (RPLACA (CDR PROJECTENTRY)
+ NEXTNUM)
+ (SETFILEPTR STRM 0)
+ (PRINT PROJECTLIST STRM)
+ NEXTNUM])
(GIT-MY-BRANCHES
[LAMBDA (PROJECT EXCLUDEMERGED INITS) (* ; "Edited 19-May-2022 19:10 by rmk")
@@ -1647,14 +1675,14 @@
(CL:WHEN (STRPOS "fatal: " (CAR LINES)
1 NIL T)
(ERROR "Could not remove worktree for " BRANCH))
- (* (DELFILE (CONCAT PATH "/.DS_Store"))
+ (* (DELFILE (CONCAT PATH "/.DSâ†Store"))
(GIT-COMMAND (CONCAT "rmdir " DIR) NIL
NIL PROJECT))
BRANCH])
(GIT-LIST-WORKTREES
- [LAMBDA NIL (* ; "Edited 12-Dec-2021 12:13 by rmk")
- (* ; "Edited 19-Nov-2021 18:53 by rmk:")
+ [LAMBDA NIL (* ; "Edited 12-Dec-2021 12:13 by rmk")
+ (* ; "Edited 19-Nov-2021 18:53 by rmk:")
(* ;; "The git command tells us what the clone thinks about it, but then we look to see what is actually in our worktrees directory, to make sure that the subdirectory wasn't deleted in a wy that the clone didn't know about.")
@@ -1880,14 +1908,14 @@
(replace (CDENTRY INFO2) of CDE
with (create CDINFO
- FULLNAME _ (CADR MAP)
- DATE _ (CL:IF (EQ 'R (CADDR MAP))
+ FULLNAME ↠(CADR MAP)
+ DATE ↠(CL:IF (EQ 'R (CADDR MAP))
" <-"
" ==")
- LENGTH _ ""
- AUTHOR _ ""
- TYPE _ ""
- EOL _ ""))
+ LENGTH ↠""
+ AUTHOR ↠""
+ TYPE ↠""
+ EOL ↠""))
(replace (CDENTRY DATEREL) of CDE
with (CADDR MAP]
(TERPRI T)
@@ -1957,10 +1985,10 @@
then (SETQ SUBDIRS (ALLSUBDIRS PROJECT))
"ALL subdirectories"
else SUBDIRS)))
- (for SUBDIR TITLE CDVAL (WPROJ _ (CONCAT "Working " (L-CASE (fetch PROJECTNAME of PROJECT)
+ (for SUBDIR TITLE CDVAL (WPROJ ↠(CONCAT "Working " (L-CASE (fetch PROJECTNAME of PROJECT)
T)))
- (NENTRIES _ 0)
- (BRANCH2 _ (GIT-WHICH-BRANCH PROJECT T))
+ (NENTRIES ↠0)
+ (BRANCH2 ↠(GIT-WHICH-BRANCH PROJECT T))
first (PRINTOUT T "Comparing " SUBDIRSTRING 6 " of " WPROJ " and Git " BRANCH2 T)
(BKSYSBUF " ") inside SUBDIRS
collect (TERPRI T)
@@ -2132,12 +2160,12 @@
NIL]
(CL:WHEN (OR COPYITEM COMPAREITEMS)
(SELECTQ (MENU (CREATE MENU
- TITLE _ (CONCAT (WINDOWPROP WINDOW 'SUBDIR)
+ TITLE ↠(CONCAT (WINDOWPROP WINDOW 'SUBDIR)
"/"
(FETCH MATCHNAME OF CDENTRY))
- ITEMS _ (APPEND COPYITEM COMPAREITEMS)
- MENUFONT _ FONT
- MENUTITLEFONT _ FONT))
+ ITEMS ↠(APPEND COPYITEM COMPAREITEMS)
+ MENUFONT ↠FONT
+ MENUTITLEFONT ↠FONT))
(TOGIT (CL:WHEN (TOGIT (FETCH (CDINFO FULLNAME) OF INFO1)
WINDOW)
(IMAGEOBJPROP OBJ 'COPIED T)
@@ -2162,18 +2190,18 @@
NIL)))])
(GIT-CD-LABELFN
- [LAMBDA (FILE1 FILE2 USERDATA) (* ; "Edited 5-Jan-2022 15:10 by rmk")
- (* ; "Edited 16-Dec-2021 12:25 by rmk")
+ [LAMBDA (FILE1 FILE2 USERDATA) (* ; "Edited 5-Jan-2022 15:10 by rmk")
+ (* ; "Edited 16-Dec-2021 12:25 by rmk")
(* ; "Edited 13-Dec-2021 22:13 by rmk")
(DECLARE (USEDFREE CDVALUE))
(LET (NC B LABEL1 LABEL2)
(CL:WHEN (SETQ NC (FETCH NCDIR OF (FETCH CDMAXNC1 OF CDVALUE)))
- (SETQ LABEL1 (SLASHIT (SUBSTRING FILE1 (ADD1 NC))
+ (SETQ LABEL1 (SLASHIT (SUBSTRING FILE1 (ADD1 NC))
T))
(CL:WHEN (SETQ B (LISTGET USERDATA 'BRANCH1))
(SETQ LABEL1 (CONCAT B "/" LABEL1))))
(CL:WHEN (SETQ NC (FETCH NCDIR OF (FETCH CDMAXNC2 OF CDVALUE)))
- (SETQ LABEL2 (SLASHIT (SUBSTRING FILE2 (ADD1 NC))
+ (SETQ LABEL2 (SLASHIT (SUBSTRING FILE2 (ADD1 NC))
T))
(CL:WHEN (SETQ B (LISTGET USERDATA 'BRANCH2))
(SETQ LABEL2 (CONCAT B "/" LABEL2))))
@@ -2367,15 +2395,15 @@
NIL])
(GIT-RESULT-TO-LINES
- [LAMBDA (FILE ALL) (* ; "Edited 31-Mar-2025 15:19 by rmk")
+ [LAMBDA (FILE ALL) (* ; "Edited 25-Feb-2026 23:24 by rmk")
+ (* ; "Edited 31-Mar-2025 15:19 by rmk")
(* ; "Edited 16-Jul-2022 22:21 by rmk")
(* ;; "Suppress .git lines unless ALL SYSTEM-EXTERNALFORMAT may make the wrong guess, but at least we ensure here that lines get broken.")
(CL:WITH-OPEN-FILE (STREAM FILE :DIRECTION :INPUT :EXTERNAL-FORMAT (LIST (SYSTEM-EXTERNALFORMAT)
'ANY))
- (bind LINE until (EOFP STREAM) when [PROGN (SETQ LINE (CL:READ-LINE STREAM :EOF-ERROR-P
- NIL :EOF-VALUE NIL))
+ (bind LINE until (EOFP STREAM) when [PROGN (SETQ LINE (CL:READ-LINE STREAM NIL))
(OR ALL (NOT (STRPOS ".git" LINE 1]
collect LINE])
@@ -2394,32 +2422,33 @@
(PUTPROPS GITFNS FILETYPE :TCOMPL)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (4196 21002 (GIT-CLONEP 4206 . 5637) (GIT-INIT 5639 . 6269) (GIT-MAKE-PROJECT 6271 .
-14060) (GIT-GET-PROJECT 14062 . 15987) (GIT-PUT-PROJECT-FIELD 15989 . 17630) (GIT-PROJECT-PATH 17632
- . 18676) (FIND-ANCESTOR-DIRECTORY 18678 . 19027) (GIT-FIND-CLONE 19029 . 20110) (GIT-MAINBRANCH 20112
- . 20507) (GIT-MAINBRANCH? 20509 . 21000)) (26465 31394 (PRC-COMMAND 26475 . 31392)) (31450 34238 (
-ALLSUBDIRS 31460 . 32746) (MEDLEYSUBDIRS 32748 . 33441) (GITSUBDIRS 33443 . 34236)) (34239 36640 (
-TOGIT 34249 . 35655) (FROMGIT 35657 . 36638)) (36641 39644 (MYMEDLEYSUBDIR 36651 . 37107) (GITSUBDIR
-37109 . 37552) (STRIPDIR 37554 . 37925) (STRIPHOST 37927 . 38167) (STRIPNAME 38169 . 38922) (
-STRIPWHERE 38924 . 39642)) (39645 41880 (GFILE4MFILE 39655 . 40351) (MFILE4GFILE 40353 . 40922) (
-GIT-REPO-FILENAME 40924 . 41878)) (41929 52184 (GIT-COMMIT 41939 . 42765) (GIT-PUSH 42767 . 43527) (
-GIT-PULL 43529 . 44281) (GIT-APPROVAL 44283 . 44632) (GIT-GET-FILE 44634 . 46549) (GIT-FILE-EXISTS?
-46551 . 46825) (GIT-REMOTE-UPDATE 46827 . 47662) (GIT-REMOTE-ADD 47664 . 47971) (GIT-FILE-DATE 47973
- . 49020) (GIT-FILE-HISTORY 49022 . 50956) (GIT-PRINT-FILE-HISTORY 50958 . 52008) (GIT-FETCH 52010 .
-52182)) (52214 63694 (GIT-BRANCH-DIFF 52224 . 59113) (GIT-COMMIT-DIFFS 59115 . 60006) (
-GIT-BRANCH-RELATIONS 60008 . 63692)) (63739 82478 (GIT-BRANCH-NUM 63749 . 64322) (GIT-CHECKOUT 64324
- . 65610) (GIT-WHICH-BRANCH 65612 . 66019) (GIT-MAKE-BRANCH 66021 . 68600) (GIT-BRANCHES 68602 . 71197
-) (GIT-BRANCH-EXISTS? 71199 . 72070) (GIT-PICK-BRANCH 72072 . 72562) (GIT-BRANCH-MENU 72564 . 73445) (
-GIT-BRANCH-WHENSELECTEDFN 73447 . 74986) (GIT-PULL-REQUESTS 74988 . 78859) (GIT-SHORT-BRANCH-NAME
-78861 . 79152) (GIT-LONG-NAME 79154 . 79471) (GIT-PRC-BRANCHES 79473 . 82476)) (82508 85956 (
-GIT-MY-CURRENT-BRANCH 82518 . 82888) (GIT-MY-BRANCHP 82890 . 83508) (GIT-MY-NEXT-BRANCH 83510 . 84004)
- (GIT-MY-BRANCHES 84006 . 85954)) (86002 90077 (GIT-ADD-WORKTREE 86012 . 87619) (GIT-REMOVE-WORKTREE
-87621 . 88551) (GIT-LIST-WORKTREES 88553 . 89357) (WORKTREEDIR 89359 . 90075)) (90125 123133 (
-GIT-GET-DIFFERENT-FILES 90135 . 97043) (GIT-BRANCHES-COMPARE-DIRECTORIES 97045 . 104672) (
-GIT-WORKING-COMPARE-DIRECTORIES 104674 . 110470) (GIT-COMPARE-WORKTREE 110472 . 114450) (
-GITCDOBJBUTTONFN 114452 . 118942) (GIT-CD-LABELFN 118944 . 120026) (GIT-CD-MENUFN 120028 . 121114) (
-GIT-WORKING-COMPARE-FILES 121116 . 121736) (GIT-BRANCHES-COMPARE-FILES 121738 . 122902) (
-GIT-PR-COMPARE 122904 . 123131)) (123203 131526 (CDGITDIR 123213 . 123900) (GIT-COMMAND 123902 .
-125460) (GITORIGIN 125462 . 126159) (GIT-INITIALS 126161 . 126465) (GIT-COMMAND-TO-FILE 126467 .
-129952) (GIT-RESULT-TO-LINES 129954 . 130859) (STRIPLOCAL 130861 . 131524)))))
+ (FILEMAP (NIL (4178 21056 (GIT-CLONEP 4188 . 5619) (GIT-INIT 5621 . 6251) (GIT-MAKE-PROJECT 6253 .
+14110) (GIT-GET-PROJECT 14112 . 16037) (GIT-PUT-PROJECT-FIELD 16039 . 17680) (GIT-PROJECT-PATH 17682
+ . 18726) (FIND-ANCESTOR-DIRECTORY 18728 . 19079) (GIT-FIND-CLONE 19081 . 20164) (GIT-MAINBRANCH 20166
+ . 20561) (GIT-MAINBRANCH? 20563 . 21054)) (26519 31448 (PRC-COMMAND 26529 . 31446)) (31504 34292 (
+ALLSUBDIRS 31514 . 32800) (MEDLEYSUBDIRS 32802 . 33495) (GITSUBDIRS 33497 . 34290)) (34293 36698 (
+TOGIT 34303 . 35711) (FROMGIT 35713 . 36696)) (36699 39709 (MYMEDLEYSUBDIR 36709 . 37165) (GITSUBDIR
+37167 . 37610) (STRIPDIR 37612 . 37990) (STRIPHOST 37992 . 38232) (STRIPNAME 38234 . 38987) (
+STRIPWHERE 38989 . 39707)) (39710 41945 (GFILE4MFILE 39720 . 40416) (MFILE4GFILE 40418 . 40987) (
+GIT-REPO-FILENAME 40989 . 41943)) (41994 52251 (GIT-COMMIT 42004 . 42830) (GIT-PUSH 42832 . 43592) (
+GIT-PULL 43594 . 44346) (GIT-APPROVAL 44348 . 44697) (GIT-GET-FILE 44699 . 46614) (GIT-FILE-EXISTS?
+46616 . 46890) (GIT-REMOTE-UPDATE 46892 . 47727) (GIT-REMOTE-ADD 47729 . 48036) (GIT-FILE-DATE 48038
+ . 49085) (GIT-FILE-HISTORY 49087 . 51021) (GIT-PRINT-FILE-HISTORY 51023 . 52075) (GIT-FETCH 52077 .
+52249)) (52281 64233 (GIT-BRANCH-DIFF 52291 . 59180) (GIT-COMMIT-DIFFS 59182 . 60073) (
+GIT-BRANCH-RELATIONS 60075 . 63759) (GIT-MODIFIED 63761 . 64231)) (64278 83045 (GIT-BRANCH-NUM 64288
+ . 64861) (GIT-CHECKOUT 64863 . 66149) (GIT-WHICH-BRANCH 66151 . 66558) (GIT-MAKE-BRANCH 66560 . 69139
+) (GIT-BRANCHES 69141 . 71738) (GIT-BRANCH-EXISTS? 71740 . 72611) (GIT-PICK-BRANCH 72613 . 73103) (
+GIT-BRANCH-MENU 73105 . 73994) (GIT-BRANCH-WHENSELECTEDFN 73996 . 75535) (GIT-PULL-REQUESTS 75537 .
+79422) (GIT-SHORT-BRANCH-NAME 79424 . 79715) (GIT-LONG-NAME 79717 . 80034) (GIT-PRC-BRANCHES 80036 .
+83043)) (83075 87829 (GIT-MY-CURRENT-BRANCH 83085 . 83455) (GIT-MY-BRANCHP 83457 . 84075) (
+GIT-MY-NEXT-BRANCH 84077 . 85877) (GIT-MY-BRANCHES 85879 . 87827)) (87875 91959 (GIT-ADD-WORKTREE
+87885 . 89492) (GIT-REMOVE-WORKTREE 89494 . 90426) (GIT-LIST-WORKTREES 90428 . 91239) (WORKTREEDIR
+91241 . 91957)) (92007 125045 (GIT-GET-DIFFERENT-FILES 92017 . 98925) (
+GIT-BRANCHES-COMPARE-DIRECTORIES 98927 . 106566) (GIT-WORKING-COMPARE-DIRECTORIES 106568 . 112370) (
+GIT-COMPARE-WORKTREE 112372 . 116350) (GITCDOBJBUTTONFN 116352 . 120850) (GIT-CD-LABELFN 120852 .
+121938) (GIT-CD-MENUFN 121940 . 123026) (GIT-WORKING-COMPARE-FILES 123028 . 123648) (
+GIT-BRANCHES-COMPARE-FILES 123650 . 124814) (GIT-PR-COMPARE 124816 . 125043)) (125115 133446 (CDGITDIR
+ 125125 . 125812) (GIT-COMMAND 125814 . 127372) (GITORIGIN 127374 . 128071) (GIT-INITIALS 128073 .
+128377) (GIT-COMMAND-TO-FILE 128379 . 131864) (GIT-RESULT-TO-LINES 131866 . 132779) (STRIPLOCAL 132781
+ . 133444)))))
STOP
diff --git a/lispusers/GITFNS.LCOM b/lispusers/GITFNS.LCOM
index da2bc98b..edc706ad 100644
Binary files a/lispusers/GITFNS.LCOM and b/lispusers/GITFNS.LCOM differ
diff --git a/lispusers/HELPSYS b/lispusers/HELPSYS
index 4ff064d9..748a9348 100644
--- a/lispusers/HELPSYS
+++ b/lispusers/HELPSYS
@@ -1,12 +1,13 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
-(FILECREATED " 5-May-2025 22:04:32" {WMEDLEY}HELPSYS.;15 87966
+(FILECREATED "27-Jan-2026 13:21:10" {WMEDLEY}HELPSYS.;21 88654
:EDIT-BY rmk
- :CHANGES-TO (FNS CLHS.INDEX)
+ :CHANGES-TO (FNS DOCS.LOOKUP GENERIC.MAN.LOOKUP)
+ (VARS HELPSYSCOMS)
- :PREVIOUS-DATE " 4-May-2025 13:30:47" {WMEDLEY}HELPSYS.;12)
+ :PREVIOUS-DATE " 5-May-2025 22:04:32" {WMEDLEY}HELPSYS.;15)
(PRETTYCOMPRINT HELPSYSCOMS)
@@ -17,7 +18,7 @@
(DECLARE%: EVAL@COMPILE DONTCOPY (FILES (LOADCOMP)
DINFO HASH))
[COMS (COMMANDS "man")
- (FNS HELPSYS IRM.LOOKUP GENERIC.MAN.LOOKUP IRM.SMART.LOOKUP IRM.RESET)
+ (FNS HELPSYS IRM.LOOKUP GENERIC.MAN.LOOKUP IRM.SMART.LOOKUP IRM.RESET DOCS.LOOKUP)
(INITVARS (IRM.HOST&DIR)
(IRM.HASHFILE.NAME))
(GLOBALVARS IRM.HOST&DIR IRM.HASHFILE.NAME)
@@ -161,7 +162,8 @@
NIL])
(GENERIC.MAN.LOOKUP
- [LAMBDA (KEYWORD GRAPH TYPE) (* ; "Edited 27-Aug-2022 12:15 by larry")
+ [LAMBDA (KEYWORD GRAPH TYPE) (* ; "Edited 27-Jan-2026 11:42 by rmk")
+ (* ; "Edited 27-Aug-2022 12:15 by larry")
(* ; "Edited 24-Aug-2022 22:35 by larry")
(* ; "Edited 19-Aug-2022 19:35 by lmm")
(* drc%: " 6-Jan-86 14:50")
@@ -171,7 +173,8 @@
(APPEND (IRM.LOOKUP KEYWORD NIL GRAPH T)
(CLHS.LOOKUP KEYWORD)
- (REPO.LOOKUP KEYWORD))
+ (REPO.LOOKUP KEYWORD)
+ (DOCS.LOOKUP KEYWORD))
elseif (NOT (LITATOM KEYWORD))
then
(* ;; " not a string -- list or number. turn it into a string, removing parens")
@@ -192,7 +195,8 @@
(AND (CL:FIND-SYMBOL KEYWORD "IL")
(IRM.LOOKUP KEYWORD TYPE GRAPH T)))
else (APPEND (IRM.LOOKUP KEYWORD TYPE GRAPH T)
- (REPO.LOOKUP KEYWORD])
+ (REPO.LOOKUP KEYWORD)
+ (DOCS.LOOKUP KEYWORD])
(IRM.SMART.LOOKUP
[LAMBDA (KEYWORD GRAPH) (* drc%: " 6-Jan-86 14:50")
@@ -208,6 +212,15 @@
(CLOSEHASHFILE \IRM.HASHFILE)
(SETQ \IRM.HASHFILE)
(SETQ \IRM.KEYWORDS])
+
+(DOCS.LOOKUP
+ [LAMBDA (KEYWORD) (* ; "Edited 27-Jan-2026 13:20 by rmk")
+ (LET ((DIR (MEDLEYDIR (CONCAT "library/" (L-CASE KEYWORD)
+ "/docs/")
+ NIL NIL T)))
+ (CL:WHEN DIR
+ (ShellOpen (CONCAT "file://" (SLASHIT (TRUEFILENAME DIR)
+ NIL T))))])
)
(RPAQ? IRM.HOST&DIR )
@@ -1703,14 +1716,14 @@
(PUTPROPS HELPSYS FILETYPE :FAKE-COMPILE-FILE)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (4571 10304 (HELPSYS 4581 . 6422) (IRM.LOOKUP 6424 . 8062) (GENERIC.MAN.LOOKUP 8064 .
-9733) (IRM.SMART.LOOKUP 9735 . 9891) (IRM.RESET 9893 . 10302)) (10561 17880 (CLHS.INDEX 10571 . 13535)
- (CLHS.LOOKUP 13537 . 15543) (CLHS.OPENER 15545 . 16868) (REPO.LOOKUP 16870 . 17878)) (70975 72493 (
-IRM.GET.DINFOGRAPH 70985 . 71860) (IRM.DISPLAY.REF 71862 . 72491)) (72495 72857 (IRM.LOAD-GRAPH 72495
- . 72857)) (73182 78686 (IRM.DISPLAY.CREF 73192 . 74906) (IRM.CREF.BOX 74908 . 75735) (IRM.PUT.CREF
-75737 . 75962) (IRM.GET.CREF 75964 . 76335) (IRM.CREF.BUTTONEVENTFN 76337 . 78684)) (79241 87547 (
-\IRM.GET.REF 79251 . 80582) (\IRM.SMART.REF 80584 . 82511) (\IRM.CHOOSE.REF 82513 . 83764) (
-\IRM.WILD.REF 83766 . 85021) (\IRM.WILDCARD 85023 . 85389) (\IRM.WILD.MATCH 85391 . 86621) (
-\IRM.GET.HASHFILE 86623 . 87086) (\IRM.GET.KEYWORDS 87088 . 87545)) (87684 87840 (\IRM.AROUND-EXIT
-87684 . 87840)))))
+ (FILEMAP (NIL (4640 10992 (HELPSYS 4650 . 6491) (IRM.LOOKUP 6493 . 8131) (GENERIC.MAN.LOOKUP 8133 .
+10001) (IRM.SMART.LOOKUP 10003 . 10159) (IRM.RESET 10161 . 10570) (DOCS.LOOKUP 10572 . 10990)) (11249
+18568 (CLHS.INDEX 11259 . 14223) (CLHS.LOOKUP 14225 . 16231) (CLHS.OPENER 16233 . 17556) (REPO.LOOKUP
+17558 . 18566)) (71663 73181 (IRM.GET.DINFOGRAPH 71673 . 72548) (IRM.DISPLAY.REF 72550 . 73179)) (
+73183 73545 (IRM.LOAD-GRAPH 73183 . 73545)) (73870 79374 (IRM.DISPLAY.CREF 73880 . 75594) (
+IRM.CREF.BOX 75596 . 76423) (IRM.PUT.CREF 76425 . 76650) (IRM.GET.CREF 76652 . 77023) (
+IRM.CREF.BUTTONEVENTFN 77025 . 79372)) (79929 88235 (\IRM.GET.REF 79939 . 81270) (\IRM.SMART.REF 81272
+ . 83199) (\IRM.CHOOSE.REF 83201 . 84452) (\IRM.WILD.REF 84454 . 85709) (\IRM.WILDCARD 85711 . 86077)
+(\IRM.WILD.MATCH 86079 . 87309) (\IRM.GET.HASHFILE 87311 . 87774) (\IRM.GET.KEYWORDS 87776 . 88233)) (
+88372 88528 (\IRM.AROUND-EXIT 88372 . 88528)))))
STOP
diff --git a/lispusers/HELPSYS.LCOM b/lispusers/HELPSYS.LCOM
index d7b729ab..8307d3e2 100644
Binary files a/lispusers/HELPSYS.LCOM and b/lispusers/HELPSYS.LCOM differ
diff --git a/lispusers/ISO8859IO b/lispusers/ISO8859IO
index 0c0204ef..da16ac65 100644
--- a/lispusers/ISO8859IO
+++ b/lispusers/ISO8859IO
@@ -1,45 +1,44 @@
-(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10 FORMAT XCCS)
-(FILECREATED " 8-Aug-2021 13:22:31"
-{DSK}kaplan>Local>medley3.5>git-medley>lispusers>ISO8859IO.;18 22218
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
- changes to%: (FNS \8859OUTCHARFN \IBMOUTCHARFN \MACOUTCHARFN)
+(FILECREATED "22-Feb-2026 12:22:12" {WMEDLEY}ISO8859IO.;22 21861
- previous date%: " 6-Aug-2021 16:12:42"
-{DSK}kaplan>Local>medley3.5>git-medley>lispusers>ISO8859IO.;17)
+ :EDIT-BY rmk
+ :CHANGES-TO (FNS ISO1TOMSTRING MTOISO1STRING)
+ (VARS ISO8859IOCOMS)
+
+ :PREVIOUS-DATE " 2-Feb-2026 23:20:20" {WMEDLEY}ISO8859IO.;20)
-(* ; "
-Copyright (c) 1995-1997, 1999, 2021 by Xerox Corporation.
-")
(PRETTYCOMPRINT ISO8859IOCOMS)
(RPAQQ ISO8859IOCOMS
(
- (* ;; "This package defines EXTERNALFORMATS for files that are encoded in either ISO8859/1, the standard IBM extended ascii, or the usual MAC encoding.")
+ (* ;; "This package defines EXTERNALFORMATS for files that are encoded in ISIO8859/1, the standard IBM extended ascii, or the legacy MAC encoding.")
- (COMS (* ; "ISO8859/1")
- (FNS \8859OUTCHARFN \8859INCCODEFN \8859PEEKCCODEFN)
- (GLOBALVARS *XEROXTOISO8859MAP* *ISO8859TOXEROXMAP*)
- (FNS MAKEISOFORMAT)
- (P (MAKEISOFORMAT)))
- (COMS (* ; "IBM-PC Extended Ascii")
+ [COMS (* ; "ISO8859/1")
+ (FNS ISO1TOMCODE MTOISO1CODE \CREATE.ISO1.FORMAT)
+ (FNS ISO1TOMSTRING MTOISO1STRING)
+ (VARS ISO1TOMCCS)
+ (GLOBALVARS ISO1TOMCCS)
+ (DECLARE%: DONTEVAL@LOAD DOCOPY (P (\CREATE.ISO1.FORMAT]
+ (COMS (* ; "IBM-PC Extended Ascii")
(FNS \IBMOUTCHARFN \IBMINCCODEFN \IBMPEEKCCODEFN)
(GLOBALVARS *XEROXTOIBMMAP* *IBMTOXEROXMAP*)
(FNS MAKEIBMFORMAT)
(P (MAKEIBMFORMAT)))
- (COMS (* ; "Macintosh")
+ (COMS (* ; "Macintosh")
(FNS \MACOUTCHARFN \MACINCCODEFN \MACPEEKCCODEFN)
(GLOBALVARS *XEROXTOMACMAP* *MACTOXEROXMAP*)
(FNS MAKEMACFORMAT)
(P (MAKEMACFORMAT)))
- (COMS (* ; "Independent of char encoding")
+ (COMS (* ; "Independent of char encoding")
(FNS \COMMONBACKCCODEFN \MAKERECODEMAP \RECODECCODE))))
(* ;;
-"This package defines EXTERNALFORMATS for files that are encoded in either ISO8859/1, the standard IBM extended ascii, or the usual MAC encoding."
+"This package defines EXTERNALFORMATS for files that are encoded in ISIO8859/1, the standard IBM extended ascii, or the legacy MAC encoding."
)
@@ -49,146 +48,150 @@ Copyright (c) 1995-1997, 1999, 2021 by Xerox Corporation.
(DEFINEQ
-(\8859OUTCHARFN
- [LAMBDA (STREAM CHARCODE)
- (DECLARE (GLOBALVARS *XEROXTOISO8859MAP*)) (* ; "Edited 8-Aug-2021 13:21 by rmk:")
- (* ; "Edited 7-Dec-95 14:34 by ")
- (* ; "Edited 7-Dec-95 14:32 by ")
+(ISO1TOMCODE
+ [LAMBDA (ICODE) (* ; "Edited 5-Feb-2026 12:09 by rmk")
+ (* ; "Edited 2-Feb-2026 23:14 by rmk")
+ (* ; "Edited 7-Sep-2025 22:39 by rmk")
+ (* ; "Edited 3-Sep-2025 10:21 by rmk")
+ (* ; "Edited 7-Aug-2025 09:37 by rmk")
- (* ;; "Converts CHARCODE from internal encoding to ISO8859 before printing.")
+ (* ;; "ISO codes are 8bit, MCODES maybe not. Caller shouldn't pass a fat code.")
- (* ;; "Unconverted codes are left unchanged (no error).")
+ (OR [CAR (find PAIR in ISO1TOMCCS suchthat (EQ ICODE (CADR PAIR]
+ ICODE])
- (* ;; "If any remaining codes are out of charset 0, the streams external format will be used. ")
+(MTOISO1CODE
+ [LAMBDA (MCODE) (* ; "Edited 5-Feb-2026 12:26 by rmk")
+ (* ; "Edited 2-Feb-2026 22:58 by rmk")
+ (OR (CADR (ASSOC MCODE ISO1TOMCCS))
+ MCODE])
- (IF (EQ CHARCODE (CHARCODE EOL))
- THEN (FREPLACE (STREAM CHARPOSITION) OF STREAM WITH 0)
- (\BOUTEOL STREAM)
- ELSE (CHANGE (FFETCH (STREAM CHARPOSITION) OF STREAM)
- (IPLUS16 1 DATUM))
- (\BOUT STREAM (IF (IGREATERP CHARCODE 127)
- THEN
-
- (* ;; "We know that ISO doesn't have floating accents, so only singletons are returned. We also know that it agrees with Xerox on first 128")
-
- (\RECODECCODE CHARCODE *XEROXTOISO8859MAP*)
- ELSE CHARCODE])
-
-(\8859INCCODEFN
- [LAMBDA (STRM COUNTP) (* ; "Edited 6-Aug-2021 16:10 by rmk:")
- (* ; "Edited 7-Dec-95 15:24 by ")
- (* ; "Edited 7-Dec-95 15:19 by ")
- (DECLARE (USEDFREE *BYTECOUNTER*))
- (CL:WHEN COUNTP (SETQ *BYTECOUNTER* 1))
- (\RECODECCODE (\BIN STRM)
- *ISO8859TOXEROXMAP*])
-
-(\8859PEEKCCODEFN
- [LAMBDA (STRM NOERROR) (* ; "Edited 5-May-2021 17:44 by rmk:")
- (* ; "Edited 3-Jan-96 14:21 by ")
- (* ; "Edited 7-Dec-95 15:51 by ")
- (* ; "Edited 7-Dec-95 15:19 by ")
- (\RECODECCODE (\PEEKCCODE STRM NOERROR)
- *ISO8859TOXEROXMAP*])
-)
-(DECLARE%: DOEVAL@COMPILE DONTCOPY
-
-(GLOBALVARS *XEROXTOISO8859MAP* *ISO8859TOXEROXMAP*)
+(\CREATE.ISO1.FORMAT
+ [LAMBDA NIL (* ; "Edited 5-Feb-2026 10:42 by rmk")
+ (* ; "Edited 2-Feb-2026 23:37 by rmk")
+ (* ; "Edited 1-Feb-2026 11:18 by rmk")
+ (* ; "Edited 5-Aug-2021 22:15 by rmk:")
+ (* ; "Edited 9-Mar-99 17:19 by rmk:")
+ (* ; "Edited 7-Dec-95 16:24 by ")
+ (* ; "Edited 7-Dec-95 16:20 by ")
+ (MAKE-EXTERNALFORMAT :ISO8859/1 [FUNCTION (LAMBDA (STREAM COUNTP)
+ (ISO1TOMCODE (\THROUGHIN STREAM COUNTP]
+ [FUNCTION (LAMBDA (STREAM NOERRORFLG)
+ (ISO1TOMCODE (\PEEKBIN STREAM NOERRORFLG]
+ (FUNCTION \THROUGHBACKCCODE)
+ (FUNCTION NILL)
+ (FUNCTION NILL)
+ NIL NIL (FUNCTION MTOISO1STRING)
+ NIL
+ (FUNCTION NILL)
+ (FUNCTION ISO1TOMSTRING])
)
(DEFINEQ
-(MAKEISOFORMAT
- [LAMBDA NIL (* ; "Edited 5-Aug-2021 22:15 by rmk:")
- (* ; "Edited 9-Mar-99 17:19 by rmk:")
- (* ; "Edited 7-Dec-95 16:24 by ")
- (* ; "Edited 7-Dec-95 16:20 by ")
- (LET [(XEROXTOISO '((61217 160)
- (61291 166)
- (8994 168)
- (211 169)
- (227 170)
- (61290 172)
- (61219 173)
- (210 174)
- (9086 175)
- (8999 180)
- (203 184)
- (209 185)
- (235 186)
- (61729 192)
- (61730 193)
- (61731 194)
- (61732 195)
- (61735 196)
- (61736 197)
- (225 198)
- (61741 199)
- (61744 200)
- (61745 201)
- (61746 202)
- (61749 203)
- (61758 204)
- (61759 205)
- (61760 206)
- (61764 207)
- (226 208)
- (61772 209)
- (61775 210)
- (61776 211)
- (61777 212)
- (61778 213)
- (61780 214)
- (180 215)
- (233 216)
- (61791 217)
- (61792 218)
- (61793 219)
- (61797 220)
- (61803 221)
- (236 222)
- (251 223)
- (61857 224)
- (61858 225)
- (61859 226)
- (61860 227)
- (61863 228)
- (61864 229)
- (241 230)
- (61869 231)
- (61872 232)
- (61873 233)
- (61874 234)
- (61877 235)
- (61886 236)
- (61887 237)
- (61888 238)
- (61892 239)
- (243 240)
- (61900 241)
- (61903 242)
- (61904 243)
- (61905 244)
- (61906 245)
- (61908 246)
- (184 247)
- (249 248)
- (61919 249)
- (61920 250)
- (61921 251)
- (61925 252)
- (61931 253)
- (252 254)
- (61933 255)
- (61805 376]
- (SETQ *XEROXTOISO8859MAP* (\MAKERECODEMAP XEROXTOISO))
- (SETQ *ISO8859TOXEROXMAP* (\MAKERECODEMAP XEROXTOISO T)))
- (MAKE-EXTERNALFORMAT :ISO8859/1 (FUNCTION \8859INCCODEFN)
- (FUNCTION \8859PEEKCCODEFN)
- (FUNCTION \COMMONBACKCCODEFN)
- (FUNCTION \8859OUTCHARFN])
+(ISO1TOMSTRING
+ [LAMBDA (ISTRING DESTRUCTIVE) (* ; "Edited 22-Feb-2026 12:21 by rmk")
+ (* ; "Edited 5-Feb-2026 11:01 by rmk")
+ (* ; "Edited 2-Feb-2026 23:46 by rmk")
+ (* ; "Edited 2-Sep-2025 12:14 by rmk")
+ (* ; "Edited 29-Apr-2025 13:08 by rmk")
+
+ (* ;; "Converts ISO8859/1 codes to MCCS codes in MSTRING.")
+
+ (for I ICODE (MSTRING _ (CL:IF DESTRUCTIVE
+ ISTRING
+ (CONCAT ISTRING))) from 1 while (SETQ ICODE (NTHCHARCODE ISTRING I))
+ do (RPLCHARCODE MSTRING I (ISO1TOMCODE ICODE)) finally (RETURN MSTRING])
+
+(MTOISO1STRING
+ [LAMBDA (MSTRING DESTRUCTIVE) (* ; "Edited 22-Feb-2026 12:22 by rmk")
+ (* ; "Edited 2-Feb-2026 23:47 by rmk")
+ (* ; "Edited 2-Sep-2025 12:22 by rmk")
+ (* ; "Edited 29-Apr-2025 13:08 by rmk")
+
+ (* ;; "Converts MCCS to ISO8859/1 codes in MSTRING.")
+
+ (for I MCODE (ISTRING _ (CL:IF DESTRUCTIVE
+ MSTRING
+ (CONCAT MSTRING))) from 1 while (SETQ MCODE (NTHCHARCODE MSTRING I))
+ do (RPLCHARCODE ISTRING I (MTOISO1CODE MCODE)) finally (RETURN ISTRING])
)
-(MAKEISOFORMAT)
+(RPAQQ ISO1TOMCCS
+ ((94 8593)
+ (95 8592)
+ (169 8216)
+ (170 8220)
+ (172 95)
+ (173 94)
+ (174 8594)
+ (175 8595)
+ (180 215)
+ (184 247)
+ (185 8217)
+ (186 8221)
+ (193 768)
+ (194 769)
+ (195 770)
+ (196 771)
+ (197 772)
+ (198 774)
+ (199 775)
+ (200 776)
+ (202 778)
+ (203 807)
+ (204 818)
+ (205 779)
+ (206 808)
+ (207 780)
+ (208 8213)
+ (209 185)
+ (210 174)
+ (211 169)
+ (212 8482)
+ (213 9834)
+ (220 8539)
+ (221 8540)
+ (222 8541)
+ (223 8542)
+ (224 8486)
+ (225 198)
+ (226 208)
+ (227 170)
+ (228 294)
+ (229 567)
+ (230 306)
+ (231 319)
+ (232 321)
+ (233 216)
+ (234 338)
+ (235 186)
+ (236 222)
+ (237 358)
+ (238 330)
+ (239 329)
+ (240 312)
+ (241 230)
+ (242 273)
+ (243 240)
+ (244 295)
+ (245 305)
+ (246 307)
+ (247 320)
+ (248 322)
+ (249 248)
+ (250 339)
+ (251 223)
+ (252 254)
+ (253 359)
+ (254 331)))
+(DECLARE%: DOEVAL@COMPILE DONTCOPY
+
+(GLOBALVARS ISO1TOMCCS)
+)
+(DECLARE%: DONTEVAL@LOAD DOCOPY
+
+(\CREATE.ISO1.FORMAT)
+)
@@ -515,26 +518,28 @@ Copyright (c) 1995-1997, 1999, 2021 by Xerox Corporation.
T)])
(\MAKERECODEMAP
- [LAMBDA (CODEMAP INVERTED) (* ; "Edited 9-Mar-99 17:23 by rmk:")
+ [LAMBDA (CODEMAP INVERTED) (* ; "Edited 1-Feb-2026 13:03 by rmk")
+ (* ; "Edited 9-Mar-99 17:23 by rmk:")
- (* ;; "Produces a map array for use by \RECODECCODE. The map array is a 256-array of either NIL or 256-arrays, so that space isn't allocated for widely separated codes.")
+ (* ;; "Produces a map array for use by \RECODECCODE. The map array is a 256-array of either NIL or 256-arrays, so that space isn't allocated for widely separated codes.")
(DECLARE (USEDFREE FASTRECODEMAPCACHE))
(CL:WHEN INVERTED
[SETQ CODEMAP (FOR C IN CODEMAP COLLECT (LIST (CADR C)
- (CAR C])
- (FOR M (MAPARRAY _ (CL:MAKE-ARRAY 256 :INITIAL-ELEMENT NIL))
- CSMAP IN CODEMAP UNLESS (EQ (CAR M)
- (CADR M))
- DO (CL:UNLESS (SETQ CSMAP (CL:SVREF MAPARRAY (LRSH (CAR M)
- 8)))
- (SETQ CSMAP (CL:MAKE-ARRAY 256 :INITIAL-ELEMENT NIL))
- (CL:SETF (CL:SVREF MAPARRAY (LRSH (CAR M)
- 8))
- CSMAP))
- (CL:SETF (CL:SVREF CSMAP (LOGAND (CAR M)
- 255))
- (CADR M)) FINALLY (RETURN MAPARRAY])
+ (CAR C])
+ (FOR M LEFT RIGHT (MAPARRAY ¬ (CL:MAKE-ARRAY 256 :INITIAL-ELEMENT NIL))
+ CSMAP IN CODEMAP eachtime (SETQ LEFT (CAR M))
+ (SETQ RIGHT (CADR M))
+ (CL:UNLESS (CHARCODEP LEFT)
+ (SETQ LEFT (CHARCODE.DECODE LEFT)))
+ (CL:UNLESS (CHARCODEP RIGHT)
+ (SETQ RIGHT (CHARCODE.DECODE RIGHT)))
+ UNLESS (EQ LEFT RIGHT) DO (CL:UNLESS (SETQ CSMAP (CL:SVREF MAPARRAY (LRSH LEFT 8)))
+ (SETQ CSMAP (CL:MAKE-ARRAY 256 :INITIAL-ELEMENT NIL))
+ (CL:SETF (CL:SVREF MAPARRAY (LRSH LEFT 8))
+ CSMAP))
+ (CL:SETF (CL:SVREF CSMAP (LOGAND LEFT 255))
+ RIGHT) FINALLY (RETURN MAPARRAY])
(\RECODECCODE
[LAMBDA (CODE MAPARRAY) (* ; "Edited 9-Mar-99 17:28 by rmk:")
@@ -546,12 +551,11 @@ Copyright (c) 1995-1997, 1999, 2021 by Xerox Corporation.
(OR (AND CSMAP (CL:SVREF CSMAP (LOGAND CODE 255)))
CODE])
)
-(PUTPROPS ISO8859IO COPYRIGHT ("Xerox Corporation" 1995 1996 1997 1999 2021))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (1909 4233 (\8859OUTCHARFN 1919 . 3222) (\8859INCCODEFN 3224 . 3710) (\8859PEEKCCODEFN
-3712 . 4231)) (4325 7866 (MAKEISOFORMAT 4335 . 7864)) (7926 9844 (\IBMOUTCHARFN 7936 . 8739) (
-\IBMINCCODEFN 8741 . 9222) (\IBMPEEKCCODEFN 9224 . 9842)) (9928 13459 (MAKEIBMFORMAT 9938 . 13457)) (
-13507 15354 (\MACOUTCHARFN 13517 . 14574) (\MACINCCODEFN 14576 . 14940) (\MACPEEKCCODEFN 14942 . 15352
-)) (15438 19991 (MAKEMACFORMAT 15448 . 19989)) (20058 22117 (\COMMONBACKCCODEFN 20068 . 20438) (
-\MAKERECODEMAP 20440 . 21670) (\RECODECCODE 21672 . 22115)))))
+ (FILEMAP (NIL (1834 4154 (ISO1TOMCODE 1844 . 2593) (MTOISO1CODE 2595 . 2885) (\CREATE.ISO1.FORMAT 2887
+ . 4152)) (4155 5904 (ISO1TOMSTRING 4165 . 5090) (MTOISO1STRING 5092 . 5902)) (7310 9228 (
+\IBMOUTCHARFN 7320 . 8123) (\IBMINCCODEFN 8125 . 8606) (\IBMPEEKCCODEFN 8608 . 9226)) (9312 12843 (
+MAKEIBMFORMAT 9322 . 12841)) (12891 14738 (\MACOUTCHARFN 12901 . 13958) (\MACINCCODEFN 13960 . 14324)
+(\MACPEEKCCODEFN 14326 . 14736)) (14822 19375 (MAKEMACFORMAT 14832 . 19373)) (19442 21838 (
+\COMMONBACKCCODEFN 19452 . 19822) (\MAKERECODEMAP 19824 . 21391) (\RECODECCODE 21393 . 21836)))))
STOP
diff --git a/lispusers/ISO8859IO.LCOM b/lispusers/ISO8859IO.LCOM
index ac6c89f1..7db674a3 100644
Binary files a/lispusers/ISO8859IO.LCOM and b/lispusers/ISO8859IO.LCOM differ
diff --git a/lispusers/LAMBDATRAN b/lispusers/LAMBDATRAN
index 69e9672e..98ce0d57 100644
--- a/lispusers/LAMBDATRAN
+++ b/lispusers/LAMBDATRAN
@@ -1,41 +1,38 @@
-(DEFINE-FILE-INFO §READTABLE "INTERLISP" §PACKAGE "INTERLISP")
-(FILECREATED "19-Feb-87 10:40:43" {QV}PARSER>NEXT>LAMBDATRAN.;2 9556
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
- changes to%: (FNS FNTYP1 LTDWIMUSERFN LTSTKNAME NARGS)
+(FILECREATED "18-Feb-2026 16:30:17" {WMEDLEY}LAMBDATRAN.;2 9157
- previous date%: "19-Feb-87 09:56:18" {QV}PARSER>NEXT>LAMBDATRAN.;1)
+ :EDIT-BY rmk
+ :PREVIOUS-DATE "19-Feb-87 10:40:43" {WMEDLEY}LAMBDATRAN.;1)
-(* "
-Copyright (c) 1984, 1987 by Xerox Corporation. All rights reserved.
-")
(PRETTYCOMPRINT LAMBDATRANCOMS)
-(RPAQQ LAMBDATRANCOMS [(* Translation machinery for new LAMBDA words)
- (LOCALVARS . T)
- [DECLARE%: FIRST (P (VIRGINFN 'ARGLIST T)
- (MOVD? 'ARGLIST 'OLDARGLIST)
- (VIRGINFN 'NARGS T)
- (MOVD? 'NARGS 'OLDNARGS)
- (VIRGINFN 'ARGTYPE T)
- (MOVD? 'ARGTYPE 'OLDARGTYPE)
- (MOVD? 'NILL 'LTDWIMUSERFN]
- (FNS ARGLIST ARGTYPE FNTYP1 LTDWIMUSERFN LTSTKNAME NARGS)
- (ADDVARS (DWIMUSERFORMS (LTDWIMUSERFN)))
- (PROP VARTYPE LAMBDATRANFNS)
- (ALISTS (LAMBDATRANFNS))
- (PROP MACRO LTSTKNAME)
- (P (PUTHASH 'LTSTKNAME '(NIL) MSTEMPLATES))
- (P (RELINK 'WORLD))
- (DECLARE%: EVAL@COMPILE DONTCOPY (P (RESETSAVE DWIMIFYCOMPFLG T))
- (GLOBALVARS CLISPARRAY COMMENTFLG LAMBDASPLST LAMBDATRANFNS BOUNDPDUMMY
- ))
- (DECLARE%: DONTCOPY (RECORDS LAMBDAWORD))
- (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS
- (ADDVARS (NLAMA)
- (NLAML LTSTKNAME)
- (LAMA])
+(RPAQQ LAMBDATRANCOMS
+ [(* Translation machinery for new LAMBDA words)
+ (LOCALVARS . T)
+ [DECLARE%: FIRST (P (VIRGINFN 'ARGLIST T)
+ (MOVD? 'ARGLIST 'OLDARGLIST)
+ (VIRGINFN 'NARGS T)
+ (MOVD? 'NARGS 'OLDNARGS)
+ (VIRGINFN 'ARGTYPE T)
+ (MOVD? 'ARGTYPE 'OLDARGTYPE)
+ (MOVD? 'NILL 'LTDWIMUSERFN]
+ (FNS ARGLIST ARGTYPE FNTYP1 LTDWIMUSERFN LTSTKNAME NARGS)
+ (ADDVARS (DWIMUSERFORMS (LTDWIMUSERFN)))
+ (PROP VARTYPE LAMBDATRANFNS)
+ (ALISTS (LAMBDATRANFNS))
+ (PROP MACRO LTSTKNAME)
+ (P (PUTHASH 'LTSTKNAME '(NIL)
+ MSTEMPLATES))
+ (P (RELINK 'WORLD))
+ (DECLARE%: EVAL@COMPILE DONTCOPY (P (RESETSAVE DWIMIFYCOMPFLG T))
+ (GLOBALVARS CLISPARRAY COMMENTFLG LAMBDASPLST LAMBDATRANFNS BOUNDPDUMMY))
+ (DECLARE%: DONTCOPY (RECORDS LAMBDAWORD))
+ (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA)
+ (NLAML LTSTKNAME)
+ (LAMA])
@@ -46,12 +43,19 @@ Copyright (c) 1984, 1987 by Xerox Corporation. All rights reserved.
(LOCALVARS . T)
)
(DECLARE%: FIRST
+
(VIRGINFN 'ARGLIST T)
+
(MOVD? 'ARGLIST 'OLDARGLIST)
+
(VIRGINFN 'NARGS T)
+
(MOVD? 'NARGS 'OLDNARGS)
+
(VIRGINFN 'ARGTYPE T)
+
(MOVD? 'ARGTYPE 'OLDARGTYPE)
+
(MOVD? 'NILL 'LTDWIMUSERFN)
)
(DEFINEQ
@@ -190,14 +194,18 @@ Copyright (c) 1984, 1987 by Xerox Corporation. All rights reserved.
(ADDTOVAR DWIMUSERFORMS (LTDWIMUSERFN))
-(PUTPROPS LAMBDATRANFNS VARTYPE ALIST)
+(PUTPROPS LAMBDATRANFNS VARTYPE ALIST)
(ADDTOVAR LAMBDATRANFNS )
-(PUTPROPS LTSTKNAME MACRO (X (CONS COMMENTFLG X)))
-(PUTHASH 'LTSTKNAME '(NIL) MSTEMPLATES)
+(PUTPROPS LTSTKNAME MACRO (X (CONS COMMENTFLG X)))
+
+(PUTHASH 'LTSTKNAME '(NIL)
+ MSTEMPLATES)
+
(RELINK 'WORLD)
(DECLARE%: EVAL@COMPILE DONTCOPY
+
(RESETSAVE DWIMIFYCOMPFLG T)
(DECLARE%: DOEVAL@COMPILE DONTCOPY
@@ -219,8 +227,7 @@ Copyright (c) 1984, 1987 by Xerox Corporation. All rights reserved.
(ADDTOVAR LAMA )
)
-(PUTPROPS LAMBDATRAN COPYRIGHT ("Xerox Corporation" 1984 1987))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (2224 8821 (ARGLIST 2234 . 3188) (ARGTYPE 3190 . 3544) (FNTYP1 3546 . 4455) (
-LTDWIMUSERFN 4457 . 7957) (LTSTKNAME 7959 . 8483) (NARGS 8485 . 8819)))))
+ (FILEMAP (NIL (1871 8468 (ARGLIST 1881 . 2835) (ARGTYPE 2837 . 3191) (FNTYP1 3193 . 4102) (
+LTDWIMUSERFN 4104 . 7604) (LTSTKNAME 7606 . 8130) (NARGS 8132 . 8466)))))
STOP
diff --git a/lispusers/LAMBDATRAN.LCOM b/lispusers/LAMBDATRAN.LCOM
index 2c586bd0..f11cf025 100644
Binary files a/lispusers/LAMBDATRAN.LCOM and b/lispusers/LAMBDATRAN.LCOM differ
diff --git a/lispusers/LAYOUT-SEDIT b/lispusers/LAYOUT-SEDIT
index 691b0076..705a6a3b 100644
--- a/lispusers/LAYOUT-SEDIT
+++ b/lispusers/LAYOUT-SEDIT
@@ -1,128 +1,127 @@
-(DEFINE-FILE-INFO §READTABLE "XCL" §PACKAGE (DEFPACKAGE "LAYOUT-SEDIT" (§NICKNAMES "L-S")))
-(il:filecreated " 9-Jan-87 19:55:25" il:{eris}lispcore>layout-sedit.\;2 7190
+(DEFINE-FILE-INFO PACKAGE (DEFPACKAGE "LAYOUT-SEDIT" (NICKNAMES "L-S")) READTABLE "XCL" BASE 10)
- il:|changes| il:|to:| (il:variables user::*l-s-region-zero* user::*l-s-region-delta*
- user::*l-s-reuse-earlier-regions*)
- (il:functions get-region save-region user::use-l-s-regions
- user::stop-using-l-s-regions)
- (il:vars il:layout-seditcoms)
+(IL:FILECREATED "18-Feb-2026 16:36:18" IL:|{WMEDLEY}LAYOUT-SEDIT.;2| 5714
- il:|previous| il:|date:| "26-Dec-86 19:42:46" il:{eris}lisp>layout-sedit.\;2)
+ :EDIT-BY IL:|rmk|
+
+ :CHANGES-TO (IL:VARS IL:LAYOUT-SEDITCOMS)
+ (IL:VARIABLES *REGION-ALIST* USER::*L-S-REGION-ZERO* USER::*L-S-REGION-DELTA*
+ USER::*L-S-REUSE-EARLIER-REGIONS*)
+ (IL:FUNCTIONS USER::USE-L-S-REGIONS USER::STOP-USING-L-S-REGIONS REGION-PLUS
+ GET-REGION SAVE-REGION)
+
+ :PREVIOUS-DATE " 9-Jan-87 19:55:25" IL:|{WMEDLEY}LAYOUT-SEDIT.;1|)
-; Copyright (c) 1986, 1987 by Pavel Curtis. All rights reserved.
+(IL:PRETTYCOMPRINT IL:LAYOUT-SEDITCOMS)
-(il:prettycomprint il:layout-seditcoms)
+(IL:RPAQQ IL:LAYOUT-SEDITCOMS
+ ((IL:FUNCTIONS USER::USE-L-S-REGIONS USER::STOP-USING-L-S-REGIONS)
+ (IL:VARIABLES *REGION-ALIST* USER::*L-S-REGION-ZERO* USER::*L-S-REGION-DELTA*
+ USER::*L-S-REUSE-EARLIER-REGIONS*)
+ (IL:FUNCTIONS REGION-PLUS)
+ (IL:FUNCTIONS GET-REGION SAVE-REGION)
+ (IL:DECLARE\: IL:DONTEVAL@LOAD IL:DONTEVAL@COMPILE IL:DOCOPY (IL:P (USER::USE-L-S-REGIONS)
+ ))
+
+ (IL:* IL:|;;| "Arrange to use the proper compiler and makefile environment ")
-(il:rpaqq il:layout-seditcoms ((il:functions user::use-l-s-regions user::stop-using-l-s-regions)
- (il:variables *region-alist* user::*l-s-region-zero*
- user::*l-s-region-delta* user::*l-s-reuse-earlier-regions*)
- (il:functions region-plus)
- (il:functions get-region save-region)
- (il:declare\: il:donteval@load il:donteval@compile il:docopy
- (il:p (user::use-l-s-regions)))
- (il:* il:|;;|
- "Arrange to use the proper compiler and makefile environment ")
- (il:prop (il:filetype il:makefile-environment)
- il:layout-sedit)))
+ (IL:PROP (IL:FILETYPE IL:MAKEFILE-ENVIRONMENT)
+ IL:LAYOUT-SEDIT)))
-(defun user::use-l-s-regions nil (assert (null il:|\\\\contexts|)
- nil "Close all open SEdit windows")
- (il:sedit.reset)
- (il:movd 'il:sedit.get.window.region 'old-get-region)
- (il:movd 'il:sedit.save.window.region 'old-save-region)
- (il:movd 'get-region 'il:sedit.get.window.region)
- (il:movd 'save-region 'il:sedit.save.window.region))
+(DEFUN USER::USE-L-S-REGIONS ()
+ (ASSERT (NULL IL:|\\\\contexts|)
+ NIL "Close all open SEdit windows")
+ (IL:SEDIT.RESET)
+ (IL:MOVD 'IL:SEDIT.GET.WINDOW.REGION 'OLD-GET-REGION)
+ (IL:MOVD 'IL:SEDIT.SAVE.WINDOW.REGION 'OLD-SAVE-REGION)
+ (IL:MOVD 'GET-REGION 'IL:SEDIT.GET.WINDOW.REGION)
+ (IL:MOVD 'SAVE-REGION 'IL:SEDIT.SAVE.WINDOW.REGION))
+(DEFUN USER::STOP-USING-L-S-REGIONS ()
+ (ASSERT (NULL IL:|\\\\contexts|)
+ NIL "Close all open SEdit windows")
+ (IL:SEDIT.RESET)
+ (IL:MOVD 'OLD-GET-REGION 'IL:SEDIT.GET.WINDOW.REGION)
+ (IL:MOVD 'OLD-SAVE-REGION 'IL:SEDIT.SAVE.WINDOW.REGION))
-(defun user::stop-using-l-s-regions nil (assert (null il:|\\\\contexts|)
- nil "Close all open SEdit windows")
- (il:sedit.reset)
- (il:movd 'old-get-region 'il:sedit.get.window.region)
- (il:movd 'old-save-region 'il:sedit.save.window.region))
+(DEFVAR *REGION-ALIST* NIL
+(IL:* IL:|;;;| "An AList mapping a region to the SEdit context that currently owns it. The associations of regions no longer in use should have a CDR of NIL. The list is kept in reverse order, with the farthest region from *REGION-ZERO* at the front of the list. So as to allow experimentation by users, we maintain the invariant that the first association on the list never has a CDR of NIL. To reestablish that invariant, we sometimes POP the AList rather than set the CDR to NIL.")
-(defvar *region-alist* nil
+ )
-(il:* il:|;;;| "An AList mapping a region to the SEdit context that currently owns it. The associations of regions no longer in use should have a CDR of NIL. The list is kept in reverse order, with the farthest region from *REGION-ZERO* at the front of the list. So as to allow experimentation by users, we maintain the invariant that the first association on the list never has a CDR of NIL. To reestablish that invariant, we sometimes POP the AList rather than set the CDR to NIL.")
-)
-
-
-(defvar user::*l-s-region-zero* (il:createregion 25 (- (truncate il:screenheight 2)
+(DEFVAR USER::*L-S-REGION-ZERO* (IL:CREATEREGION 25 (- (TRUNCATE IL:SCREENHEIGHT 2)
19)
- (truncate il:screenwidth 2)
- (truncate il:screenheight 2))
+ (TRUNCATE IL:SCREENWIDTH 2)
+ (TRUNCATE IL:SCREENHEIGHT 2))
-(il:* il:|;;;| "The region to be used by the first SEdit window. This works in conjunction with USER::*L-S-REGION-DELTA* to specify the region for each new SEdit window.")
- )
+(IL:* IL:|;;;| "The region to be used by the first SEdit window. This works in conjunction with USER::*L-S-REGION-DELTA* to specify the region for each new SEdit window.")
+ )
-(defvar user::*l-s-region-delta* (il:createregion 11 -44 0 0) )
+(DEFVAR USER::*L-S-REGION-DELTA* (IL:CREATEREGION 11 -44 0 0))
+(DEFVAR USER::*L-S-REUSE-EARLIER-REGIONS* NIL
-(defvar user::*l-s-reuse-earlier-regions* nil
+(IL:* IL:|;;;| "If non-NIL, then earlier regions (i.e., those closer to USER::*L-S-REGION-ZERO* will get reused when free. Otherwise, new regions, farther from USER::*L-S-REGION-ZERO* than any currently in use, will be created.")
-(il:* il:|;;;| "If non-NIL, then earlier regions (i.e., those closer to USER::*L-S-REGION-ZERO* will get reused when free. Otherwise, new regions, farther from USER::*L-S-REGION-ZERO* than any currently in use, will be created.")
-)
+ )
+(DEFUN REGION-PLUS (ONE TWO)
+ (IL:CREATEREGION (+ (IL:FETCH (IL:REGION IL:LEFT) IL:OF ONE)
+ (IL:FETCH (IL:REGION IL:LEFT) IL:OF TWO))
+ (+ (IL:FETCH (IL:REGION IL:BOTTOM) IL:OF ONE)
+ (IL:FETCH (IL:REGION IL:BOTTOM) IL:OF TWO))
+ (+ (IL:FETCH (IL:REGION IL:WIDTH) IL:OF ONE)
+ (IL:FETCH (IL:REGION IL:WIDTH) IL:OF TWO))
+ (+ (IL:FETCH (IL:REGION IL:HEIGHT) IL:OF ONE)
+ (IL:FETCH (IL:REGION IL:HEIGHT) IL:OF TWO))))
-(defun region-plus (one two) (il:createregion (+ (il:fetch (il:region il:left) il:of one)
- (il:fetch (il:region il:left) il:of two))
- (+ (il:fetch (il:region il:bottom) il:of one)
- (il:fetch (il:region il:bottom) il:of two))
- (+ (il:fetch (il:region il:width) il:of one)
- (il:fetch (il:region il:width) il:of two))
- (+ (il:fetch (il:region il:height) il:of one)
- (il:fetch (il:region il:height) il:of two))))
+(DEFUN GET-REGION (CONTEXT)
+ (LET ((PAIR (AND USER::*L-S-REUSE-EARLIER-REGIONS* (FIND NIL *REGION-ALIST* :KEY 'CDR))))
+ (COND
+ ((NULL PAIR)
+ (COND
+ ((NULL *REGION-ALIST*)
+ (SETQ *REGION-ALIST* (LIST (CONS USER::*L-S-REGION-ZERO* CONTEXT)))
+ USER::*L-S-REGION-ZERO*)
+ (T (LET ((NEW-REGION (REGION-PLUS (CAR (FIRST *REGION-ALIST*))
+ USER::*L-S-REGION-DELTA*)))
+ (PUSH (CONS NEW-REGION CONTEXT)
+ *REGION-ALIST*)
+ NEW-REGION))))
+ (T (SETF (CDR PAIR)
+ CONTEXT)
+ (CAR PAIR)))))
+(DEFUN SAVE-REGION (CONTEXT)
-(defun get-region (context) (let ((pair (and user::*l-s-reuse-earlier-regions* (find nil
- *region-alist*
- :key
- 'cdr))))
- (cond
- ((null pair)
- (cond
- ((null *region-alist*)
- (setq *region-alist* (list (cons user::*l-s-region-zero*
- context)))
- user::*l-s-region-zero*)
- (t (let ((new-region (region-plus (car (first *region-alist*)
- )
- user::*l-s-region-delta*)))
- (push (cons new-region context)
- *region-alist*)
- new-region))))
- (t (setf (cdr pair)
- context)
- (car pair)))))
+(IL:* IL:|;;;| "The context is done with its region. Deallocate it.")
+ (LET ((PAIR (FIND CONTEXT *REGION-ALIST* :KEY 'CDR)))
+ (IF (NULL PAIR)
+ (WARN "An SEdit context is trying to give up an unallocated region.")
+ (SETF (CDR PAIR)
+ NIL))
+ (SETQ *REGION-ALIST* (MEMBER-IF-NOT 'NULL *REGION-ALIST* :KEY 'CDR))))
+(IL:DECLARE\: IL:DONTEVAL@LOAD IL:DONTEVAL@COMPILE IL:DOCOPY
-(defun save-region (context)
-
-(il:* il:|;;;| "The context is done with its region. Deallocate it.")
- (let ((pair (find context *region-alist* :key 'cdr)))
- (if (null pair)
- (warn "An SEdit context is trying to give up an unallocated region.")
- (setf (cdr pair)
- nil))
- (setq *region-alist* (member-if-not 'null *region-alist* :key 'cdr))))
-
-(il:declare\: il:donteval@load il:donteval@compile il:docopy
-(user::use-l-s-regions)
+(USER::USE-L-S-REGIONS)
)
-(il:* il:|;;| "Arrange to use the proper compiler and makefile environment ")
+(IL:* IL:|;;| "Arrange to use the proper compiler and makefile environment ")
-(il:putprops il:layout-sedit il:filetype compile-file)
+(IL:PUTPROPS IL:LAYOUT-SEDIT IL:FILETYPE COMPILE-FILE)
-(il:putprops il:layout-sedit il:makefile-environment (:readtable "XCL" :package (xcl:defpackage
+(IL:PUTPROPS IL:LAYOUT-SEDIT IL:MAKEFILE-ENVIRONMENT (:READTABLE "XCL" :PACKAGE (XCL:DEFPACKAGE
"LAYOUT-SEDIT"
- (:nicknames "L-S"))))
-(il:putprops il:layout-sedit il:copyright ("Pavel Curtis" 1986 1987))
-(il:declare\: il:dontcopy
- (il:filemap (nil)))
-il:stop
+ (:NICKNAMES "L-S"))))
+(IL:DECLARE\: IL:DONTCOPY
+ (IL:FILEMAP (NIL (1426 1788 (USER::USE-L-S-REGIONS 1426 . 1788)) (1790 2051 (USER::STOP-USING-L-S-REGIONS
+ 1790 . 2051)) (3443 4007 (REGION-PLUS 3443 . 4007)) (4009 4732 (GET-REGION 4009 . 4732)) (4734 5138 (
+SAVE-REGION 4734 . 5138)))))
+IL:STOP
diff --git a/lispusers/LAYOUT-SEDIT.LCOM b/lispusers/LAYOUT-SEDIT.LCOM
index b129cec6..d3524c3f 100644
--- a/lispusers/LAYOUT-SEDIT.LCOM
+++ b/lispusers/LAYOUT-SEDIT.LCOM
@@ -1 +1,52 @@
-(DEFINE-FILE-INFO READTABLE "XCL" PACKAGE (DEFPACKAGE "LAYOUT-SEDIT" (NICKNAMES "L-S")))
(IL:FILECREATED " 9-Sep-94 13:47:35" ("compiled on " IL:|{DSK}lispusers>LAYOUT-SEDIT.;1|)
"28-Jul-94 17:28:46" IL:|bcompl'd| IL:|in| "Medley 25-Aug-94 ..." IL:|dated| "25-Aug-94 10:02:49")
(IL:FILECREATED " 9-Jan-87 19:55:25" IL:{ERIS}LISPCORE>LAYOUT-SEDIT.\;2 7190 IL:|changes|
IL:|to:| (IL:VARIABLES USER::*L-S-REGION-ZERO* USER::*L-S-REGION-DELTA* USER::*L-S-REUSE-EARLIER-REGIONS*
) (IL:FUNCTIONS GET-REGION SAVE-REGION USER::USE-L-S-REGIONS USER::STOP-USING-L-S-REGIONS) (IL:VARS
IL:LAYOUT-SEDITCOMS) IL:|previous| IL:|date:| "26-Dec-86 19:42:46" IL:{ERIS}LISP>LAYOUT-SEDIT.\;2
)
(IL:PRETTYCOMPRINT IL:LAYOUT-SEDITCOMS)
(IL:RPAQQ IL:LAYOUT-SEDITCOMS ((IL:FUNCTIONS USER::USE-L-S-REGIONS USER::STOP-USING-L-S-REGIONS) (
IL:VARIABLES *REGION-ALIST* USER::*L-S-REGION-ZERO* USER::*L-S-REGION-DELTA*
USER::*L-S-REUSE-EARLIER-REGIONS*) (IL:FUNCTIONS REGION-PLUS) (IL:FUNCTIONS GET-REGION SAVE-REGION) (
IL:DECLARE\: IL:DONTEVAL@LOAD IL:DONTEVAL@COMPILE IL:DOCOPY (IL:P (USER::USE-L-S-REGIONS))) (IL:*
IL:|;;| "Arrange to use the proper compiler and makefile environment ") (IL:PROP (IL:FILETYPE
IL:MAKEFILE-ENVIRONMENT) IL:LAYOUT-SEDIT)))
(DEFUN USER::USE-L-S-REGIONS NIL (ASSERT (NULL IL:|\\\\contexts|) NIL "Close all open SEdit windows")
(IL:SEDIT.RESET) (IL:MOVD (QUOTE IL:SEDIT.GET.WINDOW.REGION) (QUOTE OLD-GET-REGION)) (IL:MOVD (QUOTE
IL:SEDIT.SAVE.WINDOW.REGION) (QUOTE OLD-SAVE-REGION)) (IL:MOVD (QUOTE GET-REGION) (QUOTE
IL:SEDIT.GET.WINDOW.REGION)) (IL:MOVD (QUOTE SAVE-REGION) (QUOTE IL:SEDIT.SAVE.WINDOW.REGION)))
(DEFUN USER::STOP-USING-L-S-REGIONS NIL (ASSERT (NULL IL:|\\\\contexts|) NIL
"Close all open SEdit windows") (IL:SEDIT.RESET) (IL:MOVD (QUOTE OLD-GET-REGION) (QUOTE
IL:SEDIT.GET.WINDOW.REGION)) (IL:MOVD (QUOTE OLD-SAVE-REGION) (QUOTE IL:SEDIT.SAVE.WINDOW.REGION)))
(DEFVAR *REGION-ALIST* NIL (IL:* IL:|;;;|
"An AList mapping a region to the SEdit context that currently owns it. The associations of regions no longer in use should have a CDR of NIL. The list is kept in reverse order, with the farthest region from *REGION-ZERO* at the front of the list. So as to allow experimentation by users, we maintain the invariant that the first association on the list never has a CDR of NIL. To reestablish that invariant, we sometimes POP the AList rather than set the CDR to NIL."
))
(DEFVAR USER::*L-S-REGION-ZERO* (IL:CREATEREGION 25 (- (TRUNCATE IL:SCREENHEIGHT 2) 19) (TRUNCATE
IL:SCREENWIDTH 2) (TRUNCATE IL:SCREENHEIGHT 2)) (IL:* IL:|;;;|
"The region to be used by the first SEdit window. This works in conjunction with USER::*L-S-REGION-DELTA* to specify the region for each new SEdit window."
))
(DEFVAR USER::*L-S-REGION-DELTA* (IL:CREATEREGION 11 -44 0 0))
(DEFVAR USER::*L-S-REUSE-EARLIER-REGIONS* NIL (IL:* IL:|;;;|
"If non-NIL, then earlier regions (i.e., those closer to USER::*L-S-REGION-ZERO* will get reused when free. Otherwise, new regions, farther from USER::*L-S-REGION-ZERO* than any currently in use, will be created."
))
(DEFUN REGION-PLUS (ONE TWO) (IL:CREATEREGION (+ (IL:FETCH (IL:REGION IL:LEFT) IL:OF ONE) (IL:FETCH (
IL:REGION IL:LEFT) IL:OF TWO)) (+ (IL:FETCH (IL:REGION IL:BOTTOM) IL:OF ONE) (IL:FETCH (IL:REGION
IL:BOTTOM) IL:OF TWO)) (+ (IL:FETCH (IL:REGION IL:WIDTH) IL:OF ONE) (IL:FETCH (IL:REGION IL:WIDTH) IL:OF
TWO)) (+ (IL:FETCH (IL:REGION IL:HEIGHT) IL:OF ONE) (IL:FETCH (IL:REGION IL:HEIGHT) IL:OF TWO))))
(DEFUN GET-REGION (CONTEXT) (LET ((PAIR (AND USER::*L-S-REUSE-EARLIER-REGIONS* (FIND NIL
*REGION-ALIST* :KEY (QUOTE CDR))))) (COND ((NULL PAIR) (COND ((NULL *REGION-ALIST*) (SETQ
*REGION-ALIST* (LIST (CONS USER::*L-S-REGION-ZERO* CONTEXT))) USER::*L-S-REGION-ZERO*) (T (LET ((
NEW-REGION (REGION-PLUS (CAR (FIRST *REGION-ALIST*)) USER::*L-S-REGION-DELTA*))) (PUSH (CONS
NEW-REGION CONTEXT) *REGION-ALIST*) NEW-REGION)))) (T (SETF (CDR PAIR) CONTEXT) (CAR PAIR)))))
(DEFUN SAVE-REGION (CONTEXT) (IL:* IL:|;;;| "The context is done with its region. Deallocate it.") (
LET ((PAIR (FIND CONTEXT *REGION-ALIST* :KEY (QUOTE CDR)))) (IF (NULL PAIR) (WARN
"An SEdit context is trying to give up an unallocated region.") (SETF (CDR PAIR) NIL)) (SETQ
*REGION-ALIST* (MEMBER-IF-NOT (QUOTE NULL) *REGION-ALIST* :KEY (QUOTE CDR)))))
(USER::USE-L-S-REGIONS)
(IL:PUTPROPS IL:LAYOUT-SEDIT IL:FILETYPE COMPILE-FILE)
(IL:PUTPROPS IL:LAYOUT-SEDIT IL:MAKEFILE-ENVIRONMENT (:READTABLE "XCL" :PACKAGE (XCL:DEFPACKAGE
"LAYOUT-SEDIT" (:NICKNAMES "L-S"))))
(IL:PUTPROPS IL:LAYOUT-SEDIT IL:COPYRIGHT ("Pavel Curtis" 1986 1987))
NIL
\ No newline at end of file
+(DEFINE-FILE-INFO PACKAGE (DEFPACKAGE "LAYOUT-SEDIT" (NICKNAMES "L-S")) READTABLE "XCL" BASE 10)
+
+(IL:FILECREATED "18-Feb-2026 16:39:44" ("compiled on " IL:|{WMEDLEY}LAYOUT-SEDIT.;2|)
+"18-Feb-2026 16:37:55" IL:|bcompl'd| IL:|in| "FULL 18-Feb-2026 ..." IL:|dated| "18-Feb-2026 16:38:04")
+(IL:FILECREATED "18-Feb-2026 16:36:18" IL:|{WMEDLEY}LAYOUT-SEDIT.;2| 5714 :EDIT-BY IL:|rmk|
+ :CHANGES-TO (IL:VARS IL:LAYOUT-SEDITCOMS) (IL:VARIABLES *REGION-ALIST* USER::*L-S-REGION-ZERO*
+USER::*L-S-REGION-DELTA* USER::*L-S-REUSE-EARLIER-REGIONS*) (IL:FUNCTIONS USER::USE-L-S-REGIONS
+USER::STOP-USING-L-S-REGIONS REGION-PLUS GET-REGION SAVE-REGION) :PREVIOUS-DATE " 9-Jan-87 19:55:25"
+IL:|{WMEDLEY}LAYOUT-SEDIT.;1|)
+(IL:PRETTYCOMPRINT IL:LAYOUT-SEDITCOMS)
+(IL:RPAQQ IL:LAYOUT-SEDITCOMS ((IL:FUNCTIONS USER::USE-L-S-REGIONS USER::STOP-USING-L-S-REGIONS) (
+IL:VARIABLES *REGION-ALIST* USER::*L-S-REGION-ZERO* USER::*L-S-REGION-DELTA*
+USER::*L-S-REUSE-EARLIER-REGIONS*) (IL:FUNCTIONS REGION-PLUS) (IL:FUNCTIONS GET-REGION SAVE-REGION) (
+IL:DECLARE\: IL:DONTEVAL@LOAD IL:DONTEVAL@COMPILE IL:DOCOPY (IL:P (USER::USE-L-S-REGIONS))) (IL:*
+IL:|;;| "Arrange to use the proper compiler and makefile environment ") (IL:PROP (IL:FILETYPE
+IL:MAKEFILE-ENVIRONMENT) IL:LAYOUT-SEDIT)))
+(DEFUN USER::USE-L-S-REGIONS NIL (ASSERT (NULL IL:|\\\\contexts|) NIL "Close all open SEdit windows")
+(IL:SEDIT.RESET) (IL:MOVD (QUOTE IL:SEDIT.GET.WINDOW.REGION) (QUOTE OLD-GET-REGION)) (IL:MOVD (QUOTE
+IL:SEDIT.SAVE.WINDOW.REGION) (QUOTE OLD-SAVE-REGION)) (IL:MOVD (QUOTE GET-REGION) (QUOTE
+IL:SEDIT.GET.WINDOW.REGION)) (IL:MOVD (QUOTE SAVE-REGION) (QUOTE IL:SEDIT.SAVE.WINDOW.REGION)))
+(DEFUN USER::STOP-USING-L-S-REGIONS NIL (ASSERT (NULL IL:|\\\\contexts|) NIL
+"Close all open SEdit windows") (IL:SEDIT.RESET) (IL:MOVD (QUOTE OLD-GET-REGION) (QUOTE
+IL:SEDIT.GET.WINDOW.REGION)) (IL:MOVD (QUOTE OLD-SAVE-REGION) (QUOTE IL:SEDIT.SAVE.WINDOW.REGION)))
+(DEFVAR *REGION-ALIST* NIL (IL:* IL:|;;;|
+"An AList mapping a region to the SEdit context that currently owns it. The associations of regions no longer in use should have a CDR of NIL. The list is kept in reverse order, with the farthest region from *REGION-ZERO* at the front of the list. So as to allow experimentation by users, we maintain the invariant that the first association on the list never has a CDR of NIL. To reestablish that invariant, we sometimes POP the AList rather than set the CDR to NIL."
+))
+(DEFVAR USER::*L-S-REGION-ZERO* (IL:CREATEREGION 25 (- (TRUNCATE IL:SCREENHEIGHT 2) 19) (TRUNCATE
+IL:SCREENWIDTH 2) (TRUNCATE IL:SCREENHEIGHT 2)) (IL:* IL:|;;;|
+"The region to be used by the first SEdit window. This works in conjunction with USER::*L-S-REGION-DELTA* to specify the region for each new SEdit window."
+))
+(DEFVAR USER::*L-S-REGION-DELTA* (IL:CREATEREGION 11 -44 0 0))
+(DEFVAR USER::*L-S-REUSE-EARLIER-REGIONS* NIL (IL:* IL:|;;;|
+"If non-NIL, then earlier regions (i.e., those closer to USER::*L-S-REGION-ZERO* will get reused when free. Otherwise, new regions, farther from USER::*L-S-REGION-ZERO* than any currently in use, will be created."
+))
+(DEFUN REGION-PLUS (ONE TWO) (IL:CREATEREGION (+ (IL:FETCH (IL:REGION IL:LEFT) IL:OF ONE) (IL:FETCH (
+IL:REGION IL:LEFT) IL:OF TWO)) (+ (IL:FETCH (IL:REGION IL:BOTTOM) IL:OF ONE) (IL:FETCH (IL:REGION
+IL:BOTTOM) IL:OF TWO)) (+ (IL:FETCH (IL:REGION IL:WIDTH) IL:OF ONE) (IL:FETCH (IL:REGION IL:WIDTH) IL:OF
+ TWO)) (+ (IL:FETCH (IL:REGION IL:HEIGHT) IL:OF ONE) (IL:FETCH (IL:REGION IL:HEIGHT) IL:OF TWO))))
+(DEFUN GET-REGION (CONTEXT) (LET ((PAIR (AND USER::*L-S-REUSE-EARLIER-REGIONS* (FIND NIL
+*REGION-ALIST* :KEY (QUOTE CDR))))) (COND ((NULL PAIR) (COND ((NULL *REGION-ALIST*) (SETQ
+*REGION-ALIST* (LIST (CONS USER::*L-S-REGION-ZERO* CONTEXT))) USER::*L-S-REGION-ZERO*) (T (LET ((
+NEW-REGION (REGION-PLUS (CAR (FIRST *REGION-ALIST*)) USER::*L-S-REGION-DELTA*))) (PUSH (CONS
+NEW-REGION CONTEXT) *REGION-ALIST*) NEW-REGION)))) (T (SETF (CDR PAIR) CONTEXT) (CAR PAIR)))))
+(DEFUN SAVE-REGION (CONTEXT) (IL:* IL:|;;;| "The context is done with its region. Deallocate it.") (
+LET ((PAIR (FIND CONTEXT *REGION-ALIST* :KEY (QUOTE CDR)))) (IF (NULL PAIR) (WARN
+"An SEdit context is trying to give up an unallocated region.") (SETF (CDR PAIR) NIL)) (SETQ
+*REGION-ALIST* (MEMBER-IF-NOT (QUOTE NULL) *REGION-ALIST* :KEY (QUOTE CDR)))))
+(USER::USE-L-S-REGIONS)
+(IL:PUTPROPS IL:LAYOUT-SEDIT IL:FILETYPE COMPILE-FILE)
+(IL:PUTPROPS IL:LAYOUT-SEDIT IL:MAKEFILE-ENVIRONMENT (:READTABLE "XCL" :PACKAGE (XCL:DEFPACKAGE
+"LAYOUT-SEDIT" (:NICKNAMES "L-S"))))
+NIL
diff --git a/lispusers/PHONE-DIRECTORY b/lispusers/PHONE-DIRECTORY
index a2f4a9e3..5ab74fb8 100644
--- a/lispusers/PHONE-DIRECTORY
+++ b/lispusers/PHONE-DIRECTORY
@@ -1,32 +1,27 @@
-(DEFINE-FILE-INFO §READTABLE "INTERLISP" §PACKAGE "INTERLISP")
-(FILECREATED " 2-Feb-87 10:38:19" {ERIS}LYRIC>PHONE-DIRECTORY.;1 9029
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
- changes to%: (VARS PHONE-DIRECTORYCOMS)
+(FILECREATED "18-Feb-2026 16:27:33" {WMEDLEY}PHONE-DIRECTORY.;2 8485
- previous date%: " 9-Jan-87 19:45:25" {ERIS}KOTO>PHONE-DIRECTORY.;3)
+ :EDIT-BY rmk
+ :PREVIOUS-DATE " 2-Feb-87 10:38:19" {WMEDLEY}PHONE-DIRECTORY.;1)
-(* "
-Copyright (c) 1986, 1987 by Xerox Corporation. All rights reserved.
-")
(PRETTYCOMPRINT PHONE-DIRECTORYCOMS)
-(RPAQQ PHONE-DIRECTORYCOMS ((FNS Cache-Phone-Directory-Files Let-your-fingers-do-the-walking
- Phone-Directory-Kill-Proc Phone-Window-ButtonEventFn Lookup-Person
- Phone-Window-WhenOpenedFn)
- (VARS fingersIconMask fingersIconBM)
- (INITVARS (*Cached-Phone-Directory-Files* NIL)
- (*Phone-Directory-Pos* (create POSITION XCOORD _ 15 YCOORD _
- (DIFFERENCE SCREENHEIGHT 75)))
- (*Phone-Directory-Region* (CREATEREGION 15 (DIFFERENCE
- SCREENHEIGHT 258
- )
- 400 250)))
- (GLOBALVARS *Cached-Phone-Directory-Files* *Phone-Directory-Pos*
- *Phone-Directory-Region* fingersIconMask fingersIconBM)
- (FILES GREP)
- (P (Let-your-fingers-do-the-walking))))
+(RPAQQ PHONE-DIRECTORYCOMS
+ ((FNS Cache-Phone-Directory-Files Let-your-fingers-do-the-walking Phone-Directory-Kill-Proc
+ Phone-Window-ButtonEventFn Lookup-Person Phone-Window-WhenOpenedFn)
+ (VARS fingersIconMask fingersIconBM)
+ (INITVARS (*Cached-Phone-Directory-Files* NIL)
+ (*Phone-Directory-Pos* (create POSITION XCOORD _ 15 YCOORD _ (DIFFERENCE SCREENHEIGHT
+ 75)))
+ (*Phone-Directory-Region* (CREATEREGION 15 (DIFFERENCE SCREENHEIGHT 258)
+ 400 250)))
+ (GLOBALVARS *Cached-Phone-Directory-Files* *Phone-Directory-Pos* *Phone-Directory-Region*
+ fingersIconMask fingersIconBM)
+ (FILES GREP)
+ (P (Let-your-fingers-do-the-walking))))
(DEFINEQ
(Cache-Phone-Directory-Files
@@ -139,11 +134,12 @@ Copyright (c) 1986, 1987 by Xerox Corporation. All rights reserved.
(GLOBALVARS *Cached-Phone-Directory-Files* *Phone-Directory-Pos* *Phone-Directory-Region*
fingersIconMask fingersIconBM)
)
+
(FILESLOAD GREP)
-(Let-your-fingers-do-the-walking)
-(PUTPROPS PHONE-DIRECTORY COPYRIGHT ("Xerox Corporation" 1986 1987))
+
+(Let-your-fingers-do-the-walking)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (1649 6373 (Cache-Phone-Directory-Files 1659 . 2954) (Let-your-fingers-do-the-walking
-2956 . 4251) (Phone-Directory-Kill-Proc 4253 . 4684) (Phone-Window-ButtonEventFn 4686 . 5362) (
-Lookup-Person 5364 . 5976) (Phone-Window-WhenOpenedFn 5978 . 6371)))))
+ (FILEMAP (NIL (1168 5892 (Cache-Phone-Directory-Files 1178 . 2473) (Let-your-fingers-do-the-walking
+2475 . 3770) (Phone-Directory-Kill-Proc 3772 . 4203) (Phone-Window-ButtonEventFn 4205 . 4881) (
+Lookup-Person 4883 . 5495) (Phone-Window-WhenOpenedFn 5497 . 5890)))))
STOP
diff --git a/lispusers/SKETCHCOLOR b/lispusers/SKETCHCOLOR
index 499438c2..9a9e0b69 100644
--- a/lispusers/SKETCHCOLOR
+++ b/lispusers/SKETCHCOLOR
@@ -1,15 +1,11 @@
-(DEFINE-FILE-INFO §READTABLE "INTERLISP" §PACKAGE "INTERLISP")
-(FILECREATED " 9-Jan-87 16:47:16" {ERIS}LIBRARY>SKETCHCOLOR.;2 4779
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
- changes to%: (VARS BLACKSHADE16 DARKGRAY16 MEDIUMGRAY16 LIGHTGRAY16 WHITESHADE16 REDTEXTURE
- GREENTEXTURE BLUETEXTURE SKETCHCOLORCOMS)
+(FILECREATED "18-Feb-2026 16:28:03" {WMEDLEY}SKETCHCOLOR.;2 4732
- previous date%: "29-Oct-85 14:44:30" {ERIS}LIBRARY>SKETCHCOLOR.;1)
+ :EDIT-BY rmk
+ :PREVIOUS-DATE " 9-Jan-87 16:47:16" {WMEDLEY}SKETCHCOLOR.;1)
-(* "
-Copyright (c) 1985, 1987 by Xerox Corporation. All rights reserved.
-")
(PRETTYCOMPRINT SKETCHCOLORCOMS)
@@ -75,25 +71,30 @@ Copyright (c) 1985, 1987 by Xerox Corporation. All rights reserved.
)
(RPAQQ SKETCHINCOLORFLG T)
+
(FILESLOAD COLOR STYLESHEET)
-(PUTPROPS \FILLCIRCLE.DISPLAY READVICE [NIL (BEFORE NIL (COND ((LISTP TEXTURE)
- (COND ((TEXTUREP (CAR TEXTURE))
- (SETQ TEXTURE (CAR TEXTURE)))
- (T (SETQ TEXTURE
- (TEXTUREOFCOLOR
- (CADR TEXTURE])
+[XCL:REINSTALL-ADVICE '\FILLCIRCLE.DISPLAY :BEFORE '((:LAST (COND
+ ((LISTP TEXTURE)
+ (COND
+ ((TEXTUREP (CAR TEXTURE))
+ (SETQ TEXTURE (CAR TEXTURE)))
+ (T (SETQ TEXTURE
+ (TEXTUREOFCOLOR (CADR TEXTURE]
+
+[XCL:REINSTALL-ADVICE '\POLYSHADE.DISPLAY :BEFORE '((:LAST (COND
+ ((LISTP FILL.SHADE)
+ (COND
+ ((TEXTUREP (CAR FILL.SHADE))
+ (SETQ FILL.SHADE (CAR FILL.SHADE))
+ )
+ (T (SETQ FILL.SHADE
+ (TEXTUREOFCOLOR (CADR
+ FILL.SHADE
+ ]
-(PUTPROPS \POLYSHADE.DISPLAY READVICE [NIL (BEFORE NIL (COND ((LISTP FILL.SHADE)
- (COND ((TEXTUREP (CAR FILL.SHADE))
- (SETQ FILL.SHADE (CAR FILL.SHADE
- )))
- (T (SETQ FILL.SHADE
- (TEXTUREOFCOLOR
- (CADR FILL.SHADE])
(READVISE \FILLCIRCLE.DISPLAY \POLYSHADE.DISPLAY)
-(PUTPROPS SKETCHCOLOR COPYRIGHT ("Xerox Corporation" 1985 1987))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (771 3368 (COLORTEXTURETEST 781 . 2128) (LEVELTEXTURE 2130 . 2662) (PRIMARYTEXTURE 2664
- . 3366)))))
+ (FILEMAP (NIL (547 3144 (COLORTEXTURETEST 557 . 1904) (LEVELTEXTURE 1906 . 2438) (PRIMARYTEXTURE 2440
+ . 3142)))))
STOP
diff --git a/lispusers/TRANSOR b/lispusers/TRANSOR
index 2f9ea07c..f71957c0 100644
--- a/lispusers/TRANSOR
+++ b/lispusers/TRANSOR
@@ -1,16 +1,18 @@
-(DEFINE-FILE-INFO §READTABLE "INTERLISP" §PACKAGE "INTERLISP")
-(FILECREATED "17-Mar-87 17:03:54" {DSK}TRANSOR.;16 44778
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
- changes to%: (VARS TRANSORCOMS)
- (FNS PRECH1 TRANSOUT)
+(FILECREATED "18-Feb-2026 21:57:19" {WMEDLEY}TRANSOR.;2 43458
- previous date%: "17-Mar-87 17:00:04" {DSK}TRANSOR.;15)
+ :EDIT-BY rmk
+
+ :CHANGES-TO (VARS TRANSORCOMS)
+
+ :PREVIOUS-DATE "17-Mar-87 17:03:54" {WMEDLEY}TRANSOR.;1)
(PRETTYCOMPRINT TRANSORCOMS)
-(RPAQQ TRANSORCOMS
- ((FNS TRANSOR TRANSOR-PROCEED TRANSORFORM TRANSORFNS TRANSFORM TRANSIT TRANXT TRANSEXIT
+(RPAQQ TRANSORCOMS
+ [(FNS TRANSOR TRANSOR-PROCEED TRANSORFORM TRANSORFNS TRANSFORM TRANSIT TRANXT TRANSEXIT
KEEPLIST TRANSERR TRANSOUT PPASS1 TRANSLIST TRANSLIST1 PREMTEXT WACHADOON PRECH PRECH1
PRECH2 RETAIL LNC PRESCAN)
TRANSORMACROS TRANSOREMARKS TRANSORGLOBALS
@@ -18,8 +20,10 @@
(TESTRAN)
(USERMACROS (APPEND TRANSORMACROS USERMACROS))
(GLOBALVARS (APPEND TRANSORGLOBALS GLOBALVARS))
- (EDITCOMSA (UNION '(NLAM NLAMIT DOTHESE DOTHIS XFORMER CONTINUE) EDITCOMSA))
- (EDITCOMSL (UNION '(REMARK) EDITCOMSL))
+ (EDITCOMSA (UNION '(NLAM NLAMIT DOTHESE DOTHIS XFORMER CONTINUE)
+ EDITCOMSA))
+ (EDITCOMSL (UNION '(REMARK)
+ EDITCOMSL))
(TRANSITCONSES '(ORR NIL XFORMER))
(PRESCARRAY (ARRAY 127 127)))
(INITVARS (NLISTPCOMS)
@@ -36,10 +40,9 @@
(BLKLIBRARY TAILP MEMB LAST LENGTH ASSOC GETP))
(NIL PRESCAN (GLOBALVARS PRESCARRAY)))
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA)
- (NLAML TRANSERR KEEPLIST
+ (NLAML TRANSERR KEEPLIST
TRANSOR-PROCEED)
- (LAMA)))
- (EDITHIST TRANSOR)))
+ (LAMA])
(DEFINEQ
(TRANSOR
@@ -861,52 +864,49 @@ TRANSOR made a translation error: " T)
(RETURN (CLOSEF OUTF)))))
)
-(RPAQQ TRANSORMACROS ((REMARK (TXT)
- (E (KEEPLIST TXT)
- T))
- (NLAM NIL (E (SETQQ WHERETOGONEXT NLAMIT)
- T))
- [NLAMIT NIL (ORR NX !NX ((E (TRANSEXIT]
- (DOTHESE NIL (E (TRANSOR-PROCEED DOTHESE)
- T)
- NLAM)
- (DOTHIS NIL (E (TRANSOR-PROCEED DOTHIS)
- T)
- NLAM)
- (XFORMER NIL (E (TRANSERR TRANSFORMATIONERROR "FAULTY TRANSFORMATION"
- (CURRENTFORM CURRENTCOMS))
- T))))
+(RPAQQ TRANSORMACROS
+ ((REMARK (TXT)
+ (E (KEEPLIST TXT)
+ T))
+ (NLAM NIL (E (SETQQ WHERETOGONEXT NLAMIT)
+ T))
+ [NLAMIT NIL (ORR NX !NX ((E (TRANSEXIT]
+ (DOTHESE NIL (E (TRANSOR-PROCEED DOTHESE)
+ T)
+ NLAM)
+ (DOTHIS NIL (E (TRANSOR-PROCEED DOTHIS)
+ T)
+ NLAM)
+ (XFORMER NIL (E (TRANSERR TRANSFORMATIONERROR "FAULTY TRANSFORMATION" (CURRENTFORM
+ CURRENTCOMS))
+ T))))
-(RPAQQ TRANSOREMARKS ((TRANSFORMATIONERROR (* The TRANSFORMATIONS specified for this form failed to
- work properly. The TTY message %'FAULTY TRANSFORMATION'
- was printed, any commands remaining in the
- transformation after the erroneous one were skipped,
- and translation continued as if the transformation had
- been normally completed. The user should treat the
- translated form with caution and amend his
- transformation to avoid future problems.))
- (TRANSERROR (* TRANSOR got confused at this point. The TTY message %'SHOW JIM
- GOODWIN' was printed and translation continued with the next
- form, but the user should treat the compromised area of code
- with caution.))
- (BLAMBDA1 (* Non-atomic CAR of form, but not an open lambda. Either a
- parenthesis error or computed CAR of form. Computed CAR of form is
- no longer legal in BBN-LISP; APPLY* is used instead. If computed
- CAR of form was intended, the translation to APPLY* will run ok.
- See manual for discussion of APPLY*.))
- (BLAMBDA2 (* Open LAMBDA with wrong number of args. What can it mean?))
- (BLAMBDA3 (* Lambda-expression without forms. What can it mean?))
- (ILLCAR (* Illegal data-type encountered as CAR of form Expression treated as
- list of forms.))
- (TAILP/DOTHIS (* When the transormacro DOTHIS is executed at a TAILP position,
- TRANSOR does a 1 command first, assuming that the current
- position is a list of forms and CAR of it is the form
- intended. The user should make sure that this is what was
- intended by the TRANSFORMATIONS which called DOTHIS, i.e. the
- TRANSFORMATIONS for the form containing this one.))))
+(RPAQQ TRANSOREMARKS
+ ((TRANSFORMATIONERROR (* The TRANSFORMATIONS specified for this form failed to work properly.
+ The TTY message %'FAULTY TRANSFORMATION' was printed, any commands
+ remaining in the transformation after the erroneous one were skipped,
+ and translation continued as if the transformation had been normally
+ completed. The user should treat the translated form with caution and
+ amend his transformation to avoid future problems.))
+ (TRANSERROR (* TRANSOR got confused at this point. The TTY message %'SHOW JIM GOODWIN' was
+ printed and translation continued with the next form, but the user should
+ treat the compromised area of code with caution.))
+ (BLAMBDA1 (* Non-atomic CAR of form, but not an open lambda. Either a parenthesis error or
+ computed CAR of form. Computed CAR of form is no longer legal in BBN-LISP;
+ APPLY* is used instead. If computed CAR of form was intended, the translation to
+ APPLY* will run ok. See manual for discussion of APPLY*.))
+ (BLAMBDA2 (* Open LAMBDA with wrong number of args. What can it mean?))
+ (BLAMBDA3 (* Lambda-expression without forms. What can it mean?))
+ (ILLCAR (* Illegal data-type encountered as CAR of form Expression treated as list of forms.)
+ )
+ (TAILP/DOTHIS (* When the transormacro DOTHIS is executed at a TAILP position, TRANSOR does a
+ 1 command first, assuming that the current position is a list of forms and
+ CAR of it is the form intended. The user should make sure that this is what
+ was intended by the TRANSFORMATIONS which called DOTHIS, i.e. the
+ TRANSFORMATIONS for the form containing this one.))))
(RPAQQ TRANSORGLOBALS (USERNOTES USERNOTES TESTFORM TESTFORM TRANSFORMATIONS TRANSFORMATIONS
- XFORMSFNS XFORMSVARS XFORMSVARS DUMPFILE TRANSFORMATIONS TRANSFORMATIONS
+ XFORMSFNS XFORMSVARS XFORMSVARS DUMPFILE TRANSFORMATIONS TRANSFORMATIONS
TRANSFORMATIONS TRANSFORMATIONS))
(RPAQQ MAXLOOP 1530)
@@ -917,9 +917,11 @@ TRANSOR made a translation error: " T)
(RPAQ GLOBALVARS (APPEND TRANSORGLOBALS GLOBALVARS))
-(RPAQ EDITCOMSA (UNION '(NLAM NLAMIT DOTHESE DOTHIS XFORMER CONTINUE) EDITCOMSA))
+(RPAQ EDITCOMSA (UNION '(NLAM NLAMIT DOTHESE DOTHIS XFORMER CONTINUE)
+ EDITCOMSA))
-(RPAQ EDITCOMSL (UNION '(REMARK) EDITCOMSL))
+(RPAQ EDITCOMSL (UNION '(REMARK)
+ EDITCOMSL))
(RPAQQ TRANSITCONSES (ORR NIL XFORMER))
@@ -932,7 +934,7 @@ TRANSOR made a translation error: " T)
(RPAQ? TRANSOUTREADTABLE FILERDTBL)
(DECLARE%: DOEVAL@LOAD DOEVAL@COMPILE DONTCOPY
-(PUTPROPS TAILP BLKLIBRARYDEF [LAMBDA (.BLKVAR.X .BLKVAR.Y)
+(PUTPROPS TAILP BLKLIBRARYDEF [LAMBDA (.BLKVAR.X .BLKVAR.Y)
(* True if .BLKVAR.X is A tail of .BLKVAR.Y .BLKVAR.X and
.BLKVAR.Y non-null.)
(* Included with editor for block compilation purposes.)
@@ -944,15 +946,19 @@ TRANSOR made a translation error: " T)
(GO LP])
)
-(PUTPROPS TRANSOR FILEGROUP (TRANSOR TSET))
+(PUTPROPS TRANSOR FILEGROUP (TRANSOR TSET))
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY
+
(BLOCK%: PRECHBLOCK PRECH PRECH1 PRECH2 RETAIL LNC (ENTRIES PRECH)
(BLKLIBRARY TAILP MEMB LAST LENGTH ASSOC GETP))
+
(BLOCK%: TRANSITBLOCK TRANSIT WACHADOON (ENTRIES TRANSIT WACHADOON)
(GLOBALVARS WACHADID WHENTODOIT TRANSITCONSES LAMBDACOMS NLISTPCOMS)
(BLKLIBRARY TAILP MEMB LAST LENGTH ASSOC GETP))
+
(BLOCK%: TRANXTBLOCK TRANXT (ENTRIES TRANXT)
(BLKLIBRARY TAILP MEMB LAST LENGTH ASSOC GETP))
+
(BLOCK%: NIL PRESCAN (GLOBALVARS PRESCARRAY))
)
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS
@@ -963,23 +969,11 @@ TRANSOR made a translation error: " T)
(ADDTOVAR LAMA )
)
-(DECLARE%: DONTCOPY
-
-(ADDTOVAR EDITHISTALIST (TRANSOR (" 5-Feb-87 16:18:06" DJVB {DSK}TRANSOR.;11 (TRANSOR)
- (FIXED TO WORK WITH NEW FILE RULES IN LYRIC))
- (" 6-Feb-87 15:24:20" DJVB {DSK}TRANSOR.;12 (TRANSOR))
- (" 6-Mar-87 14:41:26" DJVB {DSK}TRANSOR.;13
- (TRANSOR TRANSOR-PROCEED TRANSORFORM TRANSORFNS TRANSFORM
- RETAIL))
- ("17-Mar-87 17:01:53" DJVB {DSK}TRANSOR.;15 (PRECH1 TRANSOUT)
- (ADDED SPLIT READ/WRITE READTABLES AND PP FOR DEFUN))))
-)
-(PUTPROPS TRANSOR COPYRIGHT (NONE))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (2231 38324 (TRANSOR 2241 . 6284) (TRANSOR-PROCEED 6286 . 9093) (TRANSORFORM 9095 . 9527
-) (TRANSORFNS 9529 . 10225) (TRANSFORM 10227 . 11965) (TRANSIT 11967 . 14735) (TRANXT 14737 . 17950) (
-TRANSEXIT 17952 . 18262) (KEEPLIST 18264 . 19224) (TRANSERR 19226 . 19990) (TRANSOUT 19992 . 22436) (
-PPASS1 22438 . 22679) (TRANSLIST 22681 . 23700) (TRANSLIST1 23702 . 23934) (PREMTEXT 23936 . 24641) (
-WACHADOON 24643 . 25114) (PRECH 25116 . 25609) (PRECH1 25611 . 27779) (PRECH2 27781 . 28727) (RETAIL
-28729 . 29976) (LNC 29978 . 30841) (PRESCAN 30843 . 38322)))))
+ (FILEMAP (NIL (2262 38355 (TRANSOR 2272 . 6315) (TRANSOR-PROCEED 6317 . 9124) (TRANSORFORM 9126 . 9558
+) (TRANSORFNS 9560 . 10256) (TRANSFORM 10258 . 11996) (TRANSIT 11998 . 14766) (TRANXT 14768 . 17981) (
+TRANSEXIT 17983 . 18293) (KEEPLIST 18295 . 19255) (TRANSERR 19257 . 20021) (TRANSOUT 20023 . 22467) (
+PPASS1 22469 . 22710) (TRANSLIST 22712 . 23731) (TRANSLIST1 23733 . 23965) (PREMTEXT 23967 . 24672) (
+WACHADOON 24674 . 25145) (PRECH 25147 . 25640) (PRECH1 25642 . 27810) (PRECH2 27812 . 28758) (RETAIL
+28760 . 30007) (LNC 30009 . 30872) (PRESCAN 30874 . 38353)))))
STOP
diff --git a/lispusers/TRANSOR-LOADTRAN b/lispusers/TRANSOR-LOADTRAN
index f8a7ed9c..af8a0b57 100644
--- a/lispusers/TRANSOR-LOADTRAN
+++ b/lispusers/TRANSOR-LOADTRAN
@@ -1,25 +1,19 @@
-(DEFINE-FILE-INFO §PACKAGE "XCL-USER" §READTABLE "XCL")
-(IL:FILECREATED "13-Apr-87 17:38:17" IL:{DSK}LOADTRAN.\;9 2045
+(DEFINE-FILE-INFO PACKAGE "XCL-USER" READTABLE "XCL" BASE 10)
- IL:|changes| IL:|to:| (IL:VARS IL:LOADTRANCOMS STOP)
- (IL:FUNCTIONS MYLOAD I.S.OPR PRETTYCOMPRINT SETTEMPLATE DEFINE-FILE-INFO
- )
- (IL:FNS PRETTYCOMPRINT SETTEMPLATE)
+(IL:FILECREATED "18-Feb-2026 22:58:35" IL:|{WMEDLEY}TRANSOR-LOADTRAN.;2| 1561
- IL:|previous| IL:|date:| " 6-Apr-87 16:57:48" IL:{DSK}LOADTRAN.\;1)
+ :EDIT-BY IL:|rmk|)
-; Copyright (c) 1987 by System Development Corp.. All rights reserved.
+(IL:PRETTYCOMPRINT IL:TRANSOR-LOADTRANCOMS)
-(IL:PRETTYCOMPRINT IL:LOADTRANCOMS)
-
-(IL:RPAQQ IL:LOADTRANCOMS ((IL:VARS STOP)
- (IL:FNS PRETTYCOMPRINT SETTEMPLATE)
- (IL:FUNCTIONS DEFINE-FILE-INFO I.S.OPR MYLOAD)
- (IL:DECLARE\: IL:DONTEVAL@LOAD IL:DOEVAL@COMPILE IL:DONTCOPY
- IL:COMPILERVARS (IL:ADDVARS (IL:NLAMA PRETTYCOMPRINT)
- (IL:NLAML)
- (IL:LAMA SETTEMPLATE)))))
+(IL:RPAQQ IL:TRANSOR-LOADTRANCOMS ((IL:VARS STOP)
+ (IL:FNS PRETTYCOMPRINT SETTEMPLATE)
+ (IL:FUNCTIONS DEFINE-FILE-INFO I.S.OPR MYLOAD)
+ (IL:DECLARE\: IL:DONTEVAL@LOAD IL:DOEVAL@COMPILE IL:DONTCOPY
+ IL:COMPILERVARS (IL:ADDVARS (IL:NLAMA PRETTYCOMPRINT)
+ (IL:NLAML)
+ (IL:LAMA SETTEMPLATE)))))
(IL:RPAQQ STOP STOP)
(IL:DEFINEQ
@@ -33,17 +27,17 @@
(BLOCK SETTEMPLATE (NILL))))
)
-(DEFUN DEFINE-FILE-INFO (&REST ARGS) (NILL))
+(DEFUN DEFINE-FILE-INFO (&REST ARGS)
+ (NILL))
+(DEFUN I.S.OPR (X)
+ (NILL))
-(DEFUN I.S.OPR (X) (NILL))
-
-
-(DEFUN MYLOAD (FILE) (LET ((FILE (OPEN FILE :DIRECTION :INPUT)))
- (UNWIND-PROTECT (IL:\\CML-LOAD FILE T *TERMINAL-IO* (FIND-PACKAGE
- "XCL-USER"))
- (CLOSE FILE))))
-
+(DEFUN MYLOAD (FILE)
+ (LET ((FILE (OPEN FILE :DIRECTION :INPUT)))
+ (UNWIND-PROTECT
+ (IL:\\CML-LOAD FILE T *TERMINAL-IO* (FIND-PACKAGE "XCL-USER"))
+ (CLOSE FILE))))
(IL:DECLARE\: IL:DONTEVAL@LOAD IL:DOEVAL@COMPILE IL:DONTCOPY IL:COMPILERVARS
(IL:ADDTOVAR IL:NLAMA PRETTYCOMPRINT)
@@ -52,7 +46,7 @@
(IL:ADDTOVAR IL:LAMA SETTEMPLATE)
)
-(IL:PUTPROPS IL:LOADTRAN IL:COPYRIGHT ("System Development Corp." 1987))
(IL:DECLARE\: IL:DONTCOPY
- (IL:FILEMAP (NIL (1134 1357 (PRETTYCOMPRINT 1147 . 1283) (SETTEMPLATE 1285 . 1355)))))
+ (IL:FILEMAP (NIL (830 1053 (PRETTYCOMPRINT 843 . 979) (SETTEMPLATE 981 . 1051)) (1055 1106 (
+DEFINE-FILE-INFO 1055 . 1106)) (1108 1141 (I.S.OPR 1108 . 1141)) (1143 1341 (MYLOAD 1143 . 1341)))))
IL:STOP
diff --git a/lispusers/TRANSOR-LOADTRAN.LCOM b/lispusers/TRANSOR-LOADTRAN.LCOM
index 0657438e..bd1a4f8b 100644
Binary files a/lispusers/TRANSOR-LOADTRAN.LCOM and b/lispusers/TRANSOR-LOADTRAN.LCOM differ
diff --git a/lispusers/TRANSOR.LCOM b/lispusers/TRANSOR.LCOM
index 61e65aec..2b9bd1e4 100644
Binary files a/lispusers/TRANSOR.LCOM and b/lispusers/TRANSOR.LCOM differ
diff --git a/lispusers/UNBOXEDOPS b/lispusers/UNBOXEDOPS
index 5482c4cf..5805f91b 100644
--- a/lispusers/UNBOXEDOPS
+++ b/lispusers/UNBOXEDOPS
@@ -1,20 +1,15 @@
-(DEFINE-FILE-INFO §PACKAGE "INTERLISP" §READTABLE "INTERLISP" §BASE 10)
-(FILECREATED " 7-Dec-86 17:26:23" {ERIS}LISPCORE>UNBOXEDOPS.;7 12906
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
- changes to%: (OPTIMIZERS UFREMAINDER2 UFREMAINDER)
- (FNS UFREMAINDER)
- (VARS UNBOXEDOPSCOMS)
+(FILECREATED "18-Feb-2026 16:17:02" {WMEDLEY}UNBOXEDOPS.;2 10856
- previous date%: " 3-Nov-86 20:30:24" {ERIS}LISPCORE>UNBOXEDOPS.;6)
+ :EDIT-BY rmk
+ :PREVIOUS-DATE " 7-Dec-86 17:26:23" {WMEDLEY}UNBOXEDOPS.;1)
-(* "
-Copyright (c) 1986 by Xerox Corporation. All rights reserved.
-")
(PRETTYCOMPRINT UNBOXEDOPSCOMS)
-(RPAQQ UNBOXEDOPSCOMS
+(RPAQQ UNBOXEDOPSCOMS
[(FNS UFABS UFEQP UFGEQ UFGREATERP UFIX UFLEQ UFLESSP UFMAX UFMIN UFMINUS UFREMAINDER)
(OPTIMIZERS UFABS UFABS1 UFEQP UFEQP2 UFGEQ UFGEQ2 UFGREATERP UFGREATERP2 UFIX UFIX1 UFLEQ
UFLEQ2 UFLESSP UFLESSP2 UFMAX UFMAX2 UFMIN UFMIN2 UFMINUS UFMINUS1 UFREMAINDER)
@@ -81,178 +76,168 @@ Copyright (c) 1986 by Xerox Corporation. All rights reserved.
FY])
)
-(DEFOPTIMIZER UFABS (&OPTIONAL (ARG1 NIL ARG1GIVEN)
- &REST RESTARGS &WHOLE ORIGINAL) (if (OR (NOT ARG1GIVEN)
- RESTARGS)
- then (PRINTOUT T "************" T)
- (PRINTOUT T
- "Illegal args to UFABS" %,
- %, ORIGINAL T)
- (PRINTOUT T "************" T))
- (LIST 'UFABS1 ARG1))
+(DEFOPTIMIZER UFABS (&OPTIONAL (ARG1 NIL ARG1GIVEN)
+ &REST RESTARGS &WHOLE ORIGINAL)
+ (if (OR (NOT ARG1GIVEN)
+ RESTARGS)
+ then (PRINTOUT T "************" T)
+ (PRINTOUT T "Illegal args to UFABS" %, %, ORIGINAL T)
+ (PRINTOUT T "************" T))
+ (LIST 'UFABS1 ARG1))
+(DEFOPTIMIZER UFABS1 (X)
+ `[\FLOATBOX ((OPCODES UBFLOAT1 2)
+ (\FLOATUNBOX ,X])
-(DEFOPTIMIZER UFABS1 (X) `[\FLOATBOX ((OPCODES UBFLOAT1 2)
- (\FLOATUNBOX ,X])
-
-
-(DEFOPTIMIZER UFEQP (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
+(DEFOPTIMIZER UFEQP (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
(ARG2 NIL ARG2GIVEN)
- &REST RESTARGS) (if (OR (NOT ARG1GIVEN)
- (NOT ARG2GIVEN)
- RESTARGS)
- then (PRINTOUT T "************" T)
- (PRINTOUT T "Illegal args to UFEQP" %, %,
- ORIGINAL T)
- (PRINTOUT T "************" T))
- (LIST 'UFEQP2 ARG1 ARG2))
+ &REST RESTARGS)
+ (if (OR (NOT ARG1GIVEN)
+ (NOT ARG2GIVEN)
+ RESTARGS)
+ then (PRINTOUT T "************" T)
+ (PRINTOUT T "Illegal args to UFEQP" %, %, ORIGINAL T)
+ (PRINTOUT T "************" T))
+ (LIST 'UFEQP2 ARG1 ARG2))
+(DEFOPTIMIZER UFEQP2 (X Y)
+ `(EQ (\FLOATUNBOX (FDIFFERENCE ,X ,Y))
+ NIL))
-(DEFOPTIMIZER UFEQP2 (X Y) `(EQ (\FLOATUNBOX (FDIFFERENCE ,X ,Y))
- NIL))
-
-
-(DEFOPTIMIZER UFGEQ (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
+(DEFOPTIMIZER UFGEQ (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
(ARG2 NIL ARG2GIVEN)
- &REST RESTARGS) (if (OR (NOT ARG1GIVEN)
- (NOT ARG2GIVEN)
- RESTARGS)
- then (PRINTOUT T "************" T)
- (PRINTOUT T "Illegal args to UFGEQ" %, %,
- ORIGINAL T)
- (PRINTOUT T "************" T))
- (LIST 'UFGEQ2 ARG1 ARG2))
+ &REST RESTARGS)
+ (if (OR (NOT ARG1GIVEN)
+ (NOT ARG2GIVEN)
+ RESTARGS)
+ then (PRINTOUT T "************" T)
+ (PRINTOUT T "Illegal args to UFGEQ" %, %, ORIGINAL T)
+ (PRINTOUT T "************" T))
+ (LIST 'UFGEQ2 ARG1 ARG2))
+(DEFOPTIMIZER UFGEQ2 (X Y)
+ `[NOT ((OPCODES SWAP UBFLOAT2 5)
+ (\FLOATUNBOX ,X)
+ (\FLOATUNBOX ,Y])
-(DEFOPTIMIZER UFGEQ2 (X Y) `[NOT ((OPCODES SWAP UBFLOAT2 5)
- (\FLOATUNBOX ,X)
- (\FLOATUNBOX ,Y])
-
-
-(DEFOPTIMIZER UFGREATERP (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
+(DEFOPTIMIZER UFGREATERP (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
(ARG2 NIL ARG2GIVEN)
- &REST RESTARGS) (if (OR (NOT ARG1GIVEN)
- (NOT ARG2GIVEN)
- RESTARGS)
- then (PRINTOUT T "************" T)
- (PRINTOUT T "Illegal args to UFGREATERP" %,
- %, ORIGINAL T)
- (PRINTOUT T "************" T))
- (LIST 'UFGREATERP2 ARG1 ARG2))
+ &REST RESTARGS)
+ (if (OR (NOT ARG1GIVEN)
+ (NOT ARG2GIVEN)
+ RESTARGS)
+ then (PRINTOUT T "************" T)
+ (PRINTOUT T "Illegal args to UFGREATERP" %, %, ORIGINAL T)
+ (PRINTOUT T "************" T))
+ (LIST 'UFGREATERP2 ARG1 ARG2))
+(DEFOPTIMIZER UFGREATERP2 (X Y)
+ `((OPCODES UBFLOAT2 5)
+ (\FLOATUNBOX ,X)
+ (\FLOATUNBOX ,Y)))
-(DEFOPTIMIZER UFGREATERP2 (X Y) `((OPCODES UBFLOAT2 5)
- (\FLOATUNBOX ,X)
- (\FLOATUNBOX ,Y)))
+(DEFOPTIMIZER UFIX (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
+ &REST RESTARGS)
+ (if (OR (NOT ARG1GIVEN)
+ RESTARGS)
+ then (PRINTOUT T "************" T)
+ (PRINTOUT T "Illegal args to UFIX" %, %, ORIGINAL T)
+ (PRINTOUT T "************" T))
+ (LIST 'UFIX1 ARG1))
+(DEFOPTIMIZER UFIX1 (X)
+ `((OPCODES UBFLOAT1 4)
+ (\FLOATUNBOX ,X)))
-(DEFOPTIMIZER UFIX (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
- &REST RESTARGS) (if (OR (NOT ARG1GIVEN)
- RESTARGS)
- then (PRINTOUT T "************" T)
- (PRINTOUT T "Illegal args to UFIX" %, %, ORIGINAL
- T)
- (PRINTOUT T "************" T))
- (LIST 'UFIX1 ARG1))
-
-
-(DEFOPTIMIZER UFIX1 (X) `((OPCODES UBFLOAT1 4)
- (\FLOATUNBOX ,X)))
-
-
-(DEFOPTIMIZER UFLEQ (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
+(DEFOPTIMIZER UFLEQ (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
(ARG2 NIL ARG2GIVEN)
- &REST RESTARGS) (if (OR (NOT ARG1GIVEN)
- (NOT ARG2GIVEN)
- RESTARGS)
- then (PRINTOUT T "************" T)
- (PRINTOUT T "Illegal args to UFLEQ" %, %,
- ORIGINAL T)
- (PRINTOUT T "************" T))
- (LIST 'UFLEQ2 ARG1 ARG2))
+ &REST RESTARGS)
+ (if (OR (NOT ARG1GIVEN)
+ (NOT ARG2GIVEN)
+ RESTARGS)
+ then (PRINTOUT T "************" T)
+ (PRINTOUT T "Illegal args to UFLEQ" %, %, ORIGINAL T)
+ (PRINTOUT T "************" T))
+ (LIST 'UFLEQ2 ARG1 ARG2))
+(DEFOPTIMIZER UFLEQ2 (X Y)
+ `[NOT ((OPCODES UBFLOAT2 5)
+ (\FLOATUNBOX ,X)
+ (\FLOATUNBOX ,Y])
-(DEFOPTIMIZER UFLEQ2 (X Y) `[NOT ((OPCODES UBFLOAT2 5)
+(DEFOPTIMIZER UFLESSP (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
+ (ARG2 NIL ARG2GIVEN)
+ &REST RESTARGS)
+ (if (OR (NOT ARG1GIVEN)
+ (NOT ARG2GIVEN)
+ RESTARGS)
+ then (PRINTOUT T "************" T)
+ (PRINTOUT T "Illegal args to UFLESSP" %, %, ORIGINAL T)
+ (PRINTOUT T "************" T))
+ (LIST 'UFLESSP2 ARG1 ARG2))
+
+(DEFOPTIMIZER UFLESSP2 (X Y)
+ `((OPCODES SWAP UBFLOAT2 5)
+ (\FLOATUNBOX ,X)
+ (\FLOATUNBOX ,Y)))
+
+(DEFOPTIMIZER UFMAX (&OPTIONAL (ARG1 NIL ARG1GIVEN)
+ (ARG2 NIL ARG2GIVEN)
+ &REST RESTARGS)
+ (if (NOT ARG1GIVEN)
+ then 'MIN.FLOAT
+ elseif (NOT ARG2GIVEN)
+ then `(FLOAT %, ARG1)
+ elseif RESTARGS
+ then `(UFMAX (UFMAX2 %, ARG1 %, ARG2)
+ ., RESTARGS)
+ else (LIST 'UFMAX2 ARG1 ARG2)))
+
+(DEFOPTIMIZER UFMAX2 (X Y)
+ `[\FLOATBOX ((OPCODES UBFLOAT2 6)
(\FLOATUNBOX ,X)
(\FLOATUNBOX ,Y])
-
-(DEFOPTIMIZER UFLESSP (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
- (ARG2 NIL ARG2GIVEN)
- &REST RESTARGS) (if (OR (NOT ARG1GIVEN)
- (NOT ARG2GIVEN)
- RESTARGS)
- then (PRINTOUT T "************" T)
- (PRINTOUT T "Illegal args to UFLESSP" %, %,
- ORIGINAL T)
- (PRINTOUT T "************" T))
- (LIST 'UFLESSP2 ARG1 ARG2))
-
-
-(DEFOPTIMIZER UFLESSP2 (X Y) `((OPCODES SWAP UBFLOAT2 5)
- (\FLOATUNBOX ,X)
- (\FLOATUNBOX ,Y)))
-
-
-(DEFOPTIMIZER UFMAX (&OPTIONAL (ARG1 NIL ARG1GIVEN)
+(DEFOPTIMIZER UFMIN (&OPTIONAL (ARG1 NIL ARG1GIVEN)
(ARG2 NIL ARG2GIVEN)
- &REST RESTARGS) (if (NOT ARG1GIVEN)
- then 'MIN.FLOAT
- elseif (NOT ARG2GIVEN)
- then `(FLOAT %, ARG1)
- elseif RESTARGS
- then `(UFMAX (UFMAX2 %, ARG1 %, ARG2)
- ., RESTARGS)
- else (LIST 'UFMAX2 ARG1 ARG2)))
+ &REST RESTARGS)
+ (if (NOT ARG1GIVEN)
+ then 'MAX.FLOAT
+ elseif (NOT ARG2GIVEN)
+ then `(FLOAT %, ARG1)
+ elseif RESTARGS
+ then `(UFMIN (UFMIN2 %, ARG1 %, ARG2)
+ ., RESTARGS)
+ else (LIST 'UFMIN2 ARG1 ARG2)))
+(DEFOPTIMIZER UFMIN2 (X Y)
+ `[\FLOATBOX ((OPCODES UBFLOAT2 7)
+ (\FLOATUNBOX ,X)
+ (\FLOATUNBOX ,Y])
-(DEFOPTIMIZER UFMAX2 (X Y) `[\FLOATBOX ((OPCODES UBFLOAT2 6)
- (\FLOATUNBOX ,X)
- (\FLOATUNBOX ,Y])
+(DEFOPTIMIZER UFMINUS (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
+ &REST RESTARGS)
+ (if (OR (NOT ARG1GIVEN)
+ RESTARGS)
+ then (PRINTOUT T "************" T)
+ (PRINTOUT T "Illegal args to UFMINUS" %, %, ORIGINAL T)
+ (PRINTOUT T "************" T))
+ (LIST 'UFMINUS1 ARG1))
+(DEFOPTIMIZER UFMINUS1 (X)
+ `[\FLOATBOX ((OPCODES UBFLOAT1 3)
+ (\FLOATUNBOX ,X])
-(DEFOPTIMIZER UFMIN (&OPTIONAL (ARG1 NIL ARG1GIVEN)
- (ARG2 NIL ARG2GIVEN)
- &REST RESTARGS) (if (NOT ARG1GIVEN)
- then 'MAX.FLOAT
- elseif (NOT ARG2GIVEN)
- then `(FLOAT %, ARG1)
- elseif RESTARGS
- then `(UFMIN (UFMIN2 %, ARG1 %, ARG2)
- ., RESTARGS)
- else (LIST 'UFMIN2 ARG1 ARG2)))
+(DEFOPTIMIZER UFREMAINDER (X Y)
+ (CL:IF (AND (OR (CL:CONSTANTP X)
+ (CL:SYMBOLP X))
+ (OR (CL:CONSTANTP Y)
+ (CL:SYMBOLP Y)))
+ `(FDIFFERENCE ,X (FTIMES [FLOAT (UFIX (FQUOTIENT ,X ,Y]
+ ,Y))
+ 'COMPILER:PASS))
-
-(DEFOPTIMIZER UFMIN2 (X Y) `[\FLOATBOX ((OPCODES UBFLOAT2 7)
- (\FLOATUNBOX ,X)
- (\FLOATUNBOX ,Y])
-
-
-(DEFOPTIMIZER UFMINUS (&WHOLE ORIGINAL &OPTIONAL (ARG1 NIL ARG1GIVEN)
- &REST RESTARGS) (if (OR (NOT ARG1GIVEN)
- RESTARGS)
- then (PRINTOUT T "************" T)
- (PRINTOUT T "Illegal args to UFMINUS" %, %,
- ORIGINAL T)
- (PRINTOUT T "************" T))
- (LIST 'UFMINUS1 ARG1))
-
-
-(DEFOPTIMIZER UFMINUS1 (X) `[\FLOATBOX ((OPCODES UBFLOAT1 3)
- (\FLOATUNBOX ,X])
-
-
-(DEFOPTIMIZER UFREMAINDER (X Y) (CL:IF (AND (OR (CL:CONSTANTP X)
- (CL:SYMBOLP X))
- (OR (CL:CONSTANTP Y)
- (CL:SYMBOLP Y)))
- `(FDIFFERENCE ,X (FTIMES [FLOAT (UFIX (FQUOTIENT ,X
- ,Y]
- ,Y))
- 'COMPILER:PASS))
-
-
-(PUTPROPS UNBOXEDOPS FILETYPE CL:COMPILE-FILE)
+(PUTPROPS UNBOXEDOPS FILETYPE CL:COMPILE-FILE)
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY
(DECLARE%: DOEVAL@COMPILE DONTCOPY
@@ -267,9 +252,8 @@ Copyright (c) 1986 by Xerox Corporation. All rights reserved.
(ADDTOVAR LAMA UFMIN UFMAX)
)
-(PUTPROPS UNBOXEDOPS COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (1185 3385 (UFABS 1195 . 1316) (UFEQP 1318 . 1441) (UFGEQ 1443 . 1565) (UFGREATERP 1567
- . 1700) (UFIX 1702 . 1821) (UFLEQ 1823 . 1945) (UFLESSP 1947 . 2074) (UFMAX 2076 . 2478) (UFMIN 2480
- . 2879) (UFMINUS 2881 . 3006) (UFREMAINDER 3008 . 3383)))))
+ (FILEMAP (NIL (983 3183 (UFABS 993 . 1114) (UFEQP 1116 . 1239) (UFGEQ 1241 . 1363) (UFGREATERP 1365 .
+1498) (UFIX 1500 . 1619) (UFLEQ 1621 . 1743) (UFLESSP 1745 . 1872) (UFMAX 1874 . 2276) (UFMIN 2278 .
+2677) (UFMINUS 2679 . 2804) (UFREMAINDER 2806 . 3181)))))
STOP
diff --git a/lispusers/UNBOXEDOPS.DFASL b/lispusers/UNBOXEDOPS.DFASL
new file mode 100644
index 00000000..97415849
Binary files /dev/null and b/lispusers/UNBOXEDOPS.DFASL differ
diff --git a/lispusers/VERSIONDEFS b/lispusers/VERSIONDEFS
index 97896c14..9920f955 100644
--- a/lispusers/VERSIONDEFS
+++ b/lispusers/VERSIONDEFS
@@ -1,22 +1,21 @@
-(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
+(DEFINE-FILE-INFO :PACKAGE "INTERLISP" :READTABLE "INTERLISP" :BASE 10 :FORMAT :UTF-8)
-(FILECREATED "27-Jan-2025 08:49:34" {WMEDLEY}VERSIONDEFS.;12 5880
+(FILECREATED " 7-Mar-2026 22:55:43" {WMEDLEY}VERSIONDEFS.;18 6534
:EDIT-BY rmk
- :CHANGES-TO (FNS GETVINFO)
-
- :PREVIOUS-DATE "12-Dec-2024 15:07:45" {WMEDLEY}VERSIONDEFS.;11)
+ :PREVIOUS-DATE " 6-Mar-2026 22:47:25" {WMEDLEY}VERSIONDEFS.;17)
(PRETTYCOMPRINT VERSIONDEFSCOMS)
-(RPAQQ VERSIONDEFSCOMS [(FNS FINDFILEVERSION GETVINFO VERSIONP)
- (FNS EDV DFV)
- (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS
- (ADDVARS (NLAMA DFV EDV)
- (NLAML)
- (LAMA])
+(RPAQQ VERSIONDEFSCOMS
+ [(FNS FINDFILEVERSION GETVINFO VERSIONP)
+ (FNS EDV DFV)
+ (PROP ARGNAMES EDV DFV)
+ (DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA DFV EDV)
+ (NLAML)
+ (LAMA])
(DEFINEQ
(FINDFILEVERSION
@@ -119,16 +118,26 @@
(CAR VINFO])
(DFV
- [NLAMBDA ARGS (* ; "Edited 6-Dec-2024 21:29 by rmk")
+ [NLAMBDA ARGS (* ; "Edited 6-Mar-2026 22:42 by rmk")
+ (* ; "Edited 6-Dec-2024 21:29 by rmk")
(* ; "Edited 2-Dec-2024 00:08 by rmk")
(SETQ ARGS (MKLIST ARGS))
- (APPLY (FUNCTION EDV)
- (LIST (POP ARGS)
- NIL
- (POP ARGS)
- (POP ARGS)
- (POP ARGS])
+ (LET ((NAME (POP ARGS))) (* ; "If FNS and FUNCTIONS, show both")
+ (CL:WHEN (HASDEF NAME 'FUNCTIONS '?)
+ (APPLY (FUNCTION EDV)
+ (LIST NAME 'FUNCTIONS (POP ARGS)
+ (POP ARGS)
+ (POP ARGS))))
+ (CL:WHEN (HASDEF NAME 'FNS '?)
+ (APPLY (FUNCTION EDV)
+ (LIST NAME 'FNS (POP ARGS)
+ (POP ARGS)
+ (POP ARGS))))])
)
+
+(PUTPROPS EDV ARGNAMES (NAME TYPE FILE VERSION DIRLST . VINFO))
+
+(PUTPROPS DFV ARGNAMES (NAME FILE VERSION DIRLST . VINFO))
(DECLARE%: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS
(ADDTOVAR NLAMA DFV EDV)
@@ -138,6 +147,6 @@
(ADDTOVAR LAMA )
)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (671 4570 (FINDFILEVERSION 681 . 2128) (GETVINFO 2130 . 4253) (VERSIONP 4255 . 4568)) (
-4571 5717 (EDV 4581 . 5281) (DFV 5283 . 5715)))))
+ (FILEMAP (NIL (706 4605 (FINDFILEVERSION 716 . 2163) (GETVINFO 2165 . 4288) (VERSIONP 4290 . 4603)) (
+4606 6230 (EDV 4616 . 5316) (DFV 5318 . 6228)))))
STOP
diff --git a/lispusers/VERSIONDEFS.LCOM b/lispusers/VERSIONDEFS.LCOM
index 36259932..3914a5c6 100644
Binary files a/lispusers/VERSIONDEFS.LCOM and b/lispusers/VERSIONDEFS.LCOM differ
diff --git a/lispusers/VERSIONDEFS.TEDIT b/lispusers/VERSIONDEFS.TEDIT
index f869387e..7b67a98f 100644
Binary files a/lispusers/VERSIONDEFS.TEDIT and b/lispusers/VERSIONDEFS.TEDIT differ
diff --git a/lispusers/WHOCALLS b/lispusers/WHOCALLS
index b6be7cc9..e7526e7b 100644
--- a/lispusers/WHOCALLS
+++ b/lispusers/WHOCALLS
@@ -1,19 +1,17 @@
-(DEFINE-FILE-INFO §PACKAGE "INTERLISP" §READTABLE "XCL" §BASE 10)
-(filecreated "18-Dec-86 19:03:25" {eris}internal>library>whocalls.\;2 4500
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "XCL" BASE 10)
- |changes| |to:| (fns distribute.callinfo distribute-call-info-for-symbol)
- (vars whocallscoms)
+(FILECREATED "18-Feb-2026 16:08:45" |{WMEDLEY}WHOCALLS.;2| 4272
- |previous| |date:| " 7-Nov-86 02:47:11" {eris}lispcore>whocalls.\;2)
+ :EDIT-BY |rmk|
+
+ :PREVIOUS-DATE "18-Dec-86 19:03:25" |{WMEDLEY}WHOCALLS.;1|)
-; Copyright (c) 1986 by Xerox Corporation. All rights reserved.
+(PRETTYCOMPRINT WHOCALLSCOMS)
-(prettycomprint whocallscoms)
-
-(rpaqq whocallscoms ((fns whocalls whocalls1 distribute.callinfo distribute-call-info-for-symbol)
- (prop proptype calledby usedfreeby usedglobalby boundby)))
-(defineq
+(RPAQQ WHOCALLSCOMS ((FNS WHOCALLS WHOCALLS1 DISTRIBUTE.CALLINFO DISTRIBUTE-CALL-INFO-FOR-SYMBOL)
+ (PROP PROPTYPE CALLEDBY USEDFREEBY USEDGLOBALBY BOUNDBY)))
+(DEFINEQ
(WHOCALLS
(LAMBDA (CALLEE USAGE)
@@ -78,15 +76,14 @@
x))))))
)
-(putprops calledby proptype ignore)
+(PUTPROPS CALLEDBY PROPTYPE IGNORE)
-(putprops usedfreeby proptype ignore)
+(PUTPROPS USEDFREEBY PROPTYPE IGNORE)
-(putprops usedglobalby proptype ignore)
+(PUTPROPS USEDGLOBALBY PROPTYPE IGNORE)
-(putprops boundby proptype ignore)
-(putprops whocalls copyright ("Xerox Corporation" 1986))
-(declare\: dontcopy
- (filemap (nil (653 4251 (whocalls 663 . 2057) (whocalls1 2059 . 3191) (distribute.callinfo 3193 . 3419
-) (distribute-call-info-for-symbol 3421 . 4249)))))
-stop
+(PUTPROPS BOUNDBY PROPTYPE IGNORE)
+(DECLARE\: DONTCOPY
+ (FILEMAP (NIL (466 4064 (WHOCALLS 476 . 1870) (WHOCALLS1 1872 . 3004) (DISTRIBUTE.CALLINFO 3006 . 3232
+) (DISTRIBUTE-CALL-INFO-FOR-SYMBOL 3234 . 4062)))))
+STOP
diff --git a/lispusers/WHOCALLS.LCOM b/lispusers/WHOCALLS.LCOM
index c867c896..a04c53ad 100644
Binary files a/lispusers/WHOCALLS.LCOM and b/lispusers/WHOCALLS.LCOM differ
diff --git a/lispusers/compilebang b/lispusers/compilebang
index 53128e12..943b97f0 100644
--- a/lispusers/compilebang
+++ b/lispusers/compilebang
@@ -1,14 +1,11 @@
-(DEFINE-FILE-INFO §PACKAGE "INTERLISP" §READTABLE "INTERLISP" §BASE 10)
-(FILECREATED "22-Dec-86 18:42:34" {ERIS}LISPCORE>COMPILEBANG.;3 3465
+(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
- changes to%: (FNS COMPILE!)
+(FILECREATED "18-Feb-2026 16:23:37" {WMEDLEY}compilebang.;2 3232
- previous date%: "18-Nov-86 22:23:43" {ERIS}LISPCORE>COMPILEBANG.;2)
+ :EDIT-BY rmk
+ :PREVIOUS-DATE "22-Dec-86 18:42:34" {WMEDLEY}compilebang.;1)
-(* "
-Copyright (c) 1982, 1983, 1984, 1986 by Xerox Corporation. All rights reserved.
-")
(PRETTYCOMPRINT COMPILEBANGCOMS)
@@ -63,23 +60,22 @@ Copyright (c) 1982, 1983, 1984, 1986 by Xerox Corporation. All rights reserved.
NIL NIL T))
(T C))))
-(ADDTOVAR USERMACROS [C NIL (ORR (UP 1)
- NIL)
- (ORR ((E (COMPILE! (OR (LISTP (%##))
- (%## !0))
- T T T)))
- ((E 'C?])
+(ADDTOVAR USERMACROS
+ [C NIL (ORR (UP 1)
+ NIL)
+ (ORR ((E (COMPILE! (OR (LISTP (%##))
+ (%## !0))
+ T T T)))
+ ((E 'C?])
(ADDTOVAR EDITCOMSA C)
-(DEFCOMMAND (C :EVAL) (&REST LISPXLINE) (COND
- (LISPXLINE (COMPILE! (CAR LISPXLINE)
+(DEFCOMMAND (C :EVAL) (&REST LISPXLINE) (COND
+ (LISPXLINE (COMPILE! (CAR LISPXLINE)
NIL NIL T))
(T C)))
-
-(PUTPROPS COMPILEBANG FILETYPE CL:COMPILE-FILE)
-(PUTPROPS COMPILEBANG COPYRIGHT ("Xerox Corporation" 1982 1983 1984 1986))
+(PUTPROPS COMPILEBANG FILETYPE CL:COMPILE-FILE)
(DECLARE%: DONTCOPY
- (FILEMAP (NIL (622 2567 (COMPILE! 632 . 2565)))))
+ (FILEMAP (NIL (506 2451 (COMPILE! 516 . 2449)))))
STOP
diff --git a/obsolete/clos/2.0/CLOS-BROWSER.TEDIT.Z b/obsolete/clos/2.0/CLOS-BROWSER.TEDIT.Z
deleted file mode 100644
index 337dd792..00000000
Binary files a/obsolete/clos/2.0/CLOS-BROWSER.TEDIT.Z and /dev/null differ
diff --git a/obsolete/clos/2.0/NEW-CLOS-BROWSER b/obsolete/clos/2.0/NEW-CLOS-BROWSER
deleted file mode 100644
index fbc4c912..00000000
--- a/obsolete/clos/2.0/NEW-CLOS-BROWSER
+++ /dev/null
@@ -1,1634 +0,0 @@
-(DEFINE-FILE-INFO PACKAGE (LET ((*PACKAGE*)) (CLIN-PACKAGE "CLOS-BROWSER") (CLUSE-PACKAGE "CLOS") (
-CLFIND-PACKAGE "USER")) READTABLE "XCL" BASE 10)
-(IL:FILECREATED " 4-Dec-91 12:16:19"
-IL:|{DSK}local>users>welch>lisp>clos>browser>NEW-CLOS-BROWSER.;22| 91732
-
- IL:|previous| IL:|date:| "19-Nov-91 14:14:15"
-IL:|{DSK}local>users>welch>lisp>clos>browser>NEW-CLOS-BROWSER.;21|)
-
-
-; Copyright (c) 1991 by Venue. All rights reserved.
-
-(IL:PRETTYCOMPRINT IL:NEW-CLOS-BROWSERCOMS)
-
-(IL:RPAQQ IL:NEW-CLOS-BROWSERCOMS
- (
-
-(IL:* IL:|;;;| "***************************************")
-
-
-
-(IL:* IL:|;;;| "")
-
-
-
-(IL:* IL:|;;;| "Print out a copyright notice when loading")
-
-
- (IL:* IL:|;;| "")
-
- (IL:P (FORMAT T
- "~&;CLOS-BROWSER Copyright (c) 1991 VENUE Corporation. All rights reserved.~%"
- ))
-
-
-(IL:* IL:|;;;| "LOAD DEPENDENT MODULES")
-
-
- (IL:* IL:|;;| "Note: before compiling clos-browser:")
-
-
- (IL:* IL:|;;| " (load 'web-editor.dfasl)")
-
-
- (IL:* IL:|;;| " (load 'clos-browser.dfasl)")
-
-
- (IL:* IL:|;;| " (load 'clos-browser 'prop)")
-
-
- (IL:* IL:|;;| "")
-
-
-
-(IL:* IL:|;;;| "PACKAGE STUFF ")
-
- (IL:PROPS (IL:NEW-CLOS-BROWSER IL:MAKEFILE-ENVIRONMENT)
- (IL:NEW-CLOS-BROWSER IL:FILETYPE))
-
- (IL:* IL:|;;| "(IL:P IL:* USER::CLOS-BROWSER-PACKAGE-COMMANDS)")
-
-
- (IL:* IL:|;;| "")
-
-
-
-(IL:* IL:|;;;| "SYSTEM PATCHES")
-
-
- (IL:* IL:|;;| "")
-
-
- (IL:* IL:|;;| "")
-
-
- (IL:* IL:|;;| "")
-
-
-
-(IL:* IL:|;;;| "CLOS-ICON CLASS & INSTANCE INITIALIZATION")
-
- (CLOS::CLASSES CLOS-BROWSER:CLOS-ICON)
- (IL:VARIABLES CLOS-BROWSER:CLOS-ICON)
-
- (IL:* IL:|;;| "")
-
-
-
-(IL:* IL:|;;;| "CLOS-BROWSER CLASS")
-
- (IL:FUNCTIONS CLOS-BROWSER:BROWSE-CLASS CLOS-BROWSER::COLLECT-FAMILY
- CLOS-BROWSER::MAKE-NODES CLOS-BROWSER::CLOS-BROWSER-CLOSE-FN
- CLOS-BROWSER::BROWSER-CONTAINS-P)
- (CLOS::CLASSES CLOS-BROWSER::CLOS-BROWSER)
- (CLOS::METHODS (CLOS-BROWSER::ADD-ROOT (CLOS-BROWSER::CLOS-BROWSER))
- (CLOS-BROWSER::ADD-ROOTS (CLOS-BROWSER::CLOS-BROWSER))
- (WEB:BOX-NODE (CLOS-BROWSER::CLOS-BROWSER))
- (WEB:BROWSE (CLOS-BROWSER::CLOS-BROWSER))
- (CLOS-BROWSER::CLEAR-METHOD-MENU-CACHES (CLOS-BROWSER::CLOS-BROWSER))
- (WEB:ICON-TITLE (CLOS-BROWSER::CLOS-BROWSER))
- (WEB:INITIALIZE-EDITOR (CLOS-BROWSER::CLOS-BROWSER))
- (CLOS-BROWSER::NEW-ITEM (CLOS-BROWSER::CLOS-BROWSER))
- (WEB:RECOMPUTE (CLOS-BROWSER::CLOS-BROWSER))
- (CLOS-BROWSER::REAL-ADD-ROOT (CLOS-BROWSER::CLOS-BROWSER))
- (WEB:SHAPE-TO-HOLD (CLOS-BROWSER::CLOS-BROWSER))
- (IL:* IL:\; "multi-method")
- (CLOS-BROWSER::SUBCLASSES-OF NIL)
- (CLOS-BROWSER::CONTAINS-P (T CLOS-BROWSER::CLOS-BROWSER)))
-
- (IL:* IL:|;;| "")
-
-
-
-(IL:* IL:|;;;| "CLOS-BROWSER-NODE CLASS")
-
- (CLOS::CLASSES CLOS-BROWSER::CLOS-BROWSER-NODE)
- (CLOS::METHODS (CLOS-BROWSER::OBJECT-NAME (CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS-BROWSER::OVERRIDE (CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS-BROWSER::CACHE (T CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS-BROWSER::UNCACHE (CLOS-BROWSER::CLOS-BROWSER-NODE)))
- (IL:VARS (CLOS-BROWSER::*METHOD-PROMPT-STRING* (CONCATENATE 'STRING
- "Left button to edit the method."
- "
-" "Middle button provides a menu of operations.")))
- (IL:FUNCTIONS CLOS-BROWSER::EDIT CLOS-BROWSER::MAKE-METHOD-MENU-ITEMS
- CLOS-BROWSER::MAKE-TOP-LEVEL-METHOD-MENU-ITEMS
- CLOS-BROWSER::MAKE-MULTI-METHOD-SUB-MENU)
-
- (IL:* IL:|;;| "")
-
-
- (IL:* IL:|;;| "OPERATORS (via CLOS-BROWSER-NODE) ON CLOS::STANDARD-CLASS")
-
- (CLOS::METHODS (CLOS-BROWSER:ADD-BROWSER-METHOD (CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS-BROWSER::BROWSE-SUBS (CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS-BROWSER::EDIT-CLASS (CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS-BROWSER::INSPECT-CLASS (CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS-BROWSER::MENU-METHODS (CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS-BROWSER::MAKE-WHENSELECTEDFN (CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS-BROWSER::DESCRIBE-CLASS (CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS-BROWSER::DOCUMENTATION-CLASS (CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS-BROWSER::PRINT-CLASS (CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS-BROWSER::SPECIALIZE-CLASS (CLOS-BROWSER::CLOS-BROWSER-NODE)))
- (IL:FUNCTIONS CLOS-BROWSER::COMPLETE-ADD-METHOD CLOS-BROWSER::COMPLETE-SPECIALIZE
- CLOS-BROWSER::LYRIC-COMPLETE-SPECIALIZE CLOS-BROWSER::THIS-CLASS-NODE-P
- CLOS::CLASS-DIRECT-METHODS)
-
- (IL:* IL:|;;| "")
-
-
- (IL:* IL:|;;| "OPERATORS ON CLOS::STANDARD-CLASS (directly)")
-
- (CLOS::METHODS (CLOS::COMPUTE-INHERITED-METHODS (STANDARD-CLASS))
- (CLOS-BROWSER::SPECIALIZE (STANDARD-CLASS))
- (CLOS-BROWSER::SUBCLASSES-OF (STANDARD-CLASS)))
-
- (IL:* IL:|;;| "")
-
-
- (IL:* IL:|;;| "OPERATORS ON CLOS::STANDARD-METHOD")
-
- (CLOS::METHODS (CLOS-BROWSER::DELETE-METHOD (STANDARD-METHOD))
- (CLOS-BROWSER::COPY (STANDARD-METHOD STANDARD-CLASS))
- (CLOS-BROWSER::MOVE (STANDARD-METHOD STANDARD-CLASS))
- (IL:* IL:\;
- "web:move is shadowed above")
- (CLOS-BROWSER::PRINT-DEFINITION (STANDARD-METHOD))
- (CLOS-BROWSER::DESCRIBE-METHOD (CLOS::METHOD))
- (CLOS-BROWSER::RENAME (STANDARD-METHOD))
- (CLOS-BROWSER::UPDATE-CACHED-MENUES (STANDARD-METHOD))
- (CLOS-BROWSER::WHO-OWNS (STANDARD-METHOD))
-
- (IL:* IL:|;;|
- "update-cached-menues must appear before add-method :after in the coms")
-
- (ADD-METHOD :AFTER (STANDARD-GENERIC-FUNCTION STANDARD-METHOD)))
- (IL:FUNCTIONS CLOS-BROWSER::REPLACE-SPECIALIZERS)
-
- (IL:* IL:|;;| "")
-
-
-
-(IL:* IL:|;;;| "SETUP RELEASE INFO")
-
- (IL:VARS (CLOS-BROWSER::RELEASE-ID "0.02")
- (CLOS-BROWSER::SYSTEM-DATE (CAAR (IL:GETPROP 'IL:CLOS-BROWSER 'IL:FILEDATES))))
-
- (IL:* IL:|;;| "")
-
-
- (IL:* IL:|;;| "")
-
-
- (IL:* IL:|;;| "SETUP BACKGROUND MENU")
-
- (IL:FUNCTIONS CLOS-BROWSER::IN-SELECT-PACKAGE CLOS-BROWSER::CLASSES-IN-PACKAGE)
- (IL:P
- (IL:* IL:|;;| "pushnew should eliminate this")
-
- (SETQ IL:|BackgroundMenuCommands| (REMOVE 'IL:|BrowseClass|
- IL:|BackgroundMenuCommands| :KEY
- #'CAR))
- (PUSH '(IL:|BrowseClass| (CLOS-BROWSER:BROWSE-CLASS)
- "Bring up a class browser."
- (IL:SUBITEMS (IL:|all in a package| (CLOS-BROWSER:BROWSE-CLASS
- (CLOS-BROWSER::CLASSES-IN-PACKAGE
- (CLOS-BROWSER::IN-SELECT-PACKAGE
- )))
-
- "Select a package and browse all the classes defined in that package."
- )))
- IL:|BackgroundMenuCommands|)
- (SETQ IL:|BackgroundMenu| NIL))))
-
-
-
-(IL:* IL:|;;;| "***************************************")
-
-
-
-
-(IL:* IL:|;;;| "")
-
-
-
-
-(IL:* IL:|;;;| "Print out a copyright notice when loading")
-
-
-
-
-(IL:* IL:|;;| "")
-
-
-(FORMAT T "~&;CLOS-BROWSER Copyright (c) 1991 VENUE Corporation. All rights reserved.~%")
-
-
-
-(IL:* IL:|;;;| "LOAD DEPENDENT MODULES")
-
-
-
-
-(IL:* IL:|;;| "Note: before compiling clos-browser:")
-
-
-
-
-(IL:* IL:|;;| " (load 'web-editor.dfasl)")
-
-
-
-
-(IL:* IL:|;;| " (load 'clos-browser.dfasl)")
-
-
-
-
-(IL:* IL:|;;| " (load 'clos-browser 'prop)")
-
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;;| "PACKAGE STUFF ")
-
-
-(IL:PUTPROPS IL:NEW-CLOS-BROWSER IL:MAKEFILE-ENVIRONMENT (:PACKAGE (LET ((*PACKAGE*))
- (IN-PACKAGE
- "CLOS-BROWSER")
- (USE-PACKAGE "CLOS")
- (FIND-PACKAGE "USER"))
- :READTABLE "XCL" :BASE 10))
-
-(IL:PUTPROPS IL:NEW-CLOS-BROWSER IL:FILETYPE :COMPILE-FILE)
-
-
-
-(IL:* IL:|;;| "(IL:P IL:* USER::CLOS-BROWSER-PACKAGE-COMMANDS)")
-
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;;| "SYSTEM PATCHES")
-
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;;| "CLOS-ICON CLASS & INSTANCE INITIALIZATION")
-
-
-(DEFCLASS CLOS-BROWSER:CLOS-ICON (STANDARD-OBJECT)
- ((CLOS-BROWSER::CLASS-BROWSERS :ALLOCATION :CLASS :INITFORM NIL)
- (IL:* IL:\;
- "list of all open browsers")
- (CLOS-BROWSER::DESTINATION-BROWSER :ALLOCATION :CLASS :INITFORM NIL)
- (IL:* IL:\;
- "browser containing boxed node")
- (CLOS-BROWSER::MENU-CACHE-SWITCH :ALLOCATION :CLASS :INITFORM :LAZY
-
- (IL:* IL:|;;| "valid values:")
-
- (IL:* IL:|;;| ":none for never use cache")
-
- (IL:* IL:|;;| ":lazy for invalidate cache at method create or remove time causing re-compute and cache at menu request time.")
-
- (IL:* IL:|;;|
- ":eager (not implemented) for re-compute and cache menu whenever a method is created or removed")
-
- )))
-
-(XCL:DEFGLOBALPARAMETER CLOS-BROWSER:CLOS-ICON (MAKE-INSTANCE 'CLOS-BROWSER:CLOS-ICON))
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;;| "CLOS-BROWSER CLASS")
-
-
-(DEFUN CLOS-BROWSER:BROWSE-CLASS (&OPTIONAL CLOS-BROWSER::CLASS-NAME-OR-LIST &KEY (
- CLOS-BROWSER::DIRECTION
- :SUB)
- (CLOS-BROWSER::WINDOW-OR-TITLE "CLOS-browser")
- CLOS-BROWSER::GOOD-CLASSES POSITION)
- (LET* ((CLOS-BROWSER::ROOT-CLASSES (WHEN CLOS-BROWSER::CLASS-NAME-OR-LIST
- (IF (LISTP CLOS-BROWSER::CLASS-NAME-OR-LIST)
- (MAPCAR #'FIND-CLASS CLOS-BROWSER::CLASS-NAME-OR-LIST)
- (CONS (FIND-CLASS CLOS-BROWSER::CLASS-NAME-OR-LIST)))))
- (CLOS-BROWSER::NODES (CLOS-BROWSER::MAKE-NODES (CLOS-BROWSER::COLLECT-FAMILY NIL
- CLOS-BROWSER::ROOT-CLASSES)))
- (CLOS-BROWSER::CLOS-BROWSER (MAKE-INSTANCE 'CLOS-BROWSER::CLOS-BROWSER)))
- (WEB:INITIALIZE-EDITOR CLOS-BROWSER::CLOS-BROWSER)
- (SETF (SLOT-VALUE CLOS-BROWSER::CLOS-BROWSER 'CLOS-BROWSER::ROOT-CLASSES)
- CLOS-BROWSER::ROOT-CLASSES)
- (SETF (SLOT-VALUE CLOS-BROWSER::CLOS-BROWSER 'CLOS-BROWSER::TITLE)
- CLOS-BROWSER::CLASS-NAME-OR-LIST)
- (WEB:BROWSE CLOS-BROWSER::CLOS-BROWSER CLOS-BROWSER::NODES CLOS-BROWSER::WINDOW-OR-TITLE
- CLOS-BROWSER::GOOD-CLASSES POSITION)
- (UNLESS CLOS-BROWSER::NODES (CLOS-BROWSER::ADD-ROOT CLOS-BROWSER::CLOS-BROWSER))
- CLOS-BROWSER::CLOS-BROWSER))
-
-(DEFUN CLOS-BROWSER::COLLECT-FAMILY (CLOS-BROWSER::FAMILY CLOS-BROWSER::CLASS-LIST)
- "gather all of the sub-classes of the class passed as family"
-
- (IL:* IL:|;;| "for efficiency, to avoid gathering and filtering subclasses more than once, we assume family only contains classes whose family has already been gathered.")
-
- (IF CLOS-BROWSER::CLASS-LIST
- (LET ((CLOS-BROWSER::FIRST-CLASS (CAR CLOS-BROWSER::CLASS-LIST))
- (REST (CDR CLOS-BROWSER::CLASS-LIST)))
- (IF (MEMBER CLOS-BROWSER::FIRST-CLASS CLOS-BROWSER::FAMILY)
- (PROGN
- (IL:* IL:|;;| "skip gathering class-direct-subclasses ")
-
- (CLOS-BROWSER::COLLECT-FAMILY CLOS-BROWSER::FAMILY REST))
- (PROGN (PUSH CLOS-BROWSER::FIRST-CLASS CLOS-BROWSER::FAMILY)
- (CLOS-BROWSER::COLLECT-FAMILY CLOS-BROWSER::FAMILY (APPEND REST
- (
- CLOS::CLASS-DIRECT-SUBCLASSES
-
- CLOS-BROWSER::FIRST-CLASS
- ))))))
- CLOS-BROWSER::FAMILY))
-
-(DEFUN CLOS-BROWSER::MAKE-NODES (CLOS-BROWSER::CLASS-LIST)
- (LET* ((CLOS-BROWSER::NODE-HASH (MAKE-HASH-TABLE))
- (CLOS-BROWSER::NODE-LIST (MAP 'LIST #'(LAMBDA (CLOS-BROWSER::CLASS
- &AUX
- (CLOS-BROWSER::NODE (MAKE-INSTANCE
-
- '
- CLOS-BROWSER::CLOS-BROWSER-NODE
- )))
- (SETF (SLOT-VALUE CLOS-BROWSER::NODE
- 'CLOS-BROWSER::CLASS)
- CLOS-BROWSER::CLASS)
- (SETF (WEB:NODE-NAME CLOS-BROWSER::NODE)
- (CLASS-NAME CLOS-BROWSER::CLASS))
- (SETF (GETHASH CLOS-BROWSER::CLASS
- CLOS-BROWSER::NODE-HASH)
- CLOS-BROWSER::NODE)
- CLOS-BROWSER::NODE)
- CLOS-BROWSER::CLASS-LIST)))
- (DOLIST (CLOS-BROWSER::NODE CLOS-BROWSER::NODE-LIST)
- (SETF (WEB:NODE-LINKS CLOS-BROWSER::NODE)
- (MAP 'LIST #'(LAMBDA (CLOS-BROWSER::SUB)
- (GETHASH CLOS-BROWSER::SUB CLOS-BROWSER::NODE-HASH))
- (CLOS::CLASS-DIRECT-SUBCLASSES (SLOT-VALUE CLOS-BROWSER::NODE
- 'CLOS-BROWSER::CLASS)))))
- CLOS-BROWSER::NODE-LIST))
-
-(DEFUN CLOS-BROWSER::CLOS-BROWSER-CLOSE-FN (CLOS-BROWSER::WINDOW)
- (LET ((CLOS-BROWSER::BROWSER (IL:WINDOWPROP CLOS-BROWSER::WINDOW 'WEB:WEB-EDITOR)))
- (SETF (SLOT-VALUE CLOS-BROWSER:CLOS-ICON 'CLOS-BROWSER::CLASS-BROWSERS)
- (REMOVE CLOS-BROWSER::BROWSER (SLOT-VALUE CLOS-BROWSER:CLOS-ICON
- 'CLOS-BROWSER::CLASS-BROWSERS)))
- (WHEN (EQ CLOS-BROWSER::BROWSER (SLOT-VALUE CLOS-BROWSER:CLOS-ICON
- 'CLOS-BROWSER::DESTINATION-BROWSER))
- (SETF (SLOT-VALUE CLOS-BROWSER:CLOS-ICON 'CLOS-BROWSER::DESTINATION-BROWSER)
- NIL))))
-
-(DEFUN CLOS-BROWSER::BROWSER-CONTAINS-P (CLOS-BROWSER::CLASS CLOS-BROWSER::BROWSER)
- "created because too slow to call contains-p method inside a tight loop"
- (LET ((CLOS-BROWSER::NODE (CAR (MEMBER CLOS-BROWSER::CLASS (SLOT-VALUE CLOS-BROWSER::BROWSER
- 'WEB::STARTING-LIST)
- :TEST
- #'CLOS-BROWSER::THIS-CLASS-NODE-P))))
- (WHEN (AND CLOS-BROWSER::NODE (NOT (MEMBER CLOS-BROWSER::CLASS (SLOT-VALUE
- CLOS-BROWSER::BROWSER
- 'WEB::BAD-LIST)
- :TEST
- #'CLOS-BROWSER::THIS-CLASS-NODE-P)))
- CLOS-BROWSER::NODE)))
-
-(DEFCLASS CLOS-BROWSER::CLOS-BROWSER (WEB:WEB-EDITOR)
- ((CLOS-BROWSER::ROOT-CLASSES)
- (WEB:TITLE-ITEMS :ALLOCATION :INSTANCE
-
- (IL:* IL:|;;| "Items for menu of selections in title of window")
-
- :INITFORM
- '(("Recompute" WEB:RECOMPUTE "Recompute lattice from starting objects"
- (IL:SUBITEMS ("Recompute" WEB:RECOMPUTE
- "Recompute lattice from starting objects")
- ("Recompute labels" WEB:RECOMPUTE-LABELS "Recomputes the labels")
- ("Recompute in place" WEB:RECOMPUTE-IN-PLACE
- "Recompute keeping current view in window")
- ("Clear caches" CLOS-BROWSER::CLEAR-METHOD-MENU-CACHES
- "Clear cached menues of methods.")))
- ("Browser looks" NIL "" (IL:SUBITEMS ("Shape to hold" WEB:SHAPE-TO-HOLD
- "Make window large or small enough to just hold graph"
- )
- ("Change font size" WEB:CHANGE-FONT-SIZE
- "Choose a new size Font")
- ("Change format" WEB:CHANGE-FORMAT
- "Change format between lattice and tree")))
- ("Add root " CLOS-BROWSER::ADD-ROOT "Add named item to startingList for browser."
- (IL:SUBITEMS ("all in a package" CLOS-BROWSER::ADD-ROOTS
- "Add all the classes in a package to this browser.")))
-
- (IL:* IL:|;;|
- "(\"Unhide class\" remove-from-bad-list \"Restore item previously deleted from browser\")")
-
- ))
- (WEB:LEFT-BUTTON-ITEMS :ALLOCATION :CLASS
-
- (IL:* IL:|;;| "Menu items for LeftButton seletion -- Value sent as message to object or browser -- see local-commands")
-
- :INITFORM
- 'WEB:BOX-NODE)
- (WEB:MIDDLE-BUTTON-ITEMS :ALLOCATION :INSTANCE
-
- (IL:* IL:|;;| "Menu items for MiddleButton seletion -- Value sent as message to object or browser -- see local-commands")
-
- :INITFORM
- '(("Edit" CLOS-BROWSER::EDIT-CLASS "Edit the class." (IL:SUBITEMS ("Edit"
- CLOS-BROWSER::EDIT-CLASS
-
- "Edit the class."
- )
- ("Inspect"
- CLOS-BROWSER::INSPECT-CLASS
-
- "Bring up an inspector on the class."
- )))
- ("Add method" CLOS-BROWSER:ADD-BROWSER-METHOD "Add a method to the class.")
- ("Browse" CLOS-BROWSER::BROWSE-SUBS "Bring up a browser on this class."
- (WHEN NIL (IL:* IL:\;
- "superclasses not implemented")
- (IL:SUBITEMS ("sub classes" CLOS-BROWSER::BROWSE-SUBS
- "Bring up a browser on this class.")
- ("super classes" CLOS-BROWSER::BROWSE-SUPERS "Not Implemented"))))
- ("Print" CLOS-BROWSER::PRINT-CLASS "Print the form defining the class."
- (IL:SUBITEMS ("Print" CLOS-BROWSER::PRINT-CLASS
- "Print the form defining the class.")
- ("Describe" CLOS-BROWSER::DESCRIBE-CLASS
- "Print a description of the class.")
- ("Documentation" CLOS-BROWSER::DOCUMENTATION-CLASS
- "Display the documentation for the class.")))
- ("Specialize" CLOS-BROWSER::SPECIALIZE-CLASS "Create a new sub-class of this class.")
- ("------" CLOS-BROWSER::EDIT-CLASS
- "Above this line operates on the class.
-Below this line operates on individual slots and methods.")
- ("slots" CLOS-BROWSER::EDIT-CLASS "Edit the defclass definition.")
- ("methods" (CLOS-BROWSER::MENU-METHODS)
- "Build a menu of methods local to this class."
- (IL:SUBITEMS ("local" (CLOS-BROWSER::MENU-METHODS)
- "Show a menu of methods specialized on this class.."
- (IL:SUBITEMS ("Use cached menu" (CLOS-BROWSER::MENU-METHODS)
- "Do not recompute the menu of methods")
- ("Recompute menu" (CLOS-BROWSER::MENU-METHODS NIL NIL
- NIL T)
- "Recompute the menu of methods")))
- ("inherited" (CLOS-BROWSER::MENU-METHODS :INHERITED)
- "Show only methods inherited by this class."
- (IL:SUBITEMS ("Use cached menu" (CLOS-BROWSER::MENU-METHODS
- :INHERITED)
- "Do not recompute the menu of methods")
- ("Recompute menu" (CLOS-BROWSER::MENU-METHODS :INHERITED
- NIL NIL T)
- "Recompute the menu of methods")))
- ("all" (CLOS-BROWSER::MENU-METHODS :ALL)
- "Show all methods understood by this class."
- (IL:SUBITEMS ("Use cached menu" (CLOS-BROWSER::MENU-METHODS :ALL)
- "Do not recompute the menu of methods")
- ("Recompute menu" (CLOS-BROWSER::MENU-METHODS :ALL NIL NIL
- T)
- "Recompute the menu of methods")))))))
- (CLOS-BROWSER::TITLE :INITFORM "CLOS Browser" (IL:* IL:\;
- "Title passed to GRAPHER package"))))
-
-(DEFMETHOD CLOS-BROWSER::ADD-ROOT ((CLOS-BROWSER::BROWSER CLOS-BROWSER::CLOS-BROWSER)
- &OPTIONAL
- (CLOS-BROWSER::NEW-ITEM (CLOS-BROWSER::NEW-ITEM
- CLOS-BROWSER::BROWSER)))
- "Add a named item to the starting list of the browser "
- (IF (CLOS-BROWSER::REAL-ADD-ROOT CLOS-BROWSER::BROWSER CLOS-BROWSER::NEW-ITEM)
- (WEB:RECOMPUTE CLOS-BROWSER::BROWSER)
-
- (IL:* IL:|;;| "otherwise warn the user")
-
- (WEB:PROMPT-PRINT CLOS-BROWSER::BROWSER (FORMAT NIL "~A not added to browser."
- CLOS-BROWSER::NEW-ITEM))))
-
-(DEFMETHOD CLOS-BROWSER::ADD-ROOTS ((CLOS-BROWSER::BROWSER CLOS-BROWSER::CLOS-BROWSER)
- &OPTIONAL
- (CLOS-BROWSER::NEW-ITEMS (CLOS-BROWSER::CLASSES-IN-PACKAGE
- (CLOS-BROWSER::IN-SELECT-PACKAGE
- ))))
- "Add all classes in a package to the starting list of the browser"
- (DOLIST (CLOS-BROWSER::CLASS CLOS-BROWSER::NEW-ITEMS)
- (UNLESS (CLOS-BROWSER::REAL-ADD-ROOT CLOS-BROWSER::BROWSER CLOS-BROWSER::CLASS)
- (WEB:PROMPT-PRINT CLOS-BROWSER::BROWSER (FORMAT NIL "~A not added to browser."
- CLOS-BROWSER::CLASS))))
- (WEB:RECOMPUTE CLOS-BROWSER::BROWSER))
-
-(DEFMETHOD WEB:BOX-NODE ((CLOS-BROWSER::BROWSER CLOS-BROWSER::CLOS-BROWSER)
- CLOS-BROWSER::OBJECT &OPTIONAL CLOS-BROWSER::KEEP-PREVIOUS-BOX)
- (CALL-NEXT-METHOD)
- (SETF (SLOT-VALUE CLOS-BROWSER:CLOS-ICON 'CLOS-BROWSER::DESTINATION-BROWSER)
- CLOS-BROWSER::BROWSER))
-
-(DEFMETHOD WEB:BROWSE ((CLOS-BROWSER::SELF CLOS-BROWSER::CLOS-BROWSER)
- &OPTIONAL CLOS-BROWSER::BROWSE-LIST CLOS-BROWSER::WINDOW-OR-TITLE
- CLOS-BROWSER::GOOD-LIST POSITION)
- (LET ((CLOS-BROWSER::BROWSER (CALL-NEXT-METHOD)))
- (PUSHNEW CLOS-BROWSER::BROWSER (SLOT-VALUE CLOS-BROWSER:CLOS-ICON
- 'CLOS-BROWSER::CLASS-BROWSERS))))
-
-(DEFMETHOD CLOS-BROWSER::CLEAR-METHOD-MENU-CACHES ((CLOS-BROWSER::SELF CLOS-BROWSER::CLOS-BROWSER
- ))
- (DOLIST (CLOS-BROWSER::NODE (SLOT-VALUE CLOS-BROWSER::SELF 'WEB::STARTING-LIST
- (IL:* IL:\;
- "starting-list is really all the nodes in the browser.")
- ))
- (SETF (SLOT-VALUE CLOS-BROWSER::NODE WEB::MENU-CACHE)
- NIL)))
-
-(DEFMETHOD WEB:ICON-TITLE ((CLOS-BROWSER::SELF CLOS-BROWSER::CLOS-BROWSER))
- (WEB:NODE-NAME (CAR (LAST (SLOT-VALUE CLOS-BROWSER::SELF `WEB::STARTING-LIST)))))
-
-(DEFMETHOD WEB:INITIALIZE-EDITOR ((CLOS-BROWSER::BROWSER CLOS-BROWSER::CLOS-BROWSER))
- "initialize and setup closefn"
- (CALL-NEXT-METHOD)
- (PUSHNEW CLOS-BROWSER::BROWSER (SLOT-VALUE CLOS-BROWSER:CLOS-ICON 'CLOS-BROWSER::CLASS-BROWSERS))
- (LET ((CLOS-BROWSER::WINDOW (SLOT-VALUE CLOS-BROWSER::BROWSER 'WEB::WINDOW)))
- (IL:WINDOWADDPROP CLOS-BROWSER::WINDOW 'IL:CLOSEFN 'CLOS-BROWSER::CLOS-BROWSER-CLOSE-FN T))
- CLOS-BROWSER::BROWSER)
-
-(DEFMETHOD CLOS-BROWSER::NEW-ITEM ((CLOS-BROWSER::SELF CLOS-BROWSER::CLOS-BROWSER)
- &OPTIONAL CLOS-BROWSER::NEW-ITEM)
- (UNLESS CLOS-BROWSER::NEW-ITEM
- (SETQ CLOS-BROWSER::NEW-ITEM (WEB:PROMPT-READ CLOS-BROWSER::SELF "Class"))))
-
-(DEFMETHOD WEB:RECOMPUTE ((CLOS-BROWSER::SELF CLOS-BROWSER::CLOS-BROWSER)
- &OPTIONAL CLOS-BROWSER::DONT-RESHAPE-FLG)
-
- (IL:* IL:|;;| "this should be moved to a more intelligent recompute-nodes function that does not have to re-build every single node.")
-
- (SETF (SLOT-VALUE CLOS-BROWSER::SELF 'WEB::STARTING-LIST)
- (CLOS-BROWSER::MAKE-NODES (CLOS-BROWSER::COLLECT-FAMILY
- NIL
- (IL:FOR CLOS-BROWSER::EACH
- IL:IN (REVERSE
- (IL:* IL:\;
- "so they come out in the original order")
- (SLOT-VALUE CLOS-BROWSER::SELF
- 'WEB::STARTING-LIST)) IL:WHEN
-
- CLOS-BROWSER::EACH
- IL:COLLECT (SLOT-VALUE CLOS-BROWSER::EACH
- `CLOS-BROWSER::CLASS)))))
- (CALL-NEXT-METHOD)
- (WHEN (SLOT-VALUE CLOS-BROWSER:CLOS-ICON 'CLOS-BROWSER::DESTINATION-BROWSER)
-
- (IL:* IL:|;;| "Node has been invalidated, so get rid of this pointer to it. ")
-
- (SETF (SLOT-VALUE (SLOT-VALUE CLOS-BROWSER:CLOS-ICON 'CLOS-BROWSER::DESTINATION-BROWSER)
- 'WEB:BOXED-NODE)
- NIL)
- (SETF (SLOT-VALUE CLOS-BROWSER:CLOS-ICON 'CLOS-BROWSER::DESTINATION-BROWSER)
- NIL)))
-
-(DEFMETHOD CLOS-BROWSER::REAL-ADD-ROOT ((CLOS-BROWSER::BROWSER CLOS-BROWSER::CLOS-BROWSER)
- CLOS-BROWSER::CLASS)
- "Add a class to the starting list of the browser"
- (WHEN CLOS-BROWSER::CLASS
- (LET* ((CLOS-BROWSER::CLASS (IF (TYPEP CLOS-BROWSER::CLASS 'STANDARD-CLASS)
- CLOS-BROWSER::CLASS
- (FIND-CLASS CLOS-BROWSER::CLASS)))
- (CLOS-BROWSER::NEW-NODE (CAR (CLOS-BROWSER::MAKE-NODES (LIST CLOS-BROWSER::CLASS)))
- ))
- (IF CLOS-BROWSER::NEW-NODE
- (PROGN (PUSHNEW CLOS-BROWSER::NEW-NODE (SLOT-VALUE CLOS-BROWSER::BROWSER
- 'WEB::STARTING-LIST))
- (IF (SLOT-VALUE CLOS-BROWSER::BROWSER 'WEB::GOOD-LIST)
- (PUSHNEW CLOS-BROWSER::NEW-NODE (SLOT-VALUE CLOS-BROWSER::BROWSER
- 'WEB::GOOD-LIST)))
- (SETF (SLOT-VALUE CLOS-BROWSER::BROWSER 'WEB::BAD-LIST)
- (IL:DREMOVE CLOS-BROWSER::NEW-NODE (SLOT-VALUE CLOS-BROWSER::BROWSER
- 'WEB::BAD-LIST)))
- CLOS-BROWSER::BROWSER)
-
- (IL:* IL:|;;| "otherwise return nil")
-
- NIL))))
-
-(DEFMETHOD WEB:SHAPE-TO-HOLD ((WEB::SELF CLOS-BROWSER::CLOS-BROWSER))
- "give a larger width for empty browsers so add-node will have room"
- (LET* ((WEB::WINDOW (SLOT-VALUE WEB::SELF 'WEB::WINDOW))
- (WEB::NODES (IL:|fetch| IL:GRAPHNODES IL:|of| (IL:WINDOWPROP WEB::WINDOW
- 'IL:GRAPH))))
- (IF WEB::NODES
- (CALL-NEXT-METHOD)
- (LET ((WEB::REGION (IL:WINDOWPROP WEB::WINDOW 'IL:REGION))
- (WEB::MIN-HEIGHT (IL:FONTHEIGHT (IL:DSPFONT NIL WEB::WINDOW)))
- (WEB::MIN-WIDTH (MAX 250 (IL:IPLUS 5 (IL:STRINGWIDTH (SLOT-VALUE WEB::SELF
- 'WEB::TITLE)
- (IL:DSPFONT NIL
- IL:|WindowTitleDisplayStream|))
- ))))
- (WEB::SET-REGION WEB::SELF (IL:CREATEREGION (IL:|fetch| IL:LEFT IL:|of|
- WEB::REGION)
- (IL:|fetch| IL:BOTTOM IL:|of| WEB::REGION
- )
- WEB::MIN-WIDTH WEB::MIN-HEIGHT))))))
-
-(DEFMETHOD CLOS-BROWSER::SUBCLASSES-OF ((CLOS-BROWSER::CLASS T))
- (APPEND (LIST CLOS-BROWSER::CLASS)
- (IL:FOR CLOS-BROWSER::SUBCLASS IL:IN (SLOT-VALUE CLOS-BROWSER::CLASS
- 'CLOS::DIRECT-SUBCLASSES)
- IL:JOIN (IF (SLOT-VALUE CLOS-BROWSER::SUBCLASS 'CLOS::DIRECT-SUBCLASSES)
- (CLOS-BROWSER::SUBCLASSES-OF CLOS-BROWSER::SUBCLASS)
- (LIST CLOS-BROWSER::SUBCLASS)))))
-
-(DEFMETHOD CLOS-BROWSER::CONTAINS-P ((CLOS-BROWSER::CLASS T)
- (CLOS-BROWSER::BROWSER CLOS-BROWSER::CLOS-BROWSER))
- (LET ((CLOS-BROWSER::NODE (CAR (MEMBER CLOS-BROWSER::CLASS (SLOT-VALUE CLOS-BROWSER::BROWSER
- 'WEB::STARTING-LIST)
- :TEST
- #'CLOS-BROWSER::THIS-CLASS-NODE-P))))
- (WHEN (AND CLOS-BROWSER::NODE (NOT (MEMBER CLOS-BROWSER::CLASS (SLOT-VALUE
- CLOS-BROWSER::BROWSER
- 'WEB::BAD-LIST)
- :TEST
- #'CLOS-BROWSER::THIS-CLASS-NODE-P)))
- CLOS-BROWSER::NODE)))
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;;| "CLOS-BROWSER-NODE CLASS")
-
-
-(DEFCLASS CLOS-BROWSER::CLOS-BROWSER-NODE (WEB:WEB-NODE)
- ((CLOS-BROWSER::CLASS (IL:* IL:\;
- "The class represented by this node")
- )
- (CLOS-BROWSER::MENU-CACHE :INITFORM NIL) (IL:* IL:\;
- "Menus of methods and slots. See clos-icon for the switch that controls when this gets updated.")
- (CLOS-BROWSER::LARGE-MENU-SIZE :ALLOCATION :CLASS :INITFORM 22)
- (CLOS-BROWSER::LARGE-MENU-FONT :ALLOCATION :INSTANCE :INITFORM (IL:FONTCREATE
- `(IL:HELVETICA 8)))
- (CLOS-BROWSER::LOCAL-METHOD-OPERATIONS :ALLOCATION :INSTANCE :INITFORM
- '(("Edit" 'CLOS-BROWSER::EDIT "Bring up the editor on this method's definition."
- (IL:SUBITEMS ("Inspect" 'INSPECT "Inspect this method")))
- ("Print" 'CLOS-BROWSER::PRINT-DEFINITION "Pretty Print this method's definition."
- (IL:SUBITEMS ("Print" 'PRINT "Print this method's definition.")
- ("Describe" 'CLOS-BROWSER::DESCRIBE-METHOD "Describe this method.")
- ("Documentation" 'DOCUMENTATION "Print this method's documentation.")))
- ("Delete" 'CLOS-BROWSER::DELETE-METHOD "Remove this method.")
- ("Copy" 'CLOS-BROWSER::COPY "Copy this method to boxed class.")
- ("Move" 'CLOS-BROWSER::MOVE "Move this method to boxed class.")
- ("Rename" 'CLOS-BROWSER::RENAME
- "Change the name of this method to new name you specify")
- ("Break" 'CLOS::BREAK-METHOD "Cause a break window whenever this method is invoked.")
- ("Trace" 'CLOS::TRACE-METHOD "Trace this method.")
- ("UnBreak" 'CLOS::UNBREAK-METHOD "Unbreak this method.")
- ("Who owns" 'CLOS-BROWSER::WHO-OWNS
- "Show the classes on which this method is specialized.")))
- (CLOS-BROWSER::INHERITED-METHOD-OPERATIONS :ALLOCATION :INSTANCE :INITFORM
- '(("Edit" 'CLOS-BROWSER::EDIT "Bring up the editor on this method's definition."
- (IL:SUBITEMS ("Inspect" 'INSPECT "Inspect this method")))
- ("Print" 'CLOS-BROWSER::PRINT-DEFINITION "Pretty Print this method's definition."
- (IL:SUBITEMS ("Print" 'PRINT "Print this method's definition.")
- ("Describe" 'CLOS-BROWSER::DESCRIBE-METHOD "Describe this method.")
- ("Documentation" 'DOCUMENTATION "Print this method's documentation.")))
- ("Override" 'CLOS-BROWSER::OVERRIDE "Create a local method with this name.")
- ("Break" 'CLOS::BREAK-METHOD "Cause a break window whenever this method is invoked.")
- ("Trace" 'CLOS::TRACE-METHOD "Trace this method.")
- ("UnBreak" 'CLOS::UNBREAK-METHOD "Unbreak this method.")
- ("Who owns" 'CLOS-BROWSER::WHO-OWNS
- "Show the classes on which this method is specialized.")))
- (CLOS-BROWSER::ALL-METHOD-OPERATIONS :ALLOCATION :INSTANCE :INITFORM
- '(("Edit" 'CLOS-BROWSER::EDIT "Bring up the editor on this method's definition."
- (IL:SUBITEMS ("Inspect" 'INSPECT "Inspect this method")))
- ("Print" 'CLOS-BROWSER::PRINT-DEFINITION "Pretty Print this method's definition."
- (IL:SUBITEMS ("Print" 'PRINT "Print this method's definition.")
- ("Describe" 'CLOS-BROWSER::DESCRIBE-METHOD "Describe this method.")
- ("Documentation" 'DOCUMENTATION "Print this method's documentation.")))
- ("Delete" 'DELETE "Remove this method.")
- ("Copy" 'CLOS-BROWSER::COPY "Copy this method to boxed class.")
- ("Move" 'CLOS-BROWSER::MOVE "Move this method to boxed class.")
- ("Rename" 'CLOS-BROWSER::RENAME
- "Change the name of this method to new name you specify")
- ("Override" 'CLOS-BROWSER::OVERRIDE "Create a local method with this name.")
- ("Break" 'CLOS::BREAK-METHOD "Cause a break window whenever this method is invoked.")
- ("Trace" 'CLOS::TRACE-METHOD "Trace this method.")
- ("UnBreak" 'CLOS::UNBREAK-METHOD "Unbreak this method.")
- ("Who owns" 'CLOS-BROWSER::WHO-OWNS
- "Show the classes on which this method is specialized.")))))
-
-(DEFMETHOD CLOS-BROWSER::OBJECT-NAME ((CLOS-BROWSER::SELF CLOS-BROWSER::CLOS-BROWSER-NODE))
- (WEB:NODE-NAME CLOS-BROWSER::SELF))
-
-(DEFMETHOD CLOS-BROWSER::OVERRIDE ((CLOS-BROWSER::NODE CLOS-BROWSER::CLOS-BROWSER-NODE)
- CLOS-BROWSER::METHOD)
- "Create a method specialized on the class."
- (ADD-METHOD CLOS-BROWSER::NODE NIL (SLOT-VALUE (CLOS::METHOD-GENERIC-FUNCTION CLOS-BROWSER::METHOD
- )
- 'CLOS::NAME)))
-
-(DEFMETHOD CLOS-BROWSER::CACHE (CLOS-BROWSER::MENU (CLOS-BROWSER::NODE
- CLOS-BROWSER::CLOS-BROWSER-NODE)
- &OPTIONAL CLOS-BROWSER::INHERITED-OR-ALL)
- (LET ((CLOS-BROWSER::MENU-TYPE (CASE CLOS-BROWSER::INHERITED-OR-ALL
- ((NIL :LOCAL) 'CLOS-BROWSER::LOCAL-METHODS-MENU)
- (:INHERITED 'CLOS-BROWSER::IHHERITED-METHODS-MENU)
- (:ALL 'CLOS-BROWSER::ALL-METHODS-MENU))))
- (IF (NOT (ASSOC CLOS-BROWSER::MENU-TYPE (SLOT-VALUE CLOS-BROWSER::NODE
- 'CLOS-BROWSER::MENU-CACHE)))
-
- (IL:* IL:|;;| "then initialize alist")
-
- (SETF (SLOT-VALUE CLOS-BROWSER::NODE 'CLOS-BROWSER::MENU-CACHE)
- (ACONS CLOS-BROWSER::MENU-TYPE CLOS-BROWSER::MENU (SLOT-VALUE CLOS-BROWSER::NODE
- 'CLOS-BROWSER::MENU-CACHE)
- ))
-
- (IL:* IL:|;;| "otherwise replace what is already there")
-
- (RPLACD (ASSOC CLOS-BROWSER::MENU-TYPE (SLOT-VALUE CLOS-BROWSER::NODE
- 'CLOS-BROWSER::MENU-CACHE))
- CLOS-BROWSER::MENU))))
-
-(DEFMETHOD CLOS-BROWSER::UNCACHE ((CLOS-BROWSER::NODE CLOS-BROWSER::CLOS-BROWSER-NODE)
- &OPTIONAL CLOS-BROWSER::INHERITED-OR-ALL)
- (RPLACD (ASSOC (CASE CLOS-BROWSER::INHERITED-OR-ALL
- ((NIL :LOCAL) 'CLOS-BROWSER::LOCAL-METHODS-MENU)
- (:INHERITED 'CLOS-BROWSER::IHHERITED-METHODS-MENU)
- (:ALL 'CLOS-BROWSER::ALL-METHODS-MENU))
- (SLOT-VALUE CLOS-BROWSER::NODE 'CLOS-BROWSER::MENU-CACHE))
- NIL))
-
-(IL:RPAQ CLOS-BROWSER::*METHOD-PROMPT-STRING* (CONCATENATE 'STRING
- "Left button to edit the method." "
-" "Middle button provides a menu of operations."))
-
-(DEFUN CLOS-BROWSER::EDIT (CLOS-BROWSER::METHOD)
- (LET ((*PACKAGE* (SYMBOL-PACKAGE (CLOS::GENERIC-FUNCTION-NAME (CLOS::METHOD-GENERIC-FUNCTION
- CLOS-BROWSER::METHOD)))))
- (ED (CLOS::FULL-METHOD-NAME CLOS-BROWSER::METHOD)
- ':DONTWAIT)))
-
-(DEFUN CLOS-BROWSER::MAKE-METHOD-MENU-ITEMS (CLOS::METHODS CLOS-BROWSER::CLASS &OPTIONAL
- CLOS-BROWSER::INHERITED-OR-ALL)
- "gather method-list into menu items list"
- (LET ((CLOS-BROWSER::METHOD-MENU-ITEMS (CLOS-BROWSER::MAKE-TOP-LEVEL-METHOD-MENU-ITEMS
- CLOS::METHODS CLOS-BROWSER::INHERITED-OR-ALL))
- (CLOS-BROWSER::EXTRA-MENU-ITEM-POSITIONS))
- (LET ((CLOS-BROWSER::PREVIOUS.ITEM NIL)
- (CLOS-BROWSER::THIS.POSITION 0)
- CLOS-BROWSER::GF-NAME)
- (DOLIST (CLOS-BROWSER::THIS.ITEM CLOS-BROWSER::METHOD-MENU-ITEMS)
- (SETQ CLOS-BROWSER::GF-NAME (CAR CLOS-BROWSER::THIS.ITEM))
- (INCF CLOS-BROWSER::THIS.POSITION)
- (IF (NOT (AND CLOS-BROWSER::PREVIOUS.ITEM (IF (NOT (FIRST CLOS-BROWSER::THIS.ITEM))
-
- (IL:* IL:|;;|
- "then look for different gf objects with nil name")
-
- (EQ (CLOS::METHOD-GENERIC-FUNCTION
- (SECOND
- CLOS-BROWSER::PREVIOUS.ITEM
- ))
- (CLOS::METHOD-GENERIC-FUNCTION
- (SECOND CLOS-BROWSER::THIS.ITEM))
- )
-
- (IL:* IL:|;;|
- "otherwise use slightly more efficient test for same gf")
-
- (EQ (FIRST CLOS-BROWSER::PREVIOUS.ITEM
- )
- (FIRST CLOS-BROWSER::THIS.ITEM))))
- )
-
- (IL:* IL:|;;| "then go on to the next")
-
- (SETQ CLOS-BROWSER::PREVIOUS.ITEM CLOS-BROWSER::THIS.ITEM)
-
- (IL:* IL:|;;| "otherwise we have multi-methods")
-
- (PROGN
- (IL:* IL:|;;| "build a sub-menu of all the multi-methods")
-
- (IF (NOT (FOURTH CLOS-BROWSER::PREVIOUS.ITEM))
-
- (IL:* IL:|;;| "then create the sub-menu")
-
- (NCONC CLOS-BROWSER::PREVIOUS.ITEM (LIST (LIST 'IL:SUBITEMS
- (
- CLOS-BROWSER::MAKE-MULTI-METHOD-SUB-MENU
- (SECOND
- CLOS-BROWSER::PREVIOUS.ITEM
- )
- CLOS-BROWSER::CLASS)
- (
- CLOS-BROWSER::MAKE-MULTI-METHOD-SUB-MENU
- (SECOND
- CLOS-BROWSER::THIS.ITEM
- )
- CLOS-BROWSER::CLASS))
- ))
-
- (IL:* IL:|;;| "otherwise add another item to the sub-menu")
-
- (NCONC (FOURTH CLOS-BROWSER::PREVIOUS.ITEM)
- (LIST (CLOS-BROWSER::MAKE-MULTI-METHOD-SUB-MENU
- (SECOND CLOS-BROWSER::THIS.ITEM)
- CLOS-BROWSER::CLASS))))
-
- (IL:* IL:|;;|
- "collect the position of the extra multi-method menu item")
-
- (PUSH CLOS-BROWSER::THIS.POSITION CLOS-BROWSER::EXTRA-MENU-ITEM-POSITIONS
- )))))
-
- (IL:* IL:|;;| "remove extra multi-method menu items last first.")
-
- (DOLIST (CLOS-BROWSER::EACH.POSITION CLOS-BROWSER::EXTRA-MENU-ITEM-POSITIONS)
- (SETQ CLOS-BROWSER::METHOD-MENU-ITEMS (DELETE-IF #'XCL:TRUE
- CLOS-BROWSER::METHOD-MENU-ITEMS :START
- (- CLOS-BROWSER::EACH.POSITION 1)
- :END CLOS-BROWSER::EACH.POSITION)))
-
- (IL:* IL:|;;| "prepend the Add method item")
-
- (APPEND '(("Add method" NIL
- "Bring up an editor containing a template for a new method on this class."))
- CLOS-BROWSER::METHOD-MENU-ITEMS)))
-
-(DEFUN CLOS-BROWSER::MAKE-TOP-LEVEL-METHOD-MENU-ITEMS (CLOS::METHODS &OPTIONAL
- CLOS-BROWSER::INHERITED-OR-ALL)
- "gather local-methods into menu items list"
- (DECLARE (SPECIAL CLOS-BROWSER::*METHOD-PROMPT-STRING*))
- (SORT (IL:FOR CLOS-BROWSER::EACH.METHOD IL:IN CLOS::METHODS IL:BIND
- CLOS-BROWSER::METHOD-NAME
- IL:UNLESS (AND (NOT (EQL CLOS-BROWSER::INHERITED-OR-ALL :ALL))
- (CLOS::*TYPEP CLOS-BROWSER::EACH.METHOD
- 'CLOS::STANDARD-ACCESSOR-METHOD))
-
- (IL:* IL:|;;| "weed out auto-generated slot access methods ")
- IL:|eachtime| (SETQ CLOS-BROWSER::METHOD-NAME (CAR (CLOS::FULL-METHOD-NAME
- CLOS-BROWSER::EACH.METHOD NIL)))
- IL:|collect| (LIST CLOS-BROWSER::METHOD-NAME CLOS-BROWSER::EACH.METHOD
- CLOS-BROWSER::*METHOD-PROMPT-STRING*))
- #'IL:ALPHORDER :KEY #'CAR))
-
-(DEFUN CLOS-BROWSER::MAKE-MULTI-METHOD-SUB-MENU (CLOS-BROWSER::METHOD CLOS-BROWSER::CLASS)
- "make a menu item to distinguish methods on the same gf"
- (LET (CLOS-BROWSER::SUB-ITEM-NAME)
- (DECLARE (SPECIAL CLOS-BROWSER::*METHOD-PROMPT-STRING*))
-
- (IL:* IL:|;;| "first put out the qualifiers if any")
-
- (DOLIST (CLOS-BROWSER::QUALIFIER (SLOT-VALUE CLOS-BROWSER::METHOD 'CLOS::SPECIALIZERS))
- (SETQ CLOS-BROWSER::SUB-ITEM-NAME (CONCATENATE 'STRING CLOS-BROWSER::SUB-ITEM-NAME
- (WHEN CLOS-BROWSER::SUB-ITEM-NAME " ")
- (PRIN1-TO-STRING CLOS-BROWSER::QUALIFIER))))
-
- (IL:* IL:|;;| "then do the specializers ")
-
- (IL:* IL:|;;| "(DOLIST (TYPE-SPECIFIER (SLOT-VALUE METHOD 'CLOS::TYPE-SPECIFIERS)) (SETQ SUB-ITEM-NAME (CONCATENATE 'STRING SUB-ITEM-NAME (WHEN SUB-ITEM-NAME \" \") (IF (EQ CLASS TYPE-SPECIFIER) ;; then lets just do a plus sign \"+\" ;; else print the name (PRIN1-TO-STRING ;; test until class-name works properly (IF (TYPEP TYPE-SPECIFIER 'STANDARD-CLASS) (CLASS-NAME TYPE-SPECIFIER) TYPE-SPECIFIER))))))")
-
- (LIST CLOS-BROWSER::SUB-ITEM-NAME CLOS-BROWSER::METHOD CLOS-BROWSER::*METHOD-PROMPT-STRING*)))
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;| "OPERATORS (via CLOS-BROWSER-NODE) ON CLOS::STANDARD-CLASS")
-
-
-(DEFMETHOD CLOS-BROWSER:ADD-BROWSER-METHOD ((CLOS-BROWSER::NODE CLOS-BROWSER::CLOS-BROWSER-NODE)
- &OPTIONAL CLOS-BROWSER::FORM
- CLOS-BROWSER::METHOD-NAME)
- "bring up sedit on a template to add a method to this class"
- (DECLARE (SPECIAL SEDIT::BASIC-GAP SEDIT::BODY-GAP SEDIT::ARGS-GAP))
- (LET* ((CLASS-NAME (CLASS-NAME (SLOT-VALUE CLOS-BROWSER::NODE 'CLOS-BROWSER::CLASS)))
- CLOS-BROWSER::CONTEXT
- (CLOS-BROWSER::NAME (FORMAT NIL "New method on ~A" CLASS-NAME))
- (*PACKAGE* (SYMBOL-PACKAGE CLASS-NAME)))
- (UNLESS CLOS-BROWSER::FORM
- (SETQ CLOS-BROWSER::FORM (LIST 'DEFMETHOD (OR CLOS-BROWSER::METHOD-NAME SEDIT::BASIC-GAP
- )
- (LIST (LIST (INTERN "SELF")
- CLASS-NAME)
- SEDIT::ARGS-GAP)
- SEDIT::BODY-GAP)))
- (SEDIT:SEDIT CLOS-BROWSER::FORM (LIST :NAME CLOS-BROWSER::NAME :COMPLETION-FN
- #'CLOS-BROWSER::COMPLETE-ADD-METHOD)
- :DONTWAIT)))
-
-(DEFMETHOD CLOS-BROWSER::BROWSE-SUBS ((CLOS-BROWSER::NODE CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS-BROWSER:BROWSE-CLASS (SLOT-VALUE (SLOT-VALUE CLOS-BROWSER::NODE 'CLOS-BROWSER::CLASS)
- 'CLOS::NAME)))
-
-(DEFMETHOD CLOS-BROWSER::EDIT-CLASS ((CLOS-BROWSER::NODE CLOS-BROWSER::CLOS-BROWSER-NODE))
- (LET* ((CLOS-BROWSER::CLASS (CLASS-NAME (SLOT-VALUE CLOS-BROWSER::NODE 'CLOS-BROWSER::CLASS)))
- (*PACKAGE* (SYMBOL-PACKAGE CLOS-BROWSER::CLASS)))
- (ED CLOS-BROWSER::CLASS '(CLOS-BROWSER::CLASSES :DONTWAIT))))
-
-(DEFMETHOD CLOS-BROWSER::INSPECT-CLASS ((CLOS::OBJECT CLOS-BROWSER::CLOS-BROWSER-NODE))
- (INSPECT (SLOT-VALUE CLOS::OBJECT 'CLOS-BROWSER::CLASS)))
-
-(DEFMETHOD CLOS-BROWSER::MENU-METHODS ((CLOS-BROWSER::NODE CLOS-BROWSER::CLOS-BROWSER-NODE)
- &OPTIONAL CLOS-BROWSER::INHERITED-OR-ALL
- CLOS-BROWSER::ITEMS CLOS-BROWSER::FIX-FLAG
- CLOS-BROWSER::RECOMPUTE-FLAG)
- "pops up a menu of the methods for the class representing the node."
-
- (IL:* IL:|;;| "If INHERITED-OR-ALL is NIL or :local only local methods are menued.")
-
- (IL:* IL:|;;| "If INHERITED-OR-ALL is :inherited only inherited methods are menued.")
-
- (IL:* IL:|;;| "If INHERITED-OR-ALL is :all all methods are menued.")
-
- (IL:* IL:|;;| "If items are present, the list of methods is not re-generated.")
-
- (IL:* IL:|;;|
- "If the fix-flag is t, the user is asked to position the menu and no \"Fix menu\" item appears.")
-
- (IL:* IL:|;;| "The whenselectedfn can call this again to generate a fixed menu.")
-
- (LET* ((CLOS-BROWSER::CLASS (SLOT-VALUE CLOS-BROWSER::NODE 'CLOS-BROWSER::CLASS))
- (*PACKAGE* (SYMBOL-PACKAGE (SLOT-VALUE CLOS-BROWSER::CLASS 'CLOS::NAME)))
- (CLOS-BROWSER::MENU (UNLESS (OR CLOS-BROWSER::RECOMPUTE-FLAG (EQ (SLOT-VALUE
- CLOS-BROWSER:CLOS-ICON
-
- '
- CLOS-BROWSER::MENU-CACHE-SWITCH
- )
- :NONE))
- (REST (IL:* IL:\; "use the cached menu")
- (ASSOC (CASE CLOS-BROWSER::INHERITED-OR-ALL
- ((NIL :LOCAL) 'CLOS-BROWSER::LOCAL-METHODS-MENU)
- (:INHERITED 'CLOS-BROWSER::IHHERITED-METHODS-MENU)
- (:ALL 'CLOS-BROWSER::ALL-METHODS-MENU))
- (SLOT-VALUE CLOS-BROWSER::NODE
- 'CLOS-BROWSER::MENU-CACHE))))))
-
- (IL:* IL:|;;| "unless it was cached, make the menu")
-
- (UNLESS (AND CLOS-BROWSER::MENU (IL:TYPE? IL:MENU CLOS-BROWSER::MENU))
-
- (IL:* IL:|;;| "unless the menu items were passed in, compute them")
-
- (UNLESS CLOS-BROWSER::ITEMS
- (SETQ CLOS-BROWSER::ITEMS (CLOS-BROWSER::MAKE-METHOD-MENU-ITEMS
- (CASE CLOS-BROWSER::INHERITED-OR-ALL
- ((NIL :LOCAL) (CAR (SLOT-VALUE CLOS-BROWSER::CLASS
- 'CLOS::DIRECT-METHODS)))
- (:INHERITED (CLOS::COMPUTE-INHERITED-METHODS
- CLOS-BROWSER::CLASS))
- (:ALL (CLOS::COMPUTE-INHERITED-METHODS
- CLOS-BROWSER::CLASS :ALL)))
- CLOS-BROWSER::CLASS)))
-
- (IL:* IL:|;;| "create the menu using whenselectedfn")
-
- (SETQ CLOS-BROWSER::MENU (IL:CREATE IL:MENU
- IL:TITLE IL:_ (IF CLOS-BROWSER::FIX-FLAG
- (CLASS-NAME CLOS-BROWSER::CLASS)
- "methods")
- IL:MENUFONT IL:_ (WHEN (> (LENGTH CLOS-BROWSER::ITEMS)
- (SLOT-VALUE CLOS-BROWSER::NODE
-
- '
- CLOS-BROWSER::LARGE-MENU-SIZE
- ))
- (SLOT-VALUE CLOS-BROWSER::NODE
-
- '
- CLOS-BROWSER::LARGE-MENU-FONT
- ))
- IL:MENUUSERDATA IL:_ '(:ESCAPE T)
- (IL:* IL:\;
- "cause symbols to print in mouse process's read-table & package")
- IL:WHENSELECTEDFN IL:_ (
- CLOS-BROWSER::MAKE-WHENSELECTEDFN
- CLOS-BROWSER::NODE
- CLOS-BROWSER::INHERITED-OR-ALL
- CLOS-BROWSER::ITEMS)
- IL:ITEMS IL:_ (APPEND CLOS-BROWSER::ITEMS
- (UNLESS CLOS-BROWSER::FIX-FLAG
- '(("Fix menu" NIL
- "Place this menu on the screen. WARNING: cached menues are not kept up-to-date"
- ))))))
-
- (IL:* IL:|;;| "cache the menu on the node")
-
- (CLOS-BROWSER::CACHE CLOS-BROWSER::MENU CLOS-BROWSER::NODE
- CLOS-BROWSER::INHERITED-OR-ALL))
- (IF CLOS-BROWSER::FIX-FLAG
-
- (IL:* IL:|;;| "ask user to position menu")
-
- (IL:MOVEW (IL:ADDMENU CLOS-BROWSER::MENU))
-
- (IL:* IL:|;;| "otherwise just pop it up")
-
- (IL:MENU CLOS-BROWSER::MENU))))
-
-(DEFMETHOD CLOS-BROWSER::MAKE-WHENSELECTEDFN ((CLOS-BROWSER::NODE CLOS-BROWSER::CLOS-BROWSER-NODE
- )
- &OPTIONAL CLOS-BROWSER::INHERITED-OR-ALL
- CLOS-BROWSER::ITEMS)
- `(LAMBDA
- (CLOS-BROWSER::MENU-ITEM IGNORE CLOS-BROWSER::MOUSE-KEY)
- (LET
- ((CLOS-BROWSER::METHOD-NAME (FIRST CLOS-BROWSER::MENU-ITEM))
- (CLOS-BROWSER::METHOD (SECOND CLOS-BROWSER::MENU-ITEM)))
- (IF (NULL CLOS-BROWSER::METHOD)
-
- (IL:* IL:|;;| "do the non-method items")
-
- (COND
- ((STRING= CLOS-BROWSER::METHOD-NAME "Add method")
- (CLOS-BROWSER:ADD-BROWSER-METHOD ',CLOS-BROWSER::NODE NIL))
- ((STRING= CLOS-BROWSER::METHOD-NAME "Fix menu")
-
- (IL:* IL:|;;| "call MENU-LOCAL-METHODS again to create fixed menu ")
-
- (CLOS-BROWSER::MENU-METHODS ',CLOS-BROWSER::NODE ',CLOS-BROWSER::INHERITED-OR-ALL
- ',CLOS-BROWSER::ITEMS T))
- (T CLOS-BROWSER::OPERATION))
-
- (IL:* IL:|;;| "got a method, lets get an operation")
-
- (LET ((CLOS-BROWSER::OPERATION
- (CASE CLOS-BROWSER::MOUSE-KEY
- (IL:LEFT 'CLOS-BROWSER::EDIT)
- (IL:MIDDLE (IL:MENU (IL:CREATE
- IL:MENU
- IL:TITLE IL:_ CLOS-BROWSER::METHOD-NAME
- IL:ITEMS IL:_
- (SLOT-VALUE ',CLOS-BROWSER::NODE
- ',(CASE CLOS-BROWSER::INHERITED-OR-ALL
- ((NIL :LOCAL)
- '
- CLOS-BROWSER::LOCAL-METHOD-OPERATIONS)
- (:INHERITED
- '
- CLOS-BROWSER::INHERITED-METHOD-OPERATIONS)
- (:ALL 'CLOS-BROWSER::ALL-METHOD-OPERATIONS))))
- )))))
-
- (IL:* IL:|;;| "got an operation, lets use it on the method")
-
- (CASE CLOS-BROWSER::OPERATION
- ((NIL) NIL)
- ((CLOS-BROWSER::COPY CLOS-BROWSER::MOVE) (IL:* IL:\;
- "need to supply destination")
- (FUNCALL CLOS-BROWSER::OPERATION CLOS-BROWSER::METHOD
-
- (IL:* IL:|;;| "to class")
-
- (PROGN (UNLESS (SLOT-VALUE CLOS-BROWSER:CLOS-ICON
- 'CLOS-BROWSER::DESTINATION-BROWSER)
- (ERROR "Please box a destination class, then say OK."))
- (SLOT-VALUE (SLOT-VALUE (SLOT-VALUE CLOS-BROWSER:CLOS-ICON
-
- 'CLOS-BROWSER::DESTINATION-BROWSER
- )
- `WEB:BOXED-NODE)
- `CLOS-BROWSER::CLASS))
-
- (IL:* IL:|;;| "from class")
-
- (SLOT-VALUE ',CLOS-BROWSER::NODE 'CLOS-BROWSER::CLASS)))
- ((DELETE) (IL:* IL:\;
- "need to supply extra confirm")
- (WHEN (IL:MOUSECONFIRM (FORMAT NIL
- "Are you sure you wish to delete the ~A method?"
- (CLOS::FULL-METHOD-NAME CLOS-BROWSER::METHOD)))
- (FUNCALL CLOS-BROWSER::OPERATION CLOS-BROWSER::METHOD)))
- ((CLOS-BROWSER::OVERRIDE) (IL:* IL:\; "use add-method ")
- (FUNCALL CLOS-BROWSER::OPERATION ',CLOS-BROWSER::NODE CLOS-BROWSER::METHOD))
- (OTHERWISE (FUNCALL CLOS-BROWSER::OPERATION CLOS-BROWSER::METHOD))))))))
-
-(DEFMETHOD CLOS-BROWSER::DESCRIBE-CLASS ((CLOS-BROWSER::SELF CLOS-BROWSER::CLOS-BROWSER-NODE))
- (CLOS::DESCRIBE-OBJECT (SLOT-VALUE CLOS-BROWSER::SELF 'CLOS-BROWSER::CLASS)
- *TRACE-OUTPUT*))
-
-(DEFMETHOD CLOS-BROWSER::DOCUMENTATION-CLASS ((CLOS-BROWSER::SELF CLOS-BROWSER::CLOS-BROWSER-NODE
- ))
- (DOCUMENTATION (SLOT-VALUE CLOS-BROWSER::SELF 'CLOS-BROWSER::CLASS)))
-
-(DEFMETHOD CLOS-BROWSER::PRINT-CLASS ((CLOS-BROWSER::SELF CLOS-BROWSER::CLOS-BROWSER-NODE))
- (PPRINT (IL:GETDEF (SLOT-VALUE (SLOT-VALUE CLOS-BROWSER::SELF `CLOS-BROWSER::CLASS)
- 'CLOS::NAME)
- 'CLOS-BROWSER::CLASSES)))
-
-(DEFMETHOD CLOS-BROWSER::SPECIALIZE-CLASS ((CLOS-BROWSER::NODE CLOS-BROWSER::CLOS-BROWSER-NODE)
- &OPTIONAL CLOS-BROWSER::FORM
- CLOS-BROWSER::NEW-CLASS-NAME)
- (CLOS-BROWSER::SPECIALIZE (SLOT-VALUE CLOS-BROWSER::NODE 'CLOS-BROWSER::CLASS)
- CLOS-BROWSER::FORM CLOS-BROWSER::NEW-CLASS-NAME))
-
-(DEFUN CLOS-BROWSER::COMPLETE-ADD-METHOD (CLOS-BROWSER::CONTEXT STRUCTURE &OPTIONAL (
- CLOS-BROWSER::CHANGED?
- T))
- (DECLARE (IGNORE CLOS-BROWSER::CONTEXT))
- (CASE CLOS-BROWSER::CHANGED?
- ((:ABORT NIL) NIL)
- (OTHERWISE (EVAL (COPY-TREE (IL:* IL:\;
- "to ensure the original list does not get destructively clobbered")
- STRUCTURE)))))
-
-(DEFUN CLOS-BROWSER::COMPLETE-SPECIALIZE (IGNORE STRUCTURE CLOS-BROWSER::CHANGED?)
- (DECLARE (IGNORE CLOS-BROWSER::CONTEXT))
- (CASE CLOS-BROWSER::CHANGED?
- ((:ABORT NIL) NIL)
- (T (LET ((CLOS-BROWSER::ORIGINALCURSOR (IL:CURSOR)))
- (UNWIND-PROTECT
- (PROGN (IL:SETCURSOR IL:WAITINGCURSOR)
- (LET ((CLOS-BROWSER::SUB-CLASS (EVAL (COPY-TREE
- (IL:* IL:\;
- "so original list does not get clobbered if this class's name changes")
- STRUCTURE)))
- CLOS-BROWSER::SUPER-CLASS)
-
- (IL:* IL:|;;| "check for bug")
-
- (WHEN (SYMBOLP CLOS-BROWSER::SUB-CLASS)
- (SETQ CLOS-BROWSER::SUB-CLASS (FIND-CLASS CLOS-BROWSER::SUB-CLASS)
- ))
- (DOLIST (CLOS-BROWSER::BROWSER (SLOT-VALUE CLOS-BROWSER:CLOS-ICON
- 'CLOS-BROWSER::CLASS-BROWSERS))
- (DOLIST (CLOS-BROWSER::SUPER-CLASS (SLOT-VALUE
- CLOS-BROWSER::SUB-CLASS
-
- '
- CLOS::DIRECT-SUPERCLASSES
- ))
- (WHEN (CLOS-BROWSER::CONTAINS-P CLOS-BROWSER::SUPER-CLASS
- CLOS-BROWSER::BROWSER)
- (CLOS-BROWSER::ADD-ROOT CLOS-BROWSER::BROWSER
- CLOS-BROWSER::SUB-CLASS)
- (RETURN))))))
- (IL:SETCURSOR CLOS-BROWSER::ORIGINALCURSOR))))))
-
-(DEFUN CLOS-BROWSER::LYRIC-COMPLETE-SPECIALIZE (IGNORE STRUCTURE)
- (LET ((CLOS-BROWSER::ORIGINALCURSOR (IL:CURSOR)))
- (UNWIND-PROTECT
- (PROGN (IL:SETCURSOR IL:WAITINGCURSOR)
- (LET ((CLOS-BROWSER::SUB-CLASS (EVAL (COPY-TREE
- (IL:* IL:\;
- "so original list does not get clobbered if this class's name changes")
- STRUCTURE)))
- CLOS-BROWSER::SUPER-CLASS)
-
- (IL:* IL:|;;| "check for bug")
-
- (WHEN (SYMBOLP CLOS-BROWSER::SUB-CLASS)
- (SETQ CLOS-BROWSER::SUB-CLASS (CLOS::SYMBOL-CLASS CLOS-BROWSER::SUB-CLASS
- )))
- (DOLIST (CLOS-BROWSER::BROWSER (SLOT-VALUE CLOS-BROWSER:CLOS-ICON
- 'CLOS-BROWSER::CLASS-BROWSERS))
- (DOLIST (CLOS-BROWSER::SUPER-CLASS (SLOT-VALUE CLOS-BROWSER::SUB-CLASS
- 'CLOS::LOCAL-SUPERS))
- (WHEN (CLOS-BROWSER::CONTAINS-P CLOS-BROWSER::SUPER-CLASS
- CLOS-BROWSER::BROWSER)
- (CLOS-BROWSER::ADD-ROOT CLOS-BROWSER::BROWSER
- CLOS-BROWSER::SUB-CLASS)
- (RETURN))))))
- (IL:SETCURSOR CLOS-BROWSER::ORIGINALCURSOR))))
-
-(DEFUN CLOS-BROWSER::THIS-CLASS-NODE-P (CLOS-BROWSER::CLASS CLOS-BROWSER::NODE)
- (EQ CLOS-BROWSER::CLASS (SLOT-VALUE CLOS-BROWSER::NODE 'CLOS-BROWSER::CLASS)))
-
-(DEFUN CLOS::CLASS-DIRECT-METHODS (CLOS::CLASS)
- (SLOT-VALUE CLOS::CLASS 'CLOS::DIRECT-METHODS))
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;| "OPERATORS ON CLOS::STANDARD-CLASS (directly)")
-
-
-(DEFMETHOD CLOS::COMPUTE-INHERITED-METHODS ((CLOS::SELF STANDARD-CLASS)
- &OPTIONAL CLOS::ALL-FLAG)
- "Compute and return all inherited methods of a class. If all-flag eq :all then methods on t and the passed class are included."
-
- (IL:* IL:|;;| "The following does not use generic function dispatch-orders, discriminating-functions, or classical-method-tables.")
-
- (IL:* IL:|;;| "For each method in the direct-methods of each inherited class in the class-precedence-list for the class of interest, in class precedence order check to see if we have already analyzed its generic function.")
-
- (IL:* IL:|;;| "If it is a new gf then if there is exactly one type specifier then add the direct method to the list of inherited methods.")
-
- (IL:* IL:|;;| "If there is more than one type specifier then for every method in the gf for each specializer if the specializing class is equal to or later than the current class in the class precedence list, ignoring t, pushnew the method on the list of inherited methods.ÿÿ ")
-
- (LET
- ((CLOS::FILTERED-CLASSES NIL)
- (CLOS::MY-GFS NIL)
- (CLOS::CLASS-PRECEDENCE-LIST (SLOT-VALUE CLOS::SELF 'CLOS::CLASS-PRECEDENCE-LIST))
- (CLOS::INHERITED-METHODS NIL)
- (CLOS::DIRECT-METHODS (CAR (SLOT-VALUE CLOS::SELF 'CLOS::DIRECT-METHODS)))
- (CLOS::T-CLASS (FIND-CLASS 'T)))
- (UNLESS (EQ CLOS::ALL-FLAG :ALL) (IL:* IL:\;
- "ignore t and the bottom class ")
- (PUSH CLOS::T-CLASS CLOS::FILTERED-CLASSES)
- (PUSH CLOS::SELF CLOS::FILTERED-CLASSES)
- (SETQ CLOS::MY-GFS (MAPCAR #'CLOS::METHOD-GENERIC-FUNCTION CLOS::DIRECT-METHODS)))
- (DOLIST (CLOS::CLASS CLOS::CLASS-PRECEDENCE-LIST)
- (UNLESS (MEMBER CLOS::CLASS CLOS::FILTERED-CLASSES)
- (DOLIST (CLOS::DIRECT-METHOD (CAR (CLOS::CLASS-DIRECT-METHODS CLOS::CLASS)))
- (LET ((CLOS::GF (CLOS::METHOD-GENERIC-FUNCTION CLOS::DIRECT-METHOD)))
- (UNLESS (MEMBER CLOS::GF CLOS::MY-GFS :TEST #'EQ)
- (IF (= 1 (LENGTH (SLOT-VALUE CLOS::DIRECT-METHOD 'CLOS::SPECIALIZERS))
- (IL:* IL:\; "Note: this check relies on guaranteed congruent lambda lists. There should be some way to query the gf directly.")
- )
-
- (IL:* IL:|;;|
- "then only one specializer so this method must be inherited. ")
-
- (PUSH CLOS::DIRECT-METHOD CLOS::INHERITED-METHODS)
-
- (IL:* IL:|;;| "otherwise more than one so must look at specializers ")
-
- (DOLIST (CLOS::GF-METHOD (SLOT-VALUE CLOS::GF 'CLOS::METHODS))
- (DOLIST (CLOS::SPECIFIER (SLOT-VALUE CLOS::GF-METHOD
- 'CLOS::SPECIALIZERS))
- (UNLESS (OR (EQ CLOS::T-CLASS CLOS::SPECIFIER)
- (NOT (MEMBER CLOS::SPECIFIER
- CLOS::CLASS-PRECEDENCE-LIST :TEST
- #'EQ)))
- (PUSHNEW CLOS::GF-METHOD CLOS::INHERITED-METHODS)
- (RETURN))))))
- (PUSH CLOS::GF CLOS::MY-GFS)))))
- CLOS::INHERITED-METHODS))
-
-(DEFMETHOD CLOS-BROWSER::SPECIALIZE ((CLOS-BROWSER::CLASS STANDARD-CLASS)
- &OPTIONAL CLOS-BROWSER::FORM CLOS-BROWSER::NEW-CLASS-NAME)
- (DECLARE (SPECIAL SEDIT::BASIC-GAP))
- (LET* ((CLASS-NAME (CLASS-NAME CLOS-BROWSER::CLASS))
- CLOS-BROWSER::CONTEXT
- (CLOS-BROWSER::NAME (FORMAT NIL "New sub-class of ~A" CLASS-NAME))
- (*PACKAGE* (SYMBOL-PACKAGE CLASS-NAME)))
- (UNLESS CLOS-BROWSER::FORM
- (SETQ CLOS-BROWSER::FORM (LIST 'DEFCLASS (OR CLOS-BROWSER::NEW-CLASS-NAME
- SEDIT::BASIC-GAP)
- (LIST CLASS-NAME)
- (LIST SEDIT::BODY-GAP))))
-
- (IL:* IL:|;;| "call sedit")
-
- (SEDIT:SEDIT CLOS-BROWSER::FORM (LIST :NAME CLOS-BROWSER::NAME :COMPLETION-FN
- #'CLOS-BROWSER::COMPLETE-SPECIALIZE)
- :DONTWAIT)))
-
-(DEFMETHOD CLOS-BROWSER::SUBCLASSES-OF ((CLOS-BROWSER::CLASS STANDARD-CLASS))
- (APPEND (LIST CLOS-BROWSER::CLASS)
- (IL:FOR CLOS-BROWSER::SUBCLASS IL:IN (SLOT-VALUE CLOS-BROWSER::CLASS
- 'CLOS::DIRECT-SUBCLASSES)
- IL:JOIN (IF (SLOT-VALUE CLOS-BROWSER::SUBCLASS 'CLOS::DIRECT-SUBCLASSES)
- (CLOS-BROWSER::SUBCLASSES-OF CLOS-BROWSER::SUBCLASS)
- (LIST CLOS-BROWSER::SUBCLASS)))))
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;| "OPERATORS ON CLOS::STANDARD-METHOD")
-
-
-(DEFMETHOD CLOS-BROWSER::DELETE-METHOD ((CLOS-BROWSER::METHOD STANDARD-METHOD))
- (REMOVE-METHOD (SLOT-VALUE CLOS-BROWSER::METHOD 'CLOS::GENERIC-FUNCTION)
- CLOS-BROWSER::METHOD))
-
-(DEFMETHOD CLOS-BROWSER::COPY ((CLOS-BROWSER::METHOD STANDARD-METHOD)
- (CLOS-BROWSER::TO-CLASS STANDARD-CLASS)
- &OPTIONAL CLOS-BROWSER::FROM-CLASS)
- (WHEN (EQ CLOS-BROWSER::TO-CLASS CLOS-BROWSER::FROM-CLASS)
- (RETURN-FROM CLOS-BROWSER::COPY))
-
- (IL:* IL:|;;| "if we have the source code, find all the references to the from class, change them to the to-class, and evaluate the new form. If from-class is not provided, if method is specialized on just one class, use it, otherwise ask the user.")
-
- (IL:* IL:|;;| "If we dont have source code, we could ask if you want to just move the method object, but instead we print a complaint and punt.")
-
- (LET ((CLOS-BROWSER::METHOD-DEFINITION (COPY-TREE (XCL:IGNORE-ERRORS (IL:GETDEF (
- CLOS::FULL-METHOD-NAME
-
- CLOS-BROWSER::METHOD
- )
-
- 'CLOS-BROWSER::METHODS
- ))))
- (CLOS-BROWSER::NON-T-CLASSES (MAPCAR #'(LAMBDA (CLOS-BROWSER::CLASS)
- (UNLESS (EQ CLOS-BROWSER::CLASS 'T)
- CLOS-BROWSER::CLASS))
- (CLOS::METHOD-SPECIALIZERS CLOS-BROWSER::METHOD))))
- (UNLESS CLOS-BROWSER::METHOD-DEFINITION
- (FORMAT T "The definition for ~A is not loaded" (CLOS::FULL-METHOD-NAME
- CLOS-BROWSER::METHOD NIL))
- (RETURN-FROM CLOS-BROWSER::COPY NIL))
- (IF CLOS-BROWSER::FROM-CLASS
-
- (IL:* IL:|;;| "method should be specialized on from-class.")
-
- (UNLESS (MEMBER CLOS-BROWSER::FROM-CLASS CLOS-BROWSER::NON-T-CLASSES)
- (ERROR "The ~A method is not specialized on the ~A class" (CLOS::FULL-METHOD-NAME
- CLOS-BROWSER::METHOD NIL)
- (CLASS-NAME CLOS-BROWSER::FROM-CLASS)))
-
- (IL:* IL:|;;| "otherwise see if we can deduce FROM-CLASS ")
-
- (CASE (LENGTH CLOS-BROWSER::NON-T-CLASSES)
- (0 (FORMAT T "Unspecialized methods cannot be copied. ~A" (CLOS::FULL-METHOD-NAME
- CLOS-BROWSER::METHOD NIL)))
- (1 (SETQ CLOS-BROWSER::FROM-CLASS (CAR CLOS-BROWSER::NON-T-CLASSES)))
- (OTHERWISE (SETQ CLOS-BROWSER::FROM-CLASS (CLOS::SYMBOL-CLASS
- (IL:PROMPTFORWORD (FORMAT NIL
- "Which class in ~A do you wish to move from?"
- (
- CLOS::FULL-METHOD-NAME
-
- CLOS-BROWSER::METHOD
- NIL))))))))
-
- (IL:* IL:|;;| "should contain from-class. If it is not the same, abort.")
-
- (CLOS-BROWSER::REPLACE-SPECIALIZERS CLOS-BROWSER::METHOD-DEFINITION (CLASS-NAME
- CLOS-BROWSER::FROM-CLASS
- )
- (CLASS-NAME CLOS-BROWSER::TO-CLASS))
- (PRINT (EVAL CLOS-BROWSER::METHOD-DEFINITION))))
-
-(DEFMETHOD CLOS-BROWSER::MOVE ((CLOS-BROWSER::METHOD STANDARD-METHOD)
- (CLOS-BROWSER::TO-CLASS STANDARD-CLASS)
- &OPTIONAL CLOS-BROWSER::FROM-CLASS)
- (WHEN (EQ CLOS-BROWSER::TO-CLASS CLOS-BROWSER::FROM-CLASS)
- (RETURN-FROM CLOS-BROWSER::MOVE))
- (IF (CLOS-BROWSER::COPY CLOS-BROWSER::METHOD CLOS-BROWSER::TO-CLASS CLOS-BROWSER::FROM-CLASS)
- (CLOS-BROWSER::DELETE-METHOD CLOS-BROWSER::METHOD)
- (FORMAT T "copy of ~A to ~A failed" (XCL:IGNORE-ERRORS (CLOS::FULL-METHOD-NAME
- CLOS-BROWSER::METHOD))
- (XCL:IGNORE-ERRORS (CLASS-NAME CLOS-BROWSER::TO-CLASS)))))
-
-(DEFMETHOD CLOS-BROWSER::PRINT-DEFINITION ((CLOS-BROWSER::SELF STANDARD-METHOD))
- (PPRINT (IL:GETDEF (CLOS::FULL-METHOD-NAME CLOS-BROWSER::SELF)
- 'CLOS-BROWSER::METHODS)))
-
-(DEFMETHOD CLOS-BROWSER::DESCRIBE-METHOD ((CLOS-BROWSER::METHOD CLOS::METHOD))
- (CLOS::DESCRIBE-OBJECT CLOS-BROWSER::METHOD *TRACE-OUTPUT*))
-
-(DEFMETHOD CLOS-BROWSER::RENAME ((CLOS-BROWSER::METHOD STANDARD-METHOD)
- &OPTIONAL CLOS-BROWSER::NEW-NAME)
- (UNLESS CLOS-BROWSER::NEW-NAME
- (SETQ CLOS-BROWSER::NEW-NAME (READ (MAKE-STRING-INPUT-STREAM (IL:PROMPTFORWORD
- (FORMAT NIL "~%New name for ~A"
- (CLOS::FULL-METHOD-NAME
- CLOS-BROWSER::METHOD))))
- )))
- (LET ((CLOS-BROWSER::METHOD-DEFINITION (XCL:IGNORE-ERRORS (IL:GETDEF CLOS-BROWSER::METHOD))))
- (UNLESS CLOS-BROWSER::METHOD-DEFINITION
- (FORMAT T "The definition for ~A is not loaded" (CLOS::FULL-METHOD-NAME
- CLOS-BROWSER::METHOD NIL))
- (RETURN-FROM CLOS-BROWSER::RENAME NIL))
- (IF (AND (SETF (SECOND CLOS-BROWSER::METHOD-DEFINITION)
- CLOS-BROWSER::NEW-NAME)
- (PRINT (EVAL CLOS-BROWSER::METHOD-DEFINITION)))
- (DELETE CLOS-BROWSER::METHOD)
- (FORMAT T "~%Rename of ~A to ~A failed" (XCL:IGNORE-ERRORS (CLOS::FULL-METHOD-NAME
- CLOS-BROWSER::METHOD))
- CLOS-BROWSER::NEW-NAME))))
-
-(DEFMETHOD CLOS-BROWSER::UPDATE-CACHED-MENUES ((CLOS-BROWSER::METHOD STANDARD-METHOD)
- &OPTIONAL
- (CLOS-BROWSER::CACHE-SWITCH (SLOT-VALUE
-
- CLOS-BROWSER:CLOS-ICON
-
- '
- CLOS-BROWSER::MENU-CACHE-SWITCH
- )))
- "set cached menues for this method's class to nil"
- (LET
- ((CLOS-BROWSER::ORIGINALCURSOR (IL:CURSOR)))
- (UNWIND-PROTECT
- (PROGN (IL:SETCURSOR IL:WAITINGCURSOR)
- (DOLIST (CLOS-BROWSER::BROWSER (SLOT-VALUE CLOS-BROWSER:CLOS-ICON
- 'CLOS-BROWSER::CLASS-BROWSERS))
- (DOLIST (CLOS-BROWSER::CLASS (SLOT-VALUE CLOS-BROWSER::METHOD 'CLOS::SPECIALIZERS)
- )
-
- (IL:* IL:|;;|
- "fix bug in the inconsistent way CLOS objects store T class specializers and do method lookup.")
-
- (WHEN (EQ CLOS-BROWSER::CLASS T)
- (SETQ CLOS-BROWSER::CLASS (CLOS::SYMBOL-CLASS T)))
- (LET ((CLOS-BROWSER::NODE (CLOS-BROWSER::BROWSER-CONTAINS-P
- CLOS-BROWSER::CLASS CLOS-BROWSER::BROWSER)))
- (WHEN CLOS-BROWSER::NODE
- (CASE CLOS-BROWSER::CACHE-SWITCH
- (:LAZY
- (CLOS-BROWSER::UNCACHE CLOS-BROWSER::NODE)
- (CLOS-BROWSER::UNCACHE CLOS-BROWSER::NODE :ALL)
- (DOLIST (CLOS-BROWSER::SUB-CLASS (CLOS-BROWSER::SUBCLASSES-OF
- (SLOT-VALUE
- CLOS-BROWSER::NODE
- 'CLOS-BROWSER::CLASS)
- ))
- (WHEN (SETQ CLOS-BROWSER::NODE (CLOS-BROWSER::CONTAINS-P
- CLOS-BROWSER::SUB-CLASS
- CLOS-BROWSER::BROWSER))
- (CLOS-BROWSER::UNCACHE CLOS-BROWSER::NODE :INHERITED)
- (CLOS-BROWSER::UNCACHE CLOS-BROWSER::NODE :ALL))))
- (:EAGER (PRINT ":eager method menu cacheing not yet implemented."
- ))
- (OTHERWISE
- NIL (IL:* IL:\; "do nothing")
- )))))))
- (IL:SETCURSOR CLOS-BROWSER::ORIGINALCURSOR))))
-
-(DEFMETHOD CLOS-BROWSER::WHO-OWNS ((CLOS-BROWSER::METHOD STANDARD-METHOD))
- (PRINT (CLOS::FULL-METHOD-NAME CLOS-BROWSER::METHOD)))
-
-(DEFMETHOD ADD-METHOD :AFTER
- ((CLOS-BROWSER::GENERIC-FUNCTION STANDARD-GENERIC-FUNCTION)
- (CLOS-BROWSER::METHOD STANDARD-METHOD))
- "Update cached menues."
- (LET (CLOS-BROWSER::CACHE-SWITCH)
- (WHEN (AND CLOS-BROWSER::METHOD (SLOT-VALUE CLOS-BROWSER:CLOS-ICON
- 'CLOS-BROWSER::CLASS-BROWSERS)
- (IL:* IL:\; "there are some browsers")
- (NOT (EQ (SETQ CLOS-BROWSER::CACHE-SWITCH (SLOT-VALUE CLOS-BROWSER:CLOS-ICON
- 'CLOS-BROWSER::MENU-CACHE-SWITCH)
- )
- :NONE)) (IL:* IL:\;
- "we want auto cache updating")
- )
- (CLOS-BROWSER::UPDATE-CACHED-MENUES CLOS-BROWSER::METHOD CLOS-BROWSER::CACHE-SWITCH))
- CLOS-BROWSER::GENERIC-FUNCTION))
-
-(DEFUN CLOS-BROWSER::REPLACE-SPECIALIZERS (CLOS-BROWSER::METHOD-DEFINITION
- CLOS-BROWSER::FROM-CLASS-NAME
- CLOS-BROWSER::TO-CLASS-NAME &KEY
- CLOS-BROWSER::IN-LAMDA-LIST-ONLY-FLAG)
- (NSUBST CLOS-BROWSER::TO-CLASS-NAME CLOS-BROWSER::FROM-CLASS-NAME
- (IF CLOS-BROWSER::IN-LAMDA-LIST-ONLY-FLAG
-
- (IL:* IL:|;;| "get the lamba list")
-
- (THIRD (MULTIPLE-VALUE-LIST (CLOS::PARSE-DEFMETHOD (CDR CLOS-BROWSER::METHOD-DEFINITION
- ))))
- (IL:* IL:\; "note this gets argument names as well as specializers. Usually not what you want. Needs to be made smarter to just get specializers.")
-
- (IL:* IL:|;;| "otherwise do the whole method")
-
- CLOS-BROWSER::METHOD-DEFINITION)))
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;;| "SETUP RELEASE INFO")
-
-
-(IL:RPAQ CLOS-BROWSER::RELEASE-ID "0.02")
-
-(IL:RPAQ CLOS-BROWSER::SYSTEM-DATE (CAAR (IL:GETPROP 'IL:CLOS-BROWSER 'IL:FILEDATES)))
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;| "SETUP BACKGROUND MENU")
-
-
-(DEFUN CLOS-BROWSER::IN-SELECT-PACKAGE ()
- "pops up a menu of packages" (IL:* IL:\; "Edited 18-Mar-87 13:13 by smL")
- (IL:* IL:\; "")
-
- (IL:* IL:|;;| "kirk: 16Mar88 modified for clos-browser")
-
- (LET ((PACKAGE (IL:MENU
- (IL:|create|
- IL:MENU
- IL:TITLE IL:_ "Select package"
- IL:ITEMS IL:_
- (IL:SORT (IL:|for| PACKAGE IL:|in| (LIST-ALL-PACKAGES) IL:|bind|
- IL:PACKAGE-NAME
- IL:|collect| (IL:SETQ IL:PACKAGE-NAME (PACKAGE-NAME PACKAGE))
- `(,(IL:CONCAT (OR (CAR (PACKAGE-NICKNAMES PACKAGE))
- IL:PACKAGE-NAME)
- ":")
- ',IL:PACKAGE-NAME
- ,(IL:CONCAT "Set the current package to " IL:PACKAGE-NAME ":"
- )))
- (IL:FUNCTION (IL:LAMBDA (IL:X IL:Y)
- (IL:ALPHORDER (CAR IL:X)
- (CAR IL:Y)))))
- IL:CENTERFLG IL:_ T))))
- (IL:|if| PACKAGE
- IL:|then| (IN-PACKAGE PACKAGE))))
-
-(DEFUN CLOS-BROWSER::CLASSES-IN-PACKAGE (PACKAGE &OPTIONAL CLOS-BROWSER::MAP-ON-PACKAGE)
- "Retrieves a list of all the classes for a given package. When map-on-package is t this can be very slow."
-
- (IL:* IL:|;;| "The maphash is always fast, whereas for some strange reason map-on-package varys among packages greatly.")
-
- (LET ((CLOS-BROWSER::CLASSES))
- (UNLESS (TYPEP PACKAGE 'PACKAGE)
- (SETQ PACKAGE (FIND-PACKAGE PACKAGE)))
- (IF CLOS-BROWSER::MAP-ON-PACKAGE
- (DO-SYMBOLS (CLOS-BROWSER::SYM PACKAGE)
- (IF (AND (EQ (SYMBOL-PACKAGE CLOS-BROWSER::SYM)
- PACKAGE)
- (CLOS::SYMBOL-CLASS CLOS-BROWSER::SYM T))
- (PUSH CLOS-BROWSER::SYM CLOS-BROWSER::CLASSES)))
- (MAPHASH #'(LAMBDA (CLOS-BROWSER::KEY CLOS-BROWSER::VAL)
- (IF (EQ (SYMBOL-PACKAGE CLOS-BROWSER::KEY)
- PACKAGE)
- (PUSH CLOS-BROWSER::KEY CLOS-BROWSER::CLASSES)))
- CLOS::*FIND-CLASS*))
- CLOS-BROWSER::CLASSES))
-
-
-(IL:* IL:|;;| "pushnew should eliminate this")
-
-
-(SETQ IL:|BackgroundMenuCommands| (REMOVE 'IL:|BrowseClass| IL:|BackgroundMenuCommands| :KEY
- #'CAR))
-
-(PUSH '(IL:|BrowseClass| (CLOS-BROWSER:BROWSE-CLASS)
- "Bring up a class browser."
- (IL:SUBITEMS (IL:|all in a package| (CLOS-BROWSER:BROWSE-CLASS (
- CLOS-BROWSER::CLASSES-IN-PACKAGE
- (
- CLOS-BROWSER::IN-SELECT-PACKAGE
- )))
-
- "Select a package and browse all the classes defined in that package."
- )))
- IL:|BackgroundMenuCommands|)
-
-(SETQ IL:|BackgroundMenu| NIL)
-(IL:PUTPROPS IL:NEW-CLOS-BROWSER IL:COPYRIGHT ("Venue" 1991))
-(IL:DECLARE\: IL:DONTCOPY
- (IL:FILEMAP (NIL)))
-IL:STOP
diff --git a/obsolete/clos/2.0/WEB-EDITOR b/obsolete/clos/2.0/WEB-EDITOR
deleted file mode 100644
index 581d6cf7..00000000
--- a/obsolete/clos/2.0/WEB-EDITOR
+++ /dev/null
@@ -1,2338 +0,0 @@
-(DEFINE-FILE-INFO PACKAGE (LET ((*PACKAGE*)) (* ;;
-"Put IN Seven EXtremely Random USEr Interface COmmands ") (CLPROVIDE "WEB-EDITOR") (CLIN-PACKAGE
-"WEB" NICKNAMES (QUOTE ("WEB-EDITOR"))) (* ;; "EXPORT") (CLFLET ((XCL-USEREXPORT-FROM-WEB (&REST
-XCL-USERSYMBOL-NAMES) (LET ((XCL-USERPKG (CLFIND-PACKAGE "WEB"))) (CLDOLIST (XCL-USERNAME
-XCL-USERSYMBOL-NAMES) (EXPORT (CLINTERN XCL-USERNAME XCL-USERPKG) XCL-USERPKG))))) (* ;;
-"Class Definitions and Slot Access") (XCL-USEREXPORT-FROM-WEB "WEB-EDITOR" "WEB-NODE" "NODE-NAME"
-"NODE-LINKS" "NODE-BACK-LINKS" "LOCAL-COMMANDS" "NODE-MOVER-P" "TITLE-ITEMS" "LEFT-BUTTON-ITEMS"
-"MIDDLE-BUTTON-ITEMS" "RIGHT-BUTTON-ITEMS" "BROWSE-FONT") (* ;; "For Subclassing") (XCL-USEREXPORT-FROM-WEB
- "GET-LABEL" "GET-SUBS" "ICON-TITLE" "NODE-MENU-ITEMS" "REORDER-TREE" "MOVE-NODE") (* ;; "Top Level")
-(XCL-USEREXPORT-FROM-WEB "MAKE-WEB-EDITOR" "INITIALIZE-EDITOR" "BROWSE" "DISPLAY-BROWSER" "DESTROY"
-"ADD-NODE" "NOTICE-NODE" "REMOVE-NODE" "RENAME-NODE") (* ;; "Window Operations") (XCL-USEREXPORT-FROM-WEB
- "SHRINK" "MOVE" "CLEAR" "PROMPT-PRINT" "PROMPT-READ" "PROMPT-FOR-LIST" "PROMPT-FOR-STRING"
-"PROMPT-FOR-WORD") (* ;; "Recomputing and Changing parameters") (XCL-USEREXPORT-FROM-WEB "RECOMPUTE"
- "RECOMPUTE-IN-PLACE" "RECOMPUTE-LABELS" "RECOMPUTE-IF-OPEN" "CLEAR-LABEL-CACHE" "CHANGE-FONT-SIZE"
-"CHANGE-FORMAT" "SHAPE-TO-HOLD") (* ;; "For CLOS-BROWSER???") (XCL-USEREXPORT-FROM-WEB "BOXED-NODE"
-"BOX-NODE")) (* ;; "USE") (CLUSE-PACKAGE (QUOTE ("CLOS" "LISP" "XCL")) "WEB") (* ;; "IMPORT") (CLFLET
- ((XCL-USERIMPORT-FROM-PACKAGE (XCL-USERNAMES XCL-USERFROM &OPTIONAL XCL-USERSHADOW-P) (LET ((
-XCL-USERFROM-PACKAGE (CLFIND-PACKAGE XCL-USERFROM))) (CLFUNCALL (CLIF XCL-USERSHADOW-P (
-CLFUNCTION CLSHADOWING-IMPORT) (CLFUNCTION IMPORT)) (CLMAPCAR (CLFUNCTION (CLLAMBDA (XCL-USERNAME
-) (CLINTERN XCL-USERNAME XCL-USERFROM-PACKAGE))) XCL-USERNAMES))))) (XCL-USERIMPORT-FROM-PACKAGE
- (QUOTE ("CLASSES" "METHODS")) "CLOS") (XCL-USERIMPORT-FROM-PACKAGE (QUOTE ("FALSE")) "XCL") (
-XCL-USERIMPORT-FROM-PACKAGE (QUOTE ("FUNCTIONS" "FNS" "VARIABLES" "VARS" "BITMAPS" "COMS")) "IL")) (
-CLFIND-PACKAGE "WEB")) READTABLE "XCL" BASE 10)
-(IL:FILECREATED " 5-Nov-91 08:07:23"
-IL:|{DSK}local>users>welch>lisp>clos>browser>WEB-EDITOR.;8| 132667
-
- IL:|changes| IL:|to:| (IL:TYPES WEB-NODE WEB-EDITOR)
-
- IL:|previous| IL:|date:| "30-Sep-91 23:36:34"
-IL:|{DSK}local>users>welch>lisp>clos>browser>WEB-EDITOR.;6|)
-
-
-; Copyright (c) 1987, 1988, 1989, 1991 by Xerox Corporation. All rights reserved.
-
-(IL:PRETTYCOMPRINT IL:WEB-EDITORCOMS)
-
-(IL:RPAQQ IL:WEB-EDITORCOMS ((COMS IL:* FILE-HEADER-COMS)
-
- (IL:* IL:|;;| "")
-
-
-
-(IL:* IL:|;;;| "WEB EDITOR ")
-
-
- (IL:* IL:|;;| "")
-
-
- (IL:* IL:|;;| "Package Setup")
-
- (IL:DECLARE\: IL:DONTCOPY (IL:PROPS (IL:WEB-EDITOR
- IL:MAKEFILE-ENVIRONMENT)
- (IL:WEB-EDITOR IL:FILETYPE)))
-
- (IL:* IL:|;;| "Global Variables")
-
-
- (IL:* IL:|;;| "global for cross-editor boxed node destination (like caret for current tty process copy and move destinations)")
-
- (VARIABLES DESTINATION-BROWSER)
- (COMS (IL:* IL:\; "Client Interface")
-
- (IL:* IL:|;;| "Web Node Class")
-
- (CLASSES WEB-NODE)
-
- (IL:* IL:|;;| " Web Editor Class")
-
- (CLASSES WEB-EDITOR)
-
- (IL:* IL:|;;| "Top Level")
-
- (FUNCTIONS MAKE-WEB-EDITOR)
- (METHODS (INITIALIZE-EDITOR (WEB-EDITOR))
- (DESTROY (WEB-EDITOR))
- (BROWSE (WEB-EDITOR)))
- (METHODS
-
- (IL:* IL:|;;| "For Subclassing")
-
- (GET-LABEL (WEB-EDITOR WEB-NODE))
- (GET-SUBS (WEB-EDITOR WEB-NODE))
- (ICON-TITLE (WEB-EDITOR))
-
- (IL:* IL:|;;| "Adding, Removing, Hiding Nodes.")
-
- (ADD-NODE (WEB-EDITOR WEB-NODE))
- (NOTICE-NODE (WEB-EDITOR WEB-NODE WEB-NODE))
- (REMOVE-NODE (WEB-EDITOR WEB-NODE))
- (DELETE-FROM-BROWSER (WEB-EDITOR))
- (REMOVE-FROM-BAD-LIST (WEB-EDITOR))
-
- (IL:* IL:|;;| "")
-
- (RENAME-NODE (WEB-EDITOR WEB-NODE)))
- (IL:* IL:\; ""))
- (COMS (IL:* IL:\; "Window System Interface")
- (METHODS (UPDATE (WEB-EDITOR))
- (CREATE-WINDOW (WEB-EDITOR))
- (SETUP-WINDOW (WEB-EDITOR))
- (DETACH-LISP-WINDOW (WEB-EDITOR))
- (SHRINK (WEB-EDITOR))
- (SET-OUTER-REGION (WEB-EDITOR))
- (SET-REGION (WEB-EDITOR))
- (MOVE (WEB-EDITOR))
- (MOVE1 (WEB-EDITOR))
- (AFTER-MOVE (WEB-EDITOR))
- (AFTER-RESHAPE (WEB-EDITOR))
- (SCROLL-WINDOW (WEB-EDITOR))
- (CLEAR (WEB-EDITOR))
-
- (IL:* IL:|;;| "Prompt Window Interactions ")
-
- (GET-PROMPT-WINDOW (WEB-EDITOR))
- (REMOVE-PROMPT-WINDOW (WEB-EDITOR))
- (PROMPT-PRINT (WEB-EDITOR))
- (PROMPT-READ (WEB-EDITOR))
- (PROMPT-FOR-LIST (WEB-EDITOR))
- (PROMPT-FOR-STRING (WEB-EDITOR))
- (PROMPT-FOR-WORD (WEB-EDITOR)))
- (FUNCTIONS MOVE-DOWN-P)
- (FNS WEB-WINDOW-AFTER-MOVE-FN WEB-WINDOW-BUTTON-EVENT-FN
- WEB-WINDOW-RESHAPE-FN WEB-WINDOW-CLOSE-FN IL:|PromptRead|
- )
- (FNS WEB-WINDOW-EXPAND-FN)
- (FUNCTIONS WEB-WINDOW-ICON-FN)
- (BITMAPS *WEB-EDITOR-ICON-BM* *WEB-EDITOR-ICON-MASK*)
- (VARIABLES *WEB-EDITOR-TEMPLATE*)
- (VARS (IL:*D-WINDOW-DEFAULT-STREAM* IL:PROMPTWINDOW)
- (WEB-STREAM IL:PROMPTWINDOW)))
- (COMS (IL:* IL:\;
- "Layout and Display Engine")
- (VARS IL:|BrowserMargin| IL:|MaxLatticeHeight|
- IL:|MaxLatticeWidth|)
- (IL:SPECVARS IL:|MaxLatticeHeight| IL:|MaxLatticeWidth|)
- (VARS IL:GRAYSHADE1 IL:GRAYSHADE2 IL:GRAYSHADE3 IL:GRAYSHADE4)
- (FNS TREE-ROOTS CHILD-NODES REACHABLE-NODES!)
- (METHODS (DISPLAY-BROWSER (WEB-EDITOR))
- (BROWSER-OBJECTS (WEB-EDITOR))
- (GET-NODE-LIST (WEB-EDITOR))
- (OBJ-NAME-PAIR (WEB-EDITOR))
- (GRAPH-FITS (WEB-EDITOR))
- (NODE-REGION (WEB-EDITOR))
- (IL:* IL:\; "")
- (RECOMPUTE (WEB-EDITOR))
- (RECOMPUTE-IN-PLACE (WEB-EDITOR))
- (RECOMPUTE-LABELS (WEB-EDITOR))
- (RECOMPUTE-IF-OPEN (WEB-EDITOR))
- (CLEAR-LABEL-CACHE (WEB-EDITOR))
- (OBJECT-FROM-LABEL (WEB-EDITOR))
- (CHANGE-FONT-SIZE (WEB-EDITOR))
- (CHANGE-FORMAT (WEB-EDITOR))
- (CHANGE-MAX-LABEL-SIZE (WEB-EDITOR))
- (SHAPE-TO-HOLD (WEB-EDITOR))
- (IL:* IL:\; "")
- (IL:* IL:\;
- "Node Marking and Selecting")
- (GET-DISPLAY-LABEL (WEB-EDITOR))
- (BOX-NODE (WEB-EDITOR))
- (UNMARK-NODES (WEB-EDITOR))
- (HIGHLIGHT-NODE (WEB-EDITOR))
- (SHADE-NODE (WEB-EDITOR))
- (DISPLAY-NODE-HIGHTLIGHTS (WEB-EDITOR))
- (DISPLAY-NODE-SHADING (WEB-EDITOR))
- (REMOVE-HIGHLIGHTS (WEB-EDITOR))
- (REMOVE-SHADING (WEB-EDITOR))
- (FLASH-NODE (WEB-EDITOR))
- (FLIP-NODE (WEB-EDITOR))
- (POSITION-NODE (WEB-EDITOR)))
- (FNS BOX-PRINT-STRING BREAK-STRING-FOR-BOXING BOX-WINDOW-NODE)
- )
- (COMS (IL:* IL:\; "Button Events")
- (FNS FIND-SELECTED-NODE)
- (METHODS (BUTTON-EVENT-FN (WEB-EDITOR))
- (LEFT-SELECTION (WEB-EDITOR))
- (MIDDLE-SELECTION (WEB-EDITOR))
- (RIGHT-SELECTION (WEB-EDITOR))
- (TITLE-SELECTION (WEB-EDITOR))
- (NODE-SELECTION (WEB-EDITOR))
- (NODE-ACTION (WEB-EDITOR))
- (NODE-MENU-ITEMS (WEB-NODE))
-
- (IL:* IL:|;;| "")
-
- (CHOICE-MENU (WEB-EDITOR))
- (DO-SELECTED-COMMAND (WEB-EDITOR))
- (WHEN-MENU-ITEM-HELD (WEB-EDITOR))
- (ITEM-MENU (WEB-EDITOR))
- (GET-MENU-ITEMS (WEB-EDITOR))
- (CLEAR-MENU-CACHE (WEB-EDITOR)))
- (FNS WEB-MENU-WHENSELECTEDFN WINDOW-WHEN-HELD-FN)
- (FNS SUB-ITEM-SELECTION DUAL-SUB-ITEMS WINDOW-WHEN-HELD-FN
- DO-MENU-METHOD DUAL-MENU DUAL-SELECTION)
- (IL:* IL:\; "Node Moving Protocol")
- (METHODS (NODE-MOVE (WEB-EDITOR))
- (NODE-MOVE-SHALLOW (WEB-EDITOR))
- (SCIONS (WEB-NODE))
- (MAKE-REG-ASSOC (WEB-EDITOR))
- (REORDER-TREE (WEB-EDITOR))
- (MOVE-NODE (WEB-NODE))))
- (IL:* IL:\; "")
-
- (IL:* IL:|;;| "")
-
- (IL:DECLARE\: IL:DONTEVAL@LOAD IL:DOEVAL@COMPILE IL:DONTCOPY
- IL:COMPILERVARS (IL:ADDVARS (IL:NLAMA)
- (IL:NLAML)
- (IL:LAMA WINDOW-WHEN-HELD-FN
- WINDOW-WHEN-HELD-FN)))))
-
-(IL:RPAQQ FILE-HEADER-COMS ((IL:P (FORMAT T
- "~&;WEB-EDITOR Copyright (c) 1987, VENUE Corporation. All rights reserved.~%"
- )
- (PROVIDE "WEB-EDITOR"))))
-
-(FORMAT T "~&;WEB-EDITOR Copyright (c) 1987, VENUE Corporation. All rights reserved.~%")
-
-(PROVIDE "WEB-EDITOR")
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;;| "WEB EDITOR ")
-
-
-
-
-(IL:* IL:|;;| "")
-
-
-
-
-(IL:* IL:|;;| "Package Setup")
-
-(IL:DECLARE\: IL:DONTCOPY
-
-(IL:PUTPROPS IL:WEB-EDITOR IL:MAKEFILE-ENVIRONMENT
- (:PACKAGE (LET ((*PACKAGE*))
-
- (IL:* IL:|;;| "Put IN Seven EXtremely Random USEr Interface COmmands ")
-
- (PROVIDE "WEB-EDITOR")
- (IN-PACKAGE "WEB" :NICKNAMES '("WEB-EDITOR"))
-
- (IL:* IL:|;;| "EXPORT")
-
- (FLET ((XCL-USER::EXPORT-FROM-WEB (&REST XCL-USER::SYMBOL-NAMES)
- (LET ((XCL-USER::PKG (FIND-PACKAGE "WEB")))
- (DOLIST (XCL-USER::NAME XCL-USER::SYMBOL-NAMES)
- (EXPORT (INTERN XCL-USER::NAME XCL-USER::PKG)
- XCL-USER::PKG)))))
-
- (IL:* IL:|;;| "Class Definitions and Slot Access")
-
- (XCL-USER::EXPORT-FROM-WEB "WEB-EDITOR" "WEB-NODE" "NODE-NAME"
- "NODE-LINKS" "NODE-BACK-LINKS" "LOCAL-COMMANDS"
- "NODE-MOVER-P" "TITLE-ITEMS" "LEFT-BUTTON-ITEMS"
- "MIDDLE-BUTTON-ITEMS" "RIGHT-BUTTON-ITEMS" "BROWSE-FONT")
-
- (IL:* IL:|;;| "For Subclassing")
-
- (XCL-USER::EXPORT-FROM-WEB "GET-LABEL" "GET-SUBS" "ICON-TITLE"
- "NODE-MENU-ITEMS" "REORDER-TREE" "MOVE-NODE")
-
- (IL:* IL:|;;| "Top Level")
-
- (XCL-USER::EXPORT-FROM-WEB "MAKE-WEB-EDITOR" "INITIALIZE-EDITOR"
- "BROWSE" "DISPLAY-BROWSER" "DESTROY" "ADD-NODE"
- "NOTICE-NODE" "REMOVE-NODE" "RENAME-NODE")
-
- (IL:* IL:|;;| "Window Operations")
-
- (XCL-USER::EXPORT-FROM-WEB "SHRINK" "MOVE" "CLEAR" "PROMPT-PRINT"
- "PROMPT-READ" "PROMPT-FOR-LIST" "PROMPT-FOR-STRING"
- "PROMPT-FOR-WORD")
-
- (IL:* IL:|;;| "Recomputing and Changing parameters")
-
- (XCL-USER::EXPORT-FROM-WEB "RECOMPUTE" "RECOMPUTE-IN-PLACE"
- "RECOMPUTE-LABELS" "RECOMPUTE-IF-OPEN" "CLEAR-LABEL-CACHE"
- "CHANGE-FONT-SIZE" "CHANGE-FORMAT" "SHAPE-TO-HOLD")
-
- (IL:* IL:|;;| "For CLOS-BROWSER???")
-
- (XCL-USER::EXPORT-FROM-WEB "BOXED-NODE" "BOX-NODE"))
-
- (IL:* IL:|;;| "USE")
-
- (USE-PACKAGE '("CLOS" "LISP" "XCL")
- "WEB")
-
- (IL:* IL:|;;| "IMPORT")
-
- (FLET ((XCL-USER::IMPORT-FROM-PACKAGE
- (XCL-USER::NAMES XCL-USER::FROM &OPTIONAL XCL-USER::SHADOW-P)
- (LET ((XCL-USER::FROM-PACKAGE (FIND-PACKAGE XCL-USER::FROM)))
- (FUNCALL (IF XCL-USER::SHADOW-P
- #'SHADOWING-IMPORT
- #'IMPORT)
- (MAPCAR #'(LAMBDA (XCL-USER::NAME)
- (INTERN XCL-USER::NAME
- XCL-USER::FROM-PACKAGE))
- XCL-USER::NAMES)))))
- (XCL-USER::IMPORT-FROM-PACKAGE '("CLASSES" "METHODS")
- "CLOS")
- (XCL-USER::IMPORT-FROM-PACKAGE '("FALSE")
- "XCL")
- (XCL-USER::IMPORT-FROM-PACKAGE '("FUNCTIONS" "FNS" "VARIABLES"
- "VARS" "BITMAPS" "COMS")
- "IL"))
- (FIND-PACKAGE "WEB"))
- :READTABLE "XCL" :BASE 10))
-
-(IL:PUTPROPS IL:WEB-EDITOR IL:FILETYPE :COMPILE-FILE)
-)
-
-
-
-(IL:* IL:|;;| "Global Variables")
-
-
-
-
-(IL:* IL:|;;|
-"global for cross-editor boxed node destination (like caret for current tty process copy and move destinations)"
-)
-
-
-(DEFGLOBALPARAMETER DESTINATION-BROWSER NIL
- "global for cross-editor boxed node destination (like caret for current tty process copy and move destinations)"
-)
-
-
-
-(IL:* IL:\; "Client Interface")
-
-
-
-
-(IL:* IL:|;;| "Web Node Class")
-
-
-(DEFCLASS WEB-NODE ()
- ((NAME :INITFORM NIL (IL:* IL:\; "Name of Node")
- :ACCESSOR NODE-NAME)
- (TO-LINKS :INITFORM NIL (IL:* IL:\;
- "Nodes that this Node has Links TO")
- :ACCESSOR GET-TO-LINKS :ACCESSOR NODE-LINKS)
- (PARENT :INITFORM NIL :ACCESSOR NODE-BACK-LINKS)))
-
-
-
-(IL:* IL:|;;| " Web Editor Class")
-
-
-(DEFCLASS WEB-EDITOR ()
- (
- (IL:* IL:|;;| "NODES ")
-
- (STARTING-LIST :INITFORM NIL (IL:* IL:\;
- "list of objects used to compute this browser")
- )
- (GOOD-LIST :INITFORM NIL (IL:* IL:\;
- "limit choices to this set"))
- (BAD-LIST :INITFORM NIL (IL:* IL:\;
- "Don't put in any items on this set")
- )
-
- (IL:* IL:|;;| "GRAPHER FORMAT")
-
- (TOP-ALIGN :INITFORM NIL)
- (BROWSE-FONT :INITFORM (IL:FONTCREATE '(IL:HELVETICA 10 IL:BOLD)))
- (BROWSE-FONT-FAMILY :INITFORM 'IL:HELVETICA)
- (BROWSE-FONT-FACE :INITFORM 'IL:BOLD)
- (GRAPH-FORMAT :INITFORM '(IL:LATTICE))
- (GRAPH-FORMAT-CHOICES :ALLOCATION :CLASS :INITFORM '((IL:HORIZONTAL/LATTICE '(IL:LATTICE))
- (IL:VERTICAL/LATTICE '(IL:VERTICAL
- IL:LATTICE))
- (IL:HORIZONTAL/TREE '(IL:COPIES/ONLY))
- (IL:VERTICAL/TREE '(IL:VERTICAL
- IL:COPIES/ONLY)))
- )
-
- (IL:* IL:|;;| "WINDOW Interface")
-
- (WINDOW :INITFORM NIL)
- (TITLE :INITFORM "Web Editor" (IL:* IL:\;
- "If not NIL will be put in title of window")
- )
- (LEFT :INITFORM 0 (IL:* IL:\; "left position of window")
- )
- (BOTTOM :INITFORM 0 (IL:* IL:\;
- "bottom position of window"))
- (WIDTH :INITFORM 64)
- (HEIGHT :INITFORM 32)
-
- (IL:* IL:|;;| "NODE Labels")
-
- (LABEL-CACHE :INITFORM NIL)
- (LABEL-MAX-LINES :INITFORM NIL
-
- (IL:* IL:|;;| "the maximum number of lines to use in 'boxed' labels -- note that if the label wont fit within the LabelMaxLines and LabelMaxCharsWidth restrictions, it will be truncated")
-)
- (LABEL-MAX-CHARS-WIDTH :INITFORM NIL
-
- (IL:* IL:|;;| "the maximum width for labels -- if label is too big, it will be 'boxed'")
-)
- (IL:* IL:|;;| "NODE Operations")
-
- (LAST-SELECTED-OBJECT :INITFORM NIL (IL:* IL:\; "last object selected"))
- (BOXED-NODE :INITFORM NIL (IL:* IL:\; "last item Boxed, if any")
- )
- (BOX-LINE-WIDTH :ALLOCATION :CLASS
-
- (IL:* IL:|;;| "width to make box for BoxNode")
-
- :INITFORM 1)
- (NODE-MOVER-P :ALLOCATION :CLASS :INITFORM NIL)
-
- (IL:* IL:|;;| "MENUS")
-
- (CACHE-MENU-P :INITFORM T)
- (MENU-CACHE :INITFORM NIL (IL:* IL:\;
- "Will Cache Menus only if CACHE-MENU-P is T")
- )
- (LOCAL-COMMANDS :ALLOCATION :CLASS
-
- (IL:* IL:|;;| "messages that should be sent to browser when item seleted in menu, even if object does understand them")
-
- :INITFORM
- '(BOX-NODE RECOMPUTE ADD-ROOT))
- (TITLE-ITEMS :ALLOCATION :CLASS
-
- (IL:* IL:|;;| "Items for menu of selections in title of window")
-
- :INITFORM
- '(("Recompute" RECOMPUTE "" (IL:SUBITEMS ("Recompute" RECOMPUTE
- "Recompute lattice from starting objects"
- )
- ("Recompute Labels" RECOMPUTE-LABELS
- "Recomputes the labels")
- ("Recompute In Place" RECOMPUTE-IN-PLACE
- "Recompute keeping current view in window")))
- ("Shape To Hold" SHAPE-TO-HOLD "Make window large or small enough to just hold graph")
- ("Change Font Size" CHANGE-FONT-SIZE "Choose a new size Font")
- ("Change Format" CHANGE-FORMAT "Change format between lattice and tree")))
- (LEFT-BUTTON-ITEMS :ALLOCATION :CLASS
-
- (IL:* IL:|;;| "Menu items for LeftButton seletion -- Value sent as message to object or browser -- see LocalCommands")
-
- :INITFORM
- '(("Box Node" BOX-NODE "Draw box around selected node.
-Unboxed by another BoxNode")
- ("Pretty Print" PP "Prettyprint selected item")))
- (MIDDLE-BUTTON-ITEMS :ALLOCATION :CLASS
-
- (IL:* IL:|;;| "Menu items for MiddleButton seletion -- Value sent as message to object or browser -- see LocalCommands")
-
- :INITFORM
- '(("Inspect" IL:|Inspect| INSPECT "Inspect selected item")
- ("Edit" EDIT-OBJECT "Edit selected item")
- ("Delete From Browser" DELETE-FROM-BROWSER "Do not show item or its subs")))
- (RIGHT-BUTTON-ITEMS :ALLOCATION :CLASS :INITFORM '(("Close" (CLOSEW (("Close" CLOSEW)
- ("Destroy" DESTROY))))
- ("Snap" SNAP)
- ("Paint" PAINT)
- ("Clear" CLEAR)
- ("Bury" BURY)
- ("Repaint" REPAINT)
- ("Hardcopy" (HARDCOPY (("Hardcopy to File"
- HARDCOPY-TO-FILE)
- ("Hardcopy to Printer"
- HARDCOPY-TO-PRINTER))
- ))
- ("Move" MOVE)
- ("Shape" SHAPE)
- ("Shrink" SHRINK))
- (IL:* IL:\;
- "Items to be done if Right button is selected")
- )))
-
-
-
-(IL:* IL:|;;| "Top Level")
-
-
-(DEFUN MAKE-WEB-EDITOR ()
- (LET ((EDITOR (MAKE-INSTANCE 'WEB-EDITOR)))
- (INITIALIZE-EDITOR EDITOR)))
-
-(DEFMETHOD INITIALIZE-EDITOR ((SELF WEB-EDITOR))
- (LET NIL (CREATE-WINDOW SELF)
- SELF))
-
-(DEFMETHOD DESTROY ((SELF WEB-EDITOR))
- (LET* ((WINDOW (SLOT-VALUE SELF 'WINDOW))
- (ICON-WINDOW (IL:WINDOWPROP WINDOW 'IL:ICONWINDOW)))
- (IL:CLOSEW WINDOW)
- (IF ICON-WINDOW (IL:CLOSEW ICON-WINDOW))
- (DETACH-LISP-WINDOW SELF)))
-
-(DEFMETHOD BROWSE ((SELF WEB-EDITOR)
- &OPTIONAL BROWSE-LIST WINDOW-OR-TITLE GOOD-LIST POSITION)
- (IL:* IL:\; "11-Sep-84 07:24")
- (IL:* IL:\;
- "Call Show and then shape to hold and move for first time")
- (COND
- ((IL:WINDOWP WINDOW-OR-TITLE)
- (SETF (SLOT-VALUE SELF 'WINDOW)
- WINDOW-OR-TITLE))
- (WINDOW-OR-TITLE (SETF (SLOT-VALUE SELF 'TITLE)
- WINDOW-OR-TITLE)))
- (COND
- ((AND BROWSE-LIST (IL:NLISTP BROWSE-LIST))
- (IL:SETQ BROWSE-LIST (LIST BROWSE-LIST))))
- (SETF (SLOT-VALUE SELF 'STARTING-LIST)
- BROWSE-LIST)
- (SETF (SLOT-VALUE SELF 'GOOD-LIST)
- GOOD-LIST)
- (DISPLAY-BROWSER SELF)
- (SHAPE-TO-HOLD SELF)
- (MOVE SELF POSITION)
- SELF)
-
-(DEFMETHOD GET-LABEL ((WEB-EDITOR WEB-EDITOR)
- (NODE WEB-NODE)) (IL:* IL:\;
- "Get a label for an object to be displayed in the browser.")
- (NODE-NAME NODE))
-
-(DEFMETHOD GET-SUBS ((EDITOR WEB-EDITOR)
- (NODE WEB-NODE)) (IL:* IL:\;
- "Gets a set of subs from an object for browsing")
- (NODE-LINKS NODE))
-
-(DEFMETHOD ICON-TITLE ((SELF WEB-EDITOR)) (IL:* IL:\; "18-Jan-85 15:35")
-
- (IL:* IL:|;;| "Compute the icont title for this browser")
-
- '|Web Editor|)
-
-(DEFMETHOD ADD-NODE ((WEB-EDITOR WEB-EDITOR)
- (NEW-NODE WEB-NODE)) (IL:* IL:\; "11-Dec-86 10:23")
-
- (IL:* IL:|;;| "Add a new node to the browser.")
-
- (PUSHNEW NEW-NODE (SLOT-VALUE WEB-EDITOR 'STARTING-LIST))
- (IF (SLOT-VALUE WEB-EDITOR 'GOOD-LIST)
- (PUSHNEW NEW-NODE (SLOT-VALUE WEB-EDITOR 'GOOD-LIST))))
-
-(DEFMETHOD NOTICE-NODE ((WEB-EDITOR WEB-EDITOR)
- (WEB-NODE WEB-NODE)
- (PARENT-NODE WEB-NODE))
- (PUSH WEB-NODE (SLOT-VALUE PARENT-NODE 'TO-LINKS))
- (ADD-NODE WEB-EDITOR WEB-NODE))
-
-(DEFMETHOD REMOVE-NODE ((WEB-EDITOR WEB-EDITOR)
- (BYE-NODE WEB-NODE))
- (WITH-SLOTS (STARTING-LIST GOOD-LIST BAD-LIST)
- WEB-EDITOR
-
- (IL:* IL:|;;| "")
-
- (SETF STARTING-LIST (DELETE BYE-NODE STARTING-LIST))
- (IF GOOD-LIST
- (SETF GOOD-LIST (DELETE BYE-NODE GOOD-LIST)))
- (IF BAD-LIST
- (SETF BAD-LIST (DELETE BYE-NODE BAD-LIST)))
- (SETF (NODE-LINKS (NODE-BACK-LINKS BYE-NODE))
- (DELETE BYE-NODE (NODE-LINKS (NODE-BACK-LINKS BYE-NODE))))))
-
-(DEFMETHOD DELETE-FROM-BROWSER ((SELF WEB-EDITOR)
- OBJ OBJ-NAME) (IL:* IL:\; " 5-Aug-86 16:50")
-
- (IL:* IL:|;;| "Place on badList for Browser")
-
- (PUSHNEW OBJ (SLOT-VALUE SELF 'BAD-LIST))
- (RECOMPUTE SELF))
-
-(DEFMETHOD REMOVE-FROM-BAD-LIST ((SELF WEB-EDITOR)) (IL:* IL:\; "28-Dec-85 10:04")
- (IL:* IL:\;
- "Remove an item from BadList to allow it to be displayed once again")
- (COND
- ((NULL (SLOT-VALUE SELF 'BAD-LIST))
- (IL:CLRPROMPT)
- (IL:PROMPTPRINT "No BadList items."))
- (T (PROG ((IL:|item| (IL:MENU (IL:|create| IL:MENU
- IL:TITLE IL:_ "BadList Items"
- IL:ITEMS IL:_ (SLOT-VALUE SELF 'BAD-LIST)))))
- (COND
- (IL:|item| (SETF (SLOT-VALUE SELF 'BAD-LIST)
- '(IL:DREMOVE IL:|item| (SLOT-VALUE SELF 'BAD-LIST)))
- (RECOMPUTE SELF))
- (T (IL:CLRPROMPT)
- (IL:PROMPTPRINT "Nothing Selected")))))))
-
-(DEFMETHOD RENAME-NODE ((WEB-EDITOR WEB-EDITOR)
- (WEB-NODE WEB-NODE)
- NEW-NAME)
- (SETF (NODE-NAME WEB-NODE)
- NEW-NAME)
- (CLEAR-LABEL-CACHE WEB-EDITOR WEB-NODE))
-
-
-
-(IL:* IL:\; "")
-
-
-
-
-(IL:* IL:\; "Window System Interface")
-
-
-(DEFMETHOD UPDATE ((SELF WEB-EDITOR)) (IL:* IL:\; "29-Sep-86 11:56")
-
- (IL:* IL:|;;| "make the Lisp window be consistent with ivs")
-
- (LET* ((WINDOW (SLOT-VALUE SELF 'WINDOW))
- (REGION (AND (SLOT-VALUE SELF 'WIDTH)
- (SLOT-VALUE SELF 'HEIGHT)
- (IL:|create| IL:REGION
- IL:LEFT IL:_ (OR (SLOT-VALUE SELF 'LEFT)
- (SETF (SLOT-VALUE SELF 'LEFT)
- IL:LASTMOUSEX))
- IL:BOTTOM IL:_ (OR (SLOT-VALUE SELF 'BOTTOM)
- (SETF (SLOT-VALUE SELF 'BOTTOM)
- IL:LASTMOUSEY))
- IL:WIDTH IL:_ (SLOT-VALUE SELF 'WIDTH)
- IL:HEIGHT IL:_ (SLOT-VALUE SELF 'HEIGHT)))))
- (COND
- ((AND REGION (NOT (IL:EQUAL REGION (IL:WINDOWPROP WINDOW 'IL:REGION))))
- (IL:* IL:\;
- "The shape has changed. --- This is complicated because of ATTACHEDWINDOWS.")
- (LET* ((ATTACHED-WINDOWS (IL:WINDOWPROP WINDOW 'IL:ATTACHEDWINDOWS))
- (ATTACHMENT-SPECS (IL:|for| IL:\w IL:|in| ATTACHED-WINDOWS
- IL:|collect| (LIST (IL:WINDOWPROP IL:\w
- 'IL:DOWINDOWCOMFN)
- (IL:WINDOWPROP IL:\w
- 'IL:WHEREATTACHED)
- (IL:WINDOWPROP IL:\w
- 'IL:PASSTOMAINCOMS)))))
- (IL:|for| IL:\w IL:|in| ATTACHED-WINDOWS IL:|do| (IL:DETACHWINDOW
- IL:\w))
- (IL:SHAPEW WINDOW REGION)
- (IL:|for| IL:\w IL:|in| ATTACHED-WINDOWS IL:|as| IL:|spec|
- IL:|in| ATTACHMENT-SPECS IL:|do| (IL:ATTACHWINDOW IL:\w WINDOW
- (CAADR IL:|spec|)
- (CDADR IL:|spec|))
- (IL:WINDOWPROP IL:\w 'IL:DOWINDOWCOMFN
- (CAR IL:|spec|))
- (IL:WINDOWPROP IL:\w 'IL:PASSTOMAINCOMS
- (CADDR IL:|spec|))))))
- (AND (NOT (IL:EQUAL (SLOT-VALUE SELF 'TITLE)
- (IL:WINDOWPROP WINDOW 'IL:TITLE)))
- (IL:WINDOWPROP WINDOW 'IL:TITLE (SLOT-VALUE SELF 'TITLE)))))
-
-(DEFMETHOD CREATE-WINDOW ((SELF WEB-EDITOR)) (IL:* IL:\; "10-Apr-86 14:32")
- (IL:* IL:\;
- "Create the Lisp window for this window but don't open it.")
- (LET ((WINDOW (IL:CREATEW (IL:CREATEREGION IL:LASTMOUSEX IL:LASTMOUSEY 25 25)
- (SLOT-VALUE SELF 'TITLE)
- NIL T)))
- (SETF (SLOT-VALUE SELF 'WINDOW)
- WINDOW)
- (SETUP-WINDOW SELF)
- WINDOW))
-
-(DEFMETHOD SETUP-WINDOW ((SELF WEB-EDITOR)) (IL:* IL:\; "10-Apr-86 14:32")
- (IL:* IL:\;
- "Create the Lisp window for this window but don't open it.")
- (LET ((WINDOW (SLOT-VALUE SELF 'WINDOW)))
- (IL:WINDOWPROP WINDOW 'WEB-EDITOR SELF)
- (IL:WINDOWPROP WINDOW 'IL:ICONFN 'WEB-WINDOW-ICON-FN)
- (IL:WINDOWPROP WINDOW 'IL:BUTTONEVENTFN 'WEB-WINDOW-BUTTON-EVENT-FN)
- (IL:WINDOWADDPROP WINDOW 'IL:AFTERMOVEFN 'WEB-WINDOW-AFTER-MOVE-FN)
- (IL:WINDOWADDPROP WINDOW 'IL:RESHAPEFN 'WEB-WINDOW-RESHAPE-FN)
- (IL:WINDOWADDPROP WINDOW 'IL:CLOSEFN 'WEB-WINDOW-CLOSE-FN)
- (IL:WINDOWPROP WINDOW 'IL:ICONFN 'WEB-WINDOW-ICON-FN)(IL:* IL:\;
- "window should be invert so that links etc. can be erased")
- (IL:DSPOPERATION 'IL:INVERT WINDOW) (IL:* IL:\;
- "kludge: because GRAPHER adds its own COPYBUTTONEVENTFN")
- (IL:WINDOWPROP WINDOW 'IL:COPYBUTTONEVENTFN NIL)
- (IL:WINDOWPROP WINDOW 'IL:TITLE (SLOT-VALUE SELF 'TITLE))
- WINDOW))
-
-(DEFMETHOD DETACH-LISP-WINDOW ((SELF WEB-EDITOR)) (IL:* IL:\; " 8-Apr-87 17:25")
-
-(IL:* IL:|;;;| "Forget about the current lisp window")
-
- (LET ((VAL (SLOT-VALUE SELF 'WINDOW)))
- (IL:|if| (IL:WINDOWP VAL)
- IL:|then| (SETF (SLOT-VALUE SELF 'WINDOW)
- NIL)
- (IL:WINDOWPROP VAL 'WEB-EDITOR NIL)
- (IL:WINDOWPROP VAL 'IL:RIGHTBUTTONFN NIL)
- (IL:WINDOWPROP VAL 'IL:BUTTONEVENTFN NIL)
- NIL
- IL:|else| NIL)))
-
-(DEFMETHOD SHRINK ((SELF WEB-EDITOR)
- &OPTIONAL TOWHAT POS EXPANDFN)
- (LET* ((WINDOW (SLOT-VALUE SELF 'WINDOW)))
- (IF (IL:WINDOWP WINDOW)
- (IL:SHRINKW WINDOW TOWHAT POS EXPANDFN))))
-
-(DEFMETHOD SET-OUTER-REGION ((SELF WEB-EDITOR)
- REGION NO-UPDATE-FLG) (IL:* IL:\; "16-Apr-86 13:21")
-
-(IL:* IL:|;;;| "Make Loops Window have region parameters")
-
- (SETF (SLOT-VALUE SELF 'LEFT)
- (IL:|fetch| IL:LEFT IL:|of| REGION))
- (SETF (SLOT-VALUE SELF 'BOTTOM)
- (IL:|fetch| IL:BOTTOM IL:|of| REGION))
- (SETF (SLOT-VALUE SELF 'WIDTH)
- (IL:|fetch| IL:WIDTH IL:|of| REGION))
- (SETF (SLOT-VALUE SELF 'HEIGHT)
- (IL:|fetch| IL:HEIGHT IL:|of| REGION))
- (IL:|if| (NOT NO-UPDATE-FLG)
- IL:|then| (UPDATE SELF))
- REGION)
-
-(DEFMETHOD SET-REGION ((SELF WEB-EDITOR)
- REGION &OPTIONAL NO-UPDATE-FLG) (IL:* IL:\; "16-Apr-86 13:22")
-
-(IL:* IL:|;;;| "Make Loops Window have region parameters")
-
- (SET-OUTER-REGION SELF (IL:CREATEREGION (IL:|fetch| IL:LEFT IL:|of| REGION)
- (IL:|fetch| IL:BOTTOM IL:|of| REGION)
- (IL:WIDTHIFWINDOW (IL:|fetch| IL:WIDTH IL:|of| REGION)
- (IL:WINDOWPROP (SLOT-VALUE SELF 'WINDOW)
- 'IL:BORDER))
- (IL:HEIGHTIFWINDOW (IL:|fetch| IL:HEIGHT IL:|of| REGION)
- (SLOT-VALUE SELF 'TITLE)
- (IL:WINDOWPROP (SLOT-VALUE SELF 'WINDOW)
- 'IL:BORDER)))
- NO-UPDATE-FLG))
-
-(DEFMETHOD MOVE ((SELF WEB-EDITOR)
- X-OR-POS &OPTIONAL Y) (IL:* IL:\; "11-Sep-86 13:24")
-
-(IL:* IL:|;;;| "Move the window")
-
- (MOVE1 SELF (OR X-OR-POS (LET* ((ENTIRE-REGION (IL:WINDOWREGION (SLOT-VALUE SELF 'WINDOW)))
- (POS (IL:GETBOXPOSITION (IL:|fetch| IL:WIDTH IL:|of|
- ENTIRE-REGION)
- (IL:|fetch| IL:HEIGHT IL:|of| ENTIRE-REGION)
- (IL:|fetch| IL:LEFT IL:|of| ENTIRE-REGION)
- (IL:|fetch| IL:BOTTOM IL:|of| ENTIRE-REGION)))
- )
- (IL:|create| IL:POSITION
- IL:XCOORD IL:_ (IL:PLUS (IL:|fetch| IL:XCOORD
- IL:|of| POS)
- (IL:DIFFERENCE (SLOT-VALUE
- SELF
- 'LEFT)
- (IL:|fetch| IL:LEFT
- IL:|of| ENTIRE-REGION)))
- IL:YCOORD IL:_ (IL:PLUS (IL:|fetch| IL:YCOORD
- IL:|of| POS)
- (IL:DIFFERENCE (SLOT-VALUE
- SELF
- 'BOTTOM)
- (IL:|fetch| IL:BOTTOM
- IL:|of| ENTIRE-REGION)))
- )))
- Y))
-
-(DEFMETHOD MOVE1 ((SELF WEB-EDITOR)
- X-OR-POS &OPTIONAL Y) (IL:* IL:\; "13-Aug-86 19:10")
-
- (IL:* IL:|;;| "Move the window")
-
- (LET ((NEEDS-UPDATE? (NOT (IL:SUBREGIONP (IL:CONSTANT (IL:CREATEREGION 0 0 IL:SCREENWIDTH
- IL:SCREENHEIGHT))
- (IL:WINDOWPROP (SLOT-VALUE SELF 'WINDOW)
- 'IL:REGION)))))
- (PROG1 (IL:MOVEW (SLOT-VALUE SELF 'WINDOW)
- X-OR-POS Y) (IL:* IL:\;
- "The left and right IVs are updated by the message AfterMove")
- (COND
- (NEEDS-UPDATE? (UPDATE SELF))))))
-
-(DEFMETHOD AFTER-MOVE ((SELF WEB-EDITOR)) (IL:* IL:\; "10-Apr-86 16:10")
-
-(IL:* IL:|;;;| "The window has been moved. Update the left and bottom")
-
- (LET ((REGION (IL:WINDOWPROP (SLOT-VALUE SELF 'WINDOW)
- 'IL:REGION)))
- (SETF (SLOT-VALUE SELF 'LEFT)
- (IL:|fetch| IL:LEFT IL:|of| REGION))
- (SETF (SLOT-VALUE SELF 'BOTTOM)
- (IL:|fetch| IL:BOTTOM IL:|of| REGION))))
-
-(DEFMETHOD AFTER-RESHAPE ((SELF WEB-EDITOR)
- OLD-BITMAP-IMAGE OLD-REGION OLD-SCREEN-REGION)
- (IL:* IL:\; "10-Apr-86 16:12")
-
-(IL:* IL:|;;;| "The window has been reshaped")
-
- (LET ((REGION (IL:WINDOWPROP (SLOT-VALUE SELF 'WINDOW)
- 'IL:REGION)))
- (SETF (SLOT-VALUE SELF 'LEFT)
- (IL:|fetch| IL:LEFT IL:|of| REGION))
- (SETF (SLOT-VALUE SELF 'BOTTOM)
- (IL:|fetch| IL:BOTTOM IL:|of| REGION))
- (SETF (SLOT-VALUE SELF 'WIDTH)
- (IL:|fetch| IL:WIDTH IL:|of| REGION))
- (SETF (SLOT-VALUE SELF 'HEIGHT)
- (IL:|fetch| IL:HEIGHT IL:|of| REGION))
- (IL:RESHAPEBYREPAINTFN (SLOT-VALUE SELF 'WINDOW)
- OLD-BITMAP-IMAGE OLD-REGION OLD-SCREEN-REGION)))
-
-(DEFMETHOD SCROLL-WINDOW ((SELF WEB-EDITOR)
- DSP-X DSP-Y WINDOW-X WINDOW-Y) (IL:* IL:\; "10-Apr-86 14:58")
-
-(IL:* IL:|;;;| "scroll the window to set the point dspX,dspY in the given window position -- default is the lower left corner. If any x or y is a FIXP, it is treated as a absolute position. If FLOATP, it is treated as a relative position. Return the position of the new lower left corner.")
-
- (LET* ((WINDOW (SLOT-VALUE SELF 'WINDOW))
- (VISIBLE-REGION (IL:DSPCLIPPINGREGION NIL WINDOW))
- (EXTENT (IL:WINDOWPROP WINDOW 'IL:EXTENT))) (IL:* IL:\;
- "figure out what to do with default and relative offsets")
- (IL:SETQ WINDOW-X (IL:|if| (NULL WINDOW-X)
- IL:|then| 0
- IL:|elseif| (IL:FLOATP WINDOW-X)
- IL:|then| (IL:FIX (IL:TIMES WINDOW-X (IL:WINDOWPROP WINDOW
- 'IL:WIDTH)))
- IL:|else| WINDOW-X))
- (IL:SETQ WINDOW-Y (IL:|if| (NULL WINDOW-Y)
- IL:|then| 0
- IL:|elseif| (IL:FLOATP WINDOW-Y)
- IL:|then| (IL:FIX (IL:TIMES WINDOW-Y (IL:WINDOWPROP WINDOW
- 'IL:HEIGHT)))
- IL:|else| WINDOW-Y))
- (IL:SETQ DSP-X (IL:|if| (NULL DSP-X)
- IL:|then| (IL:|fetch| IL:LEFT IL:|of| VISIBLE-REGION)
- IL:|elseif| (IL:FLOATP DSP-X)
- IL:|then| (IL:FIX (IL:TIMES DSP-X (IL:|fetch| IL:WIDTH
- IL:|of| EXTENT)))
- IL:|else| DSP-X))
- (IL:SETQ DSP-Y (IL:|if| (NULL DSP-Y)
- IL:|then| (IL:IMINUS (IL:|fetch| IL:BOTTOM IL:|of|
- VISIBLE-REGION))
- IL:|elseif| (IL:FLOATP DSP-Y)
- IL:|then| (IL:FIX (IL:TIMES DSP-Y (IL:|fetch| IL:HEIGHT
- IL:|of| EXTENT)))
- IL:|else| DSP-Y))
- (IL:SCROLLW WINDOW (IL:IPLUS WINDOW-X (IL:IDIFFERENCE (IL:|fetch| IL:LEFT IL:|of|
- VISIBLE-REGION
- )
- DSP-X))
- (IL:IPLUS WINDOW-Y (IL:IDIFFERENCE (IL:|fetch| IL:BOTTOM IL:|of|
- VISIBLE-REGION)
- DSP-Y))) (IL:* IL:\;
- "return the resulting position")
- (IL:SETQ VISIBLE-REGION (IL:DSPCLIPPINGREGION NIL WINDOW))
- (IL:|create| IL:POSITION
- IL:XCOORD IL:_ (IL:|fetch| IL:LEFT IL:|of| VISIBLE-REGION)
- IL:YCOORD IL:_ (IL:|fetch| IL:BOTTOM IL:|of| VISIBLE-REGION))))
-
-(DEFMETHOD CLEAR ((SELF WEB-EDITOR)) (IL:* IL:\;
- "empty the window of active regions, return the window")
- (LET ((WINDOW (SLOT-VALUE SELF 'WINDOW)))
- (IL:WINDOWPROP WINDOW 'IL:GRAPH NIL)
- (IL:CLEARW WINDOW)
- WINDOW))
-
-(DEFMETHOD GET-PROMPT-WINDOW ((SELF WEB-EDITOR)
- &OPTIONAL LINES FONT-DEF) (IL:* IL:\; " 8-Apr-87 15:43")
-
- (IL:* IL:|;;| "Return the current prompt window")
-
- (LET ((W (IL:GETPROMPTWINDOW (SLOT-VALUE SELF 'WINDOW)
- (OR LINES 2)
- (OR (IL:FONTCREATE FONT-DEF)))))
- (IF FONT-DEF
- (IL:DSPFONT (IL:FONTCREATE FONT-DEF)
- W))
- W))
-
-(DEFMETHOD REMOVE-PROMPT-WINDOW ((SELF WEB-EDITOR)) (IL:* IL:\; " 8-Apr-87 15:43")
- (IL:REMOVEPROMPTWINDOW (SLOT-VALUE SELF 'WINDOW)))
-
-(DEFMETHOD PROMPT-PRINT ((SELF WEB-EDITOR)
- PROMPT) (IL:* IL:\; "13-Aug-86 18:46")
-
- (IL:* IL:|;;| "Prints out a prompt in an attached prompt window")
-
- (IL:PRIN1 PROMPT (GET-PROMPT-WINDOW SELF)))
-
-(DEFMETHOD PROMPT-READ ((SELF WEB-EDITOR)
- MSG) (IL:* IL:\; "13-Aug-86 19:15")
-
- (IL:* IL:|;;| "Prompt the user for some input, using an attached prompt window")
-
- (LET ((P-WINDOW (GET-PROMPT-WINDOW SELF)))
- (IL:CLEARW P-WINDOW)
- (PROG1 (IL:|PromptRead| MSG P-WINDOW T)
- (IL:CLEARW P-WINDOW)
- (IL:DETACHWINDOW P-WINDOW)
- (IL:CLOSEW P-WINDOW))))
-
-(DEFMETHOD PROMPT-FOR-LIST ((SELF WEB-EDITOR)
- PROMPT-STR INITIAL-STRING) (IL:* IL:\; " 8-Apr-87 16:44")
-
-(IL:* IL:|;;;| "Prompt user in prompt window for a list of words.")
-
- (LET ((P-WINDOW (GET-PROMPT-WINDOW SELF)))
- (IL:RESETFORM (IL:TTYDISPLAYSTREAM P-WINDOW)
- (IL:CLEARW P-WINDOW)
- (IL:TTYIN PROMPT-STR NIL NIL '(IL:NORAISE)
- NIL NIL INITIAL-STRING))))
-
-(DEFMETHOD PROMPT-FOR-STRING ((SELF WEB-EDITOR)
- PROMPT-STR INITIAL-STR) (IL:* IL:\; "13-Aug-86 18:42")
-
-(IL:* IL:|;;;| "Prompt user in prompt window for a string.")
-
- (LET ((P-WINDOW (GET-PROMPT-WINDOW SELF))
- VALUE)
- (IL:RESETFORM (IL:TTYDISPLAYSTREAM P-WINDOW)
- (IL:CLEARW P-WINDOW)
- (SETQ VALUE (IL:TTYIN PROMPT-STR NIL NIL '(STRING IL:NORAISE)
- NIL NIL INITIAL-STR))
- (IL:CLEARW P-WINDOW))
- (REMOVE-PROMPT-WINDOW SELF)
- VALUE))
-
-(DEFMETHOD PROMPT-FOR-WORD ((SELF WEB-EDITOR)
- &OPTIONAL PROMPT-STR INITIAL-WORD)
- (IL:* IL:\; " 8-Apr-87 16:43")
-
-(IL:* IL:|;;;| "Prompt user in prompt window for a word.")
-
- (CAR (PROMPT-FOR-LIST SELF PROMPT-STR INITIAL-WORD)))
-
-(DEFMACRO MOVE-DOWN-P ()
- '(OR (IL:KEYDOWNP 'IL:MOVE)
- (IL:SHIFTDOWNP 'IL:CTRL)))
-(IL:DEFINEQ
-
-(WEB-WINDOW-AFTER-MOVE-FN
- (LAMBDA (WINDOW) (IL:* IL:\; "Edited 13-Jul-87 15:59 by Rao")
- (IL:* IL:\; "10-Apr-86 16:16")
-
-(IL:* IL:|;;;| "The SimpleWindow AFTERMOVEFN")
-
- (LET ((W (IL:WINDOWPROP WINDOW 'WEB-EDITOR)))
- (AND W (AFTER-MOVE W)))))
-
-(WEB-WINDOW-BUTTON-EVENT-FN
- (LAMBDA (WINDOW) (IL:* IL:\; "Edited 13-Jul-87 13:38 by Rao")
- (IL:* IL:\; "11-Sep-86 13:50")
- (LET ((WINDOW-FOR-MENU (IL:WINDOWPROP WINDOW 'WEB-EDITOR)))
- (DECLARE (IL:SPECVARS WINDOW-FOR-MENU))
- (IL:TOTOPW WINDOW)
- (BUTTON-EVENT-FN WINDOW-FOR-MENU))))
-
-(WEB-WINDOW-RESHAPE-FN
- (LAMBDA (WINDOW IL:|oldBitmapImage| IL:|oldRegion| IL:|oldScreenRegion|)
- (IL:* IL:\; "Edited 12-Jun-87 15:56 by Rao")
- (IL:* IL:\; " 9-May-86 10:07")
-
-(IL:* IL:|;;;| "The RESHAPEFN for a Window")
-
- (LET ((IL:\w (IL:WINDOWPROP WINDOW 'WEB-EDITOR)))
- (AND IL:\w (AFTER-RESHAPE IL:\w IL:|oldBitmapImage| IL:|oldRegion| IL:|oldScreenRegion|
- )))))
-
-(WEB-WINDOW-CLOSE-FN
- (IL:LAMBDA (WINDOW) (IL:* IL:\; "Edited 12-Jun-87 11:42 by Rao")
- (IL:* IL:\;
- "Remove link back to LoopsWindow")
- (IL:WINDOWPROP WINDOW 'WEB-EDITOR NIL)))
-
-(IL:|PromptRead|
- (IL:LAMBDA (PROMPT-STRING WINDOW SAME-LINE?) (IL:* IL:\; "Edited 20-Jul-87 16:20 by Rao")
- (IL:* IL:\;
- "Printout promptString in promptwindow and return value of expression read there")
- (PROG (NEWVALUE)
- (IL:RESETLST
- (IL:RESETSAVE (IL:TTYDISPLAYSTREAM (OR WINDOW IL:PROMPTWINDOW)))
- (IL:RESETSAVE (IL:TTY.PROCESS (IL:THIS.PROCESS)))
- (IL:CLRPROMPT)
- (IL:RESETSAVE (IL:PRINTLEVEL 4 3))
- (IL:|printout| T PROMPT-STRING)
- (IL:|if| SAME-LINE?
- IL:|then| (IL:|printout| T "> ")
- IL:|else| (IL:|printout| T T "> "))
- (IL:CLEARBUF T T) (IL:* IL:\;
- "clear tty buffer because it sometimes has stuff left.")
- (IL:ALLOW.BUTTON.EVENTS)
- (IL:SETQ NEWVALUE (CAR (IL:ERSETQ (IL:TTYINREAD T T)))))
- (RETURN NEWVALUE))))
-)
-(IL:DEFINEQ
-
-(WEB-WINDOW-EXPAND-FN
- (LAMBDA (WINDOW) (IL:* IL:\; "Edited 13-Nov-87 12:58 by Rao")
- (IL:* IL:\; "19-Feb-85 13:58")
-
- (IL:* IL:|;;| "When a browser window is expanded, it should be recomputed")
-
- (LET ((SELF (IL:WINDOWPROP WINDOW 'WEB-EDITOR)))
- (RECOMPUTE-IN-PLACE SELF))))
-)
-
-(DEFUN WEB-WINDOW-ICON-FN (WINDOW ICON DUMMY)
- (LET NIL (OR ICON (IL:TITLEDICONW *WEB-EDITOR-TEMPLATE* (ICON-TITLE (IL:WINDOWPROP WINDOW
- 'WEB-EDITOR))
- NIL
- '(0 . 0)
- T
- 'IL:BOTTOM
- (IL:CONSTANT (LIST (IL:CHARCODE "-")
- (IL:CHARCODE IL:SPACE)
- (IL:CHARCODE IL:EOL)))))))
-
-(IL:RPAQQ *WEB-EDITOR-ICON-BM* #*(60 75)OOOOOOOOOOOO@@@@OOOOOOOOOOOOH@@@L@@@@@@@@@@AL@@@L@@@@@@@@@@AF@@@L@@@@@@@@@@AC@@@L@@@@@@@@@@AAH@@L@@@@@@@@@@A@L@@L@@@@@@@@@@A@F@@LOON@@@@@@OO@C@@LOON@@@@@@OO@AH@LOOO@@@@@@OO@@L@LOONH@@@@AOO@@F@LOOND@@@@BOOOOO@L@@@B@@@@DOOOHC@L@@@ACOOLH@@@@C@L@@@@KOOM@@@@@C@L@@@@GOON@@@@@C@L@@@@KOOM@@@@@C@L@@@ACOOLH@@@@C@LOOOB@@@@DOOOHC@LOOOD@@@@BOOOHC@LOOOH@@@@AOOOHC@LOOOD@@@@@OOOHC@LOOOB@@@@@OOOHC@L@@@ACOOO@@@@@C@L@@@@KOOO@@@@@C@L@@@@GOOO@@@@@C@L@@@@COOO@@@@@C@L@@@@COOO@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@L@@@@@@@@@@@@@C@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@
-)
-
-(IL:RPAQQ *WEB-EDITOR-ICON-MASK* #*(60 75)OOOOOOOOOOOO@@@@OOOOOOOOOOOOH@@@OOOOOOOOOOOOL@@@OOOOOOOOOOOON@@@OOOOOOOOOOOOO@@@OOOOOOOOOOOOOH@@OOOOOOOOOOOOOL@@OOOOOOOOOOOOON@@OOOOOOOOOOOOOO@@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOL@OOOOOOOOOOOOOON@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@
-)
-
-(DEFVAR *WEB-EDITOR-TEMPLATE* (IL:|create| IL:TITLEDICON
- IL:ICON IL:_ *WEB-EDITOR-ICON-BM*
- IL:MASK IL:_ *WEB-EDITOR-ICON-MASK*
- IL:TITLEREG IL:_ (IL:CREATEREGION 5 2 50 30)))
-
-(IL:RPAQ IL:*D-WINDOW-DEFAULT-STREAM* IL:PROMPTWINDOW)
-
-(IL:RPAQ WEB-STREAM IL:PROMPTWINDOW)
-
-
-
-(IL:* IL:\; "Layout and Display Engine")
-
-
-(IL:RPAQQ IL:|BrowserMargin| 0)
-
-(IL:RPAQQ IL:|MaxLatticeHeight| 750)
-
-(IL:RPAQQ IL:|MaxLatticeWidth| 900)
-(IL:DECLARE\: IL:DOEVAL@COMPILE IL:DONTCOPY
-
-(IL:SPECVARS IL:|MaxLatticeHeight| IL:|MaxLatticeWidth|)
-)
-
-(IL:RPAQQ IL:GRAYSHADE1 1)
-
-(IL:RPAQQ IL:GRAYSHADE2 1025)
-
-(IL:RPAQQ IL:GRAYSHADE3 64510)
-
-(IL:RPAQQ IL:GRAYSHADE4 65534)
-(IL:DEFINEQ
-
-(TREE-ROOTS
- (IL:LAMBDA (NODE-LST) (IL:* IL:\; "Edited 10-Jul-87 19:22 by Rao")
- (IL:* IL:\; "29-Sep-86 19:46")
-
- (IL:* IL:|;;| "Computes a minimal set of root nodes for a lattice --- those with no connections TO them in list of nodes, or a single node from a cycle of nodes.")
-
- (PROG ((ROOT-NODES (IL:LDIFFERENCE NODE-LST (IL:|for| IL:|node| IL:|in| NODE-LST
- IL:|join| (CHILD-NODES IL:|node| NODE-LST)
- )))
- REACHABLE-NODES NOT-REACHABLE-NODES)
- (SETQ REACHABLE-NODES (IL:COPY ROOT-NODES))
- (SETQ NOT-REACHABLE-NODES (IL:LDIFFERENCE NODE-LST REACHABLE-NODES))
- (IL:* IL:\;
- "recompute the nodes that can't be reached from the current rootNodes")
- IL:|RecomputeReachableNodes|
-
-
- (IL:* IL:|;;| "Compute the transitive closure of the set of reachableNodes --- updating the notReachableNodes at the same time")
-
- (IL:|for| IL:|node| IL:|in| REACHABLE-NODES
- IL:|do| (IL:|for| IL:|childNode| IL:|in| (CHILD-NODES IL:|node| NODE-LST
- )
- IL:|when| (IL:MEMB IL:|childNode| NOT-REACHABLE-NODES)
- IL:|do|
-
- (IL:* IL:|;;| "put the newly found reachable node at the end of the list, so we will find it later on during this iteration")
-
- (IL:NCONC1 REACHABLE-NODES IL:|childNode|)
- (SETQ NOT-REACHABLE-NODES (IL:DREMOVE IL:|childNode|
- NOT-REACHABLE-NODES))))
- (IL:* IL:\;
- "if we can reach all the nodes, fine...")
- (IL:|if| (NULL NOT-REACHABLE-NODES)
- IL:|then| (IL:* IL:\;
- "Now need to prune down to a minimal set")
- (IL:|bind| (IL:|stable?| IL:_ NIL) IL:|until| IL:|stable?|
- IL:|do| (SETQ IL:|stable?| T)
- (IL:|for| IL:|node| IL:|in| ROOT-NODES IL:|bind|
- IL:|extraRoots|
- IL:|do| (SETQ IL:|extraRoots| (IL:DREMOVE IL:|node|
- (IL:INTERSECTION
- ROOT-NODES
- (REACHABLE-NODES!
- IL:|node| NODE-LST))))
- (IL:|if| IL:|extraRoots|
- IL:|then| (SETQ IL:|stable?| NIL)
- (SETQ ROOT-NODES (IL:LDIFFERENCE ROOT-NODES
- IL:|extraRoots|))
- (RETURN T)) IL:|finally| (RETURN NIL)))
- (IL:* IL:\;
- "return the node ids, not the GRAPHNODES")
- (RETURN (IL:|for| IL:|node| IL:|in| ROOT-NODES
- IL:|collect| (IL:|fetch| IL:NODEID IL:|of| IL:|node|)))
- IL:|else| (IL:* IL:\;
- "must be a cycle. Select the least prolific node in the cycle as the a new root node.")
- (IL:|push| ROOT-NODES (LET ((PROLIFIC-NODE (IL:|for| IL:|node| IL:|in|
-
- NOT-REACHABLE-NODES
- IL:|smallest|
- (IL:LENGTH (IL:|fetch|
- IL:TONODES
- IL:|of|
- IL:|node|))))
- )
- (SETQ NOT-REACHABLE-NODES (IL:DREMOVE PROLIFIC-NODE
- NOT-REACHABLE-NODES
- ))
- PROLIFIC-NODE))
- (GO IL:|RecomputeReachableNodes|)))))
-
-(CHILD-NODES
- (IL:LAMBDA (PARENT-NODE NODE-LIST) (IL:* IL:\; "Edited 10-Jul-87 19:23 by Rao")
- (IL:* IL:\; " 8-Oct-85 14:15")
- (IL:* IL:\;
- "Find all GRAPHNODES that are immediatly reachable from this node")
- (IL:|for| IL:|label| IL:|in| (IL:|fetch| IL:TONODES IL:|of| PARENT-NODE)
- IL:|collect| (IL:|for| IL:|node| IL:|in| NODE-LIST
- IL:|thereis| (EQ IL:|label| (IL:|fetch| IL:NODEID IL:|of|
- IL:|node|))))))
-
-(REACHABLE-NODES!
- (IL:LAMBDA (IL:|root| IL:|nodeList|) (IL:* IL:\; "30-Sep-86 10:22")
- (IL:* IL:\; IL:|Return| IL:\a
- IL:|list| IL:|of| IL:|all|
- IL:|nodes| IL:|that| IL:|are|
- IL:|reachable| IL:|from| IL:|the|
- IL:|root|)
- (LET ((IL:|reachableNodes| (LIST IL:|root|)))
- (IL:|for| IL:|node| IL:|in| IL:|reachableNodes|
- IL:|do| (IL:|for| IL:|childNode| IL:|in| (CHILD-NODES IL:|node|
- IL:|nodeList|)
- IL:|when| (NOT (IL:MEMB IL:|childNode| IL:|reachableNodes|))
- IL:|do|
-
- (IL:* IL:\; IL:|put| IL:|the| IL:|newly| IL:|found| IL:|reachable| IL:|node|
- IL:|at| IL:|the| IL:|end| IL:|of| IL:|the| IL:|list,| IL:|so| IL:|we| IL:|will|
- IL:|find| IL:|it| IL:|later| IL:|on| IL:|during| IL:|this| IL:|iteration|)
-
- (IL:NCONC1 IL:|reachableNodes| IL:|childNode|)))
- IL:|reachableNodes|)))
-)
-
-(DEFMETHOD DISPLAY-BROWSER ((SELF WEB-EDITOR)) (IL:* IL:\; "29-Sep-86 12:15")
- (IL:* IL:\; "New method template")
- (LET ((NODELST (AND (SLOT-VALUE SELF 'STARTING-LIST)
- (GET-NODE-LIST SELF (SLOT-VALUE SELF 'STARTING-LIST)
- (SLOT-VALUE SELF 'GOOD-LIST)))))
- (COND
- (NODELST (IL:SHOWGRAPH (IL:LAYOUTGRAPH NODELST (TREE-ROOTS NODELST)
- (SLOT-VALUE SELF 'GRAPH-FORMAT)
- (SLOT-VALUE SELF 'BROWSE-FONT))
- (SLOT-VALUE SELF 'WINDOW)
- NIL NIL (SLOT-VALUE SELF 'TOP-ALIGN))
- (IL:* IL:\;
- "kludge to reset the window props")
- (SETUP-WINDOW SELF))
- (T (CLEAR SELF)))))
-
-(DEFMETHOD BROWSER-OBJECTS ((IL:|self| WEB-EDITOR)) (IL:* IL:\; "28-May-84 12:58")
- (IL:* IL:\;
- "Return a list of all the objects shown in the browser")
- (IL:|for| IL:|node| IL:|in| (IL:|fetch| IL:GRAPHNODES
- IL:|of| (IL:WINDOWPROP (SLOT-VALUE IL:|self|
- 'WINDOW)
- 'IL:GRAPH))
- IL:|when| (IL:NLISTP (CAR IL:|node|)) IL:|collect| (CAR IL:|node|)))
-
-(DEFMETHOD GET-NODE-LIST ((SELF WEB-EDITOR)
- BROWSE-LIST GOOD-LIST) (IL:* IL:\; "21-Mar-85 14:09")
-
- (IL:* IL:|;;| "Compute the node data structures of the tree starting at browseList. If goodList is given, only include elements of it. If goodList=T make it be browseList.")
-
- (DECLARE (IL:GLOBALVARS IL:WHITESHADE))
- (COND
- ((EQ GOOD-LIST T)
- (IL:SETQ GOOD-LIST BROWSE-LIST)))
- (PROG (SUBS PAIR NODE (OLD-NODES (IL:|fetch| IL:GRAPHNODES IL:|of|
- (IL:WINDOWPROP (SLOT-VALUE
- SELF
- 'WINDOW)
- 'IL:GRAPH)))
- (OBJ-LIST (CONS)))
-
- (IL:* IL:|;;| "first make objList which is a list of pairs (object . objName). objName will be used as a title for a node in the browser. This structure will be replaced by a graphNode when it is processed. The nodeID of the graphNode will be the object, and the label will be the name.")
-
- (IL:|for| IL:|objOrName| IL:|in| BROWSE-LIST
- IL:|do| (AND (IL:SETQ PAIR (OBJ-NAME-PAIR SELF IL:|objOrName|))
- (NOT (IL:FASSOC (CAR PAIR)
- (CAR OBJ-LIST)))
- (IL:TCONC OBJ-LIST PAIR)))
-
- (IL:* IL:|;;| "Now MAP ON list so pair can be replaced by graphNode")
-
- (IL:|for| PAIR IL:|name| IL:|obj| IL:|subObjs| IL:|on| (CAR OBJ-LIST)
- IL:|when| (IL:NLISTP (IL:SETQ IL:|name| (CDAR PAIR)))
- IL:|do| (IL:SETQ IL:|subObjs| (CONS))
- (IL:|for| IL:|sub| IL:|objPair| IL:|obj1| IL:|in| (GET-SUBS SELF
- (IL:SETQ IL:|obj|
- (CAAR PAIR)))
- IL:|do|
-
- (IL:* IL:|;;| "ObjNamePair returns NIL for destroyed objects. include only members of goodList in subs if given. Add to objList only once")
-
- (IL:SETQ IL:|obj1| (COND
- ((EQ (CAR IL:|sub|)
- 'IL:|Link Parameters|)
- (CADR IL:|sub|))
- (T IL:|sub|)))
- (COND
- ((IL:SETQ IL:|objPair| (OBJ-NAME-PAIR SELF IL:|obj1|))
- (COND
- ((NOT (IL:FASSOC IL:|obj1| (CAR OBJ-LIST)))
- (IL:TCONC OBJ-LIST IL:|objPair|)))
- (IL:TCONC IL:|subObjs| IL:|sub|))))
- (RPLACA PAIR (IL:SETQ NODE (OR (IL:FASSOC IL:|obj| OLD-NODES)
- (IL:|create| IL:GRAPHNODE
- IL:NODEID IL:_ IL:|obj|
- IL:NODEBORDER IL:_
- (LIST (IL:ADD1 (SLOT-VALUE SELF
- 'BOX-LINE-WIDTH))
- IL:WHITESHADE)))))
- (IL:|replace| IL:TONODES IL:|of| NODE IL:|with| (CAR IL:|subObjs|))
- (IL:|replace| IL:NODELABEL IL:|of| NODE IL:|with| IL:|name|)
- (IL:|replace| IL:NODEFONT IL:|of| NODE IL:|with| (SLOT-VALUE
- SELF
- 'BROWSE-FONT))
- (IL:|replace| IL:NODEWIDTH IL:|of| NODE IL:|with| NIL)
- (IL:|replace| IL:NODEHEIGHT IL:|of| NODE IL:|with| NIL))
- (RETURN (CAR OBJ-LIST))))
-
-(DEFMETHOD OBJ-NAME-PAIR ((IL:|self| WEB-EDITOR)
- IL:|obj|)
-
- (IL:* IL:|;;| "Make a pair (object . objName) where objName is label to be used in browser")
-
- (LET NIL (IL:|if| (NULL IL:|obj|)
- IL:|then| NIL
- IL:|elseif| (AND (SLOT-VALUE IL:|self| 'GOOD-LIST)
- (NOT (IL:FMEMB IL:|obj| (SLOT-VALUE IL:|self| 'GOOD-LIST))))
- IL:|then| NIL
- IL:|elseif| (IL:FMEMB IL:|obj| (SLOT-VALUE IL:|self| 'BAD-LIST))
- IL:|then| NIL
- IL:|else| (CONS IL:|obj| (GET-DISPLAY-LABEL IL:|self| IL:|obj|)))))
-
-(DEFMETHOD GRAPH-FITS ((|self| WEB-EDITOR)) (IL:* IL:\; "24-Apr-86 15:00")
-
-(IL:* IL:|;;;| "Tests if graph fits in region")
-
- (LET ((|window| (SLOT-VALUE |self| 'WINDOW)))
- (LET ((|width| 0)
- (|height| 0)
- (|region| (IL:WINDOWPROP |window| 'IL:REGION))
- (|nodes| (IL:|fetch| IL:GRAPHNODES IL:|of| (IL:WINDOWPROP |window| 'IL:GRAPH)))
- )
- (COND
- (|nodes| (IL:SETQ |width| (IL:WIDTHIFWINDOW (IL:IDIFFERENCE (IL:MAX/RIGHT |nodes|)
- (IL:MIN/LEFT |nodes|))
- (IL:WINDOWPROP |window| 'IL:BORDER)))
- (IL:SETQ |height| (IL:HEIGHTIFWINDOW (IL:IDIFFERENCE (IL:MAX/TOP |nodes|)
- (IL:MIN/BOTTOM |nodes|))
- (IL:WINDOWPROP |window| 'IL:TITLE)
- (IL:WINDOWPROP |window| 'IL:BORDER)))))
- (NOT (OR (IL:IGREATERP |width| (IL:|fetch| IL:WIDTH IL:|of| |region|))
- (IL:IGREATERP |height| (IL:|fetch| IL:HEIGHT IL:|of| |region|)))))))
-
-(DEFMETHOD NODE-REGION ((IL:|self| WEB-EDITOR)
- IL:|object|) (IL:* IL:\; "10-Dec-84 18:26")
-
- (IL:* IL:|;;| "what region does the object occupy in the display stream?")
-
- (LET ((IL:|node| (IL:FASSOC (COND
- ((IL:LITATOM IL:|object|)
- (IL:SETQ IL:|object| (IL:|GetObjectRec| IL:|object|)))
- (T IL:|object|))
- (IL:|fetch| IL:GRAPHNODES IL:|of| (IL:WINDOWPROP
- (SLOT-VALUE IL:|self|
- 'WINDOW)
- 'IL:GRAPH)))))
- (IL:|if| IL:|node|
- IL:|then| (IL:|create| IL:REGION
- IL:LEFT IL:_ (IL:IDIFFERENCE (IL:|fetch| IL:XCOORD
- IL:|of| (IL:|fetch|
- IL:NODEPOSITION
- IL:|of| IL:|node|
- ))
- (IL:IQUOTIENT (IL:|fetch| IL:NODEWIDTH
- IL:|of| IL:|node|)
- 2))
- IL:BOTTOM IL:_ (IL:IDIFFERENCE (IL:|fetch| IL:YCOORD
- IL:|of| (IL:|fetch|
- IL:NODEPOSITION
- IL:|of|
- IL:|node|))
- (IL:IQUOTIENT (IL:|fetch| IL:NODEHEIGHT
- IL:|of| IL:|node|)
- 2))
- IL:WIDTH IL:_ (IL:|fetch| IL:NODEWIDTH IL:|of| IL:|node|)
- IL:HEIGHT IL:_ (IL:|fetch| IL:NODEHEIGHT IL:|of| IL:|node|))
- )))
-
-(DEFMETHOD RECOMPUTE ((SELF WEB-EDITOR)
- &OPTIONAL DONT-RESHAPE-FLG) (IL:* IL:\; " 8-Apr-87 14:42")
- (IL:* IL:\;
- "Recompute the browseGraph in the same window")
- (PROG ((GRAPH-FITS (GRAPH-FITS SELF)))
- (DISPLAY-BROWSER SELF)
- (COND
- ((OR DONT-RESHAPE-FLG (NULL GRAPH-FITS)) (IL:* IL:\;
- "Dont Reshape or rescroll. Assume window wants to stay the same size")
- )
- (T (SHAPE-TO-HOLD SELF))))
- SELF)
-
-(DEFMETHOD RECOMPUTE-IN-PLACE ((IL:|self| WEB-EDITOR)) (IL:* IL:\; "10-Dec-84 18:27")
-
-(IL:* IL:|;;;| "recompute the graph, maintaining the current position")
-
- (LET* ((IL:|visibleRegion| (IL:DSPCLIPPINGREGION NIL (SLOT-VALUE IL:|self| 'WINDOW)))
- (IL:\x (IL:|fetch| IL:LEFT IL:|of| IL:|visibleRegion|))
- (IL:\y (IL:|fetch| IL:BOTTOM IL:|of| IL:|visibleRegion|)))
- (IL:* IL:\;
- "if we want to RecomputeInPlace, we must want the window to be kept the same")
- (RECOMPUTE IL:|self| T) (IL:* IL:\;
- "we had to save x and y because visibleRegion gets clobbered by Recompute! Suprise!")
- (SCROLL-WINDOW IL:|self| IL:\x IL:\y)))
-
-(DEFMETHOD RECOMPUTE-LABELS ((|self| WEB-EDITOR)) (IL:* IL:\; "27-Feb-85 11:27")
- (IL:* IL:\;
- "recompute the graph, including the labels")
- (CLEAR-LABEL-CACHE |self| T)
- (RECOMPUTE |self|))
-
-(DEFMETHOD RECOMPUTE-IF-OPEN ((WEB-EDITOR WEB-EDITOR)) (IL:* IL:\; "27-Aug-86 12:37")
- (IF (IL:OPENWP (SLOT-VALUE WEB-EDITOR 'WINDOW))
- (RECOMPUTE WEB-EDITOR)))
-
-(DEFMETHOD CLEAR-LABEL-CACHE ((WEB-EDITOR WEB-EDITOR)
- OBJECTS) (IL:* IL:\; " 5-Dec-85 12:02")
- (LET (CACHED-LABEL)
-
- (IL:* IL:|;;| "Delete the cached label for these items")
-
- (COND
- ((EQ OBJECTS T)
- (SETF (SLOT-VALUE WEB-EDITOR 'LABEL-CACHE)
- NIL))
- (T (IF (ATOM OBJECTS)
- (SETQ OBJECTS (CONS OBJECTS)))
- (DOLIST (OBJ OBJECTS)
- (IF (SETQ CACHED-LABEL (IL:ASSOC OBJ (SLOT-VALUE WEB-EDITOR 'LABEL-CACHE)))
- (SETF (SLOT-VALUE WEB-EDITOR 'LABEL-CACHE)
- (IL:DREMOVE CACHED-LABEL (SLOT-VALUE WEB-EDITOR 'LABEL-CACHE)))))))))
-
-(DEFMETHOD OBJECT-FROM-LABEL ((SELF WEB-EDITOR)
- LABEL) (IL:* IL:\; " 4-Jan-85 18:20")
-
- (IL:* IL:|;;| "What object has this label?")
-
- (LET ((OBJECT-NODE (IL:|for| IL:|node| IL:|in| (IL:|fetch| IL:GRAPHNODES
- IL:|of| (IL:WINDOWPROP
- (SLOT-VALUE SELF
- 'WINDOW)
- 'IL:GRAPH))
- IL:|thereis| (IL:EQUAL LABEL (IL:|fetch| IL:NODELABEL IL:|of|
- IL:|node|)))))
- (IL:|if| (IL:NLISTP (CAR OBJECT-NODE))
- IL:|then| (CAR OBJECT-NODE)
- IL:|else| NIL)))
-
-(DEFMETHOD CHANGE-FONT-SIZE ((WEB-EDITOR WEB-EDITOR)
- &OPTIONAL SIZE) (IL:* IL:\; "13-Dec-84 13:04")
- (IL:* IL:\;
- "Change the font size from whatever it is to size")
- (WHEN (OR SIZE (SETQ SIZE (IL:MENU (IL:|create| IL:MENU
- IL:TITLE IL:_ "Select Desired Size"
- IL:CHANGEOFFSETFLG IL:_ T
- IL:ITEMS IL:_ '(("Abort" NIL)
- 8 10 12 16)))))
- (SETF (SLOT-VALUE WEB-EDITOR 'BROWSE-FONT)
- (IL:FONTCREATE `(,(SLOT-VALUE WEB-EDITOR 'BROWSE-FONT-FAMILY)
- ,SIZE
- ,(SLOT-VALUE WEB-EDITOR 'BROWSE-FONT-FACE))))
- (IL:* IL:\;
- "clear out the label cache!")
- (RECOMPUTE-LABELS WEB-EDITOR)))
-
-(DEFMETHOD CHANGE-FORMAT ((|self| WEB-EDITOR)
- &OPTIONAL |format|) (IL:* IL:\; "21-Apr-84 19:52")
- (IL:* IL:\;
- "Change format between Lattice and Tree")
- (COND
- ((IL:LISTP |format|)
- (SETF (SLOT-VALUE |self| 'GRAPH-FORMAT)
- |format|))
- ((SETQ |format| (IL:MENU (IL:|create| IL:MENU
- IL:ITEMS IL:_ (SLOT-VALUE |self| 'GRAPH-FORMAT-CHOICES))))
- (SETF (SLOT-VALUE |self| 'GRAPH-FORMAT)
- |format|)))
- (RECOMPUTE |self|))
-
-(DEFMETHOD CHANGE-MAX-LABEL-SIZE ((SELF WEB-EDITOR)
- NEW-MAX-WIDTH NEW-MAX-LINES)
- (IL:* IL:\; "13-Dec-84 13:05")
- (IL:* IL:\;
- "change the max label dimensions and redisplay the nodes -- if new size is NULL, don't change")
- (IL:|if| NEW-MAX-LINES
- IL:|then| (SETF (SLOT-VALUE SELF 'LABEL-MAX-LINES)
- NEW-MAX-LINES))
- (IL:|if| NEW-MAX-WIDTH
- IL:|then| (SETF (SLOT-VALUE SELF 'LABEL-MAX-CHARS-WIDTH)
- NEW-MAX-WIDTH)) (IL:* IL:\;
- "clear out the label cache")
- (RECOMPUTE-LABELS SELF))
-
-(DEFMETHOD SHAPE-TO-HOLD ((SELF WEB-EDITOR)) (IL:* IL:\; "13-Jan-87 16:52")
-
- (IL:* IL:|;;| "Shape the browse window to just hold the nodes with BrowserMargin to spare")
-
- (LET* ((WINDOW (SLOT-VALUE SELF 'WINDOW))
- (REGION (IL:WINDOWPROP WINDOW 'IL:REGION))
- (NODES (IL:|fetch| IL:GRAPHNODES IL:|of| (IL:WINDOWPROP WINDOW 'IL:GRAPH)))
- (MIN-WIDTH (IL:IPLUS 5 (IL:STRINGWIDTH (SLOT-VALUE SELF 'TITLE)
- (IL:DSPFONT NIL IL:|WindowTitleDisplayStream|))))
- (MIN-HEIGHT (IL:FONTHEIGHT (IL:DSPFONT NIL WINDOW)))
- LEFT BOTTOM HEIGHT WIDTH RIGHT TOP)
- (IF NODES
- (PROGN (SETQ LEFT (IL:MIN/LEFT NODES))
- (SETQ BOTTOM (IL:MIN/BOTTOM NODES))
- (SETQ RIGHT (IL:MAX/RIGHT NODES))
- (SETQ TOP (IL:MAX/TOP NODES))
- (SETQ WIDTH (IL:IMAX MIN-WIDTH (IL:IMIN IL:|MaxLatticeWidth|
- (IL:WIDTHIFWINDOW (IL:PLUS
- IL:|BrowserMargin|
- (IL:IDIFFERENCE
- RIGHT LEFT))
- (IL:WINDOWPROP WINDOW 'IL:BORDER))))
- )
- (SETQ HEIGHT (IL:IMAX MIN-HEIGHT (IL:IMIN IL:|MaxLatticeHeight|
- (IL:PLUS IL:|BrowserMargin|
- (IL:IDIFFERENCE TOP BOTTOM)))))
- (UNLESS (AND (IL:EQP WIDTH (IL:|fetch| IL:WIDTH IL:|of| REGION))
- (IL:EQP (IL:HEIGHTIFWINDOW HEIGHT (IL:WINDOWPROP WINDOW 'IL:TITLE)
- (IL:WINDOWPROP WINDOW 'IL:BORDER))
- (IL:|fetch| IL:HEIGHT IL:|of| REGION)))
- (SET-REGION SELF (IL:CREATEREGION (IL:|fetch| IL:LEFT IL:|of| REGION)
- (IL:|fetch| IL:BOTTOM IL:|of| REGION)
- WIDTH HEIGHT)
- NIL)))
-
- (IL:* IL:|;;| "ELSE")
-
- (SET-REGION SELF (IL:CREATEREGION (IL:|fetch| IL:LEFT IL:|of| REGION)
- (IL:|fetch| IL:BOTTOM IL:|of| REGION)
- MIN-WIDTH MIN-HEIGHT)))))
-
-(DEFMETHOD GET-DISPLAY-LABEL ((SELF WEB-EDITOR)
- OBJECT)
-
-(IL:* IL:|;;;| "get the display label. use the cache if it provides the answer; if not, and maxLabelWidth is set, use it to compute the appropriate bit map and then cache the result.")
-
- (LET ((CACHED-LABEL (IL:ASSOC OBJECT (SLOT-VALUE SELF 'LABEL-CACHE))))
- (IF CACHED-LABEL
- (CDR CACHED-LABEL)
- (LET ((NEW-LABEL (BOX-PRINT-STRING (GET-LABEL SELF OBJECT)
- (SLOT-VALUE SELF 'LABEL-MAX-CHARS-WIDTH)
- (SLOT-VALUE SELF 'LABEL-MAX-LINES)
- (SLOT-VALUE SELF 'BROWSE-FONT))))
- (IL:|if| (IL:LISTP NEW-LABEL)
- IL:|then| (IL:* IL:\;
- "GRAPHER dies if the label is a list")
- (IL:SETQ NEW-LABEL (IL:MKSTRING NEW-LABEL)))
- (PUSH (CONS OBJECT NEW-LABEL)
- (SLOT-VALUE SELF 'LABEL-CACHE))
- NEW-LABEL))))
-
-(DEFMETHOD BOX-NODE ((SELF WEB-EDITOR)
- OBJECT &OPTIONAL KEEP-PREVIOUS-BOX) (IL:* IL:\; " 8-Apr-87 18:34")
- "Puts a box around the node in the graph representing the object"
-
- (IL:* IL:|;;|
- "If there was a previously boxed node, remove the box from around it and set it to nil")
-
- (WHEN (AND (NOT KEEP-PREVIOUS-BOX)
- DESTINATION-BROWSER
- (SLOT-VALUE DESTINATION-BROWSER 'BOXED-NODE))
- (HIGHLIGHT-NODE DESTINATION-BROWSER (SLOT-VALUE DESTINATION-BROWSER 'BOXED-NODE)
- (SLOT-VALUE SELF 'BOX-LINE-WIDTH)
- IL:WHITESHADE)
- (SETF (SLOT-VALUE DESTINATION-BROWSER 'BOXED-NODE)
- NIL))
- (SETQ DESTINATION-BROWSER SELF) (IL:* IL:\; "update the global")
- (HIGHLIGHT-NODE SELF OBJECT (SLOT-VALUE SELF 'BOX-LINE-WIDTH)
- IL:BLACKSHADE)
- (SETF (SLOT-VALUE SELF 'BOXED-NODE)
- OBJECT))
-
-(DEFMETHOD UNMARK-NODES ((IL:|self| WEB-EDITOR)) (IL:* IL:\; "10-Dec-84 12:27")
- (IL:* IL:\;
- "clear the graph nodes, removing all shading and highlighting")
- (REMOVE-HIGHLIGHTS IL:|self|)
- (REMOVE-SHADING IL:|self|))
-
-(DEFMETHOD HIGHLIGHT-NODE ((SELF WEB-EDITOR)
- OBJECT WIDTH SHADE) (IL:* IL:\; "13-Dec-85 15:16")
-
-(IL:* IL:|;;;| "highlight a node by surronding it with a shaded box")
-
- (LET ((NODE (IL:FASSOC OBJECT (IL:|fetch| IL:GRAPHNODES IL:|of| (IL:WINDOWPROP
- (SLOT-VALUE SELF
- 'WINDOW)
- 'IL:GRAPH)))))
- (AND NODE (DISPLAY-NODE-HIGHTLIGHTS SELF NODE SHADE WIDTH))))
-
-(DEFMETHOD SHADE-NODE ((IL:|self| WEB-EDITOR)
- IL:|object| IL:|shade|) (IL:* IL:\; "15-Jan-87 18:34")
-
- (IL:* IL:|;;| "shade the background of a node")
-
- (LET ((IL:|node| (IL:FASSOC (COND
- ((IL:LITATOM IL:|object|)
- (IL:SETQ IL:|object| (IL:|GetObjectRec| IL:|object|)))
- (T IL:|object|))
- (IL:|fetch| IL:GRAPHNODES IL:|of| (IL:WINDOWPROP
- (SLOT-VALUE IL:|self|
- 'WINDOW)
- 'IL:GRAPH)))))
- (IL:|if| IL:|node|
- IL:|then| (IL:|if| (IL:BITMAPP (IL:|fetch| IL:NODELABEL IL:|of| IL:|node|
- ))
- IL:|then|
-
- (IL:* IL:|;;| "Need to forget the old bitmap, in case it already has a shade blt'ed into it. This will fail if the GetDisplayLabel msg returns something different from the previous value, but what can you do?")
-
- (CLEAR-LABEL-CACHE IL:|self| IL:|object|)
- (LET ((IL:|newLabel| (GET-DISPLAY-LABEL IL:|self| IL:|object|)))
- (IL:|replace| IL:NODELABEL IL:|of| IL:|node|
- IL:|with| IL:|newLabel|)
- (IL:|if| (AND IL:|shade| (IL:BITMAPP IL:|newLabel|))
- IL:|then| (IL:BITBLT NIL NIL NIL IL:|newLabel| NIL
- NIL NIL NIL 'IL:TEXTURE
- 'IL:PAINT IL:|shade|))))
- (DISPLAY-NODE-SHADING IL:|self| IL:|node| IL:|shade|))))
-
-(DEFMETHOD DISPLAY-NODE-HIGHTLIGHTS ((SELF WEB-EDITOR)
- NODE SHADE BOX-WIDTH)
- (IL:RESET/NODE/BORDER NODE (COND
- (SHADE (LIST BOX-WIDTH SHADE))
- (T BOX-WIDTH))
- (SLOT-VALUE SELF 'WINDOW)))
-
-(DEFMETHOD DISPLAY-NODE-SHADING ((SELF WEB-EDITOR)
- NODE SHADE) (IL:* IL:\; "13-Dec-85 15:13")
- (IL:* IL:\; "New method template")
- (IL:RESET/NODE/LABELSHADE NODE (OR SHADE IL:WHITESHADE)
- (SLOT-VALUE SELF 'WINDOW)))
-
-(DEFMETHOD REMOVE-HIGHLIGHTS ((IL:|self| WEB-EDITOR)) (IL:* IL:\; "13-Dec-85 15:16")
-
-(IL:* IL:|;;;| "gets rid of all highlighting in the lattice")
-
- (IL:|for| IL:|node| IL:|in| (IL:|fetch| IL:GRAPHNODES
- IL:|of| (IL:WINDOWPROP (SLOT-VALUE IL:|self|
- 'WINDOW)
- 'IL:GRAPH))
- IL:|do| (DISPLAY-NODE-HIGHTLIGHTS IL:|self| IL:|node| NIL))
- (SETF (SLOT-VALUE IL:|self| 'BOXED-NODE)
- NIL))
-
-(DEFMETHOD REMOVE-SHADING ((IL:|self| WEB-EDITOR)) (IL:* IL:\; "13-Dec-85 15:14")
-
-(IL:* IL:|;;;| "gets rid of all shading in the lattice")
-
- (IL:|for| IL:|node| IL:|in| (IL:|fetch| IL:GRAPHNODES
- IL:|of| (IL:WINDOWPROP (SLOT-VALUE IL:|self|
- 'WINDOW)
- 'IL:GRAPH))
- IL:|do| (DISPLAY-NODE-SHADING IL:|self| IL:|node| IL:WHITESHADE)))
-
-(DEFMETHOD FLASH-NODE ((IL:|self| WEB-EDITOR)
- IL:|node| IL:N IL:|flashTime| IL:|leaveFlipped?|)
- (IL:* IL:\; "12-Dec-84 16:09")
- (IL:* IL:\; "Flip node N times")
- (IL:SETQ IL:|node| (IL:FASSOC (COND
- ((IL:LITATOM IL:|node|)
- (IL:SETQ IL:|node| (IL:|GetObjectRec| IL:|node|)))
- (T IL:|node|))
- (IL:|fetch| IL:GRAPHNODES IL:|of| (IL:WINDOWPROP
- (SLOT-VALUE IL:|self|
- 'WINDOW)
- 'IL:GRAPH))))
- (IL:|if| IL:|node|
- IL:|then| (IL:|for| IL:\i IL:|from| 1 IL:|to| (OR IL:N 3)
- IL:|do| (IL:FLIPNODE IL:|node| (SLOT-VALUE IL:|self| 'WINDOW))
- (IL:DISMISS (OR IL:|flashTime| 300))
- (IL:FLIPNODE IL:|node| (SLOT-VALUE IL:|self| 'WINDOW))
- (IL:DISMISS (OR IL:|flashTime| 300)))
- (IL:|if| IL:|leaveFlipped?|
- IL:|then| (IL:FLIPNODE IL:|node| (SLOT-VALUE IL:|self| 'WINDOW)))))
-
-(DEFMETHOD FLIP-NODE ((SELF WEB-EDITOR)
- OBJECT) (IL:* IL:\; "13-Dec-85 15:18")
- (IL:* IL:\;
- "Inverts the video around the node in the graph representing the object")
- (LET ((NODE (IL:FASSOC OBJECT (IL:|fetch| IL:GRAPHNODES IL:|of| (IL:WINDOWPROP
- (SLOT-VALUE SELF
- 'WINDOW)
- 'IL:GRAPH)))))
- (AND NODE (DISPLAY-NODE-SHADING SELF NODE (IL:INVERTED/SHADE/FOR/GRAPHER (IL:|fetch|
- IL:NODELABELSHADE
- IL:|of|
- NODE))))))
-
-(DEFMETHOD POSITION-NODE ((SELF WEB-EDITOR)
- OBJECT WINDOW-X WINDOW-Y) (IL:* IL:\; "10-Dec-84 18:24")
-
-(IL:* IL:|;;;| "scrolls the window so that the node is in the given position of the window. If windowX or windowY is a FLOATP, it it taken to be a window-relative postion; if a FIXP, it is a window-absolute position.")
-
- (LET ((REGION (NODE-REGION SELF OBJECT)))
- (IL:|if| REGION
- IL:|then| (SCROLL-WINDOW SELF (IL:|fetch| IL:LEFT IL:|of| REGION)
- (IL:|fetch| IL:BOTTOM IL:|of| REGION)
- WINDOW-X WINDOW-Y))))
-(IL:DEFINEQ
-
-(BOX-PRINT-STRING
- (IL:LAMBDA (STRING MAX-CHARS-WIDTH MAX-LINES FONT OLD-BITMAP)
- (IL:* IL:\; "Edited 29-Jan-88 15:06 by Rao")
-
- (IL:* IL:|;;|
- "return a bitmap containing the string, in the given font, with MAX-WIDTH at most width")
- (IL:* IL:\;
- "sizes of NULL or 0 mean no max size")
- (IL:SETQ MAX-CHARS-WIDTH (OR MAX-CHARS-WIDTH 0))
- (IL:SETQ MAX-LINES (OR MAX-LINES 0))
- (IL:|if| (IL:ZEROP MAX-CHARS-WIDTH)
- IL:|then| (IL:* IL:\;
- "no max width, then just return the STRING")
- STRING
- IL:|else|
- (PROG ((MAX-WIDTH (IL:ITIMES MAX-CHARS-WIDTH (IL:STRINGWIDTH "A" FONT)))
- (NCHARS (IL:NCHARS STRING))
- (NLINES 0)
- (SPOS 0)
- (REGION (IL:CONSTANT (IL:|create| IL:REGION)))
- (TRUE-MAX-WIDTH 0)
- NEXTPOS DSP SUBSTR)
- (IL:SETQ STRING (IL:MKSTRING STRING)) (IL:* IL:\;
- "we need to find the size of the resultant bitmap")
- IL:NEXTBREAK
- (IL:|if| (IL:ILESSP SPOS NCHARS)
- IL:|then| (IL:|add| NLINES 1) (IL:* IL:\;
- "at least one character, even if exceed MAX-WIDTH")
- (IL:SETQ NEXTPOS (IL:IMAX 1 (CAR (BREAK-STRING-FOR-BOXING
- (IL:SUBSTRING STRING (IL:ADD1 SPOS)
- -1)
- MAX-WIDTH FONT))))
- (IL:SETQ TRUE-MAX-WIDTH (IL:IMAX TRUE-MAX-WIDTH (IL:STRINGWIDTH
- (IL:SUBSTRING STRING
- (IL:ADD1 SPOS)
- (IL:IPLUS SPOS NEXTPOS)
- )
- FONT)))
- (IL:|add| SPOS NEXTPOS)
- (GO IL:NEXTBREAK))
- (IL:|if| (NOT (IL:ZEROP MAX-LINES))
- IL:|then| (IL:SETQ NLINES (IL:IMIN MAX-LINES NLINES)))
- (IL:* IL:\;
- "that we have the size, lets build it")
- (IL:SETQ DSP (IL:DSPCREATE
- (IL:|if| (AND OLD-BITMAP
- (NOT (OR (IL:GREATERP TRUE-MAX-WIDTH (IL:BITMAPWIDTH
- OLD-BITMAP))
- (IL:GREATERP (IL:ITIMES NLINES
- (IL:FONTPROP FONT
- 'IL:HEIGHT))
- (IL:BITMAPHEIGHT OLD-BITMAP)))))
- IL:|then| OLD-BITMAP
- IL:|else| (IL:BITMAPCREATE TRUE-MAX-WIDTH (IL:ITIMES
- NLINES
- (IL:FONTPROP FONT
- 'IL:HEIGHT))))))
- (IL:DSPFONT FONT DSP)
- (IL:DSPRESET DSP)
- (IL:SETQ SPOS 0)
- (IL:|replace| IL:LEFT IL:|of| REGION IL:|with| 0)
- (IL:|replace| IL:WIDTH IL:|of| REGION IL:|with| TRUE-MAX-WIDTH)
- (IL:|replace| IL:HEIGHT IL:|of| REGION IL:|with| (IL:FONTPROP FONT
- 'IL:HEIGHT))
- (IL:|replace| IL:BOTTOM IL:|of| REGION IL:|with| (IL:ITIMES
- NLINES
- (IL:FONTPROP FONT
- 'IL:HEIGHT)))
- IL:NEXTPIECE
- (IL:|add| NLINES -1)
- (IL:|if| (IL:ILESSP SPOS NCHARS)
- IL:|then| (IL:SETQ NEXTPOS (IL:IMAX 1 (CAR (BREAK-STRING-FOR-BOXING
- (IL:SUBSTRING STRING (IL:ADD1 SPOS)
- -1)
- TRUE-MAX-WIDTH FONT))))
- (IL:SETQ SUBSTR (IL:SUBSTRING STRING (IL:ADD1 SPOS)
- (IL:IPLUS NEXTPOS SPOS)))
- (IL:|replace| IL:BOTTOM IL:|of| REGION
- IL:|with| (IL:IDIFFERENCE (IL:|fetch| IL:BOTTOM IL:|of| REGION)
- (IL:|fetch| IL:HEIGHT IL:|of| REGION)))
- (IL:|if| (AND (IL:ZEROP NLINES)
- (IL:ILESSP (IL:IPLUS NEXTPOS SPOS)
- NCHARS))
- IL:|then| (IL:* IL:\; "we need to abbreviate!")
- (IL:CENTERPRINTINREGION (IL:CONCAT (IL:SUBSTRING SUBSTR 1 -3)
- "...")
- REGION DSP)
- (GO IL:ALLDONE)
- IL:|else| (IL:* IL:\; "out this piece")
- (IL:CENTERPRINTINREGION SUBSTR REGION DSP)
- (IL:|add| SPOS NEXTPOS)
- (GO IL:NEXTPIECE)))
- IL:ALLDONE
- (RETURN (IL:DSPDESTINATION NIL DSP))))))
-
-(BREAK-STRING-FOR-BOXING
- (IL:LAMBDA (IL:MSG IL:WIDTH IL:FONT) (IL:* IL:\; "11-Dec-84 10:29")
-
- (IL:* IL:\; IL:|Stolen| IL:|from| IL:|the| IL:|function| IL:ICONW.FORMATLINE
- IL:-- IL:|modified| IL:|to| IL:|try| IL:|to| IL:|break| IL:|at| "word"
- IL:|boundaries,| IL:|whatever| IL:|they| IL:|are|)
-
- (IL:* IL:\; IL:\a IL:|list| IL:|of| IL:|the| IL:|char#| IL:|relative| IL:|to|
- IL:|char| 1 IL:|of| IL:|where| IL:|to| IL:|break| IL:|next| IL:|line,| IL:|and|
- IL:|how| IL:|much| IL:|space| IL:|was| LEFT IL:|over|
- (IL:|for| IL:|centering| IL:&\c))
-
- (COND
- (IL:MSG (IL:* IL:\; IL:|there| IL:|really|
- IL:|is| IL:\a IL:|title,| IL:|go|
- IL:|ahead| IL:|and| IL:|format|
- IL:|the| IL:|next| IL:|line.|)
- (IL:|bind| (IL:TX IL:_ 0)
- (IL:LASTB IL:_ 0)
- (IL:CH IL:_ 0)
- (IL:TMSG IL:_ (IL:OPENSTRINGSTREAM IL:MSG))
- (IL:MSGLEN IL:_ (IL:NCHARS IL:MSG)) IL:|for| IL:I IL:|from| 1
- IL:|by| 1
- IL:|do| (IL:* IL:\; IL:|thru| IL:|the|
- IL:|characters| IL:|one| IL:|by|
- IL:|one.|)
- (COND
- ((IL:IGREATERP IL:TX IL:WIDTH) (IL:* IL:\; IL:|past| IL:|the|
- IL:|right| IL:|margin.|
- IL:|Time| IL:|to| IL:|stop.|)
- (IL:CLOSEF? IL:TMSG)
- (RETURN (COND
- ((IL:LISTP IL:LASTB) (IL:* IL:\; IL:|is| IL:\a IL:|space|
- IL:|we| IL:|can| IL:|break| IL:|the|
- IL:|line| IL:|at.|
- IL:|Break| IL:|there.|)
- IL:LASTB)
- (T
-
- (IL:* IL:\; IL:|were| IL:|no| IL:|spaces| IL:|on| IL:|this| IL:|line.|
- IL:|Break| IL:|after| IL:|the| IL:|last| IL:|character| IL:|that| IL:|did|
- IL:|fit.|)
-
- (CONS (IL:IDIFFERENCE IL:I 2)
- (IL:IDIFFERENCE IL:WIDTH (IL:IDIFFERENCE IL:TX
- (IL:CHARWIDTH IL:CH
- IL:FONT))))))))
- ((IL:EOFP IL:TMSG) (IL:* IL:\; IL:|was| IL:|the|
- IL:|last| IL:|character.|)
- (IL:CLOSEF? IL:TMSG)
- (RETURN (CONS (IL:SUB1 IL:I)
- (IL:IDIFFERENCE IL:WIDTH IL:TX))))
- (T (IL:* IL:\; IL:|at| IL:|the|
- IL:|next| IL:|character.|)
- (IL:SETQ IL:CH (IL:BIN IL:TMSG))
- (IL:SELCHARQ IL:CH
- ((IL:SPACE IL:\. IL:\: IL:\; IL:\, / IL:\\ IL:* - IL:\#)
-
- (IL:* IL:\; IL:|where| IL:|word| IL:|breaks| IL:|are,| IL:|so| IL:|we| IL:|can|
- IL:|back| IL:|up| IL:|and| IL:|split| IL:|lines| IL:|there| IL:|if|
- IL:|possible.|)
-
- (IL:SETQ IL:LASTB (CONS IL:I (IL:IDIFFERENCE IL:WIDTH IL:TX
- ))))
- (IL:CR (IL:* IL:\; IL:|forces| IL:\a
- IL:|new| IL:|line.|)
- (RETURN (CONS (IL:IMINUS IL:I)
- (IL:IDIFFERENCE IL:WIDTH IL:TX))))
- (IL:|if| (AND (NOT (IL:U-CASEP (IL:CHARACTER IL:CH)))
- (NOT (IL:EOFP IL:TMSG))
- (IL:U-CASEP (IL:PEEKC IL:TMSG)))
- IL:|then| (IL:* IL:\; IL:|from| IL:|upper|
- IL:|to| IL:|lower| IL:|case| IL:|is|
- IL:|also| IL:\a IL:|word| IL:|break|)
- (IL:SETQ IL:LASTB (CONS IL:I (IL:IDIFFERENCE IL:WIDTH
- IL:TX)))))
- (IL:SETQ IL:TX (IL:IPLUS IL:TX (IL:CHARWIDTH IL:CH IL:FONT)))))))
- (T (IL:* IL:\; IL:|isn't| IL:\a
- IL:|title;| IL:|return| IL:\a
- IL:|dummy| IL:|entry| IL:|for|
- IL:|the| IL:|line| IL:|formatter.|)
- (CONS 0 IL:WIDTH)))))
-
-(BOX-WINDOW-NODE
- (IL:LAMBDA (IL:|nodeLabel| WINDOW) (IL:* IL:\; "Edited 29-Jan-88 11:31 by Rao")
- (IL:* IL:\; " 7-Sep-84 14:36")
-
- (IL:* IL:|;;| "a box around the node with nodeLabel in the graph. A nodeLabel in browsers is an object. Does nothing if node not found.")
-
- (PROG (IL:|node| IL:|nodes|)
- (COND
- ((AND (IL:WINDOWP WINDOW)
- (IL:SETQ IL:|nodes| (IL:|fetch| IL:GRAPHNODES IL:|of| (IL:WINDOWPROP
- WINDOW
- 'IL:GRAPH)))
- (IL:SETQ IL:|node| (IL:FASSOC IL:|nodeLabel| IL:|nodes|)))
- (IL:DRAWAREABOX (IL:GN/LEFT IL:|node|)
- (IL:GN/BOTTOM IL:|node|)
- (IL:|fetch| IL:NODEWIDTH IL:|of| IL:|node|)
- (IL:|fetch| IL:NODEHEIGHT IL:|of| IL:|node|)
- 1
- 'IL:INVERT WINDOW))))))
-)
-
-
-
-(IL:* IL:\; "Button Events")
-
-(IL:DEFINEQ
-
-(FIND-SELECTED-NODE
- (IL:LAMBDA (WINDOW) (IL:* IL:\; "Edited 12-Nov-87 01:30 by Rao")
- (IL:* IL:\; "10-Dec-84 17:53")
-
- (IL:* IL:|;;| "Used in BUTTONEVENTFN and gets called whenever cursor moves or button is down. Adapted from APPLYTOSELECTEDNODE in GRAPHER package; returns the selected item rather than applying a function on the inside of the button event fn.")
-
- (IL:* IL:|;;|
- "Also this was modified to pop up the middle button menu on button down rather than button up.")
-
- (PROG ((LOOPS-WINDOW (IL:WINDOWPROP WINDOW 'WEB-EDITOR))
- (NODELST (IL:|fetch| (IL:GRAPH IL:GRAPHNODES) IL:|of| (IL:WINDOWPROP WINDOW
- 'IL:GRAPH)))
- (DS (IL:WINDOWPROP WINDOW 'IL:DSP))
- BUTTON OLDPOS REG NOW NEAR) (IL:* IL:\;
- "note which button is down.")
- (IL:* IL:\;
- "get the region of this window.")
- (IL:SETQ REG (IL:WINDOWPROP WINDOW 'IL:REGION))
- (IL:|until| (IL:LASTMOUSESTATE (OR IL:LEFT IL:MIDDLE)) IL:|do| (IL:GETMOUSESTATE))
- (IL:SETQ NEAR (IL:NODELST/AS/MENU NODELST (IL:SETQ OLDPOS (IL:CURSORPOSITION NIL DS))))
- IL:FLIP
-
-
- (IL:* IL:|;;| "This is kirk's quick hack to get middle button to bring up immediately.")
-
- (WHEN (IL:LASTMOUSESTATE IL:MIDDLE)
- (RETURN (IL:|fetch| IL:NODEID IL:|of| NEAR)))
- (AND NOW (IL:FLIPNODE NOW DS))
- (AND NEAR (IL:FLIPNODE NEAR DS))
- (IL:SETQ NOW NEAR)
- IL:LP
- (IL:* IL:\;
- "wait for a button up or move out of region")
- (IL:GETMOUSESTATE)
- (COND
- ((IL:LASTMOUSESTATE (AND (NOT IL:LEFT)
- (NOT IL:MIDDLE))) (IL:* IL:\;
- "left button up, process it.")
- (AND NOW (IL:FLIPNODE NOW DS)) (IL:* IL:\;
- "NOW node has been selected.")
- (RETURN (IL:|fetch| IL:NODEID IL:|of| NOW)))
- ((NOT (IL:INSIDE? (IL:WINDOWPROP WINDOW 'IL:REGION)
- IL:LASTMOUSEX IL:LASTMOUSEY)) (IL:* IL:\;
- "outside of region, return")
- (AND NOW (IL:FLIPNODE NOW DS))
- (RETURN))
- ((EQ NOW (IL:SETQ NEAR (IL:NODELST/AS/MENU NODELST (IL:CURSORPOSITION NIL DS OLDPOS))))
- (GO IL:LP))
- (T (GO IL:FLIP))))))
-)
-
-(DEFMETHOD BUTTON-EVENT-FN ((SELF WEB-EDITOR)) (IL:* IL:\; " 2-Jan-86 16:41")
- (IL:* IL:\;
- "Called when there is a button event in a Loops Window")
- (LET ((WINDOW (SLOT-VALUE SELF 'WINDOW)))
- (OR (IL:ERSETQ (COND
- ((NULL (IL:INSIDEP (IL:DSPCLIPPINGREGION NIL WINDOW)
- (IL:LASTMOUSEX WINDOW)
- (IL:LASTMOUSEY WINDOW)))
- (TITLE-SELECTION SELF))
- ((IL:MOUSESTATE IL:LEFT)
- (LEFT-SELECTION SELF))
- ((IL:MOUSESTATE IL:MIDDLE)
- (MIDDLE-SELECTION SELF))
- ((IL:MOUSESTATE IL:RIGHT)
- (RIGHT-SELECTION SELF)))))))
-
-(DEFMETHOD LEFT-SELECTION ((SELF WEB-EDITOR))
- (IF (MOVE-DOWN-P)
- (IF (SLOT-VALUE SELF 'NODE-MOVER-P)
- (NODE-MOVE SELF)
- (NODE-MOVE-SHALLOW SELF))
- (NODE-SELECTION SELF 'IL:LEFT)))
-
-(DEFMETHOD MIDDLE-SELECTION ((SELF WEB-EDITOR)) (IL:* IL:\; "15-May-85 19:04")
-
- (IL:* IL:|;;| "This function called from the GRAPHER package when a node is selected with the middle mouse button. If no node is selected then just returns.")
-
- (PROG (SELECTION OBJECT (WINDOW (SLOT-VALUE SELF 'WINDOW))
- (WEB-EDITOR SELF))
- (DECLARE (IL:SPECVARS OBJECT WEB-EDITOR))
- (COND
- ((NULL (IL:SETQ OBJECT (FIND-SELECTED-NODE WINDOW)))
- (RETURN)))
- (SETF (SLOT-VALUE WEB-EDITOR 'LAST-SELECTED-OBJECT)
- OBJECT)
- (IL:GETMOUSESTATE)
- (FLIP-NODE SELF OBJECT)
- (IL:SETQ SELECTION (OR (NODE-ACTION SELF OBJECT 'IL:MIDDLE)
- (PROGN (FLIP-NODE SELF OBJECT)
- (RETURN NIL))))
- (FLIP-NODE SELF OBJECT)
- (DO-SELECTED-COMMAND WEB-EDITOR SELECTION OBJECT)))
-
-(DEFMETHOD RIGHT-SELECTION ((SELF WEB-EDITOR)) (IL:* IL:\; "17-Apr-84 15:46")
- (IL:* IL:\;
- "Do RightButtonItems on selection.")
- (LET* ((CHOICE (CHOICE-MENU SELF 'RIGHT-BUTTON-ITEMS)))
- (IF CHOICE (FUNCALL CHOICE SELF))))
-
-(DEFMETHOD TITLE-SELECTION ((SELF WEB-EDITOR)) (IL:* IL:\; "17-Apr-84 15:35")
-
- (IL:* IL:|;;| " Do TitleItems if selected in title area. Replaces TitleSelection in Window because this one does evaluation in TTY process, and saves events on history")
-
- (LET* ((CHOICE (CHOICE-MENU SELF 'TITLE-ITEMS)))
- (IF CHOICE (FUNCALL CHOICE SELF))))
-
-(DEFMETHOD NODE-SELECTION ((SELF WEB-EDITOR)
- BUTTON)
- (LET* ((WINDOW (SLOT-VALUE SELF 'WINDOW))
- (OBJECT (FIND-SELECTED-NODE WINDOW)))
- (DECLARE (IL:SPECVARS OBJECT)) (IL:* IL:\; "SPECVARS for whenHeldFn")
- (IF (LISTP OBJECT)
- (SETQ OBJECT (CAR OBJECT)))
- (COND
- ((NOT (NULL OBJECT))
- (SETF (SLOT-VALUE SELF 'LAST-SELECTED-OBJECT)
- OBJECT)))
- (IL:GETMOUSESTATE)
- (WHEN OBJECT
- (LET ((SELECTOR (NODE-ACTION SELF OBJECT BUTTON)))
- (COND
- (SELECTOR (DO-SELECTED-COMMAND SELF SELECTOR OBJECT)))))))
-
-(DEFMETHOD NODE-ACTION ((SELF WEB-EDITOR)
- NODE BUTTON) (IL:* IL:\; " 8-Apr-87 17:11")
- (DECLARE (IL:SPECVARS WINDOW-FOR-MENU))
- (LET ((WINDOW-FOR-MENU SELF))
- (IL:GETMOUSESTATE)
- (CHOICE-MENU SELF
-
- (IL:* IL:|;;| " A Hook for letting nodes tailor menu items.")
-
- (NODE-MENU-ITEMS NODE BUTTON))))
-
-(DEFMETHOD NODE-MENU-ITEMS ((NODE WEB-NODE)
- BUTTON)
- (CASE BUTTON
- (IL:LEFT 'LEFT-BUTTON-ITEMS)
- (IL:MIDDLE 'MIDDLE-BUTTON-ITEMS)))
-
-(DEFMETHOD CHOICE-MENU ((SELF WEB-EDITOR)
- ITEM-CV) (IL:* IL:\; "29-Dec-85 13:54")
-
- (IL:* IL:|;;|
- "Create a menu which allows subitems to be displayed. Cache it in the web-editor ")
-
- (LET (ITEMS MENU)
- (SETQ MENU (REST (ASSOC ITEM-CV (SLOT-VALUE SELF 'MENU-CACHE))))
- (COND
- ((AND MENU (IL:TYPE? IL:MENU MENU))
- (IL:MENU MENU))
- ((NOT (LISTP (SETQ ITEMS (GET-MENU-ITEMS SELF ITEM-CV))))
- ITEMS)
- (T (IL:SETQ MENU (IL:CREATE IL:MENU
- IL:ITEMS IL:_ ITEMS
- IL:MENUOFFSET IL:_ (IL:CREATEPOSITION -1 0)
- IL:WHENSELECTEDFN IL:_ 'WEB-MENU-WHENSELECTEDFN
- IL:WHENHELDFN IL:_ 'WINDOW-WHEN-HELD-FN
- IL:CHANGEOFFSETFLG IL:_ T
- IL:CENTERFLG IL:_ T)) (IL:* IL:\; "Cache menu if menus is T")
- (IF (SLOT-VALUE SELF 'CACHE-MENU-P)
- (SETF (SLOT-VALUE SELF 'MENU-CACHE)
- (ACONS ITEM-CV MENU (SLOT-VALUE SELF 'MENU-CACHE))))
- (IL:MENU MENU)))))
-
-(DEFMETHOD DO-SELECTED-COMMAND ((WEB-EDITOR WEB-EDITOR)
- COMMAND OBJ &OPTIONAL NODE)
- (IL:* IL:\; "17-Sep-86 17:49")
-
- (IL:* IL:|;;| "Do the selected command or forwards it to the object")
-
- (IF COMMAND
-
- (IL:* IL:|;;| "Take care of being passed in a dummy node from browser in Lattice mode. --- Dummy nodes are indicated by having the object in a list")
-
- (LET ((ARGS (IF (IL:LISTP COMMAND)
- (CDR COMMAND)
- NIL))
- (COMMAND (IF (IL:LISTP COMMAND)
- (CAR COMMAND)
- COMMAND))
- (OBJ (IF (IL:LISTP OBJ)
- (CAR OBJ)
- OBJ)))
- (WHEN (IL:FMEMB COMMAND (SLOT-VALUE WEB-EDITOR 'LOCAL-COMMANDS))
- (SETQ ARGS (CONS OBJ ARGS))
- (SETQ OBJ WEB-EDITOR))
-
- (IL:* IL:|;;|
- "Grays out the node at the beginning of the command, and ungrays it when the command completes.")
-
- (SETQ NODE OBJ)
- (IF NODE
- (PROGN (SHADE-NODE WEB-EDITOR NODE IL:GRAYSHADE2)
- (IL:BLOCK 500)
- (SHADE-NODE WEB-EDITOR NODE IL:WHITESHADE)
- (APPLY COMMAND OBJ ARGS))
- (APPLY COMMAND OBJ ARGS)))))
-
-(DEFMETHOD WHEN-MENU-ITEM-HELD ((SELF WEB-EDITOR)
- ITEM MENU KEY) (IL:* IL:\; " 8-Apr-87 17:13")
-
-(IL:* IL:|;;;| "What to do when the menu item is held")
-
- (IL:PROMPTPRINT (OR (COND
- ((IL:NLISTP ITEM)
- NIL)
- (T (CADDR ITEM)))
- "When released this item will be selected")))
-
-(DEFMETHOD ITEM-MENU ((SELF WEB-EDITOR)
- ITEMS TITLE) (IL:* IL:\; "21-Apr-84 09:31")
- (IL:* IL:\;
- "Create a simnple (one level) menu which will not overflow height of screen")
- (IL:|create| IL:MENU
- IL:ITEMS IL:_ ITEMS
- IL:MENUCOLUMNS IL:_ (IL:ADD1 (IL:IQUOTIENT (IL:ITIMES (IL:FONTHEIGHT IL:MENUFONT)
- (IL:LENGTH ITEMS))
- 750))
- IL:TITLE IL:_ TITLE
- IL:CHANGEOFFSETFLG IL:_ T))
-
-(DEFMETHOD GET-MENU-ITEMS ((SELF WEB-EDITOR)
- ITEM-CV) (IL:* IL:\; "23-Oct-84 12:36")
- (IL:* IL:\; "Get item list for menu")
- (SLOT-VALUE SELF ITEM-CV))
-
-(DEFMETHOD CLEAR-MENU-CACHE ((SELF WEB-EDITOR)) (IL:* IL:\; "11-Apr-86 14:46")
- (IL:* IL:\;
- "Delete Menus saved on menus")
- (SETF (SLOT-VALUE SELF 'MENU-CACHE)
- NIL)
- SELF)
-(IL:DEFINEQ
-
-(WEB-MENU-WHENSELECTEDFN
- (IL:LAMBDA (ITEM MENU BUTTON) (IL:* IL:\; "Edited 14-Jul-87 17:43 by Rao")
- (IL:* IL:\; "13-DEC-83 21:03")
- (PROG (SECOND-ELEMENT)
- (RETURN (COND
- ((IL:NLISTP ITEM)
- ITEM)
- ((IL:NLISTP (IL:SETQ SECOND-ELEMENT (CADR ITEM)))
- SECOND-ELEMENT)
- ((EQ (CAR SECOND-ELEMENT)
- 'PROGN)
- (IL:EVAL SECOND-ELEMENT))
- (T SECOND-ELEMENT))))))
-
-(WINDOW-WHEN-HELD-FN
- (LAMBDA (ITEM MENU KEY) (IL:* IL:\; "Edited 9-Jul-87 11:58 by Rao")
- (IL:* IL:\; "29-Dec-85 15:28")
- (IL:* IL:\;
- "Send to window the message to respond to time out on menu")
- (DECLARE (IL:SPECVARS WINDOW-FOR-MENU))
- (WHEN-MENU-ITEM-HELD WINDOW-FOR-MENU ITEM MENU KEY)))
-)
-(IL:DEFINEQ
-
-(SUB-ITEM-SELECTION
- (IL:LAMBDA (ITEM MENU BUTTON) (IL:* IL:\; "Edited 14-Jul-87 17:13 by Rao")
- (IL:* IL:\; "13-DEC-83 21:03")
-
- (IL:* IL:|;;| "menu WHENSELECTEDFN which allows differential selection on LEFT and middle button. For such differential selection item should be of form --- (itemSeenInMenu (leftValue midValue)) --- where midValue can be an atom which is directly returned when item is selected with middle, or midValue can be an itemList, which will be displayed in a subselection menu")
-
- (PROG (IT IT1)
- (RETURN (COND
- ((IL:NLISTP ITEM)
- ITEM)
- ((IL:NLISTP (IL:SETQ IT (CADR ITEM)))
- IT)
- ((EQ (IL:SETQ IT1 (CAR IT))
- 'QUOTE)
- (CADR IT))
- ((EQ IT1 'PROGN)
- (IL:EVAL IT))
- ((IL:LISTP IT1)
- (IL:EVAL IT1))
- (T IT1))))))
-
-(DUAL-SUB-ITEMS
- (IL:LAMBDA (MENU ITEM) (IL:* IL:\; "Edited 14-Jul-87 17:14 by Rao")
- (IL:* IL:\; "13-DEC-83 21:07")
-
- (IL:* IL:|;;| "menu WHENSELECTEDFN which allows differential selection on LEFT and middle button. For such differential selection item should be of form --- (itemSeenInMenu (leftValue midValue)) --- where midValue can be an atom which is directly returned when item is selected with middle, or midValue can be an itemList, which will be displayed in a subselection menu")
-
- (PROG (IT IT1)
- (RETURN (COND
- ((OR (IL:NLISTP ITEM)
- (IL:NLISTP (IL:SETQ IT (CADR ITEM)))
- (EQ (IL:SETQ IT1 (CAR IT))
- 'QUOTE)
- (EQ IT1 'PROGN)
- (IL:NLISTP (IL:SETQ IT1 (CADR IT))))
- NIL)
- (T IT1))))))
-
-(WINDOW-WHEN-HELD-FN
- (LAMBDA (ITEM MENU KEY) (IL:* IL:\; "Edited 9-Jul-87 11:58 by Rao")
- (IL:* IL:\; "29-Dec-85 15:28")
- (IL:* IL:\;
- "Send to window the message to respond to time out on menu")
- (DECLARE (IL:SPECVARS WINDOW-FOR-MENU))
- (WHEN-MENU-ITEM-HELD WINDOW-FOR-MENU ITEM MENU KEY)))
-
-(DO-MENU-METHOD
- (IL:LAMBDA (OBJECT ITEMS) (IL:* IL:\; "Edited 14-Jul-87 17:15 by Rao")
- (IL:* IL:\; "13-NOV-83 16:20")
- (PROG ((SELECTOR (AND ITEMS (DUAL-MENU ITEMS))))
- (AND SELECTOR (RETURN (FUNCALL SELECTOR OBJECT))))))
-
-(DUAL-MENU
- (IL:LAMBDA (ITEMS WHEN-HELD-FN) (IL:* IL:\; "Edited 14-Jul-87 17:16 by Rao")
- (IL:* IL:\; " 9-FEB-84 16:17")
- (IL:* IL:\;
- "and pops up a menu which allows differential selection on LEFT an middle buttons")
- (IL:MENU (IL:|create| IL:MENU
- IL:ITEMS IL:_ ITEMS
- IL:WHENSELECTEDFN IL:_ 'SUB-ITEM-SELECTION
- IL:SUBITEMFN IL:_ 'DUAL-SUB-ITEMS
- IL:WHENHELDFN IL:_ WHEN-HELD-FN
- IL:CHANGEOFFSETFLG IL:_ T))))
-
-(DUAL-SELECTION
- (IL:LAMBDA (ITEM MENU BUTTON) (IL:* IL:\; "Edited 14-Jul-87 17:28 by Rao")
- (IL:* IL:\; "29-MAR-83 17:57")
-
- (IL:* IL:|;;| "MENU WHENSELECTEDFN which allows differential selection on LEFT and middle button. For such differential selection ITEM should be of form --- (itemSeenInMenu (leftValue midValue)) --- where midValue can be an atom which is directly returned when ITEM is selected with middle, or midValue can be an itemList, which will be displayed in a subselection MENU")
-
- (PROG (IT IT1)
- (RETURN (COND
- ((IL:NLISTP ITEM)
- ITEM)
- ((IL:NLISTP (IL:SETQ IT (CADR ITEM)))
- IT)
- ((EQ (IL:SETQ IT1 (CAR IT))
- 'QUOTE)
- (CADR IT))
- ((EQ IT1 'PROGN)
- (IL:EVAL IT))
- ((EQ BUTTON 'IL:LEFT)
- (COND
- ((IL:LISTP IT1)
- (IL:EVAL IT1))
- (T IT1)))
- ((IL:NLISTP (IL:SETQ IT1 (CADR IT)))
- IT1)
- (T (DUAL-MENU IT1)))))))
-)
-
-
-
-(IL:* IL:\; "Node Moving Protocol")
-
-
-(DEFMETHOD NODE-MOVE ((SELF WEB-EDITOR))
- (LET ((OLD-REGIONS (MAKE-REG-ASSOC SELF))
- NEW-REGIONS MOVED-PAIR NEW-FATHER CLOSEST-PAIR)
- (NODE-MOVE-SHALLOW SELF)
- (SETQ NEW-REGIONS (MAKE-REG-ASSOC SELF))
- (SETQ MOVED-PAIR (IL:|for| |npair| IL:|in| NEW-REGIONS IL:|as| |opair|
- IL:|in| OLD-REGIONS IL:|thereis| (NOT (IL:EQUAL (CAR |opair|)
- (CAR |npair|)))))
- (WHEN (AND MOVED-PAIR
-
- (IL:* IL:|;;| "The moved guy has a parent")
-
- (SLOT-VALUE (CDR MOVED-PAIR)
- 'PARENT))
- (IL:DREMOVE MOVED-PAIR NEW-REGIONS)
- (SETQ NEW-REGIONS
-
- (IL:* IL:|;;| "Collect the pairs that havn't changed.")
-
- (IL:|bind| (SCIONS-OF-MOVED IL:_ (SCIONS (CDR MOVED-PAIR))) IL:|for| PAIR
- IL:|in| NEW-REGIONS IL:|unless| (IL:MEMBER (CDR PAIR)
- SCIONS-OF-MOVED) IL:|collect|
- PAIR))
- (SETQ CLOSEST-PAIR (IL:|bind| (\b IL:_ (IL:|fetch| IL:BOTTOM IL:|of|
- (CAR MOVED-PAIR)))
- (\l IL:_ (IL:|fetch| IL:LEFT IL:|of| (CAR MOVED-PAIR)))
- IL:|for| |pair| IL:|in| NEW-REGIONS
- IL:|smallest| (IL:PLUS (ABS (IL:IDIFFERENCE (IL:|fetch|
- IL:BOTTOM
- IL:|of|
- (CAR |pair|))
- \b))
- (ABS (IL:IDIFFERENCE (IL:|fetch|
- IL:LEFT
- IL:|of|
- (CAR |pair|))
- \l)))))
-
- (IL:* IL:|;;|
- "Either make moved node a sibling or a child of the node it is now closest to.")
-
- (IL:|if| (IL:IGREATERP (IL:IDIFFERENCE (IL:|fetch| IL:LEFT IL:|of|
- (CAR MOVED-PAIR))
- (IL:|fetch| IL:LEFT IL:|of| (CAR CLOSEST-PAIR))
- )
- 15)
- IL:|then| (IL:SETQ NEW-FATHER (CDR CLOSEST-PAIR))
- IL:|else| (IL:SETQ NEW-FATHER (OR (SLOT-VALUE (CDR CLOSEST-PAIR)
- 'PARENT)
- (CDR CLOSEST-PAIR))))
- (MOVE-NODE (CDR MOVED-PAIR)
- NEW-FATHER)
- (REORDER-TREE SELF NEW-FATHER))
- (RECOMPUTE SELF)))
-
-(DEFMETHOD NODE-MOVE-SHALLOW ((SELF WEB-EDITOR))
-
- (IL:* IL:|;;| "Just moves the node graphically with no deep impact")
-
- (LET ((WINDOW (SLOT-VALUE SELF 'WINDOW)))
- (IL:RESETLST
- (IL:RESETSAVE NIL (LIST (IL:FUNCTION IL:DSPOPERATION)
- (IL:DSPOPERATION 'IL:INVERT WINDOW)
- WINDOW))
- (IL:GETMOUSESTATE) (IL:* IL:\; "Here to move a node.")
- (IL:DSPOPERATION 'IL:INVERT WINDOW)
- (IL:EDITMOVENODE WINDOW))))
-
-(DEFMETHOD SCIONS ((SELF WEB-NODE)) (IL:* IL:\; "14-Nov-86 03:01")
- (IL:* IL:\; "Used by the Node Mover")
- (LET ((TO-LINKS (GET-TO-LINKS SELF)))
- (APPEND TO-LINKS (IL:|for| IL:|child| IL:|in| TO-LINKS IL:|join| (SCIONS
- IL:|child|
- )))))
-
-(DEFMETHOD MAKE-REG-ASSOC ((SELF WEB-EDITOR)) (IL:* IL:\; "14-Nov-86 02:08")
- (IL:* IL:\; "Ho hum")
- (IL:|for| X IL:|in| (SLOT-VALUE SELF 'STARTING-LIST) IL:|collect| (CONS (NODE-REGION
- SELF X)
- X)))
-
-(DEFMETHOD REORDER-TREE ((SELF WEB-EDITOR)
- ROOT) (IL:* IL:\; "14-Nov-86 02:35")
- (LET ((CHILDREN (GET-TO-LINKS ROOT)))
- (IF CHILDREN
- (IL:SORT CHILDREN #'(IL:LAMBDA (C1 C2)
- (LET ((R1 (NODE-REGION SELF C1))
- (R2 (NODE-REGION SELF C2)))
- (IL:LESSP (IL:|fetch| IL:BOTTOM IL:|of| R1)
- (IL:|fetch| IL:BOTTOM IL:|of| R2))))))))
-
-(DEFMETHOD MOVE-NODE ((SELF WEB-NODE)
- NEW-PARENT) (IL:* IL:\; "29-Jan-87 17:55")
- (LET ((OLD-PARENT (SLOT-VALUE SELF 'PARENT)))
- (UNLESS (EQ OLD-PARENT NEW-PARENT)
- (SETF (SLOT-VALUE SELF 'PARENT)
- NEW-PARENT)
- (SETF (SLOT-VALUE OLD-PARENT 'TO-LINKS)
- (IL:DREMOVE SELF (SLOT-VALUE OLD-PARENT 'TO-LINKS)))
- (SETF (SLOT-VALUE NEW-PARENT 'TO-LINKS)
- (IL:NCONC1 (SLOT-VALUE NEW-PARENT 'TO-LINKS)
- SELF))
- T)))
-
-
-
-(IL:* IL:\; "")
-
-
-
-
-(IL:* IL:|;;| "")
-
-(IL:DECLARE\: IL:DONTEVAL@LOAD IL:DOEVAL@COMPILE IL:DONTCOPY IL:COMPILERVARS
-
-(IL:ADDTOVAR IL:NLAMA )
-
-(IL:ADDTOVAR IL:NLAML )
-
-(IL:ADDTOVAR IL:LAMA WINDOW-WHEN-HELD-FN WINDOW-WHEN-HELD-FN)
-)
-(IL:PUTPROPS IL:WEB-EDITOR IL:COPYRIGHT ("Xerox Corporation" 1987 1988 1989 1991))
-(IL:DECLARE\: IL:DONTCOPY
- (IL:FILEMAP (NIL (50310 53152 (WEB-WINDOW-AFTER-MOVE-FN 50323 . 50701) (WEB-WINDOW-BUTTON-EVENT-FN
-50703 . 51146) (WEB-WINDOW-RESHAPE-FN 51148 . 51704) (WEB-WINDOW-CLOSE-FN 51706 . 52056) (
-IL:|PromptRead| 52058 . 53150)) (53153 53586 (WEB-WINDOW-EXPAND-FN 53166 . 53584)) (57488 65032 (
-TREE-ROOTS 57501 . 62883) (CHILD-NODES 62885 . 63646) (REACHABLE-NODES! 63648 . 65030)) (94827 108235
-(BOX-PRINT-STRING 94840 . 101302) (BREAK-STRING-FOR-BOXING 101304 . 107100) (BOX-WINDOW-NODE 107102 .
-108233)) (108273 111315 (FIND-SELECTED-NODE 108286 . 111313)) (119862 121033 (WEB-MENU-WHENSELECTEDFN
-119875 . 120505) (WINDOW-WHEN-HELD-FN 120507 . 121031)) (121034 126038 (SUB-ITEM-SELECTION 121047 .
-122147) (DUAL-SUB-ITEMS 122149 . 123158) (WINDOW-WHEN-HELD-FN 123160 . 123684) (DO-MENU-METHOD 123686
- . 124026) (DUAL-MENU 124028 . 124723) (DUAL-SELECTION 124725 . 126036)))))
-IL:STOP
diff --git a/obsolete/clos/2.0/boot.lisp b/obsolete/clos/2.0/boot.lisp
deleted file mode 100644
index 5385f6ff..00000000
--- a/obsolete/clos/2.0/boot.lisp
+++ /dev/null
@@ -1,1297 +0,0 @@
-;;;-*- Package: CLOS; Syntax: Common-Lisp; Base: 10 -*-
-
-
-;;; File converted on 2-Apr-91 16:40:32 from source bood
-
-
-
-(in-package "CLOS")
-
-;;; Shadow, Export, Require, Use-package, and Import forms should follow here
-
-
-
-;;; ************************************************************************* Copyright (c) 1985,
-;;; 1986, 1987, 1988, 1989, 1990 Xerox Corporation. All rights reserved. Use and copying of this
-;;; software and preparation of derivative works based upon this software are permitted. Any
-;;; distribution of this software or derivative works must comply with all applicable United States
-;;; export control laws. This software is made available AS IS, and Xerox Corporation makes no
-;;; warranty about the software, its performance or its conformity to any specification. Any person
-;;; obtaining a copy of this software is requested to send their name and post office or electronic
-;;; mail address to: CommonLoops Coordinator Xerox PARC 3333 Coyote Hill Rd. Palo Alto, CA 94304 (or
-;;; send Arpanet mail to CommonLoops-Coordinator.pa@Xerox.arpa) Suggestions, comments and requests
-;;; for improvements are also welcome.
-;;; *************************************************************************
-
-
-#|
-
-The CommonLoops evaluator is meta-circular.
-
-Most of the code in CLOS is methods on generic functions, including most of
-the code that actually implements generic functions and method lookup.
-
-So, we have a classic bootstrapping problem. The solution to this is to
-first get a cheap implementation of generic functions running, these are
-called early generic functions. These early generic functions and the
-corresponding early methods and early method lookup are used to get enough
-of the system running that it is possible to create real generic functions
-and methods and implement real method lookup. At that point (done in the
-file FIXUP) the function fix-early-generic-functions is called to convert
-all the early generic functions to real generic functions.
-
-The cheap generic functions are built using the same funcallable-instance
-objects real generic-functions are made out of. This means that as CLOS
-is being bootstrapped, the cheap generic function objects which are being
-created are the same objects which will later be real generic functions.
-This is good because:
- - we don't cons garbage structure
- - we can keep pointers to the cheap generic function objects
- during booting because those pointers will still point to
- the right object after the generic functions are all fixed
- up
-
-
-
-This file defines the defmethod macro and the mechanism used to expand it.
-This includes the mechanism for processing the body of a method. defmethod
-basically expands into a call to load-defmethod, which basically calls
-add-method to add the method to the generic-function. These expansions can
-be loaded either during bootstrapping or when CLOS is fully up and running.
-
-An important effect of this structure is it means we can compile files with
-defmethod forms in them in a completely running CLOS, but then load those files
-back in during bootstrapping. This makes development easier. It also means
-there is only one set of code for processing defmethod. Bootstrapping works
-by being sure to have load-method be careful to call only primitives which
-work during bootstrapping.
-
-|#
-
-(proclaim '(notinline make-a-method add-named-method ensure-generic-function-using-class add-method
- remove-method))
-
-(defvar *early-functions* '((make-a-method early-make-a-method real-make-a-method)
- (add-named-method early-add-named-method real-add-named-method)))
-
-
-;;; For each of the early functions, arrange to have it point to its early definition. Do this in a
-;;; way that makes sure that if we redefine one of the early definitions the redefinition will take
-;;; effect. This makes development easier. The function which generates the redirection closure is
-;;; pulled out into a separate piece of code because of a bug in ExCL which causes this not to work
-;;; if it is inlined.
-
-
-(eval-when (load eval)
- (defun redirect-early-function-internal (to)
- #'(lambda (&rest args)
- (apply (symbol-function to)
- args)))
- (dolist (fns *early-functions*)
- (let ((name (car fns))
- (early-name (cadr fns)))
- (setf (symbol-function name)
- (redirect-early-function-internal early-name))))
-)
-
-
-;;; *generic-function-fixups* is used by fix-early-generic-functions to convert the few functions in
-;;; the bootstrap which are supposed to be generic functions but can't be early on.
-
-
-(defvar *generic-function-fixups* '((add-method ((generic-function method)
- ; lambda-list
- (standard-generic-function method)
- ; specializers
- real-add-method))
- ; method-function
- (remove-method ((generic-function method)
- (standard-generic-function method)
- real-remove-method))
- (get-method ((generic-function qualifiers specializers &optional
- (errorp t))
- (standard-generic-function t t)
- real-get-method))
- (ensure-generic-function-using-class ((generic-function
- function-specifier
- &key
- generic-function-class
- environment
- &allow-other-keys)
- (generic-function t)
-
- real-ensure-gf-using-class--generic-function
- )
- ((generic-function function-specifier &key
- generic-function-class environment
- &allow-other-keys)
- (null t)
- real-ensure-gf-using-class--null))))
-
-
-;;;
-
-
-(defmacro defgeneric (function-specifier lambda-list &body options)
- (expand-defgeneric function-specifier lambda-list options))
-
-(defun expand-defgeneric (function-specifier lambda-list options)
- (when (listp function-specifier)
- (do-standard-defsetf-1 (cadr function-specifier)))
- (let ((initargs nil))
- (flet ((duplicate-option (name)
- (error "The option ~S appears more than once." name)))
-
- ;; INITARG takes this screwy new argument to get around a bad interaction between
- ;; lexical macros and setf in the Lucid compiler.
- (macrolet ((initarg (key &optional new)
- (if new
- `(setf (getf initargs ,key)
- ,new)
- `(getf initargs ,key))))
- (dolist (option options)
- (ecase (car option)
- (:argument-precedence-order
- (if (initarg :argument-precedence-order)
- (duplicate-option :argument-precedence-order)
- (initarg :argument-precedence-order
- `',(cdr option))))
- (declare (initarg :declarations (append (cdr option)
- (initarg :declarations))))
- (:documentation (if (initarg :documentation)
- (duplicate-option :documentation)
- (initarg :documentation
- `',(cadr option))))
- (:method-combination
- (if (initarg :method-combination)
- (duplicate-option :method-combination)
- (initarg :method-combination
- `',(cdr option))))
- (:generic-function-class
- (if (initarg :generic-function-class)
- (duplicate-option :generic-function-class)
- (initarg :generic-function-class
- `',(cadr option))))
- (:method-class (if (initarg :method-class)
- (duplicate-option :method-class)
- (initarg :method-class
- `',(cadr option))))
- (:method (error "DEFGENERIC doesn't support the :METHOD option yet."
- ))))
- (let ((declarations (initarg :declarations)))
- (when declarations
- (initarg :declarations `',declarations)))))
- (make-top-level-form `(defgeneric ,function-specifier)
- *defgeneric-times*
- `(load-defgeneric ',function-specifier ',lambda-list ,@initargs))))
-
-(defun load-defgeneric (function-specifier lambda-list &rest initargs)
- (when (listp function-specifier)
- (do-standard-defsetf-1 (cadr function-specifier)))
- (apply #'ensure-generic-function function-specifier :lambda-list lambda-list
- :definition-source `((defgeneric ,function-specifier)
- ,(load-truename))
- initargs))
-
-
-;;;
-
-
-(defmacro defmethod (&rest args &environment env)
- (declare (arglist name {method-qualifier}* specialized-lambda-list &body body))
- (multiple-value-bind (name qualifiers lambda-list body)
- (parse-defmethod args)
- (let ((proto-method (method-prototype-for-gf name)))
- (expand-defmethod proto-method name qualifiers lambda-list body env))))
-
-
-;;; takes a name which is either a generic function name or a list specifying a setf generic
-;;; function (like: (SETF )). Returns the prototype instance of the
-;;; method-class for that generic function. If there is no generic function by that name, this
-;;; returns the default value, the prototype instance of the class STANDARD-METHOD. This default
-;;; value is also returned if the spec names an ordinary function or even a macro. In effect, this
-;;; leaves the signalling of the appropriate error until load time. NOTE that during bootstrapping,
-;;; this function is allowed to return NIL.
-
-
-(defun method-prototype-for-gf (name)
- (let ((gf? (and (gboundp name)
- (gdefinition name))))
- (cond ((neq *boot-state* 'complete)
- nil)
- ((or (null gf?)
- (not (generic-function-p gf?)))
- ; Someone else MIGHT error at load
- ; time.
- (class-prototype (find-class 'standard-method)))
- (t (class-prototype (or (generic-function-method-class gf?)
- (find-class 'standard-method)))))))
-
-(defun expand-defmethod (proto-method name qualifiers lambda-list body env)
- (when (listp name) (do-standard-defsetf-1 (cadr name)))
- (multiple-value-bind (fn-form specializers doc plist)
- (expand-defmethod-internal name qualifiers lambda-list body env)
- `(load-defmethod
- ',(if proto-method
- (class-name (class-of proto-method))
- 'standard-method)
- ',name
- ',qualifiers
- (list ,@(mapcar #'(lambda (specializer)
- (if (and (consp specializer)
- (eq (car specializer) 'eql))
- ``(eql ,,(cadr specializer))
- `',specializer))
- specializers))
- ',(specialized-lambda-list-lambda-list lambda-list)
- ',doc
- ',(getf plist :isl-cache-symbol) ;Paper over a bug in KCL by
- ;passing the cache-symbol
- ;here in addition to in the
- ;plist.
- ',plist
- ,fn-form)))
-
-(defun
- expand-defmethod-internal
- (generic-function-name qualifiers specialized-lambda-list body env)
- (declare (values fn-form specializers doc)
- (ignore qualifiers))
- (when (listp generic-function-name)
- (do-standard-defsetf-1 (cadr generic-function-name)))
- (multiple-value-bind
- (documentation declarations real-body)
- (extract-declarations body)
- (multiple-value-bind
- (parameters lambda-list specializers)
- (parse-specialized-lambda-list specialized-lambda-list)
- (let*
- ((required-parameters (mapcar #'(lambda (r s)
- (declare (ignore s))
- r)
- parameters specializers))
- (parameters-to-reference (make-parameter-references specialized-lambda-list required-parameters
- declarations generic-function-name specializers))
- (class-declarations
- `(declare ,@(remove nil (mapcar #'(lambda (a s)
- (and (symbolp s)
- (neq s 't)
- `(class ,a ,s)))
- parameters specializers))))
- (method-lambda
-
- ;; Remove the documentation string and insert the appropriate class declarations. The
- ;; documentation string is removed to make it easy for us to insert new declarations
- ;; later, they will just go after the cadr of the method lambda. The class declarations
- ;; are inserted to communicate the class of the method's arguments to the code walk.
- (let nil `(lambda ,lambda-list ,class-declarations ,@declarations (progn
- ,@
- parameters-to-reference
- )
- (block ,(if (listp generic-function-name)
- (cadr generic-function-name)
- generic-function-name)
- ,@real-body))))
- (call-next-method-p nil)
- ; flag indicating that call-next-method
- ; should be in the method definition
- (closurep nil)
- ; flag indicating that
- ; #'call-next-method was seen in the
- ; body of a method
- (next-method-p-p nil)
- ; flag indicating that next-method-p
- ; should be in the method definition
- (save-original-args nil)
- ; flag indicating whether or not the
- ; original arguments to the method must
- ; be preserved. This happens for two
- ; reasons: - the method takes &mumble
- ; args, so one of the lexical functions
- ; might be used in a default value form
- ; - call-next-method is used without
- ; arguments at least once in the body
- ; of the method
- (original-args nil)
- (applyp nil)
- ; flag indicating whether or not the
- ; method takes &mumble arguments. If it
- ; does, it means call-next-method
- ; without arguments must be APPLY'd to
- ; original-args. If this gets set
- ; true, save-original-args is set so as
- ; well
- (aux-bindings nil)
- ; Suffice to say that &aux is one of
- ; damndest things to have put in a
- ; language.
- (slots (mapcar #'list required-parameters))
- (plist nil)
- (walked-lambda nil))
- (flet ((walk-function (form context env)
- (cond ((not (eq context ':eval))
- form)
- ((not (listp form))
- form)
- ((eq (car form)
- 'call-next-method)
- (setq call-next-method-p 't)
- (unless (cdr form)
- (setq save-original-args t))
- form)
- ((eq (car form)
- 'next-method-p)
- (setq next-method-p-p 't)
- form)
- ((and (eq (car form)
- 'function)
- (cond ((eq (cadr form)
- 'call-next-method)
- (setq call-next-method-p 't)
- (setq save-original-args 't)
- (setq closurep t)
- form)
- ((eq (cadr form)
- 'next-method-p)
- (setq next-method-p-p 't)
- (setq closurep t)
- form)
- (t nil))))
- ((and (or (eq (car form)
- 'slot-value)
- (eq (car form)
- 'set-slot-value))
- (symbolp (cadr form))
- (constantp (caddr form)))
- (let ((parameter (can-optimize-access (cadr form)
- required-parameters env)))
- (if (null parameter)
- form
- (ecase (car form)
- (slot-value (optimize-slot-value slots parameter form))
- (set-slot-value (optimize-set-slot-value slots parameter form)))
-)))
- (t form))))
- (setq walked-lambda (walk-form method-lambda env #'walk-function))
-
- ;; Add &allow-other-keys to the lambda list as an interim way of implementing lambda list
- ;; congruence rules.
- (when (and (memq '&key lambda-list)
- (not (memq '&allow-other-keys lambda-list)))
- (let* ((rll (reverse lambda-list))
- (aux (memq '&aux rll)))
- (setq lambda-list (if aux
- (progn (setf (cdr aux)
- (cons '&allow-other-keys (cdr aux)))
- (nreverse rll))
- (nconc (nreverse rll)
- (list '&allow-other-keys))))))
-
- ;; Scan the lambda list to determine whether this method takes &mumble arguments. If it
- ;; does, we set applyp and save-original-args true. This is also the place where we
- ;; construct the original arguments lambda list if there has to be one.
- (dolist (p lambda-list)
- (if (memq p lambda-list-keywords)
- (if (eq p '&aux)
- (progn (setq aux-bindings (cdr (memq '&aux lambda-list)))
- (return nil))
- (progn (setq applyp t save-original-args t)
- (push '&rest original-args)
- (push (make-symbol "AMPERSAND-ARGS")
- original-args)
- (return nil)))
- (push (make-symbol (symbol-name p))
- original-args)))
- (setq original-args (if save-original-args
- (nreverse original-args)
- nil))
- (multiple-value-bind (ignore walked-declarations walked-lambda-body)
- (extract-declarations (cddr walked-lambda))
- (declare (ignore ignore))
- (when (some #'cdr slots)
- (setq slots (slot-name-lists-from-slots slots))
- (setq plist (list* :isl slots plist))
- (setq walked-lambda-body (add-pv-binding walked-lambda-body plist
- required-parameters)))
- (when (or next-method-p-p call-next-method-p)
- (setq plist (list* :needs-next-methods-p 't plist)))
-
-
-;;; changes are here... (mt)
-
- (let ((fn-body (if (or call-next-method-p next-method-p-p)
- (add-lexical-functions-to-method-lambda
- walked-declarations walked-lambda-body
- `(lambda ,lambda-list ,@walked-declarations
- ,.walked-lambda-body)
- original-args lambda-list save-original-args applyp aux-bindings
- call-next-method-p next-method-p-p closurep)
- `(lambda ,lambda-list ,@walked-declarations ,.walked-lambda-body))
- ))
- (values `#',fn-body specializers documentation plist))))))))
-
-(defun
- add-lexical-functions-to-method-lambda
- (walked-declarations walked-lambda-body walked-lambda original-args lambda-list save-original-args
- applyp aux-bindings call-next-method-p next-method-p-p closurep)
- (cond
- ((and (null closurep)
- (null applyp)
- (null save-original-args))
-
- ;; OK to use MACROLET, CALL-NEXT-METHOD is always passed some args, and all args are mandatory
- ;; (else APPLYP would be true).
- `(lambda ,lambda-list ,@walked-declarations
- (let ((.next-method. (car *next-methods*))
- (.next-methods. (cdr *next-methods*)))
- (macrolet ((call-next-method ,lambda-list '(if .next-method.
- (let ((*next-methods* .next-methods.))
- (funcall .next-method.
- ,@lambda-list))
- (error "No next method.")))
- (next-method-p nil `(not (null .next-method.))))
- ,@walked-lambda-body))))
- ((and (null closurep)
- (null applyp)
- save-original-args)
-
- ;; OK to use MACROLET. CALL-NEXT-METHOD is sometimes called in the body with zero args, so we
- ;; have to save the original args.
- (if save-original-args
-
- ;; CALL-NEXT-METHOD is sometimes called with no args
- `(lambda ,original-args
- (let ((.next-method. (car *next-methods*))
- (.next-methods. (cdr *next-methods*)))
- (macrolet ((call-next-method
- (&rest cnm-args)
- `(if .next-method.
- (let ((*next-methods* .next-methods.))
- (funcall .next-method. ,@(if cnm-args
- cnm-args
- ',original-args)))
- (error "No next method.")))
- (next-method-p nil `(not (null .next-method.))))
- (let* (,@(mapcar #'list lambda-list original-args)
- ,@aux-bindings)
- ,@walked-declarations
- ,@walked-lambda-body))))))
- ((and (null save-original-args)
- (null applyp))
-
- ;; We don't have to save the original arguments. In addition, this method doesn't take any
- ;; &mumble arguments (this means that there is no way the lexical functions can be used inside of
- ;; the default value form for an &mumble argument). We can expand this into a simple lambda
- ;; expression with an FLET to define the lexical functions.
- `(lambda ,lambda-list ,@walked-declarations
- (let ((.next-method. (car *next-methods*))
- (.next-methods. (cdr *next-methods*)))
- (flet (,@(and call-next-method-p '((call-next-method (&rest cnm-args)
- (if .next-method.
- (let ((*next-methods* .next-methods.))
- (apply .next-method. cnm-args))
- (error "No next method.")))))
- ,@(and next-method-p-p '((next-method-p nil (not (null .next-method.))))))
- ,@walked-lambda-body))))
- ((null applyp)
-
- ;; This method doesn't accept any &mumble arguments. But we do have to save the original
- ;; arguments (this is because call-next-method is being called with no arguments). Have to be
- ;; careful though, there may be multiple calls to call-next-method, all we know is that at least
- ;; one of them is with no arguments.
- `(lambda ,original-args
- (let ((.next-method. (car *next-methods*))
- (.next-methods. (cdr *next-methods*)))
- (flet (,@(and call-next-method-p
- `((call-next-method (&rest cnm-args)
- (if .next-method.
- (let ((*next-methods* .next-methods.))
- (if cnm-args
- (apply .next-method. cnm-args)
- (funcall .next-method. ,@original-args)))
- (error "No next method.")))))
- ,@(and next-method-p-p '((next-method-p nil (not (null .next-method.))))))
- (let* (,@(mapcar #'list (remtail lambda-list (memq '&aux lambda-list))
- original-args)
- ,@aux-bindings)
- ,@walked-declarations
- ,@walked-lambda-body)))))
- (t
-
- ;; This is the fully general case. We must allow for the lexical functions being used inside the
- ;; default value forms of &mumble arguments, and if must allow for call-next-method being called
- ;; with no arguments.
- `(lambda
- ,original-args
- (let
- ((.next-method. (car *next-methods*))
- (.next-methods. (cdr *next-methods*)))
- (flet (,@(and call-next-method-p
- `((call-next-method (&rest cnm-args)
- (if .next-method.
- (let ((*next-methods* .next-methods.))
- (if cnm-args
- (apply .next-method. cnm-args)
- (apply .next-method. ,@(remove '&rest original-args))))
- (error "No next method.")))))
- ,@(and next-method-p-p '((next-method-p nil (not (null .next-method.))))))
- (apply #',walked-lambda ,@(remove '&rest original-args))))))))
-
-(defun make-parameter-references (specialized-lambda-list required-parameters declarations
- generic-function-name specializers)
- (flet ((ignoredp (symbol)
- (dolist (decl (cdar declarations))
- (when (and (eq (car decl)
- 'ignore)
- (memq symbol (cdr decl)))
- (return t)))))
- (gathering ((references (collecting)))
- (iterate ((s (list-elements specialized-lambda-list))
- (p (list-elements required-parameters)))
- (progn p)
- (cond ((not (listp s)))
- ((ignoredp (car s))
- (warn "In defmethod ~S ~S, there is a~%~
- redundant ignore declaration for the parameter ~S." generic-function-name
- specializers (car s)))
- (t (gather (car s)
- references)))))))
-
-(defvar *method-function-plist* (make-hash-table :test #'eq))
-
-(defun method-function-plist (method-function)
- (gethash method-function *method-function-plist*))
-
-(defun |SETF CLOS METHOD-FUNCTION-PLIST| (val method-function)
- (setf (gethash method-function *method-function-plist*)
- val))
-
-(defun method-function-get (method-function key)
- (getf (method-function-plist method-function)
- key))
-
-(defun |SETF CLOS METHOD-FUNCTION-GET| (val method-function key)
- (setf (getf (method-function-plist method-function)
- key)
- val))
-
-(defun method-function-isl (method-function)
- (method-function-get method-function :isl))
-
-(defun method-function-needs-next-methods-p (method-function)
- (method-function-get method-function :needs-next-methods-p))
-
-(defun load-defmethod (class name quals specls ll doc isl-cache-symbol plist fn)
- (when (listp name)
- (do-standard-defsetf-1 (cadr name)))
- (let ((method-spec (make-method-spec name quals specls)))
- (record-definition 'method method-spec)
- (setq fn (set-function-name fn method-spec))
- (load-defmethod-internal name quals specls ll doc isl-cache-symbol plist fn class)))
-
-(defun load-defmethod-internal (gf-spec qualifiers specializers lambda-list doc isl-cache-symbol
- plist fn method-class)
- (when (listp gf-spec)
- (do-standard-defsetf-1 (cadr gf-spec)))
- (when plist
- (setq plist (copy-list plist))
- ; Do this to keep from affecting the
- ; plist that is about to be dumped when
- ; we are compiling.
- (let ((uisl (getf plist :isl))
- (isl nil))
- (when uisl
- (setq isl (intern-slot-name-lists uisl))
- (setf (getf plist :isl)
- isl))
- (when isl-cache-symbol
- (setf (getf plist :isl-cache-symbol)
- isl-cache-symbol)
- (set isl-cache-symbol isl)))
- (setf (method-function-plist fn)
- plist))
- (let ((method (add-named-method gf-spec qualifiers specializers lambda-list fn :documentation
- doc :definition-source `((defmethod ,gf-spec ,@qualifiers ,specializers)
- ,(load-truename)))))
- (unless (or (eq method-class 'standard-method)
- (eq (find-class method-class nil)
- (class-of method)))
- (format *error-output* "At the time the method with qualifiers ~:~S and~%~
- specializers ~:S on the generic function ~S~%~
- was compiled, the method-class for that generic function was~%~
- ~S. But, the method class is now ~S, this~%~
- may mean that this method was compiled improperly." qualifiers specializers gf-spec
- method-class (class-name (class-of method))))
- method))
-
-(defun make-method-spec (gf-spec qualifiers unparsed-specializers)
- `(method ,gf-spec ,@qualifiers ,unparsed-specializers))
-
- ; Early generic-function support
-
-
-
-;;;
-
-
-(defvar *early-generic-functions* nil)
-
-(defun ensure-generic-function (function-specifier &rest all-keys &key environment &allow-other-keys)
- (declare (ignore environment))
- (let ((existing (and (gboundp function-specifier)
- (gdefinition function-specifier))))
- (if (and existing (eq *boot-state* 'complete)
- (null (generic-function-p existing)))
- (generic-clobbers-function function-specifier)
- (apply #'ensure-generic-function-using-class existing function-specifier all-keys))))
-
-(defun generic-clobbers-function (function-specifier)
- (error "~S already names an ordinary function or a macro,~%~
- you may want to replace it with a generic function, but doing so~%~
- will require that you decide what to do with the existing function~%~
- definition.~%~
- The CLOS-specific function MAKE-SPECIALIZABLE may be useful to you."
- function-specifier))
-
-
-;;; This is the early definition of ensure-generic-function-using-class. The static-slots field of
-;;; the funcallable instances used as early generic functions is used to store the early methods and
-;;; early discriminator code for the early generic function. The static slots field of the fins
-;;; contains a list whose: CAR - a list of the early methods on this early gf CADR - the
-;;; early discriminator code for this method
-
-
-(defun ensure-generic-function-using-class (existing spec &rest keys)
- (declare (ignore keys))
- (if* existing existing (pushnew spec *early-generic-functions* :test #'equal)
- (let ((fin (allocate-funcallable-instance-1)))
- (setf (gdefinition spec)
- fin)
- (setf (fsc-instance-slots fin)
- (list nil nil))
- fin)))
-
-(defun early-gf-p (x)
- (and (fsc-instance-p x)
- (listp (fsc-instance-slots x))))
-
-(defmacro early-gf-methods (early-gf)
- ; These are macros so that
- `(car (fsc-instance-slots ,early-gf)))
-
- ; they can be setf'd.
-
-
-(defmacro early-gf-discriminator-code (early-gf)
- ;
- `(cadr (fsc-instance-slots ,early-gf)))
-
- ;
-
-
-(defmacro real-ensure-gf-internal (gf-class all-keys env)
- `(progn (cond ((symbolp ,gf-class)
- (setq ,gf-class (find-class ,gf-class t ,env)))
- ((classp ,gf-class))
- (t (error "The :GENERIC-FUNCTION-CLASS argument (~S) was neither a~%~
- class nor a symbol that names a class." ,gf-class)))
- (remf ,all-keys :generic-function-class)
- (remf ,all-keys :environment)
- (let ((combin (getf ,all-keys :method-combination '.shes-not-there.)))
- (unless (eq combin '.shes-not-there.)
- (setf (getf ,all-keys :method-combination)
- (find-method-combination (class-prototype ,gf-class)
- (car combin)
- (cdr combin)))))))
-
-(defun real-ensure-gf-using-class--generic-function (existing function-specifier &rest all-keys &key
- environment (generic-function-class
- 'standard-generic-function
- gf-class-p)
- &allow-other-keys)
- (declare (ignore function-specifier))
- (real-ensure-gf-internal generic-function-class all-keys environment)
- (unless (or (null gf-class-p)
- (eq (class-of existing)
- generic-function-class))
- (change-class existing generic-function-class))
- (apply #'reinitialize-instance existing all-keys))
-
-(defun real-ensure-gf-using-class--null (existing function-specifier &rest all-keys &key environment
- (generic-function-class 'standard-generic-function)
- &allow-other-keys)
- (declare (ignore existing))
- (real-ensure-gf-internal generic-function-class all-keys environment)
- (setf (gdefinition function-specifier)
- (apply #'make-instance generic-function-class :name function-specifier all-keys)))
-
-(defun early-make-a-method (class qualifiers arglist specializers function doc &optional slot-name)
- (let ((parsed nil)
- (unparsed nil))
-
- ;; Figure out whether we got class objects or class names as the specializers and set
- ;; parsed and unparsed appropriately. If we got class objects, then we can compute
- ;; unparsed, but if we got class names we don't try to compute parsed. Note that the use
- ;; of not symbolp in this call to every should be read as 'classp' we can't use classp
- ;; itself because it doesn't exist yet.
- (if (every #'(lambda (s)
- (not (symbolp s)))
- specializers)
- (setq parsed specializers unparsed (mapcar #'(lambda (s)
- (if (eq s 't)
- 't
- (class-name s)))
- specializers))
- (setq unparsed specializers parsed nil))
- (list :early-method ; This is an early method dammit!
- function
- ; Function is here for the benefit of
- ; early-lookup-method.
- parsed
- ; The parsed specializers. This is
- ; used by early-method-specializers to
- ; cache the parse. Note that this only
- ; comes into play when there is more
- ; than one early method on an early gf.
- (list class ; A list to which real-make-a-method
- qualifiers
- ; can be applied to make a real method
- arglist
- ; corresponding to this early one.
- unparsed function doc slot-name))))
-
-(defun real-make-a-method (class qualifiers lambda-list specializers function doc &optional slot-name
- )
-
- ;; Hmm what is this use of when buying me??
- (when (some #'(lambda (x)
- (and (neq x 't)
- (symbolp x)))
- specializers)
- (setq specializers (parse-specializers specializers)))
- (make-instance class :qualifiers qualifiers :lambda-list lambda-list :specializers
- specializers :function function :documentation doc :slot-name slot-name
- :allow-other-keys t))
-
-(defun early-method-function (early-method)
- (cadr early-method))
-
-
-;;; Fetch the specializers of an early method. This is basically just a simple accessor except that
-;;; when the second argument is t, this converts the specializers from symbols into class objects.
-;;; The class objects are cached in the early method, this makes bootstrapping faster because the
-;;; class objects only have to be computed once. NOTE: the second argument should only be passed as
-;;; T by early-lookup-method. this is to implement the rule that only when there is more than one
-;;; early method on a generic function is the conversion from class names to class objects done. the
-;;; corresponds to the fact that we are only allowed to have one method on any generic function up
-;;; until the time classes exist.
-
-
-(defun early-method-specializers (early-method &optional objectsp)
- (if (and (listp early-method)
- (eq (car early-method)
- :early-method))
- (cond ((eq objectsp 't)
- (or (caddr early-method)
- (setf (caddr early-method)
- (mapcar #'find-class (cadddr (cadddr early-method))))))
- (t (cadddr (cadddr early-method))))
- (error "~S is not an early-method." early-method)))
-
-(defun early-method-qualifiers (early-method)
- (cadr (cadddr early-method)))
-
-(defun early-add-named-method (generic-function-name qualifiers specializers arglist function &rest
- options)
- (declare (ignore options))
- (let* ((gf (ensure-generic-function generic-function-name))
- (existing (dolist (m (early-gf-methods gf))
- (when (and (equal (early-method-specializers m)
- specializers)
- (equal (early-method-qualifiers m)
- qualifiers))
- (return m))))
- (new (make-a-method 'standard-method qualifiers arglist specializers function nil)))
- (when existing (remove-method gf existing))
- (add-method gf new)))
-
-
-;;; This is the early version of add-method. Later this will become a generic function. See
-;;; fix-early-generic-functions which has special knowledge about add-method.
-
-
-(defun add-method (generic-function method)
- (when (not (fsc-instance-p generic-function))
- (error "Early add-method didn't get a funcallable instance."))
- (when (not (and (listp method)
- (eq (car method)
- :early-method)))
- (error "Early add-method didn't get an early method."))
- (push method (early-gf-methods generic-function))
- (early-update-discriminator-code generic-function))
-
-
-;;; This is the early version of remove method.
-
-
-(defun remove-method (generic-function method)
- (when (not (fsc-instance-p generic-function))
- (error "Early remove-method didn't get a funcallable instance."))
- (when (not (and (listp method)
- (eq (car method)
- :early-method)))
- (error "Early remove-method didn't get an early method."))
- (setf (early-gf-methods generic-function)
- (remove method (early-gf-methods generic-function)))
- (early-update-discriminator-code generic-function))
-
-
-;;; And the early version of get-method.
-
-
-(defun get-method (generic-function qualifiers specializers &optional (errorp t))
- (if (early-gf-p generic-function)
- (or (dolist (m (early-gf-methods generic-function))
- (when (and (or (equal (early-method-specializers m nil)
- specializers)
- (equal (early-method-specializers m 't)
- specializers))
- (equal (early-method-qualifiers m)
- qualifiers))
- (return m)))
- (if errorp
- (error "Can't get early method.")
- nil))
- (real-get-method generic-function qualifiers specializers errorp)))
-
-(defun early-update-discriminator-code (generic-function)
- (let* ((methods (early-gf-methods generic-function))
- (early-dfun (cond ((null methods)
- #'(lambda (&rest ignore)
- (declare (ignore ignore))
- (error
- "Called an early generic-function that ~
- has no methods?")))
- ((null (cdr methods))
-
- ;; If there is only one method, just use that method's function.
- ;; This corresponds to the important fact that early
- ;; generic-functions with only one method always call that method
- ;; when they are called. If there is more than one method, we have
- ;; to install a simple little discriminator-code for this generic
- ;; function.
- (cadr (car methods)))
- (t #'(lambda (&rest args)
- (early-dfun methods args))))))
- (set-funcallable-instance-function generic-function early-dfun)
- (setf (early-gf-discriminator-code generic-function)
- early-dfun)))
-
-(defun early-get-cpl (object)
- (bootstrap-get-slot 'std-class ; HMMM? should be CLOS-CLASS
- (class-of object)
- 'class-precedence-list))
-
-(defun early-sort-methods (list args)
- (if (null (cdr list))
- list
- (sort list #'(lambda (specls-1 specls-2)
- (iterate ((s1 (list-elements specls-1))
- (s2 (list-elements specls-2))
- (a (list-elements args)))
- (cond ((eq s1 s2))
- ((eq s2 *the-class-t*)
- (return t))
- ((eq s1 *the-class-t*)
- (return nil))
- (t (return (memq s2 (memq s1 (early-get-cpl a))))))))
- :key
- #'(lambda (em)
- (early-method-specializers em t)))))
-
-(defun early-dfun (methods args)
- (let ((primary nil)
- (before nil)
- (after nil)
- (around nil))
- (dolist (method methods)
- (let* ((specializers (early-method-specializers method t))
- (qualifiers (early-method-qualifiers method))
- (args args)
- (specs specializers))
- (when (loop (when (or (null args)
- (null specs))
-
-
- ;; If we are out of specs, then we must be in the optional, rest or
- ;; keywords arguments. This method is applicable to these
- ;; arguments. Return T.
- (return t))
- (let ((arg (pop args))
- (spec (pop specs)))
- (unless (or (eq spec *the-class-t*)
- (memq spec (early-get-cpl arg)))
- (return nil))))
- (cond ((null qualifiers)
- (push method primary))
- ((equal qualifiers '(:before))
- (push method before))
- ((equal qualifiers '(:after))
- (push method after))
- ((equal qualifiers '(:around))
- (push method around))
- (t (error "Unrecognized qualifer in early method."))))))
- (setq primary (early-sort-methods primary args)
- before
- (early-sort-methods before args)
- after
- (early-sort-methods after args)
- around
- (early-sort-methods around args))
- (flet ((do-main-combined-method (arguments)
- (dolist (m before)
- (apply (cadr m)
- arguments))
- (multiple-value-prog1 (let ((*next-methods* (mapcar #'car (cdr primary))))
- (apply (cadar primary)
- arguments))
- (dolist (m after)
- (apply (cadr m)
- arguments)))))
- (if (null around)
- (do-main-combined-method args)
- (let ((*next-methods* (append (mapcar #'cadr (cdr around))
- #'do-main-combined-method)))
- (apply (caar around)
- args))))))
-
-(defun
- fix-early-generic-functions
- (&optional noisyp)
- (allocate-instance (find-class 'standard-generic-function))
- ; Be sure this class has an instance.
- (let* ((class (find-class 'standard-generic-function))
- (wrapper (class-wrapper class))
- (n-static-slots (class-no-of-instance-slots class))
- (default-initargs (default-initargs class nil))
- (*invalidate-discriminating-function-force-p* t))
- (flet ((fix-structure (gf)
- (let ((static-slots (%allocate-static-slot-storage--class n-static-slots)))
- (setf (fsc-instance-wrapper gf)
- wrapper
- (fsc-instance-slots gf)
- static-slots))))
- (dolist (early-gf-spec *early-generic-functions*)
- (when noisyp (format t "~&~S..." early-gf-spec))
- (let* ((early-gf (gdefinition early-gf-spec))
- (early-static-slots (fsc-instance-slots early-gf))
- (early-discriminator-code nil)
- (early-methods nil)
- (methods nil)
- (aborted t))
- (flet ((trampoline (&rest args)
- (apply early-discriminator-code args)))
- (if (not (listp early-static-slots))
- (when noisyp (format t "already fixed?"))
- (unwind-protect
- (progn (setq early-discriminator-code (
- early-gf-discriminator-code
- early-gf))
- (setq early-methods (early-gf-methods early-gf))
- (setf (gdefinition early-gf-spec)
- #'trampoline)
- (when noisyp (format t "trampoline..."))
- (fix-structure early-gf)
- (when noisyp (format t "fixed..."))
- (apply #'initialize-instance early-gf :name early-gf-spec
- default-initargs)
- (dolist (early-method early-methods)
- (destructuring-bind (class quals lambda-list specs fn
- doc slot-name)
- (cadddr early-method)
- (setq specs (early-method-specializers
- early-method t))
- (let ((method (real-make-a-method class quals
- lambda-list specs fn doc
- slot-name)))
- (real-add-method early-gf method)
- (push method methods)
- (when noisyp (format t "m")))))
- (setf (slot-value early-gf 'name)
- early-gf-spec)
- (fixup-magic-generic-function early-gf-spec early-methods
- early-gf (reverse methods))
- (setq aborted nil))
- (setf (gdefinition early-gf-spec)
- early-gf)
- (when noisyp (format t "."))
- (when aborted
- (setf (fsc-instance-slots early-gf)
- early-static-slots)))))))
- (dolist (fns *early-functions*)
- (setf (symbol-function (car fns))
- (symbol-function (caddr fns))))
- (dolist (fixup *generic-function-fixups*)
- (let ((fspec (car fixup))
- (methods (cdr fixup))
- (gf (make-instance 'standard-generic-function)))
- (set-function-name gf fspec)
- (setf (generic-function-name gf)
- fspec)
- (dolist (method methods)
- (destructuring-bind (lambda-list specializers method-fn-name)
- method
- (let* ((fn (if method-fn-name
- (symbol-function method-fn-name)
- (symbol-function fspec)))
- (method (make-a-method 'standard-method nil lambda-list
- specializers fn nil)))
- (real-add-method gf method))))
- (setf (gdefinition fspec)
- gf))))))
-
-
-;;; parse-defmethod is used by defmethod to parse the &rest argument into the 'real' arguments.
-;;; This is where the syntax of defmethod is really implemented.
-
-
-(defun parse-defmethod (cdr-of-form)
- (declare (values name qualifiers specialized-lambda-list body))
- (let ((name (pop cdr-of-form))
- (qualifiers nil)
- (spec-ll nil))
- (loop (if (and (car cdr-of-form)
- (atom (car cdr-of-form)))
- (push (pop cdr-of-form)
- qualifiers)
- (return (setq qualifiers (nreverse qualifiers)))))
- (setq spec-ll (pop cdr-of-form))
- (values name qualifiers spec-ll cdr-of-form)))
-
-(defun parse-specializers (specializers)
- (flet ((parse (spec)
- (cond ((symbolp spec)
- (or (find-class spec nil)
- (error
- "~S used as a specializer,~%~
- but is not the name of a class." spec)))
- ((and (listp spec)
- (eq (car spec)
- 'eql)
- (null (cddr spec)))
- (make-instance 'eql-specializer :object (cadr spec))
- ; *EQL* spec
- )
- (t (error "~S is not a legal specializer." spec)))))
- (mapcar #'parse specializers)))
-
-(defun unparse-specializers (specializers-or-method)
- (if (listp specializers-or-method)
- (flet ((unparse (spec)
- (cond ((classp spec)
- (or (class-name spec)
- spec))
- ((eql-specializer-p spec)
- ; *EQL*
- (eql-specializer-object spec)
- ; (and (listp spec) (eq (car spec)
- ; 'eql)) spec
- )
- (t (error "~S is not a legal specializer." spec)))))
- (mapcar #'unparse specializers-or-method))
- (unparse-specializers (method-specializers specializers-or-method))))
-
-(defun parse-method-or-spec (spec &optional (errorp t))
- (declare (values generic-function method method-name))
- (let (gf method name temp)
- (if (method-p spec)
- (setq method spec gf (method-generic-function method)
- temp
- (and gf (generic-function-name gf))
- name
- (if temp
- (intern-function-name (make-method-spec temp (method-qualifiers method)
- (unparse-specializers (method-specializers
- method))))
- (make-symbol (format nil "~S" method))))
- (multiple-value-bind (gf-spec quals specls)
- (parse-defmethod spec)
- (and (setq gf (and (or errorp (gboundp gf-spec))
- (gdefinition gf-spec)))
- (let ((nreq (compute-discriminating-function-arglist-info gf)))
- (setq specls (append (parse-specializers specls)
- (make-list (- nreq (length specls))
- :initial-element *the-class-t*)))
- (and (setq method (get-method gf quals specls errorp))
- (setq name (intern-function-name (make-method-spec gf-spec
- quals specls))))))))
- (values gf method name)))
-
-(defun specialized-lambda-list-parameters (specialized-lambda-list)
- (multiple-value-bind (parameters ignore1 ignore2)
- (parse-specialized-lambda-list specialized-lambda-list)
- (declare (ignore ignore1 ignore2))
- parameters))
-
-(defun specialized-lambda-list-lambda-list (specialized-lambda-list)
- (multiple-value-bind (ignore1 lambda-list ignore2)
- (parse-specialized-lambda-list specialized-lambda-list)
- (declare (ignore ignore1 ignore2))
- lambda-list))
-
-(defun specialized-lambda-list-specializers (specialized-lambda-list)
- (multiple-value-bind (ignore1 ignore2 specializers)
- (parse-specialized-lambda-list specialized-lambda-list)
- (declare (ignore ignore1 ignore2))
- specializers))
-
-(defun specialized-lambda-list-required-parameters (specialized-lambda-list)
- (multiple-value-bind (ignore1 ignore2 ignore3 required-parameters)
- (parse-specialized-lambda-list specialized-lambda-list)
- (declare (ignore ignore1 ignore2 ignore3))
- required-parameters))
-
-(defun parse-specialized-lambda-list (arglist &optional post-keyword)
- (declare (values parameters lambda-list specializers required-parameters))
- (let ((arg (car arglist)))
- (cond ((null arglist)
- (values nil nil nil nil))
- ((eq arg '&aux)
- (values nil arglist nil))
- ((memq arg lambda-list-keywords)
- (unless (memq arg '(&optional &rest &key &allow-other-keys &aux))
-
- ;; Warn about non-standard lambda-list-keywords, but then go on to treat them
- ;; like a standard lambda-list-keyword what with the warning its probably ok.
- (warn "Unrecognized lambda-list keyword ~S in arglist.~%~
- Assuming that the symbols following it are parameters,~%~
- and not allowing any parameter specializers to follow~%~
- to follow it." arg))
-
- ;; When we are at a lambda-list-keyword, the parameters don't include the
- ;; lambda-list-keyword; the lambda-list does include the lambda-list-keyword; and
- ;; no specializers are allowed to follow the lambda-list-keywords (at least for
- ;; now).
- (multiple-value-bind (parameters lambda-list)
- (parse-specialized-lambda-list (cdr arglist)
- t)
- (values parameters (cons arg lambda-list)
- nil nil)))
- (post-keyword
-
- ;; After a lambda-list-keyword there can be no specializers.
- (multiple-value-bind (parameters lambda-list)
- (parse-specialized-lambda-list (cdr arglist)
- t)
- (values (cons (if (listp arg)
- (car arg)
- arg)
- parameters)
- (cons arg lambda-list)
- nil nil)))
- (t (multiple-value-bind (parameters lambda-list specializers required)
- (parse-specialized-lambda-list (cdr arglist))
- (values (cons (if (listp arg)
- (car arg)
- arg)
- parameters)
- (cons (if (listp arg)
- (car arg)
- arg)
- lambda-list)
- (cons (if (listp arg)
- (cadr arg)
- 't)
- specializers)
- (cons (if (listp arg)
- (car arg)
- arg)
- required)))))))
-
-(eval-when (load eval)
- (setq *boot-state* 'early))
-
-(defmacro with-slots (slots instance &body body &environment env)
- (let ((gensym (gensym))
- (specs (mapcar #'(lambda (ss)
- (if (consp ss)
- (list (car ss)
- (variable-lexical-p (car ss)
- env)
- (cadr ss))
- (list ss (variable-lexical-p ss env)
- ss)))
- slots)))
- (expand-with-slots specs body env gensym instance
- #'(lambda (s)
- `(slot-value ,gensym ',s)))))
-
-(defmacro with-accessors (slot-accessor-pairs instance &body body &environment env)
- (let ((gensym (gensym))
- (specs (mapcar #'(lambda (ss)
- (list (car ss)
- (variable-lexical-p (car ss)
- env)
- (cadr ss)))
- slot-accessor-pairs)))
- (expand-with-slots specs body env gensym instance #'(lambda (a)
- `(,a ,gensym)))))
-
-(defun expand-with-slots (specs body env gensym instance translate-fn)
- `(let ((,gensym ,instance))
- ,@(and (symbolp instance)
- `((declare (variable-rebinding ,gensym ,instance))))
- ,gensym
- ,@(cdr (walk-form `(progn ,@body)
- env
- #'(lambda (f c e)
- (expand-with-slots-internal specs f c translate-fn e))))))
-
-(defun expand-with-slots-internal (specs form context translate-fn env)
- (let ((entry nil))
- (cond ((not (eq context :eval))
- form)
- ((symbolp form)
- (if (and (setq entry (assoc form specs))
- (eq (cadr entry)
- (variable-lexical-p form env)))
- (funcall translate-fn (caddr entry))
- form))
- ((not (listp form))
- form)
- ((member (car form)
- '(setq setf))
-
- ;; Have to be careful. We must only convert the form to a SETF form when we
- ;; convert one of the 'logical' variables to a form Otherwise we will get looping
- ;; in implementations where setf is a macro which expands into setq.
- (let ((kind (car form)))
- (labels ((scan-setf (tail)
- (if (null tail)
- nil
- (walker::relist* tail
- (if (and (setq entry (assoc (car tail)
- specs))
- (eq (cadr entry)
- (variable-lexical-p (car tail)
- env)))
- (progn (setq kind 'setf)
- (funcall translate-fn (caddr entry)))
- (car tail))
- (cadr tail)
- (scan-setf (cddr tail))))))
- (let (new-tail)
- (setq new-tail (scan-setf (cdr form)))
- (walker::recons form kind new-tail)))))
- ((eq (car form)
- 'multiple-value-setq)
- (let* ((vars (cadr form))
- (gensyms (mapcar #'(lambda (i)
- (declare (ignore i))
- (gensym))
- vars)))
- `(multiple-value-bind ,gensyms ,(caddr form)
- . ,(reverse (mapcar #'(lambda (v g)
- `(setf ,v ,g))
- vars gensyms)))))
- (t form))))
diff --git a/obsolete/clos/2.0/braid.lisp b/obsolete/clos/2.0/braid.lisp
deleted file mode 100644
index 80424b6a..00000000
--- a/obsolete/clos/2.0/braid.lisp
+++ /dev/null
@@ -1,503 +0,0 @@
-;;;-*-Mode:LISP; Package:(CLOS (LISP WALKER)); Base:10; Syntax:Common-lisp -*-
-;;;
-;;; *************************************************************************
-;;; Copyright (c) 1991 Venue
-;;; All rights reserved.
-;;; *************************************************************************
-;;;
-;;; Bootstrapping the meta-braid.
-;;;
-;;; The code in this file takes the early definitions that have been saved
-;;; up and actually builds those class objects. This work is largely driven
-;;; off of those class definitions, but the fact that STANDARD-CLASS is the
-;;; class of all metaclasses in the braid is built into this code pretty
-;;; deeply.
-;;;
-;;;
-
-(in-package 'clos)
-
-(defun early-class-definition (class-name)
- (or (find class-name *early-class-definitions* :key #'ecd-class-name)
- (error "~S is not a class in *early-class-definitions*." class-name)))
-
-(defun canonical-slot-name (canonical-slot)
- (getf canonical-slot :name))
-
-(defun early-collect-inheritance (class-name)
- (declare (values slots cpl default-initargs direct-subclasses))
- (let ((cpl (early-collect-cpl class-name)))
- (values (early-collect-slots cpl)
- cpl
- (early-collect-default-initargs cpl)
- (gathering1 (collecting)
- (dolist (definition *early-class-definitions*)
- (when (memq class-name (ecd-superclass-names definition))
- (gather1 (ecd-class-name definition))))))))
-
-(defun early-collect-cpl (class-name)
- (labels ((walk (c)
- (let* ((definition (early-class-definition c))
- (supers (ecd-superclass-names definition)))
- (cons c
- (apply #'append (mapcar #'early-collect-cpl supers))))))
- (remove-duplicates (walk class-name) :from-end nil :test #'eq)))
-
-(defun early-collect-slots (cpl)
- (let* ((definitions (mapcar #'early-class-definition cpl))
- (super-slots (mapcar #'ecd-canonical-slots definitions))
- (slots (apply #'append (reverse super-slots))))
- (dolist (s1 slots)
- (let ((name1 (canonical-slot-name s1)))
- (dolist (s2 (cdr (memq s1 slots)))
- (when (eq name1 (canonical-slot-name s2))
- (error "More than one early class defines a slot with the~%~
- name ~S. This can't work because the bootstrap~%~
- object system doesn't know how to compute effective~%~
- slots."
- name1)))))
- slots))
-
-(defun early-collect-default-initargs (cpl)
- (let ((default-initargs ()))
- (dolist (class-name cpl)
- (let ((definition (early-class-definition class-name)))
- (dolist (option (ecd-other-initargs definition))
- (unless (eq (car option) :default-initargs)
- (error "The defclass option ~S is not supported by the bootstrap~%~
- object system."
- (car option)))
- (setq default-initargs
- (nconc default-initargs (reverse (cdr option)))))))
- (reverse default-initargs)))
-
-
-;;;
-;;; bootstrap-get-slot and bootstrap-set-slot are used to access and change
-;;; the values of slots during bootstrapping. During bootstrapping, there
-;;; are only two kinds of objects whose slots we need to access, CLASSes
-;;; and SLOTDs. The first argument to these functions tells whether the
-;;; object is a CLASS or a SLOTD.
-;;;
-;;; Note that the way this works it stores the slot in the same place in
-;;; memory that the full object system will expect to find it later. This
-;;; is critical to the bootstrapping process, the whole changeover to the
-;;; full object system is predicated on this.
-;;;
-;;; One important point is that the layout of standard classes and standard
-;;; slots must be computed the same way in this file as it is by the full
-;;; object system later.
-;;;
-(defun bootstrap-get-slot (type object slot-name)
- (let ((index (bootstrap-slot-index type slot-name)))
- (svref (std-instance-slots object) index)))
-
-(defun bootstrap-set-slot (type object slot-name new-value)
- (let ((index (bootstrap-slot-index type slot-name)))
- (setf (svref (std-instance-slots object) index) new-value)))
-
-(defvar *std-class-slots*
- (mapcar #'canonical-slot-name
- (early-collect-inheritance 'standard-class)))
-
-(defvar *bin-class-slots*
- (mapcar #'canonical-slot-name
- (early-collect-inheritance 'built-in-class)))
-
-(defvar *std-slotd-slots*
- (mapcar #'canonical-slot-name
- (early-collect-inheritance 'standard-slot-definition)))
-
-(defun bootstrap-slot-index (type slot-name)
- (or (position slot-name (ecase type
- (std-class *std-class-slots*)
- (bin-class *bin-class-slots*)
- (std-slotd *std-slotd-slots*)))
- (error "~S not found" slot-name)))
-
-
-;;;
-;;; bootstrap-meta-braid
-;;;
-;;; This function builds the base metabraid from the early class definitions.
-;;;
-(defun bootstrap-meta-braid ()
- (let* ((std-class-size (length *std-class-slots*))
- (std-class (%allocate-instance--class std-class-size))
- (std-class-wrapper (make-wrapper std-class))
- (built-in-class (%allocate-instance--class std-class-size))
- (built-in-class-wrapper (make-wrapper built-in-class))
- (direct-slotd (%allocate-instance--class std-class-size))
- (effective-slotd (%allocate-instance--class std-class-size))
- (direct-slotd-wrapper (make-wrapper direct-slotd))
- (effective-slotd-wrapper (make-wrapper effective-slotd)))
- ;;
- ;; First, make a class metaobject for each of the early classes. For
- ;; each metaobject we also set its wrapper. Except for the class T,
- ;; the wrapper is always that of STANDARD-CLASS.
- ;;
- (dolist (definition *early-class-definitions*)
- (let* ((name (ecd-class-name definition))
- (meta (ecd-metaclass definition))
- (class (case name
- (standard-class std-class)
- (standard-direct-slot-definition direct-slotd)
- (standard-effective-slot-definition effective-slotd)
- (built-in-class built-in-class)
- (otherwise
- (%allocate-instance--class std-class-size)))))
- (unless (eq name t)
- (inform-type-system-about-class class name))
- (setf (std-instance-wrapper class)
- (ecase meta
- (standard-class std-class-wrapper)
- (built-in-class built-in-class-wrapper)))
- (setf (find-class name) class)))
- ;;
- ;;
- ;;
- (dolist (definition *early-class-definitions*)
- (let ((name (ecd-class-name definition))
- (source (ecd-source definition))
- (direct-supers (ecd-superclass-names definition))
- (direct-slots (ecd-canonical-slots definition))
- (other-initargs (ecd-other-initargs definition)))
- (let ((direct-default-initargs
- (getf other-initargs :default-initargs)))
- (multiple-value-bind (slots cpl default-initargs direct-subclasses)
- (early-collect-inheritance name)
- (let* ((class (find-class name))
- (wrapper
- (cond
- ((eq class std-class) std-class-wrapper)
- ((eq class direct-slotd) direct-slotd-wrapper)
- ((eq class effective-slotd) effective-slotd-wrapper)
- ((eq class built-in-class) built-in-class-wrapper)
- (t (make-wrapper class))))
- (proto nil))
- (cond ((eq name 't)
- (setq *the-wrapper-of-t* wrapper
- *the-class-t* class))
- ((memq name '(standard-object
- standard-class
- standard-effective-slot-definition))
- (set (intern (format nil "*THE-CLASS-~A*" (symbol-name name))
- *the-clos-package*)
- class)))
- (dolist (slot slots)
- (unless (eq (getf slot :allocation :instance) :instance)
- (error "Slot allocation ~S not supported in bootstrap.")))
-
- (setf (wrapper-instance-slots-layout wrapper)
- (mapcar #'canonical-slot-name slots))
- (setf (wrapper-class-slots wrapper)
- ())
-
- (setq proto (%allocate-instance--class (length slots)))
- (setf (std-instance-wrapper proto) wrapper)
-
- (setq direct-slots
- (bootstrap-make-slot-definitions name direct-slots
- direct-slotd-wrapper nil))
- (setq slots
- (bootstrap-make-slot-definitions name slots
- effective-slotd-wrapper t))
-
- (bootstrap-initialize-std-class
- class name source
- direct-supers direct-subclasses cpl wrapper
- direct-slots slots direct-default-initargs default-initargs
- proto)
-
- (dolist (slotd direct-slots)
- (bootstrap-accessor-definitions
- name
- (bootstrap-get-slot 'std-slotd slotd 'name)
- (bootstrap-get-slot 'std-slotd slotd 'readers)
- (bootstrap-get-slot 'std-slotd slotd 'writers))))))))))
-
-(defun bootstrap-accessor-definitions (class-name slot-name readers writers)
- (flet ((do-reader-definition (reader)
- (add-method
- (ensure-generic-function reader)
- (make-a-method
- 'standard-reader-method
- ()
- (list class-name)
- (list class-name)
- (make-std-reader-method-function slot-name)
- "automatically generated reader method"
- slot-name)))
- (do-writer-definition (writer)
- (add-method
- (ensure-generic-function writer)
- (make-a-method
- 'standard-writer-method
- ()
- (list 'new-value class-name)
- (list 't class-name)
- (make-std-writer-method-function slot-name)
- "automatically generated writer method"
- slot-name))))
- (dolist (reader readers) (do-reader-definition reader))
- (dolist (writer writers) (do-writer-definition writer))))
-
-;;;
-;;; Initialize a standard class metaobject.
-;;;
-(defun bootstrap-initialize-std-class
- (class
- name definition-source direct-supers direct-subclasses cpl wrapper
- direct-slots slots direct-default-initargs default-initargs proto)
- (flet ((classes (names) (mapcar #'find-class names))
- (set-slot (slot-name value)
- (bootstrap-set-slot 'std-class class slot-name value)))
-
- (set-slot 'name name)
- (set-slot 'source definition-source)
- (set-slot 'class-precedence-list (classes cpl))
- (set-slot 'direct-superclasses (classes direct-supers))
- (set-slot 'direct-slots direct-slots)
- (set-slot 'direct-subclasses (classes direct-subclasses))
- (set-slot 'direct-methods (cons nil nil))
- (set-slot 'no-of-instance-slots (length slots))
- (set-slot 'slots slots)
- (set-slot 'wrapper wrapper)
- (set-slot 'prototype proto)
- (set-slot 'plist
- `(,@(and direct-default-initargs
- `(direct-default-initargs ,direct-default-initargs))
- ,@(and default-initargs
- `(default-initargs ,default-initargs))))
- ))
-
-;;;
-;;; Initialize a built-in-class metaobject.
-;;;
-(defun bootstrap-initialize-bin-class
- (class
- name definition-source direct-supers direct-subclasses cpl wrapper)
- (flet ((classes (names) (mapcar #'find-class names))
- (set-slot (slot-name value)
- (bootstrap-set-slot 'bin-class class slot-name value)))
-
- (set-slot 'name name)
- (set-slot 'source definition-source)
- (set-slot 'direct-superclasses (classes direct-supers))
- (set-slot 'direct-subclasses (classes direct-subclasses))
- (set-slot 'direct-methods (cons nil nil))
- (set-slot 'class-precedence-list (classes cpl))
- (set-slot 'wrapper wrapper)))
-
-(defun bootstrap-make-slot-definitions (name slots wrapper e-p)
- (mapcar #'(lambda (slot) (bootstrap-make-slot-definition name slot wrapper e-p))
- slots))
-
-(defun bootstrap-make-slot-definition (name slot wrapper e-p)
- (let ((slotd (%allocate-instance--class (length *std-slotd-slots*))))
- (setf (std-instance-wrapper slotd) wrapper)
- (flet ((get-val (name) (getf slot name))
- (set-val (name val) (bootstrap-set-slot 'std-slotd slotd name val)))
- (set-val 'name (get-val :name))
- (set-val 'initform (get-val :initform))
- (set-val 'initfunction (get-val :initfunction))
- (set-val 'initargs (get-val :initargs))
- (set-val 'readers (get-val :readers))
- (set-val 'writers (get-val :writers))
- (set-val 'allocation :instance)
- (set-val 'type (get-val :type))
- (set-val 'class nil)
- (set-val 'instance-index nil)
- (when (and (eq name 'standard-class) (eq (get-val :name) 'slots) e-p)
- (setq *the-eslotd-standard-class-slots* slotd))
- slotd)))
-
-(defun bootstrap-built-in-classes ()
- ;;
- ;; First make sure that all the supers listed in *built-in-class-lattice*
- ;; are themselves defined by *built-in-class-lattice*. This is just to
- ;; check for typos and other sorts of brainos.
- ;;
- (dolist (e *built-in-classes*)
- (dolist (super (cadr e))
- (unless (or (eq super 't)
- (assq super *built-in-classes*))
- (error "In *built-in-classes*: ~S has ~S as a super,~%~
- but ~S is not itself a class in *built-in-classes*."
- (car e) super super))))
-
- ;;
- ;; In the first pass, we create a skeletal object to be bound to the
- ;; class name.
- ;;
- (let* ((built-in-class (find-class 'built-in-class))
- (built-in-class-wrapper (class-wrapper built-in-class))
- (bin-class-size (length *bin-class-slots*)))
- (dolist (e *built-in-classes*)
- (let ((class (%allocate-instance--class bin-class-size)))
- (setf (std-instance-wrapper class) built-in-class-wrapper)
- (setf (find-class (car e)) class))))
-
- ;;
- ;; In the second pass, we initialize the class objects.
- ;;
- (dolist (e *built-in-classes*)
- (destructuring-bind (name supers subs cpl) e
- (let* ((class (find-class name))
- (wrapper (make-wrapper class)))
- (set (get-built-in-class-symbol name) class)
- (set (get-built-in-wrapper-symbol name) wrapper)
-
- (setf (wrapper-instance-slots-layout wrapper) ()
- (wrapper-class-slots wrapper) ())
-
- (bootstrap-initialize-bin-class class
- name nil
- supers subs
- (cons name cpl) wrapper)
- ))))
-
-
-;;;
-;;;
-;;;
-
-(defun class-of (x) (wrapper-class (wrapper-of x)))
-
-(defun wrapper-of (x)
- (or (and (std-instance-p x)
- (std-instance-wrapper x))
- (and (fsc-instance-p x)
- (fsc-instance-wrapper x))
- (built-in-wrapper-of x)
- (error "Can't determine wrapper of ~S" x)))
-
-
-(eval-when (compile eval)
-
-(defun make-built-in-class-subs ()
- (mapcar #'(lambda (e)
- (let ((class (car e))
- (class-subs ()))
- (dolist (s *built-in-classes*)
- (when (memq class (cadr s)) (pushnew (car s) class-subs)))
- (cons class class-subs)))
- (cons '(t) *built-in-classes*)))
-
-(defun make-built-in-class-tree ()
- (let ((subs (make-built-in-class-subs)))
- (labels ((descend (class)
- (cons class (mapcar #'descend (cdr (assq class subs))))))
- (descend 't))))
-
-(defun make-built-in-wrapper-of-body ()
- (make-built-in-wrapper-of-body-1 (make-built-in-class-tree)
- 'x
- #'get-built-in-wrapper-symbol))
-
-(defun make-built-in-wrapper-of-body-1 (tree var get-symbol)
- (let ((*specials* ()))
- (declare (special *specials*))
- (let ((inner (make-built-in-wrapper-of-body-2 tree var get-symbol)))
- `(locally (declare (special .,*specials*)) ,inner))))
-
-(defun make-built-in-wrapper-of-body-2 (tree var get-symbol)
- (declare (special *specials*))
- (let ((symbol (funcall get-symbol (car tree))))
- (push symbol *specials*)
- (let ((sub-tests
- (mapcar #'(lambda (x)
- (make-built-in-wrapper-of-body-2 x var get-symbol))
- (cdr tree))))
- `(and (typep ,var ',(car tree))
- ,(if sub-tests
- `(or ,.sub-tests ,symbol)
- symbol)))))
-)
-
-(defun built-in-wrapper-of (x)
- #.(make-built-in-wrapper-of-body))
-
-
-
-
-(eval-when (load eval)
- (clrhash *find-class*)
- (bootstrap-meta-braid)
- (bootstrap-built-in-classes)
- (setq *boot-state* 'braid)
- (setf (symbol-function 'load-defclass) #'real-load-defclass)
- )
-
-
-;;;
-;;; All of these method definitions must appear here because the bootstrap
-;;; only allows one method per generic function until the braid is fully
-;;; built.
-;;;
-(defmethod print-object (instance stream)
- (printing-random-thing (instance stream)
- (let ((name (class-name (class-of instance))))
- (if name
- (format stream "~S" name)
- (format stream "Instance")))))
-
-(defmethod print-object ((class class) stream)
- (named-object-print-function class stream))
-
-(defmethod print-object ((slotd standard-slot-definition) stream)
- (named-object-print-function slotd stream))
-
-(defun named-object-print-function (instance stream
- &optional (extra nil extra-p))
- (printing-random-thing (instance stream)
- (if extra-p
- (format stream "~A ~S ~:S"
- (capitalize-words (class-name (class-of instance)))
- (slot-value-or-default instance 'name)
- extra)
- (format stream "~A ~S"
- (capitalize-words (class-name (class-of instance)))
- (slot-value-or-default instance 'name)))))
-
-
-;;;
-;;;
-;;;
-;(defmethod shared-initialize :after ((class class) slot-names &key name)
-; (declare (ignore slot-names))
-; (setf (slot-value class 'name) name))
-;
-;
-;(defmethod shared-initialize :after ((class std-class)
-; slot-names
-; &key direct-superclasses
-; direct-slots)
-; (declare (ignore slot-names))
-; (setf (slot-value class 'direct-superclasses) direct-superclasses
-; (slot-value class 'direct-slots) direct-slots))
-
-;;;
-;;;
-;;;
-(defmethod shared-initialize :after ((slotd standard-slot-definition)
- slot-names
- &key class
- name
- initform
- initfunction
- initargs
- (allocation :instance)
- (type t)
- readers
- writers)
- (declare (ignore slot-names))
- (setf (slot-value slotd 'name) name
- (slot-value slotd 'initform) initform
- (slot-value slotd 'initfunction) initfunction
- (slot-value slotd 'initargs) initargs
- (slot-value slotd 'allocation) (if (eq allocation :class) class allocation)
- (slot-value slotd 'type) type
- (slot-value slotd 'readers) readers
- (slot-value slotd 'writers) writers))
-
diff --git a/obsolete/clos/2.0/cache.lisp b/obsolete/clos/2.0/cache.lisp
deleted file mode 100644
index 068ab817..00000000
--- a/obsolete/clos/2.0/cache.lisp
+++ /dev/null
@@ -1,1089 +0,0 @@
-;;;-*-Mode:LISP; Package:(CLOS LISP 1000); Base:10; Syntax:Common-lisp -*-
-;;;
-;;; *************************************************************************
-;;; Copyright (c) 1991 Venue
-;;; All rights reserved.
-;;; *************************************************************************
-;;;
-;;; The basics of the CLOS wrapper cache mechanism.
-;;;
-
-(in-package 'clos)
-;;;
-;;; The caching algorithm implemented:
-;;;
-;;; << put a paper here >>
-;;;
-;;; For now, understand that as far as most of this code goes, a cache has
-;;; two important properties. The first is the number of wrappers used as
-;;; keys in each cache line. Throughout this code, this value is always
-;;; called NKEYS. The second is whether or not the cache lines of a cache
-;;; store a value. Throughout this code, this always called VALUEP.
-;;;
-;;; Depending on these values, there are three kinds of caches.
-;;;
-;;; NKEYS = 1, VALUEP = NIL
-;;;
-;;; In this kind of cache, each line is 1 word long. No cache locking is
-;;; needed since all read's in the cache are a single value. Nevertheless
-;;; line 0 (location 0) is reserved, to ensure that invalid wrappers will
-;;; not get a first probe hit.
-;;;
-;;; To keep the code simpler, a cache lock count does appear in location 0
-;;; of these caches, that count is incremented whenever data is written to
-;;; the cache. But, the actual lookup code (see make-dlap) doesn't need to
-;;; do locking when reading the cache.
-;;;
-;;;
-;;; NKEYS = 1, VALUEP = T
-;;;
-;;; In this kind of cache, each line is 2 words long. Cache locking must
-;;; be done to ensure the synchronization of cache reads. Line 0 of the
-;;; cache (location 0) is reserved for the cache lock count. Location 1
-;;; of the cache is unused (in effect wasted).
-;;;
-;;; NKEYS > 1
-;;;
-;;; In this kind of cache, the 0 word of the cache holds the lock count.
-;;; The 1 word of the cache is line 0. Line 0 of these caches is not
-;;; reserved.
-;;;
-;;; This is done because in this sort of cache, the overhead of doing the
-;;; cache probe is high enough that the 1+ required to offset the location
-;;; is not a significant cost. In addition, because of the larger line
-;;; sizes, the space that would be wasted by reserving line 0 to hold the
-;;; lock count is more significant.
-;;;
-
-
-;;;
-;;; Caches
-;;;
-;;; A cache is essentially just a vector. The use of the individual `words'
-;;; in the vector depends on particular properties of the cache as described
-;;; above.
-;;;
-;;; This defines an abstraction for caches in terms of their most obvious
-;;; implementation as simple vectors. But, please notice that part of the
-;;; implementation of this abstraction, is the function lap-out-cache-ref.
-;;; This means that most port-specific modifications to the implementation
-;;; of caches will require corresponding port-specific modifications to the
-;;; lap code assembler.
-;;;
-(defmacro cache-ref (cache location)
- `(svref (the simple-vector ,cache) (the fixnum ,location)))
-
-(defun emit-cache-ref (cache-operand location-operand)
- (operand :iref cache-operand location-operand))
-
-
-(defun cache-size (cache)
- (array-dimension (the simple-vector cache) 0))
-
-(defun allocate-cache (size)
- (make-array size :adjustable nil))
-
-(defmacro cache-lock-count (cache)
- `(cache-ref ,cache 0))
-
-(defun flush-cache-internal (cache)
- (without-interrupts
- (fill (the simple-vector cache) nil)
- (setf (cache-lock-count cache) 0))
- cache)
-
-(defmacro modify-cache (cache &body body)
- `(without-interrupts
- (multiple-value-prog1
- (progn ,@body)
- (let ((old-count (cache-lock-count ,cache)))
- (setf (cache-lock-count ,cache)
- (if (= old-count most-positive-fixnum) 1 (1+ old-count)))))))
-
-
-
-;;;
-;;; Some facilities for allocation and freeing caches as they are needed.
-;;; This is done on the assumption that a better port of CLOS will arrange
-;;; to cons these all the same static area. Given that, the fact that
-;;; CLOS tries to reuse them should be a win.
-;;;
-(defvar *free-caches* (make-hash-table :size 16))
-
-;;;
-;;; Return a cache that has had flush-cache-internal called on it. This
-;;; returns a cache of exactly the size requested, it won't ever return a
-;;; larger cache.
-;;;
-(defun get-cache (size)
- (let ((entry (gethash size *free-caches*)))
- (without-interrupts
- (cond ((null entry)
- (setf (gethash size *free-caches*) (cons 0 nil))
- (get-cache size))
- ((null (cdr entry))
- (incf (car entry))
- (flush-cache-internal (allocate-cache size)))
- (t
- (let ((cache (cdr entry)))
- (setf (cdr entry) (cache-ref cache 0))
- (flush-cache-internal cache)))))))
-
-(defun free-cache (cache)
- (let ((entry (gethash (cache-size cache) *free-caches*)))
- (without-interrupts
- (if (null entry)
- (error "Attempt to free a cache not allocated by GET-CACHE.")
- (let ((thread (cdr entry)))
- (loop (unless thread (return))
- (when (eq thread cache) (error "Freeing a cache twice."))
- (setq thread (cache-ref thread 0)))
- (flush-cache-internal cache) ;Help the GC
- (setf (cache-ref cache 0) (cdr entry))
- (setf (cdr entry) cache)
- nil)))))
-
-;;;
-;;; This is just for debugging and analysis. It shows the state of the free
-;;; cache resource.
-;;;
-(defun show-free-caches ()
- (let ((elements ()))
- (maphash #'(lambda (s e) (push (list s e) elements)) *free-caches*)
- (setq elements (sort elements #'< :key #'car))
- (dolist (e elements)
- (let* ((size (car e))
- (entry (cadr e))
- (allocated (car entry))
- (head (cdr entry))
- (free 0))
- (loop (when (null head) (return t))
- (setq head (cache-ref head 0))
- (incf free))
- (format t
- "~&There ~4D are caches of size ~4D. (~D free ~3D%)"
- allocated
- size
- free
- (floor (* 100 (/ free (float allocated)))))))))
-
-
-;;;
-;;; Wrapper cache numbers
-;;;
-
-;;;
-;;; The constant WRAPPER-CACHE-NUMBER-ADDS-OK controls the number of non-zero
-;;; bits wrapper cache numbers will have.
-;;;
-;;; The value of this constant is the number of wrapper cache numbers which
-;;; can be added and still be certain the result will be a fixnum. This is
-;;; used by all the code that computes primary cache locations from multiple
-;;; wrappers.
-;;;
-;;; The value of this constant is used to derive the next two which are the
-;;; forms of this constant which it is more convenient for the runtime code
-;;; to use.
-;;;
-(eval-when (compile load eval)
-
-(defconstant wrapper-cache-number-adds-ok 4)
-
-(defconstant wrapper-cache-number-length
- (- (integer-length most-positive-fixnum)
- wrapper-cache-number-adds-ok))
-
-(defconstant wrapper-cache-number-mask
- (1- (expt 2 wrapper-cache-number-length)))
-
-
-(defvar *get-wrapper-cache-number* (make-random-state))
-
-(defun get-wrapper-cache-number ()
- (let ((n 0))
- (loop
- (setq n
- (logand wrapper-cache-number-mask
- (random most-positive-fixnum *get-wrapper-cache-number*)))
- (unless (zerop n) (return n)))))
-
-
-(unless (> wrapper-cache-number-length 8)
- (error "In this implementation of Common Lisp, fixnums are so small that~@
- wrapper cache numbers end up being only ~D bits long. This does~@
- not actually keep CLOS from running, but it may degrade cache~@
- performance.~@
- You may want to consider changing the value of the constant~@
- WRAPPER-CACHE-NUMBER-ADDS-OK.")))
-
-
-;;;
-;;; wrappers themselves
-;;;
-;;; This caching algorithm requires that wrappers have more than one wrapper
-;;; cache number. You should think of these multiple numbers as being in
-;;; columns. That is, for a given cache, the same column of wrapper cache
-;;; numbers will be used.
-;;;
-;;; If at some point the cache distribution of a cache gets bad, the cache
-;;; can be rehashed by switching to a different column.
-;;;
-;;; The columns are referred to by field number which is that number which,
-;;; when used as a second argument to wrapper-ref, will return that column
-;;; of wrapper cache number.
-;;;
-;;; This code is written to allow flexibility as to how many wrapper cache
-;;; numbers will be in each wrapper, and where they will be located. It is
-;;; also set up to allow port specific modifications to `pack' the wrapper
-;;; cache numbers on machines where the addressing modes make that a good
-;;; idea.
-;;;
-(eval-when (compile load eval)
-(defconstant wrapper-layout
- '(number
- number
- number
- number
- number
- number
- number
- number
- state
- instance-slots-layout
- class-slots
- class))
-)
-
-(eval-when (compile load eval)
-
-(defun wrapper-field (type)
- (position type wrapper-layout))
-
-(defun next-wrapper-field (field-number)
- (position (nth field-number wrapper-layout)
- wrapper-layout
- :start (1+ field-number)))
-
-);eval-when
-
-(defmacro wrapper-ref (wrapper n)
- `(svref ,wrapper ,n))
-
-(defun emit-wrapper-ref (wrapper-operand field-operand)
- (operand :iref wrapper-operand field-operand))
-
-
-(defmacro wrapper-state (wrapper)
- `(wrapper-ref ,wrapper ,(wrapper-field 'state)))
-
-(defmacro wrapper-instance-slots-layout (wrapper)
- `(wrapper-ref ,wrapper ,(wrapper-field 'instance-slots-layout)))
-
-(defmacro wrapper-class-slots (wrapper)
- `(wrapper-ref ,wrapper ,(wrapper-field 'class-slots)))
-
-(defmacro wrapper-class (wrapper)
- `(wrapper-ref ,wrapper ,(wrapper-field 'class)))
-
-
-(defmacro make-wrapper-internal ()
- `(let ((wrapper (make-array ,(length wrapper-layout) :adjustable nil)))
- ,@(gathering1 (collecting)
- (iterate ((i (interval :from 0))
- (desc (list-elements wrapper-layout)))
- (ecase desc
- (number
- (gather1 `(setf (wrapper-ref wrapper ,i)
- (get-wrapper-cache-number))))
- ((state instance-slots-layout class-slots class)))))
- (setf (wrapper-state wrapper) 't)
- wrapper))
-
-(defun make-wrapper (class)
- (let ((wrapper (make-wrapper-internal)))
- (setf (wrapper-class wrapper) class)
- wrapper))
-
-;;;
-;;; The wrapper cache machinery provides general mechanism for trapping on
-;;; the next access to any instance of a given class. This mechanism is
-;;; used to implement the updating of instances when the class is redefined
-;;; (make-instances-obsolete). The same mechanism is also used to update
-;;; generic function caches when there is a change to the supers of a class.
-;;;
-;;; Basically, a given wrapper can be valid or invalid. If it is invalid,
-;;; it means that any attempt to do a wrapper cache lookup using the wrapper
-;;; should trap. Also, methods on slot-value-using-class check the wrapper
-;;; validity as well. This is done by calling check-wrapper-validity.
-;;;
-
-(defun invalid-wrapper-p (wrapper)
- (neq (wrapper-state wrapper) 't))
-
-(defvar *previous-nwrappers* (make-hash-table))
-
-(defun invalidate-wrapper (owrapper state nwrapper)
- (ecase state
- ((flush obsolete)
- (let ((new-previous ()))
- ;;
- ;; First off, a previous call to invalidate-wrapper may have recorded
- ;; owrapper as an nwrapper to update to. Since owrapper is about to
- ;; be invalid, it no longer makes sense to update to it.
- ;;
- ;; We go back and change the previously invalidated wrappers so that
- ;; they will now update directly to nwrapper. This corresponds to a
- ;; kind of transitivity of wrapper updates.
- ;;
- (dolist (previous (gethash owrapper *previous-nwrappers*))
- (when (eq state 'obsolete)
- (setf (car previous) 'obsolete))
- (setf (cadr previous) nwrapper)
- (push previous new-previous))
-
- (iterate ((type (list-elements wrapper-layout))
- (i (interval :from 0)))
- (when (eq type 'number) (setf (wrapper-ref owrapper i) 0)))
- (push (setf (wrapper-state owrapper) (list state nwrapper))
- new-previous)
-
- (setf (gethash owrapper *previous-nwrappers*) ()
- (gethash nwrapper *previous-nwrappers*) new-previous)))))
-
-(defun check-wrapper-validity (instance)
- (let* ((owrapper (wrapper-of instance))
- (state (wrapper-state owrapper)))
- (if (eq state 't)
- owrapper
- (let ((nwrapper
- (ecase (car state)
- (flush
- (flush-cache-trap owrapper (cadr state) instance))
- (obsolete
- (obsolete-instance-trap owrapper (cadr state) instance)))))
- ;;
- ;; This little bit of error checking is superfluous. It only
- ;; checks to see whether the person who implemented the trap
- ;; handling screwed up. Since that person is hacking internal
- ;; CLOS code, and is not a user, this should be needless. Also,
- ;; since this directly slows down instance update and generic
- ;; function cache refilling, feel free to take it out sometime
- ;; soon.
- ;;
- (cond ((neq nwrapper (wrapper-of instance))
- (error "Wrapper returned from trap not wrapper of instance."))
- ((invalid-wrapper-p nwrapper)
- (error "Wrapper returned from trap invalid.")))
- nwrapper))))
-
-
-
-(defun compute-line-size (nelements) (expt 2 (ceiling (log nelements 2))))
-
-(defun compute-cache-parameters (nkeys valuep nlines-or-cache)
- (declare (values cache-mask actual-size line-size nlines))
- (flet ((compute-mask (cache-size line-size)
- (logxor (1- cache-size) (1- line-size))))
- (if (= nkeys 1)
- (let* ((line-size (if valuep 2 1))
- (cache-size (if (numberp nlines-or-cache)
- (* line-size
- (expt 2 (ceiling (log nlines-or-cache 2))))
- (cache-size nlines-or-cache))))
- (values (compute-mask cache-size line-size)
- cache-size
- line-size
- (/ cache-size line-size)))
- (let* ((line-size (compute-line-size (+ nkeys (if valuep 1 0))))
- (cache-size (if (numberp nlines-or-cache)
- (* line-size
- (expt 2 (ceiling (log nlines-or-cache 2))))
- (1- (cache-size nlines-or-cache)))))
- (values (compute-mask cache-size line-size)
- (1+ cache-size)
- line-size
- (/ cache-size line-size))))))
-
-
-
-;;;
-;;; The various implementations of computing a primary cache location from
-;;; wrappers. Because some implementations of this must run fast there are
-;;; several implementations of the same algorithm.
-;;;
-;;; The algorithm is:
-;;;
-;;; SUM over the wrapper cache numbers,
-;;; ENSURING that the result is a fixnum
-;;; MASK the result against the mask argument.
-;;;
-;;;
-
-;;;
-;;; COMPUTE-PRIMARY-CACHE-LOCATION
-;;;
-;;; The basic functional version. This is used by the cache miss code to
-;;; compute the primary location of an entry.
-;;;
-(defun compute-primary-cache-location (field mask wrappers)
- (if (not (consp wrappers))
- (logand mask (wrapper-ref wrappers field))
- (let ((location 0))
- (iterate ((wrapper (list-elements wrappers))
- (i (interval :from 0)))
- ;;
- ;; First add the cache number of this wrapper to location.
- ;;
- (let ((wrapper-cache-number (wrapper-ref wrapper field)))
- (if (zerop wrapper-cache-number)
- (return-from compute-primary-cache-location 0)
- (setq location (+ location wrapper-cache-number))))
- ;;
- ;; Then, if we are working with lots of wrappers, deal with
- ;; the wrapper-cache-number-mask stuff.
- ;;
- (when (and (not (zerop i))
- (zerop (mod i wrapper-cache-number-adds-ok)))
- (setq location
- (logand location wrapper-cache-number-mask))))
- (1+ (logand mask location)))))
-
-;;;
-;;; COMPUTE-PRIMARY-CACHE-LOCATION-FROM-LOCATION
-;;;
-;;; This version is called on a cache line. It fetches the wrappers from
-;;; the cache line and determines the primary location. Various parts of
-;;; the cache filling code call this to determine whether it is appropriate
-;;; to displace a given cache entry.
-;;;
-;;; If this comes across a wrapper whose cache-no is 0, it returns the symbol
-;;; invalid to suggest to its caller that it would be provident to blow away
-;;; the cache line in question.
-;;;
-(defun compute-primary-cache-location-from-location (field cache location mask nkeys)
- (let ((result 0))
- (dotimes (i nkeys)
- (let* ((wrapper (cache-ref cache (+ i location)))
- (wcn (wrapper-ref wrapper field)))
- (setq result (+ result wcn)))
- (when (and (not (zerop i))
- (zerop (mod i wrapper-cache-number-adds-ok)))
- (setq result (logand result wrapper-cache-number-mask)))
- )
- (if (= nkeys 1)
- (logand mask result)
- (1+ (logand mask result)))))
-
-(defun emit-1-wrapper-compute-primary-cache-location (wrapper primary wrapper-cache-no)
- (with-lap-registers ((mask index))
- (let ((field wrapper-cache-no))
- (flatten-lap
- (opcode :move (operand :cvar 'mask) mask)
- (opcode :move (operand :cvar 'field) field)
- (opcode :move (emit-wrapper-ref wrapper field) wrapper-cache-no)
- (opcode :move (operand :ilogand wrapper-cache-no mask) primary)))))
-
-(defun emit-n-wrapper-compute-primary-cache-location (wrappers primary miss-label)
- (with-lap-registers ((field index)
- (mask index))
- (let ((add-wrapper-cache-numbers
- (flatten-lap
- (gathering1 (flattening-lap)
- (iterate ((wrapper (list-elements wrappers))
- (i (interval :from 1)))
- (gather1
- (with-lap-registers ((wrapper-cache-no index))
- (flatten-lap
- (opcode :move (emit-wrapper-ref wrapper field) wrapper-cache-no)
- (opcode :izerop wrapper-cache-no miss-label)
- (opcode :move (operand :i+ primary wrapper-cache-no) primary)
- (when (zerop (mod i wrapper-cache-number-adds-ok))
- (opcode :move (operand :ilogand primary mask) primary))))))))))
- (flatten-lap
- (opcode :move (operand :constant 0) primary)
- (opcode :move (operand :cvar 'field) field)
- (opcode :move (operand :cvar 'mask) mask)
- add-wrapper-cache-numbers
- (opcode :move (operand :ilogand primary mask) primary)
- (opcode :move (operand :i1+ primary) primary)))))
-
-
-
-;;;
-;;; NIL means nothing so far, no actual arg info has NILs
-;;; in the metatype
-;;; CLASS seen all sorts of metaclasses
-;;; (specifically, more than one of the next 4 values)
-;;; T means everything so far is the class T
-;;; STANDARD-CLASS seen only standard classes
-;;; BUILT-IN-CLASS seen only built in classes
-;;; STRUCTURE-CLASS seen only structure classes
-;;;
-(defun raise-metatype (metatype new-specializer)
- (let ((standard (find-class 'standard-class))
- (fsc (find-class 'funcallable-standard-class))
-; (structure (find-class 'structure-class))
- (built-in (find-class 'built-in-class)))
- (flet ((specializer->metatype (x)
- (let ((meta-specializer
- (if (and (eq *boot-state* 'complete)
- (eql-specializer-p x))
- (class-of (class-of (eql-specializer-object x)))
- (class-of x))))
- (cond ((eq x *the-class-t*) t)
- ((*subtypep meta-specializer standard) 'standard-instance)
- ((*subtypep meta-specializer fsc) 'standard-instance)
-; ((*subtypep meta-specializer structure) 'structure-instance)
- ((*subtypep meta-specializer built-in) 'built-in-instance)
- (t (error "CLOS can not handle the specializer ~S (meta-specializer ~S)."
- new-specializer meta-specializer))))))
- ;;
- ;; We implement the following table. The notation is
- ;; that X and Y are distinct meta specializer names.
- ;;
- ;; NIL ===>
- ;; X X ===> X
- ;; X Y ===> CLASS
- ;;
- (let ((new-metatype (specializer->metatype new-specializer)))
- (cond ((null metatype) new-metatype)
- ((eq metatype new-metatype) new-metatype)
- (t 'class))))))
-
-
-(defun emit-fetch-wrapper (metatype argument dest miss-label &optional slot)
- (let ((exit-emit-fetch-wrapper (make-symbol "exit-emit-fetch-wrapper")))
- (with-lap-registers ((arg t))
- (ecase metatype
- (standard-instance
- (let ((get-std-inst-wrapper (make-symbol "get-std-inst-wrapper"))
- (get-fsc-inst-wrapper (make-symbol "get-fsc-inst-wrapper")))
- (flatten-lap
- (opcode :move (operand :arg argument) arg)
- (opcode :std-instance-p arg get-std-inst-wrapper) ;is it a std wrapper?
- (opcode :fsc-instance-p arg get-fsc-inst-wrapper) ;is it a fsc wrapper?
- (opcode :go miss-label)
- (opcode :label get-fsc-inst-wrapper)
- (opcode :move (operand :fsc-wrapper arg) dest) ;get fsc wrapper
- (and slot
- (opcode :move (operand :fsc-slots arg) slot))
- (opcode :go exit-emit-fetch-wrapper)
- (opcode :label get-std-inst-wrapper)
- (opcode :move (operand :std-wrapper arg) dest) ;get std wrapper
- (and slot
- (opcode :move (operand :std-slots arg) slot))
- (opcode :label exit-emit-fetch-wrapper))))
-
- (class
- (when slot (error "Can't do a slot reg for this metatype."))
- (let ((get-std-inst-wrapper (make-symbol "get-std-inst-wrapper"))
- (get-fsc-inst-wrapper (make-symbol "get-fsc-inst-wrapper"))
- (get-built-in-wrapper (make-symbol "get-built-in-wrapper")))
- (flatten-lap
- (opcode :move (operand :arg argument) arg)
- (opcode :std-instance-p arg get-std-inst-wrapper)
- (opcode :fsc-instance-p arg get-fsc-inst-wrapper)
- (opcode :built-in-instance-p arg get-built-in-wrapper)
- ;; If the code falls through the checks above, there is a serious problem
- (opcode :label get-fsc-inst-wrapper)
- (opcode :move (operand :fsc-wrapper arg) dest)
- (opcode :go exit-emit-fetch-wrapper)
- (opcode :label get-built-in-wrapper)
- (opcode :move (operand :built-in-wrapper arg) dest)
- (opcode :go exit-emit-fetch-wrapper)
- (opcode :label get-std-inst-wrapper)
- (opcode :move (operand :std-wrapper arg) dest)
- (opcode :label exit-emit-fetch-wrapper))))
- (structure-instance
- (when slot (error "Can't do a slot reg for this metatype."))
- (error "Not yet implemented"))
- (built-in-instance
- (when slot (error "Can't do a slot reg for this metatype."))
- (let ((get-built-in-wrapper (make-symbol "get-built-in-wrapper")))
- (flatten-lap
- (opcode :move (operand :arg argument) arg)
- (opcode :built-in-instance-p arg get-built-in-wrapper)
- (opcode :go miss-label)
- (opcode :label get-built-in-wrapper)
- (opcode :move (operand :built-in-wrapper arg) dest))))))))
-
-
-;;;
-;;; Some support stuff for getting a hold of symbols that we need when
-;;; building the discriminator codes. Its ok for these to be interned
-;;; symbols because we don't capture any user code in the scope in which
-;;; these symbols are bound.
-;;;
-
-(defvar *dfun-arg-symbols* '(.ARG0. .ARG1. .ARG2. .ARG3.))
-
-(defun dfun-arg-symbol (arg-number)
- (or (nth arg-number (the list *dfun-arg-symbols*))
- (intern (format nil ".ARG~A." arg-number) *the-clos-package*)))
-
-(defvar *slot-vector-symbols* '(.SLOTS0. .SLOTS1. .SLOTS2. .SLOTS3.))
-
-(defun slot-vector-symbol (arg-number)
- (or (nth arg-number (the list *slot-vector-symbols*))
- (intern (format nil ".SLOTS~A." arg-number) *the-clos-package*)))
-
-(defun make-dfun-lambda-list (metatypes applyp)
- (gathering1 (collecting)
- (iterate ((i (interval :from 0))
- (s (list-elements metatypes)))
- (progn s)
- (gather1 (dfun-arg-symbol i)))
- (when applyp
- (gather1 '&rest)
- (gather1 '.dfun-rest-arg.))))
-
-(defun make-dlap-lambda-list (metatypes applyp)
- (gathering1 (collecting)
- (iterate ((i (interval :from 0))
- (s (list-elements metatypes)))
- (progn s)
- (gather1 (dfun-arg-symbol i)))
- (when applyp
- (gather1 '&rest))))
-
-(defun make-dfun-call (metatypes applyp fn-variable)
- (let ((required
- (gathering1 (collecting)
- (iterate ((i (interval :from 0))
- (s (list-elements metatypes)))
- (progn s)
- (gather1 (dfun-arg-symbol i))))))
- (if applyp
- `(apply ,fn-variable ,@required .dfun-rest-arg.)
- `(funcall ,fn-variable ,@required))))
-
-
-;;;
-;;; Here is where we actually fill, recache and expand caches.
-;;;
-;;; The function FILL-CACHE is the ONLY external entrypoint into this code.
-;;; It returns 4 values:
-;;; a wrapper field number
-;;; a cache
-;;; a mask
-;;; an absolute cache size (the size of the actual vector)
-;;;
-;;;
-(defun fill-cache (field cache nkeys valuep limit-fn wrappers value)
- (declare (values field cache mask size))
- (fill-cache-internal field cache nkeys valuep limit-fn wrappers value))
-
-(defun default-limit-fn (nlines)
- (case nlines
- ((1 2 4) 1)
- ((8 16) 4)
- (otherwise 6)))
-
-
-;;;
-;;; Its too bad Common Lisp compilers freak out when you have a defun with
-;;; a lot of LABELS in it. If I could do that I could make this code much
-;;; easier to read and work with.
-;;;
-;;; Ahh Scheme...
-;;;
-;;; In the absence of that, the following little macro makes the code that
-;;; follows a little bit more reasonable. I would like to add that having
-;;; to practically write my own compiler in order to get just this simple
-;;; thing is something of a drag.
-;;;
-(eval-when (compile load eval)
-
-(proclaim '(special *nkeys* *valuep* *limit-fn*))
-
-;;; This patch avoids a bug in the ENVCALL instruction. Lookup of free
-;;; variables under ENVCALL always results in nil. In particular, the
-;;; compiler generates such code for flet and friends. Therefore, some
-;;; macros must be defined at top-level.
-
-;(defmacro cache () '.cache.)
-;(defmacro nkeys () '*nkeys*)
-;(defmacro valuep () '*valuep*)
-;(defmacro limit-fn () '*limit-fn*)
-;(defmacro line-size () '.line-size.)
-;(defmacro mask () '.mask.)
-;(defmacro size () '.size.)
-;(defmacro nlines () '.nlines.)
-;(defmacro line-reserved-p (line)
-; `(and (= (nkeys) 1)
-; (= ,line 0)))
-;(defmacro line-location (line)
-; `(and (null (line-reserved-p ,line))
-; (if (= (nkeys) 1)
-; (* ,line (line-size))
-; (1+ (* ,line (line-size))))))
-;(defmacro location-line (location)
-; `(if (= (nkeys) 1)
-; (/ ,location (line-size))
-; (/ (1- ,location) (line-size))))
-;end patch
-
-(defvar *local-cache-functions*
- `((cache () .cache.)
- (nkeys () *nkeys*)
- (valuep () *valuep*)
- (limit-fn () *limit-fn*)
- (line-size () .line-size.)
- (mask () .mask.)
- (size () .size.)
- (nlines () .nlines.)
- ;;
- ;; Return T IFF this cache location is reserved. The only time
- ;; this is true is for line number 0 of an nkeys=1 cache.
- ;;
- (line-reserved-p (line)
- (and (= (nkeys) 1)
- (= line 0)))
- ;;
- ;; Given a line number, return the cache location. This is the
- ;; value that is the second argument to cache-ref. Basically,
- ;; this deals with the offset of nkeys>1 caches and multiplies
- ;; by line size. This returns nil if the line is reserved.
- ;;
- (line-location (line)
- (and (null (line-reserved-p line))
- (if (= (nkeys) 1)
- (* line (line-size))
- (1+ (* line (line-size))))))
- ;;
- ;; Given a cache location, return the line. This is the inverse
- ;; of LINE-LOCATION.
- ;;
- (location-line (location)
- (if (= (nkeys) 1)
- (/ location (line-size))
- (/ (1- location) (line-size))))
- ;;
- ;; Given a line number, return the wrappers stored at that line.
- ;; As usual, if nkeys=1, this returns a single value. Only when
- ;; nkeys>1 does it return a list. An error is signalled if the
- ;; line is reserved.
- ;;
- (line-wrappers (line)
- (when (line-reserved-p line) (error "Line is reserved."))
- (let ((location (line-location line)))
- (if (= (nkeys) 1)
- (cache-ref (cache) location)
- (gathering1 (collecting)
- (dotimes (i (nkeys))
- (gather1 (cache-ref (cache) (+ location i))))))))
- ;;
- ;; Given a line number, return the value stored at that line.
- ;; If valuep is NIL, this returns NIL. As with line-wrappers,
- ;; an error is signalled if the line is reserved.
- ;;
- (line-value (line)
- (when (line-reserved-p line) (error "Line is reserved."))
- (and (valuep)
- (cache-ref (cache) (+ (line-location line) (nkeys)))))
- ;;
- ;; Given a line number, return true IFF that line has data in
- ;; it. The state of the wrappers stored in the line is not
- ;; checked. An error is signalled if line is reserved.
- (line-full-p (line)
- (when (line-reserved-p line) (error "Line is reserved."))
- (not (null (cache-ref (cache) (line-location line)))))
- ;;
- ;; Given a line number, return true IFF the line is full and
- ;; there are no invalid wrappers in the line, and the line's
- ;; wrappers are different from wrappers.
- ;; An error is signalled if the line is reserved.
- ;;
- (line-valid-p (line wrappers)
- (when (line-reserved-p line) (error "Line is reserved."))
- (let ((loc (line-location line)))
- (dotimes (i (nkeys) t)
- (let ((wrapper (cache-ref (cache) (+ loc i))))
- (when (or (null wrapper)
-;*** (numberp wrapper)
- ;Think of this as an optimized:
- ; (and (zerop i)
- ; (= (nkeys) 1)
- ; (null (valuep))
- ; (numberp wrapper))
- (invalid-wrapper-p wrapper))
- (return nil))))))
- ;;
- ;; How many unreserved lines separate line-1 and line-2.
- ;;
- (line-separation (line-1 line-2)
- (let ((diff (- line-2 line-1)))
- (cond ((zerop diff) diff)
- ((plusp diff) diff)
- (t
- (if (line-reserved-p 0)
- (1- (+ (- (nlines) line-1) line-2))
- (+ (- (nlines) line-1) line-2))))))
- ;;
- ;; Given a cache line, get the next cache line. This will not
- ;; return a reserved line.
- ;;
- (next-line (line)
- (if (= line (1- (nlines)))
- (if (line-reserved-p 0) 1 0)
- (1+ line)))
- ;;
- ;; Given a line which has a valid entry in it, this will return
- ;; the primary cache line of the wrappers in that line. We just
- ;; call COMPUTE-PRIMARY-CACHE-LOCATION-FROM-LOCATION, this is an
- ;; easier packaging up of the call to it.
- ;;
- (line-primary (field line)
- (location-line
- (compute-primary-cache-location-from-location
- field (cache) (line-location line) (mask) (nkeys))))
- ;;
- ;;
- (fill-line (line wrappers value)
- (when (line-reserved-p line)
- (error "Attempt to fill a reserved line."))
- (let ((loc (line-location line)))
- (cond ((= (nkeys) 1)
- (setf (cache-ref (cache) loc) wrappers)
- (when (valuep) (setf (cache-ref (cache) (1+ loc)) value)))
- (t
- (iterate ((i (interval :from 0))
- (w (list-elements wrappers)))
- (setf (cache-ref (cache) (+ loc i)) w))
- (when (valuep) (setf (cache-ref (cache) (+ loc (nkeys))) value))))))
- ;;
- ;; Blindly copy the contents of one cache line to another. The
- ;; contents of the line are overwritten, so whatever was in
- ;; there should already have been moved out.
- ;;
- ;; For convenience in debugging, this also clears out the from
- ;; location after it has been copied.
- ;;
- (copy-line (from to)
- (if (line-reserved-p to)
- (error "Copying something into a reserved cache line.")
- (let ((from-loc (line-location from))
- (to-loc (line-location to)))
- (modify-cache (cache)
- (dotimes (i (line-size))
- (setf (cache-ref (cache) (+ to-loc i))
- (cache-ref (cache) (+ from-loc i)))
- (setf (cache-ref (cache) (+ from-loc i))
- nil))))))
- ;;
- ;;
- ;;
- (transfer-line (from-cache from-line to-cache to-line)
- (if (line-reserved-p to-line)
- (error "transfering something into a reserved cache line.")
- (let ((from-loc (line-location from-line))
- (to-loc (line-location to-line)))
- (modify-cache to-cache
- (dotimes (i (line-size))
- (setf (cache-ref to-cache (+ to-loc i))
- (cache-ref from-cache (+ from-loc i))))))))
- ))
-
-(defmacro with-local-cache-functions ((cache) &body body &environment env)
- `(let ((.cache. ,cache))
- (declare (type simple-vector .cache.))
- (multiple-value-bind (.mask. .size. .line-size. .nlines.)
- (compute-cache-parameters *nkeys* *valuep* .cache.)
- (declare (type fixnum .mask. .size. .line-size. .nlines.))
- (progn .mask. .size. .line-size. .nlines.)
- (labels ,(mapcar #'(lambda (fn) (assq fn *local-cache-functions*))
- (pickup-local-cache-functions body env))
- ,@body))))
-
-(defun pickup-local-cache-functions (body env)
- (let ((functions ())
- (possible-functions (mapcar #'car *local-cache-functions*)))
- (labels ((walk-function (form context env)
- (declare (ignore env))
- (when (and (eq context :eval)
- (consp form)
- (symbolp (car form)))
- (let ((name (car form)))
- (when (and (not (memq name functions))
- (memq name possible-functions))
- (pushnew name functions)
- (walk (cddr (assq name *local-cache-functions*))))))
- form)
- (walk (body)
- (walk-form `(progn . ,body) env #'walk-function)))
- (walk body)
- functions)))
-
-)
-
-
-;;;
-;;; returns 4 values,
-;;; It tries to re-adjust the cache every time it makes a new fill. The
-;;; intuition here is that we want uniformity in the number of probes needed to
-;;; find an entry. Furthermore, adjusting has the nice property of throwing out
-;;; any entries that are invalid.
-;;;
-(defun fill-cache-internal (field cache nkeys valuep limit-fn wrappers value)
- (let ((*nkeys* nkeys)
- (*valuep* valuep)
- (*limit-fn* limit-fn))
- (with-local-cache-functions (cache)
- (flet ((4-values-please (f c)
- (multiple-value-bind (mask size)
- (compute-cache-parameters *nkeys* *valuep* c)
- (values f c mask size))))
- (let ((easy-fill-p (fill-cache-p nil field cache wrappers value)))
- (if easy-fill-p
- (4-values-please field cache)
- (multiple-value-bind (adj-field adj-cache)
- (adjust-cache field cache wrappers value)
- (if adj-field
- (4-values-please adj-field adj-cache)
- (multiple-value-bind (exp-field exp-cache)
- (expand-cache field cache wrappers value)
- (4-values-please exp-field exp-cache))))))))))
-
-;;;
-;;; returns T or NIL
-;;;
-(defun fill-cache-p (forcep field cache wrappers value)
- (with-local-cache-functions (cache)
- (let* ((primary (location-line (compute-primary-cache-location field (mask) wrappers))))
- (multiple-value-bind (free emptyp)
- (find-free-cache-line primary field cache wrappers)
- (when (or forcep emptyp) (fill-line free wrappers value) t)))))
-
-(defun fill-cache-from-cache-p (forcep field cache from-cache from-line)
- (with-local-cache-functions (from-cache)
- (let ((primary (line-primary field from-line)))
- (multiple-value-bind (free emptyp)
- (find-free-cache-line primary field cache)
- (when (or forcep emptyp)
- (transfer-line from-cache from-line cache free)
- t)))))
-
-(defun entry-in-cache-p (field cache wrappers value)
- (declare (ignore field value))
- (with-local-cache-functions (cache)
- (dotimes (i (nlines))
- (unless (line-reserved-p i)
- (when (equal (line-wrappers i) wrappers) (return t))))))
-
-;;;
-;;; Returns NIL or (values )
-;;;
-;;; This is only called when it isn't possible to put the entry in the cache
-;;; the easy way. That is, this function assumes that FILL-CACHE-P has been
-;;; called as returned NIL.
-;;;
-;;; If this returns NIL, it means that it wasn't possible to find a wrapper
-;;; field for which all of the entries could be put in the cache (within the
-;;; limit).
-;;;
-(defun adjust-cache (field cache wrappers value)
- (with-local-cache-functions (cache)
- (let ((ncache (get-cache (size))))
- (do ((nfield field (next-wrapper-field nfield)))
- ((null nfield) (free-cache ncache) nil)
- (labels ((try-one-fill-from-line (line)
- (fill-cache-from-cache-p nil nfield ncache cache line))
- (try-one-fill (wrappers value)
- (fill-cache-p nil nfield ncache wrappers value)))
- (if (and (dotimes (i (nlines) t)
- (when (and (null (line-reserved-p i))
- (line-valid-p i wrappers))
- (unless (try-one-fill-from-line i) (return nil))))
- (try-one-fill wrappers value))
- (return (values nfield ncache))
- (flush-cache-internal ncache)))))))
-
-
-;;;
-;;; returns: (values )
-;;;
-(defun expand-cache (field cache wrappers value)
- (declare (values field cache) (ignore field))
- (with-local-cache-functions (cache)
- (multiple-value-bind (ignore size)
- (compute-cache-parameters (nkeys) (valuep) (* (nlines) 2))
- (let* ((ncache (get-cache size))
- (nfield (wrapper-field 'number)))
- (labels ((do-one-fill-from-line (line)
- (unless (fill-cache-from-cache-p nil nfield ncache cache line)
- (do-one-fill (line-wrappers line) (line-value line))))
- (do-one-fill (wrappers value)
- (multiple-value-bind (adj-field adj-cache)
- (adjust-cache nfield ncache wrappers value)
- (if adj-field
- (setq nfield adj-field ncache adj-cache)
- (fill-cache-p t nfield ncache wrappers value))))
- (try-one-fill (wrappers value)
- (fill-cache-p nil nfield ncache wrappers value)))
- (dotimes (i (nlines))
- (when (and (null (line-reserved-p i))
- (line-valid-p i wrappers))
- (do-one-fill-from-line i)))
- (unless (try-one-fill wrappers value)
- (do-one-fill wrappers value))
- (values nfield ncache))))))
-
-
-;;;
-;;; This is the heart of the cache filling mechanism. It implements the decisions
-;;; about where entries are placed.
-;;;
-;;; Find a line in the cache at which a new entry can be inserted.
-;;;
-;;;
-;;; is in fact empty?
-;;;
-(defun find-free-cache-line (primary field cache &optional wrappers)
- (declare (values line empty?))
- (with-local-cache-functions (cache)
- (let ((limit (funcall (limit-fn) (nlines)))
- (wrappedp nil))
- (when (line-reserved-p primary) (setq primary (next-line primary)))
- (labels (;;
- ;; Try to find a free line starting at .
- ;; is the primary line of the entry we are finding a free
- ;; line for, it is used to compute the seperations.
- ;;
- (find-free (p s)
- (do* ((line s (next-line line))
- (nsep (line-separation p s) (1+ nsep)))
- (())
- (if (null (line-valid-p line wrappers)) ;If this line is empty or
- (return (values line t)) ;invalid, just use it.
-
- (let ((osep (line-separation (line-primary field line) line)))
- (if (and wrappedp (>= line primary))
- ;;
- ;; have gone all the way around the cache, time to quit
- ;;
- (return (values line nil))
-
- (when (cond ((or (= nsep limit)) t)
- ((= nsep osep) (zerop (random 2)))
- ((> nsep osep) t)
- (t nil))
- ;;
- ;; Try to displace what is in this line so that we
- ;; can use the line.
- ;;
- (return (values line (displace line)))))))
-
- (if (= line (1- (nlines))) (setq wrappedp t))))
- ;;
- ;; Given a line, attempt to free up that line by moving its
- ;; contents elsewhere. Returns nil when it wasn't possible to
- ;; move the contents of the line without dumping something on
- ;; the floor.
- ;;
- (displace (line)
- (if (= line (1- (nlines))) (setq wrappedp t))
- (multiple-value-bind (dline dempty?)
- (find-free (line-primary field line) (next-line line))
- (when dempty? (copy-line line dline) t))))
-
- (find-free primary primary)))))
diff --git a/obsolete/clos/2.0/clos-env-internal.lisp b/obsolete/clos/2.0/clos-env-internal.lisp
deleted file mode 100644
index 6d720032..00000000
--- a/obsolete/clos/2.0/clos-env-internal.lisp
+++ /dev/null
@@ -1,260 +0,0 @@
-(DEFINE-FILE-INFO PACKAGE "XCL" READTABLE "XCL")
-(il:filecreated "28-Aug-87 18:42:36" il:{phylum}clos-env-internal.\;1 8356
-
- il:|changes| il:|to:| (il:vars il:clos-env-internalcoms)
- (il:props (il:clos-env-internal il:makefile-environment))
- (il:functions stack-eql stack-pointer-frame stack-frame-valid-p
- stack-frame-fn-header stack-frame-pc fnheader-debugging-info
- stack-frame-name compiled-closure-fnheader compiled-closure-env)
-)
-
-
-; Copyright (c) 1987 by Xerox Corporation. All rights reserved.
-
-(il:prettycomprint il:clos-env-internalcoms)
-
-(il:rpaqq il:clos-env-internalcoms (
-
-(il:* il:|;;;| "***************************************")
-
-
-
-(il:* il:|;;;| " Copyright (c) 1987 Xerox Corporation. All rights reserved.")
-
-
-
-(il:* il:|;;;| "")
-
-
-
-(il:* il:|;;;| "Use and copying of this software and preparation of derivative works based upon this software are permitted. Any distribution of this software or derivative works must comply with all applicable United States export control laws.")
-
-
-
-(il:* il:|;;;| " ")
-
-
-
-(il:* il:|;;;| "This software is made available AS IS, and Xerox Corporation makes no warranty about the software, its performance or its conformity to any specification.")
-
-
-
-(il:* il:|;;;| " ")
-
-
-
-(il:* il:|;;;| "Any person obtaining a copy of this software is requested to send their name and post office or electronic mail address to:")
-
-
-
-(il:* il:|;;;| " CommonLoops Coordinator")
-
-
-
-(il:* il:|;;;| " Xerox Artifical Intelligence Systems")
-
-
-
-(il:* il:|;;;| " 2400 Hanover St.")
-
-
-
-(il:* il:|;;;| " Palo Alto, CA 94303")
-
-
-
-(il:* il:|;;;| "(or send Arpanet mail to CommonLoops-Coordinator.pa@Xerox.arpa)")
-
-
-
-(il:* il:|;;;| "")
-
-
-
-(il:* il:|;;;| " Suggestions, comments and requests for improvements are also welcome.")
-
-
-
-(il:* il:|;;;| " *************************************************************************")
-
-
-
-(il:* il:|;;;| "")
-
- (il:declare\: il:dontcopy (il:prop il:makefile-environment
- il:clos-env-internal))
- (il:* il:\;
- "We're off to hack the system...")
-
- (il:declare\: il:eval@compile il:dontcopy (il:files clos::abc)
-
-
- (il:* il:|;;| "The Deltas and The East and The Freeze")
-)
- (il:functions stack-eql stack-pointer-frame stack-frame-valid-p
- stack-frame-fn-header stack-frame-pc
- fnheader-debugging-info stack-frame-name
- compiled-closure-fnheader compiled-closure-env)))
-
-
-
-(il:* il:|;;;| "***************************************")
-
-
-
-
-(il:* il:|;;;| " Copyright (c) 1987 Xerox Corporation. All rights reserved.")
-
-
-
-
-(il:* il:|;;;| "")
-
-
-
-
-(il:* il:|;;;|
-"Use and copying of this software and preparation of derivative works based upon this software are permitted. Any distribution of this software or derivative works must comply with all applicable United States export control laws."
-)
-
-
-
-
-(il:* il:|;;;| " ")
-
-
-
-
-(il:* il:|;;;|
-"This software is made available AS IS, and Xerox Corporation makes no warranty about the software, its performance or its conformity to any specification."
-)
-
-
-
-
-(il:* il:|;;;| " ")
-
-
-
-
-(il:* il:|;;;|
-"Any person obtaining a copy of this software is requested to send their name and post office or electronic mail address to:"
-)
-
-
-
-
-(il:* il:|;;;| " CommonLoops Coordinator")
-
-
-
-
-(il:* il:|;;;| " Xerox Artifical Intelligence Systems")
-
-
-
-
-(il:* il:|;;;| " 2400 Hanover St.")
-
-
-
-
-(il:* il:|;;;| " Palo Alto, CA 94303")
-
-
-
-
-(il:* il:|;;;| "(or send Arpanet mail to CommonLoops-Coordinator.pa@Xerox.arpa)")
-
-
-
-
-(il:* il:|;;;| "")
-
-
-
-
-(il:* il:|;;;| " Suggestions, comments and requests for improvements are also welcome.")
-
-
-
-
-(il:* il:|;;;| " *************************************************************************")
-
-
-
-
-(il:* il:|;;;| "")
-
-(il:declare\: il:dontcopy
-
-(il:putprops il:clos-env-internal il:makefile-environment (:package "XCL" :readtable "XCL"))
-)
-
-
-
-(il:* il:\; "We're off to hack the system...")
-
-(il:declare\: il:eval@compile il:dontcopy
-(il:filesload clos::abc)
-)
-
-(defun stack-eql (x y) "Test two stack pointers for equality" (and (il:stackp x)
- (il:stackp y)
- (eql (il:fetch (il:stackp il:edfxp
- )
- il:of x)
- (il:fetch (il:stackp il:edfxp
- )
- il:of y))))
-
-
-(defun stack-pointer-frame (stack-pointer) (il:|fetch| (il:stackp il:edfxp) il:|of| stack-pointer))
-
-
-(defun stack-frame-valid-p (frame) (not (il:|fetch| (il:fx il:invalidp) il:|of| frame)))
-
-
-(defun stack-frame-fn-header (frame) (il:|fetch| (il:fx il:fnheader) il:|of| frame))
-
-
-(defun stack-frame-pc (frame) (il:|fetch| (il:fx il:pc) il:|of| frame))
-
-
-(defun fnheader-debugging-info (fnheader) (let* ((start-pc (il:fetch (il:fnheader il:startpc)
- il:of fnheader))
- (name-table-words
- (let ((size (il:fetch (il:fnheader il:ntsize)
- il:of fnheader)))
- (if (zerop size)
- il:wordsperquad
- (* size 2))))
- (past-name-table-in-words (+ (il:fetch (il:fnheader
-
- il:overheadwords
- )
- il:of fnheader)
- name-table-words)))
- (and (= (- start-pc (* il:bytesperword
- past-name-table-in-words))
- il:bytespercell)
-
- (il:* il:|;;| "It's got a debugging-info list.")
-
- (il:\\getbaseptr fnheader
- past-name-table-in-words))))
-
-
-(defun stack-frame-name (frame) (il:|fetch| (il:fx il:framename) il:|of| frame))
-
-
-(defun compiled-closure-fnheader (closure) (il:|fetch| (il:compiled-closure il:fnheader) il:|of|
- closure))
-
-
-(defun compiled-closure-env (closure) (il:fetch (il:compiled-closure il:environment) il:of closure))
-
-(il:putprops il:clos-env-internal il:copyright ("Xerox Corporation" 1987))
-(il:declare\: il:dontcopy
- (il:filemap (nil)))
-il:stop
diff --git a/obsolete/clos/2.0/clos-env.lisp b/obsolete/clos/2.0/clos-env.lisp
deleted file mode 100644
index be366810..00000000
--- a/obsolete/clos/2.0/clos-env.lisp
+++ /dev/null
@@ -1,1609 +0,0 @@
-;;;-*-Mode:LISP; Package:(CLOS (LISP WALKER)); Base:10; Syntax:Common-lisp -*-
-;;;
-;;; *************************************************************************
-;;; Copyright (c) 1991 Venue
-;;; All rights reserved.
-;;; *************************************************************************
-;;;
-;;; Medley-Lisp specific environment hacking for CLOS
-
-(in-package "CLOS")
-
-;;
-;; Protect the Corporation
-;;
-(eval-when (eval load)
- (format *terminal-io*
- "~&;CLOS-ENV Copyright (c) 1991 by ~
- Venue Corporation. All rights reserved.~%"))
-
-
-;;; Make funcallable instances (FINs) print by calling print-object.
-
-(eval-when (eval load)
- (il:defprint 'il:compiled-closure 'il:print-closure))
-
-(defun il:print-closure (x &optional stream depth)
- ;; See the IRM, section 25.3.3. Unfortunatly, that documentation is
- ;; not correct. In particular, it makes no mention of the third argument.
- (cond ((not (funcallable-instance-p x))
- ;; IL:\CCLOSURE.DEFPRINT is the orginal system function for
- ;; printing closures
- (il:\\cclosure.defprint x stream))
- ((streamp stream)
- ;; Use the standard CLOS printing method, then return T to tell
- ;; the printer that we have done the printing ourselves.
- (print-object x stream)
- t)
- (t
- ;; Internal printing (again, see the IRM section 25.3.3).
- ;; Return a list containing the string of characters that
- ;; would be printed, if the object were being printed for
- ;; real.
- (with-output-to-string (stream)
- (list (print-object x stream))))))
-
-
-;;; Naming methods
-
-(defun gf-named (gf-name)
- (let ((spec (cond ((symbolp gf-name) gf-name)
- ((and (consp gf-name)
- (eq (first gf-name) 'setf)
- (symbolp (second gf-name))
- (null (cddr gf-name)))
- (get-setf-function-name (second gf-name)))
- (t nil))))
- (if (and (fboundp spec)
- (generic-function-p (symbol-function spec)))
- (symbol-function spec)
- nil)))
-
-(defun generic-function-method-names (gf-name hasdefp)
- (if hasdefp
- (let ((names nil))
- (maphash #'(lambda (key value)
- (declare (ignore value))
- (when (and (consp key) (eql (car key) gf-name))
- (pushnew key names)))
- (gethash 'methods xcl:*definition-hash-table*))
- names)
- (let ((gf (gf-named gf-name)))
- (when gf
- (mapcar #'full-method-name (generic-function-methods gf))))))
-
-(defun full-method-name (method)
- "Return the full name of the method"
- (let ((specializers (mapcar #'(lambda (x)
- (cond ((eq x 't) t)
- ((and (consp x) (eq (car x) 'eql)) x)
- (t (class-name x))))
- (method-specializers method))))
- ;; Now go through some hair to make sure that specializer is
- ;; really right. Once CLOS returns the right value for
- ;; specializers this can be taken out.
- (let* ((arglist (method-lambda-list method))
- (number-required (or (position-if
- #'(lambda (x) (member x lambda-list-keywords))
- arglist)
- (length arglist)))
- (diff (- number-required (length specializers))))
- (when (> diff 0)
- (setq specializers (nconc (copy-list specializers)
- (make-list diff :initial-element 't)))))
- (make-full-method-name (generic-function-name
- (method-generic-function method))
- (method-qualifiers method)
- specializers)))
-
-(defun make-full-method-name (generic-function-name qualifiers arg-types)
- "Return the full name of a method, given the generic-function name, the method
-qualifiers, and the arg-types"
- ;; The name of the method is:
- ;; ( ..
- ;; (..))
- (labels ((remove-trailing-ts (l)
- (if (null l)
- nil
- (let ((tail (remove-trailing-ts (cdr l))))
- (if (null tail)
- (if (eq (car l) 't)
- nil
- (list (car l)))
- (if (eq l tail)
- l
- (cons (car l) tail)))))))
- `(,generic-function-name ,@qualifiers
- ,(remove-trailing-ts arg-types))))
-
-(defun parse-full-method-name (method-name)
- "Parse the method name, returning the gf-name, the qualifiers, and the
-arg-types."
- (values (first method-name)
- (butlast (rest method-name))
- (car (last method-name))))
-
-(defun prompt-for-full-method-name (gf-name &optional has-def-p)
- "Prompt the user for the full name of a method on the given generic function name"
- (let ((method-names (generic-function-method-names gf-name has-def-p)))
- (cond ((null method-names)
- nil)
- ((null (cdr method-names))
- (car method-names))
- (t (il:menu
- (il:create
- il:menu il:items il:_ ;If HAS-DEF-P, include only
- ; those methods that have a
- ; symbolic def'n that we can
- ; find
- (remove-if #'null
- (mapcar #'(lambda (m)
- (if (or (not has-def-p)
- (il:hasdef m 'methods))
- `(,(with-output-to-string (s)
- (dolist (x m)
- (format s "~A " x))
- s)
- ',m)
- nil))
- method-names))
- il:title il:_ "Which method?"))))))
-
-
-;;; Converting generic defining macros into DEFDEFINER macros
-
-(defmacro make-defdefiner (definer-name definer-type type-description &body
- definer-options)
- "Make the DEFINER-NAME use DEFDEFINER, defining items of type DEFINER-TYPE"
- (let ((old-definer-macro-name (intern (string-append definer-name
- " old definition")
- (symbol-package definer-name)))
- (old-definer-macro-expander (intern (string-append definer-name
- " old expander")
- (symbol-package definer-name))))
- `(progn
- ;; First, move the current defining function off to some safe
- ;; place
- (unmake-defdefiner ',definer-name)
- (cond ((not (fboundp ',definer-name))
- (error "~A has no definition!" ',definer-name))
- ((fboundp ',old-definer-macro-name))
- ((macro-function ',definer-name)
- ; We have to move the macro
- ; expansion function as well,
- ; so it won't get clobbered
- ; when the original macro is
- ; redefined. See AR 7410.
- (let* ((expansion-function (macro-function ',definer-name)))
- (setf (symbol-function ',old-definer-macro-expander)
- (loop (if (symbolp expansion-function)
- (setq expansion-function
- (symbol-function expansion-function))
- (return expansion-function))))
- (setf (macro-function ',old-definer-macro-name)
- ',old-definer-macro-expander)
- (setf (get ',definer-name 'make-defdefiner) expansion-function)))
- (t (error "~A does not name a macro." ',definer-name)))
- ;; Make sure the type is defined
- (xcl:def-define-type ,definer-type ,type-description)
- ;; Now redefine the definer, using DEFEDFINER and the original def'n
- (xcl:defdefiner ,(if definer-options
- (cons definer-name definer-options)
- definer-name)
- ,definer-type (&body b) `(,',old-definer-macro-name ,@,'b)))))
-
-(defun unmake-defdefiner (definer-name)
- (let ((old-expander (get definer-name 'make-defdefiner)))
- (when old-expander
- (setf (macro-function definer-name old-expander))
- (remprop definer-name 'make-defdefiner))))
-
-
-;;; For tricking ED into being able to use just the generic-function-name
-;;; instead of the full method name
-
-(defun source-manager-method-edit-fn (name type source editcoms options)
- "Edit a method of the given name"
- (let ((full-name (if (gf-named name)
- ;If given the name of a
- ; generic-function, try to get
- ; the full method name
- (prompt-for-full-method-name name t)
- ; Otherwise it should name the
- ; method
- name)))
- (when (not (null full-name))
- (il:default.editdef full-name type source editcoms options))
- (or full-name name))) ;Return the name
-
-(defun source-manager-method-hasdef-fn (name type &optional source)
- "Is there a method defined with the given name?"
- (cond ((not (eq type 'methods)) nil)
- ((or (symbolp name)
- (and (consp name)
- (eq (first name) 'setf)
- (symbolp (second name))
- (null (cddr name))))
- ;; If passed in the name of a generic-function, pretend that
- ;; there is a method by that name if there is a generic function
- ;; by that name, and there is a method whose source we can find.
- (if (and (not (null (gf-named name)))
- (find-if #'(lambda (m)
- (il:hasdef m type source))
- (generic-function-method-names name t)))
- name
- nil))
- ((and (consp name) (>= (length name) 2))
- ;; Standard methods are named (gf-name {qualifiers}* ({specializers}*))
- (when (il:getdef name type source '(il:nocopy il:noerror))
- name))
- (t
- ;; Nothing else can name a method
- nil)))
-
-;;; Initialize the CLOS env
-
-(defun initialize-clos-env nil
- "Initialize the Medley CLOS environment"
- ;; Set up SourceManager DEFDEFINERS for classes and methods.
- ;;
- ;; Make sure to define methods before classes, so that (IL:FILES?) will build
- ;; filecoms that have classes before methods.
- (unless (il:hasdef 'methods 'il:filepkgtype)
- (make-defdefiner defmethod methods "methods"
- (:name (lambda (form)
- (multiple-value-bind (name qualifiers arglist)
- (parse-defmethod (cdr form))
- (make-full-method-name name qualifiers
- (specialized-lambda-list-specializers
- arglist)))))
- (:undefiner
- (lambda (method-name)
- (multiple-value-bind
- (name qualifiers arg-types)
- (parse-full-method-name method-name)
- (let* ((gf (gf-named name))
- (method (when gf
- (get-method gf qualifiers
- (mapcar #'find-class
- arg-types)))))
- (when method (remove-method gf method))))))))
- ;; Include support for DEFGENERIC, if that is defined
- (unless (or (not (fboundp 'defgeneric))
- (il:hasdef 'generic-functions 'il:filepkgtype))
- (make-defdefiner defgeneric generic-functions "generic-function definitions"))
- ;; DEFCLASS FileManager stuff
- (unless (il:hasdef 'classes 'il:filepkgtype)
- (make-defdefiner defclass classes "class definitions"
- (:undefiner (lambda (name)
- (when (find-class name t)
- (setf (find-class name) nil)))))
- ;; CLASSES "include" TYPES.
- (il:filepkgcom 'classes 'il:contents
- #'(lambda (com name type &optional reason)
- (declare (ignore name reason))
- (if (member type '(il:types classes) :test #'eq)
- (cdr com)
- nil))))
- ;; Set up the hooks so that ED can be handed the name of a generic function,
- ;; and end up editing a method instead
- (il:filepkgtype 'methods 'il:editdef 'source-manager-method-edit-fn
- 'il:hasdef 'source-manager-method-hasdef-fn)
- ;; Set up the inspect macro. The right way to do this is to
- ;; (ENSURE-GENERIC-FUNCTION 'IL:INSPECT...), but for now...
- (push '((il:function clos-object-p) . \\internal-inspect-object)
- il:inspectmacros)
- ;; Unmark any SourceManager changes caused by this loadup
- (dolist (com (il:filepkgchanges))
- (dolist (name (cdr com))
- (when (and (symbolp name)
- (eq (symbol-package name) (find-package "CLOS")))
- (il:unmarkaschanged name (car com))))))
-
-(eval-when (eval load)
- (initialize-clos-env))
-
-
-;;; Inspecting CLOS objects
-
-(defun clos-object-p (x)
- "Is the datum a CLOS object?"
- (or (std-instance-p x)
- (fsc-instance-p x)))
-
-(defun \\internal-inspect-object (x type where)
- (inspect-object x type where))
-
-(defun \\internal-inspect-slot-names (x)
- (inspect-slot-names x))
-
-(defun \\internal-inspect-slot-value (x slot-name)
- (inspect-slot-value x slot-name))
-
-(defun \\internal-inspect-setf-slot-value (x slot-name value)
- (inspect-setf-slot-value x slot-name value))
-
-(defun \\internal-inspect-slot-name-command (slot-name x window)
- (inspect-slot-name-command slot-name x window))
-
-(defun \\internal-inspect-title (x y)
- (inspect-title x y))
-
-(defmethod inspect-object (x type where)
- "Open an insect window on the object x"
- (il:inspectw.create x '\\internal-inspect-slot-names
- '\\internal-inspect-slot-value
- '\\internal-inspect-setf-slot-value
- '\\internal-inspect-slot-name-command nil nil
- '\\internal-inspect-title nil where
- #'(lambda (n v) ;Same effect as NIL, but avoids bug in
- (declare (ignore v)) ; INSPECTW.CREATE
- n)))
-
-(defmethod inspect-slot-names (x)
- "Return a list of names of slots of the object that should be shown in the
-inspector"
- (mapcar #'(lambda (slotd) (slot-value slotd 'name))
- (slots-to-inspect (class-of x) x)))
-
-(defmethod inspect-slot-value (x slot-name)
- (cond ((not (slot-exists-p x slot-name)) "** no such slot **")
- ((not (slot-boundp x slot-name)) "** slot not bound **")
- (t (slot-value x slot-name))))
-
-(defmethod inspect-setf-slot-value (x slot-name value)
- "Used by the inspector to set the value fo a slot"
- ;; Make this UNDO-able
- (il:undosave `(inspect-setf-slot-value ,x ,slot-name
- ,(slot-value x slot-name)))
- ;; Then change the value
- (setf (slot-value x slot-name) value))
-
-(defmethod inspect-slot-name-command (slot-name x window)
- "Allows the user to select a menu item to change a slot value in an inspect
-window"
- ;; This code is a very slightly hacked version of the system function
- ;; DEFAULT.INSPECTW.PROPCOMMANDFN. We have to do this because the
- ;; standard version makes some nasty assumptions about
- ;; structure-objects that are not true for CLOS objects.
- (declare (special il:|SetPropertyMenu|))
- (case (il:menu (cond ((typep il:|SetPropertyMenu| 'il:menu)
- il:|SetPropertyMenu|)
- (t (il:setq il:|SetPropertyMenu|
- (il:|create| il:menu il:items il:_
- '((set 'set
- "Allows a new value to be entered"
- )))))))
- (set
- ;; The user want to set the value
- (il:ersetq (prog ((il:oldvalueitem (il:itemofpropertyvalue slot-name
- window))
- il:newvalue il:pwindow)
- (il:ttydisplaystream (il:setq il:pwindow
- (il:getpromptwindow window 3)))
- (il:clearbuf t t)
- (il:resetlst
- (il:resetsave (il:\\itemw.flipitem il:oldvalueitem window)
- (list 'il:\\itemw.flipitem
- il:oldvalueitem window))
- (il:resetsave (il:tty.process (il:this.process)))
- (il:resetsave (il:printlevel 4 3))
- (il:|printout| t "Enter the new "
- slot-name " for " x t
- "The expression read will be EVALuated."
- t "> ")
- (il:setq il:newvalue (il:lispx (il:lispxread t t)
- '>))
- ; clear tty buffer because it
- ; sometimes has stuff left.
- (il:clearbuf t t))
- (il:closew il:pwindow)
- (return (il:inspectw.replace window slot-name il:newvalue)))))))
-
-(defmethod inspect-title (x window)
- "Return the title to use in an inspect window viewing x"
- (format nil "Inspecting a ~A" (class-name (class-of x))))
-
-(defmethod inspect-title ((x standard-class) window)
- (format nil "Inspecting the class ~A" (class-name x)))
-
-
-;;; Debugger support for CLOS
-
-
-(il:filesload clos-env-internal)
-
-;; Non-CLOS specific changes to the debugger
-
-;; Redefining the standard INTERESTING-FRAME-P function. Now functions can be
-;; declared uninteresting to BT by giving them an XCL::UNINTERESTINGP
-;; property.
-
-(dolist (fn '(si::*unwind-protect* il:*env*
- evalhook xcl::nohook xcl::undohook
- xcl::execa0001 xcl::execa0001a0002
- xcl::|interpret-UNDOABLY|
- cl::|interpret-IF| cl::|interpret-FLET|
- cl::|interpret-LET| cl::|interpret-LETA0001|
- cl::|interpret-BLOCK| cl::|interpret-BLOCKA0001|
- il:do-event il:eval-input
- apply t))
- (setf (get fn 'xcl::uninterestingp) t))
-
-(defun xcl::interesting-frame-p (xcl::pos &optional xcl::interpflg)
- "Return TRUE iff the frame should be visible for a short backtrace."
- (declare (special il:openfns))
- (let ((xcl::name (if (il:stackp xcl::pos) (il:stkname xcl::pos) xcl::pos)))
- (typecase xcl::name
- (symbol (case xcl::name
- (il:*env*
- ;; *ENV* is used by ENVEVAL etc.
- nil)
- (il:errorset
- (or (<= (il:stknargs xcl::pos) 1)
- (not (eq (il:stkarg 2 xcl::pos nil)
- 'il:internal))))
- (il:eval
- (or (<= (il:stknargs xcl::pos) 1)
- (not (eq (il:stkarg 2 xcl::pos nil)
- 'xcl::internal))))
- (il:apply
- (or (<= (il:stknargs xcl::pos) 2)
- (not (il:stkarg 3 xcl::pos nil))))
- (otherwise
- (cond ((get xcl::name 'xcl::uninterestingp)
- ;; Explicitly declared uninteresting.
- nil)
- ((eq (il:chcon1 xcl::name) (char-code #\\))
- ;; Implicitly declared uninteresting by starting the
- ;; name with a "\".
- nil)
- ((or (member xcl::name il:openfns :test #'eq)
- (eq xcl::name 'funcall))
- ;;The function won't be seen when compiled, so only show
- ;;it if INTERPFLG it true
- xcl::interpflg)
- (t
- ;; Interesting by default.
- t)))))
- (cons (case (car xcl::name)
- (:broken t)
- (otherwise nil)))
- (otherwise nil))))
-
-(setq il:*short-backtrace-filter* 'xcl::interesting-frame-p)
-
-
-(eval-when (eval compile)
- (il:record il:bkmenuitem (il:label (il:bkmenuinfo il:frame-name))))
-
-
-;; Change the frame inspector to open up lexical environments
-
- ;; Since the DEFSTRUCT is going to build the accessors in the package that is
- ;; current at read-time, and we want the accessors to reside in the IL
- ;; package, we have got to make sure that the defstruct happens when the
- ;; package is IL.
-
-(in-package "IL")
-
-(cl:defstruct (frame-prop-name (:type cl:list))
- (label-fn 'nill)
- (value-fn
- (function
- (lambda (prop-name framespec)
- (frame-prop-name-data prop-name))))
- (setf-fn 'nill)
- (inspect-fn
- (function
- (lambda (value prop-name framespec window)
- (default.inspectw.valuecommandfn value prop-name (car framespec) window))))
- (data nil))
-
-(cl:in-package "CLOS")
-
-(defun il:debugger-stack-frame-prop-names (il:framespec)
- ;; Frame prop-names are structures of the form
- ;; (LABEL-FN VALUE-FN SETF-FN EDIT-FN DATA)
- (let ((il:pos (car il:framespec))
- (il:backtrace-item (cadr il:framespec)))
- (il:if (eq 'eval (il:stkname il:pos))
- il:then
- (let ((il:expression (il:stkarg 1 il:pos))
- (il:environment (il:stkarg 2 il:pos)))
- `(,(il:make-frame-prop-name :inspect-fn
- (il:function
- (il:lambda (il:value il:prop-name il:framespec il:window)
- (il:inspect/as/function il:value (car il:framespec) il:window)))
- :data il:expression)
- ,(il:make-frame-prop-name :data "ENVIRONMENT")
- ,@(il:for il:aspect il:in
- `((,(and il:environment (il:environment-vars il:environment))
- "vars")
- (,(and il:environment (il:environment-functions il:environment))
- "functions")
- (,(and il:environment (il:environment-blocks il:environment))
- "blocks")
- (,(and il:environment (il:environment-tagbodies il:environment))
- "tag bodies"))
- il:bind il:group-name il:p-list
- il:eachtime (il:setq il:group-name (cadr il:aspect))
- (il:setq il:p-list (car il:aspect))
- il:when (not (null il:p-list))
- il:join
- `(,(il:make-frame-prop-name :data il:group-name)
- ,@(il:for il:p il:on il:p-list il:by cddr il:collect
- (il:make-frame-prop-name :label-fn
- (il:function (il:lambda (il:prop-name il:framespec)
- (car (il:frame-prop-name-data il:prop-name))))
- :value-fn
- (il:function (il:lambda (il:prop-name il:framespec)
- (cadr (il:frame-prop-name-data il:prop-name))))
- :setf-fn
- (il:function (il:lambda (il:prop-name il:framespec il:new-value)
- (il:change (cadr (il:frame-prop-name-data
- il:prop-name))
- il:new-value)))
- :data il:p))))))
- il:else
- (flet ((il:build-name (&key il:arg-name il:arg-number)
- (il:make-frame-prop-name :label-fn
- (il:function (il:lambda (il:prop-name il:framespec)
- (car (il:frame-prop-name-data il:prop-name))))
- :value-fn
- (il:function (il:lambda (il:prop-name il:framespec)
- (il:stkarg (cadr (il:frame-prop-name-data
- il:prop-name))
- (car il:framespec))))
- :setf-fn
- (il:function (il:lambda (il:prop-name il:framespec il:new-value)
- (il:setstkarg (cadr (il:frame-prop-name-data
- il:prop-name))
- (car il:framespec)
- il:new-value)))
- :data
- (list il:arg-name il:arg-number))))
- (let ((il:nargs (il:stknargs il:pos t))
- (il:nargs1 (il:stknargs il:pos))
- (il:fnname (il:stkname il:pos))
- il:argname
- (il:arglist))
- (and (il:litatom il:fnname)
- (il:ccodep il:fnname)
- (il:setq il:arglist (il:listp (il:smartarglist il:fnname))))
- `(,(il:make-frame-prop-name :inspect-fn
- (il:function (il:lambda (il:value il:prop-name il:framespec
- il:window)
- (il:inspect/as/function il:value
- (car il:framespec)
- il:window)))
- :data
- (il:fetch (il:bkmenuitem il:frame-name) il:of il:backtrace-item))
- ,@(il:bind il:mode il:for il:i il:from 1 il:to il:nargs1 il:collect
- (progn (il:while (il:fmemb (il:setq il:argname (il:pop il:arglist))
- lambda-list-keywords)
- il:do
- (il:setq il:mode il:argname))
- (il:build-name :arg-name
- (or (il:stkargname il:i il:pos)
- ; special
- (if (case il:mode
- ((nil &optional) il:argname)
- (t nil))
- (string il:argname)
- (il:concat "arg " (- il:i 1))))
- :arg-number il:i)))
- ,@(let* ((il:novalue "No value")
- (il:slots (il:for il:pvar il:from 0 il:as il:i il:from
- (il:add1 il:nargs1)
- il:to il:nargs il:by 1 il:when
- (and (il:neq il:novalue (il:stkarg il:i il:pos
- il:novalue))
- (or (il:setq il:argname (il:stkargname
- il:i il:pos))
- (il:setq il:argname (il:concat
- "local "
- il:pvar)))
- )
- il:collect
- (il:build-name :arg-name il:argname
- :arg-number il:i))))
- (and il:slots (cons (il:make-frame-prop-name :data "locals")
- il:slots)))))))))
-
-(defun il:debugger-stack-frame-fetchfn (il:framespec il:prop-name)
- (il:apply* (il:frame-prop-name-value-fn il:prop-name)
- il:prop-name il:framespec))
-
-(defun il:debugger-stack-frame-storefn (il:framespec il:prop-name il:newvalue)
- (il:apply* (il:frame-prop-name-setf-fn il:prop-name)
- il:prop-name il:framespec il:newvalue))
-
-(defun il:debugger-stack-frame-value-command (il:datum il:prop-name
- il:framespec il:window)
- (il:apply* (il:frame-prop-name-inspect-fn il:prop-name)
- il:datum il:prop-name il:framespec il:window))
-
-(defun il:debugger-stack-frame-title (il:framespec &optional il:window)
- (declare (ignore il:window))
- (il:concat (il:stkname (car il:framespec)) " Frame"))
-
-(defun il:debugger-stack-frame-property (il:prop-name il:framespec)
- (il:apply* (il:frame-prop-name-label-fn il:prop-name)
- il:prop-name il:framespec))
-
-;; Teaching the debugger that there are other file-manager types that can
-;; appear on the stack
-
-(defvar xcl::*function-types* '(il:fns il:functions)
- "Manager types that can appear on the stack")
-
-;; Redefine a couple of system functions to use the above stuff
-
-#+Xerox-Lyric
-(progn
-
-(defun il:attach-backtrace-menu (&optional (il:ttywindow
- (il:wfromds (il:ttydisplaystream)))
- il:skip)
- (let ((il:bkmenu (il:|create| il:menu
- il:items il:_
- (il:collect-backtrace-items il:ttywindow il:skip)
- il:whenselectedfn il:_
- (il:function il:backtrace-item-selected)
- il:whenheldfn il:_
- #'(il:lambda (il:item il:menu il:button)
- (declare (ignore il:item il:menu))
- (case il:button
- (il:left (il:promptprint
- "Open a frame inspector on this stack frame"
- ))
- (il:middle (il:promptprint
- "Inspect/Edit this function"))
- ))
- il:menuoutlinesize il:_ 0
- il:menufont il:_ il:backtracefont
- il:menucolumns il:_ 1))
- (il:ttyregion (il:windowprop il:ttywindow 'il:region))
- il:btw)
- (cond
- ((il:setq il:btw (il:|for| il:atw il:|in| (il:attachedwindows il:ttywindow)
- il:|when| (and (il:setq il:btw (il:windowprop il:atw 'il:menu))
- (eql (il:|fetch| (il:menu il:whenselectedfn)
- il:|of| (car il:btw))
- (il:function il:backtrace-item-selected)))
- il:|do|
- (return il:atw)))
- (il:deletemenu (car (il:windowprop il:btw 'il:menu))
- nil il:btw)
- (il:windowprop il:btw 'il:extent nil)
- (il:clearw il:btw))
- ((il:setq il:btw (il:createw (il:region-next-to (il:windowprop il:ttywindow 'il:region)
- (il:widthifwindow (il:imin (il:|fetch| (il:menu
- il:imagewidth
- )
- il:|of| il:bkmenu)
- il:|MaxBkMenuWidth|))
- (il:|fetch| (il:region il:height) il:|of| il:ttyregion
- )
- 'il:left)))
- (il:attachwindow il:btw il:ttywindow (cond
- ((il:igreaterp (il:|fetch| (il:region il:left)
- il:|of| (il:windowprop
- il:btw
- 'il:region))
- (il:|fetch| (il:region il:left)
- il:|of| il:ttyregion))
- 'il:right)
- (t 'il:left))
- nil
- 'il:localclose)
- (il:windowprop il:btw 'il:process (il:windowprop il:ttywindow 'il:process))
-
- ))
- (il:addmenu il:bkmenu il:btw (il:|create| il:_ il:position
- il:xcoord il:_ 0
- il:ycoord il:_ (il:idifference (il:windowprop
- il:btw
- 'il:height)
- (il:|fetch| (il:menu il:imageheight
- ) il:|of|
- il:bkmenu
- ))))))
-
-(defun il:backtrace-item-selected (il:item il:menu il:button)
- (il:resetlst
- (prog (il:olditem il:ttywindow il:bkpos il:pos il:positions il:framewindow
- (il:framespecn (il:|fetch| (il:bkmenuitem il:bkmenuinfo) il:|of| il:item)
-
- ))
- (cond
- ((il:setq il:olditem (il:|fetch| (il:menu il:menuuserdata) il:|of| il:menu))
- (il:menudeselect il:olditem il:menu)
- ))
- (il:setq il:ttywindow (il:windowprop (il:wfrommenu il:menu)
- 'il:mainwindow))
- (il:setq il:bkpos (il:windowprop il:ttywindow 'il:stack-position))
- (il:setq il:pos (il:stknth (- il:framespecn)
- il:bkpos))
- (let ((il:lp (il:windowprop il:ttywindow 'il:lastpos)))
- (and il:lp (il:stknth 0 il:pos il:lp)))
- (il:menuselect il:item il:menu)
- (if (eq il:button 'il:middle)
- (progn
-
-
- (il:resetsave nil (list 'il:relstk il:pos))
- (il:inspect/as/function (il:|fetch| (il:bkmenuitem il:frame-name)
- il:|of| il:item)
- il:pos il:ttywindow))
- (progn
-
-
- (il:setq il:framewindow
- (xcl:with-profile (il:process.eval
- (il:windowprop il:ttywindow 'il:process)
- '(let ((il:profile (xcl:copy-profile (xcl:find-profile
- "READ-PRINT"))))
- (setf (xcl::profile-entry-value '
- xcl:*eval-function* il:profile)
- xcl:*eval-function*)
- (xcl:save-profile il:profile))
- t)
- (il:inspectw.create (list il:pos il:item)
- 'il:debugger-stack-frame-prop-names
- 'il:debugger-stack-frame-fetchfn
- 'il:debugger-stack-frame-storefn nil '
- il:debugger-stack-frame-value-command nil '
- il:debugger-stack-frame-title nil (
- il:make-frame-inspect-window
- il:ttywindow)
- 'il:debugger-stack-frame-property)))
- (cond
- ((not (il:windowprop il:framewindow 'il:mainwindow))
- (il:attachwindow il:framewindow il:ttywindow
- (cond
- ((il:igreaterp (il:|fetch| (il:region il:bottom)
- il:|of| (il:windowprop il:framewindow
- 'il:region))
- (il:|fetch| (il:region il:bottom)
- il:|of| (il:windowprop il:ttywindow 'il:region)))
- 'il:top)
- (t 'il:bottom))
- nil
- 'il:localclose)
- (il:windowaddprop il:framewindow 'il:closefn (il:function il:detachwindow
- ))))))
- (return))))
-
-(defun il:collect-backtrace-items (xcl::tty-window xcl::skip)
- (let* ((xcl::items (cons nil nil))
- (xcl::items-tail xcl::items))
- (macrolet ((xcl::collect-item (xcl::new-item)
- `(progn (setf (rest xcl::items-tail)
- (cons ,xcl::new-item nil))
- (pop xcl::items-tail))))
- (let* ((xcl::filter-fn (cond
- ((null xcl::skip)
- #'xcl:true)
- ((eq xcl::skip t)
- il:*short-backtrace-filter*)
- (t xcl::skip)))
- (xcl::top-frame (il:stknth 0 (il:getwindowprop xcl::tty-window '
- il:stack-position)))
- (xcl::next-frame xcl::top-frame)
- (xcl::frame-number 0)
- xcl::interesting-p xcl::last-frame-consumed xcl::use-frame xcl::label)
- (loop (when (null xcl::next-frame)
- (return))
- (multiple-value-setq (xcl::interesting-p xcl::last-frame-consumed
- xcl::use-frame xcl::label)
- (funcall xcl::filter-fn xcl::next-frame))
- (when (null xcl::last-frame-consumed)
-
- (setf xcl::last-frame-consumed xcl::next-frame))
- (when xcl::interesting-p
- (when (null xcl::use-frame)
- (setf xcl::use-frame xcl::last-frame-consumed))
-
- (when (null xcl::label)
- (setf xcl::label (il:stkname xcl::use-frame))
- (if (member xcl::label '(eval il:eval il:apply apply)
- :test
- 'eq)
- (setf xcl::label (il:stkarg 1 xcl::use-frame))))
-
- (loop (cond
- ((not (typep xcl::next-frame 'il:stackp))
- (error "~%Use-frame ~S not found" xcl::use-frame))
- ((xcl::stack-eql xcl::next-frame xcl::use-frame)
- (return))
- (t (incf xcl::frame-number)
- (setf xcl::next-frame (il:stknth -1 xcl::next-frame
- xcl::next-frame)))))
-
- (xcl::collect-item (il:|create| il:bkmenuitem
- il:label il:_ (let ((*print-level* 2)
- (*print-length* 3)
- (*print-escape* t)
- (*print-gensym* t)
- (*print-pretty* nil)
- (*print-circle* nil)
- (*print-radix* 10)
- (*print-array* nil)
- (il:*print-structure*
- nil))
- (prin1-to-string
- xcl::label))
- il:bkmenuinfo il:_ xcl::frame-number
- il:frame-name il:_ xcl::label)))
-
- (loop (cond
- ((not (typep xcl::next-frame 'il:stackp))
- (error "~%Last-frame-consumed ~S not found"
- xcl::last-frame-consumed))
- ((prog1 (xcl::stack-eql xcl::next-frame xcl::last-frame-consumed
- )
- (incf xcl::frame-number)
- (setf xcl::next-frame (il:stknth -1 xcl::next-frame
-
- xcl::next-frame)))
- (return)))))))
- (rest xcl::items)))
-
-)
-#+Xerox-Medley
-(progn
-
-(defun dbg::attach-backtrace-menu (&optional tty-window skip)
- (declare (special il:\\term.ofd il:backtracefont))
- (or tty-window (il:setq tty-window (il:wfromds (il:ttydisplaystream))))
- (prog (btw bkmenu
- (tty-region (il:windowprop tty-window 'il:region))
- ;; And, for the FORMAT below...
- (*print-level* 2)
- (*print-length* 3)
- (*print-escape* t)
- (*print-gensym* t)
- (*print-pretty* nil)
- (*print-circle* nil)
- (*print-radix* 10)
- (*print-array* nil)
- (il:*print-structure* nil))
- (setq bkmenu
- (il:|create| il:menu
- il:items il:_ (dbg::collect-backtrace-items tty-window skip)
- il:whenselectedfn il:_ 'dbg::backtrace-item-selected
- il:menuoutlinesize il:_ 0
- il:menufont il:_ il:backtracefont
- il:menucolumns il:_ 1
- il:whenheldfn il:_
- #'(il:lambda (item menu button)
- (declare (ignore item menu))
- (case button
- (il:left
- (il:promptprint
- "Open a frame inspector on this stack frame"))
- (il:middle
- (il:promptprint "Inspect/Edit this function"))))))
- (cond ((setq btw
- (dolist (atw (il:attachedwindows tty-window))
- ;; Test for an attached window that has a backtrace menu in
- ;; it.
- (when (and (setq btw (il:windowprop atw 'il:menu))
- (eq (il:|fetch| (il:menu il:whenselectedfn)
- il:|of| (car btw))
- 'dbg::backtrace-item-selected))
- (return atw))))
- ;; If there is alread a backtrace window, delete the old menu from
- ;; it.
- (il:deletemenu (car (il:windowprop btw 'il:menu)) nil btw)
- (il:windowprop btw 'il:extent nil)
- (il:clearw btw))
- ((setq btw
- (il:createw (dbg::region-next-to
- (il:windowprop tty-window 'il:region)
- (il:widthifwindow
- (il:imin (il:|fetch| (il:menu il:imagewidth)
- il:|of| bkmenu)
- il:|MaxBkMenuWidth|))
- (il:|fetch| (il:region il:height)
- il:|of| tty-region)
- :left)))
- ; put bt window at left of TTY
- ; window unless ttywindow is
- ; near left edge.
- (il:attachwindow btw tty-window
- (if (il:igreaterp (il:|fetch| (il:region il:left)
- il:|of|
- (il:windowprop btw
- 'il:region))
- (il:|fetch| (il:region il:left)
- il:|of| tty-region))
- 'il:right
- 'il:left)
- nil
- 'il:localclose)
- ;; So that button clicks will switch the TTY
- (il:windowprop btw 'il:process
- (il:windowprop tty-window 'il:process))))
- (il:addmenu bkmenu btw (il:|create| il:position
- il:xcoord il:_ 0
- il:ycoord il:_ (- (il:windowprop btw 'il:height)
- (il:|fetch| (il:menu
- il:imageheight)
- il:|of| bkmenu))))
- ;; IL:ADDMENU sets up buttoneventfn for window that we don't
- ;; want. We want to catch middle button events before the menu
- ;; handler, so that we can pop up edit/inspect menu for the frame
- ;; currently selected. So replace the buttoneventfn, and can
- ;; nuke the cursorin and cursormoved guys, cause don't need them.
- (il:windowprop btw 'il:buttoneventfn 'dbg::backtrace-menu-buttoneventfn)
- (il:windowprop btw 'il:cursorinfn nil)
- (il:windowprop btw 'il:cursormovedfn nil)))
-
-(defun dbg::collect-backtrace-items (tty-window skip)
- (xcl:with-collection
- ;;
- ;; There are a number of possibilities for the values returned by the
- ;; filter-fn.
- ;;
- ;; (1) INTERESTING-P is false, and the other values are all NIL. This
- ;; is the simple case where the stack frame NEXT-POS should be ignored
- ;; completly, and processing should continue with the next frame.
- ;;
- ;; (2) INTERESTING-P is true, and the other values are all NIL. This
- ;; is the simple case where the stack frame NEXT-POS should appear in
- ;; the backtrace as is, and processing should continue with the next
- ;; frame.
- ;;
- ;; [Note that these two cases take care of old values of the
- ;; filter-fn.]
- ;;
- ;; (3) INTERESTING-P is false, and LAST-FRAME-CONSUMED is a stack
- ;; frame. In that case, ignore all stack frames from NEXT-POS to
- ;; LAST-FRAME-CONSUMED, inclusive.
- ;;
- ;; (4) INTERESTING-P is true, and LAST-FRAME-CONSUMED is a stack
- ;; frame. In this case, the backtrace should include a single entry
- ;; coresponding to the frame USE-FRAME (which defaults to
- ;; LAST-FRAME-CONSUMED), and processing should continue with the next
- ;; frame after LAST-FRAME-CONSUMED. If LABEL is non-NIL, it will be
- ;; the label that appears in the backtrace menu; otherwise the name of
- ;; USE-FRAME will be used (or the form being EVALed if the frame is an
- ;; EVAL frame).
- ;;
- (let* ((filter (cond ((null skip) #'xcl:true)
- ((eq skip t) il:*short-backtrace-filter*)
- (t skip)))
- (top-frame (il:stknth 0 (il:getwindowprop tty-window
- 'dbg::stack-position)))
- (next-frame top-frame)
- (frame-number 0)
- interestingp last-frame-consumed frame-to-use label-to-use)
- (loop (when (null next-frame) (return))
- ;; Get the values of INTERSTINGP, LAST-FRAME-CONSUMED,
- ;; FRAME-TO-USE, and LABEL-TO-USE
- (multiple-value-setq (interestingp last-frame-consumed
- frame-to-use label-to-use)
- (funcall filter next-frame))
- (when (null last-frame-consumed)
- (setf last-frame-consumed next-frame))
- (when interestingp
- (when (null frame-to-use)
- (setf frame-to-use last-frame-consumed))
- (when (null label-to-use)
- (setf label-to-use (il:stkname frame-to-use))
- (if (member label-to-use '(eval il:eval il:apply apply)
- :test 'eq)
- (setf label-to-use (il:stkarg 1 frame-to-use))))
-
- ;; Walk the stack until we find the frame to use
- (loop (cond ((not (typep next-frame 'il:stackp))
- (error "~%Use-frame ~S not found" frame-to-use))
- ((xcl::stack-eql next-frame frame-to-use)
- (return))
- (t (incf frame-number)
- (setf next-frame
- (il:stknth -1 next-frame next-frame)))))
-
- ;; Add the menu item to the list under construction
- (xcl:collect (il:|create| il:bkmenuitem
- il:label il:_ (let ((*print-level* 2)
- (*print-length* 3)
- (*print-escape* t)
- (*print-gensym* t)
- (*print-pretty* nil)
- (*print-circle* nil)
- (*print-radix* 10)
- (*print-array* nil)
- (il:*print-structure* nil))
- (prin1-to-string label-to-use))
- il:bkmenuinfo il:_ frame-number
- il:frame-name il:_ label-to-use)))
-
- ;; Update NEXT-POS
- (loop (cond ((not (typep next-frame 'il:stackp))
- (error "~%Last-frame-consumed ~S not found"
- last-frame-consumed))
- ((prog1
- (xcl::stack-eql next-frame last-frame-consumed)
- (incf frame-number)
- (setf next-frame (il:stknth -1 next-frame
- next-frame)))
- (return))))))))
-
-(defun dbg::backtrace-menu-buttoneventfn (window &aux menu)
- (setq menu (car (il:listp (il:windowprop window 'il:menu))))
- (unless (or (il:lastmousestate il:up) (null menu))
- (il:totopw window)
- (cond ((il:lastmousestate il:middle)
- ;; look for a selected frame in this menu, and then pop up
- ;; the editor invoke menu for that frame. don't change the
- ;; selection, just present the edit menu.
- (let* ((selection (il:menu.handler menu
- (il:windowprop window 'il:dsp)))
- (tty-window (il:windowprop window 'il:mainwindow))
- (last-pos (il:windowprop tty-window 'dbg::lastpos)))
-
- ;; don't have to worry about releasing POS because we
- ;; only look at it here (nobody here hangs on to it)
- ;; and we will be around for less time than LASTPOS.
- ;; The debugger is responsible for releasing LASTPOS.
- (il:inspect/as/function (cond
- ((and selection
- (il:|fetch| (il:bkmenuitem il:frame-name)
- il:|of| (car selection))))
- ((and (symbolp (il:stkname last-pos))
- (il:getd (il:stkname last-pos)))
- (il:stkname last-pos))
- (t 'il:nill))
- last-pos tty-window)))
- (t (let ((selection (il:menu.handler menu
- (il:windowprop window 'il:dsp))))
- (when selection
- (il:doselecteditem menu (car selection) (cdr selection))))))))
-
-;; This function isn't really redefined, but it needs to be recomiled since we
-;; changed the def'n of the BKMENUITEM record.
-
-(defun dbg::backtrace-item-selected (item menu button)
- ;;When a frame name is selected in the backtrace menu, this is the function
- ;;that gets called.
- (declare (special il:brkenv) (ignore button))
- (let* ((frame-spec (il:|fetch| (il:bkmenuitem il:bkmenuinfo) il:|of| item))
- (tty-window (il:windowprop (il:wfrommenu menu) 'il:mainwindow))
- (bkpos (il:windowprop tty-window 'dbg::stack-position))
- (pos (il:stknth (- frame-spec) bkpos)))
- (let ((lp (il:windowprop tty-window 'dbg::lastpos)))
- (and lp (il:stknth 0 pos lp)))
- ;; change the item selected from OLDITEM to ITEM. Only do this on left
- ;; buttons now. Middle just pops up the edit menu, doesn't select. -woz
- (let ((old-item (il:|fetch| (il:menu il:menuuserdata) il:|of| menu)))
- (when old-item (il:menudeselect old-item menu))
- (il:menuselect item menu))
- ;; Change the lexical environment so it is the one in effect as of this
- ;; frame.
- (il:process.eval (il:windowprop tty-window (quote dbg::process))
- `(setq il:brkenv ',(il:find-lexical-environment pos))
- t)
- (let ((frame-window (xcl:with-profile
- (il:process.eval (il:windowprop tty-window
- 'il:process)
- `(let ((profile (xcl:copy-profile
- (xcl:find-profile
- "READ-PRINT"))))
- (setf
- (xcl::profile-entry-value
- 'xcl:*eval-function* profile)
- xcl:*eval-function*)
- (xcl:save-profile profile))
- t)
- (il:inspectw.create pos
- #'(lambda (pos)
- (dbg::stack-frame-properties pos t))
- 'dbg::stack-frame-fetchfn
- 'dbg::stack-frame-storefn
- nil
- 'dbg::stack-frame-value-command
- nil
- (format nil "~S Frame" (il:stkname pos))
- nil (dbg::make-frame-inspect-window
- tty-window)
- 'dbg::stack-frame-property))))
- (when (not (il:windowprop frame-window 'il:mainwindow))
- (il:attachwindow frame-window tty-window
- (if (> (il:|fetch| (il:region il:bottom) il:|of|
- (il:windowprop frame-window 'il:region))
- (il:|fetch| (il:region il:bottom) il:|of|
- (il:windowprop tty-window 'il:region)))
- 'il:top 'il:bottom)
- nil 'il:localclose)
- (il:windowaddprop frame-window 'il:closefn 'il:detachwindow)))))
-
-) ;end of Xerox-Medley
-
-(defun il:select.fns.editor (&optional function)
- ;; gives the user a menu choice of editors.
- (il:menu (il:|create| il:menu
- il:items il:_ (cond ((il:ccodep function)
- '((il:|InspectCode| 'il:inspectcode
- "Shows the compiled code.")
- (il:|DisplayEdit| 'ed
- "Edit it with the display editor")
- (il:|TtyEdit| 'il:ef
- "Edit it with the standard editor")))
- ((il:closure-p function)
- '((il:|Inspect| 'inspect
- "Inspect this object")))
- (t '((il:|DisplayEdit| 'ed
- "Edit it with the display editor")
- (il:|TtyEdit| 'il:ef
- "Edit it with the standard editor"))))
- il:centerflg il:_ t)))
-
-;;
-
-
-;; CLOS specific extensions to the debugger
-
-
-;; There are some new things that act as functions, and that we want to be
-;; able to edit from a backtrace window
-
-(pushnew 'methods xcl::*function-types*)
-
-(eval-when (eval compile load)
- (unless (generic-function-p (symbol-function 'il:inspect/as/function))
- (make-specializable 'il:inspect/as/function)))
-
-(defmethod il:inspect/as/function (name stack-pointer debugger-window)
- ;; Calls an editor on function NAME. STKP and WINDOW are the stack pointer
- ;; and window of the break in which this inspect command was called.
- (declare (ignore debugger-window))
- (let ((editor (il:select.fns.editor name)))
- (case editor
- ((nil)
- ;; No editor chosen, so don't do anything
- nil)
- (il:inspectcode
- ;; Inspect the compiled code
- (let ((frame (xcl::stack-pointer-frame stack-pointer)))
- (if (and (il:stackp stack-pointer)
- (xcl::stack-frame-valid-p frame))
- (il:inspectcode (let ((code-base (xcl::stack-frame-fn-header frame)))
- (cond ((eq (il:\\get-compiled-code-base name)
- code-base)
- name)
- (t
- ;; Function executing in this frame is not
- ;; the one in the definition cell of its
- ;; name, so fetch the real code. Have to
- ;; pass a CCODEP
- (il:make-compiled-closure code-base))))
- nil nil nil (xcl::stack-frame-pc frame))
- (il:inspectcode name))))
- (ed
- ;; Use the standard editor.
- ;; This used to take care to apply the editor in the debugger
- ;; process, so forms evaluated in the editor happen in the
- ;; context of the break. But that doesn't count for much any
- ;; more, now that lexical variables are the way to go. Better to
- ;; use the LEX debugger command (thank you, Herbie) and
- ;; shift-select pieces of code from the editor into the debugger
- ;; window.
- (ed name `(,@xcl::*function-types* :display)))
- (otherwise (funcall editor name)))))
-
-(defmethod il:inspect/as/function ((name standard-object) stkp window)
- (when (il:menu (il:|create| il:menu
- il:items il:_ '(("Inspect" t "Inspect this object"))))
- (inspect name)))
-
-(defmethod il:inspect/as/function ((x standard-method) stkp window)
- (let* ((generic-function-name (slot-value (slot-value x 'generic-function)
- 'name))
- (method-name (full-method-name x))
- (editor (il:select.fns.editor method-name)))
- (il:allow.button.events)
- (case editor
- (ed (ed method-name '(:display methods)))
- (il:inspectcode (il:inspectcode (slot-value x 'function)))
- ((nil) nil)
- (otherwise (funcall editor method-name)))))
-
-;; A replacement for the vanilla IL:INTERESTING-FRAME-P so we can see methods
-;; and generic-functions on the stack.
-
-(defun interesting-frame-p (stack-pos &optional interp-flag)
- ;; Return up to four values: INTERESTING-P LAST-FRAME-CONSUMED USE-FRAME and
- ;; LABEL. See the function IL:COLLECT-BACKTRACE-ITEMS for a full description
- ;; of how these values are used.
- (labels
- ((function-matches-frame-p (function frame)
- "Is the function being called in this frame?"
- (let* ((frame-name (il:stkname frame))
- (code-being-run (cond
- ((typep frame-name 'il:closure)
- frame-name)
- ((and (consp frame-name)
- (eq 'il:\\interpreter
- (xcl::stack-frame-name
- (il:\\stackargptr frame))))
- frame-name)
- (t (xcl::stack-frame-fn-header
- (il:\\stackargptr frame))))))
- (or (eq function code-being-run)
- (and (typep function 'il:compiled-closure)
- (eq (xcl::compiled-closure-fnheader function)
- code-being-run)))))
- (generic-function-from-frame (frame)
- "If this the frame of a generic function return the gf, otherwise
- return NIL."
- ;; Generic functions are implemented as compiled closures. On the
- ;; stack, we only see the fnheader for the the closure. This could
- ;; be a discriminator code, or in the default method only case it
- ;; will be the actual method function. To tell if this is a generic
- ;; function frame, we have to check very carefully to see if the
- ;; right stuff is on the stack. Specifically, the closure's ccode,
- ;; and the first local variable has to be a ptrhunk big enough to be
- ;; a FIN environment, and fin-env-fin of that ptrhunk has to point
- ;; to a generic function whose ccode and environment match.
- (let ((n-args (il:stknargs frame))
- (env nil)
- (gf nil))
- (if (and ;; is there at least one local?
- (> (il:stknargs frame t) n-args)
- ;; and does the local contain something that might be
- ;; the closure environment of a funcallable instance?
- (setf env (il:stkarg (1+ n-args) frame))
- ;; and does the local contain something that might be
- ;; the closure environment of a funcallable instance?
- (typep env *fin-env-type*)
- (setf gf (fin-env-fin env))
- ;; whose fin-env-fin points to a generic function?
- (generic-function-p gf)
- ;; whose environment is the same as env?
- (eq (xcl::compiled-closure-env gf) env)
- ;; and whose code is the same as the code for this
- ;; frame?
- (function-matches-frame-p gf frame))
- gf
- nil))))
- (let ((frame-name (il:stkname stack-pos)))
- ;; See if there is a generic-function on the stack at this
- ;; location.
- (let ((gf (generic-function-from-frame stack-pos)))
- (when gf
- (return-from interesting-frame-p (values t stack-pos stack-pos gf))))
- ;; See if this is an interpreted method. The method body is
- ;; wrapped in a (BLOCK ...). We look for an
- ;; interpreted call to BLOCK whose block-name is the name of
- ;; generic-function.
- (when (and (eq frame-name 'eval)
- (consp (il:stkarg 1 stack-pos))
- (eq (first (il:stkarg 1 stack-pos)) 'block)
- (symbolp (second (il:stkarg 1 stack-pos)))
- (fboundp (second (il:stkarg 1 stack-pos)))
- (generic-function-p
- (symbol-function (second (il:stkarg 1 stack-pos)))))
- (let* ((form (il:stkarg 1 stack-pos))
- (block-name (second form))
- (generic-function (symbol-function block-name))
- (methods (generic-function-methods (symbol-function block-name))))
- ;; If this is really a method being called from a
- ;; generic-function, the g-f should be no more than a
- ;; few(?) frames up the stack. Check for the method call
- ;; by looking for a call to APPLY, where the function
- ;; being applied is the code in one of the methods.
- (do ((i 100 (1- i))
- (previous-pos stack-pos current-pos)
- (current-pos (il:stknth -1 stack-pos) (il:stknth -1 current-pos))
- (found-method nil)
- (method-pos))
- ((or (null current-pos) (<= i 0)) nil)
- (cond ((equalp generic-function
- (generic-function-from-frame current-pos))
- (if found-method
- (return-from interesting-frame-p
- (values t previous-pos method-pos found-method))
- (return)))
- (found-method nil)
- ((eq (il:stkname current-pos) 'apply)
- (dolist (method methods)
- (when (eq (method-function method)
- (il:stkarg 1 current-pos))
- (setq method-pos current-pos)
- (setq found-method method)
- (return))))))))
- ;; Try to handle compiled methods
- (when (and (symbolp frame-name)
- (not (fboundp frame-name))
- (eq (il:chcon1 frame-name)
- (il:charcode il:\())
- (or (string-equal "(method " (symbol-name frame-name)
- :start2 0 :end2 13)
- (string-equal "(method " (symbol-name frame-name)
- :start2 0 :end2 12)
- (string-equal "(method " (symbol-name frame-name)
- :start2 0 :end2 8)))
- ;; Looks like a name that CLOS consed up. See if there is a
- ;; GF nearby up the stack. If there is, use it to help
- ;; determine which method we have.
- (do ((i 30 (1- i))
- (current-pos (il:stknth -1 stack-pos)
- (il:stknth -1 current-pos))
- (gf))
- ((or (null current-pos)
- (<= i 0))
- nil)
- (setq gf (generic-function-from-frame current-pos))
- (when gf
- (dolist (method (generic-function-methods gf))
- (when (function-matches-frame-p (method-function method)
- stack-pos)
- (return-from interesting-frame-p
- (values t stack-pos stack-pos method))))
- (return))))
- ;; If we haven't already returned, use the default method.
- (xcl::interesting-frame-p stack-pos interp-flag))))
-
-
-(setq il:*short-backtrace-filter* 'interesting-frame-p)
-
-;;; Support for undo
-
- (defun undoable-setf-slot-value (object slot-name new-value)
- (if (slot-boundp object slot-name)
- (il:undosave (list 'undoable-setf-slot-value
- object slot-name (slot-value object slot-name)))
- (il:undosave (list 'slot-makunbound object slot-name)))
- (setf (slot-value object slot-name) new-value))
-
- (setf (get 'slot-value :undoable-setf-inverse) 'undoable-setf-slot-value)
-
-
-;;; Support for ?= and friends
-
-;; The arglists for generic-functions are built using gensyms, and don't reflect
-;; any keywords (they are all included in an &REST arg). Rather then use the
-;; arglist in the code, we use the one that CLOS kindly keeps in the generic-function.
-
-(xcl:advise-function 'il:smartarglist
- '(if (and il:explainflg
- (symbolp il:fn)
- (fboundp il:fn)
- (generic-function-p (symbol-function il:fn)))
- (generic-function-pretty-arglist (symbol-function il:fn))
- (xcl:inner))
- :when :around :priority :last)
-
-(setf (get 'defclass 'il:argnames)
- '(nil (class-name (#\{ superclass-name #\} #\*)
- (#\{ slot-specifier #\} #\*)
- #\{ slot-option #\} #\*)))
-
-(setf (get 'defmethod 'il:argnames)
- '(nil (#\{ name #\| (setf name) #\} #\{ method-qualifier #\} #\*
- specialized-lambda-list #\{ declaration #\| doc-string #\} #\*
- #\{ form #\} #\*)))
-
-;;; Prettyprinting support, the result of Harley Davis.
-
-;; Support the standard Prettyprinter. This is really minimal right now. If
-;; anybody wants to fix this, I'd be happy to include their code. In fact,
-;; there is almost no support for Commonlisp in the standard Prettyprinter, so
-;; the field is wide open to hackers with time on their hands.
-
-
-(setf (get 'defmethod :definition-print-template) ;Not quite right, since it
- '(:name :arglist :body)) ; doesn't handle qualifiers,
- ; but it will have to do.
-
-(defun defclass-prettyprint (form)
- (let ((left (il:dspxposition))
- (char-width (il:charwidth (il:charcode x) *standard-output*)))
- (xcl:destructuring-bind (defclass name supers slots . options) form
- (princ "(")
- (prin1 defclass)
- (princ " ")
- (prin1 name)
- (princ " ")
- (if (null supers)
- (princ "()") ;Print "()" instead of "nil"
- (il:sequential.prettyprint (list supers) (il:dspxposition)))
- (if (null slots)
- (progn (il:prinendline (+ left (* 4 char-width)) *standard-output*)
- (princ "()"))
- (il:sequential.prettyprint (list slots) (+ left (* 4 char-width))))
- (when options
- (il:sequential.prettyprint options (+ left (* 2 char-width))))
- (princ ")")
- nil)))
-
-(let ((pprint-macro (assoc 'defclass il:prettyprintmacros)))
- (if (null pprint-macro)
- (push (cons 'defclass 'defclass-prettyprint)
- il:prettyprintmacros)
- (setf (cdr pprint-macro) 'defclass-prettyprint)))
-
-(defun binder-prettyprint (form)
- ;; Prettyprints expressions like MULTIPLE-VALUE-BIND and WITH-SLOTS
- ;; that are of the form (fn (var ...) form &rest body).
- ;; This code is far from correct, but it's better than nothing.
- (if (and (consp form)
- (not (null (cdddr form))))
- ;; I have no idea what I'm doing here. Seems I can copy and edit somebody
- ;; elses code without understanding it.
- (let ((body-indent (+ (il:dspxposition)
- (* 2 (il:charwidth (il:charcode x)
- *standard-output*))))
- (form-indent (+ (il:dspxposition)
- (* 4 (il:charwidth (il:charcode x)
- *standard-output*)))))
- (princ "(")
- (prin1 (first form))
- (princ " ")
- (il:superprint (second form) form nil *standard-output*)
- (il:sequential.prettyprint (list (third form)) form-indent)
- (il:sequential.prettyprint (cdddr form) body-indent)
- (princ ")")
- nil) ;Return NIL to indicate that we did
- ; the printing
- t)) ;Return true to use default printing
-
-
-(dolist (fn '(multiple-value-bind with-accessors with-slots))
- (let ((pprint-macro (assoc fn 'il:prettyprintmacros)))
- (if (null pprint-macro)
- (push (cons fn 'binder-prettyprint)
- il:prettyprintmacros)
- (setf (cdr pprint-macro) 'binder-prettyprint))))
-
-
-
-;; SEdit has its own prettyprinter, so we need to support that too. This is due
-;; to Harley Davis. Really.
-
-(push (cons :slot-spec
- '(((sedit::prev-keyword? (sedit::next-inline? 1 break sedit::from-indent . 1)
- break sedit::from-indent . 0)
- (sedit::set-indent . 1)
- (sedit::next-inline? 1 break sedit::from-indent . 1)
- (sedit::prev-keyword? (sedit::next-inline? 1 break sedit::from-indent . 1)
- break sedit::from-indent . 0))
- ((sedit::prev-keyword? (sedit::next-inline? 1 break sedit::from-indent . 1)
- break sedit::from-indent . 0)
- (sedit::set-indent . 1)
- (sedit::next-inline? 1 break sedit::from-indent . 1)
- (sedit::prev-keyword? (sedit::next-inline? 1 break sedit::from-indent . 1)
- break sedit::from-indent . 0))))
- sedit:*indent-alist*)
-
-(setf (sedit:get-format :slot-spec)
- '(:indent :slot-spec :inline t))
-
-(setf (sedit:get-format :slot-spec-list)
- '(:indent :binding-list :args (:slot-spec) :inline nil))
-
-(setf (sedit:get-format 'defclass)
- '(:indent ((2) 1)
- :args (:keyword nil nil :slot-spec-list nil)
- :sublists (4)))
-
-(setf (sedit:get-format 'defmethod)
- '(:indent ((2))
- :args (:keyword nil :lambda-list nil)
- :sublists (3)))
-
-(setf (sedit:get-format 'defgeneric) 'defun)
-
-(setf (sedit:get-format 'generic-flet) 'flet)
-
-(setf (sedit:get-format 'generic-labels) 'flet)
-
-(setf (sedit:get-format 'call-next-method)
- '(:indent (1) :args (:keyword nil)))
-
-(setf (sedit:get-format 'symbol-macrolet) 'let)
-
-(setf (sedit:get-format 'with-accessors)
- '(:indent ((1) 1)
- :args (:keyword :binding-list nil)
- :sublists (2)
- :miser :never))
-
-(setf (sedit:get-format 'with-slots) 'with-accessors)
-
-(setf (sedit:get-format 'make-instance)
- '(:indent ((1))
- :args (:keyword nil :slot-spec-list)))
-
-(setf (sedit:get-format '*make-instance) 'make-instance)
-
-;;; PrettyFileIndex stuff, the product of Harley Davis.
-
-(defvar *pfi-class-type* '(class defclass pfi-class-namer))
-
-(defvar *pfi-method-type* '(method defmethod pfi-method-namer)
- "Handles method for prettyfileindex")
-
-(defvar *pfi-index-accessors* nil
- "t -> each slot accessor gets a listing in the index.")
-
-(defvar *pfi-method-index* :group
- ":group, :separate, :both, or nil")
-
-(defun pfi-add-class-type ()
- (pushnew *pfi-class-type* il:*pfi-types*))
-
-(defun pfi-add-method-type ()
- (pushnew *pfi-method-type* il:*pfi-types*))
-
-(defun pfi-class-namer (expression entry)
- (let ((class-name (second expression)))
- ;; Following adds all slot readers/writers/accessors as separate entries in
- ;; the index. Probably a mistake.
- (if *pfi-index-accessors*
- (let ((slot-list (fourth expression))
- (accessor-names nil))
- (labels ((add-accessor (method-index name-index)
- (push (case *pfi-method-index*
- (:group method-index)
- (:separate name-index)
- ((t :both) (list method-index name-index))
- ((nil) nil)
- (otherwise (error "Illegal value for *pfi-method-index*: ~S"
- *pfi-method-index*)))
- accessor-names))
- (add-reader (reader-name)
- (add-accessor `(method (,reader-name (,class-name)))
- `(,reader-name (,class-name))))
- (add-writer (writer-name)
- (add-accessor `(method ((setf ,writer-name) (t ,class-name)))
- `((setf ,writer-name) (t ,class-name)))))
- (dolist (slot-def slot-list)
- (do* ((rest-slot-args (cdr slot-def) (cddr rest-slot-args))
- (slot-arg (first rest-slot-args) (first rest-slot-args)))
- ((null rest-slot-args))
- (case slot-arg
- (:reader (add-reader (second rest-slot-args)))
- (:writer (add-writer (second rest-slot-args)))
- (:accessor (add-reader (second rest-slot-args))
- (add-writer (second rest-slot-args)))
- (otherwise nil))))
- (cons `(class (,class-name)) accessor-names)))
- class-name)))
-
-(defun pfi-method-namer (expression entry)
- (let ((method-name (second expression))
- (specializers nil)
- (qualifiers nil)
- lambda-list)
- (do* ((rest-qualifiers (cddr expression) (cdr rest-qualifiers))
- (qualifier (first rest-qualifiers) (first rest-qualifiers)))
- ((listp qualifier) (setq lambda-list qualifier)
- (setq qualifiers (reverse qualifiers)) qualifiers)
- (push qualifier qualifiers))
- (do* ((rest-lambda-list lambda-list (cdr rest-lambda-list))
- (arg (first rest-lambda-list) (first rest-lambda-list)))
- ((or (member arg lambda-list-keywords) (null rest-lambda-list))
- (setq specializers (reverse specializers)))
- (push (if (listp arg) (second arg) t) specializers))
- (let ((method-index `(method (,method-name ,@qualifiers ,specializers)))
- (name-index `(,method-name ,@qualifiers ,specializers)))
- (case *pfi-method-index*
- (:group method-index)
- (:separate name-index)
- ((t :both) (list method-index name-index))
- ((nil) nil)
- (otherwise (error "Illegal value for *pfi-method-index*: ~S" *pfi-method-index*))))))
-
-(defun pfi-install-clos ()
- (pfi-add-method-type)
- (pfi-add-class-type))
-
-(eval-when (eval load)
- (when (boundp (quote il:*pfi-types*))
- (pfi-install-clos))
- )
diff --git a/obsolete/clos/2.0/combin.lisp b/obsolete/clos/2.0/combin.lisp
deleted file mode 100644
index f76ba815..00000000
--- a/obsolete/clos/2.0/combin.lisp
+++ /dev/null
@@ -1,254 +0,0 @@
-;;;-*-Mode:LISP; Package: CLOS; Base:10; Syntax:Common-lisp -*-
-;;;
-;;; *************************************************************************
-;;; Copyright (c) 1991 Venue
-;;; All rights reserved.
-;;; *************************************************************************
-;;;
-
-(in-package 'clos)
-
-(defun make-effective-method-function (generic-function form)
- (flet ((name-function (fn) (set-function-name fn 'a-combined-method) fn))
- (if (and (listp form)
- (eq (car form) 'call-method)
- (method-p (cadr form))
- (every #'method-p (caddr form)))
- ;;
- ;; The effective method is just a call to call-method. This opens up
- ;; the possibility of just using the method function of the method as
- ;; as the effective method function.
- ;;
- ;; But we have to be careful. If that method function will ask for
- ;; the next methods we have to provide them. We do not look to see
- ;; if there are next methods, we look at whether the method function
- ;; asks about them. If it does, we must tell it whether there are
- ;; or aren't to prevent the leaky next methods bug.
- ;;
- (let* ((method-function (method-function (cadr form)))
- (arg-info (gf-arg-info generic-function))
- (metatypes (arg-info-metatypes arg-info))
- (applyp (arg-info-applyp arg-info)))
- (if (not (method-function-needs-next-methods-p method-function))
- method-function
- (let ((next-method-functions (mapcar #'method-function (caddr form))))
- (name-function
- (get-function `(lambda ,(make-dfun-lambda-list metatypes applyp)
- (let ((*next-methods* .next-method-functions.))
- ,(make-dfun-call metatypes applyp '.method-function.)))
- #'default-test-converter ;This could be optimized by making
- ;the interface from here to the
- ;walker more clear so that the
- ;form wouldn't get walked at all.
- #'(lambda (form)
- (if (memq form '(.next-method-functions. .method-function.))
- (values form (list form))
- form))
- #'(lambda (form)
- (cond ((eq form '.next-method-functions.)
- (list next-method-functions))
- ((eq form '.method-function.)
- (list method-function)))))))))
- ;;
- ;; We have some sort of `real' effective method. Go off and get a
- ;; compiled function for it. Most of the real hair here is done by
- ;; the GET-FUNCTION mechanism.
- ;;
- (name-function (make-effective-method-function-internal generic-function form)))))
-
-(defvar *global-effective-method-gensyms* ())
-(defvar *rebound-effective-method-gensyms*)
-
-(defun get-effective-method-gensym ()
- (or (pop *rebound-effective-method-gensyms*)
- (let ((new (make-symbol "EFFECTIVE-METHOD-GENSYM-")))
- (push new *global-effective-method-gensyms*)
- new)))
-
-(eval-when (load)
- (let ((*rebound-effective-method-gensyms* ()))
- (dotimes (i 10) (get-effective-method-gensym))))
-
-(defun make-effective-method-function-internal (generic-function effective-method)
- (let* ((*rebound-effective-method-gensyms* *global-effective-method-gensyms*)
- (arg-info (gf-arg-info generic-function))
- (metatypes (arg-info-metatypes arg-info))
- (applyp (arg-info-applyp arg-info)))
- (labels ((test-converter (form)
- (if (and (consp form) (eq (car form) 'call-method))
- '.call-method.
- (default-test-converter form)))
- (code-converter (form)
- (if (and (consp form) (eq (car form) 'call-method))
- ;;
- ;; We have a `call' to CALL-METHOD. There may or may not be next methods
- ;; and the two cases are a little different. It controls how many gensyms
- ;; we will generate.
- ;;
- (let ((gensyms
- (if (cddr form)
- (list (get-effective-method-gensym)
- (get-effective-method-gensym))
- (list (get-effective-method-gensym)
- ()))))
- (values `(let ((*next-methods* ,(cadr gensyms)))
- ,(make-dfun-call metatypes applyp (car gensyms)))
- gensyms))
- (default-code-converter form)))
- (constant-converter (form)
- (if (and (consp form) (eq (car form) 'call-method))
- (if (cddr form)
- (list (check-for-make-method (cadr form))
- (mapcar #'check-for-make-method (caddr form)))
- (list (check-for-make-method (cadr form))
- ()))
- (default-constant-converter form)))
- (check-for-make-method (effective-method)
- (cond ((method-p effective-method)
- (method-function effective-method))
- ((and (listp effective-method)
- (eq (car effective-method) 'make-method))
- (make-effective-method-function generic-function
- (make-progn (cadr effective-method))))
- (t
- (error "Effective-method form is malformed.")))))
- (get-function `(lambda ,(make-dfun-lambda-list metatypes applyp) ,effective-method)
- #'test-converter
- #'code-converter
- #'constant-converter))))
-
-
-
-(defvar *invalid-method-error*
- #'(lambda (&rest args)
- (declare (ignore args))
- (error
- "INVALID-METHOD-ERROR was called outside the dynamic scope~%~
- of a method combination function (inside the body of~%~
- DEFINE-METHOD-COMBINATION or a method on the generic~%~
- function COMPUTE-EFFECTIVE-METHOD).")))
-
-(defvar *method-combination-error*
- #'(lambda (&rest args)
- (declare (ignore args))
- (error
- "METHOD-COMBINATION-ERROR was called outside the dynamic scope~%~
- of a method combination function (inside the body of~%~
- DEFINE-METHOD-COMBINATION or a method on the generic~%~
- function COMPUTE-EFFECTIVE-METHOD).")))
-
-;(defmethod compute-effective-method :around ;issue with magic
-; ((generic-function generic-function) ;generic functions
-; (method-combination method-combination)
-; applicable-methods)
-; (declare (ignore applicable-methods))
-; (flet ((real-invalid-method-error (method format-string &rest args)
-; (declare (ignore method))
-; (apply #'error format-string args))
-; (real-method-combination-error (format-string &rest args)
-; (apply #'error format-string args)))
-; (let ((*invalid-method-error* #'real-invalid-method-error)
-; (*method-combination-error* #'real-method-combination-error))
-; (call-next-method))))
-
-(defun invalid-method-error (&rest args)
- (declare (arglist method format-string &rest format-arguments))
- (apply *invalid-method-error* args))
-
-(defun method-combination-error (&rest args)
- (declare (arglist format-string &rest format-arguments))
- (apply *method-combination-error* args))
-
-
-
-;;;
-;;; The STANDARD method combination type. This is coded by hand (rather than
-;;; with define-method-combination) for bootstrapping and efficiency reasons.
-;;; Note that the definition of the find-method-combination-method appears in
-;;; the file defcombin.lisp, this is because EQL methods can't appear in the
-;;; bootstrap.
-;;;
-;;; The defclass for the METHOD-COMBINATION and STANDARD-METHOD-COMBINATION
-;;; classes has to appear here for this reason. This code must conform to
-;;; the code in the file defcombin, look there for more details.
-;;;
-
-(defclass method-combination () ())
-
-(define-gf-predicate method-combination-p method-combination)
-
-(defclass standard-method-combination
- (definition-source-mixin method-combination)
- ((type :reader method-combination-type
- :initarg :type)
- (documentation :reader method-combination-documentation
- :initarg :documentation)
- (options :reader method-combination-options
- :initarg :options)))
-
-(defmethod print-object ((mc method-combination) stream)
- (printing-random-thing (mc stream)
- (format stream
- "Method-Combination ~S ~S"
- (method-combination-type mc)
- (method-combination-options mc))))
-
-(eval-when (load eval)
- (setq *standard-method-combination*
- (make-instance 'standard-method-combination
- :type 'standard
- :documentation "The standard method combination."
- :options ())))
-
-;This definition appears in defcombin.lisp.
-;
-;(defmethod find-method-combination ((generic-function generic-function)
-; (type (eql 'standard))
-; options)
-; (when options
-; (method-combination-error
-; "The method combination type STANDARD accepts no options."))
-; *standard-method-combination*)
-
-(defun make-call-methods (methods)
- (mapcar #'(lambda (method) `(call-method ,method ())) methods))
-
-(defmethod compute-effective-method ((generic-function generic-function)
- (combin standard-method-combination)
- applicable-methods)
- (let ((before ())
- (primary ())
- (after ())
- (around ()))
- (dolist (m applicable-methods)
- (let ((qualifiers (method-qualifiers m)))
- (cond ((member ':before qualifiers) (push m before))
- ((member ':after qualifiers) (push m after))
- ((member ':around qualifiers) (push m around))
- (t
- (push m primary)))))
- (setq before (reverse before)
- after (reverse after)
- primary (reverse primary)
- around (reverse around))
- (cond ((null primary)
- `(error "No primary method for the generic function ~S." ',generic-function))
- ((and (null before) (null after) (null around))
- ;;
- ;; By returning a single call-method `form' here we enable an important
- ;; implementation-specific optimization.
- ;;
- `(call-method ,(first primary) ,(rest primary)))
- (t
- (let ((main-effective-method
- (if (or before after (rest primary))
- `(multiple-value-prog1
- (progn ,@(make-call-methods before)
- (call-method ,(first primary) ,(rest primary)))
- ,@(make-call-methods (reverse after)))
- `(call-method ,(first primary) ()))))
- (if around
- `(call-method ,(first around)
- (,@(rest around) (make-method ,main-effective-method)))
- main-effective-method))))))
-
diff --git a/obsolete/clos/2.0/compat.lisp b/obsolete/clos/2.0/compat.lisp
deleted file mode 100644
index ca390f84..00000000
--- a/obsolete/clos/2.0/compat.lisp
+++ /dev/null
@@ -1,11 +0,0 @@
-;;;-*-Mode:LISP; Package: CLOS; Base:10; Syntax:Common-lisp; -*-
-;;;
-;;; *************************************************************************
-;;; Copyright (c) 1991 Venue
-;;; All rights reserved.
-;;; *************************************************************************
-;;;
-
-(in-package 'clos)
-
-()
diff --git a/obsolete/clos/2.0/construct.lisp b/obsolete/clos/2.0/construct.lisp
deleted file mode 100644
index 7d740475..00000000
--- a/obsolete/clos/2.0/construct.lisp
+++ /dev/null
@@ -1,1090 +0,0 @@
-;;;-*-Mode:LISP; Package:(CLOS LISP 1000); Base:10; Syntax:Common-lisp -*-
-;;;
-;;; *************************************************************************
-;;; Copyright (c) 1991 Venue
-;;; All rights reserved.
-;;; *************************************************************************
-;;;
-;;;
-;;; This file defines the defconstructor and other make-instance optimization
-;;; mechanisms.
-;;;
-
-(in-package 'clos)
-
-;;;
-;;; defconstructor is used to define special purpose functions which just
-;;; call make-instance with a symbol as the first argument. The semantics
-;;; of defconstructor is that it is equivalent to defining a function which
-;;; just calls make-instance. The purpose of defconstructor is to provide
-;;; CLOS with a way of noticing these calls to make-instance so that it can
-;;; optimize them. Specific ports of CLOS could just have their compiler
-;;; spot these calls to make-instance and then call this code. Having the
-;;; special defconstructor facility is the best we can do portably.
-;;;
-;;;
-;;; A call to defconstructor like:
-;;;
-;;; (defconstructor make-foo foo (a b &rest r) a a :mumble b baz r)
-;;;
-;;; Is equivalent to a defun like:
-;;;
-;;; (defun make-foo (a b &rest r)
-;;; (make-instance 'foo 'a a ':mumble b 'baz r))
-;;;
-;;; Calls like the following are also legal:
-;;;
-;;; (defconstructor make-foo foo ())
-;;; (defconstructor make-bar bar () :x *x* :y *y*)
-;;; (defconstructor make-baz baz (a b c) a-b (list a b) b-c (list b c))
-;;;
-;;;
-;;; The general idea of this implementation is that the expansion of the
-;;; defconstructor form includes the creation of closure generators which
-;;; can be called to create constructor code for the class. The ways that
-;;; a constructor can be optimized depends not only on the defconstructor
-;;; form, but also on the state of the class and the generic functions in
-;;; the initialization protocol. Because of this, the determination of the
-;;; form of constructor code to be used is a two part process.
-;;;
-;;; At compile time, make-constructor-code-generators looks at the actual
-;;; defconstructor form and makes a list of appropriate constructor code
-;;; generators. All that is really taken into account here is whether
-;;; any initargs are supplied in the call to make-instance, and whether
-;;; any of those are constant.
-;;;
-;;; At constructor code generation time (see note about lazy evaluation)
-;;; compute-constructor-code calls each of the constructor code generators
-;;; to try to get code for this constructor. Each generator looks at the
-;;; state of the class and initialization protocol generic functions and
-;;; decides whether its type of code is appropriate. This depends on things
-;;; like whether there are any applicable methods on initialize-instance,
-;;; whether class slots are affected by initialization etc.
-;;;
-;;;
-;;; Constructor objects are funcallable instances, the protocol followed to
-;;; to compute the constructor code for them is quite similar to the protocol
-;;; followed to compute the discriminator code for a generic function. When
-;;; the constructor is first loaded, we install as its code a function which
-;;; will compute the actual constructor code the first time it is called.
-;;;
-;;; If there is an update to the class structure which might invalidate the
-;;; optimized constructor, the special lazy constructor installer is put back
-;;; so that it can compute the appropriate constructor when it is called.
-;;; This is the same kind of lazy evaluation update strategy used elswhere
-;;; in CLOS.
-;;;
-;;; To allow for flexibility in the CLOS implementation and to allow CLOS users
-;;; to specialize this constructor facility for their own metaclasses, there
-;;; is an internal protocol followed by the code which loads and installs
-;;; the constructors. This is documented in the comments in the code.
-;;;
-;;; This code is also designed so that one of its levels, can be used to
-;;; implement optimization of calls to make-instance which can't go through
-;;; the defconstructor facility. This has not been implemented yet, but the
-;;; hooks are there.
-;;;
-;;;
-
-(defmacro defconstructor
- (name class lambda-list &rest initialization-arguments)
- (expand-defconstructor class
- name
- lambda-list
- (copy-list initialization-arguments)))
-
-(defun expand-defconstructor (class-name name lambda-list supplied-initargs)
- (let ((class (find-class class-name nil))
- (supplied-initarg-names
- (gathering1 (collecting)
- (iterate ((name (*list-elements supplied-initargs :by #'cddr)))
- (gather1 name)))))
- (when (null class)
- (error "defconstructor form being compiled (or evaluated) before~@
- class ~S is defined."
- class-name))
- `(progn
- ;; In order to avoid undefined function warnings, we want to tell
- ;; the compile time environment that a function with this name and
- ;; this argument list has been defined. The portable way to do this
- ;; is with defun.
- (proclaim '(notinline ,name))
- (defun ,name ,lambda-list
- (declare (ignore ,@(specialized-lambda-list-parameters lambda-list)))
- (error "Constructor ~S not loaded." ',name))
-
- ,(make-top-level-form `(defconstructor ,name)
- '(load eval)
- `(load-constructor
- ',class-name
- ',(class-name (class-of class))
- ',name
- ',supplied-initarg-names
- ;; make-constructor-code-generators is called to return a list
- ;; of constructor code generators. The actual interpretation
- ;; of this list is left to compute-constructor-code, but the
- ;; general idea is that it should be an plist where the keys
- ;; name a kind of constructor code and the values are generator
- ;; functions which return the actual constructor code. The
- ;; constructor code is usually a closures over the arguments
- ;; to the generator.
- ,(make-constructor-code-generators class
- name
- lambda-list
- supplied-initarg-names
- supplied-initargs))))))
-
-(defun load-constructor (class-name metaclass-name constructor-name
- supplied-initarg-names code-generators)
- (let ((class (find-class class-name nil)))
- (cond ((null class)
- (error "defconstructor form being loaded (or evaluated) before~@
- class ~S is defined."
- class-name))
- ((neq (class-name (class-of class)) metaclass-name)
- (error "When defconstructor ~S was compiled, the metaclass of the~@
- class ~S was ~S. The metaclass is now ~S.~@
- The constructor must be recompiled."
- constructor-name
- class-name
- metaclass-name
- (class-name (class-of class))))
- (t
- (load-constructor-internal class
- constructor-name
- supplied-initarg-names
- code-generators)
- constructor-name))))
-
-;;;
-;;; The actual constructor objects.
-;;;
-(defclass constructor ()
- ((class ;The class with which this
- :initarg :class ;constructor is associated.
- :reader constructor-class) ;The actual class object,
- ;not the class name.
- ;
- (name ;The name of this constructor.
- :initform nil ;This is the symbol in whose
- :initarg :name ;function cell the constructor
- :reader constructor-name) ;usually sits. Of course, this
- ;is optional. defconstructor
- ;makes named constructors, but
- ;it is possible to manipulate
- ;anonymous constructors also.
- ;
- (code-type ;The type of code currently in
- :initform nil ;use by this constructor. This
- :accessor constructor-code-type) ;is mostly for debugging and
- ;analysis purposes.
- ;The lazy installer sets this
- ;to LAZY. The most basic and
- ;least optimized type of code
- ;is called FALLBACK.
- ;
- (supplied-initarg-names ;The names of the initargs this
- :initarg :supplied-initarg-names ;constructor supplies when it
- :reader ;"calls" make-instance.
- constructor-supplied-initarg-names) ;
- ;
- (code-generators ;Generators for the different
- :initarg :code-generators ;types of code this constructor
- :reader constructor-code-generators)) ;could use.
- (:metaclass funcallable-standard-class))
-
-
-;;;
-;;; Because the value in the code-type slot should always correspond to the
-;;; funcallable-instance-function of the constructor, this function should
-;;; always be used to set the both at the same time.
-;;;
-(defun set-constructor-code (constructor code type)
- (set-funcallable-instance-function constructor code)
- (set-function-name constructor (constructor-name constructor))
- (setf (constructor-code-type constructor) type))
-
-
-(defmethod print-object ((constructor constructor) stream)
- (printing-random-thing (constructor stream)
- (format stream
- "~S ~S (~S)"
- (or (class-name (class-of constructor)) "Constructor")
- (or (constructor-name constructor) "Anonymous")
- (constructor-code-type constructor))))
-
-(defmethod describe-object ((constructor constructor) stream)
- (format stream
- "~S is a constructor for the class ~S.~%~
- The current code type is ~S.~%~
- Other possible code types are ~S."
- constructor (constructor-class constructor)
- (constructor-code-type constructor)
- (gathering1 (collecting)
- (doplist (key val) (constructor-code-generators constructor)
- (gather1 key)))))
-
-;;;
-;;; I am not in a hairy enough mood to make this implementation be metacircular
-;;; enough that it can support a defconstructor for constructor objects.
-;;;
-(defun make-constructor (class name supplied-initarg-names code-generators)
- (make-instance 'constructor
- :class class
- :name name
- :supplied-initarg-names supplied-initarg-names
- :code-generators code-generators))
-
-; This definition actually appears in std-class.lisp.
-;(defmethod class-constructors ((class std-class))
-; (with-slots (plist) class (getf plist 'constructors)))
-
-(defmethod add-constructor ((class std-class)
- (constructor constructor))
- (with-slots (plist) class
- (pushnew constructor (getf plist 'constructors))))
-
-(defmethod remove-constructor ((class std-class)
- (constructor constructor))
- (with-slots (plist) class
- (setf (getf plist 'constructors)
- (delete constructor (getf plist 'constructors)))))
-
-(defmethod get-constructor ((class std-class) name &optional (error-p t))
- (or (dolist (c (class-constructors class))
- (when (eq (constructor-name c) name) (return c)))
- (if error-p
- (error "Couldn't find a constructor with name ~S for class ~S."
- name class)
- ())))
-
-;;;
-;;; This is called to actually load a defconstructor constructor. It must
-;;; install the lazy installer in the function cell of the constructor name,
-;;; and also add this constructor to the list of constructors the class has.
-;;;
-(defmethod load-constructor-internal
- ((class std-class) name initargs generators)
- (let ((constructor (make-constructor class name initargs generators))
- (old (get-constructor class name nil)))
- (when old (remove-constructor class old))
- (install-lazy-constructor-installer constructor)
- (add-constructor class constructor)
- (setf (symbol-function name) constructor)))
-
-(defmethod install-lazy-constructor-installer ((constructor constructor))
- (let ((class (constructor-class constructor)))
- (set-constructor-code constructor
- #'(lambda (&rest args)
- (multiple-value-bind (code type)
- (compute-constructor-code class constructor)
- (prog1 (apply code args)
- (set-constructor-code constructor
- code
- type))))
- 'lazy)))
-
-;;;
-;;; The interface to keeping the constructors updated.
-;;;
-;;; add-method and remove-method (for standard-generic-function and -method),
-;;; promise to call maybe-update-constructors on the generic function and
-;;; the method.
-;;;
-;;; The class update code promises to call update-constructors whenever the
-;;; class is changed. That is, whenever the supers, slots or options change.
-;;; If user defined classes of constructor needs to be updated in more than
-;;; these circumstances, they should use the dependent updating mechanism to
-;;; make sure update-constructors is called.
-;;;
-;;; Bootstrapping concerns force the definitions of maybe-update-constructors
-;;; and update-constructors to be in the file std-class. For clarity, they
-;;; also appear below. Be sure to keep the definition here and there in sync.
-;;;
-;(defvar *initialization-generic-functions*
-; (list #'make-instance
-; #'default-initargs
-; #'allocate-instance
-; #'initialize-instance
-; #'shared-initialize))
-;
-;(defmethod maybe-update-constructors
-; ((generic-function generic-function)
-; (method method))
-; (when (memq generic-function *initialization-generic-functions*)
-; (labels ((recurse (class)
-; (update-constructors class)
-; (dolist (subclass (class-direct-subclasses class))
-; (recurse subclass))))
-; (when (classp (car (method-specializers method)))
-; (recurse (car (method-specializers method)))))))
-;
-;(defmethod update-constructors ((class std-class))
-; (dolist (cons (class-constructors class))
-; (install-lazy-constructor-installer cons)))
-;
-;(defmethod update-constructors ((class class))
-; ())
-
-
-
-;;;
-;;; Here is the actual smarts for making the code generators and then trying
-;;; each generator to get constructor code. This extensible mechanism allows
-;;; new kinds of constructor code types to be added. A programmer defining a
-;;; specialization of the constructor class can either use this mechanism to
-;;; define new code types, or can override this mechanism by overriding the
-;;; methods on make-constructor-code-generators and compute-constructor-code.
-;;;
-;;; The function defined by define-constructor-code-type will receive the
-;;; class object, and the 4 original arguments to defconstructor. It can
-;;; return a constructor code generator, or return nil if this type of code
-;;; is determined to not be appropriate after looking at the defconstructor
-;;; arguments.
-;;;
-;;; When compute-constructor-code is called, it first performs basic checks
-;;; to make sure that the basic assumptions common to all the code types are
-;;; valid. (For details see method definition). If any of the tests fail,
-;;; the fallback constructor code type is used. If none of the tests fail,
-;;; the constructor code generators are called in order. They receive 5
-;;; arguments:
-;;;
-;;; CLASS the class the constructor is making instances of
-;;; WRAPPER that class's wrapper
-;;; DEFAULTS the result of calling class-default-initargs on class
-;;; INITIALIZE the applicable methods on initialize-instance
-;;; SHARED the applicable methosd on shared-initialize
-;;;
-;;; The first code generator to return code is used. The code generators are
-;;; called in reverse order of definition, so define-constructor-code-type
-;;; forms which define better code should appear after ones that define less
-;;; good code. The fallback code type appears first. Note that redefining a
-;;; code type does not change its position in the list. To do that, define
-;;; a new type at the end with the behavior.
-;;;
-
-(defvar *constructor-code-types* ())
-
-(defmacro define-constructor-code-type (type arglist &body body)
- (let ((fn-name (intern (format nil
- "CONSTRUCTOR-CODE-GENERATOR ~A ~A"
- (package-name (symbol-package type))
- (symbol-name type))
- *the-clos-package*)))
- `(progn
- (defun ,fn-name ,arglist .,body)
- (load-define-constructor-code-type ',type ',fn-name))))
-
-(defun load-define-constructor-code-type (type generator)
- (let ((old-entry (assq type *constructor-code-types*)))
- (if old-entry
- (setf (cadr old-entry) generator)
- (push (list type generator) *constructor-code-types*))
- type))
-
-(defmethod make-constructor-code-generators
- ((class std-class)
- name lambda-list supplied-initarg-names supplied-initargs)
- (cons 'list
- (gathering1 (collecting)
- (dolist (entry *constructor-code-types*)
- (let ((generator
- (funcall (cadr entry) class name lambda-list
- supplied-initarg-names
- supplied-initargs)))
- (when generator
- (gather1 `',(car entry))
- (gather1 generator)))))))
-
-(defmethod compute-constructor-code ((class std-class)
- (constructor constructor))
- (let* ((proto (class-prototype class))
- (wrapper (class-wrapper class))
- (defaults (class-default-initargs class))
- (make
- (compute-applicable-methods #'make-instance (list class)))
- (supplied-initarg-names
- (constructor-supplied-initarg-names constructor))
- (default
- (compute-applicable-methods #'default-initargs
- (list class supplied-initarg-names))) ;?
- (allocate
- (compute-applicable-methods #'allocate-instance (list class)))
- (initialize
- (compute-applicable-methods #'initialize-instance (list proto)))
- (shared
- (compute-applicable-methods #'shared-initialize (list proto t)))
- (code-generators
- (constructor-code-generators constructor))
- (code-generators
- (constructor-code-generators constructor)))
- (flet ((call-code-generator (generator)
- (when (null generator)
- (unless (setq generator (getf code-generators 'fallback))
- (error "No FALLBACK generator?")))
- (funcall generator class wrapper defaults initialize shared)))
- (if (or (cdr make)
- (cdr default)
- (cdr allocate)
- (check-initargs class
- supplied-initarg-names
- defaults
- (append initialize shared)))
- ;; These are basic shared assumptions, if one of the
- ;; has been violated, we have to resort to the fallback
- ;; case. Any of these assumptions could be moved out
- ;; of here and into the individual code types if there
- ;; was a need to do so.
- (values (call-code-generator nil) 'fallback)
- ;; Otherwise try all the generators until one produces
- ;; code for us.
- (doplist (type generator) code-generators
- (let ((code (call-code-generator generator)))
- (when code (return (values code type)))))))))
-
-;;;
-;;; The facilities are useful for debugging, and to measure the performance
-;;; boost from constructors.
-;;;
-
-(defun map-constructors (fn)
- (let ((nclasses 0)
- (nconstructors 0))
- (labels ((recurse (class)
- (incf nclasses)
- (dolist (constructor (class-constructors class))
- (incf nconstructors)
- (funcall fn constructor))
- (dolist (subclass (class-direct-subclasses class))
- (recurse subclass))))
- (recurse (find-class 't))
- (values nclasses nconstructors))))
-
-(defun reset-constructors ()
- (multiple-value-bind (nclass ncons)
- (map-constructors #'install-lazy-constructor-installer )
- (format t "~&~D classes, ~D constructors." nclass ncons)))
-
-(defun disable-constructors ()
- (multiple-value-bind (nclass ncons)
- (map-constructors
- #'(lambda (c)
- (let ((gen (getf (constructor-code-generators c) 'fallback)))
- (if (null gen)
- (error "No fallback constructor for ~S." c)
- (set-constructor-code c
- (funcall gen
- (constructor-class c)
- () () () ())
- 'fallback)))))
- (format t "~&~D classes, ~D constructors." nclass ncons)))
-
-(defun enable-constructors ()
- (reset-constructors))
-
-
-;;;
-;;; Helper functions and utilities that are shared by all of the code types
-;;; and by the main compute-constructor-code method as well.
-;;;
-
-(defvar *standard-initialize-instance-method*
- (get-method #'initialize-instance
- ()
- (list *the-class-standard-object*)))
-
-(defvar *standard-shared-initialize-method*
- (get-method #'shared-initialize
- ()
- (list *the-class-standard-object* *the-class-t*)))
-
-(defun non-clos-initialize-instance-methods-p (methods)
- (notevery #'(lambda (m) (eq m *standard-initialize-instance-method*))
- methods))
-
-(defun non-clos-shared-initialize-methods-p (methods)
- (notevery #'(lambda (m) (eq m *standard-shared-initialize-method*))
- methods))
-
-(defun non-clos-or-after-initialize-instance-methods-p (methods)
- (notevery #'(lambda (m) (or (eq m *standard-initialize-instance-method*)
- (equal '(:after) (method-qualifiers m))))
- methods))
-
-(defun non-clos-or-after-shared-initialize-methods-p (methods)
- (notevery #'(lambda (m) (or (eq m *standard-shared-initialize-method*)
- (equal '(:after) (method-qualifiers m))))
- methods))
-
-
-;;;
-;;; if initargs are valid return nil, otherwise return t.
-;;;
-(defun check-initargs (class supplied-initarg-names defaults methods)
- (let ((legal (apply #'append
- (mapcar #'slotd-initargs (class-slots class)))))
- ;; Add to the set of slot-filling initargs the set of
- ;; initargs that are accepted by the methods. If at
- ;; any point we come across &allow-other-keys, we can
- ;; just quit.
- (dolist (method methods)
- (multiple-value-bind (keys allow-other-keys)
- (function-keywords method)
- (when allow-other-keys
- (return-from check-initargs nil))
- (setq legal (append keys legal))))
- ;; Now check the supplied-initarg-names and the default initargs
- ;; against the total set that we know are legal.
- (dolist (key supplied-initarg-names)
- (unless (memq key legal)
- (return-from check-initargs t)))
- (dolist (default defaults)
- (unless (memq (car default) legal)
- (return-from check-initargs t)))))
-
-
-;;;
-;;; This returns two values. The first is a vector which can be used as the
-;;; initial value of the slots vector for the instance. The first is a symbol
-;;; describing the initforms this class has.
-;;;
-;;; If the first value is:
-;;;
-;;; :unsupplied no slot has an initform
-;;; :constants all slots have either a constant initform
-;;; or no initform at all
-;;; t there is at least one non-constant initform
-;;;
-(defun compute-constant-vector (class)
- (declare (values constants flag))
- (let* ((wrapper (class-wrapper class))
- (layout (wrapper-instance-slots-layout wrapper))
- (flag :unsupplied)
- (constants ()))
- (dolist (slotd (class-slots class))
- (let ((name (slotd-name slotd))
- (initform (slotd-initform slotd))
- (initfn (slotd-initfunction slotd)))
- (cond ((null (memq name layout)))
- ((or (eq initform *slotd-unsupplied*)
- (null initfn))
- (push (cons name *slot-unbound*) constants))
- ((constantp initform)
- (push (cons name (eval initform)) constants)
- (when (eq flag ':unsupplied) (setq flag ':constants)))
- (t
- (push (cons name *slot-unbound*) constants)
- (setq flag 't)))))
- (values
- (apply #'vector
- (mapcar #'cdr
- (sort constants #'(lambda (x y)
- (memq (car y)
- (memq (car x) layout))))))
- flag)))
-
-(defmacro copy-constant-vector (constants)
- `(copy-seq (the simple-vector ,constants)))
-
-
-;;;
-;;; This takes a class and a list of initarg-names, and returns an alist
-;;; indicating the positions of the slots those initargs may fill. The
-;;; order of the initarg-names argument is important of course, since we
-;;; have to respect the rules about the leftmost initarg that fills a slot
-;;; having precedence. This function allows initarg names to appear twice
-;;; in the list, it only considers the first appearance.
-;;;
-(defun compute-initarg-positions (class initarg-names)
- (let* ((layout (wrapper-instance-slots-layout (class-wrapper class)))
- (positions
- (gathering1 (collecting)
- (iterate ((slot-name (list-elements layout))
- (position (interval :from 0)))
- (gather1 (cons slot-name position)))))
- (slot-initargs
- (mapcar #'(lambda (slotd)
- (list (slotd-initargs slotd)
- (or (cdr (assq (slotd-name slotd) positions))
- ':class)))
- (class-slots class))))
- ;; Go through each of the initargs, and figure out what position
- ;; it fills by replacing the entries in slot-initargs it fills.
- (dolist (initarg initarg-names)
- (dolist (slot-entry slot-initargs)
- (let ((slot-initargs (car slot-entry)))
- (when (and (listp slot-initargs)
- (not (null slot-initargs))
- (memq initarg slot-initargs))
- (setf (car slot-entry) initarg)))))
- (gathering1 (collecting)
- (dolist (initarg initarg-names)
- (let ((positions (gathering1 (collecting)
- (dolist (slot-entry slot-initargs)
- (when (eq (car slot-entry) initarg)
- (gather1 (cadr slot-entry)))))))
- (when positions
- (gather1 (cons initarg positions))))))))
-
-
-;;;
-;;; The FALLBACK case allows anything. This always works, and always appears
-;;; as the last of the generators for a constructor. It does a full call to
-;;; make-instance.
-;;;
-
-(define-constructor-code-type fallback
- (class name arglist supplied-initarg-names supplied-initargs)
- (declare (ignore name supplied-initarg-names))
- `(function
- (lambda (&rest ignore)
- (declare (ignore ignore))
- (function
- (lambda ,arglist
- (make-instance
- ',(class-name class)
- ,@(gathering1 (collecting)
- (iterate ((tail (*list-tails supplied-initargs :by #'cddr)))
- (gather1 `',(car tail))
- (gather1 (cadr tail))))))))))
-
-;;;
-;;; The GENERAL case allows:
-;;; constant, unsupplied or non-constant initforms
-;;; constant or non-constant default initargs
-;;; supplied initargs
-;;; slot-filling initargs
-;;; :after methods on shared-initialize and initialize-instance
-;;;
-(define-constructor-code-type general
- (class name arglist supplied-initarg-names supplied-initargs)
- (declare (ignore name))
- (let ((raw-allocator (raw-instance-allocator class))
- (slots-fetcher (slots-fetcher class))
- (wrapper-fetcher (wrapper-fetcher class)))
- `(function
- (lambda (class .wrapper. defaults init shared)
- (multiple-value-bind (.constants.
- .constant-initargs.
- .initfns-initargs-and-positions.
- .supplied-initarg-positions.
- .shared-initfns.
- .initfns.)
- (general-generator-internal class
- defaults
- init
- shared
- ',supplied-initarg-names
- ',supplied-initargs)
- .supplied-initarg-positions.
- (when (and .constants.
- (null (non-clos-or-after-initialize-instance-methods-p
- init))
- (null (non-clos-or-after-shared-initialize-methods-p
- shared)))
- (function
- (lambda ,arglist
- (declare (optimize (speed 3) (safety 0)))
- (let ((.instance. (,raw-allocator))
- (.slots. (copy-constant-vector .constants.))
- (.positions. .supplied-initarg-positions.)
- (.initargs. .constant-initargs.))
- .positions.
-
- (setf (,slots-fetcher .instance.) .slots.)
- (setf (,wrapper-fetcher .instance.) .wrapper.)
-
- (dolist (entry .initfns-initargs-and-positions.)
- (let ((val (funcall (car entry)))
- (initarg (cadr entry)))
- (when initarg
- (push val .initargs.)
- (push initarg .initargs.))
- (dolist (pos (cddr entry))
- (setf (%svref .slots. pos) val))))
-
- ,@(gathering1 (collecting)
- (doplist (initarg value) supplied-initargs
- (unless (constantp value)
- (gather1 `(let ((.value. ,value))
- (push .value. .initargs.)
- (push ',initarg .initargs.)
- (dolist (.p. (pop .positions.))
- (setf (%svref .slots. .p.)
- .value.)))))))
-
- (dolist (fn .shared-initfns.)
- (apply fn .instance. t .initargs.))
- (dolist (fn .initfns.)
- (apply fn .instance. .initargs.))
-
- .instance.)))))))))
-
-(defun general-generator-internal
- (class defaults init shared supplied-initarg-names supplied-initargs)
- (flet ((bail-out () (return-from general-generator-internal nil)))
- (let* ((constants (compute-constant-vector class))
- (layout (wrapper-instance-slots-layout (class-wrapper class)))
- (initarg-positions
- (compute-initarg-positions class
- (append supplied-initarg-names
- (mapcar #'car defaults))))
- (initfns-initargs-and-positions ())
- (supplied-initarg-positions ())
- (constant-initargs ())
- (used-positions ()))
-
- ;;
- ;; Go through each of the supplied initargs for three reasons.
- ;;
- ;; - If it fills a class slot, bail out.
- ;; - If its a constant form, fill the constant vector.
- ;; - Otherwise remember the positions no two initargs
- ;; will try to fill the same position, since compute
- ;; initarg positions already took care of that, but
- ;; we do need to know what initforms will and won't
- ;; be needed.
- ;;
- (doplist (initarg val) supplied-initargs
- (let ((positions (cdr (assq initarg initarg-positions))))
- (cond ((memq :class positions) (bail-out))
- ((constantp val)
- (setq val (eval val))
- (push val constant-initargs)
- (push initarg constant-initargs)
- (dolist (pos positions) (setf (svref constants pos) val)))
- (t
- (push positions supplied-initarg-positions)))
- (setq used-positions (append positions used-positions))))
- ;;
- ;; Go through each of the default initargs, for three reasons.
- ;;
- ;; - If it fills a class slot, bail out.
- ;; - If it is a constant, and it does fill a slot, put that
- ;; into the constant vector.
- ;; - If it isn't a constant, record its initfn and position.
- ;;
- (dolist (default defaults)
- (let* ((name (car default))
- (initfn (cadr default))
- (form (caddr default))
- (value ())
- (positions (cdr (assq name initarg-positions))))
- (unless (memq name supplied-initarg-names)
- (cond ((memq :class positions) (bail-out))
- ((constantp form)
- (setq value (eval form))
- (push value constant-initargs)
- (push name constant-initargs)
- (dolist (pos positions)
- (setf (svref constants pos) value)))
- (t
- (push (list* initfn name positions)
- initfns-initargs-and-positions)))
- (setq used-positions (append positions used-positions)))))
- ;;
- ;; Go through each of the slot initforms:
- ;;
- ;; - If its position has already been filled, do nothing.
- ;; The initfn won't need to be called, and the slot won't
- ;; need to be touched.
- ;; - If it is a class slot, and has an initform, bail out.
- ;; - If its a constant or unsupplied, ignore it, it is
- ;; already in the constant vector.
- ;; - Otherwise, record its initfn and position
- ;;
- (dolist (slotd (class-slots class))
- (let* ((alloc (slotd-allocation slotd))
- (name (slotd-name slotd))
- (form (slotd-initform slotd))
- (initfn (slotd-initfunction slotd))
- (position (position name layout)))
- (cond ((neq alloc :instance)
- (unless (or (eq form *slotd-unsupplied*)
- (null initfn))
- (bail-out)))
- ((member position used-positions))
- ((or (constantp form)
- (eq form *slotd-unsupplied*)))
- (t
- (push (list initfn nil position)
- initfns-initargs-and-positions)))))
-
- (values constants
- constant-initargs
- (nreverse initfns-initargs-and-positions)
- (nreverse supplied-initarg-positions)
- (mapcar #'method-function
- (remove *standard-shared-initialize-method* shared))
- (mapcar #'method-function
- (remove *standard-initialize-instance-method* init))))))
-
-
-;;;
-;;; The NO-METHODS case allows:
-;;; constant, unsupplied or non-constant initforms
-;;; constant or non-constant default initargs
-;;; supplied initargs that are arguments to constructor, or constants
-;;; slot-filling initargs
-;;;
-
-(define-constructor-code-type no-methods
- (class name arglist supplied-initarg-names supplied-initargs)
- (declare (ignore name))
- (let ((raw-allocator (raw-instance-allocator class))
- (slots-fetcher (slots-fetcher class))
- (wrapper-fetcher (wrapper-fetcher class)))
- `(function
- (lambda (class .wrapper. defaults init shared)
- (multiple-value-bind (.constants.
- .initfns-and-positions.
- .supplied-initarg-positions.)
- (no-methods-generator-internal class
- defaults
- ',supplied-initarg-names
- ',supplied-initargs)
- .initfns-and-positions.
- .supplied-initarg-positions.
- (when (and .constants.
- (null (non-clos-initialize-instance-methods-p init))
- (null (non-clos-shared-initialize-methods-p shared)))
- #'(lambda ,arglist
- (declare (optimize (speed 3) (safety 0)))
- (let ((.instance. (,raw-allocator))
- (.slots. (copy-constant-vector .constants.))
- (.positions. .supplied-initarg-positions.))
- .positions.
- (setf (,slots-fetcher .instance.) .slots.)
- (setf (,wrapper-fetcher .instance.) .wrapper.)
-
- (dolist (entry .initfns-and-positions.)
- (let ((val (funcall (car entry))))
- (dolist (pos (cdr entry))
- (setf (%svref .slots. pos) val))))
-
- ,@(gathering1 (collecting)
- (doplist (initarg value) supplied-initargs
- (unless (constantp value)
- (gather1
- `(let ((.value. ,value))
- (dolist (.p. (pop .positions.))
- (setf (%svref .slots. .p.) .value.)))))))
-
- .instance.))))))))
-
-(defun no-methods-generator-internal
- (class defaults supplied-initarg-names supplied-initargs)
- (flet ((bail-out () (return-from no-methods-generator-internal nil)))
- (let* ((constants (compute-constant-vector class))
- (layout (wrapper-instance-slots-layout (class-wrapper class)))
- (initarg-positions
- (compute-initarg-positions class
- (append supplied-initarg-names
- (mapcar #'car defaults))))
- (initfns-and-positions ())
- (supplied-initarg-positions ())
- (used-positions ()))
- ;;
- ;; Go through each of the supplied initargs for three reasons.
- ;;
- ;; - If it fills a class slot, bail out.
- ;; - If its a constant form, fill the constant vector.
- ;; - Otherwise remember the positions, no two initargs
- ;; will try to fill the same position, since compute
- ;; initarg positions already took care of that, but
- ;; we do need to know what initforms will and won't
- ;; be needed.
- ;;
- (doplist (initarg val) supplied-initargs
- (let ((positions (cdr (assq initarg initarg-positions))))
- (cond ((memq :class positions) (bail-out))
- ((constantp val)
- (setq val (eval val))
- (dolist (pos positions)
- (setf (svref constants pos) val)))
- (t
- (push positions supplied-initarg-positions)))
- (setq used-positions (append positions used-positions))))
- ;;
- ;; Go through each of the default initargs, for three reasons.
- ;;
- ;; - If it fills a class slot, bail out.
- ;; - If it is a constant, and it does fill a slot, put that
- ;; into the constant vector.
- ;; - If it isn't a constant, record its initfn and position.
- ;;
- (dolist (default defaults)
- (let* ((name (car default))
- (initfn (cadr default))
- (form (caddr default))
- (value ())
- (positions (cdr (assq name initarg-positions))))
- (unless (memq name supplied-initarg-names)
- (cond ((memq :class positions) (bail-out))
- ((constantp form)
- (setq value (eval form))
- (dolist (pos positions)
- (setf (svref constants pos) value)))
- (t
- (push (cons initfn positions)
- initfns-and-positions)))
- (setq used-positions (append positions used-positions)))))
- ;;
- ;; Go through each of the slot initforms:
- ;;
- ;; - If its position has already been filled, do nothing.
- ;; The initfn won't need to be called, and the slot won't
- ;; need to be touched.
- ;; - If it is a class slot, and has an initform, bail out.
- ;; - If its a constant or unsupplied, do nothing, we know
- ;; that it is already in the constant vector.
- ;; - Otherwise, record its initfn and position
- ;;
- (dolist (slotd (class-slots class))
- (let* ((alloc (slotd-allocation slotd))
- (name (slotd-name slotd))
- (form (slotd-initform slotd))
- (initfn (slotd-initfunction slotd))
- (position (position name layout)))
- (cond ((neq alloc :instance)
- (unless (or (eq form *slotd-unsupplied*)
- (null initfn))
- (bail-out)))
- ((member position used-positions))
- ((or (constantp form)
- (eq form *slotd-unsupplied*)))
- (t
- (push (list initfn position) initfns-and-positions)))))
-
- (values constants
- (nreverse initfns-and-positions)
- (nreverse supplied-initarg-positions)))))
-
-
-;;;
-;;; The SIMPLE-SLOTS case allows:
-;;; constant or unsupplied initforms
-;;; constant default initargs
-;;; supplied initargs
-;;; slot filling initargs
-;;;
-
-(define-constructor-code-type simple-slots
- (class name arglist supplied-initarg-names supplied-initargs)
- (declare (ignore name))
- (let ((raw-allocator (raw-instance-allocator class))
- (slots-fetcher (slots-fetcher class))
- (wrapper-fetcher (wrapper-fetcher class)))
- `(function
- (lambda (class .wrapper. defaults init shared)
- (when (and (null (non-clos-initialize-instance-methods-p init))
- (null (non-clos-shared-initialize-methods-p shared)))
- (multiple-value-bind (.constants. .supplied-initarg-positions.)
- (simple-slots-generator-internal class
- defaults
- ',supplied-initarg-names
- ',supplied-initargs)
- (when .constants.
- (function
- (lambda ,arglist
- (declare (optimize (speed 3) (safety 0)))
- (let ((.instance. (,raw-allocator))
- (.slots. (copy-constant-vector .constants.))
- (.positions. .supplied-initarg-positions.))
-
- .positions.
- (setf (,slots-fetcher .instance.) .slots.)
- (setf (,wrapper-fetcher .instance.) .wrapper.)
-
- ,@(gathering1 (collecting)
- (doplist (initarg value) supplied-initargs
- (unless (constantp value)
- (gather1
- `(let ((.value. ,value))
- (dolist (.p. (pop .positions.))
- (setf (%svref .slots. .p.) .value.)))))))
-
- .instance.))))))))))
-
-(defun simple-slots-generator-internal
- (class defaults supplied-initarg-names supplied-initargs)
- (flet ((bail-out () (return-from simple-slots-generator-internal nil)))
- (let* ((constants (compute-constant-vector class))
- (layout (wrapper-instance-slots-layout (class-wrapper class)))
- (initarg-positions
- (compute-initarg-positions class
- (append supplied-initarg-names
- (mapcar #'car defaults))))
- (supplied-initarg-positions ())
- (used-positions ()))
- ;;
- ;; Go through each of the supplied initargs for three reasons.
- ;;
- ;; - If it fills a class slot, bail out.
- ;; - If its a constant form, fill the constant vector.
- ;; - Otherwise remember the positions, no two initargs
- ;; will try to fill the same position, since compute
- ;; initarg positions already took care of that, but
- ;; we do need to know what initforms will and won't
- ;; be needed.
- ;;
- (doplist (initarg val) supplied-initargs
- (let ((positions (cdr (assq initarg initarg-positions))))
- (cond ((memq :class positions) (bail-out))
- ((constantp val)
- (setq val (eval val))
- (dolist (pos positions)
- (setf (svref constants pos) val)))
- (t
- (push positions supplied-initarg-positions)))
- (setq used-positions (append used-positions positions))))
- ;;
- ;; Go through each of the default initargs for three reasons.
- ;;
- ;; - If it isn't a constant form, bail out.
- ;; - If it fills a class slot, bail out.
- ;; - If it is a constant, and it does fill a slot, put that
- ;; into the constant vector.
- ;;
- (dolist (default defaults)
- (let* ((name (car default))
- (form (caddr default))
- (value ())
- (positions (cdr (assq name initarg-positions))))
- (unless (memq name supplied-initarg-names)
- (cond ((memq :class positions) (bail-out))
- ((not (constantp form))
- (bail-out))
- (t
- (setq value (eval form))
- (dolist (pos positions)
- (setf (svref constants pos) value)))))))
- ;;
- ;; Go through each of the slot initforms:
- ;;
- ;; - If its position has already been filled, do nothing.
- ;; The initfn won't need to be called, and the slot won't
- ;; need to be touched, we are OK.
- ;; - If it has a non-constant initform, bail-out. This
- ;; case doesn't handle those.
- ;; - If it has a constant or unsupplied initform we don't
- ;; really need to do anything, the value is in the
- ;; constants vector.
- ;;
- (dolist (slotd (class-slots class))
- (let* ((alloc (slotd-allocation slotd))
- (name (slotd-name slotd))
- (form (slotd-initform slotd))
- (initfn (slotd-initfunction slotd))
- (position (position name layout)))
- (cond ((neq alloc :instance)
- (unless (or (eq form *slotd-unsupplied*)
- (null initfn))
- (bail-out)))
- ((member position used-positions))
- ((or (constantp form)
- (eq form *slotd-unsupplied*)))
- (t
- (bail-out)))))
-
- (values constants (nreverse supplied-initarg-positions)))))
diff --git a/obsolete/clos/2.0/cpl.lisp b/obsolete/clos/2.0/cpl.lisp
deleted file mode 100644
index 9eda3018..00000000
--- a/obsolete/clos/2.0/cpl.lisp
+++ /dev/null
@@ -1,271 +0,0 @@
-;;;-*- Package: CLOS; Syntax: Common-Lisp; Base: 10 -*-
-;;;. Copyright (c) 1991 by Venue
-
-
-(in-package "CLOS")
-
-
-;;; compute-class-precedence-list Knuth section 2.2.3 has some interesting notes on this. What
-;;; appears here is basically the algorithm presented there. The key idea is that we use
-;;; class-precedence-description (CPD) structures to store the precedence information as we proceed.
-;;; The CPD structure for a class stores two critical pieces of information: - a count of the number
-;;; of "reasons" why the class can't go into the class precedence list yet. - a list of the
-;;; "reasons" this class prevents others from going in until after it
-
-
-
-;;
-
-
-
-;;; A "reason" is essentially a single local precedence constraint. If a constraint between two
-;;; classes arises more than once it generates more than one reason. This makes things simpler,
-;;; linear, and isn't a problem as long as we make sure to keep track of each instance of a
-;;; "reason". This code is divided into three phases. - the first phase simply generates the CPD's
-;;; for each of the class and its superclasses. The remainder of the code will manipulate these
-;;; CPDs rather than the class objects themselves. At the end of this pass, the CPD-SUPERS field of
-;;; a CPD is a list of the CPDs of the direct superclasses of the class. - the second phase folds
-;;; all the local constraints into the CPD structure. The CPD-COUNT of each CPD is built up, and
-;;; the CPD-AFTER fields are augmented to include precedence constraints from the CPD-SUPERS field
-;;; and from the order of classes in other CPD-SUPERS fields. After this phase, the CPD-AFTER field
-;;; of a class includes all the direct superclasses of the class plus any class that immediately
-;;; follows the class in the direct superclasses of another. There can be duplicates in this list.
-;;; The CPD-COUNT field is equal to the number of times this class appears in the CPD-AFTER field of
-;;; all the other CPDs. - In the third phase, classes are put into the precedence list one at a
-;;; time, with only those classes with a CPD-COUNT of 0 being candidates for insertion. When a
-;;; class is inserted , every CPD in its CPD-AFTER field has its count decremented. In the usual
-;;; case, there is only one candidate for insertion at any point. If there is more than one, the
-;;; specified tiebreaker rule is used to choose among them.
-
-
-(defmethod compute-class-precedence-list ((root std-class)
- direct-superclasses)
- (compute-std-cpl root direct-superclasses))
-
-(defstruct (class-precedence-description (:conc-name nil)
- (:print-function (lambda (obj str depth)
- (declare (ignore depth))
- (format str "#" (class-name (cpd-class obj))
- (cpd-count obj))))
- (:constructor make-cpd nil))
- (cpd-class nil)
- (cpd-supers nil)
- (cpd-after nil)
- (cpd-count 0))
-
-(defun compute-std-cpl (class supers)
- (cond ((null supers)
- ; First two branches of COND
- (list class))
- ; are implementing the single
- ((null (cdr supers))
- ; inheritance optimization.
- (cons class (compute-std-cpl (car supers)
- (class-direct-superclasses (car supers)))))
- (t (multiple-value-bind (all-cpds nclasses)
- (compute-std-cpl-phase-1 class supers)
- (compute-std-cpl-phase-2 all-cpds)
- (compute-std-cpl-phase-3 class all-cpds nclasses)))))
-
-(defvar *compute-std-cpl-class->entry-table-size* 60)
-
-(defun compute-std-cpl-phase-1 (class supers)
- (let ((nclasses 0)
- (all-cpds nil)
- (table (make-hash-table :size *compute-std-cpl-class->entry-table-size* :test
- #'eq)))
- (labels ((get-cpd (c)
- (or (gethash c table)
- (setf (gethash c table)
- (make-cpd))))
- (walk (c supers)
- (if (forward-referenced-class-p c)
- (cpl-forward-referenced-class-error class c)
- (let ((cpd (get-cpd c)))
- (unless (cpd-class cpd)
- ; If we have already done this class
- ; before, we can quit.
- (setf (cpd-class cpd)
- c)
- (incf nclasses)
- (push cpd all-cpds)
- (setf (cpd-supers cpd)
- (mapcar #'get-cpd supers))
- (dolist (super supers)
- (walk super (class-direct-superclasses super))))))))
- (walk class supers)
- (values all-cpds nclasses))))
-
-(defun compute-std-cpl-phase-2 (all-cpds)
- (dolist (cpd all-cpds)
- (let ((supers (cpd-supers cpd)))
- (when supers
- (setf (cpd-after cpd)
- (nconc (cpd-after cpd)
- supers))
- (incf (cpd-count (car supers))
- 1)
- (do* ((t1 supers t2)
- (t2 (cdr t1)
- (cdr t1)))
- ((null t2))
- (incf (cpd-count (car t2))
- 2)
- (push (car t2)
- (cpd-after (car t1))))))))
-
-(defun
- compute-std-cpl-phase-3
- (class all-cpds nclasses)
- (let ((candidates nil)
- (next-cpd nil)
- (rcpl nil))
-
- ;; We have to bootstrap the collection of those CPD's that have a zero count. Once we get
- ;; going, we will maintain this list incrementally.
- (dolist (cpd all-cpds)
- (when (zerop (cpd-count cpd))
- (push cpd candidates)))
- (loop (when (null candidates)
-
- ;; If there are no candidates, and enough classes have been put into the precedence
- ;; list, then we are all done. Otherwise it means there is a consistency problem.
- (if (zerop nclasses)
- (return (reverse rcpl))
- (cpl-inconsistent-error class all-cpds)))
-
- ;; Try to find the next class to put in from among the candidates. If there is only one,
- ;; its easy, otherwise we have to use the famous RPG tiebreaker rule. There is some
- ;; hair here to avoid having to call DELETE on the list of candidates. I dunno if its
- ;; worth it but what the hell.
- (setq next-cpd
- (if (null (cdr candidates))
- (prog1 (car candidates)
- (setq candidates nil))
- (block tie-breaker
- (dolist (c rcpl)
- (let ((supers (class-direct-superclasses c)))
- (if (memq (cpd-class (car candidates))
- supers)
- (return-from tie-breaker (pop candidates))
- (do ((loc candidates (cdr loc)))
- ((null (cdr loc)))
- (let ((cpd (cadr loc)))
- (when (memq (cpd-class cpd)
- supers)
- (setf (cdr loc)
- (cddr loc))
- (return-from tie-breaker cpd))))))))))
- (decf nclasses)
- (push (cpd-class next-cpd)
- rcpl)
- (dolist (after (cpd-after next-cpd))
- (when (zerop (decf (cpd-count after)))
- (push after candidates))))))
-
-
-;;; Support code for signalling nice error messages.
-
-
-(defun cpl-error (class format-string &rest format-args)
- (error "While computing the class precedence list of the class ~A.~%~A"
- (if (class-name class)
- (format nil "named ~S" (class-name class))
- class)
- (apply #'format nil format-string format-args)))
-
-(defun cpl-forward-referenced-class-error (class forward-class)
- (flet ((class-or-name (class)
- (if (class-name class)
- (format nil "named ~S" (class-name class))
- class)))
- (let ((names (mapcar #'class-or-name (cdr (find-superclass-chain class forward-class))))
- )
- (cpl-error class
- "The class ~A is a forward referenced class.~@
- The class ~A is ~A." (class-or-name forward-class)
- (class-or-name forward-class)
- (if (null (cdr names))
- (format nil "a direct superclass of the class ~A" (class-or-name class))
- (format nil "reached from the class ~A by following~@
- the direct superclass chain through: ~A~
- ~% ending at the class ~A" (class-or-name class)
- (format nil "~{~% the class ~A,~}" (butlast names))
- (car (last names))))))))
-
-(defun find-superclass-chain (bottom top)
- (labels ((walk (c chain)
- (if (eq c top)
- (return-from find-superclass-chain (nreverse chain))
- (dolist (super (class-direct-superclasses c))
- (walk super (cons super chain))))))
- (walk bottom (list bottom))))
-
-(defun cpl-inconsistent-error (class all-cpds)
- (let ((reasons (find-cycle-reasons all-cpds)))
- (cpl-error class "It is not possible to compute the class precedence list because~@
- there ~A in the local precedence relations.~@
- ~A because:~{~% ~A~}." (if (cdr reasons)
- "are circularities"
- "is a circularity")
- (if (cdr reasons)
- "These arise"
- "This arises")
- (format-cycle-reasons (apply #'append reasons)))))
-
-(defun format-cycle-reasons (reasons)
- (flet ((class-or-name (cpd)
- (let ((class (cpd-class cpd)))
- (if (class-name class)
- (format nil "named ~S" (class-name class))
- class))))
- (mapcar #'(lambda (reason)
- (ecase (caddr reason)
- (:super (format nil
- "the class ~A appears in the supers of the class ~A"
- (class-or-name (cadr reason))
- (class-or-name (car reason))))
- (:in-supers (format nil
- "the class ~A follows the class ~A in the supers of the class ~A"
- (class-or-name (cadr reason))
- (class-or-name (car reason))
- (class-or-name (cadddr reason))))))
- reasons)))
-
-(defun find-cycle-reasons (all-cpds)
- (let ((been-here nil)
- ; List of classes we have visited.
- (cycle-reasons nil))
- (labels ((chase (path)
- (if (memq (car path)
- (cdr path))
- (record-cycle (memq (car path)
- (nreverse path)))
- (unless (memq (car path)
- been-here)
- (push (car path)
- been-here)
- (dolist (after (cpd-after (car path)))
- (chase (cons after path))))))
- (record-cycle
- (cycle)
- (let ((reasons nil))
- (do* ((t1 cycle t2)
- (t2 (cdr t1)
- (cdr t1)))
- ((null t2))
- (let ((c1 (car t1))
- (c2 (car t2)))
- (if (memq c2 (cpd-supers c1))
- (push (list c1 c2 :super)
- reasons)
- (dolist (cpd all-cpds)
- (when (memq c2 (memq c1 (cpd-supers cpd)))
- (return (push (list c1 c2 :in-supers cpd)
- reasons)))))))
- (push (nreverse reasons)
- cycle-reasons))))
- (dolist (cpd all-cpds)
- (unless (zerop (cpd-count cpd))
- (chase (list cpd))))
- cycle-reasons)))
diff --git a/obsolete/clos/2.0/ctypes.lisp b/obsolete/clos/2.0/ctypes.lisp
deleted file mode 100644
index 1de6d3a4..00000000
--- a/obsolete/clos/2.0/ctypes.lisp
+++ /dev/null
@@ -1,25 +0,0 @@
-;;;-*-Mode:LISP; Package: PCL; Base:10; Syntax:Common-lisp -*-
-;;;
-;;; *************************************************************************
-;;; Copyright (c) 1991 Venue
-;;; All rights reserved.
-;;; *************************************************************************
-;;;
-
-(in-package 'clos)
-
-;;;
-;;; The built-in method combination types as taken from page 1-31 of 88-002R.
-;;; Note that the STANDARD method combination type is defined by hand in the
-;;; file combin.lisp.
-;;;
-
-(define-method-combination + :identity-with-one-argument t)
-(define-method-combination and :identity-with-one-argument t)
-(define-method-combination append :identity-with-one-argument nil)
-(define-method-combination list :identity-with-one-argument nil)
-(define-method-combination max :identity-with-one-argument t)
-(define-method-combination min :identity-with-one-argument t)
-(define-method-combination nconc :identity-with-one-argument t)
-(define-method-combination or :identity-with-one-argument t)
-(define-method-combination progn :identity-with-one-argument t)
diff --git a/obsolete/clos/2.0/defclass.lisp b/obsolete/clos/2.0/defclass.lisp
deleted file mode 100644
index 4aaf9791..00000000
--- a/obsolete/clos/2.0/defclass.lisp
+++ /dev/null
@@ -1,230 +0,0 @@
-;;;-*- Package: CLOS; Syntax: Common-Lisp; Base: 10 -*-
-
-;;;. Copyright (c) 1991 by Venue
-(in-package "CLOS")
-
-;;; *************************************************************************
-
-
-
-;;; MAKE-TOP-LEVEL-FORM is used by all PCL macros that appear `at top-level'. The original
-;;; motiviation for this function was to deal with the bug in the Genera compiler that prevents
-;;; lambda expressions in top-level forms other than DEFUN from being compiled. Now this function is
-;;; used to grab other functionality as well. This includes: - Preventing the grouping of top-level
-;;; forms. For example, a DEFCLASS followed by a DEFMETHOD may not want to be grouped into the same
-;;; top-level form. - Telling the programming environment what the pretty version of the name of
-;;; this form is. This is used by WARN.
-
-
-(defun make-top-level-form (name times form)
- (flet ((definition-name nil (if (and (listp name)
- (memq (car name)
- '(defmethod defclass class method
- method-combination)))
- (format nil "~A~{ ~S~}" (capitalize-words (car name)
- nil)
- (cdr name))
- (format nil "~S" name))))
- (definition-name)
- (make-progn `',name `(eval-when ,times ,form))))
-
-(defun make-progn (&rest forms)
- (let ((progn-form nil))
- (labels ((collect-forms (forms)
- (unless (null forms)
- (collect-forms (cdr forms))
- (if (and (listp (car forms))
- (eq (caar forms)
- 'progn))
- (collect-forms (cdar forms))
- (push (car forms)
- progn-form)))))
- (collect-forms forms)
- (cons 'progn progn-form))))
-
-
-;;; Like the DEFMETHOD macro, the expansion of the DEFCLASS macro is fixed. DEFCLASS always expands
-;;; into a call to LOAD-DEFCLASS. Until the meta- braid is set up, LOAD-DEFCLASS has a special
-;;; definition which simply collects all class definitions up, when the metabraid is initialized it
-;;; is done from those class definitions. After the metabraid has been setup, and the protocol for
-;;; defining classes has been defined, the real definition of LOAD-DEFCLASS is installed by the file
-;;; defclass.lisp
-
-
-(defmacro defclass (name direct-superclasses direct-slots &rest options)
- (declare (indentation 2 4 3 1))
- (expand-defclass name direct-superclasses direct-slots options))
-
-(defun expand-defclass (name supers slots options)
- (setq supers (copy-tree supers)
- slots
- (copy-tree slots)
- options
- (copy-tree options))
- (let ((metaclass 'standard-class))
- (dolist (option options)
- (if (not (listp option))
- (error "~S is not a legal defclass option." option)
- (when (eq (car option)
- ':metaclass)
- (unless (legal-class-name-p (cadr option))
- (error
- "The value of the :metaclass option (~S) is not a~%~
- legal class name." (cadr option)))
- (setq metaclass (cadr option))
- (setf options (remove option options))
- (return t))))
- (let ((*initfunctions* nil)
- (*accessors* nil))
- ; Truly a crock, but we got to have it
- ; to live nicely.
- (declare (special *initfunctions* *accessors*))
- (let ((canonical-slots (mapcar #'(lambda (spec)
- (canonicalize-slot-specification name spec))
- slots))
- (other-initargs (mapcar #'(lambda (option)
- (canonicalize-defclass-option name option))
- options)))
- (do-standard-defsetfs-for-defclass *accessors*)
-; (load-defclass name metaclass supers
-; canonical-slots (apply #'append
-; other-initargs) *accessors*)))))
- (make-top-level-form `(defclass ,name nil nil)
- *defclass-times*
- `(let ,(mapcar #'cdr *initfunctions*)
- (load-defclass ',name ',metaclass ',supers (list
- ,@canonical-slots
- )
- (list ,@(apply #'append other-initargs))
- ',*accessors*)))))))
-
-(defun make-initfunction (initform)
- (declare (special *initfunctions*))
- (cond ((or (eq initform 't)
- (equal initform ''t))
- '#'true)
- ((or (eq initform 'nil)
- (equal initform ''nil))
- '#'false)
- ((or (eql initform '0)
- (equal initform ''0))
- '#'zero)
- (t (let ((entry (assoc initform *initfunctions* :test #'equal)))
- (unless entry
- (setq entry (list initform (gensym)
- `#'(lambda nil ,initform)))
- (push entry *initfunctions*))
- (cadr entry)))))
-
-(defun canonicalize-slot-specification (class-name spec)
- (declare (special *accessors*))
- (cond ((and (symbolp spec)
- (not (keywordp spec))
- (not (memq spec '(t nil))))
- `'(:name ,spec))
- ((not (consp spec))
- (error "~S is not a legal slot specification." spec))
- ((null (cdr spec))
- `'(:name ,(car spec)))
- ((null (cddr spec))
- (error
- "In DEFCLASS ~S, the slot specification ~S is obsolete.~%~
- Convert it to ~S" class-name spec (list (car spec)
- :initform
- (cadr spec))))
- (t (let* ((name (pop spec))
- (readers nil)
- (writers nil)
- (initargs nil)
- (unsupplied (list nil))
- (initform (getf spec :initform unsupplied)))
- (doplist (key val)
- spec
- (case key
- (:accessor
- (push val *accessors*)
- (push val readers)
- (push `(setf ,val)
- writers))
- (:reader (push val readers))
- (:writer (push val writers))
- (:initarg (push val initargs))))
- (loop (unless (remf spec :accessor)
- (return)))
- (loop (unless (remf spec :reader)
- (return)))
- (loop (unless (remf spec :writer)
- (return)))
- (loop (unless (remf spec :initarg)
- (return)))
- (setq spec `(:name ',name :readers ',readers
- :writers ',writers :initargs
- ',initargs
- ',spec))
- (if (eq initform unsupplied)
- `(list* ,@spec)
- `(list* :initfunction ,(make-initfunction initform)
- ,@spec))))))
-
-(defun canonicalize-defclass-option (class-name option)
- (declare (ignore class-name))
- (case (car option)
- (:default-initargs (let ((canonical nil))
- (let (key val (tail (cdr option)))
- (loop (when (null tail)
- (return nil))
- (setq key (pop tail)
- val
- (pop tail))
- (push ``(,',key ,,(make-initfunction val)
- ,',val)
- canonical))
- `(':direct-default-initargs (list ,@(nreverse canonical))))))
- (otherwise `(',(car option)
- ',(cdr option)))))
-
-
-;;; This is the early definition of load-defclass. It just collects up all the class definitions in
-;;; a list. Later, in the file braid1.lisp, these are actually defined. Each entry in
-;;; *early-class-definitions* is an early-class-definition.
-
-
-(defparameter *early-class-definitions* nil)
-
-(defun make-early-class-definition (name source metaclass superclass-names canonical-slots
- other-initargs)
- (list 'early-class-definition name source metaclass superclass-names canonical-slots
- other-initargs))
-
-(defun ecd-class-name (ecd)
- (nth 1 ecd))
-
-(defun ecd-source (ecd)
- (nth 2 ecd))
-
-(defun ecd-metaclass (ecd)
- (nth 3 ecd))
-
-(defun ecd-superclass-names (ecd)
- (nth 4 ecd))
-
-(defun ecd-canonical-slots (ecd)
- (nth 5 ecd))
-
-(defun ecd-other-initargs (ecd)
- (nth 6 ecd))
-
-(proclaim '(notinline load-defclass))
-
-(defun load-defclass (name metaclass supers canonical-slots canonical-options accessor-names)
- (setq supers (copy-tree supers)
- canonical-slots
- (copy-tree canonical-slots)
- canonical-options
- (copy-tree canonical-options))
- (do-standard-defsetfs-for-defclass accessor-names)
- (let ((ecd (make-early-class-definition name (load-truename)
- metaclass supers canonical-slots (apply #'append canonical-options)))
- (existing (find name *early-class-definitions* :key #'ecd-class-name)))
- (setq *early-class-definitions* (cons ecd (remove existing *early-class-definitions*)))
- ecd))
diff --git a/obsolete/clos/2.0/defcombin.lisp b/obsolete/clos/2.0/defcombin.lisp
deleted file mode 100644
index 5bb69ebd..00000000
--- a/obsolete/clos/2.0/defcombin.lisp
+++ /dev/null
@@ -1,410 +0,0 @@
-;;;-*-Mode:LISP; Package: CLOS; Base:10; Syntax:Common-lisp -*-
-;;;
-;;; *************************************************************************
-;;; Copyright (c) 1991 Venue
-;;; All rights reserved.
-;;; *************************************************************************
-;;;
-
-(in-package 'clos)
-
-;;;
-;;; DEFINE-METHOD-COMBINATION
-;;;
-
-(defmacro define-method-combination (&whole form &rest args)
- (declare (ignore args))
- (if (and (cddr form)
- (listp (caddr form)))
- (expand-long-defcombin form)
- (expand-short-defcombin form)))
-
-
-;;;
-;;; STANDARD method combination
-;;;
-;;; The STANDARD method combination type is implemented directly by the class
-;;; STANDARD-METHOD-COMBINATION. The method on COMPUTE-EFFECTIVE-METHOD does
-;;; standard method combination directly and is defined by hand in the file
-;;; combin.lisp. The method for FIND-METHOD-COMBINATION must appear in this
-;;; file for bootstrapping reasons.
-;;;
-;;; A commented out copy of this definition appears in combin.lisp.
-;;; If you change this definition here, be sure to change it there
-;;; also.
-;;;
-(defmethod find-method-combination ((generic-function generic-function)
- (type (eql 'standard))
- options)
- (when options
- (method-combination-error
- "The method combination type STANDARD accepts no options."))
- *standard-method-combination*)
-
-
-
-;;;
-;;; short method combinations
-;;;
-;;; Short method combinations all follow the same rule for computing the
-;;; effective method. So, we just implement that rule once. Each short
-;;; method combination object just reads the parameters out of the object
-;;; and runs the same rule.
-;;;
-;;;
-(defclass short-method-combination (standard-method-combination)
- ((operator
- :reader short-combination-operator
- :initarg :operator)
- (identity-with-one-argument
- :reader short-combination-identity-with-one-argument
- :initarg :identity-with-one-argument)))
-
-(define-gf-predicate short-method-combination-p short-method-combination)
-
-(defun expand-short-defcombin (whole)
- (let* ((type (cadr whole))
- (documentation
- (getf (cddr whole) :documentation ""))
- (identity-with-one-arg
- (getf (cddr whole) :identity-with-one-argument nil))
- (operator
- (getf (cddr whole) :operator type)))
- (make-top-level-form `(define-method-combination ,type)
- '(load eval)
- `(load-short-defcombin
- ',type ',operator ',identity-with-one-arg ',documentation))))
-
-(defun load-short-defcombin (type operator ioa doc)
- (let* ((truename (load-truename))
- (specializers
- (list (find-class 'generic-function)
- (make-instance 'eql-specializer :object type)
- *the-class-t*))
- (old-method
- (get-method #'find-method-combination () specializers nil))
- (new-method nil))
- (setq new-method
- (make-instance 'standard-method
- :qualifiers ()
- :specializers specializers
- :lambda-list '(generic-function type options)
- :function #'(lambda (gf type options)
- (declare (ignore gf))
- (do-short-method-combination
- type options operator ioa new-method doc))
- :definition-source `((define-method-combination ,type) ,truename)))
- (when old-method
- (remove-method #'find-method-combination old-method))
- (add-method #'find-method-combination new-method)))
-
-(defun do-short-method-combination (type options operator ioa method doc)
- (cond ((null options) (setq options '(:most-specific-first)))
- ((equal options '(:most-specific-first)))
- ((equal options '(:most-specific-last)))
- (t
- (method-combination-error
- "Illegal options to a short method combination type.~%~
- The method combination type ~S accepts one option which~%~
- must be either :MOST-SPECIFIC-FIRST or :MOST-SPECIFIC-LAST."
- type)))
- (make-instance 'short-method-combination
- :type type
- :options options
- :operator operator
- :identity-with-one-argument ioa
- :definition-source method
- :documentation doc))
-
-(defmethod compute-effective-method ((generic-function generic-function)
- (combin short-method-combination)
- applicable-methods)
- (let ((type (method-combination-type combin))
- (operator (short-combination-operator combin))
- (ioa (short-combination-identity-with-one-argument combin))
- (around ())
- (primary ()))
- (dolist (m applicable-methods)
- (let ((qualifiers (method-qualifiers m)))
- (flet ((lose (method why)
- (invalid-method-error
- method
- "The method ~S ~A.~%~
- The method combination type ~S was defined with the~%~
- short form of DEFINE-METHOD-COMBINATION and so requires~%~
- all methods have either the single qualifier ~S or the~%~
- single qualifier :AROUND."
- method why type type)))
- (cond ((null qualifiers)
- (lose m "has no qualifiers"))
- ((cdr qualifiers)
- (lose m "has more than one qualifier"))
- ((eq (car qualifiers) :around)
- (push m around))
- ((eq (car qualifiers) type)
- (push m primary))
- (t
- (lose m "has an illegal qualifier"))))))
- (setq around (nreverse around)
- primary (nreverse primary))
- (let ((main-method
- (if (and (null (cdr primary))
- (not (null ioa)))
- `(call-method ,(car primary) ())
- `(,operator ,@(mapcar #'(lambda (m) `(call-method ,m ()))
- primary)))))
- (cond ((null primary)
- `(error "No ~S methods for the generic function ~S."
- ',type ',generic-function))
- ((null around) main-method)
- (t
- `(call-method ,(car around)
- (,@(cdr around) (make-method ,main-method))))))))
-
-
-;;;
-;;; long method combinations
-;;;
-;;;
-
-(defclass long-method-combination (standard-method-combination)
- ((function :initarg :function
- :reader long-method-combination-function)))
-
-(defun expand-long-defcombin (form)
- (let ((type (cadr form))
- (lambda-list (caddr form))
- (method-group-specifiers (cadddr form))
- (body (cddddr form))
- (arguments-option ())
- (gf-var nil))
- (when (and (consp (car body)) (eq (caar body) :arguments))
- (setq arguments-option (cdr (pop body))))
- (when (and (consp (car body)) (eq (caar body) :generic-function))
- (setq gf-var (cadr (pop body))))
- (multiple-value-bind (documentation function)
- (make-long-method-combination-function
- type lambda-list method-group-specifiers arguments-option gf-var
- body)
- (make-top-level-form `(define-method-combination ,type)
- '(load eval)
- `(load-long-defcombin ',type ',documentation #',function)))))
-
-(defvar *long-method-combination-functions* (make-hash-table :test #'eq))
-
-(defun load-long-defcombin (type doc function)
- (let* ((specializers
- (list (find-class 'generic-function)
- (make-instance 'eql-specializer :object type)
- *the-class-t*))
- (old-method
- (get-method #'find-method-combination () specializers nil))
- (new-method
- (make-instance 'standard-method
- :qualifiers ()
- :specializers specializers
- :lambda-list '(generic-function type options)
- :function #'(lambda (generic-function type options)
- (declare (ignore generic-function))
- (make-instance 'long-method-combination
- :type type
- :documentation doc
- :options options))
- :definition-source `((define-method-combination ,type)
- ,(load-truename)))))
- (setf (gethash type *long-method-combination-functions*) function)
- (when old-method (remove-method #'find-method-combination old-method))
- (add-method #'find-method-combination new-method)))
-
-(defmethod compute-effective-method ((generic-function generic-function)
- (combin long-method-combination)
- applicable-methods)
- (funcall (gethash (method-combination-type combin)
- *long-method-combination-functions*)
- generic-function
- combin
- applicable-methods))
-
-;;;
-;;;
-;;;
-(defun make-long-method-combination-function
- (type ll method-group-specifiers arguments-option gf-var body)
- (declare (ignore type) (values documentation function))
- (multiple-value-bind (documentation declarations real-body)
- (extract-declarations body)
-
- (let ((wrapped-body
- (wrap-method-group-specifier-bindings method-group-specifiers
- declarations
- real-body)))
- (when gf-var
- (push `(,gf-var .generic-function.) (cadr wrapped-body)))
-
- (when arguments-option
- (setq wrapped-body (deal-with-arguments-option wrapped-body
- arguments-option)))
-
- (when ll
- (setq wrapped-body
- `(apply #'(lambda ,ll ,wrapped-body)
- (method-combination-options .method-combination.))))
-
- (values
- documentation
- `(lambda (.generic-function. .method-combination. .applicable-methods.)
- (progn .generic-function. .method-combination. .applicable-methods.)
- (block .long-method-combination-function. ,wrapped-body))))))
-;;
-;; parse-method-group-specifiers parse the method-group-specifiers
-;;
-
-(defun wrap-method-group-specifier-bindings
- (method-group-specifiers declarations real-body)
- (with-gathering ((names (collecting))
- (specializer-caches (collecting))
- (cond-clauses (collecting))
- (required-checks (collecting))
- (order-cleanups (collecting)))
- (dolist (method-group-specifier method-group-specifiers)
- (multiple-value-bind (name tests description order required)
- (parse-method-group-specifier method-group-specifier)
- (declare (ignore description))
- (let ((specializer-cache (gensym)))
- (gather name names)
- (gather specializer-cache specializer-caches)
- (gather `((or ,@tests)
- (if (equal ,specializer-cache .specializers.)
- (return-from .long-method-combination-function.
- '(error "More than one method of type ~S ~
- with the same specializers."
- ',name))
- (setq ,specializer-cache .specializers.))
- (push .method. ,name))
- cond-clauses)
- (when required
- (gather `(when (null ,name)
- (return-from .long-method-combination-function.
- '(error "No ~S methods." ',name)))
- required-checks))
- (loop (unless (and (constantp order)
- (neq order (setq order (eval order))))
- (return t)))
- (gather (cond ((eq order :most-specific-first)
- `(setq ,name (nreverse ,name)))
- ((eq order :most-specific-last) ())
- (t
- `(ecase ,order
- (:most-specific-first
- (setq ,name (nreverse ,name)))
- (:most-specific-last))))
- order-cleanups))))
- `(let (,@names ,@specializer-caches)
- ,@declarations
- (dolist (.method. .applicable-methods.)
- (let ((.qualifiers. (method-qualifiers .method.))
- (.specializers. (method-specializers .method.)))
- (progn .qualifiers. .specializers.)
- (cond ,@cond-clauses)))
- ,@required-checks
- ,@order-cleanups
- ,@real-body)))
-
-(defun parse-method-group-specifier (method-group-specifier)
- (declare (values name tests description order required))
- (let* ((name (pop method-group-specifier))
- (patterns ())
- (tests
- (gathering1 (collecting)
- (block collect-tests
- (loop
- (if (or (null method-group-specifier)
- (memq (car method-group-specifier)
- '(:description :order :required)))
- (return-from collect-tests t)
- (let ((pattern (pop method-group-specifier)))
- (push pattern patterns)
- (gather1 (parse-qualifier-pattern name pattern)))))))))
- (values name
- tests
- (getf method-group-specifier :description
- (make-default-method-group-description patterns))
- (getf method-group-specifier :order :most-specific-first)
- (getf method-group-specifier :required nil))))
-
-(defun parse-qualifier-pattern (name pattern)
- (cond ((eq pattern '()) `(null .qualifiers.))
- ((eq pattern '*) 't)
- ((symbolp pattern) `(,pattern .qualifiers.))
- ((listp pattern) `(qualifier-check-runtime ',pattern .qualifiers.))
- (t (error "In the method group specifier ~S,~%~
- ~S isn't a valid qualifier pattern."
- name pattern))))
-
-(defun qualifier-check-runtime (pattern qualifiers)
- (loop (cond ((and (null pattern) (null qualifiers))
- (return t))
- ((eq pattern '*) (return t))
- ((and pattern qualifiers (eq (car pattern) (car qualifiers)))
- (pop pattern)
- (pop qualifiers))
- (t (return nil)))))
-
-(defun make-default-method-group-description (patterns)
- (if (cdr patterns)
- (format nil
- "methods matching one of the patterns: ~{~S, ~} ~S"
- (butlast patterns) (car (last patterns)))
- (format nil
- "methods matching the pattern: ~S"
- (car patterns))))
-
-
-
-;;;
-;;; This baby is a complete mess. I can't believe we put it in this
-;;; way. No doubt this is a large part of what drives MLY crazy.
-;;;
-;;; At runtime (when the effective-method is run), we bind an intercept
-;;; lambda-list to the arguments to the generic function.
-;;;
-;;; At compute-effective-method time, the symbols in the :arguments
-;;; option are bound to the symbols in the intercept lambda list.
-;;;
-(defun deal-with-arguments-option (wrapped-body arguments-option)
- (let* ((intercept-lambda-list
- (gathering1 (collecting)
- (dolist (arg arguments-option)
- (if (memq arg lambda-list-keywords)
- (gather1 arg)
- (gather1 (gensym))))))
- (intercept-rebindings
- (gathering1 (collecting)
- (iterate ((arg (list-elements arguments-option))
- (int (list-elements intercept-lambda-list)))
- (unless (memq arg lambda-list-keywords)
- (gather1 `(,arg ',int)))))))
- ;;
- ;;
- (setf (cadr wrapped-body)
- (append intercept-rebindings (cadr wrapped-body)))
- ;;
- ;; Be sure to fill out the intercept lambda list so that it can
- ;; be too short if it wants to.
- ;;
- (cond ((memq '&rest intercept-lambda-list))
- ((memq '&allow-other-keys intercept-lambda-list))
- ((memq '&key intercept-lambda-list)
- (setq intercept-lambda-list
- (append intercept-lambda-list '(&allow-other-keys))))
- (t
- (setq intercept-lambda-list
- (append intercept-lambda-list '(&rest .ignore.)))))
-
- `(let ((inner-result. ,wrapped-body))
- `(apply #'(lambda ,',intercept-lambda-list
- ,,(when (memq '.ignore. intercept-lambda-list)
- ''(declare (ignore .ignore.)))
- ,inner-result.)
- .combined-method-args.))))
-
diff --git a/obsolete/clos/2.0/defs.lisp b/obsolete/clos/2.0/defs.lisp
deleted file mode 100644
index e0f2a047..00000000
--- a/obsolete/clos/2.0/defs.lisp
+++ /dev/null
@@ -1,570 +0,0 @@
-;;;-*- Package: CLOS; Syntax: Common-Lisp; Base: 10 -*-
-;;;. Copyright (c) 1991 by Venue
-
-
-(in-package "CLOS")
-
-(eval-when (compile load eval)
- (defvar *defclass-times* '(load eval compile)) ;Probably have to change this
- ;if you use defconstructor.
-(defvar *defmethod-times* '(load eval compile))
-(defvar *defgeneric-times* '(load eval compile))
-)
-
-
-;;; Convert a function name to its standard setf function name. We have to do this hack because not
-;;; all Common Lisps have yet converted to having setf function specs. In a port that does have setf
-;;; function specs you can use those just by making the obvious simple changes to these functions.
-;;; The rest of CLOS believes that there are function names like (SETF ), this is the only place
-;;; that knows about this hack.
-
-
-(eval-when (compile load eval)
- (defvar *setf-function-names* (make-hash-table :size 200 :test #'eq))
-(defun get-setf-function-name (name)
- (or (gethash name *setf-function-names*)
- (setf (gethash name *setf-function-names*)
- (intern (format nil
- "SETF ~A ~A"
- (package-name (symbol-package name))
- (symbol-name name))
- *the-clos-package*))))
-
-;;;
-;;; Call this to define a setf macro for a function with the same behavior as
-;;; specified by the SETF function cleanup proposal. Specifically, this will
-;;; cause: (SETF (FOO a b) x) to expand to (|SETF FOO| x a b).
-;;;
-;;; do-standard-defsetf A macro interface for use at top level
-;;; in files. Unfortunately, users may
-;;; have to use this for a while.
-;;;
-;;; do-standard-defsetfs-for-defclass A special version called by defclass.
-;;;
-;;; do-standard-defsetf-1 A functional interface called by the
-;;; above, defmethod and defgeneric.
-;;; Since this is all a crock anyways,
-;;; users are free to call this as well.
-;;;
-(defmacro do-standard-defsetf (&rest function-names)
- `(eval-when (compile load eval)
- (dolist (fn-name ',function-names) (do-standard-defsetf-1 fn-name))))
-
-(defun do-standard-defsetfs-for-defclass (accessors)
- (dolist (name accessors) (do-standard-defsetf-1 name)))
-
-(defun do-standard-defsetf-1 (function-name)
- (unless (setfboundp function-name)
- (let* ((setf-function-name (get-setf-function-name function-name)))
-
- (flet ((setf-expander (body env)
- (declare (ignore env))
- (let ((temps
- (mapcar #'(lambda (x) (declare (ignore x)) (gensym))
- (cdr body)))
- (forms (cdr body))
- (vars (list (gensym))))
- (values temps
- forms
- vars
- `(,setf-function-name ,@vars ,@temps)
- `(,function-name ,@temps)))))
- (let ((setf-method-expander (intern (concatenate 'string
- (symbol-name function-name)
- "-setf-expander")
- (symbol-package function-name))))
- (setf (get function-name :setf-method-expander) setf-method-expander
- (symbol-function setf-method-expander) #'setf-expander)))
-
- )))
-(defun setfboundp (symbol)
-(or (get symbol :setf-inverse)
- (get symbol 'il:setf-inverse)
- (get symbol 'il:setfn)
- (get symbol :shared-setf-inverse)
- (get symbol :setf-method-expander)
- (get symbol 'il:setf-method-expander)))
-)
-
- ; eval-when
-
-
-
-;;; CLOS, like user code, must endure the fact that we don't have a properly working setf. Many
-;;; things work because they get mentioned by a defclass or defmethod before they are used, but
-;;; others have to be done by hand.
-
-
-(do-standard-defsetf
- class-wrapper ; ***
- generic-function-name
- method-function-plist
- method-function-get
- gdefinition
- slot-value-using-class)
-
-(defsetf slot-value set-slot-value)
-
-
-;;; This is like fdefinition on the Lispm. If Common Lisp had something like function specs I
-;;; wouldn't need this. On the other hand, I don't like the way this really works so maybe function
-;;; specs aren't really right either? I also don't understand the real implications of a Lisp-1 on
-;;; this sort of thing. Certainly some of the lossage in all of this is because these SPECs name
-;;; global definitions. Note that this implementation is set up so that an implementation which has
-;;; a 'real' function spec mechanism can use that instead and in that way get rid of setf generic
-;;; function names.
-
-
-(defmacro parse-gspec (spec (non-setf-var . non-setf-case)
- (setf-var . setf-case))
- (once-only (spec)
- `(cond ((symbolp ,spec)
- (let ((,non-setf-var ,spec))
- ,@non-setf-case))
- ((and (listp ,spec)
- (eq (car ,spec)
- 'setf)
- (symbolp (cadr ,spec)))
- (let ((,setf-var (cadr ,spec)))
- ,@setf-case))
- (t (error "Can't understand ~S as a generic function specifier.~%~
- It must be either a symbol which can name a function or~%~
- a list like ~S, where the car is the symbol ~S and the cadr~%~
- is a symbol which can name a generic function." ,spec '(setf )
- 'setf)))))
-
-
-;;; If symbol names a function which is traced or advised, return the unadvised, traced etc.
-;;; definition. This lets me get at the generic function object even when it is traced.
-
-
-(defun unencapsulated-fdefinition (symbol)
- (il:virginfn symbol))
-
-
-;;; If symbol names a function which is traced or advised, redefine the `real' definition without
-;;; affecting the advise.
-
-
-(defun fdefine-carefully (symbol new-definition)
- (let ((advisedp (member symbol il:advisedfns :test #'eq))
- (brokenp (member symbol il:brokenfns :test #'eq)))
-
- ;; In XeroxLisp (late of envos) tracing is implemented as a special case of "breaking".
- ;; Advising, however, is treated specially.
- (xcl:unadvise-function symbol :no-error t)
- (xcl:unbreak-function symbol :no-error t)
- (setf (symbol-function symbol)
- new-definition)
- (when brokenp (xcl:rebreak-function symbol))
- (when advisedp (xcl:readvise-function symbol)))
- new-definition)
-
-(defun gboundp (spec)
- (parse-gspec spec (name (fboundp name))
- (name (fboundp (get-setf-function-name name)))))
-
-(defun gmakunbound (spec)
- (parse-gspec spec (name (fmakunbound name))
- (name (fmakunbound (get-setf-function-name name)))))
-
-(defun gdefinition (spec)
- (parse-gspec spec (name (or (macro-function name)
- ; ??
- (unencapsulated-fdefinition name)))
- (name (unencapsulated-fdefinition (get-setf-function-name name)))))
-
-(defun SETF\ CLOS\ GDEFINITION (new-value spec)
- (parse-gspec spec (name (fdefine-carefully name new-value))
- (name (fdefine-carefully (get-setf-function-name name)
- new-value))))
-
-
-;;; These functions are a pale imitiation of their namesake. They accept class objects or types
-;;; where they should.
-
-
-(defun *typep (object type)
- (if (classp type)
- (let ((class (class-of object)))
- (if class
- (memq type (class-precedence-list class))
- nil))
- (let ((class (find-class type nil)))
- (if class
- (*typep object class)
- (typep object type)))))
-
-(defun *subtypep (type1 type2)
- (let ((c1 (if (classp type1)
- type1
- (find-class type1 nil)))
- (c2 (if (classp type2)
- type2
- (find-class type2 nil))))
- (if (and c1 c2)
- (memq c2 (class-precedence-list c1))
- (if (or c1 c2)
- nil
- ; This isn't quite right, but...
- (subtypep type1 type2)))))
-
-(defun do-satisfies-deftype (name predicate)
- (let* ((specifier `(satisfies ,predicate))
- (expand-fn #'(lambda (&rest ignore)
- (declare (ignore ignore))
- specifier)))
-
- ;; Specific ports can insert their own way of doing this. Many ports may find the
- ;; expand-fn defined above useful.
- (or
- ;; This is the default for ports for which we don't know any better. Note that for
- ;; most ports, providing this definition should just speed up class definition. It
- ;; shouldn't have an effect on performance of most user code.
- (eval `(deftype ,name nil '(satisfies ,predicate))))))
-
-(defun make-type-predicate-name (name)
- (intern (format nil "TYPE-PREDICATE ~A ~A" (package-name (symbol-package name))
- (symbol-name name))
- *the-clos-package*))
-
-(proclaim '(special *the-class-t* *the-class-vector* *the-class-symbol* *the-class-string*
- *the-class-sequence* *the-class-rational* *the-class-ratio* *the-class-number*
- *the-class-null* *the-class-list* *the-class-integer* *the-class-float*
- *the-class-cons* *the-class-complex* *the-class-character* *the-class-bit-vector*
- *the-class-array* *the-class-standard-object* *the-class-class* *the-class-method*
- *the-class-generic-function* *the-class-standard-class* *the-class-standard-method*
- *the-class-standard-generic-function*
- *the-class-standard-effective-slot-definition* *the-eslotd-standard-class-slots*))
-
-(proclaim '(special *the-wrapper-of-t* *the-wrapper-of-vector* *the-wrapper-of-symbol*
- *the-wrapper-of-string* *the-wrapper-of-sequence* *the-wrapper-of-rational*
- *the-wrapper-of-ratio* *the-wrapper-of-number* *the-wrapper-of-null*
- *the-wrapper-of-list* *the-wrapper-of-integer* *the-wrapper-of-float*
- *the-wrapper-of-cons* *the-wrapper-of-complex* *the-wrapper-of-character*
- *the-wrapper-of-bit-vector* *the-wrapper-of-array*))
-
-(defvar *built-in-class-symbols* nil)
-
-(defvar *built-in-wrapper-symbols* nil)
-
-(defun get-built-in-class-symbol (class-name)
- (or (cadr (assq class-name *built-in-class-symbols*))
- (let ((symbol (intern (format nil "*THE-CLASS-~A*" (symbol-name class-name))
- *the-clos-package*)))
- (push (list class-name symbol)
- *built-in-class-symbols*)
- symbol)))
-
-(defun get-built-in-wrapper-symbol (class-name)
- (or (cadr (assq class-name *built-in-wrapper-symbols*))
- (let ((symbol (intern (format nil "*THE-WRAPPER-OF-~A*" (symbol-name class-name))
- *the-clos-package*)))
- (push (list class-name symbol)
- *built-in-wrapper-symbols*)
- symbol)))
-
-(pushnew 'class *variable-declarations*)
-
-(pushnew 'variable-rebinding *variable-declarations*)
-
-(defun variable-class (var env)
- (caddr (variable-declaration 'class var env)))
-
-(defvar *boot-state* nil)
- ; NIL EARLY BRAID COMPLETE
-
-
-(eval-when (load eval)
- (when (eq *boot-state* 'complete)
- (error "Trying to load (or compile) CLOS in an environment in which it~%~
- has already been loaded. This doesn't work, you will have to~%~
- get a fresh lisp (reboot) and then load CLOS."))
- (when *boot-state* (cerror "Try loading (or compiling) CLOS anyways." "Trying to load (or compile) CLOS in an environment in which it~%~
- has already been partially loaded. This may not work, you may~%~
- need to get a fresh lisp (reboot) and then load CLOS.")))
-
-
-;;; This is used by combined methods to communicate the next methods to the methods they call. This
-;;; variable is captured by a lexical variable of the methods to give it the proper lexical scope.
-
-
-(defvar *next-methods* nil)
-
-(defvar *not-an-eql-specializer* '(not-an-eql-specializer))
-
-(defvar *umi-gfs*)
-
-(defvar *umi-complete-classes*)
-
-(defvar *umi-reorder*)
-
-(defvar *invalidate-discriminating-function-force-p* nil)
-
-(defvar *invalid-dfuns-on-stack* nil)
-
-(defvar *standard-method-combination*)
-
-(defvar *slotd-unsupplied* (list '*slotd-unsupplied*))
-
- ; ***
-
-
-(defmacro define-gf-predicate (predicate &rest classes)
- `(progn (defmethod ,predicate ((x t))
- nil)
- ,@(mapcar #'(lambda (c)
- `(defmethod ,predicate ((x ,c))
- t))
- classes)))
-
-(defmacro plist-value (object name)
- `(with-slots (plist)
- ,object
- (getf plist ,name)))
-
-(defsetf plist-value (object name)
- (new-value)
- (once-only (new-value)
- `(with-slots (plist)
- ,object
- (if ,new-value
- (setf (getf plist ,name)
- ,new-value)
- (progn (remf plist ,name)
- nil)))))
-
-(defvar *built-in-classes*
-
- ;; name supers subs cdr of cpl
- '((number (t) (complex float rational)
- (t))
- (complex (number)
- nil
- (number t))
- (float (number)
- nil
- (number t))
- (rational (number)
- (integer ratio)
- (number t))
- (integer (rational)
- nil
- (rational number t))
- (ratio (rational)
- nil
- (rational number t))
- (sequence (t)
- (list vector)
- (t))
- (list (sequence)
- (cons null)
- (sequence t))
- (cons (list)
- nil
- (list sequence t))
- (array (t)
- (vector)
- (t))
- (vector (array sequence)
- (string bit-vector)
- (array sequence t))
- (string (vector)
- nil
- (vector array sequence t))
- (bit-vector (vector)
- nil
- (vector array sequence t))
- (character (t)
- nil
- (t))
- (symbol (t)
- (null)
- (t))
- (null (symbol)
- nil
- (symbol list sequence t))))
-
-
-;;; The classes that define the kernel of the metabraid.
-
-
-(defclass t nil nil (:metaclass built-in-class))
-
-(defclass standard-object (t)
- nil)
-
-(defclass metaobject (standard-object)
- nil)
-
-(defclass specializer (metaobject)
- nil)
-
-(defclass definition-source-mixin (standard-object)
- ((source :initform (load-truename)
- :reader definition-source :initarg :definition-source)))
-
-(defclass plist-mixin (standard-object)
- ((plist :initform nil)))
-
-(defclass documentation-mixin (plist-mixin)
- nil)
-
-(defclass dependent-update-mixin (plist-mixin)
- nil)
-
-
-;;; The class CLASS is a specified basic class. It is the common superclass of any kind of class.
-;;; That is any class that can be a metaclass must have the class CLASS in its class precedence
-;;; list.
-
-
-(defclass class (documentation-mixin dependent-update-mixin definition-source-mixin specializer)
- ((name :initform nil :initarg :name :accessor class-name)
- (direct-superclasses :initform nil :reader class-direct-superclasses)
- (direct-subclasses :initform nil :reader class-direct-subclasses)
- (direct-methods :initform (cons nil nil))))
-
-
-;;; The class CLOS-CLASS is an implementation-specific common superclass of all specified subclasses
-;;; of the class CLASS.
-
-
-(defclass clos-class (class)
- ((class-precedence-list :initform nil)
- (wrapper :initform nil)))
-
-
-;;; The class STD-CLASS is an implementation-specific common superclass of the classes
-;;; STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS.
-
-
-(defclass std-class (clos-class)
- ((direct-slots :initform nil :accessor class-direct-slots)
- (slots :initform nil :accessor class-slots)
- (no-of-instance-slots ; *** MOVE TO WRAPPER ***
- :initform 0 :accessor class-no-of-instance-slots)
- (prototype :initform nil)))
-
-(defclass standard-class (std-class)
- nil)
-
-(defclass funcallable-standard-class (std-class)
- nil)
-
-(defclass forward-referenced-class (clos-class)
- nil)
-
-(defclass built-in-class (clos-class)
- nil)
-
-
-;;; Slot definitions. Note that throughout CLOS, "SLOT-DEFINITION" is abbreviated as "SLOTD".
-
-
-(defclass slot-definition (metaobject)
- nil)
-
-(defclass direct-slot-definition (slot-definition)
- nil)
-
-(defclass effective-slot-definition (slot-definition)
- nil)
-;
-(defclass standard-slot-definition (slot-definition)
- ((name :initform nil :accessor slotd-name)
- (initform :initform *slotd-unsupplied* :accessor slotd-initform)
- (initfunction :initform *slotd-unsupplied* :accessor slotd-initfunction)
- (readers :initform nil :accessor slotd-readers)
- (writers :initform nil :accessor slotd-writers)
- (initargs :initform nil :accessor slotd-initargs)
- (allocation :initform nil :accessor slotd-allocation)
- (type :initform nil :accessor slotd-type)
- (documentation :initform "" :initarg :documentation)
- (class :initform nil :accessor slotd-class)
- (instance-index :initform nil :accessor slotd-instance-index)))
-
-(defclass standard-direct-slot-definition (standard-slot-definition direct-slot-definition)
- nil)
-
- ; Adding slots here may involve extra
- ; work to the code in braid.lisp
-
-
-(defclass standard-effective-slot-definition (standard-slot-definition effective-slot-definition)
- nil)
-
- ; Adding slots here may involve extra
- ; work to the code in braid.lisp
-
-
-(defclass eql-specializer (specializer)
- ((object :initarg :object :reader eql-specializer-object)))
-
-
-;;;
-
-
-(defmacro dolist-carefully ((var list improper-list-handler)
- &body body)
- `(let ((,var nil)
- (.dolist-carefully. ,list))
- (loop (when (null .dolist-carefully.)
- (return nil))
- (if (consp .dolist-carefully.)
- (progn (setq ,var (pop .dolist-carefully.))
- ,@body)
- (,improper-list-handler)))))
-
-(defun legal-std-documentation-p (x)
- (if (or (null x)
- (stringp x))
- t
- "a string or NULL"))
-
-(defun legal-std-lambda-list-p (x)
- (declare (ignore x))
- t)
-
-(defun legal-std-method-function-p (x)
- (if (functionp x)
- t
- "a function"))
-
-(defun legal-std-qualifiers-p (x)
- (flet ((improper-list nil (return-from legal-std-qualifiers-p "Is not a proper list.")))
- (dolist-carefully (q x improper-list)
- (let ((ok (legal-std-qualifier-p q)))
- (unless (eq ok t)
- (return-from legal-std-qualifiers-p (format nil "Contains ~S which ~A" q
- ok)))))
- t))
-
-(defun legal-std-qualifier-p (x)
- (if (and x (atom x))
- t
- "is not a non-null atom"))
-
-(defun legal-std-slot-name-p (x)
- (cond ((not (symbolp x))
- "is not a symbol and so cannot be bound")
- ((keywordp x)
- "is a keyword and so cannot be bound")
- ((memq x '(t nil))
- "cannot be bound")
- (t t)))
-
-(defun legal-std-specializers-p (x)
- (flet ((improper-list nil (return-from legal-std-specializers-p "Is not a proper list.")))
- (dolist-carefully (s x improper-list)
- (let ((ok (legal-std-specializer-p s)))
- (unless (eq ok t)
- (return-from legal-std-specializers-p (format nil "Contains ~S which ~A"
- s ok)))))
- t))
-
-(defun legal-std-specializer-p (x)
- (if (or (classp x)
- (eql-specializer-p x))
- t
- "is neither a class object nor an eql specializer"))
diff --git a/obsolete/clos/2.0/defsys.lisp b/obsolete/clos/2.0/defsys.lisp
deleted file mode 100644
index c8a5f6f7..00000000
--- a/obsolete/clos/2.0/defsys.lisp
+++ /dev/null
@@ -1,757 +0,0 @@
-;;;-*-Mode:LISP; Package:(CLOS LISP 1000); Base:10; Syntax:Common-lisp -*-
-;;;
-;;; *************************************************************************
-;;; Copyright (c) 1991 Venue
-;;; All rights reserved.
-;;; *************************************************************************
-;;;
-;;; Some support stuff for compiling and loading CLOS. It would be nice if
-;;; there was some portable make-system we could all agree to share for a
-;;; while. At least until people really get databases and stuff.
-;;;
-;;; *** ***
-;;; *** DIRECTIONS FOR INSTALLING CLOS AT YOUR SITE ***
-;;; *** ***
-;;;
-;;; To get CLOS working at your site you should:
-;;;
-;;; - Get all the CLOS source files from Xerox. The complete list of source
-;;; file names can be found in the defsystem for CLOS which appears towards
-;;; the end of this file.
-;;;
-;;; - Edit the variable *clos-directory* below to specify the directory at
-;;; your site where the clos sources and binaries will be. This variable
-;;; can be found by searching from this point for the string "***" in
-;;; this file.
-;;;
-;;; - Use the function (clos::compile-clos) to compile CLOS for your site.
-;;;
-;;; - Once CLOS has been compiled it can be loaded with (clos::load-clos).
-;;; Note that CLOS cannot be loaded on top of itself, nor can it be
-;;; loaded into the same world it was compiled in.
-;;;
-
-(in-package "CLOS" :use (list (or (find-package :walker)
- (make-package :walker :use '(:lisp)))
- (or (find-package :iterate)
- (make-package :iterate
- :use '(:lisp :walker)))
- (find-package :lisp)))
-
-(export (intern (symbol-name :iterate) ;Have to do this here,
- (find-package :iterate)) ;because in the defsystem
- (find-package :iterate)) ;(later in this file)
- ;we use the symbol iterate
- ;to name the file
-
-;;;
-;;; Sure, its weird for this to be here, but in order to follow the rules
-;;; about order of export and all that stuff, we can't put it in PKG before
-;;; we want to use it.
-;;;
-(defvar *the-clos-package* (find-package :clos))
-
-(defvar *clos-system-date* "5/10/91 Interim CLOS release")
-
-
-;;;
-;;; Various hacks to get people's *features* into better shape.
-;;;
-(eval-when (compile load eval)
- #+(and Symbolics Lispm)
- (multiple-value-bind (major minor) (sct:get-release-version)
- (etypecase minor
- (integer)
- (string (setf minor (parse-integer minor :junk-allowed t))))
- (pushnew :genera *features*)
- (ecase major
- ((6)
- (pushnew :genera-release-6 *features*))
- ((7)
- (pushnew :genera-release-7 *features*)
- (ecase minor
- ((0 1) (pushnew :genera-release-7-1 *features*))
- ((2) (pushnew :genera-release-7-2 *features*))
- ((3) (pushnew :genera-release-7-3 *features*))
- ((4) (pushnew :genera-release-7-4 *features*))))
- ((8)
- (pushnew :genera-release-8 *features*)
- (ecase minor
- ((0) (pushnew :genera-release-8-0 *features*))
- ((1) (pushnew :genera-release-8-1 *features*))))))
-
- #+CLOE-Runtime
- (let ((version (lisp-implementation-version)))
- (when (string-equal version "2.0" :end1 (min 3 (length version)))
- (pushnew :cloe-release-2 *features*)))
-
- (dolist (feature *features*)
- (when (and (symbolp feature) ;3600!!
- (equal (symbol-name feature) "CMU"))
- (pushnew :CMU *features*)))
-
- #+TI
- (if (eq (si:local-binary-file-type) :xld)
- (pushnew ':ti-release-3 *features*)
- (pushnew ':ti-release-2 *features*))
-
- #+Lucid
- (when (search "IBM RT PC" (machine-type))
- (pushnew :ibm-rt-pc *features*))
-
- #+ExCL
- (cond ((search "sun3" (lisp-implementation-version))
- (push :sun3 *features*))
- ((search "sun4" (lisp-implementation-version))
- (push :sun4 *features*)))
-
- #+(and HP Lucid)
- (push :HP-Lucid *features*)
- #+(and HP (not Lucid))
- (push :HP-HPLabs *features*)
-
- #+Xerox
- (case il:makesysname
- (:lyric (push :Xerox-Lyric *features*))
- (otherwise (pushnew :Xerox-Medley *features*)))
-;;;
-;;; For KCL and IBCL, push the symbol :turbo-closure on the list *features*
-;;; if you have installed turbo-closure patch. See the file kcl-mods.text
-;;; for details.
-;;;
-;;; The xkcl version of KCL has this fixed already.
-;;;
-
- #+xkcl(pushnew :turbo-closure *features*)
-
- )
-
-
-
-;;; Yet Another Sort Of General System Facility and friends.
-;;;
-;;; The entry points are defsystem and operate-on-system. defsystem is used
-;;; to define a new system and the files with their load/compile constraints.
-;;; Operate-on-system is used to operate on a system defined that has been
-;;; defined by defsystem. For example:
-#||
-
-(defsystem my-very-own-system
- "/usr/myname/lisp/"
- ((classes (precom) () ())
- (methods (precom classes) (classes) ())
- (precom () (classes methods) (classes methods))))
-
-This defsystem should be read as follows:
-
-* Define a system named MY-VERY-OWN-SYSTEM, the sources and binaries
- should be in the directory "/usr/me/lisp/". There are three files
- in the system, there are named classes, methods and precom. (The
- extension the filenames have depends on the lisp you are running in.)
-
-* For the first file, classes, the (precom) in the line means that
- the file precom should be loaded before this file is loaded. The
- first () means that no other files need to be loaded before this
- file is compiled. The second () means that changes in other files
- don't force this file to be recompiled.
-
-* For the second file, methods, the (precom classes) means that both
- of the files precom and classes must be loaded before this file
- can be loaded. The (classes) means that the file classes must be
- loaded before this file can be compiled. The () means that changes
- in other files don't force this file to be recompiled.
-
-* For the third file, precom, the first () means that no other files
- need to be loaded before this file is loaded. The first use of
- (classes methods) means that both classes and methods must be
- loaded before this file can be compiled. The second use of (classes
- methods) mean that whenever either classes or methods changes precom
- must be recompiled.
-
-Then you can compile your system with:
-
- (operate-on-system 'my-very-own-system :compile)
-
-and load your system with:
-
- (operate-on-system 'my-very-own-system :load)
-
-||#
-
-;;;
-(defvar *system-directory*)
-
-;;;
-;;; *port* is a list of symbols (in the CLOS package) which represent the
-;;; Common Lisp in which we are now running. Many of the facilities in
-;;; defsys use the value of *port* rather than #+ and #- to conditionalize
-;;; the way they work.
-;;;
-(defvar *port*
- '(#+Genera Genera
-; #+Genera-Release-6 Rel-6
-; #+Genera-Release-7-1 Rel-7
- #+Genera-Release-7-2 Rel-7
- #+Genera-Release-7-3 Rel-7
- #+Genera-Release-7-1 Rel-7-1
- #+Genera-Release-7-2 Rel-7-2
- #+Genera-Release-7-3 Rel-7-2 ;OK for now
- #+Genera-Release-7-4 Rel-7-2 ;OK for now
- #+Genera-Release-8 Rel-8
- #+imach Ivory
- #+Cloe-Runtime Cloe
- #+Lucid Lucid
- #+Xerox Xerox
- #+Xerox-Lyric Xerox-Lyric
- #+Xerox-Medley Xerox-Medley
- #+TI TI
- #+(and dec vax common) Vaxlisp
- #+KCL KCL
- #+IBCL IBCL
- #+excl excl
- #+(and excl sun4) excl-sun4
- #+:CMU CMU
- #+HP-HPLabs HP-HPLabs
- #+:gclisp gclisp
- #+pyramid pyramid
- #+:coral coral))
-
-;;;
-;;; When you get a copy of CLOS (by tape or by FTP), the sources files will
-;;; have extensions of ".lisp" in particular, this file will be defsys.lisp.
-;;; The preferred way to install clos is to rename these files to have the
-;;; extension which your lisp likes to use for its files. Alternately, it
-;;; is possible not to rename the files. If the files are not renamed to
-;;; the proper convention, the second line of the following defvar should
-;;; be changed to:
-;;; (let ((files-renamed-p nil)
-;;;
-;;; Note: Something people installing CLOS on a machine running Unix
-;;; might find useful. If you want to change the extensions
-;;; of the source files from ".lisp" to ".lsp", *all* you have
-;;; to do is the following:
-;;;
-;;; % foreach i (*.lisp)
-;;; ? mv $i $i:r.lsp
-;;; ? end
-;;; %
-;;;
-;;; I am sure that a lot of people already know that, and some
-;;; Unix hackers may say, "jeez who doesn't know that". Those
-;;; same Unix hackers are invited to fix mv so that I can type
-;;; "mv *.lisp *.lsp".
-;;;
-(defvar *pathname-extensions*
- (let ((files-renamed-p t)
- (proper-extensions
- (car
- '(#+(and Genera (not imach)) ("lisp" . "bin")
- #+(and Genera imach) ("lisp" . "ibin")
- #+Cloe-Runtime ("l" . "fasl")
- #+(and dec common vax (not ultrix)) ("LSP" . "FAS")
- #+(and dec common vax ultrix) ("lsp" . "fas")
- #+KCL ("lsp" . "o")
- #+IBCL ("lsp" . "o")
- #+Xerox ("lisp" . "dfasl")
- #+(and Lucid MC68000) ("lisp" . "lbin")
- #+(and Lucid VAX) ("lisp" . "vbin")
- #+(and Lucid Prime) ("lisp" . "pbin")
- #+(and Lucid SUNRise) ("lisp" . "sbin")
- #+(and Lucid SPARC) ("lisp" . "sbin")
- #+(and Lucid IBM-RT-PC) ("lisp" . "bbin")
- #+(and Lucid MIPS) ("lisp" . "mbin")
- #+(and Lucid PRISM) ("lisp" . "abin")
- #+(and Lucid PA) ("lisp" . "hbin")
- #+excl ("cl" . "fasl")
- #+:CMU ("slisp" . "sfasl")
- #+HP ("l" . "b")
- #+TI ("lisp" . #.(string (si::local-binary-file-type)))
- #+:gclisp ("LSP" . "F2S")
- #+pyramid ("clisp" . "o")
- #+:coral ("lisp" . "fasl")
- ))))
- (cond ((null proper-extensions) '("l" . "lbin"))
- ((null files-renamed-p) (cons "lisp" (cdr proper-extensions)))
- (t proper-extensions))))
-
-(eval-when (compile load eval)
-
-(defun get-system (name)
- (get name 'system-definition))
-
-(defun set-system (name new-value)
- (setf (get name 'system-definition) new-value))
-
-(defmacro defsystem (name directory files)
- `(set-system ',name (list #'(lambda () ,directory)
- (make-modules ',files)
- ',(mapcar #'car files))))
-
-)
-
-
-;;;
-;;; The internal datastructure used when operating on a system.
-;;;
-(defstruct (module (:constructor make-module (name))
- (:print-function
- (lambda (m s d)
- (declare (ignore d))
- (format s "#" (module-name m)))))
- name
- load-env
- comp-env
- recomp-reasons)
-
-(defun make-modules (system-description)
- (let ((modules ()))
- (labels ((get-module (name)
- (or (find name modules :key #'module-name)
- (progn (setq modules (cons (make-module name) modules))
- (car modules))))
- (parse-spec (spec)
- (if (eq spec 't)
- (reverse (cdr modules))
- (case (car spec)
- (+ (append (reverse (cdr modules)) (mapcar #'get-module (cdr spec))))
- (- (let ((rem (mapcar #'get-module (cdr spec))))
- (remove-if #'(lambda (m) (member m rem)) (reverse (cdr modules)))))
- (otherwise (mapcar #'get-module spec))))))
- (dolist (file system-description)
- (let* ((name (car file))
- (port (car (cddddr file)))
- (module nil))
- (when (or (null port)
- (member port *port*))
- (setq module (get-module name))
- (setf (module-load-env module) (parse-spec (cadr file))
- (module-comp-env module) (parse-spec (caddr file))
- (module-recomp-reasons module) (parse-spec
- (cadddr file))))))
- (let ((filenames (mapcar #'car system-description)))
- (sort modules #'(lambda (name1 name2)
- (member name2 (member name1 filenames)))
- :key #'module-name)))))
-
-
-(defun make-transformations (modules filter make-transform)
- (let ((transforms (list nil)))
- (dolist (m modules)
- (when (funcall filter m transforms) (funcall make-transform m transforms)))
- (reverse (cdr transforms))))
-
-(defun make-compile-transformation (module transforms)
- (unless (dolist (trans transforms)
- (and (eq (car trans) ':compile)
- (eq (cadr trans) module)
- (return t)))
- (dolist (c (module-comp-env module)) (make-load-transformation c transforms))
- (setf (cdr transforms)
- (remove-if #'(lambda (trans) (and (eq (car trans) :load) (eq (cadr trans) module)))
- (cdr transforms)))
- (push `(:compile ,module) (cdr transforms))))
-
-(defvar *being-loaded* ())
-
-(defun make-load-transformation (module transforms)
- (if (assoc module *being-loaded*)
- (throw module (setf (cdr transforms) (cdr (assoc module *being-loaded*))))
- (let ((*being-loaded* (cons (cons module (cdr transforms)) *being-loaded*)))
- (catch module
- (unless (dolist (trans transforms)
- (when (and (eq (car trans) ':load)
- (eq (cadr trans) module))
- (return t)))
- (dolist (l (module-load-env module)) (make-load-transformation l transforms))
- (push `(:load ,module) (cdr transforms)))))))
-
-(defun make-load-without-dependencies-transformation (module transforms)
- (unless (dolist (trans transforms)
- (and (eq (car trans) ':load)
- (eq (cadr trans) module)
- (return trans)))
- (push `(:load ,module) (cdr transforms))))
-
-(defun compile-filter (module transforms)
- (or (dolist (r (module-recomp-reasons module))
- (when (dolist (transform transforms)
- (when (and (eq (car transform) ':compile)
- (eq (cadr transform) r))
- (return t)))
- (return t)))
- (null (probe-file (make-binary-pathname (module-name module))))
- (> (file-write-date (make-source-pathname (module-name module)))
- (file-write-date (make-binary-pathname (module-name module))))))
-
-(defun operate-on-system (name mode &optional arg print-only)
- (let ((system (get-system name)))
- (unless system (error "Can't find system with name ~S." name))
- (let ((*system-directory* (funcall (car system)))
- (modules (cadr system))
- (transformations ()))
- (labels ((load-source (name pathname)
- (format t "~&Loading source of ~A..." name)
- (or print-only (load pathname)))
- (load-binary (name pathname)
- (format t "~&Loading binary of ~A..." name)
- (or print-only (load pathname)))
- (load-module (m)
- (let* ((name (module-name m))
- (*load-verbose* nil)
- (binary (make-binary-pathname name)))
- (load-binary name binary)))
- (compile-module (m)
- (format t "~&Compiling ~A..." (module-name m))
- (unless print-only
- (let ((name (module-name m)))
- (compile-file (make-source-pathname name)
- :output-file
- (make-pathname :defaults
- (make-binary-pathname name)
- :version :newest)))))
- (xcl:true (&rest ignore) (declare (ignore ignore)) 't))
-
- (setq transformations
- (ecase mode
- (:compile
- ;; Compile any files that have changed and any other files
- ;; that require recompilation when another file has been
- ;; recompiled.
- (make-transformations
- modules
- #'compile-filter
- #'make-compile-transformation))
- (:recompile
- ;; Force recompilation of all files.
- (make-transformations
- modules
- #'xcl:true
- #'make-compile-transformation))
- (:recompile-some
- ;; Force recompilation of some files. Also compile the
- ;; files that require recompilation when another file has
- ;; been recompiled.
- (make-transformations
- modules
- #'(lambda (m transforms)
- (or (member (module-name m) arg)
- (compile-filter m transforms)))
- #'make-compile-transformation))
- (:query-compile
- ;; Ask the user which files to compile. Compile those
- ;; and any other files which must be recompiled when
- ;; another file has been recompiled.
- (make-transformations
- modules
- #'(lambda (m transforms)
- (or (compile-filter m transforms)
- (y-or-n-p "Compile ~A?"
- (module-name m))))
- #'make-compile-transformation))
- (:confirm-compile
- ;; Offer the user a chance to prevent a file from being
- ;; recompiled.
- (make-transformations
- modules
- #'(lambda (m transforms)
- (and (compile-filter m transforms)
- (y-or-n-p "Go ahead and compile ~A?"
- (module-name m))))
- #'make-compile-transformation))
- (:load
- ;; Load the whole system.
- (make-transformations
- modules
- #'xcl:true
- #'make-load-transformation))
- (:query-load
- ;; Load only those files the user says to load.
- (make-transformations
- modules
- #'(lambda (m transforms)
- (declare (ignore transforms))
- (y-or-n-p "Load ~A?" (module-name m)))
- #'make-load-without-dependencies-transformation))))
-
- (#+Genera
- compiler:compiler-warnings-context-bind
- #+TI
- COMPILER:COMPILER-WARNINGS-CONTEXT-BIND
- #+:LCL3.0
- lucid-common-lisp:with-deferred-warnings
- #-(or Genera TI :LCL3.0)
- progn
- (loop (when (null transformations) (return t))
- (let ((transform (pop transformations)))
- (ecase (car transform)
- (:compile (compile-module (cadr transform)))
- (:load (load-module (cadr transform)))))))))))
-
-
-(defun make-source-pathname (name) (make-pathname-internal name :source))
-(defun make-binary-pathname (name) (make-pathname-internal name :binary))
-
-(defun make-pathname-internal (name type)
- (let* ((extension (ecase type
- (:source (car *pathname-extensions*))
- (:binary (cdr *pathname-extensions*))))
- (directory (pathname
- (etypecase *system-directory*
- (string *system-directory*)
- (pathname *system-directory*)
- (cons (ecase type
- (:source (car *system-directory*))
- (:binary (cdr *system-directory*)))))))
- (pathname
- (make-pathname
- :name (string-downcase (string name))
- :type extension
- :defaults directory :version :newest)))
-
- #+Genera
- (setq pathname (zl:send pathname :new-raw-name (pathname-name pathname))
- pathname (zl:send pathname :new-raw-type (pathname-type pathname)))
-
- pathname))
-
-
-
-;;; *** SITE SPECIFIC CLOS DIRECTORY ***
-;;;
-;;; *clos-directory* is a variable which specifies the directory clos is stored
-;;; in at your site. If the value of the variable is a single pathname, the
-;;; sources and binaries should be stored in that directory. If the value of
-;;; that directory is a cons, the CAR should be the source directory and the
-;;; CDR should be the binary directory.
-;;;
-;;; By default, the value of *clos-directory* is set to the directory that
-;;; this file is loaded from. This makes it simple to keep multiple copies
-;;; of CLOS in different places, just load defsys from the same directory as
-;;; the copy of CLOS you want to use.
-;;;
-;;; Note that the value of *CLOS-DIRECTORY* is set using a DEFVAR. This is
-;;; done to make it possible for users to set it in their init file and then
-;;; load this file. The value set in the init file will override the value
-;;; here.
-;;;
-;;; *** ***
-
-(defun load-truename (&optional (errorp nil))
- (flet ((bad-time ()
- (when errorp
- (error "LOAD-TRUENAME called but a file isn't being loaded."))))
- #+Lispm (or sys:fdefine-file-pathname (bad-time))
- #+excl excl::*source-pathname*
- #+Xerox (pathname (or (il:fullname *standard-input*) (bad-time)))
- #+(and dec vax common) (truename (sys::source-file #'load-truename))
- ;;
- ;; The following use of `lucid::' is a kludge for 2.1 and 3.0
- ;; compatibility. In 2.1 it was in the SYSTEM package, and i
- ;; 3.0 it's in the LUCID-COMMON-LISP package.
- ;;
- #+LUCID (or lucid::*source-pathname* (bad-time))
- #-(or Lispm excl Xerox (and dec vax common) LUCID) nil))
-
-#-Symbolics
-(defvar *clos-directory*
- (or (load-truename t)
- (error "Because load-truename is not implemented in this port~%~
- of CLOS, you must manually edit the definition of the~%~
- variable *clos-directory* in the file defsys.lisp.")))
-
-#+Genera
-(defvar *clos-directory*
- (let ((source (load-truename t)))
- (flet ((subdir (name)
- (scl:send source :new-pathname :raw-directory
- (append (scl:send source :raw-directory)
- (list name)))))
- (cons source
- #+genera-release-7-2 (subdir "rel-7-2")
- #+genera-release-7-3 (subdir "rel-7-3")
- #+genera-release-7-4 (subdir "rel-7-4")
- #+genera-release-8-0 (subdir "rel-8-0")
- #+genera-release-8-1 (subdir "rel-8-1")
- ))))
-
-#+Cloe-Runtime
-(defvar *clos-directory* (pathname "/usr3/hornig/clos/"))
-
-(defsystem clos
- *clos-directory*
- ;;
- ;; file load compile files which port
- ;; environment environment force the of
- ;; recompilation
- ;; of this file
- ;;
- (
- (patch t t () xerox)
- (pkg t t ())
- (walk (pkg) (pkg) ())
- (iterate t t ())
- (macros t t ())
- (low (pkg macros) t (macros))
- (low2 (low) (low) (low) Xerox)
- (fin t t (low))
- (defclass t t (low))
- (defs t t (defclass macros iterate))
- (fngen t t (low))
- (lap t t (low))
- (plap t t (low))
- (cache t t (low defs))
- (dlap t t (defs low fin cache lap))
- (boot t t (defs fin))
- (vector t t (boot defs cache fin))
- (slots t t (vector boot defs low cache fin))
- (init t t (vector boot defs low cache fin))
- (std-class t t (vector boot defs low cache fin slots))
- (cpl t t (vector boot defs low cache fin slots))
- (braid t t (boot defs low fin cache))
- (fsc t t (defclass boot defs low fin cache))
- (methods t t (defclass boot defs low fin cache))
- (combin t t (defclass boot defs low fin cache))
- (dfun t t (dlap))
- (fixup (+ precom1 precom2 precom4) t (boot defs low fin))
- (defcombin t t (defclass boot defs low fin))
- (ctypes t t (defclass defcombin))
- (construct t t (defclass boot defs low))
- (env t t (defclass boot defs low fin))
- (compat t t ())
- (precom1 (dlap) t (defs low cache fin dfun))
- (precom2 (dlap) t (defs low cache fin dfun))
- (precom4 (dlap) t (defs low cache fin dfun))
- ))
-
-(defun compile-clos (&optional m)
- (let (#+:coral(ccl::*warn-if-redefine-kernel* nil)
- #+Lucid (lcl:*redefinition-action* nil)
- #+excl (excl::*redefinition-warnings* nil)
- #+Genera (sys:inhibit-fdefine-warnings t)
- )
- (cond ((null m) (operate-on-system 'clos :compile))
- ((eq m :print) (operate-on-system 'clos :compile () t))
- ((eq m :query) (operate-on-system 'clos :query-compile))
- ((eq m :confirm) (operate-on-system 'clos :confirm-compile))
- ((eq m 't) (operate-on-system 'clos :recompile))
- ((listp m) (operate-on-system 'clos :compile-from m))
- ((symbolp m) (operate-on-system 'clos :recompile-some `(,m))))))
-
-(defun load-clos (&optional m)
- (let (#+:coral(ccl::*warn-if-redefine-kernel* nil)
- #+Lucid (lcl:*redefinition-action* nil)
- #+excl (excl::*redefinition-warnings* nil)
- #+Genera (sys:inhibit-fdefine-warnings t)
- )
- (cond ((null m) (operate-on-system 'clos :load))
- ((eq m :query) (operate-on-system 'clos :query-load)))
- (pushnew :clos *features*)))
-
-#+Genera
-;;; Make sure Genera bug mail contains the CLOS bug data. A little
-;;; kludgy, but what the heck. If they didn't mean for people to do
-;;; this, they wouldn't have made private patch notes be flavored
-;;; objects, right? Right.
-(progn
- (scl:defflavor clos-private-patch-info ((description)) ())
- (scl:defmethod (sct::private-patch-info-description clos-private-patch-info) ()
- (or description
- (setf description (string-append "CLOS version: " *clos-system-date*))))
- (scl:defmethod (sct::private-patch-info-pathname clos-private-patch-info) ()
- *clos-directory*)
- (unless (find-if #'(lambda (x) (typep x 'clos-private-patch-info))
- sct::*private-patch-info*)
- (push (scl:make-instance 'clos-private-patch-info)
- sct::*private-patch-info*)))
-
-(defun bug-report-info (&optional (stream *standard-output*))
- (format stream "~&CLOS system date: ~A~
- ~&Lisp Implementation type: ~A~
- ~&Lisp Implementation version: ~A~
- ~&*features*: ~S"
- *clos-system-date*
- (lisp-implementation-type)
- (lisp-implementation-version)
- *features*))
-
-
-
-;;;;
-;;;
-;;; This stuff is not intended for external use.
-;;;
-(defun rename-clos ()
- (dolist (f (cadr (get-system 'clos)))
- (let ((old nil)
- (new nil))
- (let ((*system-directory* *default-pathname-defaults*))
- (setq old (make-source-pathname (car f))))
- (setq new (make-source-pathname (car f)))
- (rename-file old new))))
-
-#+Genera
-(defun edit-clos ()
- (dolist (f (cadr (get-system 'clos)))
- (let ((*system-directory* *clos-directory*))
- (zwei:find-file (make-source-pathname (car f))))))
-
-#+Genera
-(defun hardcopy-clos (&optional query-p)
- (let ((files (mapcar #'(lambda (f)
- (setq f (car f))
- (and (or (not query-p)
- (y-or-n-p "~A? " f))
- f))
- (cadr (get-system 'clos))))
- (b zwei:*interval*))
- (unwind-protect
- (dolist (f files)
- (when f
- (multiple-value-bind (ignore b)
- (zwei:find-file (make-source-pathname f))
- (zwei:hardcopy-buffer b))))
- (zwei:make-buffer-current b))))
-
-
-;;;
-;;; unido!ztivax!dae@seismo.css.gov
-;;; z30083%tansei.cc.u-tokyo.junet@utokyo-relay.csnet
-;;; Victor@carmen.uu.se
-;;; mcvax!harlqn.co.uk!chris@uunet.UU.NET
-;;;
-#+Genera
-(defun mail-clos (to)
- (let* ((original-buffer zwei:*interval*)
- (*system-directory* (pathname "vaxc:/user/ftp/pub/clos/")
- ;(funcall (car (get-system 'clos)))
- )
- (files (list* 'defsys
- 'test
- (caddr (get-system 'clos))))
- (total-number (length files))
- (file nil)
- (number-of-lines 0)
- (i 0)
- (mail-buffer nil))
- (unwind-protect
- (loop
- (when (null files) (return nil))
- (setq file (pop files))
- (incf i)
- (multiple-value-bind (ignore b)
- (zwei:find-file (make-source-pathname file))
- (setq number-of-lines (zwei:count-lines b))
- (zwei:com-mail-internal t
- :initial-to to
- :initial-body b
- :initial-subject
- (format nil
- "CLOS file ~A (~A of ~A) ~D lines"
- file i total-number number-of-lines))
- (setq mail-buffer zwei:*interval*)
- (zwei:com-exit-com-mail)
- (format t "~&Just sent ~A (~A of ~A)." b i total-number)
- (zwei:kill-buffer mail-buffer)))
- (zwei:make-buffer-current original-buffer))))
-
-
diff --git a/obsolete/clos/2.0/dfun.lisp b/obsolete/clos/2.0/dfun.lisp
deleted file mode 100644
index 1e958a30..00000000
--- a/obsolete/clos/2.0/dfun.lisp
+++ /dev/null
@@ -1,606 +0,0 @@
-;;;-*- Package: CLOS; Syntax: Common-Lisp; Base: 10 -*-
-
-;;;. Copyright (c) 1991 by Venue
-
-(in-package "CLOS")
-
-
- ; ************************************************************************
- ; temporary for data gathering
- ; temporary for data gathering
- ; ************************************************************************
-
-
-(defvar *dfun-states* (make-hash-table :test #'eq))
-
-(defun notice-dfun-state (generic-function state &optional nkeys valuep)
- (setf (gethash generic-function *dfun-states*)
- (cons state (when nkeys (list nkeys valuep)))))
-
-
- ; ************************************************************************
- ; temporary for data gathering
- ; temporary for data gathering
- ; ************************************************************************
-
-
-(defvar *dfun-constructors* nil)
-
- ; An alist in which each entry is of
- ; the form ( . (
- ; ...)) Each subentry is of the form:
- ; ( )
-
-
-(defvar *enable-dfun-constructor-caching* t)
-
- ; If this is NIL, then the whole
- ; mechanism for caching dfun
- ; constructors is turned off. The only
- ; time that makes sense is when
- ; debugging LAP code.
-
-
-(defun show-dfun-constructors nil (format t "~&DFUN constructor caching is ~A." (if
- *enable-dfun-constructor-caching*
- "enabled"
- "disabled"))
- (dolist (generator-entry *dfun-constructors*)
- (dolist (args-entry (cdr generator-entry))
- (format t "~&~S ~S" (cons (car generator-entry)
- (caar args-entry))
- (caddr args-entry)))))
-
-(defun get-dfun-constructor (generator &rest args)
- (let* ((generator-entry (assq generator *dfun-constructors*))
- (args-entry (assoc args (cdr generator-entry)
- :test
- #'equal)))
- (if (null *enable-dfun-constructor-caching*)
- (apply (symbol-function generator)
- args)
- (or (cadr args-entry)
- (let ((new (apply (symbol-function generator)
- args)))
- (if generator-entry
- (push (list (copy-list args)
- new nil)
- (cdr generator-entry))
- (push (list generator (list (copy-list args)
- new nil))
- *dfun-constructors*))
- new)))))
-
-(defun load-precompiled-dfun-constructor (generator args system constructor)
- (let* ((generator-entry (assq generator *dfun-constructors*))
- (args-entry (assoc args (cdr generator-entry)
- :test
- #'equal)))
- (unless args-entry
- (if generator-entry
- (push (list args constructor system)
- (cdr generator-entry))
- (push (list generator (list args constructor system))
- *dfun-constructors*)))))
-
-(defmacro
- precompile-dfun-constructors
- (&optional system)
- (let
- ((*precompiling-lap* t))
- `(progn
- ,@(gathering1 (collecting)
- (dolist (generator-entry *dfun-constructors*)
- (dolist (args-entry (cdr generator-entry))
- (when (or (null (caddr args-entry))
- (eq (caddr args-entry)
- system))
- (multiple-value-bind (closure-variables arguments iregs vregs tregs lap)
- (apply (symbol-function (car generator-entry))
- (car args-entry))
- (gather1 (make-top-level-form `(precompile-dfun-constructor
- ,(car generator-entry))
- '(load)
- `(load-precompiled-dfun-constructor
- ',(car generator-entry)
- ',(car args-entry)
- ',system
- (precompile-lap-closure-generator ,closure-variables
- ,arguments
- ,iregs
- ,vregs
- ,tregs
- ,lap))))))))))))
-
-(defun make-initial-dfun (generic-function)
- #'(lambda (&rest args)
- (initial-dfun args generic-function)))
-
-
-;;; When all the methods of a generic function are automatically generated reader or writer methods
-;;; a number of special optimizations are possible. These are important because of the large number
-;;; of generic functions of this type. There are a number of cases: ONE-CLASS-ACCESSOR In this case,
-;;; the accessor generic function has only been called with one class of argument. There is no
-;;; cache vector, the wrapper of the one class, and the slot index are stored directly as closure
-;;; variables of the discriminating function. This case can convert to either of the next kind.
-;;; TWO-CLASS-ACCESSOR Like above, but two classes. This is common enough to do specially. There is
-;;; no cache vector. The two classes are stored a separate closure variables. ONE-INDEX-ACCESSOR In
-;;; this case, the accessor generic function has seen more than one class of argument, but the index
-;;; of the slot is the same for all the classes that have been seen. A cache vector is used to
-;;; store the wrappers that have been seen, the slot index is stored directly as a closure variable
-;;; of the discriminating function. This case can convert to the next kind. N-N-ACCESSOR This is
-;;; the most general case. In this case, the accessor generic function has seen more than one class
-;;; of argument and more than one slot index. A cache vector stores the wrappers and corresponding
-;;; slot indexes. Because each cache line is more than one element long, a cache lock count is
-;;; used. ONE-CLASS-ACCESSOR
-
-
-(defun update-to-one-class-readers-dfun (generic-function wrapper index)
- (let ((constructor (get-dfun-constructor 'emit-one-class-reader (consp index))))
- (notice-dfun-state generic-function `(one-class readers ,(consp index)))
- ; ***
- (update-dfun generic-function (funcall constructor wrapper index
- #'(lambda (arg)
- (declare (clos-fast-call))
- (one-class-readers-miss arg
- generic-function index wrapper))))))
-
-(defun update-to-one-class-writers-dfun (generic-function wrapper index)
- (let ((constructor (get-dfun-constructor 'emit-one-class-writer (consp index))))
- (notice-dfun-state generic-function `(one-class writers ,(consp index)))
- ; ***
- (update-dfun generic-function (funcall constructor wrapper index
- #'(lambda (new-value arg)
- (declare (clos-fast-call))
- (one-class-writers-miss new-value arg
- generic-function index wrapper))))))
-
-(defun one-class-readers-miss (arg generic-function index wrapper)
- (accessor-miss generic-function 'one-class 'reader nil arg index wrapper nil nil nil))
-
-(defun one-class-writers-miss (new arg generic-function index wrapper)
- (accessor-miss generic-function 'one-class 'writer new arg index wrapper nil nil nil))
-
-
-;;; TWO-CLASS-ACCESSOR
-
-
-(defun update-to-two-class-readers-dfun (generic-function wrapper-0 wrapper-1 index)
- (let ((constructor (get-dfun-constructor 'emit-two-class-reader (consp index))))
- (notice-dfun-state generic-function `(two-class readers ,(consp index)))
- ; ***
- (update-dfun generic-function (funcall constructor wrapper-0 wrapper-1 index
- #'(lambda (arg)
- (declare (clos-fast-call))
- (two-class-readers-miss arg
- generic-function index wrapper-0
- wrapper-1))))))
-
-(defun update-to-two-class-writers-dfun (generic-function wrapper-0 wrapper-1 index)
- (let ((constructor (get-dfun-constructor 'emit-two-class-writer (consp index))))
- (notice-dfun-state generic-function `(two-class writers ,(consp index)))
- ; ***
- (update-dfun generic-function (funcall constructor wrapper-0 wrapper-1 index
- #'(lambda (new-value arg)
- (declare (clos-fast-call))
- (two-class-writers-miss new-value arg
- generic-function index wrapper-0
- wrapper-1))))))
-
-(defun two-class-readers-miss (arg generic-function index w0 w1)
- (accessor-miss generic-function 'two-class 'reader nil arg index w0 w1 nil nil))
-
-(defun two-class-writers-miss (new arg generic-function index w0 w1)
- (accessor-miss generic-function 'two-class 'writer new arg index w0 w1 nil nil))
-
-
-;;; std accessors same index dfun
-
-
-(defun update-to-one-index-readers-dfun (generic-function index &optional field cache)
- (unless field
- (setq field (wrapper-field 'number)))
- (let ((constructor (get-dfun-constructor 'emit-one-index-readers (consp index))))
- (multiple-value-bind (mask size)
- (compute-cache-parameters 1 nil (or cache 4))
- (unless cache
- (setq cache (get-cache size)))
- (notice-dfun-state generic-function `(one-index readers ,(consp index)))
- ; ***
- (update-dfun generic-function (funcall constructor field cache mask size index
- #'(lambda (arg)
- (declare (clos-fast-call))
- (one-index-readers-miss arg
- generic-function index field cache
- )))
- cache))))
-
-(defun update-to-one-index-writers-dfun (generic-function index &optional field cache)
- (unless field
- (setq field (wrapper-field 'number)))
- (let ((constructor (get-dfun-constructor 'emit-one-index-writers (consp index))))
- (multiple-value-bind (mask size)
- (compute-cache-parameters 1 nil (or cache 4))
- (unless cache
- (setq cache (get-cache size)))
- (notice-dfun-state generic-function `(one-index writers ,(consp index)))
- ; ***
- (update-dfun generic-function (funcall constructor field cache mask size index
- #'(lambda (new-value arg)
- (declare (clos-fast-call))
- (one-index-writers-miss new-value arg
- generic-function index field cache
- )))
- cache))))
-
-(defun one-index-readers-miss (arg gf index field cache)
- (accessor-miss gf 'one-index 'reader nil arg index nil nil field cache))
-
-(defun one-index-writers-miss (new arg gf index field cache)
- (accessor-miss gf 'one-index 'writer new arg index nil nil field cache))
-
-(defun one-index-limit-fn (nlines)
- (default-limit-fn nlines))
-
-(defun update-to-n-n-readers-dfun (generic-function &optional field cache)
- (unless field
- (setq field (wrapper-field 'number)))
- (let ((constructor (get-dfun-constructor 'emit-n-n-readers)))
- (multiple-value-bind (mask size)
- (compute-cache-parameters 1 t (or cache 2))
- (unless cache
- (setq cache (get-cache size)))
- (notice-dfun-state generic-function `(n-n readers))
- ; ***
- (update-dfun generic-function (funcall constructor field cache mask size
- #'(lambda (arg)
- (declare (clos-fast-call))
- (n-n-readers-miss arg generic-function
- field cache)))
- cache))))
-
-(defun update-to-n-n-writers-dfun (generic-function &optional field cache)
- (unless field
- (setq field (wrapper-field 'number)))
- (let ((constructor (get-dfun-constructor 'emit-n-n-writers)))
- (multiple-value-bind (mask size)
- (compute-cache-parameters 1 t (or cache 2))
- (unless cache
- (setq cache (get-cache size)))
- (notice-dfun-state generic-function `(n-n writers))
- ; ***
- (update-dfun generic-function (funcall constructor field cache mask size
- #'(lambda (new arg)
- (declare (clos-fast-call))
- (n-n-writers-miss new arg
- generic-function field cache)))
- cache))))
-
-(defun n-n-readers-miss (arg gf field cache)
- (accessor-miss gf 'n-n 'reader nil arg nil nil nil field cache))
-
-(defun n-n-writers-miss (new arg gf field cache)
- (accessor-miss gf 'n-n 'writer new arg nil nil nil field cache))
-
-(defun n-n-accessors-limit-fn (nlines)
- (default-limit-fn nlines))
-
-
-;;;
-
-
-(defun update-to-checking-dfun (generic-function function &optional field cache)
- (unless field
- (setq field (wrapper-field 'number)))
- (let* ((arg-info (gf-arg-info generic-function))
- (metatypes (arg-info-metatypes arg-info))
- (applyp (arg-info-applyp arg-info))
- (nkeys (arg-info-nkeys arg-info)))
- (if (every #'(lambda (mt)
- (eq mt 't))
- metatypes)
- (progn (notice-dfun-state generic-function `(default-method-only))
- ; ***
- (update-dfun generic-function function))
- (multiple-value-bind (mask size)
- (compute-cache-parameters nkeys nil (or cache 2))
- (unless cache
- (setq cache (get-cache size)))
- (let ((constructor (get-dfun-constructor 'emit-checking metatypes applyp)))
- (notice-dfun-state generic-function '(checking)
- nkeys nil)
- ; ****
- (update-dfun generic-function
- (funcall constructor field cache mask size function
- #'(lambda (&rest args)
- (declare (clos-fast-call))
- (checking-miss generic-function args function field
- cache)))
- cache))))))
-
-(defun checking-limit-fn (nlines)
- (default-limit-fn nlines))
-
-
-;;;
-
-
-(defun update-to-caching-dfun (generic-function &optional field cache)
- (unless field
- (setq field (wrapper-field 'number)))
- (let* ((arg-info (gf-arg-info generic-function))
- (metatypes (arg-info-metatypes arg-info))
- (applyp (arg-info-applyp arg-info))
- (nkeys (arg-info-nkeys arg-info))
- (constructor (get-dfun-constructor 'emit-caching metatypes applyp)))
- (multiple-value-bind (mask size)
- (compute-cache-parameters nkeys t (or cache 2))
- (unless cache
- (setq cache (get-cache size)))
- (notice-dfun-state generic-function '(caching)
- nkeys t)
- ; ****
- (update-dfun generic-function (funcall constructor field cache mask size
- #'(lambda (&rest args)
- (declare (clos-fast-call))
- (caching-miss generic-function args
- field cache)))
- cache))))
-
-(defun caching-limit-fn (nlines)
- (default-limit-fn nlines))
-
-
-;;; The dynamically adaptive method lookup algorithm is implemented is implemented as a kind of
-;;; state machine. The kinds of discriminating function is the state, the various kinds of reasons
-;;; for a cache miss are the state transitions. The code which implements the transitions is all in
-;;; the miss handlers for each kind of dfun. Those appear here. Note that within the states that
-;;; cache, there are dfun updates which simply select a new cache or cache field. Those are not
-;;; considered as state transitions.
-
-
-(defun initial-dfun (args generic-function)
- (protect-cache-miss-code generic-function args
- (multiple-value-bind (wrappers invalidp nfunction applicable)
- (cache-miss-values generic-function args)
- (multiple-value-bind (ntype nindex)
- (accessor-miss-values generic-function applicable args)
- (cond ((null applicable)
- (apply #'no-applicable-method generic-function args))
- (invalidp (apply nfunction args))
- ((and ntype nindex)
- (ecase ntype
- (reader (update-to-one-class-readers-dfun generic-function wrappers
- nindex))
- (writer (update-to-one-class-writers-dfun generic-function wrappers
- nindex)))
- (apply nfunction args))
- (ntype (apply nfunction args))
- (t (update-to-checking-dfun generic-function nfunction)
- (apply nfunction args)))))))
-
-(defun
- accessor-miss
- (gf ostate otype new object oindex ow0 ow1 field cache)
- (declare (ignore ow1))
- (let ((args (ecase otype ; The congruence rules assure
- (reader (list object)) ; us that this is safe despite
- (writer (list new object)))))
- ; not knowing the new type yet.
- (protect-cache-miss-code
- gf args
- (multiple-value-bind (wrappers invalidp nfunction applicable)
- (cache-miss-values gf args)
- (multiple-value-bind (ntype nindex)
- (accessor-miss-values gf applicable args)
-
- ;; The following lexical functions change the state of the dfun to that which is their
- ;; name. They accept arguments which are the parameters of the new state, and get other
- ;; information from the lexical variables bound above.
- (flet ((two-class (index w0 w1)
- (when (zerop (random 2))
- (psetf w0 w1 w1 w0))
- (ecase ntype
- (reader (update-to-two-class-readers-dfun gf w0 w1 index))
- (writer (update-to-two-class-writers-dfun gf w0 w1 index))))
- (one-index (index &optional field cache)
- (ecase ntype
- (reader (update-to-one-index-readers-dfun gf index field cache))
- (writer (update-to-one-index-writers-dfun gf index field cache))))
- (n-n (&optional field cache)
- (ecase ntype
- (reader (update-to-n-n-readers-dfun gf field cache))
- (writer (update-to-n-n-writers-dfun gf field cache))))
- (checking nil (update-to-checking-dfun gf nfunction))
-
- ;;
- (do-fill (valuep limit-fn update-fn)
- (multiple-value-bind (nfield ncache)
- (fill-cache field cache 1 valuep limit-fn wrappers nindex)
- (unless (and (= nfield field)
- (eq ncache cache))
- (funcall update-fn nfield ncache)))))
- (cond ((null nfunction)
- (apply #'no-applicable-method gf args))
- ((null ntype)
- (checking)
- (apply nfunction args))
- ((or invalidp (null nindex))
- (apply nfunction args))
- ((not (or (std-instance-p object)
- (fsc-instance-p object)))
- (checking)
- (apply nfunction args))
- ((neq ntype otype)
- (checking)
- (apply nfunction args))
- (t (ecase ostate
- (one-class (if (eql nindex oindex)
- (two-class nindex ow0 wrappers)
- (n-n)))
- (two-class (if (eql nindex oindex)
- (one-index nindex)
- (n-n)))
- (one-index (if (eql nindex oindex)
- (do-fill nil #'one-index-limit-fn
- #'(lambda (nfield ncache)
- (one-index nindex nfield ncache)))
- (n-n)))
- (n-n (unless (consp nindex)
- (do-fill t #'n-n-accessors-limit-fn #'n-n))))
- (apply nfunction args)))))))))
-
-(defun checking-miss (generic-function args ofunction field cache)
- (protect-cache-miss-code generic-function args
- (let* ((arg-info (gf-arg-info generic-function))
- (nkeys (arg-info-nkeys arg-info)))
- (multiple-value-bind (wrappers invalidp nfunction)
- (cache-miss-values generic-function args)
- (cond (invalidp (apply nfunction args))
- ((null nfunction)
- (apply #'no-applicable-method generic-function args))
- ((eq ofunction nfunction)
- (multiple-value-bind (nfield ncache)
- (fill-cache field cache nkeys nil #'checking-limit-fn wrappers nil)
- (unless (and (= nfield field)
- (eq ncache cache))
- (update-to-checking-dfun generic-function nfunction nfield
- ncache)))
- (apply nfunction args))
- (t (update-to-caching-dfun generic-function)
- (apply nfunction args)))))))
-
-(defun caching-miss (generic-function args ofield ocache)
- (protect-cache-miss-code generic-function args
- (let* ((arg-info (gf-arg-info generic-function))
- (nkeys (arg-info-nkeys arg-info)))
- (multiple-value-bind (wrappers invalidp function)
- (cache-miss-values generic-function args)
- (cond (invalidp (apply function args))
- ((null function)
- (apply #'no-applicable-method generic-function args))
- (t (multiple-value-bind (nfield ncache)
- (fill-cache ofield ocache nkeys t #'caching-limit-fn wrappers
- function)
- (unless (and (= nfield ofield)
- (eq ncache ocache))
- (update-to-caching-dfun generic-function nfield ncache)))
- (apply function args)))))))
-
-
-;;; Some useful support functions which are shared by the implementations of the different kinds of
-;;; dfuns. Given a generic function and a set of arguments to that generic function, returns a mess
-;;; of values. Is a single wrapper if the generic function has only one key, that is
-;;; arg-info-nkeys of the arg-info is 1. Otherwise a list of the wrappers of the specialized
-;;; arguments to the generic function. Note that all these wrappers are valid. This function does
-;;; invalid wrapper traps when it finds an invalid wrapper and then returns the new, valid wrapper.
-;;; True if any of the specialized arguments had an invalid wrapper, false otherwise.
-;;; The compiled effective method function for this set of arguments. Gotten from
-;;; get-secondary-dispatch-function so effective-method-function caching is in effect, and that is
-;;; important since it is what keeps us in checking dfun state when possible. READER or
-;;; WRITER when the only method that would be run is a standard reader or writer method. To be
-;;; specific, the value is READER when the method combination is eq to
-;;; *standard-method-combination*; there are no applicable :before, :after or :around methods; and
-;;; the most specific primary method is a standard reader method. If is READER
-;;; or WRITER, and the slot accessed is an :instance slot, this is the index number of that slot in
-;;; the object argument. Sorted list of applicable methods.
-
-
-(defun cache-miss-values (generic-function args)
- (declare (values wrappers invalidp function applicable))
- (multiple-value-bind (function appl arg-info)
- (get-secondary-dispatch-function generic-function args)
- (multiple-value-bind (wrappers invalidp)
- (get-wrappers generic-function args arg-info)
- (values wrappers invalidp (cache-miss-values-function generic-function function)
- appl))))
-
-(defun get-wrappers (generic-function args &optional arg-info)
- (let* ((invalidp nil)
- (wrappers nil)
- (arg-info (or arg-info (gf-arg-info generic-function)))
- (metatypes (arg-info-metatypes arg-info))
- (nkeys (arg-info-nkeys arg-info)))
- (flet ((get-valid-wrapper (x)
- (let ((wrapper (wrapper-of x)))
- (cond ((invalid-wrapper-p wrapper)
- (setq invalidp t)
- (check-wrapper-validity x))
- (t wrapper)))))
- (setq wrappers (block collect-wrappers
- (gathering1 (collecting)
- (iterate ((arg (list-elements args))
- (metatype (list-elements metatypes)))
- (when (neq metatype 't)
- (if (= nkeys 1)
- (return-from collect-wrappers
- (get-valid-wrapper arg))
- (gather1 (get-valid-wrapper arg))))))))
- (values wrappers invalidp))))
-
-(defun cache-miss-values-function (generic-function function)
- (if (eq *generate-random-code-segments* generic-function)
- (progn (setq *generate-random-code-segments* nil)
- #'(lambda (&rest args)
- (declare (ignore args))
- nil))
- function))
-
-(defun generate-random-code-segments (generic-function)
- (dolist (arglist (generate-arglists generic-function))
- (let ((*generate-random-code-segments* generic-function))
- (apply generic-function arglist))))
-
-(defun generate-arglists (generic-function)
-
- ;; Generate arglists using class-prototypes and eql-specializer-objects to get all the
- ;; "different" values that could be returned by get-secondary-dispatch-function for this
- ;; generic-function.
- (let ((methods (generic-function-methods generic-function)))
- (mapcar #'(lambda (class-list)
- (mapcar #'(lambda (specializer)
- (if (eql-specializer-p specializer)
- (eql-specializer-object specializer)
- (class-prototype specializer)))
- (method-specializers (find class-list methods :test
- #'(lambda (class-list method)
- (every
- #'
- specializer-applicable-using-class-p
- (method-specializers
- method)
- class-list))))))
- (generate-arglist-classes generic-function))))
-
-(defun generate-arglist-classes (generic-function)
- (let ((methods (generic-function-methods generic-function)))
- (declare (ignore methods))
-
- ;; Finish this sometime.
- nil))
-
-(defun accessor-miss-values (generic-function applicable args)
- (declare (values type index))
- (let ((type (and (eq (generic-function-method-combination generic-function)
- *standard-method-combination*)
- (every #'(lambda (m)
- (null (method-qualifiers m)))
- applicable)
- (let ((method (car applicable)))
- (cond ((standard-reader-method-p method)
- (and (optimize-slot-value-by-class-p (class-of (car args))
- (accessor-method-slot-name method)
- nil)
- 'reader))
- ((standard-writer-method-p method)
- (and (optimize-slot-value-by-class-p (class-of (cadr args))
- (accessor-method-slot-name method)
- t)
- 'writer))
- (t nil))))))
- (values type (and type (let ((wrapper (wrapper-of (case type
- (reader (car args))
- (writer (cadr args)))))
- (slot-name (accessor-method-slot-name (car applicable))))
- (or (instance-slot-index wrapper slot-name)
- (assq slot-name (wrapper-class-slots wrapper))))))))
diff --git a/obsolete/clos/2.0/dlap.lisp b/obsolete/clos/2.0/dlap.lisp
deleted file mode 100644
index e50f0bb8..00000000
--- a/obsolete/clos/2.0/dlap.lisp
+++ /dev/null
@@ -1,492 +0,0 @@
-;;;-*- Package: CLOS; Syntax: Common-Lisp; Base: 10 -*-
-
-;;; Copyright (c) 1991 by Venue
-
-(in-package "CLOS")
-
-;;;
-
-(defun emit-one-class-reader (class-slot-p)
- (emit-reader/writer :reader 1 class-slot-p))
-
-(defun emit-one-class-writer (class-slot-p)
- (emit-reader/writer :writer 1 class-slot-p))
-
-(defun emit-two-class-reader (class-slot-p)
- (emit-reader/writer :reader 2 class-slot-p))
-
-(defun emit-two-class-writer (class-slot-p)
- (emit-reader/writer :writer 2 class-slot-p))
-
-(defun emit-reader/writer (reader/writer 1-or-2-class class-slot-p)
- (let ((instance nil)
- (arglist nil)
- (closure-variables nil)
- (field (wrapper-field 'number)))
- ; we need some field to do the fast
- ; obsolete check
- (ecase reader/writer
- (:reader (setq instance (dfun-arg-symbol 0)
- arglist
- (list instance)))
- (:writer (setq instance (dfun-arg-symbol 1)
- arglist
- (list (dfun-arg-symbol 0)
- instance))))
- (ecase 1-or-2-class
- (1 (setq closure-variables '(wrapper-0 index miss-fn)))
- (2 (setq closure-variables '(wrapper-0 wrapper-1 index miss-fn))))
- (generating-lap
- closure-variables arglist
- (with-lap-registers ((inst t)
- ; reg for the instance
- (wrapper vector)
- ; reg for the wrapper
- (cache-no index))
- ; reg for the cache no
- (let ((index cache-no)
- ; This register is used for different
- ; values at different times.
- (slots (and (null class-slot-p)
- (allocate-register 'vector)))
- (csv (and class-slot-p (allocate-register t))))
- (prog1 (flatten-lap (opcode :move (operand :arg instance)
- inst)
- ; get the instance
- (opcode :std-instance-p inst 'std-instance)
- ; if not either std-inst
- (opcode :fsc-instance-p inst 'fsc-instance)
- ; or fsc-instance then
- (opcode :go 'trap)
- ; we lose
- (opcode :label 'fsc-instance)
- (opcode :move (operand :fsc-wrapper inst)
- wrapper)
- (and slots (opcode :move (operand :fsc-slots inst)
- slots))
- (opcode :go 'have-wrapper)
- (opcode :label 'std-instance)
- (opcode :move (operand :std-wrapper inst)
- wrapper)
- (and slots (opcode :move (operand :std-slots inst)
- slots))
- (opcode :label 'have-wrapper)
- (opcode :move (operand :cref wrapper field)
- cache-no)
- (opcode :izerop cache-no 'trap)
- ; obsolete wrapper?
- (ecase 1-or-2-class
- (1 (emit-check-1-class-wrapper wrapper 'wrapper-0
- 'trap))
- (2 (emit-check-2-class-wrapper wrapper 'wrapper-0
- 'wrapper-1
- 'trap)))
- (if class-slot-p
- (flatten-lap (opcode :move (operand :cvar 'index)
- csv)
- (ecase reader/writer
- (:reader (emit-get-class-slot csv 'trap inst))
- (:writer (emit-set-class-slot csv (car arglist)
- inst))))
- (flatten-lap (opcode :move (operand :cvar 'index)
- index)
- (ecase reader/writer
- (:reader (emit-get-slot slots index
- 'trap inst))
- (:writer (emit-set-slot slots index
- (car arglist)
- inst)))))
- (opcode :label 'trap)
- (emit-miss 'miss-fn))
- (when slots (deallocate-register slots))
- (when csv (deallocate-register csv))))))))
-
-(defun emit-one-index-readers (class-slot-p)
- (let ((arglist (list (dfun-arg-symbol 0))))
- (generating-lap '(field cache mask size index miss-fn)
- arglist
- (with-lap-registers ((slots vector))
- (emit-dlap arglist '(standard-instance)
- 'trap
- (with-lap-registers ((index index))
- (flatten-lap (opcode :move (operand :cvar 'index)
- index)
- (if class-slot-p
- (emit-get-class-slot index 'trap slots)
- (emit-get-slot slots index 'trap))))
- (flatten-lap (opcode :label 'trap)
- (emit-miss 'miss-fn))
- nil
- (and (null class-slot-p)
- (list slots)))))))
-
-(defun emit-one-index-writers (class-slot-p)
- (let ((arglist (list (dfun-arg-symbol 0)
- (dfun-arg-symbol 1))))
- (generating-lap '(field cache mask size index miss-fn)
- arglist
- (with-lap-registers ((slots vector))
- (emit-dlap arglist '(t standard-instance)
- 'trap
- (with-lap-registers ((index index))
- (flatten-lap (opcode :move (operand :cvar 'index)
- index)
- (if class-slot-p
- (emit-set-class-slot index (dfun-arg-symbol 0)
- slots)
- (emit-set-slot slots index (dfun-arg-symbol 0)))))
- (flatten-lap (opcode :label 'trap)
- (emit-miss 'miss-fn))
- nil
- (and (null class-slot-p)
- (list nil slots)))))))
-
-(defun emit-n-n-readers nil (let ((arglist (list (dfun-arg-symbol 0))))
- (generating-lap '(field cache mask size miss-fn)
- arglist
- (with-lap-registers ((slots vector)
- (index index))
- (emit-dlap arglist '(standard-instance)
- 'trap
- (emit-get-slot slots index 'trap)
- (flatten-lap (opcode :label 'trap)
- (emit-miss 'miss-fn))
- index
- (list slots))))))
-
-(defun emit-n-n-writers nil (let ((arglist (list (dfun-arg-symbol 0)
- (dfun-arg-symbol 1))))
- (generating-lap '(field cache mask size miss-fn)
- arglist
- (with-lap-registers ((slots vector)
- (index index))
- (flatten-lap (emit-dlap arglist '(t standard-instance)
- 'trap
- (emit-set-slot slots index
- (dfun-arg-symbol 0))
- (flatten-lap (opcode :label
- 'trap)
- (emit-miss 'miss-fn))
- index
- (list nil slots)))))))
-
-(defun emit-checking (metatypes applyp)
- (let ((dlap-lambda-list (make-dlap-lambda-list metatypes applyp)))
- (generating-lap '(field cache mask size function miss-fn)
- dlap-lambda-list
- (emit-dlap (remove '&rest dlap-lambda-list)
- metatypes
- 'trap
- (with-lap-registers (#'t)
- (flatten-lap (opcode :move (operand :cvar 'function)
- function)
- (opcode :jmp function)))
- (with-lap-registers ((miss-function t))
- (flatten-lap (opcode :label 'trap)
- (opcode :move (operand :cvar 'miss-fn)
- miss-function)
- (opcode :jmp miss-function)))
- nil))))
-
-(defun emit-caching (metatypes applyp)
- (let ((dlap-lambda-list (make-dlap-lambda-list metatypes applyp)))
- (generating-lap '(field cache mask size miss-fn)
- dlap-lambda-list
- (with-lap-registers (#'t)
- (emit-dlap (remove '&rest dlap-lambda-list)
- metatypes
- 'trap
- (flatten-lap (opcode :jmp function))
- (with-lap-registers ((miss-function t))
- (flatten-lap (opcode :label 'trap)
- (opcode :move (operand :cvar 'miss-fn)
- miss-function)
- (opcode :jmp miss-function)))
- function)))))
-
-(defun emit-check-1-class-wrapper (wrapper cwrapper-0 miss-label)
- (with-lap-registers ((cwrapper vector))
- (flatten-lap (opcode :move (operand :cvar cwrapper-0)
- cwrapper)
- (opcode :neq wrapper cwrapper miss-label))))
-
- ; wrappers not eq, trap
-
-
-(defun emit-check-2-class-wrapper (wrapper cwrapper-0 cwrapper-1 miss-label)
- (with-lap-registers ((cwrapper vector))
- (flatten-lap (opcode :move (operand :cvar cwrapper-0)
- cwrapper)
- ; This is an OR. Isn't
- (opcode :eq wrapper cwrapper 'hit-internal)
- ; assembly code fun
- (opcode :move (operand :cvar cwrapper-1)
- cwrapper)
- ;
- (opcode :neq wrapper cwrapper miss-label)
- ;
- (opcode :label 'hit-internal))))
-
-(defun emit-get-slot (slots index trap-label &optional temp)
- (let ((slot-unbound (operand :constant *slot-unbound*)))
- (with-lap-registers ((val t :reuse temp))
- (flatten-lap (opcode :move (operand :iref slots index)
- val)
- ; get slot value
- (opcode :eq val slot-unbound trap-label)
- ; is the slot unbound?
- (opcode :return val)))))
-
- ; return the slot value
-
-
-(defun emit-set-slot (slots index new-value-arg &optional temp)
- (with-lap-registers ((new-val t :reuse temp))
- (flatten-lap (opcode :move (operand :arg new-value-arg)
- new-val)
- ; get new value into a reg
- (opcode :move new-val (operand :iref slots index))
- ; set slot value
- (opcode :return new-val))))
-
-(defun emit-get-class-slot (index trap-label &optional temp)
- (let ((slot-unbound (operand :constant *slot-unbound*)))
- (with-lap-registers ((val t :reuse temp))
- (flatten-lap (opcode :move (operand :cdr index)
- val)
- (opcode :eq val slot-unbound trap-label)
- (opcode :return val)))))
-
-(defun emit-set-class-slot (index new-value-arg &optional temp)
- (with-lap-registers ((new-val t :reuse temp))
- (flatten-lap (opcode :move (operand :arg new-value-arg)
- new-val)
- (opcode :move new-val (operand :cdr index))
- (opcode :return new-val))))
-
-(defun emit-miss (miss-fn)
- (with-lap-registers ((miss-fn-reg t))
- (flatten-lap (opcode :move (operand :cvar miss-fn)
- miss-fn-reg)
- ; get the miss function
- (opcode :jmp miss-fn-reg))))
-
- ; and call it
-
-
-(defun dlap-wrappers (metatypes)
- (mapcar #'(lambda (x)
- (and (neq x 't)
- (allocate-register 'vector)))
- metatypes))
-
-(defun dlap-wrapper-moves (wrappers args metatypes miss-label slot-regs)
- (gathering1 (collecting)
- (iterate ((mt (list-elements metatypes))
- (arg (list-elements args))
- (wrapper (list-elements wrappers))
- (i (interval :from 0)))
- (when wrapper
- (gather1 (emit-fetch-wrapper mt arg wrapper miss-label (nth i slot-regs)))))
- ))
-
-(defun emit-dlap (args metatypes miss-label hit miss value-reg &optional slot-regs)
- (let* ((wrappers (dlap-wrappers metatypes))
- (nwrappers (remove nil wrappers))
- (wrapper-moves (dlap-wrapper-moves wrappers args metatypes miss-label slot-regs)))
- (prog1 (emit-dlap-internal nwrappers wrapper-moves hit miss miss-label value-reg)
- (mapc #'deallocate-register nwrappers))))
-
-(defun emit-dlap-internal (wrapper-regs wrapper-moves hit miss miss-label value-reg)
- (cond ((cdr wrapper-regs)
- (emit-greater-than-1-dlap wrapper-regs wrapper-moves hit miss miss-label value-reg))
- ((null value-reg)
- (emit-1-nil-dlap (car wrapper-regs)
- (car wrapper-moves)
- hit miss miss-label))
- (t (emit-1-t-dlap (car wrapper-regs)
- (car wrapper-moves)
- hit miss miss-label value-reg))))
-
-(defun emit-1-nil-dlap (wrapper wrapper-move hit miss miss-label)
- (with-lap-registers ((location index)
- (primary index)
- (cache vector))
- (flatten-lap wrapper-move (opcode :move (operand :cvar 'cache)
- cache)
- (with-lap-registers ((wrapper-cache-no index))
- (flatten-lap (emit-1-wrapper-compute-primary-cache-location wrapper
- primary wrapper-cache-no)
- (opcode :move primary location)
- (emit-check-1-wrapper-in-cache cache location wrapper hit)
- ; inline hit code
- (opcode :izerop wrapper-cache-no miss-label)))
- (with-lap-registers ((size index))
- (flatten-lap (opcode :move (operand :cvar 'size)
- size)
- (opcode :label 'loop)
- (opcode :move (operand :i1+ location)
- location)
- (opcode :fix= location primary miss-label)
- (opcode :fix= location size 'set-location-to-min)
- (opcode :label 'continue)
- (emit-check-1-wrapper-in-cache cache location wrapper hit)
- (opcode :go 'loop)
- (opcode :label 'set-location-to-min)
- (opcode :izerop primary miss-label)
- (opcode :move (operand :constant (index-value->index 0))
- location)
- (opcode :go 'continue)))
- miss)))
-
-
-;;; The function below implements CACHE-LOCK-COUNT as the first entry in a cache (svref cache 0).
-;;; This should probably be abstracted.
-
-
-(defun emit-1-t-dlap (wrapper wrapper-move hit miss miss-label value)
- (with-lap-registers ((location index)
- (primary index)
- (cache vector)
- (initial-lock-count t))
- (flatten-lap wrapper-move (opcode :move (operand :cvar 'cache)
- cache)
- (with-lap-registers ((wrapper-cache-no index))
- (flatten-lap (emit-1-wrapper-compute-primary-cache-location wrapper
- primary wrapper-cache-no)
- (opcode :move primary location)
- (opcode :move (operand :cref cache 0)
- initial-lock-count)
- ; get lock-count
- (emit-check-cache-entry cache location wrapper 'hit-internal)
- (opcode :izerop wrapper-cache-no miss-label)))
- ; check for obsolescence
- (with-lap-registers ((size index))
- (flatten-lap (opcode :move (operand :cvar 'size)
- size)
- (opcode :label 'loop)
- (opcode :move (operand :i1+ location)
- location)
- (opcode :move (operand :i1+ location)
- location)
- (opcode :label 'continue)
- (opcode :fix= location primary miss-label)
- (opcode :fix= location size 'set-location-to-min)
- (emit-check-cache-entry cache location wrapper 'hit-internal)
- (opcode :go 'loop)
- (opcode :label 'set-location-to-min)
- (opcode :izerop primary miss-label)
- (opcode :move (operand :constant (index-value->index 2))
- location)
- (opcode :go 'continue)))
- (opcode :label 'hit-internal)
- (opcode :move (operand :i1+ location)
- location)
- ; position for getting value
- (opcode :move (emit-cache-ref cache location)
- value)
- (emit-lock-count-test initial-lock-count cache 'hit)
- miss
- (opcode :label 'hit)
- hit)))
-
-(defun emit-greater-than-1-dlap (wrappers wrapper-moves hit miss miss-label value)
- (let ((cache-line-size (compute-line-size (+ (length wrappers)
- (if value
- 1
- 0)))))
- (with-lap-registers ((location index)
- (primary index)
- (cache vector)
- (initial-lock-count t)
- (next-location index)
- (line-size index))
- ; Line size holds a constant that can
- ; be folded in if there was a way to
- ; add a constant to an index register
- (flatten-lap (apply #'flatten-lap wrapper-moves)
- (opcode :move (operand :constant cache-line-size)
- line-size)
- (opcode :move (operand :cvar 'cache)
- cache)
- (emit-n-wrapper-compute-primary-cache-location wrappers primary miss-label)
- (opcode :move primary location)
- (opcode :move location next-location)
- (opcode :move (operand :cref cache 0)
- initial-lock-count)
- ; get the lock-count
- (with-lap-registers ((size index))
- (flatten-lap (opcode :move (operand :cvar 'size)
- size)
- (opcode :label 'continue)
- (opcode :move (operand :i+ location line-size)
- next-location)
- (emit-check-cache-line cache location wrappers 'hit)
- (emit-adjust-location location next-location primary size
- 'continue miss-label)
- (opcode :label 'hit)
- (and value (opcode :move (emit-cache-ref cache location)
- value))
- (emit-lock-count-test initial-lock-count cache 'hit-internal)
- miss
- (opcode :label 'hit-internal)
- hit))))))
-
-
-;;; Cache related lap code
-
-
-(defun emit-check-1-wrapper-in-cache (cache location wrapper hit-code)
- (let ((exit-emit-check-1-wrapper-in-cache (make-symbol "exit-emit-check-1-wrapper-in-cache")))
- (with-lap-registers ((cwrapper vector))
- (flatten-lap (opcode :move (emit-cache-ref cache location)
- cwrapper)
- (opcode :neq cwrapper wrapper exit-emit-check-1-wrapper-in-cache)
- hit-code
- (opcode :label exit-emit-check-1-wrapper-in-cache)))))
-
-(defun emit-check-cache-entry (cache location wrapper hit-label)
- (with-lap-registers ((cwrapper vector))
- (flatten-lap (opcode :move (emit-cache-ref cache location)
- cwrapper)
- (opcode :eq cwrapper wrapper hit-label))))
-
-(defun emit-check-cache-line (cache location wrappers hit-label)
- (let ((checks (flatten-lap (gathering1 (flattening-lap)
- (iterate ((wrapper (list-elements wrappers)))
- (with-lap-registers ((cwrapper vector))
- (gather1 (flatten-lap (opcode :move
- (emit-cache-ref
- cache location)
- cwrapper)
- (opcode :neq cwrapper wrapper
-
- '
- exit-emit-check-cache-line
- )
- (opcode :move (operand :i1+
- location)
- location)))))))))
- (flatten-lap checks (opcode :go hit-label)
- (opcode :label 'exit-emit-check-cache-line))))
-
-(defun emit-lock-count-test (initial-lock-count cache hit-label)
-
- ;; jumps to hit-label if cache-lock-count consistent, otherwise, continues
- (with-lap-registers ((new-lock-count t))
- (flatten-lap (opcode :move (operand :cref cache 0)
- new-lock-count)
- ; get new cache-lock-count
- (opcode :fix= new-lock-count initial-lock-count hit-label))))
-
-(defun emit-adjust-location (location next-location primary size cont-label miss-label)
- (flatten-lap (opcode :move next-location location)
- (opcode :fix= location size 'at-end-of-cache)
- (opcode :fix= location primary miss-label)
- (opcode :go cont-label)
- (opcode :label 'at-end-of-cache)
- (opcode :fix= primary (operand :constant (index-value->index 1))
- miss-label)
- (opcode :move (operand :constant (index-value->index 1))
- location)
- (opcode :go cont-label)))
diff --git a/obsolete/clos/2.0/env.lisp b/obsolete/clos/2.0/env.lisp
deleted file mode 100644
index 15bf87f2..00000000
--- a/obsolete/clos/2.0/env.lisp
+++ /dev/null
@@ -1,200 +0,0 @@
-;;;-*-Mode:LISP; Package:(CLOS (LISP WALKER)); Base:10; Syntax:Common-lisp -*-
-;;;
-;;; *************************************************************************
-;;; Copyright (c) 1991 Venue
-;;; All rights reserved.
-;;; *************************************************************************
-;;;
-;;; Basic environmental stuff.
-;;;
-
-(in-package 'clos)
-
-
-
-;;;
-;;;
-;;;
-
-(defgeneric describe-object (object stream))
-
-
-(defmethod describe-object ((object standard-object) stream)
- (let* ((class (class-of object))
- (slotds (slots-to-inspect class object))
- (max-slot-name-length 0)
- (instance-slotds ())
- (class-slotds ())
- (other-slotds ()))
- (flet ((adjust-slot-name-length (name)
- (setq max-slot-name-length
- (max max-slot-name-length
- (length (the string (symbol-name name))))))
- (describe-slot (name value &optional (allocation () alloc-p))
- (if alloc-p
- (format stream
- "~% ~A ~S ~VT ~S"
- name allocation (+ max-slot-name-length 7) value)
- (format stream
- "~% ~A~VT ~S"
- name max-slot-name-length value))))
- ;; Figure out a good width for the slot-name column.
- (dolist (slotd slotds)
- (adjust-slot-name-length (slotd-name slotd))
- (case (slotd-allocation slotd)
- (:instance (push slotd instance-slotds))
- (:class (push slotd class-slotds))
- (otherwise (push slotd other-slotds))))
- (setq max-slot-name-length (min (+ max-slot-name-length 3) 30))
- (format stream "~%~S is an instance of class ~S:" object class)
-
- (when instance-slotds
- (format stream "~% The following slots have :INSTANCE allocation:")
- (dolist (slotd (nreverse instance-slotds))
- (describe-slot (slotd-name slotd)
- (slot-value-or-default object (slotd-name slotd)))))
-
- (when class-slotds
- (format stream "~% The following slots have :CLASS allocation:")
- (dolist (slotd (nreverse class-slotds))
- (describe-slot (slotd-name slotd)
- (slot-value-or-default object (slotd-name slotd)))))
-
- (when other-slotds
- (format stream "~% The following slots have allocation as shown:")
- (dolist (slotd (nreverse other-slotds))
- (describe-slot (slotd-name slotd)
- (slot-value-or-default object (slotd-name slotd))
- (slotd-allocation slotd))))
- (values))))
-
-(defmethod slots-to-inspect ((class std-class) (object standard-object))
- (class-slots class))
-
-;;;
-;;;
-;;;
-(defmethod describe-object ((class class) stream)
- (flet ((pretty-class (c) (or (class-name c) c)))
- (macrolet ((ft (string &rest args) `(format stream ,string ,@args)))
- (ft "~&~S is a class, it is an instance of ~S.~%"
- class (pretty-class (class-of class)))
- (let ((name (class-name class)))
- (if name
- (if (eq class (find-class name nil))
- (ft "Its proper name is ~S.~%" name)
- (ft "Its name is ~S, but this is not a proper name.~%" name))
- (ft "It has no name (the name is NIL).~%")))
- (ft "The direct superclasses are: ~:S, and the direct~%~
- subclasses are: ~:S. The class precedence list is:~%~S~%~
- There are ~D methods specialized for this class."
- (mapcar #'pretty-class (class-direct-superclasses class))
- (mapcar #'pretty-class (class-direct-subclasses class))
- (mapcar #'pretty-class (class-precedence-list class))
- (length (specializer-methods class))))))
-
-
-
-;;;
-;;; trace-method and untrace-method accept method specs as arguments. A
-;;; method-spec should be a list like:
-;;; ( qualifiers* (specializers*))
-;;; where should be either a symbol or a list
-;;; of (SETF ).
-;;;
-;;; For example, to trace the method defined by:
-;;;
-;;; (defmethod foo ((x spaceship)) 'ss)
-;;;
-;;; You should say:
-;;;
-;;; (trace-method '(foo (spaceship)))
-;;;
-;;; You can also provide a method object in the place of the method
-;;; spec, in which case that method object will be traced.
-;;;
-;;; For untrace-method, if an argument is given, that method is untraced.
-;;; If no argument is given, all traced methods are untraced.
-;;;
-(defclass traced-method (method)
- ((method :initarg :method)
- (function :initarg :function
- :reader method-function)
- (generic-function :initform nil
- :accessor method-generic-function)))
-
-(defmethod method-lambda-list ((m traced-method))
- (with-slots (method) m (method-lambda-list method)))
-
-(defmethod method-specializers ((m traced-method))
- (with-slots (method) m (method-specializers method)))
-
-(defmethod method-qualifiers ((m traced-method))
- (with-slots (method) m (method-qualifiers method)))
-
-(defmethod method-qualifiers ((m traced-method))
- (with-slots (method) m (method-qualifiers method)))
-
-(defmethod accessor-method-slot-name ((m traced-method))
- (with-slots (method) m (accessor-method-slot-name method)))
-
-(defvar *traced-methods* ())
-
-(defun trace-method (spec &rest options)
- (multiple-value-bind (gf omethod name)
- (parse-method-or-spec spec)
- (let* ((tfunction (trace-method-internal (method-function omethod)
- name
- options))
- (tmethod (make-instance 'traced-method
- :method omethod
- :function tfunction)))
- (remove-method gf omethod)
- (add-method gf tmethod)
- (pushnew tmethod *traced-methods*)
- tmethod)))
-
-(defun untrace-method (&optional spec)
- (flet ((untrace-1 (m)
- (let ((gf (method-generic-function m)))
- (when gf
- (remove-method gf m)
- (add-method gf (slot-value m 'method))
- (setq *traced-methods* (remove m *traced-methods*))))))
- (if (not (null spec))
- (multiple-value-bind (gf method)
- (parse-method-or-spec spec)
- (declare (ignore gf))
- (if (memq method *traced-methods*)
- (untrace-1 method)
- (error "~S is not a traced method?" method)))
- (dolist (m *traced-methods*) (untrace-1 m)))))
-
-(defun trace-method-internal (ofunction name options)
- (eval `(untrace ,name))
- (setf (symbol-function name) ofunction)
- (eval `(trace ,name ,@options))
- (symbol-function name))
-
-
-
-
-;(defun compile-method (spec)
-; (multiple-value-bind (gf method name)
-; (parse-method-or-spec spec)
-; (declare (ignore gf))
-; (compile name (method-function method))
-; (setf (method-function method) (symbol-function name))))
-
-(defmacro undefmethod (&rest args)
- #+(or (not :lucid) :lcl3.0)
- (declare (arglist name {method-qualifier}* specializers))
- `(undefmethod-1 ',args))
-
-(defun undefmethod-1 (args)
- (multiple-value-bind (gf method)
- (parse-method-or-spec args)
- (when (and gf method)
- (remove-method gf method)
- method)))
-
diff --git a/obsolete/clos/2.0/fin.lisp b/obsolete/clos/2.0/fin.lisp
deleted file mode 100644
index c8de5102..00000000
--- a/obsolete/clos/2.0/fin.lisp
+++ /dev/null
@@ -1,235 +0,0 @@
-;;;-*- Package: CLOS; Syntax: Common-Lisp; Base: 10 -*-
-
-
-;;; File converted on 26-Mar-91 10:33:34 from source fin
-;;;. Original source {dsk}local>users>welch>lisp>clos>rev4>il-format>fin.;3 created 19-Feb-91 16:21:49
-
-;;;. Copyright (c) 1991 by Venue
-
-
-
-
-(in-package "CLOS")
-
-;;; Shadow, Export, Require, Use-package, and Import forms should follow here
-
-
-
-
-
-
-;;
-
-
-
-;;; FUNCALLABLE INSTANCES
-
-
-
-;;
-
-
-
-;;; The first part of the file contains the implementation dependent code to implement funcallable
-;;; instances. Each implementation must provide the following functions and macros:
-;;; ALLOCATE-FUNCALLABLE-INSTANCE-1 () should create and return a new funcallable instance. The
-;;; funcallable-instance-data slots must be initialized to NIL. This is called by
-;;; allocate-funcallable-instance and by the bootstrapping code. FUNCALLABLE-INSTANCE-P (x) the
-;;; obvious predicate. This should be an INLINE function. it must be funcallable, but it would be
-;;; nice if it compiled open. SET-FUNCALLABLE-INSTANCE-FUNCTION (fin new-value) change the fin so
-;;; that when it is funcalled, the new-value function is called. Note that it is legal for
-;;; new-value to be copied before it is installed in the fin, specifically there is no accessor for
-;;; a FIN's function so this function does not have to preserve the actual new value. The new-value
-;;; argument can be any funcallable thing, a closure, lambda compiled code etc. This function must
-;;; coerce those values if necessary. NOTE: new-value is almost always a compiled closure. This is
-;;; the important case to optimize. FUNCALLABLE-INSTANCE-DATA-1 (fin data-name) should return the
-;;; value of the data named data-name in the fin. data-name is one of the symbols in the list which
-;;; is the value of funcallable-instance-data. Since data-name is almost always a quoted symbol and
-;;; funcallable-instance-data is a constant, it is possible (and worthwhile) to optimize the
-;;; computation of data-name's offset in the data part of the fin. This must be SETF'able.
-
-
-(defconstant funcallable-instance-data '(wrapper slots)
- "These are the 'data-slots' which funcallable instances have so that
- the meta-class funcallable-standard-class can store class, and static
- slots in them.")
-
-(defmacro funcallable-instance-data-position (data)
- (if (and (consp data)
- (eq (car data)
- 'quote)
- (boundp 'funcallable-instance-data))
- (or (position (cadr data)
- funcallable-instance-data :test #'eq)
- (progn (warn "Unknown funcallable-instance data: ~S." (cadr data))
- `(error "Unknown funcallable-instance data: ~S." ',(cadr data))))
- `(position ,data funcallable-instance-data :test #'eq)))
-
-(defun called-fin-without-function nil (error "Attempt to funcall a funcallable-instance without first~%~
- setting its funcallable-instance-function."))
-
-
-;;; In Xerox Common Lisp, a lexical closure is a pair of an environment and CCODEP. The environment
-;;; is represented as a block. There is space in the top 8 bits of the pointers to the CCODE and
-;;; the environment to use to mark the closure as being a FIN. To help the debugger figure out when
-;;; it has found a FIN on the stack, we reserve the last element of the closure environment to use
-;;; to point back to the actual fin. Note that there is code in xerox-low which lets us access the
-;;; fields of compiled-closures and which defines the closure-overlay record. That code is there
-;;; because there are some clients of it in that file.
-
-
-
-;; Don't be fooled. We actually allocate one bigger than this to have a place to store the
-;; backpointer to the fin. -smL
-
-
-(defconstant funcallable-instance-closure-size 15)
-
-(defvar *fin-env-type* (type-of (il:\\allocblock (1+ funcallable-instance-closure-size)
- t)))
-
-
-;; Well, Gregor may be too proud to hack xpointers, but bvm and I aren't. -smL
-
-
-(defstruct fin-env-pointer (pointer nil :type il:fullxpointer))
-
-(defun fin-env-fin (fin-env)
- (fin-env-pointer-pointer (il:\\getbaseptr fin-env (* funcallable-instance-closure-size 2))))
-
-(defun |set fin-env-fin| (fin-env new-value)
- (il:\\rplptr fin-env (* funcallable-instance-closure-size 2)
- (make-fin-env-pointer :pointer new-value))
- new-value)
-
-(defsetf fin-env-fin |set fin-env-fin|)
-
-
-;; The finalization function that will clean up the backpointer from the fin-env to the fin. This
-;; needs to be careful to not cons at all. This depends on there being no other finalization
-;; function on compiled-closures, since there is only one finalization function per datatype. Too
-;; bad. -smL
-
-
-(defun finalize-fin (fin)
-
- ;; This could use the fn funcallable-instance-p, but if we get here we know that this is a
- ;; closure, so we can skip that test.
- (when (il:fetch (closure-overlay funcallable-instance-p)
- il:of fin)
- (let ((env (il:fetch (il:compiled-closure il:environment)
- il:of fin)))
- (when env
- (setq env (il:\\getbaseptr env (* funcallable-instance-closure-size 2)))
- (when (typep env 'fin-env-pointer)
- (setf (fin-env-pointer-pointer env)
- nil)))))
- nil)
-
-(eval-when (load)
-
- ;; Install the above finalization function.
- (when (fboundp 'finalize-fin)
- (il:\\set.finalization.function 'il:compiled-closure 'finalize-fin)))
-
-(defun allocate-funcallable-instance-1 nil (let* ((env (il:\\allocblock (1+
- funcallable-instance-closure-size
- )
- t))
- (fin (il:make-compiled-closure nil env)))
- (setf (fin-env-fin env)
- fin)
- (il:replace (closure-overlay funcallable-instance-p)
- il:of fin il:with 't)
- (set-funcallable-instance-function
- fin
- #'(lambda (&rest ignore)
- (declare (ignore ignore))
- (called-fin-without-function)))
- fin))
-
-(xcl:definline funcallable-instance-p (x)
- (and (typep x 'il:compiled-closure)
- (il:fetch (closure-overlay funcallable-instance-p)
- il:of x)))
-
-(defun set-funcallable-instance-function (fin new)
- (cond ((not (funcallable-instance-p fin))
- (error "~S is not a funcallable-instance" fin))
- ((not (functionp new))
- (error "~S is not a function." new))
- ((typep new 'il:compiled-closure)
- (let* ((fin-env (il:fetch (il:compiled-closure il:environment)
- il:of fin))
- (new-env (il:fetch (il:compiled-closure il:environment)
- il:of new))
- (new-env-size (if new-env
- (il:\\#blockdatacells new-env)
- 0))
- (fin-env-size (- funcallable-instance-closure-size (length
- funcallable-instance-data
- ))))
- (cond ((and new-env (<= new-env-size fin-env-size))
- (dotimes (i fin-env-size)
- (il:\\rplptr fin-env (* i 2)
- (if (< i new-env-size)
- (il:\\getbaseptr new-env (* i 2))
- nil)))
- (setf (compiled-closure-fnheader fin)
- (compiled-closure-fnheader new)))
- (t (set-funcallable-instance-function fin (make-trampoline new))))))
- (t (set-funcallable-instance-function fin (make-trampoline new)))))
-
-(defun make-trampoline (function)
- #'(lambda (&rest args)
- (apply function args)))
-
-(defmacro funcallable-instance-data-1 (fin data)
- `(il:\\getbaseptr (il:fetch (il:compiled-closure il:environment)
- il:of
- ,fin)
- (* (- funcallable-instance-closure-size (funcallable-instance-data-position
- ,data)
- 1)
- ; Reserve last element to point back to
- ; actual FIN!
- 2)))
-
-(defsetf funcallable-instance-data-1 (fin data)
- (new-value)
- `(il:\\rplptr (il:fetch (il:compiled-closure il:environment)
- il:of
- ,fin)
- (* (- funcallable-instance-closure-size (funcallable-instance-data-position
- ,data)
- 1)
- 2)
- ,new-value))
-
- ; end of #+Xerox
-
-
-
-;;;
-
-
-(defmacro fsc-instance-p (fin)
- `(funcallable-instance-p ,fin))
-
-(defmacro fsc-instance-class (fin)
- `(wrapper-class (funcallable-instance-data-1 ,fin 'wrapper)))
-
-(defmacro fsc-instance-wrapper (fin)
- `(funcallable-instance-data-1 ,fin 'wrapper))
-
-(defmacro fsc-instance-slots (fin)
- `(funcallable-instance-data-1 ,fin 'slots))
-
-(defun allocate-funcallable-instance (wrapper number-of-static-slots)
- (let ((fin (allocate-funcallable-instance-1))
- (slots (%allocate-static-slot-storage--class number-of-static-slots)))
- (setf (fsc-instance-wrapper fin)
- wrapper
- (fsc-instance-slots fin)
- slots)
- fin))
diff --git a/obsolete/clos/2.0/fixup.lisp b/obsolete/clos/2.0/fixup.lisp
deleted file mode 100644
index 13d1c52c..00000000
--- a/obsolete/clos/2.0/fixup.lisp
+++ /dev/null
@@ -1,15 +0,0 @@
-;;;-*- Package: CLOS; Syntax: Common-Lisp; Base: 10 -*-
-
-
-;;;. Copyright (c) 1991 by Venue
-
-(in-package "CLOS")
-
-
-(eval-when (compile load eval)
- (fix-early-generic-functions)
- (setq *boot-state* 'complete))
-
-(defun print-std-instance (instance stream depth)
- (declare (ignore depth))
- (print-object instance stream))
diff --git a/obsolete/clos/2.0/fngen.lisp b/obsolete/clos/2.0/fngen.lisp
deleted file mode 100644
index 09e6d0da..00000000
--- a/obsolete/clos/2.0/fngen.lisp
+++ /dev/null
@@ -1,172 +0,0 @@
-;;;-*- Package: CLOS; Syntax: Common-Lisp; Base: 10 -*-
-
-;;;. Copyright (c) 1991 by Venue
-
-(in-package "CLOS")
-
-
-
-;;; GET-FUNCTION is the main user interface to this code. If it is called with a lambda expression
-;;; only, it will return a corresponding function. The optional constant-converter argument, can be
-;;; a function which will be called to convert each constant appearing in the lambda to whatever
-;;; value should appear in the function. Whether the returned function is actually compiled depends
-;;; on whether the compiler is present (see COMPILE-LAMBDA) and whether this shape of code was
-;;; precompiled.
-
-
-(defun get-function (lambda &optional (test-converter #'default-test-converter)
- (code-converter #'default-code-converter)
- (constant-converter #'default-constant-converter))
- (apply (get-function-generator lambda test-converter code-converter)
- (compute-constants lambda constant-converter)))
-
-(defun default-test-converter (form)
- (if (not (constantp form))
- form
- '.constant.))
-
-(defun default-code-converter (form)
- (if (not (constantp form))
- form
- (let ((gensym (gensym)))
- (values gensym (list gensym)))))
-
-(defun default-constant-converter (form)
- (and (constantp form)
- (list (if (and (consp form)
- (eq (car form)
- 'quote))
- ; This had better
- (cadr form)
- ; do the same as
- form))))
-
- ; EVAL would have.
-
-
-
-;;; *fgens* is a list of all the function generators we have so far. Each element is a FGEN
-;;; structure as implemented below. Don't ever touch this list by hand, use STORE-FGEN.
-
-
-(defvar *fgens* nil)
-
-(defun store-fgen (fgen)
- (setq *fgens* (nconc *fgens* (list fgen))))
-
-(defun lookup-fgen (test)
- (find test (the list *fgens*)
- :key
- #'fgen-test :test #'equal))
-
-(defun make-fgen (test gensyms generator generator-lambda system)
- (let ((new (make-array 6)))
- (setf (svref new 0)
- test
- (svref new 1)
- gensyms
- (svref new 2)
- generator
- (svref new 3)
- generator-lambda
- (svref new 4)
- system)
- new))
-
-(defun fgen-test (fgen)
- (svref fgen 0))
-
-(defun fgen-gensyms (fgen)
- (svref fgen 1))
-
-(defun fgen-generator (fgen)
- (svref fgen 2))
-
-(defun fgen-generator-lambda (fgen)
- (svref fgen 3))
-
-(defun fgen-system (fgen)
- (svref fgen 4))
-
-(defun get-function-generator (lambda test-converter code-converter)
- (let* ((test (compute-test lambda test-converter))
- (fgen (lookup-fgen test)))
- (if fgen
- (fgen-generator fgen)
- (get-new-function-generator lambda test code-converter))))
-
-(defun get-new-function-generator (lambda test code-converter)
- (multiple-value-bind (gensyms generator-lambda)
- (get-new-function-generator-internal lambda code-converter)
- (let* ((generator (compile-lambda generator-lambda))
- (fgen (make-fgen test gensyms generator generator-lambda nil)))
- (store-fgen fgen)
- generator)))
-
-(defun get-new-function-generator-internal (lambda code-converter)
- (multiple-value-bind (code gensyms)
- (compute-code lambda code-converter)
- (values gensyms `(lambda ,gensyms #',code))))
-
-(defun compute-test (lambda test-converter)
- (walk-form lambda nil #'(lambda (f c e)
- (declare (ignore e))
- (if (neq c :eval)
- f
- (let ((converted (funcall test-converter f)))
- (values converted (neq converted f)))))))
-
-(defun compute-code (lambda code-converter)
- (let ((gensyms nil))
- (values (walk-form lambda nil #'(lambda (f c e)
- (declare (ignore e))
- (if (neq c :eval)
- f
- (multiple-value-bind
- (converted gens)
- (funcall code-converter f)
- (when gens
- (setq gensyms (append gensyms gens)))
- (values converted (neq converted f))))))
- gensyms)))
-
-(defun compute-constants (lambda constant-converter)
- (macrolet ((appending nil `(let ((result nil))
- (values #'(lambda (value)
- (setq result (append result value)))
- #'(lambda nil result)))))
- (gathering1 (appending)
- (walk-form lambda nil #'(lambda (f c e)
- (declare (ignore e))
- (if (neq c :eval)
- f
- (let ((consts (funcall constant-converter f))
- )
- (if consts
- (progn (gather1 consts)
- (values f t))
- f))))))))
-
-
-;;;
-
-
-(defmacro
- precompile-function-generators
- (&optional system)
- (make-top-level-form
- `(precompile-function-generators ,system)
- '(load)
- `(progn ,@(gathering1 (collecting)
- (dolist (fgen *fgens*)
- (when (or (null (fgen-system fgen))
- (eq (fgen-system fgen)
- system))
- (gather1 `(load-function-generator ',(fgen-test fgen)
- ',(fgen-gensyms fgen)
- #',(fgen-generator-lambda fgen)
- ',(fgen-generator-lambda fgen)
- ',system))))))))
-
-(defun load-function-generator (test gensyms generator generator-lambda system)
- (store-fgen (make-fgen test gensyms generator generator-lambda system)))
diff --git a/obsolete/clos/2.0/fsc.lisp b/obsolete/clos/2.0/fsc.lisp
deleted file mode 100644
index a2670af9..00000000
--- a/obsolete/clos/2.0/fsc.lisp
+++ /dev/null
@@ -1,72 +0,0 @@
-;;;-*- Package: CLOS; Syntax: Common-Lisp; Base: 10 -*-
-
-;;;. Copyright (c) 1991 by Venue
-
-
-(in-package "CLOS")
-
-
-;;; This file contains the
-;;; definition of the FUNCALLABLE-STANDARD-CLASS metaclass. Much of the implementation of this
-;;; metaclass is actually defined on the class STD-CLASS. What appears in this file is a modest
-;;; number of simple methods related to the low-level differences in the implementation of standard
-;;; and funcallable-standard instances. As it happens, none of these differences are the ones
-;;; reflected in the MOP specification; STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS share all
-;;; their specified methods at STD-CLASS. workings of this metaclass and the standard-class
-;;; metaclass.
-
-
-(defmethod wrapper-fetcher ((class funcallable-standard-class))
- 'fsc-instance-wrapper)
-
-(defmethod slots-fetcher ((class funcallable-standard-class))
- 'fsc-instance-slots)
-
-(defmethod raw-instance-allocator ((class funcallable-standard-class))
- 'allocate-funcallable-instance-1)
-
-
-;;;
-
-
-(defmethod check-super-metaclass-compatibility ((fsc funcallable-standard-class)
- (class standard-class))
- (null (wrapper-instance-slots-layout (class-wrapper class))))
-
-(defmethod allocate-instance ((class funcallable-standard-class)
- &rest initargs)
- (declare (ignore initargs))
- (unless (class-finalized-p class)
- (finalize-inheritance class))
- (let ((class-wrapper (class-wrapper class)))
- (allocate-funcallable-instance class-wrapper (class-no-of-instance-slots class))))
-
-(defmethod make-reader-method-function ((class funcallable-standard-class)
- slot-name)
- (make-std-reader-method-function slot-name))
-
-(defmethod make-writer-method-function ((class funcallable-standard-class)
- slot-name)
- (make-std-writer-method-function slot-name))
-
- ; See the comment about
- ; reader-function--std and
- ; writer-function--sdt.
- ; (define-function-template
- ; reader-function--fsc () '(slot-name)
- ; `(function (lambda (instance)
- ; (slot-value-using-class
- ; (wrapper-class (get-wrapper
- ; instance)) instance slot-name))))
- ; (define-function-template
- ; writer-function--fsc () '(slot-name)
- ; `(function (lambda (nv instance)
- ; (setf (slot-value-using-class
- ; (wrapper-class (get-wrapper
- ; instance)) instance slot-name) nv))))
- ; (eval-when (load)
- ; (pre-make-templated-function-constructor
- ; reader-function--fsc)
- ; (pre-make-templated-function-constructor
- ; writer-function--fsc))
-
diff --git a/obsolete/clos/2.0/init.lisp b/obsolete/clos/2.0/init.lisp
deleted file mode 100644
index d44e50ef..00000000
--- a/obsolete/clos/2.0/init.lisp
+++ /dev/null
@@ -1,183 +0,0 @@
-;;;-*- Package: CLOS; Syntax: Common-Lisp; Base: 10 -*-
-
-;;;. Copyright (c) 1991 by Venue
-
-(in-package "CLOS")
-
-;;; this file defines the
-;;; initialization and related protocols.
-
-
-(defmethod make-instance ((class std-class)
- &rest initargs)
- (unless (class-finalized-p class)
- (finalize-inheritance class))
- (setq initargs (default-initargs class initargs))
- (when initargs
- (when (and (eq *boot-state* 'complete)
- (let ((tail initargs))
- (loop (unless tail (return t))
- (when (eq (car tail)
- ':allow-other-keys)
- (return nil))
- (setq tail (cddr tail)))))
- (check-initargs-1 class initargs (append (compute-applicable-methods
- #'allocate-instance (list class))
- (compute-applicable-methods
- #'initialize-instance
- (list (class-prototype class)))
- (compute-applicable-methods
- #'shared-initialize
- (list (class-prototype class)
- t))))))
- (let ((instance (apply #'allocate-instance class initargs)))
- (apply #'initialize-instance instance initargs)
- instance))
-
-(defmethod make-instance ((class-name symbol)
- &rest initargs)
- (apply #'make-instance (find-class class-name)
- initargs))
-
-(defvar *default-initargs-flag* (list nil))
-
-(defmethod default-initargs ((class std-class)
- supplied-initargs)
-
- ;; This implementation of default initargs is critically dependent on all-default-initargs
- ;; not having any duplicate initargs in it.
- (let ((all-default (class-default-initargs class))
- (miss *default-initargs-flag*))
- (flet ((getf* (plist key)
- (do nil
- ((null plist)
- miss)
- (if (eq (car plist)
- key)
- (return (cadr plist))
- (setq plist (cddr plist))))))
- (labels ((default-1 (tail)
- (if (null tail)
- nil
- (if (eq (getf* supplied-initargs (caar tail))
- miss)
- (list* (caar tail)
- (funcall (cadar tail))
- (default-1 (cdr tail)))
- (default-1 (cdr tail))))))
- (append supplied-initargs (default-1 all-default))))))
-
-(defmethod initialize-instance ((instance standard-object)
- &rest initargs)
- (apply #'shared-initialize instance t initargs))
-
-(defmethod reinitialize-instance ((instance standard-object)
- &rest initargs)
- (when initargs
- (when (eq *boot-state* 'complete)
- (check-initargs-1 (class-of instance)
- initargs
- (append (compute-applicable-methods #'reinitialize-instance (list instance))
- (compute-applicable-methods #'shared-initialize (list instance t))))))
- (apply #'shared-initialize instance nil initargs)
- instance)
-
-(defmethod update-instance-for-different-class ((previous standard-object)
- (current standard-object)
- &rest initargs)
- (when initargs
- (check-initargs-1 (class-of current)
- initargs
- (append (compute-applicable-methods #'update-instance-for-different-class
- (list previous current))
- (compute-applicable-methods #'shared-initialize (list current t)))))
-
- ;; First we must compute the newly added slots. The spec defines newly added slots as "those
- ;; local slots for which no slot of the same name exists in the previous class."
- (let ((added-slots 'nil)
- (current-slotds (class-slots (class-of current)))
- (previous-slot-names (mapcar #'slotd-name (class-slots (class-of previous)))))
- (dolist (slotd current-slotds)
- (if (and (not (memq (slotd-name slotd)
- previous-slot-names))
- (eq (slotd-allocation slotd)
- ':instance))
- (push (slotd-name slotd)
- added-slots)))
- (apply #'shared-initialize current added-slots initargs)))
-
-(defmethod update-instance-for-redefined-class ((instance standard-object)
- added-slots discarded-slots property-list &rest
- initargs)
- (declare (ignore discarded-slots property-list))
- (when initargs
- (check-initargs-1 (class-of instance)
- initargs
- (append (compute-applicable-methods #'update-instance-for-redefined-class
- (list instance))
- (compute-applicable-methods #'shared-initialize (list instance nil)))))
- (apply #'shared-initialize instance added-slots initargs))
-
-(defmethod shared-initialize ((instance standard-object)
- slot-names &rest initargs)
-
- ;; initialize the instance's slots in a two step process 1) A slot for which one of the
- ;; initargs in initargs can set the slot, should be set by that initarg. If more than one
- ;; initarg in initargs can set the slot, the leftmost one should set it. 2) Any slot not set
- ;; by step 1, may be set from its initform by step 2. Only those slots specified by the
- ;; slot-names argument are set. If slot-names is: T any slot not set in step 1 is set from
- ;; its initform any slot in the list, and not set in step 1 is set from
- ;; its initform () no slots are set from initforms
- (let* ((class (class-of instance))
- (slotds (class-slots class)))
- (dolist (slotd slotds)
- (let ((slot-name (slotd-name slotd))
- (slot-initargs (slotd-initargs slotd)))
- (flet ((from-initargs nil
-
- ;; Try to initialize the slot from one of the initargs. If we
- ;; succeed return T, otherwise return nil.
- (doplist (initarg val)
- initargs
- (when (memq initarg slot-initargs)
- (setf (slot-value instance slot-name)
- val)
- (return 't))))
- (from-initforms nil
-
- ;; Try to initialize the slot from its initform. This returns
- ;; no meaningful value.
- (if (and slot-names (or (eq slot-names 't)
- (memq slot-name slot-names))
- (not (slot-boundp instance slot-name)))
- (let ((initfunction (slotd-initfunction slotd)))
- (when initfunction
- (setf (slot-value instance slot-name)
- (funcall initfunction)))))))
- (or (from-initargs)
- (from-initforms))))))
- instance)
-
-
-;;; if initargs are valid return nil, otherwise signal an error
-
-
-(defun check-initargs-1 (class initargs methods)
- (let ((legal (apply #'append (mapcar #'slotd-initargs (class-slots class)))))
- (unless (getf initargs :allow-other-keys)
-
- ;; Add to the set of slot-filling initargs the set of initargs that are accepted by
- ;; the methods. If at any point we come across &allow-other-keys, we can just quit.
- (dolist (method methods)
- (multiple-value-bind (keys allow-other-keys)
- (function-keywords method)
- (when allow-other-keys (return-from check-initargs-1 nil))
- (setq legal (append keys legal))))
-
- ;; Now check the supplied-initarg-names and the default initargs against the total
- ;; set that we know are legal.
- (doplist (key val)
- initargs
- (unless (memq key legal)
- (error "Invalid initialization argument ~S for class ~S" key (class-name
- class)))))))
diff --git a/obsolete/clos/2.0/iterate.lisp b/obsolete/clos/2.0/iterate.lisp
deleted file mode 100644
index 212f819c..00000000
--- a/obsolete/clos/2.0/iterate.lisp
+++ /dev/null
@@ -1,1080 +0,0 @@
-(DEFINE-FILE-INFO READTABLE "XCL" PACKAGE (CLIN-PACKAGE ITERATE USE (QUOTE (LISP WALKER)))
-BASE 10)
-(IL:FILECREATED "19-Feb-91 13:55:29"
-IL:|{DSK}local>users>welch>lisp>clos>rev4>il-format>ITERATE.;2| 65656
-
- IL:|changes| IL:|to:| (IL:VARS IL:ITERATECOMS)
-
- IL:|previous| IL:|date:| " 6-Feb-91 11:00:58"
-IL:|{DSK}local>users>welch>lisp>clos>rev4>il-format>ITERATE.;1|)
-
-
-; Copyright (c) 1991 by Venue. All rights reserved.
-
-(IL:PRETTYCOMPRINT IL:ITERATECOMS)
-
-(IL:RPAQQ IL:ITERATECOMS
- (
-
-(IL:* IL:|;;;| "************************************************************************* Copyright (c) 1985, 1986, 1987, 1988, 1989, 1990 Xerox Corporation. All rights reserved. Use and copying of this software and preparation of derivative works based upon this software are permitted. Any distribution of this software or derivative works must comply with all applicable United States export control laws. This software is made available AS IS, and Xerox Corporation makes no warranty about the software, its performance or its conformity to any specification. Any person obtaining a copy of this software is requested to send their name and post office or electronic mail address to: CommonLoops Coordinator Xerox PARC 3333 Coyote Hill Rd. Palo Alto, CA 94304 (or send Arpanet mail to CommonLoops-Coordinator.pa@Xerox.arpa) Suggestions, comments and requests for improvements are also welcome. ************************************************************************* Original source {pooh/n}vanmelle>lisp>iterate;4 created 27-Sep-88 12:35:33 ")
-
- (IL:P (IN-PACKAGE :ITERATE :USE '(:LISP :WALKER))
- (EXPORT '(ITERATE ITERATE* GATHERING GATHER WITH-GATHERING INTERVAL ELEMENTS
- LIST-ELEMENTS LIST-TAILS PLIST-ELEMENTS EACHTIME WHILE UNTIL
- COLLECTING JOINING MAXIMIZING MINIMIZING SUMMING *ITERATE-WARNINGS*)
- ))
- (IL:VARIABLES *ITERATE-WARNINGS*)
-
-
-(IL:* IL:|;;;| "ITERATE macro")
-
- (IL:FUNCTIONS ITERATE SIMPLE-EXPAND-ITERATE-FORM)
- (IL:VARIABLES *ITERATE-TEMP-VARS-LIST*)
- (IL:FUNCTIONS OPTIMIZE-ITERATE-FORM EXPAND-INTO-LET VARIABLES-FROM-LET
- ITERATE-TRANSFORM-BODY PARSE-DECLARATIONS EXTRACT-SPECIAL-BINDINGS
- FUNCTION-LAMBDA-P RENAME-LET-BINDINGS RENAME-VARIABLES MV-SETQ VARIABLE-SAME-P
- MAYBE-WARN)
-
- (IL:* IL:|;;| "Sample iterators")
-
- (IL:FUNCTIONS INTERVAL LIST-ELEMENTS LIST-TAILS ELEMENTS PLIST-ELEMENTS SEQUENCE-ACCESSOR)
-
- (IL:* IL:|;;| "These \"iterators\" may be withdrawn")
-
- (IL:FUNCTIONS EACHTIME WHILE UNTIL)
- (IL:* IL:\; "GATHERING macro")
- (IL:FUNCTIONS GATHERING WITH-GATHERING SIMPLE-EXPAND-GATHERING-FORM)
- (IL:VARIABLES *ACTIVE-GATHERERS* *ANONYMOUS-GATHERING-SITE*)
- (IL:FUNCTIONS OPTIMIZE-GATHERING-FORM RENAME-AND-CAPTURE-VARIABLES WALK-GATHERING-BODY)
-
- (IL:* IL:|;;| "Sample gatherers")
-
- (IL:FUNCTIONS COLLECTING JOINING MAXIMIZING MINIMIZING SUMMING)
- (IL:* IL:\;
- "Easier to read expanded code if PROG1 gets left alone ")
- (XCL:FILE-ENVIRONMENTS "ITERATE")))
-
-
-
-(IL:* IL:|;;;|
-"************************************************************************* Copyright (c) 1985, 1986, 1987, 1988, 1989, 1990 Xerox Corporation. All rights reserved. Use and copying of this software and preparation of derivative works based upon this software are permitted. Any distribution of this software or derivative works must comply with all applicable United States export control laws. This software is made available AS IS, and Xerox Corporation makes no warranty about the software, its performance or its conformity to any specification. Any person obtaining a copy of this software is requested to send their name and post office or electronic mail address to: CommonLoops Coordinator Xerox PARC 3333 Coyote Hill Rd. Palo Alto, CA 94304 (or send Arpanet mail to CommonLoops-Coordinator.pa@Xerox.arpa) Suggestions, comments and requests for improvements are also welcome. ************************************************************************* Original source {pooh/n}vanmelle>lisp>iterate;4 created 27-Sep-88 12:35:33 "
-)
-
-
-(IN-PACKAGE :ITERATE :USE '(:LISP :WALKER))
-
-(EXPORT '(ITERATE ITERATE* GATHERING GATHER WITH-GATHERING INTERVAL ELEMENTS LIST-ELEMENTS
- LIST-TAILS PLIST-ELEMENTS EACHTIME WHILE UNTIL COLLECTING JOINING MAXIMIZING
- MINIMIZING SUMMING *ITERATE-WARNINGS*))
-
-(DEFVAR *ITERATE-WARNINGS* :ANY "Controls whether warnings are issued for iterate/gather forms that aren't optimized.
-NIL => never; :USER => those resulting from user code; T => always, even if it's the iteration macro that's suboptimal."
-)
-
-
-
-(IL:* IL:|;;;| "ITERATE macro")
-
-
-(DEFMACRO ITERATE (CLAUSES &BODY BODY &ENVIRONMENT ENV)
- (OPTIMIZE-ITERATE-FORM CLAUSES BODY ENV))
-
-(DEFUN SIMPLE-EXPAND-ITERATE-FORM (CLAUSES BODY)
-
- (IL:* IL:|;;|
- "Expand ITERATE. This is the \"formal semantics\" expansion, which we never use. ")
-
- (LET*
- ((BLOCK-NAME (GENSYM))
- (BOUND-VAR-LISTS (MAPCAR #'(LAMBDA (CLAUSE)
- (LET ((NAMES (FIRST CLAUSE)))
- (IF (LISTP NAMES)
- NAMES
- (LIST NAMES))))
- CLAUSES))
- (GENERATOR-VARS (MAPCAR #'(LAMBDA (CLAUSE)
- (DECLARE (IGNORE CLAUSE))
- (GENSYM))
- CLAUSES)))
- `(BLOCK ,BLOCK-NAME
- (LET*
- ,(MAPCAN #'(LAMBDA (GVAR CLAUSE VAR-LIST) (IL:* IL:\;
- "For each clause, bind a generator temp to the clause, then bind the specified var(s) ")
- (CONS (LIST GVAR (SECOND CLAUSE))
- (COPY-LIST VAR-LIST)))
- GENERATOR-VARS CLAUSES BOUND-VAR-LISTS)
-
- (IL:* IL:|;;| "Note bug in formal semantics: there can be declarations in the head of BODY; they go here, rather than inside loop ")
-
- (LOOP ,@(MAPCAR #'(LAMBDA (VAR-LIST GEN-VAR) (IL:* IL:\;
- "Set each bound variable (or set of vars) to the result of calling the corresponding generator ")
- `(MULTIPLE-VALUE-SETQ ,VAR-LIST
- (FUNCALL ,GEN-VAR #'(LAMBDA NIL (RETURN-FROM ,BLOCK-NAME))
- )))
- BOUND-VAR-LISTS GENERATOR-VARS)
- ,@BODY)))))
-
-(DEFPARAMETER *ITERATE-TEMP-VARS-LIST* '(ITERATE-TEMP-1 ITERATE-TEMP-2 ITERATE-TEMP-3
- ITERATE-TEMP-4 ITERATE-TEMP-5 ITERATE-TEMP-6
- ITERATE-TEMP-7 ITERATE-TEMP-8)
- "Temp var names used by ITERATE expansions.")
-
-(DEFUN OPTIMIZE-ITERATE-FORM (CLAUSES BODY ITERATE-ENV)
- (LET*
- ((TEMP-VARS *ITERATE-TEMP-VARS-LIST*)
- (BLOCK-NAME (GENSYM))
- (FINISH-FORM `(RETURN-FROM ,BLOCK-NAME))
- (BOUND-VARS (MAPCAN #'(LAMBDA (CLAUSE)
- (LET ((NAMES (FIRST CLAUSE)))
- (IF (LISTP NAMES)
- (COPY-LIST NAMES)
- (LIST NAMES))))
- CLAUSES))
- ITERATE-DECLS GENERATOR-DECLS UPDATE-FORMS BINDINGS LEFTOVER-BODY)
- (DO ((TAIL BOUND-VARS (CDR TAIL)))
- ((NULL TAIL)) (IL:* IL:\; "Check for duplicates")
- (WHEN (MEMBER (CAR TAIL)
- (CDR TAIL))
- (WARN "Variable appears more than once in ITERATE: ~S" (CAR TAIL))))
- (FLET
- ((GET-ITERATE-TEMP NIL
-
- (IL:* IL:|;;| "Make temporary var. Note that it is ok to re-use these symbols in each iterate, because they are not used within BODY. ")
-
- (OR (POP TEMP-VARS)
- (GENSYM))))
- (DOLIST (CLAUSE CLAUSES)
- (COND
- ((OR (NOT (CONSP CLAUSE))
- (NOT (CONSP (CDR CLAUSE))))
- (WARN "Bad syntax in ITERATE: clause not of form (var iterator): ~S" CLAUSE))
- (T
- (UNLESS (NULL (CDDR CLAUSE))
- (WARN "Probable parenthesis error in ITERATE clause--more than 2 elements: ~S"
- CLAUSE))
- (MULTIPLE-VALUE-BIND (LET-BODY BINDING-TYPE LET-BINDINGS LOCALDECLS OTHERDECLS
- EXTRA-BODY)
- (EXPAND-INTO-LET (SECOND CLAUSE)
- 'ITERATE ITERATE-ENV)
-
- (IL:* IL:|;;|
- "We have expanded the generator clause and parsed it into its LET pieces. ")
-
- (PROG* ((VARS (FIRST CLAUSE))
- GEN-ARGS RENAMED-VARS)
- (SETQ VARS (IF (LISTP VARS)
- (COPY-LIST VARS)
- (LIST VARS))) (IL:* IL:\;
- "VARS is now a (fresh) list of all iteration vars bound in this clause ")
- (COND
- ((EQ LET-BODY :ABORT) (IL:* IL:\;
- "Already issued a warning about malformedness ")
- )
- ((NULL (SETQ LET-BODY (FUNCTION-LAMBDA-P LET-BODY 1)))
- (IL:* IL:\; "Not of the expected form")
- (LET ((GENERATOR (SECOND CLAUSE)))
- (COND
- ((AND (CONSP GENERATOR)
- (FBOUNDP (CAR GENERATOR)))
- (IL:* IL:\; "It looks ok--a macro or function here--so the guy who wrote it just didn't do it in an optimizable way ")
- (MAYBE-WARN :DEFINITION "Could not optimize iterate clause ~S because generator not of form (LET[*] ... (FUNCTION (LAMBDA (finish) ...)))"
- GENERATOR))
- (T (IL:* IL:\;
- "Perhaps it's just a misspelling? Probably user error ")
- (MAYBE-WARN :USER
- "Iterate operator in clause ~S is not fboundp." GENERATOR
- )))
- (SETQ LET-BODY :ABORT)))
- (T
-
- (IL:* IL:|;;| "We have something of the form #'(LAMBDA (finisharg) ...), possibly with some LET bindings around it. LET-BODY = ((finisharg) ...). ")
-
- (SETQ LET-BODY (CDR LET-BODY))
- (SETQ GEN-ARGS (POP LET-BODY))
- (WHEN LET-BINDINGS
-
- (IL:* IL:|;;| "The first transformation we want to perform is \"LET-eversion\": turn (let* ((generator (let (..bindings..) #'(lambda ...)))) ..body..) into (let* (..bindings.. (generator #'(lambda ...))) ..body..). This transformation is valid if nothing in body refers to any of the bindings, something we can assure by alpha-converting the inner let (substituting new names for each var). Of course, none of those vars can be special, but we already checked for that above. ")
-
- (MULTIPLE-VALUE-SETQ (LET-BINDINGS RENAMED-VARS)
- (RENAME-LET-BINDINGS LET-BINDINGS BINDING-TYPE ITERATE-ENV
- LEFTOVER-BODY #'GET-ITERATE-TEMP))
- (SETQ LEFTOVER-BODY NIL) (IL:* IL:\;
- "If there was any leftover from previous, it is now consumed ")
- )
-
- (IL:* IL:|;;| "The second transformation is substituting the body of the generator (LAMBDA (finish-arg) . gen-body) for its appearance in the update form (funcall generator #'(lambda () finish-form)), then simplifying that form. The requirement for this part is that the generator body not refer to any variables that are bound between the generator binding and the appearance in the loop body. The only variables bound in that interval are generator temporaries, which have unique names so are no problem, and the iteration variables remaining for subsequent clauses. We'll discover the story as we walk the body. ")
-
- (MULTIPLE-VALUE-BIND (FINISHDECL OTHER REST)
- (PARSE-DECLARATIONS LET-BODY GEN-ARGS)
- (DECLARE (IGNORE FINISHDECL))(IL:* IL:\; "Pull out declares, if any, separating out the one(s) referring to the finish arg, which we will throw away ")
- (WHEN OTHER (IL:* IL:\;
- "Combine remaining decls with decls extracted from the LET, if any ")
- (SETQ OTHERDECLS (NCONC OTHERDECLS OTHER)))
- (SETQ LET-BODY (COND
- (OTHERDECLS (IL:* IL:\;
- "There are interesting declarations, so have to keep it wrapped. ")
- `(LET NIL (DECLARE ,@OTHERDECLS)
- ,@REST))
- ((NULL (CDR REST))
- (IL:* IL:\; "Only one form left")
- (FIRST REST))
- (T `(PROGN ,@REST)))))
- (UNLESS (EQ (SETQ LET-BODY (ITERATE-TRANSFORM-BODY LET-BODY ITERATE-ENV
- RENAMED-VARS (FIRST GEN-ARGS)
- FINISH-FORM BOUND-VARS CLAUSE))
- :ABORT)
-
- (IL:* IL:|;;| "Skip the rest if transformation failed. Warning has already been issued. Note possible further optimization: if LET-BODY expanded into (prog1 oldvalue prepare-for-next-iteration), as so many do, then we could in most cases split the PROG1 into two pieces: do the (setq var oldvalue) here, and do the prepare-for-next-iteration at the bottom of the loop. This does a slight optimization of the PROG1 and also rearranges the code in a way that a reasonably clever compiler might detect how to get rid of redundant variables altogether (such as happens with INTERVAL and LIST-TAILS); that would make the whole thing closer to what you might have coded by hand. However, to do this optimization, we need to assure that (a) the prepare-for-next-iteration refers freely to no vars other than the internal vars we have extracted from the LET, and (b) that the code has no side effects. These are both true for all the iterators defined by this module, but how shall we represent side-effect info and/or tap into the compiler's knowledge of same? ")
-
- (WHEN LOCALDECLS (IL:* IL:\; "There were declarations for the generator locals--have to keep them for later, and rename the vars mentioned ")
- (SETQ
- GENERATOR-DECLS
- (NCONC
- GENERATOR-DECLS
- (MAPCAR
- #'(LAMBDA (DECL)
- (LET ((HEAD (CAR DECL)))
- (CONS HEAD (IF (EQ HEAD 'TYPE)
- (CONS (SECOND DECL)
- (SUBLIS RENAMED-VARS
- (CDDR DECL)))
- (SUBLIS RENAMED-VARS (CDR DECL)))))
- )
- LOCALDECLS)))))))
-
- (IL:* IL:|;;| "Finished analyzing clause now. LET-BODY is the form which, when evaluated, returns updated values for the iteration variable(s) VARS. ")
-
- (WHEN (EQ LET-BODY :ABORT)
-
- (IL:* IL:|;;| "Some punt case: go with the formal semantics: bind a var to the generator, then call it in the update section ")
-
- (LET ((GVAR (GET-ITERATE-TEMP))
- (GENERATOR (SECOND CLAUSE)))
- (SETQ LET-BINDINGS
- (LIST (LIST GVAR
- (COND
- (LEFTOVER-BODY
- (IL:* IL:\; "Have to use this up")
- `(PROGN ,@(PROG1 LEFTOVER-BODY (SETQ
- LEFTOVER-BODY
- NIL))
- GENERATOR))
- (T GENERATOR)))))
- (SETQ LET-BODY `(FUNCALL ,GVAR #'(LAMBDA NIL ,FINISH-FORM)))))
- (PUSH (MV-SETQ (COPY-LIST VARS)
- LET-BODY)
- UPDATE-FORMS)
- (DOLIST (V VARS)
- (DECLARE (IGNORE V)) (IL:* IL:\; "Pop off the vars we have now bound from the list of vars to watch out for--we'll bind them right now ")
- (POP BOUND-VARS))
- (SETQ BINDINGS (NCONC BINDINGS LET-BINDINGS
- (COND
- (EXTRA-BODY (IL:* IL:\;
- "There was some computation to do after the bindings--here's our chance ")
- (CONS (LIST (FIRST VARS)
- `(PROGN ,@EXTRA-BODY NIL))
- (REST VARS)))
- (T VARS))))))))))
- (DO ((TAIL BODY (CDR TAIL)))
- ((NOT (AND (CONSP TAIL)
- (CONSP (CAR TAIL))
- (EQ (CAAR TAIL)
- 'DECLARE)))
-
- (IL:* IL:|;;| "TAIL now points at first non-declaration. If there were declarations, pop them off so they appear in the right place ")
-
- (UNLESS (EQ TAIL BODY)
- (SETQ ITERATE-DECLS (LDIFF BODY TAIL))
- (SETQ BODY TAIL))))
- `(BLOCK ,BLOCK-NAME
- (LET* ,BINDINGS ,@(AND GENERATOR-DECLS `((DECLARE ,@GENERATOR-DECLS)))
- ,@ITERATE-DECLS
- ,@LEFTOVER-BODY
- (LOOP ,@(NREVERSE UPDATE-FORMS)
- ,@BODY)))))
-
-(DEFUN EXPAND-INTO-LET (CLAUSE PARENT-NAME ENV)
-
- (IL:* IL:|;;| "Return values: Body, LET[*], bindings, localdecls, otherdecls, extra body, where BODY is a single form. If multiple forms in a LET, the preceding forms are returned as extra body. Returns :ABORT if it issued a punt warning. ")
-
- (PROG ((EXPANSION CLAUSE)
- EXPANDEDP BINDING-TYPE LET-BINDINGS LET-BODY)
- EXPAND
- (MULTIPLE-VALUE-SETQ (EXPANSION EXPANDEDP)
- (MACROEXPAND-1 EXPANSION ENV))
- (COND
- ((NOT (CONSP EXPANSION)) (IL:* IL:\; "Shouldn't happen")
- )
- ((SYMBOLP (SETQ BINDING-TYPE (FIRST EXPANSION)))
- (CASE BINDING-TYPE
- ((LET LET*)
- (SETQ LET-BINDINGS (SECOND EXPANSION)) (IL:* IL:\;
- "List of variable bindings")
- (SETQ LET-BODY (CDDR EXPANSION))
- (GO HANDLE-LET))))
- ((AND (CONSP BINDING-TYPE)
- (EQ (CAR BINDING-TYPE)
- 'LAMBDA)
- (NOT (FIND-IF #'(LAMBDA (X)
- (MEMBER X LAMBDA-LIST-KEYWORDS))
- (SETQ LET-BINDINGS (SECOND BINDING-TYPE))))
- (EQL (LENGTH (SECOND EXPANSION))
- (LENGTH LET-BINDINGS))
- (NULL (CDDR EXPANSION))) (IL:* IL:\;
- "A simple LAMBDA form can be treated as LET ")
- (SETQ LET-BODY (CDDR BINDING-TYPE))
- (SETQ LET-BINDINGS (MAPCAR #'LIST LET-BINDINGS (SECOND EXPANSION)))
- (SETQ BINDING-TYPE 'LET)
- (GO HANDLE-LET)))
-
- (IL:* IL:|;;| "Fall thru if not a LET")
-
- (COND
- (EXPANDEDP (IL:* IL:\; "try expanding again")
- (GO EXPAND))
- (T (IL:* IL:\;
- "Boring--return form as the body ")
- (RETURN EXPANSION)))
- HANDLE-LET
- (RETURN (LET ((LOCALS (VARIABLES-FROM-LET LET-BINDINGS))
- EXTRA-BODY SPECIALS)
- (MULTIPLE-VALUE-BIND (LOCALDECLS OTHERDECLS LET-BODY)
- (PARSE-DECLARATIONS LET-BODY LOCALS)
- (COND
- ((SETQ SPECIALS (EXTRACT-SPECIAL-BINDINGS LOCALS LOCALDECLS))
- (MAYBE-WARN (COND
- ((FIND-IF #'VARIABLE-GLOBALLY-SPECIAL-P SPECIALS)
- (IL:* IL:\;
- "This could be the fault of a user proclamation ")
- :USER)
- (T :DEFINITION))
-
- "Couldn't optimize ~S because expansion of ~S binds specials ~(~S ~)"
- PARENT-NAME CLAUSE SPECIALS)
- :ABORT)
- (T (VALUES (COND
- ((NOT (CONSP LET-BODY))
- (IL:* IL:\;
- "Null body of LET? unlikely, but someone else will likely complain ")
- NIL)
- ((NULL (CDR LET-BODY))
- (IL:* IL:\;
- "A single expression, which we hope is (function (lambda...)) ")
- (FIRST LET-BODY))
- (T
-
- (IL:* IL:|;;| "More than one expression. These are forms to evaluate after the bindings but before the generator form is returned. Save them to evaluate in the next convenient place. Note that this is ok, as there is no construct that can cause a LET to return prematurely (without returning also from some surrounding construct). ")
-
- (SETQ EXTRA-BODY (BUTLAST LET-BODY))
- (CAR (LAST LET-BODY))))
- BINDING-TYPE LET-BINDINGS LOCALDECLS OTHERDECLS EXTRA-BODY))))))
- ))
-
-(DEFUN VARIABLES-FROM-LET (BINDINGS)
-
- (IL:* IL:|;;| "Return a list of the variables bound in the first argument to LET[*].")
-
- (MAPCAR #'(LAMBDA (BINDING)
- (IF (CONSP BINDING)
- (FIRST BINDING)
- BINDING))
- BINDINGS))
-
-(DEFUN ITERATE-TRANSFORM-BODY (LET-BODY ITERATE-ENV RENAMED-VARS FINISH-ARG FINISH-FORM
- BOUND-VARS CLAUSE)
-
-(IL:* IL:|;;;| "This is the second major transformation for a single iterate clause. LET-BODY is the body of the iterator after we have extracted its local variables and declarations. We have two main tasks: (1) Substitute internal temporaries for occurrences of the LET variables; the alist RENAMED-VARS specifies this transformation. (2) Substitute evaluation of FINISH-FORM for any occurrence of (funcall FINISH-ARG). Along the way, we check for forms that would invalidate these transformations: occurrence of FINISH-ARG outside of a funcall, and free reference to any element of BOUND-VARS. CLAUSE & TYPE are the original ITERATE clause and its type (ITERATE or ITERATE*), for purpose of error messages. On success, we return the transformed body; on failure, :ABORT. ")
-
- (WALK-FORM LET-BODY ITERATE-ENV #'(LAMBDA (FORM CONTEXT ENV)
- (DECLARE (IGNORE CONTEXT))
-
- (IL:* IL:|;;|
- "Need to substitute RENAMED-VARS, as well as turn (FUNCALL finish-arg) into the finish form ")
-
- (COND
- ((SYMBOLP FORM)
- (LET (RENAMING)
- (COND
- ((AND (EQ FORM FINISH-ARG)
- (VARIABLE-SAME-P FORM ENV
- ITERATE-ENV))
- (IL:* IL:\;
- "An occurrence of the finish arg outside of FUNCALL context--I can't handle this ")
- (MAYBE-WARN :DEFINITION "Couldn't optimize iterate form because generator ~S does something with its FINISH arg besides FUNCALL it."
- (SECOND CLAUSE))
- (RETURN-FROM ITERATE-TRANSFORM-BODY :ABORT))
- ((AND (SETQ RENAMING (ASSOC FORM RENAMED-VARS
- ))
- (VARIABLE-SAME-P FORM ENV
- ITERATE-ENV))
- (IL:* IL:\;
- "Reference to one of the vars we're renaming ")
- (CDR RENAMING))
- ((AND (MEMBER FORM BOUND-VARS)
- (VARIABLE-SAME-P FORM ENV
- ITERATE-ENV))
- (IL:* IL:\; "FORM is a var that is bound in this same ITERATE, or bound later in this ITERATE*. This is a conflict. ")
- (MAYBE-WARN :USER "Couldn't optimize iterate form because generator ~S is closed over ~S, in conflict with a subsequent iteration variable."
- (SECOND CLAUSE)
- FORM)
- (RETURN-FROM ITERATE-TRANSFORM-BODY :ABORT))
- (T FORM))))
- ((AND (CONSP FORM)
- (EQ (FIRST FORM)
- 'FUNCALL)
- (EQ (SECOND FORM)
- FINISH-ARG)
- (VARIABLE-SAME-P (SECOND FORM)
- ENV ITERATE-ENV))
- (IL:* IL:\;
- "(FUNCALL finish-arg) => finish-form ")
- (UNLESS (NULL (CDDR FORM))
- (MAYBE-WARN :DEFINITION
- "Generator for ~S applied its finish arg to > 0 arguments ~S--ignored."
- (SECOND CLAUSE)
- (CDDR FORM)))
- FINISH-FORM)
- (T FORM)))))
-
-(DEFUN PARSE-DECLARATIONS (TAIL LOCALS)
-
- (IL:* IL:|;;| "Extract the declarations from the head of TAIL and divide them into 2 classes: declares about variables in the list LOCALS, and all other declarations. Returns 3 values: those 2 lists plus the remainder of TAIL. ")
-
- (LET
- (LOCALDECLS OTHERDECLS FORM)
- (LOOP
- (UNLESS (AND TAIL (CONSP (SETQ FORM (CAR TAIL)))
- (EQ (CAR FORM)
- 'DECLARE))
- (RETURN (VALUES LOCALDECLS OTHERDECLS TAIL)))
- (MAPC
- #'(LAMBDA (DECL)
- (CASE (FIRST DECL)
- ((INLINE NOTINLINE OPTIMIZE) (IL:* IL:\;
- "These don't talk about vars")
- (PUSH DECL OTHERDECLS))
- (T (IL:* IL:\;
- "Assume all other kinds are for vars ")
- (LET* ((VARS (IF (EQ (FIRST DECL)
- 'TYPE)
- (CDDR DECL)
- (CDR DECL)))
- (L (INTERSECTION LOCALS VARS))
- OTHER)
- (COND
- ((NULL L) (IL:* IL:\; "None talk about LOCALS")
- (PUSH DECL OTHERDECLS))
- ((NULL (SETQ OTHER (SET-DIFFERENCE VARS L)))
- (IL:* IL:\; "All talk about LOCALS")
- (PUSH DECL LOCALDECLS))
- (T (IL:* IL:\; "Some of each")
- (LET ((HEAD (CONS 'TYPE (AND (EQ (FIRST DECL)
- 'TYPE)
- (LIST (SECOND DECL))))))
- (PUSH (APPEND HEAD OTHER)
- OTHERDECLS)
- (PUSH (APPEND HEAD L)
- LOCALDECLS))))))))
- (CDR FORM))
- (POP TAIL))))
-
-(DEFUN EXTRACT-SPECIAL-BINDINGS (VARS DECLS)
-
- (IL:* IL:|;;|
-"Return the subset of VARS that are special, either globally or because of a declaration in DECLS ")
-
- (LET ((SPECIALS (REMOVE-IF-NOT #'VARIABLE-GLOBALLY-SPECIAL-P VARS)))
- (DOLIST (D DECLS)
- (WHEN (EQ (CAR D)
- 'SPECIAL)
- (SETQ SPECIALS (UNION SPECIALS (INTERSECTION VARS (CDR D))))))
- SPECIALS))
-
-(DEFUN FUNCTION-LAMBDA-P (FORM &OPTIONAL NARGS)
-
- (IL:* IL:|;;| "If FORM is #'(LAMBDA bindings . body) and bindings is of length NARGS, return the lambda expression ")
-
- (LET (ARGS BODY)
- (AND (CONSP FORM)
- (EQ (CAR FORM)
- 'FUNCTION)
- (CONSP (SETQ FORM (CDR FORM)))
- (NULL (CDR FORM))
- (CONSP (SETQ FORM (CAR FORM)))
- (EQ (CAR FORM)
- 'LAMBDA)
- (CONSP (SETQ BODY (CDR FORM)))
- (LISTP (SETQ ARGS (CAR BODY)))
- (OR (NULL NARGS)
- (EQL (LENGTH ARGS)
- NARGS))
- FORM)))
-
-(DEFUN RENAME-LET-BINDINGS (LET-BINDINGS BINDING-TYPE ENV LEFTOVER-BODY &OPTIONAL TEMPVARFN)
-
- (IL:* IL:|;;| "Perform the alpha conversion required for \"LET eversion\" of (LET[*] LET-BINDINGS . body)--rename each of the variables to an internal name. Returns 2 values: a new set of LET bindings and the alist of old var names to new (so caller can walk the body doing the rest of the renaming). BINDING-TYPE is one of LET or LET*. LEFTOVER-BODY is optional list of forms that must be eval'ed before the first binding happens. ENV is the macro expansion environment, in case we have to walk a LET*. TEMPVARFN is a function of no args to return a temporary var; if omitted, we use GENSYM. ")
-
- (LET (RENAMED-VARS)
- (VALUES (MAPCAR #'(LAMBDA (BINDING)
- (LET ((VALUEFORM (COND
- ((NOT (CONSP BINDING))
- (IL:* IL:\; "No initial value")
- NIL)
- ((OR (EQ BINDING-TYPE 'LET)
- (NULL RENAMED-VARS))
- (IL:* IL:\;
- "All bindings are in parallel, so none can refer to others ")
- (SECOND BINDING))
- (T (IL:* IL:\;
- "In a LET*, have to substitute vars in the 2nd and subsequent initialization forms ")
- (RENAME-VARIABLES (SECOND BINDING)
- RENAMED-VARS ENV))))
- (NEWVAR (IF TEMPVARFN
- (FUNCALL TEMPVARFN)
- (GENSYM))))
- (PUSH (CONS (IF (CONSP BINDING)
- (FIRST BINDING)
- BINDING)
- NEWVAR)
- RENAMED-VARS) (IL:* IL:\;
- "Add new variable to the list AFTER we have walked the initial value form ")
- (WHEN LEFTOVER-BODY
-
- (IL:* IL:|;;| "Previous clause had some computation to do after its bindings. Here is the first opportunity to do it ")
-
- (SETQ VALUEFORM `(PROGN ,@LEFTOVER-BODY ,VALUEFORM))
- (SETQ LEFTOVER-BODY NIL))
- (LIST NEWVAR VALUEFORM)))
- LET-BINDINGS)
- RENAMED-VARS)))
-
-(DEFUN RENAME-VARIABLES (FORM ALIST ENV)
-
- (IL:* IL:|;;| "Walks FORM, renaming occurrences of the key variables in ALIST with their corresponding values. ENV is FORM's environment, so we can make sure we are talking about the same variables. ")
-
- (WALK-FORM FORM ENV #'(LAMBDA (FORM CONTEXT SUBENV)
- (DECLARE (IGNORE CONTEXT))
- (LET (PAIR)
- (COND
- ((AND (SYMBOLP FORM)
- (SETQ PAIR (ASSOC FORM ALIST))
- (VARIABLE-SAME-P FORM SUBENV ENV))
- (CDR PAIR))
- (T FORM))))))
-
-(DEFUN MV-SETQ (VARS EXPR)
-
- (IL:* IL:|;;| "Produces (MULTIPLE-VALUE-SETQ vars expr), except that I'll optimize some of the simple cases for benefit of compilers that don't, and I don't care what the value is, and I know that the variables need not be set in parallel, since they can't be used free in EXPR ")
-
- (COND
- ((NULL VARS) (IL:* IL:\; "EXPR is a side-effect")
- EXPR)
- ((NOT (CONSP VARS)) (IL:* IL:\;
- "This is an error, but I'll let MULTIPLE-VALUE-SETQ report it ")
- `(MULTIPLE-VALUE-SETQ ,VARS ,EXPR))
- ((AND (LISTP EXPR)
- (EQ (CAR EXPR)
- 'VALUES))
-
- (IL:* IL:|;;| "(mv-setq (a b c) (values x y z)) can be reduced to a parallel setq (psetq returns nil, but I don't care about returned value). Do this even for the single variable case so that we catch (mv-setq (a) (values x y)) ")
-
- (POP EXPR) (IL:* IL:\; "VALUES")
- `(SETQ ,@(MAPCON #'(LAMBDA (TAIL)
- (LIST (CAR TAIL)
- (COND
- ((OR (CDR TAIL)
- (NULL (CDR EXPR)))
- (IL:* IL:\;
- "One result expression for this var ")
- (POP EXPR))
- (T (IL:* IL:\;
- "More expressions than vars, so arrange to evaluate all the rest now. ")
- (CONS 'PROG1 EXPR)))))
- VARS)))
- ((NULL (CDR VARS)) (IL:* IL:\; "Simple one variable case")
- `(SETQ ,(CAR VARS)
- ,EXPR))
- (T (IL:* IL:\;
- "General case--I know nothing")
- `(MULTIPLE-VALUE-SETQ ,VARS ,EXPR))))
-
-(DEFUN VARIABLE-SAME-P (VAR ENV1 ENV2)
- (EQ (VARIABLE-LEXICAL-P VAR ENV1)
- (VARIABLE-LEXICAL-P VAR ENV2)))
-
-(DEFUN MAYBE-WARN (TYPE &REST WARN-ARGS)
-
- (IL:* IL:|;;| "Issue a warning about not being able to optimize this thing. TYPE is one of :DEFINITION, meaning the definition is at fault, and :USER, meaning the user's code is at fault. ")
-
- (WHEN (CASE *ITERATE-WARNINGS*
- ((NIL) NIL)
- ((:USER) (EQ TYPE :USER))
- (T T))
- (APPLY #'WARN WARN-ARGS)))
-
-
-
-(IL:* IL:|;;| "Sample iterators")
-
-
-(DEFMACRO INTERVAL (&WHOLE WHOLE &KEY FROM DOWNFROM TO DOWNTO ABOVE BELOW BY TYPE)
- (COND
- ((AND FROM DOWNFROM)
- (ERROR "Can't use both FROM and DOWNFROM in ~S" WHOLE))
- ((CDR (REMOVE NIL (LIST TO DOWNTO ABOVE BELOW)))
- (ERROR "Can't use more than one limit keyword in ~S" WHOLE))
- (T
- (LET*
- ((DOWN (OR DOWNFROM DOWNTO ABOVE))
- (LIMIT (OR TO DOWNTO ABOVE BELOW))
- (INC (COND
- ((NULL BY)
- 1)
- ((CONSTANTP BY) (IL:* IL:\;
- "Can inline this increment")
- BY))))
- `(LET ((FROM ,(OR FROM DOWNFROM 0))
- ,@(AND LIMIT `((TO ,LIMIT)))
- ,@(AND (NULL INC)
- `((BY ,BY))))
- ,@(AND TYPE `((DECLARE (TYPE ,TYPE FROM ,@(AND LIMIT '(TO))
- ,@(AND (NULL INC)
- `(BY))))))
- #'(LAMBDA (FINISH)
- ,@(COND
- ((NULL LIMIT) (IL:* IL:\;
- "We won't use the FINISH arg")
- '((DECLARE (IGNORE FINISH)))))
- (PROG1 ,(COND
- (LIMIT (IL:* IL:\;
- "Test the limit. If ok, return current value and increment, else quit ")
- `(IF (,(COND
- (ABOVE '>)
- (BELOW '<)
- (DOWN '>=)
- (T '<=))
- FROM TO)
- FROM
- (FUNCALL FINISH)))
- (T (IL:* IL:\; "No test")
- 'FROM))
- (SETQ FROM (,(IF DOWN
- '-
- '+)
- FROM
- ,(OR INC 'BY))))))))))
-
-(DEFMACRO LIST-ELEMENTS (LIST &KEY (BY '#'CDR))
- `(LET ((TAIL ,LIST))
- #'(LAMBDA (FINISH)
- (PROG1 (IF (ENDP TAIL)
- (FUNCALL FINISH)
- (FIRST TAIL))
- (SETQ TAIL (FUNCALL ,BY TAIL))))))
-
-(DEFMACRO LIST-TAILS (LIST &KEY (BY '#'CDR))
- `(LET ((TAIL ,LIST))
- #'(LAMBDA (FINISH)
- (PROG1 (IF (ENDP TAIL)
- (FUNCALL FINISH)
- TAIL)
- (SETQ TAIL (FUNCALL ,BY TAIL))))))
-
-(DEFMACRO ELEMENTS (SEQUENCE)
- "Generates successive elements of SEQUENCE, with second value being the index. Use (ELEMENTS (THE type arg)) if you care about the type."
- (LET* ((TYPE (AND (CONSP SEQUENCE)
- (EQ (FIRST SEQUENCE)
- 'THE)
- (SECOND SEQUENCE)))
- (ACCESSOR (IF TYPE
- (SEQUENCE-ACCESSOR TYPE)
- 'ELT))
- (LISTP (EQ TYPE 'LIST)))
-
- (IL:* IL:|;;| "If type is given via THE, we may be able to generate a good accessor here for the benefit of implementations that aren't smart about (ELT (THE STRING FOO)). I'm not bothering to keep the THE inside the body, however, since I assume any compiler that would understand (AREF (THE SIMPLE-ARRAY S)) would also understand that (AREF S) is the same when I bound S to (THE SIMPLE-ARRAY foo) and never modified it. If sequence is declared to be a list, it's better to cdr down it, so we have some extra cases here. Normally folks would write LIST-ELEMENTS, but maybe they wanted to get the index for free... ")
-
- `(LET* ((INDEX 0)
- (S ,SEQUENCE)
- ,@(AND (NOT LISTP)
- '((SIZE (LENGTH S)))))
- #'(LAMBDA (FINISH)
- (VALUES (COND
- ,(IF LISTP
- '((NOT (ENDP S))
- (POP S))
- `((< INDEX SIZE)
- (,ACCESSOR S INDEX)))
- (T (FUNCALL FINISH)))
- (PROG1 INDEX
- (SETQ INDEX (1+ INDEX))))))))
-
-(DEFMACRO PLIST-ELEMENTS (PLIST)
- "Generates each time 2 items, the indicator and the value."
- `(LET ((TAIL ,PLIST))
- #'(LAMBDA (FINISH)
- (VALUES (IF (ENDP TAIL)
- (FUNCALL FINISH)
- (FIRST TAIL))
- (PROG1 (IF (ENDP (SETQ TAIL (CDR TAIL)))
- (FUNCALL FINISH)
- (FIRST TAIL))
- (SETQ TAIL (CDR TAIL)))))))
-
-(DEFUN SEQUENCE-ACCESSOR (TYPE)
-
- (IL:* IL:|;;|
- "returns the function with which most efficiently to make accesses to a sequence of type TYPE. ")
-
- (CASE (IF (CONSP TYPE) (IL:* IL:\; "e.g., (VECTOR FLOAT *)")
- (CAR TYPE)
- TYPE)
- ((ARRAY SIMPLE-ARRAY VECTOR) 'AREF)
- (SIMPLE-VECTOR 'SVREF)
- (STRING 'CHAR)
- (SIMPLE-STRING 'SCHAR)
- (BIT-VECTOR 'BIT)
- (SIMPLE-BIT-VECTOR 'SBIT)
- (T 'ELT)))
-
-
-
-(IL:* IL:|;;| "These \"iterators\" may be withdrawn")
-
-
-(DEFMACRO EACHTIME (EXPR)
- `#'(LAMBDA (FINISH)
- (DECLARE (IGNORE FINISH))
- ,EXPR))
-
-(DEFMACRO WHILE (EXPR)
- `#'(LAMBDA (FINISH)
- (UNLESS ,EXPR (FUNCALL FINISH))))
-
-(DEFMACRO UNTIL (EXPR)
- `#'(LAMBDA (FINISH)
- (WHEN ,EXPR (FUNCALL FINISH))))
-
-
-
-(IL:* IL:\; "GATHERING macro")
-
-
-(DEFMACRO GATHERING (CLAUSES &BODY BODY &ENVIRONMENT ENV)
- (OR (OPTIMIZE-GATHERING-FORM CLAUSES BODY ENV)
- (SIMPLE-EXPAND-GATHERING-FORM CLAUSES BODY ENV)))
-
-(DEFMACRO WITH-GATHERING (CLAUSES GATHER-BODY &BODY USE-BODY)
- "Binds the variables specified in CLAUSES to the result of (GATHERING clauses gather-body) and evaluates the forms in USE-BODY inside that contour."
-
- (IL:* IL:|;;| "We may optimize this a little better later for those compilers that don't do a good job on (m-v-bind vars (... (values ...)) ...). ")
-
- `(MULTIPLE-VALUE-BIND ,(MAPCAR #'CAR CLAUSES)
- (GATHERING ,CLAUSES ,GATHER-BODY)
- ,@USE-BODY))
-
-(DEFUN SIMPLE-EXPAND-GATHERING-FORM (CLAUSES BODY ENV)
- (DECLARE (IGNORE ENV))
-
- (IL:* IL:|;;|
- "The \"formal semantics\" of GATHERING. We use this only in cases that can't be optimized. ")
-
- (LET
- ((ACC-NAMES (MAPCAR #'FIRST (IF (SYMBOLP CLAUSES) (IL:* IL:\;
- "Shorthand using anonymous gathering site ")
- (SETQ CLAUSES `((*ANONYMOUS-GATHERING-SITE* (,CLAUSES))))
- CLAUSES)))
- (REALIZER-NAMES (MAPCAR #'(LAMBDA (BINDING)
- (DECLARE (IGNORE BINDING))
- (GENSYM))
- CLAUSES)))
- `(MULTIPLE-VALUE-CALL
- #'(LAMBDA ,(MAPCAN #'LIST ACC-NAMES REALIZER-NAMES)
- (FLET ((GATHER (VALUE &OPTIONAL (ACCUMULATOR *ANONYMOUS-GATHERING-SITE*))
- (FUNCALL ACCUMULATOR VALUE)))
- ,@BODY
- (VALUES ,@(MAPCAR #'(LAMBDA (RNAME)
- `(FUNCALL ,RNAME))
- REALIZER-NAMES))))
- ,@(MAPCAR #'SECOND CLAUSES))))
-
-(DEFVAR *ACTIVE-GATHERERS* NIL
- "List of GATHERING bindings currently active during macro expansion)")
-
-(DEFVAR *ANONYMOUS-GATHERING-SITE* NIL
- "Variable used in formal expansion of an abbreviated GATHERING form (one with anonymous gathering site)."
-)
-
-(DEFUN OPTIMIZE-GATHERING-FORM (CLAUSES BODY GATHERING-ENV)
- (LET*
- (ACC-INFO LEFTOVER-BODY TOP-BINDINGS FINISH-FORMS TOP-DECLS)
- (DOLIST (CLAUSE (IF (SYMBOLP CLAUSES) (IL:* IL:\; "A shorthand")
- `((*ANONYMOUS-GATHERING-SITE* (,CLAUSES)))
- CLAUSES))
- (MULTIPLE-VALUE-BIND (LET-BODY BINDING-TYPE LET-BINDINGS LOCALDECLS OTHERDECLS EXTRA-BODY)
- (EXPAND-INTO-LET (SECOND CLAUSE)
- 'GATHERING GATHERING-ENV)
- (PROG* ((ACC-VAR (FIRST CLAUSE))
- RENAMED-VARS ACCUMULATOR REALIZER)
- (WHEN (AND (CONSP LET-BODY)
- (EQ (CAR LET-BODY)
- 'VALUES)
- (CONSP (SETQ LET-BODY (CDR LET-BODY)))
- (SETQ ACCUMULATOR (FUNCTION-LAMBDA-P (CAR LET-BODY)))
- (CONSP (SETQ LET-BODY (CDR LET-BODY)))
- (SETQ REALIZER (FUNCTION-LAMBDA-P (CAR LET-BODY)
- 0))
- (NULL (CDR LET-BODY)))
-
- (IL:* IL:|;;| "Macro returned something of the form (VALUES #'(lambda (value)")
-
- (IL:* IL:|;;|
- "..) #'(lambda () ...)), a function to accumulate values and a function to realize the result. ")
-
- (WHEN BINDING-TYPE
-
- (IL:* IL:|;;| "Gatherer expanded into a LET")
-
- (COND
- (OTHERDECLS (MAYBE-WARN :DEFINITION "Couldn't optimize GATHERING clause ~S because its expansion carries declarations about more than the bound variables: ~S"
- (SECOND CLAUSE)
- `(DECLARE ,@OTHERDECLS))
- (GO PUNT)))
- (WHEN LET-BINDINGS
-
- (IL:* IL:|;;| "The first transformation we want to perform is a variant of \"LET-eversion\": turn (mv-bind (acc real) (let (..bindings..) (values #'(lambda ...) #'(lambda ")
-
- (IL:* IL:|;;| "..))) ..body..) into (let* (..bindings.. (acc #'(lambda ...)) (real #'(lambda ...))) ..body..). This transformation is valid if nothing in body refers to any of the bindings, something we can assure by alpha-converting the inner let (substituting new names for each var). Of course, none of those vars can be special, but we already checked for that above. ")
-
- (MULTIPLE-VALUE-SETQ (LET-BINDINGS RENAMED-VARS)
- (RENAME-LET-BINDINGS LET-BINDINGS BINDING-TYPE GATHERING-ENV
- LEFTOVER-BODY))
- (SETQ TOP-BINDINGS (NCONC TOP-BINDINGS LET-BINDINGS))
- (SETQ LEFTOVER-BODY NIL) (IL:* IL:\;
- "If there was any leftover from previous, it is now consumed ")
- ))
- (SETQ LEFTOVER-BODY (NCONC LEFTOVER-BODY EXTRA-BODY))
- (IL:* IL:\;
- "Computation to do after these bindings ")
- (PUSH (CONS ACC-VAR (RENAME-AND-CAPTURE-VARIABLES ACCUMULATOR RENAMED-VARS
- GATHERING-ENV))
- ACC-INFO)
- (SETQ REALIZER (RENAME-VARIABLES REALIZER RENAMED-VARS GATHERING-ENV))
- (PUSH (COND
- ((NULL (CDDDR REALIZER)) (IL:* IL:\;
- "Simple (LAMBDA () expr) => expr ")
- (THIRD REALIZER))
- (T (IL:* IL:\;
- "There could be declarations or something, so leave as a LET ")
- (CONS 'LET (CDR REALIZER))))
- FINISH-FORMS)
- (UNLESS (NULL LOCALDECLS) (IL:* IL:\;
- "Declarations about the LET variables also has to percolate up ")
- (SETQ TOP-DECLS (NCONC TOP-DECLS (SUBLIS RENAMED-VARS LOCALDECLS))))
- (RETURN))
- (MAYBE-WARN :DEFINITION "Couldn't optimize GATHERING clause ~S because its expansion is not of the form (VALUES #'(LAMBDA ...) #'(LAMBDA () ...))"
- (SECOND CLAUSE))
- PUNT
- (LET ((GS (GENSYM))
- (EXPANSION `(MULTIPLE-VALUE-LIST ,(SECOND CLAUSE))))
- (IL:* IL:\;
- "Slow way--bind gensym to the macro expansion, and we will funcall it in the body ")
- (PUSH (LIST ACC-VAR GS)
- ACC-INFO)
- (PUSH `(FUNCALL (CADR ,GS))
- FINISH-FORMS)
- (SETQ TOP-BINDINGS
- (NCONC TOP-BINDINGS
- (LIST (LIST GS
- (COND
- (LEFTOVER-BODY
- `(PROGN ,@(PROG1 LEFTOVER-BODY (SETQ LEFTOVER-BODY
- NIL))
- ,EXPANSION))
- (T EXPANSION))))))))))
- (SETQ BODY (WALK-GATHERING-BODY BODY GATHERING-ENV ACC-INFO))
- (COND
- ((EQ BODY :ABORT) (IL:* IL:\;
- "Couldn't finish expansion")
- NIL)
- (T `(LET* ,TOP-BINDINGS ,@(AND TOP-DECLS `((DECLARE ,@TOP-DECLS)))
- ,BODY
- ,(COND
- ((NULL (CDR FINISH-FORMS)) (IL:* IL:\; "just a single value")
- (CAR FINISH-FORMS))
- (T `(VALUES ,@(REVERSE FINISH-FORMS)))))))))
-
-(DEFUN RENAME-AND-CAPTURE-VARIABLES (FORM ALIST ENV)
-
- (IL:* IL:|;;| "Walks FORM, renaming occurrences of the key variables in ALIST with their corresponding values, and capturing any other free variables. Returns a list of the new form and the list of other closed-over vars. ENV is FORM's environment, so we can make sure we are talking about the same variables. ")
-
- (LET (CLOSED)
- (LIST (WALK-FORM FORM ENV #'(LAMBDA (FORM CONTEXT SUBENV)
- (DECLARE (IGNORE CONTEXT))
- (LET (PAIR)
- (COND
- ((OR (NOT (SYMBOLP FORM))
- (NOT (VARIABLE-SAME-P FORM SUBENV ENV)))
- (IL:* IL:\;
- "non-variable or one that has been rebound ")
- FORM)
- ((SETQ PAIR (ASSOC FORM ALIST))
- (IL:* IL:\; "One to rename")
- (CDR PAIR))
- (T (IL:* IL:\; "var is free")
- (PUSHNEW FORM CLOSED)
- FORM)))))
- CLOSED)))
-
-(DEFUN WALK-GATHERING-BODY (BODY GATHERING-ENV ACC-INFO)
-
- (IL:* IL:|;;| "Walk the body of (GATHERING (...) . BODY) in environment GATHERING-ENV. ACC-INFO is a list of information about each of the gathering \"bindings\" in the form, in the form (var gatheringfn freevars env) ")
-
- (LET ((*ACTIVE-GATHERERS* (NCONC (MAPCAR #'CAR ACC-INFO)
- *ACTIVE-GATHERERS*)))
-
- (IL:* IL:|;;| "*ACTIVE-GATHERERS* tells us what vars are currently legal as GATHER targets. This is so that when we encounter a GATHER not belonging to us we can know whether to warn about it. ")
-
- (WALK-FORM
- (CONS 'PROGN BODY)
- GATHERING-ENV
- #'(LAMBDA (FORM CONTEXT ENV)
- (DECLARE (IGNORE CONTEXT))
- (LET (INFO SITE)
- (COND
- ((CONSP FORM)
- (COND
- ((NOT (EQ (CAR FORM)
- 'GATHER)) (IL:* IL:\;
- "We only care about GATHER")
- (WHEN (AND (EQ (CAR FORM)
- 'FUNCTION)
- (EQ (CADR FORM)
- 'GATHER)) (IL:* IL:\;
- "Passed as functional--can't macroexpand ")
- (MAYBE-WARN :USER
- "Can't optimize GATHERING because of reference to #'GATHER."
- )
- (RETURN-FROM WALK-GATHERING-BODY :ABORT))
- FORM)
- ((SETQ INFO (ASSOC (SETQ SITE (IF (NULL (CDDR FORM))
- '*ANONYMOUS-GATHERING-SITE*
- (THIRD FORM)))
- ACC-INFO)) (IL:* IL:\;
- "One of ours--expand (GATHER value var). INFO = (var gatheringfn freevars env) ")
- (UNLESS (NULL (CDDDR FORM))
- (WARN "Extra arguments (> 2) in ~S discarded." FORM))
- (LET ((FN (SECOND INFO)))
- (COND
- ((SYMBOLP FN) (IL:* IL:\; "Unoptimized case--just call the gatherer. FN is the gensym that we bound to the list of two values returned from the gatherer. ")
- `(FUNCALL (CAR ,FN)
- ,(SECOND FORM)))
- (T (IL:* IL:\;
- "FN = (lambda (value) ...)")
- (DOLIST (S (THIRD INFO))
- (UNLESS (OR (VARIABLE-SAME-P S ENV GATHERING-ENV)
- (AND (VARIABLE-SPECIAL-P S ENV)
- (VARIABLE-SPECIAL-P S GATHERING-ENV)))
-
- (IL:* IL:|;;| "Some var used free in the LAMBDA form has been rebound between here and the parent GATHERING form, so can't substitute the lambda. Ok if it's a special reference both here and in the LAMBDA, because then it's not closed over. ")
-
- (MAYBE-WARN :USER "Can't optimize GATHERING because the expansion closes over the variable ~S, which is rebound around a GATHER for it."
- S)
- (RETURN-FROM WALK-GATHERING-BODY :ABORT)))
-
- (IL:* IL:|;;| "Return ((lambda (value) ...) actual-value). In many cases we could simplify this further by substitution, but we'd have to be careful (for example, we would need to alpha-convert any LET we found inside). Any decent compiler will do it for us. ")
-
- (LIST FN (SECOND FORM))))))
- ((AND (SETQ INFO (MEMBER SITE *ACTIVE-GATHERERS*))
- (OR (EQ SITE '*ANONYMOUS-GATHERING-SITE*)
- (VARIABLE-SAME-P SITE ENV (FOURTH INFO))))
- (IL:* IL:\; "Some other GATHERING will take care of this form, so pass it up for now. Environment check is to make sure nobody shadowed it between here and there ")
- FORM)
- (T (IL:* IL:\;
- "Nobody's going to handle it")
- (IF (EQ SITE '*ANONYMOUS-GATHERING-SITE*)
- (IL:* IL:\;
- "More likely that she forgot to mention the site than forget to write an anonymous gathering. ")
- (WARN "There is no gathering site specified in ~S." FORM)
- (WARN
- "The site ~S in ~S is not defined in an enclosing GATHERING form."
- SITE FORM)) (IL:* IL:\;
- "Turn it into something else so we don't warn twice in the nested case ")
- `(%ORPHANED-GATHER ,@(CDR FORM)))))
- ((AND (SYMBOLP FORM)
- (SETQ INFO (ASSOC FORM ACC-INFO))
- (VARIABLE-SAME-P FORM ENV GATHERING-ENV))
- (IL:* IL:\;
- "A variable reference to a gather binding from environment TEM ")
- (MAYBE-WARN :USER
- "Can't optimize GATHERING because site variable ~S is used outside of a GATHER form."
- FORM)
- (RETURN-FROM WALK-GATHERING-BODY :ABORT))
- (T FORM)))))))
-
-
-
-(IL:* IL:|;;| "Sample gatherers")
-
-
-(DEFMACRO COLLECTING (&KEY INITIAL-VALUE)
- `(LET* ((HEAD ,INITIAL-VALUE)
- (TAIL ,(AND INITIAL-VALUE `(LAST HEAD))))
- (VALUES #'(LAMBDA (VALUE)
- (IF (NULL HEAD)
- (SETQ HEAD (SETQ TAIL (LIST VALUE)))
- (SETQ TAIL (CDR (RPLACD TAIL (LIST VALUE))))))
- #'(LAMBDA NIL HEAD))))
-
-(DEFMACRO JOINING (&KEY INITIAL-VALUE)
- `(LET ((RESULT ,INITIAL-VALUE))
- (VALUES #'(LAMBDA (VALUE)
- (SETQ RESULT (NCONC RESULT VALUE)))
- #'(LAMBDA NIL RESULT))))
-
-(DEFMACRO MAXIMIZING (&KEY INITIAL-VALUE)
- `(LET ((RESULT ,INITIAL-VALUE))
- (VALUES #'(LAMBDA (VALUE)
- (WHEN ,(COND
- ((AND (CONSTANTP INITIAL-VALUE)
- (NOT (NULL (EVAL INITIAL-VALUE))))
- (IL:* IL:\;
- "Initial value is given and we know it's not NIL, so leave out the null check ")
- '(> VALUE RESULT))
- (T '(OR (NULL RESULT)
- (> VALUE RESULT))))
- (SETQ RESULT VALUE)))
- #'(LAMBDA NIL RESULT))))
-
-(DEFMACRO MINIMIZING (&KEY INITIAL-VALUE)
- `(LET ((RESULT ,INITIAL-VALUE))
- (VALUES #'(LAMBDA (VALUE)
- (WHEN ,(COND
- ((AND (CONSTANTP INITIAL-VALUE)
- (NOT (NULL (EVAL INITIAL-VALUE))))
- (IL:* IL:\;
- "Initial value is given and we know it's not NIL, so leave out the null check ")
- '(< VALUE RESULT))
- (T '(OR (NULL RESULT)
- (< VALUE RESULT))))
- (SETQ RESULT VALUE)))
- #'(LAMBDA NIL RESULT))))
-
-(DEFMACRO SUMMING (&KEY (INITIAL-VALUE 0))
- `(LET ((SUM ,INITIAL-VALUE))
- (VALUES #'(LAMBDA (VALUE)
- (SETQ SUM (+ SUM VALUE)))
- #'(LAMBDA NIL SUM))))
-
-
-
-(IL:* IL:\; "Easier to read expanded code if PROG1 gets left alone ")
-
-
-(XCL:DEFINE-FILE-ENVIRONMENT "ITERATE" :PACKAGE (IN-PACKAGE :ITERATE :USE '(:LISP :WALKER))
- :READTABLE "XCL"
- :BASE 10
- :COMPILER :COMPILE-FILE)
-(IL:PUTPROPS IL:ITERATE IL:COPYRIGHT ("Venue" 1991))
-(IL:DECLARE\: IL:DONTCOPY
- (IL:FILEMAP (NIL)))
-IL:STOP
diff --git a/obsolete/clos/2.0/lap.lisp b/obsolete/clos/2.0/lap.lisp
deleted file mode 100644
index 4dceda84..00000000
--- a/obsolete/clos/2.0/lap.lisp
+++ /dev/null
@@ -1,364 +0,0 @@
-;;;-*- Package: CLOS; Syntax: Common-Lisp; Base: 10 -*-
-
-
-;;;. Copyright (c) 1991 by Venue
-
-(in-package "CLOS")
-
-;;; This file defines CLOS's interface to the LAP mechanism. The file is divided into two parts. The
-;;; first part defines the interface used by CLOS to create abstract LAP code vectors. CLOS never
-;;; creates lists that represent LAP code directly, it always calls this mechanism to do so. This
-;;; provides a layer of error checking on the LAP code before it gets to the implementation-specific
-;;; assembler. Note that this error checking is syntactic only, but even so is useful to have.
-;;; Because of it, no specific LAP assembler should worry itself with checking the syntax of the LAP
-;;; code. The second part of the file defines the LAP assemblers for each CLOS port. These are
-;;; included together in the same file to make it easier to change them all should some random
-;;; change be made in the LAP mechanism.
-
-
-(defvar *make-lap-closure-generator*)
-
-(defvar *precompile-lap-closure-generator*)
-
-(defvar *lap-in-lisp*)
-
-(defun make-lap-closure-generator (closure-variables arguments iregs vregs tregs lap-code)
- (funcall *make-lap-closure-generator* closure-variables arguments iregs vregs tregs lap-code))
-
-(defmacro precompile-lap-closure-generator (cvars args i-regs v-regs t-regs lap)
- (funcall *precompile-lap-closure-generator* cvars args i-regs v-regs t-regs lap))
-
-(defmacro lap-in-lisp (cvars args iregs vregs tregs lap)
- (declare (ignore cvars args))
- `(locally (declare (optimize (safety 0)
- (speed 3)))
- ,(make-lap-prog iregs vregs tregs (flatten-lap lap (opcode :label 'exit-lap-in-lisp)))
- ))
-
-
-;;; The following functions and macros are used by CLOS when generating LAP code: GENERATING-LAP
-;;; WITH-LAP-REGISTERS ALLOCATE-REGISTER DEALLOCATE-REGISTER LAP-FLATTEN OPCODE OPERAND
-
-
-(proclaim '(special *generating-lap*))
-
- ; CAR - alist of free registers CADR
- ; - alist of allocated registers CADDR
- ; - max reg number allocated in each
- ; alist, the entries have the form:
- ; (type . (:REG ))
-
-
-
-;;; This goes around the generation of any lap code. should return a lap code sequence, this
-;;; macro will take care of converting that to a lap closure generator.
-
-
-(defmacro generating-lap (closure-variables arguments &body body)
- `(let* ((*generating-lap* (list nil nil -1)))
- (finalize-lap-generation nil ,closure-variables ,arguments (progn ,@body))))
-
-(defmacro generating-lap-in-lisp (closure-variables arguments &body body)
- `(let* ((*generating-lap* (list nil nil -1)))
- (finalize-lap-generation t ,closure-variables ,arguments (progn ,@body))))
-
-
-;;; Each register specification looks like: ( &key :reuse )
-
-
-(defmacro with-lap-registers (register-specifications &body body)
-
- ;; Given that, for now, there is only one keyword argument and that, for now, we do no error
- ;; checking, we can be pretty sleazy about how this works.
- (flet ((make-allocations
- nil
- (gathering1 (collecting)
- (dolist (spec register-specifications)
- (gather1 `(,(car spec)
- (or ,(cadddr spec)
- (allocate-register ',(cadr spec))))))))
- (make-deallocations nil (gathering1
- (collecting)
- (dolist (spec register-specifications)
- (gather1 `(unless ,(cadddr spec)
- (deallocate-register ,(car spec))))))))
- `(let ,(make-allocations)
- (multiple-value-prog1 (progn ,@body)
- ,@(make-deallocations)))))
-
-(defun allocate-register (type)
- (destructuring-bind (free allocated)
- *generating-lap*
- (let ((entry (assoc type free)))
- (cond (entry (setf (car *generating-lap*)
- (delete entry free)
- (cadr *generating-lap*)
- (cons entry allocated))
- (cdr entry))
- (t (let ((new `(,type :reg ,(incf (caddr *generating-lap*)))))
- (setf (cadr *generating-lap*)
- (cons new allocated))
- (cdr new)))))))
-
-(defun deallocate-register (reg)
- (let ((entry (rassoc reg (cadr *generating-lap*))))
- (unless entry (error "Attempt to free an unallocated register."))
- (push entry (car *generating-lap*))
- (setf (cadr *generating-lap*)
- (delete entry (cadr *generating-lap*)))))
-
-(defvar *precompiling-lap* nil)
-
-(defun finalize-lap-generation (in-lisp-p closure-variables arguments lap-code)
- (when (cadr *generating-lap*)
- (error "Registers still allocated when lap being finalized."))
- (let ((iregs nil)
- (vregs nil)
- (tregs nil))
- (dolist (entry (car *generating-lap*))
- (ecase (car entry)
- (index (push (caddr entry)
- iregs))
- (vector (push (caddr entry)
- vregs))
- ((t) (push (caddr entry)
- tregs))))
- (cond (in-lisp-p (macroexpand `(lap-in-lisp ,closure-variables ,arguments ,iregs
- ,vregs
- ,tregs
- ,lap-code)))
- (*precompiling-lap* (values closure-variables arguments iregs vregs tregs lap-code)
- )
- (t (make-lap-closure-generator closure-variables arguments iregs vregs tregs
- lap-code)))))
-
-(defun flatten-lap (&rest opcodes-or-sequences)
- (let ((result nil))
- (dolist (opcode-or-sequence opcodes-or-sequences result)
- (cond ((null opcode-or-sequence))
- ((not (consp (car opcode-or-sequence)))
- ; its an opcode
- (setf result (append result (list opcode-or-sequence))))
- (t (setf result (append result opcode-or-sequence)))))))
-
-(defmacro flattening-lap nil '(let ((result nil))
- (values #'(lambda (value)
- (push value result))
- #'(lambda nil (apply #'flatten-lap (reverse result))))))
-
-
-;;; This code deals with the syntax of the individual opcodes and operands. The first two of these
-;;; variables are documented to all ports. They are lists of the symbols which name the lap opcodes
-;;; and operands. They can be useful to determine whether a port has implemented all the required
-;;; opcodes and operands. The third of these variables is for use of the emitter only.
-
-
-(defvar *lap-operands* nil)
-
-(defvar *lap-opcodes* nil)
-
-(defvar *lap-emitters* (make-hash-table :test #'eq :size 30))
-
-(defun opcode (name &rest args)
- (let ((emitter (gethash name *lap-emitters*)))
- (if emitter
- (apply emitter args)
- (error "No opcode named ~S." name))))
-
-(defun operand (name &rest args)
- (let ((emitter (gethash name *lap-emitters*)))
- (if emitter
- (apply emitter args)
- (error "No operand named ~S." name))))
-
-(defmacro defopcode (name types)
- (let ((fn-name (symbol-append "LAP Opcode " name *the-clos-package*))
- (lambda-list (mapcar #'(lambda (x)
- (declare (ignore x))
- (gensym))
- types)))
- `(progn (eval-when (load eval)
- (load-defopcode ',name ',fn-name))
- (defun ,fn-name ,lambda-list (defopcode-1 ',name ',types ,@lambda-list)))))
-
-(defmacro defoperand (name types)
- (let ((fn-name (symbol-append "LAP Operand " name *the-clos-package*))
- (lambda-list (mapcar #'(lambda (x)
- (declare (ignore x))
- (gensym))
- types)))
- `(progn (eval-when (load eval)
- (load-defoperand ',name ',fn-name))
- (defun ,fn-name ,lambda-list (defoperand-1 ',name ',types ,@lambda-list)))))
-
-(defun load-defopcode (name fn-name)
- (if* (memq name *lap-operands*)
- (error "LAP opcodes and operands must have disjoint names.")
- (setf (gethash name *lap-emitters*)
- fn-name)
- (pushnew name *lap-opcodes*)))
-
-(defun load-defoperand (name fn-name)
- (if* (memq name *lap-opcodes*)
- (error "LAP opcodes and operands must have disjoint names.")
- (setf (gethash name *lap-emitters*)
- fn-name)
- (pushnew name *lap-operands*)))
-
-(defun defopcode-1 (name operand-types &rest args)
- (iterate ((arg (list-elements args))
- (type (list-elements operand-types)))
- (check-opcode-arg name arg type))
- (cons name (copy-list args)))
-
-(defun defoperand-1 (name operand-types &rest args)
- (iterate ((arg (list-elements args))
- (type (list-elements operand-types)))
- (check-operand-arg name arg type))
- (cons name (copy-list args)))
-
-(defun check-opcode-arg (name arg type)
- (labels ((usual (x)
- (and (consp arg)
- (eq (car arg)
- x)))
- (check (x)
- (ecase x
- ((:reg :cdr :constant :iref :cvar :arg :lisp :lisp-variable) (usual x))
- (:label (symbolp arg))
- (:operand (and (consp arg)
- (memq (car arg)
- *lap-operands*))))))
- (unless (if (consp type)
- (if (eq (car type)
- 'or)
- (some #'check (cdr type))
- (error "What type is this?"))
- (check type))
- (error "The argument ~S to the opcode ~A is not of type ~S." arg name type))))
-
-(defun check-operand-arg (name arg type)
- (flet ((check (x)
- (ecase x
- (:symbol (symbolp arg))
- (:register-number (and (integerp arg)
- (>= x 0)))
- (:t t)
- (:reg (and (consp arg)
- (eq (car arg)
- :reg)))
- (:fixnum (typep arg 'fixnum)))))
- (unless (if (consp type)
- (if (eq (car type)
- 'or)
- (some #'check (cdr type))
- (error "What type is this?"))
- (check type))
- (error "The argument ~S to the operand ~A is not of type ~S." arg name type))))
-
-
-;;; The actual opcodes.
-
-
-(defopcode :break nil)
-
- ; For debugging only. Not
-
-
-(defopcode :beep nil)
-
- ; all ports are required to
-
-
-(defopcode :print (:reg))
-
- ; implement this.
-
-
-(defopcode :move (:operand (or :reg :iref :cdr :lisp-variable)))
-
-(defopcode :eq ((or :reg :constant)
- (or :reg :constant)
- :label))
-
-(defopcode :neq ((or :reg :constant)
- (or :reg :constant)
- :label))
-
-(defopcode :fix= ((or :reg :constant)
- (or :reg :constant)
- :label))
-
-(defopcode :izerop (:reg :label))
-
-(defopcode :std-instance-p (:reg :label))
-
-(defopcode :fsc-instance-p (:reg :label))
-
-(defopcode :built-in-instance-p (:reg :label))
-
-(defopcode :structure-instance-p (:reg :label))
-
-(defopcode :jmp ((or :reg :constant)))
-
-(defopcode :label (:label))
-
-(defopcode :go (:label))
-
-(defopcode :return ((or :reg :constant)))
-
-(defopcode :exit-lap-in-lisp nil)
-
-
-;;; The actual operands.
-
-
-(defoperand :reg (:register-number))
-
-(defoperand :cvar (:symbol))
-
-(defoperand :arg (:symbol))
-
-(defoperand :cdr (:reg))
-
-(defoperand :constant (:t))
-
-(defoperand :std-wrapper (:reg))
-
-(defoperand :fsc-wrapper (:reg))
-
-(defoperand :built-in-wrapper (:reg))
-
-(defoperand :structure-wrapper (:reg))
-
-(defoperand :other-wrapper (:reg))
-
-(defoperand :std-slots (:reg))
-
-(defoperand :fsc-slots (:reg))
-
-(defoperand :cref (:reg :fixnum))
-
-(defoperand :iref (:reg :reg))
-
-(defoperand :iset (:reg :reg :reg))
-
-(defoperand :i1+ (:reg))
-
-(defoperand :i+ (:reg :reg))
-
-(defoperand :i- (:reg :reg))
-
-(defoperand :ilogand (:reg :reg))
-
-(defoperand :ilogxor (:reg :reg))
-
-(defoperand :ishift (:reg :fixnum))
-
-(defoperand :lisp (:t))
-
-(defoperand :lisp-variable (:symbol))
-
-
-;;; LAP tests (there need to be a lot more of these)
-
diff --git a/obsolete/clos/2.0/load-clos.lisp b/obsolete/clos/2.0/load-clos.lisp
deleted file mode 100644
index 8ba7e9a2..00000000
--- a/obsolete/clos/2.0/load-clos.lisp
+++ /dev/null
@@ -1,42 +0,0 @@
-;;; -*- Mode: Lisp; Package: xcl-User ; Base: 10.; Syntax: Common-Lisp -*-
-;;;
-
-(in-package "CLOS" :use (list (or (find-package :walker)
- (make-package :walker :use '(:lisp)))
- (or (find-package :iterate)
- (make-package :iterate
- :use '(:lisp :walker)))
- (find-package :lisp)))
-(export (intern (symbol-name :iterate) ;Have to do this here,
- (find-package :iterate)) ;because in the defsystem
- (find-package :iterate)) ;(later in this file)
- ;we use the symbol iterate
- ;to name the file
-
-(defun load-truename (&optional (errorp nil))
- (flet ((bad-time ()
- (when errorp
- (error "LOAD-TRUENAME called but a file isn't being loaded."))))
- (let ((filename (pathname (il:fullname *standard-input*))))
- (if filename
- (make-pathname :host (pathname-host filename) :device
- (pathname-device filename) :directory
- (pathname-directory filename) :name "")
- (bad-time)))))
-
-(defvar *clos-directory* (load-truename))
-
-(defun load-clos (&optional pathname)
- (defvar *clos-system-date* "7/14/91 Medley 2.0 (interim)")
- (defvar *the-clos-package* (find-package :clos))
- (dolist (filename '(patch pkg walk iterate macros low low2 fin
- defclass defs fngen lap plap cache dlap boot
- vector slots init std-class cpl braid fsc methods
- combin dfun precom1 precom2 precom4 fixup
- defcombin ctypes construct env))
-
- (load (merge-pathnames
- (make-pathname :name (string-downcase filename) :type
- "dfasl") (or pathname *clos-directory*))))
- (pushnew :clos cl:*features*))
-
diff --git a/obsolete/clos/2.0/low.lisp b/obsolete/clos/2.0/low.lisp
deleted file mode 100644
index dcd28cef..00000000
--- a/obsolete/clos/2.0/low.lisp
+++ /dev/null
@@ -1,194 +0,0 @@
-
-;;;-*- Package: CLOS; Syntax: Common-Lisp; Base: 10 -*-
-
-
-;;; File converted on 26-Mar-91 10:29:45 from source low
-;;;. Original source {dsk}local>users>welch>lisp>clos>rev4>il-format>low.;4 created 27-Feb-91 17:16:47
-
-;;;. Copyright (c) 1991 by Venue
-
-
-
-(in-package "CLOS")
-
-;;; Shadow, Export, Require, Use-package, and Import forms should follow here
-
-
-
-;;;
-;;;*************************************************************************
-;;;Copyright (c) 1991 Venue
-;;; This file contains portable versions of low-level functions and macros which are ripe for
-;;; implementation specific customization. None of the code in this file *has* to be customized for
-;;; a particular Common Lisp implementation. Moreover, in some implementations it may not make any
-;;; sense to customize some of this code. ks.
-
-
-(defmacro %svref (vector index)
- `(locally (declare (optimize (speed 3)
- (safety 0))
- (inline svref))
- (svref (the simple-vector ,vector)
- (the fixnum ,index))))
-
-(defsetf %svref (vector index)
- (new-value)
- `(locally (declare (optimize (speed 3)
- (safety 0))
- (inline svref))
- (setf (svref (the simple-vector ,vector)
- (the fixnum ,index))
- ,new-value)))
-
-
-;;; without-interrupts OK, Common Lisp doesn't have this and for good reason. But For all of the
-;;; Common Lisp's that CLOS runs on today, there is a meaningful way to implement this. WHAT I MEAN
-;;; IS: I want the body to be evaluated in such a way that no other code that is running CLOS can be
-;;; run during that evaluation. I agree that the body won't take *long* to evaluate. That is to
-;;; say that I will only use without interrupts around relatively small computations. INTERRUPTS-ON
-;;; should turn interrupts back on if they were on. INTERRUPTS-OFF should turn interrupts back off.
-;;; These are only valid inside the body of WITHOUT-INTERRUPTS. OK?
-
-
-
-;;; AKW: IT'S CALLED, BUT NEVER REALLY USED, SO I'VE REPLACED IT WITH THE PROGN. IF WE REALLY NEED
-;;; IT, CAN BE TRIVIALLY DONE WITH IL:MONITORS
-
-
-(defmacro without-interrupts (&body body)
- `(progn ,.body))
-
-
-;;; Very Low-Level representation of instances with meta-class standard-class.
-
-
-(defmacro std-instance-wrapper (x)
- `(%std-instance-wrapper ,x))
-
-(defmacro std-instance-slots (x)
- `(%std-instance-slots ,x))
-
-(defun print-std-instance (instance stream depth)
- ; A temporary definition used
- (declare (ignore depth))
- ; for debugging the bootstrap
- (printing-random-thing (instance stream)
- ; code of CLOS (See high.lisp).
- (format stream "#")))
-
-(defmacro %allocate-instance--class (no-of-slots)
- `(let ((instance (%%allocate-instance--class)))
- (%allocate-instance--class-1 ,no-of-slots instance)
- instance))
-
-(defmacro %allocate-instance--class-1 (no-of-slots instance)
- (once-only (instance)
- `(progn (setf (std-instance-slots ,instance)
- (%allocate-static-slot-storage--class ,no-of-slots)))))
-
-
-;;; This is the value that we stick into a slot to tell us that it is unbound. It may seem gross,
-;;; but for performance reasons, we make this an interned symbol. That means that the fast check to
-;;; see if a slot is unbound is to say (EQ '..SLOT-UNBOUND..). That is considerably faster
-;;; than looking at the value of a special variable. Be careful, there are places in the code which
-;;; actually use ..slot-unbound.. rather than this variable. So much for modularity
-
-
-(defvar *slot-unbound* '..slot-unbound..)
-
-(defmacro %allocate-static-slot-storage--class (no-of-slots)
- `(make-array ,no-of-slots :initial-element *slot-unbound*))
-
-(defmacro std-instance-class (instance)
- `(wrapper-class (std-instance-wrapper ,instance)))
-
-
-;;
-
-
-
-;;; FUNCTION-ARGLIST
-
-
-
-;;
-
-
-
-;;; [COMMENTED OUT AKW. NEVER CALLED] Given something which is functionp, function-arglist should
-;;; return the argument list for it. CLOS does not count on having this available, but
-;;; MAKE-SPECIALIZABLE works much better if it is available. Versions of function-arglist for each
-;;; specific port of clos should be put in the appropriate xxx-low file. This is what it should look
-;;; like:
-
-
- ; (defun function-arglist (function)
- ; (