From b2ba8f3c2d9f28a57192183d9804e2d66fdd088e Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 8 Jan 1998 18:13:07 +0000 Subject: [PATCH] Modify Windows printing so that it works on Windows 95, which doesn't have the "print" program. --- v7/src/edwin/print.scm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/v7/src/edwin/print.scm b/v7/src/edwin/print.scm index 85903c989..be429025c 100644 --- a/v7/src/edwin/print.scm +++ b/v7/src/edwin/print.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: print.scm,v 1.14 1997/12/26 23:46:41 cph Exp $ +;;; $Id: print.scm,v 1.15 1998/01/08 18:13:07 cph Exp $ ;;; ;;; Copyright (c) 1991-97 Massachusetts Institute of Technology ;;; @@ -113,9 +113,17 @@ Variable LPR-SWITCHES is a list of extra switches (strings) to pass to lpr." print-headers? title buffer (call-with-temporary-file-pathname (lambda (pathname) - (write-region region pathname #f #t) + (call-with-temporary-buffer " print" + (lambda (temp) + (insert-region (region-start region) + (region-end region) + (buffer-end temp)) + (insert-char #\page (buffer-end temp)) + (write-region (buffer-region temp) pathname #f #t))) (shell-command #f #f #f #f - (string-append "print " (->namestring pathname)))))) + (string-append "copy " + (->namestring pathname) + " prn"))))) (define (print-region-title-string region) (let ((buffer-title -- 2.25.1