From 3000a765e26b5c1b76cdae955a886a240a7fac6a Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 16 Jul 1994 21:12:36 +0000 Subject: [PATCH] Eliminate case where over-long literal was being emitted. --- v7/src/runtime/cpress.scm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/v7/src/runtime/cpress.scm b/v7/src/runtime/cpress.scm index 7b0955b04..ae6937178 100644 --- a/v7/src/runtime/cpress.scm +++ b/v7/src/runtime/cpress.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: cpress.scm,v 1.5 1994/07/16 20:48:50 cph Exp $ +$Id: cpress.scm,v 1.6 1994/07/16 21:12:36 cph Exp $ Copyright (c) 1992-94 Massachusetts Institute of Technology @@ -539,11 +539,13 @@ MIT in each case. |# (let ((bp command-bp) (ptr (bb-ptr byte-buffer))) (if (not (fix:= ptr bp)) - (write-literal - (fix:- (if (fix:< bp ptr) - ptr - (fix:+ ptr buffer-size)) - bp)))) + (let loop + ((nb (fix:- (if (fix:< bp ptr) ptr (fix:+ ptr buffer-size)) bp))) + (if (fix:<= nb literal-max) + (write-literal nb) + (begin + (write-literal literal-max) + (loop (fix:- nb literal-max))))))) (compress-continuation unspecific)) (define (input-port/read-substring port string start end) -- 2.25.1