[bknr-cvs] r2019 - branches/xml-class-rework/thirdparty/cl-qprint
bknr at bknr.net
bknr at bknr.net
Sat Oct 21 13:33:42 UTC 2006
Author: hhubner
Date: 2006-10-21 09:33:42 -0400 (Sat, 21 Oct 2006)
New Revision: 2019
Modified:
branches/xml-class-rework/thirdparty/cl-qprint/base.lisp
Log:
Optionally encode newlines
Modified: branches/xml-class-rework/thirdparty/cl-qprint/base.lisp
===================================================================
--- branches/xml-class-rework/thirdparty/cl-qprint/base.lisp 2006-10-21 13:33:20 UTC (rev 2018)
+++ branches/xml-class-rework/thirdparty/cl-qprint/base.lisp 2006-10-21 13:33:42 UTC (rev 2019)
@@ -68,7 +68,7 @@
(princ #\linefeed stream))
-(defun encode (input)
+(defun encode (input &key encode-newlines)
"INPUT must be either a string or a stream. Reads from INPUT and produces
a quoted-printable encoded string"
(let ((out-stream (make-string-output-stream))
@@ -101,7 +101,9 @@
;; Ensure newlines are CR-LF
((char= c #\newline)
- (cr-lf out-stream)
+ (if encode-newlines
+ (format out-stream "=0A=0D")
+ (cr-lf out-stream))
(setf last-line-break position))
;; Keep track of whitespace in case of following newlines
More information about the Bknr-cvs
mailing list