diff --git a/library/COLOR.TEDIT b/library/COLOR.TEDIT index 2a80139e..061cc10c 100644 Binary files a/library/COLOR.TEDIT and b/library/COLOR.TEDIT differ diff --git a/library/Cash-File.tedit b/library/Cash-File.tedit new file mode 100644 index 00000000..013a4137 Binary files /dev/null and b/library/Cash-File.tedit differ diff --git a/library/FX-80Driver.tedit b/library/FX-80Driver.tedit new file mode 100644 index 00000000..6479f012 --- /dev/null +++ b/library/FX-80Driver.tedit @@ -0,0 +1,40 @@ +1 Lisp Library Modules, Medley Release 1.0, FX-80DRIVER 1 Lisp Library Modules, Medley Release 1.0, FX-80DRIVER FX-80DRIVER 1 FX-80DRIVER 1 FX-80DRIVER 6 FX-80Driver(FX-80DRIVER NIL FX-80Driver NIL NIL 99) prints text and graphics on Epson FX-80-compatible printers. It implements a full device-independent graphics interface(GRAPHICS% INTERFACE NIL graphics% interface NIL NIL 99) for the FX-80, and can print source code, TEdit documents, bitmaps and windows at a variety of qualities and speeds. The FX-80Driver contains two printer drivers(PRINTER% DRIVERS NIL printer% drivers NIL NIL 99): a fast driver, for quick printing of draft-quality text, and a high-quality driver, for slower printing of mixed-font text and graphics. You can print early revisions of a document in fast mode, and then switch to high-quality mode for the final copy. The matrix shown in Figure 1 illustrates the capabilities of each mode: ((SKETCH "figure from {DSK}FX-80DRIVERS.TEDIT;1" VERSION 3 PRIRANGE (31 . 0) SKETCHCONTEXT ((ROUND 1 BLACK) (GACHA 10 (MEDIUM REGULAR REGULAR)) (CENTER BASELINE) (CURVE 18.0 8) NIL NIL (CENTER CENTER) (NIL NIL NIL) T NIL NIL 1 NIL)) ((0.0 116.0 (PRI 1)) (WIRE ((96 . 184) (328 . 184)) (ROUND 1 BLACK) NIL NIL 1 NIL NIL)) ((0.0 116.0 (PRI 2)) (WIRE ((96 . 152) (328 . 152)) (ROUND 1 BLACK) NIL NIL 1 NIL NIL)) ((0.0 100.0 (PRI 3)) (WIRE ((176 . 248) (176 . 48)) (ROUND 1 BLACK) NIL NIL 1 NIL NIL)) ((0.0 100.0 (PRI 5)) (WIRE ((232 . 248) (232 . 48)) (ROUND 1 BLACK) NIL NIL 1 NIL NIL)) ((0.0 116.0 (PRI 7)) (WIRE ((96 . 120) (328 . 120)) (ROUND 1 BLACK) NIL NIL 1 NIL NIL)) ((0.0 116.0 (PRI 8)) (WIRE ((96 . 88) (328 . 88)) (ROUND 1 BLACK) NIL NIL 1 NIL NIL)) ((0.0 116.0 (PRI 9)) (WIRE ((96 . 216) (328 . 216)) (ROUND 1 BLACK) NIL NIL 1 NIL NIL)) ((0.05 13.0 (PRI 10)) (TEXT (200.0 . 232.0) ("Fast") 1 (CENTER BASELINE) (MODERN 10 (MEDIUM REGULAR REGULAR)) ((190.5 228.5 19 13)) BLACK)) ((0.05 13.0 (PRI 11)) (TEXT (280.0 . 232.0) ("High-quality") 1 (CENTER BASELINE) (MODERN 10 (MEDIUM REGULAR REGULAR)) ((251.0 228.5 58 13)) BLACK)) ((0.05 13.0 (PRI 12)) (TEXT (96.0 . 192.0) ("TEdit") 1 (LEFT BOTTOM) (MODERN 10 (MEDIUM REGULAR REGULAR)) ((96 192 25 13)) BLACK)) ((0.05 13.0 (PRI 13)) (TEXT (96.0 . 160.0) ("Sketch") 1 (LEFT BOTTOM) (MODERN 10 (MEDIUM REGULAR REGULAR)) ((96 160 31 13)) BLACK)) ((0.05 13.0 (PRI 14)) (TEXT (96.0 . 128.0) ("Windows") 1 (LEFT BOTTOM) (MODERN 10 (MEDIUM REGULAR REGULAR)) ((96 128 43 13)) BLACK)) ((0.05 13.0 (PRI 15)) (TEXT (96.0 . 92.0) ("Lisp source" "code") 1 (LEFT BOTTOM) (MODERN 10 (MEDIUM REGULAR REGULAR)) ((96 105 50 13) (96 92 22 13)) BLACK)) ((0.05 13.0 (PRI 16)) (TEXT (96.0 . 64.0) ("Grapher") 1 (LEFT BOTTOM) (MODERN 10 (MEDIUM REGULAR REGULAR)) ((96 64 39 13)) BLACK)) ((0.05 13.0 (PRI 25)) (TEXT (202.0 . 200.0) ("monofont" "only") 1 (CENTER BASELINE) (MODERN 10 (MEDIUM REGULAR REGULAR)) ((178.5 203.0 47 13) (192.0 190.0 20 13)) BLACK)) ((0.05 13.0 (PRI 26)) (TEXT (202.0 . 104.0) ("monofont" "only") 1 (CENTER BASELINE) (MODERN 10 (MEDIUM REGULAR REGULAR)) ((178.5 107.0 47 13) (192.0 94.0 20 13)) BLACK)) ((0.05 12.0 (PRI 27)) (TEXT (280.0 . 168.0) ("yes") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((269.5 165.0 21 12)) BLACK)) ((0.05 12.0 (PRI 28)) (TEXT (280.0 . 200.0) ("yes") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((269.5 197.0 21 12)) BLACK)) ((0.05 12.0 (PRI 29)) (TEXT (280.0 . 136.0) ("yes") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((269.5 133.0 21 12)) BLACK)) ((0.05 12.0 (PRI 30)) (TEXT (280.0 . 104.0) ("yes") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((269.5 101.0 21 12)) BLACK)) ((0.05 12.0 (PRI 31)) (TEXT (280.0 . 72.0) ("yes") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((269.5 69.0 21 12)) BLACK))) (93.0 45.0 238.0 206.0) 1.0 8 Figure 1. FX-80 printer drivers For historical reasons, FX-80 in this document refers to any and all of the Epson FX-80 family (FX-80% FAMILY% NIL FX-80% family% NIL NIL 99)of dot-matrix graphics printers. The module supports the FX-80, FX-85, FX-86 and FX-286. The Epson printers vary in speed and carriage width, but share a common command language. Requirements 1 RS232 or TTY cable (see the wiring diagrams in the Introduction of this manual). Serial interface card(SERIAL% INTERFACE% CARD NIL Serial% interface% card NIL NIL 99) in the printer. DLRS23C or DLTTY. Installation 1 FX-80 Serial Interface(FX-80% SERIAL% INTERFACE NIL FX-80% Serial% Interface NIL NIL 99) The FX-80Driver module requires that your Epson be equipped with a suitable serial interface (such as the Hanzon Universal Card(HANZON% UNIVERSAL% CARD NIL HANZON% Universal% Card NIL NIL 99)). The interface should be set up with XOn/XOff flow control enabled, 9600 baud or slower, 1 stop bit, 8 bit characters, no parity. (See The Hanzon Universal Card booklet for instructions on the DIP switch settings.) FX-80 DIP Switch Settings(FX-80% DIP% SWITCH% SETTINGS NIL FX-80% DIP% Switch% Settings NIL NIL 100) The FX-80 should have its DIP switches set as shown in Figure 2. ((SKETCH a% figure% from% a% document VERSION 3 PRIRANGE (62 . 0) SKETCHCONTEXT ((ROUND 1 BLACK) (GACHA 10 (MEDIUM REGULAR REGULAR)) (CENTER BASELINE) (CURVE 18.0 8) NIL NIL (CENTER CENTER) (NIL NIL NIL) T NIL NIL 1 NIL)) ((0.092 64.0 (PRI 61)) (GROUP (200.0 141.0 128.0 92.0) (((0.016 12.0 (PRI 29)) (BOX (248.0 184.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (NIL NIL NIL))) ((0.016 12.0 (PRI 30)) (BOX (200.0 184.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (NIL NIL NIL))) ((0.016 12.0 (PRI 31)) (BOX (216.0 184.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (NIL NIL NIL))) ((0.016 12.0 (PRI 32)) (BOX (232.0 184.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (NIL NIL NIL))) ((0.016 12.0 (PRI 33)) (BOX (232.0 160.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (43605 NIL NIL))) ((0.016 12.0 (PRI 34)) (BOX (216.0 160.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (43605 NIL NIL))) ((0.016 12.0 (PRI 35)) (BOX (248.0 160.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (43605 NIL NIL))) ((0.016 12.0 (PRI 36)) (BOX (200.0 160.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (43605 NIL NIL))) ((0.016 12.0 (PRI 38)) (BOX (312.0 184.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (43605 NIL NIL))) ((0.016 12.0 (PRI 39)) (BOX (264.0 184.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (NIL NIL NIL))) ((0.016 12.0 (PRI 40)) (BOX (280.0 184.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (43605 NIL NIL))) ((0.016 12.0 (PRI 41)) (BOX (296.0 184.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (43605 NIL NIL))) ((0.016 12.0 (PRI 42)) (BOX (296.0 160.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (NIL NIL NIL))) ((0.016 12.0 (PRI 43)) (BOX (280.0 160.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (NIL NIL NIL))) ((0.016 12.0 (PRI 44)) (BOX (312.0 160.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (NIL NIL NIL))) ((0.016 12.0 (PRI 45)) (BOX (264.0 160.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (43605 NIL NIL))) ((0.05 12.0 (PRI 46)) (TEXT (208.0 . 144.0) ("1") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((204.5 141.0 7 12)) BLACK)) ((0.05 12.0 (PRI 47)) (TEXT (224.0 . 144.0) ("2") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((220.5 141.0 7 12)) BLACK)) ((0.05 12.0 (PRI 48)) (TEXT (240.0 . 144.0) ("3") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((236.5 141.0 7 12)) BLACK)) ((0.05 12.0 (PRI 49)) (TEXT (256.0 . 144.0) ("4") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((252.5 141.0 7 12)) BLACK)) ((0.05 12.0 (PRI 54)) (TEXT (272.0 . 144.0) ("5") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((268.5 141.0 7 12)) BLACK)) ((0.05 12.0 (PRI 55)) (TEXT (288.0 . 144.0) ("6") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((284.5 141.0 7 12)) BLACK)) ((0.05 12.0 (PRI 56)) (TEXT (304.0 . 144.0) ("7") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((300.5 141.0 7 12)) BLACK)) ((0.05 12.0 (PRI 57)) (TEXT (320.0 . 144.0) ("8") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((316.5 141.0 7 12)) BLACK)) ((0.05 12.0 (PRI 58)) (TEXT (264.0 . 224.0) ("Switch 1") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((236.0 221.0 56 12)) BLACK))) (264 . 184))) ((0.092 49.25 (PRI 62)) (GROUP (61.5 141.0 98.5 92.0) (((0.05 12.0 (PRI 11)) (TEXT (104.0 . 144.0) ("1") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((100.5 141.0 7 12)) BLACK)) ((0.05 12.0 (PRI 12)) (TEXT (120.0 . 144.0) ("2") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((116.5 141.0 7 12)) BLACK)) ((0.05 12.0 (PRI 13)) (TEXT (136.0 . 144.0) ("3") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((132.5 141.0 7 12)) BLACK)) ((0.05 12.0 (PRI 14)) (TEXT (152.0 . 144.0) ("4") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((148.5 141.0 7 12)) BLACK)) ((0.05 12.0 (PRI 17)) (TEXT (72.0 . 192.0) ("on") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((65.0 189.0 14 12)) BLACK)) ((0.05 12.0 (PRI 18)) (TEXT (72.0 . 168.0) ("off") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((61.5 165.0 21 12)) BLACK)) ((0.016 12.0 (PRI 23)) (BOX (144.0 184.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (NIL NIL NIL))) ((0.016 12.0 (PRI 23)) (BOX (96.0 184.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (43605 NIL NIL))) ((0.016 12.0 (PRI 23)) (BOX (112.0 184.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (NIL NIL NIL))) ((0.016 12.0 (PRI 23)) (BOX (128.0 184.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (NIL NIL NIL))) ((0.016 12.0 (PRI 24)) (BOX (144.0 160.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (43605 NIL NIL))) ((0.016 12.0 (PRI 24)) (BOX (128.0 160.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (43605 NIL NIL))) ((0.016 12.0 (PRI 24)) (BOX (112.0 160.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (43605 NIL NIL))) ((0.016 12.0 (PRI 24)) (BOX (96.0 160.0 16.0 24.0) (ROUND 1 BLACK) NIL 1 (NIL NIL NIL))) ((0.05 12.0 (PRI 37)) (TEXT (128.0 . 224.0) ("Switch 2") 1 (CENTER BASELINE) (GACHA 10 (MEDIUM REGULAR REGULAR)) ((100.0 221.0 56 12)) BLACK))) (112 . 184)))) (61.0 141.0 267.0 92.0) 1.0 8 Figure 2. FX-80 DIP switch settings Switch 1 says no automatic linefeed, no automatic paper feed, no buzz on paper-out, and to allow no software deactivation of the printer. Switch 2 says to use the USA character set, Pica type, allocate 2KB for user-defined characters, allow paper-out detection, and print zeros as zeros. Note: For the FX-85, -86 and -286 DIP switch settings, consult the corresponding Epson User's Manual. Software Load FX-80DRIVER.LCOM and the required .LCOM modules from the library. Store all of the font files (file names ending with .displayfont) corresponding to the fonts you wish to use on some convenient directory or directories. HQFX80-FONT-DIRECTORIES(HQFX80-FONT-DIRECTORIES (variable) NIL NIL NIL 100) should be a list that contains these directories; it should be the same as DISPLAYFONTDIRECTORIES(DISPLAYFONTDIRECTORIES (variable) NIL NIL NIL 100). Set FASTFX80-DEFAULT-DESTINATION(FASTFX80-DEFAULT-DESTINATION (variable) NIL NIL NIL 100) (determines where output to the FASTFX80 lineprinter device goes) and HQFX80-DEFAULT-DESTINATION(HQFX80-DEFAULT-DESTINATION (variable) NIL NIL NIL 100) (determines where output to the HQFX80 lineprinter device goes) to one of the following values; they need not be the same: Destination RS232 port TTY port file 1 Value {RS232} {TTY} FileName Speed 9600 max. 4800 max. n/a 1 Load the appropriate device driver for each of these destinations: DLTTY.LCOM for the TTY port, and DLRS232C.LCOM for the RS232C port. Run the function RS232C.INIT or TTY.INIT (as appropriate), and set the baud rate to match the setting on the printer. User Interface 1 You can set up the FX-80 to be your default printer, send FX-80 output to a file for later printing, or programmatically open an image stream that produces output on the FX-80. Having the FX-80 set up as your default printer means that you can print the contents of windows by selecting the HARDCOPY menu item on the window of interest. You can also use the HARDCOPY - TO A FILE submenu item to spool your output for later printing. And you can write programs that use the OPENIMAGESTREAM(OPENIMAGESTREAM (function) NIL NIL NIL 101) function to create FX-80 format graphics output. Printing in Fast Mode(PRINTING% IN% FAST% MODE NIL Printing% in% Fast% Mode NIL NIL 101) 1 You can print in fast mode by sending output to the printer FASTFX80 or by opening an image stream to a file with extension FASTFX80. This mode is called fast because it uses the printer's built-in font, which allows a tight encoding of the document to be printed. Fidelity to the original document is not as good as in high-quality mode. The following restrictions apply: f Special characters (that is, most Xerox Network Systems extended characters, such as the bullet or dagger; see CharCodeTables, VirtualKeyboards in this manual) are ignored. f Only one font is supported (though roman, italic, and bold typefaces do work). f Graphics (lines, underlines, bitmaps) are ignored. f Multiple column output does work. Set FX-80 Fast Mode(ET% FX-80% FAST% MODE NIL et% FX-80% Fast% Mode NIL NIL 101) To set your default printer to be a fast mode FX-80(FAST% MODE% FX-80 NIL fast% mode% FX-80 NIL NIL 101), make the list (FASTFX80 FASTFX80) the CAR of the list DEFAULTPRINTINGHOST. Set FX-80 Destination(SET% FX-80% DESTINATION NIL Set% FX-80% Destination NIL NIL 101) To set the default destination of all output to {LPT}.fastfx80, set the variable FASTFX80-DEFAULT-DESTINATION to an appropriate file name string. See the table above; the file name could be that of a regular file like {DSK}SPOOLED-FAST-OUTPUT. Set FX-80 Page Size(SET% FX-80% PAGE% SIZE NIL Set% FX-80% Page% Size NIL NIL 101) To set the driver's page size to match the paper in the printer, set the two variables \FASTFX80.INCHES-PER-PAGE (page height in inches) and \FASTFX80.INCHES-PER-LINE (page width in inches) to appropriate values. The defaults are 11 and 8.5, respectively. These can be set in your Lisp INIT file. Print a File(PRINT% A% FILE NIL Print% a% File NIL NIL 101) Select the HARDCOPY command from the background (right-button) menu. The system first formats the file for printing. Then, when the FX-80Driver actually starts transmitting to the printer, a small abort window, bearing the name of the document and the name of the printer, will appear near the top of your screen. Abort a Print Job(ABORT% A% PRINT% JOB NIL Abort% a% Print% Job NIL NIL 101) Clicking on the item marked ABORT in the print window will cleanly terminate the printing of the document. Note: After aborting a print job, you may need to turn the printer off and back on to make sure that other files will print successfully. Printing in High-Quality Mode(PRINTING% IN% HIGH-QUALITY% MODE NIL Printing% in% High-Quality% Mode NIL NIL 102) 1 Print in high-quality mode by sending output to the printer HQFX80, or by opening an image stream on a file with type HQFX80. High-quality mode printing supports all of Xerox Lisp's device-independent graphics operations, as well as multiple font printing and the XNS extended character set. It prints at 72 dot-per-inch resolution. Fidelity to the original document is better than in fast mode, though printing speed is slower. Set HQ Mode(SET% HQ% MODE NIL Set% HQ% Mode NIL NIL 102) To set your default printer to be a high-quality FX-80, make the list (HQFX80 HQFX80) the CAR of the list DEFAULTPRINTINGHOST. You can use the PRINTERMENU module or your favorite structure editor to do this. Set Destination(SET% DESTINATION NIL Set% Destination NIL NIL 102) To set the default destination of all output to {LPT}.hqfx80, set the variable HQFX80-DEFAULT-DESTINATION to an appropriate file namestring. This could be "{TTY}", "{RS232}", or even the name of a regular file like "{DSK}spooled-hq-output". Set Page Size(SET% PAGE% SIZE NIL Set% Page% Size NIL NIL 102) To set the driver's page size to match the paper in the printer, set the two variables \HQFX80.INCHES-PER-PAGE (page height in inches) and \HQFX80.INCHES-PER-LINE (page width in inches) to appropriate values. The defaults are 11 and 8.5, respectively. These can be set in your Lisp INIT file. Print a File(PRINT% A% FILE NIL Print% a% File NIL NIL 102) Select the HARDCOPY command. The system first formats the file for printing. Then, when the FX-80Driver actually starts transmitting to the printer, a small abort window, bearing the name of the document and the name of the printer, will appear near the top of your screen. Note: After printing a document on HQFX80, you may need to turn the printer off and back on before you can print with FASTFX80 on that printer. Abort a Print Job(ABORT% A% PRINT% JOB NIL Abort% a% Print% Job NIL NIL 102) See above. FX Printer Compatibility(FX% PRINTER% COMPATIBILITY NIL FX% Printer% Compatibility NIL NIL 102) 1 (FX80-PRINT(FX80-PRINT (function) NIL NIL NIL 102) &KEY THING-TO-PRINT LANDSCAPE? COMPRESS? HIGH-QUALITY?) [Function] THING-TO-PRINT may be one of a window, bitmap, or file path name. If THING-TO-PRINT is a path name, the file will be treated as either a TEdit or Lisp source file, and printed in the appropriate style. In the window or bitmap cases, LANDSCAPE? specifies landscape printing (X-coordinates run down the left margin) when non-NIL; COMPRESS? specifies FX-80 compressed printing mode. If HIGH-QUALITY? is non-NIL and THING-TO-PRINT is a path name, output will be sent to the default high-quality FX-80 printer, otherwise to the default fast FX-80 printer. The LANDSCAPE?, COMPRESS?, and HIGH-QUALITY? arguments all default to NIL. Limitations 1 Landscape printing(LANDSCAPE% PRINTING NIL Landscape% printing NIL NIL 103) has not been implemented. Examples 1 Send text output to fast FX-80:(SEND% TEXT% OUTPUT% TO% FAST% FX-80 NIL Send% text% output% to% fast% FX-80 NIL NIL 103) (SETQ FX-80 (OPENIMAGESTREAM "{LPT}.FASTFX80")) (CL:FORMAT FX-80 "HELLO, WORLD~%%") (CL:CLOSE FX-80) Print source code on fast FX-80(PRINT% SOURCE% CODE% ON% FAST% FX-80 NIL Print% source% code% on% fast% FX-80 NIL NIL 103) (assuming the FastFX80 is not your default printer, but is on the list DEFAULTPRINTINGHOST): (LISTFILES (HOST FASTFX80) "{DSK}MYPROGRAM") Note: Source code is stored in pre-pretty-printed form on the file. The pretty-printer's default linelength (width of a line in characters) is normally 102, which is too wide for the FastFX-80s 8.5-inch wide page. To create source files which print nicely on the fast FX-80, you should set the variable FILELINELENGTH to a more appropriate value before you MAKEFILE. 70 works nicely on 8.5-inch paper with a standard font profile, though your mileage may vary. Print source code in the the fast FX-80 mode, assuming the FastFX80 is your default printer: (LISTFILES "{DSK}MYPROGRAM") Print TEdit file in fast FX-80 mode(PRINT% TEDIT% FILE% IN% FAST% FX-80% MODE NIL Print% TEdit% file% in% fast% FX-80% mode NIL NIL 103), assuming the FastFX80 is your default printer: (LISTFILES "{WAYCOOL:}GENSYM.TEDIT") Print text and graphics in high-quality mode:(PRINT% TEXT% AND% GRAPHICS% IN% % HIGH-QUALITY% MODE NIL Print% text% and% graphics% in% % high-quality% mode NIL NIL 103) (SETQ FX-80 (OPENIMAGESTREAM "{LPT}" 'HQFX80)) (MOVETO 300 300 FX-80) (CL:FORMAT FX-80 "HELLO, WORLD~%%") (DRAWCIRCLE 300 300 230 '(ROUND 8) NIL FX-80) (CL:CLOSE FX-80) Print source code in high-quality mode,(PRINT% SOURCE% CODE% IN% HIGH-QUALITY% MODE NIL Print% source% code% in% high-quality% mode NIL NIL 103) assuming the high-quality FX-80 is not your default printer, but is on the list DEFAULTPRINTINGHOST: (LISTFILES (HOST HQFX80) "{DSK}MYPROGRAM") Note: See the previous note regarding FILELINELENGTH and the fast FX-80. The same holds for high-quality FX-80 printing, and we recommend 70 as the value for FILELINELENGTH. Print source code in high-quality mode, assuming the high-quality FX-80 is your default printer: (LISTFILES "{DSK}MYPROGRAM") Print TEdit file in high-quality mode,(PRINT% % TEDIT% FILE% IN% HIGH-QUALITY% MODE NIL Print% % TEdit% file% in% high-quality% mode NIL NIL 104) assuming the high-quality FX-80 is your default printer: (LISTFILES "{WAYGNARLY:}MAGNUMOPUS.TEDIT") [This page intentionally left blank] (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "") STARTINGPAGE# 99) (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))))) <``8T<`` T,HH 5Hll2ll2H` +2HH +,ll,ll-llT2Hl +l,HH +-T2HTT2Hll-$$T-T,HH +2HH ,HH,HH,HH +3T3T<ll8T-T-T2 F PAGEHEADING VERSOHEADF PAGEHEADING RECTOHEADE PAGEHEADINGFOOTINGVE PAGEHEADINGFOOTINGR HELVETICA +CLASSIC +CLASSIC +CLASSICCLASSIC +TITAN + HELVETICA  HELVETICACLASSIC + HELVETICAMODERN +MODERN +MODERNMODERN TERMINAL +MODERN +MODERNMODERN +  HRULE.GETFNMODERN +  7 HRULE.GETFNMODERN + 7  HRULE.GETFNMODERN +   HRULE.GETFNMODERN +  + HRULE.GETFNMODERN (IM.INDEX.GETFNy 8IM.INDEX.GETFNv , 2IM.INDEX.GETFNH  0 SKIO.GETFN.2MODERN + "` 0IM.INDEX.GETFN     HRULE.GETFNMODERN Q  @IM.INDEX.GETFN     HRULE.GETFNMODERN BIM.INDEX.GETFN @IM.INDEX.GETFN   7 KIM.INDEX.GETFNB \ SKIO.GETFN.2MODERN + (  Q      4IM.INDEX.GETFNCLASSIC +M 3IM.INDEX.GETFNCLASSIC +  9IM.INDEX.GETFNCLASSIC +G 7IM.INDEX.GETFNCLASSIC +|  % HRULE.GETFNMODERN    HRULE.GETFNMODERN C +    M   HRULE.GETFNMODERN  * ,IM.INDEX.GETFNCLASSIC +1 CIM.INDEX.GETFN  HRULE.GETFNMODERN U "   Q  5  $ =IM.INDEX.GETFN3 5IM.INDEX.GETFN(   AIM.INDEX.GETFNR o  ?IM.INDEX.GETFNX  A  /   /IM.INDEX.GETFN + ;IM.INDEX.GETFN J  SIM.INDEX.GETFN  HRULE.GETFNMODERN    -IM.INDEX.GETFNZ  T 3IM.INDEX.GETFNO 3  *   1IM.INDEX.GETFNX  z   /IM.INDEX.GETFN   ;IM.INDEX.GETFN GIM.INDEX.GETFN  HRULE.GETFNMODERN  'IM.INDEX.GETFNMODERN + 7 8 x  +P   +    }  +       HRULE.GETFNMODERN   9IM.INDEX.GETFN    HRULE.GETFNMODERN   YIM.INDEX.GETFN 0 $   [IM.INDEX.GETFNH  - 1 ( a ]  +# eIM.INDEX.GETFN1  +-. {IM.INDEX.GETFN  +/  $ . ' iIM.INDEX.GETFNQ   ++ & k  a  +' kIM.INDEX.GETFN:  +3$   QNz \ No newline at end of file diff --git a/library/HRule.tedit b/library/HRule.tedit new file mode 100644 index 00000000..69edd383 Binary files /dev/null and b/library/HRule.tedit differ diff --git a/library/Kermit.tedit b/library/Kermit.tedit new file mode 100644 index 00000000..c08f9c2a Binary files /dev/null and b/library/Kermit.tedit differ diff --git a/library/KeyboardEditor.tedit b/library/KeyboardEditor.tedit new file mode 100644 index 00000000..88caf5cc Binary files /dev/null and b/library/KeyboardEditor.tedit differ diff --git a/library/Match.tedit b/library/Match.tedit new file mode 100644 index 00000000..0d92a9a5 --- /dev/null +++ b/library/Match.tedit @@ -0,0 +1,45 @@ +1 Lisp Library Modules, Medley Release 1.0, MATCH 1 Lisp Library Modules, Medley Release 1.0, MATCH MATCH 1 MATCH 1 MATCH 6 Match(MATCH NIL Match NIL NIL 183) provides a fairly general pattern match facility that allows you to specify certain tests that would otherwise be clumsy to write, by giving a pattern which the datum is supposed to match. Essentially, you write "Does the (expression) X look like (the pattern) P?" For example, (MATCH X WITH (& 'A -- 'B)) asks whether the second element of X is an A, and the last element a B. Requirements 1 DWIM must be enabled. Installation 1 Load MATCH.LCOM from the library. Programmer's Interface 1 (MATCH OBJECT WITH PATTERN) [CLISP operator] Matches the OBJECT with the PATTERN. The implementation of the matching is performed by computing (once) the equivalent Lisp expression whichperforms the indicated operation, and substituting this for the pattern (rather than by invoking each time a general purpose capability such as that found in the AI languages FLIP or PLANNER). For example, the translation of (MATCH X WITH (& 'A -- 'B)) is: (AND (EQ (CADR X) 'A) (EQ (CAR (LAST (CDDR X))) 'B)) Thus the pattern match facility is really a pattern match compiler, and the emphasis in its design and implementation has been more on the efficiency of object code than on generality and sophistication of its matching capabilities. The goal was to provide a facility that could and would be used even where efficiency was paramount, e.g., in inner loops. Wherever possible, already existing Lisp functions are used in the translation, e.g., the translation of ($ 'A $) uses MEMB, ($ ('A $) $) uses ASSOC, etc. The syntax for pattern match expressions is (MATCH FORM WITH PATTERN), where PATTERN is a list as described below. If FORM appears more than once in the translation, and it is not either a variable or an expression that is easy to (re)compute, such as (CAR Y), (CDDR Z), etc., a dummy variable is generated and bound to the value of FORM so that FORM is not evaluated a multiple number of times. For example, the translation of (MATCH (FOO X) WITH ($ 'A $)) is simply (MEMB 'A (FOO X)), while the translation of (MATCH (FOO X) WITH ('A 'B --)) is: [PROG ($$2) (RETURN (AND (EQ (CAR (SETQ $$2 (FOO X))) 'A) (EQ (CADR $$2) 'B] In the interests of efficiency, the pattern match compiler(PATTERN% MATCH% COMPILER NIL pattern% match% compiler NIL NIL 184) assumes that all lists end in NIL, i.e., there are no LISTP checks inserted in the translation to check tails. For example, the translation of (MATCH X WITH ('A & --)) is (AND (EQ (CAR X) (QUOTE A)) (CDR X)), which matches with (A B) as well as (A . B). Similarly, the pattern match compiler does not insert LISTP checks on elements, e.g., (MATCH X WITH (('A --) --)) translates as (EQ (CAAR X) 'A), and (MATCH X WITH (($1 $1 --) --)) translates as (CDAR X) Note that you can explicitly insert LISTP checks yourself by using @, as described below, e.g., (MATCH X WITH (($1 $1 --)@LISTP --)) translates as (CDR (LISTP (CAR X))) PATLISPCHECK(PATLISPCHECK (variable) NIL NIL NIL 184) [Variable] The insertion of LISTP checks for ELEMENTS is controlled by the variable PATLISTPCHECK. When PATLISTPCHECK is T, LISTP checks are inserted, e.g., (MATCH X WITH (('A --) --)) translates as: (EQ (CAR (LISTP (CAR (LISTP X)))) 'A) PATLISTPCHECK is initially NIL. Its value can be changed within a particular function by using a local CLISP declaration (see IRM). PATVARDEFAULT(PATVARDEFAULT (variable) NIL NIL NIL 185) [Variable] Controls the treatment of !ATOM patterns (see below). If PATVARDEFAULT is ' or QUOTE, !ATOM is treated the same as 'ATOM. If PATVARDEFAULT is = or EQUAL, same as =ATOM. If PATVARDEFAULT is == or EQ, same as ==ATOM. If PATVARDEFAULT is _ or SETQ, same as ATOM_&. PATVARDEFAULT is initially ' (quote). PATVARDEFAULT can be changed within a particular function by using a local CLISP declaration (see IRM). Note: Numbers and strings are always interpreted as though PATVARDEFAULT were =, regardless of its setting. EQ, MEMB, and ASSOC are used for comparisons involving small integers. Note: Pattern match expressions(PATTERN% MATCH% EXPRESSIONS NIL Pattern% match% expressions NIL NIL 185) are translated using the DWIM and CLISP facilities, using all CLISP declarations in effect (standard/fast/undoable; see IRM). Pattern Elements(PATTERN% ELEMENTS NIL Pattern% Elements NIL NIL 185) A pattern consists of a list of pattern elements. Each pattern element is said to match either an element of a data structure or a segment. For example, in the TTY editor's pattern matcher (see IRM), "--" matches any arbitrary segment of a list, while & or a subpattern match only one element of a list. Those patterns which may match a segment of a list are called segment patterns; those that match a single element are called element patterns. Element Patterns(ELEMENT% PATTERNS NIL Element% Patterns NIL NIL 185) There are several types of element patterns, best given by their syntax: $1 or & Matches an arbitrary element of a list. 'EXPRESSION Matches only an element which is equal to the given expression e.g., 'A, '(A B). EQ, MEMB, and ASSOC are automatically used in the translation when the quoted expression is atomic, otherwise EQUAL, MEMBER, and SASSOC. =FORM Matches only an element which is EQUAL to the value of FORM; e.g., =X, =(REVERSE Y). ==FORM Same as =, but uses an EQ check instead of EQUAL. ATOM The treatment depends on setting of PATVARDEFAULT (see above). (PATTERN1 ... PATTERNn) Matches a list which matches the given patterns; e.g., (& &), (-- 'A). ELEMENT-PATTERN@FN Matches an element if ELEMENT-PATTERN matches it, and FN (name of a function or a LAMBDA expression) applied to that element returns non-NIL. For example, &@NUMBERP matches a number, and ('A --)@FOO matches a list whose first element is A and for which FOO applied to that list is non-NIL. For simple tests, the function-object is applied before a match is attempted with the pattern, e.g., ((-- 'A --)@LISTP --) translates as (AND (LISTP (CAR X)) (MEMB 'A (CAR X))), not the other way around. FN may also be a FORM in terms of the variable @, e.g., &@(EQ @ 3) is equivalent to =3. * Matches any arbitrary element. If the entire match succeeds, the element which matched the * is returned as the value of the match. Note: Normally, the pattern match compiler constructs an expression whose value is guaranteed to be non-NIL if the match succeeds and NIL if it fails. However, if a * appears in the pattern, the expression generated could also return NIL if the match succeeds and * was matched to NIL. For example, (MATCH X WITH ('A * --)) translates as (AND (EQ (CAR X) 'A) (CADR X)), so if X is equal to (A NIL B) then (MATCH X WITH ('A * --)) returns NIL even though the match succeeded. ~ELEMENT-PATTERN Matches an element if the element is not (~) matched by ELEMENT-PATTERN, e.g., ~'A, ~=X, ~(-- 'A --). (*ANY* ELEMENT-PATTERN ELEMENT-PATTERN ...) Matches if any of the contained patterns match. Segment Patterns(SEGMENT% PATTERNS NIL Segment% Patterns NIL NIL 186) $ or -- Matches any segment of a list (including one of zero length). The difference between $ and -- is in the type of search they generate. For example, (MATCH X WITH ($ 'A 'B $)) translates as (EQ (CADR (MEMB 'A X)) 'B) whereas (MATCH X WITH (-- 'A 'B $)) translates as: [SOME X (FUNCTION (LAMBDA ($$2 $$1) (AND (EQ $$2 'A) (EQ (CADR $$1) 'B] Thus, a paraphrase of ($ 'A 'B $) would be "Is B the element following the first A?", whereas a paraphrase of (-- 'A 'B $) would be "Is there any A immediately followed by a B?" Note that the pattern using $ results in a more efficient search than that using --. However, ($ 'A 'B $) does not match with (X Y Z A M O A B C), but (-- 'A 'B $) does. Essentially, once a pattern following a $ matches, the $ never resumes searching, whereas -- produces a translation that always continues searching until there is no possibility of success. However, if the pattern match compiler can deduce from the pattern that continuing a search after a particular failure cannot possibly succeed, then the translations for both -- and $ is the same. For example, both (MATCH X WITH ($ 'A $3 $)) and (MATCH X WITH (-- 'A $3 --)) translate as (CDDDR (MEMB (QUOTE A) X)) because if there are not three elements following the first A, there certainly will not be three elements following subsequent A's, so there is no reason to continue searching, even for --. Similarly, ($ 'A $ 'B $) and (-- 'A -- 'B --) are equivalent. $2, $3, etc. Matches a segment of the given length. Note that $1 is not a segment pattern. !ELEMENT-PATTERN Matches any segment which ELEMENT-PATTERN would match as a list. For example, if the value of FOO is (A B C), !=FOO matches the segment ... A B C ... etc. Note: Since ! appearing in front of the last pattern specifies a match with some tail of the given expression, it also makes sense in this case for a ! to appear in front of a pattern that can only match with an atom, e.g., ($2 !'A) means match if CDDR of the expression is the atom A. Similarly, (MATCH X WITH ($ ! 'A)) translates to (EQ (CDR (LAST X)) 'A). !ATOM The treatment depends on setting of PATVARDEFAULT. If PATVARDEFAULT is ' or QUOTE, same as !'ATOM (see above discussion). If PATVARDEFAULT is = or EQUAL, same as !=ATOM. If PATVARDEFAULT is == or EQ, same as !==ATOM. If PATVARDEFAULT is _ or SETQ, same as ATOM_$. . The atom "." is treated exactly like "!". In addition, if a pattern ends in an atom, the "." is first changed to "!", e.g., ($1 . A) and ($1 ! A) are equivalent, even though the atom "." does not explicitly appear in the pattern. One exception where "." is not treated like "!" is when "." preceding an assignment does not have the special interpretation that "!" has preceding an assignment (see below). For example, (MATCH X WITH ('A . FOO_'B)) translates as: (AND (EQ (CAR X) 'A) (EQ (CDR X) 'B) (SETQ FOO (CDR X))) but (MATCH X WITH ('A ! FOO_'B)) translates as: (AND (EQ (CAR X) 'A) (NULL (CDDR X)) (EQ (CADR X) 'B) (SETQ FOO (CDR X))) SEGMENT-PATTERN@FUNCTION-OBJECT Matches a segment if the segment-pattern matches it, and the function object applied to the corresponding segment (as a list) returns non-NIL. For example, ($@CDDR 'D $) matches (A B C D E) but not (A B D E), since CDDR of (A B) is NIL. Note: An @ pattern applied to a segment requires computing the corresponding structure (with LDIFF) each time the predicate is applied (except when the segment in question is a tail of the list being matched). Assignments(ASSIGNMENTS NIL Assignments NIL NIL 189) Any pattern element may be preceded by "VARIABLE_", meaning that if the match succeeds (i.e., everything matches), VARIABLE is set to the thing that matches that pattern element. For example, if X is (A B C D E), (MATCH X WITH ($2 Y_$3)) sets Y to (C D E). Note that assignments are not performed until the entire match has succeeded, so assignments cannot be used to specify a search for an element found earlier in the match. For example, (MATCH X WITH (Y_$1 =Y --)) does not match with (A A B C ...), unless, of course, the value of Y was A before the match started. This type of match is achieved by using place-markers, described below. If the variable is preceded by a !, the assignment is to the tail of the list as of that point in the pattern, i.e., that portion of the list matched by the remainder of the pattern. For example, if X is (A B C D E), (MATCH X WITH ($ !Y_'C 'D $)) sets Y to (C D E), i.e., CDDR of X. In other words, when ! precedes an assignment, it acts as a modifier to the _, and has no effect whatsoever on the pattern itself, e.g., (MATCH X WITH ('A 'B)) and (MATCH X WITH ('A !FOO_'B)) match identically, and in the latter case, FOO is set to CDR of X. Note: *_PATTERN-ELEMENT and !*_PATTERN-ELEMENT are acceptable, e.g., (MATCH X WITH ($ 'A *_('B --) --)) translates as: [PROG ($$2) (RETURN (AND (EQ (CAADR (SETQ $$2 (MEMB 'A X))) 'B) (CADR $$2] Place Markers(PLACE% MARKERS NIL Place% Markers NIL NIL 189) Variables of the form #N, where N is a number, are called place markers, and are interpreted specially by the pattern match compiler. Place markers are used in a pattern to mark or refer to a particular pattern element. Functionally, they are used like ordinary variables, i.e., they can be assigned values, or used freely in forms appearing in the pattern. For example, (MATCH X WITH (#1_$1 =(ADD1 #1))) matches the list (2 3). However, they are not really variables in the sense that they are not bound, nor can a function called from within the pattern expect to be able to obtain their values. For convenience, regardless of the setting of PATVARDEFAULT, the first appearance of a defaulted place-marker is interpreted as though PATVARDEFAULT were _. Thus the above pattern could have been written as (MATCH X WITH ( 1 =(ADD1 1))). Subsequent appearances of a place-marker are interpreted as though PATVARDEFAULT were =. For example, (MATCH X WITH (#1 #1 --)) is equivalent to (MATCH X WITH (#1_$1 =#1 --)) and translates as (AND (CDR X) (EQUAL (CAR X) (CADR X)) Note that (EQUAL (CAR X) (CADR X)) would incorrectly match with (NIL). Replacements(REPLACEMENTS NIL Replacements NIL NIL 190) The construct PATTERN-ELEMENT_FORM specifies that if the match succeeds, the part of the data that matched is to be replaced with the value of FORM. For example, if X =(A B C D E), (MATCH X WITH ($ 'C $1_Y $1)) replaces the third element of X with the value of Y. As with assignments, replacements are not performed until after it is determined that the entire match is successful. Replacements involving segments splice the corresponding structure into the list being matched, e.g., if X is (A B C D E F) and FOO is (1 2 3), after the pattern ('A $_FOO 'D $) is matched with X, X is (A 1 2 3 D E F), and FOO is EQ to CDR of X, i.e., (1 2 3 D E F). Note that ($ FOO_FIE $) is ambiguous, since it is not clear whether FOO or FIE is the pattern element, i.e., whether _ specifies assignment or replacement. For example, if PATVARDEFAULT is =, this pattern can be interpreted as ($ FOO_=FIE $), meaning search for the value of FIE, and if found set FOO to it, or ($ =FOO_FIE $) meaning search for the value of FOO, and if found, store the value of FIE into the corresponding position. In such cases, you should disambiguate by not using the PATVARDEFAULT option, i.e., by specifying ' or =. Note: Replacements are normally done with RPLACA or RPLACD. You can specify that /RPLACA and /RPLACD should be used, or FRPLACA and FRPLACD, by means of CLISP declarations (see IRM). Reconstruction(RECONSTRUCTION NIL Reconstruction NIL NIL 190) 1 You can specify a value for a pattern match operation other than what is returned by the match by writing (MATCH FORM1 WITH PATTERN => FORM2). For example, (MATCH X WITH (FOO_$ 'A --) => (REVERSE FOO)) translates as: [PROG ($$2) (RETURN (COND ((SETQ $$2 (MEMB 'A X)) (SETQ FOO (LDIFF X $2)) (REVERSE FOO] Place markers in the pattern can be referred to from within FORM, e.g., the above could also have been written as (MATCH X WITH (!#1 'A --) => (REVERSE #1)). If -> is used in place of =>, the expression being matched is also physically changed to the value of FORM. For example, (MATCH X WITH (#1 'A !#2) -> (CONS #1 #2)) would remove the second element from X, if it were equal to A. In general, (MATCH FORM1 WITH PATTERN -> FORM2) is translated so as to compute FORM2 if the match is successful, and then smash its value into the first node of FORM1. However, whenever possible, the translation does not actually require FORM2 to be computed in its entirety, but instead the pattern match compiler uses FORM2 as an indication of what should be done to FORM1. For example, (MATCH X WITH (#1 'A !#2) -> (CONS #1 #2)) translates as (AND (EQ (CADR X) 'A) (RPLACD X (CDDR X))) Limitation 1 The pattern match facility does not contain some of the more esoteric features of other pattern match languages, such as repeated patterns, disjunctive and conjunctive patterns, recursion, etc. However, you can be confident that what facilities it does provide results in Lisp expressions comparable to those you would generate by hand. Examples 1 (MATCH X WITH (-- 'A --)) -- matches any arbitrary segment. 'A matches only an A, and the second -- again matches an arbitrary segment; thus this translates to (MEMB 'A X). (MATCH X WITH (-- 'A)) Again, -- matches an arbitrary segment; however, since there is no -- after the 'A, A must be the last element of X. Thus this translates to: (EQ (CAR (LAST X)) 'A). (MATCH X WITH ('A 'B -- 'C $3 --)) CAR of X must be A, and CADR must be B, and there must be at least three elements after the first C, so the translation is: (AND (EQ (CAR X) 'A) (EQ (CADR X) 'B) (CDDDR (MEMB 'C (CDDR X)))) (MATCH X WITH (('A 'B) 'C Y_$1 $)) Since ('A 'B) does not end in $ or --, (CDDAR X) must be NIL. The translation is: (COND ((AND (EQ (CAAR X) 'A) (EQ (CADAR X) 'B) (NULL (CDDAR X)) (EQ (CADR X) 'C) (CDDR X)) (SETQ Y (CADDR X)) T)) (MATCH X WITH (#1 'A $ 'B 'C #1 $)) #1 is implicitly assigned to the first element in the list. The $ searches for the first B following A. This B must be followed by a C, and the C by an expression equal to the first element. The translation is: [PROG ($$2) (RETURN (AND (EQ (CADR X) 'A) (EQ [CADR (SETQ $$2 (MEMB 'B (CDDR X] 'C) (CDDR $$2) (EQUAL (CADDR $$2) (CAR X] (MATCH X WITH (#1 'A -- 'B 'C #1 $)) Similar to the pattern above, except that -- specifies a search for any B followed by a C followed by the first element, so the translation is: [AND (EQ (CADR X) 'A) (SOME (CDDR X) (FUNCTION (LAMBDA ($$2 $$1) (AND (EQ $$2 'B) (EQ (CADR $$1) 'C) (CDDR $$1) (EQUAL (CADDR $$1) (CAR X] [This page intentionally left blank] (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "") STARTINGPAGE# 183) (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)))))E0H +T0HHT0T3T3llT2252Hll/ll>llx>llx>llx>llx/H +,ll3(T3(T823T3T3T-T-T5HHlx2HHl/HH/HH +0$$T22/55HH5HH +0HHT/`256$$T5l55ll5HH +5ll2ll2HH +,HH +,HH,HH0T-T-T5,//,5,-T-T3(TF PAGEHEADING VERSOHEADF PAGEHEADING RECTOHEADE PAGEHEADINGFOOTINGVE PAGEHEADINGFOOTINGR3(T HELVETICA +CLASSIC HELVETICA + HELVETICA HELVETICA TITAN +CLASSIC +TITAN +CLASSIC +TERMINAL +MODERN +MODERNMODERNMODERN MODERN +D HRULE.GETFNMODERN + D/ C HRULE.GETFNMODERN + C0BB HRULE.GETFNMODERN + AA HRULE.GETFNMODERN +   HRULE.GETFNMODERN 3 IM.INDEX.GETFN 2N 2 #       HRULE.GETFNMODERN 1    HRULE.GETFNMODERN 1 +   HRULE.GETFNMODERN 0 /  +  /) /! .!..&/     /+   #   A  0 ! . . ./ .%. &/: CIM.INDEX.GETFN P /! .. .(/   /W .. ./ .!. . /C  .'. .- )IM.INDEX.GETFNMODERN + /"    $ .. .)/  J   - *IM.INDEX.GETFNMODERN +  ,  +      +    +  +    +  +   +  ,   + , U  *; %   4 * IIM.INDEX.GETFNy  )5IM.INDEX.GETFN$ #6  1  %5IM.INDEX.GETFN HELVETICA +$I <1 < +G  =  [    < "     < ,  < %  <  : 7   (   Q  (  '    (g ( ,(    +  (  'h  b ,  = ; ";    " ( +    &    :0 %5IM.INDEX.GETFN"     > !J !    %! M 9 ! 4     !(  "    ! 8!8! 8!< B :  !   "  0 ! +  "   !     +   I  $  =! 8" %  !    +  !    +  !    +  !    +  "    4    ' - !   I - ! =! ;99! 6! 5449  !  !          )IM.INDEX.GETFN( B :         "  d !    *     6 ;  ,       % / /IM.INDEX.GETFN  H  $   L   3 #C      + & + +    +IM.INDEX.GETFN  m      y i                + -  ' (   % "   ! # [     *      &  @/IM.INDEX.GETFNE HRULE.GETFNMODERN j         +/   $%< 2 .  J   ,?        M I M ,    +, +  HRULE.GETFNMODERN Q   HRULE.GETFNMODERN !   =   :      #    <     !#       $?      + C     5  &%*    7  '&.?% > >G\z \ No newline at end of file diff --git a/library/MiniServe.tedit b/library/MiniServe.tedit new file mode 100644 index 00000000..34eec7e5 Binary files /dev/null and b/library/MiniServe.tedit differ diff --git a/library/NSMaintain.tedit b/library/NSMaintain.tedit new file mode 100644 index 00000000..7a50a3cc Binary files /dev/null and b/library/NSMaintain.tedit differ diff --git a/library/Press.tedit b/library/Press.tedit new file mode 100644 index 00000000..93ad4833 Binary files /dev/null and b/library/Press.tedit differ diff --git a/library/RS232.tedit b/library/RS232.tedit new file mode 100644 index 00000000..c5ab2a4d --- /dev/null +++ b/library/RS232.tedit @@ -0,0 +1,141 @@ +1 Lisp Library Modules, Medley Release 1.0, RS232 1 Lisp Library Modules, Medley Release 1.0, RS232 RS232 1 RS232 1 RS232 6 The 1108 and 1186 each support two RS232(RS232 NIL NIL NIL NIL 219) ports. One of these ports is configured as Data Terminal Equipment, and is intended to be connected to modems or terminal ports on other computers. (On the 1108, this port is available only with the addition of the E30 option(E30% OPTION NIL E30% option NIL NIL 219).) The other port is configured as Data Communication Equipment, and is meant to drive printers or terminals. In this document, the DTE port is called the RS232 port(RS232% PORT NIL RS232% port NIL NIL 219), and the DCE port is called the TTY port(TTY% PORT NIL TTY% port NIL NIL 219). Lisp provides a stream-oriented interface to the RS232 hardware. Users' programs can open streams to the hosts {RS232} or {TTY}, and perform input or output using standard Lisp I/O functions, such as READ-BYTE(READ-BYTE (function) NIL NIL NIL 219), READ-CHAR(READ-CHAR (function) NIL NIL NIL 219), etc. Programs may use RS232 streams or TTY streams with the same programmatic interface. However, the RS232 port is preferred over the TTY if the application expects to handle large amounts of input data. In the 1108 and 1186, data entering the RS232 port is buffered independently of Lisp by the I/O processor (IOP). In addition, the RS232 software provides an additional layer of character buffering, freeing user programs from having to monitor the RS232 hardware frequently. No independent buffering is provided for data entering the TTY port. As a result, Lisp cannot guarantee to catch all characters received on this port. For this reason, the TTY port should be used primarily to drive output devices such as printers. Requirements 1 Hardware To connect to a modem or another device, you need an RS232 or TTY cable (see the wiring diagrams in the Introduction of this manual). For the 1108 only, you need the E-30 upgrade kit. For the RS232 port to operate correctly, the remote device must assert the standard RS232 signals DSR and CTS. This requirement means that the appropriate pins on the 1186 be driven high, either properly by connecting the 1186 side to the corresponding device side, or permanently by jumpering the pins. For the TTY port to operate correctly, the remote device must assert DTR and RTS. This requirement means that the appropriate pins on the 1186 be driven high, either properly by connecting the 1186 side to the corresponding device side, or permanently by jumpering the pins. Software You need the following .LCOM files in order to run this module successfully: DLRS232C or DLTTY (one of these is required) RS232MENU RS232CHAT or TTYCHAT, and KERMIT (these are optional). (See also the file dependencies enumerated in the Introduction of this manual.) Installation 1 Load the required .LCOM modules from the library. Run RS232C.INIT or TTY.INIT to set parameters. Using the RS232 Port 1 Support for the RS232 port is contained in the file DLRS232C.LCOM. Before using the RS232 port, it is necessary to initialize the RS232 hardware. The function RS232C.INIT is provided for this purpose: (RS232C.INIT(RS232C.INIT (function) NIL NIL NIL 220) BAUDRATE BITSPERSERIALCHAR PARITY NOOFSTOPBITS FLOWCONTROl) [Function] The arguments correspond to the port parameters (see below). Alternatively, the BAUDRATE argument can be an instance of the RS232C.INIT record. If BAUDRATE is NIL, the value of the global variable RS232C.DEFAULT.INIT.INFO is used in its place. This provides a means of automatically initializing the RS232 hardware without user intervention. RS232C.DEFAULT.INIT.INFO(RS232C.DEFAULT.INIT.INFO (variable) NIL NIL NIL 220) [Variable] This variable controls default initialization of the RS232 port. Its value may be set in the site INIT.LISP file, or in your INIT.LISP file. If RS232C.DEFAULT.INIT.INFO is not set when the RS232 module is loaded, its fields will be set to the following default values: BaudRate: 1200 BitsPerSerialChar: 8 Parity: NONE NoOfStopBits: 1 FlowControl: XOnXOff Programs may use the Lisp function OPENSTREAM as an alternative to calling RS232C.INIT directly, with the parameters bundled up into the PARAMETERS argument. For example, (RS232C.INIT 9600 8) can also be achieved by: (OPENSTREAM '{RS232} 'INPUT NIL '((BaudRate 9600) (BitsPerSerialChar 8)) (RS232C.SET.PARAMETERS(RS232C.SET.PARAMETERS (function) NIL NIL NIL 220) PARAMETERLIST) [Function] This function allows applications to change the settings of the RS232 hardware while the RS232 port is in use. PARAMETERLIST is an association list of parameter names and values. The following example sets the baud rate to 9,600 baud, and the character length to eight bits: (RS232C.SET.PARAMETERS '((BaudRate . 9600) (BitsPerSerialChar . 8))) The following is a list of legal parameter names and values: BaudRate 1186: 50, 75, 110, 150, 300, 600, 1200, 2400, 3600, 4800, 7200, 9600, 19200. 1108: all of the above, and 28800, 38400, 48000, 56000, 57600. BitsPerSerialChar 5, 6, 7, 8 bits of data. If 5 or 6 bits of data are sent, they should be DATA, not CHARACTER. Parity NONE, ODD, EVEN (1 parity bit). NoOfStopBits 1, 1.5, 2 (i.e., the stop bit may have a period equal to 1, 1.5 or 2 bit-widths). FlowControl NIL, NONE, XOnXOff, list. NIL and NONE: no flow control. XOnXOff: flow control using Xon and Xoff characters. For applications requiring XOn and XOff characters other than ^Q and ^S respectively, this parameter may be supplied as a list in the form: (1 ), where and represent the character codes (ASCII 1 - 127) of the characters which are to be treated as the XOn and XOff characters. The leading 1 signifies that flow control should be enabled; a leading 0 will program the RS232 port with the appropriate XOn and XOff characters, but leave flow control disabled. ModemControl This parameter should be a list of modem control signals to be enabled, such as DSR, CTS, DTR, DTR, RI and HS. The functions RS232MODEMCONTROL, RS232MODEMSTATUSP, and RS232MODIFYMODEMCONTROL provide finer control over the settings of modem signals (see below). DTR This parameter enables or disables the data terminal ready signal; it may be specified as T or NIL. RTS This parameter enables or disables the request to send signal; it may be specified as T or NIL. (RS232C.GET.PARAMETERS(RS232C.GET.PARAMETERS (function) NIL NIL NIL 221) PARAMETERLIST) [Function] The current settings for the RS232 port may be obtained at any time by calling this function. PARAMETERLIST should be a list of parameter names. RS232C.GET.PARAMETERS returns an association list of parameter names and values, in a format acceptable to RS232C.SET.PARAMETERS. (RS232C.SHUTDOWN(RS232C.SHUTDOWN (function) NIL NIL NIL 221)) [Function] The RS232 port is turned off by calling this function. It disables the RS232 port and closes any open streams on the devices. Using RS232 Streams(USING% RS232% STREAMS NIL Using% RS232% Streams NIL NIL 222) Programs may open streams to the RS232 port by calling OPENSTREAM(OPENSTREAM (function) NIL NIL NIL 222) with the file name {RS232}. The ACCESS argument to OPENSTREAM controls whether an INPUT or OUTPUT stream is returned. RS232 streams are unidirectional; to obtain a second stream open for the opposite access, call the function RS232C.OTHER.STREAM. Only one pair of RS232 streams may be open at a time; an error will result if you attempt to open more. (RS232C.OTHER.STREAM(RS232C.OTHER.STREAM (function) NIL NIL NIL 222) STREAM) [Function] STREAM should be an RS232 stream. If STREAM is open for INPUT, an RS232 stream open for OUTPUT is returned; conversely, if STREAM is open for OUTPUT, an RS232 stream open for INPUT is returned. The following Lisp functions are defined to work on RS232 streams open for the appropriate access: BIN(BIN (function) NIL NIL NIL 222), BOUT(BOUT (function) NIL NIL NIL 222), READP(READP (function) NIL NIL NIL 222), OPENP(OPENP (function) NIL NIL NIL 222), CLOSEF(CLOSEF (function) NIL NIL NIL 222), and FORCEOUTPUT(FORCEOUTPUT (function) NIL NIL NIL 222). (RS232C.CLOSE-STREAM(RS232C.CLOSE-STREAM (function) NIL NIL NIL 222) DIRECTION) [Function] This function closes one or both RS232 streams, so you don't need to have access to the streams to close them. DIRECTION can be one of INPUT, OUTPUT, BOTH, or NIL. The function closes the RS232 stream open in DIRECTION mode; if DIRECTION is BOTH or NIL the input and output streams will be closed, if they exist. RS232 streams are buffered. Input and output are performed in units of packets of data. The I/O processor collects incoming data into a packet, and makes that packet available to Lisp when one of the following conditions is true: The packet is filled. The frame time-out has expired. The frame time-out is the number of hundredths of a second that are allowed to occur between the reception of single characters. This parameter is automatically set by the RS232 module. Its value depends on the baud rate of the RS232 port. If the value is set too large, interactive applications such as Chat will suffer from uneven typeout; if the value is too small, a larger number of shorter packets may be exchanged between Lisp and the I/O processor, resulting in increased processing overhead. Lisp buffers data for output in packets of up to 578 characters. Output packets are sent to the RS232 port when one of the following conditions is true: The current output packet is full. The user program calls the FORCEOUTPUT(FORCEOUTPUT (function) NIL NIL NIL 222) function to force the current output packet to be sent. The output stream is closed. Applications that generate a large amount of output slowly may wish to reduce the size of outgoing packets. Although this will require additional processing overhead, it will cause output to occur more frequently without the program explicitly calling FORCEOUTPUT(FORCEOUTPUT (function) NIL NIL NIL 222). (RS232C.OUTPUT.PACKET.LENGTH(RS232C.OUTPUT.PACKET.LENGTH (function) NIL NIL NIL 222) NEWVALUE) [Function] This function returns the current setting of the variable that controls the maximum size of output packets. If NEWVALUE is supplied, the setting is changed to NEWVALUE. NEWVALUE may be a number between 1 and 578. Specifying a value is a matter of how long you are willing to wait at input time before you are assured of seeing incoming data. You can do a straightforward division to set the length (e.g., at 9600 baud, you get about 1 char/millisecond, so the maximum delay is 578ms; if you can tolerate only 1/4 second, then set it to 250 or so). (RS232C.READP.EVENT(RS232C.READP.EVENT (function) NIL NIL NIL 223) STREAM) [Function] Many RS232 applications are time-dependent. File transfer protocols such as Kermit and Modem depend on one or both sides of a file transfer detecting connection problems by means of time-outs. This function allows user programs to detect time-out conditions efficiently. STREAM should be an RS232 stream open for input. This function returns an event that a program may wait upon for input data to become available on the stream. The following example illustrates how a program could wait up to 10 seconds for a character to become available: [LAMBDA (STREAM) (LET ((EVENT (RS232C.READP.EVENT STREAM)) (TIMER (SETUPTIMER 10000))) (until (OR (READP STREAM) (TIMEREXPIRED? TIMER)) do (AWAIT.EVENT EVENT TIMER T) finally (RETURN (COND ((READP STREAM) (BIN STREAM] Using Modems(USING% MODEMS NIL Using% Modems NIL NIL 223) The following functions are useful for controlling modems: (RS232SENDBREAK(RS232SENDBREAK (function) NIL NIL NIL 223) EXTRALONG?) [Function] This function sends the out-of-band BREAK signal, for a period of 0.25 seconds; if EXTRALONG? is non-NIL, then the period is extended to 3.5 seconds. (RS232MODEMCONTROL(RS232MODEMCONTROL (function) NIL NIL NIL 223) SIGNALSONLST) [Function] This function is a Lambda-NoSpread function that sets the modem control lines to be on for the signals named in the list SIGNALSONLST; it returns the former setting of the lines. If SIGNALSONLST is not supplied (which is not the same as supplying NIL), then the control lines remain unchanged. The entries in SIGNALSONLST are symbol names for standard modem control lines; currently usable signal names are DTR and RTS. (RS232MODIFYMODEMCONTROL(RS232MODIFYMODEMCONTROL (function) NIL NIL NIL 223) SIGNALSONLST SIGNALSOFFLST) [Function] Changes only those modem control lines specified in the union of the two arguments; those in SIGNALSONLST are set to be on, and those in SIGNALSOFFLST are set off. Returns the former state just as (RS232MODEMCONTROL) does. (RS232MODEMSTATUSP(RS232MODEMSTATUSP (function) NIL NIL NIL 223) SPEC) [Function] Returns non-null if the reading of the modem status lines is consistent with the boolean form specified by SPEC; modem status signals currently supported are DSR, RI, and RLSD. SPEC may be any AND/OR/NOT combination over these signal names. Example: (RS232MODEMSTATUSP '(AND CTS (NOT RLSD))). (RS232MODEMHANGUP(RS232MODEMHANGUP (function) NIL NIL NIL 224)) [Function] This function takes whatever steps are appropriate to cause the modem to hang up. Generally, this means turning the DTR signal down for about three seconds, or until the DSR signal has gone down. Error Condition Reporting(ERROR% CONDITION% REPORTING NIL Error% Condition% Reporting NIL NIL 224) The RS232 port detects parity errors(PARITY% ERRORS NIL parity% errors NIL NIL 224), character framing errors(CHARACTER% FRAMING% ERRORS NIL character% framing% errors NIL NIL 224), lost characters(LOST% CHARACTERS NIL lost% characters NIL NIL 224), and a number of other unusual conditions. As the I/O processor delivers each input packet to Lisp, it reports when the packet was received without error. If an error did occur while the packet was being received, Lisp will report this fact by writing a message to RS232C.ERROR.STREAM. RS232C.ERROR.STREAM(RS232C.ERROR.STREAM (variable) NIL NIL NIL 224) [Variable] RS232 error conditions are reported on this stream. This stream is initially the PROMPTWINDOW. (RS232C.REPORT.STATUS(RS232C.REPORT.STATUS (function) NIL NIL NIL 224) NEWVALUE) [Function] There are circumstances in which the RS232 hardware believes it has encountered an error, when in fact it has not. A frequent cause is an incorrect parity setting in the RS232 port. Continually reporting RS232 errors is likely to slow RS232 processing severely. In cases where error reporting is not important, it is possible to disable error reports with the RS232C.REPORT.STATUS function. This function returns the current setting of status reporting, which may be one of the following: T Errors are reported on both input and output. NIL Errors are never reported. OUTPUT Errors are reported on output only. INPUT Errors are reported on input only. In addition, if NEWVALUE is supplied, the current setting of status reporting is changed to NEWVALUE. RS232TRACE(RS232TRACE NIL NIL NIL NIL 224) To help in debugging RS232 applications, it is possible to trace the data that is being sent out via the port. RS232 packets are traced using: (RS232C.TRACE MODE) [Function] MODE is one of PEEK, T, or NIL. If MODE is either T or PEEK, RS232C.TRACE opens a trace window in the mode selected. T indicates a full trace, with every byte being shown. PEEK is a less verbose trace, with every incoming packet shown as a "+" and every outgoing packet shown as a "!". NIL turns off the tracing. Clicking the left mouse button in the trace window will cycle between the modes. Ǐ}ݻw}<~}۾ۿߍ>?}m}߻۾ۿ}<~   qg2 g8 HR$ J  A$ J BR$ J A$ 1@b $ qg2 gHR$ J A$ JBR$ JA$ 1@d$ qg2 !HR$ J AA$ J9BR$ J!AA$ 1@!$@@@@B!BB!BO>OB!B @@ RS232CHAT(RS232CHAT NIL NIL NIL NIL 225) The RS232CHAT module is a facility that permits the Chat library module to communicate over the RS232 port. Once it is loaded, you may chat to the host named RS232 to open a connection to the RS232 port. RS232CMENU(RS232CMENU NIL NIL NIL NIL 225) RS232CMENU is a utility that provides a menu interface to controlling the settings of the RS232 port. When loaded along with RS232CHAT, this utility may be invoked by choosing the "Set Line Parameters" entry in the options menu that appears if you select Options in the middle-button Chat menu. {>xnݻn:p:yqyٻ绿nswwݿ}oݿݻon;ϟq`````C0{<x< ``À`0`l6 ``Ï<`/6pmNy9sǶ< x``Ͷ`m0sm9ymmm``Ͷ`m0;mmy}mϼ m``mm maml m`o<`1gxyy=sgǼ l`` 0 `00`` 0``````00`ǀ1Ì0 0`1$H 0`l'HW +pWQ< `džmᙶ$HvͰ +I qq6RI`mHf +Iga6S`m$H6f Ima66" `Ǟ< 0ff0 Hgay!`0` ``````0 `ǰ|`0@``3c=s`<ߛN9|aT6DX`Ƕc `BBǛ3I$m}ݷfD``6 Eٶ8I<map$r`6 HٶI ma0H`36ls`H燙9}fHq``````` The following commands are available in the RS232 menu: Apply This menu item changes the RS232 port settings according to the values of the fields in the rest of the menu. No changes are made to the RS232 hardware until this command is given. Abort Closes the RS232 menu and aborts any changes that could have been made. SendBreak Sends a normal (0.25 second) break signal. Requires confirmation, as this command could cause the modem connection to be broken. SendLongBreak Sends a long (3.5 second) break signal. As above, this requires confirmation. Hangup Tries to hang up the modem (by dropping DTR). Requires confirmation. The following fields are multiple choice items; when their labels are selected with the mouse, a menu of possible values for the field appears. Choosing a value from the menu will change the field; clicking off the menu will leave the field unchanged. Baud Rate Changes the BaudRate of the RS232 port. Parity Changes the Parity setting of the RS232 port. Character Length Changes the BitsPerSerialChar setting of the RS232 port. Flow Control Changes the FlowControl setting of the RS232 port. Stop Bits Changes the NoOfStopBits setting of the RS232 port. Report Errors Changes the RS232C.REPORT.STATUS setting of the RS232 port. File Transfer Using RS232(FILE% TRANSFER% USING% RS232 NIL File% Transfer% Using% RS232 NIL NIL 226) Files may be transferred using RS232CHAT and either the Kermit(KERMIT NIL Kermit NIL NIL 226) or Modem(MODEM NIL Modem NIL NIL 226) protocols. Using the TTY Port(USING% THE% TTY% PORT NIL Using% the% TTY% Port NIL NIL 226) 1 Support for the TTY port is contained on the file DLTTY.LCOM. The TTY port is designed to support low-speed communications with RS232 devices. The I/O processor(I/O% PROCESSOR NIL I/O% processor NIL NIL 226) offers no low-level support for input buffering. As a result, it is quite possible for newly received input characters to overwrite previously received but unread characters in the input hardware. The TTY port provides exactly one character's worth of buffering; each character must be read by Lisp before the next character is completely received. Note: No hardware flow control is provided on the TTY port. The Lisp TTY port service routines will obey received flow control commands, but will not generate flow control commands in response to increased input data rate. (TTY.INIT(TTY.INIT (function) NIL NIL NIL 226) BAUDRATE BITSPERSERIALCHAR PARITY NOOFSTOPBITS FLOWCONTROL) [Function] This function is very similar to the function RS232C.INIT. Before using the TTY port, the TTY hardware must be programmed with the proper characteristics for your application. Alternatively, the BAUDRATE argument can be an instance of the RS232C.INIT record. If BAUDRATE is NIL, the value of the global variable TTY.DEFAULT.INIT.INFO is used in its place. This provides a means of automatically initializing the TTY port hardware without user intervention. TTY.DEFAULT.INIT.INFO(TTY.DEFAULT.INIT.INFO (variable) NIL NIL NIL 226) [Variable] This variable controls default initialization of the TTY port. Its value may be set in the site INIT.LISP file, or in your INIT.LISP file. If TTY.DEFAULT.INIT.INFO is not set when the TTY package is loaded, its fields will be set to the following default values: BaudRate: 1200 BitsPerSerialChar: 8 Parity: NONE NoOfStopBits: 1 FlowControl: XOnXOff Programs may use OPENSTREAM as an alternative to calling TTY.INIT directly, with the parameters bundled up into the PARAMETERS argument as shown below. For example: (OPENSTREAM '{TTY} 'BOTH NIL '((BaudRate 9600) (BitsPerSerialChar 8)) (TTY.SET.PARAMETERS(TTY.SET.PARAMETERS (function) NIL NIL NIL 227) PARAMETERLIST) [Function] Applications may change the settings of the TTY hardware while the TTY port is in use. PARAMETERLIST is an association list of parameter names and values. For example, let's set the baud rate to 9600 baud and the character length to eight bits: (TTY.SET.PARAMETERS '((BaudRate . 9600) (BitsPerSerialChar . 8))) The following is a list of legal parameter names and values: BaudRate 50, 75, 110, 150, 300, 600, 1200, 2400, 3600, 4800, 7200, 9600, 19200. BitsPerSerialChar 5, 6, 7, 8. If 5 or 6 bits of data are sent, they should be DATA, not CHARACTERS. Parity NONE, ODD, EVEN ( 1 parity bit). NoOfStopBits 1, 2 (This parameter should be 1 except at 110 baud). FlowControl NIL, XOnXOff. For applications requiring XOn and XOff characters other than ^Q and ^S respectively, this parameter may be supplied as a list in the form:(1 ), where and are replaced by the character values of the XOn and XOff characters. The leading 1 signifies that flow control should be enabled; a leading 0 will program the TTY port with the appropriate XOn and XOff characters, but leave flow control disabled. Note: XOnXOff flow control is known to be reliable only up to 4800 baud. DSR This parameter enables or disables the data set ready signal; it may be specified as T or NIL. CTS This parameter enables or disables the clear to send signal; it may be specified as T or NIL. (TTY.GET.PARAMETERS(TTY.GET.PARAMETERS (function) NIL NIL NIL 228) PARAMETERLIST) [Function] The current settings for the TTY port may be obtained at any time by calling this function. PARAMETERLIST should be a list of parameter names. TTY.GET.PARAMETERS returns an association list of parameter names and values, in a format acceptable to TTY.SET.PARAMETERS. (TTY.SHUTDOWN(TTY.SHUTDOWN (function) NIL NIL NIL 228)) [Function] This function turns off (disables) the TTY port and closes any open streams on the device. Using TTY Streams(USING% TTY% STREAMS NIL Using% TTY% Streams NIL NIL 228) Programs may open streams to the TTY port by calling OPENSTREAM with the file name {TTY}. The ACCESS argument to OPENSTREAM may be INPUT, OUTPUT, or BOTH. Unlike RS232 streams, TTY port streams are not buffered, and a single stream may be used for both input and output. The generic Lisp input/output functions BIN, BOUT, READP, OPENP, and CLOSEF may be used on TTY port streams. TTYCHAT(TTYCHAT NIL NIL NIL NIL 228) TTYCHAT is a module that enables the Chat library module to communicate over the TTY port. No user-callable functions or user-settable variables are available in the TTYCHAT module. Once it is loaded, you may chat to the host named TTY to open a connection to the TTY port. TTYCHAT is contained on the file TTYCHAT.LCOM. Because the TTY port does no low-level input buffering, it is quite likely that many input characters will be lost while chatting at 1200 baud or higher. This package should only be used for non-critical applications, such as testing connections between the TTY port and low-speed printers. RS232CMENU(RS232CMENU NIL NIL NIL NIL 228) RS232CMENU is compatible with the TTY port as well. Certain RS232 port commands, such as SendBreak! are not available with the TTY port, and hence do not appear in the menu. Examples 1 Testing the Connection Between Two Xerox Lisp Machines(TESTING% THE% CONNECTION% BETWEEN% TWO% XEROX% LISP% MACHINES NIL Testing% the% Connection% Between% Two% Xerox% Lisp% Machines NIL NIL 228) To test for a working RS232 connection between Machine A (a Xerox 1108) and Machine B (a Xerox 1100, 1108, or 1186) by moving a file between them, proceed as follows: 1. Load RS232CHAT.LCOM on both machines. 2. Call RS232C.INIT to set up parameters. 3. Do RS232CHAT on both machines. You will be prompted for a window. Whatever you type on machine A should be echoed on machine B and vice versa. Testing the Connection Between Xerox Lisp Machines and a VAX Running VMS VAX side: Set baud rate at which files will be transferred on the VAX side using the VMS command SET. For example, to set to 1200 baud, type: SET TERM TTA1:/SPEED=1200/PERM 1108 side: Load RS232CHAT.LCOM Initialize: (RS232C.INIT 1200 8 NIL 1 NIL'RS232C) Then call (RS232CHAT) You should be able to use the Chat window like a VAX teletype terminal. By matching the baud rate on the VAX ( through SET TERM) with that on the 1108 (through RS232C.INIT), you can use any speed up to 9600 baud. [This page intentionally left blank] (LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC "" "") STARTINGPAGE# 219) (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)))))-3HH T3HHT2HH.$$TT3llT3T22;85ll5ll8,HH2ll2$$2HH +9T3$$T3T3T,$$5Hl +l-T-$$T,8 +x5``l2HH2HH +3HH T2ll2HH ,ll,ll +,HH +,HH,HH-T-T-TF PAGEHEADING VERSOHEADF PAGEHEADING RECTOHEADE PAGEHEADINGFOOTINGVE PAGEHEADINGFOOTINGR HELVETICACLASSICTITAN +TITAN +CLASSIC + HELVETICA HELVETICA CLASSIC + HELVETICA +MODERN +TERMINAL +MODERN +MODERNMODERNMODERN +MODERN ?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) +- HRULE.GETFNMODERN + +-/ , HRULE.GETFNMODERN + +,0 + + HRULE.GETFNMODERN + +* * HRULE.GETFNMODERN + +'' HRULE.GETFNMODERN&(IM.INDEX.GETFN)IM.INDEX.GETFN)IM.INDEX.GETFN)%IM.INDEX.GETFN%&IM.INDEX.GETFN &IM.INDEX.GETFN%% ' HRULE.GETFNMODERN $%2%1%$M#-" "7%P ' HRULE.GETFNMODERN $% ' HRULE.GETFNMODERN $ ! (IM.INDEX.GETFN:  ? $  #z!5IM.INDEX.GETFNMODERN +  c   f      # + 3 +  ; I!2IM.INDEX.GETFN   m  E =  + H ; + + + + + +% + +  + + + + + + +G + + +% + + + + + + + +7 + +  +o +G + + +Z + + + +V2IM.INDEX.GETFN   ^ 'V,IM.INDEX.GETFN  ~=IM.INDEX.GETFN7 +'IM.INDEX.GETFNCLASSIC +!  +h0IM.INDEX.GETFN +     c IM.INDEX.GETFN!IM.INDEX.GETFN"IM.INDEX.GETFN"IM.INDEX.GETFN#IM.INDEX.GETFN (IM.INDEX.GETFNCLASSIC +0IM.INDEX.GETFNMODERN + +   o 0   = "  #  (IM.INDEX.GETFNCLASSIC +:  (IM.INDEX.GETFNCLASSIC +8IM.INDEX.GETFN  p(& P/IM.INDEX.GETFN      +  2  4 -IM.INDEX.GETFN<+IM.INDEX.GETFN + + T +9.IM.INDEX.GETFN  + } 2 t c4IM.INDEX.GETFN  ]   J.IM.INDEX.GETFNMODERN + +  k ++-IM.INDEX.GETFNMODERN +  IIM.INDEX.GETFN$/IM.INDEX.GETFNGIM.INDEX.GETFN3IM.INDEX.GETFN!0IM.INDEX.GETFNMODERN +  `1IM.INDEX.GETFNMODERN + +  kn + +, + + + + +$ +$D + IM.INDEX.GETFN$  + + + +    -7A(kd BMOBJ.GETFN3?1(DEFAULTFONT 1 (GACHA 10) (GACHA 8) (TERMINAL 8)) + + IM.INDEX.GETFN + IM.INDEX.GETFN-  BMOBJ.GETFN3MODERN + +8  O  ^ N 3 6 K A ? KIM.INDEX.GETFN>IM.INDEX.GETFN IM.INDEX.GETFN  =IM.INDEX.GETFN HRULE.GETFNMODERN /IM.INDEX.GETFN` %IM.INDEX.GETFN: + .  u $  #}2IM.INDEX.GETFN  b d   +3 +  F/IM.INDEX.GETFN   V  B = + +N + + +' + + + + + + + +1 + + + +L + +U + +T/IM.INDEX.GETFN   \ 'V )IM.INDEX.GETFN  [9IM.INDEX.GETFN5 +   +"IM.INDEX.GETFN6 % + IM.INDEX.GETFN ' HRULE.GETFNMODERN 6IM.INDEX.GETFN EMH + + + + +  +& +   H/! *)%( (z \ No newline at end of file diff --git a/library/SameDir.tedit b/library/SameDir.tedit new file mode 100644 index 00000000..db81b69f Binary files /dev/null and b/library/SameDir.tedit differ diff --git a/library/Spy.tedit b/library/Spy.tedit new file mode 100644 index 00000000..b3851661 Binary files /dev/null and b/library/Spy.tedit differ diff --git a/library/SysEdit.tedit b/library/SysEdit.tedit new file mode 100644 index 00000000..0dc96816 Binary files /dev/null and b/library/SysEdit.tedit differ diff --git a/library/TableBrowser.tedit b/library/TableBrowser.tedit new file mode 100644 index 00000000..903450b4 Binary files /dev/null and b/library/TableBrowser.tedit differ diff --git a/library/virtualkeyboards/KeyboardEditor.tedit b/library/virtualkeyboards/KeyboardEditor.tedit new file mode 100644 index 00000000..88caf5cc Binary files /dev/null and b/library/virtualkeyboards/KeyboardEditor.tedit differ