diff --git a/library/000docs/000-COVER.TEDIT b/library/000docs/000-COVER.TEDIT new file mode 100644 index 00000000..a8a18660 Binary files /dev/null and b/library/000docs/000-COVER.TEDIT differ diff --git a/library/000docs/001-TITLEPAGE.TEDIT b/library/000docs/001-TITLEPAGE.TEDIT new file mode 100644 index 00000000..c8d4ba69 Binary files /dev/null and b/library/000docs/001-TITLEPAGE.TEDIT differ diff --git a/library/000docs/002-TOC.TEDIT b/library/000docs/002-TOC.TEDIT new file mode 100644 index 00000000..4ea2f8d5 Binary files /dev/null and b/library/000docs/002-TOC.TEDIT differ diff --git a/library/000docs/003-LOF.TEDIT b/library/000docs/003-LOF.TEDIT new file mode 100644 index 00000000..dbba8ad9 Binary files /dev/null and b/library/000docs/003-LOF.TEDIT differ diff --git a/library/000docs/004-PREFACE.TEDIT b/library/000docs/004-PREFACE.TEDIT new file mode 100644 index 00000000..f7a9c57f Binary files /dev/null and b/library/000docs/004-PREFACE.TEDIT differ diff --git a/library/000docs/005-INTRO.TEDIT b/library/000docs/005-INTRO.TEDIT new file mode 100644 index 00000000..80e20b3d Binary files /dev/null and b/library/000docs/005-INTRO.TEDIT differ diff --git a/library/000docs/006-INDEX.TEDIT b/library/000docs/006-INDEX.TEDIT new file mode 100644 index 00000000..980b40e7 --- /dev/null +++ b/library/000docs/006-INDEX.TEDIT @@ -0,0 +1,91 @@ +1 Lisp Library Modules, Medley Release 2.0 1 Lisp Library Modules, Medley Release 2.0 INDEX 1 INDEX 1 INDEX 6 A Abort a Print Job 101,102 Aborting Commands 76 Access Functions 251 Add New Keyboards to the List 310 add-form (Function) 299 ADD.BORDER.TO.BITMAP (Function) 65 ADD.PROCESS (Function) 266 Adding FileBrowser Commands 92 Address space of the internetwork 261 ADJUSTCOLORMAP (Function) 37 Administrator Commands for NSMaintain 206 ADVISE (Function) 283 Aliases 203 ALLOCATE.ETHERPACKET (Function) 270 Analyzing user Functions 157 Application layer 261 ARPANET 253 Array Functions 193 Array operations 29 Assignments 189 B BACKWARD FIND (Command) 288 BEGINDST (Variable) 199 BIN (Function) 222 BIT.IN.COLUMN (Function) 65 BIT.IN.ROW (Function) 65 BITBLT (Function) 116 BITMAPCREATE WIDTH HEIGHT BITSPERPIXEL (Function) 38 BITSPERPIXEL BITMAP (Function) 38 BOUT (Function) 222 BREAK (Function) 283 Broadcast address 262 Browser 111 describe window 12 printout window 12 BROWSER window 74 BROWSERBOXING (Variable) 12 BROWSERFORMAT (Variable) 12 C C-Shell 303 C4 printed circuit board 1 CACHE/NODE/LABEL/BITMAPS (Variable) 116 Call graph 233 Call stack 233 Calling the Keyboard Editor 150 CALLS (Function) 175 CALLSCCODE (Function) 175 Cash-File 15 Centronics 17 cable 17 port 1 CENTRONICS.RESET (Function) 17 CH.DEFAULT.DOMAIN (Variable) 206 CH.DEFAULT.ORGANIZATION (Variable) 206 Changing an Existing Keyboard 150 Character framing errors 224 CharCodeTables 19 Chat 21,303 CHAT (Function) 22,303 Chat connections 22 Chat Menu 23 Chat window 146 CHAT.ALLHOSTS (Variable) 25 CHAT.DISPLAYTYPES (Variable) 24 CHAT.EMACSCOMMANDS (Variable) 25 CHAT.FONT (Variable) 25 CHAT.IN.EMACS? (Variable) 26 CHAT.INTERRUPTS (Variable) 24 CHAT.KEYACTIONS (Variable) 24 CHAT.PROTOCOLTYPES (Variable) 26 CHAT.TTY.PROCESS (Variable) 25 CHAT.WINDOW.REGION (Variable) 25 CHAT.WINDOW.SIZE (Variable) 25 Chatting to a host 258 CHECKSAMEDIR (Function) 231 Clean-Up After Copying Files 46 Clearinghouse 26 Clearinghouse service 203 CLOSE (Function) 305 close-hash-file (Function) 134 CLOSECHATWINDOWFLG (Variable) 25 CLOSEF (Function) 9,222 CLOSEHASHFILE (Function) 128 CmlFloatArray 29 CMYCOLORMAP (Function) 36 COLLECTINUSE (Function) 108 COLLISIONS (Function) 108 COLORDISPLAY (Function) 33 COLORDISPLAYP (Function) 33 COLORIZEBITMAP (Function) 44 COLORLEVEL (Function) 37 COLORMAPCOPY (Function) 36 COLORMAPCREATE (Function) 36 COLORNAMES (Association List) 34 COLORNUMBERP (Function) 35 COLORSCREEN (Function) 39 COLORSCREENBITMAP (Function) 38 COMMAND menu 74 Common Lisp 288 COMPILE (Command) 86 Conjunctions of Sets 168 Connecting to a host 258 Control-E (Command) 76 Control-F (Command) 53 Control-O (Command) 139 Control-P (Command) 280 Control-Q (Command) 75,87 Control-S (Command) 53 Control-Z (Command) 53 Conversation Mode 45 convert-loaded-files (Variable) 292 COPY (Command) 78 Copy-Selection 53, 77 COPYFILE (Function) 46,267 CopyFiles 45 COPYFILES (Function) 45 COPYHASHFILE (Function) 130 CPE FP 17 CPE-FP upgrade 1 Create a Key Pad for Repeated Use 216 CREATE-PROCESS-STREAM (Function) 305 CREATE.NUMBERPAD.READER (Function) 216 CREATEHASHFILE (Function) 128 CREATEW (Function) 41 Creating 4045XLP Master Files 4 a graph 112 a key pad 215 a new bitmap 64 a new keyboard 149 a TableBrowser 247 horizontal rules 139 HOST.TXT file 254 new keyboard configurations 153 objects 206 the local IP.INIT file 256 Creation dates 46 Cumulative mode 238 CURSORPOSITION (Function) 44 CURSORSCREEN (Function) 44 Customizing Chat 24 FileBrowser 89 Cyclic graphs 111 D DataBaseFns 49 Databases 313 using 313,314 Datamedia 2500 21 Daughter 114 Debuggee 279 Debugger 279 DECREASING.FONT. LIST (Variable) 125 DEdit 51,307 Command menu 54 Functions 54 idioms 59 parameters 57 window 52 DEDITLINGER (Variable) 57 DEDITTYPEINCOMS (Variable) 57 DEFAULT-CLEANUP-COMPILER (Variable) 86 DEFAULT.GRAPH.WINDOWSIZE (Variable) 117 DEFAULTCHATHOST (Variable) 22,25 DEFAULTPRINTERTYPE (Variable) 2 DEFAULTPRINTINGHOST (Variable) 2,213 defdefiner-macros (Variable) 292 DEFINEKEYBOARD (Function) 311 Defining a Virtual Keyboard 310 DEGREES-TO-RADIANS (Function) 196 DELETE (Command) 77 Deleting objects 206 Device Errors 17 Differences between TExec and TEdit 287 Digital VT100 21 Directed acyclic graph 113 DIRECTORIES (Variable) 2,258 Directory-only lines 75 DIRECTORYNAME (Function) 231 Display-Only a Keyboard 309 Displayer 233 DISPLAYFONTDIRECTORIES (Variable) 100 DISPLAYGRAPH (Function) 117 Displaying a graph 116 a stack 280 Displaystream graphics 288 DM2500 Chat 27 DODIP.HOSTP (Function) 272 Domain 203 manipulating 208 DOMAIN.GRAPH (Function) 276 DOMAIN.INIT (Function) 276 DOMAIN.LOOKUP (Function) 276 DOMAIN.LOOKUP ADDRESS (Function) 276 DOMAIN.LOOKUP NAMESERVER (Function) 276 DOMAIN.TRACE (Function) 276 DRAWBETWEEN (Function) 43 DRAWLINE (Function) 43 DRAWTO (Function) 43 DSPBACKCOLOR (Function) 42 DSPCOLOR (Function) 42 DT.EDITMACROS (Variable) 58 DUMPDATABASE (Function) 177 DUMPDB (Function) 50 DUMPGRAPH (Function) 121 Dvorak keyboard 311 Dynamic structure 233 E E-30 option kit 1 E30 option 219 EDIT (Command) 84 Edit buffer window 52 EDIT.BITMAP (Function) 61 EditBitMap 61 sub-menu 62 window 62 EDITBM (Function) 61 EDITCOLORMAP (Function) 37 EDITCONFIGURATION (Function) 154 EDITEMBEDTOKEN (Variable) 57 EDITGRAPH (Function) 121 EDITGRAPHMENU 119 EDITGRAPHMENUCOMMANDS (Variable) 119 Editing a bitmap in a document 64 editing a graph 117 existing bitmap 63 keyboard configuration 154 EDITKEYBOARD (Function) 150 EDITMODE (Function) 52 EDITMODE (Variable) 84 Effecting MasterScope Analysis 171 Element patterns 185 Embedding and extracting 59 ENDDST (Variable) 199 Entering DEdit Commands 54 Environmental and Lisp mappings 95 EOLCONVENTION (Variable) 272 Error Condition Reporting 224 ERRORPUP (record) 70 ERRORXIP (record) 69 Establishing a Connection 143 et FX-80 Fast Mode 101 ETHERHOSTNUMBER (Variable) 4,280 Ethernet 260 Ethernet packet 264 EtherRecords 69 EVALUATE-POLYNOMIAL (Function) 31 expr definitions of Functions 171 EXPUNGE (Command) 86 Extend the selection 75 Extended Processor board 17 Extended processor option 29 External Communication Service 27 F FASSOC (Function) 121 Fast mode FX-80 101 FASTFX80-DEFAULT-DESTINATION (Variable) 100 FB (Command) 90 FB.ALLOW.ABORT (Function) 94 FB.BROWSERFONT (Variable) 92 FB.DEFAULT.EDITOR (Variable) 84,92 FB.DEFAULT.INFO (Variable) 87,90 FB.DEFAULT.NAME.WIDTH (Variable) 91 FB.FETCHFILENAME (Function) 93 FB.HARDCOPY.DIRECTORY.FONT (Variable) 92 FB.HARDCOPY.FONT (Variable) 92 FB.ICONFONT (Variable) 91 FB.INFO.FIELDS (Variable) 91 FB.INFO.MENU.ITEMS (Variable) 91 FB.MENU.ITEMS (Variable) 92 FB.PROMPTFONT (Variable) 92 FB.PROMPTLINES (Variable) 92 FB.PROMPTW.FORMAT (Function) 93 FB.PROMPTWPRINT (Function) 93 FB.PROMTFORINPUT (Function) 94 FB.SELECTEDFILES (Function) 93 FB.TABLEBROWSER (Function) 93 File Manager functions, changed 313 File name translation Function 269 File transfer using RS232 226 FILEBROWSE (Command) 84 FileBrowser 71 Functions 89 Variables 90 FILEBROWSER (Function) 89 filecom-specifier (Function) 299 Filing operations 267 FILING.ENUMERATION.DEPTH (Variable) 92 FIND-ARRAY-ELEMENT-INDEX (Function) 31 FINDPOINTER (Function) 109 FINDPOINTERS.OF.TYPE (Function) 109 FLIPNODE (Function) 120 Floating-point vector 29 FNT.DISPLOOK (Function) 96 FNT.DISPTBLE (Function) 96 FNT.MAKEBOOK (Function) 95 Font mappings 95 FontSample 95 FORCEOUTPUT (Function) 222 Forest 113 form-specifier (Function) 299 FORWARD FIND (Command) 288 FREEVARS (Function) 175 FROM.SCREEN.BITMAP (Function) 66 FTP service 268 FTPDEBUG (Function) 268 FTPserver 97 FTPSERVER (Function) 4,97 FTPSERVER.DEFAULT.HOST (Variable) 97 Function-calling structures 111 Functions for saving work 283 Functions for writing routines 176 FX Printer Compatibility 102 FX-80 DIP Switch Settings 100 driver 99 family 99 serial Interface 99 FX80-PRINT (Function) 102 G GapTelnet 26 Garbage collector 284 Gateway Access Protocol 26 GCHax 105 General Purpose Records 69 Get, Set Parameters via Inspector Window 7 get-cash-file (Function) 15 GETBOXSCREENPOSITION (Function) 40 GETBOXSCREENREGION (Function) 41 GETFILEINFO (Function) 267 GETHASHTEXT (Function) 129 GETHASHVILE (Function) 129 GETRELATION (Function) 176 GETSCREENPOSITION (Function) 40 GETTEMPLATE (Function) 174 GETTERMTABLE (Function) 288 Getting Hardcopy Directory Listings 77 Ghost boxes 238 Graph 11 data structure 120 nodes 111 GRAPH (record) 121 GRAPH/HARDCOPY/FORMAT (Variable) 117 Grapher 111,233 Grapher image objects 120 GRAPHEROBJ (Function) 120 GRAPHERPROP (Function) 121 Graphics interface 99 GRAPHNODE (record) 122 GRAPHREGION (Function) 120 GraphZoom 125 GRAYCOLORMAP (Function) 36 Groups 207 H HANZON Universal Card 99 HARDCOPY (Command) 81 HARDCOPYGRAPH (Function) 117 Hash tables 178 Hash-File 133 HASHFILEDEFAULTSIZE (Variable) 130 HASHFILEDTBL (Variable) 130 HASHFILENAME (Function) 129 HASHFILEP (Function) 129 HASHFILEPLST (Function) 130 HASHFILEPROP (Function) 129 HASHLOADFACTOR (Variable) 130 HFGROWTHFACTOR (Variable) 131 HLS (Record) 35 HLSP (Function) 35 HOST&DIRECTORYFIELD (Function) 231 HOSTS.TEXT.DIRECTORIES (Variable) 276 HOSTS.TXT files, parsing 276 HPRINT (Function) 121 HQFX80-DEFAULT-DESTINATION (Variable) 100 HQFX80-FONT-DIRECTORIES (Variable) 100 HRule 139 HRULE.CREATE (Function) 139 HTE.READ.FILE (Function) 276 Hue$Lightness$Saturation Triples 35 I I/O processor 226 IDENTITY-3-BY-3 (Function) 194 IDENTITY-4-BY-4 (Function) 194 il:typesof (Function) 313 il:whereis (Function) 313 Imagestream 5 Include all files, both deleted and undeleted 75 Individual mode 239 INFO menu 74 Info Options window 87 Input conventions for FileBrowser commands 75 Inserting a segment 59 install-form (Function) 299 INTENSITIESFROM (Function) 36 INTERACT&ADD.BORDER.TO.BITMAP (Function) 66 INTERACT&SHIFT.BITMAP.DOWN (Function) 66 INTERACT&SHIFT.BITMAP.LEFT (Function) 66 INTERACT&SHIFT.BITMAP.RIGHT (Function) 66 Interactive File Transfers With Kermit or Modem 146 Interactive Terminal Service 27 Internal fields 241 Internet layer 260 INTERPRESSFONTDIRECTORIES (Variable) 19 Interpreter 239 Interrupt character 234 INVERT.BITMAP.B/W (Function) 65 INVERT.BITMAP.DIAGONALLY (Function) 65 INVERT.BITMAP.HORIZONTALLY (Function) 65 INVERT.BITMAP.VERTICALLY (Function) 65 Invisible characters 288 IP addresses 262 networks primer 261 packet building 274 packet sending 275 socket access 272 IP.ADD.PROTOCOL (Function) 273 IP.APPEND.BYTE (Function) 275 IP.APPEND.CELL (Function) 275 IP.APPEND.STRING (Function) 275 IP.APPEND.WORD (Function) 275 IP.CLOSE.SOCKET (Function) 274 IP.DELETE.PROTOCOL (Function) 274 IP.OPEN.SOCKET (Function) 274 IP.SETUPIP (Function) 275 IP.TRANSMIT (Function) 275 IPHOSTNAME (Function) 273 IPINIT (Function) 272 IPTRACE (Function) 273 Iterative statement operator 177 J join-comments (Variable) 292 K Kermit 144,226 Kermit menu 146 KERMIT.RECEIVE (Function) 145 KERMIT.SEND (Function) 144 KEYACTION (Function) 153 Keyboard editor menus 150 KeyboardEditor 149 L Landscape mode 1 Landscape printing 103 Lattices 111 Laying out a graph for display 112 LAYOUTGRAPH (Function) 112 LAYOUTSEXPR (Function) 115 LDESHELL (Variable) 303 Library module changes 5-9 summary 5-9 Library module dependencies 9 Linguistic tree 120 Link layer 260 Lisp interrupts 22 LISPUSERSDIRECTORIES (Variable) 258 LISPXREAD (Function) 53 List of nodes 112 List structure editor 51 LISTFILES (Function) 3,213 LOAD (Command) 84 LOAD (Function) 49 Load New Keyboards 310 load-textmodule (Function) 290 LOADDB (Function) 50 LOADDBFLG (Variable) 50 LOADFROM (Function) 49,85 Loading TCP 258 LOOKUPHASHFILE (Function) 129 Lost characters 224 Low-level TCP Functions 272 M Macro 177 Macro Expansion 170 MAINSCREEN (Function) 39 Maintenance panel halt 279 make-cash-file (Function) 15 make-hash-file (Function) 133 MAKE-HOMOGENEOUS-3-BY-3 (Function) 193 MAKE-HOMOGENEOUS-3-VECTOR (Function) 193 MAKE-HOMOGENEOUS-4-VECTOR (Function) 194 MAKE-HOMOGENEOUS-N-BY-3 (Function) 193 MAKE-HOMOGENEOUS-N-BY-4 (Function) 194 make-specifier (Function) 297 make-textmodule (Function) 291 MAKEFILE (Function) 49,78,231 MAKEFILEFORMS (Function) 231 Making a sysout that contains TCP-IP 259 Manipulating domains 208 groups 207 remote Vmem 284 MAP-ARRAY (Function) 29 MAPGC (Function) 110 MAPHASHFILE (Function) 130 MAPOFACOLOR (Function) 37 MAPRELATION (Function) 176 MASTERSCOPE (Function) 175 MasterScope 11,49,157 Commands 158 database 157 entries 175 relations 161 set specifications 164 templates 164 Match 183 MatMult 193 MATMULT-133 (Function) 195 MATMULT-144 (Function) 195 MATMULT-331 (Function) 195 MATMULT-333 (Function) 195 MATMULT-441 (Function) 195 MATMULT-444 (Function) 196 MATMULT-N33 (Function) 195 MATMULT-N44 (Function) 196 Matrix Creation Functions 193 Matrix multiplication 193 Matrix Multiplication Functions 195 Merged node 237 MIGRATIONS (Variable) 231 MiniServe 199 mlFloatArray 196 Modem 145,226 MODEM.RECEIVE (Function) 145 MODEM.SEND (Function) 145 Moving an expression 59 MSMACROPROPS (Variable) 170 MSMARKCHANGED (Function) 177 MSNEEDUNSAVE (Function) 176 Multiple DEdit commands 58 Multiple streams 9 MY.NSHOSTNUMBER (Variable) 200 N Network addresses 261 Network protocols 21,26 NETWORKOSTYPES (Variable) 257 NEW INFO FileBrowser Command 87 NODECREATE (Function) 112 Notecards 9 Noticing changes that require recompiling 177 NS characters 213 NS Chat 26 NS Records 69 NS.TO.PUP.ALIST (Variable) 200 NS.TO.PUP.FILE (Variable) 200 NSHOSTNUMBER (record) 69 NSMaintain 203 NSMAINTAIN (Function) 204 NSTIMESERVER (Function) 199 NTERACT&SHIFT.BITMAP.UP (Function) 66 NUMBERPAD.READ (Function) 216 O Objects 203 creating 206 deleting 206 Obtaining information in NSMaintain 204 Obtaining network addresses 254 open-hash-file (Function) 133 OPENHASHFILE (Function) 128 OPENIMAGESTREAM (Function) 9,101 Opening a 4045 Stream 7 a Centronics Stream 17 a Chat Connection 22 OPENP (Function) 222 OPENSTREAM (Function) 222 OPENWINDOWS (Function) 42 Operations on Multiple Items 249 Organization 203 OVERFLOWS (Function) 108 P Packages 124, 286 Parents 114 parity errors 224 PARSERELATION (Function) 176 PATLISPCHECK (Variable) 184 Pattern elements 185 match compiler 184 match expressions 185 PATVARDEFAULT (Variable) 185 PERSPECTIVE-4-BY-4 (Function) 195 Place Markers 189 Portrait mode 1 PORTSTRING (Function) 4,280 PPTCB (Function) 266 Press 213 PRESSFONTWIDTHFILES (Variable) 213 Primitive relationship 178 PRIMTERMTABLE (Variable) 288 PRIN3 (Function) 124 Print a file 101,102 source code in high-quality mode 103 source code on fast FX-80 103 TEdit file in fast FX-80 mode 103 TEdit file in high-quality mode 104 text and graphics in high-quality mode 103 print-filecom (Function) 299 Printer drivers 99 Printer's point 139 Printing in fast mode 101 in high-quality mode 102 source or TEdit Files 3 speed 9 via FTPserver 4 windows 4 Programmer's Assistant 288 PROJECT-AND-FIX-3-VECTOR (Function) 196 PROJECT-AND-FIX-4-VECTOR (Function) 196 PROJECT-AND-FIX-N-BY-3 (Function) 196 PROJECT-AND-FIX-N-BY-4 (Function) 196 PROMPT window 73 Properties 203 Protocol number 273 PUP (record) 70 PUP Chat 26 FTP 97,232 ID service 200 records 70 time service 200 PUP.ID.SERVER (Function) 199 PUPADDRESS (record) 70 PUPNUMBER (Variable) 200 PUPTIMESERVER (Function) 199 PUTHASHFILE (Function) 128 PUTHASHTEXT (Function) 129 Q QABLEITEM (record) 69 Query Mode 45 Queue multiple arguments 60 Quick-scrolling 74 Quitting the FileBrowser 76 R RANDACCESSP (Function) 272 READ-BYTE (Function) 219 READ-CHAR (Function) 219 READGRAPH (Function) 121 Reading the Remote Vmem 284 ReadNumber 215 ReadNumber window 66 READP (Function) 222 READSYS (Function) 284 REALFRAMEP (Function) 239 RECOMPILEDEFAULT (Variable) 178 RECOMPUTE (Command) 86 Reconstruction 190 Record declaration 177 Recursive loads 97 Redefine Existing Keyboards 310 REDUCE-ARRAY (Function) 30 Red$Green$Blue Triples 34 REFCNT (Function) 108 Reference counting 284 REHASHFILE (Function) 130 REHASHGAG (Variable) 131 Relations between sets 157 RELDRAWTO (Function) 43 Remote Kermit in Server Mode 144 Kermit not in Server Mode 144 system administration 27 system executive 27 Removing Keyboards From the Menu 310 RENAME (Command) 81 REPACKFILENAME.NEW.TRANSLATION (Function) 269 REPACKFILENAME.OSTYPE.TABLE (Variable) 269 REPACKFILENAME.STRING (Function) 268 Replace All Known Keyboards 310 Replacements 190 RESET/NODE/BORDER (Function) 120 RESET/NODE/LABELSHADE (Function) 120 RESETDEDIT (Function) 54 Resetting 4045XLPstream 8 Restarting MiniServe 201 RGB (Record) 34 RGBCOLORMAP (Function) 36 RGBP (Function) 35 RNUMBER (Function) 215 Ross referencing user programs 157 ROTATE-3-BY-3 (Function) 194 ROTATE-4-BY-4-ABOUT-X (Function) 194 ROTATE-4-BY-4-ABOUT-Y (Function) 194 ROTATE-4-BY-4-ABOUT-Z (Function) 194 ROTATE.BITMAP.LEFT (Function) 65 ROTATE.BITMAP.RIGHT (Function) 65 ROTATECOLORMAP (Function) 37 RS232 143,219 RS232 Chat 27 port 219 RS232C port 1 RS232C.CLOSE-STREAM (Function) 222 RS232C.DEFAULT.INIT.INFO (Variable) 220 RS232C.ERROR.STREAM (Variable) 224 RS232C.GET.PARAMETERS (Function) 221 RS232C.INIT (Function) 220 RS232C.OTHER.STREAM (Function) 222 RS232C.OUTPUT.PACKET.LENGTH (Function) 222 RS232C.READP.EVENT (Function) 223 RS232C.REPORT.STATUS (Function) 224 RS232C.SET.PARAMETERS (Function) 220 RS232C.SHUTDOWN (Function) 221 RS232CHAT 225 RS232CMENU 225,228 RS232MODEMCONTROL (Function) 223 RS232MODEMHANGUP (Function) 224 RS232MODEMSTATUSP (Function) 223 RS232MODIFYMODEMCONTROL (Function) 223 RS232SENDBREAK (Function) 223 RS232TRACE 224 S S-expression 115 SameDir 231 Sampler 233 SAVEDBFLG (Variable) 50 Scale factors 9 SCALE-3-BY-3 (Function) 194 SCALE-4-BY-4 (Function) 195 SCALEDBITBLT (Function) 9 SCREENBITMAP (Function) 39 SCREENCOLORMAP (Function) 36 SCREENPOSITION (Record) 39 SCREENREGION (Record) 39 Scroll bar 74 SEE (Command) 82 Segment Patterns 186 Segment selection and manipulation 59 Selecting Files 74 Selecting Objects and Lists 52 Selection stack 53 Send text output to fast FX-80 103 SEND.FILE.TO.PRINTER (Function) 3,213 Serial interface card 99 Server mode 144 SET DEPTH (Command) 88 Set destination 102 determiners 167 FX-80 Destination 101 FX-80 Page Size 101 HQ Mode 102 page Size 102 specifications by Blocktypes 167 specifications by Relation 166 types 167 SETCOLORINTENSITY (Function) 37 SETSYNONYM (Function) 175 SETTEMPLATE (Function) 174 SETTIME (Function) 199 SHIFT.BITMAP.DOWN (Function) 65 SHIFT.BITMAP.LEFT (Function) 66 SHIFT.BITMAP.RIGHT (Function) 66 SHIFT.BITMAP.UP (Function) 66 SHOW PATHS 180 SHOW PATHS (Command) 169 SHOW PATHS (Function) 11 SHOW.CLOSED.WINDOWS (Function) 110 SHOWCIRCULARITY (Function) 110 SHOWCOLORTESTPATTERN (Function) 44 SHOWCOMMONCSETS (Function) 20 SHOWCSET (Function) 20 SHOWCSETLIST (Function) 20 SHOWCSETRANGE (Function) 20 SHOWGC (Function) 107 SHOWGRAPH (Function) 116,125 SHOWZOOMGRAPH (Function) 125 Simple item operations 248 SINGLEFILEINDEX (Function) 10 Sketch 10 SORT (Command) 89 Special characters 307 specifiers (Variable) 297 Specifying the files to browse 72 Spy 233 SPY.BORDERS (Variable) 239 SPY.BUTTON (Function) 234 SPY.END (Function) 234 SPY.FONT (Variable) 239 SPY.FREQUENCY (Variable) 239 SPY.LEGEND (Function) 239 SPY.MAXLINES (Variable) 239 SPY.NOMERGEFNS (Variable) 239 SPY.START (Function) 234 SPY.TOGGLE (Function) 234 SPY.TREE (Function) 235 SPY.TREE (Variable) 239 Stack 280 Stack architecture 58 Stacking several rules in a single object 140 Starting FileBrowser 71 Starting TExec 287 STARTMINISERVE (Function) 199 Static structure 233 stderr 305 stdin 305 stdout 305 STOPIP (Function) 272 STORAGE (Function) 105 Store keyboards 309 SUBNETMASK (Variable) 262 Subnetworks 262 Sun,TCP to a 254 SunOS, interface to 305 Switch & Display a Keyboard 308 Switch A-2 2 Switch Keyboards 308 Switch settings 2 SWITCHKEYBOARDS (Function) 311 SysEdit 241 SYSHASHFILE (Variable) 131 SYSHASHFILELST (Variable) 131 System sources 241 T TableBrowser 243 TABLEBROWSER (record) 244 TABLEITEM (record) 243 Tally window 73 Target-source-Command 59 TB.BROWSER.BUSY (Function) 248 TB.CLEAR.LINE (Function) 249 TB.COLLECT.ITEMS (Function) 250 TB.DELETE.ITEM (Function) 248 TB.FIND.ITEM (Function) 250 TB.FINISH.CLOSE (Function) 248 TB.INSERT.ITEM (Function) 249 TB.ITEM.DELETED? (Function) 251 TB.ITEM.SELECTED? (Function) 251 TB.MAKE.BROWSER (Function) 247 TB.MAP.DELETED.ITEMS (Function) 250 TB.MAP.ITEMS (Function) 250 TB.MAP.SELECTED.ITEMS (Function) 250 TB.NORMALIZE.ITEM (Function) 249 TB.NTH.ITEM (Function) 250 TB.NUMBER.OF.ITEMS (Function) 249 TB.REDISPLAY.ITEMS (Function) 249 TB.REMOVE.ITEM (Function) 249 TB.REPLACE.ITEMS (Function) 248 TB.SELECT.ITEM (Function) 248 TB.SET.FONT (Function) 248 TB.UNDELETE.ITEM (Function) 248 TB.USERDATA (Function) 251 TB.WINDOW (Function) 251 TCP and directory enumeration 254 Chat 27 debugging aids 277 segment 264 TCP-IP 253 protocol 47 protocol layers 260 TCP.BYE (Function) 268 TCP.CLOSE.SENDER (Function) 265 TCP.DEFAULT.RECEIVE.WINDOW (Variable) 265 TCP.DEFAULT.USER.TIMEOUT (Variable) 265 TCP.DEFAULTFILETYPE (Variable) 267 TCP.ECHO.SERVER (Function) 266 TCP.ECHOTEST (Function) 266 TCP.FAUCET (Function) 267 TCP.INIT (Function) 265 TCP.OPEN (Function) 264 TCP.OTHER.STREAM (Function) 265 TCP.SINK.SERVER (Function) 266 TCP.STOP (Function) 265 TCP.URGENT.EVENT (Function) 265 TCP.URGENT.MARK (Function) 265 TCP.URGENTP (Function) 265 TCPCHAT.TELNET.TTY.TYPES (Variable) 269 TCPCHAT.TRACEFILE (Variable) 269 TCPCHAT.TRACEFLG (Variable) 269 TCPFTP.DEFAULT.FILETYPES (Variable) 267 TCPFTP.EOL.CONVENTION 267 TCPFTP.INIT (Function) 268 TCPFTP.SERVER (Function) 268 TCPFTP.SERVER.USE.TOPS20.SYNTAX (Variable) 268 TCPTRACE (Function) 266 TEdit 9,21,139,287,307 TEdit Chat 28 TeleRaid 279 TELERAID (Function) 280 TeleRaid Commands 280 Teletype editor 51 TELNET protocol 261,269 Ten-key calculator pad 215 Terminal emulators 21 Testing the connection between two Xerox Lisp machines 228 TESTRELATION (Function) 176 TExec 287 TEXEC (Function) 287 TEXTMODULES 289 TFTP.CLOSEFILE (Function) 272 TFTP.GET (Function) 272 TFTP.OPENFILE (Function) 272 TFTP.PUT (Function) 271 TFTP.SERVER (Function) 272 Thumbing 74 TIMEZONECOMP (Variable) 200 Tracing and test Functions 265 Trailer encapsulation 277 Transferring files 143,258 TRANSLATE-3-BY-3 (Function) 195 TRANSLATE-4-BY-4 (Function) 195 Translating between the file-naming conventions 268 Transport layer 260 Transport control protocol 264 Trees 111 TRIM.BITMAP (Function) 66 Trivial file transfer protocol 271 Troubleshooting Problems With FileBrowser 94 TTY port 1,219 TTY.DEFAULT.INIT.INFO (Variable) 226 TTY.GET.PARAMETERS (Function) 228 TTY.INIT (Function) 226 TTY.SET.PARAMETERS (Function) 227 TTY.SHUTDOWN (Function) 228 TTYCHAT 228 Typing Characters to DEdit 53 U UDP.APPEND.BYTE (Function) 271 UDP.APPEND.CELL (Function) 271 UDP.APPEND.STRING (Function) 271 UDP.APPEND.WORD (Function) 271 UDP.CLOSE.SOCKET (Function) 270 UDP.EXCHANGE (Function) 271 UDP.GET (Function) 270 UDP.INIT (Function) 270 UDP.OPEN.SOCKET (Function) 270 UDP.SEND (Function) 271 UDP.SETUP (Function) 270 UDP.SOCKET.EVENT (Function) 270 UDP.SOCKET.NUMBER (Function) 270 UDP.STOP (Function) 270 UNCOLORIZEBITMAP (Function) 44 UNDELETE (Command) 77 Unechoed input mode 288 UNIX 232,272 UNIX-STREAM-CLOSE (Function) 305 UNIXChat 303 UNIXComm 305 Unread 54 UNSAVEFNS (Function) 177 UPDATECHANGED (Function) 177 UPDATEFN (Function) 177 Updating the MasterScope Data Base 174 upgrade-semicolon-comments (Variable) 292 User Commands for NSMaintain 204 User datagram protocol 270 USERWORDS (Function) 288 Using 4045XLP stream 8 4045 as a default printing host 3 FileBrowser window 73 Keyboard editor 150 modems 223 RS232 streams 222 TExec 288 TTY port 226 TTY streams 228 V Verifying TCP connections 258 Version Control 46 VFIND.PACKAGE (Function) 286 VFIND.SYMBOL (Function) 286 VGETBASE0 (Function) 285 VGETDEFN (Function) 285 VGETPROPLIST (Function) 285 VGETTOPVAL (Function) 285 VGETVAL (Function) 285 Viewing an existing bitmap 64 frames from a stack 281 system stack 282 Violation of the IP standard 262 Virtual graph nodes 113 Virtual memory 279 Virtual terminal I/O 269 VirtualKeyboards 149,307 VKBD.CONFIGURATIONS (Variable) 154 VKBD.KNOWN-KEYBOARDS (Variable) 311 VLOADFNS (Function) 283 VLOADVAR (Function) 283 VPUTBASE0 (Function) 286 VRAID (Function) 284 VSAVEWORK (Function) 283 VSETTOPVAL (Function) 285 VT100 Chat 28 VTYPENAME (Function) 285 VUNSAVEDEF (Function) 283 VVAG2 (Function) 285 VYANKDEF (Function) 283 V\COPY (Function) 285 V\UNCOPY (Function) 285 W Weitek floating-point chip set 29 When To Copy 46 Where-Is 313 Wild cards 72 WINDOWPROP (Function) 42 WORPCURSOR (Function) 43 Wrapper Functions 193 X XCVR interface cable 253 Xerox 2700-II laser printer 1 Xerox 4045 Laser CP 1 Xerox Character Codes 19 Xerox/Diablo 630 1 XIP (record) 69 XNS host number 200 XNS Time Service 199 ( (GETSCREENREGION (Function) 40 (MAKE-HOMOGENEOUS-4-BY-4 (Function) 194 4 4045 configuration cartridge 2 4045 Emulation Mode Selection 2 4045 Fonts 9 4045 Parameter Names and Values 5 4045 Port Initialization 3 4045 Port Selection 2 4045 PROM and Software Compatibility 1 4045XLP.CHANGE.MODE (Function) 5 4045XLP.DEFAULTS (Variable) 5 4045XLP.GET.PARAMETERS (Function) 7 4045XLP.PARAMETERS (record) 5 4045XLP.SET.PARAMETERS (Function) 6 4045XLPStream 1 4045XLPstream Options 5 4045XLPSTREAM.VERSION (Variable) 1 (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "INDEX-" "") STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "INDEX-" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE TITLEHEAD) (54 762 558 36) NIL) (HEADING NIL (HEADINGTYPE TITLEHEADRULE) (54 753 558 36) NIL) (TEXT NIL NIL (54 54 241 666) NIL) (TEXT NIL NIL (320 54 241 666) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "INDEX-" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "INDEX-" "")) (54 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 241 684) NIL) (TEXT NIL NIL (320 54 241 684) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "INDEX-" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "INDEX-" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 241 684) NIL) (TEXT NIL NIL (319 54 241 684) NIL)))))-KT-KT,K2$$-KTJ PAGEHEADING TITLEHEADRULEF PAGEHEADING TITLEHEADF PAGEHEADING VERSOHEADF PAGEHEADING RECTOHEADE PAGEHEADINGFOOTINGVE PAGEHEADINGFOOTINGR,K-K T,KMODERN +MODERN +CLASSIC + HELVETICA HELVETICA +OPTIMA +CLASSIC +MODERN +  HRULE.GETFNMODERN + ( + HRULE.GETFNCLASSIC + +)   HRULE.GETFNCLASSIC + HRULE.GETFNCLASSIC + HRULE.GETFNOPTIMA +  +    # '       +      (                                                                             +     #      + +  +       + + +                 %        + +       +  + +      +    +                       +  +   !  +  +   +                           "               +          +    +        +   *               %               +                      +  + D" + " + _"* 9*"    1                               +      +  +             +               +  + & +              +   +                   !               +             + +%            +               # "*  + +        +                              : + 0)119!D  @                                                      $      +                      +                   +           +  + +                                             +            +  +    +            !  +   + + 8     +   +    +   1   + +   +             +   +      +   +   + +    + $   "       +          +  +               +   +   +         !&      tz \ No newline at end of file diff --git a/library/CENTRONICS.TEDIT b/library/CENTRONICS.TEDIT new file mode 100644 index 00000000..f9a46a4f Binary files /dev/null and b/library/CENTRONICS.TEDIT differ diff --git a/library/CHARCODETABLES.TEDIT b/library/CHARCODETABLES.TEDIT new file mode 100644 index 00000000..6edbd364 Binary files /dev/null and b/library/CHARCODETABLES.TEDIT differ diff --git a/library/CHAT.TEDIT b/library/CHAT.TEDIT new file mode 100644 index 00000000..279b2ef7 --- /dev/null +++ b/library/CHAT.TEDIT @@ -0,0 +1,107 @@ +1 Lisp Library Modules, Medley Release 1.15, CHAT 1 Lisp Library Modules, Medley Release 1.15, CHAT CHAT 1 CHAT 1 CHAT 6 Chat(CHAT NIL Chat NIL NIL 21) is a remote terminal facility that allows you to communicate with other machines while inside Lisp. Chat sets up a Chat connection to a remote machine, so that everything you type is sent to the remote machine, and everything the remote machine prints is displayed in a Chat window. Chat is an extensible terminal emulation facility. Its core supplies both terminal- and network-protocol- independent functionality; new terminal types and new Chat protocols, based on this core, can be added to Chat at any time. You can choose any terminal type to be used with any network protocol type. There are currently terminal emulators for the following terminals: Datamedia 2500(DATAMEDIA% 2500 NIL Datamedia% 2500 NIL NIL 21) DEC VT100(DIGITAL% VT100 NIL Digital% VT100 NIL NIL 21) TEdit(TEDIT NIL TEdit NIL NIL 21) (this is actually a TEdit-based Chat window, supporting scrolling and copy-select operations as in standard TEdit). A number of different network protocol interfaces can be used with Chat. The following protocols are available: PUP Chat NS Chat (using the GAP protocol) TCP (ARPANET) TELNET RS232 Chat (using either the RS232 or TTY ports of the 1108 and 1186 processors) Each of these is available by loading the corresponding module. Requirements 1 DMCHAT CHATTERMINAL One of the network protocols:(NETWORK% PROTOCOLS NIL network% protocols NIL NIL 21) PUPCHAT or NSCHAT or RS232CHAT or TTYCHAT or TCPCHAT. One of the terminal emulators:(TERMINAL% EMULATORS NIL terminal% emulators NIL NIL 21) DMCHAT or VTCHAT or TEDITCHAT. The applicable file dependencies enumerated in the Introduction of this manual. Installation 1 Load CHAT.LCOM from the library. In addition, you must load at least one of the Chat network protocol modules. If you want a terminal emulator different from the default DM2500, you must also load it. User Interface 1 Chat prompts for a new window for each new connection. It saves the first window to reuse once the connection in that window is closed (other windows just go away when their connections are closed). Multiple, simultaneous Chat connections(CHAT% CONNECTIONS NIL Chat% connections NIL NIL 22) are possible. To switch between typing to different Chat connections, press the left button within the Chat window you want to use. Opening a Chat Connection(OPENING% A% CHAT% CONNECTION NIL Opening% a% Chat% Connection NIL NIL 22) The simplest way to open a Chat connection is to select the CHAT option of the right-button (background) menu. The first time you do this, you are prompted in the system's prompt window for the name of a host to which to connect. Subsequently, you are prompted with a menu of all hosts to which you have opened Chat connections; the last entry in this menu is OTHER, and provides a way for you to connect to new Chat hosts. The other method of opening a Chat connection is to call the CHAT function directly: (CHAT(CHAT (function) NIL NIL NIL 22) HOST LOGOPTION INITSTREAM WINDOW) [Function] Opens a Chat connection to HOST, or to the value of DEFAULTCHATHOST(DEFAULTCHATHOST (variable) NIL NIL NIL 22). If HOST requires login, Chat supplies a login sequence. You may alternatively specify one of the following values for LOGOPTION: Login Always perform a login. Attach Always perform an attach (this is likely to be useful only when opening Chat connections to hosts running the Tops-20 or Tenex operating systems). This fails if you do not have exactly one detached job. None Do not attempt to log in or attach. Note: It is important that you supply information about the types of hosts to which you chat by setting the variable NETWORKOSTYPES (see IRM) or DEFAULT.OSTYPE (see Lisp Release Notes), as CHAT uses that information to determine whether and how to log in. An incorrect login sequence can inadvertantly expose your password. If INITSTREAM is supplied, it is either a string or the name of a file whose contents are read as type-in. When the string/file is exhausted, input is taken from the keyboard. If WINDOW is supplied, it is the window to use for the connection; otherwise, you are prompted for a window. While Chat is in control, all Lisp interrupts(LISP% INTERRUPTS NIL Lisp% interrupts NIL NIL 22) are turned off, so that control characters can be transmitted to the remote host. Chat does not turn off interrupt characters until after creating the Chat window, so you can abort the call to Chat by typing Control-E while specifying the Chat window region. If you press the left button in an Executive window, the system's focus-of-attention is switched to that window. At the same time, keyboard interrupts, such as Control-E, are reenabled. Whenever you select an open Chat window, the focus-of-attention is returned to the Chat window, and keyboard interrupts are disabled. Chat Menu(CHAT% MENU NIL Chat% Menu NIL NIL 23) Commands can be given to an active Chat connection by pressing the middle mouse button in the Chat window to get a command menu. Note: The left mouse button, when pressed inside an active Chat window, holds output as long as the button is down. Holding down the middle button coincidentally does this too, but not on purpose; since the menu handler does not yield control to other processes, it is possible to kill the connection by keeping the menu up too long. CLOSE Closes this connection. Once the connection is closed, control is handed over to the main Lisp Executive window. Closes the Chat window unless it is the primary Chat window. SUSPEND Same as CLOSE, but always leaves the window open. NEW Closes the current connection and prompts for a new host to which to open a connection in the same window. FREEZE Holds type-out from this Chat window. Pressing a mouse button in the window in any way releases the hold. This is most useful if you want to switch to another, overlapping window and there is type-out in this window that would compete for screen space. DRIBBLE Opens a typescript file for this Chat connection (closing any previous dribble file for the window). You are prompted for a file name. If you want to close an open dribble file (without opening a new one), just type a carriage return. INPUT Prompts for a file from which to take input. When the end of the file is reached, input reverts to the keyboard. CLEAR Clears the window and resets the simulated terminal to its default state. This is useful if undesired terminal commands have been received from the remote host that place the simulated terminal into an indeterminate state. EMACS Turns on or off the Chat EMACS feature, which provides a convenient way to use the workstation's mouse to move the cursor on the remote machine when using the EMACS text editor. When this feature is turned on, pressing the left mouse button in the Chat window causes a sequence of commands to be sent to the remote machine that cause EMACS to move its cursor to the mouse location. Use of this feature assumes you know the keystrokes to perform cursor-moving commands; see CHAT.EMACSCOMMANDS if your EMACS does not use the standard ones. Also, it assumes that you are pointing where there is actually text in your document (not white space beyond the end of a line) and that there are no tabs in your text; otherwise, the cursor position may not be where you expect. RECONNECT In an inactive Chat window, pressing the middle mouse button brings up a menu of one item, RECONNECT, whose selection reopens a connection to the same host as was last in the window. This is the primary motivation for the SUSPEND menu command. MODE The Chat menu also contains a command of this form for each terminal emulator that you have loaded. The MODE commands are intended to let you dynamically switch between terminal emulators. However, this feature is currently defective and should not be used. You must also choose your emulator type, by setting CHAT.DISPLAYTYPES, before opening the Chat connection. Customizing Chat(CUSTOMIZING% CHAT NIL Customizing% Chat NIL NIL 24) 1 CHAT.DISPLAYTYPES(CHAT.DISPLAYTYPES (variable) NIL NIL NIL 24) [Variable] This variable contains a list that assigns the terminal emulators to be used with the hosts. Each entry on the list is of the form: () HostName When Chat opens a connection, it scans CHAT.DISPLAYTYPES to find an entry whose HostName field matches the name of the Chat host. If no matching entry is found, it scans the list again, looking for an entry whose HostName field is NIL. TerminalTypeNumber Is only important when the Chat protocol in use is PUP Chat. This number identifies the terminal type to the Chat host's operating system. Currently, only Tops-20 and Tenex hosts make use of this facility; if the Chat host does not support this feature, the number in the TerminalTypeNumber field is ignored. TerminalEmulator Chat uses this field of the entry it finds to choose which terminal type to emulate. Typical terminal emulator names are DM2500, VT100, and TEDIT. CHAT.KEYACTIONS(CHAT.KEYACTIONS (variable) NIL NIL NIL 24) [Variable] This variable controls the remapping of the keyboard when the system's focus-of-attention is an active Chat window. The format of this list is: ((KEYNAME . ACTIONS) (KEYNAME . ACTIONS) ... ) For example, if you prefer the backspace key to send the rubout character (octal 177), you would set CHAT.KEYACTIONS to be: ((BS (177Q 177Q NOLOCKSHIFT) . IGNORE)) The key actions are assigned when a Chat process is initiated; i.e., changing CHAT.KEYACTIONS only affects new Chat connections. CHAT.INTERRUPTS(CHAT.INTERRUPTS (variable) NIL NIL NIL 24) [Variable] A list of interrupts to pass to INTERRUPTCHAR to assign keyboard interrupts; e.g., ((177Q. HELP)) causes the DELETE character (code 177) to run the HELP interrupt. Like CHAT.KEYACTIONS, this variable only affects new Chat connections. CHAT.ALLHOSTS(CHAT.ALLHOSTS (variable) NIL NIL NIL 25) [Variable] A list of host names, as uppercase symbols, to which you want to chat. Chatting to a host not on the list adds it to the list. These names are placed in the menu used by the background Chat command prompts. CLOSECHATWINDOWFLG(CLOSECHATWINDOWFLG (variable) NIL NIL NIL 25) [Variable] If true, every Chat window is closed on exit. If NIL, the initial setting, then the primary Chat window is not closed. DEFAULTCHATHOST(DEFAULTCHATHOST (variable) NIL NIL NIL 25) [Variable] The host to which CHAT connects when it is called with no HOST argument. CHAT.FONT(CHAT.FONT (variable) NIL NIL NIL 25) [Variable] If non-NIL, the font used to create Chat windows. If CHAT.FONT is NIL, Chat windows are created with (DEFAULTFONT 'DISPLAY). Note: To work well with the DM2500 and VT100 terminal emulators, you should use fixed$width fonts (e.g., Gacha or Terminal). CHAT.WINDOW.SIZE(CHAT.WINDOW.SIZE (variable) NIL NIL NIL 25) [Variable] This variable is either NIL or a dotted pair of (WIDTH . HEIGHT). The value of the WIDTH field indicates the desired width of the Chat window, in pixels. The value of the HEIGHT field indicates the desired HEIGHT of the window, also in pixels. Note: Before a new value of CHAT.WINDOW.SIZE is used, CHAT.WINDOW must be set to NIL or NOBIND. If CHAT.WINDOW.SIZE is changed after chat has already been called, and chat is then called, the window is not changed because the information is cached. CHAT.WINDOW must be set to NIL and the window recreated anew before this takes place. CHAT.WINDOW.REGION(CHAT.WINDOW.REGION (variable) NIL NIL NIL 25) [Variable] This variable is either NIL or an instance of a REGION. When CHAT.WINDOW.REGION is non-NIL, its value is used as the region in which to create the first Chat window. Subsequent windows are created by prompting for the position of a window of CHAT.WINDOW.SIZE dimensions, or, if that variable is NIL, for an arbitrary window region. CHAT.TTY.PROCESS(CHAT.TTY.PROCESS (variable) NIL NIL NIL 25) [Variable] When you start up CHAT, it takes the TTY immediately if the value is T. (The initial value is T.) CHAT.EMACSCOMMANDS(CHAT.EMACSCOMMANDS (variable) NIL NIL NIL 25) [Variable] A list of five character codes; initially the value of (CHARCODE (^U ^P ^N ^F ^A)). These character codes are used by the EMACS Argument command in changing the position of the cursor: Up one line Down one line Forward one character Backward one character Beginning of line CHAT.IN.EMACS?(CHAT.IN.EMACS? (variable) NIL NIL NIL 26) [Variable] The initial state of the EMACS feature when a Chat connection is started. Initially NIL, meaning the feature is off. CHAT.PROTOCOLTYPES(CHAT.PROTOCOLTYPES (variable) NIL NIL NIL 26) [Variable] Each Chat emulator (TTYCHAT, RS232CHAT, PUPCHAT ...) adds an entry onto CHAT.PROTOCOLTYPES which recognizes host names for the appropriate protocol. For example, loading PUPCHAT adds an entry (PUP . PUPCHAT.HOST.FILTER) and TCPCHAT adds an entry (TCP . TCP.HOST.FILTER). Site administrators of complex networks may want to reorganize these entries when there are hosts which are running multiple servers, each running different protocols. Network Protocols(NETWORK% PROTOCOLS NIL Network% Protocols NIL NIL 26) 1 For the most part, you should not notice too many differences in the behavior of Chat when using one network protocol versus another. The following are unique features of each of the Chat network protocols. PUP Chat(PUP% CHAT NIL PUP% Chat NIL NIL 26) PUP Chat is in the file PUPCHAT.LCOM. Implementations of PUP Chat servers exist for Tops-20, Tenex, VAX/UNIX, and VAX/VMS operating systems. The PUP Chat protocol contains provisions for automatically setting your terminal type, width, and height whenever you establish a connection or reshape your Chat window. NS Chat(NS% CHAT NIL NS% Chat NIL NIL 26) The NS Chat protocol (also known as GAP, or Gateway Access Protocol(GATEWAY% ACCESS% PROTOCOL NIL Gateway% Access% Protocol NIL NIL 26)) is used to communicate with hosts running GapTelnet(GAPTELNET NIL GapTelnet NIL NIL 26) service, including VAX/UNIX and the VAX/VMS service XNS/DEC VAX, and also with Xerox 8000-series network services such as 8040 print servers or 8030 file servers. This protocol is contained on the file NSCHAT.LCOM. The NS Chat protocol differentiates among a number of virtual terminal services. When you chat to an NS host, the NS Chat module queries the Clearinghouse(CLEARINGHOUSE NIL Clearinghouse NIL NIL 26) for information about the specified host. This information permits the NS Chat module to determine which of the following virtual terminal services are appropriate for the host. The NS Chat module uses a small set of heuristics to choose which virtual terminal service to invoke, based on information returned by the Clearinghouse. If the Clearinghouse information indicates that only one service type is possible, NS Chat opens a connection to the Chat host and invokes the proper virtual terminal service. If the Clearinghouse returns information indicating that more than one virtual terminal service is supported by the specified host, you are prompted to choose a service from a menu of the possible service types. If NS Chat guesses an incorrect service type, or you choose an incorrect service type, you are prompted to choose a service from a menu of all known virtual service types. If this fails, NS Chat abandons its attempts to connect to the specified host. Remote System Administration(REMOTE% SYSTEM% ADMINISTRATION NIL Remote% System% Administration NIL NIL 27) This service lets you log onto print servers and clearinghouse servers, and issue appropriate commands. NS Chat automatically chooses this service when the specified host is registered in the Clearinghouse as any type of server machine. Remote System Executive(REMOTE% SYSTEM% EXECUTIVE NIL Remote% System% Executive NIL NIL 27) This service is currently supported by VAX/VMS systems running XNS/DEC VAX, by UNIX systems running GapTelnet service, by Lisp workstations running CHATSERVER from the library, and by XDE workstations. Interactive Terminal Service(INTERACTIVE% TERMINAL% SERVICE NIL Interactive% Terminal% Service NIL NIL 27) The ITS is a TTY-based interface to NS mail. External Communication Service(EXTERNAL% COMMUNICATION% SERVICE NIL External% Communication% Service NIL NIL 27) The External Communication Service (ECS) enables Chat connections to external hosts accessible only by use of a modem. When you open a Chat connection to an ECS, you are prompted for a telephone number; the ECS dials that number and completes the connection if a compatible modem answers. ECS hosts typically support a variety of modem connection characteristics (specific combinations of parity, character length, baud rate, and flow control settings). Each connection type is known by a different Chat host name; check with your system administrator to determine the Chat host name you should use to connect to a particular external host. TCP Chat(TCP% CHAT NIL TCP% Chat NIL NIL 27) TCPCHAT.LCOM is the interface to the TCP-based TELNET protocol, which is the protocol in use throughout the ARPANET. It loads and initializes the TCP-IP module, if necessary. Read the TCP-IP module in this manual for more information. RS232 Chat(RS232% CHAT NIL RS232% Chat NIL NIL 27) RS232 Chat is contained on the files RS232CHAT.LCOM and TTYCHAT.LCOM. RS232 Chat enables use of the 1108, 1185, and 1186 RS232 ports; TTY Chat enables use of the 1108, 1185, and 1186 TTY ports. Read the RS232 module in this manual for more information. Terminal Emulators 1 DM2500 Chat(DM2500% CHAT NIL DM2500% Chat NIL NIL 27) The Datamedia 2500 terminal emulator is contained in DMCHAT.LCOM. To use it, load DMCHAT.LCOM and add entries to CHAT.DISPLAYTYPES in the form: ( DM2500) VT100 Chat(VT100% CHAT NIL VT100% Chat NIL NIL 28) The VT100 emulator is contained in VTCHAT. To use it, load VTCHAT.DFASL and add entries to CHAT.DISPLAYTYPES in the form: ( VT100) Currently, the VT100 emulator does not emulate the following features of the actual Digital VT100 terminal: Dual-width or dual-height characters Graphics character set Remotely initiated switching between 80- and 132-column mode TEdit Chat(TEDIT% CHAT NIL TEdit% Chat NIL NIL 28) TEdit Chat supplies a glass TTY terminal emulator with a TEdit stream storing all characters received during the Chat session. As a result, you can scroll back and forth through a transcript of your session, and you can use the standard TEdit copy-select command to copy blocks of characters from the Chat window to another TEdit window, a Lisp Executive, etc. To use TEdit Chat, load TEDITCHAT.LCOM, and add entries to CHAT.DISPLAYTYPES in the form: ( TEDIT) Note that since TEdit already uses the middle mouse button, you must click in the window's title bar in order to get the usual Chat menu. [This page intentionally left blank] (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "") STARTINGPAGE# 21) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (TEXT NIL NIL (54 54 504 702) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (54 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL)))))&-$$T-HHT3HH +T6T5.$$TT-T,,5H2Hll52ll2l,,,ll2,,$$ +,HH,$$2HH +2$$l2HH +l2lll2HHl,HH,HH +3T22-T-TF PAGEHEADING VERSOHEADF PAGEHEADING RECTOHEADE PAGEHEADINGFOOTINGVE PAGEHEADINGFOOTINGR HELVETICA HELVETICA +TITAN TITAN +CLASSIC +CLASSIC + HELVETICA  HELVETICAMODERN +MODERN +MODERNMODERNMODERN +MODERN & HRULE.GETFNTITAN +&/% HRULE.GETFNTITAN +%0$$ HRULE.GETFNTITAN +## HRULE.GETFNTITAN + HRULE.GETFNMODERN IM.INDEX.GETFN5E0IM.INDEX.GETFN +.IM.INDEX.GETFNIM.INDEX.GETFNwr "R@  HRULE.GETFNMODERN  6IM.INDEX.GETFN78IM.INDEX.GETFN"O   HRULE.GETFNMODERN  OY  HRULE.GETFNMODERN '4IM.INDEX.GETFNJIM.INDEX.GETFN<*;= IM.INDEX.GETFNMODERN +    +IM.INDEX.GETFNMODERN + + 3=   + + + + + + + + +$ t +  + + +   b -2IM.INDEX.GETFNB &IM.INDEX.GETFN P   + +$ + + +k + + + +  r + + + +] + +Z + { +  + + +g + +P +z$ + 4IM.INDEX.GETFN HRULE.GETFNMODERN -IM.INDEX.GETFNMODERN +   4  + +& + + +  +8  + + ++IM.INDEX.GETFNMODERN +   0 d   * N #+IM.INDEX.GETFNMODERN + +  ! &D 3 )IM.INDEX.GETFNMODERN + +  .IM.INDEX.GETFNMODERN +  2C+IM.INDEX.GETFNMODERN + + +  %  %IM.INDEX.GETFNMODERN + +  6   UQ,IM.INDEX.GETFNMODERN + +   T  + +   + + + + + +  + +7.IM.INDEX.GETFNMODERN +     LK + +$",IM.INDEX.GETFNMODERN + + /   .IM.INDEX.GETFNMODERN + + 6  &: *IM.INDEX.GETFNMODERN + + T  .IM.INDEX.GETFNMODERN +  +H<,6IM.INDEX.GETFN HRULE.GETFNMODERN $IM.INDEX.GETFN "IM.INDEX.GETFNCDIM.INDEX.GETFN5$IM.INDEX.GETFN ,IM.INDEX.GETFNKNIM.INDEX.GETFN DIM.INDEX.GETFN  +,NIM.INDEX.GETFN -RIM.INDEX.GETFN "a$IM.INDEX.GETFN  +(IM.INDEX.GETFN%    HRULE.GETFNMODERN  *IM.INDEX.GETFN5  ) +(IM.INDEX.GETFN= )l%= +(IM.INDEX.GETFNn)"%! +!Kz \ No newline at end of file diff --git a/library/CMLFLOATARRAY.TEDIT b/library/CMLFLOATARRAY.TEDIT new file mode 100644 index 00000000..ab11f077 Binary files /dev/null and b/library/CMLFLOATARRAY.TEDIT differ diff --git a/library/COLOR1.TEDIT b/library/COLOR1.TEDIT new file mode 100644 index 00000000..061cc10c Binary files /dev/null and b/library/COLOR1.TEDIT differ diff --git a/library/COLOR2.TEDIT b/library/COLOR2.TEDIT new file mode 100644 index 00000000..2a80139e --- /dev/null +++ b/library/COLOR2.TEDIT @@ -0,0 +1,236 @@ +1 KALEIDOSCOPE MANUAL - 16-JAN-89 - Dev. Draft 1 KALEIDOSCOPE MANUAL - 16-JAN-89 - Dev. Draft COLOR 1 ENVOS KALEIDOSCOPE 1 COLOR 6 2 Introduction 1 This document describes software for driving color displays. In order to run COLOR, you need either a Sun (3 or 4) with CG4 color hardware and display, a Dorado (Xerox 1132) with attached color display, or a Dandelion (Xerox 1108) with attached BusMaster and color display. The color software which is distributed among a number of files can be divided into a machine independent group of files that all users can usefully load and a machine dependent group containing files that work for particular combinations of hardware. The machine independent color graphics code is stored in the library files LLCOLOR.LCOM and COLOR.LCOM. LOADing COLOR.LCOM causes LLCOLOR.LCOM to be LOADed. The machine dependent portions of Xerox Lisp color software is stored in files such as MAIKOCOLOR.LCOM, DORADOCOLOR.LCOM, or COLORNNCC.LCOM. The user LOADs one of these files according to what kind of machine and color card the user is using. The Sun color driver resides in the file MAIKOCOLOR.LCOM which loads LLCOLOR.LCOM and COLOR.LCOM. The CG4 device suppports 8 bpp at 1152 by 900 resolution. The user must be running ldecolor, the special color capable emulator. The physical display monitor is shared by both the monochrome and color screens (described below) . The Dorado color driver resides in the file DORADOCOLOR.LCOM which loads LLCOLOR.LCOM and COLOR.LCOM. The Dorado color board supports four or eight bits per pixel (bpp) at 640 by 480 resolution. (The board supports 24 bpp also, but Xerox Lisp doesn't yet.) The Dandelion color drivers reside in the files DANDELIONUFO.LCOM, DANDELIONUFO4096.LCOM, and COLORNNCC.LCOM, one package for each of three different kinds of boards. The user should load one of these packages on a Dandelion attached to a BusMaster and color display. The DANDELIONUFO and DANDELIONUFO4096 packages drive 4 bpp at 640 by 400 resolution color boards used inside Xerox which have been made obsolete by COLORNNCC. The COLORNNCC package drives an 8 bpp color at 512 by 480 resolution board, the Revolution 512 x 8, made by Number Nine Computer Corporation. The Revolution 512 x 8 is available both inside and outside Xerox through Number Nine. 2 Hardware Displays and Software Screens 1 On some workstations (such as the Dorado and Dandelion), there may be physically two separate displays. On most Suns, there is a single physical display, which additionally may be shared by two Unix devices. One device is monochrome (b/w), and the other is color. To support the various hardware configurations and external display devices, the software has a special datatype, a "screen". There are two distinct instances of screens, a b/w screen, and a color screen. A screen represents and controls a physical hardware display, and contains windows, icons, and tracks the mouse. On workstations with physically two separate hardware displays, each display is represented by a corresponding screen data structure. On workstations with a single hardware display, the display is shared by both the b/w screen and the color screen. In all cases, before initialization only the b/w screen (and thus display) is visible and active. After initialization both screens are active (can contain screen images), although on single displays, only one screen is visible at a time. Since each screen logically controls a display, we will henceforth use the terms "screen" and "display" interchangeably. Screens are discussed in greater detail below. 2 Turning the Color Display Software On and Off 1 The color display software can be turned on and off. While the color display software is on, the memory used for the color display screen bitmap is locked down, and a small amount of processing time is used to drive the color display. (COLORDISPLAYP) [Function] returns T if the color display is on; otherwise it returns NIL. (COLORDISPLAYONOFF TYPE) [Function] turns off the color display if ONOFF is 'OFF. If ONOFF is 'ON, it turns on the color display allocating memory for the color screen bitmap. TYPE should be one of 'MAIKOCOLOR, 'DORADOCOLOR, 'DANDELIONUFO, 'DANDELIONUFO4096, or 'COLORNNCC. The usual sequence of events for the user is to LOAD the software needed to drive a particular color card and then to call COLORDISPLAY with the appropriate TYPE to turn the software on. For example, (LOAD 'COLOR.LCOM) (LOAD 'COLORNNCC.LCOM) (COLORDISPLAY 'ON 'REV512X8) will turn on the software needed to drive the Number Nine Computer Corporation's Revolution 512 x 8 card with 1108 and BusMaster. Besides initializing or reinitializing a color card that has been powered off, COLORDISPLAY allocates memory for the color screen bitmap. Turning on the color display requires allocating and locking down the memory necessary to hold the color display screen bitmap. Turning off the color display frees this memory. 2 Colors 1 The number of bits per pixel determines the number of different colors that can be displayed at one time. When there are 4 bpp, 16 colors can be displayed at once. When there are 8 bpp, 256 colors can be displayed at once. A table called a color map determines what color actually appears for each pixel value. A color map gives the color in terms of how much of the three primary colors (red, green, and blue) is displayed on the screen for each possible pixel value. A color can be represented as a number, an atom, or a triple of numbers. Colors are ultimately given their final interpretation into how much red, blue, and green they represent through a color map. A color map maps a color number ([0 . . . 2nbits-1]) into the intensities of the three color guns (primary colors red, green, and blue). Each entry in the color map has eight bits for each of the primary colors, allowing 256 levels per primary or 224 possible colors (not all of which are distinct to the human eye). Within Xerox Lisp programs, colors can be manipulated as numbers, red-green-blue triples, names, or hue-lightness-saturation triples. Any function that takes a color accepts any of the different representations. If a number is given, it is the color number used in the operation. It must be valid for the color bitmap used in the operation. (Since all of the routines that use a color need to determine its number, it is fastest to use numbers for colors. COLORNUMBERP, described below, provides a way to translate into numbers from the other representations.) Red Green Blue Triples 1 A red green blue (RGB) triple is a list of three numbers between 0 and 255. The first element gives the intensity for red, the second for green, and the third for blue. When an RGB triple is used, the current color map is searched to find the color with the correct intensities. If none is found, an error is generated. (That is, no attempt is made by the system to assign color numbers to intensities automatically.) An example of an RGB triple is (255 255 255), which gives the color white. RGB [Record] is a record that is defined as (RED GREEN BLUE); it can be used to manipulate RGB triples. COLORNAMES [Association list] maps names into colors. The CDR of the color name's entry is used as the color corresponding to the color name. This can be any of the other representations. (Note: It can even be another color name. Loops in the name space such as would be caused by putting '(RED . CRIMSON) and '(CRIMSON . RED) on COLORNAMES are not checked for by the system.) Some color names are available in the initial system and are intended to allow color programs written by different users to coexist. These are: Name RGB Number in default color maps BLACK (0 0 0) 15 255 BLUE (0 0 255) 14 252 GREEN (0 255 0) 13 227 CYAN (0 255 255) 12 224 RED (255 0 0) 3 31 MAGENTA (255 0 255) 2 28 YELLOW (255 255 0) 1 3 WHITE (255 255 255) 0 0 Hue Lightness Saturation Triples 1 A hue lightness saturation triple is a list of three numbers. The first number (HUE) is an integer between 0 and 355 and indicates a position in degrees on a color wheel (blue at 0, red at 120, and green at 240). The second (LIGHTNESS) is a real number between zero and one that indicates how much total intensity is in the color. The third (SATURATION) is a real number between zero and one that indicates how disparate the three primary levels are. HLS [Record] is a record defined as (HUE LIGHTNESS SATURATION); it is provided to manipulate HLS triples. Example: the color blue is represented in HLS notation by (0 .5 1.0). (COLORNUMBERP COLOR BITSPERPIXEL NOERRFLG) [Function] returns the color number (offset into the screen color map) of COLOR. COLOR is one of the following: A positive number less than the maximum number of colors, A color name, AN RGB triple, or An HLS triple. If COLOR is one of the above and is found in the screen color map, its color number in the screen color map is returned. If not, an error is generated unless NOERRFLG is non-NIL, in which case NIL is returned. (RGBP X) [Function] returns X if X is an RGB triple; NIL otherwise. (HLSP X) [Function] returns X if X is an HLS triple; NIL otherwise. 2 Color Maps 1 The screen color map holds the information about what color is displayed on the color screen for each pixel value in the color screen bitmap. The values in the current screen color map may be changed, and this change is reflected in the colors displayed at the next vertical retrace (approximately 1/30 of a second). The color map can be changed to obtain dramatic effects. (SCREENCOLORMAP NEWCOLORMAP) [Function] reads and sets the color map that is used by the color display. If NEWCOLORMAP is non-NIL, it should be a color map, and SCREENCOLORMAP sets the system color map to be that color map. The value returned is the value of the screen color map before SCREENCOLORMAP was called. If NEWCOLORMAP is NIL, the current screen color map is returned without change. (CMYCOLORMAP CYANBITS MAGENTABITS YELLOWBITS BITSPERPIXEL) [Function] Returns a color map that assumes the BITSPERPIXEL bits are to be treated as three separate color planes with CYANBITS bits being in the cyan plane, MAGENTABITS bits being in the magenta plane, and YELLOWBITS bits being in the yellow plane. Within each plane, the colors are uniformly distributed over the intensity range 0 to 255. White is 0 and black is 255. (RGBCOLORMAP REDBITS GREENBITS BLUEBITS BITSPERPIXEL) [Function] Returns a color map that assumes the BITSPERPIXEL bits are to be treated as three separate color planes with REDBITS bits being in the red plane, GREENBITS bits being in the green plane, and BLUEBITS bits being in the blue plane. Within each plane, the colors are uniformly distributed over the intensity range 0 to 255. White is 255 and black is 0. (GRAYCOLORMAP BITSPERPIXEL) [Function] Returns a color map containing shades of gray. White is 0 and black is 255. (COLORMAPCREATE INTENSITIES BITSPERPIXEL) [Function] creates a color map for a screen that has BITSPERPIXEL bits per pixel. If BITSPERPIXEL is NIL, the number of bits per pixel is taken from the current color display setting. INTENSITIES specifies the initial colors that should be in the map. If INTENSITIES is not NIL, it should be a list of color specifications other than color numbers, e.g., the list of RGB triples returned by the function INTENSITIESFROMCOLOR MAP. (INTENSITIESFROMCOLORMAP COLORMAP) [Function] returns a list of the intensity levels of COLORMAP (default is (SCREENCOLORMAP)) in a form accepted by COLORMAPCREATE. This list can be written on file and thus provides a way of saving color map specifications. (COLORMAPCOPY COLORMAP BITSPERPIXEL) [Function] returns a color map that contains the same color intensities as COLORMAP if COLORMAP is a color map. Otherwise, it returns a color map with default color values. (MAPOFACOLOR PRIMARIES) [Function] returns a color map that is different shades of one or more of the primary colors. For example, (MAPOFACOLOR '(RED GREEN BLUE)) gives a color map of different shades of gray; (MAPOFACOLOR 'RED) gives different shades of red. Changing Color Maps 1 The following functions are provided to access and change the intensity levels in a color map. (SETCOLORINTENSITY COLORMAP COLORNUMBER COLORSPEC) [Function] sets the primary intensities of color number COLORNUMBER in the color map COLORMAP to the ones specified by COLORSPEC. COLORSPEC can be either an RGB triple, an HLS triple, or a color name. The value returned is NIL. (COLORLEVEL COLORMAP COLORNUMBER PRIMARY NEWLEVEL) [Function] sets and reads the intensity level of the primary color PRIMARY (RED, GREEN, or BLUE) for the color number COLORNUMBER in the color map COLORMAP. If NEWLEVEL is a number between 0 and 255, it is set. The previous value of the intensity of PRIMARY is returned. (ADJUSTCOLORMAP PRIMARY DELTA COLORMAP) [Function] adds DELTA to the intensity of the PRIMARY color value (RED, GREEN, or BLUE) for every color number in COLORMAP. (ROTATECOLORMAP STARTCOLOR THRUCOLOR) [Function] rotates a sequence of colors in the SCREENCOLORMAP. The rotation moves the intensity values of color number STARTCOLOR into color number STARTCOLOR+1, the intensity values of color number STARTCOLOR+1 into color number STARTCOLOR+2, etc., and THRUCOLOR's values into STARTCOLOR. (EDITCOLORMAP VAR NOQFLG) [Function] allows interactive editing of a color map. If VAR is an atom whose value is a color map, its value is edited. Otherwise a new color map is created and edited. The color map being edited is made the screen color map while the editing takes place so that its effects can be observed. The edited color map is returned as the value. If NOQFLG is NIL and the color display is on, you are asked if you want a test pattern of colors. A yes response causes the function SHOWCOLORTESTPATTERN to be called, which displays a test pattern with blocks of each of the possible colors. You are prompted for the location of a color control window to be placed on the black-and-white display. This window allows the value of any of the colors to be changed. The number of the color being edited is in the upper left part of the window. Six bars are displayed. The right three bars give the color intensities for the three primary colors of the current color number. The left three bars give the value of the color's Hue, Lightness, and Saturation parameters. These levels can be changed by positioning the mouse cursor in one of the bars and pressing the left mouse button. While the left button is down, the value of that parameter tracks the Y position of the cursor. When the left button is released, the color tracking stops. The color being edited is changed by pressing the middle mouse button while the cursor is in the interior of the edit window. This brings up a menu of color numbers. Selecting one sets the current color to the selected color. The color being edited can also be changed by selecting the menu item "PickPt." This switches the cursor onto the color screen and allows you to select a point from the color screen. It then edits the color of the selected point. To stop the editing, move the cursor into the title of the editing window and press the middle button. This brings up a menu. Select Stop to quit. 2 Color Bitmaps 1 A color bitmap is actually a bitmap that has more than one bit per pixel. To test whether a bitmap is a color bitmap, the function BITSPERPIXEL can be used. (BITSPERPIXEL BITMAP) [Function] returns the bits per pixel of BITMAP; if this does not equal one, BITMAP is a color bitmap. In multiple-bit-per-pixel bitmaps, the bits that represent a pixel are stored contiguously. BITMAPCREATE is passed a BITSPERPIXEL argument to create multiple-bit-per-pixel bitmaps. (BITMAPCREATE WIDTH HEIGHT BITSPERPIXEL) [Function] creates a color bitmap that is WIDTH pixels wide by HEIGHT pixels high allowing BITSPERPIXEL bits per pixel. Currently any value of BITSPERPIXEL except one, four, eight, or NIL (defaults to one) causes an error. A four-bit-per-pixel color screen bitmap uses approximately 76K words of storage, and an eight-bit-per-pixel one uses approximately 153K words. There is only one such bitmap. The following function provides access to it. (COLORSCREENBITMAP) [Function] returns the bitmap that is being or will be displayed on the color display. This is NIL if the color display has never been turned on (see COLORDISPLAY below). 2 2 Screens, Screenpositions, and Screenregions 1 In addition to positions and regions, the user needs to be aware of screens, screenpositions, and screenregions in the presence of multiple screens. Screens 1 SCREEN [Datatype] There are generally two screen datatype instances in existence when working with color. This is because the user is attached to two displays, a black and white display and a color display. (MAINSCREEN) [Function] returns the screen datatype instance that represents the black and white screen. This will be something like {SCREEN}#74,24740. (COLORSCREEN) [Function] returns the screen datatype instance that represents the color screen. Screens appear as part of screenpositions and screenregions, serving as the extra information needed to make clear whether a particular position or region should be viewed as lying on the black and white display or the color display. (SCREENBITMAP SCREEN) [Function] returns the bitmap destination of SCREEN. If SCREEN=NIL, returns the black and white screen bitmap. Screenpositions 1 SCREENPOSITION [Record] Somewhat like a position, a screenposition denotes a point in an X,Y coordinate system on a particular screen. Screenpositions have been defined according to the following record declaration: (RECORD SCREENPOSITION (SCREEN . POSITION) (SUBRECORD POSITION)) A SCREENPOSITION is an instance of a record with fields XCOORD, YCOORD, and SCREEN and is manipulated with the standard record package facilities. For example, (create SCREENPOSITION XCOORD _ 10 YCOORD _ 20 SCREEN _ (COLORSCREEN)) creates a screenposition representing the point (10,20) on the color display. The user can extract the position of a screenposition by fetching its POSITION. For example, (fetch (SCREENPOSITION POSITION) of SP12). Screenregions 1 SCREENREGION [Record] Somewhat like a region, a screenregion denotes a rectangular area in a coordinate system. Screenregions have been defined according to the following record declaration: (RECORD SCREENREGION (SCREEN . REGION) (SUBRECORD REGION)) Screenregions are characterized by the coordinates of their bottom left corner and their width and height. A SCREENREGION is a record with fields LEFT, BOTTOM, WIDTH, HEIGHT, and SCREEN. It can be manipulated with the standard record package facilities. There are access functions for the REGION record that return the TOP and RIGHT of the region. The user can extract the region of a screenregion by fetching its REGION. For example, (fetch (SCREENREGION REGION) of SR8). Screenposition and Screenregion Prompting 1 The following functions can be used by programs to allow the user to interactively specify screenpositions or screenregions on a display screen. (GETSCREENPOSITION WINDOW CURSOR) [Function] 1 Similar to GETPOSITION. Returns a SCREENPOSITION that is specified by the user. GETSCREENPOSITION waits for the user to press and release the left button of the mouse and returns the cursor screenposition at the time of release. If WINDOW is a WINDOW, the screenposition will be on the same screen as WINDOW and in the coordinate system of WINDOW's display stream. If WINDOW is NIL, the position will be in screen coordinates. 1 (GETBOXSCREENPOSITION BOXWIDTH BOXHEIGHT ORGX ORGY WINDOW PROMPTMSG) [Function] 1 Similar to GETBOXPOSITION. Returns a SCREENPOSITION that is specified by the user. Allows the user to position a "ghost" region of size BOXWIDTH by BOXHEIGHT on a screen, and returns the SCREENPOSITION of the lower left corner of the screenregion chosen. A ghost region is locked to the cursor so that if the cursor is moved, the ghost region moves with it. The user can change to another corner by holding down the right button. With the right button down, the cursor can be moved across a screen or to other screens without effect on the ghost region frame. When the right button is released, the mouse will snap to the nearest corner, which will then become locked to the cursor. (The held corner can be changed after the left or middle button is down by holding both the original button and the right button down while the cursor is moved to the desired new corner, then letting up just the right button.) When the left or middle button is pressed and released, the lower left corner of the screenregion chosen at the time of release is returned. If WINDOW is a WINDOW, the screenposition will be on the same screen as WINDOW and in the coordinate system of WINDOW's display stream. If WINDOW is NIL, the position will be in screen coordinates.its lower left corner in screen coordinates. 1 (GETSCREENREGION MINWIDTH MINHEIGHT OLDREGION NEWREGIONFN NEWREGIONFNARG INITCORNERS) [Function] 1 Similar to GETREGION. Returns a SCREENREGION that is specified by the user. Lets the user specify a new screenregion and returns that screenregion. GETSCREENREGION prompts for a screenregion by displaying a four-pronged box next to the cursor arrow at one corner of a "ghost" region: $$ . If the user presses the left button, the corner of a "ghost" screenregion opposite the cursor is locked where it is. Once one corner has been fixed, the ghost screenregion expands as the cursor moves. To specify a screenregion: (1) Move the ghost box so that the corner opposite the cursor is at one corner of the intended screenregion. (2) Press the left button. (3) Move the cursor to the screenposition of the opposite corner of the intended screenregion while holding down the left button. (4) Release the left button. Before one corner has been fixed, one can switch the cursor to another corner of the ghost screenregion by holding down the right button. With the right button down, the cursor changes to a "forceps" ( 9)@9p``) and the cursor can be moved across a screen or to other screens without effect on the ghost screenregion frame. When the right button is released, the cursor will snap to the nearest corner of the ghost screenregion. After one corner has been fixed, one can still switch to another corner. To change to another corner, continue to hold down the left button and hold down the right button also. With both buttons down, the cursor can be moved across a screen or to other screens without effect on the ghost screenregion frame. When the right button is released, the cursor will snap to the nearest corner, which will become the moving corner. In this way, the screenregion may be moved all over a screen and to other screens, before its size and screenposition is finalized. The size of the initial ghost screenregion is controlled by the MINWIDTH, MINHEIGHT, OLDREGION, and INITCORNERS arguments. 1 (GETBOXSCREENREGION WIDTH HEIGHT ORGX ORGY WINDOW PROMPTMSG) [Function] 1 Similar to GETBOXREGION. Returns a SCREENREGION that is specified by the user. Performs the same prompting as GETBOXSCREENPOSITION and returns the SCREENREGION specified by the user instead of the SCREENPOSITION of its lower left corner. 1 2 Color Windows and Menus 1 The Xerox Lisp window system provides both interactive and programmatic constructs for creating, moving, reshaping, overlapping, and destroying windows in such a way that a program can use a window in a relatively transparent fashion (see ("Windows" . TERM)). Menus are a special type of window provided by the window system, used for displaying a set of items to the user, and having the user select one using the mouse and cursor. The menu facility also allows users to create and use menus in interactive programs (see ("Menus" . TERM)). As of the LUTE release of Xerox Lisp, it is possible for the user to create and use windows and menus on the color display. (CREATEW REGION TITLE BORDERSIZE NOOPENFLG) [Function] 1 Creates a new window. REGION indicates where and how large the window should be by specifying the exterior screenregion of the window. In a user environment with multiple screens, such as a black and white screen and color screen both connected to the same machine, there is a new special problem in indicating which screen the REGION is supposed to be a region of. This problem is solved by allowing CREATEW to take screenregion arguments as REGION. For example, (SETQ FOO (CREATEW (CREATE SCREENREGION SCREEN _ (COLORSCREEN) LEFT _ 20 BOTTOM _ 210 WIDTH _ 290 HEIGHT _ 170) "FOO WINDOW")) creates a window titled "FOO WINDOW" on the color screen. To create a window on the black and white screen, the user should use SCREEN _ (MAINSCREEN) in the CREATE SCREENREGION expression. Note that it is still perfectly legal to pass in a REGION that is a region, not a screenregion, to CREATEW, but it is preferable to be passing screenregions rather than regions to CREATEW. This is because when REGION is a region, REGION is disambiguated in a somewhat arbitrary manner that may not always turn out to be what the user was hoping for. When REGION is a region, REGION is disambiguated by coercing REGION to be a screenregion on the screen which currently contains the cursor. This is so that software calling CREATEW with regions instead of screenregions tends to do the right thing in a user environment with multiple screens. 1 (WINDOWPROP WINDOW PROP NEWVALUE) [NoSpread Function] 1 If PROP='SCREEN, then WINDOWPROP returns the screen WINDOW is on. If NEWVALUE is given, (even if given as NIL), with PROP='SCREEN, then WINDOWPROP will generate an error. Any other PROP name is handled in the usual way. 1 (OPENWINDOWS SCREEN) [Function] 1 Returns a list of all open windows on SCREEN if SCREEN is a screen datatype such as (MAINSCREEN) or (COLORSCREEN). If SCREEN=NIL, then SCREEN will default to the screen containing the cursor. If SCREEN=T, then a list of all open windows on all screens is returned. 1 2 Color Fonts 1 The user can create color fonts and specify in the font profile that certain color fonts be used when printing in color. Color Font Creation 1 The user can create and manipulate color fonts through the same functions that are used to create and manipulate black and white fonts. This is made possible in some cases by there being new ways to call familiar font functions. (FONTCREATE FAMILY SIZE FACE ROTATION DEVICE NOERRORFLG CHARSET) [Function] 1 In addition to creating black and white fonts, FONTCREATE can be used to create color fonts. For example, (FONTCREATE 'GACHA 10 '(BOLD REGULAR REGULAR YELLOW BLUE) 0 '8DISPLAY) will create an 8 bit per pixel font with blue letters on a yellow background. The user indicates the color and bits per pixel of the font by the FACE and DEVICE arguments passed to FONTCREATE. DEVICE='8DISPLAY means to create an 8bpp font and DEVICE='4DISPLAY means to create a 4bpp font. A color font face is a 5 tuple, (WEIGHT SLOPE EXPANSION BACKCOLOR FORECOLOR) whereas a black and white font face is just a 3 tuple, (WEIGHT SLOPE EXPANSION) The FORECOLOR is the color of the characters of the font and the BACKCOLOR is the color of the background behind the characters that gets printed along with the characters. Both BACKCOLOR and FORECOLOR are allowed to a color name, color number, or any other legal color representation. A color font face can also be represented as a LITATOM. A three character atom such as MRR or any of the special atoms STANDARD, ITALIC, BOLD, BOLDITALIC can optionally be continued by hyphenating on BACKCOLOR and FORECOLOR suffixes. For example, MRR-YELLOW-BLUE BOLD-YELLOW-RED ITALIC-90-200 BRR-100-53 are acceptable color font faces. Hence, (FONTCREATE 'GACHA 10 'BOLD-YELLOW-BLUE 0 '8DISPLAY) will create a color font. LITATOM FACE arguments fall into one of the following patterns: wse wse-backcolor-forecolor STANDARD STANDARD-backcolor-forecolor ITALIC ITALIC-backcolor-forecolor BOLD BOLD-backcolor-forecolor BOLDITALIC BOLDITALIC-backcolor-forecolor where w=B, M, or L; s=I or R; e=R, C, or E; backcolor=a color name or color number; and forecolor=a color name or color number. 1 (FONTPROP FONT PROP) [Function] 1 Returns the value of the PROP property of font FONT. Besides black and white font properties, the following font properties are recognized: FORECOLOR The color of the characters of the font, represented as a color number. This is the color in which the characters of the font will print. BACKCOLOR The color of the background of the characters of the font, represented as a color number. This is the color in which the the background of characters of the font will print. A font with red characters on a yellow background would have a red FORECOLOR and a yellow BACKCOLOR. Color Font Profiles 1 Font profiles are the facility PRETTYPRINT uses to print different elements (user functions, system functions, clisp words, comments, etc.) in different fonts to emphasize (or deemphasize) their importance, and in general to provide for a more pleasing appearance. The user can specify that different colors of fonts be used for different kinds of elements when printing in color. A well chosen font profile will allows user to DEDIT functions, PP functions, and SEE source files in color, for example. A FONTPROFILE such as ((DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8) (4DISPLAY (GACHA 10 MRR-WHITE-RED)) (8DISPLAY (GACHA 10 MRR-WHITE-RED))) (BOLDFONT 2 (HELVETICA 10 BRR) (HELVETICA 8 BRR) (MODERN 8 BRR) (4DISPLAY (HELVETICA 10 BRR-WHITE-MAGENTA)) (8DISPLAY (HELVETICA 10 BRR-WHITE-MAGENTA))) (LITTLEFONT 3 (HELVETICA 8) (HELVETICA 6 MIR) (MODERN 8 MIR) (4DISPLAY (HELVETICA 8 MRR-WHITE-GREEN)) (8DISPLAY (HELVETICA 8 MRR-WHITE-GREEN))) (BIGFONT 4 (HELVETICA 12 BRR) (HELVETICA 10 BRR) (MODERN 10 BRR) (4DISPLAY (HELVETICA 12 BRR-WHITE-BLUE)) (8DISPLAY (HELVETICA 12 BRR-WHITE-BLUE))) (USERFONT BOLDFONT) (COMMENTFONT LITTLEFONT) (LAMBDAFONT BIGFONT) (SYSTEMFONT) (CLISPFONT BOLDFONT) ...) would have comments print in green and clisp words print in blue while ordinairy atoms would print in red. Not all combinations of fonts will be aesthetically pleasing and the user may have to experiment to find a compatible set. The user should indicate what font is to be used for each font class by calling the function FONTPROFILE: (FONTPROFILE PROFILE) [Function] 1 Sets up the font classes as determined by PROFILE, a list of elements which defines the correspondence between font classes and specific fonts. Each element of PROFILE is a list of the form: (FONTCLASS FONT# DISPLAYFONT PRESSFONT INTERPRESSFONT (OTHERDEVICE1 OTHERFONT1) ... (OTHERDEVICEn OTHERFONTn)) FONTCLASS is the font class name and FONT# is the font number for that class. DISPLAYFONT, PRESSFONT, and INTERPRESSFONT are font specifications (of the form accepted by FONTCREATE) for the fonts to use when printing to the black and white display and to Press and Interpress printers respectively. The appearance of color fonts can be affected by including an (OTHERDEVICEi OTHERFONTi) entry where OTHERDEVICEi is either 4DISPLAY or 8DISPLAY for a 4 bits per pixel or 8 bits per pixel color font and OTHERFONTi is a color font specification such as (GACHA 10 MRR-WHITE-RED). 1 FONTPROFILE [Variable] 1 This is the variable used to store the current font profile, in the form accepted by the function FONTPROFILE. Note that simply editing this value will not change the fonts used for the various font classes; it is necessary to execute (FONTPROFILE FONTPROFILE) to install the value of this variable. 1 2 Using Color 1 The current color implementation allows display streams to operate on color bitmaps. The two functions DSPCOLOR and DSPBACKCOLOR set the color in which a stream draws when the user defaults a color argument to a drawing function. (DSPCOLOR COLOR STREAM) [Function] sets the foreground color of a stream. It returns the previous foreground color. If COLOR is NIL, it returns the current foreground color without changing anything. The default foreground color is MINIMUMCOLOR=0, which is white in the default color maps. (DSPBACKCOLOR COLOR STREAM) [Function] sets the background color of a stream. It returns the previous background color. If COLOR is NIL, it returns the current background color without changing anything. The default background color is (MAXIMUMCOLOR BITSPERPIXEL)=15 or 255, which is black in the default color maps. The BITBLT, line-drawing routines, and curve-drawing routines routines know how to operate on a color-capable stream. Following are some notes about them. 2 BITBLTing in Color 1 If BITBLTing from a color bitmap onto another color bitmap of the same bpp, the operations PAINT, INVERT, and ERASE are done on a bit level, not on a pixel level. Thus painting color 3 onto color 10 results in color 11. If BITBLTing from a black-and-white bitmap onto a color bitmap, the one bits appear in the DSPCOLOR, and the zero bits in DSPBACKCOLOR. BLTing from black-and-white to color is fairly expensive; if the same bitmap is going to be put up several times in the same color, it is faster to create a color copy and then BLT the color copy. If the source type is TEXTURE and the destination bitmap is a color bitmap, the Texture argument is taken to be a color. Thus to fill an area with the color BLUE assuming COLORSTR is a stream whose destination is the color screen, use (BITBLT NIL NIL NIL COLORSTR 50 75 100 200 'TEXTURE 'REPLACE 'BLUE). 2 Drawing Curves and Lines in Color 1 For the functions DRAWCIRCLE, DRAWELLIPSE, and DRAWCURVE, the notion of a brush has been extended to include a color. A BRUSH is now (BRUSHSHAPE BRUSHSIZE BRUSHCOLOR). Also, a brush can be a bitmap (which can be a color bitmap). Line-drawing routines take a color argument which is the color the line is to appear in if the destination of the display stream is a color bitmap. (DRAWLINE X1 Y1 X2 Y2 WIDTH OPERATION STREAM COLOR) [Function] (DRAWTO X Y WIDTH OPERATION STREAM COLOR) [Function] (RELDRAWTO X Y WIDTH OPERATION STREAM COLOR) [Function] (DRAWBETWEEN POS1 POS2 WIDTH OPERATION STREAM COLOR) [Function] If the COLOR argument is NIL, the DSPCOLOR of the stream is used. 2 Printing in Color 1 Printing only works in REPLACE mode. The characters have a background color and a foreground color determined by the font face of the font the characters are being printed with. Example of printing to an 8bpp color screen: (SETQ FOO (CREATEW (CREATE SCREENREGION SCREEN _ (COLORSCREEN) LEFT _ 20 BOTTOM _ 210 WIDTH _ 290 HEIGHT _ 170) "FOO WINDOW")) (DSPFONT (FONTCREATE 'GACHA 10 'MRR-YELLOW-GREEN 0 '8DISPLAY) FOO) (PRINT 'HELLO FOO) ; will print in green against a yellow background. 2 Operating the Cursor on the Color Screen 1 The cursor can be moved to the color screen. The cursor can be moved to the color screen by sliding the cursor off the left or right edge of the black and white screen on to the color screen or by calling function CURSORPOSITION or CURSORSCREEN. (CURSORPOSITION NEWPOSITION - -) [Function] 1 NEWPOSITION can be a position or a screenposition. (CURSORSCREEN SCREEN XCOORD YCOORD) [Function] 1 Moves the cursor to the screenposition determined by SCREEN, XCOORD, and YCOORD. SCREEN should be the value of either (COLORSCREEN) or (MAINSCREEN). While on the color screen, the cursor is placed by doing BITBLTs in software rather than with microcode and hardware as with the black and white cursor. It is automatically taken down whenever an operation is performed that changes any bits on the color screen. The speed of the color cursor compares well with that of the black and white cursor but there can be a noticeable flicker when there is much input/output to the color screen. While the cursor is on the color screen, the black-and-white cursor is cleared giving the appearance that there is never more than one cursor at a given time. 2 Miscellaneous Color Functions 1 (COLORIZEBITMAP BITMAP 0COLOR 1COLOR BITSPERPIXEL) [Function] creates a color bitmap from a black and white bitmap. The returned bitmap has color number 1COLOR in those pixels of BITMAP that were one and 0COLOR in those pixels of BITMAP that were zero. This provides a way of producing a color bitmap from a black and white bitmap. (UNCOLORIZEBITMAP BITMAP COLORMAP) [Function] creates a black and white bitmap from a color bitmap. (SHOWCOLORTESTPATTERN BARSIZE) [Function] displays a pattern of colors on the color display. This is useful when editing a color map. The pattern has squares of the 16 possible colors laid out in two rows at the top of the screen. Colors 0 through 7 are in the top row, and colors 8 through 15 are in the next row. The bottom part of the screen is filled with bars of BARSIZE width with consecutive color numbers. The pattern is designed so that every color has a border with every other color (unless BARSIZE is too large to allow room for every color%about 20). (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 2) (0 0 612 792) ((FOLIO NIL ( PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (54 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) ( 54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 618) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (558 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) ( PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (54 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) ( HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL)))))7 8 T(1()KKT/KT(5 nT/T/T/T/T/ T/2T/T/T/T.. /T/2T.. < PAGEHEADING VERSOHEAD< PAGEHEADING RECTOHEAD; PAGEHEADINGFOOTINGV; PAGEHEADINGFOOTINGR ?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) +MODERNMODERN MODERNMODERNMODERN +MODERN +MODERN +MODERN + HRULE.GETFNMODERN +   HRULE.GETFNMODERN +    HRULE.GETFNMODERN +   HRULE.GETFNMODERN +    HRULE.GETFNMODERN HRULE.GETFNMODERN  HRULE.GETFNMODERN    f   f +  HRULE.GETFNMODERN. HRULE.GETFNMODERN   @   +   W  (   "  =  HRULE.GETFNMODERN  HRULE.GETFNMODERN   `   HRULE.GETFNMODERN     + ]  + >   &           HRULE.GETFNMODERN     +      ?   =          "      "  HRULE.GETFNMODERN  HRULE.GETFNMODERNy    D + q  B  -  i  (  _    L    *  X =     *     ?  N      HRULE.GETFNMODERN _    +8 -   + Z    +& 8 ,   S       =     m + +) + +  +   + /     ;    HRULE.GETFNMODERN HRULE.GETFNMODERN      v 4       ) E      HRULE.GETFNMODERN HRULE.GETFN, HRULE.GETFNMODERN  HRULE.GETFNMODERN       2  "  1  HRULE.GETFNMODERN +  + +    HRULE.GETFNMODERN  +  ' )  ) HRULE.GETFNMODERN    HRULE.GETFNMODERN +  ? "  4  HRULE.GETFNMODERN + -  HRULE.GETFNMODERN +    ? "  a  HRULE.GETFNMODERN + C  HRULE.GETFNMODERN +  ( BMOBJ.GETFN3 H  , BMOBJ.GETFN3 1 @      HRULE.GETFNMODERN + '  HRULE.GETFNMODERN +   HRULE.GETFNMODERN +  HRULE.GETFNMODERN HRULE.GETFNMODERN ). Menus are a special type of window provided by the window system, used for displaying a set of items to the user, and having the user select one using the mouse and cursor. The menu facility also allows users to create and use menus in interactive programs (see ("Menus" . TERM)). As of the LUTE release of Xerox Lisp, it is possible for the user to create and use windows and menus on the color display. (CREATEW REGION TITLE BORDERSIZE NOOPENFLG) [Function] 1 Creates a new window. REGION indicates where and how large the window should be by specifying the exterior screenregion of the window. In a user environment with multiple screens, such as a black and white screen and color screen both connected to the same machine, there is a new special problem in indicating which screen the REGION is supposed to be a region of. This problem is solved by allowing CREATEW to take screenregion arguments as REGION. For example, (SETQ FOO (CREATEW (CREATE SCREENREGION SCREEN _ (COLORSCREEN) LEFT _ 20 BOTTOM _ 210 WIDTH _ 290 HEIGHT _ 170) "FOO WINDOW")) creates a window titled "FOO WINDOW" on the color screen. To create a window on the black and white screen, the user should use SCREEN _ (MAINSCREEN) in the CREATE SCREENREGION expression. Note that it is still perfectly legal to pass in a REGION that is a region, not a screenregion, to CREATEW, but it is preferable to be passing screenregions rather than regions to CREATEW. This is because when REGION is a region, REGION is disambiguated in a somewhat arbitrary manner that may not always turn out to be what the user was hoping for. When REGION is a region, REGION is disambiguated by coercing REGION to be a screenregion on the screen which currently contains the cursor. This is so that software calling CREATEW with regions instead of screenregions tends to do the right thing in a user environment with multiple screens. 1 (WINDOWPROP WINDOW PROP NEWVALUE) [NoSpread Function] 1 If PROP='SCREEN, then WINDOWPROP returns the screen WINDOW is on. If NEWVALUE is given, (even if given as NIL), with PROP='SCREEN, then WINDOWPROP will generate an error. Any other PROP name is handled in the usual way. 1 (OPENWINDOWS SCREEN) [Function] 1 Returns a list of all open windows on SCREEN if SCREEN is a screen datatype such as (MAINSCREEN) or (COLORSCREEN). If SCREEN=NIL, then SCREEN will default to the screen containing the cursor. If SCREEN=T, then a list of all open windows on all screens is returned. 1 2 Color Fonts 1 The user can create color fonts and specify in the font profile that certain color fonts be used when printing in color. Color Font Creation 1 The user can create and manipulate color fonts through the same functions that are used to create and manipulate black and white fonts. This is made possible in some cases by there being new ways to call familiar font functions. (FONTCREATE FAMILY SIZE FACE ROTATION DEVICE NOERRORFLG CHARSET) [Function] 1 In addition to creating black and white fonts, FONTCREATE can be used to create color fonts. For example, (FONTCREATE 'GACHA 10 '(BOLD REGULAR REGULAR YELLOW BLUE) 0 '8DISPLAY) will create an 8 bit per pixel font with blue letters on a yellow background. The user indicates the color and bits per pixel of the font by the FACE and DEVICE arguments passed to FONTCREATE. DEVICE='8DISPLAY means to create an 8bpp font and DEVICE='4DISPLAY means to create a 4bpp font. A color font face is a 5 tuple, (WEIGHT SLOPE EXPANSION BACKCOLOR FORECOLOR) whereas a black and white font face is just a 3 tuple, (WEIGHT SLOPE EXPANSION) The FORECOLOR is the color of the characters of the font and the BACKCOLOR is the color of the background behind the characters that gets printed along with the characters. Both BACKCOLOR and FORECOLOR are allowed to a color name, color number, or any other legal color representation. A color font face can also be represented as a LITATOM. A three character atom such as MRR or any of the special atoms STANDARD, ITALIC, BOLD, BOLDITALIC can optionally be continued by hyphenating on BACKCOLOR and FORECOLOR suffixes. For example, MRR-YELLOW-BLUE BOLD-YELLOW-RED ITALIC-90-200 BRR-100-53 are acceptable color font faces. Hence, (FONTCREATE 'GACHA 10 'BOLD-YELLOW-BLUE 0 '8DISPLAY) will create a color font. LITATOM FACE arguments fall into one of the following patterns: wse wse-backcolor-forecolor STANDARD STANDARD-backcolor-forecolor ITALIC ITALIC-backcolor-forecolor BOLD BOLD-backcolor-forecolor BOLDITALIC BOLDITALIC-backcolor-forecolor where w=B, M, or L; s=I or R; e=R, C, or E; backcolor=a color name or color number; and forecolor=a color name or color number. 1 (FONTPROP FONT PROP) [Function] 1 Returns the value of the PROP property of font FONT. Besides black and white font properties, the following font properties are recognized: FORECOLOR The color of the characters of the font, represented as a color number. This is the color in which the characters of the font will print. BACKCOLOR The color of the background of the characters of the font, represented as a color number. This is the color in which the the background of characters of the font will print. A font with red characters on a yellow background would have a red FORECOLOR and a yellow BACKCOLOR. Color Font Profiles 1 Font profiles are the facility PRETTYPRINT uses to print different elements (user functions, system functions, clisp words, comments, etc.) in different fonts to emphasize (or deemphasize) their importance, and in general to provide for a more pleasing appearance. The user can specify that different colors of fonts be used for different kinds of elements when printing in color. A well chosen font profile will allows user to DEDIT functions, PP functions, and SEE source files in color, for example. A FONTPROFILE such as ((DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8) (4DISPLAY (GACHA 10 MRR-WHITE-RED)) (8DISPLAY (GACHA 10 MRR-WHITE-RED))) (BOLDFONT 2 (HELVETICA 10 BRR) (HELVETICA 8 BRR) (MODERN 8 BRR) (4DISPLAY (HELVETICA 10 BRR-WHITE-MAGENTA)) (8DISPLAY (HELVETICA 10 BRR-WHITE-MAGENTA))) (LITTLEFONT 3 (HELVETICA 8) (HELVETICA 6 MIR) (MODERN 8 MIR) (4DISPLAY (HELVETICA 8 MRR-WHITE-GREEN)) (8DISPLAY (HELVETICA 8 MRR-WHITE-GREEN))) (BIGFONT 4 (HELVETICA 12 BRR) (HELVETICA 10 BRR) (MODERN 10 BRR) (4DISPLAY (HELVETICA 12 BRR-WHITE-BLUE)) (8DISPLAY (HELVETICA 12 BRR-WHITE-BLUE))) (USERFONT BOLDFONT) (COMMENTFONT LITTLEFONT) (LAMBDAFONT BIGFONT) (SYSTEMFONT) (CLISPFONT BOLDFONT) ...) would have comments print in green and clisp words print in blue while ordinairy atoms would print in red. Not all combinations of fonts will be aesthetically pleasing and the user may have to experiment to find a compatible set. The user should indicate what font is to be used for each font class by calling the function FONTPROFILE: (FONTPROFILE PROFILE) [Function] 1 Sets up the font classes as determined by PROFILE, a list of elements which defines the correspondence between font classes and specific fonts. Each element of PROFILE is a list of the form: (FONTCLASS FONT# DISPLAYFONT PRESSFONT INTERPRESSFONT (OTHERDEVICE1 OTHERFONT1) ... (OTHERDEVICEn OTHERFONTn)) FONTCLASS is the font class name and FONT# is the font number for that class. DISPLAYFONT, PRESSFONT, and INTERPRESSFONT are font specifications (of the form accepted by FONTCREATE) for the fonts to use when printing to the black and white display and to Press and Interpress printers respectively. The appearance of color fonts can be affected by including an (OTHERDEVICEi OTHERFONTi) entry where OTHERDEVICEi is either 4DISPLAY or 8DISPLAY for a 4 bits per pixel or 8 bits per pixel color font and OTHERFONTi is a color font specification such as (GACHA 10 MRR-WHITE-RED). 1 FONTPROFILE [Variable] 1 This is the variable used to store the current font profile, in the form accepted by the function FONTPROFILE. Note that simply editing this value will not change the fonts used for the various font classes; it is necessary to execute (FONTPROFILE FONTPROFILE) to install the value of this variable. 1 2 Using Color 1 The current color implementation allows display streams to operate on color bitmaps. The two functions DSPCOLOR and DSPBACKCOLOR set the color in which a stream draws when the user defaults a color argument to a drawing function. (DSPCOLOR COLOR STREAM) [Function] sets the foreground color of a stream. It returns the previous foreground color. If COLOR is NIL, it returns the current foreground color without changing anything. The default foreground color is MINIMUMCOLOR=0, which is white in the default color maps. (DSPBACKCOLOR COLOR STREAM) [Function] sets the background color of a stream. It returns the previous background color. If COLOR is NIL, it returns the current background color without changing anything. The default background color is (MAXIMUMCOLOR BITSPERPIXEL)=15 or 255, which is black in the default color maps. The BITBLT, line-drawing routines, and curve-drawing routines routines know how to operate on a color-capable stream. Following are some notes about them. 2 BITBLTing in Color 1 If BITBLTing from a color bitmap onto another color bitmap of the same bpp, the operations PAINT, INVERT, and ERASE are done on a bit level, not on a pixel level. Thus painting color 3 onto color 10 results in color 11. If BITBLTing from a black-and-white bitmap onto a color bitmap, the one bits appear in the DSPCOLOR, and the zero bits in DSPBACKCOLOR. BLTing from black-and-white to color is fairly expensive; if the same bitmap is going to be put up several times in the same color, it is faster to create a color copy and then BLT the color copy. If the source type is TEXTURE and the destination bitmap is a color bitmap, the Texture argument is taken to be a color. Thus to fill an area with the color BLUE assuming COLORSTR is a stream whose destination is the color screen, use (BITBLT NIL NIL NIL COLORSTR 50 75 100 200 'TEXTURE 'REPLACE 'BLUE). 2 Drawing Curves and Lines in Color 1 For the functions DRAWCIRCLE, DRAWELLIPSE, and DRAWCURVE, the notion of a brush has been extended to include a color. A BRUSH is now (BRUSHSHAPE BRUSHSIZE BRUSHCOLOR). Also, a brush can be a bitmap (which can be a color bitmap). Line-drawing routines take a color argument which is the color the line is to appear in if the destination of the display stream is a color bitmap. (DRAWLINE X1 Y1 X2 Y2 WIDTH OPERATION STREAM COLOR) [Function] (DRAWTO X Y WIDTH OPERATION STREAM COLOR) [Function] (RELDRAWTO X Y WIDTH OPERATION STREAM COLOR) [Function] (DRAWBETWEEN POS1 POS2 WIDTH OPERATION STREAM COLOR) [Function] If the COLOR argument is NIL, the DSPCOLOR of the stream is used. 2 Printing in Color 1 Printing only works in REPLACE mode. The characters have a background color and a foreground color determined by the font face of the font the characters are being printed with. Example of printing to an 8bpp color screen: (SETQ FOO (CREATEW (CREATE SCREENREGION SCREEN _ (COLORSCREEN) LEFT _ 20 BOTTOM _ 210 WIDTH _ 290 HEIGHT _ 170) "FOO WINDOW")) (DSPFONT (FONTCREATE 'GACHA 10 'MRR-YELLOW-GREEN 0 '8DISPLAY) FOO) (PRINT 'HELLO FOO) ; will print in green against a yellow background. 2 Operating the Cursor on the Color Screen 1 The cursor can be moved to the color screen. The cursor can be moved to the color screen by sliding the cursor off the left or right edge of the black and white screen on to the color screen or by calling function CURSORPOSITION or CURSORSCREEN. (CURSORPOSITION NEWPOSITION - -) [Function] 1 NEWPOSITION can be a position or a screenposition. (CURSORSCREEN SCREEN XCOORD YCOORD) [Function] 1 Moves the cursor to the screenposition determined by SCREEN, XCOORD, and YCOORD. SCREEN should be the value of either (COLORSCREEN) or (MAINSCREEN). While on the color screen, the cursor is placed by doing BITBLTs in software rather than with microcode and hardware as with the black and white cursor. It is automatically taken down whenever an operation is performed that changes any bits on the color screen. The speed of the color cursor compares well with that of the black and white cursor but there can be a noticeable flicker when there is much input/output to the color screen. While the cursor is on the color screen, the black-and-white cursor is cleared giving the appearance that there is never more than one cursor at a given time. 2 Miscellaneous Color Functions 1 (COLORIZEBITMAP BITMAP 0COLOR 1COLOR BITSPERPIXEL) [Function] creates a color bitmap from a black and white bitmap. The returned bitmap has color number 1COLOR in those pixels of BITMAP that were one and 0COLOR in those pixels of BITMAP that were zero. This provides a way of producing a color bitmap from a black and white bitmap. (UNCOLORIZEBITMAP BITMAP COLORMAP) [Function] creates a black and white bitmap from a color bitmap. (SHOWCOLORTESTPATTERN BARSIZE) [Function] displays a pattern of colors on the color display. This is useful when editing a color map. The pattern has squares of the 16 possible colors laid out in two rows at the top of the screen. Colors 0 through 7 are in the top row, and colors 8 through 15 are in the next row. The bottom part of the screen is filled with bars of BARSIZE width with consecutive color numbers. The pattern is designed so that every color has a border with every other color (unless BARSIZE is too large to allow room for every color%about 20). (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 2) (0 0 612 792) ((FOLIO NIL ( PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (54 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) ( 54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 618) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (558 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) ( PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (54 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) ( HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL)))))7 8 T(1()KKT/KT(5 nT/T/T/T/T/ T/2T/T/T/T.. /T/2T.. < PAGEHEADING VERSOHEAD< PAGEHEADING RECTOHEAD; PAGEHEADINGFOOTINGV; PAGEHEADINGFOOTINGR ?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) +MODERNMODERN MODERNMODERNMODERN +MODERN +MODERN +MODERN + HRULE.GETFNMODERN +   HRULE.GETFNMODERN +    HRULE.GETFNMODERN +   HRULE.GETFNMODERN +    HRULE.GETFNMODERN HRULE.GETFNMODERN  HRULE.GETFNMODERN    f   f +  HRULE.GETFNMODERN. HRULE.GETFNMODERN   @   +   W  (   "  =  HRULE.GETFNMODERN  HRULE.GETFNMODERN   `   HRULE.GETFNMODERN     + ]  + >   &           HRULE.GETFNMODERN     +      ?   =          "      "  HRULE.GETFNMODERN  HRULE.GETFNMODERNy    D + q  B  -  i  (  _    L    *  X =     *     ?  N      HRULE.GETFNMODERN _    +8 -   + Z    +& 8 ,   S       =     m + +) + +  +   + /     ;    HRULE.GETFNMODERN HRULE.GETFNMODERN      v 4       ) E      HRULE.GETFNMODERN HRULE.GETFN, HRULE.GETFNMODERN  HRULE.GETFNMODERN       2  "  1  HRULE.GETFNMODERN +  + +    HRULE.GETFNMODERN  +  ' )  ) HRULE.GETFNMODERN    HRULE.GETFNMODERN +  ? "  4  HRULE.GETFNMODERN + -  HRULE.GETFNMODERN +    ? "  a  HRULE.GETFNMODERN + C  HRULE.GETFNMODERN +  ( BMOBJ.GETFN3 H  , BMOBJ.GETFN3 1 @      HRULE.GETFNMODERN + '  HRULE.GETFNMODERN +   HRULE.GETFNMODERN +  HRULE.GETFNMODERN HRULE.GETFNMODERN  IRM.GET.CREF ). As of the LUTE release of Xerox Lisp, it is possible for the user to create and use windows and menus on the color display. (CREATEW REGION TITLE BORDERSIZE NOOPENFLG) [Function] 1 Creates a new window. REGION indicates where and how large the window should be by specifying the exterior screenregion of the window. In a user environment with multiple screens, such as a black and white screen and color screen both connected to the same machine, there is a new special problem in indicating which screen the REGION is supposed to be a region of. This problem is solved by allowing CREATEW to take screenregion arguments as REGION. For example, (SETQ FOO (CREATEW (CREATE SCREENREGION SCREEN _ (COLORSCREEN) LEFT _ 20 BOTTOM _ 210 WIDTH _ 290 HEIGHT _ 170) "FOO WINDOW")) creates a window titled "FOO WINDOW" on the color screen. To create a window on the black and white screen, the user should use SCREEN _ (MAINSCREEN) in the CREATE SCREENREGION expression. Note that it is still perfectly legal to pass in a REGION that is a region, not a screenregion, to CREATEW, but it is preferable to be passing screenregions rather than regions to CREATEW. This is because when REGION is a region, REGION is disambiguated in a somewhat arbitrary manner that may not always turn out to be what the user was hoping for. When REGION is a region, REGION is disambiguated by coercing REGION to be a screenregion on the screen which currently contains the cursor. This is so that software calling CREATEW with regions instead of screenregions tends to do the right thing in a user environment with multiple screens. 1 (WINDOWPROP WINDOW PROP NEWVALUE) [NoSpread Function] 1 If PROP='SCREEN, then WINDOWPROP returns the screen WINDOW is on. If NEWVALUE is given, (even if given as NIL), with PROP='SCREEN, then WINDOWPROP will generate an error. Any other PROP name is handled in the usual way. 1 (OPENWINDOWS SCREEN) [Function] 1 Returns a list of all open windows on SCREEN if SCREEN is a screen datatype such as (MAINSCREEN) or (COLORSCREEN). If SCREEN=NIL, then SCREEN will default to the screen containing the cursor. If SCREEN=T, then a list of all open windows on all screens is returned. 1 2 Color Fonts 1 The user can create color fonts and specify in the font profile that certain color fonts be used when printing in color. Color Font Creation 1 The user can create and manipulate color fonts through the same functions that are used to create and manipulate black and white fonts. This is made possible in some cases by there being new ways to call familiar font functions. (FONTCREATE FAMILY SIZE FACE ROTATION DEVICE NOERRORFLG CHARSET) [Function] 1 In addition to creating black and white fonts, FONTCREATE can be used to create color fonts. For example, (FONTCREATE 'GACHA 10 '(BOLD REGULAR REGULAR YELLOW BLUE) 0 '8DISPLAY) will create an 8 bit per pixel font with blue letters on a yellow background. The user indicates the color and bits per pixel of the font by the FACE and DEVICE arguments passed to FONTCREATE. DEVICE='8DISPLAY means to create an 8bpp font and DEVICE='4DISPLAY means to create a 4bpp font. A color font face is a 5 tuple, (WEIGHT SLOPE EXPANSION BACKCOLOR FORECOLOR) whereas a black and white font face is just a 3 tuple, (WEIGHT SLOPE EXPANSION) The FORECOLOR is the color of the characters of the font and the BACKCOLOR is the color of the background behind the characters that gets printed along with the characters. Both BACKCOLOR and FORECOLOR are allowed to a color name, color number, or any other legal color representation. A color font face can also be represented as a LITATOM. A three character atom such as MRR or any of the special atoms STANDARD, ITALIC, BOLD, BOLDITALIC can optionally be continued by hyphenating on BACKCOLOR and FORECOLOR suffixes. For example, MRR-YELLOW-BLUE BOLD-YELLOW-RED ITALIC-90-200 BRR-100-53 are acceptable color font faces. Hence, (FONTCREATE 'GACHA 10 'BOLD-YELLOW-BLUE 0 '8DISPLAY) will create a color font. LITATOM FACE arguments fall into one of the following patterns: wse wse-backcolor-forecolor STANDARD STANDARD-backcolor-forecolor ITALIC ITALIC-backcolor-forecolor BOLD BOLD-backcolor-forecolor BOLDITALIC BOLDITALIC-backcolor-forecolor where w=B, M, or L; s=I or R; e=R, C, or E; backcolor=a color name or color number; and forecolor=a color name or color number. 1 (FONTPROP FONT PROP) [Function] 1 Returns the value of the PROP property of font FONT. Besides black and white font properties, the following font properties are recognized: FORECOLOR The color of the characters of the font, represented as a color number. This is the color in which the characters of the font will print. BACKCOLOR The color of the background of the characters of the font, represented as a color number. This is the color in which the the background of characters of the font will print. A font with red characters on a yellow background would have a red FORECOLOR and a yellow BACKCOLOR. Color Font Profiles 1 Font profiles are the facility PRETTYPRINT uses to print different elements (user functions, system functions, clisp words, comments, etc.) in different fonts to emphasize (or deemphasize) their importance, and in general to provide for a more pleasing appearance. The user can specify that different colors of fonts be used for different kinds of elements when printing in color. A well chosen font profile will allows user to DEDIT functions, PP functions, and SEE source files in color, for example. A FONTPROFILE such as ((DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8) (4DISPLAY (GACHA 10 MRR-WHITE-RED)) (8DISPLAY (GACHA 10 MRR-WHITE-RED))) (BOLDFONT 2 (HELVETICA 10 BRR) (HELVETICA 8 BRR) (MODERN 8 BRR) (4DISPLAY (HELVETICA 10 BRR-WHITE-MAGENTA)) (8DISPLAY (HELVETICA 10 BRR-WHITE-MAGENTA))) (LITTLEFONT 3 (HELVETICA 8) (HELVETICA 6 MIR) (MODERN 8 MIR) (4DISPLAY (HELVETICA 8 MRR-WHITE-GREEN)) (8DISPLAY (HELVETICA 8 MRR-WHITE-GREEN))) (BIGFONT 4 (HELVETICA 12 BRR) (HELVETICA 10 BRR) (MODERN 10 BRR) (4DISPLAY (HELVETICA 12 BRR-WHITE-BLUE)) (8DISPLAY (HELVETICA 12 BRR-WHITE-BLUE))) (USERFONT BOLDFONT) (COMMENTFONT LITTLEFONT) (LAMBDAFONT BIGFONT) (SYSTEMFONT) (CLISPFONT BOLDFONT) ...) would have comments print in green and clisp words print in blue while ordinairy atoms would print in red. Not all combinations of fonts will be aesthetically pleasing and the user may have to experiment to find a compatible set. The user should indicate what font is to be used for each font class by calling the function FONTPROFILE: (FONTPROFILE PROFILE) [Function] 1 Sets up the font classes as determined by PROFILE, a list of elements which defines the correspondence between font classes and specific fonts. Each element of PROFILE is a list of the form: (FONTCLASS FONT# DISPLAYFONT PRESSFONT INTERPRESSFONT (OTHERDEVICE1 OTHERFONT1) ... (OTHERDEVICEn OTHERFONTn)) FONTCLASS is the font class name and FONT# is the font number for that class. DISPLAYFONT, PRESSFONT, and INTERPRESSFONT are font specifications (of the form accepted by FONTCREATE) for the fonts to use when printing to the black and white display and to Press and Interpress printers respectively. The appearance of color fonts can be affected by including an (OTHERDEVICEi OTHERFONTi) entry where OTHERDEVICEi is either 4DISPLAY or 8DISPLAY for a 4 bits per pixel or 8 bits per pixel color font and OTHERFONTi is a color font specification such as (GACHA 10 MRR-WHITE-RED). 1 FONTPROFILE [Variable] 1 This is the variable used to store the current font profile, in the form accepted by the function FONTPROFILE. Note that simply editing this value will not change the fonts used for the various font classes; it is necessary to execute (FONTPROFILE FONTPROFILE) to install the value of this variable. 1 2 Using Color 1 The current color implementation allows display streams to operate on color bitmaps. The two functions DSPCOLOR and DSPBACKCOLOR set the color in which a stream draws when the user defaults a color argument to a drawing function. (DSPCOLOR COLOR STREAM) [Function] sets the foreground color of a stream. It returns the previous foreground color. If COLOR is NIL, it returns the current foreground color without changing anything. The default foreground color is MINIMUMCOLOR=0, which is white in the default color maps. (DSPBACKCOLOR COLOR STREAM) [Function] sets the background color of a stream. It returns the previous background color. If COLOR is NIL, it returns the current background color without changing anything. The default background color is (MAXIMUMCOLOR BITSPERPIXEL)=15 or 255, which is black in the default color maps. The BITBLT, line-drawing routines, and curve-drawing routines routines know how to operate on a color-capable stream. Following are some notes about them. 2 BITBLTing in Color 1 If BITBLTing from a color bitmap onto another color bitmap of the same bpp, the operations PAINT, INVERT, and ERASE are done on a bit level, not on a pixel level. Thus painting color 3 onto color 10 results in color 11. If BITBLTing from a black-and-white bitmap onto a color bitmap, the one bits appear in the DSPCOLOR, and the zero bits in DSPBACKCOLOR. BLTing from black-and-white to color is fairly expensive; if the same bitmap is going to be put up several times in the same color, it is faster to create a color copy and then BLT the color copy. If the source type is TEXTURE and the destination bitmap is a color bitmap, the Texture argument is taken to be a color. Thus to fill an area with the color BLUE assuming COLORSTR is a stream whose destination is the color screen, use (BITBLT NIL NIL NIL COLORSTR 50 75 100 200 'TEXTURE 'REPLACE 'BLUE). 2 Drawing Curves and Lines in Color 1 For the functions DRAWCIRCLE, DRAWELLIPSE, and DRAWCURVE, the notion of a brush has been extended to include a color. A BRUSH is now (BRUSHSHAPE BRUSHSIZE BRUSHCOLOR). Also, a brush can be a bitmap (which can be a color bitmap). Line-drawing routines take a color argument which is the color the line is to appear in if the destination of the display stream is a color bitmap. (DRAWLINE X1 Y1 X2 Y2 WIDTH OPERATION STREAM COLOR) [Function] (DRAWTO X Y WIDTH OPERATION STREAM COLOR) [Function] (RELDRAWTO X Y WIDTH OPERATION STREAM COLOR) [Function] (DRAWBETWEEN POS1 POS2 WIDTH OPERATION STREAM COLOR) [Function] If the COLOR argument is NIL, the DSPCOLOR of the stream is used. 2 Printing in Color 1 Printing only works in REPLACE mode. The characters have a background color and a foreground color determined by the font face of the font the characters are being printed with. Example of printing to an 8bpp color screen: (SETQ FOO (CREATEW (CREATE SCREENREGION SCREEN _ (COLORSCREEN) LEFT _ 20 BOTTOM _ 210 WIDTH _ 290 HEIGHT _ 170) "FOO WINDOW")) (DSPFONT (FONTCREATE 'GACHA 10 'MRR-YELLOW-GREEN 0 '8DISPLAY) FOO) (PRINT 'HELLO FOO) ; will print in green against a yellow background. 2 Operating the Cursor on the Color Screen 1 The cursor can be moved to the color screen. The cursor can be moved to the color screen by sliding the cursor off the left or right edge of the black and white screen on to the color screen or by calling function CURSORPOSITION or CURSORSCREEN. (CURSORPOSITION NEWPOSITION - -) [Function] 1 NEWPOSITION can be a position or a screenposition. (CURSORSCREEN SCREEN XCOORD YCOORD) [Function] 1 Moves the cursor to the screenposition determined by SCREEN, XCOORD, and YCOORD. SCREEN should be the value of either (COLORSCREEN) or (MAINSCREEN). While on the color screen, the cursor is placed by doing BITBLTs in software rather than with microcode and hardware as with the black and white cursor. It is automatically taken down whenever an operation is performed that changes any bits on the color screen. The speed of the color cursor compares well with that of the black and white cursor but there can be a noticeable flicker when there is much input/output to the color screen. While the cursor is on the color screen, the black-and-white cursor is cleared giving the appearance that there is never more than one cursor at a given time. 2 Miscellaneous Color Functions 1 (COLORIZEBITMAP BITMAP 0COLOR 1COLOR BITSPERPIXEL) [Function] creates a color bitmap from a black and white bitmap. The returned bitmap has color number 1COLOR in those pixels of BITMAP that were one and 0COLOR in those pixels of BITMAP that were zero. This provides a way of producing a color bitmap from a black and white bitmap. (UNCOLORIZEBITMAP BITMAP COLORMAP) [Function] creates a black and white bitmap from a color bitmap. (SHOWCOLORTESTPATTERN BARSIZE) [Function] displays a pattern of colors on the color display. This is useful when editing a color map. The pattern has squares of the 16 possible colors laid out in two rows at the top of the screen. Colors 0 through 7 are in the top row, and colors 8 through 15 are in the next row. The bottom part of the screen is filled with bars of BARSIZE width with consecutive color numbers. The pattern is designed so that every color has a border with every other color (unless BARSIZE is too large to allow room for every color%about 20). (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 2) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (54 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 618) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (558 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (54 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))))); < T,5,-KKT3KT,9 nT3T3T3T3T3 T32T3T3T3T22 3T32T22 @ PAGEHEADING VERSOHEAD@ PAGEHEADING RECTOHEAD? PAGEHEADINGFOOTINGV? PAGEHEADINGFOOTINGR ?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) +MODERNMODERN MODERNMODERNMODERN +MODERN +MODERN +MODERN + HRULE.GETFNMODERN +   HRULE.GETFNMODERN +    HRULE.GETFNMODERN +   HRULE.GETFNMODERN +    HRULE.GETFNMODERN HRULE.GETFNMODERN  HRULE.GETFNMODERN    K f    HRULE.GETFNMODERN' HRULE.GETFNMODERN + @    HRULE.GETFNMODERN. HRULE.GETFNMODERN   @   +   W  (   "  =  HRULE.GETFNMODERN  HRULE.GETFNMODERN +    `   HRULE.GETFNMODERN     + ]  + >   &           HRULE.GETFNMODERN     +      ?   =          "      "  HRULE.GETFNMODERN  HRULE.GETFNMODERNy    D + q  B  -  i  (  _    L    *  X =     *     ?  N      HRULE.GETFNMODERN _    +8 -   + Z    +& 8 ,   S       =     m + +) + +  +   + /     ;    HRULE.GETFNMODERN HRULE.GETFNMODERN      v 4       ) E      HRULE.GETFNMODERN HRULE.GETFN, HRULE.GETFNMODERN  HRULE.GETFNMODERN       2  "  1  HRULE.GETFNMODERN +  + +    HRULE.GETFNMODERN  +  ' )  ) HRULE.GETFNMODERN    HRULE.GETFNMODERN +  ? "  4  HRULE.GETFNMODERN + -  HRULE.GETFNMODERN +    ? "  a  HRULE.GETFNMODERN + C  HRULE.GETFNMODERN +  ( BMOBJ.GETFN3 H  , BMOBJ.GETFN3 1 @      HRULE.GETFNMODERN + '  HRULE.GETFNMODERN +   HRULE.GETFNMODERN +  HRULE.GETFNMODERN HRULE.GETFNMODERN a). Menus are a special type of window provided by the window system, used for displaying a set of items to the user, and having the user select one using the mouse and cursor. The menu facility also allows users to create and use menus in interactive programs (see ("Menus" . TERM)). As of the LUTE release of Xerox Lisp, it is possible for the user to create and use windows and menus on the color display. (CREATEW REGION TITLE BORDERSIZE NOOPENFLG) [Function] 1 Creates a new window. REGION indicates where and how large the window should be by specifying the exterior screenregion of the window. In a user environment with multiple screens, such as a black and white screen and color screen both connected to the same machine, there is a new special problem in indicating which screen the REGION is supposed to be a region of. This problem is solved by allowing CREATEW to take screenregion arguments as REGION. For example, (SETQ FOO (CREATEW (CREATE SCREENREGION SCREEN _ (COLORSCREEN) LEFT _ 20 BOTTOM _ 210 WIDTH _ 290 HEIGHT _ 170) "FOO WINDOW")) creates a window titled "FOO WINDOW" on the color screen. To create a window on the black and white screen, the user should use SCREEN _ (MAINSCREEN) in the CREATE SCREENREGION expression. Note that it is still perfectly legal to pass in a REGION that is a region, not a screenregion, to CREATEW, but it is preferable to be passing screenregions rather than regions to CREATEW. This is because when REGION is a region, REGION is disambiguated in a somewhat arbitrary manner that may not always turn out to be what the user was hoping for. When REGION is a region, REGION is disambiguated by coercing REGION to be a screenregion on the screen which currently contains the cursor. This is so that software calling CREATEW with regions instead of screenregions tends to do the right thing in a user environment with multiple screens. 1 (WINDOWPROP WINDOW PROP NEWVALUE) [NoSpread Function] 1 If PROP='SCREEN, then WINDOWPROP returns the screen WINDOW is on. If NEWVALUE is given, (even if given as NIL), with PROP='SCREEN, then WINDOWPROP will generate an error. Any other PROP name is handled in the usual way. 1 (OPENWINDOWS SCREEN) [Function] 1 Returns a list of all open windows on SCREEN if SCREEN is a screen datatype such as (MAINSCREEN) or (COLORSCREEN). If SCREEN=NIL, then SCREEN will default to the screen containing the cursor. If SCREEN=T, then a list of all open windows on all screens is returned. 1 2 Color Fonts 1 The user can create color fonts and specify in the font profile that certain color fonts be used when printing in color. Color Font Creation 1 The user can create and manipulate color fonts through the same functions that are used to create and manipulate black and white fonts. This is made possible in some cases by there being new ways to call familiar font functions. (FONTCREATE FAMILY SIZE FACE ROTATION DEVICE NOERRORFLG CHARSET) [Function] 1 In addition to creating black and white fonts, FONTCREATE can be used to create color fonts. For example, (FONTCREATE 'GACHA 10 '(BOLD REGULAR REGULAR YELLOW BLUE) 0 '8DISPLAY) will create an 8 bit per pixel font with blue letters on a yellow background. The user indicates the color and bits per pixel of the font by the FACE and DEVICE arguments passed to FONTCREATE. DEVICE='8DISPLAY means to create an 8bpp font and DEVICE='4DISPLAY means to create a 4bpp font. A color font face is a 5 tuple, (WEIGHT SLOPE EXPANSION BACKCOLOR FORECOLOR) whereas a black and white font face is just a 3 tuple, (WEIGHT SLOPE EXPANSION) The FORECOLOR is the color of the characters of the font and the BACKCOLOR is the color of the background behind the characters that gets printed along with the characters. Both BACKCOLOR and FORECOLOR are allowed to a color name, color number, or any other legal color representation. A color font face can also be represented as a LITATOM. A three character atom such as MRR or any of the special atoms STANDARD, ITALIC, BOLD, BOLDITALIC can optionally be continued by hyphenating on BACKCOLOR and FORECOLOR suffixes. For example, MRR-YELLOW-BLUE BOLD-YELLOW-RED ITALIC-90-200 BRR-100-53 are acceptable color font faces. Hence, (FONTCREATE 'GACHA 10 'BOLD-YELLOW-BLUE 0 '8DISPLAY) will create a color font. LITATOM FACE arguments fall into one of the following patterns: wse wse-backcolor-forecolor STANDARD STANDARD-backcolor-forecolor ITALIC ITALIC-backcolor-forecolor BOLD BOLD-backcolor-forecolor BOLDITALIC BOLDITALIC-backcolor-forecolor where w=B, M, or L; s=I or R; e=R, C, or E; backcolor=a color name or color number; and forecolor=a color name or color number. 1 (FONTPROP FONT PROP) [Function] 1 Returns the value of the PROP property of font FONT. Besides black and white font properties, the following font properties are recognized: FORECOLOR The color of the characters of the font, represented as a color number. This is the color in which the characters of the font will print. BACKCOLOR The color of the background of the characters of the font, represented as a color number. This is the color in which the the background of characters of the font will print. A font with red characters on a yellow background would have a red FORECOLOR and a yellow BACKCOLOR. Color Font Profiles 1 Font profiles are the facility PRETTYPRINT uses to print different elements (user functions, system functions, clisp words, comments, etc.) in different fonts to emphasize (or deemphasize) their importance, and in general to provide for a more pleasing appearance. The user can specify that different colors of fonts be used for different kinds of elements when printing in color. A well chosen font profile will allows user to DEDIT functions, PP functions, and SEE source files in color, for example. A FONTPROFILE such as ((DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8) (4DISPLAY (GACHA 10 MRR-WHITE-RED)) (8DISPLAY (GACHA 10 MRR-WHITE-RED))) (BOLDFONT 2 (HELVETICA 10 BRR) (HELVETICA 8 BRR) (MODERN 8 BRR) (4DISPLAY (HELVETICA 10 BRR-WHITE-MAGENTA)) (8DISPLAY (HELVETICA 10 BRR-WHITE-MAGENTA))) (LITTLEFONT 3 (HELVETICA 8) (HELVETICA 6 MIR) (MODERN 8 MIR) (4DISPLAY (HELVETICA 8 MRR-WHITE-GREEN)) (8DISPLAY (HELVETICA 8 MRR-WHITE-GREEN))) (BIGFONT 4 (HELVETICA 12 BRR) (HELVETICA 10 BRR) (MODERN 10 BRR) (4DISPLAY (HELVETICA 12 BRR-WHITE-BLUE)) (8DISPLAY (HELVETICA 12 BRR-WHITE-BLUE))) (USERFONT BOLDFONT) (COMMENTFONT LITTLEFONT) (LAMBDAFONT BIGFONT) (SYSTEMFONT) (CLISPFONT BOLDFONT) ...) would have comments print in green and clisp words print in blue while ordinairy atoms would print in red. Not all combinations of fonts will be aesthetically pleasing and the user may have to experiment to find a compatible set. The user should indicate what font is to be used for each font class by calling the function FONTPROFILE: (FONTPROFILE PROFILE) [Function] 1 Sets up the font classes as determined by PROFILE, a list of elements which defines the correspondence between font classes and specific fonts. Each element of PROFILE is a list of the form: (FONTCLASS FONT# DISPLAYFONT PRESSFONT INTERPRESSFONT (OTHERDEVICE1 OTHERFONT1) ... (OTHERDEVICEn OTHERFONTn)) FONTCLASS is the font class name and FONT# is the font number for that class. DISPLAYFONT, PRESSFONT, and INTERPRESSFONT are font specifications (of the form accepted by FONTCREATE) for the fonts to use when printing to the black and white display and to Press and Interpress printers respectively. The appearance of color fonts can be affected by including an (OTHERDEVICEi OTHERFONTi) entry where OTHERDEVICEi is either 4DISPLAY or 8DISPLAY for a 4 bits per pixel or 8 bits per pixel color font and OTHERFONTi is a color font specification such as (GACHA 10 MRR-WHITE-RED). 1 FONTPROFILE [Variable] 1 This is the variable used to store the current font profile, in the form accepted by the function FONTPROFILE. Note that simply editing this value will not change the fonts used for the various font classes; it is necessary to execute (FONTPROFILE FONTPROFILE) to install the value of this variable. 1 2 Using Color 1 The current color implementation allows display streams to operate on color bitmaps. The two functions DSPCOLOR and DSPBACKCOLOR set the color in which a stream draws when the user defaults a color argument to a drawing function. (DSPCOLOR COLOR STREAM) [Function] sets the foreground color of a stream. It returns the previous foreground color. If COLOR is NIL, it returns the current foreground color without changing anything. The default foreground color is MINIMUMCOLOR=0, which is white in the default color maps. (DSPBACKCOLOR COLOR STREAM) [Function] sets the background color of a stream. It returns the previous background color. If COLOR is NIL, it returns the current background color without changing anything. The default background color is (MAXIMUMCOLOR BITSPERPIXEL)=15 or 255, which is black in the default color maps. The BITBLT, line-drawing routines, and curve-drawing routines routines know how to operate on a color-capable stream. Following are some notes about them. 2 BITBLTing in Color 1 If BITBLTing from a color bitmap onto another color bitmap of the same bpp, the operations PAINT, INVERT, and ERASE are done on a bit level, not on a pixel level. Thus painting color 3 onto color 10 results in color 11. If BITBLTing from a black-and-white bitmap onto a color bitmap, the one bits appear in the DSPCOLOR, and the zero bits in DSPBACKCOLOR. BLTing from black-and-white to color is fairly expensive; if the same bitmap is going to be put up several times in the same color, it is faster to create a color copy and then BLT the color copy. If the source type is TEXTURE and the destination bitmap is a color bitmap, the Texture argument is taken to be a color. Thus to fill an area with the color BLUE assuming COLORSTR is a stream whose destination is the color screen, use (BITBLT NIL NIL NIL COLORSTR 50 75 100 200 'TEXTURE 'REPLACE 'BLUE). 2 Drawing Curves and Lines in Color 1 For the functions DRAWCIRCLE, DRAWELLIPSE, and DRAWCURVE, the notion of a brush has been extended to include a color. A BRUSH is now (BRUSHSHAPE BRUSHSIZE BRUSHCOLOR). Also, a brush can be a bitmap (which can be a color bitmap). Line-drawing routines take a color argument which is the color the line is to appear in if the destination of the display stream is a color bitmap. (DRAWLINE X1 Y1 X2 Y2 WIDTH OPERATION STREAM COLOR) [Function] (DRAWTO X Y WIDTH OPERATION STREAM COLOR) [Function] (RELDRAWTO X Y WIDTH OPERATION STREAM COLOR) [Function] (DRAWBETWEEN POS1 POS2 WIDTH OPERATION STREAM COLOR) [Function] If the COLOR argument is NIL, the DSPCOLOR of the stream is used. 2 Printing in Color 1 Printing only works in REPLACE mode. The characters have a background color and a foreground color determined by the font face of the font the characters are being printed with. Example of printing to an 8bpp color screen: (SETQ FOO (CREATEW (CREATE SCREENREGION SCREEN _ (COLORSCREEN) LEFT _ 20 BOTTOM _ 210 WIDTH _ 290 HEIGHT _ 170) "FOO WINDOW")) (DSPFONT (FONTCREATE 'GACHA 10 'MRR-YELLOW-GREEN 0 '8DISPLAY) FOO) (PRINT 'HELLO FOO) ; will print in green against a yellow background. 2 Operating the Cursor on the Color Screen 1 The cursor can be moved to the color screen. The cursor can be moved to the color screen by sliding the cursor off the left or right edge of the black and white screen on to the color screen or by calling function CURSORPOSITION or CURSORSCREEN. (CURSORPOSITION NEWPOSITION - -) [Function] 1 NEWPOSITION can be a position or a screenposition. (CURSORSCREEN SCREEN XCOORD YCOORD) [Function] 1 Moves the cursor to the screenposition determined by SCREEN, XCOORD, and YCOORD. SCREEN should be the value of either (COLORSCREEN) or (MAINSCREEN). While on the color screen, the cursor is placed by doing BITBLTs in software rather than with microcode and hardware as with the black and white cursor. It is automatically taken down whenever an operation is performed that changes any bits on the color screen. The speed of the color cursor compares well with that of the black and white cursor but there can be a noticeable flicker when there is much input/output to the color screen. While the cursor is on the color screen, the black-and-white cursor is cleared giving the appearance that there is never more than one cursor at a given time. 2 Miscellaneous Color Functions 1 (COLORIZEBITMAP BITMAP 0COLOR 1COLOR BITSPERPIXEL) [Function] creates a color bitmap from a black and white bitmap. The returned bitmap has color number 1COLOR in those pixels of BITMAP that were one and 0COLOR in those pixels of BITMAP that were zero. This provides a way of producing a color bitmap from a black and white bitmap. (UNCOLORIZEBITMAP BITMAP COLORMAP) [Function] creates a black and white bitmap from a color bitmap. (SHOWCOLORTESTPATTERN BARSIZE) [Function] displays a pattern of colors on the color display. This is useful when editing a color map. The pattern has squares of the 16 possible colors laid out in two rows at the top of the screen. Colors 0 through 7 are in the top row, and colors 8 through 15 are in the next row. The bottom part of the screen is filled with bars of BARSIZE width with consecutive color numbers. The pattern is designed so that every color has a border with every other color (unless BARSIZE is too large to allow room for every color%about 20). (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 2) (0 0 612 792) ((FOLIO NIL ( PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (54 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) ( 54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 618) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (558 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) ( PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (54 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) ( HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL)))))7 8 T(1()KKT/KT(5 nT/T/T/T/T/ T/2T/T/T/T.. /T/2T.. < PAGEHEADING VERSOHEAD< PAGEHEADING RECTOHEAD; PAGEHEADINGFOOTINGV; PAGEHEADINGFOOTINGR ?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) +MODERNMODERN MODERNMODERNMODERN +MODERN +MODERN +MODERN + HRULE.GETFNMODERN +   HRULE.GETFNMODERN +    HRULE.GETFNMODERN +   HRULE.GETFNMODERN +    HRULE.GETFNMODERN HRULE.GETFNMODERN  HRULE.GETFNMODERN    f   f +  HRULE.GETFNMODERN. HRULE.GETFNMODERN   @   +   W  (   "  =  HRULE.GETFNMODERN  HRULE.GETFNMODERN   `   HRULE.GETFNMODERN     + ]  + >   &           HRULE.GETFNMODERN     +      ?   =          "      "  HRULE.GETFNMODERN  HRULE.GETFNMODERNy    D + q  B  -  i  (  _    L    *  X =     *     ?  N      HRULE.GETFNMODERN _    +8 -   + Z    +& 8 ,   S       =     m + +) + +  +   + /     ;    HRULE.GETFNMODERN HRULE.GETFNMODERN      v 4       ) E      HRULE.GETFNMODERN HRULE.GETFN, HRULE.GETFNMODERN  HRULE.GETFNMODERN       2  "  1  HRULE.GETFNMODERN +  + +    HRULE.GETFNMODERN  +  ' )  ) HRULE.GETFNMODERN    HRULE.GETFNMODERN +  ? "  4  HRULE.GETFNMODERN + -  HRULE.GETFNMODERN +    ? "  a  HRULE.GETFNMODERN + C  HRULE.GETFNMODERN +  ( BMOBJ.GETFN3 H  , BMOBJ.GETFN3 1 @      HRULE.GETFNMODERN + '  HRULE.GETFNMODERN +   HRULE.GETFNMODERN +  HRULE.GETFNMODERN HRULE.GETFNMODERN  IRM.GET.CREF ). As of the LUTE release of Xerox Lisp, it is possible for the user to create and use windows and menus on the color display. (CREATEW REGION TITLE BORDERSIZE NOOPENFLG) [Function] 1 Creates a new window. REGION indicates where and how large the window should be by specifying the exterior screenregion of the window. In a user environment with multiple screens, such as a black and white screen and color screen both connected to the same machine, there is a new special problem in indicating which screen the REGION is supposed to be a region of. This problem is solved by allowing CREATEW to take screenregion arguments as REGION. For example, (SETQ FOO (CREATEW (CREATE SCREENREGION SCREEN _ (COLORSCREEN) LEFT _ 20 BOTTOM _ 210 WIDTH _ 290 HEIGHT _ 170) ""FOO WINDOW")) creates a window titled "FOO WINDOW" on the color screen. To create a window on the black and white screen, the user should use SCREEN _ (MAINSCREEN) in the0CREATE SCREENREGION expression. Note that it is still perfectly legal to pass in a REGION that is a region, not a screenregion, to CREATEW, but it is preferable to be passing screenregions rather than regions to CREATEW. This is because when REGION is a region, REGION is disambiguated in a somewhat arbitrary manner that may not always turn out to be what the user was hoping for. When REGION is a region, REGION is disambiguated by coercing REGION to be a screenregion on the screen which currently contains the cursor. This is so that software calling CREATEW with regions instead of screenregions tends to do the right thing in a user environment with multiple screens. 1 (WINDOWPROP WINDOW PROP NEWVALUE) [NoSpread Function] 1 If PROP='SCREEN, then WINDOWPROP returns the screen WINDOW is on. If NEWVALUE is given, (even if given as NIL), with PROP='SCREEN, then WINDOWPROP will generate an error. Any other PROP name is handled in the usual way. 1 (OPENWINDOWS SCREEN) [Function] 1 Returns a list of all open windows on SCREEN if SCREEN is a screen datatype such as (MAINSCREEN) or (COLORSCREEN). If SCREEN=NIL, then SCREEN will default to the screen containing the cursor. If SCREEN=T, then a list of all open windows on all screens is returned. 1 2 Color Fonts 1 The user can create color fonts and specify in the font profile that certain color fonts be used when printing in color. Color Font Creation 1 The user can create and manipulate color fonts through the same functions that are used to create and manipulate black and white fonts. This is made possible in some cases by there being new ways to call familiar font functions. (FONTCREATE FAMILY SIZE FACE ROTATION DEVICE NOERRORFLG CHARSET) [Function] 1 In addition to creating black and white fonts, FONTCREATE can be used to create color fonts. For example, (FONTCREATE 'GACHA 10 '(BOLD REGULAR REGULAR YELLOW BLUE) 0 '8DISPLAY) will create an 8 bit per pixel font with blue letters on a yellow background. The user indicates the color and bits per pixel of the font by the FACE and DEVICE arguments passed to FONTCREATE. DEVICE='8DISPLAY means to create an 8bpp font and DEVICE='4DISPLAY means to create a 4bpp font. A color font face is a 5 tuple, (WEIGHT SLOPE EXPANSION BACKCOLOR FORECOLOR) whereas a black and white font face is just a 3 tuple, (WEIGHT SLOPE EXPANSION) The FORECOLOR is the color of the characters of the font and the BACKCOLOR is the color of the background behind the characters that gets printed along with the characters. Both BACKCOLOR and FORECOLOR are allowed to a color name, color number, or any other legal color representation. A color font face can also be represented as a LITATOM. A three character atom such as MRR or any of the special atoms STANDARD, ITALIC, BOLD, BOLDITALIC can optionally be continued by hyphenating on BACKCOLOR and FORECOLOR suffixes. For example, MRR-YELLOW-BLUE BOLD-YELLOW-RED ITALIC-90-200 BRR-100-53 are acceptable color font faces. Hence, (FONTCREATE 'GACHA 10 'BOLD-YELLOW-BLUE 0 '8DISPLAY) will create a color font. LITATOM FACE arguments fall into one of the following patterns: wse wse-backcolor-forecolor STANDARD STANDARD-backcolor-forecolor ITALIC ITALIC-backcolor-forecolor BOLD BOLD-backcolor-forecolor BOLDITALIC BOLDITALIC-backcolor-forecolor where w=B, M, or L; s=I or R; e=R, C, or E; backcolor=a color name or color number; and forecolor=a color name or color number. 1 (FONTPROP FONT PROP) [Function] 1 Returns the value of the PROP property of font FONT. Besides black and white font properties, the following font properties are recognized: FORECOLOR The color of the characters of the font, represented as a color number. This is the color in which the characters of the font will print. BACKCOLOR The color of the background of the characters of the font, represented as a color number. This is the color in which the the background of characters of the font will print. A font with red characters on a yellow background would have a red FORECOLOR and a yellow BACKCOLOR. Color Font Profiles 1 Font profiles are the facility PRETTYPRINT uses to print different elements (user functions, system functions, clisp words, comments, etc.) in different fonts to emphasize (or deemphasize) their importance, and in general to provide for a more pleasing appearance. The user can specify that different colors of fonts be used for different kinds of elements when printing in color. A well chosen font profile will allows user to DEDIT functions, PP functions, and SEE source files in color, for example. A FONTPROFILE such as ((DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8) (4DISPLAY (GACHA 10 MRR-WHITE-RED)) (8DISPLAY (GACHA 10 MRR-WHITE-RED))) (BOLDFONT 2 (HELVETICA 10 BRR) (HELVETICA 8 BRR) (MODERN 8 BRR) (4DISPLAY (HELVETICA 10 BRR-WHITE-MAGENTA)) (8DISPLAY (HELVETICA 10 BRR-WHITE-MAGENTA))) (LITTLEFONT 3 (HELVETICA 8) (HELVETICA 6 MIR) (MODERN 8 MIR) (4DISPLAY (HELVETICA 8 MRR-WHITE-GREEN)) (8DISPLAY (HELVETICA 8 MRR-WHITE-GREEN))) (BIGFONT 4 (HELVETICA 12 BRR) (HELVETICA 10 BRR) (MODERN 10 BRR) (4DISPLAY (HELVETICA 12 BRR-WHITE-BLUE)) (8DISPLAY (HELVETICA 12 BRR-WHITE-BLUE))) (USERFONT BOLDFONT) (COMMENTFONT LITTLEFONT) (LAMBDAFONT BIGFONT) (SYSTEMFONT) (CLISPFONT BOLDFONT) ...) would have comments print in green and clisp words print in blue while ordinairy atoms would print in red. Not all combinations of fonts will be aesthetically pleasing and the user may have to experimL to find a compatible set. The user should indicate what font is to be used for each font class by calling the function FONTPROFILE: (FONTPROFILE PROFILE) [Function] 1 Sets up the font classes as determined by PROFILE, a list of elements which defines the correspondence between font classes and specific fonts. Each element of PROFILE is a list of the form: (FONTCLASS FONT# DISPLAYFONT PRESSFONT INTERPRESSFONT (OTHERDEVICE1 OTHERFONT1) ... (OTHERDEVICEn OTHERFONTn)) FONTCLASS is the font class name and FONT# is the font number for that class. DISPLAYFONT, PRESSFONT, and INTERPRESSFONT are font specifications (of the form accepted by FONTCREATE) for the fonts to use when printing to the black and white display and to Press and Interpress printers respectively. The appearance of color fonts can be affected by including an (OTHERDEVICEi OTHERFONTi) entry where OTHERDEVICEi is either 4DISPLAY or 8DISPLAY for a 4 bits per pixel or 8 bits per pixel color font and OTHERFONTi is a color font specification such as (GACHA 10 MRR-WHITE-RED). 1 FONTPROFILE [Variable] 1 This is the variable used to store the current font profile, in the form accepted by the function FONTPROFILE. Note that simply editing this value will not change the fonts used for the various font classes; it is necessary to execute (FONTPROFILE FONTPROFILE) to install the value of this variable. 1 2 Using Color 1 The current color implementation allows display streams to operate on color bitmaps. The two functions DSPCOLOR and DSPBACKCOLOR set the color in which a stream draws when the user defaults a color argument to a drawing function. (DSPCOLOR COLOR STREAM) [Function] sets the foreground color of a stream. It returns the previous foreground color. If COLOR is NIL, it returns the current foreground color without changing anything. The default foreground color is MINIMUMCOLOR=0, which is white in the default color maps. (DSPBACKCOLOR COLOR STREAM) [Function] sets the background color of a stream. It returns the previous background color. If COLOR is NIL, it returns the current background color without changing anything. The default background color is (MAXIMUMCOLOR BITSPERPIXEL)=15 or 255, which is black in the default color maps. The BITBLT, line-drawing routines, and curve-drawing routines routines know how to operate on a color-capable stream. Following are some notes about them. 2 BITBLTing in Color 1 If BITBLTing from a color bitmap onto another color bitmap of the same bpp, the operations PAINT, INVERT, and ERASE are done on a bit level, not on a pixel level. Thus painting color 3 onto color 10 results in color 11. If BITBLTing from a black-and-white bitmap onto a color bitmap, the one bits appear in the DSPCOLOR, and the zero bits in DSPBACKCOLOR. BLTing from black-and-white to color is fairly expensive; if the same bitmap is going to be put up several times in the same color, it is faster to create a color copy and then BLT the color copy. If the source type is TEXTURE and the destination bitmap is a color bitmap, the Texture argument is taken to be a color. Thus to fill an area with the color BLUE assuming COLORSTR is a stream whose destination is the color screen, use (BITBLT NIL NIL NIL COLORSTR 50 75 100 200 'TEXTURE 'REPLACE 'BLUE). 2 Drawing Curves and Lines in Color 1 For the functions DRAWCIRCLE, DRAWELLIPSE, and DRAWCURVE, the notion of a brush has been extended to include a color. A BRUSH is now (BRUSHSHAPE BRUSHSIZE BRUSHCOLOR). Also, a brush can be a bitmap (which can be a color bitmap). Line-drawing routines take a color argument which is the color the line is to appear in if the destination of the display stream is a color bitmap. (DRAWLINE X1 Y1 X2 Y2 WIDTH OPERATION STREAM COLOR) [Function] (DRAWTO X Y WIDTH OPERATION STREAM COLOR) [Function] (RELDRAWTO X Y WIDTH OPERATION STREAM COLOR) [Function] (DRAWBETWEEN POS1 POS2 WIDTH OPERATION STREAM COLOR) [Function] If the COLOR argument is NIL, the DSPCOLOR of the stream is used. 2 Printing in Color 1 Printing only works in REPLACE mode. The characters have a background color and a foreground color determined by the font face of the font the characters are being printed with. Example of printing to an 8bpp color screen: (SETQ FOO (CREATEW (CREATE SCREENREGION SCREEN _ (COLORSCREEN) @# tCcCcwCc  D + q  B  -  i  (  _    L    *  X =     *     ?  N      HRULE.GETFNMODERN _    +8 -   + Z    +& 8 ,   S       =     m + +) + +  +   + /     ;    HRULE.GETFNMODERN HRULE.GETFNMODERN      v 4       ) E      HRULE.GETFNMODERN HRULE.GETFN, HRULE.GETFNMODERN  HRULE.GETFNMODERN       2  "  1  HRULE.GETFNMODERN +  + +    HRULE.GETFNMODERN  +  ' )  ) HRULE.GETFNMODERN    HRULE.GETFNMODERN +  ? "  4  HRULE.GETFNMODERN + -  HRULE.GETFNMODERN +    ? "  a IOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (54 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))))); < T,5,-KKT3KT,9 nT3T3T3T3T3 T32T3T3T3T22 3T32T22 @ PAGEHEADING VERSOHEAD@ PAGEHEADING RECTOHEAD? PAGEHEADINGFOOTINGV? PAGEHEADINGFOOTINGR ?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) +MODERNMODERN MODERNMODERNMODERN +MODERN +MODERN +MODERN + HRULE.GETFNMODERN +   HRULE.GETFNMODERN +    HRULE.GETFNMODERN +   HRULE.GETFNMODERN +    HRULE.GETFNMODERN HRULE.GETFNMODERN  HRULE.GETFNMODERN    K f    HRULE.GETFNMODERN' HRULE.GETFNMODERN + @    HRULE.GETFNMODERN. HRULE.GETFNMODERN   @   +   W  (   "  =  HRULE.GETFNMODERN  HRULE.GETFNMODERN +    `   HRULE.GETFNMODERN     + ]  + >   &           HRULE.GETFNMODERN     +      ?   =          "      "  HRULE.GETFNMODERN  HRULE.GETFNMODERNy    D + q  B  -  i  (  _    L    *  X =     *     ?  N      HRULE.GETFNMODERN _    +8 -   + Z    +& 8 ,   S       =     m + +) + +  +   + /     ;    HRULE.GETFNMODERN HRULE.GETFNMODERN      v 4       ) E      HRULE.GETFNMODERN HRULE.GETFN, HRULE.GETFNMODERN  HRULE.GETFNMODERN       2  "  1  HRULE.GETFNMODERN +  + +    HRULE.GETFNMODERN  +  ' )  ) HRULE.GETFNMODERN    HRULE.GETFNMODERN +  ? "  4  HRULE.GETFNMODERN + -  HRULE.GETFNMODERN +    ? "  a  HRULE.GETFNMODERN + C  HRULE.GETFNMODERN +  ( BMOBJ.GETFN3 H  , BMOBJ.GETFN3 1 @      HRULE.GETFNMODERN + '  HRULE.GETFNMODERN +   HRULE.GETFNMODERN +  HRULE.GETFNMODERN HRULE.GETFNMODERN a IRM.GET.CREF ` ). As of the LUTE release of Xerox Lisp, it is possible for the user to create and use windows and menus on the color display. (CREATEW REGION TITLE BORDERSIZE NOOPENFLG) [Function] 1 Creates a new window. REGION indicates where and how large the window should be by specifying the exterior screenregion of the window. In a user environment with multiple screens, such as a black and white screen and color screen both connected to the same machine, there is a new special problem in indicating which screen the REGION is supposed to be a region of. This problem is solved by allowing CREATEW to take screenregion arguments as REGION. For example, (SETQ FOO (CREATEW (CREATE SCREENREGION SCREEN _ (COLORSCREEN) LEFT _ 20 BOTTOM _ 210 WIDTH _ 290 HEIGHT _ 170) "FOO WINDOW")) creates a window titled "FOO WINDOW" on the color screen. To create a window on the black and white screen, the user should use SCREEN _ (MAINSCREEN) in the CREATE SCREENREGION expression. Note that it is still perfectly legal to pass in a REGION that is a region, not a screenregion, to CREATEW, but it is preferable to be passing screenregions rather than regions to CREATEW. This is because when REGION is a region, REGION is disambiguated in a somewhat arbitrary manner that may not always turn out to be what the user was hoping for. When REGION is a region, REGION is disambiguated by coercing REGION to be a screenregion on the screen which currently contains the cursor. This is so that software calling CREATEW with regions instead of screenregions tends to do the right thing in a user environment with multiple screens. 1 (WINDOWPROP WINDOW PROP NEWVALUE) [NoSpread Function] 1 If PROP='SCREEN, then WINDOWPROP returns the screen WINDOW is on. If NEWVALUE is given, (even if given as NIL), with PROP='SCREEN, then WINDOWPROP will generate an error. Any other PROP name is handled in the usual way. 1 (OPENWINDOWS SCREEN) [Function] 1 Returns a list of all open windows on SCREEN if SCREEN is a screen datatype such as (MAINSCREEN) or (COLORSCREEN). If SCREEN=NIL, then SCREEN will default to the screen containing the cursor. If SCREEN=T, then a list of all open windows on all screens is returned. 1 2 Color Fonts 1 The user can create color fonts and specify in the font profile that certain color fonts be used when printing in color. Color Font Creation 1 The user can create and manipulate color fonts through the same functions that are used to create and manipulate black and white fonts. This is made possible in some cases by there being new ways to call familiar font functions. (FONTCREATE FAMILY SIZE FACE ROTATION DEVICE NOERRORFLG CHARSET) [Function] 1 In addition to creating black and white fonts, FONTCREATE can be used to create color fonts. For example, (FONTCREATE 'GACHA 10 '(BOLD REGULAR REGULAR YELLOW BLUE) 0 '8DISPLAY) will create an 8 bit per pixel font with blue letters on a yellow background. The user indicates the color and bits per pixel of the font by the FACE and DEVICE arguments passed to FONTCREATE. DEVICE='8DISPLAY means to create an 8bpp font and DEVICE='4DISPLAY means to create a 4bpp font. A color font face is a 5 tuple, (WEIGHT SLOPE EXPANSION BACKCOLOR FORECOLOR) whereas a black and white font face is just a 3 tuple, (WEIGHT SLOPE EXPANSION) The FORECOLOR is the color of the characters of the font and the BACKCOLOR is the color of the background behind the characters that gets printed along with the characters. Both BACKCOLOR and FORECOLOR are allowed to a color name, color number, or any other legal color representation. A color font face can also be represented as a LITATOM. A three character atom such as MRR or any of the special atoms STANDARD, ITALIC, BOLD, BOLDITALIC can optionally be continued by hyphenating on BACKCOLOR and FORECOLOR suffixes. For example, MRR-YELLOW-BLUE BOLD-YELLOW-RED ITALIC-90-200 BRR-100-53 are acceptable color font faces. Hence, (FONTCREATE 'GACHA 10 'BOLD-YELLOW-BLUE 0 '8DISPLAY) will create a color font. LITATOM FACE arguments fall into one of the following patterns: wse wse-backcolor-forecolor STANDARD STANDARD-backcolor-forecolor ITALIC ITALIC-backcolor-forecolor BOLD BOLD-backcolor-forecolor BOLDITALIC BOLDITALIC-backcolor-forecolor where w=B, M, or L; s=I or R; e=R, C, or E; backcolor=a color name or color number; and forecolor=a color name or color number. 1 (FONTPROP FONT PROP) [Function] 1 Returns the value of the PROP property of font FONT. Besides black and white font properties, the following font properties are recognized: FORECOLOR The color of the characters of the font, represented as a color number. This is the color in which the characters of the font will print. BACKCOLOR The color of the background of the characters of the font, represented as a color number. This is the color in which the the background of characters of the font will print. A font with red characters on a yellow background would have a red FORECOLOR and a yellow BACKCOLOR. Color Font Profiles 1 Font profiles are the facility PRETTYPRINT uses to print different elements (user functions, system functions, clisp words, comments, etc.) in different fonts to emphasize (or deemphasize) their importance, and in general to provide for a more pleasing appearance. The user can specify that different colors of fonts be used for different kinds of elements when printing in color. A well chosen font profile will allows user to DEDIT functions, PP functions, and SEE source files in color, for example. A FONTPROFILE such as ((DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8) (4DISPLAY (GACHA 10 MRR-WHITE-RED)) (8DISPLAY (GACHA 10 MRR-WHITE-RED))) (BOLDFONT 2 (HELVETICA 10 BRR) (HELVETICA 8 BRR) (MODERN 8 BRR) (4DISPLAY (HELVETICA 10 BRR-WHITE-MAGENTA)) (8DISPLAY (HELVETICA 10 BRR-WHITE-MAGENTA))) (LITTLEFONT 3 (HELVETICA 8) (HELVETICA 6 MIR) (MODERN 8 MIR) (4DISPLAY (HELVETICA 8 MRR-WHITE-GREEN)) (8DISPLAY (HELVETICA 8 MRR-WHITE-GREEN))) (BIGFONT 4 (HELVETICA 12 BRR) (HELVETICA 10 BRR) (MODERN 10 BRR) (4DISPLAY (HELVETICA 12 BRR-WHITE-BLUE)) (8DISPLAY (HELVETICA 12 BRR-WHITE-BLUE))) (USERFONT BOLDFONT) (COMMENTFONT LITTLEFONT) (LAMBDAFONT BIGFONT) (SYSTEMFONT) (CLISPFONT BOLDFONT) ...) would have comments print in green and clisp words print in blue while ordinairy atoms would print in red. Not all combinations of fonts will be aesthetically pleasing and the user may have to experiment to find a compatible set. The user should indicate what font is to be used for each font class by calling the function FONTPROFILE: (FONTPROFILE PROFILE) [Function] 1 Sets up the font classes as determined by PROFILE, a list of elements which defines the correspondence between font classes and specific fonts. Each element of PROFILE is a list of the form: (FONTCLASS FONT# DISPLAYFONT PRESSFONT INTERPRESSFONT (OTHERDEVICE1 OTHERFONT1) ... (OTHERDEVICEn OTHERFONTn)) FONTCLASS is the font class name and FONT# is the font number for that class. DISPLAYFONT, PRESSFONT, and INTERPRESSFONT are font specifications (of the form accepted by FONTCREATE) for the fonts to use when printing to the black and white display and to Press and Interpress printers respectively. The appearance of color fonts can be affected by including an (OTHERDEVICEi OTHERFONTi) entry where OTHERDEVICEi is either 4DISPLAY or 8DISPLAY for a 4 bits per pixel or 8 bits per pixel color font and OTHERFONTi is a color font specification such as (GACHA 10 MRR-WHITE-RED). 1 FONTPROFILE [Variable] 1 This is the variable used to store the current font profile, in the form accepted by the function FONTPROFILE. Note that simply editing this value will not change the fonts used for the various font classes; it is necessary to execute (FONTPROFILE FONTPROFILE) to install the value of this variable. 1 2 Using Color 1 The current color implementation allows display streams to operate on color bitmaps. The two functions DSPCOLOR and DSPBACKCOLOR set the color in which a stream draws when the user defaults a color argument to a drawing function. (DSPCOLOR COLOR STREAM) [Function] sets the foreground color of a stream. It returns the previous foreground color. If COLOR is NIL, it returns the current foreground color without changing anything. The default foreground color is MINIMUMCOLOR=0, which is white in the default color maps. (DSPBACKCOLOR COLOR STREAM) [Function] sets the background color of a stream. It returns the previous background color. If COLOR is NIL, it returns the current background color without changing anything. The default background color is (MAXIMUMCOLOR BITSPERPIXEL)=15 or 255, which is black in the default color maps. The BITBLT, line-drawing routines, and curve-drawing routines routines know how to operate on a color-capable stream. Following are some notes about them. 2 BITBLTing in Color 1 If BITBLTing from a color bitmap onto another color bitmap of the same bpp, the operations PAINT, INVERT, and ERASE are done on a bit level, not on a pixel level. Thus painting color 3 onto color 10 results in color 11. If BITBLTing from a black-and-white bitmap onto a color bitmap, the one bits appear in the DSPCOLOR, and the zero bits in DSPBACKCOLOR. BLTing from black-and-white to color is fairly expensive; if the same bitmap is going to be put up several times in the same color, it is faster to create a color copy and then BLT the color copy. If the source type is TEXTURE and the destination bitmap is a color bitmap, the Texture argument is taken to be a color. Thus to fill an area with the color BLUE assuming COLORSTR is a stream whose destination is the color screen, use (BITBLT NIL NIL NIL COLORSTR 50 75 100 200 'TEXTURE 'REPLACE 'BLUE). 2 Drawing Curves and Lines in Color 1 For the functions DRAWCIRCLE, DRAWELLIPSE, and DRAWCURVE, the notion of a brush has been extended to include a color. A BRUSH is now (BRUSHSHAPE BRUSHSIZE BRUSHCOLOR). Also, a brush can be a bitmap (which can be a color bitmap). Line-drawing routines take a color argument which is the color the line is to appear in if the destination of the display stream is a color bitmap. (DRAWLINE X1 Y1 X2 Y2 WIDTH OPERATION STREAM COLOR) [Function] (DRAWTO X Y WIDTH OPERATION STREAM COLOR) [Function] (RELDRAWTO X Y WIDTH OPERATION STREAM COLOR) [Function] (DRAWBETWEEN POS1 POS2 WIDTH OPERATION STREAM COLOR) [Function] If the COLOR argument is NIL, the DSPCOLOR of the stream is used. 2 Printing in Color 1 Printing only works in REPLACE mode. The characters have a background color and a foreground color determined by the font face of the font the characters are being printed with. Example of printing to an 8bpp color screen: (SETQ FOO (CREATEW (CREATE SCREENREGION SCREEN _ (COLORSCREEN) LEFT _ 20 BOTTOM _ 210 WIDTH _ 290 HEIGHT _ 170) "FOO WINDOW")) (DSPFONT (FONTCREATE 'GACHA 10 'MRR-YELLOW-GREEN 0 '8DISPLAY) FOO) (PRINT 'HELLO FOO) ; will print in green against a yellow background. 2 Operating the Cursor on the Color Screen 1 The cursor can be moved to the color screen. The cursor can be moved to the color screen by sliding the cursor off the left or right edge of the black and white screen on to the color screen or by calling function CURSORPOSITION or CURSORSCREEN. (CURSORPOSITION NEWPOSITION - -) [Function] 1 NEWPOSITION can be a position or a screenposition. (CURSORSCREEN SCREEN XCOORD YCOORD) [Function] 1 Moves the cursor to the screenposition determined by SCREEN, XCOORD, and YCOORD. SCREEN should be the value of either (COLORSCREEN) or (MAINSCREEN). While on the color screen, the cursor is placed by doing BITBLTs in software rather than with microcode and hardware as with the black and white cursor. It is automatically taken down whenever an operation is performed that changes any bits on the color screen. The speed of the color cursor compares well with that of the black and white cursor but there can be a noticeable flicker when there is much input/output to the color screen. While the cursor is on the color screen, the black-and-white cursor is cleared giving the appearance that there is never more than one cursor at a given time. 2 Miscellaneous Color Functions 1 (COLORIZEBITMAP BITMAP 0COLOR 1COLOR BITSPERPIXEL) [Function] creates a color bitmap from a black and white bitmap. The returned bitmap has color number 1COLOR in those pixels of BITMAP that were one and 0COLOR in those pixels of BITMAP that were zero. This provides a way of producing a color bitmap from a black and white bitmap. (UNCOLORIZEBITMAP BITMAP COLORMAP) [Function] creates a black and white bitmap from a color bitmap. (SHOWCOLORTESTPATTERN BARSIZE) [Function] displays a pattern of colors on the color display. This is useful when editing a color map. The pattern has squares of the 16 possible colors laid out in two rows at the top of the screen. Colors 0 through 7 are in the top row, and colors 8 through 15 are in the next row. The bottom part of the screen is filled with bars of BARSIZE width with consecutive color numbers. The pattern is designed so that every color has a border with every other color (unless BARSIZE is too large to allow room for every color%about 20). (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 2) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (54 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 618) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (558 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (54 12 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))))); < T,5,-KKT3KT,9 nT3T3T3T3T3 T32T3T3T3T22 3T32T22 @ PAGEHEADING VERSOHEAD@ PAGEHEADING RECTOHEAD? PAGEHEADINGFOOTINGV? PAGEHEADINGFOOTINGROPTIMA OPTIMAOPTIMA +OPTIMA +OPTIMA +OPTIMAOPTIMAOPTIMA + HRULE.GETFNOPTIMA +- HRULE.GETFNOPTIMA +- HRULE.GETFNOPTIMA + HRULE.GETFNOPTIMA +   HRULE.GETFNOPTIMA HRULE.GETFNOPTIMA  HRULE.GETFNOPTIMAKf HRULE.GETFNOPTIMA' HRULE.GETFNOPTIMA +@ HRULE.GETFNOPTIMA. HRULE.GETFNOPTIMA  @  + W("= HRULE.GETFNOPTIMA  HRULE.GETFNOPTIMA +` HRULE.GETFNOPTIMA   +] +> & HRULE.GETFNOPTIMA   +  ?=  "  " HRULE.GETFNOPTIMA  HRULE.GETFNOPTIMAy   D +q B - k ( a   N  *  X =    *  ? N    HRULE.GETFNOPTIMA _  +8 -  + Z  +&8, S  =  m + +) + +   +  + /; HRULE.GETFNOPTIMA HRULE.GETFNOPTIMA  v 4   ) E   HRULE.GETFNOPTIMA HRULE.GETFN, HRULE.GETFNOPTIMA HRULE.GETFNOPTIMA     2 "1 HRULE.GETFNOPTIMA +++  HRULE.GETFNOPTIMA  +')) HRULE.GETFNOPTIMA  HRULE.GETFNOPTIMA +?"4 HRULE.GETFNOPTIMA +- HRULE.GETFNOPTIMA + ?"a HRULE.GETFNOPTIMA +C HRULE.GETFNOPTIMA +( BMOBJ.GETFN3H, BMOBJ.GETFN31@     HRULE.GETFNOPTIMA +' HRULE.GETFNOPTIMA + HRULE.GETFNOPTIMA + HRULE.GETFNOPTIMA HRULE.GETFNOPTIMA#4 IRM.GET.CREF ? IRM.GET.CREF ! HRULE.GETFNOPTIMA +-n(`SVUWEs HRULE.GETFNOPTIMA +  HRULE.GETFNOPTIMA +- (=" HRULE.GETFNOPTIMA +  HRULE.GETFNOPTIMA +&A 7@ HRULE.GETFNOPTIMA + HRULE.GETFNOPTIMA  HRULE.GETFNOPTIMAy HRULE.GETFNOPTIMA  3 HRULE.GETFNOPTIMA +kK4D27):[81863 HRULE.GETFNOPTIMA + +  HRULE.GETFNOPTIMA +Z   HRULE.GETFNOPTIMA     78%"<="$!;<$"89 k{k  HRULE.GETFNOPTIMA +*p    %    [ +C HRULE.GETFNOPTIMA +  HRULE.GETFNOPTIMA + E HRULE.GETFNOPTIMA + HRULE.GETFNOPTIMA  HRULE.GETFNOPTIMA  V W HRULE.GETFNOPTIMA HRULE.GETFNOPTIMANP HRULE.GETFNOPTIMA" HRULE.GETFNOPTIMA  +&     + +-   +5 5 HRULE.GETFNOPTIMA HRULE.GETFNOPTIMA-(`SVUWE=M=GF HRULE.GETFNOPTIMA) HRULE.GETFNOPTIMA  HRULE.GETFNOPTIMA + ( HRULE.GETFNOPTIMA +5>W HRULE.GETFNOPTIMA HRULE.GETFNOPTIMA ! \a  6  J+}z \ No newline at end of file diff --git a/library/COPYFILES.TEDIT b/library/COPYFILES.TEDIT new file mode 100644 index 00000000..a2682989 Binary files /dev/null and b/library/COPYFILES.TEDIT differ diff --git a/library/DATABASEFNS.TEDIT b/library/DATABASEFNS.TEDIT new file mode 100644 index 00000000..0df4e70f Binary files /dev/null and b/library/DATABASEFNS.TEDIT differ diff --git a/library/DEDIT.TEDIT b/library/DEDIT.TEDIT new file mode 100644 index 00000000..9dd91f7a Binary files /dev/null and b/library/DEDIT.TEDIT differ diff --git a/library/EDITBITMAP.TEDIT b/library/EDITBITMAP.TEDIT new file mode 100644 index 00000000..0830a2cd Binary files /dev/null and b/library/EDITBITMAP.TEDIT differ diff --git a/library/ETHERRECORDS.TEDIT b/library/ETHERRECORDS.TEDIT new file mode 100644 index 00000000..a920cb46 Binary files /dev/null and b/library/ETHERRECORDS.TEDIT differ diff --git a/library/FILEBROWSER.TEDIT b/library/FILEBROWSER.TEDIT new file mode 100644 index 00000000..2ba2aa6c Binary files /dev/null and b/library/FILEBROWSER.TEDIT differ diff --git a/library/FONTSAMPLE.TEDIT b/library/FONTSAMPLE.TEDIT new file mode 100644 index 00000000..12d3aa87 Binary files /dev/null and b/library/FONTSAMPLE.TEDIT differ diff --git a/library/FTPSERVER.TEDIT b/library/FTPSERVER.TEDIT new file mode 100644 index 00000000..24a66ab3 Binary files /dev/null and b/library/FTPSERVER.TEDIT differ diff --git a/library/GCHAX.TEDIT b/library/GCHAX.TEDIT new file mode 100644 index 00000000..5b176019 Binary files /dev/null and b/library/GCHAX.TEDIT differ diff --git a/library/GRAPHER.TEDIT b/library/GRAPHER.TEDIT new file mode 100644 index 00000000..42086735 Binary files /dev/null and b/library/GRAPHER.TEDIT differ diff --git a/library/GRAPHZOOM.TEDIT b/library/GRAPHZOOM.TEDIT new file mode 100644 index 00000000..c19eaa2e Binary files /dev/null and b/library/GRAPHZOOM.TEDIT differ diff --git a/library/HASH.TEDIT b/library/HASH.TEDIT new file mode 100644 index 00000000..477561a0 --- /dev/null +++ b/library/HASH.TEDIT @@ -0,0 +1,33 @@ + 1 Lisp Library Modules, Medley Release 1.0, HASH 1 Lisp Library Modules, Medley Release 1.0, HASH HASH 1 HASH 1 HASH 6 Note: This module is provided for backwards compatibility. New applications should use the HASH-FILE Library Module instead of this module. Hash permits information associated with string or atom keys to be stored on and retrieved from files. The information (or values) associated with the keys in a file may be numbers, strings, or arbitary Lisp expressions. The associates are maintained by a hashing scheme that minimizes the number of file operations it takes to access a value from its key. Information is saved in a hash file, which is analogous to a hash array. Actually, a hash file can be either the file itself, or the handle on that file which is used by the Hash module. The latter, of data type HashFile, is the datum returned by CREATEHASHFILE or OPENHASHFILE, currently an array record containing the hash file name, the number of slots in the file, the used slots, and other details. All other functions with hash file arguments use this datum. In older implementations (e.g., for Interlisp-10), hash files came in several varieties, according to the types of value stored in them. The EMYCIN system provided even more flexibility. This system only supports the most general EXPR type of hash files and EMYCIN-style TEXT entries, in the same file. The VALUETYPE and ITEMLENGTH arguments are for the most part ignored. Two-key hashing is supported in this system, but it is discouraged as it is only used in EMYCIN, not in the Interlisp-10 system. The functions GETPAGE, DELPAGE, and GETPNAME, which manipulate secret pages, do not exist in this implementation. However, it is permissible to write data at the end of a hash file. That data will be ignored by the Hash module, and can be used to store additional data. The Hash module views files as a sequence of bytes, randomly accessible. No notice is made of pages, and it is assumed that the host computer buffers I/O sufficiently. Hash files consist of a short header section (8 bytes), a layer of pointers (4*HASHFILE:Size bytes), followed by ASCII data. Pointers are 3 bytes wide, preceded by a status byte. The pointers point to key PNAMES in the data section, where each key is followed by its value. Deleted key pointers are reused but deleted data space is not, so rehashing is required if many items have been replaced. The data section starts at 4*HASHFILE: Size + 9, and consists of alternating keys and values. As deleted data is not rewritten, not all data in the data section is valid. When a key hashes into a used slot, a probe value is added to it to find the next slot to search. The probe value is a small prime derived from the original hash key. Requirements 1 Hash files must reside on a random-access device (not a TCP/IP file server). Installation 1 Load HASH.LCOM from the Library. Functions 1 Creating a Hash File (CREATEHASHFILE(CREATEHASHFILE (Function) NIL NIL NIL 128) FILE VALUETYPE ITEMLENGTH #ENTRIES SMASH COPYFN) [Function] Creates a new hash file named FILE. All other arguments are optional. VALUETYPE is ignored in this implementation; any hash file can accommodate both Lisp expressions and text. ITEMLENGTH is not used by the system but is currently saved on the file (if less than 256) for future use. #ENTRIES is an estimate of the number of entries the file will have. (This should be a realistic guess.) SMASH is a hash file datum to reuse. COPYFN is a function to be applied to entries when the file is rehashed (see the description of REHASHFILE below). Opening and Closing Hash Files Before you can use a hashfile with this module, you have to open it using the following function. (OPENHASHFILE(OPENHASHFILE (Function) NIL NIL NIL 128) FILE ACCESS ITEMLENGTH #ENTRIES SMASH) [Function] Reopens the previously existing hash file FILE. Access may be INPUT (or NIL), in which case FILE is opened for reading only, or BOTH, in which case FILE is open for both input and output. Causes the error "not a hashfile" if FILE is not recognized as a hash file. ITEM LENGTH and #ENTRIES are for backward compatibility with EMYCIN where OPENHASHFILE also created new hash files; these arguments should be avoided. SMASH is a hash file datum to reuse. If ACCESS is BOTH and FILE is a hash file open for reading only, OPENHASHFILE attempts to close it and reopen it for writing. Otherwise, if FILE designates an already open hash file, OPENHASHFILE is a no-op. OPENHASHFILE returns a hash file datum. (CLOSEHASHFILE(CLOSEHASHFILE (Function) NIL NIL NIL 128) HASHFILE REOPEN) [Function] Closes HASHFILE (when you are finished using a hash file, you should close it). If REOPEN is non-NIL, it should be one of the accepted access types. In this case, the file is closed and then immediately reopened with ACCESS = REOPEN. This is used to make sure the hash file is valid on the disk. Storing and Retrieving Data (PUTHASHFILE(PUTHASHFILE (Function) NIL NIL NIL 128) KEY VALUE HASHFILE KEY2) [Function] Puts VALUE under KEY in HASHFILE. If VALUE is NIL, any previous entry for KEY is deleted. KEY2 is for EMYCIN two-key hashing; KEY2 is internally appended to KEY and they are treated as a single key. (GETHASHVILE(GETHASHVILE (Function) NIL NIL NIL 129) KEY HASHFILE KEY2) [Function] Gets the value stored under KEY in HASHFILE. KEY2 is necessary if it was supplied to PUTHASHFILE. (LOOKUPHASHFILE(LOOKUPHASHFILE (Function) NIL NIL NIL 129) KEY VALUE HASHFILE CALLTYPE KEY2) [Function] A generalized entry for inserting and retrieving values; provides certain options not available with GETHASHFILE or PUTHASHFILE. LOOKUPHASHFILE looks up KEY in HASHFILE. CALLTYPE is an atom or a list of atoms. The keywords are interpreted as follows: RETRIEVE If KEY is found, then if CALLTYPE is or contains RETRIEVE the old value is returned from LOOKUPHASHFILE; otherwise returns T. DELETE If CALLTYPE is or contains DELETE, the value associated with KEY is deleted from the file. REPLACE If CALLTYPE is or contains REPLACE, the old value is replaced with VALUE. INSERT If CALLTYPE is or contains INSERT, LOOKUPHASHFILE inserts VALUE as the value associated with KEY. Combinations are possible. For example, (RETRIEVE DELETE) deletes a key and returns the old value. (PUTHASHTEXT(PUTHASHTEXT (Function) NIL NIL NIL 129) KEY SRCFIL HASHFILE START END) [Function] Puts text from stream SRCFIL onto HASHFILE under KEY. START and END are passed directly to COPYBYTES. (GETHASHTEXT(GETHASHTEXT (Function) NIL NIL NIL 129) KEY HASHFILE DSTFIL) [Function] Uses COPYBYTES to retrieve text stored under KEY on HASHFILE. The bytes are output to the stream DSTFIL. Functions for Manipulating Hash Files (HASHFILEP(HASHFILEP (Function) NIL NIL NIL 129) HASHFILE WRITE?) [Function] Returns HASHFILE if it is a valid, open hash file datum, or returns the hash file datum associated with HASHFILE if it is the name of an open hash file. If WRITE? is non-NIL, HASHFILE must also be open for write access. (HASHFILEPROP(HASHFILEPROP (Function) NIL NIL NIL 129) HASHFILE PROPERTY) [Function] Returns the value of a PROPERTY of a HASHFILE datum. Currently accepted properties are: NAME, ACCESS, VALUETYPE, ITEMLENGTH, SIZE, #ENTRIES, COPYFN and STREAM. (HASHFILENAME(HASHFILENAME (Function) NIL NIL NIL 129) HASHFILE) [Function] Same as (HASHFILEPROP HASHFILE 'NAME). (MAPHASHFILE(MAPHASHFILE (Function) NIL NIL NIL 130) HASHFILE MAPFN DOUBLE) [Function] Maps over HASHFILE applying MAPFN. If MAPFN takes two arguments, it is applied to KEY and VALUE. If MAPFN only takes one argument, it is only applied to KEY and saves the cost of reading the value from the file. If DOUBLE is non-NIL, then MAPFN is applied to (KEY1 KEY2 VALUE), or (KEY1 KEY2) if the MAPFN only takes two arguments. (REHASHFILE(REHASHFILE (Function) NIL NIL NIL 130) HASHFILE NEWNAME) [Function] As keys are replaced, space in the data section of the file is not reused (through space in the key section is). Eventually the file may need rehashing to reclaim the wasted data space. REHASHFILE is really a special case of COPYHASHFILE, and creates a new file. If NEWNAME is non-NIL, it is taken as the name of the rehashed file. The system automatically rehashes files when 7/8 of the key section is filled. The system prints a message when automatically rehashing a file if the global variable REHASHGAG is non-NIL. Certain applications save data outside Hash's normal framework. Hash files for those applications need a custom COPYFN (supplied in the call to CREATEHASHFILE), which is used to copy data during the rehasing process. The COPYFN is used as the FN argument to COPYHASHFILE during the rehashing. (COPYHASHFILE(COPYHASHFILE (Function) NIL NIL NIL 130) HASHFILE NEWNAME FN VALUETYPE LEAVEOPEN) [Function] Makes a copy of HASHFILE under NEWNAME. Each key and value pair is moved individually, and, if FN is supplied, is applied to (KEY VALUE HASHFILE NEWHASHFILE). What is returned is used as the value of the key in the new hash file. (This lets you intervene, perhaps to copy out-of-bank data associated with VALUE.) VALUETYPE is a no-op. If LEAVEOPEN is non-NIL, the new hash file datum is returned open. Otherwise, the new hash file is closed and the name is returned. (HASHFILEPLST(HASHFILEPLST (Function) NIL NIL NIL 130) HASHFILE XWORD) [Function] Returns a Lisp generator for the keys in HASHFILE, usable with the spelling corrector. If XWORD is supplied, only keys starting with the prefix in XWORD are generated. Global Variables of Hash HASHFILEDEFAULTSIZE(HASHFILEDEFAULTSIZE (Variable) NIL NIL NIL 130) [Variable] Size used when #ENTRIES is omitted or is too small. Default is 512. HASHFILEDTBL(HASHFILEDTBL (Variable) NIL NIL NIL 130) [Variable] The hash file read table. Default is ORIG. HASHLOADFACTOR(HASHLOADFACTOR (Variable) NIL NIL NIL 130) [Variable] The ration, used slots/total slots, at which the system rehashes the file. Default is A. HFGROWTHFACTOR(HFGROWTHFACTOR (Variable) NIL NIL NIL 131) [Variable] The ratio of total slots to used slots when a hash file is created. Default is 3. REHASHGAG(REHASHGAG (Variable) NIL NIL NIL 131) [Variable] Flags whether to print message when rehashing; initially off. Default is NIL. SYSHASHFILE(SYSHASHFILE (Variable) NIL NIL NIL 131) [Variable] The current hash file. Default is NIL. SYSHASHFILELST(SYSHASHFILELST (Variable) NIL NIL NIL 131) [Variable] An Alist of open hash files. Default is NIL. Limitations 1 The system currently is able to manipulate files on CORE, DSK, FLOPPY, and over the network, via leaf servers. Hash files can be used with NS servers only if they support random access files. Due to the pointer size, only hash files of less than 6 million initial entries can be created, though these can grow to 14 million entries before automatic rehashing exceeds the pointer limit. The total file length is limited to 16 milion bytes. No range checking is done for these limits. Two-key files operate on pnames only, without regard to packages. [This page intentionally left blank](LIST ((PAGE NIL (PAPERSIZE LETTER FOLIOINFO (ARABIC "" "") STARTINGPAGE# 127) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (TEXT NIL NIL (54 54 504 702) NIL))) (PAGE NIL (PAPERSIZE LETTER FOLIOINFO (ARABIC "" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (54 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) (PAGE NIL (PAPERSIZE LETTER FOLIOINFO (ARABIC "" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL)))))3H` +T3H` +T2l2Hll2HH2HH +3T,ll2H` +,$$3T,HH +,HH-T-TF PAGEHEADING VERSOHEADF PAGEHEADING RECTOHEADE PAGEHEADINGFOOTINGVE PAGEHEADINGFOOTINGR  HELVETICA + HELVETICA TITAN +CLASSIC HELVETICA HELVETICACLASSIC +CLASSIC +TERMINAL +MODERN MODERNMODERNMODERN +  HRULE.GETFN 0 HRULE.GETFNMODERN + / HRULE.GETFNMODERN +  HRULE.GETFNMODERN +  HRULE.GETFNMODERN  g    y  +   M   z      HRULE.GETFNMODERN  M  HRULE.GETFNMODERN     + HRULE.GETFNMODERN  + +IM.INDEX.GETFN / % c +ab Z +  + b )IM.INDEX.GETFN& * 7# 2 B ' @'    *IM.INDEX.GETFNTvA + + (IM.INDEX.GETFN !&  (IM.INDEX.GETFN  $  +IM.INDEX.GETFN  e   +J ! )* (IM.INDEX.GETFN    (IM.INDEX.GETFN   & +% + +&IM.INDEX.GETFN  X-% )IM.INDEX.GETFN  ,  + )IM.INDEX.GETFN     (IM.INDEX.GETFN   + +'0<  'IM.INDEX.GETFN   + 0 qA  )IM.INDEX.GETFN ' 7   n )IM.INDEX.GETFN  )*4 + + 0IM.INDEX.GETFN ) )IM.INDEX.GETFN & +IM.INDEX.GETFN W +IM.INDEX.GETFN P &IM.INDEX.GETFN J (IM.INDEX.GETFN # +IM.INDEX.GETFN )  HRULE.GETFNMODERN %A $+qkz \ No newline at end of file diff --git a/library/HASHFILE.TEDIT b/library/HASHFILE.TEDIT new file mode 100644 index 00000000..0dd707aa Binary files /dev/null and b/library/HASHFILE.TEDIT differ diff --git a/library/MASTERSCOPE.TEDIT b/library/MASTERSCOPE.TEDIT new file mode 100644 index 00000000..4e14e8b9 --- /dev/null +++ b/library/MASTERSCOPE.TEDIT @@ -0,0 +1,116 @@ +1 Lisp Library Modules, Medley Release 1.15, MASTERSCOPE 1 Lisp Library Modules, Medley Release 1.15, MASTERSCOPE MASTERSCOPE 1 MASTERSCOPE 1 MASTERSCOPE 6 MasterScope(MASTERSCOPE NIL MasterScope NIL NIL 157) is an interactive program for analyzing and cross referencing user programs(ROSS% REFERENCING% USER% PROGRAMS NIL ross% referencing% user% programs NIL NIL 157). It contains facilities for analyzing user functions(ANALYZING% USER% FUNCTIONS NIL analyzing% user% functions NIL NIL 157) to determine what other functions are called; how and where variables are bound, set, or referenced; and which functions use particular record declarations. MasterScope can analyze definitions directly from a file as well as in-memory definitions. MasterScope maintains a database of the results of the analyses it performs. Via a simple command language, you may interrogate the database, call the editor on those expressions in functions that were analyzed which use variables or functions in a particular way, or display the tree structure of function calls among any set of functions. MasterScope is interfaced with the editor and file manager so that when a function is edited or a new definition loaded in, MasterScope knows that it must reanalyze that function. With the Medley release, MasterScope now understands Common Lisp defun, defmacro, and defvar. Requirements 1 MSANALYZE, MSPARSE, MSCOMMON, MS-PACKAGE You may also want to make use of Browser, DataBaseFns, and SEdit or DEdit. Installation 1 Load MASTERSCOPE.DFASL and the other .DFASL files from the library. MasterScope Command Language 1 You communicate with MasterScope using an English-like command language, e.g., WHO CALLS PRINT. With these commands, you can direct that functions be analyzed, interrogate the MasterScope database(MASTERSCOPE% DATABASE NIL MasterScope% database NIL NIL 157), and perform other operations. The commands deal with sets of functions, variables, etc., and relations between them (e.g., call, bind). Sets correspond to English nouns; relations correspond to verbs. A set of atoms can be specified in a variety of ways, either explicitly, e.g., FUNCTIONS ON FIE specifies the atoms in (FILEFNSLST 'FIE), or implicitly, e.g., NOT CALLING Y, where the meaning must be determined in the context of the rest of the command. Such sets of atoms are the basic building blocks with which the command language deals. MasterScope also deals with relations between sets(RELATIONS% BETWEEN% SETS NIL relations% between% sets NIL NIL 157). For example, the relation CALL relates functions and other functions; the relations BIND and USE FREELY relate functions and variables. These relations get stored in the MasterScope database when functions are analyzed. In addition, MasterScope "knows" about file manager conventions; CONTAIN relates files and various types of objects (functions, variables). Sets and relations are used (along with a few additional words) to form sentence-like commands. For example, the command WHO ON 'FOO USE 'X FREELY prints out the list of functions contained in the file FOO which use the variable X freely. The command EDIT WHERE ANY CALLS 'ERROR calls EDITF (see IRM) on those functions which have previously been analyzed that directly call ERROR, pointing at each successive expression where the call to ERROR actually occurs. MasterScope Commands(MASTERSCOPE% COMMANDS NIL MasterScope% Commands NIL NIL 158) The normal mode of communication with MasterScope is via commands. These are sentences in the MasterScope command language which direct MasterScope to answer questions or perform various operations. MasterScope commands are typed into the Executive window, preceded by a period (.) to distinguish them from other commands to the Exec. MasterScope keywords can be in any package, so MasterScope commands can be issued in any type of Exec. The commands may be typed uppercase or lowercase. To use a keyword as a variable or function name, you must use a single quote in front of it, e.g., .WHO SETS 'SETS. Note: Any MasterScope command may be followed by OUTPUT FILENAME to send output tothe given file rather than the terminal, e.g., .WHO CALLS WHO OUTPUT CROSSREF. ANALYZE SET [MasterScope command] Analyzes the functions in SET (and any functions called by them) and includes the information gathered in the database. MasterScope does not reanalyze a function if it thinks it already has valid information about that function in its database. You may use the command REANALYZE to force reanalysis. Note that whenever a function is referred to in a command as a subject of one of the relations, it is automatically analyzed; you need not give an explicit ANALYZE command. Thus, WHO IN MYFNS CALLS FIE automatically analyzes the functions in MYFNS if they have not already been analyzed. Note also that only EXPR definitions are analyzed; that is, MasterScope does not analyze compiled code. If necessary, the definition is DWIMIFYed before analysis. If there is no in-core definition for a function (either in the function definition cell or an EXPR property), MasterScope attempts to read in the definition from a file. Files which have been explicitly mentioned previously in some command are searched first. If the definition cannot be found on any of those files, MasterScope looks among the files on FILELST for a definition. If a function is found in this manner, MasterScope prints a message "(reading from FILENAME)". If no definition can be found at all, MasterScope prints a message "FN can't be analyzed". If the function previously was known, the message "FN disappeared!" is printed. REANALYZE SET [MasterScope command] Causes MasterScope to reanalyze the functions in SET (and any functions called by them) even if it already has valid information in its database. This would be necessary if you had disabled or subverted the file manager; e.g., performed PUTD's to change the definition of functions. ERASE SET [MasterScope command] Erases all information about the functions in SET from the database. ERASE by itself clears the entire database. SHOW PATHS PATHOPTIONS [MasterScope command] Displays a tree of function calls. This is described fully in "SHOW PATHS" below. SET RELATION SET [MasterScope command] SET IS SET [MasterScope command] SET ARE SET [MasterScope command] These commands have the same format as an English sentence with a subject (the first SET), a verb (RELATION or IS or ARE), and an object (the second SET). Any of the SETs within the command may be preceded by the question determiners WHICH or WHO (or just WHO alone). For example, WHICH FUNCTIONS CALL X prints the list of functions that call the function X. RELATION may be one of the relation words in present tense (CALL, BIND, TEST, SMASH, etc.) or used as a passive (e.g., WHO IS CALLED BY WHO). Other variants are allowed, e.g., WHO DOES X CALL, IS FOO CALLED BY FIE, etc. The interpretation of the command depends on the number of question elements present: If there is no question element, the command is treated as an assertion and MasterScope returns either T or NIL, depending on whether that assertion is true. Thus, ANY IN MYFNS CALL HELP prints T if any function in MYFNS call the function HELP, and NIL otherwise. If there is one question element, MasterScope returns the list of items for which the assertion would be true. For example, MYFN BINDS WHO USED FREELY BY YOURFN prints the list of variables bound by MYFN which are also used freely by YOURFN. If there are two question elements, MasterScope prints a doubly indexed list: _. WHO CALLS WHO IN /FNS RECORDSTATEMENT -- /RPLNODE RECORDECL1 -- /NCONC, /RPLACD, /RPLNODE RECREDECLARE1 -- /PUTHASH UNCLISPTRAN -- /PUTHASH, /RPLNODE2 RECORDWORD -- /RPLACA RECORD1 -- /RPLACA, /SETTOPVAL EDITREC -- /SETTOPVAL EDIT WHERE SET RELATION SET [- EDITCOMS] [MasterScope command] (WHERE may be omitted.) The first SET refers to a set of functions. The EDIT command calls the editor on each expression where the RELATION actually occurs. For example, EDIT WHERE ANY CALL ERROR calls EDITF on each (analyzed) function which calls ERROR stopping within a TTY: at each call to ERROR. Currently you cannot EDIT WHERE a file which CONTAINS a datum, nor where one function CALLS another SOMEHOW. EDITCOMS, if given, is a list of commands passed to EDITF to be performed at each expression. For example, EDIT WHERE ANY CALLS MYFN DIRECTLY - (SW 2 3) P switches the first and second arguments to MYFN in every call to MYFN and prints the result. EDIT WHERE ANY ON MYFILE CALL ANY NOT @ GETD calls the editor on any expression involving a call to an undefined function. Note that EDIT WHERE X SETS Y points only at those expressions where Y is actually set, and skips over places where Y is otherwise mentioned. SHOW WHERE SET RELATION SET [MasterScope command] Like the EDIT command except merely prints out the expressions without calling the editor. EDIT SET [- EDITCOMS] [MasterScope command] Calls EDITF on each function in SET. EDITCOMS, if given, is passed as a list of editor commands to be Executed. For example, EDIT ANY CALLING FN1 - (R FN1 FN2) replaces FN1 by FN2 in those functions that call FN1. DESCRIBE SET [MasterScope command] Prints the BIND, USE FREELY and CALL information about the functions in SET. For example, the command DESCRIBE PRINTARGS might print out: PRINTARGS[N,FLG] binds: TEM,LST,X calls: MSRECORDFILE,SPACES,PRIN1 called by: PRINTSENTENCE,MSHELP,CHECKER This shows that PRINTARGS has two arguments, N and FLG; binds internally the variables TEM, LST and X; calls MSRECORDFILE, SPACES and PRIN1; and is called by PRINTSENTENCE, MSHELP, and CHECKER. You can specify additional information to be included in the description. DESCRIBELST is a list each of whose elements is a list containing a descriptive string and a form. The form is evaluated (it can refer to the name of the funtion being described by the free variable FN). If it returns a non-NIL value, the description string is printed followed by the value. If the value is a list, its elements are printed with commas between them. For example, the entry ("types: " (GETRELATION FN '(USE TYPE) T) would include a listing of the types used by each function. CHECK SET [MasterScope command] Checks for various anomalous conditions (mainly in the compiler declarations) for the files in SET (if SET is not given, FILELST is used). For example, this command warns about: f Variables which are bound but never referenced f Functions in BLOCKS declarations which aren't on the file containing the declaration f Functions declared as ENTRIES but not in the block f Variables which may not need to be declared SPECVARS because they are not used freely below the places where they are bound FOR VARIABLE SET I.S.TAIL [MasterScope command] This command provides a way of combining CLISP iterative statements with MasterScope. An iterative statement is constructed in which VARIABLE is iteratively assigned to each element of SET, and then the iterative statement tail I.S.TAIL is executed. For example, FOR X CALLED BY FOO WHEN CCODEP DO (PRINTOUT T X ,,, (ARGLIST X) T) prints out the name and argument list of all of the compiled functions which are called by FOO. MasterScope Relations(MASTERSCOPE% RELATIONS NIL MasterScope% Relations NIL NIL 161) A relation is specified by one of the keywords below. Some of these "verbs" accept modifiers. For example, USE, SET, SMASH and REFERENCE all may be modified by FREELY. The modifier may occur anywhere within the command. If there is more than one verb, any modifier between two verbs is assumed to modify the first one. For example, in USING ANY FREELY OR SETTING X, FREELY modifies USING but not SETTING. The entire phrase is interpreted as the set of all functions which either use any variable freely or set the variable X, whether or not X is set freely. Verbs can occur in the present tense (e.g., USE, CALLS, BINDS, USES) or as present or past participles (e.g., CALLING, BOUND, TESTED). The relations (with their modifiers) recognized by MasterScope are: CALL [MasterScope relation] Function F1 calls F2 if the definition of F1 contains a form (F2 --). The CALL relation also includes any instance where a function uses a name as a function, as in (APPLY (QUOTE F2) --), (FUNCTION F2), etc. (CALL and CALLS are equivalent.) CALL SOMEHOW [MasterScope relation] One function calls another SOMEHOW if there is some path from the first to the other. That is, if F1 calls F2, and F2 calls F3, then F1 CALLS F3 SOMEHOW. This information is not stored directly in the database; instead, MasterScope stores only information about direct function calls, and (re)computes the CALL SOMEHOW relation as necessary. USE [MasterScope relation] If unmodified, the relation USE denotes variable usage in any way; it is the union of the relations SET, SMASH, TEST, and REFERENCE. SET [MasterScope relation] A function SETs a variable if the function contains a form (SETQ var --), (SETQQ var --), etc. SMASH [MasterScope relation] A function SMASHes a variable if the function calls a destructive list operation (RPLACA, RPLACD, DREMOVE, SORT, etc.) on the value of that variable. MasterScope also finds instances where the operation is performed on a part of the value of the variable. For example, if a function contains a form (RPLACA (NTH X 3) T), it is noted as SMASHing X. If the function contains a sequence (SETQ Y X), (RPLACA Y T), then Y is noted as being SMASHed, but not X. TEST [MasterScope relation] A variable is TESTed by a function if its value is only distinguished between NIL and non-NIL. For example, the form (COND ((AND X --) --)) tests the value of X. REFERENCE [MasterScope relation] This relation includes all variable usage except for SET. Note: The verbs USE, SET, SMASH, TEST and REFERENCE may be modified by the words FREELY or LOCALLY. A variable is used FREELY if it is not bound in the function at the place of its use. It is used LOCALLY if the use occurs within a PROG or LAMBDA that binds the variable. MasterScope also distinguishes between CALL DIRECTLY and CALL INDIRECTLY. A function is called directly if it occurs as CAR-of-form in a normal evaluation context. A function is called indirectly if its name appears in a context which does not imply its immediate evaluation, for example (SETQ Y (LIST (FUNCTION FOO) 3)). The distinction is whether or not the compiled code of the caller would contain a direct call to the callee. Note that an occurrence of (FUNCTION FOO) as the functional argument to one of the built-in mapping functions which compile open is considered to be a direct call. In addition, CALL FOR EFFECT (where the value of the function is not used) is distinguished from CALL FOR VALUE. BIND [MasterScope relation] The BIND relation between functions and variables includes both variables bound as function arguments and those bound in an internal PROG or LAMBDA expression. USE AS A FIELD [MasterScope relation] MasterScope notes all uses of record field names within FETCH, REPLACE or CREATE expressions. FETCH [MasterScope relation] Use of a field within a FETCH expression. REPLACE [MasterScope relation] Use of a record field name within a REPLACE or CREATE expression. USE AS A RECORD [MasterScope relation] MasterScope notes all uses of record names within CREATE or TYPE? expressions. Additionally, in (fetch (FOO FIE) of X), FOO is used as a record name. CREATE [MasterScope relation] Use of a record name within a CREATE expression. USE AS A PROPERTY NAME [MasterScope relation] MasterScope notes the property names used in expressions such as GETPROP, PUTPROP, GETLIS, etc., if the name is quoted; e.g. if a function contains a form (GETPROP X (QUOTE INTERP)), then that function USEs INTERP as a property name. USE AS A CLISP WORD [MasterScope relation] MasterScope notes all iterative statement operators and user defined CLISP words as being used as a CLISP word. CONTAIN [MasterScope relation] Files CONTAIN functions, records, and variables. This relation is not stored in the database but is computed using the file manager. DECLARE AS LOCALVAR [MasterScope relation] DECLARE AS SPECVAR [MasterScope relation] MasterScope notes internal calls to DECLARE from within functions. ACCEPT [MasterScope relation] SPECIFY [MasterScope relation] KEYCALL [MasterScope relation] MasterScope notes keyword arguments of Common Lisp functions when they are analyzed and when they are called. FOO ACCEPTS :BAR is true if FOO is a Common Lisp function that accepts the keyword :BAR. FOO ACCEPTS &ALLOW-OTHER-KEYS is true if FOO has &ACCEPT-OTHER-KEYS in its lambda list. FOO SPECIFIES :BAR is true if FOO is a function that calls any function with the keyword :BAR; the function in question must ACCEPT :BAR. FOO KEYCALLS BAR is true if FOO is a function and calls BAR with one or more keywords it ACCEPTS. FLET [MasterScope relation] LABEL [MasterScope relation] MACROLET [MasterScope relation] LOCAL-DEFINE [MasterScope relation] MasterScope tracks uses of Common Lisp local definition forms (it currently does not expand them while analyzing them, however). FOO FLETS BAR is true of FOO is a function with a FLET defining BAR local to FOO. LABELS and MACROLETS are similar. LOCAL-DECLARES is the union of FLETS, LABELS, and MACROLETS. Abbreviations The following abbreviations are recognized: FREE=FREELY LOCAL=LOCALLY PROP=PROPERTY REF=REFERENCE Also, the words A, AN and NAME (after AS) are "noise" words and may be omitted. MasterScope Templates(MASTERSCOPE% TEMPLATES NIL MasterScope% Templates NIL NIL 164) MasterScope uses templates (see "Effecting MasterScope Analysis" below) to decide which relations hold between functions and their arguments. For example, the information that SORT SMASHes its first argument is contained in the template for SORT. MasterScope initially contains templates for most system functions which set variables, test their arguments, or perform destructive operations. You may change existing templates or insert new ones in MasterScope's tables via the SETTEMPLATE function (below). MasterScope also constructs templates to handle Common Lisp functions with keyword arguments. These constructed templates are noticed by FILES? and can be saved if desired, or MasterScope can recreate them by analyzing the functions again. MasterScope Set Specifications(MASTERSCOPE% SET% SPECIFICATIONS NIL MasterScope% Set% Specifications NIL NIL 164) A set is a collection of things (functions, variables, etc.). A set is specified by a set phrase, consisting of a determiner (e.g., ANY, WHICH, WHO) followed by a type (e.g., FUNCTIONS, VARIABLES) followed by a specification (e.g., IN MYFNS). The determiner, type and specification may be used alone or in combination. For example, ANY FUNCTIONS IN MYFNS, VARIABLES IN GLOBALVARS, and WHO are all acceptable set phrases. Note: Sets may also be specified with relative clauses introduced by the word THAT, e.g. THE FUNCTIONS THAT BIND 'X. 'ATOM [MasterScope set specification] The simplest way to specify a set consisting of a single thing is by the name of that thing. For example, in the command WHO CALLS 'ERROR, the function ERROR is referred to by its name. Although the ' (apostrophe) can be left out, to resolve possible ambiguities names should usually be quoted; e.g., WHO CALLS 'CALLS returns the list of functions which call the function CALLS. 'LIST [MasterScope set specification] Sets consisting of several atoms may be specified by naming the atoms. For example, the command WHO USES '(A B) returns the list of functions that use the variables A or B. IN EXPRESSION [MasterScope set specification] The form EXPRESSION is evaluated, and its value is treated as a list of the elements of a set. For example, IN GLOBALVARS specifies the list of variables in the value of the variable GLOBALVARS. @ PREDICATE [MasterScope set specification] A set may also be specified by giving a predicate which the elements of that set must satisfy. PREDICATE is either a function name, a LAMBDA expression, or an expression in terms of the variable X. The specification @ PREDICATE represents all atoms for which the value of PREDICATE is non-NIL. For example, @ EXPRP specifies all those atoms which have EXPR definitions; @ (STRPOSL X CLISPCHARRAY) specifies those atoms which contain CLISP characters. The universe to be searched is either determined by the context within the command (e.g., in WHO IN FOOFNS CALLS ANY NOT @ GETD, the predicate is only applied to functions which are called by any functions in the list FOOFNS), or in the extreme case, the universe defaults to the entire set of things which have been noticed by MasterScope, as in the command WHO IS @ EXPRP. LIKE ATOM [MasterScope set specification] ATOM may contain ESCapes; it is used as a pattern to be matched, as in the editor. For example, WHO LIKE /R$ IS CALLED BY ANY would find both /RPLACA and /RPLNODE. (The ESC character prints out as a $; it is a wildcard for any number of characters.) FIELDS OF SET [MasterScope set specification] SET is a set of records. This denotes the field names of those records. For example, the command WHO USES ANY FIELDS OF BRECORD returns the list of all functions which do a fetch or replace with any of the field names declared in the record declaration of BRECORD. KNOWN [MasterScope set specification] The set of all functions which have been analyzed. For example, the command WHO IS KNOWN prints out the list of functions which have been analyzed. THOSE [MasterScope set specification] The set of things printed out by the last MasterScope question. For example, following the command WHO IS USED FREELY BY PARSE you could ask WHO BINDS THOSE to find out where those variables are bound. ON PATH PATHOPTIONS [MasterScope set specification] Refers to the set of functions which would be printed by the command SHOW PATHS PATHOPTIONS. For example, IS FOO BOUND BY ANY ON PATH TO 'PARSE tests whether FOO might be bound above the function PARSE (that is, whether FOO is bound in any function that is higher up in the calling tree than PARSE is) . SHOW PATHS is explained in detail below. Set Specifications by Relation(SET% SPECIFICATIONS% BY% RELATION NIL Set% Specifications% by% Relation NIL NIL 166) A set may also be specified by giving a relation its members must have with the members of another set: RELATIONING SET [MasterScope set specification] RELATIONING is used here generically to mean any of the relation words in the present participle form (possibly with a modifier), e.g., USING, SETTING, CALLING, BINDING. RELATIONING SET specifies the set of all objects which have that relation with some element of SET. For example, CALLING X specifies the set of functions which call the function X; USING ANY IN FOOVARS FREELY specifies the set of functions which uses freely any variable in the value of FOOVARS. RELATIONED BY SET [MasterScope set specification] RELATIONED IN SET [MasterScope set specification] This is similar to the RELATIONING construction. For example, CALLED BY ANY IN FOOFNS represents the set of functions which are called by any element of FOOFNS; USED FREELY BY ANY CALLING ERROR is the set of variables which are used freely by any function which also calls the function ERROR. Set Specifications by Blocktypes(SET% SPECIFICATIONS% BY% BLOCKTYPES NIL Set% Specifications% by% Blocktypes NIL NIL 167) BLOCKTYPE OF FUNCTIONS [MasterScope set specification] BLOCKTYPE ON FILES [MasterScope set specification] These phrases allow you to ask about BLOCKS declarations on files (see IRM). BLOCKTYPE is one of LOCALVARS, SPECVARS, GLOBALVARS, ENTRIES, BLKFNS, BLKAPPLYFNS, or RETFNS. BLOCKTYPE OF FUNCTIONS specifies the names which are declared to be BLOCKTYPE in any blocks declaration which contain any of FUNCTIONS (a "set" of functions). The "functions" in FUNCTIONS can either be block names or just functions in a block. For example, WHICH ENTRIES OF ANY CALLING 'Y BIND ANY GLOBALVARS ON 'FOO. BLOCKTYPE ON FILES specifies all names which are declared to be BLOCKTYPE on any of the given FILES (a "set" of files). Set Determiners(SET% DETERMINERS NIL Set% Determiners NIL NIL 167) Set phrases may be preceded by a determiner, which is one of the words THE, ANY, WHO or WHICH. The question determiners (WHO and WHICH) are meaningful in only some of the commands, namely those that take the form of questions. ANY and WHO (or WHOM) can be used alone; they are wild-card elements, e.g., the command WHO USES ANY FREELY, prints out the names of all (known) functions which use any variable freely. If the determiner is omitted, ANY is assumed; e.g., the command WHO CALLS '(PRINT PRIN1 PRIN2) prints the list of functions which call any of PRINT, PRIN1, PRIN2. THE is also allowed, e.g., WHO USES THE RECORD FIELD FIELDX. Set Types(SET% TYPES NIL Set% Types NIL NIL 167) Any set phrase has a type; that is, a set may specify either functions, variables, files, record names, record field names or property names. The type may be determined by the context within the command (e.g., in CALLED BY ANY ON FOO, the set ANY ON FOO is interpreted as meaning the functions on FOO since only functions can be CALLED), or you may give the type explicitly (e.g., FUNCTIONS ON FIE). The following types are recognized: FUNCTIONS, VARIABLES, FILES, PROPERTY NAMES, RECORDS, FIELDS, I.S.OPRS. Also, the abbreviations FNS, VARS, PROPNAMES or the singular forms FUNCTION, FN, VARIABLE, VAR, FILE, PROPNAME, RECORD, FIELD are recognized. Note that most of these types correspond to built-in file manager types (see IRM). The type is used by MasterScope in a variety of ways when interpreting the set phrase: 1. Set types are used to disambiguate possible parsings. For example, both commands WHO SETS ANY BOUND IN X OR USED BY Y WHO SETS ANY BOUND IN X OR CALLED BY Y have the same general form. However, the first case is parsed as WHO SETS ANY (BOUND BY X OR USED BY Y) since both BOUND BY X and USED BY Y refer to variables; while the second case is parsed as WHO SETS ANY BOUND IN (X OR CALLED BY Y), since CALLED BY Y and X must refer to functions. Note that parentheses may be used to group phrases. 2. The type is used to determine the modifier for USE: FOO USES WHICH RECORDS is equivalent to FOO USES WHO AS A RECORD FIELD. 3. The interpretation of CONTAIN depends on the type of its object: the command WHAT FUNCTIONS ARE CONTAINED IN MYFILE prints the list of functions in MYFILE. WHAT RECORDS ARE ON MYFILE prints the list of records. 4. The implicit universe in which a set expression is interpreted depends on the type: ANY VARIABLES @ GETD is interpreted as the set of all variables which have been noticed by MasterScope (i.e., bound or used in any function which has been analyzed) that also have a definition. ANY FUNCTIONS @ (NEQ (GETTOPVAL X) 'NOBIND) is interpreted as the set of all functions which have been noticed (either analyzed or called by a function which has been analyzed) that also have a top-level value. Conjunctions of Sets(CONJUNCTIONS% OF% SETS NIL Conjunctions% of% Sets NIL NIL 168) Sets may be joined by the conjunctions AND and OR or preceded by NOT to form new sets. AND is always interpreted as meaning intersection; OR as union; NOT as complement. For example, the set CALLING X AND NOT CALLED BY Y specifies the set of all functions which call the function X but are not called by Y. Note: MasterScope's interpretation of AND and OR follow Lisp conventions rather than the conventional English interpretation. "Calling X and Y" would, in English, be interpreted as the intersection of (CALLING X) and (CALLING Y); but MasterScope interprets CALLING X AND Y as CALLING ('X AND 'Y), which is the null set. Only sets may be joined with conjunctions. Joining modifiers, as in USING X AS A RECORD FIELD OR PROPERTY NAME is not allowed; in this case, you must type USING X AS A RECORD FIELD OR USING X AS A PROPERTY NAME As described above, the type of set is used to disambiguate parsings. The algorithm used is to first try to match the type of the phrases being joined and then try to join with the longest preceding phrase. In any case, you may group phrases with parentheses to specify the manner in which conjunctions should be parsed. SHOW PATHS(SHOW% PATHS (command) NIL NIL NIL 169) 1 In trying to work with large programs, you can lose track of the hierarchy of functions. The MasterScope SHOW PATHS command aids you by providing a map showing the calling structure of a set of functions. SHOW PATHS prints out a tree structure showing which functions call which other functions. Loading the Browser library module modifies the SHOW PATHS command so the command's output is displayed as an undirected graph. The SHOW PATHS command takes the form: SHOW PATHS followed by some combination of the following path options: FROM SET [MasterScope path option] Display the function calls from the elements of SET. TO SET [MasterScope path option] Display the function calls leading to elements of SET. If TO is given before FROM (or no FROM is given), the tree is inverted and a message (inverted tree) is printed to warn you that if FN1 appears after FN2 it is because FN1 is called by FN2. Note: When both FROM and TO are given, the first one indicates a set of functions to be displayed, while the second restricts the paths to be traced; i.e., the command SHOW PATHS FROM X TO Y traces the elements of the set CALLED SOMEHOW BY X AND CALLING Y SOMEHOW. If TO is not given, TO KNOWN OR NOT @ GETD is assumed; that is, only functions which have been analyzed or which are undefined will be included. Note that MasterScope analyzes a function while printing out the tree if that function has not previously been seen and it currently has an EXPR definition. Thus, any function which can be analyzed will be displayed. AVOIDING SET [MasterScope path option] Do not display any function in SET. AMONG is recognized as a synonym for AVOIDING NOT. For example, SHOW PATHS TO ERROR AVOIDING ON FILE2 does not display (or trace) any function on FILE2. NOTRACE SET [MasterScope path option] Do not trace from any element of SET. NOTRACE differs from AVOIDING in that a function which is marked NOTRACE is printed, but the tree beyond it is not expanded. The functions in an AVOIDING set are not printed at all. For example, SHOW PATHS FROM ANY ON FILE1 NOTRACE ON FILE2 displays the tree of calls eminating from FILE1, but does not expand any function on FILE2. SEPARATE SET [MasterScope path option] Give each element of SET a separate tree. Note: FROM and TO only insure that the designated functions are displayed. SEPARATE can be used to guarantee that certain functions begin new tree structures. SEPARATE functions are displayed in the same manner as overflow lines; i.e., when one of the functions indicated by SEPARATE is found, it is printed followed by a forward reference (a lowercase letter in braces) and the tree for that function is then expanded below. LINELENGTH N [MasterScope path option] Resets LINELENGTH to N before displaying the tree. The linelength is used to determine when a part of the tree should "overflow" and be expanded lower. Error Messages 1 When you give MasterScope a command, the command is first parsed, i.e. translated to an internal representation, and then the internal representation is interpreted. If a command cannot be parsed, e.g. if you typed SHOW WHERE CALLED BY X MasterScope would reply Sorry, I can't parse that! and generate an error. If the command is of the correct form but cannot be interpreted (e.g., the command EDIT WHERE ANY CONTAINS ANY) MasterScope prints the message Sorry, that isn't implemented! and generates an error. If the command requires some functions having been analyzed (e.g., the command WHO CALLS X) and the database is empty, MasterScope prints the message Sorry, no functions have been analyzed! and generates an error. Macro Expansion(MACRO% EXPANSION NIL Macro% Expansion NIL NIL 170) 1 As part of analysis, MasterScope expands the macro definition of called functions if they are not otherwise defined (see IRM). MasterScope always expands Common Lisp DEFMACRO definitions (unless it finds a template for the macro). MasterScope Interlisp macro expansion is controlled by a variable: MSMACROPROPS(MSMACROPROPS (variable) NIL NIL NIL 170) [Variable] Value is an ordered list of macro-property names that MasterScope searches to find a macro definition. Only the kinds of macros that appear on MSMACROPROPS are expanded. All others are treated as function calls and left unexpanded. Initially (MACRO). Note: MSMACROPROPS initially contains only MACRO (not 10MACRO, DMACRO, etc.) on the assumption that the machine-dependent macro definitions are more likely "optimizers". If you edit a macro, MasterScope knows to reanalyze the functions which call that macro. Note: If your macro is of the "computed-macro" style, and it calls functions which you edit, MasterScope does not notice. You must be careful to tell masterscope to REANALYZE the appropriate functions (e.g., if you edit FOOEXPANDER which is used to expand FOO macros, you have to REANALYZE ANY CALLING FOO. Effecting MasterScope Analysis(EFFECTING% MASTERSCOPE% ANALYSIS NIL Effecting% MasterScope% Analysis NIL NIL 171) 1 MasterScope analyzes the EXPR definition of a function,(EXPR% DEFINITIONS% OF% FUNCTIONS NIL expr% definitions% of% functions NIL NIL 171) and notes in its database the relations that this function has with other functions and with variables. To perform this analysis, MasterScope uses templates which describe the behavior of functions. For example, the information that SORT destructively modifies its first argument is contained in the template for SORT. MasterScope initially contains templates for most system functions that set variables, test their arguments, or perform destructive operations. A template is a list structure containing any of the following atoms: PPE [in MasterScope template] If an expression appears in this location, there is most likely a parenthesis error. MasterScope notes this as a call to the function ppe (lowercase). Therefore, SHOW WHERE ANY CALLS ppe prints out all possible parenthesis errors. When MasterScope finds a possible parenthesis error in the course of analyzing a function definition, rather than printing the usual ".", it prints out a "?" instead. MasterScope notes functions called with keywords they do not accept as calls to ppe. NIL [in MasterScope template] The expression occuring at this location is not evaluated. SET [in MasterScope template] A variable appearing at this place is set. SMASH [in MasterScope template] The value of this expression is smashed. TEST [in MasterScope template] Is used as a predicate (that is, the only use of the value of the expression is whether it is NIL or non-NIL). PROP [in MasterScope template] Is used as a property name. If the value of this expression is of the form (QUOTE ATOM), MasterScope notes that ATOM is USED AS A PROPERTY NAME. For example, the template for GETPROP is (EVAL PROP . PPE). KEYWORD key1... [in MasterScope template] Must appear at the end of a template followed by the keywords the templated function accepts. For example, the template for CL:MEMBER is (EVAL EVAL KEYWORDS :TEST :TEST-NOT :KEY). FUNCTION [in MasterScope template] The expression at this point is used as a functional argument. For example, the template for MAPC is (SMASH FUNCTION FUNCTION . PPE) FUNCTIONAL [in MasterScope template] The expression at this point is used as a functional argument. This is like FUNCTION, except that MasterScope distinguishes between functional arguments to functions which compile open from those that do not. For the latter (e.g. SORT and APPLY), FUNCTIONAL should be used rather than FUNCTION. EVAL [in MasterScope template] The expression at this location is evaluated (but not set, smashed, tested, used as a functional argument, etc.). RETURN [in MasterScope template] The value of the function (of which this is the template) is the value of this expression. TESTRETURN [in MasterScope template] A combination of TEST and RETURN: If the value of the function is non-NIL, then it is returned. For instance, a one-element COND clause is this way. EFFECT [in MasterScope template] The expression at this location is evaluated, but the value is not used. (That is, it is evaluated for its side effect only.) FETCH [in MasterScope template] An atom at this location is a field which is fetched. REPLACE [in MasterScope template] An atom at this location is a field which is replaced. RECORD [in MasterScope template] An atom at this location is used as a record name. CREATE [in MasterScope template] An atom at this location is a record which is created. BIND [in MasterScope template] An atom at this location is a variable which is bound. CALL [in MasterScope template] An atom at this location is a function which is called. CLISP [in MasterScope template] An atom at this location is used as a CLISP word. ! [in MasterScope template] This atom, which can only occur as the first element of a template, allows you to specify a template for the CAR of the function form. If ! doesn't appear, the CAR of the form is treated as if it had a CALL specified for it. In other words, the templates (.. EVAL) and (! CALL .. EVAL) are equivalent. If the next atom after a ! is NIL, this specifies that the function name should not be remembered. For example, the template for AND is (! NIL .. TEST RETURN), which means that if you see an AND, don't remember it as being called. This keeps the MasterScope database from being cluttered by too many uninteresting relations. MasterScope also throws away relations for COND, CAR, CDR, and a couple of others. Special Forms In addition to the above atoms that occur in templates, there are some special forms which are lists keyed by their CAR. .. TEMPLATE [in MasterScope template] Any part of a template may be preceded by the atom .. (two periods) which specifies that the template should be repeated an indefinite number (N>=0) of times to fill out the expression. For example, the template for COND might be (.. (TEST .. EFFECT RETURN)) while the template for SELECTQ is (EVAL .. (NIL .. EFFECT RETURN) RETURN). (Although MasterScope "throws away" the relations for COND, it makes sense to template COND because there may be important information within the arguments of COND.) (BOTH TEMPLATE1 TEMPLATE2) [in MasterScope template] Analyze the current expression twice, using the each of the templates in turn. (IF EXPRESSION TEMPLATE1 TEMPLATE2) [in MasterScope template] Evaluate EXPRESSION at analysis time (the variable EXPR is bound to the expression which corresponds to the IF), and if the result is non-NIL, use TEMPLATE1, otherwise TEMPLATE2. If EXPRESSION is a literal atom, it is APPLYd to EXPR. For example, (IF LISTP (RECORD FETCH) FETCH) specifies that if the current expression is a list, then the first element is a record name and the second element a field name, otherwise it is a field name. (@ EXPRFORM TEMPLATEFORM) [in MasterScope template] Evaluate EXPRFORM giving EXPR, evaluate TEMPLATEFORM giving TEMPLATE. Then analyze EXPR with TEMPLATE. @ lets you compute on the fly both a template and an expression to analyze with it. The forms can use the variable EXPR, which is bound to the current expression. (MACRO . MACRO) [in MasterScope template] MACRO is interpreted in the same way as macros (see IRM) and the resulting form is analyzed. If the template is the atom MACRO alone, MasterScope uses the MACRO property of the function itself. This is useful when analyzing code which contains calls to user-defined macros. If you change a macro property (e.g., by editing it) of an atom which has template of MACRO, MasterScope marks any function which used that macro as needing to be reanalyzed. Some examples of templates: Function Template DREVERSE (SMASH . PPE) AND (! NIL TEST .. RETURN) MAPCAR (EVAL FUNCTION FUNCTION) COND (! NIL .. (IF CDR (TEST .. EFFECT RETURN) (TESTRETURN . PPE))) Templates may be changed and new templates defined using the following functions: (GETTEMPLATE(GETTEMPLATE (function) NIL NIL NIL 174) FN) [Function] Returns the current template of FN. (SETTEMPLATE(SETTEMPLATE (function) NIL NIL NIL 174) FN TEMPLATE) [Function] Changes the template for the function FN and returns the old value. If any functions in the database are marked as calling FN, they are marked as needing reanalysis. Updating the MasterScope Database(UPDATING% THE% MASTERSCOPE% DATA% BASE NIL Updating% the% MasterScope% Data% Base NIL NIL 174) 1 MasterScope is interfaced to the editor and file manager so that it notes whenever a function has been changed, either through editing or loading in a new definition. Whenever a command is given which requires knowing the information about a specific function, if that function has been noted as being changed, the function is automatically reanalyzed before the command is interpreted. If the command requires that all the information in the database be consistent (e.g., you ask WHO CALLS X) then all functions which have been marked as changed are reanalyzed. MasterScope Entries(MASTERSCOPE% ENTRIES NIL MasterScope% Entries NIL NIL 175) 1 (MASTERSCOPE(MASTERSCOPE (function) NIL NIL NIL 175) COMMAND%) [Function] Top level entry to MasterScope. If COMMAND is NIL, enters into an Executive in which you may enter commands. If COMMAND is not NIL, the command is interpreted and MASTERSCOPE returns the value that would be printed by the command. Note that only the question commands return meaningful values. (CALLS(CALLS (function) NIL NIL NIL 175) FN USEDATABASE%) [Function] FN can be a function name, a definition, or a form. Note: CALLS also works on compiled code. CALLS returns a list of four elements: f Functions called by FN f Variables bound in FN f Variables used freely in FN f Variables used globally in FN For the purpose of CALLS, variables used freely which are on GLOBALVARS or have a property GLOBALVAR value T are considered to be used globally. If USEDATABASE is NIL (or FN is not a symbol), CALLS performs a one-time analysis of FN. Otherwise (i.e., if USEDATABASE is non-NIL and FN a function name), CALLS uses the information in MasterScope's database (FN is analyzed first if necessary). (CALLSCCODE(CALLSCCODE (function) NIL NIL NIL 175) FN %) [Function] The subfunction of CALLS which analyzes compiled code. CALLSCCODE returns a list of elements: f Functions called via "linked" function calls (not implemented in Interlisp-D) f Functions called regularly f Variables bound in FN f Variables used freely f Variables used globally (FREEVARS(FREEVARS (function) NIL NIL NIL 175) FN USEDATABASE) [Function] Equivalent to (CADDR (CALLS FN USEDATABASE)). Returns the list of variables used freely within FN. (SETSYNONYM(SETSYNONYM (function) NIL NIL NIL 175) PHRASE MEANING%) [Function] Defines a new synonym for MasterScope's parser. Both OLDPHRASE and NEWPHRASE are words or lists of words; anywhere OLDPHRASE is seen in a command, NEWPHRASE is substituted. For example, (SETSYNONYM 'GLOBALS '(VARS IN GLOBALVARS OR @(GETPROP X 'GLOBALVAR))) would allow you to refer with the single word GLOBALS to the set of variables which are either in GLOBALVARS or have a GLOBALVAR property. Functions for Writing Routines(FUNCTIONS% FOR% WRITING% ROUTINES NIL Functions% for% Writing% Routines NIL NIL 176) The following functions are provided for users who wish to write their own routines using MasterScope's database: (PARSERELATION(PARSERELATION (function) NIL NIL NIL 176) RELATION) [Function] RELATION is a relation phrase; e.g., (PARSERELATION '(USE FREELY)). PARSERELATION returns an internal representation for RELATION. For use in conjunction with GETRELATION. (GETRELATION(GETRELATION (function) NIL NIL NIL 176) ITEM RELATION INVERTED) [Function] RELATION is an internal representation as returned by PARSERELATION (if not, GETRELATION first performs (PARSERELATION RELATION)). ITEM is an atom. GETRELATION returns the list of all atoms which have the given relation to ITEM. For example, (GETRELATION 'X '(USE FREELY)) returns the list of variables that X uses freely. If INVERTED is T, the inverse relation is used; e.g. (GETRELATION 'X '(USE FREELY) T) returns the list of functions which use X freely. If ITEM is NIL, GETRELATION returns the list of atoms which have RELATION with any other item; i.e., it answers the question WHO RELATIONS ANY. Note that GETRELATION does not check to see if ITEM has been analyzed, or that other functions that have been changed have been reanalyzed. (TESTRELATION(TESTRELATION (function) NIL NIL NIL 176) ITEM RELATION ITEM2 INVERTED) [Function] Is equivalent to (MEMB ITEM2 (GETRELATION ITEM RELATION INVERTED)); that is, it tests if ITEM and ITEM2 are related via RELATION. If ITEM2 is NIL, the call is equivalent to (NOT (NULL (GETRELATION ITEM RELATION INVERTED))) i.e., TESTRELATION tests if ITEM has the given RELATION with any other item. (MAPRELATION(MAPRELATION (function) NIL NIL NIL 176) RELATION MAPFN) [Function] Calls the function MAPFN on every pair of items related via RELATION. If (NARGS MAPFN) is 1, then MAPFN is called on every item which has the given RELATION to any other item. (MSNEEDUNSAVE(MSNEEDUNSAVE (function) NIL NIL NIL 176) FNS MSG MARKCHANGEFLG) [Function] Used to mark functions which depend on a changed record declaration (or macro, etc.), and which must be LOADed or UNSAVEd (see below). FNS is a list of functions to be marked, and MSG is a string describing the records, macros, etc. on which they depend. If MARKCHANGEFLG is non-NIL, each function in the list is marked as needing reanalysis. (UPDATEFN(UPDATEFN (function) NIL NIL NIL 177) FN EVENIFVALID %) [Function] Equivalent to the command ANALYZE 'FN; that is, UPDATEFN analyzes FN if FN has not been analyzed before or if it has been changed since the time it was analyzed. If EVENIFVALID is non-NIL, UPDATEFN reanalyzes FN even if MasterScope thinks it has a valid analysis in the database. (UPDATECHANGED(UPDATECHANGED (function) NIL NIL NIL 177)) [Function] Performs (UPDATEFN FN) on every function which has been marked as changed. (MSMARKCHANGED(MSMARKCHANGED (function) NIL NIL NIL 177) NAME TYPE REASON) [Function] Mark that NAME has been changed and needs to be reanalyzed. See MARKASCHANGED in the IRM. (DUMPDATABASE(DUMPDATABASE (function) NIL NIL NIL 177) FNLST) [Function] Dumps the current MasterScope database on the current output file in a LOADable form. If FNLST is not NIL, DUMPDATABASE only dumps the information for the list of functions in FNLST. The variable DATABASECOMS is initialized to ((E (DUMPDATABASE))) Thus, you may merely perform (MAKEFILE 'DATABASE.EXTENSION) to save the current MasterScope database. If a MasterScope database already exists when a DATABASE file is loaded, the database on the file is merged with the one in memory. Note: Functions whose definitions are different from their definition when the database was made must be REANALYZEd if their new definitions are to be noticed. Note: The DataBaseFns library module provides a more convenient way of saving databases along with the source files to which they correspond. Noticing Changes that Require Recompiling(NOTICING% CHANGES% THAT% REQUIRE% RECOMPILING NIL Noticing% Changes% that% Require% Recompiling NIL NIL 177) 1 When a record declaration(RECORD% DECLARATION NIL record% declaration NIL NIL 177), iterative statement operator(ITERATIVE% STATEMENT% OPERATOR NIL iterative% statement% operator NIL NIL 177) or macro(MACRO NIL macro NIL NIL 177) is changed, and MasterScope has noticed a use of that declaration or macro (i.e., it is used by some function known about in the database), MasterScope alerts you about those functions which might need to be recompiled (e.g., they do not currently have EXPR definitions). Extra functions may be noticed. For example, if FOO contains (fetch (REC X) --), and some declaration other than REC which contains X is changed, MasterScope still thinks that FOO needs to be loaded/unsaved. The functions which need recompiling are added to the list MSNEEDUNSAVE and a message is printed out: The functions FN1, FN2,... use macros which have changed. Call UNSAVEFNS() to load and/or unsave them. In this situation, the following function is useful: (UNSAVEFNS(UNSAVEFNS (function) NIL NIL NIL 177) %) [Function] Uses LOADFNS or UNSAVEDEF to make sure that all functions in the list MSNEEDUNSAVE have EXPR definitions, and then sets MSNEEDUNSAVE to NIL. Note: If RECOMPILEDEFAULT(RECOMPILEDEFAULT (variable) NIL NIL NIL 178) (see IRM) is set to CHANGES, UNSAVEFNS prints out "WARNING: you must set RECOMPILEDEFAULT to EXPRS in order to have these functions recompiled automatically." Implementation Notes 1 MasterScope keeps a database of the relations noticed when functions are analyzed. The relations are intersected to form primitive relationships such that there is little or no overlap of any of the primitives. For example, the relation SET is stored as the union of SET LOCAL and SET FREE. The BIND relation is divided into BIND AS ARG, BIND AND NOT USE, and SET LOCAL, SMASH LOCAL, etc. Splitting the relations in this manner reduces the size of the database considerably, to the point where it is reasonable to maintain a MasterScope database for a large system of functions during a normal debugging session. Each primitive relationship(PRIMITIVE% RELATIONSHIP NIL primitive% relationship NIL NIL 178) is stored in a pair of hash tables, one for the forward direction and one for the reverse. For example, there are two hash tables, USE AS PROPERTY and USED AS PROPERTY. To retrieve the information from the database, MasterScope performs unions of the hash values. For example, to answer FOO BINDS WHO, MasterScope looks in all of the tables which make up the BIND relation. The internal representation returned by PARSERELATION is a list of dotted pairs of hash tables. To perform GETRELATION requires only mapping down that list, doing GETHASHs on the appropriate hash tables and UNIONing the result. Hash tables(HASH% TABLES NIL Hash% tables NIL NIL 178) are used for a variety of reasons: storage space is smaller; it is not necessary to maintain separate lists of which functions have been analyzed (a special table, DOESN'T DO ANYTHING is maintained for functions which neither call other functions nor bind or use any variables); and accessing is relatively fast. Within any of the tables, if the hash value is a list of one atom, then the atom itself, rather than the list, is stored as the hash value. This also reduces the size of the database significantly. Example 1 Sample Session The following illustrates some of the MasterScope facilities. 50_. ANALYZE FUNCTIONS ON RECORD ............................... NIL 51_. WHO CALLS RECFIELDLOOK (RECFIELDLOOK ACCESSDEF ACCESSDEF2 EDITREC) 52_. EDIT WHERE ANY CALL RECFIELDLOOK RECFIELDLOOK : (RECFIELDLOOK (CDR Y) FIELD) tty: 5*OK ACCESSDEF : (RECFIELDLOOK DECLST FIELD VAR1) 6*OK (RECFIELDLOOK USERRECLST FIELD) 7*N VAR1 8*OK ACCESSDEF2 : (RECFIELDLOOK (RECORD.SUBDECS TRAN) FIELD) tty: (RECFIELDLOOK (RECORD.SUBDECS TRAN) FIELD) 9*N (CAR TAIL] 10*OK EDITREC : (RECFIELDLOOK USERRECLST (CAR EDITRECX)) 11*OK NIL 53_. WHO CALLS ERROR .. (EDITREC) 54_. SHOW PATHS TO RECFIELDLOOK FROM ACCESSDEF (inverted tree) 1. RECFIELDLOOK RECFIELDLOOK 2. ACCESSDEF 3. ACCESSDEF2 ACCESSDEF2 4. ACCESSDEF 5. RECORDCHAIN ACCESSDEF NIL 55_. WHO CALLS WHO IN /FNS RECORDSTATEMENT -- /RPLNODE RECORDECL1 -- /NCONC, /RPLACD, /RPLNODE RECREDECLARE1 -- /PUTHASH UNCLISPTRAN -- /PUTHASH, /RPLNODE2 RECORDWORD -- /RPLACA RECORD1 -- /RPLACA, /SETTOPVAL EDITREC -- /SETTOPVAL Event 50 You direct that the functions on file RECORD be analyzed. The leading period and space specify that this line is a MasterScope command. MasterScope prints a greeting and prompts with _. Within the top-level Executive of MasterScope, you may issue MasterScope commands, programmer's assistant commands, (e.g., REDO, FIX), or run programs. You can exit from the MasterScope Executive by typing OK. The function "." is defined as a Nlambda NoSpread function which interprets its argument as a MasterScope command, Executes the command and returns. MasterScope prints a"." whenever it (re)analyzes a function, to let you know what it is happening. The feedback when MasterScope analyzes a function is controlled by the flag MSPRINTFLG: if MSPRINTFLG is the atom ".", MasterScope prints out a period. (If an error in the function is detected, "?" is printed instead.) If MSPRINTFLG is a number N, MasterScope prints the name of the function it is analyzing every Nth function. If MSPRINTFLG is NIL, MasterScope won't print anything. Initial setting is ".". Note that the function name is printed when MasterScope starts analyzing, and the comma is printed when it finishes. Event 51 You ask which functions call RECFIELDLOOK. MasterScope responds with the list. Statement 52 You ask to edit the expressions where the function RECFIELDLOOK is called. MasterScope calls EDITF on the functions it had analyzed that call RECFIELDLOOK, directing the editor to the appropriate expressions. You then edit some of those expressions. In this example, the teletype editor is used. If DEdit is enabled as the primary editor, it would be called to edit the appropriate functions. Statement 53 Next you ask which functions call ERROR. Since some of the functions in the database have been changed, MasterScope reanalyzes the changed definitions (and prints out .'s for each function it analyzes). MasterScope responds that EDITREC is the only analyzed function that calls ERROR. Statement 54 You ask to see a map of the ways in which RECFIELDLOOK is called from ACCESSDEF. A tree structure of the calls is displayed. Statement 55 You then ask to see which functions call which functions in the list /FNS. MasterScope responds with a structured printout of these relations. SHOW PATHS(SHOW% PATHS NIL NIL NIL NIL 180) The command SHOW PATHS FROM MSPARSE prints out the structure of MasterScope's parser: 1.MSPARSE MSINIT MSMARKINVALID 2. | MSINITH MSINITH 3. MSINTERPRET MSRECORDFILE 4. | MSPRINTWORDS 5. | PARSECOMMAND GETNEXTWORD CHECKADV 6. | | PARSERELATION {a} 7. | | PARSESET {b} 8. | | PARSEOPTIONS {c} 9. | | MERGECONJ GETNEXTWORD {5} 10. | GETNEXTWORD {5} 11. | FIXUPTYPES SUBJTYPE 12. | | OBJTYPE 13. | FIXUPCONJUNCTIONS MERGECONJ {9} 14. | MATCHSCORE 15. MSPRINTSENTENCE ------------------------------------------------------ overflow - a 16.PARSERELATION GETNEXTWORD {5} 17. CHECKADV ------------------------------------------------------ overflow - b 19.PARSESET PARSESET 20. GETNEXTWORD {5} 21. PARSERELATION {6} 22. SUBPARSE GETNEXTWORD {5} ------------------------------------------------------ overflow - c 23.PARSEOPTIONS GETNEXTWORD {5} 24. PARSESET {19} This example shows that the function MSPARSE calls MSINIT, MSINTERPRET, and MSPRINTSENTENCE. MSINTERPRET in turn calls MSRECORDFILE, MSPRINTWORDS, PARSECOMMAND, GETNEXTWORD, FIXUPTYPES, and FIXUPCONJUNCTIONS. The numbers in braces {} after a function name are backward references: they indicate that the tree for that function was expanded on a previous line. The lowercase letters in braces are forward references: they indicate that the tree for that function will be expanded below, since there is no more room on the line. The vertical bar is used to keep the output aligned. [This page intentionally left blank] (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "") STARTINGPAGE# 157) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (TEXT NIL NIL (54 54 504 702) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (54 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL)))))F0llT1$$TT/$$3H` +T1TT3H` +T2lxx26T2lll2HH +l2```2``x2H``2HH +2Hll-llT2HH2ll-llT3$$(T3(T3(T0$$T-$$T2HHl-HH +T-T-T5lxx5l5ll2ll/HH2HH +2ll/HH +/ll2l2l,ll2(//$$5 +2$$2HH +2H`2H` +2Hll/,,/,HH +,HH,HH-T- T,,,,-T-TF PAGEHEADING VERSOHEADF PAGEHEADING RECTOHEADE PAGEHEADINGFOOTINGVE PAGEHEADINGFOOTINGR5 HELVETICA +TITAN +CLASSIC +TITAN +CLASSIC +CLASSIC +TITAN +CLASSIC +CLASSIC HELVETICA TITAN +CLASSIC + HELVETICA HELVETICAMODERN +MODERNMODERN +TERMINAL +MODERN MODERNMODERNMODERN +E HRULE.GETFNMODERN +E8D HRULE.GETFNMODERN +D8C C HRULE.GETFNMODERN +B B HRULE.GETFNMODERN +: : HRULE.GETFNMODERN9 )IM.INDEX.GETFNL UIM.INDEX.GETFN6 GIM.INDEX.GETFN 8V 8 8C     5 4 HRULE.GETFNMODERN7* 8J  5 4 HRULE.GETFNMODERN7      6 3 HRULE.GETFNMODERN7O  g =IM.INDEX.GETFN 8O     82 CIM.INDEX.GETFN 8  6   +  D 8b 8  8           L  U  +=IM.INDEX.GETFN7 8P  8f   21   B   1   !   !    *  ) !  q  t    g I I  1  !1  1  !.   & 1 +   !S 1   0    0    !U      A    +  !  5   !4        $  & %  !V !          !q !  ' !&     !N   .  (  (  1  + !   #  7  !    )  (   +   !    !,  & ! 1   +     , P ! +  (  .   1 +   !  N 1   + !    D ! % !       1   !   +   $  !     * - !     !                 !K    ! - !<     _     '  2    C      .  H 1  !)  X , (  ! F ![   ?IM.INDEX.GETFN_ 8         8 " 8    =        +      H 1  )        X    )       )  A             )  1  )d        1  )< % 1  )  B              )$ +        1  )  <    )     1  )5   )               I  D )'   1  ! p )  } )  E     )  1  )8       1  )  1  )$    1  )2         1  )  1  )A      B       1  )E     1  )  x 1  0  )$   1   0   0   )p )  6 $     )  9  !  )       1   0   0   0  ) )     +  +   )           +/-             (  +?IM.INDEX.GETFN +/ " + 7     f  +SIM.INDEX.GETFN +/        %  Q        N     1 # )_ )    +  e  7   1 # )I )  6     1  +# ) +N ) > +  1  # )` [     -    )  &      %  k " [    1  # )  A )       )  N 1  # )G )     # )4 ) < 1 # )A )$  )  . 1  # )E +   ) )( )  #    E   +   +UIM.INDEX.GETFN +h 1  #            P   8    R   1  # 0  #       D   ]    +YIM.INDEX.GETFN +1    # 0    # %        +           . 0 - ;  ( =     .    +3IM.INDEX.GETFN +7G            ^      D  n    0           +'IM.INDEX.GETFN +7  + + ,    .   8$                                  8M  8W ;    '  )  A  )  +  9  ,       4 2      !   1  )        X     .   +?IM.INDEX.GETFN +7'        0    8  <     2 8K       8F , 8. 9 8 8q   + 'IM.INDEX.GETFNMODERN* HRULE.GETFNMODERN j + [ + S 80 + F 8 +  + = 1    +0      +2 %  ^         (     )      g   J 1        % -   1   !     $  J     -  *  &        (    ;  M  l  1 +    +      HRULE.GETFNMODERN 2    S      O < )   3IM.INDEX.GETFNMODERN HRULE.GETFNMODERN y ,  ; C 1 )IM.INDEX.GETFNCLASSIC +  Y   (       e Z ( .        SIM.INDEX.GETFN  HRULE.GETFNMODERN%   SIM.INDEX.GETFN ""  L  "F 1  $U $1         _   1  $; 1  $+ 1  $) 1  $^     1  $K        $       $b $  +  1  $@ $   $! 1 +  $M     )   1  $r 1  $[ 1 +  $    &  3   1  $ 1  $6 1  $7 1  $3 1  $7 1  $7   $8 1  $&   1  $m  1  '  2    $    D $    !        #y 1  $ , $  + $ $   $* $6    D   1    $O 1    & +  5       +      $" & 1   &        s  , 1   &/ C     T &          #  L &R 1 (IM.INDEX.GETFN   &  1 (IM.INDEX.GETFN   && T (  ! _IM.INDEX.GETFN  HRULE.GETFNMODERN7 F   ;IM.INDEX.GETFN  HRULE.GETFNMODERN1 (IM.INDEX.GETFNCLASSIC +  &&   @   e &A 1 "IM.INDEX.GETFNCLASSIC +   &2 '    #             &  % +    )      !       1 " 1 'IM.INDEX.GETFNCLASSIC +   &  +   Q          1 %IM.INDEX.GETFNCLASSIC +   &    4  1 'IM.INDEX.GETFNCLASSIC +   &8  '   & 'K &.  - + UIM.INDEX.GETFN%r 1 *IM.INDEX.GETFNCLASSIC +  &   (   1 (IM.INDEX.GETFNCLASSIC +   &. +      & @  & $! &4 &   % $# &(  &    &  +      & +  Y 1 )IM.INDEX.GETFNCLASSIC +   $            &    $  & +   1 (IM.INDEX.GETFNCLASSIC +   & $        -   1 )IM.INDEX.GETFNCLASSIC +   &h     * L   = 1 %IM.INDEX.GETFNCLASSIC +   &   +  \     E 1 *IM.INDEX.GETFN )   5 1 *IM.INDEX.GETFNCLASSIC +   ) + 3   1 )IM.INDEX.GETFNCLASSIC +   )G      9   ( )   \  L (i . (  6) mIM.INDEX.GETFN * HRULE.GETFNMODERN7 9IM.INDEX.GETFN OIM.INDEX.GETFN IM.INDEX.GETFN  2 8  +  "    +  Y 8$8, 8/  1 &IM.INDEX.GETFNTITAN +   )   _    (  -IM.INDEX.GETFNCLASSIC +    (n + * HRULE.GETFNMODERN7 88          8 AIM.INDEX.GETFN^ 8(    c 8 ;  4 7 -  %   8 +IM.INDEX.GETFN  H + : HRULE.GETFNMODERN, +;> >! > > > >, >& > > > > > >! > > > > > >+ > >+ > > > + >) > > > > > + >/ > > > > >+ >1 >= > > > >. > >( > >( > -0   ~    K    -  +   P   + D  +   9   -w -' ' -A   , -0   >  *   -8  . -S  G . +!IM.INDEX.GETFN/  3 =! <   <$ <   <  - <    <    <    <   & <   <   <    <  + <  ( < <D <! < <D < < < <% <D < < ?/%             +     \ A% @FFN z \ No newline at end of file diff --git a/library/MATMULT.TEDIT b/library/MATMULT.TEDIT new file mode 100644 index 00000000..8fe06821 --- /dev/null +++ b/library/MATMULT.TEDIT @@ -0,0 +1,31 @@ +1 Lisp Library Modules, Medley Release 1.0, MATMULT 1 Lisp Library Modules, Medley Release 1.0, MATMULT MATMULT 1 MATMULT 1 MATMULT 6 Two dimensional graphical transformations, such as rotations, scalings, and translations are conveniently represented as homogeneous 3-by-3 matrices, which operate on homogeneous 3-vectors. Similarly, three dimensional graphical transformations are conveniently represented as homogeneous 4-by-4 matrices, which operate on homogeneous 4-vectors. MatMult(MATMULT NIL MatMult NIL NIL 193) provides utilities for creating and manipulating such matrices and vectors, and takes advantage of microcode support for high-speed 3-by-3 and 4-by-4 matrix multiplication(MATRIX% MULTIPLICATION NIL matrix% multiplication NIL NIL 193). All matrices and vectors in MatMult are represented as Common Lisp arrays of element type single-float, so the Common Lisp array functions(ARRAY% FUNCTIONS NIL array% functions NIL NIL 193) are sufficient to create and access individual elements of these specialized arrays. However, MatMult provides convenient wrapper functions(WRAPPER% FUNCTIONS NIL wrapper% functions NIL NIL 193) for most common operations on these arrays. All the following functions that return arrays accept optional array arguments. If given a result argument, these functions alter the contents of that argument rather then allocating new storage. It is an error for the optional array argument to be not of element type single-float, or to have incorrect dimensions. Requirements 1 MatMult should be run on an 1109 with a Weitek floating point chip set, but is also quite efficient on an 1186. Installation 1 Load MATMULT.LCOM from the library. Matrix Creation Functions(MATRIX% CREATION% FUNCTIONS NIL Matrix% Creation% Functions NIL NIL 193) 1 (MAKE-HOMOGENEOUS-3-VECTOR(MAKE-HOMOGENEOUS-3-VECTOR (function) NIL NIL NIL 193) X Y) [Function] Returns a 3-vector of element type single-float. If X or Y is provided, then the corresponding element of the vector is set appropriately, otherwise it defaults to 0.0. The third element of the vector is always initialized to 1.0. Note: Throughout this text, "set" is used to emphasize that the value of the result element is altered and that no new storage is allocated to it. (MAKE-HOMOGENEOUS-3-BY-3(MAKE-HOMOGENEOUS-3-BY-3 (function) NIL NIL NIL 193) &KEY A00 A01 A10 A20 A21) [Function] Returns a 3-by-3 matrix of element type single-float. If a keyword argument is provided, the corresponding element of the matrix is set appropriately, otherwise entries default to 0.0. The (2 ,2) is always initialized to 1.0. (MAKE-HOMOGENEOUS-N-BY-3(MAKE-HOMOGENEOUS-N-BY-3 (function) NIL NIL NIL 193) N &KEY INITIAL-ELEMENT) [Function] Returns an N-by-3 matrix of element type single-float. If the keyword argument is provided, all the elements in the first two columns are set appropriately, otherwise they default to 0.0. The third column is always initialized to 1.0. (MAKE-HOMOGENEOUS-4-VECTOR(MAKE-HOMOGENEOUS-4-VECTOR (function) NIL NIL NIL 194) X Y Z) [Function] Returns a 4-vector of element type single-float. If X, Y or Z is provided then the corresponding element of the vector is set appropriately, otherwise it defaults to 0.0. The forth element of the vector is always initialized to 1.0. (MAKE-HOMOGENEOUS-4-BY-4(%(MAKE-HOMOGENEOUS-4-BY-4 (function) NIL NIL NIL 194) &KEY A00 A01 A02 A03 A10 A11 A12 A13 A20 A21 A22 A23 A30 A31 A32) [Function] Returns a 4-by-4 matrix of element type single-float. If a keyword arguments is provided, the corresponding element of the matrix is set appropriately, otherwise entries default to 0.0. The (3 ,3) is always initialized to 1.0. (MAKE-HOMOGENEOUS-N-BY-4(MAKE-HOMOGENEOUS-N-BY-4 (function) NIL NIL NIL 194) N &KEY INITIAL-ELEMENT) [Function] Returns an N-by-4 matrix of element type single-float. If the keyword argument is provided, all the elements in the first three columns are set appropriately, otherwise they default to 0.0. The forth column is always initialized to 1.0. (IDENTITY-3-BY-3(IDENTITY-3-BY-3 (function) NIL NIL NIL 194) RESULT) [Function] Returns a 3-by-3 identity matrix. If RESULT is supplied, it is side effected and returned. (That is, the storage associated with the optional result argument is reused for the result, rather than allocating new storage for the result.) (IDENTITY-4-BY-4(IDENTITY-4-BY-4 (function) NIL NIL NIL 194) RESULT) [Function] Returns a 4-by-4 identity matrix. If RESULT is supplied, it is side effected and returned. (ROTATE-3-BY-3 (ROTATE-3-BY-3% (function) NIL NIL NIL 194)RADIANS RESULT) [Function] Returns a 3-by-3 rotation matrix specified by a counter-clockwise rotation of RADIANS radians. If RESULT is supplied, it is set and returned. (ROTATE-4-BY-4-ABOUT-X(ROTATE-4-BY-4-ABOUT-X (function) NIL NIL NIL 194) RADIANS RESULT) [Function] Returns a 4-by-4 rotation matrix specified by a positive right-handed rotation of RADIANS radians about the X axis. If RESULT is supplied, it is set and returned. (ROTATE-4-BY-4-ABOUT-Y(ROTATE-4-BY-4-ABOUT-Y (function) NIL NIL NIL 194) RADIANS RESULT) [Function] Returns a 4-by-4 rotation matrix specified by a positive right-handed rotation of RADIANS radians about the Y axis. If RESULT is supplied, it is set and returned. (ROTATE-4-BY-4-ABOUT-Z(ROTATE-4-BY-4-ABOUT-Z (function) NIL NIL NIL 194) RADIANS RESULT) [Function] Returns a 4-by-4 rotation matrix specified by a positive right-handed rotation of RADIANS radians about the Z axis. If RESULT is supplied, it is set and returned. (SCALE-3-BY-3(SCALE-3-BY-3 (function) NIL NIL NIL 194) SX SY RESULT) [Function] Returns a 3-by-3 homogeneous scaling transformation that scales by a factor of SX along the X-axis and SY along the Y-axis. If RESULT is supplied, it is set and returned. (SCALE-4-BY-4(SCALE-4-BY-4 (function) NIL NIL NIL 195) SX SY SZ RESULT) [Function] Returns a 4-by-4 homogeneous scaling transformation that scales by a factor of SX along the X-axis, SY along the Y-axis, and SZ along the Z axis. If RESULT is supplied, it is set and returned. (TRANSLATE-3-BY-3(TRANSLATE-3-BY-3 (function) NIL NIL NIL 195) TX TY RESULT) [Function] Returns a 3-by-3 homogeneous translation that translates by TX along the X-axis and TY along the Y-axis. If RESULT is supplied, it is set and returned. (TRANSLATE-4-BY-4(TRANSLATE-4-BY-4 (function) NIL NIL NIL 195) TX TY TZ RESULT) [Function] Returns a 4-by-4 homogeneous translation that translates by TX along the X-axis, TY along the Y-axis and TZ along the Z axis. If RESULT is supplied, it is set and returned. (PERSPECTIVE-4-BY-4(PERSPECTIVE-4-BY-4 (function) NIL NIL NIL 195) PX PY PZ RESULT) [Function] Returns a 4-by-4 homogeneous perspective transformation defined by PX, PY, and PZ. If RESULT is supplied, it is set and returned. Matrix Multiplication Functions(MATRIX% MULTIPLICATION% FUNCTIONS NIL Matrix% Multiplication% Functions NIL NIL 195) 1 If run on workstations equipped with the extended processor option, these functions make good use of the hardware floating-point unit. The three digits at the end of each function's name describe the dimensions of their arguments. Note: The results of the following matrix multiplication functions are not guaranteed to be correct unless the matrix arguments are all different (Not EQ). (MATMULT-133(MATMULT-133 (function) NIL NIL NIL 195) VECTOR MATRIX RESULT) [Function] Returns the inner product of a 3-vector, VECTOR, and a 3-by-3 matrix, MATRIX. If RESULT is supplied, it is set and returned. (MATMULT-331(MATMULT-331 (function) NIL NIL NIL 195) MATRIX VECTOR RESULT) [Function] Returns the inner product of a 3-by-3 matrix, MATRIX, and a 3-vector, VECTOR. If RESULT is supplied, it is set and returned. (MATMULT-333(MATMULT-333 (function) NIL NIL NIL 195) MATRIX-1 MATRIX-2 RESULT) [Function] Returns the inner product of a 3-by-3 matrix, MATRIX-1, and another 3-by-3 matrix, MATRIX-2. If RESULT is supplied, it is set and returned. (MATMULT-N33(MATMULT-N33 (function) NIL NIL NIL 195) MATRIX-1 MATRIX-2 RESULT) [Function] Returns the inner product of an N-by-3 matrix, MATRIX-1, and a 3-by-3 matrix, MATRIX-2. If RESULT is supplied, it is set and returned. (MATMULT-144(MATMULT-144 (function) NIL NIL NIL 195) VECTOR MATRIX RESULT) [Function] Returns the inner product of a 4-vector, VECTOR, and a 4-by-4 matrix, MATRIX. If RESULT is supplied, it is set and returned. (MATMULT-441(MATMULT-441 (function) NIL NIL NIL 195) MATRIX VECTOR RESULT) [Function] Returns the inner product of a 4-by-4 matrix, MATRIX, and a 4-vector, VECTOR. If RESULT is supplied, it is set and returned. (MATMULT-444(MATMULT-444 (function) NIL NIL NIL 196) MATRIX-1 MATRIX-2 RESULT) [Function] Returns the inner product of a 4-by-4 matrix, MATRIX-1, and another 4-by-4 matrix, MATRIX-2. If RESULT is supplied, it is set and returned. (MATMULT-N44(MATMULT-N44 (function) NIL NIL NIL 196) MATRIX-1 MATRIX-2 RESULT) [Function] Returns the inner product of an N-by-4 matrix, MATRIX-1, and a 4-by-4 matrix, MATRIX-2. If RESULT is supplied, it is set and returned. Miscellaneous Functions 1 (PROJECT-AND-FIX-3-VECTOR(PROJECT-AND-FIX-3-VECTOR (function) NIL NIL NIL 196) 3-VECTOR 2-VECTOR) [Function] The homogeneous 3-VECTOR is projected onto the X-Y plane, coerced to integer coordinates (rounding by truncation) and returned. If 2-VECTOR is supplied, it is set and returned. (PROJECT-AND-FIX-N-BY-3(PROJECT-AND-FIX-N-BY-3 (function) NIL NIL NIL 196) N-3-MATRIX N-2-MATRIX) [Function] The homogeneous N-by-3 matrix, N-3-MATRIX, is projected onto the X-Y plane row-by-row, coerced to integer coordinates (rounding by truncation) and returned. If N-2-MATRIX is supplied, it is set and returned. (PROJECT-AND-FIX-4-VECTOR(PROJECT-AND-FIX-4-VECTOR (function) NIL NIL NIL 196) 4-VECTOR 2-VECTOR) [Function] The homogeneous 4-vector, 4-VECTOR, is projected onto the X-Y plane, coerced to integer coordinates (rounding by truncation) and returned. If 2-VECTOR is supplied, it is set and returned. (PROJECT-AND-FIX-N-BY-4(PROJECT-AND-FIX-N-BY-4 (function) NIL NIL NIL 196) N-4-MATRIX N-2-MATRIX) [Function] The homogeneous N-by-4 MATRIX, N-3-MATRIX, is projected onto the X-Y plane row-by-row, coerced to integer coordinates (rounding by truncation) and returned. If N-2-MATRIX is supplied, it is set and returned. (DEGREES-TO-RADIANS(DEGREES-TO-RADIANS (function) NIL NIL NIL 196) DEGREES) [Function] Returns DEGREES converted to radians. Limitations 1 MatMult is not intended as a general matrix manipulation package; it is specialized for the 3-by-3 and 4-by-4 cases. Use CmlFloatArray(MLFLOATARRAY NIL mlFloatArray NIL NIL 196) for more general floating point array facilities. Example 1 (* ; "Try (spiral)") (CL:DEFUN SPIRAL (&OPTIONAL (WINDOW (CREATEW)) &AUX (WIDTH (WINDOWPROP WINDOW 'WIDTH)) (HALF-WIDTH (QUOTIENT WIDTH 2)) (HEIGHT (WINDOWPROP WINDOW 'HEIGHT)) (HALF-HEIGHT (QUOTIENT HEIGHT 2)) (SCALE-FACTOR (CL:EXP (QUOTIENT (CL:LOG (QUOTIENT (MIN WIDTH HEIGHT) 2.0)) 1440.0)))) (LET ((LINE-1 (MAKE-HOMOGENEOUS-3-VECTOR 1.0 0.0)) (LINE-2 (MAKE-HOMOGENEOUS-3-VECTOR)) (TEMP (MAKE-HOMOGENEOUS-3-VECTOR)) (POINTS (CL:MAKE-ARRAY 2)) (TRANSFORM (MATMULT-333 (ROTATE-3-BY-3 (DEGREES-TO-RADIANS 2.5)) (SCALE-3-BY-3 SCALE-FACTOR SCALE-FACTOR))) (TRANSLATION (TRANSLATE-3-BY-3 HALF-WIDTH HALF-HEIGHT))) (CL:DO ((L-1 LINE-1) (L-2 LINE-2) (I 0 (CL:1+ I))) ((EQ I 1728)) (MATMULT-133 L-1 TRANSFORM L-2) (MATMULT-133 L-2 TRANSLATION TEMP) (PROJECT-AND-FIX-3-VECTOR TEMP POINTS) (DRAWLINE HALF-WIDTH HALF-HEIGHT (CL:AREF POINTS 0) (CL:AREF POINTS 1) 1 'REPLACE WINDOW) (CL:ROTATEF L-1 L-2)))) [This page intentionally left blank] (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "") STARTINGPAGE# 193) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (TEXT NIL NIL (54 54 504 702) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD LEFT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (54 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGV) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE VERSOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "")) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD RIGHT) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY HELVETICA OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC "" "")) (270 15 288 36) NIL) (HEADING NIL (HEADINGTYPE FOOTINGR) (54 27 558 36) NIL) (HEADING NIL (HEADINGTYPE RECTOHEAD) (54 762 558 36) NIL) (TEXT NIL NIL (54 54 504 684) NIL))))).TT3HT +T3T,HH,HH2l,ll2HT +2Hll,HH +3T-T,-T-TF PAGEHEADING VERSOHEADF PAGEHEADING RECTOHEADE PAGEHEADINGFOOTINGVE PAGEHEADINGFOOTINGR TITAN +CLASSIC +TITAN +CLASSICCLASSIC + HELVETICA HELVETICA HELVETICA +TERMINAL +MODERN +MODERNMODERNMODERN + HRULE.GETFNMODERN + +2 HRULE.GETFNMODERN + +2 HRULE.GETFNMODERN + + HRULE.GETFNMODERN + + HRULE.GETFNMODERN c!IM.INDEX.GETFN?IM.INDEX.GETFN3IM.INDEX.GETFN7IM.INDEX.GETFN->   HRULE.GETFNMODERN  +o   HRULE.GETFNMODERN  +  IIM.INDEX.GETFN  HRULE.GETFNMODERN 6IM.INDEX.GETFN 44IM.INDEX.GETFN 4IM.INDEX.GETFN 6IM.INDEX.GETFN 46IM.INDEX.GETFNA 4IM.INDEX.GETFN ,IM.INDEX.GETFN #1,IM.INDEX.GETFN %0,IM.INDEX.GETFN N &2IM.INDEX.GETFN R&2IM.INDEX.GETFN R&2IM.INDEX.GETFN R& )IM.INDEX.GETFN  N& )IM.INDEX.GETFN O&-IM.INDEX.GETFN  <&-IM.INDEX.GETFN <& /IM.INDEX.GETFN C% UIM.INDEX.GETFN  HRULE.GETFNMODERN  +  (IM.INDEX.GETFN )& (IM.INDEX.GETFN .& (IM.INDEX.GETFN .& (IM.INDEX.GETFN 0& (IM.INDEX.GETFN )& (IM.INDEX.GETFN .& (IM.INDEX.GETFN /& (IM.INDEX.GETFN 0$%   HRULE.GETFNMODERN 5IM.INDEX.GETFN k&3IM.INDEX.GETFN  +w +&5IM.INDEX.GETFN l&3IM.INDEX.GETFN  +w +&/IM.INDEX.GETFN    HRULE.GETFNMODERN  +u ++IM.INDEX.GETFN2  HRULE.GETFNMODERN   +      /  ; 8 = : 9 ; 6 . , $ J F B   !  / 2 6 C )  ' '% +/ Uz \ No newline at end of file diff --git a/library/READNUMBER.TEDIT b/library/READNUMBER.TEDIT new file mode 100644 index 00000000..a882984d Binary files /dev/null and b/library/READNUMBER.TEDIT differ diff --git a/library/TCPIP.TEDIT b/library/TCPIP.TEDIT new file mode 100644 index 00000000..11c83753 Binary files /dev/null and b/library/TCPIP.TEDIT differ diff --git a/library/TELERAID.TEDIT b/library/TELERAID.TEDIT new file mode 100644 index 00000000..cb459e86 Binary files /dev/null and b/library/TELERAID.TEDIT differ diff --git a/library/TEXEC.TEDIT b/library/TEXEC.TEDIT new file mode 100644 index 00000000..7d2fde4f Binary files /dev/null and b/library/TEXEC.TEDIT differ diff --git a/library/TEXTMODULES.TEDIT b/library/TEXTMODULES.TEDIT new file mode 100644 index 00000000..9bcdf989 Binary files /dev/null and b/library/TEXTMODULES.TEDIT differ diff --git a/library/UNIXCHAT.TEDIT b/library/UNIXCHAT.TEDIT new file mode 100644 index 00000000..748a0f94 Binary files /dev/null and b/library/UNIXCHAT.TEDIT differ diff --git a/library/UNIXCOMM.TEDIT b/library/UNIXCOMM.TEDIT new file mode 100644 index 00000000..ceafe3a6 Binary files /dev/null and b/library/UNIXCOMM.TEDIT differ diff --git a/library/VIRTUAL.TEDIT b/library/VIRTUAL.TEDIT new file mode 100644 index 00000000..2b62ebbf Binary files /dev/null and b/library/VIRTUAL.TEDIT differ diff --git a/library/WHERE-IS.TEDIT b/library/WHERE-IS.TEDIT new file mode 100644 index 00000000..a123d500 Binary files /dev/null and b/library/WHERE-IS.TEDIT differ