(base64-encode-string): Allow the optional second arg `no-line-break'.
authoryamaoka <yamaoka>
Mon, 20 Dec 1999 01:42:02 +0000 (01:42 +0000)
committeryamaoka <yamaoka>
Mon, 20 Dec 1999 01:42:02 +0000 (01:42 +0000)
ChangeLog
mel-b-el.el

index 3bed761..a960078 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+1999-12-20  Katsumi Yamaoka   <yamaoka@jpl.org>
+
+       * mel-b-el.el (base64-encode-string): Allow the optional second arg
+       `no-line-break'.
+
+\f
 1999-12-14  MORIOKA Tomohiko  <tomo@m17n.org>
 
        * CLIME: Version 1.13.6 (Nakanosh\e-Dò)\e-A released.
index 4238015..eb153b9 100644 (file)
@@ -123,7 +123,7 @@ external decoder is called."
                   (ash (logand (car pack) 3) 4))))
     buf))
 
-(defun-maybe base64-encode-string (string)
+(defun-maybe base64-encode-string (string &optional no-line-break)
   "Encode STRING to base64, and return the result."
   (let* ((len (length string))
         (b 0)(e 57)
@@ -135,7 +135,7 @@ external decoder is called."
                     (function base64-encode-1)
                     (pack-sequence (substring string b e) 3)
                     "")
-                   "\n"))
+                   (if (not no-line-break) "\n")))
       (setq b e
            e (+ e 57)))
     (concat dest