From eac3f6f3ab0c9b26961827973880bce712abd6b0 Mon Sep 17 00:00:00 2001 From: sterni Date: Mon, 1 May 2023 18:21:18 +0200 Subject: refactor(3p/lisp/mime4cl): drop unused split-multipart-parts Change-Id: If47a8ffde5b4910f6c52fe82a2372431a0e46045 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8556 Autosubmit: sterni Tested-by: BuildkiteCI Reviewed-by: sterni --- third_party/lisp/mime4cl/mime.lisp | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'third_party/lisp') diff --git a/third_party/lisp/mime4cl/mime.lisp b/third_party/lisp/mime4cl/mime.lisp index 4c0d9e2c9b52..dbf5a25fa4fb 100644 --- a/third_party/lisp/mime4cl/mime.lisp +++ b/third_party/lisp/mime4cl/mime.lisp @@ -419,34 +419,6 @@ each (non-boundary) line or END-PART-FUNCTION at each PART-BOUNDARY." do (last-part) do (process-line line))))) -;; This awkward handling of newlines is due to RFC2046: "The CRLF -;; preceding the boundary delimiter line is conceptually attached to -;; the boundary so that it is possible to have a part that does not -;; end with a CRLF (line break). Body parts that must be considered -;; to end with line breaks, therefore, must have two CRLFs preceding -;; the boundary delimiter line, the first of which is part of the -;; preceding body part, and the second of which is part of the -;; encapsulation boundary". -(defun split-multipart-parts (body-stream part-boundary) - "Read from BODY-STREAM and split MIME parts separated by -PART-BOUNDARY. Return a list of strings." - (let ((part (make-string-output-stream)) - (parts '()) - (beginning-of-part-p t)) - (flet ((output-line (line) - (if beginning-of-part-p - (setf beginning-of-part-p nil) - (terpri part)) - (write-string line part)) - (end-part () - (setf beginning-of-part-p t) - (push (get-output-stream-string part) parts))) - (do-multipart-parts body-stream part-boundary #'output-line #'end-part) - (close part) - ;; the first part is empty or contains all the junk - ;; to the first boundary - (cdr (nreverse parts))))) - (defun index-multipart-parts (body-stream part-boundary) "Read from BODY-STREAM and return the file offset of the MIME parts separated by PART-BOUNDARY." -- cgit 1.4.1