1
0
mirror of synced 2026-01-26 12:21:52 +00:00

More work on the DEFAULTPRINTINGHOST

This commit is contained in:
rmkaplan
2025-12-05 17:25:40 -08:00
parent 5dc4ca219d
commit cfee491a93
4 changed files with 179 additions and 142 deletions

View File

@@ -1,14 +1,12 @@
(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
(FILECREATED "13-Sep-2025 20:28:22" 
{DSK}<Users>kaplan>Local>medley3.5>working-medley>library>UNIXPRINT.;4 13582
(FILECREATED " 5-Dec-2025 11:47:35" {WMEDLEY}<library>UNIXPRINT.;7 13933
:EDIT-BY rmk
:CHANGES-TO (FNS UnixPrint)
:PREVIOUS-DATE "13-Sep-2025 20:27:21"
{DSK}<Users>kaplan>Local>medley3.5>working-medley>library>UNIXPRINT.;3)
:PREVIOUS-DATE " 5-Dec-2025 09:40:47" {WMEDLEY}<library>UNIXPRINT.;6)
(PRETTYCOMPRINT UNIXPRINTCOMS)
@@ -47,7 +45,8 @@
(CDR x])
(UnixPrint
[LAMBDA (HOST FILE PRINTOPTIONS) (* ; "Edited 13-Sep-2025 20:28 by rmk")
[LAMBDA (HOST FILE PRINTOPTIONS) (* ; "Edited 5-Dec-2025 11:46 by rmk")
(* ; "Edited 13-Sep-2025 20:28 by rmk")
(* ; "Edited 11-Sep-2025 20:48 by rmk")
(* ; "Edited 7-Dec-2001 14:55 by rmk:")
(* ; "Edited 20-May-92 14:13 by nilsson")
@@ -57,7 +56,8 @@
(* ;; "The printer is named by HOST or UnixPrinterName, a Global variable.")
[LET*
((PRINTER (OR HOST UnixPrinterName))
((PRINTER (CL:IF (MEMB HOST '(NIL LPT '{LPT})
UnixPrinterName HOST)))
(COPIES (LISTGET PRINTOPTIONS '%#COPIES))
(NAME (LISTGET PRINTOPTIONS 'DOCUMENT.NAME))
(NSIDES (LISTGET PRINTOPTIONS '%#SIDES))
@@ -69,6 +69,7 @@
[COND
((OR (NULL NAME)
(EQ NAME 'LPT)
(STRPOS "{LPT}" NAME 1 NIL T))
(SETQ NAME "Medley Output"))
((EQ (CHCON1 NAME)
@@ -101,8 +102,8 @@
(out tmpstream)
(CL:WITH-OPEN-STREAM
(in (OPENSTREAM FILE 'INPUT))
(printout PROMPTWINDOW .TAB0 0 "Sending output to Unix printer" (OR PRINTER "")
"...")
(printout PROMPTWINDOW .TAB0 0 "Sending output to Unix printer " (OR PRINTER "")
" ")
(IF NSIDES
THEN
(* ;; "Have to put magic simplex/duplex stuff in the tmp file itself, after the first line, cause there is no other way to control some duplex printers.")
@@ -137,7 +138,8 @@
(ShellCommand (UnixPrintCommand PRINTER COPIES NAME tmpname)
PROMPTWINDOW)
(printout PROMPTWINDOW "done" T))
(CL:WHEN NIL (* ; "This should be conditioned an error code--don't want to say %"done%" if it didn't happen. If we put this back, then put in ... in the Sending printout above")
(printout PROMPTWINDOW "done" T)))
(T (ERROR "Couldn't create unix temp file"]
T])
@@ -303,7 +305,7 @@
(ADDTOVAR LAMA )
)
(DECLARE%: DONTCOPY
(FILEMAP (NIL (1354 11238 (InstallUnixPrinter 1364 . 1956) (UnixPrint 1958 . 6897) (UnixShellQuote
6899 . 8328) (UnixTempFile 8330 . 9553) (UnixPrintCommand 9555 . 11236)) (11572 13265 (
UnixPrintCommand 11582 . 13263)))))
(FILEMAP (NIL (1272 11589 (InstallUnixPrinter 1282 . 1874) (UnixPrint 1876 . 7248) (UnixShellQuote
7250 . 8679) (UnixTempFile 8681 . 9904) (UnixPrintCommand 9906 . 11587)) (11923 13616 (
UnixPrintCommand 11933 . 13614)))))
STOP