From 02f583753197bdfb19c37ec3c2c5a813435e4dad Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 26 Dec 1997 23:45:28 +0000 Subject: [PATCH] Add code to provide printing on NT. --- v7/src/edwin/print.scm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/v7/src/edwin/print.scm b/v7/src/edwin/print.scm index 833574c22..1a1d016d2 100644 --- a/v7/src/edwin/print.scm +++ b/v7/src/edwin/print.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: print.scm,v 1.12 1992/11/05 20:45:41 cph Exp $ +;;; $Id: print.scm,v 1.13 1997/12/26 23:45:28 cph Exp $ ;;; -;;; Copyright (c) 1991-92 Massachusetts Institute of Technology +;;; Copyright (c) 1991-97 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -81,7 +81,10 @@ Variable LPR-SWITCHES is a list of extra switches (strings) to pass to lpr." (title (print-region-title-string region))) (let ((call-printer (lambda (region) - ((or (ref-variable lpr-procedure buffer) print-region/default) + ((or (ref-variable lpr-procedure buffer) + (case microcode-id/operating-system + ((NT) print-region/nt) + (else print-region/default))) region print-headers? title buffer))) (width (ref-variable tab-width buffer))) (if (= width 8) @@ -106,6 +109,14 @@ Variable LPR-SWITCHES is a list of extra switches (strings) to pass to lpr." (print/assemble-switches title (if print-headers? '("-p") '()))))) +(define (print-region/nt region print-headers? title buffer) + print-headers? title + (call-with-temporary-file-pathname + (lambda (pathname) + (write-region region pathname #f #t) + (shell-command #f #f #f #f + (string-append "print " (->namestring pathname)))))) + (define (print-region-title-string region) (let ((buffer-title (let ((buffer (mark-buffer (region-start region)))) -- 2.25.1