From b9faa8d0f4425b78ff242a948e825ba55dbabb4b Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 16 Dec 1996 07:12:38 +0000 Subject: [PATCH] (std11-strip-quoted-pair): New implementation. --- std11.el | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/std11.el b/std11.el index 7342229..e5d6c2c 100644 --- a/std11.el +++ b/std11.el @@ -4,7 +4,7 @@ ;; Author: MORIOKA Tomohiko ;; Keywords: mail, news, RFC 822, STD 11 -;; Version: $Id: std11.el,v 0.36 1996-12-02 15:20:12 shuhei-k Exp $ +;; Version: $Id: std11.el,v 0.37 1996-12-16 07:12:38 morioka Exp $ ;; This file is part of MU (Message Utilities). @@ -214,23 +214,23 @@ If BOUNDARY is not nil, it is used as message header separator. )) string "") "\"")) -(defun std11-strip-quoted-pair (str) - (let ((dest "") +(defun std11-strip-quoted-pair (string) + "Strip quoted-pairs in STRING. [std11.el]" + (let (dest + (b 0) (i 0) - (len (length str)) - chr flag) - (while (< i len) - (setq chr (aref str i)) - (if (or flag (not (eq chr ?\\))) - (progn - (setq dest (concat dest (char-to-string chr))) - (setq flag nil) - ) - (setq flag t) + (len (length string)) ) - (setq i (+ i 1)) - ) - dest)) + (while (< i len) + (let ((chr (aref string i))) + (if (eq chr ?\\) + (setq dest (concat dest (substring string b i)) + b (1+ i) + i (+ i 2)) + (setq i (1+ i)) + ))) + (concat dest (substring string b)) + )) (defun std11-strip-quoted-string (string) "Strip quoted-string STRING. [std11.el]" -- 1.7.10.4