~ubuntu-branches/ubuntu/lucid/mew-beta/lucid

« back to all changes in this revision

Viewing changes to mew-bq.el

  • Committer: Bazaar Package Importer
  • Author(s): Tatsuya Kinoshita
  • Date: 2006-10-31 22:07:48 UTC
  • mfrom: (1.1.6 upstream) (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20061031220748-iq1bg528g9nt2l57
Tags: 5.1.52~0.20061031-1
New upstream release. (CVS trunk on 2006-10-31)

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
;;; Quoted-printable encoding
142
142
;;;
143
143
 
144
 
(defun mew-q-encode-string (str)
 
144
(defun mew-q-encode-string (str &optional prefix)
145
145
  (let* ((len (length str))
146
146
         (ret (make-string (* len 3) ?a))
147
147
         (i 0) (j 0) char)
154
154
             (< char 126)
155
155
             (not (char-equal char ?=))
156
156
             (not (char-equal char ??))
157
 
             (not (char-equal char ?_))) ;; space
 
157
             (not (char-equal char ?_)) ;; space
 
158
             (or (not prefix) (not (memq char '(?# ?@)))))
158
159
        (aset ret j char))
159
160
       (t
160
 
        (aset ret j ?=)
 
161
        (aset ret j (or prefix ?=))
161
162
        (setq j (1+ j))
162
163
        (aset ret j (aref "0123456789ABCDEF" (lsh char -4)))
163
164
        (setq j (1+ j))
208
209
        (while (< i len)
209
210
          (setq char (aref qpstr i))
210
211
          (cond
211
 
           ((char-equal char ?_)
 
212
           ((and (not key) (char-equal char ?_))
212
213
            (aset ret j mew-sp))
213
214
           ((char-equal char key)
214
215
            (aset ret j (+ (* (mew-hexchar-to-int (aref qpstr (1+ i))) 16)