From: Chris Hanson Date: Thu, 8 Jan 1998 18:13:07 +0000 (+0000) Subject: Modify Windows printing so that it works on Windows 95, which doesn't X-Git-Tag: 20090517-FFI~4898 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b2ba8f3c2d9f28a57192183d9804e2d66fdd088e;p=mit-scheme.git Modify Windows printing so that it works on Windows 95, which doesn't have the "print" program. --- 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