Changeset 10216 for release/1.2/source


Ignore:
Timestamp:
Jul 27, 2008, 4:19:48 PM (11 years ago)
Author:
gz
Message:

Merge r10214 (bug in pretty printer)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/1.2/source/lib/pprint.lisp

    r9200 r10216  
    10441044
    10451045(defun output-line (xp Qentry)
    1046   (flet ((find-not-char-reverse (char buffer out-point)
    1047            (do ((i (%i- out-point 1) (%i- i 1)))
    1048                (nil)
    1049              (cond ((%i< i 0)(return nil))
    1050                    ((neq (schar buffer i) char)
    1051                     (return i))))))
     1046  (flet ((find-not-char-reverse (buffer out-point)
     1047           (declare (type simple-base-string buffer) (type fixnum out-point))
     1048           (do ((i (%i- out-point 1) (%i- i 1)))
     1049               ((%i< i 0) nil)
     1050             (when (or (neq (schar buffer i) #\Space)
     1051                       ;; Don't match possibly-quoted space ("possibly" because the #\\ itself might be
     1052                       ;; quoted; don't bother checking for that, no big harm leaving the space even if
     1053                       ;; not totally necessary).
     1054                       (and (%i< 0 i) (eq (schar buffer (%i- i 1)) #\\)))
     1055               (return i)))))
    10521056    (let* ((queue (xp-queue xp))
    10531057           (out-point (BP<-TP xp (xpq-pos queue Qentry)))
    1054            (last-non-blank (find-not-char-reverse #\space (xp-buffer xp) out-point))
     1058           (last-non-blank (find-not-char-reverse (xp-buffer xp) out-point))
    10551059           (end (cond ((memq (xpq-kind queue Qentry) '(:fresh :unconditional)) out-point)
    10561060                      (last-non-blank (%i+ 1 last-non-blank))
Note: See TracChangeset for help on using the changeset viewer.